From 37d06ecebd5a1b85ce284a0eaf72166f9d1bec0f Mon Sep 17 00:00:00 2001 From: mayerro Date: Thu, 19 Sep 2024 17:39:35 +0200 Subject: [PATCH 001/155] dbeaver/dbeaver-devops#1401 removed commit message validator action --- .github/workflows/validation.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/workflows/validation.yml diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml deleted file mode 100644 index 9ccd4113b7..0000000000 --- a/.github/workflows/validation.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: validation - -on: - pull_request: - branches: - - devel - types: - - opened - - synchronize - - reopened - - edited - - ready_for_review - - labeled - -jobs: - commit-message: - uses: dbeaver/dbeaver/.github/workflows/reused-commit-msgs-validator.yml@devel From a4130804bf6a1c0b488dbc127e0cf70166e041e2 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 20 Sep 2024 16:48:40 +0800 Subject: [PATCH 002/155] chore: vscode dev env dbeaver/dbeaver-vscode#13 (#2918) * chore: vscode dev env dbeaver/dbeaver-vscode#15 * chore: update target * chore: update launch configurations * chore: revert extensions recommendations --- .vscode/launch.json | 119 ++++++++++++++------------------ javaConfig.json | 1 - org.jkiss.cloudbeaver.tp.target | 2 +- 3 files changed, 53 insertions(+), 69 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 69ae494895..f8b19a4514 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,7 +4,7 @@ { "type": "chrome", "request": "launch", - "name": "Chrome", + "name": "CloudBeaver CE", "url": "http://localhost:8080", "webRoot": "${workspaceFolder}/..", "outFiles": [ @@ -17,75 +17,60 @@ }, { "type": "java", - "name": "CloudBeaver CE", + "name": "CloudBeaver CE Server", "cwd": "${workspaceFolder}/workspace-dev-ce", "request": "launch", "mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher", - "windows": { - "type": "java", - "name": "CloudBeaver CE", - "request": "launch", - "mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher", - "args": [ - "-product", - "io.cloudbeaver.product.ce.product", - "-configuration", - "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/", - "-dev", - "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/dev.properties", - "-os", - "win32", - "-ws", - "win32", - "-arch", - "x86_64", - "-nl", - "en", - "-showsplash", - "-web-config", - "conf/cloudbeaver.conf" - ], - "vmArgs": [ - "-XX:+IgnoreUnrecognizedVMOptions", - "--add-modules=ALL-SYSTEM", - "-Xms64m", - "-Xmx1024m", - "-Declipse.pde.launch=true" - ] - }, - "osx": { - "type": "java", - "name": "CloudBeaver CE", - "request": "launch", - "mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher", - "args": [ - "-product", - "io.cloudbeaver.product.ce.product", - "-configuration", - "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/", - "-dev", - "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/dev.properties", - "-os", - "macosx", - "-ws", - "cocoa", - "-arch", - "aarch64", - "-nl", - "en", - "-showsplash", - "-web-config", - "conf/cloudbeaver.conf" - ], - "vmArgs": [ - "-XX:+IgnoreUnrecognizedVMOptions", - "--add-modules=ALL-SYSTEM", - "-Xms64m", - "-Xmx1024m", - "-Declipse.pde.launch=true", - "-XstartOnFirstThread" - ] - } + "args": [ + "-product", + "io.cloudbeaver.product.ce.product", + "-configuration", + "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/", + "-dev", + "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/dev.properties", + "-nl", + "en", + "-web-config", + "conf/cloudbeaver.conf", + "-registryMultiLanguage" + ], + // "windows": { + // "args": ["-os", "win32", "-ws", "win32", "-arch", "x86_64"] + // }, + // "osx": { + // "args": ["-os", "macosx", "-ws", "cocoa", "-arch", "aarch64"] + // }, + + "vmArgs": [ + "-XX:+IgnoreUnrecognizedVMOptions", + "-Xms64m", + "-Xmx1024m", + "-Declipse.pde.launch=true", + "-XstartOnFirstThread", + "-Dfile.encoding=UTF-8", + "--add-modules=ALL-SYSTEM", + "--add-opens=java.base/java.io=ALL-UNNAMED", + "--add-opens=java.base/java.lang=ALL-UNNAMED", + "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED", + "--add-opens=java.base/java.net=ALL-UNNAMED", + "--add-opens=java.base/java.nio=ALL-UNNAMED", + "--add-opens=java.base/java.nio.charset=ALL-UNNAMED", + "--add-opens=java.base/java.text=ALL-UNNAMED", + "--add-opens=java.base/java.time=ALL-UNNAMED", + "--add-opens=java.base/java.util=ALL-UNNAMED", + "--add-opens=java.base/java.util.concurrent=ALL-UNNAMED", + "--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED", + "--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED", + "--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED", + "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED", + "--add-opens=java.base/sun.security.ssl=ALL-UNNAMED", + "--add-opens=java.base/sun.security.action=ALL-UNNAMED", + "--add-opens=java.base/sun.security.util=ALL-UNNAMED", + "--add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED", + "--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED", + "--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED", + "--add-opens=java.sql/java.sql=ALL-UNNAMED" + ] } ] } diff --git a/javaConfig.json b/javaConfig.json index 50a5fcc07c..31698aea82 100644 --- a/javaConfig.json +++ b/javaConfig.json @@ -1,4 +1,3 @@ { - "projects": ["../dbeaver-common", "../dbeaver", "../cloudbeaver/server"], "targetPlatform": "./org.jkiss.cloudbeaver.tp.target" } diff --git a/org.jkiss.cloudbeaver.tp.target b/org.jkiss.cloudbeaver.tp.target index e933d075c1..d67fb5bf55 100644 --- a/org.jkiss.cloudbeaver.tp.target +++ b/org.jkiss.cloudbeaver.tp.target @@ -1,6 +1,6 @@ - + From 6ad148850dfca3614323eca9958156fabec87290 Mon Sep 17 00:00:00 2001 From: Alexey Date: Sat, 21 Sep 2024 12:06:37 +0800 Subject: [PATCH 003/155] refactor: migrate to pure esm CB-5684 (#2929) * refactor: migrate to pure esm * chore: revert `useDefineForClassFields` tsconf * chore: remove patch.js --- webapp/package.json | 1 + .../packages/core-administration/package.json | 1 + .../AdministrationItemService.ts | 27 +- .../AdministrationItem/IAdministrationItem.ts | 2 +- .../filterConfigurationWizard.ts | 2 +- .../orderAdministrationItems.ts | 2 +- .../src/AdministrationLocaleService.ts | 14 +- .../AdministrationScreenService.ts | 18 +- .../ConfigurationWizardScreenService.ts | 4 +- .../ConfigurationWizardService.ts | 12 +- .../DATA_CONTEXT_ADMINISTRATION_ITEM_ROUTE.ts | 2 +- .../src/PermissionsResource.ts | 2 +- .../packages/core-administration/src/index.ts | 31 +- .../core-administration/src/manifest.ts | 12 +- webapp/packages/core-app/package.json | 1 + .../packages/core-app/src/AppLocaleService.ts | 14 +- .../core-app/src/AppScreen/AppScreen.tsx | 4 +- .../src/AppScreen/AppScreenBootstrap.ts | 10 +- .../packages/core-app/src/AppScreen/Main.tsx | 2 +- .../core-app/src/AppScreen/RightArea.tsx | 2 +- webapp/packages/core-app/src/Body.tsx | 6 +- webapp/packages/core-app/src/BodyLazy.ts | 2 +- webapp/packages/core-app/src/index.ts | 17 +- webapp/packages/core-app/src/manifest.ts | 6 +- .../packages/core-authentication/package.json | 1 + .../core-authentication/src/AppAuthService.ts | 10 +- .../AuthConfigurationParametersResource.ts | 4 +- .../src/AuthConfigurationsResource.ts | 6 +- .../src/AuthInfoService.ts | 6 +- .../src/AuthProviderService.ts | 8 +- .../src/AuthProvidersResource.ts | 6 +- .../src/AuthSettingsService.test.ts | 18 +- .../core-authentication/src/LocaleService.ts | 14 +- .../src/TeamMetaParametersResource.ts | 2 +- .../src/TeamsManagerService.ts | 2 +- .../core-authentication/src/TeamsResource.ts | 18 +- .../src/UserConfigurationBootstrap.ts | 4 +- .../src/UserDataService.ts | 2 +- .../src/UserInfoResource.ts | 23 +- .../src/UserMetaParametersResource.ts | 4 +- .../core-authentication/src/UsersResource.ts | 20 +- .../__custom_mocks__/mockAuthentication.ts | 2 +- .../resolvers/mockGetActiveUser.ts | 2 +- .../packages/core-authentication/src/index.ts | 46 +- .../core-authentication/src/manifest.ts | 38 +- webapp/packages/core-blocks/package.json | 3 +- .../core-blocks/src/ActionIconButton.tsx | 6 +- .../core-blocks/src/AppRefreshButton.tsx | 2 +- .../core-blocks/src/BlocksLocaleService.ts | 14 +- webapp/packages/core-blocks/src/Button.tsx | 12 +- webapp/packages/core-blocks/src/Cell.test.tsx | 2 +- webapp/packages/core-blocks/src/Cell.tsx | 6 +- webapp/packages/core-blocks/src/Clickable.tsx | 4 +- .../core-blocks/src/ClickableLoader.ts | 4 +- webapp/packages/core-blocks/src/Code.tsx | 4 +- .../CommonDialog/CommonDialogBody.tsx | 4 +- .../CommonDialog/CommonDialogFooter.tsx | 4 +- .../CommonDialog/CommonDialogHeader.tsx | 10 +- .../CommonDialog/CommonDialogWrapper.tsx | 12 +- .../src/CommonDialog/ConfirmationDialog.tsx | 18 +- .../CommonDialog/ConfirmationDialogDelete.tsx | 2 +- .../src/CommonDialog/DialogsPortal.tsx | 18 +- .../src/CommonDialog/RenameDialog.tsx | 28 +- .../src/ComponentsRegistry/CRegistry.tsx | 4 +- .../src/ComponentsRegistry/CRegistryList.ts | 2 +- .../src/ComponentsRegistry/CRegistryLoader.ts | 4 +- .../ComponentsRegistryContext.ts | 2 +- .../ComponentsTreeContext.ts | 2 +- .../src/ComponentsRegistry/registry.tsx | 12 +- .../src/ComponentsRegistry/useParentProps.ts | 6 +- .../ConnectionImageWithMask.tsx | 4 +- .../ConnectionImageWithMaskSvg.tsx | 4 +- .../ConnectionMark.tsx | 4 +- .../src/Containers/ColoredContainer.tsx | 8 +- .../core-blocks/src/Containers/Container.tsx | 8 +- .../core-blocks/src/Containers/Group.tsx | 8 +- .../core-blocks/src/Containers/GroupClose.tsx | 6 +- .../core-blocks/src/Containers/GroupItem.tsx | 8 +- .../src/Containers/GroupSubTitle.tsx | 8 +- .../core-blocks/src/Containers/GroupTitle.tsx | 8 +- .../src/Containers/IContainerProps.ts | 2 +- .../Containers/filterContainerFakeProps.ts | 4 +- .../src/Containers/filterLayoutFakeProps.ts | 2 +- .../packages/core-blocks/src/DisplayError.tsx | 8 +- .../core-blocks/src/ErrorBoundary.tsx | 22 +- .../ErrorDetailsDialog/ErrorDetailsDialog.tsx | 24 +- .../src/ErrorDetailsDialog/ErrorModel.ts | 2 +- .../core-blocks/src/ErrorMessage.test.tsx | 2 +- .../packages/core-blocks/src/ErrorMessage.tsx | 10 +- .../core-blocks/src/ExceptionMessage.tsx | 14 +- .../core-blocks/src/Expand/Expandable.tsx | 10 +- webapp/packages/core-blocks/src/Fill.tsx | 4 +- webapp/packages/core-blocks/src/Flex/Flex.tsx | 2 +- .../src/FolderExplorer/FolderExplorer.tsx | 2 +- .../src/FolderExplorer/FolderExplorerPath.tsx | 10 +- .../src/FolderExplorer/FolderName.tsx | 10 +- .../src/FolderExplorer/useFolderExplorer.ts | 11 +- .../src/FormControls/Checkboxes/Checkbox.tsx | 6 +- .../Checkboxes/CheckboxMarkup.tsx | 4 +- .../FormControls/Checkboxes/FieldCheckbox.tsx | 16 +- .../src/FormControls/Checkboxes/Switch.tsx | 32 +- .../Checkboxes/useCheckboxState.ts | 4 +- .../core-blocks/src/FormControls/Combobox.tsx | 32 +- .../src/FormControls/ComboboxLoader.ts | 4 +- .../core-blocks/src/FormControls/Field.tsx | 8 +- .../src/FormControls/FieldDescription.tsx | 4 +- .../src/FormControls/FieldLabel.tsx | 4 +- .../core-blocks/src/FormControls/Filter.tsx | 16 +- .../core-blocks/src/FormControls/Form.tsx | 12 +- .../src/FormControls/FormFieldDescription.tsx | 14 +- .../FormControls/InputField/InputField.tsx | 10 +- .../InputField/InputFieldBase.tsx | 36 +- .../InputField/InputFieldState.tsx | 6 +- .../src/FormControls/InputFileTextContent.tsx | 24 +- .../src/FormControls/InputFiles.tsx | 36 +- .../core-blocks/src/FormControls/Radio.tsx | 14 +- .../src/FormControls/RadioGroup.tsx | 6 +- .../src/FormControls/TagsCombobox.tsx | 8 +- .../src/FormControls/TagsComboboxLoader.ts | 4 +- .../core-blocks/src/FormControls/Textarea.tsx | 22 +- .../src/FormControls/isFormStateControl.ts | 2 +- .../FormControls/useCustomInputValidation.ts | 6 +- .../core-blocks/src/FormControls/useForm.ts | 6 +- .../src/FormControls/useFormStateControl.ts | 6 +- webapp/packages/core-blocks/src/Icon.test.tsx | 2 +- .../packages/core-blocks/src/IconButton.tsx | 10 +- .../packages/core-blocks/src/IconOrImage.tsx | 4 +- webapp/packages/core-blocks/src/Iframe.tsx | 4 +- webapp/packages/core-blocks/src/InfoItem.tsx | 8 +- .../core-blocks/src/ItemList/ItemList.tsx | 4 +- .../src/ItemList/ItemListSearch.tsx | 10 +- .../core-blocks/src/ItemList/ListItem.tsx | 6 +- .../src/ItemList/ListItemDescription.tsx | 4 +- .../core-blocks/src/ItemList/ListItemIcon.tsx | 4 +- .../core-blocks/src/ItemList/ListItemName.tsx | 4 +- webapp/packages/core-blocks/src/Link.test.tsx | 2 +- webapp/packages/core-blocks/src/Link.tsx | 6 +- .../core-blocks/src/Loader/Loader.tsx | 22 +- .../core-blocks/src/Loader/useAutoLoad.ts | 4 +- webapp/packages/core-blocks/src/Menu/Menu.tsx | 18 +- .../core-blocks/src/Menu/MenuBarSmallItem.tsx | 8 +- .../core-blocks/src/Menu/MenuEmptyItem.tsx | 6 +- .../core-blocks/src/Menu/MenuItem.tsx | 14 +- .../core-blocks/src/Menu/MenuItemCheckbox.tsx | 12 +- .../core-blocks/src/Menu/MenuItemElement.tsx | 14 +- .../core-blocks/src/Menu/MenuItemRadio.tsx | 12 +- .../core-blocks/src/Menu/MenuPanel.tsx | 12 +- .../core-blocks/src/Menu/MenuSeparator.tsx | 10 +- .../core-blocks/src/Menu/MenuStateContext.ts | 2 +- .../src/Menu/useMouseContextMenu.ts | 2 +- .../src/MenuPanel/MenuPanelItem.tsx | 16 +- .../core-blocks/src/MenuPanel/MenuTrigger.tsx | 12 +- .../ObjectPropertyInfoForm.tsx | 14 +- .../ObjectPropertyInfoFormLoader.ts | 4 +- .../ObjectPropertyInfoForm/RenderField.tsx | 18 +- .../useObjectPropertyCategories.ts | 2 +- .../core-blocks/src/Overlay/Overlay.tsx | 4 +- .../src/Overlay/OverlayActions.tsx | 4 +- .../core-blocks/src/Overlay/OverlayHeader.tsx | 4 +- .../src/Overlay/OverlayHeaderIcon.tsx | 6 +- .../src/Overlay/OverlayHeaderSubTitle.tsx | 4 +- .../src/Overlay/OverlayHeaderTitle.tsx | 4 +- .../src/Overlay/OverlayMessage.tsx | 4 +- .../src/Placeholder/Placeholder.tsx | 4 +- .../src/Placeholder/PlaceholderContainer.ts | 2 +- .../src/PropertiesTable/PropertiesTable.tsx | 20 +- .../src/PropertiesTable/PropertyItem.tsx | 16 +- .../PropertiesTable/PropertyValueSelector.tsx | 8 +- .../src/ResourcesHooks/useOffsetPagination.ts | 6 +- .../src/ResourcesHooks/useResource.ts | 32 +- .../core-blocks/src/Slide/SlideBox.tsx | 2 +- .../core-blocks/src/Slide/SlideElement.tsx | 4 +- .../core-blocks/src/Slide/SlideOverlay.tsx | 6 +- .../src/Snackbars/ActionSnackbar.tsx | 14 +- .../src/Snackbars/NotificationMark.tsx | 2 +- .../src/Snackbars/ProcessSnackbar.tsx | 22 +- .../core-blocks/src/Snackbars/Snackbar.tsx | 18 +- .../SnackbarMarkups/SnackbarBody.tsx | 10 +- .../SnackbarMarkups/SnackbarContent.tsx | 4 +- .../SnackbarMarkups/SnackbarFooter.tsx | 8 +- .../SnackbarMarkups/SnackbarStatus.tsx | 10 +- .../SnackbarMarkups/SnackbarWrapper.tsx | 8 +- .../packages/core-blocks/src/Split/Pane.tsx | 8 +- .../core-blocks/src/Split/ResizerControls.tsx | 8 +- .../packages/core-blocks/src/Split/Split.tsx | 6 +- .../core-blocks/src/Split/SplitControls.tsx | 8 +- .../core-blocks/src/Split/useSplit.ts | 4 +- .../src/Split/useSplitUserState.ts | 4 +- .../packages/core-blocks/src/StaticImage.tsx | 4 +- .../core-blocks/src/StatusMessage.test.tsx | 2 +- .../core-blocks/src/StatusMessage.tsx | 12 +- .../packages/core-blocks/src/Table/Table.tsx | 10 +- .../src/Table/TableColumnHeader.tsx | 4 +- .../src/Table/TableColumnValue.tsx | 14 +- .../core-blocks/src/Table/TableHeader.tsx | 4 +- .../core-blocks/src/Table/TableItem.tsx | 16 +- .../core-blocks/src/Table/TableItemExpand.tsx | 16 +- .../core-blocks/src/Table/TableItemGroup.tsx | 2 +- .../src/Table/TableItemGroupContent.tsx | 2 +- .../src/Table/TableItemGroupExpand.tsx | 8 +- .../src/Table/TableItemGroupExpandSpace.tsx | 4 +- .../core-blocks/src/Table/TableItemSelect.tsx | 12 +- .../src/Table/TableItemSeparator.tsx | 4 +- .../core-blocks/src/Table/TableSelect.tsx | 10 +- .../core-blocks/src/Table/TableState.ts | 2 +- .../core-blocks/src/Table/useTable.ts | 2 +- webapp/packages/core-blocks/src/Tags/Tag.tsx | 6 +- webapp/packages/core-blocks/src/Tags/Tags.tsx | 4 +- webapp/packages/core-blocks/src/Text.test.tsx | 2 +- .../core-blocks/src/TextPlaceholder.test.tsx | 2 +- .../core-blocks/src/TextPlaceholder.tsx | 4 +- .../core-blocks/src/TimerIcon.test.tsx | 2 +- webapp/packages/core-blocks/src/TimerIcon.tsx | 6 +- .../src/ToolsPanel/ToolsAction.tsx | 10 +- .../core-blocks/src/ToolsPanel/ToolsPanel.tsx | 4 +- .../src/Tree/TreeNode/TreeNode.tsx | 12 +- .../src/Tree/TreeNode/TreeNodeControl.tsx | 14 +- .../src/Tree/TreeNode/TreeNodeExpand.tsx | 20 +- .../src/Tree/TreeNode/TreeNodeIcon.tsx | 6 +- .../src/Tree/TreeNode/TreeNodeName.tsx | 4 +- .../src/Tree/TreeNode/TreeNodeNested.tsx | 4 +- .../Tree/TreeNode/TreeNodeNestedMessage.tsx | 4 +- .../src/Tree/TreeNode/TreeNodeSelect.tsx | 12 +- .../packages/core-blocks/src/UploadArea.tsx | 6 +- .../__custom__mocks__/ErrorBoundaryMock.tsx | 2 +- .../src/importLazyComponent.test.tsx | 4 +- .../core-blocks/src/importLazyComponent.ts | 2 +- webapp/packages/core-blocks/src/index.ts | 448 +++++++++--------- .../core-blocks/src/layout/AppLogo.tsx | 6 +- .../core-blocks/src/layout/TopAppBar.tsx | 4 +- .../src/localization/Translate.tsx | 2 +- .../src/localization/useTranslate.ts | 2 +- webapp/packages/core-blocks/src/manifest.ts | 2 +- .../src/useAdministrationSettings.ts | 4 +- .../core-blocks/src/useClipBoard.test.ts | 2 +- .../core-blocks/src/useCombinedHandler.ts | 2 +- .../src/useControlledScroll.test.ts | 2 +- .../core-blocks/src/useErrorDetails.ts | 4 +- .../core-blocks/src/useExecutor.test.ts | 4 +- .../packages/core-blocks/src/useExecutor.ts | 6 +- webapp/packages/core-blocks/src/useFocus.ts | 4 +- .../core-blocks/src/useFormValidator.ts | 2 +- .../packages/core-blocks/src/useInterval.ts | 2 +- webapp/packages/core-blocks/src/useMouse.ts | 4 +- .../core-blocks/src/useObjectRef.test.ts | 2 +- .../core-blocks/src/useObservableRef.test.ts | 2 +- .../core-blocks/src/useObservableRef.ts | 2 +- .../core-blocks/src/usePasswordValidation.ts | 4 +- .../packages/core-blocks/src/usePermission.ts | 2 +- .../core-blocks/src/usePromiseState.ts | 4 +- .../packages/core-blocks/src/useRefInherit.ts | 2 +- webapp/packages/core-blocks/src/useS.ts | 6 +- .../core-blocks/src/useStateDelay.test.ts | 2 +- .../packages/core-blocks/src/useSuspense.ts | 4 +- .../packages/core-blocks/src/useUserData.ts | 4 +- webapp/packages/core-bootstrap/package.json | 1 + .../packages/core-bootstrap/src/bootstrap.ts | 6 +- webapp/packages/core-bootstrap/src/index.ts | 11 +- .../packages/core-bootstrap/src/manifest.ts | 2 +- .../core-bootstrap/src/renderLayout.tsx | 2 +- .../core-browser-cookies/package.json | 1 + .../core-browser-cookies/src/index.ts | 11 +- .../core-browser-cookies/src/manifest.ts | 2 +- .../core-browser-settings/package.json | 1 + .../src/BROWSER_COOKIES_SETTINGS_GROUP.ts | 2 +- .../src/BrowserSettingsService.test.ts | 16 +- .../src/LocaleService.ts | 14 +- .../core-browser-settings/src/index.ts | 11 +- .../core-browser-settings/src/manifest.ts | 4 +- webapp/packages/core-browser/package.json | 1 + .../core-browser/src/IndexedDB/IndexedDB.ts | 6 +- .../src/IndexedDB/IndexedDBService.ts | 2 +- .../src/LocalStorageSaveService.ts | 8 +- .../src/ServiceWorkerBootstrap.ts | 6 +- .../core-browser/src/ServiceWorkerService.ts | 8 +- webapp/packages/core-browser/src/index.ts | 19 +- webapp/packages/core-browser/src/manifest.ts | 8 +- .../core-browser/src/service-worker.ts | 6 +- .../core-client-activity/package.json | 1 + .../src/ClientActivityService.ts | 2 +- .../core-client-activity/src/index.ts | 11 +- .../core-client-activity/src/manifest.ts | 2 +- webapp/packages/core-connections/package.json | 1 + .../src/ConnectionDialectResource.ts | 10 +- .../ConnectionExecutionContext.ts | 4 +- .../ConnectionExecutionContextResource.ts | 8 +- .../ConnectionExecutionContextService.ts | 6 +- .../IConnectionExecutionContext.ts | 2 +- .../src/ConnectionFolderEventHandler.ts | 2 +- .../src/ConnectionFolderResource.ts | 8 +- .../src/ConnectionInfoEventHandler.ts | 2 +- .../src/ConnectionInfoResource.ts | 38 +- .../src/ConnectionPublicSecretsResource.ts | 12 +- .../src/ConnectionToolsResource.ts | 8 +- .../src/ConnectionsLocaleService.ts | 16 +- .../src/ConnectionsManagerService.ts | 10 +- .../core-connections/src/ContainerResource.ts | 8 +- .../core-connections/src/DBDriverResource.ts | 4 +- .../DataContexts/DATA_CONTEXT_CONNECTION.ts | 2 +- .../src/NavTree/ConnectionNavNodeService.ts | 24 +- .../src/NavTree/NavNodeExtensionsService.ts | 10 +- .../src/NavTree/getConnectionFolderId.ts | 2 +- .../getConnectionFolderIdFromNodeId.ts | 6 +- .../src/NavTree/getConnectionParentId.ts | 2 +- .../src/NavTree/getFolderNodeParents.ts | 4 +- .../src/NetworkHandlerResource.ts | 2 +- .../src/createConnectionFolderParam.ts | 2 +- .../src/extensions/IConnectionProvider.ts | 4 +- .../src/extensions/IConnectionSetter.ts | 4 +- .../extensions/IExecutionContextProvider.ts | 4 +- .../src/extensions/IObjectCatalogProvider.ts | 2 +- .../src/extensions/IObjectCatalogSetter.ts | 2 +- .../src/extensions/IObjectSchemaProvider.ts | 2 +- .../src/extensions/IObjectSchemaSetter.ts | 2 +- webapp/packages/core-connections/src/index.ts | 84 ++-- .../core-connections/src/isJDBCConnection.ts | 4 +- .../packages/core-connections/src/manifest.ts | 36 +- .../core-connections/src/useConnectionInfo.ts | 6 +- .../core-connections/src/useDBDriver.ts | 2 +- .../packages/core-data-context/package.json | 1 + .../DataContext/DATA_CONTEXT_DI_PROVIDER.ts | 2 +- .../src/DataContext/DataContext.ts | 6 +- .../src/DataContext/IDataContext.ts | 4 +- .../src/DataContext/IDataContextProvider.ts | 2 +- .../src/DataContext/createDataContext.ts | 2 +- .../DataContext/dataContextAddDIProvider.ts | 4 +- .../src/DataContext/useDataContext.ts | 6 +- .../src/DataContext/useDataContextLink.ts | 2 +- .../packages/core-data-context/src/index.ts | 20 +- webapp/packages/core-di/package.json | 1 + webapp/packages/core-di/src/App.ts | 18 +- .../AppLoadingScreen/HideAppLoadingScreen.tsx | 2 +- .../HideAppLoadingScreenLazy.ts | 2 +- webapp/packages/core-di/src/Bootstrap.ts | 4 +- webapp/packages/core-di/src/DIContainer.ts | 6 +- webapp/packages/core-di/src/DIService.ts | 8 +- webapp/packages/core-di/src/Dependency.ts | 2 +- webapp/packages/core-di/src/Disposable.ts | 2 +- webapp/packages/core-di/src/IApp.ts | 2 +- .../packages/core-di/src/IServiceProvider.ts | 2 +- webapp/packages/core-di/src/PluginManifest.ts | 2 +- .../core-di/src/ServiceProviderContext.tsx | 2 +- .../core-di/src/ServiceProviderContextLazy.ts | 2 +- .../src/__tests__/app-init/TestBootstrap.ts | 10 +- .../src/__tests__/app-init/TestService.ts | 2 +- .../src/__tests__/app-init/app-init.test.ts | 8 +- .../src/__tests__/app-init/manifest.ts | 4 +- .../core-di/src/dependencyInjectorContext.ts | 2 +- webapp/packages/core-di/src/index.ts | 34 +- .../packages/core-di/src/inversifyWrapper.ts | 4 +- webapp/packages/core-di/src/isConstructor.ts | 2 +- webapp/packages/core-di/src/manifest.ts | 4 +- webapp/packages/core-di/src/useService.ts | 4 +- webapp/packages/core-dialogs/package.json | 1 + .../src/Menu/ContextMenu/ContextMenu.ts | 22 +- .../Menu/ContextMenu/ContextMenuService.ts | 8 +- .../src/Menu/ContextMenu/IContextMenuItem.ts | 4 +- .../core-dialogs/src/Menu/IMenuPanel.ts | 2 +- .../src/Menu/StaticMenu/StaticMenu.ts | 8 +- .../Menu/models/ComputedContextMenuModel.ts | 6 +- .../src/Menu/models/ComputedMenuItemModel.ts | 4 +- .../src/Menu/models/ComputedMenuPanelModel.ts | 2 +- .../src/Menu/models/MenuOptionsStore.ts | 2 +- webapp/packages/core-dialogs/src/index.ts | 27 +- webapp/packages/core-dialogs/src/manifest.ts | 4 +- webapp/packages/core-events/package.json | 3 +- .../EventContext/EventStopPropagationFlag.ts | 2 +- .../src/EventsSettingsService.test.ts | 16 +- .../src/ExceptionsCatcherService.ts | 6 +- .../core-events/src/NotificationService.ts | 24 +- .../src/ProcessNotificationController.ts | 2 +- webapp/packages/core-events/src/index.ts | 23 +- webapp/packages/core-events/src/manifest.ts | 6 +- webapp/packages/core-executor/package.json | 1 + .../core-executor/src/ExecutionContext.ts | 2 +- webapp/packages/core-executor/src/Executor.ts | 20 +- .../src/ExecutorHandlersCollection.ts | 6 +- .../core-executor/src/ExecutorInterrupter.ts | 2 +- .../packages/core-executor/src/IExecutor.ts | 4 +- .../core-executor/src/IExecutorHandler.ts | 2 +- .../src/IExecutorHandlersCollection.ts | 4 +- .../core-executor/src/ISyncExecutor.ts | 4 +- .../core-executor/src/SyncExecutor.ts | 18 +- .../src/TaskScheduler/AutoRunningTask.ts | 4 +- .../core-executor/src/TaskScheduler/Task.ts | 2 +- .../src/TaskScheduler/TaskNew.ts | 4 +- .../src/TaskScheduler/TaskScheduler.ts | 4 +- .../src/executorHandlerFilter.ts | 4 +- webapp/packages/core-executor/src/index.ts | 41 +- .../packages/core-executor/src/whileTask.ts | 10 +- webapp/packages/core-extensions/package.json | 1 + .../core-extensions/src/ExtensionUtils.ts | 2 +- .../core-extensions/src/IExtension.ts | 2 +- .../core-extensions/src/createExtension.ts | 4 +- webapp/packages/core-extensions/src/index.ts | 13 +- .../packages/core-localization/package.json | 1 + .../core-localization/src/DEFAULT_LOCALE.ts | 2 +- .../src/LocalizationService.ts | 38 +- .../packages/core-localization/src/index.ts | 17 +- .../core-localization/src/manifest.ts | 2 +- .../core-navigation-tree/package.json | 3 +- .../core-navigation-tree/src/LocaleService.ts | 12 +- .../src/NavTreeSettingsService.test.ts | 18 +- .../src/NodesManager/DATA_CONTEXT_NAV_NODE.ts | 2 +- .../NodesManager/DATA_CONTEXT_NAV_NODES.ts | 2 +- .../src/NodesManager/DBObjectResource.ts | 6 +- .../src/NodesManager/NavNodeInfoResource.ts | 13 +- .../src/NodesManager/NavNodeManagerService.ts | 33 +- .../src/NodesManager/NavTreeResource.ts | 34 +- .../NodesManager/ProjectsNavNodeService.ts | 9 +- .../extensions/IObjectNavNodeProvider.ts | 4 +- .../src/NodesManager/getNodesFromContext.ts | 6 +- .../src/NodesManager/navNodeMoveContext.ts | 2 +- .../core-navigation-tree/src/index.ts | 55 ++- .../core-navigation-tree/src/manifest.ts | 14 +- .../packages/core-notifications/package.json | 1 + .../core-notifications/src/Notifications.tsx | 4 +- .../NotificationsItem/NotificationsItem.tsx | 2 +- .../packages/core-notifications/src/index.ts | 9 +- webapp/packages/core-product/package.json | 1 + .../src/ProductSettingsService.ts | 6 +- webapp/packages/core-product/src/index.ts | 4 +- webapp/packages/core-product/src/manifest.ts | 2 +- webapp/packages/core-projects/package.json | 1 + .../core-projects/src/LocaleService.ts | 16 +- .../src/ProjectInfoEventHandler.ts | 9 +- .../core-projects/src/ProjectInfoResource.ts | 4 +- .../core-projects/src/ProjectsService.ts | 8 +- .../src/activeProjectsContext.ts | 2 +- .../core-projects/src/createResourceOfType.ts | 4 +- .../src/extensions/IProjectProvider.ts | 2 +- .../src/extensions/IProjectSetter.ts | 2 +- .../src/extensions/IProjectSetterState.ts | 2 +- webapp/packages/core-projects/src/index.ts | 29 +- .../core-projects/src/isResourceOfType.ts | 2 +- webapp/packages/core-projects/src/manifest.ts | 8 +- .../core-resource-manager/package.json | 1 + .../src/LocaleService.ts | 12 +- .../src/PluginBootstrap.ts | 7 +- .../src/ResourceManagerEventHandler.ts | 2 +- .../src/ResourceManagerResource.ts | 9 +- .../src/SharedProjectsResource.ts | 4 +- .../core-resource-manager/src/index.ts | 31 +- .../core-resource-manager/src/isRMNavNode.ts | 2 +- .../core-resource-manager/src/manifest.ts | 12 +- webapp/packages/core-resource/package.json | 3 +- .../src/Resource/CachedDataResource.test.ts | 2 +- .../src/Resource/CachedDataResource.ts | 18 +- .../src/Resource/CachedMapResource.test.ts | 6 +- .../src/Resource/CachedMapResource.ts | 44 +- .../src/Resource/CachedResource.ts | 32 +- .../Resource/CachedResourceOffsetPageKeys.ts | 10 +- .../CachedTreeResource/CachedTreeMetadata.ts | 34 +- .../CachedTreeResource.test.ts | 8 +- .../CachedTreeResource/CachedTreeResource.ts | 62 +-- .../CachedTreeUseTracker.ts | 26 +- .../CachedTreeResource/ICachedTreeData.ts | 4 +- .../CachedTreeResource/ICachedTreeElement.ts | 2 +- .../CachedTreeResource/createTreeNode.ts | 4 +- .../CachedTreeResource/deleteTreeValue.ts | 8 +- .../CachedTreeResource/getTreeParents.ts | 12 +- .../CachedTreeResource/getTreeValue.ts | 6 +- .../src/Resource/ICachedResourceMetadata.ts | 2 +- .../core-resource/src/Resource/IResource.ts | 10 +- .../src/Resource/LocalResource.ts | 2 +- .../OffsetPagination/ResourceOffsetPage.ts | 2 +- .../core-resource/src/Resource/Resource.ts | 22 +- .../src/Resource/ResourceAlias.ts | 2 +- .../src/Resource/ResourceAliases.ts | 12 +- .../src/Resource/ResourceError.ts | 2 +- .../core-resource/src/Resource/ResourceKey.ts | 6 +- .../src/Resource/ResourceKeyAlias.ts | 2 +- .../src/Resource/ResourceKeyList.ts | 14 +- .../src/Resource/ResourceKeyListAlias.ts | 2 +- .../src/Resource/ResourceKeyUtils.ts | 4 +- .../src/Resource/ResourceLogger.ts | 2 +- .../src/Resource/ResourceMetadata.ts | 18 +- .../src/Resource/ResourceOffsetPagination.ts | 10 +- .../src/Resource/ResourceUseTracker.ts | 14 +- .../src/Resource/getOffsetPageKeyInfo.ts | 6 +- webapp/packages/core-resource/src/index.ts | 38 +- webapp/packages/core-root/package.json | 3 +- .../DataSynchronizationQueue.ts | 2 +- .../DataSynchronizationService.ts | 6 +- .../SynchronizationMessage.ts | 2 +- .../src/DefaultNavigatorSettingsResource.ts | 6 +- .../core-root/src/FeaturesResource.ts | 6 +- .../core-root/src/NetworkStateService.ts | 8 +- .../core-root/src/PasswordPolicyResource.ts | 4 +- .../core-root/src/PermissionsService.ts | 6 +- .../core-root/src/ProductInfoResource.ts | 4 +- .../packages/core-root/src/QuotasService.ts | 2 +- .../packages/core-root/src/RootBootstrap.ts | 6 +- .../core-root/src/ServerConfigEventHandler.ts | 4 +- .../core-root/src/ServerConfigResource.ts | 8 +- .../ServerEventEmitter/TopicEventHandler.ts | 11 +- .../src/ServerLicenseStatusResource.ts | 4 +- .../core-root/src/ServerNodeService.ts | 8 +- .../src/ServerResourceQuotasResource.ts | 4 +- .../core-root/src/SessionActionService.ts | 4 +- .../core-root/src/SessionActivityService.ts | 2 +- .../core-root/src/SessionDataResource.ts | 2 +- .../core-root/src/SessionEventSource.ts | 10 +- .../src/SessionExpireEventService.ts | 4 +- .../core-root/src/SessionExpireService.ts | 6 +- .../core-root/src/SessionInfoEventHandler.ts | 4 +- .../src/SessionPermissionEventHandler.ts | 4 +- .../src/SessionPermissionsResource.ts | 10 +- .../packages/core-root/src/SessionResource.ts | 10 +- .../src/Settings/SESSION_SETTINGS_LAYER.ts | 2 +- .../Settings/ServerSettingsManagerService.ts | 6 +- .../src/Settings/ServerSettingsResource.ts | 4 +- .../src/Settings/ServerSettingsService.ts | 10 +- .../core-root/src/WindowEventsService.ts | 6 +- .../data/defaultServerConfig.ts | 2 +- .../src/__custom_mocks__/mockAppInit.ts | 4 +- .../src/__custom_mocks__/mockGraphQL.ts | 2 +- .../resolvers/mockOpenSession.ts | 2 +- .../resolvers/mockServerConfig.ts | 4 +- webapp/packages/core-root/src/index.ts | 66 +-- webapp/packages/core-root/src/manifest.ts | 56 +-- webapp/packages/core-routing/package.json | 1 + .../core-routing/src/RouterService.ts | 10 +- .../core-routing/src/Screen/ScreenService.ts | 6 +- .../core-routing/src/WindowsService.ts | 2 +- webapp/packages/core-routing/src/index.ts | 17 +- webapp/packages/core-routing/src/manifest.ts | 6 +- webapp/packages/core-sdk/package.json | 1 + .../core-sdk/src/AsyncTask/AsyncTask.ts | 4 +- .../src/AsyncTask/AsyncTaskInfoService.ts | 6 +- .../core-sdk/src/CustomGraphQLClient.ts | 61 +-- .../uploadBlobResultSetExtension.ts | 2 +- .../uploadDriverLibraryExtension.ts | 2 +- .../Extensions/uploadResultDataExtension.ts | 4 +- webapp/packages/core-sdk/src/GQLError.ts | 10 +- .../packages/core-sdk/src/GQLErrorCatcher.ts | 2 +- .../packages/core-sdk/src/GraphQLService.ts | 23 +- webapp/packages/core-sdk/src/PlainGQLError.ts | 8 +- .../core-sdk/src/SDKGraphQLErrorExtensions.ts | 2 +- .../core-sdk/src/ServerInternalError.ts | 6 +- .../packages/core-sdk/src/getGQLResponse.ts | 2 +- .../core-sdk/src/getObjectPropertyType.ts | 2 +- .../src/getObjectPropertyValueType.ts | 2 +- webapp/packages/core-sdk/src/index.ts | 40 +- .../src/isObjectPropertyInfoStateEqual.ts | 2 +- webapp/packages/core-sdk/src/manifest.ts | 6 +- .../core-server-localization/package.json | 1 + .../core-server-localization/src/index.ts | 9 +- .../core-server-localization/src/manifest.ts | 2 +- .../core-session-localization/package.json | 1 + .../core-session-localization/src/index.ts | 9 +- .../core-session-localization/src/manifest.ts | 2 +- .../core-settings-localization/package.json | 1 + .../src/LocaleService.ts | 16 +- .../src/LocalizationSettingsManagerService.ts | 4 +- .../src/SettingsLocalizationBootstrap.ts | 6 +- .../src/SettingsLocalizationService.test.ts | 16 +- .../core-settings-localization/src/index.ts | 4 +- .../src/manifest.ts | 8 +- .../packages/core-settings-user/package.json | 1 + .../core-settings-user/src/LocaleService.ts | 14 +- .../src/SettingsUserBootstrap.ts | 4 +- .../src/UserSettingsService.ts | 4 +- .../packages/core-settings-user/src/index.ts | 4 +- .../core-settings-user/src/manifest.ts | 6 +- webapp/packages/core-settings/package.json | 3 +- .../src/ISettingsResolverSource.ts | 4 +- .../core-settings/src/LocaleService.ts | 12 +- .../SettingsManager/ISettingDescription.ts | 4 +- .../INTERFACE_SETTINGS_GROUP.ts | 2 +- .../SettingsGroups/ROOT_SETTINGS_GROUP.ts | 2 +- .../SettingsManager/SettingsManagerService.ts | 4 +- .../core-settings/src/SettingsProvider.ts | 6 +- .../src/SettingsProviderService.ts | 4 +- .../src/SettingsResolverService.ts | 2 +- .../src/SettingsResolverSource.ts | 6 +- .../core-settings/src/SettingsSource.ts | 4 +- .../src/createSettingsAliasResolver.test.ts | 6 +- .../src/createSettingsAliasResolver.ts | 6 +- webapp/packages/core-settings/src/index.ts | 34 +- webapp/packages/core-settings/src/manifest.ts | 8 +- webapp/packages/core-storage/package.json | 1 + .../core-storage/src/StorageService.ts | 2 +- webapp/packages/core-storage/src/index.ts | 4 +- webapp/packages/core-storage/src/manifest.ts | 2 +- .../packages/core-task-manager/package.json | 1 + .../src/TaskManagerService.ts | 2 +- .../packages/core-task-manager/src/index.ts | 13 +- .../core-task-manager/src/manifest.ts | 2 +- webapp/packages/core-theming/package.json | 3 +- .../core-theming/src/ComponentStyle.ts | 2 +- .../core-theming/src/LocaleService.ts | 14 +- .../packages/core-theming/src/ThemeService.ts | 22 +- .../src/ThemeSettingsManagementService.ts | 4 +- .../src/ThemeSettingsService.test.ts | 16 +- .../core-theming/src/ThemeSettingsService.ts | 2 +- webapp/packages/core-theming/src/index.ts | 17 +- webapp/packages/core-theming/src/manifest.ts | 8 +- .../packages/core-theming/src/themeUtils.ts | 2 +- webapp/packages/core-theming/src/themes.ts | 4 +- webapp/packages/core-ui/package.json | 1 + .../core-ui/src/AuthenticationProvider.tsx | 2 +- .../src/AuthenticationProviderLoader.ts | 2 +- .../src/Clipboard/ClipboardBootstrap.ts | 6 +- .../core-ui/src/ContextMenu/ContextMenu.tsx | 6 +- .../src/ContextMenu/ContextMenuLazy.ts | 2 +- .../src/ContextMenu/MenuActionElement.tsx | 4 +- .../src/ContextMenu/MenuBar/MenuBar.tsx | 16 +- .../src/ContextMenu/MenuBar/MenuBarItem.tsx | 2 +- .../ContextMenu/MenuBar/MenuBarItemLoader.ts | 2 +- .../src/ContextMenu/MenuBar/MenuBarLazy.ts | 2 +- .../src/ContextMenu/MenuItemRenderer.tsx | 9 +- .../src/ContextMenu/SubMenuElement.tsx | 13 +- .../core-ui/src/DragAndDrop/DNDAcceptType.ts | 4 +- .../core-ui/src/DragAndDrop/DNDPreview.tsx | 4 +- .../src/DragAndDrop/DNDPreviewLoader.ts | 2 +- .../src/DragAndDrop/DNDProviderLoader.ts | 2 +- .../core-ui/src/DragAndDrop/useDNDBox.ts | 4 +- .../core-ui/src/DragAndDrop/useDNDData.ts | 2 +- .../core-ui/src/Form/Components/BaseForm.tsx | 10 +- .../src/Form/Components/BaseFormLazy.ts | 2 +- .../src/Form/Components/IBaseFormProps.ts | 4 +- .../src/Form/DATA_CONTEXT_FORM_STATE.ts | 2 +- .../core-ui/src/Form/FormBaseService.ts | 18 +- webapp/packages/core-ui/src/Form/FormPart.ts | 4 +- webapp/packages/core-ui/src/Form/FormState.ts | 16 +- .../packages/core-ui/src/Form/IFormProps.ts | 2 +- .../packages/core-ui/src/Form/IFormState.ts | 6 +- .../core-ui/src/Form/formStateContext.ts | 2 +- .../core-ui/src/InlineEditor/EditorDialog.tsx | 2 +- .../core-ui/src/InlineEditor/InlineEditor.tsx | 4 +- .../src/InlineEditor/InlineEditorLoader.ts | 2 +- webapp/packages/core-ui/src/LocaleService.ts | 14 +- .../Screens/AppScreen/NavigationService.ts | 2 +- .../Screens/AppScreen/OptionsPanelService.ts | 4 +- .../src/SideBarPanel/LeftBarPanelService.ts | 2 +- .../core-ui/src/SideBarPanel/SideBarPanel.tsx | 8 +- .../src/SideBarPanel/SideBarPanelLoader.ts | 2 +- .../src/SideBarPanel/SideBarPanelService.ts | 2 +- .../src/Tabs/Tab/DATA_CONTEXT_TABS_CONTEXT.ts | 2 +- webapp/packages/core-ui/src/Tabs/Tab/Tab.tsx | 10 +- .../core-ui/src/Tabs/Tab/TabActions.tsx | 4 +- .../core-ui/src/Tabs/Tab/TabDefault.tsx | 14 +- .../core-ui/src/Tabs/Tab/TabDefaultLoader.ts | 2 +- .../core-ui/src/Tabs/Tab/TabIconLoader.ts | 2 +- .../core-ui/src/Tabs/Tab/TabLoader.ts | 2 +- .../packages/core-ui/src/Tabs/Tab/TabMenu.tsx | 10 +- .../packages/core-ui/src/Tabs/Tab/TabProps.ts | 2 +- .../core-ui/src/Tabs/Tab/TabTitleLoader.ts | 2 +- .../packages/core-ui/src/Tabs/Tab/useTab.ts | 6 +- webapp/packages/core-ui/src/Tabs/TabList.tsx | 14 +- .../core-ui/src/Tabs/TabListLoader.ts | 2 +- webapp/packages/core-ui/src/Tabs/TabPanel.tsx | 10 +- .../core-ui/src/Tabs/TabPanelList.tsx | 8 +- .../core-ui/src/Tabs/TabPanelListLoader.ts | 2 +- .../core-ui/src/Tabs/TabPanelLoader.ts | 2 +- .../core-ui/src/Tabs/TabPanelProps.ts | 2 +- .../core-ui/src/Tabs/TabsBootstrap.ts | 18 +- .../core-ui/src/Tabs/TabsBox/TabsBox.tsx | 8 +- .../core-ui/src/Tabs/TabsBox/TabsBoxLoader.ts | 2 +- .../src/Tabs/TabsContainer/ITabsContainer.ts | 2 +- .../src/Tabs/TabsContainer/TabsContainer.ts | 2 +- .../packages/core-ui/src/Tabs/TabsContext.ts | 4 +- .../packages/core-ui/src/Tabs/TabsState.tsx | 10 +- .../core-ui/src/Tabs/TabsStateLoader.ts | 2 +- .../src/Tabs/TabsValidationProvider.tsx | 4 +- .../core-ui/src/Tabs/generateTabElement.ts | 2 +- .../core-ui/src/Tabs/useTabLocalState.ts | 4 +- .../packages/core-ui/src/Tabs/useTabState.ts | 4 +- .../core-ui/src/Tabs/useTabsValidation.ts | 4 +- webapp/packages/core-ui/src/index.ts | 118 ++--- webapp/packages/core-ui/src/manifest.ts | 16 +- webapp/packages/core-utils/package.json | 1 + .../core-utils/src/GlobalConstants.test.ts | 2 +- .../core-utils/src/GlobalConstants.ts | 6 +- .../core-utils/src/ILoadableState.test.ts | 2 +- .../core-utils/src/LoadingError.test.ts | 2 +- .../core-utils/src/MetadataMap.test.ts | 2 +- webapp/packages/core-utils/src/MetadataMap.ts | 4 +- .../core-utils/src/OrderedMap.test.ts | 2 +- .../core-utils/src/PriorityQueue.test.ts | 2 +- .../packages/core-utils/src/PriorityQueue.ts | 6 +- .../src/Promises/CancellablePromise.test.ts | 4 +- .../src/Promises/CancellablePromise.ts | 2 +- .../core-utils/src/Promises/Deferred.ts | 6 +- .../src/Promises/PromiseCancelledError.ts | 2 +- .../src/Promises/cancellableTimeout.test.ts | 2 +- .../src/Promises/cancellableTimeout.ts | 2 +- .../packages/core-utils/src/TempMap.test.ts | 2 +- webapp/packages/core-utils/src/TempMap.ts | 4 +- .../core-utils/src/base64ToBlob.test.ts | 2 +- .../core-utils/src/base64ToHex.test.ts | 2 +- webapp/packages/core-utils/src/base64ToHex.ts | 2 +- .../core-utils/src/bindFunctions.test.ts | 2 +- .../core-utils/src/blobToBase64.test.ts | 2 +- .../core-utils/src/bytesToSize.test.ts | 2 +- .../core-utils/src/cacheValue.test.ts | 2 +- .../src/combineITerableIterators.test.ts | 2 +- .../core-utils/src/copyToClipboard.test.ts | 2 +- .../src/createLastPromiseGetter.test.ts | 2 +- .../core-utils/src/createPath.test.ts | 2 +- .../packages/core-utils/src/debounce.test.ts | 2 +- .../core-utils/src/declensionOfNumber.test.ts | 2 +- .../core-utils/src/declensionOfNumber.ts | 8 +- .../packages/core-utils/src/errorOf.test.ts | 4 +- webapp/packages/core-utils/src/flat.test.ts | 2 +- .../core-utils/src/formatNumber.test.ts | 2 +- .../packages/core-utils/src/formatNumber.ts | 2 +- .../core-utils/src/getCookies.test.ts | 2 +- webapp/packages/core-utils/src/getCookies.ts | 2 +- .../packages/core-utils/src/getMIME.test.ts | 2 +- webapp/packages/core-utils/src/getOS.test.ts | 2 +- .../core-utils/src/getPathName.test.ts | 2 +- webapp/packages/core-utils/src/getPathName.ts | 4 +- .../core-utils/src/getPathParent.test.ts | 2 +- .../packages/core-utils/src/getPathParent.ts | 4 +- .../core-utils/src/getPathParents.test.ts | 2 +- .../packages/core-utils/src/getPathParents.ts | 4 +- .../core-utils/src/getPathParts.test.ts | 2 +- .../core-utils/src/getProgressPercent.test.ts | 2 +- .../core-utils/src/getTextBetween.test.ts | 2 +- .../core-utils/src/getUniqueName.test.ts | 2 +- webapp/packages/core-utils/src/index.ts | 160 +++---- .../core-utils/src/isArraysEqual.test.ts | 2 +- .../packages/core-utils/src/isArraysEqual.ts | 10 +- .../packages/core-utils/src/isDefined.test.ts | 2 +- .../core-utils/src/isImageFormat.test.ts | 2 +- .../core-utils/src/isMapsEqual.test.ts | 2 +- .../core-utils/src/isNotNullDefined.test.ts | 2 +- .../core-utils/src/isPrimitive.test.ts | 2 +- .../core-utils/src/isPropertiesEqual.test.ts | 2 +- .../packages/core-utils/src/isSameDay.test.ts | 2 +- .../core-utils/src/isValidUrl.test.ts | 2 +- webapp/packages/core-utils/src/isValidUrl.ts | 18 +- .../core-utils/src/isValuesEqual.test.ts | 2 +- .../core-utils/src/openCenteredPopup.test.ts | 2 +- .../core-utils/src/parseJSONFlat.test.ts | 2 +- .../packages/core-utils/src/pathJoin.test.ts | 2 +- .../core-utils/src/removeLineBreak.test.ts | 2 +- .../src/removeMetadataFromDataURL.test.ts | 2 +- .../src/removeMetadataFromDataURL.ts | 4 +- .../core-utils/src/replaceMiddle.test.ts | 2 +- .../core-utils/src/replaceSubstring.test.ts | 2 +- .../core-utils/src/svgToDataUri.test.ts | 2 +- .../packages/core-utils/src/svgToDataUri.ts | 2 +- .../packages/core-utils/src/textToHex.test.ts | 2 +- .../packages/core-utils/src/throttle.test.ts | 10 +- .../core-utils/src/timestampToDate.test.ts | 2 +- .../core-utils/src/toSafeHtmlString.test.ts | 2 +- .../packages/core-utils/src/uriToBlob.test.ts | 2 +- webapp/packages/core-utils/src/uriToBlob.ts | 4 +- .../core-utils/src/utf8ToBase64.test.ts | 2 +- .../core-utils/src/withTimestamp.test.ts | 2 +- .../packages/core-version-update/package.json | 1 + .../core-version-update/src/LocaleService.ts | 14 +- .../src/VersionUpdateService.ts | 2 +- .../packages/core-version-update/src/index.ts | 11 +- .../core-version-update/src/manifest.ts | 4 +- webapp/packages/core-version/package.json | 1 + .../core-version/src/VersionLocaleService.ts | 16 +- webapp/packages/core-version/src/index.ts | 15 +- webapp/packages/core-version/src/manifest.ts | 6 +- .../core-version/src/useAppVersion.tsx | 2 +- webapp/packages/core-view/package.json | 1 + .../core-view/src/Action/ActionItem.ts | 10 +- .../core-view/src/Action/ActionService.ts | 12 +- .../src/Action/Actions/ACTION_ADD.ts | 2 +- .../src/Action/Actions/ACTION_CANCEL.ts | 2 +- .../src/Action/Actions/ACTION_COLLAPSE_ALL.ts | 2 +- .../src/Action/Actions/ACTION_CREATE.ts | 2 +- .../src/Action/Actions/ACTION_DELETE.ts | 2 +- .../src/Action/Actions/ACTION_DOWNLOAD.ts | 2 +- .../src/Action/Actions/ACTION_DUPLICATE.ts | 2 +- .../src/Action/Actions/ACTION_EDIT.ts | 2 +- .../src/Action/Actions/ACTION_EXPORT.ts | 2 +- .../src/Action/Actions/ACTION_FILTER.ts | 2 +- .../src/Action/Actions/ACTION_IMPORT.ts | 2 +- .../src/Action/Actions/ACTION_LAYOUT.ts | 2 +- .../src/Action/Actions/ACTION_NEW_FOLDER.ts | 2 +- .../src/Action/Actions/ACTION_OPEN.ts | 2 +- .../src/Action/Actions/ACTION_OPEN_IN_TAB.ts | 2 +- .../src/Action/Actions/ACTION_REDO.ts | 2 +- .../src/Action/Actions/ACTION_REFRESH.ts | 2 +- .../src/Action/Actions/ACTION_RENAME.ts | 2 +- .../src/Action/Actions/ACTION_REVERT.ts | 2 +- .../src/Action/Actions/ACTION_SAVE.ts | 2 +- .../src/Action/Actions/ACTION_SETTINGS.ts | 2 +- .../src/Action/Actions/ACTION_UNDO.ts | 2 +- .../src/Action/Actions/ACTION_UPLOAD.ts | 2 +- .../src/Action/Actions/ACTION_ZOOM_IN.ts | 2 +- .../src/Action/Actions/ACTION_ZOOM_OUT.ts | 2 +- .../packages/core-view/src/Action/IAction.ts | 2 +- .../core-view/src/Action/IActionHandler.ts | 6 +- .../core-view/src/Action/IActionItem.ts | 8 +- .../Bindings/KEY_BINDING_OPEN_IN_TAB.ts | 2 +- .../KeyBinding/Bindings/KEY_BINDING_REDO.ts | 2 +- .../KeyBinding/Bindings/KEY_BINDING_SAVE.ts | 2 +- .../KeyBinding/Bindings/KEY_BINDING_UNDO.ts | 2 +- .../Action/KeyBinding/IKeyBindingHandler.ts | 4 +- .../Action/KeyBinding/KeyBindingService.ts | 4 +- .../src/Action/KeyBinding/createKeyBinding.ts | 2 +- .../src/Action/KeyBinding/getBindingLabel.ts | 4 +- .../KeyBinding/getCommonAndOSSpecificKeys.ts | 2 +- .../core-view/src/Action/createAction.ts | 4 +- .../DATA_CONTEXT_LOADABLE_STATE.ts | 2 +- .../packages/core-view/src/LocaleService.ts | 16 +- .../core-view/src/Menu/DATA_CONTEXT_MENU.ts | 2 +- .../src/Menu/DATA_CONTEXT_SUBMENU_ITEM.ts | 2 +- webapp/packages/core-view/src/Menu/IMenu.ts | 2 +- .../core-view/src/Menu/IMenuHandler.ts | 4 +- .../core-view/src/Menu/IMenuItemsCreator.ts | 6 +- .../src/Menu/MenuItem/IMenuActionItem.ts | 4 +- .../src/Menu/MenuItem/IMenuBaseItem.ts | 2 +- .../src/Menu/MenuItem/IMenuCheckboxItem.ts | 2 +- .../src/Menu/MenuItem/IMenuCustomItem.ts | 4 +- .../src/Menu/MenuItem/IMenuGroupItem.ts | 2 +- .../src/Menu/MenuItem/IMenuLazyItem.ts | 2 +- .../src/Menu/MenuItem/IMenuSeparatorItem.ts | 2 +- .../src/Menu/MenuItem/IMenuSubMenuItem.ts | 6 +- .../src/Menu/MenuItem/MenuActionItem.ts | 6 +- .../src/Menu/MenuItem/MenuBaseItem.ts | 6 +- .../src/Menu/MenuItem/MenuCheckboxItem.ts | 6 +- .../src/Menu/MenuItem/MenuCustomItem.ts | 6 +- .../src/Menu/MenuItem/MenuGroupItem.ts | 6 +- .../core-view/src/Menu/MenuItem/MenuItem.ts | 2 +- .../src/Menu/MenuItem/MenuLazyItem.ts | 6 +- .../src/Menu/MenuItem/MenuSeparatorItem.ts | 4 +- .../src/Menu/MenuItem/MenuSubMenuItem.ts | 10 +- .../core-view/src/Menu/MenuService.ts | 28 +- .../packages/core-view/src/Menu/createMenu.ts | 4 +- .../core-view/src/Menu/menuExtractItems.ts | 6 +- webapp/packages/core-view/src/Menu/useMenu.ts | 14 +- .../core-view/src/Menu/useMenuContext.ts | 8 +- webapp/packages/core-view/src/View/AppView.ts | 4 +- .../core-view/src/View/CaptureView.tsx | 16 +- .../core-view/src/View/CaptureViewLazy.ts | 2 +- .../core-view/src/View/CaptureViewScope.tsx | 2 +- .../src/View/CaptureViewScopeLazy.ts | 2 +- .../core-view/src/View/DATA_CONTEXT_VIEW.ts | 2 +- webapp/packages/core-view/src/View/IView.ts | 4 +- webapp/packages/core-view/src/View/View.ts | 6 +- .../core-view/src/View/ViewService.ts | 4 +- .../core-view/src/View/parseHotkey.ts | 2 +- .../core-view/src/View/useActiveView.ts | 4 +- .../src/View/useCaptureViewContext.ts | 4 +- .../core-view/src/View/useViewContext.ts | 8 +- webapp/packages/core-view/src/index.ts | 150 +++--- webapp/packages/core-view/src/manifest.ts | 10 +- webapp/packages/core-website/package.json | 1 + webapp/packages/core-website/src/index.ts | 4 +- .../plugin-administration/package.json | 1 + .../src/Administration/Administration.tsx | 17 +- .../AdministrationViewService.ts | 4 +- .../src/Administration/ItemContent.tsx | 2 +- .../AdministrationMenu/AdministrationMenu.tsx | 2 +- .../AdministrationScreen.tsx | 6 +- .../AdministrationScreenServiceBootstrap.ts | 8 +- .../AdministrationTopAppBar.tsx | 2 +- .../ConfigurationWizardScreen.tsx | 6 +- .../WizardTopAppBar/WizardTopAppBar.tsx | 2 +- .../WizardTopAppBar/WizardTopAppBarService.ts | 2 +- ...onfigurationWizardPagesBootstrapService.ts | 18 +- .../Form/ServerConfigurationFeaturesForm.tsx | 4 +- .../Form/ServerConfigurationInfoForm.tsx | 2 +- .../ServerConfigurationNavigatorViewForm.tsx | 2 +- .../ServerConfigurationDriversForm.tsx | 2 +- .../ServerConfigurationPage.tsx | 16 +- .../ServerConfigurationService.ts | 10 +- ...erConfigurationAdministrationNavService.ts | 2 +- .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 8 +- .../plugin-administration/src/index.ts | 29 +- .../plugin-administration/src/manifest.ts | 18 +- .../package.json | 1 + .../AuthenticationProviders.tsx | 4 +- ...verConfigurationAuthenticationBootstrap.ts | 10 +- .../Contexts/teamFormConfigureContext.ts | 2 +- .../Administration/Users/Teams/CreateTeam.tsx | 4 +- .../Users/Teams/CreateTeamService.ts | 8 +- .../GrantedConnections/ConnectionList.tsx | 10 +- .../GrantedConnections/GrantedConnections.tsx | 20 +- .../GrantedConnectionsList.tsx | 10 +- .../GrantedConnectionsTabService.ts | 20 +- .../GrantedConnectionsTableItem.tsx | 2 +- .../useGrantedConnections.tsx | 8 +- .../Teams/GrantedUsers/GrantedUserList.tsx | 10 +- .../Users/Teams/GrantedUsers/GrantedUsers.tsx | 12 +- .../GrantedUsers/GrantedUsersTabService.ts | 16 +- .../GrantedUsers/GrantedUsersTableItem.tsx | 2 +- .../Users/Teams/GrantedUsers/UserList.tsx | 8 +- .../Teams/GrantedUsers/UsersTableItem.tsx | 2 +- .../Teams/GrantedUsers/useGrantedUsers.tsx | 8 +- .../Users/Teams/Options/Permissions.tsx | 2 +- .../Teams/Options/TeamMetaParameters.tsx | 2 +- .../Users/Teams/Options/TeamOptions.tsx | 6 +- .../Teams/Options/TeamOptionsTabService.ts | 12 +- .../Administration/Users/Teams/TeamForm.tsx | 8 +- .../Users/Teams/TeamFormActionsContext.ts | 12 +- .../Users/Teams/TeamFormBaseActions.tsx | 6 +- .../Users/Teams/TeamFormService.ts | 8 +- .../Users/Teams/TeamFormState.ts | 10 +- .../Teams/TeamsAdministrationNavService.ts | 2 +- .../Administration/Users/Teams/TeamsPage.tsx | 8 +- .../Users/Teams/TeamsTable/Team.tsx | 4 +- .../Users/Teams/TeamsTable/TeamEdit.tsx | 4 +- .../Users/Teams/TeamsTable/TeamsTable.tsx | 4 +- .../Users/Teams/TeamsTable/useTeamsTable.tsx | 2 +- .../Users/Teams/useTeamFormState.ts | 6 +- .../Users/UserForm/AdministrationUserForm.tsx | 8 +- .../AdministrationUserFormDeleteButton.tsx | 8 +- .../UserForm/AdministrationUserFormService.ts | 2 +- .../UserForm/AdministrationUserFormState.ts | 2 +- .../UserFormConnectionAccess.tsx | 6 +- .../UserFormConnectionAccessPanel.tsx | 6 +- .../UserFormConnectionAccessPart.ts | 8 +- .../UserFormConnectionAccessPartBootstrap.ts | 10 +- .../UserFormConnectionTableItem.tsx | 2 +- .../getUserFormConnectionAccessPart.ts | 6 +- .../Users/UserForm/Info/UserFormInfo.tsx | 16 +- .../UserForm/Info/UserFormInfoCredentials.tsx | 4 +- .../Info/UserFormInfoMetaParameters.tsx | 4 +- .../Users/UserForm/Info/UserFormInfoPart.ts | 16 +- .../Info/UserFormInfoPartBootstrap.ts | 10 +- .../UserForm/Info/UserFormInfoPartService.ts | 2 +- .../Users/UserForm/Info/UserFormInfoTeams.tsx | 4 +- .../UserForm/Info/getUserFormInfoPart.ts | 4 +- .../Origin/UserFormOriginInfoPanel.tsx | 6 +- .../UserForm/Origin/UserFormOriginInfoTab.tsx | 4 +- .../Origin/UserFormOriginPartBootstrap.ts | 15 +- .../Users/UserForm/UserFormBaseBootstrap.ts | 4 - .../Users/UsersAdministration.tsx | 10 +- .../UsersAdministrationNavigationService.ts | 2 +- .../Users/UsersAdministrationService.ts | 18 +- .../Users/UsersTable/CreateUser.tsx | 4 +- .../Users/UsersTable/CreateUserBootstrap.ts | 10 +- .../Users/UsersTable/CreateUserService.ts | 6 +- .../UsersTable/Filters/UsersTableFilters.tsx | 2 +- .../Administration/Users/UsersTable/User.tsx | 14 +- .../Users/UsersTable/UserCredentialsList.tsx | 4 +- .../Users/UsersTable/UserEdit.tsx | 6 +- .../UsersAdministrationToolsPanel.tsx | 4 +- .../Users/UsersTable/UsersPage.tsx | 16 +- .../Users/UsersTable/UsersTable.tsx | 2 +- .../useAdministrationUserFormState.ts | 4 +- .../Users/UsersTable/useUsersTable.tsx | 8 +- .../AdministrationUsersManagementService.ts | 2 +- .../src/AuthenticationLocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 6 +- .../src/index.ts | 30 +- .../src/manifest.ts | 42 +- .../plugin-authentication/package.json | 1 + .../src/AuthenticationLocaleService.ts | 14 +- .../src/AuthenticationService.ts | 18 +- .../src/Dialog/AuthDialog.tsx | 18 +- .../src/Dialog/AuthDialogService.ts | 4 +- .../AuthProviderForm/AuthProviderForm.tsx | 2 +- .../AuthProviderForm/ConfigurationsList.tsx | 9 +- .../src/Dialog/useAuthDialogState.ts | 14 +- .../src/PluginBootstrap.ts | 6 +- .../src/UserLoadingErrorDialogBootstrap.ts | 3 - .../plugin-authentication/src/index.ts | 13 +- .../src/isAutoLoginSessionAction.ts | 2 +- .../plugin-authentication/src/manifest.ts | 10 +- webapp/packages/plugin-browser/package.json | 1 + .../plugin-browser/src/LocaleService.ts | 14 +- .../src/PluginBrowserBootstrap.ts | 4 +- .../src/PluginBrowserPreloadingBootstrap.ts | 2 +- webapp/packages/plugin-browser/src/index.ts | 9 +- .../packages/plugin-browser/src/manifest.ts | 6 +- .../packages/plugin-codemirror6/package.json | 1 + .../plugin-codemirror6/src/Editor.tsx | 12 +- .../plugin-codemirror6/src/EditorLoader.ts | 2 +- .../src/Hyperlink/Hyperlink.ts | 2 +- .../src/Hyperlink/HyperlinkLoader.ts | 2 +- .../src/Hyperlink/useHyperlink.ts | 8 +- .../plugin-codemirror6/src/IEditorProps.ts | 2 +- .../src/ReactCodemirror.tsx | 12 +- .../src/ReactCodemirrorPanel.tsx | 2 +- .../packages/plugin-codemirror6/src/index.ts | 27 +- .../plugin-codemirror6/src/theme/index.ts | 9 +- .../src/useCodemirrorExtensions.ts | 2 +- .../src/useEditorDefaultExtensions.ts | 2 +- .../src/validateCursorBoundaries.ts | 2 +- .../plugin-connection-custom/package.json | 1 + .../src/CustomConnectionPluginBootstrap.ts | 8 +- .../src/DriverSelector/DriverSelector.tsx | 2 +- .../DriverSelector/DriverSelectorDialog.tsx | 4 +- .../DriverSelector/useDriverSelectorDialog.ts | 2 +- .../src/LocaleService.ts | 14 +- .../plugin-connection-custom/src/index.ts | 11 +- .../plugin-connection-custom/src/manifest.ts | 6 +- .../plugin-connection-search/package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/Search/ConnectionSearchService.ts | 8 +- .../src/Search/DatabaseList.tsx | 2 +- .../src/Search/SearchDatabase.tsx | 4 +- .../src/SearchConnectionPluginBootstrap.ts | 8 +- .../plugin-connection-search/src/index.ts | 11 +- .../plugin-connection-search/src/manifest.ts | 8 +- .../plugin-connection-template/package.json | 1 + .../src/ConnectionDialog/ConnectionDialog.tsx | 8 +- .../ConnectionDialogFooter.tsx | 4 +- .../TemplateConnectionSelector.tsx | 6 +- .../ConnectionDialog/useConnectionDialog.ts | 10 +- .../src/LocaleService.ts | 14 +- .../src/TemplateConnectionPluginBootstrap.ts | 10 +- .../src/TemplateConnectionsResource.ts | 2 +- .../src/TemplateConnectionsService.ts | 2 +- .../plugin-connection-template/src/index.ts | 9 +- .../src/manifest.ts | 8 +- .../package.json | 1 + .../Connections/ConnectionsAdministration.tsx | 10 +- .../ConnectionsAdministrationService.ts | 16 +- .../ConnectionsTable/Connection.tsx | 6 +- .../ConnectionDetailsInfo/Origin.tsx | 4 +- .../ConnectionDetailsInfo/SSH.tsx | 4 +- .../ConnectionDetailsInfo/Template.tsx | 4 +- .../ConnectionsTable/ConnectionEdit.tsx | 2 +- .../ConnectionsTable/ConnectionsTable.tsx | 8 +- .../ConnectionsTable/useConnectionsTable.tsx | 4 +- .../CreateConnection/CreateConnection.tsx | 4 +- .../CreateConnectionBaseBootstrap.ts | 8 +- .../Manual/ConnectionManualService.ts | 2 +- .../Manual/CustomConnection.tsx | 6 +- .../CreateConnection/Manual/DriverList.tsx | 2 +- .../Connections/CreateConnectionService.ts | 8 +- .../ConnectionAccess/ConnectionAccess.tsx | 8 +- .../ConnectionAccessGrantedList.tsx | 8 +- .../ConnectionAccess/ConnectionAccessList.tsx | 8 +- .../ConnectionAccessTabService.ts | 18 +- .../useConnectionAccessState.ts | 4 +- .../src/LocaleService.ts | 14 +- .../src/index.ts | 23 +- .../src/manifest.ts | 14 +- .../packages/plugin-connections/package.json | 1 + .../src/ConnectionAuthService.ts | 8 +- .../ConnectionAuthenticationDialog.tsx | 2 +- .../ConnectionAuthenticationDialogLoader.ts | 2 +- .../ConnectionAuthenticationForm.tsx | 4 +- .../ConnectionAuthenticationFormLoader.ts | 2 +- .../NetworkHandlerAuthForm.tsx | 6 +- .../NetworkHandlers.tsx | 2 +- .../ConnectFormActionsContext.ts | 12 +- .../src/ConnectionForm/ConnectionForm.tsx | 8 +- .../ConnectionFormBaseActions.tsx | 10 +- .../ConnectionFormBaseActionsLoader.tsx | 2 +- .../ConnectionForm/ConnectionFormLoader.tsx | 2 +- .../ConnectionForm/ConnectionFormService.ts | 14 +- .../src/ConnectionForm/ConnectionFormState.ts | 10 +- .../ConnectionDriverPropertiesTabService.ts | 19 +- .../DriverProperties/DriverProperties.tsx | 6 +- .../DriverPropertiesLoader.tsx | 2 +- .../Options/ConnectionOptionsTabService.ts | 26 +- .../src/ConnectionForm/Options/Options.tsx | 20 +- .../src/ConnectionForm/Options/useOptions.ts | 8 +- .../ConnectionFormAuthenticationAction.tsx | 4 +- .../ConnectionOriginInfoTabService.ts | 16 +- .../ConnectionForm/OriginInfo/OriginInfo.tsx | 4 +- .../OriginInfo/OriginInfoTab.tsx | 4 +- .../SSH/ConnectionSSHTabService.ts | 25 +- .../src/ConnectionForm/SSH/SSH.tsx | 8 +- .../src/ConnectionForm/SSH/SSHPanel.tsx | 4 +- .../src/ConnectionForm/SSH/SSHTab.tsx | 4 +- .../SSL/ConnectionSSLTabService.ts | 26 +- .../src/ConnectionForm/SSL/SSL.tsx | 4 +- .../src/ConnectionForm/SSL/SSLPanel.tsx | 8 +- .../src/ConnectionForm/SSL/SSLTab.tsx | 6 +- .../ConnectionForm/SSL/getSSLDriverHandler.ts | 2 +- .../connectionFormConfigureContext.ts | 2 +- .../ConnectionForm/useConnectionFormState.ts | 6 +- .../src/ConnectionShieldLazy.ts | 2 +- .../ContextMenu/ConnectionMenuBootstrap.ts | 28 +- .../DatabaseAuthDialog/DatabaseAuthDialog.tsx | 4 +- .../DatabaseCredentialsAuthDialog.tsx | 8 +- .../useDatabaseCredentialsAuthDialog.ts | 10 +- ...ss => DatabaseSecretAuthDialog.module.css} | 0 .../DatabaseSecretAuthDialog.tsx | 2 +- .../plugin-connections/src/LocaleService.ts | 14 +- .../NavNodes/ConnectionFoldersBootstrap.ts | 22 +- .../plugin-connections/src/PluginBootstrap.ts | 4 - .../PublicConnectionForm.tsx | 4 +- .../PublicConnectionFormService.ts | 12 +- .../packages/plugin-connections/src/index.ts | 55 ++- .../plugin-connections/src/manifest.ts | 26 +- webapp/packages/plugin-d3js/package.json | 1 + webapp/packages/plugin-d3js/src/index.ts | 9 +- .../packages/plugin-data-export/package.json | 1 + .../plugin-data-export/src/Bootstrap.ts | 6 +- .../src/DataExportMenuService.ts | 4 +- .../src/DataExportProcessService.ts | 8 +- .../src/DataExportService.ts | 6 +- .../src/DataTransferProcessorsResource.ts | 2 +- .../src/Dialog/DataExportDialog.tsx | 12 +- .../DefaultExportOutputSettingsResource.ts | 2 +- .../ExportProcessorList.tsx | 2 +- .../ExportProcessorList/ProcessorItem.tsx | 2 +- .../src/Dialog/OutputOptionsForm.tsx | 2 +- .../src/Dialog/ProcessorConfigureDialog.tsx | 8 +- .../src/Dialog/ProcessorSelectDialog.tsx | 6 +- .../src/Dialog/useDataExportDialog.ts | 12 +- .../src/ExportFromContainerProcess.ts | 4 +- .../src/ExportFromResultsProcess.ts | 4 +- .../ExportNotification/ExportNotification.tsx | 4 +- .../useExportNotification.ts | 4 +- .../plugin-data-export/src/LocaleService.ts | 14 +- .../packages/plugin-data-export/src/index.ts | 13 +- .../plugin-data-export/src/manifest.ts | 14 +- webapp/packages/plugin-data-grid/package.json | 1 + .../plugin-data-grid/src/DataGrid.tsx | 2 +- .../plugin-data-grid/src/DataGridLazy.ts | 2 +- .../plugin-data-grid/src/PluginBootstrap.ts | 4 - webapp/packages/plugin-data-grid/src/index.ts | 4 +- .../packages/plugin-data-grid/src/manifest.ts | 2 +- .../packages/plugin-data-import/package.json | 1 + .../src/DataImportBootstrap.ts | 6 +- .../src/DataImportDialog/DataImportDialog.tsx | 10 +- .../DataImportDialog/DataImportDialogLazy.ts | 2 +- .../DataImportFileSelector.tsx | 6 +- .../IDataImportDialogState.ts | 2 +- .../DataImportDialog/ImportProcessorList.tsx | 4 +- .../DataImportDialog/useDataImportDialog.ts | 4 +- .../src/DataImportProcessorsResource.ts | 2 +- .../src/DataImportService.ts | 2 +- .../plugin-data-import/src/LocaleService.ts | 14 +- .../packages/plugin-data-import/src/index.ts | 4 +- .../plugin-data-import/src/manifest.ts | 10 +- .../plugin-data-spreadsheet-new/package.json | 1 + .../src/DataGrid/CellEditor.tsx | 8 +- .../src/DataGrid/CellRenderer/CellContext.ts | 2 +- .../DataGrid/CellRenderer/CellRenderer.tsx | 19 +- .../DataGridContextMenuCellEditingService.ts | 2 +- .../DataGridContextMenuFilterService.ts | 17 +- .../DataGridContextMenuOrderService.ts | 10 +- .../DataGridContextMenuSaveContentService.ts | 2 +- .../DataGridContextMenuService.ts | 6 +- .../src/DataGrid/DataGridLoader.tsx | 2 +- .../DataGridSelectionContext.ts | 2 +- .../useGridSelectionContext.tsx | 16 +- .../src/DataGrid/DataGridTable.tsx | 42 +- .../src/DataGrid/Formatters/CellFormatter.tsx | 12 +- .../Formatters/CellFormatterFactory.tsx | 12 +- .../CellFormatters/BlobFormatter.tsx | 8 +- .../CellFormatters/BooleanFormatter.tsx | 8 +- .../CellFormatters/TextFormatter.tsx | 10 +- .../DataGrid/Formatters/IndexFormatter.tsx | 2 +- .../src/DataGrid/Formatters/Menu/CellMenu.tsx | 4 +- .../TableColumnHeader/OrderButton.tsx | 2 +- .../TableColumnHeader/TableColumnHeader.tsx | 10 +- .../TableIndexColumnHeader.tsx | 6 +- .../TableColumnHeader/useTableColumnDnD.ts | 6 +- .../src/DataGrid/useGridSelectedCellsCopy.ts | 10 +- .../src/DataGrid/useTableData.tsx | 25 +- .../src/DataGrid/useTableDataMeasurements.ts | 2 +- .../src/DataGridSettingsService.test.ts | 18 +- .../src/Editing/useEditing.ts | 2 +- .../src/LocaleService.ts | 16 +- .../src/SpreadsheetBootstrap.ts | 18 +- .../src/SpreadsheetGrid.tsx | 2 +- .../plugin-data-spreadsheet-new/src/index.ts | 9 +- .../src/manifest.ts | 16 +- .../package.json | 1 + .../DVGroupingColumnEditorDialog.tsx | 4 +- .../GroupingColumnEditorTable.tsx | 2 +- .../src/DVResultSetGroupingPluginBootstrap.ts | 18 +- .../src/DVResultSetGroupingPresentation.tsx | 12 +- ...DVResultSetGroupingPresentationContext.tsx | 6 +- .../src/GroupingDataSource.ts | 4 +- .../IDVResultSetGroupingPresentationState.ts | 2 +- .../src/LocaleService.ts | 14 +- .../src/index.ts | 9 +- .../src/manifest.ts | 4 +- .../src/useGroupingData.ts | 6 +- .../src/useGroupingDataModel.ts | 6 +- .../src/useGroupingDnDColumns.ts | 10 +- .../package.json | 1 + .../src/DVResultTraceDetailsBootstrap.ts | 4 +- .../src/DVResultTraceDetailsPresentation.tsx | 8 +- .../src/LocaleService.ts | 14 +- .../ResultTraceDetailsTable/HeaderCell.tsx | 2 +- .../src/index.ts | 2 +- .../src/manifest.ts | 6 +- .../src/useResultTraceDetails.tsx | 8 +- .../packages/plugin-data-viewer/package.json | 1 + .../src/ContainerDataSource.ts | 28 +- .../src/DataPresentationService.ts | 4 +- .../src/DataViewerBootstrap.ts | 8 +- ...DataViewerDataChangeConfirmationService.ts | 10 +- .../src/DataViewerPage/DataViewerPanel.tsx | 8 +- .../src/DataViewerPage/DataViewerTab.tsx | 2 +- .../src/DataViewerPage/useDataViewerPanel.ts | 16 +- .../src/DataViewerService.ts | 2 +- .../src/DataViewerSettingsService.test.ts | 18 +- .../src/DataViewerSettingsService.ts | 4 +- .../src/DataViewerTabService.ts | 28 +- .../src/DataViewerTableService.ts | 18 +- .../Actions/DatabaseDataActionDecorator.ts | 2 +- .../Actions/DatabaseDataConstraintAction.ts | 18 +- .../Actions/DatabaseDataResultAction.ts | 10 +- .../Actions/DatabaseEditAction.ts | 12 +- .../Actions/DatabaseMetadataAction.ts | 8 +- .../Actions/DatabaseRefreshAction.ts | 10 +- .../Actions/DatabaseSelectAction.ts | 12 +- .../Actions/Document/DocumentDataAction.ts | 16 +- .../Actions/Document/DocumentEditAction.ts | 22 +- .../Actions/IDatabaseDataCacheAction.ts | 4 +- .../Actions/IDatabaseDataConstraintAction.ts | 6 +- .../Actions/IDatabaseDataEditAction.ts | 4 +- .../Actions/IDatabaseDataFormatAction.ts | 4 +- .../Actions/IDatabaseDataMetadataAction.ts | 4 +- .../Actions/IDatabaseDataResultAction.ts | 4 +- .../Actions/IDatabaseDataSelectAction.ts | 4 +- .../DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY.ts | 2 +- .../ResultSet/IResultSetBinaryValue.ts | 9 +- .../Actions/ResultSet/IResultSetBlobValue.ts | 2 +- .../ResultSet/IResultSetContentValue.ts | 2 +- .../ResultSet/IResultSetDataContentAction.ts | 2 +- .../Actions/ResultSet/IResultSetFileValue.ts | 2 +- .../ResultSet/IResultSetGeometryValue.ts | 2 +- .../Actions/ResultSet/ResultSetCacheAction.ts | 23 +- .../Actions/ResultSet/ResultSetDataAction.ts | 30 +- .../ResultSet/ResultSetDataContentAction.ts | 22 +- .../ResultSet/ResultSetDataKeysUtils.ts | 2 +- .../Actions/ResultSet/ResultSetEditAction.ts | 52 +- .../ResultSet/ResultSetFormatAction.ts | 30 +- .../ResultSet/ResultSetSelectAction.ts | 48 +- .../Actions/ResultSet/ResultSetViewAction.ts | 36 +- .../ResultSet/compareResultSetRowKeys.ts | 2 +- .../ResultSet/createResultSetBlobValue.ts | 4 +- .../ResultSet/createResultSetContentValue.ts | 2 +- .../ResultSet/createResultSetFileValue.ts | 2 +- .../ResultSet/isResultSetBinaryValue.ts | 4 +- .../Actions/ResultSet/isResultSetBlobValue.ts | 4 +- .../ResultSet/isResultSetComplexValue.ts | 2 +- .../ResultSet/isResultSetContentValue.ts | 4 +- .../Actions/ResultSet/isResultSetFileValue.ts | 4 +- .../ResultSet/isResultSetGeometryValue.ts | 4 +- .../DataContext/DATA_CONTEXT_DV_DDM.ts | 2 +- .../DatabaseDataModel/DatabaseDataAction.ts | 6 +- .../DatabaseDataModel/DatabaseDataActions.ts | 12 +- .../DatabaseDataModel/DatabaseDataFormat.ts | 2 +- .../DatabaseDataModel/DatabaseDataModel.ts | 6 +- .../DatabaseDataModel/DatabaseDataSource.ts | 28 +- .../DatabaseDataModel/IDatabaseDataAction.ts | 4 +- .../DatabaseDataModel/IDatabaseDataActions.ts | 4 +- .../DatabaseDataModel/IDatabaseDataEditor.ts | 2 +- .../DatabaseDataModel/IDatabaseDataModel.ts | 2 +- .../DatabaseDataModel/IDatabaseDataSource.ts | 8 +- .../DatabaseDataModel/IDatabaseResultSet.ts | 2 +- .../src/IDataViewerTableStorage.ts | 4 +- .../plugin-data-viewer/src/LocaleService.ts | 16 +- .../src/ResultSet/ResultSetDataSource.ts | 24 +- .../ResultSetTableFooterMenuService.ts | 20 +- .../src/ResultSet/isResultSetDataModel.ts | 8 +- .../src/TableViewer/DataPresentation.tsx | 8 +- .../src/TableViewer/DataViewerViewService.ts | 4 +- .../src/TableViewer/IDataTableActions.ts | 2 +- .../src/TableViewer/TableError.tsx | 2 +- .../TableViewer/TableFooter/TableFooter.tsx | 4 +- .../FetchSizeAction/FetchSizeAction.tsx | 6 +- .../TableFetchSizeActionBootstrap.ts | 10 +- .../AutoRefreshSettingsDialog.tsx | 2 +- .../RefreshAction/RefreshMenuAction.tsx | 6 +- .../TableRefreshActionBootstrap.ts | 20 +- .../RefreshAction/getRefreshState.ts | 10 +- .../TableFooterMenu/TableFooterMenu.tsx | 12 +- .../TableFooterMenu/TableFooterMenuService.ts | 16 +- .../TableViewer/TableHeader/TableHeader.tsx | 4 +- .../TableHeader/TableHeaderMenu.tsx | 14 +- .../TableHeader/TableHeaderService.ts | 21 +- .../TableHeader/TableWhereFilter.tsx | 10 +- .../TableViewer/TableHeader/useWhereFilter.ts | 10 +- .../TablePresentationBar/PresentationTab.tsx | 4 +- .../TablePresentationBar.tsx | 8 +- .../src/TableViewer/TableStatistics.tsx | 6 +- .../src/TableViewer/TableToolsPanel.tsx | 6 +- .../src/TableViewer/TableViewer.tsx | 26 +- .../src/TableViewer/TableViewerLoader.ts | 2 +- .../TableViewer/TableViewerStorageService.ts | 8 +- .../ValuePanel/DataValuePanelBootstrap.ts | 10 +- .../ValuePanel/DataValuePanelService.ts | 4 +- .../src/TableViewer/ValuePanel/ValuePanel.tsx | 12 +- .../BooleanValue/BooleanValuePresentation.tsx | 24 +- .../BooleanValuePresentationBootstrap.ts | 16 +- .../isBooleanValuePresentationAvailable.ts | 2 +- .../BooleanValue/preprocessBooleanValue.ts | 4 +- .../ImageValue/ImageValuePresentation.tsx | 10 +- .../ImageValuePresentationBootstrap.ts | 16 +- .../isImageValuePresentationAvailable.ts | 8 +- .../ImageValue/useValuePanelImageValue.ts | 24 +- .../QuotaPlaceholder.tsx | 8 +- .../TextValue/TextValueEditor.tsx | 4 +- .../TextValue/TextValuePresentation.tsx | 32 +- .../TextValuePresentationBootstrap.ts | 12 +- .../TextValue/TextValuePresentationService.ts | 8 +- .../TextValue/TextValueTruncatedMessage.tsx | 18 +- .../isTextValuePresentationAvailable.ts | 12 +- .../TextValue/isTextValueReadonly.ts | 10 +- .../TextValue/useAutoContentType.ts | 16 +- .../TextValue/useTextValueGetter.ts | 16 +- .../packages/plugin-data-viewer/src/index.ts | 156 +++--- .../plugin-data-viewer/src/manifest.ts | 42 +- .../src/useDataViewerCopyHandler.ts | 2 +- .../src/useDataViewerModel.ts | 6 +- .../package.json | 1 + .../ConnectionSchemaManagerBootstrap.ts | 16 +- .../ConnectionSchemaManagerService.ts | 32 +- .../ConnectionSelector/ConnectionIcon.tsx | 12 +- .../ConnectionIconSmall.tsx | 2 +- .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 4 - .../src/index.ts | 13 +- .../src/manifest.ts | 8 +- .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/TransactionManagerBootstrap.ts | 14 +- .../src/index.ts | 4 +- .../src/manifest.ts | 6 +- .../packages/plugin-ddl-viewer/package.json | 1 + .../src/DdlViewer/DDLViewerFooterService.ts | 6 +- .../src/DdlViewer/DDLViewerTab.tsx | 2 +- .../src/DdlViewer/DDLViewerTabPanel.tsx | 8 +- .../src/DdlViewer/DdlResource.ts | 7 +- .../src/DdlViewerBootstrap.ts | 16 +- .../ExtendedDDLViewer/ExtendedDDLResource.ts | 7 +- .../ExtendedDDLViewerTabPanel.tsx | 8 +- .../packages/plugin-ddl-viewer/src/index.ts | 9 +- .../plugin-ddl-viewer/src/manifest.ts | 8 +- webapp/packages/plugin-devtools/package.json | 1 + .../src/ContextMenu/SearchResourceMenuItem.ts | 2 +- .../SearchResourceMenuItemComponent.tsx | 2 +- .../plugin-devtools/src/DevToolsService.ts | 2 +- .../plugin-devtools/src/PluginBootstrap.ts | 30 +- webapp/packages/plugin-devtools/src/index.ts | 11 +- .../packages/plugin-devtools/src/manifest.ts | 2 +- .../src/menu/PluginSubMenuItem.ts | 2 +- .../src/menu/ResourceSubMenuItem.ts | 2 +- .../packages/plugin-gis-viewer/package.json | 1 + .../plugin-gis-viewer/src/CrsInput.tsx | 6 +- .../src/GISValuePresentation.tsx | 18 +- .../plugin-gis-viewer/src/GISViewer.tsx | 2 +- .../src/GISViewerBootstrap.ts | 10 +- .../plugin-gis-viewer/src/LeafletMap.tsx | 4 +- .../plugin-gis-viewer/src/LocaleService.ts | 14 +- .../src/ResultSetGISAction.ts | 6 +- .../packages/plugin-gis-viewer/src/index.ts | 11 +- .../plugin-gis-viewer/src/manifest.ts | 2 +- webapp/packages/plugin-help/package.json | 1 + .../packages/plugin-help/src/LocaleService.ts | 14 +- .../plugin-help/src/PluginBootstrap.ts | 10 +- .../src/Shortcuts/SHORTCUTS_DATA.ts | 4 +- .../plugin-help/src/Shortcuts/Shortcut.tsx | 2 +- .../src/Shortcuts/ShortcutsDialog.tsx | 4 +- webapp/packages/plugin-help/src/index.ts | 9 +- webapp/packages/plugin-help/src/manifest.ts | 2 +- .../packages/plugin-localization/package.json | 1 + .../src/PluginBootstrap.ts | 4 +- .../packages/plugin-localization/src/index.ts | 2 +- .../plugin-localization/src/manifest.ts | 2 +- .../packages/plugin-log-viewer/package.json | 3 +- .../plugin-log-viewer/src/LocaleService.ts | 14 +- .../src/LogViewer/LogEntry.tsx | 2 +- .../src/LogViewer/LogViewer.tsx | 6 +- .../src/LogViewer/LogViewerBootstrap.ts | 8 +- .../src/LogViewer/LogViewerInfoPanel.tsx | 2 +- .../src/LogViewer/LogViewerService.ts | 2 +- .../LogViewerSettingsService.test.ts | 18 +- .../src/LogViewer/LogViewerTable.tsx | 4 +- .../src/LogViewer/useLogViewer.tsx | 6 +- .../src/SessionLogsEventHandler.ts | 2 +- .../src/SessionLogsResource.ts | 6 +- .../packages/plugin-log-viewer/src/index.ts | 15 +- .../plugin-log-viewer/src/manifest.ts | 12 +- .../plugin-navigation-tabs/package.json | 1 + .../NavigationTabsBar/NavigationTabsBar.tsx | 10 +- .../Tabs/TabHandlerPanel.tsx | 4 +- .../NavigationTabsBar/Tabs/TabHandlerTab.tsx | 4 +- .../NavigationTabsBar/Tabs/useTab.ts | 2 +- .../NavigationTabsBar/Tabs/useTabHandler.ts | 2 +- .../NavigationTabs/NavigationTabsBar/index.ts | 9 +- .../NavigationTabs/NavigationTabsService.ts | 14 +- .../src/NavigationTabs/TabHandler.ts | 2 +- .../NavigationTabs/TabNavigationContext.ts | 4 +- .../src/PluginBootstrap.ts | 6 +- .../plugin-navigation-tabs/src/index.ts | 21 +- .../plugin-navigation-tabs/src/manifest.ts | 4 +- .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/NavigationTreeFiltersBootstrap.ts | 6 +- .../FiltersTable.tsx | 6 +- .../NavigationTreeFiltersDialog.tsx | 4 +- .../src/index.ts | 9 +- .../src/manifest.ts | 4 +- .../plugin-navigation-tree-rm/package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/NavNodes/ResourceFoldersBootstrap.ts | 18 +- .../src/NavNodes/getResourceKeyFromNodeId.ts | 2 +- .../src/NavResourceNodeService.ts | 2 +- .../src/NavTreeRMContextMenuService.ts | 10 +- .../NavigationNodeProjectControl.tsx | 8 +- .../ProjectsRenderer/ProjectsSettingsForm.tsx | 2 +- .../navigationTreeProjectSearchCompare.ts | 2 +- ...navigationTreeProjectsRendererRenderer.tsx | 4 +- .../src/Tree/ResourceManagerTree.tsx | 20 +- .../ResourceManagerTreeCaptureViewContext.tsx | 2 +- .../plugin-navigation-tree-rm/src/index.ts | 19 +- .../plugin-navigation-tree-rm/src/manifest.ts | 8 +- .../plugin-navigation-tree/package.json | 3 +- .../src/LocaleService.ts | 14 +- .../navigationTreeConnectionGroupFilter.ts | 2 +- .../navigationTreeConnectionGroupRenderer.tsx | 4 +- .../ConnectionNavNodeControl.tsx | 6 +- .../navTreeConnectionRenderer.tsx | 8 +- .../DATA_CONTEXT_ELEMENTS_TREE.ts | 2 +- .../ElementsTree/ElementsTree.tsx | 32 +- .../ElementsTreeContentLoader.tsx | 2 +- .../ElementsTree/ElementsTreeContext.ts | 4 +- .../ElementsTree/ElementsTreeLoader.ts | 2 +- .../ElementsTreeTools/ElementsTreeFilter.tsx | 2 +- .../ElementsTreeTools/ElementsTreeTools.tsx | 18 +- .../ElementsTreeToolsMenu.tsx | 10 +- .../ElementsTreeToolsMenuService.ts | 21 +- .../ElementsTreeBaseSettingsForm.tsx | 2 +- .../ElementsTreeSettingsService.ts | 4 +- .../NavigationTreeSettings.tsx | 4 +- .../createElementsTreeSettings.ts | 2 +- .../ElementsTree/NavNodeFilterCompareFn.ts | 2 +- .../elementsTreeLimitFilter.ts | 2 +- .../elementsTreeLimitRenderer.tsx | 4 +- .../ElementsTree/NavigationNodeComponent.ts | 2 +- .../NavigationTreeNode/NavigationNode.tsx | 12 +- .../NavigationNode/NavigationNodeControl.tsx | 10 +- .../NavigationNode/NavigationNodeExpand.tsx | 2 +- .../NavigationNode/NavigationNodeLoaders.ts | 4 +- .../NavigationNode/NavigationNodeNested.tsx | 4 +- .../NavigationNodeControlRenderer.tsx | 8 +- .../NavigationNodeDragged.tsx | 8 +- .../NavigationNodeElement.tsx | 6 +- .../NavigationNodeRenderer.tsx | 6 +- .../NavigationNodeRendererLoader.ts | 2 +- .../TreeNodeMenu/TreeNodeMenu.tsx | 6 +- .../TreeNodeMenu/TreeNodeMenuLoader.ts | 2 +- .../NavigationTreeNode/useNavigationNode.ts | 10 +- .../ElementsTree/elementsTreeNameFilter.ts | 4 +- .../ElementsTree/transformFilteredNodeInfo.ts | 2 +- .../ElementsTree/transformNodeInfo.ts | 4 +- .../ElementsTree/useElementsTree.ts | 30 +- .../useElementsTreeFolderExplorer.ts | 2 +- .../src/NavigationTree/NavigationTree.tsx | 38 +- .../NavigationTree/NavigationTreeBootstrap.ts | 10 +- .../NavigationTree/NavigationTreeLoader.ts | 2 +- .../NavigationTree/NavigationTreePanel.tsx | 2 +- .../NavigationTree/NavigationTreeService.ts | 12 +- .../NavigationNodeProjectControl.tsx | 8 +- .../ProjectsRenderer/ProjectsSettingsForm.tsx | 4 +- .../navigationTreeProjectFilter.ts | 4 +- .../navigationTreeProjectSearchCompare.ts | 4 +- ...navigationTreeProjectsExpandStateGetter.ts | 2 +- ...navigationTreeProjectsRendererRenderer.tsx | 18 +- .../navigationTreeDuplicateIdFilter.ts | 4 +- .../src/NavigationTree/useNavTreeDropBox.ts | 2 +- .../src/NavigationTree/useNavigationTree.ts | 2 +- .../NodesManager/NavNodeContextMenuService.ts | 4 +- .../NavNodeView/NavNodeViewService.test.ts | 14 +- .../NavNodeView/NavNodeViewService.ts | 2 +- .../src/NodesManager/NodeLink.tsx | 4 +- .../src/NodesManager/NodeLinkLoader.ts | 2 +- .../src/NodesManager/useChildren.ts | 2 +- .../DataTransformers/applyTransforms.ts | 2 +- .../DataTransformers/rootTransformers.ts | 6 +- .../src/TreeNew/Node.tsx | 10 +- .../src/TreeNew/NodeChildren.tsx | 10 +- .../src/TreeNew/NodeControl.tsx | 6 +- .../src/TreeNew/NodeControlLazy.ts | 2 +- .../src/TreeNew/NodeLazy.ts | 2 +- .../src/TreeNew/NodeRenderer.tsx | 6 +- .../src/TreeNew/Tree.tsx | 24 +- .../src/TreeNew/TreeLazy.ts | 2 +- .../src/TreeNew/TreeState.ts | 2 +- .../TreeNew/contexts/NodeSizeCacheContext.ts | 2 +- .../src/TreeNew/contexts/TreeContext.ts | 2 +- .../src/TreeNew/contexts/TreeDataContext.ts | 2 +- .../src/TreeNew/contexts/TreeDnDContext.ts | 2 +- .../contexts/TreeVirtualizationContext.ts | 2 +- .../src/TreeNew/useNodeDnD.ts | 2 +- .../src/TreeNew/useNodeSizeCache.ts | 4 +- .../src/TreeNew/useTree.ts | 4 +- .../src/TreeNew/useTreeData.ts | 16 +- .../src/TreeNew/useTreeState.ts | 4 +- .../plugin-navigation-tree/src/index.ts | 88 ++-- .../plugin-navigation-tree/src/manifest.ts | 18 +- .../plugin-object-viewer/package.json | 1 + .../src/IObjectViewerTabContext.ts | 4 +- .../plugin-object-viewer/src/LocaleService.ts | 14 +- .../src/ObjectPage/DBObjectPagePanel.tsx | 2 +- .../src/ObjectPage/DBObjectPageService.ts | 4 +- .../src/ObjectPage/DBObjectPageTab.tsx | 4 +- .../src/ObjectPage/ObjectPage.ts | 2 +- .../FolderPanelRenderer.tsx | 2 +- .../FolderTabRenderer.tsx | 2 +- .../NavNodeMetadata/NavNodeMetadataPanel.tsx | 2 +- .../NavNodeMetadataViewBootstrap.ts | 13 +- .../NavNodeMetadata/ObjectProperty.tsx | 4 +- .../VirtualFolder/VirtualFolderPanel.tsx | 6 +- .../VirtualFolder/VirtualFolderTab.tsx | 2 +- .../VirtualFolderViewBootstrap.ts | 10 +- .../ObjectPropertiesPage/ObjectFolders.tsx | 12 +- .../ObjectPropertiesPagePanel.tsx | 4 +- .../ObjectPropertiesPageService.ts | 10 +- .../ObjectPropertiesPageTab.tsx | 2 +- .../ObjectPropertyTable.tsx | 2 +- .../ObjectPropertyTableFooter.tsx | 2 +- .../ObjectPropertyTableFooterService.ts | 2 +- .../Table/CellFormatter.tsx | 12 +- .../Table/Columns/ColumnIcon/ColumnIcon.tsx | 4 +- .../Columns/ColumnSelect/ColumnSelect.tsx | 4 +- .../ColumnSelect/SelectorFormatter.tsx | 2 +- .../Table/HeaderRenderer.tsx | 4 +- .../ObjectPropertyTable/Table/Table.tsx | 28 +- .../ObjectPropertyTable/Table/TableContext.ts | 2 +- .../ObjectPropertyTable/Table/TableLoader.tsx | 4 +- .../ObjectPropertyTable/Table/useTableData.ts | 2 +- .../src/ObjectViewerBootstrap.ts | 10 +- .../ObjectViewerPanel/ObjectViewerPanel.tsx | 10 +- .../src/ObjectViewerTab.tsx | 4 +- .../src/ObjectViewerTabService.ts | 23 +- .../plugin-object-viewer/src/index.ts | 17 +- .../plugin-object-viewer/src/manifest.ts | 16 +- .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/ProductInfoNavigationService.ts | 2 +- .../src/ProductInfoPage.tsx | 10 +- .../src/ProductInfoService.ts | 10 +- .../src/index.ts | 6 +- .../src/manifest.ts | 6 +- webapp/packages/plugin-product/package.json | 1 + .../plugin-product/src/LocaleService.ts | 14 +- .../plugin-product/src/ProductBootstrap.ts | 4 +- webapp/packages/plugin-product/src/index.ts | 2 +- .../packages/plugin-product/src/manifest.ts | 2 +- webapp/packages/plugin-projects/package.json | 1 + .../plugin-projects/src/FolderDialog.tsx | 4 +- .../plugin-projects/src/LocaleService.ts | 14 +- .../plugin-projects/src/PluginBootstrap.ts | 4 +- .../plugin-projects/src/ProjectSelect.tsx | 4 +- webapp/packages/plugin-projects/src/index.ts | 13 +- .../packages/plugin-projects/src/manifest.ts | 2 +- .../plugin-react-data-grid/package.json | 1 + .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 10 +- .../src/ResourceManagerSettings.tsx | 2 +- .../src/index.ts | 9 +- .../src/manifest.ts | 2 +- .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 8 +- .../src/ResourceManagerScripts.tsx | 2 +- .../src/ResourceManagerScriptsService.ts | 6 +- .../src/index.ts | 17 +- .../src/manifest.ts | 8 +- .../plugin-resource-manager/package.json | 3 +- .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 4 +- .../ResourceManagerSettingsService.test.ts | 16 +- .../src/ResourceProjectsResource.ts | 2 +- .../plugin-resource-manager/src/index.ts | 15 +- .../plugin-resource-manager/src/manifest.ts | 10 +- webapp/packages/plugin-root/package.json | 1 + .../DataSynchronizationNotification.tsx | 4 +- ...ataSynchronizationNotificationMessages.tsx | 2 +- .../DataSynchronizationResolverBootstrap.ts | 8 +- .../packages/plugin-root/src/LocaleService.ts | 14 +- .../NetworkStateNotificationService.ts | 11 +- .../plugin-root/src/PluginBootstrap.ts | 4 - .../ServerNodeChangedDialogService.ts | 6 +- webapp/packages/plugin-root/src/index.ts | 2 +- webapp/packages/plugin-root/src/manifest.ts | 10 +- .../plugin-session-expiration/package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 4 - .../SessionExpiredDialogBootstrap.ts | 6 +- .../SessionExpireWarningDialogBootstrap.ts | 6 +- .../plugin-session-expiration/src/index.ts | 9 +- .../plugin-session-expiration/src/manifest.ts | 8 +- .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../SettingsAdministrationPluginBootstrap.ts | 8 +- .../src/index.ts | 9 +- .../src/manifest.ts | 4 +- .../package.json | 1 + .../src/PluginBootstrap.ts | 4 - .../src/index.ts | 9 +- .../src/manifest.ts | 2 +- .../plugin-settings-menu/package.json | 1 + .../src/PluginBootstrap.ts | 4 +- .../src/SettingsMenu/SettingsMenu.tsx | 2 +- .../plugin-settings-menu/src/index.ts | 13 +- .../plugin-settings-menu/src/manifest.ts | 2 +- .../plugin-settings-panel/package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/SettingsPanel/Settings.tsx | 8 +- .../src/SettingsPanel/SettingsGroup.tsx | 6 +- .../SettingsGroups/SettingsGroups.tsx | 4 +- .../SettingsGroups/groupNodeRenderer.tsx | 4 +- .../src/SettingsPanel/SettingsLazy.ts | 2 +- .../src/SettingsPanel/SettingsList.tsx | 6 +- .../src/SettingsPanel/getSettingGroupId.ts | 2 +- .../getSettingGroupIdFromElementId.ts | 2 +- .../src/SettingsPanel/querySettingsGroups.ts | 2 +- .../src/SettingsPanel/useSettings.ts | 2 +- .../src/SettingsPanel/useTreeScrollSync.ts | 4 +- .../src/SettingsPanelPluginBootstrap.ts | 4 - .../plugin-settings-panel/src/index.ts | 11 +- .../plugin-settings-panel/src/manifest.ts | 4 +- .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 10 +- .../src/ResourceSqlDataSource.ts | 36 +- .../src/ResourceSqlDataSourceBootstrap.ts | 14 +- .../src/SqlEditorTabResourceService.ts | 2 +- .../src/index.ts | 9 +- .../src/manifest.ts | 8 +- .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/SqlEditorBootstrap.ts | 24 +- .../src/SqlEditorNavigatorService.ts | 14 +- .../src/SqlEditorPanel.tsx | 2 +- .../src/SqlEditorTab.tsx | 8 +- .../src/SqlEditorTabService.ts | 28 +- .../src/index.ts | 19 +- .../src/isSQLEditorTab.ts | 2 +- .../src/manifest.ts | 8 +- .../src/sessionActionOpenSQLEditor.ts | 2 +- .../plugin-sql-editor-new/package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 6 +- .../src/SQLEditor/ACTIVE_QUERY_EXTENSION.ts | 2 +- .../QUERY_STATUS_GUTTER_EXTENSION.ts | 4 +- .../SQLCodeEditor/SQLCodeEditorLoader.tsx | 2 +- .../SQLCodeEditor/useSQLCodeEditor.ts | 4 +- .../SQLCodeEditorPanel/SQLCodeEditorPanel.tsx | 26 +- .../SQLCodeEditorPanelService.ts | 2 +- .../useSQLCodeEditorPanel.ts | 2 +- .../plugin-sql-editor-new/src/index.ts | 15 +- .../plugin-sql-editor-new/src/manifest.ts | 6 +- .../plugin-sql-editor-screen/package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 6 +- .../src/Screen/SqlEditorScreen.tsx | 6 +- .../src/Screen/SqlEditorScreenBootstrap.ts | 11 +- .../src/Screen/SqlEditorScreenService.ts | 6 +- .../plugin-sql-editor-screen/src/index.ts | 9 +- .../plugin-sql-editor-screen/src/manifest.ts | 8 +- .../packages/plugin-sql-editor/package.json | 1 + .../src/DATA_CONTEXT_SQL_EDITOR_STATE.ts | 2 +- .../src/ISqlEditorTabState.ts | 2 +- .../plugin-sql-editor/src/LocaleService.ts | 14 +- .../plugin-sql-editor/src/MenuBootstrap.ts | 36 +- .../plugin-sql-editor/src/QueryDataSource.ts | 28 +- .../plugin-sql-editor/src/SQLEditorLoader.ts | 2 +- .../src/SqlDataSource/BaseSqlDataSource.ts | 12 +- .../src/SqlDataSource/ISqlDataSource.ts | 6 +- .../ILocalStorageSqlDataSourceState.ts | 2 +- .../LocalStorage/LocalStorageSqlDataSource.ts | 22 +- .../LocalStorageSqlDataSourceBootstrap.ts | 14 +- .../src/SqlDataSource/MemorySqlDataSource.ts | 20 +- .../ISqlDataSourceHistory.ts | 2 +- .../ISqlDataSourceHistoryState.ts | 2 +- .../SqlDataSourceHistory.ts | 18 +- .../createSqlDataSourceHistoryInitialState.ts | 2 +- .../validateSqlDataSourceHistoryData.ts | 2 +- .../validateSqlDataSourceHistoryState.ts | 4 +- .../src/SqlDataSource/SqlDataSourceService.ts | 8 +- .../src/SqlDialectInfoService.ts | 2 +- .../plugin-sql-editor/src/SqlEditor.tsx | 18 +- .../SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA.ts | 2 +- .../src/SqlEditor/ISQLEditorData.ts | 8 +- .../src/SqlEditor/ISqlEditorProps.ts | 2 +- .../src/SqlEditor/SQLEditorActions.tsx | 10 +- .../src/SqlEditor/SQLEditorModeContext.ts | 4 +- .../src/SqlEditor/SqlEditor.tsx | 14 +- .../src/SqlEditor/SqlEditorActionsMenu.tsx | 6 +- .../src/SqlEditor/SqlEditorLoader.tsx | 4 +- .../src/SqlEditor/SqlEditorTools.tsx | 10 +- .../src/SqlEditor/SqlEditorToolsMenu.tsx | 10 +- .../src/SqlEditor/useSqlEditor.ts | 36 +- .../src/SqlEditor/useTools.tsx | 12 +- .../src/SqlEditorGroupTabsBootstrap.ts | 10 +- .../src/SqlEditorModeService.ts | 4 +- .../src/SqlEditorOpenOverlay.tsx | 2 +- .../src/SqlEditorOverlay.tsx | 6 +- .../plugin-sql-editor/src/SqlEditorService.ts | 20 +- .../src/SqlEditorSettingsService.test.ts | 18 +- .../src/SqlEditorSettingsService.ts | 4 +- .../src/SqlEditorStatusBar.tsx | 2 +- .../plugin-sql-editor/src/SqlEditorView.ts | 16 +- .../DATA_CONTEXT_SQL_EDITOR_RESULT_ID.ts | 2 +- .../ExecutionPlan/ExecutionPlanTreeBlock.tsx | 12 +- .../ExecutionPlan/NestedNode.tsx | 12 +- .../PropertiesPanel/PropertiesPanel.tsx | 4 +- .../PropertiesPanelItemsGroup.tsx | 16 +- .../ExecutionPlan/SqlExecutionPlanPanel.tsx | 8 +- .../ExecutionPlan/SqlExecutionPlanService.ts | 8 +- .../useExecutionPlanTreeState.ts | 4 +- .../OutputLogs/OutputLogsEventHandler.ts | 2 +- .../OutputLogs/OutputLogsMenu.tsx | 8 +- .../OutputLogs/OutputLogsPanel.tsx | 10 +- .../OutputLogs/OutputLogsResource.ts | 4 +- .../OutputLogs/OutputLogsService.ts | 10 +- .../OutputLogs/OutputLogsToolbar.tsx | 6 +- .../OutputLogs/OutputMenuBootstrap.ts | 26 +- .../OutputLogs/useOutputLogsPanelState.ts | 4 +- .../SqlResultTabs/SqlQueryResultService.ts | 12 +- .../src/SqlResultTabs/SqlQueryService.ts | 14 +- .../src/SqlResultTabs/SqlResultPanel.tsx | 21 +- .../src/SqlResultTabs/SqlResultSetPanel.tsx | 6 +- .../src/SqlResultTabs/SqlResultTab.tsx | 6 +- .../src/SqlResultTabs/SqlResultTabs.tsx | 16 +- .../src/SqlResultTabs/SqlResultTabsService.ts | 12 +- .../SqlScriptStatisticsPanel.tsx | 8 +- .../plugin-sql-editor/src/getSqlEditorName.ts | 4 +- .../packages/plugin-sql-editor/src/index.ts | 82 ++-- .../plugin-sql-editor/src/manifest.ts | 36 +- .../plugin-sql-editor/src/useDataSource.ts | 4 +- .../plugin-sql-generator/package.json | 1 + .../src/GeneratorMenuBootstrap.ts | 8 +- .../plugin-sql-generator/src/LocaleService.ts | 14 +- .../src/ScriptPreview/ScriptPreviewDialog.tsx | 2 +- .../src/ScriptPreview/ScriptPreviewService.ts | 6 +- .../src/SqlGenerators/GeneratedSqlDialog.tsx | 4 +- .../SqlGenerators/SqlGeneratorsBootstrap.ts | 8 +- .../SqlGenerators/SqlGeneratorsResource.ts | 7 +- .../plugin-sql-generator/src/index.ts | 13 +- .../plugin-sql-generator/src/manifest.ts | 10 +- webapp/packages/plugin-sso/package.json | 1 + webapp/packages/plugin-sso/src/index.ts | 9 +- .../packages/plugin-task-manager/package.json | 1 + .../plugin-task-manager/src/LocaleService.ts | 14 +- .../src/TaskManagerPluginBootstrap.ts | 6 +- .../packages/plugin-task-manager/src/index.ts | 9 +- .../plugin-task-manager/src/manifest.ts | 4 +- webapp/packages/plugin-theme/package.json | 1 + webapp/packages/plugin-theme/src/index.ts | 2 +- webapp/packages/plugin-theme/src/manifest.ts | 2 +- .../packages/plugin-tools-panel/package.json | 1 + .../plugin-tools-panel/src/LocaleService.ts | 14 +- .../plugin-tools-panel/src/PluginBootstrap.ts | 8 +- .../src/ToolsPanel/ToolsPanel.tsx | 4 +- .../src/ToolsPanel/ToolsPanelService.ts | 2 +- .../src/ToolsPanelSettingsService.ts | 2 +- .../packages/plugin-tools-panel/src/index.ts | 17 +- .../plugin-tools-panel/src/manifest.ts | 8 +- .../package.json | 1 + .../src/PluginBootstrap.ts | 6 +- .../AdministrationTopAppBarBootstrap.ts | 4 +- .../src/index.ts | 11 +- .../src/manifest.ts | 4 +- .../packages/plugin-top-app-bar/package.json | 1 + .../plugin-top-app-bar/src/PluginBootstrap.ts | 6 +- .../TopNavBar/AppStateMenu/AppStateMenu.tsx | 4 +- .../src/TopNavBar/MainMenu/MainMenu.tsx | 2 +- .../src/TopNavBar/PublicTopNavBar.tsx | 4 +- .../src/TopNavBar/TopNavBar.tsx | 2 +- .../src/TopNavBar/TopNavService.ts | 6 +- .../packages/plugin-top-app-bar/src/index.ts | 14 +- .../plugin-top-app-bar/src/manifest.ts | 5 +- .../package.json | 1 + .../src/PluginBootstrap.ts | 4 +- .../src/index.ts | 9 +- .../src/manifest.ts | 2 +- .../plugin-user-profile-settings/package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/UserProfileSettingsPluginBootstrap.ts | 4 +- .../plugin-user-profile-settings/src/index.ts | 2 +- .../src/manifest.ts | 4 +- .../packages/plugin-user-profile/package.json | 1 + .../plugin-user-profile/src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 4 +- .../plugin-user-profile/src/UserInfo.tsx | 2 +- .../src/UserMenu/UserMenu.tsx | 4 +- .../src/UserMenu/UserMenuLazy.ts | 2 +- .../AuthenticationPanel.tsx | 8 +- .../UserAuthenticationPart/ChangePassword.tsx | 2 +- .../UserProfileFormAuthenticationPart.ts | 19 +- ...rProfileFormAuthenticationPartBootstrap.ts | 8 +- ...serProfileFormAuthenticationPartService.ts | 2 +- .../getUserProfileFormAuthenticationPart.ts | 4 +- .../UserActiveAuthMethods.tsx | 2 +- .../UserInfoPart/UserProfileFormInfo.tsx | 10 +- .../UserProfileFormInfoMetaParameters.tsx | 2 +- .../UserInfoPart/UserProfileFormInfoPart.ts | 14 +- .../UserProfileFormInfoPartBootstrap.ts | 8 +- .../UserProfileFormInfoPartService.ts | 2 +- .../getUserProfileFormInfoPart.ts | 4 +- .../src/UserProfileForm/UserProfileForm.tsx | 4 +- .../UserProfileFormBootstrap.ts | 6 +- .../UserProfileForm/UserProfileFormPanel.tsx | 12 +- .../UserProfileForm/UserProfileFormService.ts | 2 +- .../UserProfileForm/UserProfileFormState.ts | 2 +- .../src/UserProfileOptionsPanel.tsx | 4 +- .../src/UserProfileOptionsPanelService.ts | 8 +- .../packages/plugin-user-profile/src/index.ts | 10 +- .../plugin-user-profile/src/manifest.ts | 20 +- .../package.json | 1 + .../src/LocaleService.ts | 14 +- .../src/PluginBootstrap.ts | 6 +- .../src/Version.tsx | 2 +- .../src/VersionChecker.tsx | 2 +- .../src/VersionSelector.tsx | 4 +- .../src/VersionUpdate.tsx | 6 +- .../src/index.ts | 4 +- .../src/manifest.ts | 2 +- webapp/packages/plugin-version/package.json | 1 + .../plugin-version/src/PluginBootstrap.ts | 4 - webapp/packages/plugin-version/src/index.ts | 9 +- .../packages/plugin-version/src/manifest.ts | 2 +- webapp/packages/product-default/package.json | 1 + .../product-default/src/LocaleService.ts | 14 +- .../product-default/src/ProductBootstrap.ts | 4 +- webapp/packages/product-default/src/index.ts | 2 +- .../packages/product-default/src/manifest.ts | 2 +- webapp/packages/tests-runner/package.json | 1 + webapp/packages/tests-runner/src/createApp.ts | 4 +- .../packages/tests-runner/src/getService.ts | 2 +- webapp/packages/tests-runner/src/index.ts | 8 +- .../packages/tests-runner/src/renderInApp.tsx | 6 +- webapp/tsconfig.base.json | 64 +-- 1827 files changed, 7576 insertions(+), 7085 deletions(-) rename webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/{DatabaseSecretAuthDialog.m.css => DatabaseSecretAuthDialog.module.css} (100%) diff --git a/webapp/package.json b/webapp/package.json index f16b36fbc3..25dcd27415 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -1,6 +1,7 @@ { "name": "cloudbeaver-ce", "version": "1.0.0", + "type": "module", "private": true, "workspaces": { "packages": [ diff --git a/webapp/packages/core-administration/package.json b/webapp/packages/core-administration/package.json index 4ca22be149..fb46112aef 100644 --- a/webapp/packages/core-administration/package.json +++ b/webapp/packages/core-administration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-administration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-administration/src/AdministrationItem/AdministrationItemService.ts b/webapp/packages/core-administration/src/AdministrationItem/AdministrationItemService.ts index 422e719751..1cae5f2989 100644 --- a/webapp/packages/core-administration/src/AdministrationItem/AdministrationItemService.ts +++ b/webapp/packages/core-administration/src/AdministrationItem/AdministrationItemService.ts @@ -8,13 +8,18 @@ import { makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor, IExecutorHandler } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor, type IExecutorHandler } from '@cloudbeaver/core-executor'; import type { RouterState } from '@cloudbeaver/core-routing'; -import { filterConfigurationWizard } from './filterConfigurationWizard'; -import { AdministrationItemType, IAdministrationItem, IAdministrationItemOptions, IAdministrationItemSubItem } from './IAdministrationItem'; -import type { IAdministrationItemRoute } from './IAdministrationItemRoute'; -import { orderAdministrationItems } from './orderAdministrationItems'; +import { filterConfigurationWizard } from './filterConfigurationWizard.js'; +import { + AdministrationItemType, + type IAdministrationItem, + type IAdministrationItemOptions, + type IAdministrationItemSubItem, +} from './IAdministrationItem.js'; +import type { IAdministrationItemRoute } from './IAdministrationItemRoute.js'; +import { orderAdministrationItems } from './orderAdministrationItems.js'; interface IActivationData { screen: IAdministrationItemRoute; @@ -112,14 +117,14 @@ export class AdministrationItemService { return onlyActive.name; } - return items[0].name; + return items[0]?.name || null; } getAdministrationItemRoute(state: RouterState, configurationMode = false): IAdministrationItemRoute { return { - item: state.params.item || this.getDefaultItem(configurationMode), - sub: state.params.sub || null, - param: state.params.param || null, + item: state.params['item'] || this.getDefaultItem(configurationMode), + sub: state.params['sub'] || null, + param: state.params['param'] || null, }; } @@ -162,7 +167,7 @@ export class AdministrationItemService { }; const index = this.items.push(item); - return this.items[index - 1]; + return this.items[index - 1]!; } async activate(screen: IAdministrationItemRoute, configurationWizard: boolean, outside: boolean, outsideAdminPage: boolean): Promise { @@ -241,7 +246,7 @@ export class AdministrationItemService { if (item === items.length) { break; } - await items[item].configurationWizardOptions?.onLoad?.(); + await items[item]?.configurationWizardOptions?.onLoad?.(); item++; } } diff --git a/webapp/packages/core-administration/src/AdministrationItem/IAdministrationItem.ts b/webapp/packages/core-administration/src/AdministrationItem/IAdministrationItem.ts index 8b1ec7a058..dce7254076 100644 --- a/webapp/packages/core-administration/src/AdministrationItem/IAdministrationItem.ts +++ b/webapp/packages/core-administration/src/AdministrationItem/IAdministrationItem.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IRouteParams } from './IRouteParams'; +import type { IRouteParams } from './IRouteParams.js'; export enum AdministrationItemType { Default, diff --git a/webapp/packages/core-administration/src/AdministrationItem/filterConfigurationWizard.ts b/webapp/packages/core-administration/src/AdministrationItem/filterConfigurationWizard.ts index f070fb1745..816d7b3d1f 100644 --- a/webapp/packages/core-administration/src/AdministrationItem/filterConfigurationWizard.ts +++ b/webapp/packages/core-administration/src/AdministrationItem/filterConfigurationWizard.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { AdministrationItemType, IAdministrationItem } from './IAdministrationItem'; +import { AdministrationItemType, type IAdministrationItem } from './IAdministrationItem.js'; export function filterConfigurationWizard(configurationWizard: boolean) { return (item: IAdministrationItem) => diff --git a/webapp/packages/core-administration/src/AdministrationItem/orderAdministrationItems.ts b/webapp/packages/core-administration/src/AdministrationItem/orderAdministrationItems.ts index 6ebb678278..06599f76ab 100644 --- a/webapp/packages/core-administration/src/AdministrationItem/orderAdministrationItems.ts +++ b/webapp/packages/core-administration/src/AdministrationItem/orderAdministrationItems.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAdministrationItem } from './IAdministrationItem'; +import type { IAdministrationItem } from './IAdministrationItem.js'; export function orderAdministrationItems(configuration: boolean) { return (itemA: IAdministrationItem, itemB: IAdministrationItem): number => { diff --git a/webapp/packages/core-administration/src/AdministrationLocaleService.ts b/webapp/packages/core-administration/src/AdministrationLocaleService.ts index 8febc531c1..ba5c98f6a8 100644 --- a/webapp/packages/core-administration/src/AdministrationLocaleService.ts +++ b/webapp/packages/core-administration/src/AdministrationLocaleService.ts @@ -14,24 +14,22 @@ export class AdministrationLocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts b/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts index 32f949232b..30828e7841 100644 --- a/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts +++ b/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts @@ -9,16 +9,16 @@ import { computed, makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; import { EAdminPermission, PermissionsService, ServerConfigResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; -import { RouterState, ScreenService } from '@cloudbeaver/core-routing'; +import { type RouterState, ScreenService } from '@cloudbeaver/core-routing'; import { StorageService } from '@cloudbeaver/core-storage'; -import { DefaultValueGetter, GlobalConstants, MetadataMap, schema } from '@cloudbeaver/core-utils'; +import { type DefaultValueGetter, GlobalConstants, MetadataMap, schema } from '@cloudbeaver/core-utils'; -import { AdministrationItemService } from '../AdministrationItem/AdministrationItemService'; -import type { IAdministrationItemRoute } from '../AdministrationItem/IAdministrationItemRoute'; -import type { IRouteParams } from '../AdministrationItem/IRouteParams'; -import { ADMINISTRATION_SCREEN_STATE_SCHEMA, type IAdministrationScreenInfo } from './IAdministrationScreenState'; +import { AdministrationItemService } from '../AdministrationItem/AdministrationItemService.js'; +import type { IAdministrationItemRoute } from '../AdministrationItem/IAdministrationItemRoute.js'; +import type { IRouteParams } from '../AdministrationItem/IRouteParams.js'; +import { ADMINISTRATION_SCREEN_STATE_SCHEMA, type IAdministrationScreenInfo } from './IAdministrationScreenState.js'; const ADMINISTRATION_INFO = 'administration_info'; @@ -228,7 +228,7 @@ export class AdministrationScreenService { } async handleCanDeActivate(fromState: RouterState, toState: RouterState): Promise { - if (!fromState.params.item) { + if (!fromState.params['item']) { return true; } @@ -243,7 +243,7 @@ export class AdministrationScreenService { } async handleCanActivate(toState: RouterState, fromState: RouterState): Promise { - if (!toState.params.item) { + if (!toState.params['item']) { return false; } diff --git a/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreenService.ts b/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreenService.ts index e109b98b93..fb7091f711 100644 --- a/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreenService.ts +++ b/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreenService.ts @@ -9,8 +9,8 @@ import { Dependency, injectable } from '@cloudbeaver/core-di'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import { ScreenService } from '@cloudbeaver/core-routing'; -import { AdministrationScreenService } from '../AdministrationScreenService'; -import { ConfigurationWizardService } from './ConfigurationWizardService'; +import { AdministrationScreenService } from '../AdministrationScreenService.js'; +import { ConfigurationWizardService } from './ConfigurationWizardService.js'; @injectable() export class ConfigurationWizardScreenService extends Dependency { diff --git a/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardService.ts b/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardService.ts index 71133643ad..186a4c89d4 100644 --- a/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardService.ts +++ b/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardService.ts @@ -10,11 +10,11 @@ import { computed, makeObservable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { AdministrationItemService, filterHiddenAdministrationItem } from '../../AdministrationItem/AdministrationItemService'; -import { filterConfigurationWizard } from '../../AdministrationItem/filterConfigurationWizard'; -import type { IAdministrationItem } from '../../AdministrationItem/IAdministrationItem'; -import { orderAdministrationItems } from '../../AdministrationItem/orderAdministrationItems'; -import { AdministrationScreenService } from '../AdministrationScreenService'; +import { AdministrationItemService, filterHiddenAdministrationItem } from '../../AdministrationItem/AdministrationItemService.js'; +import { filterConfigurationWizard } from '../../AdministrationItem/filterConfigurationWizard.js'; +import type { IAdministrationItem } from '../../AdministrationItem/IAdministrationItem.js'; +import { orderAdministrationItems } from '../../AdministrationItem/orderAdministrationItems.js'; +import { AdministrationScreenService } from '../AdministrationScreenService.js'; @injectable() export class ConfigurationWizardService { @@ -147,7 +147,7 @@ export class ConfigurationWizardService { } if (this.currentStepIndex - 1 >= 0) { - const step = this.steps[this.currentStepIndex - 1]; + const step = this.steps[this.currentStepIndex - 1]!; this.administrationScreenService.navigateTo(step.name, step.configurationWizardOptions?.defaultRoute); } } diff --git a/webapp/packages/core-administration/src/DataContext/DATA_CONTEXT_ADMINISTRATION_ITEM_ROUTE.ts b/webapp/packages/core-administration/src/DataContext/DATA_CONTEXT_ADMINISTRATION_ITEM_ROUTE.ts index b0948244b9..d2e158b088 100644 --- a/webapp/packages/core-administration/src/DataContext/DATA_CONTEXT_ADMINISTRATION_ITEM_ROUTE.ts +++ b/webapp/packages/core-administration/src/DataContext/DATA_CONTEXT_ADMINISTRATION_ITEM_ROUTE.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { IAdministrationItemRoute } from '../AdministrationItem/IAdministrationItemRoute'; +import type { IAdministrationItemRoute } from '../AdministrationItem/IAdministrationItemRoute.js'; export const DATA_CONTEXT_ADMINISTRATION_ITEM_ROUTE = createDataContext('AdministrationItemRoute'); diff --git a/webapp/packages/core-administration/src/PermissionsResource.ts b/webapp/packages/core-administration/src/PermissionsResource.ts index f49f8020e9..3a3fd145e9 100644 --- a/webapp/packages/core-administration/src/PermissionsResource.ts +++ b/webapp/packages/core-administration/src/PermissionsResource.ts @@ -8,7 +8,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedMapAllKey, CachedMapResource, resourceKeyList } from '@cloudbeaver/core-resource'; import { SessionDataResource } from '@cloudbeaver/core-root'; -import { AdminObjectGrantInfoFragment, AdminPermissionInfoFragment, GraphQLService } from '@cloudbeaver/core-sdk'; +import { type AdminObjectGrantInfoFragment, type AdminPermissionInfoFragment, GraphQLService } from '@cloudbeaver/core-sdk'; export type PermissionInfo = AdminPermissionInfoFragment; export type AdminObjectGrantInfo = AdminObjectGrantInfoFragment; diff --git a/webapp/packages/core-administration/src/index.ts b/webapp/packages/core-administration/src/index.ts index 672bf369c6..d1708c2bc8 100644 --- a/webapp/packages/core-administration/src/index.ts +++ b/webapp/packages/core-administration/src/index.ts @@ -1,12 +1,19 @@ -export * from './manifest'; -export * from './AdministrationItem/AdministrationItemService'; -export * from './AdministrationItem/filterConfigurationWizard'; -export * from './AdministrationItem/IAdministrationItem'; -export * from './AdministrationItem/IAdministrationItemRoute'; -export * from './AdministrationItem/IRouteParams'; -export * from './AdministrationItem/orderAdministrationItems'; -export * from './AdministrationScreen/AdministrationScreenService'; -export * from './AdministrationScreen/ConfigurationWizard/ConfigurationWizardService'; -export * from './DataContext/DATA_CONTEXT_ADMINISTRATION_ITEM_ROUTE'; -export * from './AdministrationLocaleService'; -export * from './PermissionsResource'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; +export * from './AdministrationItem/AdministrationItemService.js'; +export * from './AdministrationItem/filterConfigurationWizard.js'; +export * from './AdministrationItem/IAdministrationItem.js'; +export * from './AdministrationItem/IAdministrationItemRoute.js'; +export * from './AdministrationItem/IRouteParams.js'; +export * from './AdministrationItem/orderAdministrationItems.js'; +export * from './AdministrationScreen/AdministrationScreenService.js'; +export * from './AdministrationScreen/ConfigurationWizard/ConfigurationWizardService.js'; +export * from './DataContext/DATA_CONTEXT_ADMINISTRATION_ITEM_ROUTE.js'; +export * from './AdministrationLocaleService.js'; +export * from './PermissionsResource.js'; diff --git a/webapp/packages/core-administration/src/manifest.ts b/webapp/packages/core-administration/src/manifest.ts index 66715a5eb5..af2c95191e 100644 --- a/webapp/packages/core-administration/src/manifest.ts +++ b/webapp/packages/core-administration/src/manifest.ts @@ -13,11 +13,11 @@ export const coreAdministrationManifest: PluginManifest = { }, providers: [ - () => import('./AdministrationItem/AdministrationItemService').then(m => m.AdministrationItemService), - () => import('./PermissionsResource').then(m => m.PermissionsResource), - () => import('./AdministrationScreen/AdministrationScreenService').then(m => m.AdministrationScreenService), - () => import('./AdministrationScreen/ConfigurationWizard/ConfigurationWizardService').then(m => m.ConfigurationWizardService), - () => import('./AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreenService').then(m => m.ConfigurationWizardScreenService), - () => import('./AdministrationLocaleService').then(m => m.AdministrationLocaleService), + () => import('./AdministrationItem/AdministrationItemService.js').then(m => m.AdministrationItemService), + () => import('./PermissionsResource.js').then(m => m.PermissionsResource), + () => import('./AdministrationScreen/AdministrationScreenService.js').then(m => m.AdministrationScreenService), + () => import('./AdministrationScreen/ConfigurationWizard/ConfigurationWizardService.js').then(m => m.ConfigurationWizardService), + () => import('./AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreenService.js').then(m => m.ConfigurationWizardScreenService), + () => import('./AdministrationLocaleService.js').then(m => m.AdministrationLocaleService), ], }; diff --git a/webapp/packages/core-app/package.json b/webapp/packages/core-app/package.json index c2eda7cecb..62e0321797 100644 --- a/webapp/packages/core-app/package.json +++ b/webapp/packages/core-app/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-app", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-app/src/AppLocaleService.ts b/webapp/packages/core-app/src/AppLocaleService.ts index 6d835fb52a..8d5fb6df62 100644 --- a/webapp/packages/core-app/src/AppLocaleService.ts +++ b/webapp/packages/core-app/src/AppLocaleService.ts @@ -14,24 +14,22 @@ export class AppLocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-app/src/AppScreen/AppScreen.tsx b/webapp/packages/core-app/src/AppScreen/AppScreen.tsx index 8b364ee9e1..62bcb6ab1f 100644 --- a/webapp/packages/core-app/src/AppScreen/AppScreen.tsx +++ b/webapp/packages/core-app/src/AppScreen/AppScreen.tsx @@ -10,8 +10,8 @@ import { memo } from 'react'; import { Loader, Placeholder } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { AppScreenService } from './AppScreenService'; -import { Main } from './Main'; +import { AppScreenService } from './AppScreenService.js'; +import { Main } from './Main.js'; export const AppScreen = memo(function AppScreen() { const appScreenService = useService(AppScreenService); diff --git a/webapp/packages/core-app/src/AppScreen/AppScreenBootstrap.ts b/webapp/packages/core-app/src/AppScreen/AppScreenBootstrap.ts index 7e7a71395e..2875ea25b4 100644 --- a/webapp/packages/core-app/src/AppScreen/AppScreenBootstrap.ts +++ b/webapp/packages/core-app/src/AppScreen/AppScreenBootstrap.ts @@ -6,11 +6,11 @@ * you may not use this file except in compliance with the License. */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; import { ScreenService } from '@cloudbeaver/core-routing'; -import { AppScreen } from './AppScreen'; -import { AppScreenService } from './AppScreenService'; +import { AppScreen } from './AppScreen.js'; +import { AppScreenService } from './AppScreenService.js'; @injectable() export class AppScreenBootstrap extends Bootstrap { @@ -21,7 +21,7 @@ export class AppScreenBootstrap extends Bootstrap { this.activation = new Executor(); } - register(): void { + override register(): void { this.screenService.create({ name: AppScreenService.screenName, routes: [{ name: AppScreenService.screenName, path: '/' }], @@ -32,6 +32,4 @@ export class AppScreenBootstrap extends Bootstrap { }, }); } - - load(): void | Promise {} } diff --git a/webapp/packages/core-app/src/AppScreen/Main.tsx b/webapp/packages/core-app/src/AppScreen/Main.tsx index dcc56e93db..514dc8a2e2 100644 --- a/webapp/packages/core-app/src/AppScreen/Main.tsx +++ b/webapp/packages/core-app/src/AppScreen/Main.tsx @@ -12,7 +12,7 @@ import { useService } from '@cloudbeaver/core-di'; import { LeftBarPanelService, SideBarPanel, SideBarPanelService } from '@cloudbeaver/core-ui'; import style from './Main.module.css'; -import { RightArea } from './RightArea'; +import { RightArea } from './RightArea.js'; export const Main = observer(function Main() { const styles = useS(style); diff --git a/webapp/packages/core-app/src/AppScreen/RightArea.tsx b/webapp/packages/core-app/src/AppScreen/RightArea.tsx index 470a220660..540a728ea2 100644 --- a/webapp/packages/core-app/src/AppScreen/RightArea.tsx +++ b/webapp/packages/core-app/src/AppScreen/RightArea.tsx @@ -23,7 +23,7 @@ import { import { useService } from '@cloudbeaver/core-di'; import { OptionsPanelService } from '@cloudbeaver/core-ui'; -import { AppScreenService } from './AppScreenService'; +import { AppScreenService } from './AppScreenService.js'; import style from './RightArea.module.css'; interface Props { diff --git a/webapp/packages/core-app/src/Body.tsx b/webapp/packages/core-app/src/Body.tsx index 831aa61315..76c1d0472a 100644 --- a/webapp/packages/core-app/src/Body.tsx +++ b/webapp/packages/core-app/src/Body.tsx @@ -20,8 +20,8 @@ import { DNDProvider } from '@cloudbeaver/core-ui'; import { useAppVersion } from '@cloudbeaver/core-version'; import style from './Body.module.css'; -import { useAppHeight } from './useAppHeight'; -import { useClientActivity } from './useClientActivity'; +import { useAppHeight } from './useAppHeight.js'; +import { useClientActivity } from './useClientActivity.js'; export const Body = observer(function Body() { // const serverConfigLoader = useResource(Body, ServerConfigResource, undefined); @@ -41,7 +41,7 @@ export const Body = observer(function Body() { if (ref.current) { document.body.className = ref.current.className; } - document.documentElement.dataset.backendVersion = backendVersion; + document.documentElement.dataset['backendVersion'] = backendVersion; }); useAppHeight(); diff --git a/webapp/packages/core-app/src/BodyLazy.ts b/webapp/packages/core-app/src/BodyLazy.ts index 3d8043c34d..e717806089 100644 --- a/webapp/packages/core-app/src/BodyLazy.ts +++ b/webapp/packages/core-app/src/BodyLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const BodyLazy = importLazyComponent(() => import('./Body').then(m => m.Body)); +export const BodyLazy = importLazyComponent(() => import('./Body.js').then(m => m.Body)); diff --git a/webapp/packages/core-app/src/index.ts b/webapp/packages/core-app/src/index.ts index 51841f691c..e7c12637ba 100644 --- a/webapp/packages/core-app/src/index.ts +++ b/webapp/packages/core-app/src/index.ts @@ -1,11 +1,18 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ // Services -export * from './AppScreen/AppScreenService'; -export * from './AppScreen/AppScreenBootstrap'; +export * from './AppScreen/AppScreenService.js'; +export * from './AppScreen/AppScreenBootstrap.js'; -export * from './AppLocaleService'; +export * from './AppLocaleService.js'; // components -export * from './BodyLazy'; +export * from './BodyLazy.js'; // Interfaces -export * from './manifest'; +export * from './manifest.js'; diff --git a/webapp/packages/core-app/src/manifest.ts b/webapp/packages/core-app/src/manifest.ts index e857c64f6c..0c64908dd9 100644 --- a/webapp/packages/core-app/src/manifest.ts +++ b/webapp/packages/core-app/src/manifest.ts @@ -13,8 +13,8 @@ export const coreAppManifest: PluginManifest = { }, providers: [ - () => import('./AppScreen/AppScreenService').then(m => m.AppScreenService), - () => import('./AppScreen/AppScreenBootstrap').then(m => m.AppScreenBootstrap), - () => import('./AppLocaleService').then(m => m.AppLocaleService), + () => import('./AppScreen/AppScreenService.js').then(m => m.AppScreenService), + () => import('./AppScreen/AppScreenBootstrap.js').then(m => m.AppScreenBootstrap), + () => import('./AppLocaleService.js').then(m => m.AppLocaleService), ], }; diff --git a/webapp/packages/core-authentication/package.json b/webapp/packages/core-authentication/package.json index bff33346db..297487e1dd 100644 --- a/webapp/packages/core-authentication/package.json +++ b/webapp/packages/core-authentication/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-authentication", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-authentication/src/AppAuthService.ts b/webapp/packages/core-authentication/src/AppAuthService.ts index e76d207d2b..36b33f4917 100644 --- a/webapp/packages/core-authentication/src/AppAuthService.ts +++ b/webapp/packages/core-authentication/src/AppAuthService.ts @@ -6,12 +6,12 @@ * you may not use this file except in compliance with the License. */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { Executor, ExecutorInterrupter, IExecutor } from '@cloudbeaver/core-executor'; -import { CachedDataResourceKey, CachedResource, getCachedDataResourceLoaderState } from '@cloudbeaver/core-resource'; +import { Executor, ExecutorInterrupter, type IExecutor } from '@cloudbeaver/core-executor'; +import { type CachedDataResourceKey, CachedResource, getCachedDataResourceLoaderState } from '@cloudbeaver/core-resource'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import type { ILoadableState } from '@cloudbeaver/core-utils'; -import { UserInfoResource } from './UserInfoResource'; +import { UserInfoResource } from './UserInfoResource.js'; @injectable() export class AppAuthService extends Bootstrap { @@ -68,8 +68,4 @@ export class AppAuthService extends Bootstrap { await this.auth.execute(state); return state; } - - register(): void {} - - load(): void {} } diff --git a/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts b/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts index 19f223b322..c5359f36f6 100644 --- a/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts +++ b/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts @@ -9,8 +9,8 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedMapResource, isResourceAlias, type ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { EAdminPermission, SessionDataResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { - AuthProviderConfigurationParametersFragment, - GetAuthProviderConfigurationParametersQueryVariables, + type AuthProviderConfigurationParametersFragment, + type GetAuthProviderConfigurationParametersQueryVariables, GraphQLService, } from '@cloudbeaver/core-sdk'; diff --git a/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts b/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts index 14960db42b..cec81b6319 100644 --- a/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts +++ b/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts @@ -18,9 +18,9 @@ import { ResourceKeyUtils, } from '@cloudbeaver/core-resource'; import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; -import { AdminAuthProviderConfiguration, GetAuthProviderConfigurationsQueryVariables, GraphQLService } from '@cloudbeaver/core-sdk'; +import { type AdminAuthProviderConfiguration, type GetAuthProviderConfigurationsQueryVariables, GraphQLService } from '@cloudbeaver/core-sdk'; -import type { AuthProviderConfiguration } from './AuthProvidersResource'; +import type { AuthProviderConfiguration } from './AuthProvidersResource.js'; const NEW_CONFIGURATION_SYMBOL = Symbol('new-configuration'); @@ -106,7 +106,7 @@ export class AuthConfigurationsResource extends CachedMapResource; export type AuthProviderConfiguration = NonNullable; diff --git a/webapp/packages/core-authentication/src/AuthSettingsService.test.ts b/webapp/packages/core-authentication/src/AuthSettingsService.test.ts index bb516adcc0..a3deae1c2f 100644 --- a/webapp/packages/core-authentication/src/AuthSettingsService.test.ts +++ b/webapp/packages/core-authentication/src/AuthSettingsService.test.ts @@ -10,20 +10,20 @@ import { expect, test } from '@jest/globals'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreRoutingManifest } from '@cloudbeaver/core-routing'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; -import { expectNoDeprecatedSettingMessage } from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +import { expectNoDeprecatedSettingMessage } from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { createApp } from '@cloudbeaver/tests-runner'; -import { mockAuthentication } from './__custom_mocks__/mockAuthentication'; -import { AuthSettingsService } from './AuthSettingsService'; -import { coreAuthenticationManifest } from './manifest'; +import { mockAuthentication } from './__custom_mocks__/mockAuthentication.js'; +import { AuthSettingsService } from './AuthSettingsService.js'; +import { coreAuthenticationManifest } from './manifest.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); diff --git a/webapp/packages/core-authentication/src/LocaleService.ts b/webapp/packages/core-authentication/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/core-authentication/src/LocaleService.ts +++ b/webapp/packages/core-authentication/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-authentication/src/TeamMetaParametersResource.ts b/webapp/packages/core-authentication/src/TeamMetaParametersResource.ts index dd8d85ec31..118952f9f6 100644 --- a/webapp/packages/core-authentication/src/TeamMetaParametersResource.ts +++ b/webapp/packages/core-authentication/src/TeamMetaParametersResource.ts @@ -8,7 +8,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; import { SessionResource } from '@cloudbeaver/core-root'; -import { GraphQLService, ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; export type TeamMetaParameter = ObjectPropertyInfo; diff --git a/webapp/packages/core-authentication/src/TeamsManagerService.ts b/webapp/packages/core-authentication/src/TeamsManagerService.ts index e213ae62bb..c4a20912bd 100644 --- a/webapp/packages/core-authentication/src/TeamsManagerService.ts +++ b/webapp/packages/core-authentication/src/TeamsManagerService.ts @@ -7,7 +7,7 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import { TeamsResource } from './TeamsResource'; +import { TeamsResource } from './TeamsResource.js'; @injectable() export class TeamsManagerService { diff --git a/webapp/packages/core-authentication/src/TeamsResource.ts b/webapp/packages/core-authentication/src/TeamsResource.ts index 08373dfec0..d32ec4bb07 100644 --- a/webapp/packages/core-authentication/src/TeamsResource.ts +++ b/webapp/packages/core-authentication/src/TeamsResource.ts @@ -16,13 +16,13 @@ import { ResourceKeyUtils, } from '@cloudbeaver/core-resource'; import { - AdminConnectionGrantInfo, - AdminTeamInfoFragment, - AdminUserTeamGrantInfo, - GetTeamsListQueryVariables, + type AdminConnectionGrantInfo, + type AdminTeamInfoFragment, + type AdminUserTeamGrantInfo, + type GetTeamsListQueryVariables, GraphQLService, } from '@cloudbeaver/core-sdk'; -import { isArraysEqual, UndefinedToNull } from '@cloudbeaver/core-utils'; +import { isArraysEqual, type UndefinedToNull } from '@cloudbeaver/core-utils'; const NEW_TEAM_SYMBOL = Symbol('new-team'); @@ -94,7 +94,11 @@ export class TeamsResource extends CachedMapResource { const { team } = await this.graphQLService.sdk.getTeamGrantedUsers({ teamId }); - return team[0].grantedUsersInfo.map(user => ({ userId: user.userId, teamRole: user.teamRole ?? null })); + + if (!team.length) { + throw new Error('Team not found'); + } + return team[0]!.grantedUsersInfo.map(user => ({ userId: user.userId, teamRole: user.teamRole ?? null })); } async getSubjectConnectionAccess(subjectId: string): Promise { @@ -159,7 +163,7 @@ export class TeamsResource extends CachedMapResource { + override async load(): Promise { await this.userInfoResource.load(); } } diff --git a/webapp/packages/core-authentication/src/UserDataService.ts b/webapp/packages/core-authentication/src/UserDataService.ts index fcaa223d89..85c2e69e25 100644 --- a/webapp/packages/core-authentication/src/UserDataService.ts +++ b/webapp/packages/core-authentication/src/UserDataService.ts @@ -11,7 +11,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { StorageService } from '@cloudbeaver/core-storage'; import { TempMap } from '@cloudbeaver/core-utils'; -import { UserInfoResource } from './UserInfoResource'; +import { UserInfoResource } from './UserInfoResource.js'; @injectable() export class UserDataService { diff --git a/webapp/packages/core-authentication/src/UserInfoResource.ts b/webapp/packages/core-authentication/src/UserInfoResource.ts index 132327173a..bcf1b0e525 100644 --- a/webapp/packages/core-authentication/src/UserInfoResource.ts +++ b/webapp/packages/core-authentication/src/UserInfoResource.ts @@ -8,15 +8,22 @@ import { computed, makeObservable, runInAction } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { AutoRunningTask, ISyncExecutor, ITask, SyncExecutor, whileTask } from '@cloudbeaver/core-executor'; +import { AutoRunningTask, type ISyncExecutor, type ITask, SyncExecutor, whileTask } from '@cloudbeaver/core-executor'; import { CachedDataResource, type ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { SessionResource } from '@cloudbeaver/core-root'; -import { AuthInfo, AuthLogoutQuery, AuthStatus, GetActiveUserQueryVariables, GraphQLService, UserInfo } from '@cloudbeaver/core-sdk'; - -import { AUTH_PROVIDER_LOCAL_ID } from './AUTH_PROVIDER_LOCAL_ID'; -import { AuthProviderService } from './AuthProviderService'; -import type { ELMRole } from './ELMRole'; -import type { IAuthCredentials } from './IAuthCredentials'; +import { + type AuthInfo, + type AuthLogoutQuery, + AuthStatus, + type GetActiveUserQueryVariables, + GraphQLService, + type UserInfo, +} from '@cloudbeaver/core-sdk'; + +import { AUTH_PROVIDER_LOCAL_ID } from './AUTH_PROVIDER_LOCAL_ID.js'; +import { AuthProviderService } from './AuthProviderService.js'; +import type { ELMRole } from './ELMRole.js'; +import type { IAuthCredentials } from './IAuthCredentials.js'; export type UserInfoIncludes = GetActiveUserQueryVariables; @@ -269,7 +276,7 @@ export class UserInfoResource extends CachedDataResource) { return [endpoint.query('getActiveUser', mockGetActiveUser)]; diff --git a/webapp/packages/core-authentication/src/__custom_mocks__/resolvers/mockGetActiveUser.ts b/webapp/packages/core-authentication/src/__custom_mocks__/resolvers/mockGetActiveUser.ts index 99fab2f88b..d32f4957a6 100644 --- a/webapp/packages/core-authentication/src/__custom_mocks__/resolvers/mockGetActiveUser.ts +++ b/webapp/packages/core-authentication/src/__custom_mocks__/resolvers/mockGetActiveUser.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { GraphQLResolverExtras, GraphQLResponseBody, HttpResponse, ResponseResolver } from 'msw'; +import { type GraphQLResolverExtras, type GraphQLResponseBody, HttpResponse, type ResponseResolver } from 'msw'; import type { GetActiveUserQuery, GetActiveUserQueryVariables } from '@cloudbeaver/core-sdk'; diff --git a/webapp/packages/core-authentication/src/index.ts b/webapp/packages/core-authentication/src/index.ts index ec66902c08..b2508eb7f5 100644 --- a/webapp/packages/core-authentication/src/index.ts +++ b/webapp/packages/core-authentication/src/index.ts @@ -5,26 +5,26 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './manifest'; -export * from './ELMRole'; -export * from './AppAuthService'; -export * from './AUTH_PROVIDER_LOCAL_ID'; -export * from './AuthInfoService'; -export * from './AuthProviderService'; -export * from './AuthProvidersResource'; -export * from './AuthRolesResource'; -export * from './AuthSettingsService'; -export * from './DATA_CONTEXT_USER'; -export * from './IAuthCredentials'; -export * from './AuthConfigurationsResource'; -export * from './AuthConfigurationParametersResource'; -export * from './TeamsManagerService'; -export * from './TeamsResource'; -export * from './UserDataService'; -export * from './UserInfoResource'; -export * from './UserMetaParametersResource'; -export * from './UsersResource'; -export * from './TeamMetaParametersResource'; -export * from './AUTH_SETTINGS_GROUP'; -export * from './PasswordPolicyService'; -export * from './TeamRolesResource'; +export * from './manifest.js'; +export * from './ELMRole.js'; +export * from './AppAuthService.js'; +export * from './AUTH_PROVIDER_LOCAL_ID.js'; +export * from './AuthInfoService.js'; +export * from './AuthProviderService.js'; +export * from './AuthProvidersResource.js'; +export * from './AuthRolesResource.js'; +export * from './AuthSettingsService.js'; +export * from './DATA_CONTEXT_USER.js'; +export * from './IAuthCredentials.js'; +export * from './AuthConfigurationsResource.js'; +export * from './AuthConfigurationParametersResource.js'; +export * from './TeamsManagerService.js'; +export * from './TeamsResource.js'; +export * from './UserDataService.js'; +export * from './UserInfoResource.js'; +export * from './UserMetaParametersResource.js'; +export * from './UsersResource.js'; +export * from './TeamMetaParametersResource.js'; +export * from './AUTH_SETTINGS_GROUP.js'; +export * from './PasswordPolicyService.js'; +export * from './TeamRolesResource.js'; diff --git a/webapp/packages/core-authentication/src/manifest.ts b/webapp/packages/core-authentication/src/manifest.ts index f5db16b02a..abbb17d1e4 100644 --- a/webapp/packages/core-authentication/src/manifest.ts +++ b/webapp/packages/core-authentication/src/manifest.ts @@ -13,24 +13,24 @@ export const coreAuthenticationManifest: PluginManifest = { }, providers: [ - () => import('./AppAuthService').then(m => m.AppAuthService), - () => import('./AuthConfigurationParametersResource').then(m => m.AuthConfigurationParametersResource), - () => import('./AuthConfigurationsResource').then(m => m.AuthConfigurationsResource), - () => import('./AuthInfoService').then(m => m.AuthInfoService), - () => import('./AuthProviderService').then(m => m.AuthProviderService), - () => import('./AuthProvidersResource').then(m => m.AuthProvidersResource), - () => import('./AuthRolesResource').then(m => m.AuthRolesResource), - () => import('./AuthSettingsService').then(m => m.AuthSettingsService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./PasswordPolicyService').then(m => m.PasswordPolicyService), - () => import('./TeamMetaParametersResource').then(m => m.TeamMetaParametersResource), - () => import('./TeamsManagerService').then(m => m.TeamsManagerService), - () => import('./TeamsResource').then(m => m.TeamsResource), - () => import('./TeamRolesResource').then(m => m.TeamRolesResource), - () => import('./UserConfigurationBootstrap').then(m => m.UserConfigurationBootstrap), - () => import('./UserDataService').then(m => m.UserDataService), - () => import('./UserInfoResource').then(m => m.UserInfoResource), - () => import('./UserMetaParametersResource').then(m => m.UserMetaParametersResource), - () => import('./UsersResource').then(m => m.UsersResource), + () => import('./AppAuthService.js').then(m => m.AppAuthService), + () => import('./AuthConfigurationParametersResource.js').then(m => m.AuthConfigurationParametersResource), + () => import('./AuthConfigurationsResource.js').then(m => m.AuthConfigurationsResource), + () => import('./AuthInfoService.js').then(m => m.AuthInfoService), + () => import('./AuthProviderService.js').then(m => m.AuthProviderService), + () => import('./AuthProvidersResource.js').then(m => m.AuthProvidersResource), + () => import('./AuthRolesResource.js').then(m => m.AuthRolesResource), + () => import('./AuthSettingsService.js').then(m => m.AuthSettingsService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./PasswordPolicyService.js').then(m => m.PasswordPolicyService), + () => import('./TeamMetaParametersResource.js').then(m => m.TeamMetaParametersResource), + () => import('./TeamsManagerService.js').then(m => m.TeamsManagerService), + () => import('./TeamsResource.js').then(m => m.TeamsResource), + () => import('./TeamRolesResource.js').then(m => m.TeamRolesResource), + () => import('./UserConfigurationBootstrap.js').then(m => m.UserConfigurationBootstrap), + () => import('./UserDataService.js').then(m => m.UserDataService), + () => import('./UserInfoResource.js').then(m => m.UserInfoResource), + () => import('./UserMetaParametersResource.js').then(m => m.UserMetaParametersResource), + () => import('./UsersResource.js').then(m => m.UsersResource), ], }; diff --git a/webapp/packages/core-blocks/package.json b/webapp/packages/core-blocks/package.json index 6b589ea587..1f49900c14 100644 --- a/webapp/packages/core-blocks/package.json +++ b/webapp/packages/core-blocks/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-blocks", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -56,4 +57,4 @@ "typescript": "^5", "typescript-plugin-css-modules": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/core-blocks/src/ActionIconButton.tsx b/webapp/packages/core-blocks/src/ActionIconButton.tsx index 59f879667d..32e44520ad 100644 --- a/webapp/packages/core-blocks/src/ActionIconButton.tsx +++ b/webapp/packages/core-blocks/src/ActionIconButton.tsx @@ -8,9 +8,9 @@ import { observer } from 'mobx-react-lite'; import style from './ActionIconButton.module.css'; -import { IconButton, type IconButtonProps } from './IconButton'; -import { s } from './s'; -import { useS } from './useS'; +import { IconButton, type IconButtonProps } from './IconButton.js'; +import { s } from './s.js'; +import { useS } from './useS.js'; export interface ActionIconButtonProps extends IconButtonProps { primary?: boolean; diff --git a/webapp/packages/core-blocks/src/AppRefreshButton.tsx b/webapp/packages/core-blocks/src/AppRefreshButton.tsx index 351700b821..7ca985a0ce 100644 --- a/webapp/packages/core-blocks/src/AppRefreshButton.tsx +++ b/webapp/packages/core-blocks/src/AppRefreshButton.tsx @@ -24,7 +24,7 @@ export const AppRefreshButton: React.FC = function AppRefreshButton({ cl } return ( - ); diff --git a/webapp/packages/core-blocks/src/BlocksLocaleService.ts b/webapp/packages/core-blocks/src/BlocksLocaleService.ts index 18b5ed7661..9026444e25 100644 --- a/webapp/packages/core-blocks/src/BlocksLocaleService.ts +++ b/webapp/packages/core-blocks/src/BlocksLocaleService.ts @@ -14,24 +14,22 @@ export class BlocksLocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-blocks/src/Button.tsx b/webapp/packages/core-blocks/src/Button.tsx index e96edc9143..91be6997bf 100644 --- a/webapp/packages/core-blocks/src/Button.tsx +++ b/webapp/packages/core-blocks/src/Button.tsx @@ -9,12 +9,12 @@ import { observable } from 'mobx'; import { observer } from 'mobx-react-lite'; import style from './Button.module.css'; -import { IconOrImage } from './IconOrImage'; -import { Loader } from './Loader/Loader'; -import { s } from './s'; -import { useObjectRef } from './useObjectRef'; -import { useObservableRef } from './useObservableRef'; -import { useS } from './useS'; +import { IconOrImage } from './IconOrImage.js'; +import { Loader } from './Loader/Loader.js'; +import { s } from './s.js'; +import { useObjectRef } from './useObjectRef.js'; +import { useObservableRef } from './useObservableRef.js'; +import { useS } from './useS.js'; type ButtonMod = Array<'raised' | 'unelevated' | 'outlined' | 'secondary'>; diff --git a/webapp/packages/core-blocks/src/Cell.test.tsx b/webapp/packages/core-blocks/src/Cell.test.tsx index eab88c1fc9..bf8d145fcf 100644 --- a/webapp/packages/core-blocks/src/Cell.test.tsx +++ b/webapp/packages/core-blocks/src/Cell.test.tsx @@ -10,7 +10,7 @@ import { cleanup, waitFor } from '@testing-library/react'; import { createApp, renderInApp } from '@cloudbeaver/tests-runner'; -import { Cell } from './Cell'; +import { Cell } from './Cell.js'; const app = createApp(); diff --git a/webapp/packages/core-blocks/src/Cell.tsx b/webapp/packages/core-blocks/src/Cell.tsx index 12b295b36f..7807b4b92f 100644 --- a/webapp/packages/core-blocks/src/Cell.tsx +++ b/webapp/packages/core-blocks/src/Cell.tsx @@ -8,9 +8,9 @@ import { observer } from 'mobx-react-lite'; import style from './Cell.module.css'; -import { Container } from './Containers/Container'; -import { s } from './s'; -import { useS } from './useS'; +import { Container } from './Containers/Container.js'; +import { s } from './s.js'; +import { useS } from './useS.js'; interface Props { description?: React.ReactElement | string; diff --git a/webapp/packages/core-blocks/src/Clickable.tsx b/webapp/packages/core-blocks/src/Clickable.tsx index 248e71de24..81f3aba9a0 100644 --- a/webapp/packages/core-blocks/src/Clickable.tsx +++ b/webapp/packages/core-blocks/src/Clickable.tsx @@ -6,9 +6,9 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import { ClickableOptions, Clickable as MantineClickable } from 'reakit'; +import { type ClickableOptions, Clickable as MantineClickable } from 'reakit'; -import type { ReakitProxyComponent, ReakitProxyComponentOptions } from './Menu/ReakitProxyComponent'; +import type { ReakitProxyComponent, ReakitProxyComponentOptions } from './Menu/ReakitProxyComponent.js'; export const Clickable: ReakitProxyComponent<'button', ClickableOptions> = observer>( function Clickable({ children, ...rest }) { diff --git a/webapp/packages/core-blocks/src/ClickableLoader.ts b/webapp/packages/core-blocks/src/ClickableLoader.ts index 2ba1eb7992..0b4dce342e 100644 --- a/webapp/packages/core-blocks/src/ClickableLoader.ts +++ b/webapp/packages/core-blocks/src/ClickableLoader.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { importLazyComponent } from './importLazyComponent'; +import { importLazyComponent } from './importLazyComponent.js'; -export const Clickable = importLazyComponent(() => import('./Clickable').then(m => m.Clickable)); +export const Clickable = importLazyComponent(() => import('./Clickable.js').then(m => m.Clickable)); diff --git a/webapp/packages/core-blocks/src/Code.tsx b/webapp/packages/core-blocks/src/Code.tsx index f34c4a31aa..97db46b4cc 100644 --- a/webapp/packages/core-blocks/src/Code.tsx +++ b/webapp/packages/core-blocks/src/Code.tsx @@ -8,8 +8,8 @@ import { observer } from 'mobx-react-lite'; import style from './Code.module.css'; -import { s } from './s'; -import { useS } from './useS'; +import { s } from './s.js'; +import { useS } from './useS.js'; interface Props { className?: string; diff --git a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogBody.tsx b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogBody.tsx index 338cf3ae60..fe15e84623 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogBody.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogBody.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import styles from './CommonDialogBody.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogFooter.tsx b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogFooter.tsx index 873f53baf2..16dadafa9c 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogFooter.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogFooter.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import styles from './CommonDialogFooter.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogHeader.tsx b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogHeader.tsx index d41c9fb3b0..81e88141f0 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogHeader.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogHeader.tsx @@ -7,11 +7,11 @@ */ import { observer } from 'mobx-react-lite'; -import { ActionIconButton } from '../../ActionIconButton'; -import { IconOrImage } from '../../IconOrImage'; -import { useTranslate } from '../../localization/useTranslate'; -import { s } from '../../s'; -import { useS } from '../../useS'; +import { ActionIconButton } from '../../ActionIconButton.js'; +import { IconOrImage } from '../../IconOrImage.js'; +import { useTranslate } from '../../localization/useTranslate.js'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import styles from './CommonDialogHeader.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx index 652e6150a4..2fcaf1e0a4 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx @@ -7,13 +7,13 @@ */ import { observer } from 'mobx-react-lite'; import { forwardRef, useContext, useEffect } from 'react'; -import { Dialog, useDialogState } from 'reakit/Dialog'; +import { Dialog, useDialogState } from 'reakit'; -import { Loader } from '../../Loader/Loader'; -import { s } from '../../s'; -import { useFocus } from '../../useFocus'; -import { useS } from '../../useS'; -import { DialogContext } from '../DialogContext'; +import { Loader } from '../../Loader/Loader.js'; +import { s } from '../../s.js'; +import { useFocus } from '../../useFocus.js'; +import { useS } from '../../useS.js'; +import { DialogContext } from '../DialogContext.js'; import styles from './CommonDialogWrapper.module.css'; export interface CommonDialogWrapperProps { diff --git a/webapp/packages/core-blocks/src/CommonDialog/ConfirmationDialog.tsx b/webapp/packages/core-blocks/src/CommonDialog/ConfirmationDialog.tsx index 8f43f5a584..5ede42d077 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/ConfirmationDialog.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/ConfirmationDialog.tsx @@ -8,15 +8,15 @@ import type { DialogComponent, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import { Button } from '../Button'; -import { Fill } from '../Fill'; -import { Translate } from '../localization/Translate'; -import { s } from '../s'; -import { useS } from '../useS'; -import { CommonDialogBody } from './CommonDialog/CommonDialogBody'; -import { CommonDialogFooter } from './CommonDialog/CommonDialogFooter'; -import { CommonDialogHeader } from './CommonDialog/CommonDialogHeader'; -import { CommonDialogWrapper } from './CommonDialog/CommonDialogWrapper'; +import { Button } from '../Button.js'; +import { Fill } from '../Fill.js'; +import { Translate } from '../localization/Translate.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { CommonDialogBody } from './CommonDialog/CommonDialogBody.js'; +import { CommonDialogFooter } from './CommonDialog/CommonDialogFooter.js'; +import { CommonDialogHeader } from './CommonDialog/CommonDialogHeader.js'; +import { CommonDialogWrapper } from './CommonDialog/CommonDialogWrapper.js'; import style from './ConfirmationDialog.module.css'; export interface ConfirmationDialogPayload { diff --git a/webapp/packages/core-blocks/src/CommonDialog/ConfirmationDialogDelete.tsx b/webapp/packages/core-blocks/src/CommonDialog/ConfirmationDialogDelete.tsx index 8bd9df2375..1f22113290 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/ConfirmationDialogDelete.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/ConfirmationDialogDelete.tsx @@ -7,7 +7,7 @@ */ import type { DialogComponent, DialogueStateResult } from '@cloudbeaver/core-dialogs'; -import { ConfirmationDialog, ConfirmationDialogPayload } from '../CommonDialog/ConfirmationDialog'; +import { ConfirmationDialog, type ConfirmationDialogPayload } from '../CommonDialog/ConfirmationDialog.js'; export const ConfirmationDialogDelete: DialogComponent = function ConfirmationDialogDelete({ payload, diff --git a/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx b/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx index a02487fdee..af6daf5269 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx @@ -7,17 +7,17 @@ */ import { observer } from 'mobx-react-lite'; import { useLayoutEffect, useMemo, useRef } from 'react'; -import { DialogBackdrop } from 'reakit/Dialog'; +import { DialogBackdrop } from 'reakit'; import { useService } from '@cloudbeaver/core-di'; -import { CommonDialogService, DialogInternal } from '@cloudbeaver/core-dialogs'; - -import { ErrorBoundary } from '../ErrorBoundary'; -import { Loader } from '../Loader/Loader'; -import { s } from '../s'; -import { useObjectRef } from '../useObjectRef'; -import { useS } from '../useS'; -import { DialogContext, IDialogContext } from './DialogContext'; +import { CommonDialogService, type DialogInternal } from '@cloudbeaver/core-dialogs'; + +import { ErrorBoundary } from '../ErrorBoundary.js'; +import { Loader } from '../Loader/Loader.js'; +import { s } from '../s.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useS } from '../useS.js'; +import { DialogContext, type IDialogContext } from './DialogContext.js'; import style from './DialogsPortal.module.css'; export const DialogsPortal = observer(function DialogsPortal() { diff --git a/webapp/packages/core-blocks/src/CommonDialog/RenameDialog.tsx b/webapp/packages/core-blocks/src/CommonDialog/RenameDialog.tsx index ac1cb61af2..575cf27de5 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/RenameDialog.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/RenameDialog.tsx @@ -12,20 +12,20 @@ import { useEffect } from 'react'; import type { DialogComponent } from '@cloudbeaver/core-dialogs'; import { throttleAsync } from '@cloudbeaver/core-utils'; -import { Button } from '../Button'; -import { Container } from '../Containers/Container'; -import { Fill } from '../Fill'; -import { Form } from '../FormControls/Form'; -import { InputField } from '../FormControls/InputField/InputField'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useFocus } from '../useFocus'; -import { useObservableRef } from '../useObservableRef'; -import { useS } from '../useS'; -import { CommonDialogBody } from './CommonDialog/CommonDialogBody'; -import { CommonDialogFooter } from './CommonDialog/CommonDialogFooter'; -import { CommonDialogHeader } from './CommonDialog/CommonDialogHeader'; -import { CommonDialogWrapper } from './CommonDialog/CommonDialogWrapper'; +import { Button } from '../Button.js'; +import { Container } from '../Containers/Container.js'; +import { Fill } from '../Fill.js'; +import { Form } from '../FormControls/Form.js'; +import { InputField } from '../FormControls/InputField/InputField.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useFocus } from '../useFocus.js'; +import { useObservableRef } from '../useObservableRef.js'; +import { useS } from '../useS.js'; +import { CommonDialogBody } from './CommonDialog/CommonDialogBody.js'; +import { CommonDialogFooter } from './CommonDialog/CommonDialogFooter.js'; +import { CommonDialogHeader } from './CommonDialog/CommonDialogHeader.js'; +import { CommonDialogWrapper } from './CommonDialog/CommonDialogWrapper.js'; import style from './RenameDialog.module.css'; interface IRenameDialogState { diff --git a/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistry.tsx b/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistry.tsx index d0db5ab6de..6cd7b88797 100644 --- a/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistry.tsx +++ b/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistry.tsx @@ -7,8 +7,8 @@ */ import React, { memo, useContext } from 'react'; -import { ComponentsRegistryContext } from './ComponentsRegistryContext'; -import { CRegistryList } from './CRegistryList'; +import { ComponentsRegistryContext } from './ComponentsRegistryContext.js'; +import { type CRegistryList } from './CRegistryList.js'; export interface CRegistryProps extends React.PropsWithChildren { registry: CRegistryList; diff --git a/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistryList.ts b/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistryList.ts index 02772b643e..e3ac9dce6a 100644 --- a/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistryList.ts +++ b/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistryList.ts @@ -7,7 +7,7 @@ */ import React from 'react'; -import { IComponentsTreeNodeValidator } from './IComponentsTreeNodeValidator'; +import { type IComponentsTreeNodeValidator } from './IComponentsTreeNodeValidator.js'; export type RegistryEntry> = [T, IComponentsTreeNodeValidator[]]; export type CRegistryList = RegistryEntry>[]; diff --git a/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistryLoader.ts b/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistryLoader.ts index d098f1e37c..8275728749 100644 --- a/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistryLoader.ts +++ b/webapp/packages/core-blocks/src/ComponentsRegistry/CRegistryLoader.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { importLazyComponent } from '../importLazyComponent'; +import { importLazyComponent } from '../importLazyComponent.js'; -export const CRegistry = importLazyComponent(() => import('./CRegistry').then(m => m.CRegistry)); +export const CRegistry = importLazyComponent(() => import('./CRegistry.js').then(m => m.CRegistry)); diff --git a/webapp/packages/core-blocks/src/ComponentsRegistry/ComponentsRegistryContext.ts b/webapp/packages/core-blocks/src/ComponentsRegistry/ComponentsRegistryContext.ts index 0b765ebb31..6bcbf03540 100644 --- a/webapp/packages/core-blocks/src/ComponentsRegistry/ComponentsRegistryContext.ts +++ b/webapp/packages/core-blocks/src/ComponentsRegistry/ComponentsRegistryContext.ts @@ -7,6 +7,6 @@ */ import { createContext } from 'react'; -import { IComponentsTreeNodeValidator } from './IComponentsTreeNodeValidator'; +import { type IComponentsTreeNodeValidator } from './IComponentsTreeNodeValidator.js'; export const ComponentsRegistryContext = createContext, IComponentsTreeNodeValidator[][]>>(new Map()); diff --git a/webapp/packages/core-blocks/src/ComponentsRegistry/ComponentsTreeContext.ts b/webapp/packages/core-blocks/src/ComponentsRegistry/ComponentsTreeContext.ts index d75271c41f..dbd0f61867 100644 --- a/webapp/packages/core-blocks/src/ComponentsRegistry/ComponentsTreeContext.ts +++ b/webapp/packages/core-blocks/src/ComponentsRegistry/ComponentsTreeContext.ts @@ -7,6 +7,6 @@ */ import { createContext } from 'react'; -import { IComponentsTreeNode } from './IComponentsTreeNode'; +import { type IComponentsTreeNode } from './IComponentsTreeNode.js'; export const ComponentsTreeContext = createContext>>([]); diff --git a/webapp/packages/core-blocks/src/ComponentsRegistry/registry.tsx b/webapp/packages/core-blocks/src/ComponentsRegistry/registry.tsx index 2ae5090dad..da8ee617de 100644 --- a/webapp/packages/core-blocks/src/ComponentsRegistry/registry.tsx +++ b/webapp/packages/core-blocks/src/ComponentsRegistry/registry.tsx @@ -8,10 +8,10 @@ import { observer } from 'mobx-react-lite'; import React, { forwardRef, useContext } from 'react'; -import { ComponentsRegistryContext } from './ComponentsRegistryContext'; -import { ComponentsTreeContext } from './ComponentsTreeContext'; -import { IComponentsTreeNode } from './IComponentsTreeNode'; -import { IComponentsTreeNodeValidator } from './IComponentsTreeNodeValidator'; +import { ComponentsRegistryContext } from './ComponentsRegistryContext.js'; +import { ComponentsTreeContext } from './ComponentsTreeContext.js'; +import { type IComponentsTreeNode } from './IComponentsTreeNode.js'; +import { type IComponentsTreeNodeValidator } from './IComponentsTreeNodeValidator.js'; /** * experimental, can be changed @@ -57,13 +57,13 @@ export function registry>(component: T): T { function getComponent(context: IComponentsTreeNode[], validators: IComponentsTreeNodeValidator[]) { let position = 0; - let node = context[position]; + let node = context[position]!; let lastValidator: IComponentsTreeNodeValidator | null = null; for (const validator of validators) { lastValidator = validator; while (position < context.length) { - node = context[position++]; + node = context[position++]!; if (node.component === lastValidator.component) { if (!lastValidator.validator(node.props) || (node.replacement !== null && node.replacement === lastValidator.replacement)) { return null; diff --git a/webapp/packages/core-blocks/src/ComponentsRegistry/useParentProps.ts b/webapp/packages/core-blocks/src/ComponentsRegistry/useParentProps.ts index 47e16da957..b942920d85 100644 --- a/webapp/packages/core-blocks/src/ComponentsRegistry/useParentProps.ts +++ b/webapp/packages/core-blocks/src/ComponentsRegistry/useParentProps.ts @@ -7,7 +7,7 @@ */ import { useContext } from 'react'; -import { ComponentsTreeContext } from './ComponentsTreeContext'; +import { ComponentsTreeContext } from './ComponentsTreeContext.js'; /** * experimental, can be changed @@ -16,8 +16,8 @@ export function useParentProps(component: React.FC): T | undefined { const tree = useContext(ComponentsTreeContext); for (let i = tree.length - 1; i >= 0; i--) { - if (tree[i].component === component) { - return tree[i].props as T; + if (tree[i]!.component === component) { + return tree[i]!.props as T; } } diff --git a/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionImageWithMask.tsx b/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionImageWithMask.tsx index 81023cba8a..cdadd974d5 100644 --- a/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionImageWithMask.tsx +++ b/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionImageWithMask.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ConnectionImageWithMaskSvg } from './ConnectionImageWithMaskSvg'; -import { ConnectionMark } from './ConnectionMark'; +import { ConnectionImageWithMaskSvg } from './ConnectionImageWithMaskSvg.js'; +import { ConnectionMark } from './ConnectionMark.js'; interface Props { icon?: string; diff --git a/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionImageWithMaskSvg.tsx b/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionImageWithMaskSvg.tsx index 6a47b03144..efe8e86451 100644 --- a/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionImageWithMaskSvg.tsx +++ b/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionImageWithMaskSvg.tsx @@ -7,7 +7,7 @@ */ import { GlobalConstants, isValidUrl } from '@cloudbeaver/core-utils'; -import { useS } from '../useS'; +import { useS } from '../useS.js'; import style from './ConnectionImageWithMaskSvg.module.css'; interface Props { @@ -52,7 +52,7 @@ export const ConnectionImageWithMaskSvg: React.FC = ({ icon, connected, m mask={`url(#${maskId})`} /> - + ); diff --git a/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionMark.tsx b/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionMark.tsx index a03208ea98..fbf45a77a7 100644 --- a/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionMark.tsx +++ b/webapp/packages/core-blocks/src/ConnectionImageWithMask/ConnectionMark.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ConnectionMark.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Containers/ColoredContainer.tsx b/webapp/packages/core-blocks/src/Containers/ColoredContainer.tsx index 12b71927ec..cfac8e7619 100644 --- a/webapp/packages/core-blocks/src/Containers/ColoredContainer.tsx +++ b/webapp/packages/core-blocks/src/Containers/ColoredContainer.tsx @@ -7,12 +7,12 @@ */ import { forwardRef } from 'react'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import coloredContainerStyles from './ColoredContainer.module.css'; import containerStyles from './Container.module.css'; -import { filterContainerFakeProps, getContainerProps } from './filterContainerFakeProps'; -import type { IContainerProps } from './IContainerProps'; +import { filterContainerFakeProps, getContainerProps } from './filterContainerFakeProps.js'; +import type { IContainerProps } from './IContainerProps.js'; import elementsSizeStyles from './shared/ElementsSize.module.css'; interface Props extends IContainerProps, React.HTMLAttributes { diff --git a/webapp/packages/core-blocks/src/Containers/Container.tsx b/webapp/packages/core-blocks/src/Containers/Container.tsx index f5231d70ac..1c19295d88 100644 --- a/webapp/packages/core-blocks/src/Containers/Container.tsx +++ b/webapp/packages/core-blocks/src/Containers/Container.tsx @@ -7,11 +7,11 @@ */ import { forwardRef } from 'react'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './Container.module.css'; -import { filterContainerFakeProps, getContainerProps } from './filterContainerFakeProps'; -import type { IContainerProps } from './IContainerProps'; +import { filterContainerFakeProps, getContainerProps } from './filterContainerFakeProps.js'; +import type { IContainerProps } from './IContainerProps.js'; import elementsSizeStyle from './shared/ElementsSize.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Containers/Group.tsx b/webapp/packages/core-blocks/src/Containers/Group.tsx index 340836ba75..00cf4dacb0 100644 --- a/webapp/packages/core-blocks/src/Containers/Group.tsx +++ b/webapp/packages/core-blocks/src/Containers/Group.tsx @@ -7,12 +7,12 @@ */ import { forwardRef } from 'react'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import containerStyles from './Container.module.css'; -import { filterContainerFakeProps, getContainerProps } from './filterContainerFakeProps'; +import { filterContainerFakeProps, getContainerProps } from './filterContainerFakeProps.js'; import style from './Group.module.css'; -import type { IContainerProps } from './IContainerProps'; +import type { IContainerProps } from './IContainerProps.js'; import elementsSizeStyles from './shared/ElementsSize.module.css'; interface Props extends IContainerProps { diff --git a/webapp/packages/core-blocks/src/Containers/GroupClose.tsx b/webapp/packages/core-blocks/src/Containers/GroupClose.tsx index f502c8a228..f9c307d545 100644 --- a/webapp/packages/core-blocks/src/Containers/GroupClose.tsx +++ b/webapp/packages/core-blocks/src/Containers/GroupClose.tsx @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ActionIconButton } from '../ActionIconButton'; -import { s } from '../s'; -import { useS } from '../useS'; +import { ActionIconButton } from '../ActionIconButton.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import styles from './GroupClose.module.css'; interface IProps { diff --git a/webapp/packages/core-blocks/src/Containers/GroupItem.tsx b/webapp/packages/core-blocks/src/Containers/GroupItem.tsx index 6efebb60fb..96551e8488 100644 --- a/webapp/packages/core-blocks/src/Containers/GroupItem.tsx +++ b/webapp/packages/core-blocks/src/Containers/GroupItem.tsx @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; -import { filterLayoutFakeProps, getLayoutProps } from './filterLayoutFakeProps'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { filterLayoutFakeProps, getLayoutProps } from './filterLayoutFakeProps.js'; import styles from './GroupItem.module.css'; -import type { ILayoutSizeProps } from './ILayoutSizeProps'; +import type { ILayoutSizeProps } from './ILayoutSizeProps.js'; export const GroupItem: React.FC> = function GroupItem({ className, ...rest }) { const style = useS(styles); diff --git a/webapp/packages/core-blocks/src/Containers/GroupSubTitle.tsx b/webapp/packages/core-blocks/src/Containers/GroupSubTitle.tsx index 69367d59eb..0105f66c31 100644 --- a/webapp/packages/core-blocks/src/Containers/GroupSubTitle.tsx +++ b/webapp/packages/core-blocks/src/Containers/GroupSubTitle.tsx @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; -import { filterLayoutFakeProps, getLayoutProps } from './filterLayoutFakeProps'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { filterLayoutFakeProps, getLayoutProps } from './filterLayoutFakeProps.js'; import styles from './GroupSubTitle.module.css'; -import type { ILayoutSizeProps } from './ILayoutSizeProps'; +import type { ILayoutSizeProps } from './ILayoutSizeProps.js'; export const GroupSubTitle: React.FC> = function GroupSubTitle({ className, ...rest }) { const style = useS(styles); diff --git a/webapp/packages/core-blocks/src/Containers/GroupTitle.tsx b/webapp/packages/core-blocks/src/Containers/GroupTitle.tsx index aa18f06d74..b8558cb21c 100644 --- a/webapp/packages/core-blocks/src/Containers/GroupTitle.tsx +++ b/webapp/packages/core-blocks/src/Containers/GroupTitle.tsx @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; -import { filterLayoutFakeProps, getLayoutProps } from './filterLayoutFakeProps'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { filterLayoutFakeProps, getLayoutProps } from './filterLayoutFakeProps.js'; import styles from './GroupTitle.module.css'; -import type { ILayoutSizeProps } from './ILayoutSizeProps'; +import type { ILayoutSizeProps } from './ILayoutSizeProps.js'; import elementsSizeStyles from './shared/ElementsSize.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Containers/IContainerProps.ts b/webapp/packages/core-blocks/src/Containers/IContainerProps.ts index a0cb560f46..0e49f4dad0 100644 --- a/webapp/packages/core-blocks/src/Containers/IContainerProps.ts +++ b/webapp/packages/core-blocks/src/Containers/IContainerProps.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ILayoutSizeProps } from './ILayoutSizeProps'; +import type { ILayoutSizeProps } from './ILayoutSizeProps.js'; export interface IContainerProps extends ILayoutSizeProps { hideEmpty?: boolean; diff --git a/webapp/packages/core-blocks/src/Containers/filterContainerFakeProps.ts b/webapp/packages/core-blocks/src/Containers/filterContainerFakeProps.ts index ce50ff8fc1..55146718ac 100644 --- a/webapp/packages/core-blocks/src/Containers/filterContainerFakeProps.ts +++ b/webapp/packages/core-blocks/src/Containers/filterContainerFakeProps.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { filterLayoutFakeProps, getLayoutProps } from './filterLayoutFakeProps'; -import type { IContainerProps } from './IContainerProps'; +import { filterLayoutFakeProps, getLayoutProps } from './filterLayoutFakeProps.js'; +import type { IContainerProps } from './IContainerProps.js'; export function filterContainerFakeProps(props: T): Omit { const { hideEmpty, flexStart, flexEnd, baseline, center, vertical, wrap, overflow, parent, gap, grid, dense, compact, ...rest } = diff --git a/webapp/packages/core-blocks/src/Containers/filterLayoutFakeProps.ts b/webapp/packages/core-blocks/src/Containers/filterLayoutFakeProps.ts index e3ec1696dd..d8d4648638 100644 --- a/webapp/packages/core-blocks/src/Containers/filterLayoutFakeProps.ts +++ b/webapp/packages/core-blocks/src/Containers/filterLayoutFakeProps.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ILayoutSizeProps } from './ILayoutSizeProps'; +import type { ILayoutSizeProps } from './ILayoutSizeProps.js'; export function filterLayoutFakeProps(props: T): Omit { const { noWrap, keepSize, tiny, small, medium, large, maximum, fill, noGrow, zeroBasis, groupGap, ...rest } = props; diff --git a/webapp/packages/core-blocks/src/DisplayError.tsx b/webapp/packages/core-blocks/src/DisplayError.tsx index 4dd595c1f2..b7a68a0f22 100644 --- a/webapp/packages/core-blocks/src/DisplayError.tsx +++ b/webapp/packages/core-blocks/src/DisplayError.tsx @@ -10,11 +10,11 @@ import type React from 'react'; import { ENotificationType } from '@cloudbeaver/core-events'; -import { AppRefreshButton } from './AppRefreshButton'; +import { AppRefreshButton } from './AppRefreshButton.js'; import style from './DisplayError.module.css'; -import { s } from './s'; -import { NotificationMark } from './Snackbars/NotificationMark'; -import { useS } from './useS'; +import { s } from './s.js'; +import { NotificationMark } from './Snackbars/NotificationMark.js'; +import { useS } from './useS.js'; interface Props { root?: boolean; diff --git a/webapp/packages/core-blocks/src/ErrorBoundary.tsx b/webapp/packages/core-blocks/src/ErrorBoundary.tsx index ba8ba05274..1266296151 100644 --- a/webapp/packages/core-blocks/src/ErrorBoundary.tsx +++ b/webapp/packages/core-blocks/src/ErrorBoundary.tsx @@ -5,15 +5,15 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import React, { ErrorInfo, Suspense } from 'react'; +import React, { type ErrorInfo, Suspense } from 'react'; import { errorOf, LoadingError } from '@cloudbeaver/core-utils'; -import { Button } from './Button'; -import { DisplayError } from './DisplayError'; +import { Button } from './Button.js'; +import { DisplayError } from './DisplayError.js'; import style from './ErrorBoundary.module.css'; -import { ErrorContext, IExceptionContext } from './ErrorContext'; -import { ExceptionMessage } from './ExceptionMessage'; +import { ErrorContext, type IExceptionContext } from './ErrorContext.js'; +import { ExceptionMessage } from './ExceptionMessage.js'; interface Props { simple?: boolean; @@ -52,7 +52,7 @@ export class ErrorBoundary extends React.Component { if (state.exceptions.some(data => data.error === error)) { return state; @@ -69,7 +69,7 @@ export class ErrorBoundary extends React.Component | null { + override render(): React.ReactElement | null { const { root, inline, icon, children, className, onClose } = this.props; for (const errorData of this.state.exceptions) { @@ -80,14 +80,14 @@ export class ErrorBoundary extends React.Component

Something went wrong.

{onClose && ( -
+
)} {this.canRefresh && ( -
+
@@ -109,12 +109,12 @@ export class ErrorBoundary extends React.ComponentLoading...}> {onClose && ( -
+
)} {this.canRefresh && ( -
+
)} diff --git a/webapp/packages/core-blocks/src/ErrorDetailsDialog/ErrorDetailsDialog.tsx b/webapp/packages/core-blocks/src/ErrorDetailsDialog/ErrorDetailsDialog.tsx index 955d089531..45c486a6db 100644 --- a/webapp/packages/core-blocks/src/ErrorDetailsDialog/ErrorDetailsDialog.tsx +++ b/webapp/packages/core-blocks/src/ErrorDetailsDialog/ErrorDetailsDialog.tsx @@ -10,19 +10,19 @@ import { useCallback, useMemo } from 'react'; import type { DialogComponent } from '@cloudbeaver/core-dialogs'; -import { Button } from '../Button'; -import { CommonDialogBody } from '../CommonDialog/CommonDialog/CommonDialogBody'; -import { CommonDialogFooter } from '../CommonDialog/CommonDialog/CommonDialogFooter'; -import { CommonDialogHeader } from '../CommonDialog/CommonDialog/CommonDialogHeader'; -import { CommonDialogWrapper } from '../CommonDialog/CommonDialog/CommonDialogWrapper'; -import { Textarea } from '../FormControls/Textarea'; -import { Iframe } from '../Iframe'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useClipboard } from '../useClipboard'; -import { useS } from '../useS'; +import { Button } from '../Button.js'; +import { CommonDialogBody } from '../CommonDialog/CommonDialog/CommonDialogBody.js'; +import { CommonDialogFooter } from '../CommonDialog/CommonDialog/CommonDialogFooter.js'; +import { CommonDialogHeader } from '../CommonDialog/CommonDialog/CommonDialogHeader.js'; +import { CommonDialogWrapper } from '../CommonDialog/CommonDialog/CommonDialogWrapper.js'; +import { Textarea } from '../FormControls/Textarea.js'; +import { Iframe } from '../Iframe.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useClipboard } from '../useClipboard.js'; +import { useS } from '../useS.js'; import style from './ErrorDetailsDialog.module.css'; -import { ErrorModel, IErrorInfo } from './ErrorModel'; +import { ErrorModel, type IErrorInfo } from './ErrorModel.js'; function DisplayErrorInfo({ error }: { error: IErrorInfo }) { const styles = useS(style); diff --git a/webapp/packages/core-blocks/src/ErrorDetailsDialog/ErrorModel.ts b/webapp/packages/core-blocks/src/ErrorDetailsDialog/ErrorModel.ts index 45b18926b3..62754bb222 100644 --- a/webapp/packages/core-blocks/src/ErrorDetailsDialog/ErrorModel.ts +++ b/webapp/packages/core-blocks/src/ErrorDetailsDialog/ErrorModel.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { DetailsError, GQLError, SDKGraphQLErrorExtensions } from '@cloudbeaver/core-sdk'; +import { DetailsError, GQLError, type SDKGraphQLErrorExtensions } from '@cloudbeaver/core-sdk'; import { errorOf } from '@cloudbeaver/core-utils'; export interface IErrorInfo { diff --git a/webapp/packages/core-blocks/src/ErrorMessage.test.tsx b/webapp/packages/core-blocks/src/ErrorMessage.test.tsx index df3bd80a22..31eaeaeec9 100644 --- a/webapp/packages/core-blocks/src/ErrorMessage.test.tsx +++ b/webapp/packages/core-blocks/src/ErrorMessage.test.tsx @@ -14,7 +14,7 @@ import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { coreThemingManifest } from '@cloudbeaver/core-theming'; import { createApp, renderInApp } from '@cloudbeaver/tests-runner'; -import { ErrorMessage } from './ErrorMessage'; +import { ErrorMessage } from './ErrorMessage.js'; const app = createApp(coreEventsManifest, coreSettingsManifest, coreThemingManifest, coreLocalizationManifest); diff --git a/webapp/packages/core-blocks/src/ErrorMessage.tsx b/webapp/packages/core-blocks/src/ErrorMessage.tsx index 874e8b0379..7c0bb661bf 100644 --- a/webapp/packages/core-blocks/src/ErrorMessage.tsx +++ b/webapp/packages/core-blocks/src/ErrorMessage.tsx @@ -7,12 +7,12 @@ */ import { observer } from 'mobx-react-lite'; -import { Button } from './Button'; +import { Button } from './Button.js'; import styles from './ErrorMessage.module.css'; -import { IconOrImage } from './IconOrImage'; -import { useTranslate } from './localization/useTranslate'; -import { s } from './s'; -import { useS } from './useS'; +import { IconOrImage } from './IconOrImage.js'; +import { useTranslate } from './localization/useTranslate.js'; +import { s } from './s.js'; +import { useS } from './useS.js'; interface Props { hasDetails?: boolean; diff --git a/webapp/packages/core-blocks/src/ExceptionMessage.tsx b/webapp/packages/core-blocks/src/ExceptionMessage.tsx index 0961564d57..43828d10a3 100644 --- a/webapp/packages/core-blocks/src/ExceptionMessage.tsx +++ b/webapp/packages/core-blocks/src/ExceptionMessage.tsx @@ -7,14 +7,14 @@ */ import { observer } from 'mobx-react-lite'; -import { Button } from './Button'; +import { Button } from './Button.js'; import style from './ExceptionMessage.module.css'; -import { Icon } from './Icon'; -import { IconOrImage } from './IconOrImage'; -import { useTranslate } from './localization/useTranslate'; -import { s } from './s'; -import { useErrorDetails } from './useErrorDetails'; -import { useS } from './useS'; +import { Icon } from './Icon.js'; +import { IconOrImage } from './IconOrImage.js'; +import { useTranslate } from './localization/useTranslate.js'; +import { s } from './s.js'; +import { useErrorDetails } from './useErrorDetails.js'; +import { useS } from './useS.js'; interface Props { exception?: Error | null; diff --git a/webapp/packages/core-blocks/src/Expand/Expandable.tsx b/webapp/packages/core-blocks/src/Expand/Expandable.tsx index 615324f0a4..f8a3a9f36f 100644 --- a/webapp/packages/core-blocks/src/Expand/Expandable.tsx +++ b/webapp/packages/core-blocks/src/Expand/Expandable.tsx @@ -6,12 +6,12 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import { forwardRef, ReactNode, useImperativeHandle } from 'react'; -import { Disclosure, DisclosureContent, DisclosureStateReturn, useDisclosureState } from 'reakit'; +import { forwardRef, type ReactNode, useImperativeHandle } from 'react'; +import { Disclosure, DisclosureContent, type DisclosureStateReturn, useDisclosureState } from 'reakit'; -import { IconOrImage } from '../IconOrImage'; -import { s } from '../s'; -import { useS } from '../useS'; +import { IconOrImage } from '../IconOrImage.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './Expandable.module.css'; export type ExpandableState = Pick; diff --git a/webapp/packages/core-blocks/src/Fill.tsx b/webapp/packages/core-blocks/src/Fill.tsx index 8453f8c43e..54887a40aa 100644 --- a/webapp/packages/core-blocks/src/Fill.tsx +++ b/webapp/packages/core-blocks/src/Fill.tsx @@ -6,8 +6,8 @@ * you may not use this file except in compliance with the License. */ import style from './Fill.module.css'; -import { s } from './s'; -import { useS } from './useS'; +import { s } from './s.js'; +import { useS } from './useS.js'; interface Props { className?: string; diff --git a/webapp/packages/core-blocks/src/Flex/Flex.tsx b/webapp/packages/core-blocks/src/Flex/Flex.tsx index 6fc22b164b..a307f96cd8 100644 --- a/webapp/packages/core-blocks/src/Flex/Flex.tsx +++ b/webapp/packages/core-blocks/src/Flex/Flex.tsx @@ -7,7 +7,7 @@ */ import { forwardRef } from 'react'; -import { s } from '../s'; +import { s } from '../s.js'; import classes from './Flex.module.css'; interface Props extends React.HTMLAttributes { diff --git a/webapp/packages/core-blocks/src/FolderExplorer/FolderExplorer.tsx b/webapp/packages/core-blocks/src/FolderExplorer/FolderExplorer.tsx index e5933d09ba..194642f764 100644 --- a/webapp/packages/core-blocks/src/FolderExplorer/FolderExplorer.tsx +++ b/webapp/packages/core-blocks/src/FolderExplorer/FolderExplorer.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import { FolderExplorerContext, IFolderExplorerContext } from './FolderExplorerContext'; +import { FolderExplorerContext, type IFolderExplorerContext } from './FolderExplorerContext.js'; interface Props { state: IFolderExplorerContext; diff --git a/webapp/packages/core-blocks/src/FolderExplorer/FolderExplorerPath.tsx b/webapp/packages/core-blocks/src/FolderExplorer/FolderExplorerPath.tsx index 2515d8585f..a75dd5a5bd 100644 --- a/webapp/packages/core-blocks/src/FolderExplorer/FolderExplorerPath.tsx +++ b/webapp/packages/core-blocks/src/FolderExplorer/FolderExplorerPath.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { s } from '../s'; -import { useS } from '../useS'; -import { FolderExplorerContext } from './FolderExplorerContext'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { FolderExplorerContext } from './FolderExplorerContext.js'; import style from './FolderExplorerPath.module.css'; -import { FolderName } from './FolderName'; +import { FolderName } from './FolderName.js'; interface Props { getName?: (folder: string) => string; @@ -37,7 +37,7 @@ export const FolderExplorerPath = observer(function FolderExplorerPath({ let skipTitle = ''; for (let i = 0; i < context.state.fullPath.length; i++) { - const folder = context.state.fullPath[i]; + const folder = context.state.fullPath[i]!; const path = context.state.fullPath.slice(0, i); const skipFolder = !canSkip || canSkip(folder); diff --git a/webapp/packages/core-blocks/src/FolderExplorer/FolderName.tsx b/webapp/packages/core-blocks/src/FolderExplorer/FolderName.tsx index a9ca110af1..02917263b4 100644 --- a/webapp/packages/core-blocks/src/FolderExplorer/FolderName.tsx +++ b/webapp/packages/core-blocks/src/FolderExplorer/FolderName.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { Icon } from '../Icon'; -import { Link } from '../Link'; -import { s } from '../s'; -import { useS } from '../useS'; -import { FolderExplorerContext } from './FolderExplorerContext'; +import { Icon } from '../Icon.js'; +import { Link } from '../Link.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { FolderExplorerContext } from './FolderExplorerContext.js'; import style from './FolderName.module.css'; interface BaseProps { diff --git a/webapp/packages/core-blocks/src/FolderExplorer/useFolderExplorer.ts b/webapp/packages/core-blocks/src/FolderExplorer/useFolderExplorer.ts index b7ab2839ce..e00819622a 100644 --- a/webapp/packages/core-blocks/src/FolderExplorer/useFolderExplorer.ts +++ b/webapp/packages/core-blocks/src/FolderExplorer/useFolderExplorer.ts @@ -8,9 +8,14 @@ import { action, observable } from 'mobx'; import { useContext, useEffect } from 'react'; -import { useObservableRef } from '../useObservableRef'; -import { useUserData } from '../useUserData'; -import { FolderExplorerContext, IFolderExplorerContext, IFolderExplorerOptions, IFolderExplorerState } from './FolderExplorerContext'; +import { useObservableRef } from '../useObservableRef.js'; +import { useUserData } from '../useUserData.js'; +import { + FolderExplorerContext, + type IFolderExplorerContext, + type IFolderExplorerOptions, + type IFolderExplorerState, +} from './FolderExplorerContext.js'; export function useFolderExplorer(root: string, options: IFolderExplorerOptions = {}): IFolderExplorerContext { const context = useContext(FolderExplorerContext); diff --git a/webapp/packages/core-blocks/src/FormControls/Checkboxes/Checkbox.tsx b/webapp/packages/core-blocks/src/FormControls/Checkboxes/Checkbox.tsx index 1f9005d228..c92f5d67c5 100644 --- a/webapp/packages/core-blocks/src/FormControls/Checkboxes/Checkbox.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Checkboxes/Checkbox.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import { isControlPresented } from '../isControlPresented'; -import { CheckboxMarkup, CheckboxMod } from './CheckboxMarkup'; -import { CheckboxOnChangeEvent, useCheckboxState } from './useCheckboxState'; +import { isControlPresented } from '../isControlPresented.js'; +import { CheckboxMarkup, type CheckboxMod } from './CheckboxMarkup.js'; +import { type CheckboxOnChangeEvent, useCheckboxState } from './useCheckboxState.js'; export interface CheckboxBaseProps { caption?: string; diff --git a/webapp/packages/core-blocks/src/FormControls/Checkboxes/CheckboxMarkup.tsx b/webapp/packages/core-blocks/src/FormControls/Checkboxes/CheckboxMarkup.tsx index a8cf66f0da..0294eea1e4 100644 --- a/webapp/packages/core-blocks/src/FormControls/Checkboxes/CheckboxMarkup.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Checkboxes/CheckboxMarkup.tsx @@ -7,8 +7,8 @@ */ import { useLayoutEffect, useRef } from 'react'; -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import CheckboxMarkupStyles from './CheckboxMarkup.module.css'; export type CheckboxMod = 'primary' | 'surface' | 'small'; diff --git a/webapp/packages/core-blocks/src/FormControls/Checkboxes/FieldCheckbox.tsx b/webapp/packages/core-blocks/src/FormControls/Checkboxes/FieldCheckbox.tsx index 1b94a58e27..2aab6ebbf9 100644 --- a/webapp/packages/core-blocks/src/FormControls/Checkboxes/FieldCheckbox.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Checkboxes/FieldCheckbox.tsx @@ -7,14 +7,14 @@ */ import { observer } from 'mobx-react-lite'; -import { filterLayoutFakeProps, getLayoutProps } from '../../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../../Containers/ILayoutSizeProps'; -import { s } from '../../s'; -import { useS } from '../../useS'; -import { Field } from '../Field'; -import { FieldLabel } from '../FieldLabel'; -import { isControlPresented } from '../isControlPresented'; -import { Checkbox, CheckboxBaseProps, CheckboxType, ICheckboxControlledProps, ICheckboxObjectProps } from './Checkbox'; +import { filterLayoutFakeProps, getLayoutProps } from '../../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../../Containers/ILayoutSizeProps.js'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; +import { Field } from '../Field.js'; +import { FieldLabel } from '../FieldLabel.js'; +import { isControlPresented } from '../isControlPresented.js'; +import { Checkbox, type CheckboxBaseProps, type CheckboxType, type ICheckboxControlledProps, type ICheckboxObjectProps } from './Checkbox.js'; import fieldCheckboxStyles from './FieldCheckbox.module.css'; export const FieldCheckbox: CheckboxType = observer(function FieldCheckbox({ diff --git a/webapp/packages/core-blocks/src/FormControls/Checkboxes/Switch.tsx b/webapp/packages/core-blocks/src/FormControls/Checkboxes/Switch.tsx index 96edd4f4fc..4149698582 100644 --- a/webapp/packages/core-blocks/src/FormControls/Checkboxes/Switch.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Checkboxes/Switch.tsx @@ -7,19 +7,19 @@ */ import { observer } from 'mobx-react-lite'; -import { filterLayoutFakeProps } from '../../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../../Containers/ILayoutSizeProps'; -import { s } from '../../s'; -import { useS } from '../../useS'; -import { Field } from '../Field'; -import { FieldDescription } from '../FieldDescription'; -import { FieldLabel } from '../FieldLabel'; -import { isControlPresented } from '../isControlPresented'; -import type { ICheckboxControlledProps, ICheckboxObjectProps } from './Checkbox'; +import { filterLayoutFakeProps } from '../../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../../Containers/ILayoutSizeProps.js'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; +import { Field } from '../Field.js'; +import { FieldDescription } from '../FieldDescription.js'; +import { FieldLabel } from '../FieldLabel.js'; +import { isControlPresented } from '../isControlPresented.js'; +import type { ICheckboxControlledProps, ICheckboxObjectProps } from './Checkbox.js'; import switchStyles from './Switch.module.css'; import denseModStyles from './SwitchDense.module.css'; import primaryModStyles from './SwitchPrimary.module.css'; -import { useCheckboxState } from './useCheckboxState'; +import { useCheckboxState } from './useCheckboxState.js'; const switchMod = { primary: primaryModStyles, @@ -74,11 +74,11 @@ export const Switch: SwitchType = observer(function Switch({ return ( -
+
-
-
-
+
+
+
- + {children}
diff --git a/webapp/packages/core-blocks/src/FormControls/Checkboxes/useCheckboxState.ts b/webapp/packages/core-blocks/src/FormControls/Checkboxes/useCheckboxState.ts index 45ce2005ed..175958ef0e 100644 --- a/webapp/packages/core-blocks/src/FormControls/Checkboxes/useCheckboxState.ts +++ b/webapp/packages/core-blocks/src/FormControls/Checkboxes/useCheckboxState.ts @@ -8,8 +8,8 @@ import { runInAction } from 'mobx'; import { useContext, useState } from 'react'; -import { useObjectRef } from '../../useObjectRef'; -import { FormContext } from '../FormContext'; +import { useObjectRef } from '../../useObjectRef.js'; +import { FormContext } from '../FormContext.js'; export type CheckboxOnChangeEvent = (value: boolean, name: T) => void; diff --git a/webapp/packages/core-blocks/src/FormControls/Combobox.tsx b/webapp/packages/core-blocks/src/FormControls/Combobox.tsx index af22f371bf..8710fe77c2 100644 --- a/webapp/packages/core-blocks/src/FormControls/Combobox.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Combobox.tsx @@ -7,22 +7,22 @@ */ import { observer } from 'mobx-react-lite'; import { useCallback, useContext, useEffect, useLayoutEffect, useRef, useState } from 'react'; -import { Menu, MenuButton, MenuItem, useMenuState } from 'reakit/Menu'; - -import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps'; -import { getComputed } from '../getComputed'; -import { Icon } from '../Icon'; -import { IconOrImage } from '../IconOrImage'; -import { Loader } from '../Loader/Loader'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useS } from '../useS'; +import { Menu, MenuButton, MenuItem, useMenuState } from 'reakit'; + +import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps.js'; +import { getComputed } from '../getComputed.js'; +import { Icon } from '../Icon.js'; +import { IconOrImage } from '../IconOrImage.js'; +import { Loader } from '../Loader/Loader.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import comboboxStyles from './Combobox.module.css'; -import { Field } from './Field'; -import { FieldDescription } from './FieldDescription'; -import { FieldLabel } from './FieldLabel'; -import { FormContext } from './FormContext'; +import { Field } from './Field.js'; +import { FieldDescription } from './FieldDescription.js'; +import { FieldLabel } from './FieldLabel.js'; +import { FormContext } from './FormContext.js'; export type ComboboxBaseProps = Omit< React.InputHTMLAttributes, @@ -299,7 +299,7 @@ export const Combobox: ComboboxType = observer(function Combobox({ onClick={handleClick} {...rest} /> - + diff --git a/webapp/packages/core-blocks/src/FormControls/ComboboxLoader.ts b/webapp/packages/core-blocks/src/FormControls/ComboboxLoader.ts index 7c36bbff0f..cf849d3485 100644 --- a/webapp/packages/core-blocks/src/FormControls/ComboboxLoader.ts +++ b/webapp/packages/core-blocks/src/FormControls/ComboboxLoader.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { importLazyComponent } from '../importLazyComponent'; +import { importLazyComponent } from '../importLazyComponent.js'; -export const Combobox = importLazyComponent(() => import('./Combobox').then(m => m.Combobox)); +export const Combobox = importLazyComponent(() => import('./Combobox.js').then(m => m.Combobox)); diff --git a/webapp/packages/core-blocks/src/FormControls/Field.tsx b/webapp/packages/core-blocks/src/FormControls/Field.tsx index 41f5fe4fa8..7ecbec5243 100644 --- a/webapp/packages/core-blocks/src/FormControls/Field.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Field.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import type { HTMLAttributes, PropsWithChildren } from 'react'; -import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps'; +import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps.js'; import elementsSizeStyles from '../Containers/shared/ElementsSize.module.css'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import fieldStyles from './Field.module.css'; type Props = ILayoutSizeProps & diff --git a/webapp/packages/core-blocks/src/FormControls/FieldDescription.tsx b/webapp/packages/core-blocks/src/FormControls/FieldDescription.tsx index 46e8d22f87..84f32bc213 100644 --- a/webapp/packages/core-blocks/src/FormControls/FieldDescription.tsx +++ b/webapp/packages/core-blocks/src/FormControls/FieldDescription.tsx @@ -8,8 +8,8 @@ import { observer } from 'mobx-react-lite'; import type { PropsWithChildren } from 'react'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import fieldDescriptionStyles from './FieldDescription.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/FormControls/FieldLabel.tsx b/webapp/packages/core-blocks/src/FormControls/FieldLabel.tsx index a4546e43da..c573ff56d8 100644 --- a/webapp/packages/core-blocks/src/FormControls/FieldLabel.tsx +++ b/webapp/packages/core-blocks/src/FormControls/FieldLabel.tsx @@ -8,8 +8,8 @@ import { observer } from 'mobx-react-lite'; import type { LabelHTMLAttributes, PropsWithChildren } from 'react'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import fieldLabelStyles from './FieldLabel.module.css'; type Props = LabelHTMLAttributes & { diff --git a/webapp/packages/core-blocks/src/FormControls/Filter.tsx b/webapp/packages/core-blocks/src/FormControls/Filter.tsx index 6b040a277f..c7df95ab9f 100644 --- a/webapp/packages/core-blocks/src/FormControls/Filter.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Filter.tsx @@ -6,18 +6,18 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import { HTMLAttributes, useState } from 'react'; +import { type HTMLAttributes, useState } from 'react'; import { isNotNullDefined } from '@cloudbeaver/core-utils'; -import { ActionIconButton } from '../ActionIconButton'; -import { Container } from '../Containers/Container'; -import type { IContainerProps } from '../Containers/IContainerProps'; -import { s } from '../s'; -import { useFocus } from '../useFocus'; -import { useS } from '../useS'; +import { ActionIconButton } from '../ActionIconButton.js'; +import { Container } from '../Containers/Container.js'; +import type { IContainerProps } from '../Containers/IContainerProps.js'; +import { s } from '../s.js'; +import { useFocus } from '../useFocus.js'; +import { useS } from '../useS.js'; import filterStyle from './Filter.module.css'; -import { InputField } from './InputField/InputField'; +import { InputField } from './InputField/InputField.js'; interface BaseProps extends Omit, 'onChange'>, IContainerProps { placeholder?: string; diff --git a/webapp/packages/core-blocks/src/FormControls/Form.tsx b/webapp/packages/core-blocks/src/FormControls/Form.tsx index 7cc9fe5e10..ab7d4dd318 100644 --- a/webapp/packages/core-blocks/src/FormControls/Form.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Form.tsx @@ -7,13 +7,13 @@ */ import React, { forwardRef, useState } from 'react'; -import { s } from '../s'; -import { useCombinedRef } from '../useCombinedRef'; -import { useFocus } from '../useFocus'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useCombinedRef } from '../useCombinedRef.js'; +import { useFocus } from '../useFocus.js'; +import { useS } from '../useS.js'; import styles from './Form.module.css'; -import { FormChangeHandler, FormContext, IFormContext } from './FormContext'; -import { useForm } from './useForm'; +import { type FormChangeHandler, FormContext, type IFormContext } from './FormContext.js'; +import { useForm } from './useForm.js'; type FormDetailedProps = Omit, HTMLFormElement>, 'onChange' | 'onSubmit'> & { context?: IFormContext; diff --git a/webapp/packages/core-blocks/src/FormControls/FormFieldDescription.tsx b/webapp/packages/core-blocks/src/FormControls/FormFieldDescription.tsx index e67ee52548..8bb408881f 100644 --- a/webapp/packages/core-blocks/src/FormControls/FormFieldDescription.tsx +++ b/webapp/packages/core-blocks/src/FormControls/FormFieldDescription.tsx @@ -5,13 +5,13 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps'; -import { s } from '../s'; -import { useS } from '../useS'; -import { Field } from './Field'; -import { FieldDescription } from './FieldDescription'; -import { FieldLabel } from './FieldLabel'; +import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { Field } from './Field.js'; +import { FieldDescription } from './FieldDescription.js'; +import { FieldLabel } from './FieldLabel.js'; import style from './FormFieldDescription.module.css'; interface Props extends ILayoutSizeProps { diff --git a/webapp/packages/core-blocks/src/FormControls/InputField/InputField.tsx b/webapp/packages/core-blocks/src/FormControls/InputField/InputField.tsx index 26bad6873b..14a6979368 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputField/InputField.tsx +++ b/webapp/packages/core-blocks/src/FormControls/InputField/InputField.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import React, { forwardRef, useContext } from 'react'; -import { useCombinedHandler } from '../../useCombinedHandler'; -import { FormContext } from '../FormContext'; -import { isFormStateControl } from '../isFormStateControl'; -import { InputFieldBase, type InputFieldBaseProps } from './InputFieldBase'; -import { InputFieldState, type InputFieldStateProps } from './InputFieldState'; +import { useCombinedHandler } from '../../useCombinedHandler.js'; +import { FormContext } from '../FormContext.js'; +import { isFormStateControl } from '../isFormStateControl.js'; +import { InputFieldBase, type InputFieldBaseProps } from './InputFieldBase.js'; +import { InputFieldState, type InputFieldStateProps } from './InputFieldState.js'; interface InputFieldType { (props: InputFieldBaseProps & React.RefAttributes): React.ReactElement | null; diff --git a/webapp/packages/core-blocks/src/FormControls/InputField/InputFieldBase.tsx b/webapp/packages/core-blocks/src/FormControls/InputField/InputFieldBase.tsx index 763ae1707b..b7251299d0 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputField/InputFieldBase.tsx +++ b/webapp/packages/core-blocks/src/FormControls/InputField/InputFieldBase.tsx @@ -10,20 +10,20 @@ import React, { forwardRef, useCallback, useLayoutEffect, useRef, useState } fro import { isNotNullDefined } from '@cloudbeaver/core-utils'; -import { filterLayoutFakeProps, getLayoutProps } from '../../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../../Containers/ILayoutSizeProps'; -import { Icon } from '../../Icon'; -import { Loader } from '../../Loader/Loader'; -import { useTranslate } from '../../localization/useTranslate'; -import { s } from '../../s'; -import { useCombinedHandler } from '../../useCombinedHandler'; -import { useCombinedRef } from '../../useCombinedRef'; -import { useS } from '../../useS'; -import { useStateDelay } from '../../useStateDelay'; -import { Field } from '../Field'; -import { FieldDescription } from '../FieldDescription'; -import { FieldLabel } from '../FieldLabel'; -import { useCapsLockTracker } from '../useCapsLockTracker'; +import { filterLayoutFakeProps, getLayoutProps } from '../../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../../Containers/ILayoutSizeProps.js'; +import { Icon } from '../../Icon.js'; +import { Loader } from '../../Loader/Loader.js'; +import { useTranslate } from '../../localization/useTranslate.js'; +import { s } from '../../s.js'; +import { useCombinedHandler } from '../../useCombinedHandler.js'; +import { useCombinedRef } from '../../useCombinedRef.js'; +import { useS } from '../../useS.js'; +import { useStateDelay } from '../../useStateDelay.js'; +import { Field } from '../Field.js'; +import { FieldDescription } from '../FieldDescription.js'; +import { FieldLabel } from '../FieldLabel.js'; +import { useCapsLockTracker } from '../useCapsLockTracker.js'; import inputFieldStyle from './InputField.module.css'; export type InputFieldBaseProps = Omit, 'value' | 'onChange' | 'style' | 'ref'> & @@ -138,13 +138,13 @@ export const InputFieldBase = observer(
)} {passwordType && canShowPassword && ( -
- +
+
)} {onCustomCopy && ( -
- +
+
)} {icon &&
{icon}
} diff --git a/webapp/packages/core-blocks/src/FormControls/InputField/InputFieldState.tsx b/webapp/packages/core-blocks/src/FormControls/InputField/InputFieldState.tsx index 401968cd95..11ef1d62e8 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputField/InputFieldState.tsx +++ b/webapp/packages/core-blocks/src/FormControls/InputField/InputFieldState.tsx @@ -8,9 +8,9 @@ import { observer } from 'mobx-react-lite'; import React, { forwardRef } from 'react'; -import type { IFormStateControl } from '../IFormStateControl'; -import { useFormStateControl } from '../useFormStateControl'; -import { InputFieldBase, InputFieldBaseProps } from './InputFieldBase'; +import type { IFormStateControl } from '../IFormStateControl.js'; +import { useFormStateControl } from '../useFormStateControl.js'; +import { InputFieldBase, type InputFieldBaseProps } from './InputFieldBase.js'; export type InputFieldStateProps, TKey extends keyof TState> = Omit & IFormStateControl; diff --git a/webapp/packages/core-blocks/src/FormControls/InputFileTextContent.tsx b/webapp/packages/core-blocks/src/FormControls/InputFileTextContent.tsx index 80d6f6f15c..94f6136ed5 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputFileTextContent.tsx +++ b/webapp/packages/core-blocks/src/FormControls/InputFileTextContent.tsx @@ -6,21 +6,21 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import { ReactNode, useContext, useState } from 'react'; +import { type ReactNode, useContext, useState } from 'react'; import { blobToBase64, bytesToSize } from '@cloudbeaver/core-utils'; -import { Button } from '../Button'; -import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps'; -import { IconButton } from '../IconButton'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { UploadArea } from '../UploadArea'; -import { useS } from '../useS'; -import { Field } from './Field'; -import { FieldDescription } from './FieldDescription'; -import { FieldLabel } from './FieldLabel'; -import { FormContext } from './FormContext'; +import { Button } from '../Button.js'; +import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps.js'; +import { IconButton } from '../IconButton.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { UploadArea } from '../UploadArea.js'; +import { useS } from '../useS.js'; +import { Field } from './Field.js'; +import { FieldDescription } from './FieldDescription.js'; +import { FieldLabel } from './FieldLabel.js'; +import { FormContext } from './FormContext.js'; import inputFileTextContentStyles from './InputFileTextContent.module.css'; const DEFAULT_MAX_FILE_SIZE = 2048; diff --git a/webapp/packages/core-blocks/src/FormControls/InputFiles.tsx b/webapp/packages/core-blocks/src/FormControls/InputFiles.tsx index ccf5af55f4..6f2acefc24 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputFiles.tsx +++ b/webapp/packages/core-blocks/src/FormControls/InputFiles.tsx @@ -8,24 +8,24 @@ import { observer } from 'mobx-react-lite'; import { forwardRef, useContext, useEffect, useState } from 'react'; -import { Button } from '../Button'; -import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { Tag } from '../Tags/Tag'; -import { Tags } from '../Tags/Tags'; -import { UploadArea } from '../UploadArea'; -import { useCombinedHandler } from '../useCombinedHandler'; -import { useRefInherit } from '../useRefInherit'; -import { useS } from '../useS'; -import { useStateDelay } from '../useStateDelay'; -import { Field } from './Field'; -import { FieldDescription } from './FieldDescription'; -import { FieldLabel } from './FieldLabel'; -import { FormContext } from './FormContext'; +import { Button } from '../Button.js'; +import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { Tag } from '../Tags/Tag.js'; +import { Tags } from '../Tags/Tags.js'; +import { UploadArea } from '../UploadArea.js'; +import { useCombinedHandler } from '../useCombinedHandler.js'; +import { useRefInherit } from '../useRefInherit.js'; +import { useS } from '../useS.js'; +import { useStateDelay } from '../useStateDelay.js'; +import { Field } from './Field.js'; +import { FieldDescription } from './FieldDescription.js'; +import { FieldLabel } from './FieldLabel.js'; +import { FormContext } from './FormContext.js'; import InputFilesStyles from './InputFiles.module.css'; -import { isControlPresented } from './isControlPresented'; +import { isControlPresented } from './isControlPresented.js'; type BaseProps = Omit, 'onChange' | 'name' | 'value' | 'style'> & ILayoutSizeProps & { @@ -142,7 +142,7 @@ export const InputFiles: InputFilesType = observer( const dt = new DataTransfer(); for (let i = 0; i < value.length; i++) { - const file = value[i]; + const file = value[i]!; if (index !== i) { dt.items.add(file); } diff --git a/webapp/packages/core-blocks/src/FormControls/Radio.tsx b/webapp/packages/core-blocks/src/FormControls/Radio.tsx index 2b568e34de..144a7e535d 100644 --- a/webapp/packages/core-blocks/src/FormControls/Radio.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Radio.tsx @@ -8,14 +8,14 @@ import { observer } from 'mobx-react-lite'; import { useCallback, useContext } from 'react'; -import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps'; -import { s } from '../s'; -import { useS } from '../useS'; -import { Field } from './Field'; -import { FormContext } from './FormContext'; +import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { Field } from './Field.js'; +import { FormContext } from './FormContext.js'; import style from './Radio.module.css'; -import { RadioGroupContext } from './RadioGroupContext'; +import { RadioGroupContext } from './RadioGroupContext.js'; type BaseProps = Omit, 'onChange' | 'value' | 'checked'> & ILayoutSizeProps & { diff --git a/webapp/packages/core-blocks/src/FormControls/RadioGroup.tsx b/webapp/packages/core-blocks/src/FormControls/RadioGroup.tsx index 3cdbd7a9d1..80c60a886a 100644 --- a/webapp/packages/core-blocks/src/FormControls/RadioGroup.tsx +++ b/webapp/packages/core-blocks/src/FormControls/RadioGroup.tsx @@ -8,8 +8,8 @@ import { observer } from 'mobx-react-lite'; import { useCallback, useContext, useMemo, useState } from 'react'; -import { FormContext } from './FormContext'; -import { IRadioGroupContext, RadioGroupContext } from './RadioGroupContext'; +import { FormContext } from './FormContext.js'; +import { type IRadioGroupContext, RadioGroupContext } from './RadioGroupContext.js'; type BaseProps = React.PropsWithChildren<{ name: string; @@ -64,7 +64,7 @@ export const RadioGroup: RadioGroupType = observer(function RadioGroup({ [name, state, formContext, onChange], ); - const value = state ? state[name] : controlledValue ?? selfValue; + const value = state ? state[name] : (controlledValue ?? selfValue); const context: IRadioGroupContext = useMemo( () => ({ diff --git a/webapp/packages/core-blocks/src/FormControls/TagsCombobox.tsx b/webapp/packages/core-blocks/src/FormControls/TagsCombobox.tsx index ba5b604a21..d682455bb9 100644 --- a/webapp/packages/core-blocks/src/FormControls/TagsCombobox.tsx +++ b/webapp/packages/core-blocks/src/FormControls/TagsCombobox.tsx @@ -7,10 +7,10 @@ */ import { observer } from 'mobx-react-lite'; -import { Container } from '../Containers/Container'; -import { ITag, Tag } from '../Tags/Tag'; -import { Tags } from '../Tags/Tags'; -import { Combobox, ComboboxBaseProps } from './Combobox'; +import { Container } from '../Containers/Container.js'; +import { type ITag, Tag } from '../Tags/Tag.js'; +import { Tags } from '../Tags/Tags.js'; +import { Combobox, type ComboboxBaseProps } from './Combobox.js'; interface IItemValue { id: string; diff --git a/webapp/packages/core-blocks/src/FormControls/TagsComboboxLoader.ts b/webapp/packages/core-blocks/src/FormControls/TagsComboboxLoader.ts index ec8a0783ce..6ee77f18b8 100644 --- a/webapp/packages/core-blocks/src/FormControls/TagsComboboxLoader.ts +++ b/webapp/packages/core-blocks/src/FormControls/TagsComboboxLoader.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { importLazyComponent } from '../importLazyComponent'; +import { importLazyComponent } from '../importLazyComponent.js'; -export const TagsCombobox = importLazyComponent(() => import('./TagsCombobox').then(m => m.TagsCombobox)); +export const TagsCombobox = importLazyComponent(() => import('./TagsCombobox.js').then(m => m.TagsCombobox)); diff --git a/webapp/packages/core-blocks/src/FormControls/Textarea.tsx b/webapp/packages/core-blocks/src/FormControls/Textarea.tsx index 0e93bf3b7d..929ddd47f5 100644 --- a/webapp/packages/core-blocks/src/FormControls/Textarea.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Textarea.tsx @@ -10,17 +10,17 @@ import { useCallback, useContext, useLayoutEffect, useRef } from 'react'; import { getTextFileReadingProcess } from '@cloudbeaver/core-utils'; -import { Button } from '../Button'; -import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { UploadArea } from '../UploadArea'; -import { useS } from '../useS'; -import { Field } from './Field'; -import { FieldDescription } from './FieldDescription'; -import { FieldLabel } from './FieldLabel'; -import { FormContext } from './FormContext'; +import { Button } from '../Button.js'; +import { filterLayoutFakeProps, getLayoutProps } from '../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../Containers/ILayoutSizeProps.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { UploadArea } from '../UploadArea.js'; +import { useS } from '../useS.js'; +import { Field } from './Field.js'; +import { FieldDescription } from './FieldDescription.js'; +import { FieldLabel } from './FieldLabel.js'; +import { FormContext } from './FormContext.js'; import textareaStyle from './Textarea.module.css'; type BaseProps = Omit, 'onChange' | 'style'> & diff --git a/webapp/packages/core-blocks/src/FormControls/isFormStateControl.ts b/webapp/packages/core-blocks/src/FormControls/isFormStateControl.ts index ebd1735a06..1d42b5fea2 100644 --- a/webapp/packages/core-blocks/src/FormControls/isFormStateControl.ts +++ b/webapp/packages/core-blocks/src/FormControls/isFormStateControl.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IFormStateControl } from './IFormStateControl'; +import type { IFormStateControl } from './IFormStateControl.js'; export function isFormStateControl, TKey extends keyof TState>( props: any, diff --git a/webapp/packages/core-blocks/src/FormControls/useCustomInputValidation.ts b/webapp/packages/core-blocks/src/FormControls/useCustomInputValidation.ts index 9ee884992f..a18f43222e 100644 --- a/webapp/packages/core-blocks/src/FormControls/useCustomInputValidation.ts +++ b/webapp/packages/core-blocks/src/FormControls/useCustomInputValidation.ts @@ -9,9 +9,9 @@ import { useContext, useEffect, useRef } from 'react'; import { ExecutorInterrupter } from '@cloudbeaver/core-executor'; -import { useTranslate } from '../localization/useTranslate'; -import { useExecutor } from '../useExecutor'; -import { FormContext } from './FormContext'; +import { useTranslate } from '../localization/useTranslate.js'; +import { useExecutor } from '../useExecutor.js'; +import { FormContext } from './FormContext.js'; export function useCustomInputValidation(validation: (value: T) => string | null): React.RefObject { const context = useContext(FormContext); diff --git a/webapp/packages/core-blocks/src/FormControls/useForm.ts b/webapp/packages/core-blocks/src/FormControls/useForm.ts index 4ae6d96f37..50d67bb655 100644 --- a/webapp/packages/core-blocks/src/FormControls/useForm.ts +++ b/webapp/packages/core-blocks/src/FormControls/useForm.ts @@ -9,9 +9,9 @@ import React, { useContext, useState } from 'react'; import { Executor, ExecutorInterrupter, SyncExecutor } from '@cloudbeaver/core-executor'; -import { useExecutor } from '../useExecutor'; -import { useObjectRef } from '../useObjectRef'; -import { FormChangeHandler, FormContext, type IChangeData, type IFormContext } from './FormContext'; +import { useExecutor } from '../useExecutor.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { type FormChangeHandler, FormContext, type IChangeData, type IFormContext } from './FormContext.js'; interface IOptions { parent?: IFormContext; diff --git a/webapp/packages/core-blocks/src/FormControls/useFormStateControl.ts b/webapp/packages/core-blocks/src/FormControls/useFormStateControl.ts index 436875f942..2419d590a1 100644 --- a/webapp/packages/core-blocks/src/FormControls/useFormStateControl.ts +++ b/webapp/packages/core-blocks/src/FormControls/useFormStateControl.ts @@ -7,9 +7,9 @@ */ import { isNotNullDefined, isObject } from '@cloudbeaver/core-utils'; -import { useCombinedHandler } from '../useCombinedHandler'; -import type { IFormStateControl } from './IFormStateControl'; -import { isControlPresented } from './isControlPresented'; +import { useCombinedHandler } from '../useCombinedHandler.js'; +import type { IFormStateControl } from './IFormStateControl.js'; +import { isControlPresented } from './isControlPresented.js'; export function useFormStateControl, TKey extends keyof TState>({ name, diff --git a/webapp/packages/core-blocks/src/Icon.test.tsx b/webapp/packages/core-blocks/src/Icon.test.tsx index 549821f235..71f3e13dc1 100644 --- a/webapp/packages/core-blocks/src/Icon.test.tsx +++ b/webapp/packages/core-blocks/src/Icon.test.tsx @@ -8,7 +8,7 @@ import { afterEach, describe, expect, test } from '@jest/globals'; import { cleanup, render, screen } from '@testing-library/react'; -import { Icon } from './Icon'; +import { Icon } from './Icon.js'; describe('Icon', () => { afterEach(() => { diff --git a/webapp/packages/core-blocks/src/IconButton.tsx b/webapp/packages/core-blocks/src/IconButton.tsx index 25cb46fc85..06e673a620 100644 --- a/webapp/packages/core-blocks/src/IconButton.tsx +++ b/webapp/packages/core-blocks/src/IconButton.tsx @@ -7,13 +7,13 @@ */ import { observer } from 'mobx-react-lite'; import type React from 'react'; -import { ButtonProps, Button as ReakitButton } from 'reakit/Button'; +import { type ButtonProps, Button as ReakitButton } from 'reakit'; -import { Icon } from './Icon'; +import { Icon } from './Icon.js'; import IconButtonStyles from './IconButton.module.css'; -import { s } from './s'; -import { StaticImage } from './StaticImage'; -import { useS } from './useS'; +import { s } from './s.js'; +import { StaticImage } from './StaticImage.js'; +import { useS } from './useS.js'; interface Props { tag?: 'button' | 'a' | 'div'; diff --git a/webapp/packages/core-blocks/src/IconOrImage.tsx b/webapp/packages/core-blocks/src/IconOrImage.tsx index 6a39f172e9..845767a584 100644 --- a/webapp/packages/core-blocks/src/IconOrImage.tsx +++ b/webapp/packages/core-blocks/src/IconOrImage.tsx @@ -9,8 +9,8 @@ import { useMemo } from 'react'; import { isValidUrl } from '@cloudbeaver/core-utils'; -import { Icon } from './Icon'; -import { StaticImage } from './StaticImage'; +import { Icon } from './Icon.js'; +import { StaticImage } from './StaticImage.js'; export interface IconOrImageProps { icon: string; diff --git a/webapp/packages/core-blocks/src/Iframe.tsx b/webapp/packages/core-blocks/src/Iframe.tsx index 4df13ab147..1a6167876e 100644 --- a/webapp/packages/core-blocks/src/Iframe.tsx +++ b/webapp/packages/core-blocks/src/Iframe.tsx @@ -9,8 +9,8 @@ import { observer } from 'mobx-react-lite'; import type { DetailedHTMLProps, IframeHTMLAttributes } from 'react'; import style from './Iframe.module.css'; -import { s } from './s'; -import { useS } from './useS'; +import { s } from './s.js'; +import { useS } from './useS.js'; export const Iframe = observer, HTMLIFrameElement>>(function Iframe(props) { const styles = useS(style); diff --git a/webapp/packages/core-blocks/src/InfoItem.tsx b/webapp/packages/core-blocks/src/InfoItem.tsx index 36f3bc5af5..f0039e961a 100644 --- a/webapp/packages/core-blocks/src/InfoItem.tsx +++ b/webapp/packages/core-blocks/src/InfoItem.tsx @@ -9,11 +9,11 @@ import { observer } from 'mobx-react-lite'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import { IconOrImage } from './IconOrImage'; +import { IconOrImage } from './IconOrImage.js'; import style from './InfoItem.module.css'; -import { useTranslate } from './localization/useTranslate'; -import { s } from './s'; -import { useS } from './useS'; +import { useTranslate } from './localization/useTranslate.js'; +import { s } from './s.js'; +import { useS } from './useS.js'; export interface IInfoItem { info: TLocalizationToken; diff --git a/webapp/packages/core-blocks/src/ItemList/ItemList.tsx b/webapp/packages/core-blocks/src/ItemList/ItemList.tsx index 4844796fc7..07d96654ca 100644 --- a/webapp/packages/core-blocks/src/ItemList/ItemList.tsx +++ b/webapp/packages/core-blocks/src/ItemList/ItemList.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ItemList.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/ItemList/ItemListSearch.tsx b/webapp/packages/core-blocks/src/ItemList/ItemListSearch.tsx index 1ed6fb344a..07b82d3079 100644 --- a/webapp/packages/core-blocks/src/ItemList/ItemListSearch.tsx +++ b/webapp/packages/core-blocks/src/ItemList/ItemListSearch.tsx @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Container } from '../Containers/Container'; -import { Filter } from '../FormControls/Filter'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useS } from '../useS'; +import { Container } from '../Containers/Container.js'; +import { Filter } from '../FormControls/Filter.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ItemList.module.css'; interface IProps { diff --git a/webapp/packages/core-blocks/src/ItemList/ListItem.tsx b/webapp/packages/core-blocks/src/ItemList/ListItem.tsx index 4827177855..e4e44ce740 100644 --- a/webapp/packages/core-blocks/src/ItemList/ListItem.tsx +++ b/webapp/packages/core-blocks/src/ItemList/ListItem.tsx @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Clickable } from '../Clickable'; -import { s } from '../s'; -import { useS } from '../useS'; +import { Clickable } from '../Clickable.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ItemList.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/ItemList/ListItemDescription.tsx b/webapp/packages/core-blocks/src/ItemList/ListItemDescription.tsx index 9c29e2a8ff..fdcc3f1f87 100644 --- a/webapp/packages/core-blocks/src/ItemList/ListItemDescription.tsx +++ b/webapp/packages/core-blocks/src/ItemList/ListItemDescription.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ItemList.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/ItemList/ListItemIcon.tsx b/webapp/packages/core-blocks/src/ItemList/ListItemIcon.tsx index 740a1cdc19..f176f86643 100644 --- a/webapp/packages/core-blocks/src/ItemList/ListItemIcon.tsx +++ b/webapp/packages/core-blocks/src/ItemList/ListItemIcon.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ItemList.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/ItemList/ListItemName.tsx b/webapp/packages/core-blocks/src/ItemList/ListItemName.tsx index 98ddbbc9e1..aea29090d9 100644 --- a/webapp/packages/core-blocks/src/ItemList/ListItemName.tsx +++ b/webapp/packages/core-blocks/src/ItemList/ListItemName.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ItemList.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Link.test.tsx b/webapp/packages/core-blocks/src/Link.test.tsx index 85dd0708a2..35853decc7 100644 --- a/webapp/packages/core-blocks/src/Link.test.tsx +++ b/webapp/packages/core-blocks/src/Link.test.tsx @@ -10,7 +10,7 @@ import { cleanup, fireEvent, queryByAttribute, waitFor } from '@testing-library/ import { createApp, renderInApp } from '@cloudbeaver/tests-runner'; -import { Link } from './Link'; +import { Link } from './Link.js'; const app = createApp(); diff --git a/webapp/packages/core-blocks/src/Link.tsx b/webapp/packages/core-blocks/src/Link.tsx index 330a578577..c1c8c581b5 100644 --- a/webapp/packages/core-blocks/src/Link.tsx +++ b/webapp/packages/core-blocks/src/Link.tsx @@ -7,10 +7,10 @@ */ import { observer } from 'mobx-react-lite'; -import { IconOrImage } from './IconOrImage'; +import { IconOrImage } from './IconOrImage.js'; import style from './Link.module.css'; -import { s } from './s'; -import { useS } from './useS'; +import { s } from './s.js'; +import { useS } from './useS.js'; interface Props extends React.AnchorHTMLAttributes { wrapper?: boolean; diff --git a/webapp/packages/core-blocks/src/Loader/Loader.tsx b/webapp/packages/core-blocks/src/Loader/Loader.tsx index fa7afe68fe..cff21f2036 100644 --- a/webapp/packages/core-blocks/src/Loader/Loader.tsx +++ b/webapp/packages/core-blocks/src/Loader/Loader.tsx @@ -9,17 +9,17 @@ import { observable } from 'mobx'; import { observer } from 'mobx-react-lite'; import { Suspense, useContext, useEffect, useRef, useState } from 'react'; -import { ILoadableState, uuid } from '@cloudbeaver/core-utils'; - -import { Button } from '../Button'; -import { ErrorBoundary } from '../ErrorBoundary'; -import { ExceptionMessage } from '../ExceptionMessage'; -import { Translate } from '../localization/Translate'; -import { s } from '../s'; -import { StaticImage } from '../StaticImage'; -import { useS } from '../useS'; +import { type ILoadableState, uuid } from '@cloudbeaver/core-utils'; + +import { Button } from '../Button.js'; +import { ErrorBoundary } from '../ErrorBoundary.js'; +import { ExceptionMessage } from '../ExceptionMessage.js'; +import { Translate } from '../localization/Translate.js'; +import { s } from '../s.js'; +import { StaticImage } from '../StaticImage.js'; +import { useS } from '../useS.js'; import styles from './Loader.module.css'; -import { ILoaderContext, LoaderContext } from './LoaderContext'; +import { type ILoaderContext, LoaderContext } from './LoaderContext.js'; type LoaderState = | ILoadableState @@ -101,7 +101,7 @@ export const Loader = observer(function Loader({ state = Array.isArray(state) ? state : [state]; for (let i = 0; i < state.length; i++) { - const element = state[i]; + const element = state[i]!; if ('isLoaded' in element && 'isLoading' in element) { if (i === 0 && loadingUndefined) { diff --git a/webapp/packages/core-blocks/src/Loader/useAutoLoad.ts b/webapp/packages/core-blocks/src/Loader/useAutoLoad.ts index b73b5985fa..6a52a3dc5c 100644 --- a/webapp/packages/core-blocks/src/Loader/useAutoLoad.ts +++ b/webapp/packages/core-blocks/src/Loader/useAutoLoad.ts @@ -9,7 +9,7 @@ import { useEffect, useState } from 'react'; import { type ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; -import { getComputed } from '../getComputed'; +import { getComputed } from '../getComputed.js'; export function useAutoLoad( component: { name: string }, @@ -68,6 +68,6 @@ export function useAutoLoad( } useEffect(() => { - obj[loadFunctionName](); + obj[loadFunctionName]!(); }); } diff --git a/webapp/packages/core-blocks/src/Menu/Menu.tsx b/webapp/packages/core-blocks/src/Menu/Menu.tsx index 5f54cdadd8..810b4ca9bb 100644 --- a/webapp/packages/core-blocks/src/Menu/Menu.tsx +++ b/webapp/packages/core-blocks/src/Menu/Menu.tsx @@ -7,17 +7,17 @@ */ import { observer } from 'mobx-react-lite'; import React, { forwardRef, useLayoutEffect, useRef, useState } from 'react'; -import { MenuButton, MenuInitialState, useMenuState } from 'reakit/Menu'; +import { MenuButton, type MenuInitialState, useMenuState } from 'reakit'; -import { ErrorBoundary } from '../ErrorBoundary'; -import { s } from '../s'; -import { useCombinedRef } from '../useCombinedRef'; -import { useObjectRef } from '../useObjectRef'; -import { useS } from '../useS'; +import { ErrorBoundary } from '../ErrorBoundary.js'; +import { s } from '../s.js'; +import { useCombinedRef } from '../useCombinedRef.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useS } from '../useS.js'; import style from './Menu.module.css'; -import { MenuPanel } from './MenuPanel'; -import { IMenuState, MenuStateContext } from './MenuStateContext'; -import type { IMouseContextMenu } from './useMouseContextMenu'; +import { MenuPanel } from './MenuPanel.js'; +import { type IMenuState, MenuStateContext } from './MenuStateContext.js'; +import type { IMouseContextMenu } from './useMouseContextMenu.js'; interface IMenuProps extends React.ButtonHTMLAttributes { mouseContextMenu?: IMouseContextMenu; diff --git a/webapp/packages/core-blocks/src/Menu/MenuBarSmallItem.tsx b/webapp/packages/core-blocks/src/Menu/MenuBarSmallItem.tsx index 94f11fadff..a8212f3c04 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuBarSmallItem.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuBarSmallItem.tsx @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ButtonProps } from 'reakit/ts'; +import type { ButtonProps } from 'reakit'; -import { IconButton } from '../IconButton'; -import { s } from '../s'; -import { useS } from '../useS'; +import { IconButton } from '../IconButton.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import moduleStyles from './MenuBarSmallItem.module.css'; interface Props extends Omit { diff --git a/webapp/packages/core-blocks/src/Menu/MenuEmptyItem.tsx b/webapp/packages/core-blocks/src/Menu/MenuEmptyItem.tsx index a0d6c650cd..3d46af0a2a 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuEmptyItem.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuEmptyItem.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import { useTranslate } from '../localization/useTranslate'; -import { MenuItem } from './MenuItem'; -import { MenuItemElement } from './MenuItemElement'; +import { useTranslate } from '../localization/useTranslate.js'; +import { MenuItem } from './MenuItem.js'; +import { MenuItemElement } from './MenuItemElement.js'; export const MenuEmptyItem = observer(function MenuEmptyItem() { const translate = useTranslate(); diff --git a/webapp/packages/core-blocks/src/Menu/MenuItem.tsx b/webapp/packages/core-blocks/src/Menu/MenuItem.tsx index 9d84f91364..792342ad92 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuItem.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuItem.tsx @@ -7,15 +7,15 @@ */ import { observer } from 'mobx-react-lite'; import React, { useContext } from 'react'; -import { MenuItem as ReakitMenuItem } from 'reakit/Menu'; -import type { CompositeItemOptions } from 'reakit/ts'; +import { MenuItem as ReakitMenuItem } from 'reakit'; +import type { CompositeItemOptions } from 'reakit'; -import { s } from '../s'; -import { useCombinedHandler } from '../useCombinedHandler'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useCombinedHandler } from '../useCombinedHandler.js'; +import { useS } from '../useS.js'; import style from './MenuItem.module.css'; -import { MenuStateContext } from './MenuStateContext'; -import type { ReakitProxyComponent, ReakitProxyComponentOptions } from './ReakitProxyComponent'; +import { MenuStateContext } from './MenuStateContext.js'; +import type { ReakitProxyComponent, ReakitProxyComponentOptions } from './ReakitProxyComponent.js'; export type MenuItemOptions = CompositeItemOptions & { selected?: boolean; diff --git a/webapp/packages/core-blocks/src/Menu/MenuItemCheckbox.tsx b/webapp/packages/core-blocks/src/Menu/MenuItemCheckbox.tsx index 7bac23a50f..fa17c8c57d 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuItemCheckbox.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuItemCheckbox.tsx @@ -7,14 +7,14 @@ */ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { MenuItemOptions, MenuItemCheckbox as ReakitMenuItemCheckbox } from 'reakit/Menu'; -import type { CheckboxOptions } from 'reakit/ts'; +import { type MenuItemOptions, MenuItemCheckbox as ReakitMenuItemCheckbox } from 'reakit'; +import type { CheckboxOptions } from 'reakit'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './MenuItem.module.css'; -import { MenuStateContext } from './MenuStateContext'; -import type { ReakitProxyComponent, ReakitProxyComponentOptions } from './ReakitProxyComponent'; +import { MenuStateContext } from './MenuStateContext.js'; +import type { ReakitProxyComponent, ReakitProxyComponentOptions } from './ReakitProxyComponent.js'; type Options = CheckboxOptions & MenuItemOptions; diff --git a/webapp/packages/core-blocks/src/Menu/MenuItemElement.tsx b/webapp/packages/core-blocks/src/Menu/MenuItemElement.tsx index e4331906f7..88aa1ec6bd 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuItemElement.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuItemElement.tsx @@ -7,13 +7,13 @@ */ import { observer } from 'mobx-react-lite'; -import { Icon } from '../Icon'; -import { IconOrImage } from '../IconOrImage'; -import { Loader } from '../Loader/Loader'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useS } from '../useS'; -import { useStateDelay } from '../useStateDelay'; +import { Icon } from '../Icon.js'; +import { IconOrImage } from '../IconOrImage.js'; +import { Loader } from '../Loader/Loader.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { useStateDelay } from '../useStateDelay.js'; import style from './MenuItemElement.module.css'; interface IMenuItemElementProps { diff --git a/webapp/packages/core-blocks/src/Menu/MenuItemRadio.tsx b/webapp/packages/core-blocks/src/Menu/MenuItemRadio.tsx index e149714ed9..e8dcde589a 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuItemRadio.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuItemRadio.tsx @@ -7,14 +7,14 @@ */ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { MenuItemOptions, MenuItemRadio as ReakitMenuItemRadio } from 'reakit/Menu'; -import type { RadioOptions } from 'reakit/ts'; +import { type MenuItemOptions, MenuItemRadio as ReakitMenuItemRadio } from 'reakit'; +import type { RadioOptions } from 'reakit'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './MenuItem.module.css'; -import { MenuStateContext } from './MenuStateContext'; -import type { ReakitProxyComponent, ReakitProxyComponentOptions } from './ReakitProxyComponent'; +import { MenuStateContext } from './MenuStateContext.js'; +import type { ReakitProxyComponent, ReakitProxyComponentOptions } from './ReakitProxyComponent.js'; type Options = RadioOptions & MenuItemOptions; diff --git a/webapp/packages/core-blocks/src/Menu/MenuPanel.tsx b/webapp/packages/core-blocks/src/Menu/MenuPanel.tsx index 44afd6b415..1c915a19f2 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuPanel.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuPanel.tsx @@ -7,13 +7,13 @@ */ import { observer } from 'mobx-react-lite'; import { Children, forwardRef } from 'react'; -import { Menu, MenuStateReturn } from 'reakit/Menu'; +import { Menu, type MenuStateReturn } from 'reakit'; -import { ErrorBoundary } from '../ErrorBoundary'; -import { getComputed } from '../getComputed'; -import { s } from '../s'; -import { useS } from '../useS'; -import { MenuEmptyItem } from './MenuEmptyItem'; +import { ErrorBoundary } from '../ErrorBoundary.js'; +import { getComputed } from '../getComputed.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { MenuEmptyItem } from './MenuEmptyItem.js'; import style from './MenuPanel.module.css'; export interface IMenuPanelProps { diff --git a/webapp/packages/core-blocks/src/Menu/MenuSeparator.tsx b/webapp/packages/core-blocks/src/Menu/MenuSeparator.tsx index 75fb0b69b4..d0112c25d5 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuSeparator.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuSeparator.tsx @@ -5,13 +5,13 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { MenuSeparator as MenuSeparatorBase } from 'reakit/Menu'; -import type { SeparatorOptions } from 'reakit/ts'; +import { MenuSeparator as MenuSeparatorBase } from 'reakit'; +import type { SeparatorOptions } from 'reakit'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './MenuSeparator.module.css'; -import type { ReakitProxyComponentOptions } from './ReakitProxyComponent'; +import type { ReakitProxyComponentOptions } from './ReakitProxyComponent.js'; export const MenuSeparator = function MenuSeparator({ className, ...props }: ReakitProxyComponentOptions<'hr', SeparatorOptions>) { const styles = useS(style); diff --git a/webapp/packages/core-blocks/src/Menu/MenuStateContext.ts b/webapp/packages/core-blocks/src/Menu/MenuStateContext.ts index 6a766d849d..8b3280b6b3 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuStateContext.ts +++ b/webapp/packages/core-blocks/src/Menu/MenuStateContext.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { createContext } from 'react'; -import type { MenuStateReturn } from 'reakit/ts'; +import type { MenuStateReturn } from 'reakit'; export type IMenuState = MenuStateReturn; diff --git a/webapp/packages/core-blocks/src/Menu/useMouseContextMenu.ts b/webapp/packages/core-blocks/src/Menu/useMouseContextMenu.ts index dfe7d793d8..d4e67db350 100644 --- a/webapp/packages/core-blocks/src/Menu/useMouseContextMenu.ts +++ b/webapp/packages/core-blocks/src/Menu/useMouseContextMenu.ts @@ -7,7 +7,7 @@ */ import { observable } from 'mobx'; -import { useObservableRef } from '../useObservableRef'; +import { useObservableRef } from '../useObservableRef.js'; export interface IContextMenuPosition { x: number; diff --git a/webapp/packages/core-blocks/src/MenuPanel/MenuPanelItem.tsx b/webapp/packages/core-blocks/src/MenuPanel/MenuPanelItem.tsx index ac1365de14..b28c284059 100644 --- a/webapp/packages/core-blocks/src/MenuPanel/MenuPanelItem.tsx +++ b/webapp/packages/core-blocks/src/MenuPanel/MenuPanelItem.tsx @@ -9,14 +9,14 @@ import { observer } from 'mobx-react-lite'; import type { IMenuItem } from '@cloudbeaver/core-dialogs'; -import { Checkbox } from '../FormControls/Checkboxes/Checkbox'; -import { Radio } from '../FormControls/Radio'; -import { Icon } from '../Icon'; -import { IconOrImage } from '../IconOrImage'; -import { Loader } from '../Loader/Loader'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useS } from '../useS'; +import { Checkbox } from '../FormControls/Checkboxes/Checkbox.js'; +import { Radio } from '../FormControls/Radio.js'; +import { Icon } from '../Icon.js'; +import { IconOrImage } from '../IconOrImage.js'; +import { Loader } from '../Loader/Loader.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import MenuPanelItemAndTriggerStyles from './shared/MenuPanelItemAndTrigger.module.css'; interface MenuPanelItemProps { diff --git a/webapp/packages/core-blocks/src/MenuPanel/MenuTrigger.tsx b/webapp/packages/core-blocks/src/MenuPanel/MenuTrigger.tsx index 1e9509ba41..702477bbb6 100644 --- a/webapp/packages/core-blocks/src/MenuPanel/MenuTrigger.tsx +++ b/webapp/packages/core-blocks/src/MenuPanel/MenuTrigger.tsx @@ -7,15 +7,15 @@ */ import { computed } from 'mobx'; import { observer } from 'mobx-react-lite'; -import React, { ButtonHTMLAttributes, forwardRef, useCallback, useEffect, useMemo } from 'react'; -import { Menu, MenuButton, MenuInitialState, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuStateReturn, useMenuState } from 'reakit/Menu'; +import React, { type ButtonHTMLAttributes, forwardRef, useCallback, useEffect, useMemo } from 'react'; +import { Menu, MenuButton, type MenuInitialState, MenuItem, MenuItemCheckbox, MenuItemRadio, type MenuStateReturn, useMenuState } from 'reakit'; import type { IMenuItem, IMenuPanel } from '@cloudbeaver/core-dialogs'; -import { s } from '../s'; -import { useObjectRef } from '../useObjectRef'; -import { useS } from '../useS'; -import { MenuPanelItem } from './MenuPanelItem'; +import { s } from '../s.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useS } from '../useS.js'; +import { MenuPanelItem } from './MenuPanelItem.js'; import MenuPanelItemAndTriggerStyles from './shared/MenuPanelItemAndTrigger.module.css'; export type MenuState = MenuStateReturn; diff --git a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx index cd1d67d4b2..019ff9db96 100644 --- a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx +++ b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx @@ -10,14 +10,14 @@ import { useCallback } from 'react'; import type { ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; -import { getLayoutProps } from '../../Containers/filterLayoutFakeProps'; -import type { ILayoutSizeProps } from '../../Containers/ILayoutSizeProps'; +import { getLayoutProps } from '../../Containers/filterLayoutFakeProps.js'; +import type { ILayoutSizeProps } from '../../Containers/ILayoutSizeProps.js'; import elementsSizeStyles from '../../Containers/shared/ElementsSize.module.css'; -import { useTranslate } from '../../localization/useTranslate'; -import { s } from '../../s'; -import { TextPlaceholder } from '../../TextPlaceholder'; -import { useS } from '../../useS'; -import { RenderField } from './RenderField'; +import { useTranslate } from '../../localization/useTranslate.js'; +import { s } from '../../s.js'; +import { TextPlaceholder } from '../../TextPlaceholder.js'; +import { useS } from '../../useS.js'; +import { RenderField } from './RenderField.js'; export interface ObjectPropertyFormProps extends ILayoutSizeProps { properties: ReadonlyArray; diff --git a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoFormLoader.ts b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoFormLoader.ts index 6f4b50d9ba..a088eb5a59 100644 --- a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoFormLoader.ts +++ b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoFormLoader.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { importLazyComponent } from '../../importLazyComponent'; +import { importLazyComponent } from '../../importLazyComponent.js'; -export const ObjectPropertyInfoForm = importLazyComponent(() => import('./ObjectPropertyInfoForm').then(m => m.ObjectPropertyInfoForm)); +export const ObjectPropertyInfoForm = importLazyComponent(() => import('./ObjectPropertyInfoForm.js').then(m => m.ObjectPropertyInfoForm)); diff --git a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/RenderField.tsx b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/RenderField.tsx index 0d82228881..f3560b3ee2 100644 --- a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/RenderField.tsx +++ b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/RenderField.tsx @@ -10,15 +10,15 @@ import { observer } from 'mobx-react-lite'; import { getObjectPropertyType, getObjectPropertyValueType, type ObjectPropertyInfo, type ObjectPropertyType } from '@cloudbeaver/core-sdk'; import { removeMetadataFromDataURL } from '@cloudbeaver/core-utils'; -import { FieldCheckbox } from '../../FormControls/Checkboxes/FieldCheckbox'; -import { Combobox } from '../../FormControls/Combobox'; -import { FormFieldDescription } from '../../FormControls/FormFieldDescription'; -import { InputField } from '../../FormControls/InputField/InputField'; -import { InputFileTextContent } from '../../FormControls/InputFileTextContent'; -import { isControlPresented } from '../../FormControls/isControlPresented'; -import { Textarea } from '../../FormControls/Textarea'; -import { Link } from '../../Link'; -import { useTranslate } from '../../localization/useTranslate'; +import { FieldCheckbox } from '../../FormControls/Checkboxes/FieldCheckbox.js'; +import { Combobox } from '../../FormControls/Combobox.js'; +import { FormFieldDescription } from '../../FormControls/FormFieldDescription.js'; +import { InputField } from '../../FormControls/InputField/InputField.js'; +import { InputFileTextContent } from '../../FormControls/InputFileTextContent.js'; +import { isControlPresented } from '../../FormControls/isControlPresented.js'; +import { Textarea } from '../../FormControls/Textarea.js'; +import { Link } from '../../Link.js'; +import { useTranslate } from '../../localization/useTranslate.js'; const RESERVED_KEYWORDS = ['no', 'off', 'new-password']; diff --git a/webapp/packages/core-blocks/src/ObjectPropertyInfo/useObjectPropertyCategories.ts b/webapp/packages/core-blocks/src/ObjectPropertyInfo/useObjectPropertyCategories.ts index a84d122c42..4aa384980d 100644 --- a/webapp/packages/core-blocks/src/ObjectPropertyInfo/useObjectPropertyCategories.ts +++ b/webapp/packages/core-blocks/src/ObjectPropertyInfo/useObjectPropertyCategories.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { computed, IComputedValue } from 'mobx'; +import { computed, type IComputedValue } from 'mobx'; import { useMemo } from 'react'; import type { ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; diff --git a/webapp/packages/core-blocks/src/Overlay/Overlay.tsx b/webapp/packages/core-blocks/src/Overlay/Overlay.tsx index 2bbef62085..1eb8841c61 100644 --- a/webapp/packages/core-blocks/src/Overlay/Overlay.tsx +++ b/webapp/packages/core-blocks/src/Overlay/Overlay.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './Overlay.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Overlay/OverlayActions.tsx b/webapp/packages/core-blocks/src/Overlay/OverlayActions.tsx index 6eeba4f139..bbcd7c881c 100644 --- a/webapp/packages/core-blocks/src/Overlay/OverlayActions.tsx +++ b/webapp/packages/core-blocks/src/Overlay/OverlayActions.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './OverlayActions.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Overlay/OverlayHeader.tsx b/webapp/packages/core-blocks/src/Overlay/OverlayHeader.tsx index 15d8ff0b07..00ac69ddec 100644 --- a/webapp/packages/core-blocks/src/Overlay/OverlayHeader.tsx +++ b/webapp/packages/core-blocks/src/Overlay/OverlayHeader.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './OverlayHeader.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Overlay/OverlayHeaderIcon.tsx b/webapp/packages/core-blocks/src/Overlay/OverlayHeaderIcon.tsx index 1b65e1daed..54543c4827 100644 --- a/webapp/packages/core-blocks/src/Overlay/OverlayHeaderIcon.tsx +++ b/webapp/packages/core-blocks/src/Overlay/OverlayHeaderIcon.tsx @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { IconOrImage } from '../IconOrImage'; -import { s } from '../s'; -import { useS } from '../useS'; +import { IconOrImage } from '../IconOrImage.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './OverlayHeaderIcon.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Overlay/OverlayHeaderSubTitle.tsx b/webapp/packages/core-blocks/src/Overlay/OverlayHeaderSubTitle.tsx index fe96b61494..b07ddf80d3 100644 --- a/webapp/packages/core-blocks/src/Overlay/OverlayHeaderSubTitle.tsx +++ b/webapp/packages/core-blocks/src/Overlay/OverlayHeaderSubTitle.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './OverlayHeaderSubTitle.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Overlay/OverlayHeaderTitle.tsx b/webapp/packages/core-blocks/src/Overlay/OverlayHeaderTitle.tsx index b3542db984..4b8572bbaf 100644 --- a/webapp/packages/core-blocks/src/Overlay/OverlayHeaderTitle.tsx +++ b/webapp/packages/core-blocks/src/Overlay/OverlayHeaderTitle.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './OverlayHeaderTitle.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Overlay/OverlayMessage.tsx b/webapp/packages/core-blocks/src/Overlay/OverlayMessage.tsx index 94906aeda4..651988f761 100644 --- a/webapp/packages/core-blocks/src/Overlay/OverlayMessage.tsx +++ b/webapp/packages/core-blocks/src/Overlay/OverlayMessage.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './OverlayMessage.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Placeholder/Placeholder.tsx b/webapp/packages/core-blocks/src/Placeholder/Placeholder.tsx index 293068a1f6..8e6ff55385 100644 --- a/webapp/packages/core-blocks/src/Placeholder/Placeholder.tsx +++ b/webapp/packages/core-blocks/src/Placeholder/Placeholder.tsx @@ -9,8 +9,8 @@ import { observer } from 'mobx-react-lite'; import { isDefined } from '@cloudbeaver/core-utils'; -import { useAutoLoad } from '../Loader/useAutoLoad'; -import type { PlaceholderContainer, PlaceholderElement } from './PlaceholderContainer'; +import { useAutoLoad } from '../Loader/useAutoLoad.js'; +import type { PlaceholderContainer, PlaceholderElement } from './PlaceholderContainer.js'; type Props> = T & { container: PlaceholderContainer; diff --git a/webapp/packages/core-blocks/src/Placeholder/PlaceholderContainer.ts b/webapp/packages/core-blocks/src/Placeholder/PlaceholderContainer.ts index 792d8c0b5c..7b7bf70d4a 100644 --- a/webapp/packages/core-blocks/src/Placeholder/PlaceholderContainer.ts +++ b/webapp/packages/core-blocks/src/Placeholder/PlaceholderContainer.ts @@ -7,7 +7,7 @@ */ import { observable } from 'mobx'; -import { ILoadableState, uuid } from '@cloudbeaver/core-utils'; +import { type ILoadableState, uuid } from '@cloudbeaver/core-utils'; export type PlaceholderComponent = Record> = React.FunctionComponent; diff --git a/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx b/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx index 47b3ae23f9..4f771a7a79 100644 --- a/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx +++ b/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx @@ -9,20 +9,20 @@ import { computed } from 'mobx'; import { observer } from 'mobx-react-lite'; import { useCallback, useMemo, useState } from 'react'; -import { Button } from '../Button'; +import { Button } from '../Button.js'; import ButtonStyles from '../Button.module.css'; -import { Filter } from '../FormControls/Filter'; +import { Filter } from '../FormControls/Filter.js'; import InputFieldStyles from '../FormControls/InputField/InputField.module.css'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { SContext, StyleRegistry } from '../SContext'; -import { useObjectRef } from '../useObjectRef'; -import { useS } from '../useS'; -import type { IProperty } from './IProperty'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { SContext, type StyleRegistry } from '../SContext.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useS } from '../useS.js'; +import type { IProperty } from './IProperty.js'; import styles from './PropertiesTable.module.css'; import PropertiesTableAddButtonStyles from './PropertiesTableAddButtonStyles.module.css'; import PropertiesTableInputStyles from './PropertiesTableInputStyles.module.css'; -import { PropertyItem } from './PropertyItem'; +import { PropertyItem } from './PropertyItem.js'; type PropertiesState = Record; @@ -86,7 +86,7 @@ export const PropertiesTable = observer(function PropertiesTable(props) { const isUnique = properties.filter(({ key }) => key === property.key).length === 1; if (propertiesState[property.key] !== undefined && isUnique) { - propertiesState[key] = propertiesState[property.key]; + propertiesState[key] = propertiesState[property.key]!; // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete propertiesState[property.key]; } diff --git a/webapp/packages/core-blocks/src/PropertiesTable/PropertyItem.tsx b/webapp/packages/core-blocks/src/PropertiesTable/PropertyItem.tsx index 594c1e4602..fb38afd711 100644 --- a/webapp/packages/core-blocks/src/PropertiesTable/PropertyItem.tsx +++ b/webapp/packages/core-blocks/src/PropertiesTable/PropertyItem.tsx @@ -10,15 +10,15 @@ import { useCallback, useLayoutEffect, useRef, useState } from 'react'; import { isNotNullDefined } from '@cloudbeaver/core-utils'; -import { ShadowInput } from '../FormControls/ShadowInput'; -import { Icon } from '../Icon'; -import { IconOrImage } from '../IconOrImage'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useS } from '../useS'; -import type { IProperty } from './IProperty'; +import { ShadowInput } from '../FormControls/ShadowInput.js'; +import { Icon } from '../Icon.js'; +import { IconOrImage } from '../IconOrImage.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import type { IProperty } from './IProperty.js'; import classes from './PropertyItem.module.css'; -import { PropertyValueSelector } from './PropertyValueSelector'; +import { PropertyValueSelector } from './PropertyValueSelector.js'; interface Props { property: IProperty; diff --git a/webapp/packages/core-blocks/src/PropertiesTable/PropertyValueSelector.tsx b/webapp/packages/core-blocks/src/PropertiesTable/PropertyValueSelector.tsx index e48c4c7033..85d264caef 100644 --- a/webapp/packages/core-blocks/src/PropertiesTable/PropertyValueSelector.tsx +++ b/webapp/packages/core-blocks/src/PropertiesTable/PropertyValueSelector.tsx @@ -7,11 +7,11 @@ */ import { observer } from 'mobx-react-lite'; import { useCallback, useEffect, useRef } from 'react'; -import { Menu, MenuButton, MenuItem, useMenuState } from 'reakit/Menu'; +import { Menu, MenuButton, MenuItem, useMenuState } from 'reakit'; -import { BaseDropdownStyles } from '..'; -import { s } from '../s'; -import { useS } from '../useS'; +import { BaseDropdownStyles } from '../index.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import classes from './PropertyValueSelector.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/ResourcesHooks/useOffsetPagination.ts b/webapp/packages/core-blocks/src/ResourcesHooks/useOffsetPagination.ts index 9d1365325b..fd41e8c75a 100644 --- a/webapp/packages/core-blocks/src/ResourcesHooks/useOffsetPagination.ts +++ b/webapp/packages/core-blocks/src/ResourcesHooks/useOffsetPagination.ts @@ -16,15 +16,15 @@ import { CachedResourceOffsetPageListKey, CachedResourceOffsetPageTargetKey, getNextPageOffset, - ICachedResourceOffsetPageOptions, + type ICachedResourceOffsetPageOptions, isResourceAlias, - ResourceKey, + type ResourceKey, ResourceKeyAlias, ResourceKeyList, ResourceKeyListAlias, } from '@cloudbeaver/core-resource'; -import { useObservableRef } from '../useObservableRef'; +import { useObservableRef } from '../useObservableRef.js'; interface IOptions> { key: TKey; diff --git a/webapp/packages/core-blocks/src/ResourcesHooks/useResource.ts b/webapp/packages/core-blocks/src/ResourcesHooks/useResource.ts index 2ea9352bfe..14b42e00d7 100644 --- a/webapp/packages/core-blocks/src/ResourcesHooks/useResource.ts +++ b/webapp/packages/core-blocks/src/ResourcesHooks/useResource.ts @@ -8,32 +8,32 @@ import { action, comparer, computed, observable, reaction, toJS, untracked } from 'mobx'; import { useContext, useDeferredValue, useEffect, useState } from 'react'; -import { IServiceConstructor, useService } from '@cloudbeaver/core-di'; +import { type IServiceConstructor, useService } from '@cloudbeaver/core-di'; import { CachedDataResource, - CachedDataResourceGetter, + type CachedDataResourceGetter, CachedMapResource, - CachedMapResourceGetter, - CachedMapResourceListGetter, - CachedMapResourceLoader, - CachedMapResourceValue, - CachedResourceContext, - CachedResourceData, - CachedResourceKey, - IResource, + type CachedMapResourceGetter, + type CachedMapResourceListGetter, + type CachedMapResourceLoader, + type CachedMapResourceValue, + type CachedResourceContext, + type CachedResourceData, + type CachedResourceKey, + type IResource, isResourceKeyList, isResourceKeyListAlias, Resource, - ResourceKey, + type ResourceKey, ResourceKeyList, ResourceKeyListAlias, } from '@cloudbeaver/core-resource'; -import { ILoadableState, isArraysEqual, isContainsException, LoadingError } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isArraysEqual, isContainsException, LoadingError } from '@cloudbeaver/core-utils'; -import { ErrorContext } from '../ErrorContext'; -import { getComputed } from '../getComputed'; -import { useObjectRef } from '../useObjectRef'; -import { useObservableRef } from '../useObservableRef'; +import { ErrorContext } from '../ErrorContext.js'; +import { getComputed } from '../getComputed.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useObservableRef } from '../useObservableRef.js'; export interface ResourceKeyWithIncludes { readonly key: TKey | null; diff --git a/webapp/packages/core-blocks/src/Slide/SlideBox.tsx b/webapp/packages/core-blocks/src/Slide/SlideBox.tsx index b4f6ce0db7..85d9210ab6 100644 --- a/webapp/packages/core-blocks/src/Slide/SlideBox.tsx +++ b/webapp/packages/core-blocks/src/Slide/SlideBox.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useEffect, useRef } from 'react'; -import { s, useS } from '../index'; +import { s, useS } from '../index.js'; import SlideBoxStyles from './SlideBox.module.css'; import SlideBoxElementStyles from './SlideElement.module.css'; import SlideBoxOverlayStyles from './SlideOverlay.module.css'; diff --git a/webapp/packages/core-blocks/src/Slide/SlideElement.tsx b/webapp/packages/core-blocks/src/Slide/SlideElement.tsx index 18a3cf0a87..0cd567e869 100644 --- a/webapp/packages/core-blocks/src/Slide/SlideElement.tsx +++ b/webapp/packages/core-blocks/src/Slide/SlideElement.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './SlideElement.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Slide/SlideOverlay.tsx b/webapp/packages/core-blocks/src/Slide/SlideOverlay.tsx index 05c49e1c85..dc0b5e8514 100644 --- a/webapp/packages/core-blocks/src/Slide/SlideOverlay.tsx +++ b/webapp/packages/core-blocks/src/Slide/SlideOverlay.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import { Icon } from '../Icon'; -import { s } from '../s'; -import { useS } from '../useS'; +import { Icon } from '../Icon.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './SlideOverlay.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Snackbars/ActionSnackbar.tsx b/webapp/packages/core-blocks/src/Snackbars/ActionSnackbar.tsx index aeae304969..830065148e 100644 --- a/webapp/packages/core-blocks/src/Snackbars/ActionSnackbar.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/ActionSnackbar.tsx @@ -9,13 +9,13 @@ import { observer } from 'mobx-react-lite'; import type { INotificationExtraProps, NotificationComponent } from '@cloudbeaver/core-events'; -import { Button } from '../Button'; -import { useTranslate } from '../localization/useTranslate'; -import { SnackbarBody } from './SnackbarMarkups/SnackbarBody'; -import { SnackbarContent } from './SnackbarMarkups/SnackbarContent'; -import { SnackbarFooter } from './SnackbarMarkups/SnackbarFooter'; -import { SnackbarStatus } from './SnackbarMarkups/SnackbarStatus'; -import { SnackbarWrapper } from './SnackbarMarkups/SnackbarWrapper'; +import { Button } from '../Button.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { SnackbarBody } from './SnackbarMarkups/SnackbarBody.js'; +import { SnackbarContent } from './SnackbarMarkups/SnackbarContent.js'; +import { SnackbarFooter } from './SnackbarMarkups/SnackbarFooter.js'; +import { SnackbarStatus } from './SnackbarMarkups/SnackbarStatus.js'; +import { SnackbarWrapper } from './SnackbarMarkups/SnackbarWrapper.js'; export interface ActionSnackbarProps extends INotificationExtraProps { onAction: () => void; diff --git a/webapp/packages/core-blocks/src/Snackbars/NotificationMark.tsx b/webapp/packages/core-blocks/src/Snackbars/NotificationMark.tsx index 7dde504124..78abdebf3d 100644 --- a/webapp/packages/core-blocks/src/Snackbars/NotificationMark.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/NotificationMark.tsx @@ -9,7 +9,7 @@ import type { HTMLProps } from 'react'; import { ENotificationType } from '@cloudbeaver/core-events'; -import { IconOrImage } from '../IconOrImage'; +import { IconOrImage } from '../IconOrImage.js'; type IconProps = HTMLProps & { type: ENotificationType; diff --git a/webapp/packages/core-blocks/src/Snackbars/ProcessSnackbar.tsx b/webapp/packages/core-blocks/src/Snackbars/ProcessSnackbar.tsx index 796d5912d3..20d79ea863 100644 --- a/webapp/packages/core-blocks/src/Snackbars/ProcessSnackbar.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/ProcessSnackbar.tsx @@ -8,18 +8,18 @@ import { observer } from 'mobx-react-lite'; import { useEffect, useState } from 'react'; -import { ENotificationType, INotificationProcessExtraProps, NotificationComponent } from '@cloudbeaver/core-events'; +import { ENotificationType, type INotificationProcessExtraProps, type NotificationComponent } from '@cloudbeaver/core-events'; -import { Button } from '../Button'; -import { useTranslate } from '../localization/useTranslate'; -import { useActivationDelay } from '../useActivationDelay'; -import { useErrorDetails } from '../useErrorDetails'; -import { useStateDelay } from '../useStateDelay'; -import { SnackbarBody } from './SnackbarMarkups/SnackbarBody'; -import { SnackbarContent } from './SnackbarMarkups/SnackbarContent'; -import { SnackbarFooter } from './SnackbarMarkups/SnackbarFooter'; -import { SnackbarStatus } from './SnackbarMarkups/SnackbarStatus'; -import { SnackbarWrapper } from './SnackbarMarkups/SnackbarWrapper'; +import { Button } from '../Button.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { useActivationDelay } from '../useActivationDelay.js'; +import { useErrorDetails } from '../useErrorDetails.js'; +import { useStateDelay } from '../useStateDelay.js'; +import { SnackbarBody } from './SnackbarMarkups/SnackbarBody.js'; +import { SnackbarContent } from './SnackbarMarkups/SnackbarContent.js'; +import { SnackbarFooter } from './SnackbarMarkups/SnackbarFooter.js'; +import { SnackbarStatus } from './SnackbarMarkups/SnackbarStatus.js'; +import { SnackbarWrapper } from './SnackbarMarkups/SnackbarWrapper.js'; export interface ProcessSnackbarProps extends INotificationProcessExtraProps { closeDelay?: number; diff --git a/webapp/packages/core-blocks/src/Snackbars/Snackbar.tsx b/webapp/packages/core-blocks/src/Snackbars/Snackbar.tsx index cb794b11bf..14e9ffea31 100644 --- a/webapp/packages/core-blocks/src/Snackbars/Snackbar.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/Snackbar.tsx @@ -9,15 +9,15 @@ import { observer } from 'mobx-react-lite'; import type { ENotificationType } from '@cloudbeaver/core-events'; -import { Button } from '../Button'; -import { Loader } from '../Loader/Loader'; -import { useTranslate } from '../localization/useTranslate'; -import { useActivationDelay } from '../useActivationDelay'; -import { SnackbarBody } from './SnackbarMarkups/SnackbarBody'; -import { SnackbarContent } from './SnackbarMarkups/SnackbarContent'; -import { SnackbarFooter } from './SnackbarMarkups/SnackbarFooter'; -import { SnackbarStatus } from './SnackbarMarkups/SnackbarStatus'; -import { SnackbarWrapper } from './SnackbarMarkups/SnackbarWrapper'; +import { Button } from '../Button.js'; +import { Loader } from '../Loader/Loader.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { useActivationDelay } from '../useActivationDelay.js'; +import { SnackbarBody } from './SnackbarMarkups/SnackbarBody.js'; +import { SnackbarContent } from './SnackbarMarkups/SnackbarContent.js'; +import { SnackbarFooter } from './SnackbarMarkups/SnackbarFooter.js'; +import { SnackbarStatus } from './SnackbarMarkups/SnackbarStatus.js'; +import { SnackbarWrapper } from './SnackbarMarkups/SnackbarWrapper.js'; interface SnackbarProps { type: ENotificationType; diff --git a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarBody.tsx b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarBody.tsx index 3e67cac3b2..5983a4ab5b 100644 --- a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarBody.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarBody.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import style from './SnackbarBody.module.css'; interface Props { @@ -18,11 +18,11 @@ export const SnackbarBody: React.FC> = function S const styles = useS(style); return (
-
-

+
+

{title}

-
{children}
+
{children}

); diff --git a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarContent.tsx b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarContent.tsx index 47b6717c2e..df0a568acb 100644 --- a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarContent.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarContent.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import style from './SnackbarContent.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarFooter.tsx b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarFooter.tsx index 33dd688c77..171c99fe72 100644 --- a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarFooter.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarFooter.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import style from './SnackbarFooter.module.css'; interface Props { @@ -20,8 +20,8 @@ export const SnackbarFooter: React.FC> = function return (
- {timeStringFromTimestamp} -
{children}
+ {timeStringFromTimestamp} +
{children}
); }; diff --git a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarStatus.tsx b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarStatus.tsx index db79de40aa..f414f29111 100644 --- a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarStatus.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarStatus.tsx @@ -7,10 +7,10 @@ */ import { ENotificationType } from '@cloudbeaver/core-events'; -import { Loader } from '../../Loader/Loader'; -import { s } from '../../s'; -import { useS } from '../../useS'; -import { NotificationMark } from '../NotificationMark'; +import { Loader } from '../../Loader/Loader.js'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; +import { NotificationMark } from '../NotificationMark.js'; import style from './SnackbarStatus.module.css'; interface SnackbarStatusProps { @@ -22,7 +22,7 @@ export const SnackbarStatus: React.FC = function SnackbarSt const styles = useS(style); return status === ENotificationType.Loading ? (
- +
) : ( diff --git a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarWrapper.tsx b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarWrapper.tsx index 8ff8ab58b1..7e3cbe64ee 100644 --- a/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarWrapper.tsx +++ b/webapp/packages/core-blocks/src/Snackbars/SnackbarMarkups/SnackbarWrapper.tsx @@ -7,10 +7,10 @@ */ import { useEffect, useState } from 'react'; -import { ActionIconButton } from '../../ActionIconButton'; -import { useTranslate } from '../../localization/useTranslate'; -import { s } from '../../s'; -import { useS } from '../../useS'; +import { ActionIconButton } from '../../ActionIconButton.js'; +import { useTranslate } from '../../localization/useTranslate.js'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import style from './SnackbarWrapper.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Split/Pane.tsx b/webapp/packages/core-blocks/src/Split/Pane.tsx index 61b724c653..5738c3cd08 100644 --- a/webapp/packages/core-blocks/src/Split/Pane.tsx +++ b/webapp/packages/core-blocks/src/Split/Pane.tsx @@ -5,13 +5,13 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Pane as BasePane, PaneProps } from 'go-split'; +import { Pane as BasePane, type PaneProps } from 'go-split'; import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './Pane.module.css'; -import { useSplit } from './useSplit'; +import { useSplit } from './useSplit.js'; export const Pane = observer(function Pane({ className, children, ...rest }) { const styles = useS(style); diff --git a/webapp/packages/core-blocks/src/Split/ResizerControls.tsx b/webapp/packages/core-blocks/src/Split/ResizerControls.tsx index e2dc583620..d6f3a63dd4 100644 --- a/webapp/packages/core-blocks/src/Split/ResizerControls.tsx +++ b/webapp/packages/core-blocks/src/Split/ResizerControls.tsx @@ -8,11 +8,11 @@ import { Resizer } from 'go-split'; import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ResizeControls.module.css'; -import { SplitControls } from './SplitControls'; -import { useSplit } from './useSplit'; +import { SplitControls } from './SplitControls.js'; +import { useSplit } from './useSplit.js'; interface ResizerControlsProps { className?: string; diff --git a/webapp/packages/core-blocks/src/Split/Split.tsx b/webapp/packages/core-blocks/src/Split/Split.tsx index 053162d055..865d362f74 100644 --- a/webapp/packages/core-blocks/src/Split/Split.tsx +++ b/webapp/packages/core-blocks/src/Split/Split.tsx @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Split as BaseSplit, SplitProps } from 'go-split'; +import { Split as BaseSplit, type SplitProps } from 'go-split'; import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './Split.module.css'; export type ISplitProps = SplitProps & { diff --git a/webapp/packages/core-blocks/src/Split/SplitControls.tsx b/webapp/packages/core-blocks/src/Split/SplitControls.tsx index b3bed9a82e..ba41fbe559 100644 --- a/webapp/packages/core-blocks/src/Split/SplitControls.tsx +++ b/webapp/packages/core-blocks/src/Split/SplitControls.tsx @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useObjectRef } from '../useObjectRef'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useS } from '../useS.js'; import SplitControlsStyles from './SplitControls.module.css'; -import { useSplit } from './useSplit'; +import { useSplit } from './useSplit.js'; export const SplitControls: React.FC = function SplitControls() { const split = useSplit(); diff --git a/webapp/packages/core-blocks/src/Split/useSplit.ts b/webapp/packages/core-blocks/src/Split/useSplit.ts index 05b63b1feb..217b9f4d91 100644 --- a/webapp/packages/core-blocks/src/Split/useSplit.ts +++ b/webapp/packages/core-blocks/src/Split/useSplit.ts @@ -5,10 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ISplitState, SplitContext, SplitterMode } from 'go-split'; +import { type ISplitState, SplitContext, type SplitterMode } from 'go-split'; import { useContext } from 'react'; -import { useObjectRef } from '../useObjectRef'; +import { useObjectRef } from '../useObjectRef.js'; interface ISplit { state: ISplitState; diff --git a/webapp/packages/core-blocks/src/Split/useSplitUserState.ts b/webapp/packages/core-blocks/src/Split/useSplitUserState.ts index 990812c6a1..dd7f953569 100644 --- a/webapp/packages/core-blocks/src/Split/useSplitUserState.ts +++ b/webapp/packages/core-blocks/src/Split/useSplitUserState.ts @@ -7,8 +7,8 @@ */ import type { SplitProps, SplitterMode } from 'go-split'; -import { useObjectRef } from '../useObjectRef'; -import { useUserData } from '../useUserData'; +import { useObjectRef } from '../useObjectRef.js'; +import { useUserData } from '../useUserData.js'; type SplitState = Pick; diff --git a/webapp/packages/core-blocks/src/StaticImage.tsx b/webapp/packages/core-blocks/src/StaticImage.tsx index 17503b8a5f..ada3d956fd 100644 --- a/webapp/packages/core-blocks/src/StaticImage.tsx +++ b/webapp/packages/core-blocks/src/StaticImage.tsx @@ -7,9 +7,9 @@ */ import { GlobalConstants, isValidUrl } from '@cloudbeaver/core-utils'; -import { s } from './s'; +import { s } from './s.js'; import style from './StaticImage.module.css'; -import { useS } from './useS'; +import { useS } from './useS.js'; interface Props { icon?: string; diff --git a/webapp/packages/core-blocks/src/StatusMessage.test.tsx b/webapp/packages/core-blocks/src/StatusMessage.test.tsx index 595671b669..ce9252c214 100644 --- a/webapp/packages/core-blocks/src/StatusMessage.test.tsx +++ b/webapp/packages/core-blocks/src/StatusMessage.test.tsx @@ -13,7 +13,7 @@ import { ENotificationType } from '@cloudbeaver/core-events'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { createApp, renderInApp } from '@cloudbeaver/tests-runner'; -import { StatusMessage } from './StatusMessage'; +import { StatusMessage } from './StatusMessage.js'; const app = createApp(coreLocalizationManifest, coreDialogsManifest); diff --git a/webapp/packages/core-blocks/src/StatusMessage.tsx b/webapp/packages/core-blocks/src/StatusMessage.tsx index 46fd21c648..e686293c61 100644 --- a/webapp/packages/core-blocks/src/StatusMessage.tsx +++ b/webapp/packages/core-blocks/src/StatusMessage.tsx @@ -9,13 +9,13 @@ import { observer } from 'mobx-react-lite'; import { ENotificationType } from '@cloudbeaver/core-events'; -import { IconOrImage } from './IconOrImage'; -import { Link } from './Link'; -import { useTranslate } from './localization/useTranslate'; -import { s } from './s'; +import { IconOrImage } from './IconOrImage.js'; +import { Link } from './Link.js'; +import { useTranslate } from './localization/useTranslate.js'; +import { s } from './s.js'; import style from './StatusMessage.module.css'; -import { useErrorDetails } from './useErrorDetails'; -import { useS } from './useS'; +import { useErrorDetails } from './useErrorDetails.js'; +import { useS } from './useS.js'; interface Props { message?: string | string[] | null; diff --git a/webapp/packages/core-blocks/src/Table/Table.tsx b/webapp/packages/core-blocks/src/Table/Table.tsx index 7ef638b8d4..3c72c5d6ec 100644 --- a/webapp/packages/core-blocks/src/Table/Table.tsx +++ b/webapp/packages/core-blocks/src/Table/Table.tsx @@ -9,12 +9,12 @@ import { action, computed, observable } from 'mobx'; import { observer } from 'mobx-react-lite'; import { useCallback, useEffect, useState } from 'react'; -import { s } from '../s'; -import { useObjectRef } from '../useObjectRef'; -import { useObservableRef } from '../useObservableRef'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useObservableRef } from '../useObservableRef.js'; +import { useS } from '../useS.js'; import style from './Table.module.css'; -import { ITableContext, ITableState, TableContext } from './TableContext'; +import { type ITableContext, type ITableState, TableContext } from './TableContext.js'; interface Props { keys?: any[]; diff --git a/webapp/packages/core-blocks/src/Table/TableColumnHeader.tsx b/webapp/packages/core-blocks/src/Table/TableColumnHeader.tsx index 3390f6c113..6c54b9af96 100644 --- a/webapp/packages/core-blocks/src/Table/TableColumnHeader.tsx +++ b/webapp/packages/core-blocks/src/Table/TableColumnHeader.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import tableStyles from './Table.module.css'; import style from './TableColumnHeader.module.css'; diff --git a/webapp/packages/core-blocks/src/Table/TableColumnValue.tsx b/webapp/packages/core-blocks/src/Table/TableColumnValue.tsx index ea6b57d0de..a630b7a8ab 100644 --- a/webapp/packages/core-blocks/src/Table/TableColumnValue.tsx +++ b/webapp/packages/core-blocks/src/Table/TableColumnValue.tsx @@ -10,14 +10,14 @@ import { forwardRef, useCallback, useContext } from 'react'; import { EventContext } from '@cloudbeaver/core-events'; -import { s } from '../s'; -import { useObjectRef } from '../useObjectRef'; -import { useS } from '../useS'; -import { EventTableItemExpandFlag } from './EventTableItemExpandFlag'; -import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag'; +import { s } from '../s.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useS } from '../useS.js'; +import { EventTableItemExpandFlag } from './EventTableItemExpandFlag.js'; +import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag.js'; import style from './TableColumnValue.module.css'; -import { TableContext } from './TableContext'; -import { TableItemContext } from './TableItemContext'; +import { TableContext } from './TableContext.js'; +import { TableItemContext } from './TableItemContext.js'; type Props = { align?: 'left' | 'center' | 'right' | 'justify' | 'char'; diff --git a/webapp/packages/core-blocks/src/Table/TableHeader.tsx b/webapp/packages/core-blocks/src/Table/TableHeader.tsx index 0451f419b3..37e990c5c9 100644 --- a/webapp/packages/core-blocks/src/Table/TableHeader.tsx +++ b/webapp/packages/core-blocks/src/Table/TableHeader.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './TableHeader.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Table/TableItem.tsx b/webapp/packages/core-blocks/src/Table/TableItem.tsx index e24db6700f..d35d0a1049 100644 --- a/webapp/packages/core-blocks/src/Table/TableItem.tsx +++ b/webapp/packages/core-blocks/src/Table/TableItem.tsx @@ -10,16 +10,16 @@ import { Children, useCallback, useContext, useMemo } from 'react'; import { EventContext } from '@cloudbeaver/core-events'; -import { getComputed } from '../getComputed'; -import { Loader } from '../Loader/Loader'; -import { s } from '../s'; -import { useObjectRef } from '../useObjectRef'; -import { useS } from '../useS'; -import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag'; +import { getComputed } from '../getComputed.js'; +import { Loader } from '../Loader/Loader.js'; +import { s } from '../s.js'; +import { useObjectRef } from '../useObjectRef.js'; +import { useS } from '../useS.js'; +import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag.js'; import cellStyles from './TableColumnValue.module.css'; -import { TableContext } from './TableContext'; +import { TableContext } from './TableContext.js'; import rowStyles from './TableItem.module.css'; -import { ITableItemContext, TableItemContext } from './TableItemContext'; +import { type ITableItemContext, TableItemContext } from './TableItemContext.js'; export interface TableItemExpandProps { item: T; diff --git a/webapp/packages/core-blocks/src/Table/TableItemExpand.tsx b/webapp/packages/core-blocks/src/Table/TableItemExpand.tsx index 0f768e86c8..de04da756b 100644 --- a/webapp/packages/core-blocks/src/Table/TableItemExpand.tsx +++ b/webapp/packages/core-blocks/src/Table/TableItemExpand.tsx @@ -10,14 +10,14 @@ import { useCallback, useContext } from 'react'; import { EventContext } from '@cloudbeaver/core-events'; -import { Icon } from '../Icon'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useS } from '../useS'; -import { EventTableItemExpandFlag } from './EventTableItemExpandFlag'; -import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag'; -import { TableContext } from './TableContext'; -import { TableItemContext } from './TableItemContext'; +import { Icon } from '../Icon.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { EventTableItemExpandFlag } from './EventTableItemExpandFlag.js'; +import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag.js'; +import { TableContext } from './TableContext.js'; +import { TableItemContext } from './TableItemContext.js'; import style from './TableItemExpand.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Table/TableItemGroup.tsx b/webapp/packages/core-blocks/src/Table/TableItemGroup.tsx index 69dbe636a1..8b99178cb3 100644 --- a/webapp/packages/core-blocks/src/Table/TableItemGroup.tsx +++ b/webapp/packages/core-blocks/src/Table/TableItemGroup.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useState } from 'react'; -import { TableItemGroupContext } from './TableItemGroupContext'; +import { TableItemGroupContext } from './TableItemGroupContext.js'; export interface TableItemGroupProps extends React.PropsWithChildren { expanded?: boolean; diff --git a/webapp/packages/core-blocks/src/Table/TableItemGroupContent.tsx b/webapp/packages/core-blocks/src/Table/TableItemGroupContent.tsx index a545ae4ef7..c1899a8c63 100644 --- a/webapp/packages/core-blocks/src/Table/TableItemGroupContent.tsx +++ b/webapp/packages/core-blocks/src/Table/TableItemGroupContent.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { TableItemGroupContext } from './TableItemGroupContext'; +import { TableItemGroupContext } from './TableItemGroupContext.js'; export interface TableItemGroupContentProps { children?: React.ReactNode | (() => React.ReactNode); diff --git a/webapp/packages/core-blocks/src/Table/TableItemGroupExpand.tsx b/webapp/packages/core-blocks/src/Table/TableItemGroupExpand.tsx index fc659fdd09..d6eeeaa400 100644 --- a/webapp/packages/core-blocks/src/Table/TableItemGroupExpand.tsx +++ b/webapp/packages/core-blocks/src/Table/TableItemGroupExpand.tsx @@ -8,10 +8,10 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { Icon } from '../Icon'; -import { s } from '../s'; -import { useS } from '../useS'; -import { TableItemGroupContext } from './TableItemGroupContext'; +import { Icon } from '../Icon.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { TableItemGroupContext } from './TableItemGroupContext.js'; import classes from './TableItemGroupExpand.module.css'; export interface TableItemGroupExpandProps { diff --git a/webapp/packages/core-blocks/src/Table/TableItemGroupExpandSpace.tsx b/webapp/packages/core-blocks/src/Table/TableItemGroupExpandSpace.tsx index 084f9d58bb..ff4ab36ef2 100644 --- a/webapp/packages/core-blocks/src/Table/TableItemGroupExpandSpace.tsx +++ b/webapp/packages/core-blocks/src/Table/TableItemGroupExpandSpace.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import classes from './TableItemGroupExpand.module.css'; export interface TableItemGroupExpandSpaceProps { diff --git a/webapp/packages/core-blocks/src/Table/TableItemSelect.tsx b/webapp/packages/core-blocks/src/Table/TableItemSelect.tsx index b5a0591466..c4d712b13c 100644 --- a/webapp/packages/core-blocks/src/Table/TableItemSelect.tsx +++ b/webapp/packages/core-blocks/src/Table/TableItemSelect.tsx @@ -10,12 +10,12 @@ import { useContext } from 'react'; import { EventContext } from '@cloudbeaver/core-events'; -import { Checkbox } from '../FormControls/Checkboxes/Checkbox'; -import { s } from '../s'; -import { useS } from '../useS'; -import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag'; -import { TableContext } from './TableContext'; -import { TableItemContext } from './TableItemContext'; +import { Checkbox } from '../FormControls/Checkboxes/Checkbox.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag.js'; +import { TableContext } from './TableContext.js'; +import { TableItemContext } from './TableItemContext.js'; import styles from './TableItemSelect.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Table/TableItemSeparator.tsx b/webapp/packages/core-blocks/src/Table/TableItemSeparator.tsx index 99b60d1e81..8054e03271 100644 --- a/webapp/packages/core-blocks/src/Table/TableItemSeparator.tsx +++ b/webapp/packages/core-blocks/src/Table/TableItemSeparator.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import cellStyles from './TableColumnValue.module.css'; import rowStyles from './TableItem.module.css'; diff --git a/webapp/packages/core-blocks/src/Table/TableSelect.tsx b/webapp/packages/core-blocks/src/Table/TableSelect.tsx index 5feec852e9..d579d85323 100644 --- a/webapp/packages/core-blocks/src/Table/TableSelect.tsx +++ b/webapp/packages/core-blocks/src/Table/TableSelect.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { Checkbox } from '../FormControls/Checkboxes/Checkbox'; -import { useTranslate } from '../localization/useTranslate'; -import { s } from '../s'; -import { useS } from '../useS'; -import { TableContext } from './TableContext'; +import { Checkbox } from '../FormControls/Checkboxes/Checkbox.js'; +import { useTranslate } from '../localization/useTranslate.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { TableContext } from './TableContext.js'; import style from './TableSelect.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Table/TableState.ts b/webapp/packages/core-blocks/src/Table/TableState.ts index 2489d32f3e..6fdbfcf16d 100644 --- a/webapp/packages/core-blocks/src/Table/TableState.ts +++ b/webapp/packages/core-blocks/src/Table/TableState.ts @@ -7,7 +7,7 @@ */ import { action, computed, makeObservable, observable } from 'mobx'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; interface IData { key: Key; diff --git a/webapp/packages/core-blocks/src/Table/useTable.ts b/webapp/packages/core-blocks/src/Table/useTable.ts index 141570b584..e1a83e2f1d 100644 --- a/webapp/packages/core-blocks/src/Table/useTable.ts +++ b/webapp/packages/core-blocks/src/Table/useTable.ts @@ -7,7 +7,7 @@ */ import { useState } from 'react'; -import { TableState } from './TableState'; +import { TableState } from './TableState.js'; export function useTable(): TableState { const [table] = useState(() => new TableState()); diff --git a/webapp/packages/core-blocks/src/Tags/Tag.tsx b/webapp/packages/core-blocks/src/Tags/Tag.tsx index fb7b47f253..23e9401455 100644 --- a/webapp/packages/core-blocks/src/Tags/Tag.tsx +++ b/webapp/packages/core-blocks/src/Tags/Tag.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import { IconOrImage } from '../IconOrImage'; -import { s } from '../s'; -import { useS } from '../useS'; +import { IconOrImage } from '../IconOrImage.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './Tags.module.css'; export interface ITag { diff --git a/webapp/packages/core-blocks/src/Tags/Tags.tsx b/webapp/packages/core-blocks/src/Tags/Tags.tsx index 600628b17a..36bc622035 100644 --- a/webapp/packages/core-blocks/src/Tags/Tags.tsx +++ b/webapp/packages/core-blocks/src/Tags/Tags.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './Tags.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Text.test.tsx b/webapp/packages/core-blocks/src/Text.test.tsx index 77b4421c1c..39f64f73ec 100644 --- a/webapp/packages/core-blocks/src/Text.test.tsx +++ b/webapp/packages/core-blocks/src/Text.test.tsx @@ -10,7 +10,7 @@ import { waitFor } from '@testing-library/react'; import { createApp, renderInApp } from '@cloudbeaver/tests-runner'; -import { Text } from './Text'; +import { Text } from './Text.js'; const app = createApp(); diff --git a/webapp/packages/core-blocks/src/TextPlaceholder.test.tsx b/webapp/packages/core-blocks/src/TextPlaceholder.test.tsx index 38fc7a8d3d..27caf53f84 100644 --- a/webapp/packages/core-blocks/src/TextPlaceholder.test.tsx +++ b/webapp/packages/core-blocks/src/TextPlaceholder.test.tsx @@ -10,7 +10,7 @@ import { waitFor } from '@testing-library/react'; import { createApp, renderInApp } from '@cloudbeaver/tests-runner'; -import { TextPlaceholder } from './TextPlaceholder'; +import { TextPlaceholder } from './TextPlaceholder.js'; const app = createApp(); diff --git a/webapp/packages/core-blocks/src/TextPlaceholder.tsx b/webapp/packages/core-blocks/src/TextPlaceholder.tsx index a9c36a66d2..19c4499e66 100644 --- a/webapp/packages/core-blocks/src/TextPlaceholder.tsx +++ b/webapp/packages/core-blocks/src/TextPlaceholder.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from './s'; +import { s } from './s.js'; import style from './TextPlaceholder.module.css'; -import { useS } from './useS'; +import { useS } from './useS.js'; interface Props { className?: string; diff --git a/webapp/packages/core-blocks/src/TimerIcon.test.tsx b/webapp/packages/core-blocks/src/TimerIcon.test.tsx index 7d4b0c3f26..bdd4c902a3 100644 --- a/webapp/packages/core-blocks/src/TimerIcon.test.tsx +++ b/webapp/packages/core-blocks/src/TimerIcon.test.tsx @@ -10,7 +10,7 @@ import { queryByAttribute, waitFor } from '@testing-library/react'; import { createApp, renderInApp } from '@cloudbeaver/tests-runner'; -import { TimerIcon } from './TimerIcon'; +import { TimerIcon } from './TimerIcon.js'; const app = createApp(); diff --git a/webapp/packages/core-blocks/src/TimerIcon.tsx b/webapp/packages/core-blocks/src/TimerIcon.tsx index 3f0cbc8281..82f78dce14 100644 --- a/webapp/packages/core-blocks/src/TimerIcon.tsx +++ b/webapp/packages/core-blocks/src/TimerIcon.tsx @@ -8,10 +8,10 @@ import { observer } from 'mobx-react-lite'; import type React from 'react'; -import { Icon } from './Icon'; -import { s } from './s'; +import { Icon } from './Icon.js'; +import { s } from './s.js'; import classes from './TimerIcon.module.css'; -import { useS } from './useS'; +import { useS } from './useS.js'; interface Props { state: 'play' | 'stop'; diff --git a/webapp/packages/core-blocks/src/ToolsPanel/ToolsAction.tsx b/webapp/packages/core-blocks/src/ToolsPanel/ToolsAction.tsx index d92a80a265..8c3cfd13e2 100644 --- a/webapp/packages/core-blocks/src/ToolsPanel/ToolsAction.tsx +++ b/webapp/packages/core-blocks/src/ToolsPanel/ToolsAction.tsx @@ -7,11 +7,11 @@ */ import { type ButtonHTMLAttributes, useState } from 'react'; -import { IconOrImage } from '../IconOrImage'; -import { Loader } from '../Loader/Loader'; -import { s } from '../s'; -import { useS } from '../useS'; -import { useStateDelay } from '../useStateDelay'; +import { IconOrImage } from '../IconOrImage.js'; +import { Loader } from '../Loader/Loader.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; +import { useStateDelay } from '../useStateDelay.js'; import style from './ToolsAction.module.css'; interface Props extends Omit, 'onClick'> { diff --git a/webapp/packages/core-blocks/src/ToolsPanel/ToolsPanel.tsx b/webapp/packages/core-blocks/src/ToolsPanel/ToolsPanel.tsx index 07b415084a..c4905c8a49 100644 --- a/webapp/packages/core-blocks/src/ToolsPanel/ToolsPanel.tsx +++ b/webapp/packages/core-blocks/src/ToolsPanel/ToolsPanel.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import style from './ToolsPanel.module.css'; type TType = 'primary' | 'secondary'; diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNode.tsx b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNode.tsx index c465750d7b..648850220f 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNode.tsx +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNode.tsx @@ -9,13 +9,13 @@ import { computed, observable } from 'mobx'; import { observer } from 'mobx-react-lite'; import { forwardRef } from 'react'; -import { s } from '../../s'; -import { useObjectRef } from '../../useObjectRef'; -import { useObservableRef } from '../../useObservableRef'; -import { useS } from '../../useS'; -import type { ITreeNodeState } from './ITreeNodeState'; +import { s } from '../../s.js'; +import { useObjectRef } from '../../useObjectRef.js'; +import { useObservableRef } from '../../useObservableRef.js'; +import { useS } from '../../useS.js'; +import type { ITreeNodeState } from './ITreeNodeState.js'; import style from './TreeNode.module.css'; -import { ITreeNodeContext, TreeNodeContext } from './TreeNodeContext'; +import { type ITreeNodeContext, TreeNodeContext } from './TreeNodeContext.js'; interface Props extends ITreeNodeState { className?: string; diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeControl.tsx b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeControl.tsx index 61d6562e3d..4ee480680e 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeControl.tsx +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeControl.tsx @@ -10,13 +10,13 @@ import React, { forwardRef, useContext } from 'react'; import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; -import { s } from '../../s'; -import { useS } from '../../useS'; -import { EventTreeNodeClickFlag } from './EventTreeNodeClickFlag'; -import { EventTreeNodeExpandFlag } from './EventTreeNodeExpandFlag'; -import { EventTreeNodeSelectFlag } from './EventTreeNodeSelectFlag'; -import type { ITreeNodeState } from './ITreeNodeState'; -import { TreeNodeContext } from './TreeNodeContext'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; +import { EventTreeNodeClickFlag } from './EventTreeNodeClickFlag.js'; +import { EventTreeNodeExpandFlag } from './EventTreeNodeExpandFlag.js'; +import { EventTreeNodeSelectFlag } from './EventTreeNodeSelectFlag.js'; +import type { ITreeNodeState } from './ITreeNodeState.js'; +import { TreeNodeContext } from './TreeNodeContext.js'; import style from './TreeNodeControl.module.css'; const KEY = { diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeExpand.tsx b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeExpand.tsx index dbb8dd1d7c..2d9b512069 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeExpand.tsx +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeExpand.tsx @@ -10,16 +10,16 @@ import { useContext } from 'react'; import { EventContext } from '@cloudbeaver/core-events'; -import { Clickable } from '../../Clickable'; -import { getComputed } from '../../getComputed'; -import { Icon } from '../../Icon'; -import { Loader } from '../../Loader/Loader'; -import { useTranslate } from '../../localization/useTranslate'; -import { s } from '../../s'; -import { useS } from '../../useS'; -import { useStateDelay } from '../../useStateDelay'; -import { EventTreeNodeExpandFlag } from './EventTreeNodeExpandFlag'; -import { TreeNodeContext } from './TreeNodeContext'; +import { Clickable } from '../../Clickable.js'; +import { getComputed } from '../../getComputed.js'; +import { Icon } from '../../Icon.js'; +import { Loader } from '../../Loader/Loader.js'; +import { useTranslate } from '../../localization/useTranslate.js'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; +import { useStateDelay } from '../../useStateDelay.js'; +import { EventTreeNodeExpandFlag } from './EventTreeNodeExpandFlag.js'; +import { TreeNodeContext } from './TreeNodeContext.js'; import style from './TreeNodeExpand.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeIcon.tsx b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeIcon.tsx index 8011a48745..34c08c6944 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeIcon.tsx +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeIcon.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../../s'; -import { StaticImage } from '../../StaticImage'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { StaticImage } from '../../StaticImage.js'; +import { useS } from '../../useS.js'; import style from './TreeNodeIcon.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeName.tsx b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeName.tsx index e3e1c9771d..cbcbe58717 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeName.tsx +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeName.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import style from './TreeNodeName.module.css'; interface Props extends React.HTMLAttributes { diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNested.tsx b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNested.tsx index 7ecf23eafd..c7a864156f 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNested.tsx +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNested.tsx @@ -8,8 +8,8 @@ import { observer } from 'mobx-react-lite'; import { forwardRef } from 'react'; -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import style from './TreeNodeNested.module.css'; interface Props extends React.PropsWithChildren { diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.tsx b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.tsx index 0fbbba7742..4d06239dbd 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.tsx +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { s } from '../../s'; -import { useS } from '../../useS'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; import style from './TreeNodeNestedMessage.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeSelect.tsx b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeSelect.tsx index cd17d787c2..49bace7868 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeSelect.tsx +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeSelect.tsx @@ -10,12 +10,12 @@ import { useContext } from 'react'; import { EventContext } from '@cloudbeaver/core-events'; -import { Checkbox } from '../../FormControls/Checkboxes/Checkbox'; -import { Loader } from '../../Loader/Loader'; -import { s } from '../../s'; -import { useS } from '../../useS'; -import { EventTreeNodeSelectFlag } from './EventTreeNodeSelectFlag'; -import { TreeNodeContext } from './TreeNodeContext'; +import { Checkbox } from '../../FormControls/Checkboxes/Checkbox.js'; +import { Loader } from '../../Loader/Loader.js'; +import { s } from '../../s.js'; +import { useS } from '../../useS.js'; +import { EventTreeNodeSelectFlag } from './EventTreeNodeSelectFlag.js'; +import { TreeNodeContext } from './TreeNodeContext.js'; import style from './TreeNodeSelect.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/UploadArea.tsx b/webapp/packages/core-blocks/src/UploadArea.tsx index 1293ef21b9..27737fc35e 100644 --- a/webapp/packages/core-blocks/src/UploadArea.tsx +++ b/webapp/packages/core-blocks/src/UploadArea.tsx @@ -10,10 +10,10 @@ import { forwardRef, useLayoutEffect } from 'react'; import { uuid } from '@cloudbeaver/core-utils'; -import { s } from './s'; +import { s } from './s.js'; import style from './UploadArea.module.css'; -import { useRefInherit } from './useRefInherit'; -import { useS } from './useS'; +import { useRefInherit } from './useRefInherit.js'; +import { useS } from './useS.js'; interface Props extends Omit, HTMLInputElement>, 'value'> { value?: FileList | null; diff --git a/webapp/packages/core-blocks/src/__custom__mocks__/ErrorBoundaryMock.tsx b/webapp/packages/core-blocks/src/__custom__mocks__/ErrorBoundaryMock.tsx index a407952ccf..3602c2890d 100644 --- a/webapp/packages/core-blocks/src/__custom__mocks__/ErrorBoundaryMock.tsx +++ b/webapp/packages/core-blocks/src/__custom__mocks__/ErrorBoundaryMock.tsx @@ -25,7 +25,7 @@ export default class ErrorBoundary extends React.Component { return { hasError: true, error }; } - render() { + override render() { if (this.state.hasError) { return

{this.state.error.message}

; } diff --git a/webapp/packages/core-blocks/src/importLazyComponent.test.tsx b/webapp/packages/core-blocks/src/importLazyComponent.test.tsx index 5e1c063a4f..1fe75d0676 100644 --- a/webapp/packages/core-blocks/src/importLazyComponent.test.tsx +++ b/webapp/packages/core-blocks/src/importLazyComponent.test.tsx @@ -11,8 +11,8 @@ import React, { Suspense } from 'react'; import { addKnownError, consoleSpy } from '@cloudbeaver/tests-runner'; -import ErrorBoundary from './__custom__mocks__/ErrorBoundaryMock'; -import { importLazyComponent } from './importLazyComponent'; +import ErrorBoundary from './__custom__mocks__/ErrorBoundaryMock.js'; +import { importLazyComponent } from './importLazyComponent.js'; addKnownError(/The above error occurred in one of your React components.*/); diff --git a/webapp/packages/core-blocks/src/importLazyComponent.ts b/webapp/packages/core-blocks/src/importLazyComponent.ts index 34d8ada79e..ff2bf3d1d5 100644 --- a/webapp/packages/core-blocks/src/importLazyComponent.ts +++ b/webapp/packages/core-blocks/src/importLazyComponent.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import React, { ComponentType } from 'react'; +import React, { type ComponentType } from 'react'; export function importLazyComponent>(componentImporter: () => Promise): TComponent { return React.lazy(async () => { diff --git a/webapp/packages/core-blocks/src/index.ts b/webapp/packages/core-blocks/src/index.ts index 6dd8a53241..262666d64e 100644 --- a/webapp/packages/core-blocks/src/index.ts +++ b/webapp/packages/core-blocks/src/index.ts @@ -5,249 +5,249 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './CommonDialog/CommonDialog/CommonDialogBody'; -export * from './CommonDialog/CommonDialog/CommonDialogFooter'; -export * from './CommonDialog/CommonDialog/CommonDialogHeader'; -export * from './CommonDialog/CommonDialog/CommonDialogWrapper'; -export * from './CommonDialog/ConfirmationDialog'; -export * from './CommonDialog/ConfirmationDialogDelete'; -export * from './CommonDialog/RenameDialog'; -export * from './CommonDialog/DialogsPortal'; - -export * from './ErrorDetailsDialog/ErrorDetailsDialog'; - -export * from './ComponentsRegistry/CRegistryLoader'; +export * from './CommonDialog/CommonDialog/CommonDialogBody.js'; +export * from './CommonDialog/CommonDialog/CommonDialogFooter.js'; +export * from './CommonDialog/CommonDialog/CommonDialogHeader.js'; +export * from './CommonDialog/CommonDialog/CommonDialogWrapper.js'; +export * from './CommonDialog/ConfirmationDialog.js'; +export * from './CommonDialog/ConfirmationDialogDelete.js'; +export * from './CommonDialog/RenameDialog.js'; +export * from './CommonDialog/DialogsPortal.js'; + +export * from './ErrorDetailsDialog/ErrorDetailsDialog.js'; + +export * from './ComponentsRegistry/CRegistryLoader.js'; // we don't expect to use this component directly only as a wrapper for another component // eslint-disable-next-line @cloudbeaver/no-sync-component-import -export * from './ComponentsRegistry/registry'; -export * from './ComponentsRegistry/CRegistryList'; -export * from './ComponentsRegistry/IComponentsTreeNodeValidator'; -export * from './ComponentsRegistry/useParentProps'; - -export * from './AppRefreshButton'; -export * from './ComplexLoader'; -export * from './DisplayError'; -export * from './ErrorBoundary'; -export * from './Icon'; - -export * from './ItemList/ItemList'; -export * from './ItemList/ItemListSearch'; -export * from './ItemList/ListItem'; -export * from './ItemList/ListItemDescription'; -export * from './ItemList/ListItemIcon'; -export * from './ItemList/ListItemName'; - -export * from './layout/AppLogo'; -export * from './layout/TopAppBar'; - -export * from './Loader/Loader'; -export * from './Loader/useAutoLoad'; - -export * from './localization/Translate'; -export * from './localization/useTranslate'; - -export * from './ConnectionImageWithMask/ConnectionImageWithMask'; +export * from './ComponentsRegistry/registry.js'; +export * from './ComponentsRegistry/CRegistryList.js'; +export * from './ComponentsRegistry/IComponentsTreeNodeValidator.js'; +export * from './ComponentsRegistry/useParentProps.js'; + +export * from './AppRefreshButton.js'; +export * from './ComplexLoader.js'; +export * from './DisplayError.js'; +export * from './ErrorBoundary.js'; +export * from './Icon.js'; + +export * from './ItemList/ItemList.js'; +export * from './ItemList/ItemListSearch.js'; +export * from './ItemList/ListItem.js'; +export * from './ItemList/ListItemDescription.js'; +export * from './ItemList/ListItemIcon.js'; +export * from './ItemList/ListItemName.js'; + +export * from './layout/AppLogo.js'; +export * from './layout/TopAppBar.js'; + +export * from './Loader/Loader.js'; +export * from './Loader/useAutoLoad.js'; + +export * from './localization/Translate.js'; +export * from './localization/useTranslate.js'; + +export * from './ConnectionImageWithMask/ConnectionImageWithMask.js'; export { default as ConnectionImageWithMaskSvgStyles } from './ConnectionImageWithMask/ConnectionImageWithMaskSvg.module.css'; -export * from './Menu/Menu'; +export * from './Menu/Menu.js'; export { default as MenuStyles } from './Menu/Menu.module.css'; -export * from './Menu/MenuBarSmallItem'; -export * from './Menu/MenuEmptyItem'; -export * from './Menu/MenuItem'; +export * from './Menu/MenuBarSmallItem.js'; +export * from './Menu/MenuEmptyItem.js'; +export * from './Menu/MenuItem.js'; export { default as MenuItemStyles } from './Menu/MenuItem.module.css'; export { default as MenuPanelItemAndTriggerStyles } from './MenuPanel/shared/MenuPanelItemAndTrigger.module.css'; -export * from './Menu/MenuItemCheckbox'; -export * from './Menu/MenuItemElement'; +export * from './Menu/MenuItemCheckbox.js'; +export * from './Menu/MenuItemElement.js'; export { default as MenuItemElementStyles } from './Menu/MenuItemElement.module.css'; -export * from './Menu/MenuItemRadio'; -export * from './Menu/MenuPanel'; +export * from './Menu/MenuItemRadio.js'; +export * from './Menu/MenuPanel.js'; export { default as MenuPanelStyles } from './Menu/MenuPanel.module.css'; -export * from './Menu/MenuSeparator'; +export * from './Menu/MenuSeparator.js'; export { default as MenuSeparatorStyles } from './Menu/MenuSeparator.module.css'; -export * from './Menu/MenuStateContext'; -export * from './Menu/useMouseContextMenu'; -export { MenuTrigger, type MenuState } from './MenuPanel/MenuTrigger'; - -export * from './ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoFormLoader'; -export * from './ObjectPropertyInfo/useObjectPropertyCategories'; - -export * from './Overlay/Overlay'; -export * from './Overlay/OverlayActions'; -export * from './Overlay/OverlayHeader'; -export * from './Overlay/OverlayHeaderIcon'; -export * from './Overlay/OverlayHeaderSubTitle'; -export * from './Overlay/OverlayHeaderTitle'; -export * from './Overlay/OverlayMessage'; - -export * from './Placeholder/Placeholder'; -export * from './Placeholder/PlaceholderContainer'; - -export * from './PropertiesTable/PropertiesTable'; -export * from './PropertiesTable/IProperty'; - -export * from './Slide/SlideBox'; -export * from './Slide/SlideElement'; -export * from './Slide/SlideOverlay'; - -export * from './Split/SplitControls'; -export * from './Split/Pane'; -export * from './Split/ResizerControls'; -export * from './Split/Split'; -export * from './Split/useSplit'; -export * from './Split/useSplitUserState'; - -export * from './Table/EventTableItemExpandFlag'; -export * from './Table/EventTableItemSelectionFlag'; -export * from './Table/Table'; -export * from './Table/TableBody'; -export * from './Table/TableColumnHeader'; -export * from './Table/TableColumnValue'; -export * from './Table/TableContext'; -export * from './Table/TableHeader'; -export * from './Table/TableItem'; -export * from './Table/TableItemContext'; -export * from './Table/TableItemExpand'; -export * from './Table/TableItemSelect'; -export * from './Table/TableItemSeparator'; -export * from './Table/useTable'; -export * from './Table/TableState'; -export * from './Table/TableSelect'; -export * from './Table/getSelectedItems'; -export * from './Table/TableItemGroup'; -export * from './Table/TableItemGroupContext'; -export * from './Table/TableItemGroupExpand'; -export * from './Table/TableItemGroupContent'; -export * from './Table/TableItemGroupExpandSpace'; - -export * from './Expand/Expandable'; - -export * from './Tree/TreeNode/EventTreeNodeClickFlag'; -export * from './Tree/TreeNode/EventTreeNodeExpandFlag'; -export * from './Tree/TreeNode/EventTreeNodeSelectFlag'; -export * from './Tree/TreeNode/TreeNode'; -export * from './Tree/TreeNode/TreeNodeContext'; -export * from './Tree/TreeNode/TreeNodeControl'; -export * from './Tree/TreeNode/TreeNodeExpand'; -export * from './Tree/TreeNode/TreeNodeIcon'; -export * from './Tree/TreeNode/TreeNodeName'; -export * from './Tree/TreeNode/TreeNodeNested'; -export * from './Tree/TreeNode/TreeNodeNestedMessage'; -export * from './Tree/TreeNode/TreeNodeSelect'; -export * from './Button'; -export * from './Text'; +export * from './Menu/MenuStateContext.js'; +export * from './Menu/useMouseContextMenu.js'; +export { MenuTrigger, type MenuState } from './MenuPanel/MenuTrigger.js'; + +export * from './ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoFormLoader.js'; +export * from './ObjectPropertyInfo/useObjectPropertyCategories.js'; + +export * from './Overlay/Overlay.js'; +export * from './Overlay/OverlayActions.js'; +export * from './Overlay/OverlayHeader.js'; +export * from './Overlay/OverlayHeaderIcon.js'; +export * from './Overlay/OverlayHeaderSubTitle.js'; +export * from './Overlay/OverlayHeaderTitle.js'; +export * from './Overlay/OverlayMessage.js'; + +export * from './Placeholder/Placeholder.js'; +export * from './Placeholder/PlaceholderContainer.js'; + +export * from './PropertiesTable/PropertiesTable.js'; +export * from './PropertiesTable/IProperty.js'; + +export * from './Slide/SlideBox.js'; +export * from './Slide/SlideElement.js'; +export * from './Slide/SlideOverlay.js'; + +export * from './Split/SplitControls.js'; +export * from './Split/Pane.js'; +export * from './Split/ResizerControls.js'; +export * from './Split/Split.js'; +export * from './Split/useSplit.js'; +export * from './Split/useSplitUserState.js'; + +export * from './Table/EventTableItemExpandFlag.js'; +export * from './Table/EventTableItemSelectionFlag.js'; +export * from './Table/Table.js'; +export * from './Table/TableBody.js'; +export * from './Table/TableColumnHeader.js'; +export * from './Table/TableColumnValue.js'; +export * from './Table/TableContext.js'; +export * from './Table/TableHeader.js'; +export * from './Table/TableItem.js'; +export * from './Table/TableItemContext.js'; +export * from './Table/TableItemExpand.js'; +export * from './Table/TableItemSelect.js'; +export * from './Table/TableItemSeparator.js'; +export * from './Table/useTable.js'; +export * from './Table/TableState.js'; +export * from './Table/TableSelect.js'; +export * from './Table/getSelectedItems.js'; +export * from './Table/TableItemGroup.js'; +export * from './Table/TableItemGroupContext.js'; +export * from './Table/TableItemGroupExpand.js'; +export * from './Table/TableItemGroupContent.js'; +export * from './Table/TableItemGroupExpandSpace.js'; + +export * from './Expand/Expandable.js'; + +export * from './Tree/TreeNode/EventTreeNodeClickFlag.js'; +export * from './Tree/TreeNode/EventTreeNodeExpandFlag.js'; +export * from './Tree/TreeNode/EventTreeNodeSelectFlag.js'; +export * from './Tree/TreeNode/TreeNode.js'; +export * from './Tree/TreeNode/TreeNodeContext.js'; +export * from './Tree/TreeNode/TreeNodeControl.js'; +export * from './Tree/TreeNode/TreeNodeExpand.js'; +export * from './Tree/TreeNode/TreeNodeIcon.js'; +export * from './Tree/TreeNode/TreeNodeName.js'; +export * from './Tree/TreeNode/TreeNodeNested.js'; +export * from './Tree/TreeNode/TreeNodeNestedMessage.js'; +export * from './Tree/TreeNode/TreeNodeSelect.js'; +export * from './Button.js'; +export * from './Text.js'; export { default as ButtonStyles } from './Button.module.css'; -export * from './ToolsPanel/ToolsAction'; -export * from './ToolsPanel/ToolsPanel'; +export * from './ToolsPanel/ToolsAction.js'; +export * from './ToolsPanel/ToolsPanel.js'; export { default as ToolsPanelStyles } from './ToolsPanel/ToolsPanel.module.css'; export { default as ToolsActionStyles } from './ToolsPanel/ToolsAction.module.css'; export { default as TreeNodeNestedMessageStyles } from './Tree/TreeNode/TreeNodeNestedMessage.module.css'; export { default as TreeNodeStyles } from './Tree/TreeNode/TreeNode.module.css'; -export * from './FormControls/Checkboxes/Checkbox'; -export * from './FormControls/Checkboxes/FieldCheckbox'; -export * from './FormControls/Checkboxes/CheckboxMarkup'; -export * from './FormControls/Checkboxes/Switch'; -export * from './FormControls/Checkboxes/useCheckboxState'; -export * from './FormControls/Filter'; +export * from './FormControls/Checkboxes/Checkbox.js'; +export * from './FormControls/Checkboxes/FieldCheckbox.js'; +export * from './FormControls/Checkboxes/CheckboxMarkup.js'; +export * from './FormControls/Checkboxes/Switch.js'; +export * from './FormControls/Checkboxes/useCheckboxState.js'; +export * from './FormControls/Filter.js'; export { default as BaseDropdownStyles } from './FormControls/BaseDropdown.module.css'; export { default as FilterStyles } from './FormControls/Filter.module.css'; -export * from './Fill'; - -export * from './Containers/Container'; -export * from './Containers/Group'; -export * from './Containers/GroupClose'; -export * from './Containers/GroupItem'; -export * from './Containers/GroupSubTitle'; -export * from './Containers/GroupTitle'; -export * from './Containers/ColoredContainer'; -export * from './Containers/IContainerProps'; -export * from './Containers/ILayoutSizeProps'; - -export * from './FolderExplorer/FolderExplorer'; -export * from './FolderExplorer/FolderExplorerContext'; -export * from './FolderExplorer/FolderExplorerPath'; -export * from './FolderExplorer/FolderName'; -export * from './FolderExplorer/useFolderExplorer'; - -export * from './Tags/Tag'; -export * from './Tags/Tags'; - -export * from './FormControls/ComboboxLoader'; -export * from './FormControls/FormContext'; -export * from './FormControls/FormFieldDescription'; -export * from './FormControls/InputField/InputField'; +export * from './Fill.js'; + +export * from './Containers/Container.js'; +export * from './Containers/Group.js'; +export * from './Containers/GroupClose.js'; +export * from './Containers/GroupItem.js'; +export * from './Containers/GroupSubTitle.js'; +export * from './Containers/GroupTitle.js'; +export * from './Containers/ColoredContainer.js'; +export * from './Containers/IContainerProps.js'; +export * from './Containers/ILayoutSizeProps.js'; + +export * from './FolderExplorer/FolderExplorer.js'; +export * from './FolderExplorer/FolderExplorerContext.js'; +export * from './FolderExplorer/FolderExplorerPath.js'; +export * from './FolderExplorer/FolderName.js'; +export * from './FolderExplorer/useFolderExplorer.js'; + +export * from './Tags/Tag.js'; +export * from './Tags/Tags.js'; + +export * from './FormControls/ComboboxLoader.js'; +export * from './FormControls/FormContext.js'; +export * from './FormControls/FormFieldDescription.js'; +export * from './FormControls/InputField/InputField.js'; export { default as InputFieldStyles } from './FormControls/InputField/InputField.module.css'; -export * from './FormControls/InputFiles'; -export * from './FormControls/InputFileTextContent'; -export * from './FormControls/Radio'; -export * from './FormControls/RadioGroup'; -export * from './FormControls/RadioGroupContext'; -export * from './FormControls/ShadowInput'; -export * from './FormControls/Form'; -export * from './FormControls/Textarea'; -export * from './FormControls/useCapsLockTracker'; -export * from './FormControls/useCustomInputValidation'; -export * from './FormControls/useForm'; -export * from './FormControls/Textarea'; -export * from './Link'; -export * from './Cell'; +export * from './FormControls/InputFiles.js'; +export * from './FormControls/InputFileTextContent.js'; +export * from './FormControls/Radio.js'; +export * from './FormControls/RadioGroup.js'; +export * from './FormControls/RadioGroupContext.js'; +export * from './FormControls/ShadowInput.js'; +export * from './FormControls/Form.js'; +export * from './FormControls/Textarea.js'; +export * from './FormControls/useCapsLockTracker.js'; +export * from './FormControls/useCustomInputValidation.js'; +export * from './FormControls/useForm.js'; +export * from './FormControls/Textarea.js'; +export * from './Link.js'; +export * from './Cell.js'; export { default as CellStyles } from './Cell.module.css'; -export * from './UploadArea'; -export * from './ErrorMessage'; -export * from './preventFocusHandler'; -export * from './StatusMessage'; -export * from './ExceptionMessage'; +export * from './UploadArea.js'; +export * from './ErrorMessage.js'; +export * from './preventFocusHandler.js'; +export * from './StatusMessage.js'; +export * from './ExceptionMessage.js'; export { default as ExceptionMessageStyles } from './ExceptionMessage.module.css'; -export * from './getComputed'; -export * from './IconButton'; -export * from './ActionIconButton'; +export * from './getComputed.js'; +export * from './IconButton.js'; +export * from './ActionIconButton.js'; export { default as IconButtonStyles } from './IconButton.module.css'; export { default as ActionIconButtonStyles } from './ActionIconButton.module.css'; -export * from './IconOrImage'; -export * from './s'; -export * from './SContext'; -export * from './StaticImage'; -export * from './TextPlaceholder'; -export * from './TimerIcon'; -export * from './InfoItem'; -export * from './Iframe'; -export * from './Code'; -export * from './useControlledScroll'; -export * from './useClipboard'; -export * from './useCombinedHandler'; -export * from './useCombinedRef'; -export * from './useExecutor'; -export * from './useFn'; -export * from './useFocus'; -export * from './useFormValidator'; -export * from './ResourcesHooks/useOffsetPagination'; -export * from './ResourcesHooks/useResource'; -export * from './useMouse'; -export * from './useObjectRef'; -export * from './useObservableRef'; -export * from './usePermission'; -export * from './usePromiseState'; -export * from './useS'; -export * from './useStateDelay'; -export * from './useErrorDetails'; -export * from './useActivationDelay'; -export * from './useAdministrationSettings'; -export * from './useInterval'; -export * from './useSuspense'; -export * from './BlocksLocaleService'; -export * from './Snackbars/NotificationMark'; -export * from './Snackbars/SnackbarMarkups/SnackbarWrapper'; -export * from './Snackbars/SnackbarMarkups/SnackbarStatus'; -export * from './Snackbars/SnackbarMarkups/SnackbarContent'; -export * from './Snackbars/SnackbarMarkups/SnackbarBody'; -export * from './Snackbars/SnackbarMarkups/SnackbarFooter'; -export * from './Snackbars/Snackbar'; -export * from './Snackbars/ActionSnackbar'; -export * from './Snackbars/ProcessSnackbar'; -export * from './useUserData'; -export * from './useMergeRefs'; -export * from './usePasswordValidation'; -export * from './manifest'; -export * from './importLazyComponent'; -export * from './ClickableLoader'; -export * from './FormControls/TagsComboboxLoader'; -export * from './Flex/Flex'; +export * from './IconOrImage.js'; +export * from './s.js'; +export * from './SContext.js'; +export * from './StaticImage.js'; +export * from './TextPlaceholder.js'; +export * from './TimerIcon.js'; +export * from './InfoItem.js'; +export * from './Iframe.js'; +export * from './Code.js'; +export * from './useControlledScroll.js'; +export * from './useClipboard.js'; +export * from './useCombinedHandler.js'; +export * from './useCombinedRef.js'; +export * from './useExecutor.js'; +export * from './useFn.js'; +export * from './useFocus.js'; +export * from './useFormValidator.js'; +export * from './ResourcesHooks/useOffsetPagination.js'; +export * from './ResourcesHooks/useResource.js'; +export * from './useMouse.js'; +export * from './useObjectRef.js'; +export * from './useObservableRef.js'; +export * from './usePermission.js'; +export * from './usePromiseState.js'; +export * from './useS.js'; +export * from './useStateDelay.js'; +export * from './useErrorDetails.js'; +export * from './useActivationDelay.js'; +export * from './useAdministrationSettings.js'; +export * from './useInterval.js'; +export * from './useSuspense.js'; +export * from './BlocksLocaleService.js'; +export * from './Snackbars/NotificationMark.js'; +export * from './Snackbars/SnackbarMarkups/SnackbarWrapper.js'; +export * from './Snackbars/SnackbarMarkups/SnackbarStatus.js'; +export * from './Snackbars/SnackbarMarkups/SnackbarContent.js'; +export * from './Snackbars/SnackbarMarkups/SnackbarBody.js'; +export * from './Snackbars/SnackbarMarkups/SnackbarFooter.js'; +export * from './Snackbars/Snackbar.js'; +export * from './Snackbars/ActionSnackbar.js'; +export * from './Snackbars/ProcessSnackbar.js'; +export * from './useUserData.js'; +export * from './useMergeRefs.js'; +export * from './usePasswordValidation.js'; +export * from './manifest.js'; +export * from './importLazyComponent.js'; +export * from './ClickableLoader.js'; +export * from './FormControls/TagsComboboxLoader.js'; +export * from './Flex/Flex.js'; diff --git a/webapp/packages/core-blocks/src/layout/AppLogo.tsx b/webapp/packages/core-blocks/src/layout/AppLogo.tsx index 3ccce6030f..0f37ddacf3 100644 --- a/webapp/packages/core-blocks/src/layout/AppLogo.tsx +++ b/webapp/packages/core-blocks/src/layout/AppLogo.tsx @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { IconOrImage } from '../IconOrImage'; -import { s } from '../s'; -import { useS } from '../useS'; +import { IconOrImage } from '../IconOrImage.js'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import styles from './AppLogo.module.css'; interface Props { diff --git a/webapp/packages/core-blocks/src/layout/TopAppBar.tsx b/webapp/packages/core-blocks/src/layout/TopAppBar.tsx index 3bea3202ec..d269053224 100644 --- a/webapp/packages/core-blocks/src/layout/TopAppBar.tsx +++ b/webapp/packages/core-blocks/src/layout/TopAppBar.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { s } from '../s'; -import { useS } from '../useS'; +import { s } from '../s.js'; +import { useS } from '../useS.js'; import styles from './TopAppBar.module.css'; interface Props extends React.PropsWithChildren { diff --git a/webapp/packages/core-blocks/src/localization/Translate.tsx b/webapp/packages/core-blocks/src/localization/Translate.tsx index 1b9dbc6c44..21609b414f 100644 --- a/webapp/packages/core-blocks/src/localization/Translate.tsx +++ b/webapp/packages/core-blocks/src/localization/Translate.tsx @@ -9,7 +9,7 @@ import { observer } from 'mobx-react-lite'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import { useTranslate } from './useTranslate'; +import { useTranslate } from './useTranslate.js'; interface Props { token: TLocalizationToken; diff --git a/webapp/packages/core-blocks/src/localization/useTranslate.ts b/webapp/packages/core-blocks/src/localization/useTranslate.ts index a91e774e43..94a2f72989 100644 --- a/webapp/packages/core-blocks/src/localization/useTranslate.ts +++ b/webapp/packages/core-blocks/src/localization/useTranslate.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { useService } from '@cloudbeaver/core-di'; -import { LocalizationService, TLocalizationToken } from '@cloudbeaver/core-localization'; +import { LocalizationService, type TLocalizationToken } from '@cloudbeaver/core-localization'; export function useTranslate(): (token: T, fallback?: T, args?: Record) => T { const localizationService = useService(LocalizationService); diff --git a/webapp/packages/core-blocks/src/manifest.ts b/webapp/packages/core-blocks/src/manifest.ts index 99794a641e..3d1a0cfd19 100644 --- a/webapp/packages/core-blocks/src/manifest.ts +++ b/webapp/packages/core-blocks/src/manifest.ts @@ -12,5 +12,5 @@ export const coreBlocksManifest: PluginManifest = { name: 'Core Blocks', }, - providers: [() => import('./BlocksLocaleService').then(m => m.BlocksLocaleService)], + providers: [() => import('./BlocksLocaleService.js').then(m => m.BlocksLocaleService)], }; diff --git a/webapp/packages/core-blocks/src/useAdministrationSettings.ts b/webapp/packages/core-blocks/src/useAdministrationSettings.ts index 9bfc5f6879..0d87dabf1c 100644 --- a/webapp/packages/core-blocks/src/useAdministrationSettings.ts +++ b/webapp/packages/core-blocks/src/useAdministrationSettings.ts @@ -7,8 +7,8 @@ */ import { EAdminPermission, ServerConfigResource } from '@cloudbeaver/core-root'; -import { useResource } from './ResourcesHooks/useResource'; -import { usePermission } from './usePermission'; +import { useResource } from './ResourcesHooks/useResource.js'; +import { usePermission } from './usePermission.js'; interface IAdministrationSettings { credentialsSavingEnabled: boolean; diff --git a/webapp/packages/core-blocks/src/useClipBoard.test.ts b/webapp/packages/core-blocks/src/useClipBoard.test.ts index e33a1c2279..a766262669 100644 --- a/webapp/packages/core-blocks/src/useClipBoard.test.ts +++ b/webapp/packages/core-blocks/src/useClipBoard.test.ts @@ -11,7 +11,7 @@ import { renderHook } from '@testing-library/react'; import * as coreDi from '@cloudbeaver/core-di'; import * as coreUtils from '@cloudbeaver/core-utils'; -import { useClipboard } from './useClipboard'; +import { useClipboard } from './useClipboard.js'; jest.mock('@cloudbeaver/core-utils', () => ({ copyToClipboard: jest.fn(), diff --git a/webapp/packages/core-blocks/src/useCombinedHandler.ts b/webapp/packages/core-blocks/src/useCombinedHandler.ts index 5d719c1f4b..366820f347 100644 --- a/webapp/packages/core-blocks/src/useCombinedHandler.ts +++ b/webapp/packages/core-blocks/src/useCombinedHandler.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { useObjectRef } from './useObjectRef'; +import { useObjectRef } from './useObjectRef.js'; export function useCombinedHandler(...handlers: Array<((...args: T) => any) | null | undefined>): (...args: T) => void { const optionsRef = useObjectRef({ handlers }); diff --git a/webapp/packages/core-blocks/src/useControlledScroll.test.ts b/webapp/packages/core-blocks/src/useControlledScroll.test.ts index 64f703b374..41c10c3165 100644 --- a/webapp/packages/core-blocks/src/useControlledScroll.test.ts +++ b/webapp/packages/core-blocks/src/useControlledScroll.test.ts @@ -8,7 +8,7 @@ import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'; import { renderHook } from '@testing-library/react'; -import { IScrollState, useControlledScroll } from './useControlledScroll'; +import { type IScrollState, useControlledScroll } from './useControlledScroll.js'; describe('useControlledScroll', () => { let element: HTMLDivElement; diff --git a/webapp/packages/core-blocks/src/useErrorDetails.ts b/webapp/packages/core-blocks/src/useErrorDetails.ts index 455a5fa1ca..2be88df24e 100644 --- a/webapp/packages/core-blocks/src/useErrorDetails.ts +++ b/webapp/packages/core-blocks/src/useErrorDetails.ts @@ -12,8 +12,8 @@ import { CommonDialogService } from '@cloudbeaver/core-dialogs'; import { DetailsError } from '@cloudbeaver/core-sdk'; import { errorOf, LoadingError } from '@cloudbeaver/core-utils'; -import { ErrorDetailsDialog } from './ErrorDetailsDialog/ErrorDetailsDialog'; -import { useTranslate } from './localization/useTranslate'; +import { ErrorDetailsDialog } from './ErrorDetailsDialog/ErrorDetailsDialog.js'; +import { useTranslate } from './localization/useTranslate.js'; interface IErrorDetailsHook { name?: string; diff --git a/webapp/packages/core-blocks/src/useExecutor.test.ts b/webapp/packages/core-blocks/src/useExecutor.test.ts index 9bf1ba0446..e75c873c71 100644 --- a/webapp/packages/core-blocks/src/useExecutor.test.ts +++ b/webapp/packages/core-blocks/src/useExecutor.test.ts @@ -10,8 +10,8 @@ import { renderHook } from '@testing-library/react'; import type { IExecutorHandler, IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; -import { useExecutor } from './useExecutor'; -import { useObjectRef } from './useObjectRef'; +import { useExecutor } from './useExecutor.js'; +import { useObjectRef } from './useObjectRef.js'; jest.mock('./useObjectRef', () => ({ useObjectRef: jest.fn(obj => obj), diff --git a/webapp/packages/core-blocks/src/useExecutor.ts b/webapp/packages/core-blocks/src/useExecutor.ts index 25f70b4281..2b8f100039 100644 --- a/webapp/packages/core-blocks/src/useExecutor.ts +++ b/webapp/packages/core-blocks/src/useExecutor.ts @@ -9,7 +9,7 @@ import { useEffect } from 'react'; import type { IExecutor, IExecutorHandler, IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; -import { useObjectRef } from './useObjectRef'; +import { useObjectRef } from './useObjectRef.js'; interface IUseExecutorOptions { executor?: IExecutorHandlersCollection; @@ -35,7 +35,7 @@ export function useExecutor(options: IUseExecutorOptions): void { if (props.handlers) { for (let i = 0; i < props.handlers.length; i++) { - const handler: IExecutorHandler = (data, contexts) => props.handlers?.[i](data, contexts); + const handler: IExecutorHandler = (data, contexts) => props.handlers?.[i]?.(data, contexts); executor.addHandler(handler); handlers.push(handler); } @@ -43,7 +43,7 @@ export function useExecutor(options: IUseExecutorOptions): void { if (props.postHandlers) { for (let i = 0; i < props.postHandlers.length; i++) { - const handler: IExecutorHandler = (data, contexts) => props.postHandlers?.[i](data, contexts); + const handler: IExecutorHandler = (data, contexts) => props.postHandlers?.[i]?.(data, contexts); executor.addPostHandler(handler); postHandlers.push(handler); } diff --git a/webapp/packages/core-blocks/src/useFocus.ts b/webapp/packages/core-blocks/src/useFocus.ts index 20b86ee25c..2aedadfede 100644 --- a/webapp/packages/core-blocks/src/useFocus.ts +++ b/webapp/packages/core-blocks/src/useFocus.ts @@ -8,8 +8,8 @@ import { action, observable } from 'mobx'; import { useLayoutEffect } from 'react'; -import { useObjectRef } from './useObjectRef'; -import { useObservableRef } from './useObservableRef'; +import { useObjectRef } from './useObjectRef.js'; +import { useObservableRef } from './useObservableRef.js'; interface FocusOptions { autofocus?: boolean; diff --git a/webapp/packages/core-blocks/src/useFormValidator.ts b/webapp/packages/core-blocks/src/useFormValidator.ts index c458a37b91..db375e5120 100644 --- a/webapp/packages/core-blocks/src/useFormValidator.ts +++ b/webapp/packages/core-blocks/src/useFormValidator.ts @@ -7,7 +7,7 @@ */ import type { IExecutor, IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; -import { useExecutor } from './useExecutor'; +import { useExecutor } from './useExecutor.js'; export function useFormValidator( validationTask: IExecutor | IExecutorHandlersCollection, diff --git a/webapp/packages/core-blocks/src/useInterval.ts b/webapp/packages/core-blocks/src/useInterval.ts index 9ff7a99e34..39fea174e2 100644 --- a/webapp/packages/core-blocks/src/useInterval.ts +++ b/webapp/packages/core-blocks/src/useInterval.ts @@ -7,7 +7,7 @@ */ import { useEffect } from 'react'; -import { useObjectRef } from './useObjectRef'; +import { useObjectRef } from './useObjectRef.js'; export function useInterval(callback: () => void, delay: number | null) { const state = useObjectRef({ callback }); diff --git a/webapp/packages/core-blocks/src/useMouse.ts b/webapp/packages/core-blocks/src/useMouse.ts index 6225a7e6d9..0a57786e50 100644 --- a/webapp/packages/core-blocks/src/useMouse.ts +++ b/webapp/packages/core-blocks/src/useMouse.ts @@ -10,8 +10,8 @@ import { useEffect, useState } from 'react'; import { throttle } from '@cloudbeaver/core-utils'; -import { useObjectRef } from './useObjectRef'; -import { useObservableRef } from './useObservableRef'; +import { useObjectRef } from './useObjectRef.js'; +import { useObservableRef } from './useObservableRef.js'; interface IPoint { x: number; diff --git a/webapp/packages/core-blocks/src/useObjectRef.test.ts b/webapp/packages/core-blocks/src/useObjectRef.test.ts index a06ddf5a7b..f0cacbfc97 100644 --- a/webapp/packages/core-blocks/src/useObjectRef.test.ts +++ b/webapp/packages/core-blocks/src/useObjectRef.test.ts @@ -10,7 +10,7 @@ import { renderHook } from '@testing-library/react'; import * as coreUtils from '@cloudbeaver/core-utils'; -import { useObjectRef } from './useObjectRef'; +import { useObjectRef } from './useObjectRef.js'; jest.mock('@cloudbeaver/core-utils', () => ({ bindFunctions: jest.fn(), diff --git a/webapp/packages/core-blocks/src/useObservableRef.test.ts b/webapp/packages/core-blocks/src/useObservableRef.test.ts index 2564aa93d6..e390aec488 100644 --- a/webapp/packages/core-blocks/src/useObservableRef.test.ts +++ b/webapp/packages/core-blocks/src/useObservableRef.test.ts @@ -11,7 +11,7 @@ import { action, computed, isObservable, observable, runInAction } from 'mobx'; import * as coreUtils from '@cloudbeaver/core-utils'; -import { useObservableRef } from './useObservableRef'; +import { useObservableRef } from './useObservableRef.js'; jest.mock('@cloudbeaver/core-utils', () => ({ bindFunctions: jest.fn(), diff --git a/webapp/packages/core-blocks/src/useObservableRef.ts b/webapp/packages/core-blocks/src/useObservableRef.ts index 55d6ed9c11..79a39070a8 100644 --- a/webapp/packages/core-blocks/src/useObservableRef.ts +++ b/webapp/packages/core-blocks/src/useObservableRef.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { action, AnnotationsMap, makeObservable, runInAction, untracked } from 'mobx'; +import { action, type AnnotationsMap, makeObservable, runInAction, untracked } from 'mobx'; import { useLayoutEffect, useState } from 'react'; import { bindFunctions } from '@cloudbeaver/core-utils'; diff --git a/webapp/packages/core-blocks/src/usePasswordValidation.ts b/webapp/packages/core-blocks/src/usePasswordValidation.ts index 33d7b8903f..459f48ba38 100644 --- a/webapp/packages/core-blocks/src/usePasswordValidation.ts +++ b/webapp/packages/core-blocks/src/usePasswordValidation.ts @@ -9,8 +9,8 @@ import { PasswordPolicyService } from '@cloudbeaver/core-authentication'; import { useService } from '@cloudbeaver/core-di'; import { PasswordPolicyResource } from '@cloudbeaver/core-root'; -import { useCustomInputValidation } from './FormControls/useCustomInputValidation'; -import { useResource } from './ResourcesHooks/useResource'; +import { useCustomInputValidation } from './FormControls/useCustomInputValidation.js'; +import { useResource } from './ResourcesHooks/useResource.js'; export function usePasswordValidation() { useResource(usePasswordValidation, PasswordPolicyResource, undefined); diff --git a/webapp/packages/core-blocks/src/usePermission.ts b/webapp/packages/core-blocks/src/usePermission.ts index 12fd843314..9df95ab6cf 100644 --- a/webapp/packages/core-blocks/src/usePermission.ts +++ b/webapp/packages/core-blocks/src/usePermission.ts @@ -7,7 +7,7 @@ */ import { SessionPermissionsResource } from '@cloudbeaver/core-root'; -import { useResource } from './ResourcesHooks/useResource'; +import { useResource } from './ResourcesHooks/useResource.js'; export function usePermission(key: string): boolean { const sessionPermissionsResource = useResource(usePermission, SessionPermissionsResource, undefined); diff --git a/webapp/packages/core-blocks/src/usePromiseState.ts b/webapp/packages/core-blocks/src/usePromiseState.ts index e2e6edd22c..dc16791679 100644 --- a/webapp/packages/core-blocks/src/usePromiseState.ts +++ b/webapp/packages/core-blocks/src/usePromiseState.ts @@ -9,9 +9,9 @@ import { computed, observable } from 'mobx'; import { useEffect } from 'react'; import { Task } from '@cloudbeaver/core-executor'; -import { ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; -import { useObservableRef } from './useObservableRef'; +import { useObservableRef } from './useObservableRef.js'; export function usePromiseState(promise: Promise | null): ILoadableState { const state = useObservableRef( diff --git a/webapp/packages/core-blocks/src/useRefInherit.ts b/webapp/packages/core-blocks/src/useRefInherit.ts index 64bcb7ee85..0ad016d867 100644 --- a/webapp/packages/core-blocks/src/useRefInherit.ts +++ b/webapp/packages/core-blocks/src/useRefInherit.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { useObjectRef } from './useObjectRef'; +import { useObjectRef } from './useObjectRef.js'; interface IPrivateRef { value: T | null; diff --git a/webapp/packages/core-blocks/src/useS.ts b/webapp/packages/core-blocks/src/useS.ts index 8339adacca..547668902d 100644 --- a/webapp/packages/core-blocks/src/useS.ts +++ b/webapp/packages/core-blocks/src/useS.ts @@ -8,11 +8,11 @@ import { useContext, useEffect, useMemo, useRef, useState } from 'react'; import { useService } from '@cloudbeaver/core-di'; -import { BaseStyles, ClassCollection, ComponentStyle, Style, ThemeSelector, ThemeService } from '@cloudbeaver/core-theming'; +import { type BaseStyles, type ClassCollection, type ComponentStyle, type Style, type ThemeSelector, ThemeService } from '@cloudbeaver/core-theming'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import { SContextReact } from './SContext'; -import { useExecutor } from './useExecutor'; +import { SContextReact } from './SContext.js'; +import { useExecutor } from './useExecutor.js'; const stylesCache = new MetadataMap, Promise>>(() => new Map()); diff --git a/webapp/packages/core-blocks/src/useStateDelay.test.ts b/webapp/packages/core-blocks/src/useStateDelay.test.ts index f205d8263c..6b7b402ad2 100644 --- a/webapp/packages/core-blocks/src/useStateDelay.test.ts +++ b/webapp/packages/core-blocks/src/useStateDelay.test.ts @@ -8,7 +8,7 @@ import { afterEach, beforeEach, describe, expect, jest, test } from '@jest/globals'; import { act, renderHook } from '@testing-library/react'; -import { useStateDelay } from './useStateDelay'; +import { useStateDelay } from './useStateDelay.js'; interface IHookProps { value: boolean; diff --git a/webapp/packages/core-blocks/src/useSuspense.ts b/webapp/packages/core-blocks/src/useSuspense.ts index 2b9bed6b68..c302c2d82d 100644 --- a/webapp/packages/core-blocks/src/useSuspense.ts +++ b/webapp/packages/core-blocks/src/useSuspense.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { action, IReactionDisposer, observable, reaction } from 'mobx'; +import { action, type IReactionDisposer, observable, reaction } from 'mobx'; -import { useObservableRef } from './useObservableRef'; +import { useObservableRef } from './useObservableRef.js'; interface IObservedValueMetadata { reaction: IReactionDisposer | null; diff --git a/webapp/packages/core-blocks/src/useUserData.ts b/webapp/packages/core-blocks/src/useUserData.ts index b5f9fd8753..2c32378acd 100644 --- a/webapp/packages/core-blocks/src/useUserData.ts +++ b/webapp/packages/core-blocks/src/useUserData.ts @@ -10,8 +10,8 @@ import { useEffect, useRef } from 'react'; import { UserDataService, UserInfoResource } from '@cloudbeaver/core-authentication'; import { useService } from '@cloudbeaver/core-di'; -import { useResource } from './ResourcesHooks/useResource'; -import { useObjectRef } from './useObjectRef'; +import { useResource } from './ResourcesHooks/useResource.js'; +import { useObjectRef } from './useObjectRef.js'; export function useUserData>( key: string, diff --git a/webapp/packages/core-bootstrap/package.json b/webapp/packages/core-bootstrap/package.json index 71a40c9d73..fe5709d984 100644 --- a/webapp/packages/core-bootstrap/package.json +++ b/webapp/packages/core-bootstrap/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-bootstrap", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-bootstrap/src/bootstrap.ts b/webapp/packages/core-bootstrap/src/bootstrap.ts index 5797e5b5a9..7bb44e41e9 100644 --- a/webapp/packages/core-bootstrap/src/bootstrap.ts +++ b/webapp/packages/core-bootstrap/src/bootstrap.ts @@ -7,10 +7,10 @@ */ import { configure } from 'mobx'; -import { App, PluginManifest } from '@cloudbeaver/core-di'; +import { App, type PluginManifest } from '@cloudbeaver/core-di'; import { executionExceptionContext, SyncExecutor } from '@cloudbeaver/core-executor'; -import { coreManifests } from './manifest'; +import { coreManifests } from './manifest.js'; export async function bootstrap(plugins: PluginManifest[]): Promise { configure({ enforceActions: 'never' }); @@ -25,7 +25,7 @@ export async function bootstrap(plugins: PluginManifest[]): Promise { exception = e; } - const { renderLayout } = await import('./renderLayout'); + const { renderLayout } = await import('./renderLayout.js'); const render = renderLayout(app.getServiceProvider()); const unmountExecutor = new SyncExecutor(); diff --git a/webapp/packages/core-bootstrap/src/index.ts b/webapp/packages/core-bootstrap/src/index.ts index 249d37d7c9..1703f34439 100644 --- a/webapp/packages/core-bootstrap/src/index.ts +++ b/webapp/packages/core-bootstrap/src/index.ts @@ -1,6 +1,13 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ // reexports -import { coreManifests } from './manifest'; +import { coreManifests } from './manifest.js'; -export * from './bootstrap'; +export * from './bootstrap.js'; export default coreManifests; diff --git a/webapp/packages/core-bootstrap/src/manifest.ts b/webapp/packages/core-bootstrap/src/manifest.ts index ad389f2f55..870ee5ae55 100644 --- a/webapp/packages/core-bootstrap/src/manifest.ts +++ b/webapp/packages/core-bootstrap/src/manifest.ts @@ -14,7 +14,7 @@ import { coreBrowserCookiesManifest } from '@cloudbeaver/core-browser-cookies'; import { coreBrowserSettingsManifest } from '@cloudbeaver/core-browser-settings'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreConnectionsManifest } from '@cloudbeaver/core-connections'; -import { coreDIManifest, PluginManifest } from '@cloudbeaver/core-di'; +import { coreDIManifest, type PluginManifest } from '@cloudbeaver/core-di'; import { coreDialogsManifest } from '@cloudbeaver/core-dialogs'; import { coreEventsManifest } from '@cloudbeaver/core-events'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; diff --git a/webapp/packages/core-bootstrap/src/renderLayout.tsx b/webapp/packages/core-bootstrap/src/renderLayout.tsx index db85c817bd..1392f46704 100644 --- a/webapp/packages/core-bootstrap/src/renderLayout.tsx +++ b/webapp/packages/core-bootstrap/src/renderLayout.tsx @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { Suspense } from 'react'; -import { createRoot, Root } from 'react-dom/client'; +import { createRoot, type Root } from 'react-dom/client'; import { BodyLazy } from '@cloudbeaver/core-app'; import { DisplayError, ErrorBoundary, Loader, s } from '@cloudbeaver/core-blocks'; diff --git a/webapp/packages/core-browser-cookies/package.json b/webapp/packages/core-browser-cookies/package.json index 6caf2402ec..4ef01cf440 100644 --- a/webapp/packages/core-browser-cookies/package.json +++ b/webapp/packages/core-browser-cookies/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-browser-cookies", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-browser-cookies/src/index.ts b/webapp/packages/core-browser-cookies/src/index.ts index d662748372..ca960d6fc5 100644 --- a/webapp/packages/core-browser-cookies/src/index.ts +++ b/webapp/packages/core-browser-cookies/src/index.ts @@ -1,2 +1,9 @@ -export * from './CookiesService'; -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './CookiesService.js'; +export * from './manifest.js'; diff --git a/webapp/packages/core-browser-cookies/src/manifest.ts b/webapp/packages/core-browser-cookies/src/manifest.ts index 8d6747e401..ebd0e65276 100644 --- a/webapp/packages/core-browser-cookies/src/manifest.ts +++ b/webapp/packages/core-browser-cookies/src/manifest.ts @@ -12,5 +12,5 @@ export const coreBrowserCookiesManifest: PluginManifest = { name: 'Core Browser Cookies', }, - providers: [() => import('./CookiesService').then(m => m.CookiesService)], + providers: [() => import('./CookiesService.js').then(m => m.CookiesService)], }; diff --git a/webapp/packages/core-browser-settings/package.json b/webapp/packages/core-browser-settings/package.json index 1a11eece6c..d090d8d6b9 100644 --- a/webapp/packages/core-browser-settings/package.json +++ b/webapp/packages/core-browser-settings/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-browser-settings", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-browser-settings/src/BROWSER_COOKIES_SETTINGS_GROUP.ts b/webapp/packages/core-browser-settings/src/BROWSER_COOKIES_SETTINGS_GROUP.ts index 13bdc939bc..3841878e32 100644 --- a/webapp/packages/core-browser-settings/src/BROWSER_COOKIES_SETTINGS_GROUP.ts +++ b/webapp/packages/core-browser-settings/src/BROWSER_COOKIES_SETTINGS_GROUP.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { BROWSER_SETTINGS_GROUP } from './BROWSER_SETTINGS_GROUP'; +import { BROWSER_SETTINGS_GROUP } from './BROWSER_SETTINGS_GROUP.js'; export const BROWSER_COOKIES_SETTINGS_GROUP = BROWSER_SETTINGS_GROUP.createSubGroup('core_browser_settings_cookies_settings_group'); diff --git a/webapp/packages/core-browser-settings/src/BrowserSettingsService.test.ts b/webapp/packages/core-browser-settings/src/BrowserSettingsService.test.ts index 5f305360b2..a432037855 100644 --- a/webapp/packages/core-browser-settings/src/BrowserSettingsService.test.ts +++ b/webapp/packages/core-browser-settings/src/BrowserSettingsService.test.ts @@ -11,21 +11,21 @@ import { coreBrowserManifest } from '@cloudbeaver/core-browser'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { createApp } from '@cloudbeaver/tests-runner'; -import { BrowserSettingsService } from './BrowserSettingsService'; -import { coreBrowserSettingsManifest } from './manifest'; +import { BrowserSettingsService } from './BrowserSettingsService.js'; +import { coreBrowserSettingsManifest } from './manifest.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint)); diff --git a/webapp/packages/core-browser-settings/src/LocaleService.ts b/webapp/packages/core-browser-settings/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/core-browser-settings/src/LocaleService.ts +++ b/webapp/packages/core-browser-settings/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-browser-settings/src/index.ts b/webapp/packages/core-browser-settings/src/index.ts index 295a5758ab..6911ec220a 100644 --- a/webapp/packages/core-browser-settings/src/index.ts +++ b/webapp/packages/core-browser-settings/src/index.ts @@ -1,2 +1,9 @@ -export * from './BrowserSettingsService'; -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './BrowserSettingsService.js'; +export * from './manifest.js'; diff --git a/webapp/packages/core-browser-settings/src/manifest.ts b/webapp/packages/core-browser-settings/src/manifest.ts index fe997de14f..33d11d082d 100644 --- a/webapp/packages/core-browser-settings/src/manifest.ts +++ b/webapp/packages/core-browser-settings/src/manifest.ts @@ -13,7 +13,7 @@ export const coreBrowserSettingsManifest: PluginManifest = { }, providers: [ - () => import('./BrowserSettingsService').then(m => m.BrowserSettingsService), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./BrowserSettingsService.js').then(m => m.BrowserSettingsService), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/core-browser/package.json b/webapp/packages/core-browser/package.json index d61b8816b8..e5baa2b99e 100644 --- a/webapp/packages/core-browser/package.json +++ b/webapp/packages/core-browser/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-browser", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-browser/src/IndexedDB/IndexedDB.ts b/webapp/packages/core-browser/src/IndexedDB/IndexedDB.ts index e84c6ea5f4..f14c8723d3 100644 --- a/webapp/packages/core-browser/src/IndexedDB/IndexedDB.ts +++ b/webapp/packages/core-browser/src/IndexedDB/IndexedDB.ts @@ -5,6 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import IndexedDB, { Table as IndexedDBTable } from 'dexie'; +import DexieConstructor, { type Dexie, type DexieConstructor as DexieConstructorType, type Table as IndexedDBTable } from 'dexie'; -export { IndexedDB, type IndexedDBTable }; +export const IndexedDB = DexieConstructor as unknown as DexieConstructorType; +export type IndexedDB = Dexie; +export { type IndexedDBTable }; diff --git a/webapp/packages/core-browser/src/IndexedDB/IndexedDBService.ts b/webapp/packages/core-browser/src/IndexedDB/IndexedDBService.ts index dbc31179c3..58b43da58f 100644 --- a/webapp/packages/core-browser/src/IndexedDB/IndexedDBService.ts +++ b/webapp/packages/core-browser/src/IndexedDB/IndexedDBService.ts @@ -7,7 +7,7 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import type { IndexedDB } from './IndexedDB'; +import type { IndexedDB } from './IndexedDB.js'; @injectable() export class IndexedDBService { diff --git a/webapp/packages/core-browser/src/LocalStorageSaveService.ts b/webapp/packages/core-browser/src/LocalStorageSaveService.ts index b8c72ba623..fa299e0932 100644 --- a/webapp/packages/core-browser/src/LocalStorageSaveService.ts +++ b/webapp/packages/core-browser/src/LocalStorageSaveService.ts @@ -5,13 +5,13 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { entries, IReactionDisposer, keys, observable, ObservableMap, reaction, remove, runInAction, set, toJS } from 'mobx'; +import { entries, type IReactionDisposer, keys, observable, ObservableMap, reaction, remove, runInAction, set, toJS } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; -import { IndexedDB, type IndexedDBTable } from './IndexedDB/IndexedDB'; -import { IndexedDBService } from './IndexedDB/IndexedDBService'; +import { IndexedDB, type IndexedDBTable } from './IndexedDB/IndexedDB.js'; +import { IndexedDBService } from './IndexedDB/IndexedDBService.js'; interface ILocalStorageElement | Map> { storeId: string; diff --git a/webapp/packages/core-browser/src/ServiceWorkerBootstrap.ts b/webapp/packages/core-browser/src/ServiceWorkerBootstrap.ts index 42560c931a..ad8276ade5 100644 --- a/webapp/packages/core-browser/src/ServiceWorkerBootstrap.ts +++ b/webapp/packages/core-browser/src/ServiceWorkerBootstrap.ts @@ -7,17 +7,17 @@ */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { ServiceWorkerService } from './ServiceWorkerService'; +import { ServiceWorkerService } from './ServiceWorkerService.js'; @injectable() export class ServiceWorkerBootstrap extends Bootstrap { constructor(private readonly serviceWorkerService: ServiceWorkerService) { super(); } - async register(): Promise { + override async register(): Promise { await this.serviceWorkerService.register(); } - async load(): Promise { + override async load(): Promise { await this.serviceWorkerService.load(); } } diff --git a/webapp/packages/core-browser/src/ServiceWorkerService.ts b/webapp/packages/core-browser/src/ServiceWorkerService.ts index a1d0199e0c..4a0990867e 100644 --- a/webapp/packages/core-browser/src/ServiceWorkerService.ts +++ b/webapp/packages/core-browser/src/ServiceWorkerService.ts @@ -6,10 +6,10 @@ * you may not use this file except in compliance with the License. */ /// -import { Workbox, WorkboxLifecycleEvent, WorkboxMessageEvent } from 'workbox-window'; +import { Workbox, type WorkboxLifecycleEvent, type WorkboxMessageEvent } from 'workbox-window'; import { Disposable, injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; import { GlobalConstants } from '@cloudbeaver/core-utils'; export interface IUpdateData { @@ -45,7 +45,7 @@ export class ServiceWorkerService extends Disposable { } try { - if (process.env.NODE_ENV === 'development') { + if (process.env['NODE_ENV'] === 'development') { const registration = await navigator.serviceWorker.getRegistration(this.workerURL); registration?.unregister(); } else { @@ -87,7 +87,7 @@ export class ServiceWorkerService extends Disposable { } } - dispose(): void { + override dispose(): void { if (this.updateIntervalId) { clearInterval(this.updateIntervalId); } diff --git a/webapp/packages/core-browser/src/index.ts b/webapp/packages/core-browser/src/index.ts index 829264881a..c70da52598 100644 --- a/webapp/packages/core-browser/src/index.ts +++ b/webapp/packages/core-browser/src/index.ts @@ -1,6 +1,13 @@ -export * from './IndexedDB/IndexedDBService'; -export * from './IndexedDB/IndexedDB'; -export * from './LocalStorageSaveService'; -export * from './manifest'; -export * from './selectFiles'; -export * from './ServiceWorkerService'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './IndexedDB/IndexedDBService.js'; +export * from './IndexedDB/IndexedDB.js'; +export * from './LocalStorageSaveService.js'; +export * from './manifest.js'; +export * from './selectFiles.js'; +export * from './ServiceWorkerService.js'; diff --git a/webapp/packages/core-browser/src/manifest.ts b/webapp/packages/core-browser/src/manifest.ts index 918bcbe27d..b93b5d50df 100644 --- a/webapp/packages/core-browser/src/manifest.ts +++ b/webapp/packages/core-browser/src/manifest.ts @@ -13,11 +13,11 @@ export const coreBrowserManifest: PluginManifest = { }, preload: [ - () => import('./ServiceWorkerBootstrap').then(module => module.ServiceWorkerBootstrap), - () => import('./ServiceWorkerService').then(module => module.ServiceWorkerService), + () => import('./ServiceWorkerBootstrap.js').then(module => module.ServiceWorkerBootstrap), + () => import('./ServiceWorkerService.js').then(module => module.ServiceWorkerService), ], providers: [ - () => import('./IndexedDB/IndexedDBService').then(module => module.IndexedDBService), - () => import('./LocalStorageSaveService').then(module => module.LocalStorageSaveService), + () => import('./IndexedDB/IndexedDBService.js').then(module => module.IndexedDBService), + () => import('./LocalStorageSaveService.js').then(module => module.LocalStorageSaveService), ], }; diff --git a/webapp/packages/core-browser/src/service-worker.ts b/webapp/packages/core-browser/src/service-worker.ts index 2d104d07df..a0d79c7ea7 100644 --- a/webapp/packages/core-browser/src/service-worker.ts +++ b/webapp/packages/core-browser/src/service-worker.ts @@ -6,10 +6,10 @@ * you may not use this file except in compliance with the License. */ import { CacheableResponsePlugin } from 'workbox-cacheable-response'; -import { cacheNames, clientsClaim, WorkboxPlugin } from 'workbox-core'; +import { cacheNames, clientsClaim, type WorkboxPlugin } from 'workbox-core'; import { ExpirationPlugin } from 'workbox-expiration'; import { addPlugins, matchPrecache, precacheAndRoute } from 'workbox-precaching'; -import { getOrCreatePrecacheController } from 'workbox-precaching/utils/getOrCreatePrecacheController'; +import { getOrCreatePrecacheController } from 'workbox-precaching/utils/getOrCreatePrecacheController.js'; import { registerRoute } from 'workbox-routing'; import { CacheFirst } from 'workbox-strategies'; @@ -68,7 +68,7 @@ function createUpdateProgressPlugin(): WorkboxPlugin { return { handlerWillStart: async ({ request, state }) => { if (state) { - state.originalRequest = request; + state['originalRequest'] = request; } if (hasPreviousCache === null) { hasPreviousCache = await caches.has(cacheNames.precache); diff --git a/webapp/packages/core-client-activity/package.json b/webapp/packages/core-client-activity/package.json index 22722cebb9..53f143f78e 100644 --- a/webapp/packages/core-client-activity/package.json +++ b/webapp/packages/core-client-activity/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-client-activity", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-client-activity/src/ClientActivityService.ts b/webapp/packages/core-client-activity/src/ClientActivityService.ts index 73d71506b0..01e01aec03 100644 --- a/webapp/packages/core-client-activity/src/ClientActivityService.ts +++ b/webapp/packages/core-client-activity/src/ClientActivityService.ts @@ -8,7 +8,7 @@ import { makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; const INACTIVE_PERIOD_TIME = 1000 * 60; diff --git a/webapp/packages/core-client-activity/src/index.ts b/webapp/packages/core-client-activity/src/index.ts index b06c56627e..a293ace1ca 100644 --- a/webapp/packages/core-client-activity/src/index.ts +++ b/webapp/packages/core-client-activity/src/index.ts @@ -1,2 +1,9 @@ -export * from './ClientActivityService'; -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './ClientActivityService.js'; +export * from './manifest.js'; diff --git a/webapp/packages/core-client-activity/src/manifest.ts b/webapp/packages/core-client-activity/src/manifest.ts index 1eee2a2a97..a12ff21c49 100644 --- a/webapp/packages/core-client-activity/src/manifest.ts +++ b/webapp/packages/core-client-activity/src/manifest.ts @@ -12,5 +12,5 @@ export const coreClientActivityManifest: PluginManifest = { name: 'Core Client Activity', }, - providers: [() => import('./ClientActivityService').then(m => m.ClientActivityService)], + providers: [() => import('./ClientActivityService.js').then(m => m.ClientActivityService)], }; diff --git a/webapp/packages/core-connections/package.json b/webapp/packages/core-connections/package.json index 73087cf8f8..07cb8090e8 100644 --- a/webapp/packages/core-connections/package.json +++ b/webapp/packages/core-connections/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-connections", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-connections/src/ConnectionDialectResource.ts b/webapp/packages/core-connections/src/ConnectionDialectResource.ts index c56abbe7bb..1551a34353 100644 --- a/webapp/packages/core-connections/src/ConnectionDialectResource.ts +++ b/webapp/packages/core-connections/src/ConnectionDialectResource.ts @@ -9,16 +9,16 @@ import { injectable } from '@cloudbeaver/core-di'; import { ExecutorInterrupter } from '@cloudbeaver/core-executor'; import { ProjectsService } from '@cloudbeaver/core-projects'; import { CachedMapAllKey, CachedMapResource, type ResourceKey, resourceKeyList, ResourceKeyUtils } from '@cloudbeaver/core-resource'; -import { GraphQLService, SqlDialectInfo } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type SqlDialectInfo } from '@cloudbeaver/core-sdk'; -import type { IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA'; -import type { IConnectionExecutionContextInfo } from './ConnectionExecutionContext/ConnectionExecutionContextResource'; +import type { IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA.js'; +import type { IConnectionExecutionContextInfo } from './ConnectionExecutionContext/ConnectionExecutionContextResource.js'; import { ConnectionInfoActiveProjectKey, ConnectionInfoProjectKey, ConnectionInfoResource, isConnectionInfoParamEqual, -} from './ConnectionInfoResource'; +} from './ConnectionInfoResource.js'; export type ConnectionDialect = SqlDialectInfo; @@ -78,7 +78,7 @@ export class ConnectionDialectResource extends CachedMapResource ({ projectId })); @@ -208,7 +208,7 @@ export class ConnectionExecutionContextResource extends CachedMapResource this.isOutdated(key, includes)); if (!refresh && outdated.length === 1) { - originalKey = outdated[0]; // load only single connection + originalKey = outdated[0]!; // load only single connection } } @@ -552,7 +552,7 @@ export class ConnectionInfoResource extends CachedMapResource { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; case 'de': - return (await import('./locales/de')).default; + return (await import('./locales/de.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-connections/src/ConnectionsManagerService.ts b/webapp/packages/core-connections/src/ConnectionsManagerService.ts index 0a4a68a07f..1669a45689 100644 --- a/webapp/packages/core-connections/src/ConnectionsManagerService.ts +++ b/webapp/packages/core-connections/src/ConnectionsManagerService.ts @@ -11,13 +11,13 @@ import { ConfirmationDialogDelete, ProcessSnackbar } from '@cloudbeaver/core-blo import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; -import { Executor, ExecutorInterrupter, IExecutor } from '@cloudbeaver/core-executor'; -import { ProjectInfo, projectInfoSortByName, ProjectsService } from '@cloudbeaver/core-projects'; +import { Executor, ExecutorInterrupter, type IExecutor } from '@cloudbeaver/core-executor'; +import { type ProjectInfo, projectInfoSortByName, ProjectsService } from '@cloudbeaver/core-projects'; import { isArraysEqual } from '@cloudbeaver/core-utils'; -import type { IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA'; -import { Connection, ConnectionInfoResource, createConnectionParam, isConnectionInfoParamEqual } from './ConnectionInfoResource'; -import { ContainerResource, IStructContainers, ObjectContainer } from './ContainerResource'; +import type { IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA.js'; +import { type Connection, ConnectionInfoResource, createConnectionParam, isConnectionInfoParamEqual } from './ConnectionInfoResource.js'; +import { ContainerResource, type IStructContainers, type ObjectContainer } from './ContainerResource.js'; export interface IRequireConnectionExecutorData { key: IConnectionInfoParams; diff --git a/webapp/packages/core-connections/src/ContainerResource.ts b/webapp/packages/core-connections/src/ContainerResource.ts index 3363007e28..2fed537d40 100644 --- a/webapp/packages/core-connections/src/ContainerResource.ts +++ b/webapp/packages/core-connections/src/ContainerResource.ts @@ -9,11 +9,11 @@ import { AppAuthService } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; import { ExecutorInterrupter } from '@cloudbeaver/core-executor'; import { CachedMapResource, isResourceAlias, type ResourceKey, resourceKeyList, ResourceKeyUtils } from '@cloudbeaver/core-resource'; -import { GraphQLService, NavNodeInfoFragment } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type NavNodeInfoFragment } from '@cloudbeaver/core-sdk'; import { isNull } from '@cloudbeaver/core-utils'; -import type { IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA'; -import { ConnectionInfoActiveProjectKey, ConnectionInfoResource, createConnectionParam } from './ConnectionInfoResource'; +import type { IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA.js'; +import { ConnectionInfoActiveProjectKey, ConnectionInfoResource, createConnectionParam } from './ConnectionInfoResource.js'; export type ObjectContainer = NavNodeInfoFragment; export interface ICatalogData { @@ -116,7 +116,7 @@ export class ContainerResource extends CachedMapResource('connection'); diff --git a/webapp/packages/core-connections/src/NavTree/ConnectionNavNodeService.ts b/webapp/packages/core-connections/src/NavTree/ConnectionNavNodeService.ts index 9786cc9570..92d14810af 100644 --- a/webapp/packages/core-connections/src/NavTree/ConnectionNavNodeService.ts +++ b/webapp/packages/core-connections/src/NavTree/ConnectionNavNodeService.ts @@ -8,25 +8,25 @@ import { action, makeObservable } from 'mobx'; import { Dependency, injectable } from '@cloudbeaver/core-di'; -import { ExecutorInterrupter, IAsyncContextLoader, IExecutionContextProvider } from '@cloudbeaver/core-executor'; +import { ExecutorInterrupter, type IAsyncContextLoader, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { - INodeNavigationData, + type INodeNavigationData, NavNodeInfoResource, NavNodeManagerService, NavTreeResource, NodeManagerUtils, } from '@cloudbeaver/core-navigation-tree'; import { getProjectNodeId } from '@cloudbeaver/core-projects'; -import { isResourceAlias, type ResourceKey, resourceKeyList, ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { isResourceAlias, type ResourceKey, resourceKeyList, type ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { ServerEventId } from '@cloudbeaver/core-root'; -import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA'; -import { ConnectionFolderEventHandler, IConnectionFolderEvent } from '../ConnectionFolderEventHandler'; -import { Connection, ConnectionInfoActiveProjectKey, ConnectionInfoResource, createConnectionParam } from '../ConnectionInfoResource'; -import { ConnectionsManagerService } from '../ConnectionsManagerService'; -import { ContainerResource } from '../ContainerResource'; -import { getConnectionParentId } from './getConnectionParentId'; -import { getFolderNodeParents } from './getFolderNodeParents'; +import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA.js'; +import { ConnectionFolderEventHandler, type IConnectionFolderEvent } from '../ConnectionFolderEventHandler.js'; +import { type Connection, ConnectionInfoActiveProjectKey, ConnectionInfoResource, createConnectionParam } from '../ConnectionInfoResource.js'; +import { ConnectionsManagerService } from '../ConnectionsManagerService.js'; +import { ContainerResource } from '../ContainerResource.js'; +import { getConnectionParentId } from './getConnectionParentId.js'; +import { getFolderNodeParents } from './getFolderNodeParents.js'; @injectable() export class ConnectionNavNodeService extends Dependency { @@ -65,7 +65,7 @@ export class ConnectionNavNodeService extends Dependency { const parents = data.nodePaths.map(nodeId => { const parents = getFolderNodeParents(nodeId); - return parents[parents.length - 1]; + return parents[parents.length - 1]!; }); this.navTreeResource.markOutdated(resourceKeyList(parents)); }, @@ -78,7 +78,7 @@ export class ConnectionNavNodeService extends Dependency { const parents = data.nodePaths.map(nodeId => { const parents = getFolderNodeParents(nodeId); - return parents[parents.length - 1]; + return parents[parents.length - 1]!; }); this.navTreeResource.deleteInNode( diff --git a/webapp/packages/core-connections/src/NavTree/NavNodeExtensionsService.ts b/webapp/packages/core-connections/src/NavTree/NavNodeExtensionsService.ts index 500d566d5e..ccd6c1eafa 100644 --- a/webapp/packages/core-connections/src/NavTree/NavNodeExtensionsService.ts +++ b/webapp/packages/core-connections/src/NavTree/NavNodeExtensionsService.ts @@ -10,11 +10,11 @@ import type { IExtension } from '@cloudbeaver/core-extensions'; import { NavNodeInfoResource, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; import { projectProvider } from '@cloudbeaver/core-projects'; -import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA'; -import { ConnectionInfoResource, createConnectionParam } from '../ConnectionInfoResource'; -import { connectionProvider } from '../extensions/IConnectionProvider'; -import { objectCatalogProvider } from '../extensions/IObjectCatalogProvider'; -import { objectSchemaProvider } from '../extensions/IObjectSchemaProvider'; +import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA.js'; +import { ConnectionInfoResource, createConnectionParam } from '../ConnectionInfoResource.js'; +import { connectionProvider } from '../extensions/IConnectionProvider.js'; +import { objectCatalogProvider } from '../extensions/IObjectCatalogProvider.js'; +import { objectSchemaProvider } from '../extensions/IObjectSchemaProvider.js'; @injectable() export class NavNodeExtensionsService { diff --git a/webapp/packages/core-connections/src/NavTree/getConnectionFolderId.ts b/webapp/packages/core-connections/src/NavTree/getConnectionFolderId.ts index 7e4c2afe17..87c31961be 100644 --- a/webapp/packages/core-connections/src/NavTree/getConnectionFolderId.ts +++ b/webapp/packages/core-connections/src/NavTree/getConnectionFolderId.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IConnectionFolderParam } from '../ConnectionFolderResource'; +import type { IConnectionFolderParam } from '../ConnectionFolderResource.js'; export function getConnectionFolderId(key: IConnectionFolderParam): string { return `folder://${key.projectId}/${key.folderId}`; diff --git a/webapp/packages/core-connections/src/NavTree/getConnectionFolderIdFromNodeId.ts b/webapp/packages/core-connections/src/NavTree/getConnectionFolderIdFromNodeId.ts index 55b9f9b1c6..eed9c2e647 100644 --- a/webapp/packages/core-connections/src/NavTree/getConnectionFolderIdFromNodeId.ts +++ b/webapp/packages/core-connections/src/NavTree/getConnectionFolderIdFromNodeId.ts @@ -5,15 +5,15 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IConnectionFolderParam } from '../ConnectionFolderResource'; -import { createConnectionFolderParam } from '../createConnectionFolderParam'; +import type { IConnectionFolderParam } from '../ConnectionFolderResource.js'; +import { createConnectionFolderParam } from '../createConnectionFolderParam.js'; export function getConnectionFolderIdFromNodeId(nodeId: string): IConnectionFolderParam | undefined { const data = /^folder:\/\/(.*?)\/(.*)$/gi.exec(nodeId); if (data) { const [t, projectId, folderId] = data; - return createConnectionFolderParam(projectId, folderId); + return createConnectionFolderParam(projectId!, folderId!); } return undefined; diff --git a/webapp/packages/core-connections/src/NavTree/getConnectionParentId.ts b/webapp/packages/core-connections/src/NavTree/getConnectionParentId.ts index a0ccac7984..79b26295e1 100644 --- a/webapp/packages/core-connections/src/NavTree/getConnectionParentId.ts +++ b/webapp/packages/core-connections/src/NavTree/getConnectionParentId.ts @@ -7,7 +7,7 @@ */ import { getProjectNodeId } from '@cloudbeaver/core-projects'; -import { getConnectionFolderId } from './getConnectionFolderId'; +import { getConnectionFolderId } from './getConnectionFolderId.js'; export function getConnectionParentId(projectId: string, folderId?: string): string { if (!folderId) { diff --git a/webapp/packages/core-connections/src/NavTree/getFolderNodeParents.ts b/webapp/packages/core-connections/src/NavTree/getFolderNodeParents.ts index 88767b82c6..a5d8babc7c 100644 --- a/webapp/packages/core-connections/src/NavTree/getFolderNodeParents.ts +++ b/webapp/packages/core-connections/src/NavTree/getFolderNodeParents.ts @@ -8,13 +8,13 @@ import { getProjectNodeId } from '@cloudbeaver/core-projects'; import { getPathParents } from '@cloudbeaver/core-utils'; -import { isFolderNodeId } from './isFolderNodeId'; +import { isFolderNodeId } from './isFolderNodeId.js'; export function getFolderNodeParents(nodeId: string): string[] { if (isFolderNodeId(nodeId)) { const parents = getPathParents(nodeId); - return [parents[0], getProjectNodeId(parents[1].replace('folder://', '')), ...parents.slice(2)]; + return [parents[0]!, getProjectNodeId(parents[1]!.replace('folder://', '')), ...parents.slice(2)]; } return []; diff --git a/webapp/packages/core-connections/src/NetworkHandlerResource.ts b/webapp/packages/core-connections/src/NetworkHandlerResource.ts index ae0485c20f..8808572f38 100644 --- a/webapp/packages/core-connections/src/NetworkHandlerResource.ts +++ b/webapp/packages/core-connections/src/NetworkHandlerResource.ts @@ -9,7 +9,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { CachedMapAllKey, CachedMapResource, resourceKeyList } from '@cloudbeaver/core-resource'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { GraphQLService, NetworkHandlerConfigInput, NetworkHandlerDescriptor } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type NetworkHandlerConfigInput, type NetworkHandlerDescriptor } from '@cloudbeaver/core-sdk'; export const SSH_TUNNEL_ID = 'ssh_tunnel'; diff --git a/webapp/packages/core-connections/src/createConnectionFolderParam.ts b/webapp/packages/core-connections/src/createConnectionFolderParam.ts index 81412e0029..018d41a8d1 100644 --- a/webapp/packages/core-connections/src/createConnectionFolderParam.ts +++ b/webapp/packages/core-connections/src/createConnectionFolderParam.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ConnectionFolder, IConnectionFolderParam } from './ConnectionFolderResource'; +import type { ConnectionFolder, IConnectionFolderParam } from './ConnectionFolderResource.js'; export function createConnectionFolderParam(projectId: string, folder: ConnectionFolder): IConnectionFolderParam; export function createConnectionFolderParam(projectId: string, folderId: string): IConnectionFolderParam; diff --git a/webapp/packages/core-connections/src/extensions/IConnectionProvider.ts b/webapp/packages/core-connections/src/extensions/IConnectionProvider.ts index b59eca3800..2b0305427b 100644 --- a/webapp/packages/core-connections/src/extensions/IConnectionProvider.ts +++ b/webapp/packages/core-connections/src/extensions/IConnectionProvider.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; -import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA'; +import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA.js'; const connectionProviderSymbol = Symbol('@extension/ConnectionProvider'); diff --git a/webapp/packages/core-connections/src/extensions/IConnectionSetter.ts b/webapp/packages/core-connections/src/extensions/IConnectionSetter.ts index 74e8cebc18..4f2544f22b 100644 --- a/webapp/packages/core-connections/src/extensions/IConnectionSetter.ts +++ b/webapp/packages/core-connections/src/extensions/IConnectionSetter.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; -import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA'; +import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA.js'; const connectionSetterSymbol = Symbol('@extension/ConnectionSetter'); diff --git a/webapp/packages/core-connections/src/extensions/IExecutionContextProvider.ts b/webapp/packages/core-connections/src/extensions/IExecutionContextProvider.ts index 599597d0f9..144902cf7f 100644 --- a/webapp/packages/core-connections/src/extensions/IExecutionContextProvider.ts +++ b/webapp/packages/core-connections/src/extensions/IExecutionContextProvider.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; -import type { IConnectionExecutionContextInfo } from '../ConnectionExecutionContext/ConnectionExecutionContextResource'; +import type { IConnectionExecutionContextInfo } from '../ConnectionExecutionContext/ConnectionExecutionContextResource.js'; const EXECUTION_CONTEXT_PROVIDER_SYMBOL = Symbol('@extension/ExecutionContextProvider'); diff --git a/webapp/packages/core-connections/src/extensions/IObjectCatalogProvider.ts b/webapp/packages/core-connections/src/extensions/IObjectCatalogProvider.ts index 9d52f048b1..12946c7bae 100644 --- a/webapp/packages/core-connections/src/extensions/IObjectCatalogProvider.ts +++ b/webapp/packages/core-connections/src/extensions/IObjectCatalogProvider.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; const objectCatalogProviderSymbol = Symbol('@extension/ObjectCatalogProvider'); diff --git a/webapp/packages/core-connections/src/extensions/IObjectCatalogSetter.ts b/webapp/packages/core-connections/src/extensions/IObjectCatalogSetter.ts index ff07870b7f..3039c62ddb 100644 --- a/webapp/packages/core-connections/src/extensions/IObjectCatalogSetter.ts +++ b/webapp/packages/core-connections/src/extensions/IObjectCatalogSetter.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; const objectCatalogSetterSymbol = Symbol('@extension/ObjectCatalogSetter'); diff --git a/webapp/packages/core-connections/src/extensions/IObjectSchemaProvider.ts b/webapp/packages/core-connections/src/extensions/IObjectSchemaProvider.ts index 3826544e67..7509d958f2 100644 --- a/webapp/packages/core-connections/src/extensions/IObjectSchemaProvider.ts +++ b/webapp/packages/core-connections/src/extensions/IObjectSchemaProvider.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; const objectSchemaProviderSymbol = Symbol('@extension/ObjectSchemaProvider'); diff --git a/webapp/packages/core-connections/src/extensions/IObjectSchemaSetter.ts b/webapp/packages/core-connections/src/extensions/IObjectSchemaSetter.ts index 0af4d424cf..3eef638232 100644 --- a/webapp/packages/core-connections/src/extensions/IObjectSchemaSetter.ts +++ b/webapp/packages/core-connections/src/extensions/IObjectSchemaSetter.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; const objectSchemaSetterSymbol = Symbol('@extension/ObjectSchemaSetter'); diff --git a/webapp/packages/core-connections/src/index.ts b/webapp/packages/core-connections/src/index.ts index 9e1b444c2f..7f94619ea1 100644 --- a/webapp/packages/core-connections/src/index.ts +++ b/webapp/packages/core-connections/src/index.ts @@ -5,49 +5,49 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './ConnectionExecutionContext/ConnectionExecutionContext'; -export * from './ConnectionExecutionContext/ConnectionExecutionContextResource'; -export * from './ConnectionExecutionContext/ConnectionExecutionContextService'; -export * from './ConnectionExecutionContext/IConnectionExecutionContext'; +export * from './ConnectionExecutionContext/ConnectionExecutionContext.js'; +export * from './ConnectionExecutionContext/ConnectionExecutionContextResource.js'; +export * from './ConnectionExecutionContext/ConnectionExecutionContextService.js'; +export * from './ConnectionExecutionContext/IConnectionExecutionContext.js'; -export * from './DataContexts/DATA_CONTEXT_CONNECTION'; +export * from './DataContexts/DATA_CONTEXT_CONNECTION.js'; -export * from './extensions/IObjectCatalogProvider'; -export * from './extensions/IObjectCatalogSetter'; -export * from './extensions/IObjectSchemaProvider'; -export * from './extensions/IObjectSchemaSetter'; -export * from './extensions/IExecutionContextProvider'; -export * from './NavTree/ConnectionNavNodeService'; -export * from './NavTree/NavNodeExtensionsService'; -export * from './NavTree/getConnectionFolderIdFromNodeId'; -export * from './NavTree/getConnectionFolderId'; -export * from './NavTree/getConnectionParentId'; -export * from './NavTree/getFolderNodeParents'; -export * from './NavTree/NAV_NODE_TYPE_CONNECTION'; +export * from './extensions/IObjectCatalogProvider.js'; +export * from './extensions/IObjectCatalogSetter.js'; +export * from './extensions/IObjectSchemaProvider.js'; +export * from './extensions/IObjectSchemaSetter.js'; +export * from './extensions/IExecutionContextProvider.js'; +export * from './NavTree/ConnectionNavNodeService.js'; +export * from './NavTree/NavNodeExtensionsService.js'; +export * from './NavTree/getConnectionFolderIdFromNodeId.js'; +export * from './NavTree/getConnectionFolderId.js'; +export * from './NavTree/getConnectionParentId.js'; +export * from './NavTree/getFolderNodeParents.js'; +export * from './NavTree/NAV_NODE_TYPE_CONNECTION.js'; -export * from './extensions/IConnectionProvider'; -export * from './extensions/IConnectionSetter'; -export * from './ConnectionsManagerService'; -export * from './ConnectionFolderResource'; -export * from './ConnectionDialectResource'; -export * from './ConnectionInfoEventHandler'; -export * from './ConnectionInfoResource'; -export * from './CONNECTIONS_SETTINGS_GROUP'; -export * from './EConnectionFeature'; -export * from './ConnectionsSettingsService'; -export * from './ConnectionToolsResource'; -export * from './ContainerResource'; -export * from './ConnectionsLocaleService'; -export * from './createConnectionFolderParam'; -export * from './DatabaseAuthModelsResource'; -export * from './ConnectionPublicSecretsResource'; -export * from './DatabaseConnection'; -export * from './DBDriverResource'; -export * from './CONNECTION_INFO_PARAM_SCHEMA'; -export * from './isJDBCConnection'; -export * from './NetworkHandlerResource'; -export * from './useConnectionInfo'; -export * from './useDBDriver'; -export * from './USER_NAME_PROPERTY_ID'; +export * from './extensions/IConnectionProvider.js'; +export * from './extensions/IConnectionSetter.js'; +export * from './ConnectionsManagerService.js'; +export * from './ConnectionFolderResource.js'; +export * from './ConnectionDialectResource.js'; +export * from './ConnectionInfoEventHandler.js'; +export * from './ConnectionInfoResource.js'; +export * from './CONNECTIONS_SETTINGS_GROUP.js'; +export * from './EConnectionFeature.js'; +export * from './ConnectionsSettingsService.js'; +export * from './ConnectionToolsResource.js'; +export * from './ContainerResource.js'; +export * from './ConnectionsLocaleService.js'; +export * from './createConnectionFolderParam.js'; +export * from './DatabaseAuthModelsResource.js'; +export * from './ConnectionPublicSecretsResource.js'; +export * from './DatabaseConnection.js'; +export * from './DBDriverResource.js'; +export * from './CONNECTION_INFO_PARAM_SCHEMA.js'; +export * from './isJDBCConnection.js'; +export * from './NetworkHandlerResource.js'; +export * from './useConnectionInfo.js'; +export * from './useDBDriver.js'; +export * from './USER_NAME_PROPERTY_ID.js'; -export { manifest as coreConnectionsManifest } from './manifest'; +export { manifest as coreConnectionsManifest } from './manifest.js'; diff --git a/webapp/packages/core-connections/src/isJDBCConnection.ts b/webapp/packages/core-connections/src/isJDBCConnection.ts index 87739665e5..8ad3346248 100644 --- a/webapp/packages/core-connections/src/isJDBCConnection.ts +++ b/webapp/packages/core-connections/src/isJDBCConnection.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { DatabaseConnection } from './DatabaseConnection'; -import type { DBDriver } from './DBDriverResource'; +import type { DatabaseConnection } from './DatabaseConnection.js'; +import type { DBDriver } from './DBDriverResource.js'; export function isJDBCConnection(driver?: DBDriver, connection?: DatabaseConnection): boolean { return connection?.useUrl || !driver?.sampleURL || false; diff --git a/webapp/packages/core-connections/src/manifest.ts b/webapp/packages/core-connections/src/manifest.ts index 375e803ebf..8509e16ab8 100644 --- a/webapp/packages/core-connections/src/manifest.ts +++ b/webapp/packages/core-connections/src/manifest.ts @@ -13,23 +13,23 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./ConnectionFolderResource').then(m => m.ConnectionFolderResource), - () => import('./ConnectionExecutionContext/ConnectionExecutionContextResource').then(m => m.ConnectionExecutionContextResource), - () => import('./ConnectionExecutionContext/ConnectionExecutionContextService').then(m => m.ConnectionExecutionContextService), - () => import('./ConnectionsManagerService').then(m => m.ConnectionsManagerService), - () => import('./ConnectionInfoResource').then(m => m.ConnectionInfoResource), - () => import('./ConnectionToolsResource').then(m => m.ConnectionToolsResource), - () => import('./ContainerResource').then(m => m.ContainerResource), - () => import('./ConnectionsLocaleService').then(m => m.ConnectionsLocaleService), - () => import('./DatabaseAuthModelsResource').then(m => m.DatabaseAuthModelsResource), - () => import('./DBDriverResource').then(m => m.DBDriverResource), - () => import('./NetworkHandlerResource').then(m => m.NetworkHandlerResource), - () => import('./ConnectionDialectResource').then(m => m.ConnectionDialectResource), - () => import('./NavTree/ConnectionNavNodeService').then(m => m.ConnectionNavNodeService), - () => import('./NavTree/NavNodeExtensionsService').then(m => m.NavNodeExtensionsService), - () => import('./ConnectionInfoEventHandler').then(m => m.ConnectionInfoEventHandler), - () => import('./ConnectionFolderEventHandler').then(m => m.ConnectionFolderEventHandler), - () => import('./ConnectionsSettingsService').then(m => m.ConnectionsSettingsService), - () => import('./ConnectionPublicSecretsResource').then(m => m.ConnectionPublicSecretsResource), + () => import('./ConnectionFolderResource.js').then(m => m.ConnectionFolderResource), + () => import('./ConnectionExecutionContext/ConnectionExecutionContextResource.js').then(m => m.ConnectionExecutionContextResource), + () => import('./ConnectionExecutionContext/ConnectionExecutionContextService.js').then(m => m.ConnectionExecutionContextService), + () => import('./ConnectionsManagerService.js').then(m => m.ConnectionsManagerService), + () => import('./ConnectionInfoResource.js').then(m => m.ConnectionInfoResource), + () => import('./ConnectionToolsResource.js').then(m => m.ConnectionToolsResource), + () => import('./ContainerResource.js').then(m => m.ContainerResource), + () => import('./ConnectionsLocaleService.js').then(m => m.ConnectionsLocaleService), + () => import('./DatabaseAuthModelsResource.js').then(m => m.DatabaseAuthModelsResource), + () => import('./DBDriverResource.js').then(m => m.DBDriverResource), + () => import('./NetworkHandlerResource.js').then(m => m.NetworkHandlerResource), + () => import('./ConnectionDialectResource.js').then(m => m.ConnectionDialectResource), + () => import('./NavTree/ConnectionNavNodeService.js').then(m => m.ConnectionNavNodeService), + () => import('./NavTree/NavNodeExtensionsService.js').then(m => m.NavNodeExtensionsService), + () => import('./ConnectionInfoEventHandler.js').then(m => m.ConnectionInfoEventHandler), + () => import('./ConnectionFolderEventHandler.js').then(m => m.ConnectionFolderEventHandler), + () => import('./ConnectionsSettingsService.js').then(m => m.ConnectionsSettingsService), + () => import('./ConnectionPublicSecretsResource.js').then(m => m.ConnectionPublicSecretsResource), ], }; diff --git a/webapp/packages/core-connections/src/useConnectionInfo.ts b/webapp/packages/core-connections/src/useConnectionInfo.ts index 6bef7a288a..53fbe86dcf 100644 --- a/webapp/packages/core-connections/src/useConnectionInfo.ts +++ b/webapp/packages/core-connections/src/useConnectionInfo.ts @@ -10,9 +10,9 @@ import { computed, observable } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import type { IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA'; -import { Connection, ConnectionInfoResource } from './ConnectionInfoResource'; -import { ConnectionsManagerService } from './ConnectionsManagerService'; +import type { IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA.js'; +import { type Connection, ConnectionInfoResource } from './ConnectionInfoResource.js'; +import { ConnectionsManagerService } from './ConnectionsManagerService.js'; interface IPrivate extends IPublic { manager: ConnectionsManagerService; diff --git a/webapp/packages/core-connections/src/useDBDriver.ts b/webapp/packages/core-connections/src/useDBDriver.ts index 99ca515460..1cbe56777d 100644 --- a/webapp/packages/core-connections/src/useDBDriver.ts +++ b/webapp/packages/core-connections/src/useDBDriver.ts @@ -9,7 +9,7 @@ import { useCallback } from 'react'; import { useService } from '@cloudbeaver/core-di'; -import { DBDriverResource } from './DBDriverResource'; +import { DBDriverResource } from './DBDriverResource.js'; export function useDBDriver(driverId: string) { const service = useService(DBDriverResource); diff --git a/webapp/packages/core-data-context/package.json b/webapp/packages/core-data-context/package.json index 34b7b039fc..5b8b330e5e 100644 --- a/webapp/packages/core-data-context/package.json +++ b/webapp/packages/core-data-context/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-data-context", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-data-context/src/DataContext/DATA_CONTEXT_DI_PROVIDER.ts b/webapp/packages/core-data-context/src/DataContext/DATA_CONTEXT_DI_PROVIDER.ts index b7c898e515..1b99c94b15 100644 --- a/webapp/packages/core-data-context/src/DataContext/DATA_CONTEXT_DI_PROVIDER.ts +++ b/webapp/packages/core-data-context/src/DataContext/DATA_CONTEXT_DI_PROVIDER.ts @@ -7,6 +7,6 @@ */ import type { IServiceProvider } from '@cloudbeaver/core-di'; -import { createDataContext } from './createDataContext'; +import { createDataContext } from './createDataContext.js'; export const DATA_CONTEXT_DI_PROVIDER = createDataContext('DI Provider'); diff --git a/webapp/packages/core-data-context/src/DataContext/DataContext.ts b/webapp/packages/core-data-context/src/DataContext/DataContext.ts index 5817ac8822..fad4724bc6 100644 --- a/webapp/packages/core-data-context/src/DataContext/DataContext.ts +++ b/webapp/packages/core-data-context/src/DataContext/DataContext.ts @@ -7,9 +7,9 @@ */ import { action, makeObservable, observable } from 'mobx'; -import type { DataContextGetter } from './DataContextGetter'; -import type { IDataContext } from './IDataContext'; -import type { IDataContextProvider } from './IDataContextProvider'; +import type { DataContextGetter } from './DataContextGetter.js'; +import type { IDataContext } from './IDataContext.js'; +import type { IDataContextProvider } from './IDataContextProvider.js'; const NOT_FOUND = Symbol('not found'); diff --git a/webapp/packages/core-data-context/src/DataContext/IDataContext.ts b/webapp/packages/core-data-context/src/DataContext/IDataContext.ts index c69be02bbe..e412f8c815 100644 --- a/webapp/packages/core-data-context/src/DataContext/IDataContext.ts +++ b/webapp/packages/core-data-context/src/DataContext/IDataContext.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { DataContextGetter } from './DataContextGetter'; -import type { IDataContextProvider } from './IDataContextProvider'; +import type { DataContextGetter } from './DataContextGetter.js'; +import type { IDataContextProvider } from './IDataContextProvider.js'; export type DeleteVersionedContextCallback = () => void; diff --git a/webapp/packages/core-data-context/src/DataContext/IDataContextProvider.ts b/webapp/packages/core-data-context/src/DataContext/IDataContextProvider.ts index 391baa24b8..114e034636 100644 --- a/webapp/packages/core-data-context/src/DataContext/IDataContextProvider.ts +++ b/webapp/packages/core-data-context/src/DataContext/IDataContextProvider.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { DataContextGetter } from './DataContextGetter'; +import type { DataContextGetter } from './DataContextGetter.js'; export interface IDataContextProvider { has: (context: DataContextGetter) => boolean; diff --git a/webapp/packages/core-data-context/src/DataContext/createDataContext.ts b/webapp/packages/core-data-context/src/DataContext/createDataContext.ts index c31ca85e13..c6cd55448a 100644 --- a/webapp/packages/core-data-context/src/DataContext/createDataContext.ts +++ b/webapp/packages/core-data-context/src/DataContext/createDataContext.ts @@ -7,7 +7,7 @@ */ import { uuid } from '@cloudbeaver/core-utils'; -import type { DataContextGetter } from './DataContextGetter'; +import type { DataContextGetter } from './DataContextGetter.js'; export function createDataContext(name: string): DataContextGetter { return { diff --git a/webapp/packages/core-data-context/src/DataContext/dataContextAddDIProvider.ts b/webapp/packages/core-data-context/src/DataContext/dataContextAddDIProvider.ts index 22e392f2e8..f6346f4332 100644 --- a/webapp/packages/core-data-context/src/DataContext/dataContextAddDIProvider.ts +++ b/webapp/packages/core-data-context/src/DataContext/dataContextAddDIProvider.ts @@ -7,8 +7,8 @@ */ import { IServiceProvider } from '@cloudbeaver/core-di'; -import { DATA_CONTEXT_DI_PROVIDER } from './DATA_CONTEXT_DI_PROVIDER'; -import type { IDataContext } from './IDataContext'; +import { DATA_CONTEXT_DI_PROVIDER } from './DATA_CONTEXT_DI_PROVIDER.js'; +import type { IDataContext } from './IDataContext.js'; export function dataContextAddDIProvider(context: IDataContext, serviceProvider: IServiceProvider, id: string): IDataContext { context.set(DATA_CONTEXT_DI_PROVIDER, serviceProvider, id); diff --git a/webapp/packages/core-data-context/src/DataContext/useDataContext.ts b/webapp/packages/core-data-context/src/DataContext/useDataContext.ts index 53bbbc3dd7..4f2b7541f3 100644 --- a/webapp/packages/core-data-context/src/DataContext/useDataContext.ts +++ b/webapp/packages/core-data-context/src/DataContext/useDataContext.ts @@ -7,9 +7,9 @@ */ import { useLayoutEffect, useState } from 'react'; -import { DataContext } from './DataContext'; -import type { IDataContext } from './IDataContext'; -import type { IDataContextProvider } from './IDataContextProvider'; +import { DataContext } from './DataContext.js'; +import type { IDataContext } from './IDataContext.js'; +import type { IDataContextProvider } from './IDataContextProvider.js'; export function useDataContext(fallback?: IDataContextProvider): IDataContext { const [context] = useState(() => new DataContext()); diff --git a/webapp/packages/core-data-context/src/DataContext/useDataContextLink.ts b/webapp/packages/core-data-context/src/DataContext/useDataContextLink.ts index 164e9d2028..800b008296 100644 --- a/webapp/packages/core-data-context/src/DataContext/useDataContextLink.ts +++ b/webapp/packages/core-data-context/src/DataContext/useDataContextLink.ts @@ -10,7 +10,7 @@ import { useLayoutEffect, useState } from 'react'; import { uuid } from '@cloudbeaver/core-utils'; -import type { IDataContext } from './IDataContext'; +import type { IDataContext } from './IDataContext.js'; export function useDataContextLink(context: IDataContext | undefined, update: (context: IDataContext, id: string) => void): void { const [id] = useState(() => uuid()); diff --git a/webapp/packages/core-data-context/src/index.ts b/webapp/packages/core-data-context/src/index.ts index 48ab305b2a..3cd973e4e2 100644 --- a/webapp/packages/core-data-context/src/index.ts +++ b/webapp/packages/core-data-context/src/index.ts @@ -5,13 +5,13 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './DataContext/createDataContext'; -export * from './DataContext/DATA_CONTEXT_DI_PROVIDER'; -export * from './DataContext/DataContext'; -export * from './DataContext/dataContextAddDIProvider'; -export * from './DataContext/IDataContext'; -export * from './DataContext/IDataContextProvider'; -export * from './DataContext/useDataContext'; -export * from './DataContext/DataContextGetter'; -export * from './DataContext/useDataContextLink'; -export { coreDataContextManifest } from './manifest'; +export * from './DataContext/createDataContext.js'; +export * from './DataContext/DATA_CONTEXT_DI_PROVIDER.js'; +export * from './DataContext/DataContext.js'; +export * from './DataContext/dataContextAddDIProvider.js'; +export * from './DataContext/IDataContext.js'; +export * from './DataContext/IDataContextProvider.js'; +export * from './DataContext/useDataContext.js'; +export * from './DataContext/DataContextGetter.js'; +export * from './DataContext/useDataContextLink.js'; +export { coreDataContextManifest } from './manifest.js'; diff --git a/webapp/packages/core-di/package.json b/webapp/packages/core-di/package.json index ede6ad2e73..5634ee3d45 100644 --- a/webapp/packages/core-di/package.json +++ b/webapp/packages/core-di/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-di", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-di/src/App.ts b/webapp/packages/core-di/src/App.ts index 7d8bee27a5..43f0dca78c 100644 --- a/webapp/packages/core-di/src/App.ts +++ b/webapp/packages/core-di/src/App.ts @@ -7,15 +7,15 @@ */ import { makeObservable, observable } from 'mobx'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; - -import { Bootstrap } from './Bootstrap'; -import { Dependency } from './Dependency'; -import type { DIContainer } from './DIContainer'; -import type { IServiceCollection, IServiceConstructor } from './IApp'; -import { IDiWrapper, inversifyWrapper } from './inversifyWrapper'; -import { IServiceProvider } from './IServiceProvider'; -import type { PluginManifest } from './PluginManifest'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; + +import { Bootstrap } from './Bootstrap.js'; +import { Dependency } from './Dependency.js'; +import type { DIContainer } from './DIContainer.js'; +import type { IServiceCollection, IServiceConstructor } from './IApp.js'; +import { type IDiWrapper, inversifyWrapper } from './inversifyWrapper.js'; +import { IServiceProvider } from './IServiceProvider.js'; +import type { PluginManifest } from './PluginManifest.js'; export interface IStartData { restart: boolean; diff --git a/webapp/packages/core-di/src/AppLoadingScreen/HideAppLoadingScreen.tsx b/webapp/packages/core-di/src/AppLoadingScreen/HideAppLoadingScreen.tsx index fd7ae29c92..d0488bae15 100644 --- a/webapp/packages/core-di/src/AppLoadingScreen/HideAppLoadingScreen.tsx +++ b/webapp/packages/core-di/src/AppLoadingScreen/HideAppLoadingScreen.tsx @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { useAppLoadingScreen } from './useAppLoadingScreen'; +import { useAppLoadingScreen } from './useAppLoadingScreen.js'; export function HideAppLoadingScreen() { useAppLoadingScreen(); diff --git a/webapp/packages/core-di/src/AppLoadingScreen/HideAppLoadingScreenLazy.ts b/webapp/packages/core-di/src/AppLoadingScreen/HideAppLoadingScreenLazy.ts index 8c98f78808..fa258307aa 100644 --- a/webapp/packages/core-di/src/AppLoadingScreen/HideAppLoadingScreenLazy.ts +++ b/webapp/packages/core-di/src/AppLoadingScreen/HideAppLoadingScreenLazy.ts @@ -7,4 +7,4 @@ */ import { lazy } from 'react'; -export const HideAppLoadingScreen = lazy(() => import('./HideAppLoadingScreen').then(m => ({ default: m.HideAppLoadingScreen }))); +export const HideAppLoadingScreen = lazy(() => import('./HideAppLoadingScreen.js').then(m => ({ default: m.HideAppLoadingScreen }))); diff --git a/webapp/packages/core-di/src/Bootstrap.ts b/webapp/packages/core-di/src/Bootstrap.ts index 031f0a506e..2d31195e2e 100644 --- a/webapp/packages/core-di/src/Bootstrap.ts +++ b/webapp/packages/core-di/src/Bootstrap.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Disposable } from './Disposable'; -import { injectable } from './injectable'; +import { Disposable } from './Disposable.js'; +import { injectable } from './injectable.js'; @injectable() export abstract class Bootstrap extends Disposable { diff --git a/webapp/packages/core-di/src/DIContainer.ts b/webapp/packages/core-di/src/DIContainer.ts index 909947148d..024858d3fd 100644 --- a/webapp/packages/core-di/src/DIContainer.ts +++ b/webapp/packages/core-di/src/DIContainer.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Container, interfaces } from 'inversify'; +import { Container, type interfaces } from 'inversify'; -import type { IServiceCollection, IServiceConstructor, IServiceInjector } from './IApp'; +import type { IServiceCollection, IServiceConstructor, IServiceInjector } from './IApp.js'; function logger(planAndResolve: interfaces.Next): interfaces.Next { return (args: interfaces.NextArgs) => { @@ -34,7 +34,7 @@ function logger(planAndResolve: interfaces.Next): interfaces.Next { if (index !== -1) { metadata = Reflect.getMetadata('design:paramtypes', dep) || []; serviceName = dep.name; - notFoundElement = metadata[index]; + notFoundElement = metadata[index]!; } else { index = metadata.indexOf(notFoundElement); } diff --git a/webapp/packages/core-di/src/DIService.ts b/webapp/packages/core-di/src/DIService.ts index 1b477e1e02..1f5c46c16d 100644 --- a/webapp/packages/core-di/src/DIService.ts +++ b/webapp/packages/core-di/src/DIService.ts @@ -7,10 +7,10 @@ */ import type { IExecutorHandlersCollection, ISyncContextLoader } from '@cloudbeaver/core-executor'; -import { dependencyInjectorContext } from './dependencyInjectorContext'; -import type { IServiceConstructor } from './IApp'; -import { injectable } from './injectable'; -import { IServiceProvider } from './IServiceProvider'; +import { dependencyInjectorContext } from './dependencyInjectorContext.js'; +import type { IServiceConstructor } from './IApp.js'; +import { injectable } from './injectable.js'; +import { IServiceProvider } from './IServiceProvider.js'; @injectable() export class DIService { diff --git a/webapp/packages/core-di/src/Dependency.ts b/webapp/packages/core-di/src/Dependency.ts index 02cb2a96ff..c1ee3e00f6 100644 --- a/webapp/packages/core-di/src/Dependency.ts +++ b/webapp/packages/core-di/src/Dependency.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { injectable } from './injectable'; +import { injectable } from './injectable.js'; @injectable() export abstract class Dependency {} diff --git a/webapp/packages/core-di/src/Disposable.ts b/webapp/packages/core-di/src/Disposable.ts index a4cf862e7f..fedf08aa1b 100644 --- a/webapp/packages/core-di/src/Disposable.ts +++ b/webapp/packages/core-di/src/Disposable.ts @@ -7,7 +7,7 @@ */ import { preDestroy } from 'inversify'; -import { injectable } from './injectable'; +import { injectable } from './injectable.js'; @injectable() export abstract class Disposable { diff --git a/webapp/packages/core-di/src/IApp.ts b/webapp/packages/core-di/src/IApp.ts index f0e064168c..b5f999bccf 100644 --- a/webapp/packages/core-di/src/IApp.ts +++ b/webapp/packages/core-di/src/IApp.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ITypedConstructor } from './ITypedConstructor'; +import type { ITypedConstructor } from './ITypedConstructor.js'; export interface IServiceCollection { addServiceByClass: (ctor: IServiceConstructor, value?: any) => void; diff --git a/webapp/packages/core-di/src/IServiceProvider.ts b/webapp/packages/core-di/src/IServiceProvider.ts index 0882bcb732..0202458e13 100644 --- a/webapp/packages/core-di/src/IServiceProvider.ts +++ b/webapp/packages/core-di/src/IServiceProvider.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IServiceConstructor, IServiceInjector } from './IApp'; +import type { IServiceConstructor, IServiceInjector } from './IApp.js'; export class IServiceProvider { constructor(private injector: IServiceInjector) {} diff --git a/webapp/packages/core-di/src/PluginManifest.ts b/webapp/packages/core-di/src/PluginManifest.ts index ab270e039e..9b03c8ee86 100644 --- a/webapp/packages/core-di/src/PluginManifest.ts +++ b/webapp/packages/core-di/src/PluginManifest.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IServiceConstructor } from './IApp'; +import type { IServiceConstructor } from './IApp.js'; export interface PluginManifest { info: { diff --git a/webapp/packages/core-di/src/ServiceProviderContext.tsx b/webapp/packages/core-di/src/ServiceProviderContext.tsx index 5fd8ea681c..6f96e525a0 100644 --- a/webapp/packages/core-di/src/ServiceProviderContext.tsx +++ b/webapp/packages/core-di/src/ServiceProviderContext.tsx @@ -7,7 +7,7 @@ */ import { createContext } from 'react'; -import { IServiceProvider } from './IServiceProvider'; +import { IServiceProvider } from './IServiceProvider.js'; export const serviceProviderContext = createContext(undefined as any); diff --git a/webapp/packages/core-di/src/ServiceProviderContextLazy.ts b/webapp/packages/core-di/src/ServiceProviderContextLazy.ts index 8e6091aa37..92626de265 100644 --- a/webapp/packages/core-di/src/ServiceProviderContextLazy.ts +++ b/webapp/packages/core-di/src/ServiceProviderContextLazy.ts @@ -7,4 +7,4 @@ */ import { lazy } from 'react'; -export const ServiceProviderContext = lazy(() => import('./ServiceProviderContext').then(m => ({ default: m.ServiceProviderContext }))); +export const ServiceProviderContext = lazy(() => import('./ServiceProviderContext.js').then(m => ({ default: m.ServiceProviderContext }))); diff --git a/webapp/packages/core-di/src/__tests__/app-init/TestBootstrap.ts b/webapp/packages/core-di/src/__tests__/app-init/TestBootstrap.ts index 3803897952..96b33c3dd7 100644 --- a/webapp/packages/core-di/src/__tests__/app-init/TestBootstrap.ts +++ b/webapp/packages/core-di/src/__tests__/app-init/TestBootstrap.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Bootstrap } from '../../Bootstrap'; -import { injectable } from '../../injectable'; -import { TestService } from './TestService'; +import { Bootstrap } from '../../Bootstrap.js'; +import { injectable } from '../../injectable.js'; +import { TestService } from './TestService.js'; @injectable() export class TestBootstrap extends Bootstrap { @@ -22,11 +22,11 @@ export class TestBootstrap extends Bootstrap { this.sum = 0; } - register(): void | Promise { + override register(): void { this.registered = true; } - async load(): Promise { + override async load(): Promise { await new Promise(resolve => { setTimeout(() => { this.sum = this.testService.sum(1, 2); diff --git a/webapp/packages/core-di/src/__tests__/app-init/TestService.ts b/webapp/packages/core-di/src/__tests__/app-init/TestService.ts index 8323d096d1..5b2ca05dd9 100644 --- a/webapp/packages/core-di/src/__tests__/app-init/TestService.ts +++ b/webapp/packages/core-di/src/__tests__/app-init/TestService.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { injectable } from '../../injectable'; +import { injectable } from '../../injectable.js'; @injectable() export class TestService { diff --git a/webapp/packages/core-di/src/__tests__/app-init/app-init.test.ts b/webapp/packages/core-di/src/__tests__/app-init/app-init.test.ts index 8b0849a092..8066e62711 100644 --- a/webapp/packages/core-di/src/__tests__/app-init/app-init.test.ts +++ b/webapp/packages/core-di/src/__tests__/app-init/app-init.test.ts @@ -7,10 +7,10 @@ */ import { expect, test } from '@jest/globals'; -import { App } from '../../App'; -import { manifest } from './manifest'; -import { TestBootstrap } from './TestBootstrap'; -import { TestService } from './TestService'; +import { App } from '../../App.js'; +import { manifest } from './manifest.js'; +import { TestBootstrap } from './TestBootstrap.js'; +import { TestService } from './TestService.js'; test('App Initialization', async () => { const app = new App([manifest]); diff --git a/webapp/packages/core-di/src/__tests__/app-init/manifest.ts b/webapp/packages/core-di/src/__tests__/app-init/manifest.ts index 99066e1f05..c22f7855e2 100644 --- a/webapp/packages/core-di/src/__tests__/app-init/manifest.ts +++ b/webapp/packages/core-di/src/__tests__/app-init/manifest.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { PluginManifest } from '../../PluginManifest'; +import type { PluginManifest } from '../../PluginManifest.js'; export const manifest: PluginManifest = { info: { name: 'Sample Manifest', }, - providers: [() => import('./TestService').then(m => m.TestService), () => import('./TestBootstrap').then(m => m.TestBootstrap)], + providers: [() => import('./TestService.js').then(m => m.TestService), () => import('./TestBootstrap.js').then(m => m.TestBootstrap)], }; diff --git a/webapp/packages/core-di/src/dependencyInjectorContext.ts b/webapp/packages/core-di/src/dependencyInjectorContext.ts index 734db068cc..d610a17983 100644 --- a/webapp/packages/core-di/src/dependencyInjectorContext.ts +++ b/webapp/packages/core-di/src/dependencyInjectorContext.ts @@ -7,7 +7,7 @@ */ import type { ISyncContextLoader } from '@cloudbeaver/core-executor'; -import type { IServiceConstructor } from './IApp'; +import type { IServiceConstructor } from './IApp.js'; export const dependencyInjectorContext: ISyncContextLoader<(ctor: IServiceConstructor) => T> = function dependencyInjectorContext() { throw new Error('Implementation not provided \n Use addContextCreator to add addDIContext implementation to context'); diff --git a/webapp/packages/core-di/src/index.ts b/webapp/packages/core-di/src/index.ts index 1ae1761af5..30a1477019 100644 --- a/webapp/packages/core-di/src/index.ts +++ b/webapp/packages/core-di/src/index.ts @@ -5,20 +5,20 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './IApp'; -export * from './App'; -export * from './ServiceProviderContextLazy'; -export * from './Bootstrap'; -export * from './Disposable'; -export * from './Dependency'; -export * from './dependencyInjectorContext'; -export * from './DIService'; -export * from './injectable'; -export * from './PluginManifest'; -export * from './useService'; -export * from './ITypedConstructor'; -export * from './isConstructor'; -export * from './IServiceProvider'; -export * from './AppLoadingScreen/HideAppLoadingScreenLazy'; -export * from './AppLoadingScreen/displayUpdateStatus'; -export { manifest as coreDIManifest } from './manifest'; +export * from './IApp.js'; +export * from './App.js'; +export * from './ServiceProviderContextLazy.js'; +export * from './Bootstrap.js'; +export * from './Disposable.js'; +export * from './Dependency.js'; +export * from './dependencyInjectorContext.js'; +export * from './DIService.js'; +export * from './injectable.js'; +export * from './PluginManifest.js'; +export * from './useService.js'; +export * from './ITypedConstructor.js'; +export * from './isConstructor.js'; +export * from './IServiceProvider.js'; +export * from './AppLoadingScreen/HideAppLoadingScreenLazy.js'; +export * from './AppLoadingScreen/displayUpdateStatus.js'; +export { manifest as coreDIManifest } from './manifest.js'; diff --git a/webapp/packages/core-di/src/inversifyWrapper.ts b/webapp/packages/core-di/src/inversifyWrapper.ts index a79184fd92..835c801bc8 100644 --- a/webapp/packages/core-di/src/inversifyWrapper.ts +++ b/webapp/packages/core-di/src/inversifyWrapper.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { DIContainer } from './DIContainer'; -import type { IServiceCollection, IServiceConstructor, IServiceInjector } from './IApp'; +import { DIContainer } from './DIContainer.js'; +import type { IServiceCollection, IServiceConstructor, IServiceInjector } from './IApp.js'; export interface IDiWrapper { injector: IServiceInjector; diff --git a/webapp/packages/core-di/src/isConstructor.ts b/webapp/packages/core-di/src/isConstructor.ts index e7f196d863..fd4e6f1d30 100644 --- a/webapp/packages/core-di/src/isConstructor.ts +++ b/webapp/packages/core-di/src/isConstructor.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ITypedConstructor } from './ITypedConstructor'; +import type { ITypedConstructor } from './ITypedConstructor.js'; /** * there are no way in js to check that function is constructor. So we expect that is object, not function diff --git a/webapp/packages/core-di/src/manifest.ts b/webapp/packages/core-di/src/manifest.ts index 5cd25d2386..fed423b842 100644 --- a/webapp/packages/core-di/src/manifest.ts +++ b/webapp/packages/core-di/src/manifest.ts @@ -5,12 +5,12 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { PluginManifest } from './PluginManifest'; +import type { PluginManifest } from './PluginManifest.js'; export const manifest: PluginManifest = { info: { name: 'Core DI', }, - providers: [() => import('./DIService').then(m => m.DIService)], + providers: [() => import('./DIService.js').then(m => m.DIService)], }; diff --git a/webapp/packages/core-di/src/useService.ts b/webapp/packages/core-di/src/useService.ts index d1a35347d5..457fc8172c 100644 --- a/webapp/packages/core-di/src/useService.ts +++ b/webapp/packages/core-di/src/useService.ts @@ -7,8 +7,8 @@ */ import { useContext } from 'react'; -import type { IServiceConstructor } from './IApp'; -import { serviceProviderContext } from './ServiceProviderContext'; +import type { IServiceConstructor } from './IApp.js'; +import { serviceProviderContext } from './ServiceProviderContext.js'; export function useService(ctor: IServiceConstructor): T; export function useService(ctor: IServiceConstructor, optional: true): T | undefined; diff --git a/webapp/packages/core-dialogs/package.json b/webapp/packages/core-dialogs/package.json index 3ed69b1a76..3c88e74dc0 100644 --- a/webapp/packages/core-dialogs/package.json +++ b/webapp/packages/core-dialogs/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-dialogs", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-dialogs/src/Menu/ContextMenu/ContextMenu.ts b/webapp/packages/core-dialogs/src/Menu/ContextMenu/ContextMenu.ts index cafd13bc85..5508670907 100644 --- a/webapp/packages/core-dialogs/src/Menu/ContextMenu/ContextMenu.ts +++ b/webapp/packages/core-dialogs/src/Menu/ContextMenu/ContextMenu.ts @@ -8,12 +8,12 @@ import type { TLocalizationToken } from '@cloudbeaver/core-localization'; import { uuid } from '@cloudbeaver/core-utils'; -import type { IMenuPanel } from '../IMenuPanel'; -import { ComputedContextMenuModel } from '../models/ComputedContextMenuModel'; -import { ComputedMenuItemModel, IComputedMenuItemOptions } from '../models/ComputedMenuItemModel'; -import { MenuItemType, MenuOptionsStore } from '../models/MenuOptionsStore'; -import type { IContextMenuItem } from './IContextMenuItem'; -import type { IMenuContext } from './IMenuContext'; +import type { IMenuPanel } from '../IMenuPanel.js'; +import { ComputedContextMenuModel } from '../models/ComputedContextMenuModel.js'; +import { ComputedMenuItemModel, type IComputedMenuItemOptions } from '../models/ComputedMenuItemModel.js'; +import { type MenuItemType, MenuOptionsStore } from '../models/MenuOptionsStore.js'; +import type { IContextMenuItem } from './IContextMenuItem.js'; +import type { IMenuContext } from './IMenuContext.js'; /** * this class allows to store IContextMenuItem in a tree structure @@ -93,7 +93,10 @@ class ComputedMenuItemOptionsWithContext implements IComputedMenuItemOptions keepMenuOpen?: boolean; iconGetter?: () => string | undefined; - constructor(private readonly options: IContextMenuItem, private readonly context: IMenuContext) { + constructor( + private readonly options: IContextMenuItem, + private readonly context: IMenuContext, + ) { // doesn't depend on context this.title = options.title; this.tooltip = options.tooltip; @@ -143,5 +146,8 @@ class ContextMenuPanel implements IMenuPanel { private items?: ComputedMenuItemModel[]; - constructor(public id: string, private readonly itemsGetter: () => ComputedMenuItemModel[]) {} + constructor( + public id: string, + private readonly itemsGetter: () => ComputedMenuItemModel[], + ) {} } diff --git a/webapp/packages/core-dialogs/src/Menu/ContextMenu/ContextMenuService.ts b/webapp/packages/core-dialogs/src/Menu/ContextMenu/ContextMenuService.ts index dbdd04b011..3a4190d7cb 100644 --- a/webapp/packages/core-dialogs/src/Menu/ContextMenu/ContextMenuService.ts +++ b/webapp/packages/core-dialogs/src/Menu/ContextMenu/ContextMenuService.ts @@ -7,10 +7,10 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import type { IMenuPanel } from '../IMenuPanel'; -import { ContextMenu } from './ContextMenu'; -import type { IContextMenuItem } from './IContextMenuItem'; -import type { IMenuContext } from './IMenuContext'; +import type { IMenuPanel } from '../IMenuPanel.js'; +import { ContextMenu } from './ContextMenu.js'; +import type { IContextMenuItem } from './IContextMenuItem.js'; +import type { IMenuContext } from './IMenuContext.js'; @injectable() export class ContextMenuService { diff --git a/webapp/packages/core-dialogs/src/Menu/ContextMenu/IContextMenuItem.ts b/webapp/packages/core-dialogs/src/Menu/ContextMenu/IContextMenuItem.ts index 9789d8c60b..5858f8bdba 100644 --- a/webapp/packages/core-dialogs/src/Menu/ContextMenu/IContextMenuItem.ts +++ b/webapp/packages/core-dialogs/src/Menu/ContextMenu/IContextMenuItem.ts @@ -7,8 +7,8 @@ */ import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import type { IMenuItemOptions } from '../models/MenuOptionsStore'; -import type { IMenuContext } from './IMenuContext'; +import type { IMenuItemOptions } from '../models/MenuOptionsStore.js'; +import type { IMenuContext } from './IMenuContext.js'; /** * Options allow to create context menu item diff --git a/webapp/packages/core-dialogs/src/Menu/IMenuPanel.ts b/webapp/packages/core-dialogs/src/Menu/IMenuPanel.ts index 23e9b22dbc..5ef01c192c 100644 --- a/webapp/packages/core-dialogs/src/Menu/IMenuPanel.ts +++ b/webapp/packages/core-dialogs/src/Menu/IMenuPanel.ts @@ -7,7 +7,7 @@ */ import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import type { MenuItemType } from './models/MenuOptionsStore'; +import type { MenuItemType } from './models/MenuOptionsStore.js'; export type MenuMod = 'primary' | 'surface' | 'secondary'; diff --git a/webapp/packages/core-dialogs/src/Menu/StaticMenu/StaticMenu.ts b/webapp/packages/core-dialogs/src/Menu/StaticMenu/StaticMenu.ts index 624af4f773..b58faea209 100644 --- a/webapp/packages/core-dialogs/src/Menu/StaticMenu/StaticMenu.ts +++ b/webapp/packages/core-dialogs/src/Menu/StaticMenu/StaticMenu.ts @@ -5,10 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuPanel } from '../IMenuPanel'; -import { ComputedMenuItemModel, IComputedMenuItemOptions } from '../models/ComputedMenuItemModel'; -import { ComputedMenuPanelModel } from '../models/ComputedMenuPanelModel'; -import { MenuOptionsStore } from '../models/MenuOptionsStore'; +import type { IMenuPanel } from '../IMenuPanel.js'; +import { ComputedMenuItemModel, type IComputedMenuItemOptions } from '../models/ComputedMenuItemModel.js'; +import { ComputedMenuPanelModel } from '../models/ComputedMenuPanelModel.js'; +import { MenuOptionsStore } from '../models/MenuOptionsStore.js'; /** * this class allows to store IComputedMenuItemOptions in a tree structure diff --git a/webapp/packages/core-dialogs/src/Menu/models/ComputedContextMenuModel.ts b/webapp/packages/core-dialogs/src/Menu/models/ComputedContextMenuModel.ts index ff5aa3aa7f..1b21240967 100644 --- a/webapp/packages/core-dialogs/src/Menu/models/ComputedContextMenuModel.ts +++ b/webapp/packages/core-dialogs/src/Menu/models/ComputedContextMenuModel.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IContextMenuItem } from '../ContextMenu/IContextMenuItem'; -import type { IMenuContext } from '../ContextMenu/IMenuContext'; -import type { IMenuPanel } from '../IMenuPanel'; +import type { IContextMenuItem } from '../ContextMenu/IContextMenuItem.js'; +import type { IMenuContext } from '../ContextMenu/IMenuContext.js'; +import type { IMenuPanel } from '../IMenuPanel.js'; export interface IComputedContextMenuPanelOptions { id: string; diff --git a/webapp/packages/core-dialogs/src/Menu/models/ComputedMenuItemModel.ts b/webapp/packages/core-dialogs/src/Menu/models/ComputedMenuItemModel.ts index b261680196..a9cdabbf9e 100644 --- a/webapp/packages/core-dialogs/src/Menu/models/ComputedMenuItemModel.ts +++ b/webapp/packages/core-dialogs/src/Menu/models/ComputedMenuItemModel.ts @@ -9,8 +9,8 @@ import { computed, makeObservable } from 'mobx'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import type { IMenuItem, IMenuPanel } from '../IMenuPanel'; -import type { IMenuItemOptions, MenuItemType } from './MenuOptionsStore'; +import type { IMenuItem, IMenuPanel } from '../IMenuPanel.js'; +import type { IMenuItemOptions, MenuItemType } from './MenuOptionsStore.js'; export interface IComputedMenuItemOptions extends IMenuItemOptions { onClick?: () => void; diff --git a/webapp/packages/core-dialogs/src/Menu/models/ComputedMenuPanelModel.ts b/webapp/packages/core-dialogs/src/Menu/models/ComputedMenuPanelModel.ts index 5985f04233..abd2559b35 100644 --- a/webapp/packages/core-dialogs/src/Menu/models/ComputedMenuPanelModel.ts +++ b/webapp/packages/core-dialogs/src/Menu/models/ComputedMenuPanelModel.ts @@ -7,7 +7,7 @@ */ import { computed, makeObservable } from 'mobx'; -import type { IMenuItem, IMenuPanel } from '../IMenuPanel'; +import type { IMenuItem, IMenuPanel } from '../IMenuPanel.js'; export interface IComputedMenuPanelOptions { id: string; diff --git a/webapp/packages/core-dialogs/src/Menu/models/MenuOptionsStore.ts b/webapp/packages/core-dialogs/src/Menu/models/MenuOptionsStore.ts index 9abb38b805..6e322f393c 100644 --- a/webapp/packages/core-dialogs/src/Menu/models/MenuOptionsStore.ts +++ b/webapp/packages/core-dialogs/src/Menu/models/MenuOptionsStore.ts @@ -8,7 +8,7 @@ import type { TLocalizationToken } from '@cloudbeaver/core-localization'; import { OrderedMap } from '@cloudbeaver/core-utils'; -import type { IMenuPanel } from '../IMenuPanel'; +import type { IMenuPanel } from '../IMenuPanel.js'; const DEFAULT_ITEM_ORDER = 100; diff --git a/webapp/packages/core-dialogs/src/index.ts b/webapp/packages/core-dialogs/src/index.ts index 898d32f224..b7da754a92 100644 --- a/webapp/packages/core-dialogs/src/index.ts +++ b/webapp/packages/core-dialogs/src/index.ts @@ -1,14 +1,21 @@ -export * from './CommonDialog/CommonDialogService'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './CommonDialog/CommonDialogService.js'; -export * from './Menu/IMenuPanel'; -export * from './Menu/StaticMenu/StaticMenu'; +export * from './Menu/IMenuPanel.js'; +export * from './Menu/StaticMenu/StaticMenu.js'; -export * from './Menu/models/ComputedContextMenuModel'; -export * from './Menu/models/ComputedMenuItemModel'; -export * from './Menu/models/ComputedMenuPanelModel'; +export * from './Menu/models/ComputedContextMenuModel.js'; +export * from './Menu/models/ComputedMenuItemModel.js'; +export * from './Menu/models/ComputedMenuPanelModel.js'; // contextMenu -export * from './Menu/ContextMenu/ContextMenuService'; -export * from './Menu/ContextMenu/IContextMenuItem'; -export * from './Menu/ContextMenu/IMenuContext'; -export * from './manifest'; +export * from './Menu/ContextMenu/ContextMenuService.js'; +export * from './Menu/ContextMenu/IContextMenuItem.js'; +export * from './Menu/ContextMenu/IMenuContext.js'; +export * from './manifest.js'; diff --git a/webapp/packages/core-dialogs/src/manifest.ts b/webapp/packages/core-dialogs/src/manifest.ts index c5f6e6c8b7..6fb7ecdd5c 100644 --- a/webapp/packages/core-dialogs/src/manifest.ts +++ b/webapp/packages/core-dialogs/src/manifest.ts @@ -13,7 +13,7 @@ export const coreDialogsManifest: PluginManifest = { }, providers: [ - () => import('./CommonDialog/CommonDialogService').then(m => m.CommonDialogService), - () => import('./Menu/ContextMenu/ContextMenuService').then(m => m.ContextMenuService), + () => import('./CommonDialog/CommonDialogService.js').then(m => m.CommonDialogService), + () => import('./Menu/ContextMenu/ContextMenuService.js').then(m => m.ContextMenuService), ], }; diff --git a/webapp/packages/core-events/package.json b/webapp/packages/core-events/package.json index 9b57df9f32..b83e7ab89d 100644 --- a/webapp/packages/core-events/package.json +++ b/webapp/packages/core-events/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-events", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -37,4 +38,4 @@ "@testing-library/jest-dom": "^6", "typescript": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/core-events/src/EventContext/EventStopPropagationFlag.ts b/webapp/packages/core-events/src/EventContext/EventStopPropagationFlag.ts index 050399ab37..30cc23f47c 100644 --- a/webapp/packages/core-events/src/EventContext/EventStopPropagationFlag.ts +++ b/webapp/packages/core-events/src/EventContext/EventStopPropagationFlag.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { EventContext } from './EventContext'; +import { EventContext } from './EventContext.js'; export const EventStopPropagationFlag = EventContext.create('stopPropagation'); diff --git a/webapp/packages/core-events/src/EventsSettingsService.test.ts b/webapp/packages/core-events/src/EventsSettingsService.test.ts index 8adfa50342..84c3f1b694 100644 --- a/webapp/packages/core-events/src/EventsSettingsService.test.ts +++ b/webapp/packages/core-events/src/EventsSettingsService.test.ts @@ -10,21 +10,21 @@ import { expect, test } from '@jest/globals'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { createApp } from '@cloudbeaver/tests-runner'; -import { EventsSettingsService } from './EventsSettingsService'; -import { coreEventsManifest } from './manifest'; +import { EventsSettingsService } from './EventsSettingsService.js'; +import { coreEventsManifest } from './manifest.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint)); diff --git a/webapp/packages/core-events/src/ExceptionsCatcherService.ts b/webapp/packages/core-events/src/ExceptionsCatcherService.ts index dca6d64a82..3b1ad34ef1 100644 --- a/webapp/packages/core-events/src/ExceptionsCatcherService.ts +++ b/webapp/packages/core-events/src/ExceptionsCatcherService.ts @@ -7,7 +7,7 @@ */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { NotificationService } from './NotificationService'; +import { NotificationService } from './NotificationService.js'; @injectable() export class ExceptionsCatcherService extends Bootstrap { @@ -20,13 +20,11 @@ export class ExceptionsCatcherService extends Bootstrap { super(); } - register(): void { + override register(): void { this.baseCatcher = window.onerror; window.onerror = this.catcher; } - load(): void {} - unsubscribe() { window.onerror = this.baseCatcher; } diff --git a/webapp/packages/core-events/src/NotificationService.ts b/webapp/packages/core-events/src/NotificationService.ts index 95e49be844..5d89ccf53d 100644 --- a/webapp/packages/core-events/src/NotificationService.ts +++ b/webapp/packages/core-events/src/NotificationService.ts @@ -8,21 +8,21 @@ import { observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; import { DetailsError, GQLError } from '@cloudbeaver/core-sdk'; import { errorOf, OrderedMap } from '@cloudbeaver/core-utils'; -import { EventsSettingsService } from './EventsSettingsService'; +import { EventsSettingsService } from './EventsSettingsService.js'; import { ENotificationType, - INotification, - INotificationExtraProps, - INotificationOptions, - INotificationProcessExtraProps, - IProcessNotificationContainer, - NotificationComponent, -} from './INotification'; -import { ProcessNotificationController } from './ProcessNotificationController'; + type INotification, + type INotificationExtraProps, + type INotificationOptions, + type INotificationProcessExtraProps, + type IProcessNotificationContainer, + type NotificationComponent, +} from './INotification.js'; +import { ProcessNotificationController } from './ProcessNotificationController.js'; export const DELAY_DELETING = 1000; const TIMESTAMP_DIFFERENCE_THRESHOLD = 100; @@ -124,10 +124,10 @@ export class NotificationService { if (filteredNotificationList.length > notificationsPool) { let i = 0; - while (this.notificationList.get(this.notificationList.keys[i])?.persistent) { + while (this.notificationList.get(this.notificationList.keys[i]!)?.persistent) { i++; } - this.notificationList.remove(this.notificationList.keys[i]); + this.notificationList.remove(this.notificationList.keys[i]!); } return notification; diff --git a/webapp/packages/core-events/src/ProcessNotificationController.ts b/webapp/packages/core-events/src/ProcessNotificationController.ts index c984c5034d..d291eb0a76 100644 --- a/webapp/packages/core-events/src/ProcessNotificationController.ts +++ b/webapp/packages/core-events/src/ProcessNotificationController.ts @@ -10,7 +10,7 @@ import { makeObservable, observable } from 'mobx'; import { DetailsError, GQLError } from '@cloudbeaver/core-sdk'; import { errorOf } from '@cloudbeaver/core-utils'; -import { ENotificationType, IProcessNotificationState } from './INotification'; +import { ENotificationType, type IProcessNotificationState } from './INotification.js'; export class ProcessNotificationController implements IProcessNotificationState { error: Error | null; diff --git a/webapp/packages/core-events/src/index.ts b/webapp/packages/core-events/src/index.ts index 88e1caaa37..776fee3807 100644 --- a/webapp/packages/core-events/src/index.ts +++ b/webapp/packages/core-events/src/index.ts @@ -1,8 +1,15 @@ -export * from './EventContext/EventContext'; -export * from './EventContext/EventStopPropagationFlag'; -export * from './NotificationService'; -export * from './INotification'; -export * from './UIError'; -export * from './ExceptionsCatcherService'; -export * from './EventsSettingsService'; -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './EventContext/EventContext.js'; +export * from './EventContext/EventStopPropagationFlag.js'; +export * from './NotificationService.js'; +export * from './INotification.js'; +export * from './UIError.js'; +export * from './ExceptionsCatcherService.js'; +export * from './EventsSettingsService.js'; +export * from './manifest.js'; diff --git a/webapp/packages/core-events/src/manifest.ts b/webapp/packages/core-events/src/manifest.ts index 8467d88a0f..6c2c59dfb2 100644 --- a/webapp/packages/core-events/src/manifest.ts +++ b/webapp/packages/core-events/src/manifest.ts @@ -13,8 +13,8 @@ export const coreEventsManifest: PluginManifest = { }, providers: [ - () => import('./NotificationService').then(m => m.NotificationService), - () => import('./ExceptionsCatcherService').then(m => m.ExceptionsCatcherService), - () => import('./EventsSettingsService').then(m => m.EventsSettingsService), + () => import('./NotificationService.js').then(m => m.NotificationService), + () => import('./ExceptionsCatcherService.js').then(m => m.ExceptionsCatcherService), + () => import('./EventsSettingsService.js').then(m => m.EventsSettingsService), ], }; diff --git a/webapp/packages/core-executor/package.json b/webapp/packages/core-executor/package.json index 5d868b8dcb..4fe3554360 100644 --- a/webapp/packages/core-executor/package.json +++ b/webapp/packages/core-executor/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-executor", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-executor/src/ExecutionContext.ts b/webapp/packages/core-executor/src/ExecutionContext.ts index 0a2abb209c..130b1b218e 100644 --- a/webapp/packages/core-executor/src/ExecutionContext.ts +++ b/webapp/packages/core-executor/src/ExecutionContext.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAsyncContextLoader, IContextLoader, IExecutionContext, ISyncContextLoader } from './IExecutionContext'; +import type { IAsyncContextLoader, IContextLoader, IExecutionContext, ISyncContextLoader } from './IExecutionContext.js'; export class ExecutionContext implements IExecutionContext { readonly contexts: Map, any>; diff --git a/webapp/packages/core-executor/src/Executor.ts b/webapp/packages/core-executor/src/Executor.ts index 12921cb73e..70d312a05a 100644 --- a/webapp/packages/core-executor/src/Executor.ts +++ b/webapp/packages/core-executor/src/Executor.ts @@ -5,15 +5,15 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ExecutionContext } from './ExecutionContext'; -import { executionExceptionContext } from './executionExceptionContext'; -import { ExecutorHandlersCollection } from './ExecutorHandlersCollection'; -import { ExecutorInterrupter, IExecutorInterrupter } from './ExecutorInterrupter'; -import type { IExecutionContext, IExecutionContextProvider } from './IExecutionContext'; -import type { IExecutor } from './IExecutor'; -import type { IExecutorHandler } from './IExecutorHandler'; -import type { ChainLinkType, IExecutorHandlersCollection } from './IExecutorHandlersCollection'; -import { BlockedExecution, TaskScheduler } from './TaskScheduler/TaskScheduler'; +import { ExecutionContext } from './ExecutionContext.js'; +import { executionExceptionContext } from './executionExceptionContext.js'; +import { ExecutorHandlersCollection } from './ExecutorHandlersCollection.js'; +import { ExecutorInterrupter, type IExecutorInterrupter } from './ExecutorInterrupter.js'; +import type { IExecutionContext, IExecutionContextProvider } from './IExecutionContext.js'; +import type { IExecutor } from './IExecutor.js'; +import type { IExecutorHandler } from './IExecutorHandler.js'; +import type { ChainLinkType, IExecutorHandlersCollection } from './IExecutorHandlersCollection.js'; +import { type BlockedExecution, TaskScheduler } from './TaskScheduler/TaskScheduler.js'; export class Executor extends ExecutorHandlersCollection implements IExecutor { get executing(): boolean { @@ -161,7 +161,7 @@ export class Executor extends ExecutorHandlersCollection implements return data; } - protected executeHandlerWithInitialData(handler: IExecutorHandler) { + protected override executeHandlerWithInitialData(handler: IExecutorHandler) { if (!this.initialDataGetter) { return; } diff --git a/webapp/packages/core-executor/src/ExecutorHandlersCollection.ts b/webapp/packages/core-executor/src/ExecutorHandlersCollection.ts index 25f0a0b43d..7f4dc82548 100644 --- a/webapp/packages/core-executor/src/ExecutorHandlersCollection.ts +++ b/webapp/packages/core-executor/src/ExecutorHandlersCollection.ts @@ -7,9 +7,9 @@ */ import { makeObservable, observable } from 'mobx'; -import type { IAsyncContextLoader, IContextLoader, ISyncContextLoader } from './IExecutionContext'; -import type { IExecutorHandler } from './IExecutorHandler'; -import type { ExecutorDataFilter, ExecutorDataMap, IChainLink, IExecutorHandlersCollection } from './IExecutorHandlersCollection'; +import type { IAsyncContextLoader, IContextLoader, ISyncContextLoader } from './IExecutionContext.js'; +import type { IExecutorHandler } from './IExecutorHandler.js'; +import type { ExecutorDataFilter, ExecutorDataMap, IChainLink, IExecutorHandlersCollection } from './IExecutorHandlersCollection.js'; export class ExecutorHandlersCollection> implements IExecutorHandlersCollection { handlers: Array>; diff --git a/webapp/packages/core-executor/src/ExecutorInterrupter.ts b/webapp/packages/core-executor/src/ExecutorInterrupter.ts index 92e11c06cf..8ede887aac 100644 --- a/webapp/packages/core-executor/src/ExecutorInterrupter.ts +++ b/webapp/packages/core-executor/src/ExecutorInterrupter.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IExecutionContextProvider } from './IExecutionContext'; +import type { IExecutionContextProvider } from './IExecutionContext.js'; export interface IExecutorInterrupter { interrupted: boolean; diff --git a/webapp/packages/core-executor/src/IExecutor.ts b/webapp/packages/core-executor/src/IExecutor.ts index a60700171e..bcd279c159 100644 --- a/webapp/packages/core-executor/src/IExecutor.ts +++ b/webapp/packages/core-executor/src/IExecutor.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IExecutionContext, IExecutionContextProvider } from './IExecutionContext'; -import type { IExecutorHandlersCollection } from './IExecutorHandlersCollection'; +import type { IExecutionContext, IExecutionContextProvider } from './IExecutionContext.js'; +import type { IExecutorHandlersCollection } from './IExecutorHandlersCollection.js'; export interface IExecutor extends IExecutorHandlersCollection { readonly executing: boolean; diff --git a/webapp/packages/core-executor/src/IExecutorHandler.ts b/webapp/packages/core-executor/src/IExecutorHandler.ts index bb1ccf92b6..313bf9a797 100644 --- a/webapp/packages/core-executor/src/IExecutorHandler.ts +++ b/webapp/packages/core-executor/src/IExecutorHandler.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IExecutionContextProvider } from './IExecutionContext'; +import type { IExecutionContextProvider } from './IExecutionContext.js'; export type IExecutorHandler> = (data: T, contexts: IExecutionContextProvider) => TResult; diff --git a/webapp/packages/core-executor/src/IExecutorHandlersCollection.ts b/webapp/packages/core-executor/src/IExecutorHandlersCollection.ts index 8427727824..7d696d7acb 100644 --- a/webapp/packages/core-executor/src/IExecutorHandlersCollection.ts +++ b/webapp/packages/core-executor/src/IExecutorHandlersCollection.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAsyncContextLoader, IContextLoader, IExecutionContextProvider, ISyncContextLoader } from './IExecutionContext'; -import type { IExecutorHandler } from './IExecutorHandler'; +import type { IAsyncContextLoader, IContextLoader, IExecutionContextProvider, ISyncContextLoader } from './IExecutionContext.js'; +import type { IExecutorHandler } from './IExecutorHandler.js'; export type ExecutorDataFilter = (data: T, contexts: IExecutionContextProvider) => boolean; export type ExecutorDataMap = (data: T, contexts: IExecutionContextProvider) => TNext; diff --git a/webapp/packages/core-executor/src/ISyncExecutor.ts b/webapp/packages/core-executor/src/ISyncExecutor.ts index ab1026f694..4b3de5a401 100644 --- a/webapp/packages/core-executor/src/ISyncExecutor.ts +++ b/webapp/packages/core-executor/src/ISyncExecutor.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IExecutionContext, IExecutionContextProvider } from './IExecutionContext'; -import type { IExecutorHandlersCollection } from './IExecutorHandlersCollection'; +import type { IExecutionContext, IExecutionContextProvider } from './IExecutionContext.js'; +import type { IExecutorHandlersCollection } from './IExecutorHandlersCollection.js'; export interface ISyncExecutor extends IExecutorHandlersCollection { execute: (data: T, context?: IExecutionContext, scope?: IExecutorHandlersCollection) => IExecutionContextProvider; diff --git a/webapp/packages/core-executor/src/SyncExecutor.ts b/webapp/packages/core-executor/src/SyncExecutor.ts index f5f79af69e..d35c399f1e 100644 --- a/webapp/packages/core-executor/src/SyncExecutor.ts +++ b/webapp/packages/core-executor/src/SyncExecutor.ts @@ -5,14 +5,14 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ExecutionContext } from './ExecutionContext'; -import { executionExceptionContext } from './executionExceptionContext'; -import { ExecutorHandlersCollection } from './ExecutorHandlersCollection'; -import { ExecutorInterrupter, IExecutorInterrupter } from './ExecutorInterrupter'; -import type { IExecutionContext, IExecutionContextProvider } from './IExecutionContext'; -import type { IExecutorHandler } from './IExecutorHandler'; -import type { ChainLinkType, IExecutorHandlersCollection } from './IExecutorHandlersCollection'; -import type { ISyncExecutor } from './ISyncExecutor'; +import { ExecutionContext } from './ExecutionContext.js'; +import { executionExceptionContext } from './executionExceptionContext.js'; +import { ExecutorHandlersCollection } from './ExecutorHandlersCollection.js'; +import { ExecutorInterrupter, type IExecutorInterrupter } from './ExecutorInterrupter.js'; +import type { IExecutionContext, IExecutionContextProvider } from './IExecutionContext.js'; +import type { IExecutorHandler } from './IExecutorHandler.js'; +import type { ChainLinkType, IExecutorHandlersCollection } from './IExecutorHandlersCollection.js'; +import type { ISyncExecutor } from './ISyncExecutor.js'; export class SyncExecutor extends ExecutorHandlersCollection implements ISyncExecutor { constructor(private readonly defaultData: T | null = null) { @@ -141,7 +141,7 @@ export class SyncExecutor extends ExecutorHandlersCollection implem return data; } - protected executeHandlerWithInitialData(handler: IExecutorHandler) { + protected override executeHandlerWithInitialData(handler: IExecutorHandler) { if (!this.initialDataGetter) { return; } diff --git a/webapp/packages/core-executor/src/TaskScheduler/AutoRunningTask.ts b/webapp/packages/core-executor/src/TaskScheduler/AutoRunningTask.ts index fd446b2d14..6886e0b105 100644 --- a/webapp/packages/core-executor/src/TaskScheduler/AutoRunningTask.ts +++ b/webapp/packages/core-executor/src/TaskScheduler/AutoRunningTask.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ITask } from './ITask'; -import { Task } from './Task'; +import type { ITask } from './ITask.js'; +import { Task } from './Task.js'; export class AutoRunningTask extends Task { constructor(task: () => Promise, externalCancel?: () => Promise | void) { diff --git a/webapp/packages/core-executor/src/TaskScheduler/Task.ts b/webapp/packages/core-executor/src/TaskScheduler/Task.ts index c19e410339..1a39f70001 100644 --- a/webapp/packages/core-executor/src/TaskScheduler/Task.ts +++ b/webapp/packages/core-executor/src/TaskScheduler/Task.ts @@ -7,7 +7,7 @@ */ import { computed, makeObservable, observable } from 'mobx'; -import type { ITask } from './ITask'; +import type { ITask } from './ITask.js'; export class Task implements ITask { cancelled: boolean; diff --git a/webapp/packages/core-executor/src/TaskScheduler/TaskNew.ts b/webapp/packages/core-executor/src/TaskScheduler/TaskNew.ts index 4a53de791e..9e97c80de6 100644 --- a/webapp/packages/core-executor/src/TaskScheduler/TaskNew.ts +++ b/webapp/packages/core-executor/src/TaskScheduler/TaskNew.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { CancelError } from './CancelError'; -import type { ITask, TaskCancelFn, TaskExecutor, TaskRejectFn, TaskResolveFn } from './ITaskNew'; +import { CancelError } from './CancelError.js'; +import type { ITask, TaskCancelFn, TaskExecutor, TaskRejectFn, TaskResolveFn } from './ITaskNew.js'; export const NOOP: VoidFunction = Object.freeze(() => {}); diff --git a/webapp/packages/core-executor/src/TaskScheduler/TaskScheduler.ts b/webapp/packages/core-executor/src/TaskScheduler/TaskScheduler.ts index ca5182db54..5319992b50 100644 --- a/webapp/packages/core-executor/src/TaskScheduler/TaskScheduler.ts +++ b/webapp/packages/core-executor/src/TaskScheduler/TaskScheduler.ts @@ -7,8 +7,8 @@ */ import { computed, makeObservable, observable } from 'mobx'; -import type { ITask } from './ITask'; -import { Task } from './Task'; +import type { ITask } from './ITask.js'; +import { Task } from './Task.js'; interface ITaskContainer { readonly id: T; diff --git a/webapp/packages/core-executor/src/executorHandlerFilter.ts b/webapp/packages/core-executor/src/executorHandlerFilter.ts index ed55e2cba7..f9a25e8abf 100644 --- a/webapp/packages/core-executor/src/executorHandlerFilter.ts +++ b/webapp/packages/core-executor/src/executorHandlerFilter.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IExecutionContextProvider } from './IExecutionContext'; -import type { IExecutorHandler } from './IExecutorHandler'; +import type { IExecutionContextProvider } from './IExecutionContext.js'; +import type { IExecutorHandler } from './IExecutorHandler.js'; export type IExecutorHandlerFilter = (data: T, contexts: IExecutionContextProvider) => boolean; diff --git a/webapp/packages/core-executor/src/index.ts b/webapp/packages/core-executor/src/index.ts index ffe4b8d940..6fc305551d 100644 --- a/webapp/packages/core-executor/src/index.ts +++ b/webapp/packages/core-executor/src/index.ts @@ -1,17 +1,24 @@ -export * from './TaskScheduler/AutoRunningTask'; -export * from './TaskScheduler/ITask'; -export * from './TaskScheduler/Task'; -export * from './TaskScheduler/TaskScheduler'; -export * from './ExecutionContext'; -export * from './executionExceptionContext'; -export * from './Executor'; -export * from './executorHandlerFilter'; -export * from './ExecutorHandlersCollection'; -export * from './ExecutorInterrupter'; -export * from './IExecutionContext'; -export * from './IExecutor'; -export * from './IExecutorHandler'; -export * from './IExecutorHandlersCollection'; -export * from './ISyncExecutor'; -export * from './SyncExecutor'; -export * from './whileTask'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './TaskScheduler/AutoRunningTask.js'; +export * from './TaskScheduler/ITask.js'; +export * from './TaskScheduler/Task.js'; +export * from './TaskScheduler/TaskScheduler.js'; +export * from './ExecutionContext.js'; +export * from './executionExceptionContext.js'; +export * from './Executor.js'; +export * from './executorHandlerFilter.js'; +export * from './ExecutorHandlersCollection.js'; +export * from './ExecutorInterrupter.js'; +export * from './IExecutionContext.js'; +export * from './IExecutor.js'; +export * from './IExecutorHandler.js'; +export * from './IExecutorHandlersCollection.js'; +export * from './ISyncExecutor.js'; +export * from './SyncExecutor.js'; +export * from './whileTask.js'; diff --git a/webapp/packages/core-executor/src/whileTask.ts b/webapp/packages/core-executor/src/whileTask.ts index 00b710d2cd..11ae940fe3 100644 --- a/webapp/packages/core-executor/src/whileTask.ts +++ b/webapp/packages/core-executor/src/whileTask.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { AutoRunningTask } from './TaskScheduler/AutoRunningTask'; -import { CancelError } from './TaskScheduler/CancelError'; -import type { ITask } from './TaskScheduler/ITask'; -import { Task } from './TaskScheduler/Task'; -import { TimeoutError } from './TaskScheduler/TimeoutError'; +import { AutoRunningTask } from './TaskScheduler/AutoRunningTask.js'; +import { CancelError } from './TaskScheduler/CancelError.js'; +import type { ITask } from './TaskScheduler/ITask.js'; +import { Task } from './TaskScheduler/Task.js'; +import { TimeoutError } from './TaskScheduler/TimeoutError.js'; export function whileTask( callback: (value: T) => Promise | boolean, diff --git a/webapp/packages/core-extensions/package.json b/webapp/packages/core-extensions/package.json index 6f413a6bf0..8cb577519e 100644 --- a/webapp/packages/core-extensions/package.json +++ b/webapp/packages/core-extensions/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-extensions", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-extensions/src/ExtensionUtils.ts b/webapp/packages/core-extensions/src/ExtensionUtils.ts index 4c259a175a..78a67593e5 100644 --- a/webapp/packages/core-extensions/src/ExtensionUtils.ts +++ b/webapp/packages/core-extensions/src/ExtensionUtils.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IExtension } from './IExtension'; +import type { IExtension } from './IExtension.js'; interface ExtensionExecutor { on: >(predicate: (extension: IExtension) => extension is T, action: (extension: T) => void) => this; diff --git a/webapp/packages/core-extensions/src/IExtension.ts b/webapp/packages/core-extensions/src/IExtension.ts index eacd3a96f1..9f30d5f262 100644 --- a/webapp/packages/core-extensions/src/IExtension.ts +++ b/webapp/packages/core-extensions/src/IExtension.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { EXTENSION_SYMBOL, EXTENSION_TYPE_SYMBOL } from './constants'; +import { EXTENSION_SYMBOL, EXTENSION_TYPE_SYMBOL } from './constants.js'; export interface IExtension { [EXTENSION_SYMBOL]: symbol; diff --git a/webapp/packages/core-extensions/src/createExtension.ts b/webapp/packages/core-extensions/src/createExtension.ts index fdc22dcef0..6841e25315 100644 --- a/webapp/packages/core-extensions/src/createExtension.ts +++ b/webapp/packages/core-extensions/src/createExtension.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { EXTENSION_SYMBOL } from './constants'; -import type { IExtension } from './IExtension'; +import { EXTENSION_SYMBOL } from './constants.js'; +import type { IExtension } from './IExtension.js'; export function createExtension(extension: Record, key: symbol): IExtension { return Object.assign(extension, { [EXTENSION_SYMBOL]: key }); diff --git a/webapp/packages/core-extensions/src/index.ts b/webapp/packages/core-extensions/src/index.ts index 798336ccbf..178225e670 100644 --- a/webapp/packages/core-extensions/src/index.ts +++ b/webapp/packages/core-extensions/src/index.ts @@ -1,3 +1,10 @@ -export * from './createExtension'; -export * from './ExtensionUtils'; -export * from './IExtension'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './createExtension.js'; +export * from './ExtensionUtils.js'; +export * from './IExtension.js'; diff --git a/webapp/packages/core-localization/package.json b/webapp/packages/core-localization/package.json index 8ec5165d15..85b27c09d1 100644 --- a/webapp/packages/core-localization/package.json +++ b/webapp/packages/core-localization/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-localization", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-localization/src/DEFAULT_LOCALE.ts b/webapp/packages/core-localization/src/DEFAULT_LOCALE.ts index c492c4f628..37a64d2519 100644 --- a/webapp/packages/core-localization/src/DEFAULT_LOCALE.ts +++ b/webapp/packages/core-localization/src/DEFAULT_LOCALE.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ILocale } from './ILocale'; +import type { ILocale } from './ILocale.js'; export const DEFAULT_LOCALE: ILocale = { isoCode: 'en', name: 'English' }; diff --git a/webapp/packages/core-localization/src/LocalizationService.ts b/webapp/packages/core-localization/src/LocalizationService.ts index 47d94790df..196d27d3f9 100644 --- a/webapp/packages/core-localization/src/LocalizationService.ts +++ b/webapp/packages/core-localization/src/LocalizationService.ts @@ -5,15 +5,15 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { IReactionDisposer, makeObservable, observable, reaction } from 'mobx'; +import { type IReactionDisposer, makeObservable, observable, reaction } from 'mobx'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; -import { DEFAULT_LOCALE } from './DEFAULT_LOCALE'; -import type { ILocale } from './ILocale'; -import type { ILocaleProvider } from './ILocaleProvider'; -import type { TLocalizationToken } from './TLocalizationToken'; +import { DEFAULT_LOCALE } from './DEFAULT_LOCALE.js'; +import type { ILocale } from './ILocale.js'; +import type { ILocaleProvider } from './ILocaleProvider.js'; +import type { TLocalizationToken } from './TLocalizationToken.js'; @injectable() export class LocalizationService extends Bootstrap { @@ -28,7 +28,13 @@ export class LocalizationService extends Bootstrap { return DEFAULT_LOCALE.isoCode; } - return this.supportedLanguages[0].isoCode; + const firstLanguage = this.supportedLanguages[0]; + + if (!firstLanguage) { + throw new Error('No language is awailable'); + } + + return firstLanguage.isoCode; } supportedLanguages: ILocale[]; @@ -103,7 +109,7 @@ export class LocalizationService extends Bootstrap { return token; }; - register(): void { + override register(): void { this.setSupportedLanguages([ { isoCode: 'en', @@ -134,7 +140,7 @@ export class LocalizationService extends Bootstrap { this.addProvider(this.coreProvider.bind(this)); } - async load(): Promise { + override async load(): Promise { this.reactionDisposer = reaction( () => this.currentLanguage, lang => { @@ -145,7 +151,7 @@ export class LocalizationService extends Bootstrap { await this.loadLocale(this.currentLanguage); } - dispose(): void { + override dispose(): void { if (this.reactionDisposer) { this.reactionDisposer(); } @@ -173,15 +179,15 @@ export class LocalizationService extends Bootstrap { private async coreProvider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } @@ -193,7 +199,7 @@ export class LocalizationService extends Bootstrap { for (const provider of this.localeProviders) { for (const [key, value] of await provider(localeKey)) { - locale.set(key, value); + locale.set(key!, value!); } } this.localeMap.set(localeKey, locale); diff --git a/webapp/packages/core-localization/src/index.ts b/webapp/packages/core-localization/src/index.ts index 00bdc9820c..802ca40f47 100644 --- a/webapp/packages/core-localization/src/index.ts +++ b/webapp/packages/core-localization/src/index.ts @@ -1,5 +1,12 @@ -export * from './manifest'; -export * from './LocalizationService'; -export * from './Locale'; -export * from './TLocalizationToken'; -export * from './DEFAULT_LOCALE'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; +export * from './LocalizationService.js'; +export * from './Locale.js'; +export * from './TLocalizationToken.js'; +export * from './DEFAULT_LOCALE.js'; diff --git a/webapp/packages/core-localization/src/manifest.ts b/webapp/packages/core-localization/src/manifest.ts index 3f564b8ca5..79929a4d93 100644 --- a/webapp/packages/core-localization/src/manifest.ts +++ b/webapp/packages/core-localization/src/manifest.ts @@ -12,5 +12,5 @@ export const coreLocalizationManifest: PluginManifest = { name: 'Core Localization', }, - providers: [() => import('./LocalizationService').then(m => m.LocalizationService)], + providers: [() => import('./LocalizationService.js').then(m => m.LocalizationService)], }; diff --git a/webapp/packages/core-navigation-tree/package.json b/webapp/packages/core-navigation-tree/package.json index 8e08eb61e9..282a7d2880 100644 --- a/webapp/packages/core-navigation-tree/package.json +++ b/webapp/packages/core-navigation-tree/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-navigation-tree", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -53,4 +54,4 @@ "@testing-library/jest-dom": "^6", "typescript": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/core-navigation-tree/src/LocaleService.ts b/webapp/packages/core-navigation-tree/src/LocaleService.ts index 3f07bae28c..a55cfec20e 100644 --- a/webapp/packages/core-navigation-tree/src/LocaleService.ts +++ b/webapp/packages/core-navigation-tree/src/LocaleService.ts @@ -14,22 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-navigation-tree/src/NavTreeSettingsService.test.ts b/webapp/packages/core-navigation-tree/src/NavTreeSettingsService.test.ts index c1043a6213..8dc499cb19 100644 --- a/webapp/packages/core-navigation-tree/src/NavTreeSettingsService.test.ts +++ b/webapp/packages/core-navigation-tree/src/NavTreeSettingsService.test.ts @@ -8,32 +8,32 @@ import { expect, test } from '@jest/globals'; import { coreAuthenticationManifest } from '@cloudbeaver/core-authentication'; -import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication'; +import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication.js'; import { coreBrowserManifest } from '@cloudbeaver/core-browser'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreEventsManifest } from '@cloudbeaver/core-events'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreProjectsManifest } from '@cloudbeaver/core-projects'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreRoutingManifest } from '@cloudbeaver/core-routing'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { coreStorageManifest } from '@cloudbeaver/core-storage'; import { coreUIManifest } from '@cloudbeaver/core-ui'; import { coreViewManifest } from '@cloudbeaver/core-view'; import { createApp } from '@cloudbeaver/tests-runner'; -import { coreNavigationTree } from './manifest'; -import { NavTreeSettingsService } from './NavTreeSettingsService'; +import { coreNavigationTree } from './manifest.js'; +import { NavTreeSettingsService } from './NavTreeSettingsService.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/DATA_CONTEXT_NAV_NODE.ts b/webapp/packages/core-navigation-tree/src/NodesManager/DATA_CONTEXT_NAV_NODE.ts index 0132839f1b..77e7ee192d 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/DATA_CONTEXT_NAV_NODE.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/DATA_CONTEXT_NAV_NODE.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { NavNode } from './EntityTypes'; +import type { NavNode } from './EntityTypes.js'; export const DATA_CONTEXT_NAV_NODE = createDataContext('nav-node'); diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/DATA_CONTEXT_NAV_NODES.ts b/webapp/packages/core-navigation-tree/src/NodesManager/DATA_CONTEXT_NAV_NODES.ts index 9f4a147365..978e46d710 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/DATA_CONTEXT_NAV_NODES.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/DATA_CONTEXT_NAV_NODES.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { NavNode } from './EntityTypes'; +import type { NavNode } from './EntityTypes.js'; export const DATA_CONTEXT_NAV_NODES = createDataContext<() => NavNode[]>('nav-nodes'); diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/DBObjectResource.ts b/webapp/packages/core-navigation-tree/src/NodesManager/DBObjectResource.ts index 90f8d9c0d1..75077b3e97 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/DBObjectResource.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/DBObjectResource.ts @@ -24,9 +24,9 @@ import { } from '@cloudbeaver/core-resource'; import { DetailsError, GraphQLService } from '@cloudbeaver/core-sdk'; -import type { DBObject } from './EntityTypes'; -import { NavNodeInfoResource } from './NavNodeInfoResource'; -import { NavTreeResource } from './NavTreeResource'; +import type { DBObject } from './EntityTypes.js'; +import { NavNodeInfoResource } from './NavNodeInfoResource.js'; +import { NavTreeResource } from './NavTreeResource.js'; export const DBObjectParentKey = resourceKeyListAliasFactory('@db-object/parent', (parentId: string) => ({ parentId })); diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/NavNodeInfoResource.ts b/webapp/packages/core-navigation-tree/src/NodesManager/NavNodeInfoResource.ts index 8f11f5ba98..bc403c2f1c 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/NavNodeInfoResource.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/NavNodeInfoResource.ts @@ -19,10 +19,10 @@ import { type ResourceKeySimple, ResourceKeyUtils, } from '@cloudbeaver/core-resource'; -import { GraphQLService, NavNodeInfoFragment } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type NavNodeInfoFragment } from '@cloudbeaver/core-sdk'; import { getPathParents, MetadataMap } from '@cloudbeaver/core-utils'; -import type { NavNode } from './EntityTypes'; +import type { NavNode } from './EntityTypes.js'; type NavNodeInfo = NavNodeInfoFragment; @@ -34,7 +34,10 @@ interface INodeMetadata extends ICachedResourceMetadata { @injectable() export class NavNodeInfoResource extends CachedMapResource, INodeMetadata> { - constructor(private readonly graphQLService: GraphQLService, appAuthService: AppAuthService) { + constructor( + private readonly graphQLService: GraphQLService, + appAuthService: AppAuthService, + ) { super(); makeObservable(this, { @@ -179,13 +182,13 @@ export class NavNodeInfoResource extends CachedMapResource): INodeMetadata { + protected override getDefaultMetadata(key: string, metadata: MetadataMap): INodeMetadata { return Object.assign(super.getDefaultMetadata(key, metadata), { withDetails: false, }); } - protected dataSet(key: string, value: NavNode): void { + protected override dataSet(key: string, value: NavNode): void { const currentValue = this.dataGet(key); super.dataSet(key, Object.assign(currentValue ?? {}, value)); } diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/NavNodeManagerService.ts b/webapp/packages/core-navigation-tree/src/NodesManager/NavNodeManagerService.ts index 8d28879930..eedf491ba3 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/NavNodeManagerService.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/NavNodeManagerService.ts @@ -9,19 +9,26 @@ import { action } from 'mobx'; import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutionContextProvider, IExecutor, ISyncContextLoader, ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { + Executor, + type IExecutionContextProvider, + type IExecutor, + type ISyncContextLoader, + type ISyncExecutor, + SyncExecutor, +} from '@cloudbeaver/core-executor'; import { resourceKeyList, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { NavigationService } from '@cloudbeaver/core-ui'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import { ENodeFeature } from './ENodeFeature'; -import type { NavNode, NavNodeInfo } from './EntityTypes'; -import { EObjectFeature } from './EObjectFeature'; -import { NavNodeInfoResource, ROOT_NODE_PATH } from './NavNodeInfoResource'; -import { navNodeMoveContext } from './navNodeMoveContext'; -import { NavTreeResource } from './NavTreeResource'; -import { NodeManagerUtils } from './NodeManagerUtils'; -import { ProjectsNavNodeService } from './ProjectsNavNodeService'; +import { ENodeFeature } from './ENodeFeature.js'; +import type { NavNode, NavNodeInfo } from './EntityTypes.js'; +import { EObjectFeature } from './EObjectFeature.js'; +import { NavNodeInfoResource, ROOT_NODE_PATH } from './NavNodeInfoResource.js'; +import { navNodeMoveContext } from './navNodeMoveContext.js'; +import { NavTreeResource } from './NavTreeResource.js'; +import { NodeManagerUtils } from './NodeManagerUtils.js'; +import { ProjectsNavNodeService } from './ProjectsNavNodeService.js'; export interface NavNodeKey { nodeId: string; @@ -137,10 +144,6 @@ export class NavNodeManagerService extends Bootstrap { ); } - register(): void {} - - load(): void {} - getNavNodeCache(nodeId: string): INavNodeCache { return this.syncNodeInfoCache.get(nodeId); } @@ -235,11 +238,11 @@ export class NavNodeManagerService extends Bootstrap { const items = await this.navNodeInfoResource.load(resourceKeyList(nodes.map(n => n.nodeId))); for (let i = 0; i < items.length; i++) { - items[i].parentId = nodes[i].parentId; + items[i]!.parentId = nodes[i]!.parentId; } if (nodes.length === 1) { - return this.getNode(nodes[0])!; + return this.getNode(nodes[0]!)!; } return this.getNode(nodes) as NavNode[]; diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/NavTreeResource.ts b/webapp/packages/core-navigation-tree/src/NodesManager/NavTreeResource.ts index 5f996e2976..4254026317 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/NavTreeResource.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/NavTreeResource.ts @@ -9,7 +9,7 @@ import { action, computed, makeObservable, observable, runInAction } from 'mobx' import { AppAuthService, UserInfoResource } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; -import { Executor, ExecutorInterrupter, IExecutionContext, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutionContext, type IExecutor } from '@cloudbeaver/core-executor'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { CachedMapAllKey, @@ -29,12 +29,12 @@ import { ResourceKeyUtils, } from '@cloudbeaver/core-resource'; import { SessionDataResource } from '@cloudbeaver/core-root'; -import { DetailsError, NavNodeChildrenQuery as fake, GraphQLService } from '@cloudbeaver/core-sdk'; +import { DetailsError, type NavNodeChildrenQuery as fake, GraphQLService } from '@cloudbeaver/core-sdk'; import { flat, getPathName, getPathParent, isDefined, isUndefined, MetadataMap } from '@cloudbeaver/core-utils'; -import { NavTreeSettingsService } from '../NavTreeSettingsService'; -import type { NavNode } from './EntityTypes'; -import { NavNodeInfoResource, ROOT_NODE_PATH } from './NavNodeInfoResource'; +import { NavTreeSettingsService } from '../NavTreeSettingsService.js'; +import type { NavNode } from './EntityTypes.js'; +import { NavNodeInfoResource, ROOT_NODE_PATH } from './NavNodeInfoResource.js'; // TODO: so much dirty export interface NodePath { @@ -343,7 +343,7 @@ export class NavTreeResource extends CachedMapResource { - const values = i === -1 ? (valueObject as string[]) : (valueObject as string[][])[i]; + const values = i === -1 ? (valueObject as string[]) : (valueObject as string[][])[i]!; const currentValue = this.data.get(key); if (currentValue) { @@ -363,7 +363,7 @@ export class NavTreeResource extends CachedMapResource, value: string[][]): void; unshiftToNode(keyObject: ResourceKeySimple, valueObject: string[] | string[][]): void { ResourceKeyUtils.forEach(keyObject, (key, i) => { - const values = i === -1 ? (valueObject as string[]) : (valueObject as string[][])[i]; + const values = i === -1 ? (valueObject as string[]) : (valueObject as string[][])[i]!; const currentValue = this.data.get(key) || []; currentValue.unshift(...values); @@ -378,7 +378,7 @@ export class NavTreeResource extends CachedMapResource, value: string[][]): void; pushToNode(keyObject: ResourceKeySimple, valueObject: string[] | string[][]): void { ResourceKeyUtils.forEach(keyObject, (key, i) => { - const values = i === -1 ? (valueObject as string[]) : (valueObject as string[][])[i]; + const values = i === -1 ? (valueObject as string[]) : (valueObject as string[][])[i]!; const currentValue = this.data.get(key) || []; currentValue.push(...values); @@ -399,9 +399,9 @@ export class NavTreeResource extends CachedMapResource, value: string[][]): void; - set(keyObject: ResourceKeySimple, valueObject: string[] | string[][]): void { + override set(key: string, value: string[]): void; + override set(key: ResourceKeyList, value: string[][]): void; + override set(keyObject: ResourceKeySimple, valueObject: string[] | string[][]): void { const childrenToRemove: string[] = []; const children: string[] = []; @@ -426,10 +426,10 @@ export class NavTreeResource extends CachedMapResource): void; - delete(key: ResourceKeySimple): void; - delete(key: ResourceKeySimple): void { + override delete(key: string): void; + override delete(key: ResourceKeyList): void; + override delete(key: ResourceKeySimple): void; + override delete(key: ResourceKeySimple): void { const items = resourceKeyList(this.getNestedChildren(key)); if (items.length === 0) { @@ -440,7 +440,7 @@ export class NavTreeResource extends CachedMapResource, contexts: IExecutionContext>): Promise { + protected override async preLoadData(key: ResourceKey, contexts: IExecutionContext>): Promise { await ResourceKeyUtils.forEachAsync(key, async nodeId => { if (isResourceAlias(nodeId)) { return; @@ -584,7 +584,7 @@ export class NavTreeResource extends CachedMapResource): INodeMetadata { + protected override getDefaultMetadata(key: string, metadata: MetadataMap): INodeMetadata { return Object.assign(super.getDefaultMetadata(key, metadata), { withDetails: false, }); diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/ProjectsNavNodeService.ts b/webapp/packages/core-navigation-tree/src/NodesManager/ProjectsNavNodeService.ts index 332626c91e..d07a7266eb 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/ProjectsNavNodeService.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/ProjectsNavNodeService.ts @@ -6,17 +6,20 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { NAV_NODE_TYPE_PROJECT, ProjectInfo, ProjectInfoResource } from '@cloudbeaver/core-projects'; +import { NAV_NODE_TYPE_PROJECT, type ProjectInfo, ProjectInfoResource } from '@cloudbeaver/core-projects'; import { resourceKeyList } from '@cloudbeaver/core-resource'; -import { NavNodeInfoResource } from './NavNodeInfoResource'; +import { NavNodeInfoResource } from './NavNodeInfoResource.js'; @injectable() export class ProjectsNavNodeService { projectTypes: string[]; projectPrefixes: string[]; - constructor(private readonly navNodeInfoResource: NavNodeInfoResource, private readonly projectInfoResource: ProjectInfoResource) { + constructor( + private readonly navNodeInfoResource: NavNodeInfoResource, + private readonly projectInfoResource: ProjectInfoResource, + ) { this.projectTypes = [NAV_NODE_TYPE_PROJECT]; this.projectPrefixes = ['resource://']; } diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/extensions/IObjectNavNodeProvider.ts b/webapp/packages/core-navigation-tree/src/NodesManager/extensions/IObjectNavNodeProvider.ts index 5016d37928..90d4118742 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/extensions/IObjectNavNodeProvider.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/extensions/IObjectNavNodeProvider.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; -import type { IDataContextActiveNode } from '../DATA_CONTEXT_ACTIVE_NODE'; +import type { IDataContextActiveNode } from '../DATA_CONTEXT_ACTIVE_NODE.js'; const objectNavNodeProviderSymbol = Symbol('@extension/ObjectNavNodeProvider'); diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/getNodesFromContext.ts b/webapp/packages/core-navigation-tree/src/NodesManager/getNodesFromContext.ts index 58009c1efb..993fe4816e 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/getNodesFromContext.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/getNodesFromContext.ts @@ -7,9 +7,9 @@ */ import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; -import { DATA_CONTEXT_NAV_NODE } from './DATA_CONTEXT_NAV_NODE'; -import { DATA_CONTEXT_NAV_NODES } from './DATA_CONTEXT_NAV_NODES'; -import type { NavNode } from './EntityTypes'; +import { DATA_CONTEXT_NAV_NODE } from './DATA_CONTEXT_NAV_NODE.js'; +import { DATA_CONTEXT_NAV_NODES } from './DATA_CONTEXT_NAV_NODES.js'; +import type { NavNode } from './EntityTypes.js'; export function getNodesFromContext(context: IDataContextProvider): NavNode[] { const node = context.get(DATA_CONTEXT_NAV_NODE); diff --git a/webapp/packages/core-navigation-tree/src/NodesManager/navNodeMoveContext.ts b/webapp/packages/core-navigation-tree/src/NodesManager/navNodeMoveContext.ts index bb02374d68..a2514c97ab 100644 --- a/webapp/packages/core-navigation-tree/src/NodesManager/navNodeMoveContext.ts +++ b/webapp/packages/core-navigation-tree/src/NodesManager/navNodeMoveContext.ts @@ -7,7 +7,7 @@ */ import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import type { INodeMoveData } from './NavNodeManagerService'; +import type { INodeMoveData } from './NavNodeManagerService.js'; interface INavNodeMoveContext { canMove: boolean; diff --git a/webapp/packages/core-navigation-tree/src/index.ts b/webapp/packages/core-navigation-tree/src/index.ts index 6e8f13fd66..5788ad37c5 100644 --- a/webapp/packages/core-navigation-tree/src/index.ts +++ b/webapp/packages/core-navigation-tree/src/index.ts @@ -1,27 +1,34 @@ -export * from './manifest'; -export * from './NAVIGATION_TREE_SETTINGS_GROUP'; -export * from './NavTreeSettingsService'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; +export * from './NAVIGATION_TREE_SETTINGS_GROUP.js'; +export * from './NavTreeSettingsService.js'; -export * from './NodesManager/extensions/IObjectNavNodeProvider'; -export * from './NodesManager/DBObjectResource'; -export * from './NodesManager/DATA_CONTEXT_ACTIVE_NODE'; -export * from './NodesManager/DATA_CONTEXT_NAV_NODE'; -export * from './NodesManager/DATA_CONTEXT_NAV_NODE_ID'; -export * from './NodesManager/DATA_CONTEXT_NAV_NODES'; -export * from './NodesManager/NavNodeInfoResource'; -export * from './NodesManager/NavNodeManagerService'; -export * from './NodesManager/NavTreeResource'; -export * from './NodesManager/nodeDeleteContext'; -export * from './NodesManager/NodeManagerUtils'; -export * from './NodesManager/navNodeMoveContext'; -export * from './NodesManager/getNodesFromContext'; -export * from './NodesManager/NAV_NODE_TYPE_FOLDER'; -export * from './NodesManager/NAV_NODE_TYPE_ROOT'; +export * from './NodesManager/extensions/IObjectNavNodeProvider.js'; +export * from './NodesManager/DBObjectResource.js'; +export * from './NodesManager/DATA_CONTEXT_ACTIVE_NODE.js'; +export * from './NodesManager/DATA_CONTEXT_NAV_NODE.js'; +export * from './NodesManager/DATA_CONTEXT_NAV_NODE_ID.js'; +export * from './NodesManager/DATA_CONTEXT_NAV_NODES.js'; +export * from './NodesManager/NavNodeInfoResource.js'; +export * from './NodesManager/NavNodeManagerService.js'; +export * from './NodesManager/NavTreeResource.js'; +export * from './NodesManager/nodeDeleteContext.js'; +export * from './NodesManager/NodeManagerUtils.js'; +export * from './NodesManager/navNodeMoveContext.js'; +export * from './NodesManager/getNodesFromContext.js'; +export * from './NodesManager/NAV_NODE_TYPE_FOLDER.js'; +export * from './NodesManager/NAV_NODE_TYPE_ROOT.js'; -export * from './NodesManager/ENodeFeature'; -export * from './NodesManager/EObjectFeature'; -export * from './NodesManager/INodeActions'; +export * from './NodesManager/ENodeFeature.js'; +export * from './NodesManager/EObjectFeature.js'; +export * from './NodesManager/INodeActions.js'; -export * from './NodesManager/NodeManagerUtils'; -export * from './NodesManager/EntityTypes'; -export * from './NodesManager/ProjectsNavNodeService'; +export * from './NodesManager/NodeManagerUtils.js'; +export * from './NodesManager/EntityTypes.js'; +export * from './NodesManager/ProjectsNavNodeService.js'; diff --git a/webapp/packages/core-navigation-tree/src/manifest.ts b/webapp/packages/core-navigation-tree/src/manifest.ts index 1cac7420dc..cc4f27af72 100644 --- a/webapp/packages/core-navigation-tree/src/manifest.ts +++ b/webapp/packages/core-navigation-tree/src/manifest.ts @@ -13,12 +13,12 @@ export const coreNavigationTree: PluginManifest = { }, providers: [ - () => import('./NavTreeSettingsService').then(m => m.NavTreeSettingsService), - () => import('./NodesManager/NavNodeManagerService').then(m => m.NavNodeManagerService), - () => import('./NodesManager/DBObjectResource').then(m => m.DBObjectResource), - () => import('./NodesManager/NavNodeInfoResource').then(m => m.NavNodeInfoResource), - () => import('./NodesManager/NavTreeResource').then(m => m.NavTreeResource), - () => import('./NodesManager/ProjectsNavNodeService').then(m => m.ProjectsNavNodeService), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./NavTreeSettingsService.js').then(m => m.NavTreeSettingsService), + () => import('./NodesManager/NavNodeManagerService.js').then(m => m.NavNodeManagerService), + () => import('./NodesManager/DBObjectResource.js').then(m => m.DBObjectResource), + () => import('./NodesManager/NavNodeInfoResource.js').then(m => m.NavNodeInfoResource), + () => import('./NodesManager/NavTreeResource.js').then(m => m.NavTreeResource), + () => import('./NodesManager/ProjectsNavNodeService.js').then(m => m.ProjectsNavNodeService), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/core-notifications/package.json b/webapp/packages/core-notifications/package.json index 06c86ee7a6..eacf1ca0b4 100644 --- a/webapp/packages/core-notifications/package.json +++ b/webapp/packages/core-notifications/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-notifications", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-notifications/src/Notifications.tsx b/webapp/packages/core-notifications/src/Notifications.tsx index c7a649bbf9..1ec9150bd8 100644 --- a/webapp/packages/core-notifications/src/Notifications.tsx +++ b/webapp/packages/core-notifications/src/Notifications.tsx @@ -6,14 +6,14 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import { Portal } from 'reakit/Portal'; +import { Portal } from 'reakit'; import { s, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import styles from './Notifications.module.css'; -import { NotificationsItem } from './NotificationsItem/NotificationsItem'; +import { NotificationsItem } from './NotificationsItem/NotificationsItem.js'; export const Notifications = observer(function Notifications() { const notificationService = useService(NotificationService); diff --git a/webapp/packages/core-notifications/src/NotificationsItem/NotificationsItem.tsx b/webapp/packages/core-notifications/src/NotificationsItem/NotificationsItem.tsx index 8ddf0c8df4..9c2467a5de 100644 --- a/webapp/packages/core-notifications/src/NotificationsItem/NotificationsItem.tsx +++ b/webapp/packages/core-notifications/src/NotificationsItem/NotificationsItem.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { Snackbar, useErrorDetails } from '@cloudbeaver/core-blocks'; import { ENotificationType, type INotification } from '@cloudbeaver/core-events'; -import { FADE_TIMEOUT } from './FADE_TIMEOUT'; +import { FADE_TIMEOUT } from './FADE_TIMEOUT.js'; interface Props { notification: INotification; diff --git a/webapp/packages/core-notifications/src/index.ts b/webapp/packages/core-notifications/src/index.ts index e7825351af..1a0bd0fbff 100644 --- a/webapp/packages/core-notifications/src/index.ts +++ b/webapp/packages/core-notifications/src/index.ts @@ -1 +1,8 @@ -export * from './Notifications'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './Notifications.js'; diff --git a/webapp/packages/core-product/package.json b/webapp/packages/core-product/package.json index d469feb4be..ea92e686c9 100644 --- a/webapp/packages/core-product/package.json +++ b/webapp/packages/core-product/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-product", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-product/src/ProductSettingsService.ts b/webapp/packages/core-product/src/ProductSettingsService.ts index 4897a2101c..235f26d52d 100644 --- a/webapp/packages/core-product/src/ProductSettingsService.ts +++ b/webapp/packages/core-product/src/ProductSettingsService.ts @@ -25,7 +25,7 @@ export class ProductSettingsService extends SettingsSource { }); } - has(key: any): boolean { + override has(key: any): boolean { return this.settings.has(key) || super.has(key) || false; } @@ -37,7 +37,7 @@ export class ProductSettingsService extends SettingsSource { return this.settings.get(key); } - setValue(key: any, value: any): void { + override setValue(key: any, value: any): void { this.update(() => { this.settings.set(key, value); }); @@ -53,7 +53,7 @@ export class ProductSettingsService extends SettingsSource { }); } - clear(): void { + override clear(): void { this.update(() => { super.clear(); this.settings.clear(); diff --git a/webapp/packages/core-product/src/index.ts b/webapp/packages/core-product/src/index.ts index 0cbae46b95..d9036247a1 100644 --- a/webapp/packages/core-product/src/index.ts +++ b/webapp/packages/core-product/src/index.ts @@ -5,5 +5,5 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './ProductSettingsService'; -export * from './manifest'; +export * from './ProductSettingsService.js'; +export * from './manifest.js'; diff --git a/webapp/packages/core-product/src/manifest.ts b/webapp/packages/core-product/src/manifest.ts index 96101bde5f..bb44fe485c 100644 --- a/webapp/packages/core-product/src/manifest.ts +++ b/webapp/packages/core-product/src/manifest.ts @@ -12,5 +12,5 @@ export const coreProductManifest: PluginManifest = { name: 'Core Product', }, - providers: [() => import('./ProductSettingsService').then(m => m.ProductSettingsService)], + providers: [() => import('./ProductSettingsService.js').then(m => m.ProductSettingsService)], }; diff --git a/webapp/packages/core-projects/package.json b/webapp/packages/core-projects/package.json index 0489a16783..f9dc536024 100644 --- a/webapp/packages/core-projects/package.json +++ b/webapp/packages/core-projects/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-projects", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-projects/src/LocaleService.ts b/webapp/packages/core-projects/src/LocaleService.ts index 483bb120d5..e74d5b618b 100644 --- a/webapp/packages/core-projects/src/LocaleService.ts +++ b/webapp/packages/core-projects/src/LocaleService.ts @@ -14,26 +14,24 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; case 'de': - return (await import('./locales/de')).default; + return (await import('./locales/de.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-projects/src/ProjectInfoEventHandler.ts b/webapp/packages/core-projects/src/ProjectInfoEventHandler.ts index 1c5ca993f5..80895cd487 100644 --- a/webapp/packages/core-projects/src/ProjectInfoEventHandler.ts +++ b/webapp/packages/core-projects/src/ProjectInfoEventHandler.ts @@ -6,7 +6,14 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { ClientEventId, ISessionEvent, SessionEventId, SessionEventSource, SessionEventTopic, TopicEventHandler } from '@cloudbeaver/core-root'; +import { + ClientEventId, + type ISessionEvent, + type SessionEventId, + SessionEventSource, + SessionEventTopic, + TopicEventHandler, +} from '@cloudbeaver/core-root'; import type { CbProjectsActiveEvent, CbProjectUpdateEvent as IProjectInfoEvent } from '@cloudbeaver/core-sdk'; import { isArraysEqual } from '@cloudbeaver/core-utils'; diff --git a/webapp/packages/core-projects/src/ProjectInfoResource.ts b/webapp/packages/core-projects/src/ProjectInfoResource.ts index 4e2d1ac296..dfb1620efe 100644 --- a/webapp/packages/core-projects/src/ProjectInfoResource.ts +++ b/webapp/packages/core-projects/src/ProjectInfoResource.ts @@ -9,9 +9,9 @@ import { AppAuthService, UserInfoResource } from '@cloudbeaver/core-authenticati import { injectable } from '@cloudbeaver/core-di'; import { CachedMapAllKey, CachedMapResource, resourceKeyList } from '@cloudbeaver/core-resource'; import { PermissionsService } from '@cloudbeaver/core-root'; -import { GraphQLService, RmResourceType, ProjectInfo as SchemaProjectInfo } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type RmResourceType, type ProjectInfo as SchemaProjectInfo } from '@cloudbeaver/core-sdk'; -import { createResourceOfType } from './createResourceOfType'; +import { createResourceOfType } from './createResourceOfType.js'; export type ProjectInfo = SchemaProjectInfo; export type ProjectInfoResourceType = RmResourceType; diff --git a/webapp/packages/core-projects/src/ProjectsService.ts b/webapp/packages/core-projects/src/ProjectsService.ts index 14dcab7d85..80055fae45 100644 --- a/webapp/packages/core-projects/src/ProjectsService.ts +++ b/webapp/packages/core-projects/src/ProjectsService.ts @@ -9,15 +9,15 @@ import { computed, makeObservable } from 'mobx'; import { ANONYMOUS_USER_ID, UserDataService, UserInfoResource } from '@cloudbeaver/core-authentication'; import { Dependency, injectable } from '@cloudbeaver/core-di'; -import { Executor, ExecutorInterrupter, IExecutor, ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutor, type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { CachedMapAllKey, resourceKeyList, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { DataSynchronizationService, ServerConfigResource, ServerEventId } from '@cloudbeaver/core-root'; import { NavigationService } from '@cloudbeaver/core-ui'; import { isArraysEqual } from '@cloudbeaver/core-utils'; -import { activeProjectsContext } from './activeProjectsContext'; -import { IProjectInfoEvent, ProjectInfoEventHandler } from './ProjectInfoEventHandler'; -import { ProjectInfo, ProjectInfoResource } from './ProjectInfoResource'; +import { activeProjectsContext } from './activeProjectsContext.js'; +import { type IProjectInfoEvent, ProjectInfoEventHandler } from './ProjectInfoEventHandler.js'; +import { type ProjectInfo, ProjectInfoResource } from './ProjectInfoResource.js'; interface IActiveProjectData { projects: string[]; diff --git a/webapp/packages/core-projects/src/activeProjectsContext.ts b/webapp/packages/core-projects/src/activeProjectsContext.ts index 3d75a450bd..927a2b656d 100644 --- a/webapp/packages/core-projects/src/activeProjectsContext.ts +++ b/webapp/packages/core-projects/src/activeProjectsContext.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ProjectInfo } from './ProjectInfoResource'; +import type { ProjectInfo } from './ProjectInfoResource.js'; interface IActiveProjectsContext { activeProjects: ProjectInfo[]; diff --git a/webapp/packages/core-projects/src/createResourceOfType.ts b/webapp/packages/core-projects/src/createResourceOfType.ts index 7b3e0c9ba0..e640ac78d3 100644 --- a/webapp/packages/core-projects/src/createResourceOfType.ts +++ b/webapp/packages/core-projects/src/createResourceOfType.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { isResourceOfType } from './isResourceOfType'; -import type { ProjectInfoResourceType } from './ProjectInfoResource'; +import { isResourceOfType } from './isResourceOfType.js'; +import type { ProjectInfoResourceType } from './ProjectInfoResource.js'; export function createResourceOfType(resourceType: ProjectInfoResourceType, name: string): string { if (isResourceOfType(resourceType, name)) { diff --git a/webapp/packages/core-projects/src/extensions/IProjectProvider.ts b/webapp/packages/core-projects/src/extensions/IProjectProvider.ts index d6d3e30665..540592b4df 100644 --- a/webapp/packages/core-projects/src/extensions/IProjectProvider.ts +++ b/webapp/packages/core-projects/src/extensions/IProjectProvider.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; const projectProviderSymbol = Symbol('@extension/ProjectProvider'); diff --git a/webapp/packages/core-projects/src/extensions/IProjectSetter.ts b/webapp/packages/core-projects/src/extensions/IProjectSetter.ts index c22afda6f3..ac35ecb180 100644 --- a/webapp/packages/core-projects/src/extensions/IProjectSetter.ts +++ b/webapp/packages/core-projects/src/extensions/IProjectSetter.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; const projectSetterSymbol = Symbol('@extension/ProjectSetter'); diff --git a/webapp/packages/core-projects/src/extensions/IProjectSetterState.ts b/webapp/packages/core-projects/src/extensions/IProjectSetterState.ts index 0fccd61f48..8b5d00fb0d 100644 --- a/webapp/packages/core-projects/src/extensions/IProjectSetterState.ts +++ b/webapp/packages/core-projects/src/extensions/IProjectSetterState.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createExtension, IExtension, isExtension } from '@cloudbeaver/core-extensions'; +import { createExtension, type IExtension, isExtension } from '@cloudbeaver/core-extensions'; const projectSetterStateSymbol = Symbol('@extension/ProjectSetterState'); diff --git a/webapp/packages/core-projects/src/index.ts b/webapp/packages/core-projects/src/index.ts index ba742fed09..25c149fbfa 100644 --- a/webapp/packages/core-projects/src/index.ts +++ b/webapp/packages/core-projects/src/index.ts @@ -1,11 +1,18 @@ -export * from './extensions/IProjectProvider'; -export * from './extensions/IProjectSetter'; -export * from './extensions/IProjectSetterState'; -export * from './activeProjectsContext'; -export * from './createResourceOfType'; -export * from './isResourceOfType'; -export * from './ProjectInfoResource'; -export * from './ProjectsService'; -export * from './NAV_NODE_TYPE_PROJECT'; -export * from './NavTree/getProjectNodeId'; -export { manifest as coreProjectsManifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './extensions/IProjectProvider.js'; +export * from './extensions/IProjectSetter.js'; +export * from './extensions/IProjectSetterState.js'; +export * from './activeProjectsContext.js'; +export * from './createResourceOfType.js'; +export * from './isResourceOfType.js'; +export * from './ProjectInfoResource.js'; +export * from './ProjectsService.js'; +export * from './NAV_NODE_TYPE_PROJECT.js'; +export * from './NavTree/getProjectNodeId.js'; +export { manifest as coreProjectsManifest } from './manifest.js'; diff --git a/webapp/packages/core-projects/src/isResourceOfType.ts b/webapp/packages/core-projects/src/isResourceOfType.ts index 7804141581..e230fabace 100644 --- a/webapp/packages/core-projects/src/isResourceOfType.ts +++ b/webapp/packages/core-projects/src/isResourceOfType.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ProjectInfoResourceType } from './ProjectInfoResource'; +import type { ProjectInfoResourceType } from './ProjectInfoResource.js'; export function isResourceOfType(resourceType: ProjectInfoResourceType, name: string): boolean { return resourceType.fileExtensions.some(type => name.toLowerCase().endsWith(`.${type.toLowerCase()}`)); diff --git a/webapp/packages/core-projects/src/manifest.ts b/webapp/packages/core-projects/src/manifest.ts index e859103830..fe49e5572b 100644 --- a/webapp/packages/core-projects/src/manifest.ts +++ b/webapp/packages/core-projects/src/manifest.ts @@ -13,9 +13,9 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./ProjectsService').then(m => m.ProjectsService), - () => import('./ProjectInfoResource').then(m => m.ProjectInfoResource), - () => import('./ProjectInfoEventHandler').then(m => m.ProjectInfoEventHandler), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./ProjectsService.js').then(m => m.ProjectsService), + () => import('./ProjectInfoResource.js').then(m => m.ProjectInfoResource), + () => import('./ProjectInfoEventHandler.js').then(m => m.ProjectInfoEventHandler), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/core-resource-manager/package.json b/webapp/packages/core-resource-manager/package.json index 13df0ca432..e7fae57d77 100644 --- a/webapp/packages/core-resource-manager/package.json +++ b/webapp/packages/core-resource-manager/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-resource-manager", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-resource-manager/src/LocaleService.ts b/webapp/packages/core-resource-manager/src/LocaleService.ts index 3f07bae28c..a55cfec20e 100644 --- a/webapp/packages/core-resource-manager/src/LocaleService.ts +++ b/webapp/packages/core-resource-manager/src/LocaleService.ts @@ -14,22 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-resource-manager/src/PluginBootstrap.ts b/webapp/packages/core-resource-manager/src/PluginBootstrap.ts index ae240c4d98..e75bf601c3 100644 --- a/webapp/packages/core-resource-manager/src/PluginBootstrap.ts +++ b/webapp/packages/core-resource-manager/src/PluginBootstrap.ts @@ -8,8 +8,8 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ProjectsNavNodeService } from '@cloudbeaver/core-navigation-tree'; -import { NAV_NODE_TYPE_RM_PROJECT } from './NAV_NODE_TYPE_RM_PROJECT'; -import { RESOURCES_NODE_PATH } from './RESOURCES_NODE_PATH'; +import { NAV_NODE_TYPE_RM_PROJECT } from './NAV_NODE_TYPE_RM_PROJECT.js'; +import { RESOURCES_NODE_PATH } from './RESOURCES_NODE_PATH.js'; @injectable() export class PluginBootstrap extends Bootstrap { @@ -17,10 +17,9 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.addRmProjectIds(); } - load(): void | Promise {} private addRmProjectIds() { this.projectsNavNodeService.addProjectType(NAV_NODE_TYPE_RM_PROJECT); diff --git a/webapp/packages/core-resource-manager/src/ResourceManagerEventHandler.ts b/webapp/packages/core-resource-manager/src/ResourceManagerEventHandler.ts index b962fe61a9..660af2aaed 100644 --- a/webapp/packages/core-resource-manager/src/ResourceManagerEventHandler.ts +++ b/webapp/packages/core-resource-manager/src/ResourceManagerEventHandler.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { ISessionEvent, SessionEventId, SessionEventSource, SessionEventTopic, TopicEventHandler } from '@cloudbeaver/core-root'; +import { type ISessionEvent, type SessionEventId, SessionEventSource, SessionEventTopic, TopicEventHandler } from '@cloudbeaver/core-root'; import type { CbrmEvent as IResourceManagerEvent } from '@cloudbeaver/core-sdk'; @injectable() diff --git a/webapp/packages/core-resource-manager/src/ResourceManagerResource.ts b/webapp/packages/core-resource-manager/src/ResourceManagerResource.ts index 95ac2ed50e..53813bc591 100644 --- a/webapp/packages/core-resource-manager/src/ResourceManagerResource.ts +++ b/webapp/packages/core-resource-manager/src/ResourceManagerResource.ts @@ -6,7 +6,6 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; import { ProjectsService } from '@cloudbeaver/core-projects'; import { type CachedResourceIncludeArgs, @@ -18,10 +17,10 @@ import { ResourceKeyUtils, } from '@cloudbeaver/core-resource'; import { DataSynchronizationService, ServerEventId } from '@cloudbeaver/core-root'; -import { DetailsError, GetResourceListQueryVariables, GraphQLService, RmResource } from '@cloudbeaver/core-sdk'; +import { DetailsError, type GetResourceListQueryVariables, GraphQLService, type RmResource } from '@cloudbeaver/core-sdk'; import { createPath, getPathParent, getPathParts } from '@cloudbeaver/core-utils'; -import { ResourceManagerEventHandler } from './ResourceManagerEventHandler'; +import { ResourceManagerEventHandler } from './ResourceManagerEventHandler.js'; export type ResourceInfoIncludes = Omit; export type RmResourceInfo = RmResource; @@ -240,7 +239,7 @@ export class ResourceManagerResource extends CachedTreeResource 1 ? parts[parts.length - 1] : undefined; return { diff --git a/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts b/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts index 875afc4288..e2c783f117 100644 --- a/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts +++ b/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts @@ -19,7 +19,7 @@ import { ResourceKeyUtils, } from '@cloudbeaver/core-resource'; import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; -import { GraphQLService, RmProject, RmProjectPermissions, RmSubjectProjectPermissions } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type RmProject, type RmProjectPermissions, type RmSubjectProjectPermissions } from '@cloudbeaver/core-sdk'; import { isArraysEqual } from '@cloudbeaver/core-utils'; const newSymbol = Symbol('new-project'); @@ -160,7 +160,7 @@ export class SharedProjectsResource extends CachedMapResource import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./SharedProjectsResource').then(m => m.SharedProjectsResource), - () => import('./ProjectPermissionsResource').then(m => m.ProjectPermissionsResource), - () => import('./ResourceManagerEventHandler').then(m => m.ResourceManagerEventHandler), - () => import('./ResourceManagerResource').then(m => m.ResourceManagerResource), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./SharedProjectsResource.js').then(m => m.SharedProjectsResource), + () => import('./ProjectPermissionsResource.js').then(m => m.ProjectPermissionsResource), + () => import('./ResourceManagerEventHandler.js').then(m => m.ResourceManagerEventHandler), + () => import('./ResourceManagerResource.js').then(m => m.ResourceManagerResource), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/core-resource/package.json b/webapp/packages/core-resource/package.json index 846da7dac3..eeb742f417 100644 --- a/webapp/packages/core-resource/package.json +++ b/webapp/packages/core-resource/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-resource", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -29,4 +30,4 @@ "typescript": "^5" }, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/webapp/packages/core-resource/src/Resource/CachedDataResource.test.ts b/webapp/packages/core-resource/src/Resource/CachedDataResource.test.ts index c8194c4c32..a44e74d617 100644 --- a/webapp/packages/core-resource/src/Resource/CachedDataResource.test.ts +++ b/webapp/packages/core-resource/src/Resource/CachedDataResource.test.ts @@ -7,7 +7,7 @@ */ import { beforeEach, describe, expect, jest, test } from '@jest/globals'; -import { CachedDataResource } from './CachedDataResource'; +import { CachedDataResource } from './CachedDataResource.js'; interface IEntityData { id: string; diff --git a/webapp/packages/core-resource/src/Resource/CachedDataResource.ts b/webapp/packages/core-resource/src/Resource/CachedDataResource.ts index c0b7ccc4e7..3b63418081 100644 --- a/webapp/packages/core-resource/src/Resource/CachedDataResource.ts +++ b/webapp/packages/core-resource/src/Resource/CachedDataResource.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; -import { CachedResource, CachedResourceParamKey } from './CachedResource'; -import type { CachedResourceIncludeArgs, CachedResourceValueIncludes } from './CachedResourceIncludes'; -import type { ICachedResourceMetadata } from './ICachedResourceMetadata'; +import { CachedResource, CachedResourceParamKey } from './CachedResource.js'; +import type { CachedResourceIncludeArgs, CachedResourceValueIncludes } from './CachedResourceIncludes.js'; +import type { ICachedResourceMetadata } from './ICachedResourceMetadata.js'; export type CachedDataResourceData = TResource extends CachedDataResource ? T : never; export type CachedDataResourceKey = TResource extends CachedDataResource ? T : never; @@ -35,7 +35,10 @@ export abstract class CachedDataResource< super(defaultKey, defaultValue, defaultIncludes); } - async refresh = []>(param: TKey, context?: T): Promise> { + override async refresh = []>( + param: TKey, + context?: T, + ): Promise> { if (param === undefined) { param = CachedResourceParamKey as TKey; } @@ -43,7 +46,10 @@ export abstract class CachedDataResource< return this.data as CachedResourceValueIncludes; } - async load = []>(param: TKey, context?: T): Promise> { + override async load = []>( + param: TKey, + context?: T, + ): Promise> { if (param === undefined) { param = CachedResourceParamKey as TKey; } diff --git a/webapp/packages/core-resource/src/Resource/CachedMapResource.test.ts b/webapp/packages/core-resource/src/Resource/CachedMapResource.test.ts index 271cfd3fb7..740c07088d 100644 --- a/webapp/packages/core-resource/src/Resource/CachedMapResource.test.ts +++ b/webapp/packages/core-resource/src/Resource/CachedMapResource.test.ts @@ -8,9 +8,9 @@ import { beforeEach, describe, expect, jest, test } from '@jest/globals'; import { toJS } from 'mobx'; -import { CachedMapResource } from './CachedMapResource'; -import type { ResourceKey } from './ResourceKey'; -import { resourceKeyList } from './ResourceKeyList'; +import { CachedMapResource } from './CachedMapResource.js'; +import type { ResourceKey } from './ResourceKey.js'; +import { resourceKeyList } from './ResourceKeyList.js'; interface IEntityData { id: string; diff --git a/webapp/packages/core-resource/src/Resource/CachedMapResource.ts b/webapp/packages/core-resource/src/Resource/CachedMapResource.ts index 8fd4b06738..e54c41777e 100644 --- a/webapp/packages/core-resource/src/Resource/CachedMapResource.ts +++ b/webapp/packages/core-resource/src/Resource/CachedMapResource.ts @@ -7,18 +7,18 @@ */ import { action, computed, entries, keys, makeObservable, values } from 'mobx'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; -import { ILoadableState, isArraysEqual, isContainsException } from '@cloudbeaver/core-utils'; - -import { CachedResource } from './CachedResource'; -import type { CachedResourceIncludeArgs, CachedResourceValueIncludes } from './CachedResourceIncludes'; -import type { ICachedResourceMetadata } from './ICachedResourceMetadata'; -import type { CachedResourceKey } from './IResource'; -import type { ResourceKey, ResourceKeySimple } from './ResourceKey'; -import type { ResourceKeyAlias } from './ResourceKeyAlias'; -import { isResourceKeyList, resourceKeyList, ResourceKeyList } from './ResourceKeyList'; -import { ResourceKeyListAlias, resourceKeyListAlias } from './ResourceKeyListAlias'; -import { ResourceKeyUtils } from './ResourceKeyUtils'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ILoadableState, isArraysEqual, isContainsException } from '@cloudbeaver/core-utils'; + +import { CachedResource } from './CachedResource.js'; +import type { CachedResourceIncludeArgs, CachedResourceValueIncludes } from './CachedResourceIncludes.js'; +import type { ICachedResourceMetadata } from './ICachedResourceMetadata.js'; +import type { CachedResourceKey } from './IResource.js'; +import type { ResourceKey, ResourceKeySimple } from './ResourceKey.js'; +import type { ResourceKeyAlias } from './ResourceKeyAlias.js'; +import { isResourceKeyList, resourceKeyList, ResourceKeyList } from './ResourceKeyList.js'; +import { ResourceKeyListAlias, resourceKeyListAlias } from './ResourceKeyListAlias.js'; +import { ResourceKeyUtils } from './ResourceKeyUtils.js'; export type CachedMapResourceKey = CachedResourceKey; export type CachedMapResourceValue = TResource extends CachedResource, any, any, any, any> ? T : never; @@ -129,7 +129,7 @@ export abstract class CachedMapResource< } for (let i = 0; i < key.length; i++) { - this.dataSet(this.getKeyRef(key[i]), (value as TValue[])[i]); + this.dataSet(this.getKeyRef(key[i]!), (value as TValue[])[i]!); } } else { this.dataSet(this.getKeyRef(key), value as TValue); @@ -162,19 +162,19 @@ export abstract class CachedMapResource< this.markUpdated(key); } - async refresh = []>( + override async refresh = []>( key: TKey | ResourceKeyAlias, includes?: T, ): Promise>; - async refresh = []>( + override async refresh = []>( key?: ResourceKeyList | ResourceKeyListAlias | void, includes?: T, ): Promise>>; - async refresh = []>( + override async refresh = []>( key: ResourceKey, includes?: T, ): Promise> | CachedResourceValueIncludes>; - async refresh = []>( + override async refresh = []>( key?: ResourceKey | void, includes?: T, ): Promise> | CachedResourceValueIncludes> { @@ -185,19 +185,19 @@ export abstract class CachedMapResource< return this.get(key) as Array> | CachedResourceValueIncludes; } - async load = []>( + override async load = []>( key: TKey | ResourceKeyAlias, includes?: T, ): Promise>; - async load = []>( + override async load = []>( key?: ResourceKeyList | ResourceKeyListAlias | void, includes?: T, ): Promise>>; - async load = []>( + override async load = []>( key: ResourceKey, includes?: T, ): Promise> | CachedResourceValueIncludes>; - async load = []>( + override async load = []>( key?: ResourceKey | void, includes?: T, ): Promise> | CachedResourceValueIncludes> { @@ -208,7 +208,7 @@ export abstract class CachedMapResource< return this.get(key) as Array> | CachedResourceValueIncludes; } - getKeyRef(key: TKey): TKey { + override getKeyRef(key: TKey): TKey { if (this.keys.includes(key)) { return key; } diff --git a/webapp/packages/core-resource/src/Resource/CachedResource.ts b/webapp/packages/core-resource/src/Resource/CachedResource.ts index e37a73e0ed..3c5d151279 100644 --- a/webapp/packages/core-resource/src/Resource/CachedResource.ts +++ b/webapp/packages/core-resource/src/Resource/CachedResource.ts @@ -11,10 +11,10 @@ import { ExecutionContext, Executor, ExecutorInterrupter, - IExecutionContextProvider, - IExecutor, - IExecutorHandler, - ISyncExecutor, + type IExecutionContextProvider, + type IExecutor, + type IExecutorHandler, + type ISyncExecutor, SyncExecutor, TaskScheduler, } from '@cloudbeaver/core-executor'; @@ -26,17 +26,17 @@ import { CachedResourceOffsetPageTargetKey, isOffsetPageInRange, isOffsetPageOutdated, -} from './CachedResourceOffsetPageKeys'; -import type { ICachedResourceMetadata } from './ICachedResourceMetadata'; -import type { IResource } from './IResource'; -import { Resource } from './Resource'; -import { isResourceAlias } from './ResourceAlias'; -import { ResourceError } from './ResourceError'; -import type { ResourceKey, ResourceKeyFlat } from './ResourceKey'; -import { resourceKeyAlias } from './ResourceKeyAlias'; -import { isResourceKeyList, resourceKeyList } from './ResourceKeyList'; -import { resourceKeyListAlias } from './ResourceKeyListAlias'; -import { ResourceOffsetPagination } from './ResourceOffsetPagination'; +} from './CachedResourceOffsetPageKeys.js'; +import type { ICachedResourceMetadata } from './ICachedResourceMetadata.js'; +import type { IResource } from './IResource.js'; +import { Resource } from './Resource.js'; +import { isResourceAlias } from './ResourceAlias.js'; +import { ResourceError } from './ResourceError.js'; +import type { ResourceKey, ResourceKeyFlat } from './ResourceKey.js'; +import { resourceKeyAlias } from './ResourceKeyAlias.js'; +import { isResourceKeyList, resourceKeyList } from './ResourceKeyList.js'; +import { resourceKeyListAlias } from './ResourceKeyListAlias.js'; +import { ResourceOffsetPagination } from './ResourceOffsetPagination.js'; export interface IDataError { param: ResourceKey; @@ -820,7 +820,7 @@ export abstract class CachedResource< private flushOutdatedWaitList(): void { for (let i = 0; i < this.outdateWaitList.length; i++) { - const key = this.outdateWaitList[i]; + const key = this.outdateWaitList[i]!; this.markOutdatedSync(key); } this.outdateWaitList = []; diff --git a/webapp/packages/core-resource/src/Resource/CachedResourceOffsetPageKeys.ts b/webapp/packages/core-resource/src/Resource/CachedResourceOffsetPageKeys.ts index 28846e9e3d..8b5c32cb77 100644 --- a/webapp/packages/core-resource/src/Resource/CachedResourceOffsetPageKeys.ts +++ b/webapp/packages/core-resource/src/Resource/CachedResourceOffsetPageKeys.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { IResourceOffsetPage } from './OffsetPagination/IResourceOffsetPage'; -import { ResourceOffsetPage } from './OffsetPagination/ResourceOffsetPage'; -import { ResourceKey } from './ResourceKey'; -import { resourceKeyAliasFactory } from './ResourceKeyAlias'; -import { resourceKeyListAliasFactory } from './ResourceKeyListAlias'; +import type { IResourceOffsetPage } from './OffsetPagination/IResourceOffsetPage.js'; +import { ResourceOffsetPage } from './OffsetPagination/ResourceOffsetPage.js'; +import type { ResourceKey } from './ResourceKey.js'; +import { resourceKeyAliasFactory } from './ResourceKeyAlias.js'; +import { resourceKeyListAliasFactory } from './ResourceKeyListAlias.js'; interface IOffsetPageInfo { offset: number; diff --git a/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeMetadata.ts b/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeMetadata.ts index b5f2585956..25f954816a 100644 --- a/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeMetadata.ts +++ b/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeMetadata.ts @@ -7,16 +7,16 @@ */ import { combineITerableIterators, type DefaultValueGetter } from '@cloudbeaver/core-utils'; -import type { ICachedResourceMetadata } from '../ICachedResourceMetadata'; -import { isResourceAlias } from '../ResourceAlias'; -import type { ResourceAliases } from '../ResourceAliases'; -import type { ResourceKey, ResourceKeyFlat } from '../ResourceKey'; -import { isResourceKeyList, ResourceKeyList } from '../ResourceKeyList'; -import { ResourceKeyUtils } from '../ResourceKeyUtils'; -import { ResourceMetadata } from '../ResourceMetadata'; -import { createTreeNode } from './createTreeNode'; -import { getTreeValue } from './getTreeValue'; -import type { ICachedTreeElement } from './ICachedTreeElement'; +import type { ICachedResourceMetadata } from '../ICachedResourceMetadata.js'; +import { isResourceAlias } from '../ResourceAlias.js'; +import type { ResourceAliases } from '../ResourceAliases.js'; +import type { ResourceKey, ResourceKeyFlat } from '../ResourceKey.js'; +import { isResourceKeyList, ResourceKeyList } from '../ResourceKeyList.js'; +import { ResourceKeyUtils } from '../ResourceKeyUtils.js'; +import { ResourceMetadata } from '../ResourceMetadata.js'; +import { createTreeNode } from './createTreeNode.js'; +import { getTreeValue } from './getTreeValue.js'; +import type { ICachedTreeElement } from './ICachedTreeElement.js'; export class CachedTreeMetadata extends ResourceMetadata { protected getTree: () => ICachedTreeElement; @@ -31,11 +31,11 @@ export class CachedTreeMetadata { + override values(): IterableIterator { return combineITerableIterators(this.metadata.values(), getAllMetadata(this.getTree())); } - has(key: ResourceKey): boolean { + override has(key: ResourceKey): boolean { if (isResourceAlias(key)) { return super.has(key); } @@ -50,10 +50,10 @@ export class CachedTreeMetadata): TMetadata; - get(key: ResourceKeyList): TMetadata[]; - get(key: ResourceKey): TMetadata | TMetadata[]; - get(key: ResourceKey): TMetadata | TMetadata[] { + override get(key: ResourceKeyFlat): TMetadata; + override get(key: ResourceKeyList): TMetadata[]; + override get(key: ResourceKey): TMetadata | TMetadata[]; + override get(key: ResourceKey): TMetadata | TMetadata[] { if (isResourceAlias(key)) { return super.get(key); } @@ -68,7 +68,7 @@ export class CachedTreeMetadata): void { + override delete(key: ResourceKey): void { if (isResourceAlias(key)) { return super.delete(key); } diff --git a/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeResource.test.ts b/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeResource.test.ts index 126c260c7d..204db4d44a 100644 --- a/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeResource.test.ts +++ b/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeResource.test.ts @@ -7,9 +7,9 @@ */ import { beforeEach, describe, expect, jest, test } from '@jest/globals'; -import type { ResourceKey } from '../ResourceKey'; -import { resourceKeyList } from '../ResourceKeyList'; -import { CachedTreeChildrenKey, CachedTreeResource, CachedTreeRootChildrenKey } from './CachedTreeResource'; +import type { ResourceKey } from '../ResourceKey.js'; +import { resourceKeyList } from '../ResourceKeyList.js'; +import { CachedTreeChildrenKey, CachedTreeResource, CachedTreeRootChildrenKey } from './CachedTreeResource.js'; interface IMockDataEntity { name: string; @@ -24,7 +24,7 @@ class TestTreeResource extends CachedTreeResource { return this.data; } - protected validateKey(key: string): boolean { + protected override validateKey(key: string): boolean { return typeof key === 'string'; } } diff --git a/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeResource.ts b/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeResource.ts index 6c91877f9a..e70faa4e80 100644 --- a/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeResource.ts +++ b/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeResource.ts @@ -7,25 +7,25 @@ */ import { action, makeObservable } from 'mobx'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; -import { getPathParent, ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; - -import { CachedResource } from '../CachedResource'; -import type { CachedResourceIncludeArgs, CachedResourceValueIncludes } from '../CachedResourceIncludes'; -import type { ICachedResourceMetadata } from '../ICachedResourceMetadata'; -import type { ResourceKey, ResourceKeySimple } from '../ResourceKey'; -import { resourceKeyAlias, ResourceKeyAlias } from '../ResourceKeyAlias'; -import { isResourceKeyList, resourceKeyList, ResourceKeyList } from '../ResourceKeyList'; -import { ResourceKeyListAlias, resourceKeyListAlias, resourceKeyListAliasFactory } from '../ResourceKeyListAlias'; -import { ResourceKeyUtils } from '../ResourceKeyUtils'; -import { CachedTreeMetadata } from './CachedTreeMetadata'; -import { CachedTreeUseTracker } from './CachedTreeUseTracker'; -import { deleteTreeValue } from './deleteTreeValue'; -import { getTreeParents } from './getTreeParents'; -import { getTreeValue } from './getTreeValue'; -import type { ICachedTreeData } from './ICachedTreeData'; -import type { ICachedTreeElement } from './ICachedTreeElement'; -import type { ICachedTreeMoveData } from './ICachedTreeMoveData'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { getPathParent, type ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; + +import { CachedResource } from '../CachedResource.js'; +import type { CachedResourceIncludeArgs, CachedResourceValueIncludes } from '../CachedResourceIncludes.js'; +import type { ICachedResourceMetadata } from '../ICachedResourceMetadata.js'; +import type { ResourceKey, ResourceKeySimple } from '../ResourceKey.js'; +import { resourceKeyAlias, ResourceKeyAlias } from '../ResourceKeyAlias.js'; +import { isResourceKeyList, resourceKeyList, ResourceKeyList } from '../ResourceKeyList.js'; +import { ResourceKeyListAlias, resourceKeyListAlias, resourceKeyListAliasFactory } from '../ResourceKeyListAlias.js'; +import { ResourceKeyUtils } from '../ResourceKeyUtils.js'; +import { CachedTreeMetadata } from './CachedTreeMetadata.js'; +import { CachedTreeUseTracker } from './CachedTreeUseTracker.js'; +import { deleteTreeValue } from './deleteTreeValue.js'; +import { getTreeParents } from './getTreeParents.js'; +import { getTreeValue } from './getTreeValue.js'; +import type { ICachedTreeData } from './ICachedTreeData.js'; +import type { ICachedTreeElement } from './ICachedTreeElement.js'; +import type { ICachedTreeMoveData } from './ICachedTreeMoveData.js'; export const CachedTreeRootValueKey = resourceKeyAlias('@cached-tree-resource/root-value'); export const CachedTreeRootChildrenKey = resourceKeyListAlias('@cached-tree-resource/root-children'); @@ -43,8 +43,8 @@ export abstract class CachedTreeResource< readonly onItemUpdate: ISyncExecutor>; readonly onItemDelete: ISyncExecutor>; readonly onMove: ISyncExecutor; - readonly useTracker: CachedTreeUseTracker; - protected metadata: CachedTreeMetadata; + override readonly useTracker: CachedTreeUseTracker; + protected override metadata: CachedTreeMetadata; constructor(defaultValue?: () => ICachedTreeData, defaultIncludes?: CachedResourceIncludeArgs) { super( @@ -61,7 +61,7 @@ export abstract class CachedTreeResource< loading: false, outdated: false, }, - } as any as ICachedTreeData)), + }) as any as ICachedTreeData), defaultIncludes, ); @@ -145,7 +145,7 @@ export abstract class CachedTreeResource< } for (let i = 0; i < key.length; i++) { - this.dataSet(this.getKeyRef(key[i]), (value as TValue[])[i]); + this.dataSet(this.getKeyRef(key[i]!), (value as TValue[])[i]!); } } else { this.dataSet(this.getKeyRef(key), value as TValue); @@ -186,19 +186,19 @@ export abstract class CachedTreeResource< // this.markUpdated(key); } - async refresh = []>( + override async refresh = []>( key: string | ResourceKeyAlias, includes?: T, ): Promise>; - async refresh = []>( + override async refresh = []>( key?: ResourceKeyList | ResourceKeyListAlias | void, includes?: T, ): Promise>>; - async refresh = []>( + override async refresh = []>( key: ResourceKey, includes?: T, ): Promise> | CachedResourceValueIncludes>; - async refresh = []>( + override async refresh = []>( key?: ResourceKey | void, includes?: T, ): Promise> | CachedResourceValueIncludes> { @@ -209,19 +209,19 @@ export abstract class CachedTreeResource< return this.get(key) as Array> | CachedResourceValueIncludes; } - async load = []>( + override async load = []>( key: string | ResourceKeyAlias, includes?: T, ): Promise>; - async load = []>( + override async load = []>( key?: ResourceKeyList | ResourceKeyListAlias | void, includes?: T, ): Promise>>; - async load = []>( + override async load = []>( key: ResourceKey, includes?: T, ): Promise> | CachedResourceValueIncludes>; - async load = []>( + override async load = []>( key?: ResourceKey | void, includes?: T, ): Promise> | CachedResourceValueIncludes> { diff --git a/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeUseTracker.ts b/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeUseTracker.ts index bdd1fd36b4..2149cf13f6 100644 --- a/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeUseTracker.ts +++ b/webapp/packages/core-resource/src/Resource/CachedTreeResource/CachedTreeUseTracker.ts @@ -7,20 +7,24 @@ */ import { flat, getPathParents, uuid } from '@cloudbeaver/core-utils'; -import type { ICachedResourceMetadata } from '../ICachedResourceMetadata'; -import type { ResourceAliases } from '../ResourceAliases'; -import type { ResourceKey } from '../ResourceKey'; -import { resourceKeyList } from '../ResourceKeyList'; -import { ResourceKeyUtils } from '../ResourceKeyUtils'; -import type { ResourceLogger } from '../ResourceLogger'; -import { ResourceUseTracker } from '../ResourceUseTracker'; -import type { CachedTreeMetadata } from './CachedTreeMetadata'; +import type { ICachedResourceMetadata } from '../ICachedResourceMetadata.js'; +import type { ResourceAliases } from '../ResourceAliases.js'; +import type { ResourceKey } from '../ResourceKey.js'; +import { resourceKeyList } from '../ResourceKeyList.js'; +import { ResourceKeyUtils } from '../ResourceKeyUtils.js'; +import type { ResourceLogger } from '../ResourceLogger.js'; +import { ResourceUseTracker } from '../ResourceUseTracker.js'; +import type { CachedTreeMetadata } from './CachedTreeMetadata.js'; export class CachedTreeUseTracker extends ResourceUseTracker { - constructor(logger: ResourceLogger, aliases: ResourceAliases, protected metadata: CachedTreeMetadata) { + constructor( + logger: ResourceLogger, + aliases: ResourceAliases, + protected override metadata: CachedTreeMetadata, + ) { super(logger, aliases, metadata); } - use(param: ResourceKey, id = uuid()): string { + override use(param: ResourceKey, id = uuid()): string { const transformedList = resourceKeyList(flat(ResourceKeyUtils.toList(this.aliases.transformToKey(param)).map(getPathParents))); this.metadata.update(transformedList, metadata => { @@ -30,7 +34,7 @@ export class CachedTreeUseTracker, id: string): void { + override free(param: ResourceKey, id: string): void { const transformedList = resourceKeyList(flat(ResourceKeyUtils.toList(this.aliases.transformToKey(param)).map(getPathParents))); this.metadata.update(transformedList, metadata => { if (metadata.dependencies.length > 0) { diff --git a/webapp/packages/core-resource/src/Resource/CachedTreeResource/ICachedTreeData.ts b/webapp/packages/core-resource/src/Resource/CachedTreeResource/ICachedTreeData.ts index 3ae4dc1b60..3e4bf8d258 100644 --- a/webapp/packages/core-resource/src/Resource/CachedTreeResource/ICachedTreeData.ts +++ b/webapp/packages/core-resource/src/Resource/CachedTreeResource/ICachedTreeData.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ICachedResourceMetadata } from '../ICachedResourceMetadata'; -import type { ICachedTreeElement } from './ICachedTreeElement'; +import type { ICachedResourceMetadata } from '../ICachedResourceMetadata.js'; +import type { ICachedTreeElement } from './ICachedTreeElement.js'; export type ICachedTreeData = ICachedTreeElement; diff --git a/webapp/packages/core-resource/src/Resource/CachedTreeResource/ICachedTreeElement.ts b/webapp/packages/core-resource/src/Resource/CachedTreeResource/ICachedTreeElement.ts index 38173b05dd..22b8b06240 100644 --- a/webapp/packages/core-resource/src/Resource/CachedTreeResource/ICachedTreeElement.ts +++ b/webapp/packages/core-resource/src/Resource/CachedTreeResource/ICachedTreeElement.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ICachedResourceMetadata } from '../ICachedResourceMetadata'; +import type { ICachedResourceMetadata } from '../ICachedResourceMetadata.js'; export interface ICachedTreeElement { value?: TValue; diff --git a/webapp/packages/core-resource/src/Resource/CachedTreeResource/createTreeNode.ts b/webapp/packages/core-resource/src/Resource/CachedTreeResource/createTreeNode.ts index 5eaee45ef6..4e70200707 100644 --- a/webapp/packages/core-resource/src/Resource/CachedTreeResource/createTreeNode.ts +++ b/webapp/packages/core-resource/src/Resource/CachedTreeResource/createTreeNode.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ICachedResourceMetadata } from '../ICachedResourceMetadata'; -import type { ICachedTreeElement } from './ICachedTreeElement'; +import type { ICachedResourceMetadata } from '../ICachedResourceMetadata.js'; +import type { ICachedTreeElement } from './ICachedTreeElement.js'; export function createTreeNode( path: string, diff --git a/webapp/packages/core-resource/src/Resource/CachedTreeResource/deleteTreeValue.ts b/webapp/packages/core-resource/src/Resource/CachedTreeResource/deleteTreeValue.ts index 0410f125b7..44b0991c8c 100644 --- a/webapp/packages/core-resource/src/Resource/CachedTreeResource/deleteTreeValue.ts +++ b/webapp/packages/core-resource/src/Resource/CachedTreeResource/deleteTreeValue.ts @@ -7,8 +7,8 @@ */ import { getPathParts } from '@cloudbeaver/core-utils'; -import type { ICachedResourceMetadata } from '../ICachedResourceMetadata'; -import type { ICachedTreeElement } from './ICachedTreeElement'; +import type { ICachedResourceMetadata } from '../ICachedResourceMetadata.js'; +import type { ICachedTreeElement } from './ICachedTreeElement.js'; export function deleteTreeValue( data: ICachedTreeElement, @@ -23,12 +23,12 @@ export function deleteTreeValue( data: ICachedTreeElement, @@ -39,15 +39,15 @@ export function getTreeParents( data: ICachedTreeElement, @@ -32,7 +32,7 @@ export function getTreeValue = TResource extends IResource ? T : never; export type CachedResourceKey = TResource extends IResource ? T : never; diff --git a/webapp/packages/core-resource/src/Resource/LocalResource.ts b/webapp/packages/core-resource/src/Resource/LocalResource.ts index dd058cb370..58d55f886c 100644 --- a/webapp/packages/core-resource/src/Resource/LocalResource.ts +++ b/webapp/packages/core-resource/src/Resource/LocalResource.ts @@ -7,7 +7,7 @@ */ import { makeObservable, observable } from 'mobx'; -import { Executor, IExecutor, TaskScheduler } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor, TaskScheduler } from '@cloudbeaver/core-executor'; export abstract class LocalResource { data: TData; diff --git a/webapp/packages/core-resource/src/Resource/OffsetPagination/ResourceOffsetPage.ts b/webapp/packages/core-resource/src/Resource/OffsetPagination/ResourceOffsetPage.ts index 90d1433e5a..5664d2f07d 100644 --- a/webapp/packages/core-resource/src/Resource/OffsetPagination/ResourceOffsetPage.ts +++ b/webapp/packages/core-resource/src/Resource/OffsetPagination/ResourceOffsetPage.ts @@ -7,7 +7,7 @@ */ import { makeObservable, observable } from 'mobx'; -import { IResourceOffsetPage } from './IResourceOffsetPage'; +import { type IResourceOffsetPage } from './IResourceOffsetPage.js'; export class ResourceOffsetPage implements IResourceOffsetPage { from: number; diff --git a/webapp/packages/core-resource/src/Resource/Resource.ts b/webapp/packages/core-resource/src/Resource/Resource.ts index 3804a0bf4a..2616ac470d 100644 --- a/webapp/packages/core-resource/src/Resource/Resource.ts +++ b/webapp/packages/core-resource/src/Resource/Resource.ts @@ -10,17 +10,17 @@ import { makeObservable, observable, toJS } from 'mobx'; import { Dependency } from '@cloudbeaver/core-di'; import { isContainsException, isPrimitive, MetadataMap } from '@cloudbeaver/core-utils'; -import { CachedResourceParamKey } from './CachedResource'; -import type { ICachedResourceMetadata } from './ICachedResourceMetadata'; -import type { IResource } from './IResource'; -import { isResourceAlias } from './ResourceAlias'; -import { ResourceAliases } from './ResourceAliases'; -import type { ResourceKey, ResourceKeyFlat } from './ResourceKey'; -import { isResourceKeyList, type ResourceKeyList } from './ResourceKeyList'; -import { ResourceKeyUtils } from './ResourceKeyUtils'; -import { ResourceLogger } from './ResourceLogger'; -import { ResourceMetadata } from './ResourceMetadata'; -import { ResourceUseTracker } from './ResourceUseTracker'; +import { CachedResourceParamKey } from './CachedResource.js'; +import type { ICachedResourceMetadata } from './ICachedResourceMetadata.js'; +import type { IResource } from './IResource.js'; +import { isResourceAlias } from './ResourceAlias.js'; +import { ResourceAliases } from './ResourceAliases.js'; +import type { ResourceKey, ResourceKeyFlat } from './ResourceKey.js'; +import { isResourceKeyList, type ResourceKeyList } from './ResourceKeyList.js'; +import { ResourceKeyUtils } from './ResourceKeyUtils.js'; +import { ResourceLogger } from './ResourceLogger.js'; +import { ResourceMetadata } from './ResourceMetadata.js'; +import { ResourceUseTracker } from './ResourceUseTracker.js'; export abstract class Resource< TData, diff --git a/webapp/packages/core-resource/src/Resource/ResourceAlias.ts b/webapp/packages/core-resource/src/Resource/ResourceAlias.ts index ca8f17372f..23e74dc4a8 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceAlias.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceAlias.ts @@ -7,7 +7,7 @@ */ import { isObjectsEqual } from '@cloudbeaver/core-utils'; -import { ResourceKey } from './ResourceKey'; +import type { ResourceKey } from './ResourceKey.js'; export type ResourceAliasOptionsKey = string | number; export type ResourceAliasOptionsValueTypes = string | number | boolean | ResourceKey | null | undefined; diff --git a/webapp/packages/core-resource/src/Resource/ResourceAliases.ts b/webapp/packages/core-resource/src/Resource/ResourceAliases.ts index c58f340918..094b920939 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceAliases.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceAliases.ts @@ -7,12 +7,12 @@ */ import { toJS } from 'mobx'; -import { isResourceAlias, type ResourceAlias, ResourceAliasFactory, type ResourceAliasOptions } from './ResourceAlias'; -import type { ResourceKey, ResourceKeySimple } from './ResourceKey'; -import type { ResourceKeyAlias } from './ResourceKeyAlias'; -import { isResourceKeyList, ResourceKeyList } from './ResourceKeyList'; -import type { ResourceKeyListAlias } from './ResourceKeyListAlias'; -import type { ResourceLogger } from './ResourceLogger'; +import { isResourceAlias, type ResourceAlias, type ResourceAliasFactory, type ResourceAliasOptions } from './ResourceAlias.js'; +import type { ResourceKey, ResourceKeySimple } from './ResourceKey.js'; +import type { ResourceKeyAlias } from './ResourceKeyAlias.js'; +import { isResourceKeyList, ResourceKeyList } from './ResourceKeyList.js'; +import type { ResourceKeyListAlias } from './ResourceKeyListAlias.js'; +import type { ResourceLogger } from './ResourceLogger.js'; export type IParamAlias = { id: string; diff --git a/webapp/packages/core-resource/src/Resource/ResourceError.ts b/webapp/packages/core-resource/src/Resource/ResourceError.ts index 324a5fc4c3..3234dfda92 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceError.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceError.ts @@ -9,7 +9,7 @@ import { action } from 'mobx'; import { LoadingError } from '@cloudbeaver/core-utils'; -import type { CachedResource } from './CachedResource'; +import type { CachedResource } from './CachedResource.js'; export class ResourceError extends LoadingError { constructor( diff --git a/webapp/packages/core-resource/src/Resource/ResourceKey.ts b/webapp/packages/core-resource/src/Resource/ResourceKey.ts index 798e2d7544..9901da5dd4 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceKey.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceKey.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ResourceKeyAlias } from './ResourceKeyAlias'; -import type { ResourceKeyList } from './ResourceKeyList'; -import type { ResourceKeyListAlias } from './ResourceKeyListAlias'; +import type { ResourceKeyAlias } from './ResourceKeyAlias.js'; +import type { ResourceKeyList } from './ResourceKeyList.js'; +import type { ResourceKeyListAlias } from './ResourceKeyListAlias.js'; export type ResourceKey = ResourceKeyList | ResourceKeyFlat; export type ResourceKeyFlat = TKey | ResourceKeyAlias | ResourceKeyListAlias; diff --git a/webapp/packages/core-resource/src/Resource/ResourceKeyAlias.ts b/webapp/packages/core-resource/src/Resource/ResourceKeyAlias.ts index a40d338e35..c6f87d3218 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceKeyAlias.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceKeyAlias.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ResourceAlias, ResourceAliasFactory, ResourceAliasOptions } from './ResourceAlias'; +import { ResourceAlias, type ResourceAliasFactory, type ResourceAliasOptions } from './ResourceAlias.js'; export class ResourceKeyAlias extends ResourceAlias { readonly name = 'ResourceKeyAlias'; diff --git a/webapp/packages/core-resource/src/Resource/ResourceKeyList.ts b/webapp/packages/core-resource/src/Resource/ResourceKeyList.ts index 578cc067e8..d269013868 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceKeyList.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceKeyList.ts @@ -8,7 +8,7 @@ import { isArraysEqual } from '@cloudbeaver/core-utils'; export class ResourceKeyList extends Array { - static get [Symbol.species]() { + static get [Symbol.species!]() { return Array; } @@ -16,11 +16,11 @@ export class ResourceKeyList extends Array { return isArraysEqual(this, key, isEqual, true); } - includes(key: TKey, fromIndex?: number): boolean; - includes(key: TKey | ResourceKeyList): boolean; - includes(key: TKey | ResourceKeyList, isEqual: (keyA: TKey, keyB: TKey) => boolean): boolean; - includes(key: TKey | ResourceKeyList, dynamic?: number | ((keyA: TKey, keyB: TKey) => boolean)): boolean; - includes(key: TKey | ResourceKeyList, dynamic?: number | ((keyA: TKey, keyB: TKey) => boolean)): boolean { + override includes(key: TKey, fromIndex?: number): boolean; + override includes(key: TKey | ResourceKeyList): boolean; + override includes(key: TKey | ResourceKeyList, isEqual: (keyA: TKey, keyB: TKey) => boolean): boolean; + override includes(key: TKey | ResourceKeyList, dynamic?: number | ((keyA: TKey, keyB: TKey) => boolean)): boolean; + override includes(key: TKey | ResourceKeyList, dynamic?: number | ((keyA: TKey, keyB: TKey) => boolean)): boolean { let fromIndex = 0; let isEqual = (keyA: TKey, keyB: TKey) => keyA === keyB; @@ -48,7 +48,7 @@ export class ResourceKeyList extends Array { return resourceKeyList(this.filter(param => param !== key)); } - toString(): string { + override toString(): string { const list = this.map(s => { if (typeof s === 'symbol') { return s.toString(); diff --git a/webapp/packages/core-resource/src/Resource/ResourceKeyListAlias.ts b/webapp/packages/core-resource/src/Resource/ResourceKeyListAlias.ts index 054e15bbe3..21899c7176 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceKeyListAlias.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceKeyListAlias.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ResourceAlias, ResourceAliasFactory, ResourceAliasOptions } from './ResourceAlias'; +import { ResourceAlias, type ResourceAliasFactory, type ResourceAliasOptions } from './ResourceAlias.js'; export class ResourceKeyListAlias extends ResourceAlias { readonly name = 'ResourceKeyListAlias'; diff --git a/webapp/packages/core-resource/src/Resource/ResourceKeyUtils.ts b/webapp/packages/core-resource/src/Resource/ResourceKeyUtils.ts index 284e3b041e..632ef63677 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceKeyUtils.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceKeyUtils.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ResourceKey, ResourceKeySimple } from './ResourceKey'; -import { isResourceKeyList, type ResourceKeyList, resourceKeyList } from './ResourceKeyList'; +import type { ResourceKey, ResourceKeySimple } from './ResourceKey.js'; +import { isResourceKeyList, type ResourceKeyList, resourceKeyList } from './ResourceKeyList.js'; interface MapFnc { (key: TKey | ResourceKeyList, selector: (key: TKey, index: number) => TValue): TValue | TValue[]; diff --git a/webapp/packages/core-resource/src/Resource/ResourceLogger.ts b/webapp/packages/core-resource/src/Resource/ResourceLogger.ts index 5ab1f75200..6b6789f916 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceLogger.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceLogger.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ExecutorInterrupter, type IExecutorHandler, ISyncExecutor } from '@cloudbeaver/core-executor'; +import { ExecutorInterrupter, type IExecutorHandler, type ISyncExecutor } from '@cloudbeaver/core-executor'; export enum ResourceLoggerLevel { None, diff --git a/webapp/packages/core-resource/src/Resource/ResourceMetadata.ts b/webapp/packages/core-resource/src/Resource/ResourceMetadata.ts index 74179e1d87..d50cae7a90 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceMetadata.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceMetadata.ts @@ -7,15 +7,15 @@ */ import { observable } from 'mobx'; -import { DefaultValueGetter, isPrimitive, MetadataMap } from '@cloudbeaver/core-utils'; - -import { CachedResourceOffsetPageKey, CachedResourceOffsetPageListKey } from './CachedResourceOffsetPageKeys'; -import type { ICachedResourceMetadata } from './ICachedResourceMetadata'; -import { isResourceAlias, ResourceAlias } from './ResourceAlias'; -import type { ResourceAliases } from './ResourceAliases'; -import type { ResourceKey, ResourceKeyFlat } from './ResourceKey'; -import { isResourceKeyList, ResourceKeyList } from './ResourceKeyList'; -import { ResourceKeyUtils } from './ResourceKeyUtils'; +import { type DefaultValueGetter, isPrimitive, MetadataMap } from '@cloudbeaver/core-utils'; + +import { CachedResourceOffsetPageKey, CachedResourceOffsetPageListKey } from './CachedResourceOffsetPageKeys.js'; +import type { ICachedResourceMetadata } from './ICachedResourceMetadata.js'; +import { isResourceAlias, ResourceAlias } from './ResourceAlias.js'; +import type { ResourceAliases } from './ResourceAliases.js'; +import type { ResourceKey, ResourceKeyFlat } from './ResourceKey.js'; +import { isResourceKeyList, ResourceKeyList } from './ResourceKeyList.js'; +import { ResourceKeyUtils } from './ResourceKeyUtils.js'; type MetadataCallback = (metadata: TMetadata) => TValue; diff --git a/webapp/packages/core-resource/src/Resource/ResourceOffsetPagination.ts b/webapp/packages/core-resource/src/Resource/ResourceOffsetPagination.ts index d07cdad696..cc021d0e37 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceOffsetPagination.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceOffsetPagination.ts @@ -9,13 +9,13 @@ import { observable } from 'mobx'; import { expandOffsetPageRange, - ICachedResourceOffsetPage, + type ICachedResourceOffsetPage, type ICachedResourceOffsetPageOptions, isOffsetPageInRange, -} from './CachedResourceOffsetPageKeys'; -import type { ICachedResourceMetadata } from './ICachedResourceMetadata'; -import type { ResourceAlias } from './ResourceAlias'; -import type { ResourceMetadata } from './ResourceMetadata'; +} from './CachedResourceOffsetPageKeys.js'; +import type { ICachedResourceMetadata } from './ICachedResourceMetadata.js'; +import type { ResourceAlias } from './ResourceAlias.js'; +import type { ResourceMetadata } from './ResourceMetadata.js'; export class ResourceOffsetPagination { constructor( diff --git a/webapp/packages/core-resource/src/Resource/ResourceUseTracker.ts b/webapp/packages/core-resource/src/Resource/ResourceUseTracker.ts index 6acea019ef..f1053fcc41 100644 --- a/webapp/packages/core-resource/src/Resource/ResourceUseTracker.ts +++ b/webapp/packages/core-resource/src/Resource/ResourceUseTracker.ts @@ -10,13 +10,13 @@ import { action, computed, makeObservable } from 'mobx'; import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { uuid } from '@cloudbeaver/core-utils'; -import { CachedResourceParamKey } from './CachedResource'; -import type { ICachedResourceMetadata } from './ICachedResourceMetadata'; -import { isResourceAlias } from './ResourceAlias'; -import type { ResourceAliases } from './ResourceAliases'; -import type { ResourceKey } from './ResourceKey'; -import type { ResourceLogger } from './ResourceLogger'; -import type { ResourceMetadata } from './ResourceMetadata'; +import { CachedResourceParamKey } from './CachedResource.js'; +import type { ICachedResourceMetadata } from './ICachedResourceMetadata.js'; +import { isResourceAlias } from './ResourceAlias.js'; +import type { ResourceAliases } from './ResourceAliases.js'; +import type { ResourceKey } from './ResourceKey.js'; +import type { ResourceLogger } from './ResourceLogger.js'; +import type { ResourceMetadata } from './ResourceMetadata.js'; export interface IUseData { id: string | undefined; diff --git a/webapp/packages/core-resource/src/Resource/getOffsetPageKeyInfo.ts b/webapp/packages/core-resource/src/Resource/getOffsetPageKeyInfo.ts index c51ceae077..857bd371d5 100644 --- a/webapp/packages/core-resource/src/Resource/getOffsetPageKeyInfo.ts +++ b/webapp/packages/core-resource/src/Resource/getOffsetPageKeyInfo.ts @@ -5,15 +5,15 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { CachedResource } from './CachedResource'; +import { CachedResource } from './CachedResource.js'; import { CACHED_RESOURCE_DEFAULT_PAGE_LIMIT, CACHED_RESOURCE_DEFAULT_PAGE_OFFSET, CachedResourceOffsetPageKey, CachedResourceOffsetPageListKey, CachedResourceOffsetPageTargetKey, -} from './CachedResourceOffsetPageKeys'; -import { CachedResourceKey } from './IResource'; +} from './CachedResourceOffsetPageKeys.js'; +import type { CachedResourceKey } from './IResource.js'; interface IOffsetPageKeyInfo { limit: number; diff --git a/webapp/packages/core-resource/src/index.ts b/webapp/packages/core-resource/src/index.ts index ca7ebd42d6..f261267d05 100644 --- a/webapp/packages/core-resource/src/index.ts +++ b/webapp/packages/core-resource/src/index.ts @@ -5,10 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './Resource/CachedDataResource'; -export * from './Resource/CachedMapResource'; -export * from './Resource/CachedResource'; -export * from './Resource/CachedResourceIncludes'; +export * from './Resource/CachedDataResource.js'; +export * from './Resource/CachedMapResource.js'; +export * from './Resource/CachedResource.js'; +export * from './Resource/CachedResourceIncludes.js'; export { CACHED_RESOURCE_DEFAULT_PAGE_OFFSET, CACHED_RESOURCE_DEFAULT_PAGE_LIMIT, @@ -17,18 +17,18 @@ export { CachedResourceOffsetPageTargetKey, getNextPageOffset, type ICachedResourceOffsetPageOptions, -} from './Resource/CachedResourceOffsetPageKeys'; -export * from './Resource/getOffsetPageKeyInfo'; -export * from './Resource/CachedTreeResource/CachedTreeResource'; -export * from './Resource/CachedTreeResource/ICachedTreeMoveData'; -export * from './Resource/ICachedResourceMetadata'; -export * from './Resource/IResource'; -export * from './Resource/Resource'; -export * from './Resource/ResourceAlias'; -export * from './Resource/ResourceError'; -export * from './Resource/ResourceKey'; -export * from './Resource/ResourceKeyAlias'; -export * from './Resource/ResourceKeyList'; -export * from './Resource/ResourceKeyListAlias'; -export * from './Resource/ResourceKeyUtils'; -export { coreResourceManifest } from './manifest'; +} from './Resource/CachedResourceOffsetPageKeys.js'; +export * from './Resource/getOffsetPageKeyInfo.js'; +export * from './Resource/CachedTreeResource/CachedTreeResource.js'; +export * from './Resource/CachedTreeResource/ICachedTreeMoveData.js'; +export * from './Resource/ICachedResourceMetadata.js'; +export * from './Resource/IResource.js'; +export * from './Resource/Resource.js'; +export * from './Resource/ResourceAlias.js'; +export * from './Resource/ResourceError.js'; +export * from './Resource/ResourceKey.js'; +export * from './Resource/ResourceKeyAlias.js'; +export * from './Resource/ResourceKeyList.js'; +export * from './Resource/ResourceKeyListAlias.js'; +export * from './Resource/ResourceKeyUtils.js'; +export { coreResourceManifest } from './manifest.js'; diff --git a/webapp/packages/core-root/package.json b/webapp/packages/core-root/package.json index 0daad4620c..26541696b3 100644 --- a/webapp/packages/core-root/package.json +++ b/webapp/packages/core-root/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-root", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -37,4 +38,4 @@ "msw": "^2", "typescript": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/core-root/src/DataSynchronization/DataSynchronizationQueue.ts b/webapp/packages/core-root/src/DataSynchronization/DataSynchronizationQueue.ts index 33ac300d0d..f7426e3c8d 100644 --- a/webapp/packages/core-root/src/DataSynchronization/DataSynchronizationQueue.ts +++ b/webapp/packages/core-root/src/DataSynchronization/DataSynchronizationQueue.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ISynchronizationMessage, ISynchronizationMessageResolveCallback } from './ISynchronizationMessage'; +import type { ISynchronizationMessage, ISynchronizationMessageResolveCallback } from './ISynchronizationMessage.js'; export class DataSynchronizationQueue { private readonly onResolve: ISynchronizationMessageResolveCallback; diff --git a/webapp/packages/core-root/src/DataSynchronization/DataSynchronizationService.ts b/webapp/packages/core-root/src/DataSynchronization/DataSynchronizationService.ts index 181cd1db54..9fbb8905a1 100644 --- a/webapp/packages/core-root/src/DataSynchronization/DataSynchronizationService.ts +++ b/webapp/packages/core-root/src/DataSynchronization/DataSynchronizationService.ts @@ -8,10 +8,10 @@ import { makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; -import type { ISynchronizationMessage, ISynchronizationMessageResolveCallback } from './ISynchronizationMessage'; -import { SynchronizationMessage } from './SynchronizationMessage'; +import type { ISynchronizationMessage, ISynchronizationMessageResolveCallback } from './ISynchronizationMessage.js'; +import { SynchronizationMessage } from './SynchronizationMessage.js'; @injectable() export class DataSynchronizationService { diff --git a/webapp/packages/core-root/src/DataSynchronization/SynchronizationMessage.ts b/webapp/packages/core-root/src/DataSynchronization/SynchronizationMessage.ts index 80f54f7919..ddf3ddb7b3 100644 --- a/webapp/packages/core-root/src/DataSynchronization/SynchronizationMessage.ts +++ b/webapp/packages/core-root/src/DataSynchronization/SynchronizationMessage.ts @@ -7,7 +7,7 @@ */ import { uuid } from '@cloudbeaver/core-utils'; -import type { ISynchronizationMessage, ISynchronizationMessageResolveCallback } from './ISynchronizationMessage'; +import type { ISynchronizationMessage, ISynchronizationMessageResolveCallback } from './ISynchronizationMessage.js'; export class SynchronizationMessage implements ISynchronizationMessage { readonly id: string; diff --git a/webapp/packages/core-root/src/DefaultNavigatorSettingsResource.ts b/webapp/packages/core-root/src/DefaultNavigatorSettingsResource.ts index 5d4312d815..3acf3c0c2a 100644 --- a/webapp/packages/core-root/src/DefaultNavigatorSettingsResource.ts +++ b/webapp/packages/core-root/src/DefaultNavigatorSettingsResource.ts @@ -9,10 +9,10 @@ import { action, makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { DefaultNavigatorSettingsFragment, GraphQLService, NavigatorSettingsInput } from '@cloudbeaver/core-sdk'; +import { type DefaultNavigatorSettingsFragment, GraphQLService, type NavigatorSettingsInput } from '@cloudbeaver/core-sdk'; -import { isNavigatorViewSettingsEqual } from './ConnectionNavigatorViewSettings'; -import { ServerConfigResource } from './ServerConfigResource'; +import { isNavigatorViewSettingsEqual } from './ConnectionNavigatorViewSettings.js'; +import { ServerConfigResource } from './ServerConfigResource.js'; export type DefaultNavigatorSettings = DefaultNavigatorSettingsFragment['defaultNavigatorSettings']; diff --git a/webapp/packages/core-root/src/FeaturesResource.ts b/webapp/packages/core-root/src/FeaturesResource.ts index 6c3796f14e..e9e95e34ad 100644 --- a/webapp/packages/core-root/src/FeaturesResource.ts +++ b/webapp/packages/core-root/src/FeaturesResource.ts @@ -9,10 +9,10 @@ import { makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { GraphQLService, WebFeatureSet } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type WebFeatureSet } from '@cloudbeaver/core-sdk'; -import { EAdminPermission } from './EAdminPermission'; -import { SessionPermissionsResource } from './SessionPermissionsResource'; +import { EAdminPermission } from './EAdminPermission.js'; +import { SessionPermissionsResource } from './SessionPermissionsResource.js'; export type ApplicationFeature = WebFeatureSet; diff --git a/webapp/packages/core-root/src/NetworkStateService.ts b/webapp/packages/core-root/src/NetworkStateService.ts index 098baa5a0e..811a50591d 100644 --- a/webapp/packages/core-root/src/NetworkStateService.ts +++ b/webapp/packages/core-root/src/NetworkStateService.ts @@ -8,11 +8,11 @@ import { makeObservable, observable } from 'mobx'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; import { GraphQLService } from '@cloudbeaver/core-sdk'; import { errorOf } from '@cloudbeaver/core-utils'; -import { NetworkError } from './NetworkError'; +import { NetworkError } from './NetworkError.js'; @injectable() export class NetworkStateService extends Bootstrap { @@ -35,7 +35,7 @@ export class NetworkStateService extends Bootstrap { }); } - register(): void { + override register(): void { this.networkState = window.navigator.onLine; window.addEventListener('online', () => this.setState(true)); @@ -44,8 +44,6 @@ export class NetworkStateService extends Bootstrap { this.graphQLService.registerInterceptor(this.sessionExpiredInterceptor.bind(this)); } - load(): void {} - private setState(state: boolean) { if (this.networkState === state) { return; diff --git a/webapp/packages/core-root/src/PasswordPolicyResource.ts b/webapp/packages/core-root/src/PasswordPolicyResource.ts index d4d0c9fb8c..3a9eadc265 100644 --- a/webapp/packages/core-root/src/PasswordPolicyResource.ts +++ b/webapp/packages/core-root/src/PasswordPolicyResource.ts @@ -7,9 +7,9 @@ */ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { GraphQLService, PasswordPolicyFragment } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type PasswordPolicyFragment } from '@cloudbeaver/core-sdk'; -import { ServerConfigResource } from './ServerConfigResource'; +import { ServerConfigResource } from './ServerConfigResource.js'; export type PasswordPolicy = PasswordPolicyFragment['passwordPolicyConfiguration']; diff --git a/webapp/packages/core-root/src/PermissionsService.ts b/webapp/packages/core-root/src/PermissionsService.ts index a264ae1dae..3065de100f 100644 --- a/webapp/packages/core-root/src/PermissionsService.ts +++ b/webapp/packages/core-root/src/PermissionsService.ts @@ -9,9 +9,9 @@ import { injectable } from '@cloudbeaver/core-di'; import { ExecutorInterrupter } from '@cloudbeaver/core-executor'; import { CachedResource } from '@cloudbeaver/core-resource'; -import { ServerConfigResource } from './ServerConfigResource'; -import { ServerLicenseStatusResource } from './ServerLicenseStatusResource'; -import { SessionPermissionsResource } from './SessionPermissionsResource'; +import { ServerConfigResource } from './ServerConfigResource.js'; +import { ServerLicenseStatusResource } from './ServerLicenseStatusResource.js'; +import { SessionPermissionsResource } from './SessionPermissionsResource.js'; export enum EPermission {} diff --git a/webapp/packages/core-root/src/ProductInfoResource.ts b/webapp/packages/core-root/src/ProductInfoResource.ts index fc25a1ea64..932f9ed27e 100644 --- a/webapp/packages/core-root/src/ProductInfoResource.ts +++ b/webapp/packages/core-root/src/ProductInfoResource.ts @@ -7,9 +7,9 @@ */ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { GraphQLService, ProductInfoFragment } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type ProductInfoFragment } from '@cloudbeaver/core-sdk'; -import { ServerConfigResource } from './ServerConfigResource'; +import { ServerConfigResource } from './ServerConfigResource.js'; export type ProductInfo = ProductInfoFragment['productInfo']; diff --git a/webapp/packages/core-root/src/QuotasService.ts b/webapp/packages/core-root/src/QuotasService.ts index 055403faed..b3f44db7c4 100644 --- a/webapp/packages/core-root/src/QuotasService.ts +++ b/webapp/packages/core-root/src/QuotasService.ts @@ -7,7 +7,7 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import { ServerResourceQuotasResource } from './ServerResourceQuotasResource'; +import { ServerResourceQuotasResource } from './ServerResourceQuotasResource.js'; interface IQuotas { dataExportFileSizeLimit: number; diff --git a/webapp/packages/core-root/src/RootBootstrap.ts b/webapp/packages/core-root/src/RootBootstrap.ts index e2f2ed1668..24d8d5651c 100644 --- a/webapp/packages/core-root/src/RootBootstrap.ts +++ b/webapp/packages/core-root/src/RootBootstrap.ts @@ -8,8 +8,8 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { SettingsManagerService, SettingsResolverService } from '@cloudbeaver/core-settings'; -import { ServerSettingsManagerService } from './Settings/ServerSettingsManagerService'; -import { SERVER_SETTINGS_LAYER, ServerSettingsService } from './Settings/ServerSettingsService'; +import { ServerSettingsManagerService } from './Settings/ServerSettingsManagerService.js'; +import { SERVER_SETTINGS_LAYER, ServerSettingsService } from './Settings/ServerSettingsService.js'; @injectable() export class RootBootstrap extends Bootstrap { @@ -22,7 +22,7 @@ export class RootBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.settingsManagerService.registerSettings( this.serverSettingsManagerService.settingsProvider, this.serverSettingsManagerService.getSettingsGetter(), diff --git a/webapp/packages/core-root/src/ServerConfigEventHandler.ts b/webapp/packages/core-root/src/ServerConfigEventHandler.ts index 07e0e5430b..178cff89bc 100644 --- a/webapp/packages/core-root/src/ServerConfigEventHandler.ts +++ b/webapp/packages/core-root/src/ServerConfigEventHandler.ts @@ -8,8 +8,8 @@ import { injectable } from '@cloudbeaver/core-di'; import type { CbConfigEvent as IServerConfigEvent } from '@cloudbeaver/core-sdk'; -import { TopicEventHandler } from './ServerEventEmitter/TopicEventHandler'; -import { ISessionEvent, SessionEventSource, SessionEventTopic } from './SessionEventSource'; +import { TopicEventHandler } from './ServerEventEmitter/TopicEventHandler.js'; +import { type ISessionEvent, SessionEventSource, SessionEventTopic } from './SessionEventSource.js'; export { type IServerConfigEvent }; diff --git a/webapp/packages/core-root/src/ServerConfigResource.ts b/webapp/packages/core-root/src/ServerConfigResource.ts index 9227081242..2d37cd4a2b 100644 --- a/webapp/packages/core-root/src/ServerConfigResource.ts +++ b/webapp/packages/core-root/src/ServerConfigResource.ts @@ -9,12 +9,12 @@ import { action, makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { GraphQLService, ServerConfigFragment, ServerConfigInput } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type ServerConfigFragment, type ServerConfigInput } from '@cloudbeaver/core-sdk'; import { isArraysEqual } from '@cloudbeaver/core-utils'; -import { DataSynchronizationQueue } from './DataSynchronization/DataSynchronizationQueue'; -import { DataSynchronizationService } from './DataSynchronization/DataSynchronizationService'; -import { ServerConfigEventHandler } from './ServerConfigEventHandler'; +import { DataSynchronizationQueue } from './DataSynchronization/DataSynchronizationQueue.js'; +import { DataSynchronizationService } from './DataSynchronization/DataSynchronizationService.js'; +import { ServerConfigEventHandler } from './ServerConfigEventHandler.js'; export const FEATURE_GIT_ID = 'git'; diff --git a/webapp/packages/core-root/src/ServerEventEmitter/TopicEventHandler.ts b/webapp/packages/core-root/src/ServerEventEmitter/TopicEventHandler.ts index 7d4c7f62f1..cd0c19714d 100644 --- a/webapp/packages/core-root/src/ServerEventEmitter/TopicEventHandler.ts +++ b/webapp/packages/core-root/src/ServerEventEmitter/TopicEventHandler.ts @@ -5,13 +5,13 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Connectable, connectable, filter, map, merge, Observable, Subject } from 'rxjs'; +import { type Connectable, connectable, filter, map, merge, Observable, Subject } from 'rxjs'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import type { IResource } from '@cloudbeaver/core-resource'; import { compose } from '@cloudbeaver/core-utils'; -import type { IBaseServerEvent, IServerEventCallback, IServerEventEmitter, Subscription } from './IServerEventEmitter'; +import type { IBaseServerEvent, IServerEventCallback, IServerEventEmitter, Subscription } from './IServerEventEmitter.js'; interface ISubscribedResourceInfo { listeners: number; @@ -33,7 +33,10 @@ export abstract class TopicEventHandler< private readonly subscribedResources: Map, ISubscribedResourceInfo>; private readonly serverSubject?: Observable; private readonly subject: Subject; - constructor(private readonly topic: string, private readonly emitter: IServerEventEmitter) { + constructor( + private readonly topic: string, + private readonly emitter: IServerEventEmitter, + ) { this.onInit = new SyncExecutor(); this.subject = new Subject(); this.activeResources = []; diff --git a/webapp/packages/core-root/src/ServerLicenseStatusResource.ts b/webapp/packages/core-root/src/ServerLicenseStatusResource.ts index 90203a35de..f69a31a329 100644 --- a/webapp/packages/core-root/src/ServerLicenseStatusResource.ts +++ b/webapp/packages/core-root/src/ServerLicenseStatusResource.ts @@ -7,9 +7,9 @@ */ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { GraphQLService, ServerLicenseStatusFragment } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type ServerLicenseStatusFragment } from '@cloudbeaver/core-sdk'; -import { ServerConfigResource } from './ServerConfigResource'; +import { ServerConfigResource } from './ServerConfigResource.js'; export type ServerLicenseStatus = ServerLicenseStatusFragment; diff --git a/webapp/packages/core-root/src/ServerNodeService.ts b/webapp/packages/core-root/src/ServerNodeService.ts index d11415f2c3..d293a2a6ee 100644 --- a/webapp/packages/core-root/src/ServerNodeService.ts +++ b/webapp/packages/core-root/src/ServerNodeService.ts @@ -6,11 +6,11 @@ * you may not use this file except in compliance with the License. */ import { Dependency, injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; -import { GraphQLService, WsSocketConnectedEvent } from '@cloudbeaver/core-sdk'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; +import { GraphQLService, type WsSocketConnectedEvent } from '@cloudbeaver/core-sdk'; -import { ServerNodeError } from './ServerNodeError'; -import { ServerEventId, SessionEventSource } from './SessionEventSource'; +import { ServerNodeError } from './ServerNodeError.js'; +import { ServerEventId, SessionEventSource } from './SessionEventSource.js'; @injectable() export class ServerNodeService extends Dependency { diff --git a/webapp/packages/core-root/src/ServerResourceQuotasResource.ts b/webapp/packages/core-root/src/ServerResourceQuotasResource.ts index 1af57e41f0..9e9e3fc754 100644 --- a/webapp/packages/core-root/src/ServerResourceQuotasResource.ts +++ b/webapp/packages/core-root/src/ServerResourceQuotasResource.ts @@ -7,9 +7,9 @@ */ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { GraphQLService, ResourceQuotasFragment } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type ResourceQuotasFragment } from '@cloudbeaver/core-sdk'; -import { ServerConfigResource } from './ServerConfigResource'; +import { ServerConfigResource } from './ServerConfigResource.js'; export type ServerResourceQuotas = ResourceQuotasFragment['resourceQuotas']; diff --git a/webapp/packages/core-root/src/SessionActionService.ts b/webapp/packages/core-root/src/SessionActionService.ts index 3b3c170e20..35dc4e350e 100644 --- a/webapp/packages/core-root/src/SessionActionService.ts +++ b/webapp/packages/core-root/src/SessionActionService.ts @@ -6,9 +6,9 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor, ISyncContextLoader } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor, type ISyncContextLoader } from '@cloudbeaver/core-executor'; -import { ISessionAction, SessionResource } from './SessionResource'; +import { type ISessionAction, SessionResource } from './SessionResource.js'; interface ISessionActionContext { processed: boolean; diff --git a/webapp/packages/core-root/src/SessionActivityService.ts b/webapp/packages/core-root/src/SessionActivityService.ts index ab24782851..08f2178494 100644 --- a/webapp/packages/core-root/src/SessionActivityService.ts +++ b/webapp/packages/core-root/src/SessionActivityService.ts @@ -8,7 +8,7 @@ import { ClientActivityService } from '@cloudbeaver/core-client-activity'; import { Dependency, injectable } from '@cloudbeaver/core-di'; -import { SessionResource } from './SessionResource'; +import { SessionResource } from './SessionResource.js'; export const SESSION_TOUCH_TIME_PERIOD = 1000 * 60; diff --git a/webapp/packages/core-root/src/SessionDataResource.ts b/webapp/packages/core-root/src/SessionDataResource.ts index 411cf72c5f..3d99567d80 100644 --- a/webapp/packages/core-root/src/SessionDataResource.ts +++ b/webapp/packages/core-root/src/SessionDataResource.ts @@ -8,7 +8,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { SessionResource } from './SessionResource'; +import { SessionResource } from './SessionResource.js'; @injectable() export class SessionDataResource extends CachedDataResource { diff --git a/webapp/packages/core-root/src/SessionEventSource.ts b/webapp/packages/core-root/src/SessionEventSource.ts index 228b0121c2..8cdbd674d8 100644 --- a/webapp/packages/core-root/src/SessionEventSource.ts +++ b/webapp/packages/core-root/src/SessionEventSource.ts @@ -14,7 +14,7 @@ import { map, merge, Observable, - Observer, + type Observer, of, repeat, retry, @@ -25,7 +25,7 @@ import { import { webSocket, WebSocketSubject } from 'rxjs/webSocket'; import { injectable } from '@cloudbeaver/core-di'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { CbClientEventId as ClientEventId, EnvironmentService, @@ -34,9 +34,9 @@ import { CbEventTopic as SessionEventTopic, } from '@cloudbeaver/core-sdk'; -import { NetworkStateService } from './NetworkStateService'; -import type { IBaseServerEvent, IServerEventCallback, IServerEventEmitter, Subscription } from './ServerEventEmitter/IServerEventEmitter'; -import { SessionExpireService } from './SessionExpireService'; +import { NetworkStateService } from './NetworkStateService.js'; +import type { IBaseServerEvent, IServerEventCallback, IServerEventEmitter, Subscription } from './ServerEventEmitter/IServerEventEmitter.js'; +import { SessionExpireService } from './SessionExpireService.js'; export { ServerEventId, SessionEventTopic, ClientEventId }; diff --git a/webapp/packages/core-root/src/SessionExpireEventService.ts b/webapp/packages/core-root/src/SessionExpireEventService.ts index c53aa0a0ce..6cfb8686a3 100644 --- a/webapp/packages/core-root/src/SessionExpireEventService.ts +++ b/webapp/packages/core-root/src/SessionExpireEventService.ts @@ -8,8 +8,8 @@ import { Dependency, injectable } from '@cloudbeaver/core-di'; import type { WsSessionExpiredEvent } from '@cloudbeaver/core-sdk'; -import { ServerEventId, SessionEventSource } from './SessionEventSource'; -import { SessionExpireService } from './SessionExpireService'; +import { ServerEventId, SessionEventSource } from './SessionEventSource.js'; +import { SessionExpireService } from './SessionExpireService.js'; @injectable() export class SessionExpireEventService extends Dependency { diff --git a/webapp/packages/core-root/src/SessionExpireService.ts b/webapp/packages/core-root/src/SessionExpireService.ts index af8acf44c4..049917c228 100644 --- a/webapp/packages/core-root/src/SessionExpireService.ts +++ b/webapp/packages/core-root/src/SessionExpireService.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; import { EServerErrorCode, GQLError, GraphQLService, SessionError } from '@cloudbeaver/core-sdk'; import { errorOf } from '@cloudbeaver/core-utils'; @@ -29,12 +29,10 @@ export class SessionExpireService extends Bootstrap { return this.isExpired; } - register(): void { + override register(): void { this.graphQLService.registerInterceptor(this.sessionExpiredInterceptor.bind(this)); } - load(): void {} - sessionExpired(): void { if (this.expired) { return; diff --git a/webapp/packages/core-root/src/SessionInfoEventHandler.ts b/webapp/packages/core-root/src/SessionInfoEventHandler.ts index fe80326f87..e1a494454b 100644 --- a/webapp/packages/core-root/src/SessionInfoEventHandler.ts +++ b/webapp/packages/core-root/src/SessionInfoEventHandler.ts @@ -8,8 +8,8 @@ import { injectable } from '@cloudbeaver/core-di'; import { type CbClientEvent, CbEventTopic, type WsSessionStateEvent as ISessionStateEvent } from '@cloudbeaver/core-sdk'; -import { TopicEventHandler } from './ServerEventEmitter/TopicEventHandler'; -import { ClientEventId, ISessionEvent, SessionEventId, SessionEventSource, SessionEventTopic } from './SessionEventSource'; +import { TopicEventHandler } from './ServerEventEmitter/TopicEventHandler.js'; +import { ClientEventId, type ISessionEvent, type SessionEventId, SessionEventSource, SessionEventTopic } from './SessionEventSource.js'; export { type ISessionStateEvent }; diff --git a/webapp/packages/core-root/src/SessionPermissionEventHandler.ts b/webapp/packages/core-root/src/SessionPermissionEventHandler.ts index b842dd97e0..ba61e9f72d 100644 --- a/webapp/packages/core-root/src/SessionPermissionEventHandler.ts +++ b/webapp/packages/core-root/src/SessionPermissionEventHandler.ts @@ -8,8 +8,8 @@ import { injectable } from '@cloudbeaver/core-di'; import type { CbSubjectPermissionUpdateEvent as ISessionPermissionEvent } from '@cloudbeaver/core-sdk'; -import { TopicEventHandler } from './ServerEventEmitter/TopicEventHandler'; -import { ISessionEvent, SessionEventId, SessionEventSource, SessionEventTopic } from './SessionEventSource'; +import { TopicEventHandler } from './ServerEventEmitter/TopicEventHandler.js'; +import { type ISessionEvent, type SessionEventId, SessionEventSource, SessionEventTopic } from './SessionEventSource.js'; export type { ISessionPermissionEvent }; diff --git a/webapp/packages/core-root/src/SessionPermissionsResource.ts b/webapp/packages/core-root/src/SessionPermissionsResource.ts index 848aff2810..5e3d131ae1 100644 --- a/webapp/packages/core-root/src/SessionPermissionsResource.ts +++ b/webapp/packages/core-root/src/SessionPermissionsResource.ts @@ -10,11 +10,11 @@ import { ExecutorInterrupter } from '@cloudbeaver/core-executor'; import { CachedDataResource, CachedResource } from '@cloudbeaver/core-resource'; import { GraphQLService } from '@cloudbeaver/core-sdk'; -import { DataSynchronizationService } from './DataSynchronization/DataSynchronizationService'; -import { SessionDataResource } from './SessionDataResource'; -import { ServerEventId } from './SessionEventSource'; -import { ISessionPermissionEvent, SessionPermissionEventHandler } from './SessionPermissionEventHandler'; -import { SessionResource } from './SessionResource'; +import { DataSynchronizationService } from './DataSynchronization/DataSynchronizationService.js'; +import { SessionDataResource } from './SessionDataResource.js'; +import { ServerEventId } from './SessionEventSource.js'; +import { type ISessionPermissionEvent, SessionPermissionEventHandler } from './SessionPermissionEventHandler.js'; +import { SessionResource } from './SessionResource.js'; @injectable() export class SessionPermissionsResource extends CachedDataResource> { diff --git a/webapp/packages/core-root/src/SessionResource.ts b/webapp/packages/core-root/src/SessionResource.ts index 215efe5d77..ba8d504058 100644 --- a/webapp/packages/core-root/src/SessionResource.ts +++ b/webapp/packages/core-root/src/SessionResource.ts @@ -8,11 +8,11 @@ import { injectable } from '@cloudbeaver/core-di'; import { LocalizationService } from '@cloudbeaver/core-localization'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { GraphQLService, SessionStateFragment } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type SessionStateFragment } from '@cloudbeaver/core-sdk'; -import { ServerConfigResource } from './ServerConfigResource'; -import { ServerEventId } from './SessionEventSource'; -import { type ISessionStateEvent, SessionInfoEventHandler } from './SessionInfoEventHandler'; +import { ServerConfigResource } from './ServerConfigResource.js'; +import { ServerEventId } from './SessionEventSource.js'; +import { type ISessionStateEvent, SessionInfoEventHandler } from './SessionInfoEventHandler.js'; export type SessionState = SessionStateFragment; export interface ISessionAction { @@ -100,7 +100,7 @@ export class SessionResource extends CachedDataResource { this.sessionInfoEventHandler.pingSession(); } - protected setData(data: SessionState | null) { + protected override setData(data: SessionState | null) { if (!this.action) { this.action = data?.actionParameters; } diff --git a/webapp/packages/core-root/src/Settings/SESSION_SETTINGS_LAYER.ts b/webapp/packages/core-root/src/Settings/SESSION_SETTINGS_LAYER.ts index b245257234..b42912ae8c 100644 --- a/webapp/packages/core-root/src/Settings/SESSION_SETTINGS_LAYER.ts +++ b/webapp/packages/core-root/src/Settings/SESSION_SETTINGS_LAYER.ts @@ -7,6 +7,6 @@ */ import { createSettingsLayer } from '@cloudbeaver/core-settings'; -import { SERVER_SETTINGS_LAYER } from './ServerSettingsService'; +import { SERVER_SETTINGS_LAYER } from './ServerSettingsService.js'; export const SESSION_SETTINGS_LAYER = createSettingsLayer(SERVER_SETTINGS_LAYER, 'session'); diff --git a/webapp/packages/core-root/src/Settings/ServerSettingsManagerService.ts b/webapp/packages/core-root/src/Settings/ServerSettingsManagerService.ts index 9997e92bfb..3c35b5d344 100644 --- a/webapp/packages/core-root/src/Settings/ServerSettingsManagerService.ts +++ b/webapp/packages/core-root/src/Settings/ServerSettingsManagerService.ts @@ -14,15 +14,15 @@ import { ESettingsValueType, type ISettingDescription, ROOT_SETTINGS_GROUP, - SettingDescriptionTransformer, + type SettingDescriptionTransformer, type SettingsDescriptionGetter, type SettingsGroup, SettingsProvider, SettingsResolverService, } from '@cloudbeaver/core-settings'; -import { getPathParent, ILoadableState, schema } from '@cloudbeaver/core-utils'; +import { getPathParent, type ILoadableState, schema } from '@cloudbeaver/core-utils'; -import { ServerSettingsResource } from './ServerSettingsResource'; +import { ServerSettingsResource } from './ServerSettingsResource.js'; @injectable() export class ServerSettingsManagerService { diff --git a/webapp/packages/core-root/src/Settings/ServerSettingsResource.ts b/webapp/packages/core-root/src/Settings/ServerSettingsResource.ts index 6e9e763c85..f48c8bbc9f 100644 --- a/webapp/packages/core-root/src/Settings/ServerSettingsResource.ts +++ b/webapp/packages/core-root/src/Settings/ServerSettingsResource.ts @@ -7,9 +7,9 @@ */ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { GraphQLService, ProductSettings } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type ProductSettings } from '@cloudbeaver/core-sdk'; -import { ServerConfigResource } from '../ServerConfigResource'; +import { ServerConfigResource } from '../ServerConfigResource.js'; export type ServerSettings = ProductSettings; diff --git a/webapp/packages/core-root/src/Settings/ServerSettingsService.ts b/webapp/packages/core-root/src/Settings/ServerSettingsService.ts index 508aae3f8e..e6b545594c 100644 --- a/webapp/packages/core-root/src/Settings/ServerSettingsService.ts +++ b/webapp/packages/core-root/src/Settings/ServerSettingsService.ts @@ -11,9 +11,9 @@ import { injectable } from '@cloudbeaver/core-di'; import { PRODUCT_SETTINGS_LAYER } from '@cloudbeaver/core-product'; import { createSettingsLayer, SettingsSource } from '@cloudbeaver/core-settings'; -import { EAdminPermission } from '../EAdminPermission'; -import { ServerConfigResource } from '../ServerConfigResource'; -import { SessionPermissionsResource } from '../SessionPermissionsResource'; +import { EAdminPermission } from '../EAdminPermission.js'; +import { ServerConfigResource } from '../ServerConfigResource.js'; +import { SessionPermissionsResource } from '../SessionPermissionsResource.js'; export const SERVER_SETTINGS_LAYER = createSettingsLayer(PRODUCT_SETTINGS_LAYER, 'server'); @@ -38,7 +38,7 @@ export class ServerSettingsService extends SettingsSource { }); } - has(key: any): boolean { + override has(key: any): boolean { return this.settings.has(key) || super.has(key); } @@ -50,7 +50,7 @@ export class ServerSettingsService extends SettingsSource { return this.settings.get(key); } - clear(): void { + override clear(): void { this.update(() => { super.clear(); this.settings.clear(); diff --git a/webapp/packages/core-root/src/WindowEventsService.ts b/webapp/packages/core-root/src/WindowEventsService.ts index 241ad49769..20892e00a1 100644 --- a/webapp/packages/core-root/src/WindowEventsService.ts +++ b/webapp/packages/core-root/src/WindowEventsService.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; @injectable() export class WindowEventsService extends Bootstrap { @@ -17,10 +17,8 @@ export class WindowEventsService extends Bootstrap { this.onFocusChange = new Executor(); } - register(): void { + override register(): void { window.addEventListener('focus', () => this.onFocusChange.execute(true)); window.addEventListener('blur', () => this.onFocusChange.execute(false)); } - - load(): void | Promise {} } diff --git a/webapp/packages/core-root/src/__custom_mocks__/data/defaultServerConfig.ts b/webapp/packages/core-root/src/__custom_mocks__/data/defaultServerConfig.ts index a00e9b93b2..dcdc7442e2 100644 --- a/webapp/packages/core-root/src/__custom_mocks__/data/defaultServerConfig.ts +++ b/webapp/packages/core-root/src/__custom_mocks__/data/defaultServerConfig.ts @@ -8,7 +8,7 @@ import type { ServerConfigQuery } from '@cloudbeaver/core-sdk'; import { WebsiteLinks } from '@cloudbeaver/core-website'; -import { defaultProductConfiguration } from './defaultProductConfiguration'; +import { defaultProductConfiguration } from './defaultProductConfiguration.js'; export const defaultServerConfig: (productConfiguration?: Record) => ServerConfigQuery = ( productConfiguration = defaultProductConfiguration, diff --git a/webapp/packages/core-root/src/__custom_mocks__/mockAppInit.ts b/webapp/packages/core-root/src/__custom_mocks__/mockAppInit.ts index 6b3db0fe00..cc97d655e2 100644 --- a/webapp/packages/core-root/src/__custom_mocks__/mockAppInit.ts +++ b/webapp/packages/core-root/src/__custom_mocks__/mockAppInit.ts @@ -7,8 +7,8 @@ */ import type { graphql } from 'msw'; -import { mockOpenSession } from './resolvers/mockOpenSession'; -import { mockServerConfig } from './resolvers/mockServerConfig'; +import { mockOpenSession } from './resolvers/mockOpenSession.js'; +import { mockServerConfig } from './resolvers/mockServerConfig.js'; export function mockAppInit(endpoint: ReturnType, productConfiguration?: Record) { return [endpoint.query('serverConfig', mockServerConfig(productConfiguration)), endpoint.mutation('openSession', mockOpenSession)]; diff --git a/webapp/packages/core-root/src/__custom_mocks__/mockGraphQL.ts b/webapp/packages/core-root/src/__custom_mocks__/mockGraphQL.ts index 29379085e4..19acc4bb27 100644 --- a/webapp/packages/core-root/src/__custom_mocks__/mockGraphQL.ts +++ b/webapp/packages/core-root/src/__custom_mocks__/mockGraphQL.ts @@ -9,7 +9,7 @@ import { afterAll, afterEach, beforeAll } from '@jest/globals'; import type { GraphQLHandler } from 'msw'; import { setupServer } from 'msw/node'; -import { createWebsocketEndpoint } from './createWebsocketEndpoint'; +import { createWebsocketEndpoint } from './createWebsocketEndpoint.js'; export function mockGraphQL(...requestHandlers: GraphQLHandler[]) { const server = setupServer(...requestHandlers, createWebsocketEndpoint()); diff --git a/webapp/packages/core-root/src/__custom_mocks__/resolvers/mockOpenSession.ts b/webapp/packages/core-root/src/__custom_mocks__/resolvers/mockOpenSession.ts index 1f2e1be7d6..52b1d0844f 100644 --- a/webapp/packages/core-root/src/__custom_mocks__/resolvers/mockOpenSession.ts +++ b/webapp/packages/core-root/src/__custom_mocks__/resolvers/mockOpenSession.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { GraphQLResolverExtras, GraphQLResponseBody, HttpResponse, ResponseResolver } from 'msw'; +import { type GraphQLResolverExtras, type GraphQLResponseBody, HttpResponse, type ResponseResolver } from 'msw'; import type { OpenSessionMutation, OpenSessionMutationVariables } from '@cloudbeaver/core-sdk'; diff --git a/webapp/packages/core-root/src/__custom_mocks__/resolvers/mockServerConfig.ts b/webapp/packages/core-root/src/__custom_mocks__/resolvers/mockServerConfig.ts index f64a7ed6bd..f99089ab19 100644 --- a/webapp/packages/core-root/src/__custom_mocks__/resolvers/mockServerConfig.ts +++ b/webapp/packages/core-root/src/__custom_mocks__/resolvers/mockServerConfig.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { GraphQLResolverExtras, GraphQLResponseBody, HttpResponse, ResponseResolver } from 'msw'; +import { type GraphQLResolverExtras, type GraphQLResponseBody, HttpResponse, type ResponseResolver } from 'msw'; import type { ServerConfigQuery, ServerConfigQueryVariables } from '@cloudbeaver/core-sdk'; -import { defaultServerConfig } from '../data/defaultServerConfig'; +import { defaultServerConfig } from '../data/defaultServerConfig.js'; export function mockServerConfig( productConfiguration?: Record, diff --git a/webapp/packages/core-root/src/index.ts b/webapp/packages/core-root/src/index.ts index 386e0627e4..0568e3490c 100644 --- a/webapp/packages/core-root/src/index.ts +++ b/webapp/packages/core-root/src/index.ts @@ -5,36 +5,36 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './DataSynchronization/DataSynchronizationQueue'; -export * from './DataSynchronization/DataSynchronizationService'; -export * from './DataSynchronization/ISynchronizationMessage'; -export * from './DataSynchronization/SynchronizationMessage'; -export * from './ServerEventEmitter/IServerEventEmitter'; -export * from './ServerEventEmitter/TopicEventHandler'; -export * from './ConnectionNavigatorViewSettings'; -export * from './DefaultNavigatorSettingsResource'; -export * from './FeaturesResource'; -export * from './NetworkError'; -export * from './NetworkStateService'; -export * from './PasswordPolicyResource'; -export * from './SessionPermissionsResource'; -export * from './PermissionsService'; -export * from './ProductInfoResource'; -export * from './ServerConfigResource'; -export * from './SessionEventSource'; -export * from './QuotasService'; -export * from './SessionResource'; -export * from './Settings/ServerSettingsManagerService'; -export * from './Settings/ServerSettingsService'; -export * from './Settings/SESSION_SETTINGS_LAYER'; -export * from './SessionActionService'; -export * from './EAdminPermission'; -export * from './SessionDataResource'; -export * from './SessionExpireService'; -export * from './SessionExpireEventService'; -export * from './SessionActivityService'; -export * from './ServerNodeService'; -export * from './ServerResourceQuotasResource'; -export * from './WindowEventsService'; -export * from './ServerLicenseStatusResource'; -export * from './manifest'; +export * from './DataSynchronization/DataSynchronizationQueue.js'; +export * from './DataSynchronization/DataSynchronizationService.js'; +export * from './DataSynchronization/ISynchronizationMessage.js'; +export * from './DataSynchronization/SynchronizationMessage.js'; +export * from './ServerEventEmitter/IServerEventEmitter.js'; +export * from './ServerEventEmitter/TopicEventHandler.js'; +export * from './ConnectionNavigatorViewSettings.js'; +export * from './DefaultNavigatorSettingsResource.js'; +export * from './FeaturesResource.js'; +export * from './NetworkError.js'; +export * from './NetworkStateService.js'; +export * from './PasswordPolicyResource.js'; +export * from './SessionPermissionsResource.js'; +export * from './PermissionsService.js'; +export * from './ProductInfoResource.js'; +export * from './ServerConfigResource.js'; +export * from './SessionEventSource.js'; +export * from './QuotasService.js'; +export * from './SessionResource.js'; +export * from './Settings/ServerSettingsManagerService.js'; +export * from './Settings/ServerSettingsService.js'; +export * from './Settings/SESSION_SETTINGS_LAYER.js'; +export * from './SessionActionService.js'; +export * from './EAdminPermission.js'; +export * from './SessionDataResource.js'; +export * from './SessionExpireService.js'; +export * from './SessionExpireEventService.js'; +export * from './SessionActivityService.js'; +export * from './ServerNodeService.js'; +export * from './ServerResourceQuotasResource.js'; +export * from './WindowEventsService.js'; +export * from './ServerLicenseStatusResource.js'; +export * from './manifest.js'; diff --git a/webapp/packages/core-root/src/manifest.ts b/webapp/packages/core-root/src/manifest.ts index 9a3e3b6dbe..097c833731 100644 --- a/webapp/packages/core-root/src/manifest.ts +++ b/webapp/packages/core-root/src/manifest.ts @@ -13,33 +13,33 @@ export const coreRootManifest: PluginManifest = { }, providers: [ - () => import('./FeaturesResource').then(m => m.FeaturesResource), - () => import('./NetworkStateService').then(m => m.NetworkStateService), - () => import('./SessionPermissionsResource').then(m => m.SessionPermissionsResource), - () => import('./PermissionsService').then(m => m.PermissionsService), - () => import('./ServerConfigResource').then(m => m.ServerConfigResource), - () => import('./Settings/ServerSettingsService').then(m => m.ServerSettingsService), - () => import('./SessionActionService').then(m => m.SessionActionService), - () => import('./SessionDataResource').then(m => m.SessionDataResource), - () => import('./SessionExpireService').then(m => m.SessionExpireService), - () => import('./SessionExpireEventService').then(m => m.SessionExpireEventService), - () => import('./ServerNodeService').then(m => m.ServerNodeService), - () => import('./SessionResource').then(m => m.SessionResource), - () => import('./WindowEventsService').then(m => m.WindowEventsService), - () => import('./QuotasService').then(m => m.QuotasService), - () => import('./ServerConfigEventHandler').then(m => m.ServerConfigEventHandler), - () => import('./SessionEventSource').then(m => m.SessionEventSource), - () => import('./SessionInfoEventHandler').then(m => m.SessionInfoEventHandler), - () => import('./SessionActivityService').then(m => m.SessionActivityService), - () => import('./DataSynchronization/DataSynchronizationService').then(m => m.DataSynchronizationService), - () => import('./SessionPermissionEventHandler').then(m => m.SessionPermissionEventHandler), - () => import('./Settings/ServerSettingsResource').then(m => m.ServerSettingsResource), - () => import('./Settings/ServerSettingsManagerService').then(m => m.ServerSettingsManagerService), - () => import('./RootBootstrap').then(m => m.RootBootstrap), - () => import('./ServerLicenseStatusResource').then(m => m.ServerLicenseStatusResource), - () => import('./PasswordPolicyResource').then(m => m.PasswordPolicyResource), - () => import('./ProductInfoResource').then(m => m.ProductInfoResource), - () => import('./DefaultNavigatorSettingsResource').then(m => m.DefaultNavigatorSettingsResource), - () => import('./ServerResourceQuotasResource').then(m => m.ServerResourceQuotasResource), + () => import('./FeaturesResource.js').then(m => m.FeaturesResource), + () => import('./NetworkStateService.js').then(m => m.NetworkStateService), + () => import('./SessionPermissionsResource.js').then(m => m.SessionPermissionsResource), + () => import('./PermissionsService.js').then(m => m.PermissionsService), + () => import('./ServerConfigResource.js').then(m => m.ServerConfigResource), + () => import('./Settings/ServerSettingsService.js').then(m => m.ServerSettingsService), + () => import('./SessionActionService.js').then(m => m.SessionActionService), + () => import('./SessionDataResource.js').then(m => m.SessionDataResource), + () => import('./SessionExpireService.js').then(m => m.SessionExpireService), + () => import('./SessionExpireEventService.js').then(m => m.SessionExpireEventService), + () => import('./ServerNodeService.js').then(m => m.ServerNodeService), + () => import('./SessionResource.js').then(m => m.SessionResource), + () => import('./WindowEventsService.js').then(m => m.WindowEventsService), + () => import('./QuotasService.js').then(m => m.QuotasService), + () => import('./ServerConfigEventHandler.js').then(m => m.ServerConfigEventHandler), + () => import('./SessionEventSource.js').then(m => m.SessionEventSource), + () => import('./SessionInfoEventHandler.js').then(m => m.SessionInfoEventHandler), + () => import('./SessionActivityService.js').then(m => m.SessionActivityService), + () => import('./DataSynchronization/DataSynchronizationService.js').then(m => m.DataSynchronizationService), + () => import('./SessionPermissionEventHandler.js').then(m => m.SessionPermissionEventHandler), + () => import('./Settings/ServerSettingsResource.js').then(m => m.ServerSettingsResource), + () => import('./Settings/ServerSettingsManagerService.js').then(m => m.ServerSettingsManagerService), + () => import('./RootBootstrap.js').then(m => m.RootBootstrap), + () => import('./ServerLicenseStatusResource.js').then(m => m.ServerLicenseStatusResource), + () => import('./PasswordPolicyResource.js').then(m => m.PasswordPolicyResource), + () => import('./ProductInfoResource.js').then(m => m.ProductInfoResource), + () => import('./DefaultNavigatorSettingsResource.js').then(m => m.DefaultNavigatorSettingsResource), + () => import('./ServerResourceQuotasResource.js').then(m => m.ServerResourceQuotasResource), ], }; diff --git a/webapp/packages/core-routing/package.json b/webapp/packages/core-routing/package.json index a126706912..fee0c0c82d 100644 --- a/webapp/packages/core-routing/package.json +++ b/webapp/packages/core-routing/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-routing", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-routing/src/RouterService.ts b/webapp/packages/core-routing/src/RouterService.ts index 61d9e04218..d6e4c2832c 100644 --- a/webapp/packages/core-routing/src/RouterService.ts +++ b/webapp/packages/core-routing/src/RouterService.ts @@ -6,12 +6,12 @@ * you may not use this file except in compliance with the License. */ import { makeObservable, observable, runInAction } from 'mobx'; -import createRouter, { Router, State, SubscribeFn, SubscribeState } from 'router5'; +import { createRouter, type Router, type State, type SubscribeFn, type SubscribeState } from 'router5'; import browserPlugin from 'router5-plugin-browser'; -import type { DoneFn } from 'router5/dist/types/base'; +import type { DoneFn } from 'router5/dist/types/base.js'; import { App, Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { Executor, ExecutorInterrupter, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutor } from '@cloudbeaver/core-executor'; import { GlobalConstants } from '@cloudbeaver/core-utils'; export type RouterState = State; @@ -67,7 +67,7 @@ export class RouterService extends Bootstrap { return this.router.subscribe(subscriber); } - load(): void { + override load(): void { this.start(); } @@ -89,7 +89,7 @@ export class RouterService extends Bootstrap { } this.router.usePlugin( - browserPlugin({ + (browserPlugin as any)({ useHash: true, base: root, }), diff --git a/webapp/packages/core-routing/src/Screen/ScreenService.ts b/webapp/packages/core-routing/src/Screen/ScreenService.ts index 05b0b06068..e73be6ce54 100644 --- a/webapp/packages/core-routing/src/Screen/ScreenService.ts +++ b/webapp/packages/core-routing/src/Screen/ScreenService.ts @@ -9,10 +9,10 @@ import { computed, makeObservable } from 'mobx'; import type { SubscribeState } from 'router5'; import { injectable } from '@cloudbeaver/core-di'; -import { Executor, ExecutorInterrupter, IExecutionContextProvider, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutionContextProvider, type IExecutor } from '@cloudbeaver/core-executor'; -import { RouterService, RouterTransitionData } from '../RouterService'; -import type { IScreen, ScreenRoute } from './IScreen'; +import { RouterService, type RouterTransitionData } from '../RouterService.js'; +import type { IScreen, ScreenRoute } from './IScreen.js'; @injectable() export class ScreenService { diff --git a/webapp/packages/core-routing/src/WindowsService.ts b/webapp/packages/core-routing/src/WindowsService.ts index 5d3ad8f6ce..4b4c46841a 100644 --- a/webapp/packages/core-routing/src/WindowsService.ts +++ b/webapp/packages/core-routing/src/WindowsService.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { IWindowOptions, openCenteredPopup } from '@cloudbeaver/core-utils'; +import { type IWindowOptions, openCenteredPopup } from '@cloudbeaver/core-utils'; interface IWindowInfo { id: string; diff --git a/webapp/packages/core-routing/src/index.ts b/webapp/packages/core-routing/src/index.ts index 007082b3f1..7c44eafefe 100644 --- a/webapp/packages/core-routing/src/index.ts +++ b/webapp/packages/core-routing/src/index.ts @@ -1,5 +1,12 @@ -export * from './manifest'; -export * from './Screen/IScreen'; -export * from './Screen/ScreenService'; -export * from './RouterService'; -export * from './WindowsService'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; +export * from './Screen/IScreen.js'; +export * from './Screen/ScreenService.js'; +export * from './RouterService.js'; +export * from './WindowsService.js'; diff --git a/webapp/packages/core-routing/src/manifest.ts b/webapp/packages/core-routing/src/manifest.ts index 953fff9f6c..20e52da688 100644 --- a/webapp/packages/core-routing/src/manifest.ts +++ b/webapp/packages/core-routing/src/manifest.ts @@ -13,8 +13,8 @@ export const coreRoutingManifest: PluginManifest = { }, providers: [ - () => import('./Screen/ScreenService').then(m => m.ScreenService), - () => import('./RouterService').then(m => m.RouterService), - () => import('./WindowsService').then(m => m.WindowsService), + () => import('./Screen/ScreenService.js').then(m => m.ScreenService), + () => import('./RouterService.js').then(m => m.RouterService), + () => import('./WindowsService.js').then(m => m.WindowsService), ], }; diff --git a/webapp/packages/core-sdk/package.json b/webapp/packages/core-sdk/package.json index 5ede498e7a..c432350b34 100644 --- a/webapp/packages/core-sdk/package.json +++ b/webapp/packages/core-sdk/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-sdk", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-sdk/src/AsyncTask/AsyncTask.ts b/webapp/packages/core-sdk/src/AsyncTask/AsyncTask.ts index ebab1e406e..92da43a00c 100644 --- a/webapp/packages/core-sdk/src/AsyncTask/AsyncTask.ts +++ b/webapp/packages/core-sdk/src/AsyncTask/AsyncTask.ts @@ -10,8 +10,8 @@ import { computed, makeObservable, observable } from 'mobx'; import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { uuid } from '@cloudbeaver/core-utils'; -import type { AsyncTaskInfo } from '../sdk'; -import { ServerInternalError } from '../ServerInternalError'; +import type { AsyncTaskInfo } from '../sdk.js'; +import { ServerInternalError } from '../ServerInternalError.js'; export class AsyncTask { readonly id: string; diff --git a/webapp/packages/core-sdk/src/AsyncTask/AsyncTaskInfoService.ts b/webapp/packages/core-sdk/src/AsyncTask/AsyncTaskInfoService.ts index 6d210df0fe..a8c17e2fd5 100644 --- a/webapp/packages/core-sdk/src/AsyncTask/AsyncTaskInfoService.ts +++ b/webapp/packages/core-sdk/src/AsyncTask/AsyncTaskInfoService.ts @@ -8,9 +8,9 @@ import { injectable } from '@cloudbeaver/core-di'; import { cancellableTimeout } from '@cloudbeaver/core-utils'; -import { GraphQLService } from '../GraphQLService'; -import type { AsyncTaskInfo } from '../sdk'; -import { AsyncTask } from './AsyncTask'; +import { GraphQLService } from '../GraphQLService.js'; +import type { AsyncTaskInfo } from '../sdk.js'; +import { AsyncTask } from './AsyncTask.js'; const DELAY_BETWEEN_TRIES = 250; diff --git a/webapp/packages/core-sdk/src/CustomGraphQLClient.ts b/webapp/packages/core-sdk/src/CustomGraphQLClient.ts index 66d7467026..0778c919b4 100644 --- a/webapp/packages/core-sdk/src/CustomGraphQLClient.ts +++ b/webapp/packages/core-sdk/src/CustomGraphQLClient.ts @@ -5,13 +5,20 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import axios, { AxiosProgressEvent, AxiosResponse, CanceledError, isAxiosError, isCancel } from 'axios'; -import { resolveRequestDocument as analyzeDocument, ClientError, GraphQLClient, RequestDocument, RequestOptions, Variables } from 'graphql-request'; - -import { GQLError } from './GQLError'; -import type { IResponseInterceptor } from './IResponseInterceptor'; -import { PlainGQLError } from './PlainGQLError'; -import { ServerInternalError } from './ServerInternalError'; +import axios, { type AxiosProgressEvent, CanceledError, isAxiosError, isCancel } from 'axios'; +import { + resolveRequestDocument as analyzeDocument, + ClientError, + GraphQLClient, + type RequestDocument, + type RequestOptions, + type Variables, +} from 'graphql-request'; + +import { GQLError } from './GQLError.js'; +import type { IResponseInterceptor } from './IResponseInterceptor.js'; +import { PlainGQLError } from './PlainGQLError.js'; +import { ServerInternalError } from './ServerInternalError.js'; export type UploadProgressEvent = AxiosProgressEvent; @@ -61,9 +68,9 @@ export class CustomGraphQLClient extends GraphQLClient { this.interceptors.push(interceptor); } - request(document: RequestDocument, variables?: V, requestHeaders?: HeadersInit): Promise; - request(options: RequestOptions): Promise; - request( + override request(document: RequestDocument, variables?: V, requestHeaders?: HeadersInit): Promise; + override request(options: RequestOptions): Promise; + override request( document: RequestDocument | RequestOptions, variables?: V, requestHeaders?: HeadersInit, @@ -102,7 +109,7 @@ export class CustomGraphQLClient extends GraphQLClient { this.blockRequestsReasonHandler(); try { const requestOptions = parseRequestArgs(documentOrOptions, variables, requestHeaders); - const { query: expression, operationName } = analyzeDocument(requestOptions.document); + const { query: expression } = analyzeDocument(requestOptions.document); const response = await this.rawRequest(expression, variables, requestHeaders); @@ -178,38 +185,6 @@ export class CustomGraphQLClient extends GraphQLClient { throw error; } } - - private parseGQLResponse(response: AxiosResponse, query: string, variables?: Variables): T { - const result = response.data; - - const successfullyReceivedData = Array.isArray(result) ? !result.some(({ data }) => !data) : Boolean(result.data); - - const successfullyPassedErrorPolicy = Array.isArray(result) || !result.errors || (Array.isArray(result.errors) && !result.errors.length); - - if (response.status === 200 && successfullyPassedErrorPolicy && successfullyReceivedData) { - const data = result; - const dataEnvelope = data; - - // @ts-expect-error TODO - return { - ...dataEnvelope, - headers: response.headers, - status: response.status, - }; - } else { - const errorResult = - typeof result === 'string' - ? { - error: result, - } - : result; - throw new ClientError( - // @ts-expect-error TODO - { ...errorResult, status: response.status, headers: response.headers }, - { query, variables }, - ); - } - } } function isClientError(obj: any): obj is ClientError { diff --git a/webapp/packages/core-sdk/src/Extensions/uploadBlobResultSetExtension.ts b/webapp/packages/core-sdk/src/Extensions/uploadBlobResultSetExtension.ts index b7e01f9bf4..baba046b02 100644 --- a/webapp/packages/core-sdk/src/Extensions/uploadBlobResultSetExtension.ts +++ b/webapp/packages/core-sdk/src/Extensions/uploadBlobResultSetExtension.ts @@ -7,7 +7,7 @@ */ import { GlobalConstants } from '@cloudbeaver/core-utils'; -import type { CustomGraphQLClient, UploadProgressEvent } from '../CustomGraphQLClient'; +import type { CustomGraphQLClient, UploadProgressEvent } from '../CustomGraphQLClient.js'; export interface IUploadBlobResultSetExtension { uploadBlobResultSet: (fileId: string, data: Blob, onUploadProgress?: (event: UploadProgressEvent) => void) => Promise; diff --git a/webapp/packages/core-sdk/src/Extensions/uploadDriverLibraryExtension.ts b/webapp/packages/core-sdk/src/Extensions/uploadDriverLibraryExtension.ts index 02b48f08fb..cf2091aa5f 100644 --- a/webapp/packages/core-sdk/src/Extensions/uploadDriverLibraryExtension.ts +++ b/webapp/packages/core-sdk/src/Extensions/uploadDriverLibraryExtension.ts @@ -7,7 +7,7 @@ */ import { GlobalConstants } from '@cloudbeaver/core-utils'; -import type { CustomGraphQLClient, UploadProgressEvent } from '../CustomGraphQLClient'; +import type { CustomGraphQLClient, UploadProgressEvent } from '../CustomGraphQLClient.js'; export interface IUploadDriverLibraryExtension { uploadDriverLibrary: (driverId: string, files: File[], onUploadProgress?: (event: UploadProgressEvent) => void) => Promise; diff --git a/webapp/packages/core-sdk/src/Extensions/uploadResultDataExtension.ts b/webapp/packages/core-sdk/src/Extensions/uploadResultDataExtension.ts index 2655163cc4..65c5b9ca8b 100644 --- a/webapp/packages/core-sdk/src/Extensions/uploadResultDataExtension.ts +++ b/webapp/packages/core-sdk/src/Extensions/uploadResultDataExtension.ts @@ -7,8 +7,8 @@ */ import { GlobalConstants } from '@cloudbeaver/core-utils'; -import type { CustomGraphQLClient, UploadProgressEvent } from '../CustomGraphQLClient'; -import type { AsyncTaskInfo } from '../sdk'; +import type { CustomGraphQLClient, UploadProgressEvent } from '../CustomGraphQLClient.js'; +import type { AsyncTaskInfo } from '../sdk.js'; export interface IUploadResultDataExtension { uploadResultData: ( diff --git a/webapp/packages/core-sdk/src/GQLError.ts b/webapp/packages/core-sdk/src/GQLError.ts index 7b609844ac..f28c24a03e 100644 --- a/webapp/packages/core-sdk/src/GQLError.ts +++ b/webapp/packages/core-sdk/src/GQLError.ts @@ -9,7 +9,7 @@ /// import { ClientError } from 'graphql-request'; -import { DetailsError } from './DetailsError'; +import { DetailsError } from './DetailsError.js'; export class GQLError extends DetailsError { response: ClientError['response']; @@ -20,8 +20,8 @@ export class GQLError extends DetailsError { constructor(clientError: ClientError) { let message = clientError.message; - if (typeof clientError.response.error === 'string') { - message = clientError.response.error; + if (typeof clientError.response['error'] === 'string') { + message = clientError.response['error']; } else if (clientError.response.errors && clientError.response.errors.length > 0) { message = clientError.response.errors.map(e => e.message).join('\n'); } else { @@ -33,7 +33,7 @@ export class GQLError extends DetailsError { this.response = clientError.response; this.request = clientError.request; - if (typeof clientError.response.error === 'string') { + if (typeof clientError.response['error'] === 'string') { this.isTextBody = true; } else { const firstError = clientError.response.errors?.[0]; @@ -41,7 +41,7 @@ export class GQLError extends DetailsError { } } - hasDetails(): boolean { + override hasDetails(): boolean { return this.response.errors?.some(error => !!error.extensions) || false; } } diff --git a/webapp/packages/core-sdk/src/GQLErrorCatcher.ts b/webapp/packages/core-sdk/src/GQLErrorCatcher.ts index 2bcabd3654..82a49aa7de 100644 --- a/webapp/packages/core-sdk/src/GQLErrorCatcher.ts +++ b/webapp/packages/core-sdk/src/GQLErrorCatcher.ts @@ -9,7 +9,7 @@ import { action, makeObservable, observable } from 'mobx'; import { errorOf } from '@cloudbeaver/core-utils'; -import { DetailsError } from './DetailsError'; +import { DetailsError } from './DetailsError.js'; export class GQLErrorCatcher { hasDetails = false; diff --git a/webapp/packages/core-sdk/src/GraphQLService.ts b/webapp/packages/core-sdk/src/GraphQLService.ts index 5a035f21b1..0e13a91b38 100644 --- a/webapp/packages/core-sdk/src/GraphQLService.ts +++ b/webapp/packages/core-sdk/src/GraphQLService.ts @@ -7,15 +7,20 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import { CustomGraphQLClient } from './CustomGraphQLClient'; -import { EnvironmentService } from './EnvironmentService'; -import { uploadBlobResultSetExtension } from './Extensions/uploadBlobResultSetExtension'; -import { uploadDriverLibraryExtension } from './Extensions/uploadDriverLibraryExtension'; -import { uploadResultDataExtension } from './Extensions/uploadResultDataExtension'; -import type { IResponseInterceptor } from './IResponseInterceptor'; -import { getSdk } from './sdk'; - -function extendedSDK(client: CustomGraphQLClient) { +import { CustomGraphQLClient } from './CustomGraphQLClient.js'; +import { EnvironmentService } from './EnvironmentService.js'; +import { uploadBlobResultSetExtension } from './Extensions/uploadBlobResultSetExtension.js'; +import { uploadDriverLibraryExtension } from './Extensions/uploadDriverLibraryExtension.js'; +import { uploadResultDataExtension } from './Extensions/uploadResultDataExtension.js'; +import type { IResponseInterceptor } from './IResponseInterceptor.js'; +import { getSdk, type Sdk } from './sdk.js'; + +function extendedSDK( + client: CustomGraphQLClient, +): Sdk & + ReturnType & + ReturnType & + ReturnType { const sdk = getSdk(client); return { diff --git a/webapp/packages/core-sdk/src/PlainGQLError.ts b/webapp/packages/core-sdk/src/PlainGQLError.ts index d9cadc2b29..c7b5d59cdd 100644 --- a/webapp/packages/core-sdk/src/PlainGQLError.ts +++ b/webapp/packages/core-sdk/src/PlainGQLError.ts @@ -9,7 +9,7 @@ import type { ClientError } from 'graphql-request'; import { getTextBetween } from '@cloudbeaver/core-utils'; -import { DetailsError } from './DetailsError'; +import { DetailsError } from './DetailsError.js'; export class PlainGQLError extends DetailsError { response: ClientError['response']; @@ -17,8 +17,8 @@ export class PlainGQLError extends DetailsError { constructor(clientError: ClientError) { let message = clientError.message; - if (typeof clientError.response.error === 'string') { - message = getTextBetween(clientError.response.error, '', ''); + if (typeof clientError.response['error'] === 'string') { + message = getTextBetween(clientError.response['error'], '', ''); } super(message, { cause: clientError }); @@ -27,7 +27,7 @@ export class PlainGQLError extends DetailsError { this.request = clientError.request; } - hasDetails(): boolean { + override hasDetails(): boolean { return false; } } diff --git a/webapp/packages/core-sdk/src/SDKGraphQLErrorExtensions.ts b/webapp/packages/core-sdk/src/SDKGraphQLErrorExtensions.ts index 7bcd931b2d..a2f65a2fd5 100644 --- a/webapp/packages/core-sdk/src/SDKGraphQLErrorExtensions.ts +++ b/webapp/packages/core-sdk/src/SDKGraphQLErrorExtensions.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { GraphQLErrorExtensions } from 'graphql'; +import type { GraphQLErrorExtensions } from 'graphql'; export interface SDKGraphQLErrorExtensions extends GraphQLErrorExtensions { stackTrace?: string; diff --git a/webapp/packages/core-sdk/src/ServerInternalError.ts b/webapp/packages/core-sdk/src/ServerInternalError.ts index 82876bab27..193bc3d771 100644 --- a/webapp/packages/core-sdk/src/ServerInternalError.ts +++ b/webapp/packages/core-sdk/src/ServerInternalError.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { DetailsError } from './DetailsError'; -import type { ServerError } from './sdk'; +import { DetailsError } from './DetailsError.js'; +import type { ServerError } from './sdk.js'; export enum ServerErrorType { 'QUOTE_EXCEEDED' = 'quotaExceeded', @@ -26,7 +26,7 @@ export class ServerInternalError extends DetailsError implements ServerError { this.causedBy = error.causedBy; } - hasDetails(): boolean { + override hasDetails(): boolean { return this.stack !== undefined && this.stack.length > 0 && this.errorType !== ServerErrorType.QUOTE_EXCEEDED; } } diff --git a/webapp/packages/core-sdk/src/getGQLResponse.ts b/webapp/packages/core-sdk/src/getGQLResponse.ts index 4b76a1dd33..6d677056a2 100644 --- a/webapp/packages/core-sdk/src/getGQLResponse.ts +++ b/webapp/packages/core-sdk/src/getGQLResponse.ts @@ -7,7 +7,7 @@ */ import { errorOf } from '@cloudbeaver/core-utils'; -import { GQLError } from './GQLError'; +import { GQLError } from './GQLError.js'; interface IGraphQLResponse { data: T | null; diff --git a/webapp/packages/core-sdk/src/getObjectPropertyType.ts b/webapp/packages/core-sdk/src/getObjectPropertyType.ts index 6cc3a52e92..562b6f2f6d 100644 --- a/webapp/packages/core-sdk/src/getObjectPropertyType.ts +++ b/webapp/packages/core-sdk/src/getObjectPropertyType.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ObjectPropertyInfo } from './sdk'; +import type { ObjectPropertyInfo } from './sdk.js'; export type ObjectPropertyType = 'checkbox' | 'selector' | 'link' | 'textarea' | 'file' | 'input'; diff --git a/webapp/packages/core-sdk/src/getObjectPropertyValueType.ts b/webapp/packages/core-sdk/src/getObjectPropertyValueType.ts index f1dfc24ecd..2de6a3cd70 100644 --- a/webapp/packages/core-sdk/src/getObjectPropertyValueType.ts +++ b/webapp/packages/core-sdk/src/getObjectPropertyValueType.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ObjectPropertyInfo } from './sdk'; +import type { ObjectPropertyInfo } from './sdk.js'; export type ObjectPropertyValueType = 'password' | 'text' | 'number'; diff --git a/webapp/packages/core-sdk/src/index.ts b/webapp/packages/core-sdk/src/index.ts index 11c4b804ea..5178763c9d 100644 --- a/webapp/packages/core-sdk/src/index.ts +++ b/webapp/packages/core-sdk/src/index.ts @@ -5,23 +5,23 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './AsyncTask/AsyncTask'; -export * from './AsyncTask/AsyncTaskInfoService'; -export * from './Extensions/uploadBlobResultSetExtension'; -export * from './CustomGraphQLClient'; -export * from './DetailsError'; -export * from './EnvironmentService'; -export * from './EServerErrorCode'; -export * from './getGQLResponse'; -export * from './getObjectPropertyType'; -export * from './getObjectPropertyValueType'; -export * from './GQLError'; -export * from './GQLErrorCatcher'; -export * from './GraphQLService'; -export * from './isObjectPropertyInfoStateEqual'; -export * from './sdk'; -export * from './SDKGraphQLErrorExtensions'; -export * from './ServerInternalError'; -export * from './ServiceError'; -export * from './SessionError'; -export * from './manifest'; +export * from './AsyncTask/AsyncTask.js'; +export * from './AsyncTask/AsyncTaskInfoService.js'; +export * from './Extensions/uploadBlobResultSetExtension.js'; +export * from './CustomGraphQLClient.js'; +export * from './DetailsError.js'; +export * from './EnvironmentService.js'; +export * from './EServerErrorCode.js'; +export * from './getGQLResponse.js'; +export * from './getObjectPropertyType.js'; +export * from './getObjectPropertyValueType.js'; +export * from './GQLError.js'; +export * from './GQLErrorCatcher.js'; +export * from './GraphQLService.js'; +export * from './isObjectPropertyInfoStateEqual.js'; +export * from './sdk.js'; +export * from './SDKGraphQLErrorExtensions.js'; +export * from './ServerInternalError.js'; +export * from './ServiceError.js'; +export * from './SessionError.js'; +export * from './manifest.js'; diff --git a/webapp/packages/core-sdk/src/isObjectPropertyInfoStateEqual.ts b/webapp/packages/core-sdk/src/isObjectPropertyInfoStateEqual.ts index ced4680282..e8761d5936 100644 --- a/webapp/packages/core-sdk/src/isObjectPropertyInfoStateEqual.ts +++ b/webapp/packages/core-sdk/src/isObjectPropertyInfoStateEqual.ts @@ -7,7 +7,7 @@ */ import { isValuesEqual } from '@cloudbeaver/core-utils'; -import type { ObjectPropertyInfo } from './sdk'; +import type { ObjectPropertyInfo } from './sdk.js'; type RequiredObjectPropertyInfoFields = Pick; diff --git a/webapp/packages/core-sdk/src/manifest.ts b/webapp/packages/core-sdk/src/manifest.ts index a0383668dc..2c4e1da5c4 100644 --- a/webapp/packages/core-sdk/src/manifest.ts +++ b/webapp/packages/core-sdk/src/manifest.ts @@ -13,8 +13,8 @@ export const coreSDKManifest: PluginManifest = { }, providers: [ - () => import('./AsyncTask/AsyncTaskInfoService').then(m => m.AsyncTaskInfoService), - () => import('./EnvironmentService').then(m => m.EnvironmentService), - () => import('./GraphQLService').then(m => m.GraphQLService), + () => import('./AsyncTask/AsyncTaskInfoService.js').then(m => m.AsyncTaskInfoService), + () => import('./EnvironmentService.js').then(m => m.EnvironmentService), + () => import('./GraphQLService.js').then(m => m.GraphQLService), ], }; diff --git a/webapp/packages/core-server-localization/package.json b/webapp/packages/core-server-localization/package.json index 6774665eef..95e75f9656 100644 --- a/webapp/packages/core-server-localization/package.json +++ b/webapp/packages/core-server-localization/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-server-localization", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-server-localization/src/index.ts b/webapp/packages/core-server-localization/src/index.ts index ab5e0e1f96..73ac170d73 100644 --- a/webapp/packages/core-server-localization/src/index.ts +++ b/webapp/packages/core-server-localization/src/index.ts @@ -1 +1,8 @@ -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; diff --git a/webapp/packages/core-server-localization/src/manifest.ts b/webapp/packages/core-server-localization/src/manifest.ts index 63ca0c4308..4552e9ea15 100644 --- a/webapp/packages/core-server-localization/src/manifest.ts +++ b/webapp/packages/core-server-localization/src/manifest.ts @@ -12,5 +12,5 @@ export const coreServerLocalization: PluginManifest = { name: 'Core Server Localization', }, - providers: [() => import('./ServerLocalizationService').then(m => m.ServerLocalizationService)], + providers: [() => import('./ServerLocalizationService.js').then(m => m.ServerLocalizationService)], }; diff --git a/webapp/packages/core-session-localization/package.json b/webapp/packages/core-session-localization/package.json index 26dc6af997..71a824731f 100644 --- a/webapp/packages/core-session-localization/package.json +++ b/webapp/packages/core-session-localization/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-session-localization", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-session-localization/src/index.ts b/webapp/packages/core-session-localization/src/index.ts index ab5e0e1f96..73ac170d73 100644 --- a/webapp/packages/core-session-localization/src/index.ts +++ b/webapp/packages/core-session-localization/src/index.ts @@ -1 +1,8 @@ -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; diff --git a/webapp/packages/core-session-localization/src/manifest.ts b/webapp/packages/core-session-localization/src/manifest.ts index 59a07180bf..f56818a10c 100644 --- a/webapp/packages/core-session-localization/src/manifest.ts +++ b/webapp/packages/core-session-localization/src/manifest.ts @@ -12,5 +12,5 @@ export const coreSessionLocalization: PluginManifest = { name: 'Core Session Localization', }, - providers: [() => import('./SessionLocalizationService').then(m => m.SessionLocalizationService)], + providers: [() => import('./SessionLocalizationService.js').then(m => m.SessionLocalizationService)], }; diff --git a/webapp/packages/core-settings-localization/package.json b/webapp/packages/core-settings-localization/package.json index 22a2025f83..19ff3146f0 100644 --- a/webapp/packages/core-settings-localization/package.json +++ b/webapp/packages/core-settings-localization/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-settings-localization", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-settings-localization/src/LocaleService.ts b/webapp/packages/core-settings-localization/src/LocaleService.ts index 483bb120d5..e74d5b618b 100644 --- a/webapp/packages/core-settings-localization/src/LocaleService.ts +++ b/webapp/packages/core-settings-localization/src/LocaleService.ts @@ -14,26 +14,24 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; case 'de': - return (await import('./locales/de')).default; + return (await import('./locales/de.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-settings-localization/src/LocalizationSettingsManagerService.ts b/webapp/packages/core-settings-localization/src/LocalizationSettingsManagerService.ts index 76fbf66cae..dd1709f3b8 100644 --- a/webapp/packages/core-settings-localization/src/LocalizationSettingsManagerService.ts +++ b/webapp/packages/core-settings-localization/src/LocalizationSettingsManagerService.ts @@ -9,7 +9,7 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { LocalizationService } from '@cloudbeaver/core-localization'; import { ESettingsValueType, INTERFACE_SETTINGS_GROUP, SettingsManagerService } from '@cloudbeaver/core-settings'; -import { SettingsLocalizationService } from './SettingsLocalizationService'; +import { SettingsLocalizationService } from './SettingsLocalizationService.js'; @injectable() export class LocalizationSettingsManagerService extends Bootstrap { @@ -21,7 +21,7 @@ export class LocalizationSettingsManagerService extends Bootstrap { super(); } - register(): void { + override register(): void { this.registerSettings(); } diff --git a/webapp/packages/core-settings-localization/src/SettingsLocalizationBootstrap.ts b/webapp/packages/core-settings-localization/src/SettingsLocalizationBootstrap.ts index 12b06d6eae..a768777008 100644 --- a/webapp/packages/core-settings-localization/src/SettingsLocalizationBootstrap.ts +++ b/webapp/packages/core-settings-localization/src/SettingsLocalizationBootstrap.ts @@ -10,7 +10,7 @@ import { type IReactionDisposer, reaction } from 'mobx'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { LocalizationService } from '@cloudbeaver/core-localization'; -import { SettingsLocalizationService } from './SettingsLocalizationService'; +import { SettingsLocalizationService } from './SettingsLocalizationService.js'; @injectable() export class SettingsLocalizationBootstrap extends Bootstrap { @@ -24,7 +24,7 @@ export class SettingsLocalizationBootstrap extends Bootstrap { this.changeLanguage = this.changeLanguage.bind(this); } - register(): void { + override register(): void { this.localizationService.onChange.addHandler(this.changeLanguage); this.reactionDisposer = reaction( () => this.settingsLocalizationService.language, @@ -37,7 +37,7 @@ export class SettingsLocalizationBootstrap extends Bootstrap { ); } - dispose(): void { + override dispose(): void { this.localizationService.onChange.removeHandler(this.changeLanguage); if (this.reactionDisposer) { this.reactionDisposer(); diff --git a/webapp/packages/core-settings-localization/src/SettingsLocalizationService.test.ts b/webapp/packages/core-settings-localization/src/SettingsLocalizationService.test.ts index 6ff92548d8..f75b9b3de0 100644 --- a/webapp/packages/core-settings-localization/src/SettingsLocalizationService.test.ts +++ b/webapp/packages/core-settings-localization/src/SettingsLocalizationService.test.ts @@ -10,21 +10,21 @@ import { expect, test } from '@jest/globals'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { createApp } from '@cloudbeaver/tests-runner'; -import { coreSettingsLocalizationManifest } from './manifest'; -import { SettingsLocalizationService } from './SettingsLocalizationService'; +import { coreSettingsLocalizationManifest } from './manifest.js'; +import { SettingsLocalizationService } from './SettingsLocalizationService.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint)); diff --git a/webapp/packages/core-settings-localization/src/index.ts b/webapp/packages/core-settings-localization/src/index.ts index 5107690c0f..aab7c82d3e 100644 --- a/webapp/packages/core-settings-localization/src/index.ts +++ b/webapp/packages/core-settings-localization/src/index.ts @@ -5,5 +5,5 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './manifest'; -export * from './SettingsLocalizationService'; +export * from './manifest.js'; +export * from './SettingsLocalizationService.js'; diff --git a/webapp/packages/core-settings-localization/src/manifest.ts b/webapp/packages/core-settings-localization/src/manifest.ts index 11c67f8017..669903d7cc 100644 --- a/webapp/packages/core-settings-localization/src/manifest.ts +++ b/webapp/packages/core-settings-localization/src/manifest.ts @@ -13,9 +13,9 @@ export const coreSettingsLocalizationManifest: PluginManifest = { }, providers: [ - () => import('./SettingsLocalizationService').then(m => m.SettingsLocalizationService), - () => import('./LocalizationSettingsManagerService').then(m => m.LocalizationSettingsManagerService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./SettingsLocalizationBootstrap').then(m => m.SettingsLocalizationBootstrap), + () => import('./SettingsLocalizationService.js').then(m => m.SettingsLocalizationService), + () => import('./LocalizationSettingsManagerService.js').then(m => m.LocalizationSettingsManagerService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./SettingsLocalizationBootstrap.js').then(m => m.SettingsLocalizationBootstrap), ], }; diff --git a/webapp/packages/core-settings-user/package.json b/webapp/packages/core-settings-user/package.json index b5f0ae8cd1..1af97c87eb 100644 --- a/webapp/packages/core-settings-user/package.json +++ b/webapp/packages/core-settings-user/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-settings-user", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-settings-user/src/LocaleService.ts b/webapp/packages/core-settings-user/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/core-settings-user/src/LocaleService.ts +++ b/webapp/packages/core-settings-user/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-settings-user/src/SettingsUserBootstrap.ts b/webapp/packages/core-settings-user/src/SettingsUserBootstrap.ts index 7529b2c094..cdd1b51608 100644 --- a/webapp/packages/core-settings-user/src/SettingsUserBootstrap.ts +++ b/webapp/packages/core-settings-user/src/SettingsUserBootstrap.ts @@ -9,7 +9,7 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { SESSION_SETTINGS_LAYER } from '@cloudbeaver/core-root'; import { SettingsResolverService } from '@cloudbeaver/core-settings'; -import { UserSettingsService } from './UserSettingsService'; +import { UserSettingsService } from './UserSettingsService.js'; @injectable() export class SettingsUserBootstrap extends Bootstrap { @@ -20,7 +20,7 @@ export class SettingsUserBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.settingsResolverService.addResolver(SESSION_SETTINGS_LAYER, this.userSettingsService); } } diff --git a/webapp/packages/core-settings-user/src/UserSettingsService.ts b/webapp/packages/core-settings-user/src/UserSettingsService.ts index 934172b6e9..2df2a47e99 100644 --- a/webapp/packages/core-settings-user/src/UserSettingsService.ts +++ b/webapp/packages/core-settings-user/src/UserSettingsService.ts @@ -45,7 +45,7 @@ export class UserSettingsService extends SettingsSource { ); } - has(key: any): boolean { + override has(key: any): boolean { return this.getSource().has(key) || super.has(key); } @@ -57,7 +57,7 @@ export class UserSettingsService extends SettingsSource { return this.getSource().get(key); } - clear(): void { + override clear(): void { this.update(() => { super.clear(); this.settings.clear(); diff --git a/webapp/packages/core-settings-user/src/index.ts b/webapp/packages/core-settings-user/src/index.ts index d533cf9488..549bdcaaaa 100644 --- a/webapp/packages/core-settings-user/src/index.ts +++ b/webapp/packages/core-settings-user/src/index.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './manifest'; +export * from './manifest.js'; -export * from './UserSettingsService'; +export * from './UserSettingsService.js'; diff --git a/webapp/packages/core-settings-user/src/manifest.ts b/webapp/packages/core-settings-user/src/manifest.ts index 73fad21311..3b8a462593 100644 --- a/webapp/packages/core-settings-user/src/manifest.ts +++ b/webapp/packages/core-settings-user/src/manifest.ts @@ -13,8 +13,8 @@ export const coreSettingsUserManifest: PluginManifest = { }, providers: [ - () => import('./UserSettingsService').then(m => m.UserSettingsService), - () => import('./SettingsUserBootstrap').then(m => m.SettingsUserBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./UserSettingsService.js').then(m => m.UserSettingsService), + () => import('./SettingsUserBootstrap.js').then(m => m.SettingsUserBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/core-settings/package.json b/webapp/packages/core-settings/package.json index 7073a8bace..86d37bf3a0 100644 --- a/webapp/packages/core-settings/package.json +++ b/webapp/packages/core-settings/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-settings", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -32,4 +33,4 @@ "@testing-library/jest-dom": "^6", "typescript": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/core-settings/src/ISettingsResolverSource.ts b/webapp/packages/core-settings/src/ISettingsResolverSource.ts index eb21ef7a21..7897db67fb 100644 --- a/webapp/packages/core-settings/src/ISettingsResolverSource.ts +++ b/webapp/packages/core-settings/src/ISettingsResolverSource.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ISettingsSource } from './ISettingsSource'; -import type { ISettingsLayer } from './SettingsLayer'; +import type { ISettingsSource } from './ISettingsSource.js'; +import type { ISettingsLayer } from './SettingsLayer.js'; export interface ISettingsResolverSource extends ISettingsSource { hasResolver: (layer: ISettingsLayer, resolver: ISettingsSource) => boolean; diff --git a/webapp/packages/core-settings/src/LocaleService.ts b/webapp/packages/core-settings/src/LocaleService.ts index 3f07bae28c..a55cfec20e 100644 --- a/webapp/packages/core-settings/src/LocaleService.ts +++ b/webapp/packages/core-settings/src/LocaleService.ts @@ -14,22 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-settings/src/SettingsManager/ISettingDescription.ts b/webapp/packages/core-settings/src/SettingsManager/ISettingDescription.ts index 6bf0e1d42b..e3c6f16189 100644 --- a/webapp/packages/core-settings/src/SettingsManager/ISettingDescription.ts +++ b/webapp/packages/core-settings/src/SettingsManager/ISettingDescription.ts @@ -7,8 +7,8 @@ */ import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import type { ESettingsValueType } from './ESettingsValueType'; -import type { SettingsGroup } from './SettingsGroup'; +import type { ESettingsValueType } from './ESettingsValueType.js'; +import type { SettingsGroup } from './SettingsGroup.js'; export interface ISettingAccess { scope: string[]; diff --git a/webapp/packages/core-settings/src/SettingsManager/SettingsGroups/INTERFACE_SETTINGS_GROUP.ts b/webapp/packages/core-settings/src/SettingsManager/SettingsGroups/INTERFACE_SETTINGS_GROUP.ts index 697cba8c43..7d5764d876 100644 --- a/webapp/packages/core-settings/src/SettingsManager/SettingsGroups/INTERFACE_SETTINGS_GROUP.ts +++ b/webapp/packages/core-settings/src/SettingsManager/SettingsGroups/INTERFACE_SETTINGS_GROUP.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ROOT_SETTINGS_GROUP } from './ROOT_SETTINGS_GROUP'; +import { ROOT_SETTINGS_GROUP } from './ROOT_SETTINGS_GROUP.js'; export const INTERFACE_SETTINGS_GROUP = ROOT_SETTINGS_GROUP.createSubGroup('core_plugin_interface_settings_group'); diff --git a/webapp/packages/core-settings/src/SettingsManager/SettingsGroups/ROOT_SETTINGS_GROUP.ts b/webapp/packages/core-settings/src/SettingsManager/SettingsGroups/ROOT_SETTINGS_GROUP.ts index 2595271fee..611709151a 100644 --- a/webapp/packages/core-settings/src/SettingsManager/SettingsGroups/ROOT_SETTINGS_GROUP.ts +++ b/webapp/packages/core-settings/src/SettingsManager/SettingsGroups/ROOT_SETTINGS_GROUP.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { SettingsGroup } from '../SettingsGroup'; +import { SettingsGroup } from '../SettingsGroup.js'; export const ROOT_SETTINGS_GROUP = new SettingsGroup('core_plugin_root_settings_group'); diff --git a/webapp/packages/core-settings/src/SettingsManager/SettingsManagerService.ts b/webapp/packages/core-settings/src/SettingsManager/SettingsManagerService.ts index 9912eaae84..99893be01d 100644 --- a/webapp/packages/core-settings/src/SettingsManager/SettingsManagerService.ts +++ b/webapp/packages/core-settings/src/SettingsManager/SettingsManagerService.ts @@ -10,8 +10,8 @@ import { computed, makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import type { ILoadableState, schema } from '@cloudbeaver/core-utils'; -import type { SettingsProvider } from '../SettingsProvider'; -import type { ISettingDescription, SettingsDescriptionGetter } from './ISettingDescription'; +import type { SettingsProvider } from '../SettingsProvider.js'; +import type { ISettingDescription, SettingsDescriptionGetter } from './ISettingDescription.js'; interface SettingsProviderItem { settingsGetter: SettingsDescriptionGetter>; diff --git a/webapp/packages/core-settings/src/SettingsProvider.ts b/webapp/packages/core-settings/src/SettingsProvider.ts index f33028460e..02b439eecf 100644 --- a/webapp/packages/core-settings/src/SettingsProvider.ts +++ b/webapp/packages/core-settings/src/SettingsProvider.ts @@ -5,10 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import type { schema } from '@cloudbeaver/core-utils'; -import type { ISettingChangeData, ISettingsSource } from './ISettingsSource'; +import type { ISettingChangeData, ISettingsSource } from './ISettingsSource.js'; export class SettingsProvider implements ISettingsSource { readonly onChange: ISyncExecutor>>; @@ -52,7 +52,7 @@ export class SettingsProvider implem } if (key in this.schema.shape) { - const schema = this.schema.shape[key as any]; + const schema = this.schema.shape[key as any]!; const result = schema.safeParse(value); if (result.success) { diff --git a/webapp/packages/core-settings/src/SettingsProviderService.ts b/webapp/packages/core-settings/src/SettingsProviderService.ts index 0d21eadf53..f49a45e1b0 100644 --- a/webapp/packages/core-settings/src/SettingsProviderService.ts +++ b/webapp/packages/core-settings/src/SettingsProviderService.ts @@ -10,8 +10,8 @@ import { makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import { schema } from '@cloudbeaver/core-utils'; -import { SettingsProvider } from './SettingsProvider'; -import { SettingsResolverService } from './SettingsResolverService'; +import { SettingsProvider } from './SettingsProvider.js'; +import { SettingsResolverService } from './SettingsResolverService.js'; @injectable() export class SettingsProviderService { diff --git a/webapp/packages/core-settings/src/SettingsResolverService.ts b/webapp/packages/core-settings/src/SettingsResolverService.ts index 75d12b2f53..9037a22823 100644 --- a/webapp/packages/core-settings/src/SettingsResolverService.ts +++ b/webapp/packages/core-settings/src/SettingsResolverService.ts @@ -7,7 +7,7 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import { SettingsResolverSource } from './SettingsResolverSource'; +import { SettingsResolverSource } from './SettingsResolverSource.js'; @injectable() export class SettingsResolverService extends SettingsResolverSource { diff --git a/webapp/packages/core-settings/src/SettingsResolverSource.ts b/webapp/packages/core-settings/src/SettingsResolverSource.ts index 85062a23a2..21b242d4cf 100644 --- a/webapp/packages/core-settings/src/SettingsResolverSource.ts +++ b/webapp/packages/core-settings/src/SettingsResolverSource.ts @@ -10,9 +10,9 @@ import { computed, makeObservable, observable } from 'mobx'; import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { isNotNullDefined } from '@cloudbeaver/core-utils'; -import type { ISettingsResolverSource } from './ISettingsResolverSource'; -import type { ISettingChangeData, ISettingsSource } from './ISettingsSource'; -import type { ISettingsLayer } from './SettingsLayer'; +import type { ISettingsResolverSource } from './ISettingsResolverSource.js'; +import type { ISettingChangeData, ISettingsSource } from './ISettingsSource.js'; +import type { ISettingsLayer } from './SettingsLayer.js'; interface ISettingsSourcesLayer { layer: ISettingsLayer; diff --git a/webapp/packages/core-settings/src/SettingsSource.ts b/webapp/packages/core-settings/src/SettingsSource.ts index 6c4f30cef8..8a7f142b25 100644 --- a/webapp/packages/core-settings/src/SettingsSource.ts +++ b/webapp/packages/core-settings/src/SettingsSource.ts @@ -7,10 +7,10 @@ */ import { action, makeObservable, observable } from 'mobx'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { isNotNullDefined } from '@cloudbeaver/core-utils'; -import type { ISettingChangeData, ISettingsSource } from './ISettingsSource'; +import type { ISettingChangeData, ISettingsSource } from './ISettingsSource.js'; export abstract class SettingsSource implements ISettingsSource { readonly onChange: ISyncExecutor; diff --git a/webapp/packages/core-settings/src/createSettingsAliasResolver.test.ts b/webapp/packages/core-settings/src/createSettingsAliasResolver.test.ts index c5cc4d109a..4f4cf8c620 100644 --- a/webapp/packages/core-settings/src/createSettingsAliasResolver.test.ts +++ b/webapp/packages/core-settings/src/createSettingsAliasResolver.test.ts @@ -9,9 +9,9 @@ import { expect, test } from '@jest/globals'; import { SyncExecutor } from '@cloudbeaver/core-executor'; -import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage } from './__custom_mocks__/expectDeprecatedSettingMessage'; -import { createSettingsAliasResolver } from './createSettingsAliasResolver'; -import type { ISettingsSource } from './ISettingsSource'; +import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage } from './__custom_mocks__/expectDeprecatedSettingMessage.js'; +import { createSettingsAliasResolver } from './createSettingsAliasResolver.js'; +import type { ISettingsSource } from './ISettingsSource.js'; const deprecatedSettings = { deprecated: 'deprecatedValue', diff --git a/webapp/packages/core-settings/src/createSettingsAliasResolver.ts b/webapp/packages/core-settings/src/createSettingsAliasResolver.ts index a032f6703f..812e935ff7 100644 --- a/webapp/packages/core-settings/src/createSettingsAliasResolver.ts +++ b/webapp/packages/core-settings/src/createSettingsAliasResolver.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { invertObject, type schema } from '@cloudbeaver/core-utils'; -import type { ISettingChangeData, ISettingsSource } from './ISettingsSource'; -import type { SettingsProvider } from './SettingsProvider'; +import type { ISettingChangeData, ISettingsSource } from './ISettingsSource.js'; +import type { SettingsProvider } from './SettingsProvider.js'; const DEPRECATED_SETTINGS = new Set(); diff --git a/webapp/packages/core-settings/src/index.ts b/webapp/packages/core-settings/src/index.ts index 48ee571fdd..c7ec92d94d 100644 --- a/webapp/packages/core-settings/src/index.ts +++ b/webapp/packages/core-settings/src/index.ts @@ -5,20 +5,20 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './manifest'; -export * from './createSettingsAliasResolver'; -export * from './SettingsScopeType'; -export * from './SettingsResolverSource'; -export * from './ISettingsResolverSource'; -export * from './ISettingsSource'; -export * from './SettingsLayer'; -export * from './SettingsResolverService'; -export * from './SettingsProvider'; -export * from './SettingsProviderService'; -export * from './SettingsSource'; -export * from './SettingsManager/ESettingsValueType'; -export * from './SettingsManager/ISettingDescription'; -export * from './SettingsManager/SettingsGroup'; -export * from './SettingsManager/SettingsManagerService'; -export * from './SettingsManager/SettingsGroups/INTERFACE_SETTINGS_GROUP'; -export * from './SettingsManager/SettingsGroups/ROOT_SETTINGS_GROUP'; +export * from './manifest.js'; +export * from './createSettingsAliasResolver.js'; +export * from './SettingsScopeType.js'; +export * from './SettingsResolverSource.js'; +export * from './ISettingsResolverSource.js'; +export * from './ISettingsSource.js'; +export * from './SettingsLayer.js'; +export * from './SettingsResolverService.js'; +export * from './SettingsProvider.js'; +export * from './SettingsProviderService.js'; +export * from './SettingsSource.js'; +export * from './SettingsManager/ESettingsValueType.js'; +export * from './SettingsManager/ISettingDescription.js'; +export * from './SettingsManager/SettingsGroup.js'; +export * from './SettingsManager/SettingsManagerService.js'; +export * from './SettingsManager/SettingsGroups/INTERFACE_SETTINGS_GROUP.js'; +export * from './SettingsManager/SettingsGroups/ROOT_SETTINGS_GROUP.js'; diff --git a/webapp/packages/core-settings/src/manifest.ts b/webapp/packages/core-settings/src/manifest.ts index a3260287c9..c99ec45428 100644 --- a/webapp/packages/core-settings/src/manifest.ts +++ b/webapp/packages/core-settings/src/manifest.ts @@ -13,9 +13,9 @@ export const coreSettingsManifest: PluginManifest = { }, providers: [ - () => import('./SettingsManager/SettingsManagerService').then(m => m.SettingsManagerService), - () => import('./SettingsResolverService').then(m => m.SettingsResolverService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./SettingsProviderService').then(m => m.SettingsProviderService), + () => import('./SettingsManager/SettingsManagerService.js').then(m => m.SettingsManagerService), + () => import('./SettingsResolverService.js').then(m => m.SettingsResolverService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./SettingsProviderService.js').then(m => m.SettingsProviderService), ], }; diff --git a/webapp/packages/core-storage/package.json b/webapp/packages/core-storage/package.json index c231bd96f7..c6408520ce 100644 --- a/webapp/packages/core-storage/package.json +++ b/webapp/packages/core-storage/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-storage", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-storage/src/StorageService.ts b/webapp/packages/core-storage/src/StorageService.ts index 94fb1ad883..678c613e14 100644 --- a/webapp/packages/core-storage/src/StorageService.ts +++ b/webapp/packages/core-storage/src/StorageService.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { LocalStorageSaveService, LocalStorageType } from '@cloudbeaver/core-browser'; +import { LocalStorageSaveService, type LocalStorageType } from '@cloudbeaver/core-browser'; import { injectable } from '@cloudbeaver/core-di'; import type { ISyncExecutor } from '@cloudbeaver/core-executor'; diff --git a/webapp/packages/core-storage/src/index.ts b/webapp/packages/core-storage/src/index.ts index 0fa5f4f52b..0bf10f1a7f 100644 --- a/webapp/packages/core-storage/src/index.ts +++ b/webapp/packages/core-storage/src/index.ts @@ -5,5 +5,5 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './manifest'; -export * from './StorageService'; +export * from './manifest.js'; +export * from './StorageService.js'; diff --git a/webapp/packages/core-storage/src/manifest.ts b/webapp/packages/core-storage/src/manifest.ts index 58de03c2e3..9cbcf3dc19 100644 --- a/webapp/packages/core-storage/src/manifest.ts +++ b/webapp/packages/core-storage/src/manifest.ts @@ -12,5 +12,5 @@ export const coreStorageManifest: PluginManifest = { name: 'Core Storage', }, - providers: [() => import('./StorageService').then(m => m.StorageService)], + providers: [() => import('./StorageService.js').then(m => m.StorageService)], }; diff --git a/webapp/packages/core-task-manager/package.json b/webapp/packages/core-task-manager/package.json index e8a4be05af..27f4abd4d1 100644 --- a/webapp/packages/core-task-manager/package.json +++ b/webapp/packages/core-task-manager/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-task-manager", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-task-manager/src/TaskManagerService.ts b/webapp/packages/core-task-manager/src/TaskManagerService.ts index 760126c7d9..94e0b4fcb1 100644 --- a/webapp/packages/core-task-manager/src/TaskManagerService.ts +++ b/webapp/packages/core-task-manager/src/TaskManagerService.ts @@ -11,7 +11,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { uuid } from '@cloudbeaver/core-utils'; -import type { ITaskDescriptor, ITaskDescriptorOptions } from './ITaskDescriptor'; +import type { ITaskDescriptor, ITaskDescriptorOptions } from './ITaskDescriptor.js'; @injectable() export class TaskManagerService { diff --git a/webapp/packages/core-task-manager/src/index.ts b/webapp/packages/core-task-manager/src/index.ts index bf00ee60f4..8cd2515fbb 100644 --- a/webapp/packages/core-task-manager/src/index.ts +++ b/webapp/packages/core-task-manager/src/index.ts @@ -1,7 +1,14 @@ -import { coreTaskManagerManifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { coreTaskManagerManifest } from './manifest.js'; -export * from './ITaskDescriptor'; -export * from './TaskManagerService'; +export * from './ITaskDescriptor.js'; +export * from './TaskManagerService.js'; export { coreTaskManagerManifest }; export default coreTaskManagerManifest; diff --git a/webapp/packages/core-task-manager/src/manifest.ts b/webapp/packages/core-task-manager/src/manifest.ts index e0484f9b4c..7d1f3e8dc5 100644 --- a/webapp/packages/core-task-manager/src/manifest.ts +++ b/webapp/packages/core-task-manager/src/manifest.ts @@ -12,5 +12,5 @@ export const coreTaskManagerManifest: PluginManifest = { name: 'Core Task Manager', }, - providers: [() => import('./TaskManagerService').then(m => m.TaskManagerService)], + providers: [() => import('./TaskManagerService.js').then(m => m.TaskManagerService)], }; diff --git a/webapp/packages/core-theming/package.json b/webapp/packages/core-theming/package.json index 9c36d2665a..302b061864 100644 --- a/webapp/packages/core-theming/package.json +++ b/webapp/packages/core-theming/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-theming", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -50,4 +51,4 @@ "typescript": "^5", "typescript-plugin-css-modules": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/core-theming/src/ComponentStyle.ts b/webapp/packages/core-theming/src/ComponentStyle.ts index d545a9be1c..d0f274ae70 100644 --- a/webapp/packages/core-theming/src/ComponentStyle.ts +++ b/webapp/packages/core-theming/src/ComponentStyle.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ClassCollection } from './themeUtils'; +import type { ClassCollection } from './themeUtils.js'; export type BaseStyles = Record> = ClassCollection; export type ThemeSelector = Record> = ( diff --git a/webapp/packages/core-theming/src/LocaleService.ts b/webapp/packages/core-theming/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/core-theming/src/LocaleService.ts +++ b/webapp/packages/core-theming/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-theming/src/ThemeService.ts b/webapp/packages/core-theming/src/ThemeService.ts index 5506c15c6e..f104704c91 100644 --- a/webapp/packages/core-theming/src/ThemeService.ts +++ b/webapp/packages/core-theming/src/ThemeService.ts @@ -5,23 +5,23 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { computed, IReactionDisposer, makeObservable, observable, reaction } from 'mobx'; +import { computed, type IReactionDisposer, makeObservable, observable, reaction } from 'mobx'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { UIError } from '@cloudbeaver/core-events'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; -import type { Style } from './ComponentStyle'; -// TODO: important to keep normalize first -import './styles/main/normalize.pure.css'; +import type { Style } from './ComponentStyle.js'; import './styles/main/base.pure.css'; import './styles/main/color.pure.scss'; import './styles/main/elevation.pure.scss'; import './styles/main/fonts.pure.css'; +// TODO: important to keep normalize first +import './styles/main/normalize.pure.css'; import './styles/main/typography.pure.scss'; -import { DEFAULT_THEME_ID, themes } from './themes'; -import { ThemeSettingsService } from './ThemeSettingsService'; -import type { ClassCollection } from './themeUtils'; +import { DEFAULT_THEME_ID, themes } from './themes.js'; +import { ThemeSettingsService } from './ThemeSettingsService.js'; +import type { ClassCollection } from './themeUtils.js'; export interface ITheme { name: string; @@ -75,7 +75,7 @@ export class ThemeService extends Bootstrap { }); } - register(): void { + override register(): void { this.loadAllThemes(); this.reactionDisposer = reaction( () => this.currentTheme, @@ -86,7 +86,7 @@ export class ThemeService extends Bootstrap { ); } - dispose(): void { + override dispose(): void { if (this.reactionDisposer) { this.reactionDisposer(); } @@ -123,7 +123,7 @@ export class ThemeService extends Bootstrap { .flat(); } - async load(): Promise { + override async load(): Promise { await this.loadTheme(this.themeId); } diff --git a/webapp/packages/core-theming/src/ThemeSettingsManagementService.ts b/webapp/packages/core-theming/src/ThemeSettingsManagementService.ts index 70e967cd43..df75cc8966 100644 --- a/webapp/packages/core-theming/src/ThemeSettingsManagementService.ts +++ b/webapp/packages/core-theming/src/ThemeSettingsManagementService.ts @@ -8,8 +8,8 @@ import { Dependency, injectable } from '@cloudbeaver/core-di'; import { ESettingsValueType, INTERFACE_SETTINGS_GROUP, SettingsManagerService } from '@cloudbeaver/core-settings'; -import { ThemeService } from './ThemeService'; -import { ThemeSettingsService } from './ThemeSettingsService'; +import { ThemeService } from './ThemeService.js'; +import { ThemeSettingsService } from './ThemeSettingsService.js'; @injectable() export class ThemeSettingsManagementService extends Dependency { diff --git a/webapp/packages/core-theming/src/ThemeSettingsService.test.ts b/webapp/packages/core-theming/src/ThemeSettingsService.test.ts index b5ff5e2de5..04e412a0a8 100644 --- a/webapp/packages/core-theming/src/ThemeSettingsService.test.ts +++ b/webapp/packages/core-theming/src/ThemeSettingsService.test.ts @@ -11,21 +11,21 @@ import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreEventsManifest } from '@cloudbeaver/core-events'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { createApp } from '@cloudbeaver/tests-runner'; -import { coreThemingManifest } from './manifest'; -import { ThemeSettingsService } from './ThemeSettingsService'; +import { coreThemingManifest } from './manifest.js'; +import { ThemeSettingsService } from './ThemeSettingsService.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint)); diff --git a/webapp/packages/core-theming/src/ThemeSettingsService.ts b/webapp/packages/core-theming/src/ThemeSettingsService.ts index dd91fb79aa..0d8eeabe8e 100644 --- a/webapp/packages/core-theming/src/ThemeSettingsService.ts +++ b/webapp/packages/core-theming/src/ThemeSettingsService.ts @@ -15,7 +15,7 @@ import { } from '@cloudbeaver/core-settings'; import { schema } from '@cloudbeaver/core-utils'; -import { DEFAULT_THEME_ID } from './themes'; +import { DEFAULT_THEME_ID } from './themes.js'; const settingsSchema = schema.object({ 'core.theming.theme': schema.string().default(DEFAULT_THEME_ID), diff --git a/webapp/packages/core-theming/src/index.ts b/webapp/packages/core-theming/src/index.ts index 579464e3e7..a7ca3ad77b 100644 --- a/webapp/packages/core-theming/src/index.ts +++ b/webapp/packages/core-theming/src/index.ts @@ -1,5 +1,12 @@ -export * from './manifest'; -export * from './ComponentStyle'; -export * from './ThemeService'; -export * from './themeUtils'; -export * from './ThemeSettingsService'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; +export * from './ComponentStyle.js'; +export * from './ThemeService.js'; +export * from './themeUtils.js'; +export * from './ThemeSettingsService.js'; diff --git a/webapp/packages/core-theming/src/manifest.ts b/webapp/packages/core-theming/src/manifest.ts index d3f99bac09..4cc2b12bbb 100644 --- a/webapp/packages/core-theming/src/manifest.ts +++ b/webapp/packages/core-theming/src/manifest.ts @@ -13,9 +13,9 @@ export const coreThemingManifest: PluginManifest = { }, providers: [ - () => import('./ThemeService').then(m => m.ThemeService), - () => import('./ThemeSettingsService').then(m => m.ThemeSettingsService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./ThemeSettingsManagementService').then(m => m.ThemeSettingsManagementService), + () => import('./ThemeService.js').then(m => m.ThemeService), + () => import('./ThemeSettingsService.js').then(m => m.ThemeSettingsService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./ThemeSettingsManagementService.js').then(m => m.ThemeSettingsManagementService), ], }; diff --git a/webapp/packages/core-theming/src/themeUtils.ts b/webapp/packages/core-theming/src/themeUtils.ts index 37af552676..eb0a232c93 100644 --- a/webapp/packages/core-theming/src/themeUtils.ts +++ b/webapp/packages/core-theming/src/themeUtils.ts @@ -55,7 +55,7 @@ export function applyComposes(mixed: Array) { const classname = classes.shift()!; for (let i = styles.length - 1; i >= 0; i--) { - const test = styles[i][classname]; + const test = styles[i]![classname]!; if (test) { classnames.push(test); break; diff --git a/webapp/packages/core-theming/src/themes.ts b/webapp/packages/core-theming/src/themes.ts index d12be3c82b..6fbe6f71d8 100644 --- a/webapp/packages/core-theming/src/themes.ts +++ b/webapp/packages/core-theming/src/themes.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ITheme } from './ThemeService'; +import type { ITheme } from './ThemeService.js'; const emptyTheme = {}; @@ -28,4 +28,4 @@ export const themes: ITheme[] = [ }, ]; -export const DEFAULT_THEME_ID = themes[0].id; +export const DEFAULT_THEME_ID = themes[0]!.id; diff --git a/webapp/packages/core-ui/package.json b/webapp/packages/core-ui/package.json index 8980f89719..a424b70103 100644 --- a/webapp/packages/core-ui/package.json +++ b/webapp/packages/core-ui/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-ui", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-ui/src/AuthenticationProvider.tsx b/webapp/packages/core-ui/src/AuthenticationProvider.tsx index a88e7688c6..704a090cf9 100644 --- a/webapp/packages/core-ui/src/AuthenticationProvider.tsx +++ b/webapp/packages/core-ui/src/AuthenticationProvider.tsx @@ -9,7 +9,7 @@ import { observer } from 'mobx-react-lite'; import { Button, Container, useTranslate } from '@cloudbeaver/core-blocks'; -import { useAuthenticationAction } from './useAuthenticationAction'; +import { useAuthenticationAction } from './useAuthenticationAction.js'; export type Props = { providerId: string; diff --git a/webapp/packages/core-ui/src/AuthenticationProviderLoader.ts b/webapp/packages/core-ui/src/AuthenticationProviderLoader.ts index b347f38d7d..64f67438a8 100644 --- a/webapp/packages/core-ui/src/AuthenticationProviderLoader.ts +++ b/webapp/packages/core-ui/src/AuthenticationProviderLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const AuthenticationProvider = importLazyComponent(() => import('./AuthenticationProvider').then(m => m.AuthenticationProvider)); +export const AuthenticationProvider = importLazyComponent(() => import('./AuthenticationProvider.js').then(m => m.AuthenticationProvider)); diff --git a/webapp/packages/core-ui/src/Clipboard/ClipboardBootstrap.ts b/webapp/packages/core-ui/src/Clipboard/ClipboardBootstrap.ts index d0e68fa976..ed2c158e9e 100644 --- a/webapp/packages/core-ui/src/Clipboard/ClipboardBootstrap.ts +++ b/webapp/packages/core-ui/src/Clipboard/ClipboardBootstrap.ts @@ -7,7 +7,7 @@ */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { ClipboardService } from './ClipboardService'; +import { ClipboardService } from './ClipboardService.js'; @injectable() export class ClipboardBootstrap extends Bootstrap { @@ -15,9 +15,7 @@ export class ClipboardBootstrap extends Bootstrap { super(); } - register(): void {} - - async load(): Promise { + override async load(): Promise { await this.clipboardService.tryActivateClipboard(); } } diff --git a/webapp/packages/core-ui/src/ContextMenu/ContextMenu.tsx b/webapp/packages/core-ui/src/ContextMenu/ContextMenu.tsx index d89f4e29a9..8f4d595767 100644 --- a/webapp/packages/core-ui/src/ContextMenu/ContextMenu.tsx +++ b/webapp/packages/core-ui/src/ContextMenu/ContextMenu.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import { forwardRef, useRef, useState } from 'react'; -import { getComputed, IMenuState, Menu, useAutoLoad, useObjectRef, useTranslate } from '@cloudbeaver/core-blocks'; +import { getComputed, type IMenuState, Menu, useAutoLoad, useObjectRef, useTranslate } from '@cloudbeaver/core-blocks'; import { MenuActionItem } from '@cloudbeaver/core-view'; -import type { IContextMenuProps } from './IContextMenuProps'; -import { MenuItemRenderer } from './MenuItemRenderer'; +import type { IContextMenuProps } from './IContextMenuProps.js'; +import { MenuItemRenderer } from './MenuItemRenderer.js'; // TODO the click doesn't work for React components as children export const ContextMenu = observer( diff --git a/webapp/packages/core-ui/src/ContextMenu/ContextMenuLazy.ts b/webapp/packages/core-ui/src/ContextMenu/ContextMenuLazy.ts index 81d8328629..4167f21c0c 100644 --- a/webapp/packages/core-ui/src/ContextMenu/ContextMenuLazy.ts +++ b/webapp/packages/core-ui/src/ContextMenu/ContextMenuLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const ContextMenu = importLazyComponent(() => import('./ContextMenu').then(m => m.ContextMenu)); +export const ContextMenu = importLazyComponent(() => import('./ContextMenu.js').then(m => m.ContextMenu)); diff --git a/webapp/packages/core-ui/src/ContextMenu/MenuActionElement.tsx b/webapp/packages/core-ui/src/ContextMenu/MenuActionElement.tsx index 68e6fd4212..d8aa6cf3bd 100644 --- a/webapp/packages/core-ui/src/ContextMenu/MenuActionElement.tsx +++ b/webapp/packages/core-ui/src/ContextMenu/MenuActionElement.tsx @@ -8,9 +8,9 @@ import { observer } from 'mobx-react-lite'; import { Checkbox, MenuItem, MenuItemCheckbox, MenuItemElement, MenuItemRadio, Radio, useTranslate } from '@cloudbeaver/core-blocks'; -import { getBindingLabel, IMenuActionItem } from '@cloudbeaver/core-view'; +import { getBindingLabel, type IMenuActionItem } from '@cloudbeaver/core-view'; -import type { IContextMenuItemProps } from './IContextMenuItemProps'; +import type { IContextMenuItemProps } from './IContextMenuItemProps.js'; interface IMenuActionElementProps extends IContextMenuItemProps { item: IMenuActionItem; diff --git a/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBar.tsx b/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBar.tsx index 2483d78f1c..3ebb4b4a3a 100644 --- a/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBar.tsx +++ b/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBar.tsx @@ -16,17 +16,17 @@ import { registry, s, SContext, - StyleRegistry, + type StyleRegistry, useAutoLoad, useS, } from '@cloudbeaver/core-blocks'; -import { IDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; +import { type IDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; import { DATA_CONTEXT_MENU_NESTED, DATA_CONTEXT_SUBMENU_ITEM, - IMenuActionItem, - IMenuData, - IMenuItem, + type IMenuActionItem, + type IMenuData, + type IMenuItem, isMenuCustomItem, MenuActionItem, MenuBaseItem, @@ -35,10 +35,10 @@ import { useMenu, } from '@cloudbeaver/core-view'; -import { ContextMenu } from '../ContextMenu'; -import type { IMenuBarNestedMenuSettings, IMenuBarProps } from './IMenuBarProps'; +import { ContextMenu } from '../ContextMenu.js'; +import type { IMenuBarNestedMenuSettings, IMenuBarProps } from './IMenuBarProps.js'; import style from './MenuBar.module.css'; -import { MenuBarItem } from './MenuBarItem'; +import { MenuBarItem } from './MenuBarItem.js'; const styleRegistry: StyleRegistry = [ [ diff --git a/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarItem.tsx b/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarItem.tsx index 20c0f4cb8f..b611a599bf 100644 --- a/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarItem.tsx +++ b/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarItem.tsx @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import React, { ButtonHTMLAttributes, forwardRef } from 'react'; +import React, { type ButtonHTMLAttributes, forwardRef } from 'react'; import { Icon, IconOrImage, Loader, registry, s, useS, useStateDelay, useTranslate } from '@cloudbeaver/core-blocks'; diff --git a/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarItemLoader.ts b/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarItemLoader.ts index 1d9412db7c..2e24d3d28a 100644 --- a/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarItemLoader.ts +++ b/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarItemLoader.ts @@ -8,4 +8,4 @@ // TODO: importLazyComponent currently not working with components registry // eslint-disable-next-line @cloudbeaver/no-sync-component-import -export { MenuBarItem, type MenuBarItemProps } from './MenuBarItem'; +export { MenuBarItem, type MenuBarItemProps } from './MenuBarItem.js'; diff --git a/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarLazy.ts b/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarLazy.ts index 889a052ee6..2e89ab8113 100644 --- a/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarLazy.ts +++ b/webapp/packages/core-ui/src/ContextMenu/MenuBar/MenuBarLazy.ts @@ -8,4 +8,4 @@ // TODO: importLazyComponent currently not working with components registry // eslint-disable-next-line @cloudbeaver/no-sync-component-import -export { MenuBar, MenuBarAction, type IMenuBarActionProps } from './MenuBar'; +export { MenuBar, MenuBarAction, type IMenuBarActionProps } from './MenuBar.js'; diff --git a/webapp/packages/core-ui/src/ContextMenu/MenuItemRenderer.tsx b/webapp/packages/core-ui/src/ContextMenu/MenuItemRenderer.tsx index f3e18fdc11..845e5bb700 100644 --- a/webapp/packages/core-ui/src/ContextMenu/MenuItemRenderer.tsx +++ b/webapp/packages/core-ui/src/ContextMenu/MenuItemRenderer.tsx @@ -10,19 +10,18 @@ import React, { useCallback } from 'react'; import { Checkbox, MenuItem, MenuItemCheckbox, MenuItemElement, MenuSeparator, useTranslate } from '@cloudbeaver/core-blocks'; import { - IMenuData, - IMenuItem, + type IMenuData, + type IMenuItem, isMenuCustomItem, MenuActionItem, MenuBaseItem, MenuCheckboxItem, - MenuCustomItem, MenuSeparatorItem, MenuSubMenuItem, } from '@cloudbeaver/core-view'; -import { MenuActionElement } from './MenuActionElement'; -import { SubMenuElement } from './SubMenuElement'; +import { MenuActionElement } from './MenuActionElement.js'; +import { SubMenuElement } from './SubMenuElement.js'; export interface IMenuItemRendererProps extends React.ButtonHTMLAttributes { item: IMenuItem; diff --git a/webapp/packages/core-ui/src/ContextMenu/SubMenuElement.tsx b/webapp/packages/core-ui/src/ContextMenu/SubMenuElement.tsx index 6a61190284..eb81c29de3 100644 --- a/webapp/packages/core-ui/src/ContextMenu/SubMenuElement.tsx +++ b/webapp/packages/core-ui/src/ContextMenu/SubMenuElement.tsx @@ -8,11 +8,18 @@ import { observer } from 'mobx-react-lite'; import { forwardRef, useRef, useState } from 'react'; -import { getComputed, IMenuState, Menu, MenuItemElement, useAutoLoad, useObjectRef } from '@cloudbeaver/core-blocks'; +import { getComputed, type IMenuState, Menu, MenuItemElement, useAutoLoad, useObjectRef } from '@cloudbeaver/core-blocks'; import { useDataContextLink } from '@cloudbeaver/core-data-context'; -import { DATA_CONTEXT_MENU_NESTED, DATA_CONTEXT_SUBMENU_ITEM, IMenuData, IMenuSubMenuItem, MenuActionItem, useMenu } from '@cloudbeaver/core-view'; +import { + DATA_CONTEXT_MENU_NESTED, + DATA_CONTEXT_SUBMENU_ITEM, + type IMenuData, + type IMenuSubMenuItem, + MenuActionItem, + useMenu, +} from '@cloudbeaver/core-view'; -import type { IMenuItemRendererProps } from './MenuItemRenderer'; +import type { IMenuItemRendererProps } from './MenuItemRenderer.js'; interface ISubMenuElementProps extends Omit, 'style'> { menuData: IMenuData; diff --git a/webapp/packages/core-ui/src/DragAndDrop/DNDAcceptType.ts b/webapp/packages/core-ui/src/DragAndDrop/DNDAcceptType.ts index c46758b309..3edf2e726d 100644 --- a/webapp/packages/core-ui/src/DragAndDrop/DNDAcceptType.ts +++ b/webapp/packages/core-ui/src/DragAndDrop/DNDAcceptType.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { DND_ELEMENT_TYPE } from './DND_ELEMENT_TYPE'; -import type { DND_NATIVE_TYPE } from './DND_NATIVE_TYPE'; +import type { DND_ELEMENT_TYPE } from './DND_ELEMENT_TYPE.js'; +import type { DND_NATIVE_TYPE } from './DND_NATIVE_TYPE.js'; type AcceptType = typeof DND_NATIVE_TYPE | typeof DND_ELEMENT_TYPE; diff --git a/webapp/packages/core-ui/src/DragAndDrop/DNDPreview.tsx b/webapp/packages/core-ui/src/DragAndDrop/DNDPreview.tsx index c0251f2fc8..7481f2966a 100644 --- a/webapp/packages/core-ui/src/DragAndDrop/DNDPreview.tsx +++ b/webapp/packages/core-ui/src/DragAndDrop/DNDPreview.tsx @@ -6,9 +6,9 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import { ConnectDragPreview, DragPreviewImage } from 'react-dnd'; +import { type ConnectDragPreview, DragPreviewImage } from 'react-dnd'; -import type { IDNDData } from './useDNDData'; +import type { IDNDData } from './useDNDData.js'; export interface DNDPreviewProps { src: string; diff --git a/webapp/packages/core-ui/src/DragAndDrop/DNDPreviewLoader.ts b/webapp/packages/core-ui/src/DragAndDrop/DNDPreviewLoader.ts index 5a4d335f8b..5e3453bc55 100644 --- a/webapp/packages/core-ui/src/DragAndDrop/DNDPreviewLoader.ts +++ b/webapp/packages/core-ui/src/DragAndDrop/DNDPreviewLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const DNDPreview = importLazyComponent(() => import('./DNDPreview').then(m => m.DNDPreview)); +export const DNDPreview = importLazyComponent(() => import('./DNDPreview.js').then(m => m.DNDPreview)); diff --git a/webapp/packages/core-ui/src/DragAndDrop/DNDProviderLoader.ts b/webapp/packages/core-ui/src/DragAndDrop/DNDProviderLoader.ts index 2325a87dcf..089a6e4c62 100644 --- a/webapp/packages/core-ui/src/DragAndDrop/DNDProviderLoader.ts +++ b/webapp/packages/core-ui/src/DragAndDrop/DNDProviderLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const DNDProvider = importLazyComponent(() => import('./DNDProvider').then(m => m.DNDProvider)); +export const DNDProvider = importLazyComponent(() => import('./DNDProvider.js').then(m => m.DNDProvider)); diff --git a/webapp/packages/core-ui/src/DragAndDrop/useDNDBox.ts b/webapp/packages/core-ui/src/DragAndDrop/useDNDBox.ts index 44eed26bf7..c4e9596c93 100644 --- a/webapp/packages/core-ui/src/DragAndDrop/useDNDBox.ts +++ b/webapp/packages/core-ui/src/DragAndDrop/useDNDBox.ts @@ -12,8 +12,8 @@ import { useDrop } from 'react-dnd'; import { useObjectRef, useObservableRef } from '@cloudbeaver/core-blocks'; import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; -import { DND_ELEMENT_TYPE } from './DND_ELEMENT_TYPE'; -import type { DNDAcceptType } from './DNDAcceptType'; +import { DND_ELEMENT_TYPE } from './DND_ELEMENT_TYPE.js'; +import type { DNDAcceptType } from './DNDAcceptType.js'; interface IState { isOver: boolean; diff --git a/webapp/packages/core-ui/src/DragAndDrop/useDNDData.ts b/webapp/packages/core-ui/src/DragAndDrop/useDNDData.ts index 7c3cfe6ec1..ee8f358058 100644 --- a/webapp/packages/core-ui/src/DragAndDrop/useDNDData.ts +++ b/webapp/packages/core-ui/src/DragAndDrop/useDNDData.ts @@ -11,7 +11,7 @@ import { useDrag } from 'react-dnd'; import { useObjectRef, useObservableRef } from '@cloudbeaver/core-blocks'; import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; -import { DND_ELEMENT_TYPE } from './DND_ELEMENT_TYPE'; +import { DND_ELEMENT_TYPE } from './DND_ELEMENT_TYPE.js'; interface IState { isDragging: boolean; diff --git a/webapp/packages/core-ui/src/Form/Components/BaseForm.tsx b/webapp/packages/core-ui/src/Form/Components/BaseForm.tsx index 96f18cc7c6..ed22ad20e6 100644 --- a/webapp/packages/core-ui/src/Form/Components/BaseForm.tsx +++ b/webapp/packages/core-ui/src/Form/Components/BaseForm.tsx @@ -10,12 +10,12 @@ import { observer } from 'mobx-react-lite'; import { Button, Container, Form, getComputed, s, StatusMessage, useForm, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { getFirstException } from '@cloudbeaver/core-utils'; -import { TabList } from '../../Tabs/TabList'; -import { TabPanelList } from '../../Tabs/TabPanelList'; -import { TabsState } from '../../Tabs/TabsState'; -import { FormMode } from '../FormMode'; +import { TabList } from '../../Tabs/TabList.js'; +import { TabPanelList } from '../../Tabs/TabPanelList.js'; +import { TabsState } from '../../Tabs/TabsState.js'; +import { FormMode } from '../FormMode.js'; import style from './BaseForm.module.css'; -import type { IBaseFormProps } from './IBaseFormProps'; +import type { IBaseFormProps } from './IBaseFormProps.js'; export const BaseForm = observer>(function BaseForm({ service, state, onClose, onSubmit }) { const styles = useS(style); diff --git a/webapp/packages/core-ui/src/Form/Components/BaseFormLazy.ts b/webapp/packages/core-ui/src/Form/Components/BaseFormLazy.ts index c6d75d4b59..16dc3b0e94 100644 --- a/webapp/packages/core-ui/src/Form/Components/BaseFormLazy.ts +++ b/webapp/packages/core-ui/src/Form/Components/BaseFormLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const BaseForm = importLazyComponent(() => import('./BaseForm').then(m => m.BaseForm)); +export const BaseForm = importLazyComponent(() => import('./BaseForm.js').then(m => m.BaseForm)); diff --git a/webapp/packages/core-ui/src/Form/Components/IBaseFormProps.ts b/webapp/packages/core-ui/src/Form/Components/IBaseFormProps.ts index d3b88797b2..12bf33c3b2 100644 --- a/webapp/packages/core-ui/src/Form/Components/IBaseFormProps.ts +++ b/webapp/packages/core-ui/src/Form/Components/IBaseFormProps.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { FormBaseService } from '../FormBaseService'; -import type { IFormState } from '../IFormState'; +import type { FormBaseService } from '../FormBaseService.js'; +import type { IFormState } from '../IFormState.js'; export interface IBaseFormSubmitInfo { success: boolean; diff --git a/webapp/packages/core-ui/src/Form/DATA_CONTEXT_FORM_STATE.ts b/webapp/packages/core-ui/src/Form/DATA_CONTEXT_FORM_STATE.ts index fc176c9756..cd401df31e 100644 --- a/webapp/packages/core-ui/src/Form/DATA_CONTEXT_FORM_STATE.ts +++ b/webapp/packages/core-ui/src/Form/DATA_CONTEXT_FORM_STATE.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { IFormState } from './IFormState'; +import type { IFormState } from './IFormState.js'; export const DATA_CONTEXT_FORM_STATE = createDataContext>('Form State'); diff --git a/webapp/packages/core-ui/src/Form/FormBaseService.ts b/webapp/packages/core-ui/src/Form/FormBaseService.ts index 6f25777f8c..f105caf187 100644 --- a/webapp/packages/core-ui/src/Form/FormBaseService.ts +++ b/webapp/packages/core-ui/src/Form/FormBaseService.ts @@ -7,14 +7,14 @@ */ import { PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { ENotificationType, NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorHandlersCollection, ExecutorInterrupter, IExecutorHandler, type IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; +import { ExecutorHandlersCollection, ExecutorInterrupter, type IExecutorHandler, type IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; import type { LocalizationService } from '@cloudbeaver/core-localization'; -import { TabsContainer } from '../Tabs/TabsContainer/TabsContainer'; -import { formStatusContext } from './formStatusContext'; -import { formValidationContext } from './formValidationContext'; -import type { IFormProps } from './IFormProps'; -import type { IFormState } from './IFormState'; +import { TabsContainer } from '../Tabs/TabsContainer/TabsContainer.js'; +import { formStatusContext } from './formStatusContext.js'; +import { formValidationContext } from './formValidationContext.js'; +import type { IFormProps } from './IFormProps.js'; +import type { IFormState } from './IFormState.js'; export class FormBaseService = IFormProps> { readonly parts: TabsContainer; @@ -28,7 +28,11 @@ export class FormBaseService = IFormPr readonly onSubmit: IExecutorHandlersCollection>; readonly onState: IExecutorHandlersCollection; - constructor(private readonly localizationService: LocalizationService, private readonly notificationService: NotificationService, name: string) { + constructor( + private readonly localizationService: LocalizationService, + private readonly notificationService: NotificationService, + name: string, + ) { this.parts = new TabsContainer(name); this.actionsContainer = new PlaceholderContainer(); this.onConfigure = new ExecutorHandlersCollection(); diff --git a/webapp/packages/core-ui/src/Form/FormPart.ts b/webapp/packages/core-ui/src/Form/FormPart.ts index c789e0df64..031a59e35c 100644 --- a/webapp/packages/core-ui/src/Form/FormPart.ts +++ b/webapp/packages/core-ui/src/Form/FormPart.ts @@ -10,8 +10,8 @@ import { action, computed, makeObservable, observable, toJS } from 'mobx'; import { executorHandlerFilter, ExecutorInterrupter, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { isObjectsEqual } from '@cloudbeaver/core-utils'; -import type { IFormPart } from './IFormPart'; -import type { IFormState } from './IFormState'; +import type { IFormPart } from './IFormPart.js'; +import type { IFormState } from './IFormState.js'; export abstract class FormPart implements IFormPart { state: TPartState; diff --git a/webapp/packages/core-ui/src/Form/FormState.ts b/webapp/packages/core-ui/src/Form/FormState.ts index 93bd21daa2..7bf9e76bf8 100644 --- a/webapp/packages/core-ui/src/Form/FormState.ts +++ b/webapp/packages/core-ui/src/Form/FormState.ts @@ -7,19 +7,19 @@ */ import { action, computed, makeObservable, observable } from 'mobx'; -import { DataContext, dataContextAddDIProvider, DataContextGetter, type IDataContext } from '@cloudbeaver/core-data-context'; +import { DataContext, dataContextAddDIProvider, type DataContextGetter, type IDataContext } from '@cloudbeaver/core-data-context'; import type { IServiceProvider } from '@cloudbeaver/core-di'; import type { ENotificationType } from '@cloudbeaver/core-events'; -import { Executor, ExecutorInterrupter, IExecutionContextProvider, type IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutionContextProvider, type IExecutor } from '@cloudbeaver/core-executor'; import { isArraysEqual, isNotNullDefined, MetadataMap, uuid } from '@cloudbeaver/core-utils'; import { DATA_CONTEXT_LOADABLE_STATE, loadableStateContext } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_FORM_STATE } from './DATA_CONTEXT_FORM_STATE'; -import type { FormBaseService } from './FormBaseService'; -import { FormMode } from './FormMode'; -import { formStateContext } from './formStateContext'; -import type { IFormPart } from './IFormPart'; -import type { IFormState } from './IFormState'; +import { DATA_CONTEXT_FORM_STATE } from './DATA_CONTEXT_FORM_STATE.js'; +import type { FormBaseService } from './FormBaseService.js'; +import { FormMode } from './FormMode.js'; +import { formStateContext } from './formStateContext.js'; +import type { IFormPart } from './IFormPart.js'; +import type { IFormState } from './IFormState.js'; export class FormState implements IFormState { mode: FormMode; diff --git a/webapp/packages/core-ui/src/Form/IFormProps.ts b/webapp/packages/core-ui/src/Form/IFormProps.ts index 1cc9686571..f1cc2be22e 100644 --- a/webapp/packages/core-ui/src/Form/IFormProps.ts +++ b/webapp/packages/core-ui/src/Form/IFormProps.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IFormState } from './IFormState'; +import type { IFormState } from './IFormState.js'; export interface IFormProps { readonly formState: IFormState; diff --git a/webapp/packages/core-ui/src/Form/IFormState.ts b/webapp/packages/core-ui/src/Form/IFormState.ts index 050332649b..7bb4132074 100644 --- a/webapp/packages/core-ui/src/Form/IFormState.ts +++ b/webapp/packages/core-ui/src/Form/IFormState.ts @@ -10,9 +10,9 @@ import type { ENotificationType } from '@cloudbeaver/core-events'; import type { IExecutor } from '@cloudbeaver/core-executor'; import type { MetadataMap } from '@cloudbeaver/core-utils'; -import type { FormBaseService } from './FormBaseService'; -import type { FormMode } from './FormMode'; -import type { IFormPart } from './IFormPart'; +import type { FormBaseService } from './FormBaseService.js'; +import type { FormMode } from './FormMode.js'; +import type { IFormPart } from './IFormPart.js'; export interface IFormState { readonly id: string; diff --git a/webapp/packages/core-ui/src/Form/formStateContext.ts b/webapp/packages/core-ui/src/Form/formStateContext.ts index 5d91441069..14fd795564 100644 --- a/webapp/packages/core-ui/src/Form/formStateContext.ts +++ b/webapp/packages/core-ui/src/Form/formStateContext.ts @@ -7,7 +7,7 @@ */ import { ENotificationType } from '@cloudbeaver/core-events'; -import type { IFormStateInfo } from './IFormStateInfo'; +import type { IFormStateInfo } from './IFormStateInfo.js'; export interface IFormStateContext extends IFormStateInfo { markEdited: () => void; diff --git a/webapp/packages/core-ui/src/InlineEditor/EditorDialog.tsx b/webapp/packages/core-ui/src/InlineEditor/EditorDialog.tsx index 7255bde652..8c3abfcb40 100644 --- a/webapp/packages/core-ui/src/InlineEditor/EditorDialog.tsx +++ b/webapp/packages/core-ui/src/InlineEditor/EditorDialog.tsx @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react'; +import { type ChangeEvent, useCallback, useEffect, useRef, useState } from 'react'; import { Button, diff --git a/webapp/packages/core-ui/src/InlineEditor/InlineEditor.tsx b/webapp/packages/core-ui/src/InlineEditor/InlineEditor.tsx index 7fa8b8870a..ddeadcf60f 100644 --- a/webapp/packages/core-ui/src/InlineEditor/InlineEditor.tsx +++ b/webapp/packages/core-ui/src/InlineEditor/InlineEditor.tsx @@ -6,13 +6,13 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import React, { ChangeEvent, forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from 'react'; +import React, { type ChangeEvent, forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from 'react'; import { Icon, IconOrImage, Loader, s, useObjectRef, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; -import { EditorDialog } from './EditorDialog'; +import { EditorDialog } from './EditorDialog.js'; import styles from './InlineEditor.module.css'; export type InlineEditorControls = 'right' | 'top' | 'bottom' | 'inside'; diff --git a/webapp/packages/core-ui/src/InlineEditor/InlineEditorLoader.ts b/webapp/packages/core-ui/src/InlineEditor/InlineEditorLoader.ts index f99904811a..1bc3a2ba77 100644 --- a/webapp/packages/core-ui/src/InlineEditor/InlineEditorLoader.ts +++ b/webapp/packages/core-ui/src/InlineEditor/InlineEditorLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const InlineEditor = importLazyComponent(() => import('./InlineEditor').then(m => m.InlineEditor)); +export const InlineEditor = importLazyComponent(() => import('./InlineEditor.js').then(m => m.InlineEditor)); diff --git a/webapp/packages/core-ui/src/LocaleService.ts b/webapp/packages/core-ui/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/core-ui/src/LocaleService.ts +++ b/webapp/packages/core-ui/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-ui/src/Screens/AppScreen/NavigationService.ts b/webapp/packages/core-ui/src/Screens/AppScreen/NavigationService.ts index f34bb72232..5b531825d2 100644 --- a/webapp/packages/core-ui/src/Screens/AppScreen/NavigationService.ts +++ b/webapp/packages/core-ui/src/Screens/AppScreen/NavigationService.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; import { RouterService } from '@cloudbeaver/core-routing'; @injectable() diff --git a/webapp/packages/core-ui/src/Screens/AppScreen/OptionsPanelService.ts b/webapp/packages/core-ui/src/Screens/AppScreen/OptionsPanelService.ts index 8ffec0fbd1..0ee324c074 100644 --- a/webapp/packages/core-ui/src/Screens/AppScreen/OptionsPanelService.ts +++ b/webapp/packages/core-ui/src/Screens/AppScreen/OptionsPanelService.ts @@ -8,9 +8,9 @@ import { makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { Executor, ExecutorInterrupter, IExecutionContext, IExecutor, IExecutorHandler } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutionContext, type IExecutor, type IExecutorHandler } from '@cloudbeaver/core-executor'; -import { NavigationService } from './NavigationService'; +import { NavigationService } from './NavigationService.js'; @injectable() export class OptionsPanelService { diff --git a/webapp/packages/core-ui/src/SideBarPanel/LeftBarPanelService.ts b/webapp/packages/core-ui/src/SideBarPanel/LeftBarPanelService.ts index df22959942..45453f4746 100644 --- a/webapp/packages/core-ui/src/SideBarPanel/LeftBarPanelService.ts +++ b/webapp/packages/core-ui/src/SideBarPanel/LeftBarPanelService.ts @@ -7,7 +7,7 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import { TabsContainer } from '../Tabs/TabsContainer/TabsContainer'; +import { TabsContainer } from '../Tabs/TabsContainer/TabsContainer.js'; @injectable() export class LeftBarPanelService { diff --git a/webapp/packages/core-ui/src/SideBarPanel/SideBarPanel.tsx b/webapp/packages/core-ui/src/SideBarPanel/SideBarPanel.tsx index caaf119382..e85440821a 100644 --- a/webapp/packages/core-ui/src/SideBarPanel/SideBarPanel.tsx +++ b/webapp/packages/core-ui/src/SideBarPanel/SideBarPanel.tsx @@ -10,11 +10,11 @@ import { observer } from 'mobx-react-lite'; import { s, SContext, type StyleRegistry, useS } from '@cloudbeaver/core-blocks'; import TabStyles from '../Tabs/Tab/Tab.module.css'; -import { TabList } from '../Tabs/TabList'; +import { TabList } from '../Tabs/TabList.js'; import TabPanelStyles from '../Tabs/TabPanel.module.css'; -import { TabPanelList } from '../Tabs/TabPanelList'; -import type { TabsContainer } from '../Tabs/TabsContainer/TabsContainer'; -import { TabsState } from '../Tabs/TabsState'; +import { TabPanelList } from '../Tabs/TabPanelList.js'; +import type { TabsContainer } from '../Tabs/TabsContainer/TabsContainer.js'; +import { TabsState } from '../Tabs/TabsState.js'; import styles from './shared/SideBarPanel.module.css'; import SideBarPanelTab from './shared/SideBarPanelTab.module.css'; import SideBarPanelTabPanel from './shared/SideBarPanelTabPanel.module.css'; diff --git a/webapp/packages/core-ui/src/SideBarPanel/SideBarPanelLoader.ts b/webapp/packages/core-ui/src/SideBarPanel/SideBarPanelLoader.ts index 2fc6b62ed6..ca34d395d7 100644 --- a/webapp/packages/core-ui/src/SideBarPanel/SideBarPanelLoader.ts +++ b/webapp/packages/core-ui/src/SideBarPanel/SideBarPanelLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const SideBarPanel = importLazyComponent(() => import('./SideBarPanel').then(m => m.SideBarPanel)); +export const SideBarPanel = importLazyComponent(() => import('./SideBarPanel.js').then(m => m.SideBarPanel)); diff --git a/webapp/packages/core-ui/src/SideBarPanel/SideBarPanelService.ts b/webapp/packages/core-ui/src/SideBarPanel/SideBarPanelService.ts index 580d07d1b9..58220a281d 100644 --- a/webapp/packages/core-ui/src/SideBarPanel/SideBarPanelService.ts +++ b/webapp/packages/core-ui/src/SideBarPanel/SideBarPanelService.ts @@ -7,7 +7,7 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import { TabsContainer } from '../Tabs/TabsContainer/TabsContainer'; +import { TabsContainer } from '../Tabs/TabsContainer/TabsContainer.js'; @injectable() export class SideBarPanelService { diff --git a/webapp/packages/core-ui/src/Tabs/Tab/DATA_CONTEXT_TABS_CONTEXT.ts b/webapp/packages/core-ui/src/Tabs/Tab/DATA_CONTEXT_TABS_CONTEXT.ts index 5e3dbcf121..058bf4eb3e 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/DATA_CONTEXT_TABS_CONTEXT.ts +++ b/webapp/packages/core-ui/src/Tabs/Tab/DATA_CONTEXT_TABS_CONTEXT.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { ITabsContext } from '../TabsContext'; +import type { ITabsContext } from '../TabsContext.js'; export const DATA_CONTEXT_TABS_CONTEXT = createDataContext>('tabs-context'); diff --git a/webapp/packages/core-ui/src/Tabs/Tab/Tab.tsx b/webapp/packages/core-ui/src/Tabs/Tab/Tab.tsx index 9c185a34a1..fb0ca6d984 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/Tab.tsx +++ b/webapp/packages/core-ui/src/Tabs/Tab/Tab.tsx @@ -7,15 +7,15 @@ */ import { observer } from 'mobx-react-lite'; import { useMemo, useRef } from 'react'; -import { Tab as BaseTab } from 'reakit/Tab'; +import { Tab as BaseTab } from 'reakit'; import { getComputed, s, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import { TabContext } from '../TabContext'; +import { TabContext } from '../TabContext.js'; import style from './Tab.module.css'; -import { TabActions } from './TabActions'; -import type { TabProps } from './TabProps'; -import { useTab } from './useTab'; +import { TabActions } from './TabActions.js'; +import type { TabProps } from './TabProps.js'; +import { useTab } from './useTab.js'; export const Tab = observer(function Tab(props) { const translate = useTranslate(); diff --git a/webapp/packages/core-ui/src/Tabs/Tab/TabActions.tsx b/webapp/packages/core-ui/src/Tabs/Tab/TabActions.tsx index caa63b7dcb..dd10b7a7a4 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/TabActions.tsx +++ b/webapp/packages/core-ui/src/Tabs/Tab/TabActions.tsx @@ -10,10 +10,10 @@ import { observer } from 'mobx-react-lite'; import { Icon, s, useS, useTranslate } from '@cloudbeaver/core-blocks'; import type { IDataContext } from '@cloudbeaver/core-data-context'; -import type { ITabsContext } from '../TabsContext'; +import type { ITabsContext } from '../TabsContext.js'; import TabStyle from './Tab.module.css'; import style from './TabActions.module.css'; -import { TabMenu } from './TabMenu'; +import { TabMenu } from './TabMenu.js'; interface TabActionsProps { tabId: string; diff --git a/webapp/packages/core-ui/src/Tabs/Tab/TabDefault.tsx b/webapp/packages/core-ui/src/Tabs/Tab/TabDefault.tsx index 7c03556574..50be2c8fcc 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/TabDefault.tsx +++ b/webapp/packages/core-ui/src/Tabs/Tab/TabDefault.tsx @@ -9,13 +9,13 @@ import { useContext, useMemo } from 'react'; import { Translate } from '@cloudbeaver/core-blocks'; -import { TabContext } from '../TabContext'; -import type { ITabData } from '../TabsContainer/ITabsContainer'; -import { TabsContext } from '../TabsContext'; -import { Tab } from './Tab'; -import { TabIcon } from './TabIcon'; -import type { TabProps } from './TabProps'; -import { TabTitle } from './TabTitle'; +import { TabContext } from '../TabContext.js'; +import type { ITabData } from '../TabsContainer/ITabsContainer.js'; +import { TabsContext } from '../TabsContext.js'; +import { Tab } from './Tab.js'; +import { TabIcon } from './TabIcon.js'; +import type { TabProps } from './TabProps.js'; +import { TabTitle } from './TabTitle.js'; interface Props> { tabId: string; diff --git a/webapp/packages/core-ui/src/Tabs/Tab/TabDefaultLoader.ts b/webapp/packages/core-ui/src/Tabs/Tab/TabDefaultLoader.ts index ee521dbc3e..060f40824b 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/TabDefaultLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/Tab/TabDefaultLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const TabDefault = importLazyComponent(() => import('./TabDefault').then(m => m.TabDefault)); +export const TabDefault = importLazyComponent(() => import('./TabDefault.js').then(m => m.TabDefault)); diff --git a/webapp/packages/core-ui/src/Tabs/Tab/TabIconLoader.ts b/webapp/packages/core-ui/src/Tabs/Tab/TabIconLoader.ts index c68fcfdc0b..eb4801d307 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/TabIconLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/Tab/TabIconLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const TabIcon = importLazyComponent(() => import('./TabIcon').then(m => m.TabIcon)); +export const TabIcon = importLazyComponent(() => import('./TabIcon.js').then(m => m.TabIcon)); diff --git a/webapp/packages/core-ui/src/Tabs/Tab/TabLoader.ts b/webapp/packages/core-ui/src/Tabs/Tab/TabLoader.ts index ebc44ac61a..f7e87625b0 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/TabLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/Tab/TabLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const Tab = importLazyComponent(() => import('./Tab').then(m => m.Tab)); +export const Tab = importLazyComponent(() => import('./Tab.js').then(m => m.Tab)); diff --git a/webapp/packages/core-ui/src/Tabs/Tab/TabMenu.tsx b/webapp/packages/core-ui/src/Tabs/Tab/TabMenu.tsx index bbeac60ac6..273591a84f 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/TabMenu.tsx +++ b/webapp/packages/core-ui/src/Tabs/Tab/TabMenu.tsx @@ -11,11 +11,11 @@ import { getComputed, s, useS } from '@cloudbeaver/core-blocks'; import { type IDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; import { useMenu } from '@cloudbeaver/core-view'; -import { ContextMenu } from '../../ContextMenu/ContextMenu'; -import type { ITabsContext } from '../TabsContext'; -import { DATA_CONTEXT_TAB_ID } from './DATA_CONTEXT_TAB_ID'; -import { DATA_CONTEXT_TABS_CONTEXT } from './DATA_CONTEXT_TABS_CONTEXT'; -import { MENU_TAB } from './MENU_TAB'; +import { ContextMenu } from '../../ContextMenu/ContextMenu.js'; +import type { ITabsContext } from '../TabsContext.js'; +import { DATA_CONTEXT_TAB_ID } from './DATA_CONTEXT_TAB_ID.js'; +import { DATA_CONTEXT_TABS_CONTEXT } from './DATA_CONTEXT_TABS_CONTEXT.js'; +import { MENU_TAB } from './MENU_TAB.js'; import style from './TabMenu.module.css'; interface TabMenuProps extends React.PropsWithChildren { diff --git a/webapp/packages/core-ui/src/Tabs/Tab/TabProps.ts b/webapp/packages/core-ui/src/Tabs/Tab/TabProps.ts index ba0a17ef29..1bbfd1a060 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/TabProps.ts +++ b/webapp/packages/core-ui/src/Tabs/Tab/TabProps.ts @@ -9,7 +9,7 @@ import type { PropsWithChildren } from 'react'; import type { IDataContext } from '@cloudbeaver/core-data-context'; -import type { ITabData } from '../TabsContainer/ITabsContainer'; +import type { ITabData } from '../TabsContainer/ITabsContainer.js'; export type TabProps = PropsWithChildren<{ tabId: string; diff --git a/webapp/packages/core-ui/src/Tabs/Tab/TabTitleLoader.ts b/webapp/packages/core-ui/src/Tabs/Tab/TabTitleLoader.ts index 9adb5a7477..18f047da10 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/TabTitleLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/Tab/TabTitleLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const TabTitle = importLazyComponent(() => import('./TabTitle').then(m => m.TabTitle)); +export const TabTitle = importLazyComponent(() => import('./TabTitle.js').then(m => m.TabTitle)); diff --git a/webapp/packages/core-ui/src/Tabs/Tab/useTab.ts b/webapp/packages/core-ui/src/Tabs/Tab/useTab.ts index e9cd1f8137..76a203c465 100644 --- a/webapp/packages/core-ui/src/Tabs/Tab/useTab.ts +++ b/webapp/packages/core-ui/src/Tabs/Tab/useTab.ts @@ -11,9 +11,9 @@ import { useContext } from 'react'; import { useExecutor, useObjectRef, useObservableRef } from '@cloudbeaver/core-blocks'; import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; -import { TabContext } from '../TabContext'; -import type { ITabData } from '../TabsContainer/ITabsContainer'; -import { TabsContext } from '../TabsContext'; +import { TabContext } from '../TabContext.js'; +import type { ITabData } from '../TabsContainer/ITabsContainer.js'; +import { TabsContext } from '../TabsContext.js'; export function useTab( tabId?: string, diff --git a/webapp/packages/core-ui/src/Tabs/TabList.tsx b/webapp/packages/core-ui/src/Tabs/TabList.tsx index b68d6b6105..bcf232b2fc 100644 --- a/webapp/packages/core-ui/src/Tabs/TabList.tsx +++ b/webapp/packages/core-ui/src/Tabs/TabList.tsx @@ -7,18 +7,18 @@ */ import { observer } from 'mobx-react-lite'; import { useContext, useMemo } from 'react'; -import { TabList as BaseTabList, TabListOptions, TabStateReturn } from 'reakit/Tab'; +import { TabList as BaseTabList, type TabListOptions, type TabStateReturn } from 'reakit'; -import { s, SContext, StyleRegistry, useS, useTranslate } from '@cloudbeaver/core-blocks'; +import { s, SContext, type StyleRegistry, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import { generateTabElement } from './generateTabElement'; -import { TabDefault } from './Tab/TabDefault'; -import { TabBigUnderlineStyleRegistry, TabUnderlineStyleRegistry } from './Tab/TabStyleRegistries'; +import { generateTabElement } from './generateTabElement.js'; +import { TabDefault } from './Tab/TabDefault.js'; +import { TabBigUnderlineStyleRegistry, TabUnderlineStyleRegistry } from './Tab/TabStyleRegistries.js'; import styles from './TabList.module.css'; -import { TabListVerticalRegistry, TabListVerticalRotatedRegistry } from './TabListStyleRegistries'; +import { TabListVerticalRegistry, TabListVerticalRotatedRegistry } from './TabListStyleRegistries.js'; import verticalStyles from './TabListVertical.module.css'; import verticalRotatedStyles from './TabListVerticalRotated.module.css'; -import { TabsContext } from './TabsContext'; +import { TabsContext } from './TabsContext.js'; export interface TabListProps extends Omit { 'aria-label'?: string; diff --git a/webapp/packages/core-ui/src/Tabs/TabListLoader.ts b/webapp/packages/core-ui/src/Tabs/TabListLoader.ts index a80e34a47f..28d8553704 100644 --- a/webapp/packages/core-ui/src/Tabs/TabListLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/TabListLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const TabList = importLazyComponent(() => import('./TabList').then(m => m.TabList)); +export const TabList = importLazyComponent(() => import('./TabList.js').then(m => m.TabList)); diff --git a/webapp/packages/core-ui/src/Tabs/TabPanel.tsx b/webapp/packages/core-ui/src/Tabs/TabPanel.tsx index ddc255b7a7..4df6b44bfa 100644 --- a/webapp/packages/core-ui/src/Tabs/TabPanel.tsx +++ b/webapp/packages/core-ui/src/Tabs/TabPanel.tsx @@ -7,15 +7,15 @@ */ import { observer } from 'mobx-react-lite'; import { useContext, useMemo } from 'react'; -import { TabPanel as BaseTabPanel } from 'reakit/Tab'; +import { TabPanel as BaseTabPanel } from 'reakit'; import { getComputed, Loader, s, useS } from '@cloudbeaver/core-blocks'; -import { TabContext } from './TabContext'; +import { TabContext } from './TabContext.js'; import tabPanelStyles from './TabPanel.module.css'; -import type { TabPanelProps } from './TabPanelProps'; -import { TabsContext } from './TabsContext'; -import { useTabsValidation } from './useTabsValidation'; +import type { TabPanelProps } from './TabPanelProps.js'; +import { TabsContext } from './TabsContext.js'; +import { useTabsValidation } from './useTabsValidation.js'; export const TabPanel: React.FC = observer(function TabPanel({ tabId, children, contents, className, lazy }) { const tabContextState = useContext(TabsContext); diff --git a/webapp/packages/core-ui/src/Tabs/TabPanelList.tsx b/webapp/packages/core-ui/src/Tabs/TabPanelList.tsx index 3f536908b6..7099c61dc6 100644 --- a/webapp/packages/core-ui/src/Tabs/TabPanelList.tsx +++ b/webapp/packages/core-ui/src/Tabs/TabPanelList.tsx @@ -8,10 +8,10 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { generateTabElement } from './generateTabElement'; -import { TabPanel } from './TabPanel'; -import type { ITabInfo } from './TabsContainer/ITabsContainer'; -import { TabsContext } from './TabsContext'; +import { generateTabElement } from './generateTabElement.js'; +import { TabPanel } from './TabPanel.js'; +import type { ITabInfo } from './TabsContainer/ITabsContainer.js'; +import { TabsContext } from './TabsContext.js'; export interface TabPanelListProps { contents?: boolean; diff --git a/webapp/packages/core-ui/src/Tabs/TabPanelListLoader.ts b/webapp/packages/core-ui/src/Tabs/TabPanelListLoader.ts index 23e1d1cf33..7fef30a1d5 100644 --- a/webapp/packages/core-ui/src/Tabs/TabPanelListLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/TabPanelListLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const TabPanelList = importLazyComponent(() => import('./TabPanelList').then(m => m.TabPanelList)); +export const TabPanelList = importLazyComponent(() => import('./TabPanelList.js').then(m => m.TabPanelList)); diff --git a/webapp/packages/core-ui/src/Tabs/TabPanelLoader.ts b/webapp/packages/core-ui/src/Tabs/TabPanelLoader.ts index e43525849e..dc29b46cc7 100644 --- a/webapp/packages/core-ui/src/Tabs/TabPanelLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/TabPanelLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const TabPanel = importLazyComponent(() => import('./TabPanel').then(m => m.TabPanel)); +export const TabPanel = importLazyComponent(() => import('./TabPanel.js').then(m => m.TabPanel)); diff --git a/webapp/packages/core-ui/src/Tabs/TabPanelProps.ts b/webapp/packages/core-ui/src/Tabs/TabPanelProps.ts index 3d0357208f..4e87d31049 100644 --- a/webapp/packages/core-ui/src/Tabs/TabPanelProps.ts +++ b/webapp/packages/core-ui/src/Tabs/TabPanelProps.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { TabStateReturn } from 'reakit/Tab'; +import type { TabStateReturn } from 'reakit'; export interface TabPanelProps { tabId: string; diff --git a/webapp/packages/core-ui/src/Tabs/TabsBootstrap.ts b/webapp/packages/core-ui/src/Tabs/TabsBootstrap.ts index 7affbea2d6..5adc84bb42 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsBootstrap.ts +++ b/webapp/packages/core-ui/src/Tabs/TabsBootstrap.ts @@ -8,14 +8,14 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ActionService, DATA_CONTEXT_MENU, menuExtractItems, MenuSeparatorItem, MenuService } from '@cloudbeaver/core-view'; -import { ACTION_TAB_CLOSE } from './Actions/ACTION_TAB_CLOSE'; -import { ACTION_TAB_CLOSE_ALL } from './Actions/ACTION_TAB_CLOSE_ALL'; -import { ACTION_TAB_CLOSE_ALL_TO_THE_LEFT } from './Actions/ACTION_TAB_CLOSE_ALL_TO_THE_LEFT'; -import { ACTION_TAB_CLOSE_ALL_TO_THE_RIGHT } from './Actions/ACTION_TAB_CLOSE_ALL_TO_THE_RIGHT'; -import { ACTION_TAB_CLOSE_OTHERS } from './Actions/ACTION_TAB_CLOSE_OTHERS'; -import { DATA_CONTEXT_TAB_ID } from './Tab/DATA_CONTEXT_TAB_ID'; -import { DATA_CONTEXT_TABS_CONTEXT } from './Tab/DATA_CONTEXT_TABS_CONTEXT'; -import { MENU_TAB } from './Tab/MENU_TAB'; +import { ACTION_TAB_CLOSE } from './Actions/ACTION_TAB_CLOSE.js'; +import { ACTION_TAB_CLOSE_ALL } from './Actions/ACTION_TAB_CLOSE_ALL.js'; +import { ACTION_TAB_CLOSE_ALL_TO_THE_LEFT } from './Actions/ACTION_TAB_CLOSE_ALL_TO_THE_LEFT.js'; +import { ACTION_TAB_CLOSE_ALL_TO_THE_RIGHT } from './Actions/ACTION_TAB_CLOSE_ALL_TO_THE_RIGHT.js'; +import { ACTION_TAB_CLOSE_OTHERS } from './Actions/ACTION_TAB_CLOSE_OTHERS.js'; +import { DATA_CONTEXT_TAB_ID } from './Tab/DATA_CONTEXT_TAB_ID.js'; +import { DATA_CONTEXT_TABS_CONTEXT } from './Tab/DATA_CONTEXT_TABS_CONTEXT.js'; +import { MENU_TAB } from './Tab/MENU_TAB.js'; @injectable() export class TabsBootstrap extends Bootstrap { @@ -26,7 +26,7 @@ export class TabsBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.actionService.addHandler({ id: 'tabs-base-handler', contexts: [DATA_CONTEXT_TAB_ID, DATA_CONTEXT_TABS_CONTEXT], diff --git a/webapp/packages/core-ui/src/Tabs/TabsBox/TabsBox.tsx b/webapp/packages/core-ui/src/Tabs/TabsBox/TabsBox.tsx index 428029f6f0..b3476bcf38 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsBox/TabsBox.tsx +++ b/webapp/packages/core-ui/src/Tabs/TabsBox/TabsBox.tsx @@ -5,14 +5,14 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { forwardRef, PropsWithChildren, ReactNode } from 'react'; +import { forwardRef, type PropsWithChildren, type ReactNode } from 'react'; -import { s, SContext, StyleRegistry, useS } from '@cloudbeaver/core-blocks'; +import { s, SContext, type StyleRegistry, useS } from '@cloudbeaver/core-blocks'; import type { MetadataMap } from '@cloudbeaver/core-utils'; import tabPanelStyles from '../TabPanel.module.css'; -import type { ITabData } from '../TabsContainer/ITabsContainer'; -import { TabsState } from '../TabsState'; +import type { ITabData } from '../TabsContainer/ITabsContainer.js'; +import { TabsState } from '../TabsState.js'; import styles from './shared/TabsBox.module.css'; import moduleTabPanelStyles from './shared/TabsBoxTabPanel.module.css'; diff --git a/webapp/packages/core-ui/src/Tabs/TabsBox/TabsBoxLoader.ts b/webapp/packages/core-ui/src/Tabs/TabsBox/TabsBoxLoader.ts index bcd5debfab..e064ed913f 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsBox/TabsBoxLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/TabsBox/TabsBoxLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const TabsBox = importLazyComponent(() => import('./TabsBox').then(m => m.TabsBox)); +export const TabsBox = importLazyComponent(() => import('./TabsBox.js').then(m => m.TabsBox)); diff --git a/webapp/packages/core-ui/src/Tabs/TabsContainer/ITabsContainer.ts b/webapp/packages/core-ui/src/Tabs/TabsContainer/ITabsContainer.ts index 0a20021a91..f4b9965cb0 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsContainer/ITabsContainer.ts +++ b/webapp/packages/core-ui/src/Tabs/TabsContainer/ITabsContainer.ts @@ -8,7 +8,7 @@ import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import type { ILoadableState, MetadataMap, MetadataValueGetter, schema } from '@cloudbeaver/core-utils'; -import type { TabProps } from '../Tab/TabProps'; +import type { TabProps } from '../Tab/TabProps.js'; export interface ITabData { tabId: string; diff --git a/webapp/packages/core-ui/src/Tabs/TabsContainer/TabsContainer.ts b/webapp/packages/core-ui/src/Tabs/TabsContainer/TabsContainer.ts index 8f21455175..a78fa40115 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsContainer/TabsContainer.ts +++ b/webapp/packages/core-ui/src/Tabs/TabsContainer/TabsContainer.ts @@ -9,7 +9,7 @@ import { makeObservable, observable } from 'mobx'; import type { MetadataMap, MetadataValueGetter, schema } from '@cloudbeaver/core-utils'; -import type { ITabInfo, ITabInfoOptions, ITabsContainer } from './ITabsContainer'; +import type { ITabInfo, ITabInfoOptions, ITabsContainer } from './ITabsContainer.js'; export class TabsContainer = never> implements ITabsContainer { readonly areaLabel: string; diff --git a/webapp/packages/core-ui/src/Tabs/TabsContext.ts b/webapp/packages/core-ui/src/Tabs/TabsContext.ts index 2a7f22d7de..e569417ed5 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsContext.ts +++ b/webapp/packages/core-ui/src/Tabs/TabsContext.ts @@ -6,13 +6,13 @@ * you may not use this file except in compliance with the License. */ import { createContext } from 'react'; -import type { TabStateReturn } from 'reakit/Tab'; +import type { TabStateReturn } from 'reakit'; import type { IDataContext } from '@cloudbeaver/core-data-context'; import type { IExecutor } from '@cloudbeaver/core-executor'; import type { MetadataMap, MetadataValueGetter, schema } from '@cloudbeaver/core-utils'; -import type { ITabData, ITabInfo, ITabsContainer } from './TabsContainer/ITabsContainer'; +import type { ITabData, ITabInfo, ITabsContainer } from './TabsContainer/ITabsContainer.js'; export type TabDirection = 'left' | 'right'; diff --git a/webapp/packages/core-ui/src/Tabs/TabsState.tsx b/webapp/packages/core-ui/src/Tabs/TabsState.tsx index 5243938b69..3bfc23f414 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsState.tsx +++ b/webapp/packages/core-ui/src/Tabs/TabsState.tsx @@ -8,16 +8,16 @@ import { action, observable } from 'mobx'; import { observer } from 'mobx-react-lite'; import { useEffect, useMemo, useState } from 'react'; -import { useTabState } from 'reakit/Tab'; +import { useTabState } from 'reakit'; import { useAutoLoad, useExecutor, useObjectRef, useObservableRef } from '@cloudbeaver/core-blocks'; import { useDataContext } from '@cloudbeaver/core-data-context'; import { Executor, ExecutorInterrupter } from '@cloudbeaver/core-executor'; -import { isDefined, isNotNullDefined, MetadataMap, MetadataValueGetter, schema } from '@cloudbeaver/core-utils'; +import { isDefined, isNotNullDefined, MetadataMap, type MetadataValueGetter, schema } from '@cloudbeaver/core-utils'; -import type { ITabData, ITabInfo, ITabsContainer } from './TabsContainer/ITabsContainer'; -import { ITabsContext, type TabDirection, TabsContext } from './TabsContext'; -import { TabsValidationProvider } from './TabsValidationProvider'; +import type { ITabData, ITabInfo, ITabsContainer } from './TabsContainer/ITabsContainer.js'; +import { type ITabsContext, type TabDirection, TabsContext } from './TabsContext.js'; +import { TabsValidationProvider } from './TabsValidationProvider.js'; type ExtractContainerProps = T extends void ? Record : T; diff --git a/webapp/packages/core-ui/src/Tabs/TabsStateLoader.ts b/webapp/packages/core-ui/src/Tabs/TabsStateLoader.ts index bc657f0d41..7c4a189e76 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsStateLoader.ts +++ b/webapp/packages/core-ui/src/Tabs/TabsStateLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const TabsState = importLazyComponent(() => import('./TabsState').then(m => m.TabsState)); +export const TabsState = importLazyComponent(() => import('./TabsState.js').then(m => m.TabsState)); diff --git a/webapp/packages/core-ui/src/Tabs/TabsValidationProvider.tsx b/webapp/packages/core-ui/src/Tabs/TabsValidationProvider.tsx index 6a79dcef4e..46cc849882 100644 --- a/webapp/packages/core-ui/src/Tabs/TabsValidationProvider.tsx +++ b/webapp/packages/core-ui/src/Tabs/TabsValidationProvider.tsx @@ -13,8 +13,8 @@ import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { isDefined, isNotNullDefined } from '@cloudbeaver/core-utils'; -import { TabsContext } from './TabsContext'; -import { TabsValidationContext } from './TabsValidationContext'; +import { TabsContext } from './TabsContext.js'; +import { TabsValidationContext } from './TabsValidationContext.js'; export const TabsValidationProvider = observer(function TabsValidation({ children }: React.PropsWithChildren) { const tabsContext = useContext(TabsContext); diff --git a/webapp/packages/core-ui/src/Tabs/generateTabElement.ts b/webapp/packages/core-ui/src/Tabs/generateTabElement.ts index 2755b3954c..a2ef8c7827 100644 --- a/webapp/packages/core-ui/src/Tabs/generateTabElement.ts +++ b/webapp/packages/core-ui/src/Tabs/generateTabElement.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ITabInfo } from './TabsContainer/ITabsContainer'; +import type { ITabInfo } from './TabsContainer/ITabsContainer.js'; export function generateTabElement( generator: (tabInfo: ITabInfo, generatorId: string) => JSX.Element, diff --git a/webapp/packages/core-ui/src/Tabs/useTabLocalState.ts b/webapp/packages/core-ui/src/Tabs/useTabLocalState.ts index 5f6e27c6d5..e898d6034d 100644 --- a/webapp/packages/core-ui/src/Tabs/useTabLocalState.ts +++ b/webapp/packages/core-ui/src/Tabs/useTabLocalState.ts @@ -9,8 +9,8 @@ import { useContext } from 'react'; import type { MetadataValueGetter, schema } from '@cloudbeaver/core-utils'; -import { TabContext } from './TabContext'; -import { TabsContext } from './TabsContext'; +import { TabContext } from './TabContext.js'; +import { TabsContext } from './TabsContext.js'; export function useTabLocalState(valueGetter?: MetadataValueGetter, schema?: schema.AnyZodObject): T { const state = useContext(TabsContext); diff --git a/webapp/packages/core-ui/src/Tabs/useTabState.ts b/webapp/packages/core-ui/src/Tabs/useTabState.ts index 747a833c07..5e326ae1bc 100644 --- a/webapp/packages/core-ui/src/Tabs/useTabState.ts +++ b/webapp/packages/core-ui/src/Tabs/useTabState.ts @@ -9,8 +9,8 @@ import { useContext } from 'react'; import type { MetadataValueGetter } from '@cloudbeaver/core-utils'; -import { TabContext } from './TabContext'; -import { TabsContext } from './TabsContext'; +import { TabContext } from './TabContext.js'; +import { TabsContext } from './TabsContext.js'; export function useTabState(valueGetter?: MetadataValueGetter): T { const state = useContext(TabsContext); diff --git a/webapp/packages/core-ui/src/Tabs/useTabsValidation.ts b/webapp/packages/core-ui/src/Tabs/useTabsValidation.ts index 21c1ce7f19..20f8fe070e 100644 --- a/webapp/packages/core-ui/src/Tabs/useTabsValidation.ts +++ b/webapp/packages/core-ui/src/Tabs/useTabsValidation.ts @@ -10,8 +10,8 @@ import { useContext, useEffect, useRef } from 'react'; import { FormContext, getComputed, useExecutor, useObjectRef } from '@cloudbeaver/core-blocks'; import { ExecutorHandlersCollection } from '@cloudbeaver/core-executor'; -import { TabsContext } from './TabsContext'; -import { TabsValidationContext } from './TabsValidationContext'; +import { TabsContext } from './TabsContext.js'; +import { TabsValidationContext } from './TabsValidationContext.js'; export function useTabsValidation(tabId: string): React.RefObject { const tabContextState = useContext(TabsContext); diff --git a/webapp/packages/core-ui/src/index.ts b/webapp/packages/core-ui/src/index.ts index ce38557a44..ab81740a52 100644 --- a/webapp/packages/core-ui/src/index.ts +++ b/webapp/packages/core-ui/src/index.ts @@ -5,56 +5,56 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './Clipboard/ClipboardBootstrap'; -export * from './Clipboard/ClipboardService'; +export * from './Clipboard/ClipboardBootstrap.js'; +export * from './Clipboard/ClipboardService.js'; -export * from './ContextMenu/ContextMenuLazy'; -export * from './ContextMenu/IContextMenuItemProps'; -export * from './ContextMenu/MenuBar/MenuBarLazy'; -export * from './ContextMenu/MenuBar/MenuBarItemLoader'; +export * from './ContextMenu/ContextMenuLazy.js'; +export * from './ContextMenu/IContextMenuItemProps.js'; +export * from './ContextMenu/MenuBar/MenuBarLazy.js'; +export * from './ContextMenu/MenuBar/MenuBarItemLoader.js'; export { default as MenuBarStyles } from './ContextMenu/MenuBar/MenuBar.module.css'; export { default as MenuBarItemStyles } from './ContextMenu/MenuBar/MenuBarItem.module.css'; -export * from './DragAndDrop/DND_ELEMENT_TYPE'; -export * from './DragAndDrop/DND_NATIVE_TYPE'; -export * from './DragAndDrop/DNDAcceptType'; -export * from './DragAndDrop/DNDPreviewLoader'; -export * from './DragAndDrop/DNDProviderLoader'; -export * from './DragAndDrop/useDNDBox'; -export * from './DragAndDrop/useDNDData'; +export * from './DragAndDrop/DND_ELEMENT_TYPE.js'; +export * from './DragAndDrop/DND_NATIVE_TYPE.js'; +export * from './DragAndDrop/DNDAcceptType.js'; +export * from './DragAndDrop/DNDPreviewLoader.js'; +export * from './DragAndDrop/DNDProviderLoader.js'; +export * from './DragAndDrop/useDNDBox.js'; +export * from './DragAndDrop/useDNDData.js'; -export * from './Form/Components/IBaseFormProps'; -export * from './Form/Components/BaseFormLazy'; -export * from './Form/DATA_CONTEXT_FORM_STATE'; -export * from './Form/FormBaseService'; -export * from './Form/FormMode'; -export * from './Form/FormState'; -export * from './Form/FormPart'; -export * from './Form/formStateContext'; -export * from './Form/formStatusContext'; -export * from './Form/formValidationContext'; -export * from './Form/IFormPart'; -export * from './Form/IFormProps'; -export * from './Form/IFormState'; -export * from './Form/IFormStateInfo'; +export * from './Form/Components/IBaseFormProps.js'; +export * from './Form/Components/BaseFormLazy.js'; +export * from './Form/DATA_CONTEXT_FORM_STATE.js'; +export * from './Form/FormBaseService.js'; +export * from './Form/FormMode.js'; +export * from './Form/FormState.js'; +export * from './Form/FormPart.js'; +export * from './Form/formStateContext.js'; +export * from './Form/formStatusContext.js'; +export * from './Form/formValidationContext.js'; +export * from './Form/IFormPart.js'; +export * from './Form/IFormProps.js'; +export * from './Form/IFormState.js'; +export * from './Form/IFormStateInfo.js'; -export * from './InlineEditor/InlineEditorLoader'; +export * from './InlineEditor/InlineEditorLoader.js'; -export * from './Screens/AppScreen/NavigationService'; -export * from './Screens/AppScreen/OptionsPanelService'; +export * from './Screens/AppScreen/NavigationService.js'; +export * from './Screens/AppScreen/OptionsPanelService.js'; -export * from './Tabs/ITab'; -export * from './Tabs/TabContext'; -export * from './Tabs/TabListLoader'; -export * from './Tabs/TabPanelLoader'; -export * from './Tabs/TabPanelListLoader'; -export * from './Tabs/TabPanelProps'; -export * from './Tabs/TabsContainer/ITabsContainer'; -export * from './Tabs/TabsContainer/TabsContainer'; -export * from './Tabs/TabsContext'; -export * from './Tabs/TabsStateLoader'; -export * from './Tabs/useTabState'; -export * from './Tabs/useTabLocalState'; +export * from './Tabs/ITab.js'; +export * from './Tabs/TabContext.js'; +export * from './Tabs/TabListLoader.js'; +export * from './Tabs/TabPanelLoader.js'; +export * from './Tabs/TabPanelListLoader.js'; +export * from './Tabs/TabPanelProps.js'; +export * from './Tabs/TabsContainer/ITabsContainer.js'; +export * from './Tabs/TabsContainer/TabsContainer.js'; +export * from './Tabs/TabsContext.js'; +export * from './Tabs/TabsStateLoader.js'; +export * from './Tabs/useTabState.js'; +export * from './Tabs/useTabLocalState.js'; export { default as TabStyles } from './Tabs/Tab/Tab.module.css'; export { default as TabTitleStyles } from './Tabs/Tab/TabTitle.module.css'; export { default as TabVerticalRotatedStyles } from './Tabs/Tab/TabVerticalRotated.module.css'; @@ -70,25 +70,25 @@ export { default as TabBigUnderlineStyles } from './Tabs/Tab/TabBigUnderlineStyl export { default as TabTitleBigUnderlineStyles } from './Tabs/Tab/TabTitleBigUnderlineStyles.module.css'; export { default as TabIconStyles } from './Tabs/Tab/TabIcon.module.css'; -export * from './Tabs/Tab/DATA_CONTEXT_TAB_ID'; -export * from './Tabs/Tab/DATA_CONTEXT_TABS_CONTEXT'; -export * from './Tabs/Tab/MENU_TAB'; +export * from './Tabs/Tab/DATA_CONTEXT_TAB_ID.js'; +export * from './Tabs/Tab/DATA_CONTEXT_TABS_CONTEXT.js'; +export * from './Tabs/Tab/MENU_TAB.js'; -export * from './Tabs/Tab/TabLoader'; -export * from './Tabs/Tab/TabDefaultLoader'; -export * from './Tabs/Tab/TabIconLoader'; -export * from './Tabs/Tab/TabProps'; -export * from './Tabs/Tab/TabTitleLoader'; -export * from './Tabs/Tab/useTab'; -export * from './Tabs/TabsBootstrap'; +export * from './Tabs/Tab/TabLoader.js'; +export * from './Tabs/Tab/TabDefaultLoader.js'; +export * from './Tabs/Tab/TabIconLoader.js'; +export * from './Tabs/Tab/TabProps.js'; +export * from './Tabs/Tab/TabTitleLoader.js'; +export * from './Tabs/Tab/useTab.js'; +export * from './Tabs/TabsBootstrap.js'; -export * from './Tabs/TabsBox/TabsBoxLoader'; +export * from './Tabs/TabsBox/TabsBoxLoader.js'; -export * from './SideBarPanel/LeftBarPanelService'; -export * from './SideBarPanel/SideBarPanelLoader'; -export * from './SideBarPanel/SideBarPanelService'; +export * from './SideBarPanel/LeftBarPanelService.js'; +export * from './SideBarPanel/SideBarPanelLoader.js'; +export * from './SideBarPanel/SideBarPanelService.js'; -export * from './AuthenticationProviderLoader'; -export * from './useAuthenticationAction'; +export * from './AuthenticationProviderLoader.js'; +export * from './useAuthenticationAction.js'; -export { manifest as coreUIManifest } from './manifest'; +export { manifest as coreUIManifest } from './manifest.js'; diff --git a/webapp/packages/core-ui/src/manifest.ts b/webapp/packages/core-ui/src/manifest.ts index bbfd159be0..e052f2f685 100644 --- a/webapp/packages/core-ui/src/manifest.ts +++ b/webapp/packages/core-ui/src/manifest.ts @@ -13,13 +13,13 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./Screens/AppScreen/NavigationService').then(m => m.NavigationService), - () => import('./Screens/AppScreen/OptionsPanelService').then(m => m.OptionsPanelService), - () => import('./Clipboard/ClipboardBootstrap').then(m => m.ClipboardBootstrap), - () => import('./Clipboard/ClipboardService').then(m => m.ClipboardService), - () => import('./Tabs/TabsBootstrap').then(m => m.TabsBootstrap), - () => import('./SideBarPanel/SideBarPanelService').then(m => m.SideBarPanelService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./SideBarPanel/LeftBarPanelService').then(m => m.LeftBarPanelService), + () => import('./Screens/AppScreen/NavigationService.js').then(m => m.NavigationService), + () => import('./Screens/AppScreen/OptionsPanelService.js').then(m => m.OptionsPanelService), + () => import('./Clipboard/ClipboardBootstrap.js').then(m => m.ClipboardBootstrap), + () => import('./Clipboard/ClipboardService.js').then(m => m.ClipboardService), + () => import('./Tabs/TabsBootstrap.js').then(m => m.TabsBootstrap), + () => import('./SideBarPanel/SideBarPanelService.js').then(m => m.SideBarPanelService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./SideBarPanel/LeftBarPanelService.js').then(m => m.LeftBarPanelService), ], }; diff --git a/webapp/packages/core-utils/package.json b/webapp/packages/core-utils/package.json index 3b6baabbbf..d213a42b05 100644 --- a/webapp/packages/core-utils/package.json +++ b/webapp/packages/core-utils/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-utils", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-utils/src/GlobalConstants.test.ts b/webapp/packages/core-utils/src/GlobalConstants.test.ts index b8fc34b6ad..4e7db740eb 100644 --- a/webapp/packages/core-utils/src/GlobalConstants.test.ts +++ b/webapp/packages/core-utils/src/GlobalConstants.test.ts @@ -7,7 +7,7 @@ */ import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'; -import { GlobalConstants } from './GlobalConstants'; +import { GlobalConstants } from './GlobalConstants.js'; type WindowSpyType = jest.SpiedGetter; diff --git a/webapp/packages/core-utils/src/GlobalConstants.ts b/webapp/packages/core-utils/src/GlobalConstants.ts index 931da3c355..4505bd2c10 100644 --- a/webapp/packages/core-utils/src/GlobalConstants.ts +++ b/webapp/packages/core-utils/src/GlobalConstants.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { isValidUrl } from './isValidUrl'; -import { pathJoin } from './pathJoin'; +import { isValidUrl } from './isValidUrl.js'; +import { pathJoin } from './pathJoin.js'; declare const _VERSION_: string | undefined; declare const _DEV_: boolean | undefined; @@ -73,7 +73,7 @@ export const GlobalConstants = { }, absoluteUrl(...parts: string[]): string { - if (parts[0].startsWith('platform:')) { + if (parts[0]?.startsWith('platform:')) { return this.absoluteServiceUrl('images', ...parts); } diff --git a/webapp/packages/core-utils/src/ILoadableState.test.ts b/webapp/packages/core-utils/src/ILoadableState.test.ts index b4e201cf14..eb1dce21ae 100644 --- a/webapp/packages/core-utils/src/ILoadableState.test.ts +++ b/webapp/packages/core-utils/src/ILoadableState.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { getFirstException, ILoadableState, isContainsException, isLoadableStateHasException } from './ILoadableState'; +import { getFirstException, type ILoadableState, isContainsException, isLoadableStateHasException } from './ILoadableState.js'; const getMockedLoadableState = (state: Partial): ILoadableState => ({ exception: null, diff --git a/webapp/packages/core-utils/src/LoadingError.test.ts b/webapp/packages/core-utils/src/LoadingError.test.ts index e33eba43a7..d176bcb208 100644 --- a/webapp/packages/core-utils/src/LoadingError.test.ts +++ b/webapp/packages/core-utils/src/LoadingError.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { LoadingError } from './LoadingError'; +import { LoadingError } from './LoadingError.js'; describe('LoadingError', () => { it('should be instance of Error', () => { diff --git a/webapp/packages/core-utils/src/MetadataMap.test.ts b/webapp/packages/core-utils/src/MetadataMap.test.ts index 3280994671..6524c11602 100644 --- a/webapp/packages/core-utils/src/MetadataMap.test.ts +++ b/webapp/packages/core-utils/src/MetadataMap.test.ts @@ -8,7 +8,7 @@ import { describe, expect, it } from '@jest/globals'; import { z } from 'zod'; -import { MetadataMap } from './MetadataMap'; +import { MetadataMap } from './MetadataMap.js'; describe('MetadataMap', () => { it('should create an empty map', () => { diff --git a/webapp/packages/core-utils/src/MetadataMap.ts b/webapp/packages/core-utils/src/MetadataMap.ts index 40da01b342..f401f6358f 100644 --- a/webapp/packages/core-utils/src/MetadataMap.ts +++ b/webapp/packages/core-utils/src/MetadataMap.ts @@ -7,8 +7,8 @@ */ import { action, makeAutoObservable, observable } from 'mobx'; -import type { schema } from './schema'; -import { TempMap } from './TempMap'; +import type { schema } from './schema.js'; +import { TempMap } from './TempMap.js'; export type MetadataValueGetter = (key: TKey, metadata: MetadataMap) => TValue; export type DefaultValueGetter = (key: TKey, metadata: MetadataMap) => TValue; diff --git a/webapp/packages/core-utils/src/OrderedMap.test.ts b/webapp/packages/core-utils/src/OrderedMap.test.ts index 0b61a0eaec..11d686c6e4 100644 --- a/webapp/packages/core-utils/src/OrderedMap.test.ts +++ b/webapp/packages/core-utils/src/OrderedMap.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { OrderedMap } from './OrderedMap'; +import { OrderedMap } from './OrderedMap.js'; describe('OrderedMap', () => { it('should add and get items', () => { diff --git a/webapp/packages/core-utils/src/PriorityQueue.test.ts b/webapp/packages/core-utils/src/PriorityQueue.test.ts index bfcd135e39..a2b2a5e0b4 100644 --- a/webapp/packages/core-utils/src/PriorityQueue.test.ts +++ b/webapp/packages/core-utils/src/PriorityQueue.test.ts @@ -7,7 +7,7 @@ */ import { beforeEach, describe, expect, it } from '@jest/globals'; -import { PriorityQueue } from './PriorityQueue'; +import { PriorityQueue } from './PriorityQueue.js'; describe('PriorityQueue', () => { let queue: PriorityQueue; diff --git a/webapp/packages/core-utils/src/PriorityQueue.ts b/webapp/packages/core-utils/src/PriorityQueue.ts index b325c948fc..8ca763ed49 100644 --- a/webapp/packages/core-utils/src/PriorityQueue.ts +++ b/webapp/packages/core-utils/src/PriorityQueue.ts @@ -37,7 +37,7 @@ export class PriorityQueue { } peek(): T { - return this._heap[top]; + return this._heap[top]!; } push(...values: T[]) { @@ -69,11 +69,11 @@ export class PriorityQueue { } private greater(i: number, j: number) { - return this._comparator(this._heap[i], this._heap[j]); + return this._comparator(this._heap[i]!, this._heap[j]!); } private swap(i: number, j: number) { - [this._heap[i], this._heap[j]] = [this._heap[j], this._heap[i]]; + [this._heap[i], this._heap[j]] = [this._heap[j]!, this._heap[i]!]; } private siftUp() { diff --git a/webapp/packages/core-utils/src/Promises/CancellablePromise.test.ts b/webapp/packages/core-utils/src/Promises/CancellablePromise.test.ts index 0804c05e66..f8fdba1bc6 100644 --- a/webapp/packages/core-utils/src/Promises/CancellablePromise.test.ts +++ b/webapp/packages/core-utils/src/Promises/CancellablePromise.test.ts @@ -7,8 +7,8 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { CancellablePromise } from './CancellablePromise'; -import { PromiseCancelledError } from './PromiseCancelledError'; +import { CancellablePromise } from './CancellablePromise.js'; +import { PromiseCancelledError } from './PromiseCancelledError.js'; describe('CancellablePromise', () => { jest.mock('./PromiseCancelledError', () => ({ diff --git a/webapp/packages/core-utils/src/Promises/CancellablePromise.ts b/webapp/packages/core-utils/src/Promises/CancellablePromise.ts index ee89e86529..9a4d2bc6cc 100644 --- a/webapp/packages/core-utils/src/Promises/CancellablePromise.ts +++ b/webapp/packages/core-utils/src/Promises/CancellablePromise.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { PromiseCancelledError } from './PromiseCancelledError'; +import { PromiseCancelledError } from './PromiseCancelledError.js'; export type CancellableExecutor = (resolve: (value: T) => void, reject: (reason?: any) => void) => undefined | (() => void); // returns nothing or cancel function diff --git a/webapp/packages/core-utils/src/Promises/Deferred.ts b/webapp/packages/core-utils/src/Promises/Deferred.ts index 5b943b221c..8b0fe1ac6f 100644 --- a/webapp/packages/core-utils/src/Promises/Deferred.ts +++ b/webapp/packages/core-utils/src/Promises/Deferred.ts @@ -7,9 +7,9 @@ */ import { action, computed, makeObservable, observable } from 'mobx'; -import { errorOf } from '../errorOf'; -import { PromiseCancelledError } from './PromiseCancelledError'; -import { PromiseExecutor } from './PromiseExecutor'; +import { errorOf } from '../errorOf.js'; +import { PromiseCancelledError } from './PromiseCancelledError.js'; +import { PromiseExecutor } from './PromiseExecutor.js'; export enum EDeferredState { 'PENDING' = 'PENDING', diff --git a/webapp/packages/core-utils/src/Promises/PromiseCancelledError.ts b/webapp/packages/core-utils/src/Promises/PromiseCancelledError.ts index a56c930486..cec6f62f99 100644 --- a/webapp/packages/core-utils/src/Promises/PromiseCancelledError.ts +++ b/webapp/packages/core-utils/src/Promises/PromiseCancelledError.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { errorOf } from '../errorOf'; +import { errorOf } from '../errorOf.js'; export class PromiseCancelledError extends Error { constructor(message?: string, options?: ErrorOptions) { diff --git a/webapp/packages/core-utils/src/Promises/cancellableTimeout.test.ts b/webapp/packages/core-utils/src/Promises/cancellableTimeout.test.ts index 8b4714853c..9ef2db243d 100644 --- a/webapp/packages/core-utils/src/Promises/cancellableTimeout.test.ts +++ b/webapp/packages/core-utils/src/Promises/cancellableTimeout.test.ts @@ -7,7 +7,7 @@ */ import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'; -import { cancellableTimeout } from './cancellableTimeout'; +import { cancellableTimeout } from './cancellableTimeout.js'; jest.mock('./CancellablePromise', () => ({ CancellablePromise: jest.fn().mockImplementation(() => ({ diff --git a/webapp/packages/core-utils/src/Promises/cancellableTimeout.ts b/webapp/packages/core-utils/src/Promises/cancellableTimeout.ts index 3b20a14c59..62b932265a 100644 --- a/webapp/packages/core-utils/src/Promises/cancellableTimeout.ts +++ b/webapp/packages/core-utils/src/Promises/cancellableTimeout.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { CancellablePromise } from './CancellablePromise'; +import { CancellablePromise } from './CancellablePromise.js'; export function cancellableTimeout(timeout: number): CancellablePromise { return new CancellablePromise(resolve => { diff --git a/webapp/packages/core-utils/src/TempMap.test.ts b/webapp/packages/core-utils/src/TempMap.test.ts index ce144d614d..0d9154870b 100644 --- a/webapp/packages/core-utils/src/TempMap.test.ts +++ b/webapp/packages/core-utils/src/TempMap.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { TempMap } from './TempMap'; +import { TempMap } from './TempMap.js'; describe('TempMap', () => { it('should create empty map', () => { diff --git a/webapp/packages/core-utils/src/TempMap.ts b/webapp/packages/core-utils/src/TempMap.ts index d914e16747..a2cb2544f9 100644 --- a/webapp/packages/core-utils/src/TempMap.ts +++ b/webapp/packages/core-utils/src/TempMap.ts @@ -7,8 +7,8 @@ */ import { action, makeObservable, observable } from 'mobx'; -import { cacheValue, ICachedValueObject } from './cacheValue'; -import { combineITerableIterators } from './combineITerableIterators'; +import { cacheValue, type ICachedValueObject } from './cacheValue.js'; +import { combineITerableIterators } from './combineITerableIterators.js'; export class TempMap implements Map { get size(): number { diff --git a/webapp/packages/core-utils/src/base64ToBlob.test.ts b/webapp/packages/core-utils/src/base64ToBlob.test.ts index 79d1796058..9eb35ffb45 100644 --- a/webapp/packages/core-utils/src/base64ToBlob.test.ts +++ b/webapp/packages/core-utils/src/base64ToBlob.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { base64ToBlob } from './base64ToBlob'; +import { base64ToBlob } from './base64ToBlob.js'; const BASE_64_STRING = 'iVBORw0KGgoAAAANSUhEUgAAAhAAAAEWCAIAAAC40zleAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACydSURBVHhe7Z1rsF1VtecnkAcQkhgsjVJlW3xQEcWkeOV5njknhHhCUCAVIOQFQQIHbocgJCGPaum6RXjdEMWU3WmVRxQhXLttbt+riAKBW1QJlerYbW4CX/jiLZUqbvmlu/ph9xhzzNeaa+199pn7PPZa6/+rUTlzjTnmWHPD3uO/51p776n6lq'; diff --git a/webapp/packages/core-utils/src/base64ToHex.test.ts b/webapp/packages/core-utils/src/base64ToHex.test.ts index 411b0a46b9..5b72768a68 100644 --- a/webapp/packages/core-utils/src/base64ToHex.test.ts +++ b/webapp/packages/core-utils/src/base64ToHex.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { base64ToHex } from './base64ToHex'; +import { base64ToHex } from './base64ToHex.js'; const BASE_64_STRING = 'iVBORw0KGgoAAAANSUhEUgAAAhAAAAEWCAIAAAC40zleAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACydSURBVHhe7Z1rsF1VtecnkAcQkhgsjVJlW3xQEcWkeOV5njknhHhCUCAVIOQFQQIHbocgJCGPaum6RXjdEMWU3WmVRxQhXLttbt+riAKBW1QJlerYbW4CX/jiLZUqbvmlu/ph9xhzzNeaa+199pn7PPZa6/+rUTlzjTnmWHPD3uO/51p776n6lq'; diff --git a/webapp/packages/core-utils/src/base64ToHex.ts b/webapp/packages/core-utils/src/base64ToHex.ts index 96ce7f15ad..c70a26be7d 100644 --- a/webapp/packages/core-utils/src/base64ToHex.ts +++ b/webapp/packages/core-utils/src/base64ToHex.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { textToHex } from './textToHex'; +import { textToHex } from './textToHex.js'; // be careful with this when you calculate a big size blobs // it can block the main thread and cause freezes diff --git a/webapp/packages/core-utils/src/bindFunctions.test.ts b/webapp/packages/core-utils/src/bindFunctions.test.ts index 8dc530b085..4fd58d7b36 100644 --- a/webapp/packages/core-utils/src/bindFunctions.test.ts +++ b/webapp/packages/core-utils/src/bindFunctions.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { bindFunctions } from './bindFunctions'; +import { bindFunctions } from './bindFunctions.js'; describe('bindFunctions', () => { test('binds specified functions to the object', () => { diff --git a/webapp/packages/core-utils/src/blobToBase64.test.ts b/webapp/packages/core-utils/src/blobToBase64.test.ts index 235c1cfe0e..0b811f5ec1 100644 --- a/webapp/packages/core-utils/src/blobToBase64.test.ts +++ b/webapp/packages/core-utils/src/blobToBase64.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { blobToBase64 } from './blobToBase64'; +import { blobToBase64 } from './blobToBase64.js'; describe('blobToBase64', () => { it('converts blob to base64', async () => { diff --git a/webapp/packages/core-utils/src/bytesToSize.test.ts b/webapp/packages/core-utils/src/bytesToSize.test.ts index f5b98f0e0c..661e925bee 100644 --- a/webapp/packages/core-utils/src/bytesToSize.test.ts +++ b/webapp/packages/core-utils/src/bytesToSize.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { bytesToSize } from './bytesToSize'; +import { bytesToSize } from './bytesToSize.js'; describe('Bytes to size', () => { test('should return "n/a" when "0" bytes are passed', () => { diff --git a/webapp/packages/core-utils/src/cacheValue.test.ts b/webapp/packages/core-utils/src/cacheValue.test.ts index 59cff555f5..ebb8796449 100644 --- a/webapp/packages/core-utils/src/cacheValue.test.ts +++ b/webapp/packages/core-utils/src/cacheValue.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { cacheValue } from './cacheValue'; +import { cacheValue } from './cacheValue.js'; describe('cacheValue', () => { it('should return cached value', () => { diff --git a/webapp/packages/core-utils/src/combineITerableIterators.test.ts b/webapp/packages/core-utils/src/combineITerableIterators.test.ts index 114b10b217..9ec8ba2d08 100644 --- a/webapp/packages/core-utils/src/combineITerableIterators.test.ts +++ b/webapp/packages/core-utils/src/combineITerableIterators.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { combineITerableIterators } from './combineITerableIterators'; +import { combineITerableIterators } from './combineITerableIterators.js'; describe('combineIterableIterators', () => { it('should return an iterator that combines the values of the given iterators', () => { diff --git a/webapp/packages/core-utils/src/copyToClipboard.test.ts b/webapp/packages/core-utils/src/copyToClipboard.test.ts index b77fdcab83..ad4a4d80cf 100644 --- a/webapp/packages/core-utils/src/copyToClipboard.test.ts +++ b/webapp/packages/core-utils/src/copyToClipboard.test.ts @@ -7,7 +7,7 @@ */ import { beforeAll, describe, expect, it, jest } from '@jest/globals'; -import { copyToClipboard } from './copyToClipboard'; +import { copyToClipboard } from './copyToClipboard.js'; describe('copyToClipboard', () => { beforeAll(() => { diff --git a/webapp/packages/core-utils/src/createLastPromiseGetter.test.ts b/webapp/packages/core-utils/src/createLastPromiseGetter.test.ts index be073319db..4deb489b5e 100644 --- a/webapp/packages/core-utils/src/createLastPromiseGetter.test.ts +++ b/webapp/packages/core-utils/src/createLastPromiseGetter.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { createLastPromiseGetter } from './createLastPromiseGetter'; +import { createLastPromiseGetter } from './createLastPromiseGetter.js'; describe('createLastPromiseGetter', () => { const getter = createLastPromiseGetter(); diff --git a/webapp/packages/core-utils/src/createPath.test.ts b/webapp/packages/core-utils/src/createPath.test.ts index a9ee11c69b..0a5c5191a2 100644 --- a/webapp/packages/core-utils/src/createPath.test.ts +++ b/webapp/packages/core-utils/src/createPath.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { createPath } from './createPath'; +import { createPath } from './createPath.js'; describe('Create path', () => { test('should return valid path when all arguments are valid', () => { diff --git a/webapp/packages/core-utils/src/debounce.test.ts b/webapp/packages/core-utils/src/debounce.test.ts index 8b7e082e13..6948a7b618 100644 --- a/webapp/packages/core-utils/src/debounce.test.ts +++ b/webapp/packages/core-utils/src/debounce.test.ts @@ -7,7 +7,7 @@ */ import { afterEach, beforeEach, describe, expect, jest, test } from '@jest/globals'; -import { debounce, debounceAsync } from './debounce'; +import { debounce, debounceAsync } from './debounce.js'; describe('Debounce', () => { beforeEach(() => { diff --git a/webapp/packages/core-utils/src/declensionOfNumber.test.ts b/webapp/packages/core-utils/src/declensionOfNumber.test.ts index abcd64b36e..633359ee39 100644 --- a/webapp/packages/core-utils/src/declensionOfNumber.test.ts +++ b/webapp/packages/core-utils/src/declensionOfNumber.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { declensionOfNumber } from './declensionOfNumber'; +import { declensionOfNumber } from './declensionOfNumber.js'; describe('Declension of number', () => { test('should return "Год" when "1" is passed', () => { diff --git a/webapp/packages/core-utils/src/declensionOfNumber.ts b/webapp/packages/core-utils/src/declensionOfNumber.ts index d980828216..ec3af96070 100644 --- a/webapp/packages/core-utils/src/declensionOfNumber.ts +++ b/webapp/packages/core-utils/src/declensionOfNumber.ts @@ -10,16 +10,16 @@ export function declensionOfNumber(value: number, words: string[]) { value = Math.abs(value) % 100; const num = value % 10; if (value > 10 && value < 20) { - return words[2]; + return words[2]!; } if (num > 1 && num < 5) { - return words[1]; + return words[1]!; } if (num === 1) { - return words[0]; + return words[0]!; } - return words[2]; + return words[2]!; } diff --git a/webapp/packages/core-utils/src/errorOf.test.ts b/webapp/packages/core-utils/src/errorOf.test.ts index 09b3d94a86..a53a1ad8cb 100644 --- a/webapp/packages/core-utils/src/errorOf.test.ts +++ b/webapp/packages/core-utils/src/errorOf.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { errorOf } from './errorOf'; +import { errorOf } from './errorOf.js'; describe('errorOf', () => { it('should return error of the specified type', () => { @@ -24,7 +24,7 @@ describe('errorOf', () => { it('should return error of the specified type from the cause', () => { class TestError extends Error {} class AnotherError extends Error { - cause: Error; + override cause: Error; constructor(message: string, cause: Error) { super(message); diff --git a/webapp/packages/core-utils/src/flat.test.ts b/webapp/packages/core-utils/src/flat.test.ts index f0289c8f1e..9465b9515c 100644 --- a/webapp/packages/core-utils/src/flat.test.ts +++ b/webapp/packages/core-utils/src/flat.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { flat } from './flat'; +import { flat } from './flat.js'; describe('Flat array', () => { test('should return flatted array', () => { diff --git a/webapp/packages/core-utils/src/formatNumber.test.ts b/webapp/packages/core-utils/src/formatNumber.test.ts index 186879c2c3..cc55368d50 100644 --- a/webapp/packages/core-utils/src/formatNumber.test.ts +++ b/webapp/packages/core-utils/src/formatNumber.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { formatNumber } from './formatNumber'; +import { formatNumber } from './formatNumber.js'; describe('formatNumber', () => { it('should not format number', () => { diff --git a/webapp/packages/core-utils/src/formatNumber.ts b/webapp/packages/core-utils/src/formatNumber.ts index 657bb38729..0cd0942d94 100644 --- a/webapp/packages/core-utils/src/formatNumber.ts +++ b/webapp/packages/core-utils/src/formatNumber.ts @@ -18,7 +18,7 @@ export function formatNumber(n: number, d: number) { const rounded = Math.round((n * power) / Math.pow(10, exponent)) / power; const units = ' kMBTPE'; - const unit = units[exponent / 3]; + const unit = units[exponent / 3]!; return rounded + unit; } diff --git a/webapp/packages/core-utils/src/getCookies.test.ts b/webapp/packages/core-utils/src/getCookies.test.ts index 05713538de..bc567e6095 100644 --- a/webapp/packages/core-utils/src/getCookies.test.ts +++ b/webapp/packages/core-utils/src/getCookies.test.ts @@ -7,7 +7,7 @@ */ import { beforeEach, describe, expect, it } from '@jest/globals'; -import { getCookies } from './getCookies'; +import { getCookies } from './getCookies.js'; describe('getCookies', () => { beforeEach(() => { diff --git a/webapp/packages/core-utils/src/getCookies.ts b/webapp/packages/core-utils/src/getCookies.ts index a3aa67a28f..306532ed8e 100644 --- a/webapp/packages/core-utils/src/getCookies.ts +++ b/webapp/packages/core-utils/src/getCookies.ts @@ -15,7 +15,7 @@ export function getCookies(): Cookies { return document.cookie.split('; ').reduce((cookies: Cookies, cookie: string) => { const [name, value] = cookie.split('='); - cookies[name] = value; + cookies[name!] = value; return cookies; }, {}); diff --git a/webapp/packages/core-utils/src/getMIME.test.ts b/webapp/packages/core-utils/src/getMIME.test.ts index 71c8da6701..7df5750530 100644 --- a/webapp/packages/core-utils/src/getMIME.test.ts +++ b/webapp/packages/core-utils/src/getMIME.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { getMIME } from './getMIME'; +import { getMIME } from './getMIME.js'; describe('getMIME', () => { it("should return 'application/octet-stream' if binary is empty", () => { diff --git a/webapp/packages/core-utils/src/getOS.test.ts b/webapp/packages/core-utils/src/getOS.test.ts index 5b0412694c..07954f396a 100644 --- a/webapp/packages/core-utils/src/getOS.test.ts +++ b/webapp/packages/core-utils/src/getOS.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { getOS, OperatingSystem } from './getOS'; +import { getOS, OperatingSystem } from './getOS.js'; describe('getOS', () => { it('should return windowsOS', () => { diff --git a/webapp/packages/core-utils/src/getPathName.test.ts b/webapp/packages/core-utils/src/getPathName.test.ts index 0e0eefe80c..a914bd2252 100644 --- a/webapp/packages/core-utils/src/getPathName.test.ts +++ b/webapp/packages/core-utils/src/getPathName.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { getPathName } from './getPathName'; +import { getPathName } from './getPathName.js'; jest.mock('./getPathParts', () => ({ getPathParts: (path: string) => path.split('/'), diff --git a/webapp/packages/core-utils/src/getPathName.ts b/webapp/packages/core-utils/src/getPathName.ts index 07e1d11f87..6f5e661b72 100644 --- a/webapp/packages/core-utils/src/getPathName.ts +++ b/webapp/packages/core-utils/src/getPathName.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { getPathParts } from './getPathParts'; +import { getPathParts } from './getPathParts.js'; export function getPathName(path: string) { const parts = getPathParts(path); - return parts[parts.length - 1]; + return parts[parts.length - 1]!; } diff --git a/webapp/packages/core-utils/src/getPathParent.test.ts b/webapp/packages/core-utils/src/getPathParent.test.ts index eef09f42d2..f0ce113ce7 100644 --- a/webapp/packages/core-utils/src/getPathParent.test.ts +++ b/webapp/packages/core-utils/src/getPathParent.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { getPathParent } from './getPathParent'; +import { getPathParent } from './getPathParent.js'; jest.mock('./getPathParts', () => ({ getPathParts: (path: string) => path.split('/'), diff --git a/webapp/packages/core-utils/src/getPathParent.ts b/webapp/packages/core-utils/src/getPathParent.ts index 1002b423c3..5e3cb7a737 100644 --- a/webapp/packages/core-utils/src/getPathParent.ts +++ b/webapp/packages/core-utils/src/getPathParent.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createPath } from './createPath'; -import { getPathParts } from './getPathParts'; +import { createPath } from './createPath.js'; +import { getPathParts } from './getPathParts.js'; export function getPathParent(path: string): string { const parts = getPathParts(path); diff --git a/webapp/packages/core-utils/src/getPathParents.test.ts b/webapp/packages/core-utils/src/getPathParents.test.ts index 3f2f97c542..a57e22154d 100644 --- a/webapp/packages/core-utils/src/getPathParents.test.ts +++ b/webapp/packages/core-utils/src/getPathParents.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { getPathParents } from './getPathParents'; +import { getPathParents } from './getPathParents.js'; jest.mock('./createPath', () => ({ createPath: (...args: string[]) => args.join('/'), diff --git a/webapp/packages/core-utils/src/getPathParents.ts b/webapp/packages/core-utils/src/getPathParents.ts index 7c4622ea0d..4099366153 100644 --- a/webapp/packages/core-utils/src/getPathParents.ts +++ b/webapp/packages/core-utils/src/getPathParents.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createPath } from './createPath'; -import { getPathParts } from './getPathParts'; +import { createPath } from './createPath.js'; +import { getPathParts } from './getPathParts.js'; export function getPathParents(path: string): string[] { const parts = getPathParts(path); diff --git a/webapp/packages/core-utils/src/getPathParts.test.ts b/webapp/packages/core-utils/src/getPathParts.test.ts index a910833900..508732a8c3 100644 --- a/webapp/packages/core-utils/src/getPathParts.test.ts +++ b/webapp/packages/core-utils/src/getPathParts.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { getPathParts } from './getPathParts'; +import { getPathParts } from './getPathParts.js'; describe('getPathParts', () => { it('should return full parts', () => { diff --git a/webapp/packages/core-utils/src/getProgressPercent.test.ts b/webapp/packages/core-utils/src/getProgressPercent.test.ts index d4d47fc8d2..dc23e3931a 100644 --- a/webapp/packages/core-utils/src/getProgressPercent.test.ts +++ b/webapp/packages/core-utils/src/getProgressPercent.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { getProgressPercent } from './getProgressPercent'; +import { getProgressPercent } from './getProgressPercent.js'; describe('getProgressPercent', () => { it('calculates the correct percentage', () => { diff --git a/webapp/packages/core-utils/src/getTextBetween.test.ts b/webapp/packages/core-utils/src/getTextBetween.test.ts index 2914e41713..1d5b02f8d4 100644 --- a/webapp/packages/core-utils/src/getTextBetween.test.ts +++ b/webapp/packages/core-utils/src/getTextBetween.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { getTextBetween } from './getTextBetween'; +import { getTextBetween } from './getTextBetween.js'; describe('Get text between', () => { test('should return text between when arguments are valid', () => { diff --git a/webapp/packages/core-utils/src/getUniqueName.test.ts b/webapp/packages/core-utils/src/getUniqueName.test.ts index 24b9be895a..10381b4212 100644 --- a/webapp/packages/core-utils/src/getUniqueName.test.ts +++ b/webapp/packages/core-utils/src/getUniqueName.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { getUniqueName } from './getUniqueName'; +import { getUniqueName } from './getUniqueName.js'; describe('Get unique name', () => { test('should return "name (1)" when "name" is passed and "name" is presented', () => { diff --git a/webapp/packages/core-utils/src/index.ts b/webapp/packages/core-utils/src/index.ts index a821ad96d9..9344e0c195 100644 --- a/webapp/packages/core-utils/src/index.ts +++ b/webapp/packages/core-utils/src/index.ts @@ -5,86 +5,86 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './Promises/CancellablePromise'; -export * from './Promises/cancellableTimeout'; -export * from './Promises/Deferred'; -export * from './Promises/PromiseCancelledError'; -export * from './Promises/PromiseExecutor'; +export * from './Promises/CancellablePromise.js'; +export * from './Promises/cancellableTimeout.js'; +export * from './Promises/Deferred.js'; +export * from './Promises/PromiseCancelledError.js'; +export * from './Promises/PromiseExecutor.js'; -export * from './Quadtree/index'; +export * from './Quadtree/index.js'; -export * from './underscore'; +export * from './underscore.js'; -export * from './emptyConstants'; -export * from './base64ToBlob'; -export * from './blobToBase64'; -export * from './base64ToHex'; -export * from './bytesToSize'; -export * from './cacheValue'; -export * from './clsx'; -export * from './combineITerableIterators'; -export * from './copyToClipboard'; -export * from './declensionOfNumber'; -export * from './isNotNullDefined'; -export * from './flat'; -export * from './getMIME'; -export * from './getOS'; -export * from './getPathName'; -export * from './getPathParent'; -export * from './getPathParents'; -export * from './getPathParts'; -export * from './GlobalConstants'; -export * from './ILoadableState'; -export * from './errorOf'; -export * from './isArraysEqual'; -export * from './isPrimitive'; -export * from './isPropertiesEqual'; -export * from './isSafari'; -export * from './isSameDay'; -export * from './isValuesEqual'; -export * from './md5'; -export * from './MetadataMap'; -export * from './OrderedMap'; -export * from './parseJSONFlat'; -export * from './pathJoin'; -export * from './parseMIME'; -export * from './PriorityQueue'; -export * from './LoadingError'; -export * from './replaceMiddle'; -export * from './staticImplements'; -export * from './TextTools'; -export * from './throttle'; -export * from './uuid_'; -export * from './isValidUrl'; -export * from './isImageFormat'; -export * from './getCookies'; -export * from './getUniqueName'; -export * from './isMapsEqual'; -export * from './isObjectsEqual'; -export * from './openCenteredPopup'; -export * from './download'; -export * from './downloadFromURL'; -export * from './getTextFileReadingProcess'; -export * from './getTextBetween'; -export * from './timestampToDate'; -export * from './isDefined'; -export * from './createPath'; -export * from './debounce'; -export * from './schema'; -export * from './schemaValidationError'; -export * from './svgToDataUri'; -export * from './TempMap'; -export * from './textToHex'; -export * from './uriToBlob'; -export * from './utf8ToBase64'; -export * from './createLastPromiseGetter'; -export * from './removeMetadataFromDataURL'; -export * from './removeLineBreak'; -export * from './replaceSubstring'; -export * from './formatNumber'; -export * from './withTimestamp'; -export * from './toSafeHtmlString'; -export * from './getProgressPercent'; -export * from './types/UndefinedToNull'; -export * from './bindFunctions'; -export * from './getDomainFromUrl'; +export * from './emptyConstants.js'; +export * from './base64ToBlob.js'; +export * from './blobToBase64.js'; +export * from './base64ToHex.js'; +export * from './bytesToSize.js'; +export * from './cacheValue.js'; +export * from './clsx.js'; +export * from './combineITerableIterators.js'; +export * from './copyToClipboard.js'; +export * from './declensionOfNumber.js'; +export * from './isNotNullDefined.js'; +export * from './flat.js'; +export * from './getMIME.js'; +export * from './getOS.js'; +export * from './getPathName.js'; +export * from './getPathParent.js'; +export * from './getPathParents.js'; +export * from './getPathParts.js'; +export * from './GlobalConstants.js'; +export * from './ILoadableState.js'; +export * from './errorOf.js'; +export * from './isArraysEqual.js'; +export * from './isPrimitive.js'; +export * from './isPropertiesEqual.js'; +export * from './isSafari.js'; +export * from './isSameDay.js'; +export * from './isValuesEqual.js'; +export * from './md5.js'; +export * from './MetadataMap.js'; +export * from './OrderedMap.js'; +export * from './parseJSONFlat.js'; +export * from './pathJoin.js'; +export * from './parseMIME.js'; +export * from './PriorityQueue.js'; +export * from './LoadingError.js'; +export * from './replaceMiddle.js'; +export * from './staticImplements.js'; +export * from './TextTools.js'; +export * from './throttle.js'; +export * from './uuid_.js'; +export * from './isValidUrl.js'; +export * from './isImageFormat.js'; +export * from './getCookies.js'; +export * from './getUniqueName.js'; +export * from './isMapsEqual.js'; +export * from './isObjectsEqual.js'; +export * from './openCenteredPopup.js'; +export * from './download.js'; +export * from './downloadFromURL.js'; +export * from './getTextFileReadingProcess.js'; +export * from './getTextBetween.js'; +export * from './timestampToDate.js'; +export * from './isDefined.js'; +export * from './createPath.js'; +export * from './debounce.js'; +export * from './schema.js'; +export * from './schemaValidationError.js'; +export * from './svgToDataUri.js'; +export * from './TempMap.js'; +export * from './textToHex.js'; +export * from './uriToBlob.js'; +export * from './utf8ToBase64.js'; +export * from './createLastPromiseGetter.js'; +export * from './removeMetadataFromDataURL.js'; +export * from './removeLineBreak.js'; +export * from './replaceSubstring.js'; +export * from './formatNumber.js'; +export * from './withTimestamp.js'; +export * from './toSafeHtmlString.js'; +export * from './getProgressPercent.js'; +export * from './types/UndefinedToNull.js'; +export * from './bindFunctions.js'; +export * from './getDomainFromUrl.js'; diff --git a/webapp/packages/core-utils/src/isArraysEqual.test.ts b/webapp/packages/core-utils/src/isArraysEqual.test.ts index 27ad520480..18aa9a06be 100644 --- a/webapp/packages/core-utils/src/isArraysEqual.test.ts +++ b/webapp/packages/core-utils/src/isArraysEqual.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, jest, test } from '@jest/globals'; -import { isArraysEqual } from './isArraysEqual'; +import { isArraysEqual } from './isArraysEqual.js'; describe('Is array equals', () => { test('should return "true" when arrays are the same', () => { diff --git a/webapp/packages/core-utils/src/isArraysEqual.ts b/webapp/packages/core-utils/src/isArraysEqual.ts index 975f8f5fdf..c6d024499a 100644 --- a/webapp/packages/core-utils/src/isArraysEqual.ts +++ b/webapp/packages/core-utils/src/isArraysEqual.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { isPrimitive } from './isPrimitive'; +import { isPrimitive } from './isPrimitive.js'; const isObjectEqual = (a: T, b: T) => a === b; @@ -17,8 +17,8 @@ export function isArraysEqual(first: T[], second: T[], isEqual: (a: T, b: T) const map = new Map(); for (let i = 0; i < first.length; i++) { - const currentFirst = first[i]; - const currentSecond = second[i]; + const currentFirst = first[i]!; + const currentSecond = second[i]!; if (order && !isEqual(currentFirst, currentSecond)) { return false; @@ -32,12 +32,12 @@ export function isArraysEqual(first: T[], second: T[], isEqual: (a: T, b: T) } for (let i = 0; i < second.length; i++) { - const currentSecond = second[i]; + const currentSecond = second[i]!; const isPrimitiveValue = isPrimitive(currentSecond); if (!isPrimitiveValue) { for (let j = 0; j < first.length; j++) { - if (isEqual(first[j], currentSecond)) { + if (isEqual(first[j]!, currentSecond)) { map.set(currentSecond, Number(map.get(currentSecond)) - 1); break; } diff --git a/webapp/packages/core-utils/src/isDefined.test.ts b/webapp/packages/core-utils/src/isDefined.test.ts index 8ab2e36cb1..7b572fd7b5 100644 --- a/webapp/packages/core-utils/src/isDefined.test.ts +++ b/webapp/packages/core-utils/src/isDefined.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { isDefined } from './isDefined'; +import { isDefined } from './isDefined.js'; describe('Is defined', () => { test('should return "true" when "\'0\'" is passed', () => { diff --git a/webapp/packages/core-utils/src/isImageFormat.test.ts b/webapp/packages/core-utils/src/isImageFormat.test.ts index 5aa142da5c..b5db8c19c1 100644 --- a/webapp/packages/core-utils/src/isImageFormat.test.ts +++ b/webapp/packages/core-utils/src/isImageFormat.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { isImageFormat } from './isImageFormat'; +import { isImageFormat } from './isImageFormat.js'; describe('Is image format', () => { test('should return "true" when link with ".jpeg" extension is passed', () => { diff --git a/webapp/packages/core-utils/src/isMapsEqual.test.ts b/webapp/packages/core-utils/src/isMapsEqual.test.ts index a504169807..f09e8a368d 100644 --- a/webapp/packages/core-utils/src/isMapsEqual.test.ts +++ b/webapp/packages/core-utils/src/isMapsEqual.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { isMapsEqual } from './isMapsEqual'; +import { isMapsEqual } from './isMapsEqual.js'; describe('Is maps equal', () => { test('should return "true" when equal Maps are passed', () => { diff --git a/webapp/packages/core-utils/src/isNotNullDefined.test.ts b/webapp/packages/core-utils/src/isNotNullDefined.test.ts index 5bde3b062e..025ba5ad74 100644 --- a/webapp/packages/core-utils/src/isNotNullDefined.test.ts +++ b/webapp/packages/core-utils/src/isNotNullDefined.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { isNotNullDefined } from './isNotNullDefined'; +import { isNotNullDefined } from './isNotNullDefined.js'; describe('isNotNullDefined', () => { it('should return true', () => { diff --git a/webapp/packages/core-utils/src/isPrimitive.test.ts b/webapp/packages/core-utils/src/isPrimitive.test.ts index ac4b1c845f..c1cd2675d2 100644 --- a/webapp/packages/core-utils/src/isPrimitive.test.ts +++ b/webapp/packages/core-utils/src/isPrimitive.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { isPrimitive } from './isPrimitive'; +import { isPrimitive } from './isPrimitive.js'; describe('isPrimitive', () => { it('should return true', () => { diff --git a/webapp/packages/core-utils/src/isPropertiesEqual.test.ts b/webapp/packages/core-utils/src/isPropertiesEqual.test.ts index fc5f0815bd..0c48db52be 100644 --- a/webapp/packages/core-utils/src/isPropertiesEqual.test.ts +++ b/webapp/packages/core-utils/src/isPropertiesEqual.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { isPropertiesEqual } from './isPropertiesEqual'; +import { isPropertiesEqual } from './isPropertiesEqual.js'; describe('isPropertiesEqual', () => { it('should return true if the two input objects have the same properties and property values, and false otherwise', () => { diff --git a/webapp/packages/core-utils/src/isSameDay.test.ts b/webapp/packages/core-utils/src/isSameDay.test.ts index 38817b2042..b59f9ae9a9 100644 --- a/webapp/packages/core-utils/src/isSameDay.test.ts +++ b/webapp/packages/core-utils/src/isSameDay.test.ts @@ -7,7 +7,7 @@ */ import { describe, it } from '@jest/globals'; -import { isSameDay } from './isSameDay'; +import { isSameDay } from './isSameDay.js'; describe('isSameDay', () => { it('should be same day', () => { diff --git a/webapp/packages/core-utils/src/isValidUrl.test.ts b/webapp/packages/core-utils/src/isValidUrl.test.ts index 4480d99eb0..1a33174eb1 100644 --- a/webapp/packages/core-utils/src/isValidUrl.test.ts +++ b/webapp/packages/core-utils/src/isValidUrl.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { isValidUrl } from './isValidUrl'; +import { isValidUrl } from './isValidUrl.js'; describe('Is valid url', () => { test('should return "true" when valid url with "http" protocol is passed', () => { diff --git a/webapp/packages/core-utils/src/isValidUrl.ts b/webapp/packages/core-utils/src/isValidUrl.ts index 7c7e07a6f1..634916b583 100644 --- a/webapp/packages/core-utils/src/isValidUrl.ts +++ b/webapp/packages/core-utils/src/isValidUrl.ts @@ -7,15 +7,15 @@ */ // test freezes with '5999999999999000000000000000000000000000000' -const urlPattern = new RegExp( - '^(https?:\\/\\/)?' + // protocol - '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name - '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address - '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path - '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string - '(\\#[-a-z\\d_]*)?$', - 'i', -); // fragment locator +// const urlPattern = new RegExp( +// '^(https?:\\/\\/)?' + // protocol +// '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name +// '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address +// '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path +// '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string +// '(\\#[-a-z\\d_]*)?$', +// 'i', +// ); // fragment locator export function isValidUrl(value: string): boolean { return value.startsWith('https://') || value.startsWith('http://'); diff --git a/webapp/packages/core-utils/src/isValuesEqual.test.ts b/webapp/packages/core-utils/src/isValuesEqual.test.ts index 0d71c72aba..fbcb59f296 100644 --- a/webapp/packages/core-utils/src/isValuesEqual.test.ts +++ b/webapp/packages/core-utils/src/isValuesEqual.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { isValuesEqual } from './isValuesEqual'; +import { isValuesEqual } from './isValuesEqual.js'; describe('Is values equal', () => { test('should return "true" when the identical strings are passed', () => { diff --git a/webapp/packages/core-utils/src/openCenteredPopup.test.ts b/webapp/packages/core-utils/src/openCenteredPopup.test.ts index a452c5179e..78dbb387aa 100644 --- a/webapp/packages/core-utils/src/openCenteredPopup.test.ts +++ b/webapp/packages/core-utils/src/openCenteredPopup.test.ts @@ -7,7 +7,7 @@ */ import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'; -import { openCenteredPopup } from './openCenteredPopup'; +import { openCenteredPopup } from './openCenteredPopup.js'; type WindowSpyType = jest.SpiedGetter; diff --git a/webapp/packages/core-utils/src/parseJSONFlat.test.ts b/webapp/packages/core-utils/src/parseJSONFlat.test.ts index 0898220e07..5387786a03 100644 --- a/webapp/packages/core-utils/src/parseJSONFlat.test.ts +++ b/webapp/packages/core-utils/src/parseJSONFlat.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { parseJSONFlat } from './parseJSONFlat'; +import { parseJSONFlat } from './parseJSONFlat.js'; describe('parseJSONFlat', () => { it('should parse null values', () => { diff --git a/webapp/packages/core-utils/src/pathJoin.test.ts b/webapp/packages/core-utils/src/pathJoin.test.ts index 6f428e5172..e2e5a2eaaa 100644 --- a/webapp/packages/core-utils/src/pathJoin.test.ts +++ b/webapp/packages/core-utils/src/pathJoin.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { pathJoin } from './pathJoin'; +import { pathJoin } from './pathJoin.js'; describe('pathJoin', () => { test('joins path segments', () => { diff --git a/webapp/packages/core-utils/src/removeLineBreak.test.ts b/webapp/packages/core-utils/src/removeLineBreak.test.ts index 9398d0bc4e..b0834f313c 100644 --- a/webapp/packages/core-utils/src/removeLineBreak.test.ts +++ b/webapp/packages/core-utils/src/removeLineBreak.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { removeLineBreak } from './removeLineBreak'; +import { removeLineBreak } from './removeLineBreak.js'; describe('removeLineBreak', () => { it('should remove line break characters from a string', () => { diff --git a/webapp/packages/core-utils/src/removeMetadataFromDataURL.test.ts b/webapp/packages/core-utils/src/removeMetadataFromDataURL.test.ts index 2da2369ff6..57ec401e9b 100644 --- a/webapp/packages/core-utils/src/removeMetadataFromDataURL.test.ts +++ b/webapp/packages/core-utils/src/removeMetadataFromDataURL.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, test } from '@jest/globals'; -import { removeMetadataFromDataURL } from './removeMetadataFromDataURL'; +import { removeMetadataFromDataURL } from './removeMetadataFromDataURL.js'; const BASE64 = 'data:application/zip;base64,UEsDBBQACAgIAIB8CVUAAAAAAAAAAAAAAAALAAAAZXdhbGxldC5wZW3Nmceyq0qyhuc8Rc+JExiBgEEP8CC8NzMBEt4j3NNf1trH7D59um/c7slVhCJEVVKUsjK//FP65ZfrxfCirP+N11k7Ml2e+5tpyz7t8n9T+Ohr+hdAk2X+XtEpk/djUZcitcEMR/OcRmM8a4R9yZnBGawCncsdTzsso1WSGXc6voSWMeQpMO3R8lwYheqHxvfostBL22Fpwy29OiJqPLhNgQvd6bgdg7dgPWBkDDOsZrbbZHYVLwPudK1k79VpirZlyROasi04dWTJOr7fzNwbIhoC68nCKqpB4GzRMToanV0M9VcBCm0gsepQGcPZWZOzGCM70Txzy9rPS9P1eafhIG6Jw2my4gEKyWgYBv2IqZfSetjjHgjhG9BQO361HARiEoTf/bIpHpsXPTp6SF/e2mAoGT4/dSkXKJ0sFcTPybY2S0MgjuwjTUwANr0FNmiSqppurQ1SPYhPY6xBrzU4X6HX3hljtwzDkycpSJUIFqznp78LUXKaqy+/DWDAGnXw7aTcWVSR7/K8cH5LGKUzpvW0jfXqjzJW+DdY5620saGli5XG0ibNsIr7A+0AY3a6bJ5YWbDWUWA2Z36C7bRDiOQlchlrpPEKjKWAFK7a7XCa0VPEHcy6BTTfEFZNAki9BOOdeKx4t50aXGVgWLve+VDz5Z6IHk+2TZgGg3nnBsrcxdug7OKWrpqTremQYTlgrrU55QVXCcnHgMESdTMKFgx6zPjYRRM/TxLSbLD2QMxgZxg2RbXCRtRVeePZ5WkQ0Aa0kpy3wb35bI/Xl0Ye+BtpZXRvTnIHUy9PA5txFiN2fSwZ4noz1bGgitJuoWt7T0CcngXEv813HqmFR9JKj+exx3Iv4nlAkroF8wNlVjJkO1hooGg9lJuzzm1KTmllpdMA6PJq9oUEr7zsUqDZIjcVsZei7V9uPGLhiz2Xup9TYezPe0IX2CzuHQiLVWPf2/TZlcBoX9+zaHnbTLLuZsQ5pTs3TQpbxPMDPONEseHJlH5YueYd+vSZ3kXVxKbafZ7Z/HJCQF0gnKJK8Ei2TzEb/Avjl4WQiaisukF85Y3eRNWD3uUH8hJrbgPh/DztLpDKk5dFkQEejjvzxNiLmWQgReFhIDl7+xu8kWPygEaHJN9C1dqPnXCzwlcFthA0t24i7pnXBW2ogErgmuAUt2Ta7vAOIk97lzDNiYVnazSZNJxvZh4jsUgC0NXTFPcErqCsFM71V9LK/hvoY9Q5LOQ2xqxagSoZTU60mrx/F+8TnEvy04rld021haT2K3TibVzBLAjRdMp+AjnVAVUx0r1MHGOeVyJlaXdgn7e4GUBO8pPtwQpYstUPZh3NA0U/NrHj1r3nu2BeD39YIgnwSyxGqnBEEFOv2ed42EyGN+276BRjte5v4+iYVHIR3/PigS3w6bXx5Jw1C9h2Zqy/gOljLXVSqqXz6PeG52M8JX0HjjuuP6T47aOcqGw3vkyz0jTkqnbh11a4UqtPUWqbNwIQb+AAkWwmHjeEb0J+ZBA2KD+HcniVdWIDRjVu5lyOFQX1cLF6l1+61eqh9Qmi+PlpAJFH2S29zej+GtlwLk8iIeh2gSQ+50ZMfXqLHLo80R47Eb9LlulN2GEapa6ecuQ/RAJoOBa8S8LRivfCuMOxdI'; diff --git a/webapp/packages/core-utils/src/removeMetadataFromDataURL.ts b/webapp/packages/core-utils/src/removeMetadataFromDataURL.ts index 291d7d5057..8a90ccaf3b 100644 --- a/webapp/packages/core-utils/src/removeMetadataFromDataURL.ts +++ b/webapp/packages/core-utils/src/removeMetadataFromDataURL.ts @@ -8,12 +8,12 @@ const dataUrlFilter = /data:(.*?)\/(.*?);base64,(.*)/; -export function removeMetadataFromDataURL(base64: string) { +export function removeMetadataFromDataURL(base64: string): string { const matches = base64.match(dataUrlFilter); if (!matches) { return base64; } - return matches[3]; + return matches[3]!; } diff --git a/webapp/packages/core-utils/src/replaceMiddle.test.ts b/webapp/packages/core-utils/src/replaceMiddle.test.ts index baf8d2c44b..6572471a1c 100644 --- a/webapp/packages/core-utils/src/replaceMiddle.test.ts +++ b/webapp/packages/core-utils/src/replaceMiddle.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { replaceMiddle } from './replaceMiddle'; +import { replaceMiddle } from './replaceMiddle.js'; describe('replaceMiddle', () => { it('should replace middle of string', () => { diff --git a/webapp/packages/core-utils/src/replaceSubstring.test.ts b/webapp/packages/core-utils/src/replaceSubstring.test.ts index b4206955fd..8c12b45e66 100644 --- a/webapp/packages/core-utils/src/replaceSubstring.test.ts +++ b/webapp/packages/core-utils/src/replaceSubstring.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { replaceSubstring } from './replaceSubstring'; +import { replaceSubstring } from './replaceSubstring.js'; describe('replaceSubstring', () => { it('should replace a substring correctly', () => { diff --git a/webapp/packages/core-utils/src/svgToDataUri.test.ts b/webapp/packages/core-utils/src/svgToDataUri.test.ts index fe171200bd..1d392b1d55 100644 --- a/webapp/packages/core-utils/src/svgToDataUri.test.ts +++ b/webapp/packages/core-utils/src/svgToDataUri.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { svgToDataUri } from './svgToDataUri'; +import { svgToDataUri } from './svgToDataUri.js'; jest.mock('./utf8ToBase64', () => ({ utf8ToBase64: jest.fn((str: string) => str), diff --git a/webapp/packages/core-utils/src/svgToDataUri.ts b/webapp/packages/core-utils/src/svgToDataUri.ts index e7e409b2e7..ec808ba4f9 100644 --- a/webapp/packages/core-utils/src/svgToDataUri.ts +++ b/webapp/packages/core-utils/src/svgToDataUri.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { utf8ToBase64 } from './utf8ToBase64'; +import { utf8ToBase64 } from './utf8ToBase64.js'; const doctype = ']>'; diff --git a/webapp/packages/core-utils/src/textToHex.test.ts b/webapp/packages/core-utils/src/textToHex.test.ts index 392425db27..617fddf8e5 100644 --- a/webapp/packages/core-utils/src/textToHex.test.ts +++ b/webapp/packages/core-utils/src/textToHex.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { textToHex } from './textToHex'; +import { textToHex } from './textToHex.js'; const value = 'test value'; diff --git a/webapp/packages/core-utils/src/throttle.test.ts b/webapp/packages/core-utils/src/throttle.test.ts index a7e4d0f823..9b6ffefc76 100644 --- a/webapp/packages/core-utils/src/throttle.test.ts +++ b/webapp/packages/core-utils/src/throttle.test.ts @@ -7,7 +7,7 @@ */ import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'; -import { throttle } from './throttle'; +import { throttle } from './throttle.js'; describe('throttle', () => { beforeEach(() => { @@ -58,10 +58,10 @@ describe('throttle', () => { expect(callback).toHaveBeenCalledTimes(2); - expect(callback.mock.calls[0][0]).toBe(1); - expect(callback.mock.calls[0][1]).toBe(2); + expect(callback.mock.calls[0]?.[0]).toBe(1); + expect(callback.mock.calls[0]?.[1]).toBe(2); - expect(callback.mock.calls[1][0]).toBe(4); - expect(callback.mock.calls[1][1]).toBe(5); + expect(callback.mock.calls[1]?.[0]).toBe(4); + expect(callback.mock.calls[1]?.[1]).toBe(5); }); }); diff --git a/webapp/packages/core-utils/src/timestampToDate.test.ts b/webapp/packages/core-utils/src/timestampToDate.test.ts index e412fddb59..226effcf13 100644 --- a/webapp/packages/core-utils/src/timestampToDate.test.ts +++ b/webapp/packages/core-utils/src/timestampToDate.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { timestampToDate } from './timestampToDate'; +import { timestampToDate } from './timestampToDate.js'; describe('timestampToDate', () => { it('should convert timestamp to date', () => { diff --git a/webapp/packages/core-utils/src/toSafeHtmlString.test.ts b/webapp/packages/core-utils/src/toSafeHtmlString.test.ts index f30f5b63d6..2681b0f14e 100644 --- a/webapp/packages/core-utils/src/toSafeHtmlString.test.ts +++ b/webapp/packages/core-utils/src/toSafeHtmlString.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { toSafeHtmlString } from './toSafeHtmlString'; +import { toSafeHtmlString } from './toSafeHtmlString.js'; describe('toSafeHtmlString', () => { it('should make html string safe', () => { diff --git a/webapp/packages/core-utils/src/uriToBlob.test.ts b/webapp/packages/core-utils/src/uriToBlob.test.ts index aebba906a9..a8696a4319 100644 --- a/webapp/packages/core-utils/src/uriToBlob.test.ts +++ b/webapp/packages/core-utils/src/uriToBlob.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { uriToBlob } from './uriToBlob'; +import { uriToBlob } from './uriToBlob.js'; describe('uriToBlob', () => { it('should convert a Data URI to a Blob object', () => { diff --git a/webapp/packages/core-utils/src/uriToBlob.ts b/webapp/packages/core-utils/src/uriToBlob.ts index 35eea76033..d606313454 100644 --- a/webapp/packages/core-utils/src/uriToBlob.ts +++ b/webapp/packages/core-utils/src/uriToBlob.ts @@ -7,8 +7,8 @@ */ export function uriToBlob(uri: string): Blob { - const byteString = window.atob(uri.split(',')[1]); - const mimeString = uri.split(',')[0].split(':')[1].split(';')[0]; + const byteString = window.atob(uri.split(',')[1]!); + const mimeString = uri.split(',')[0]?.split(':')[1]!.split(';')[0]; const buffer = new ArrayBuffer(byteString.length); const view = new Uint8Array(buffer); diff --git a/webapp/packages/core-utils/src/utf8ToBase64.test.ts b/webapp/packages/core-utils/src/utf8ToBase64.test.ts index f5d0412b8f..28628259b9 100644 --- a/webapp/packages/core-utils/src/utf8ToBase64.test.ts +++ b/webapp/packages/core-utils/src/utf8ToBase64.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it } from '@jest/globals'; -import { utf8ToBase64 } from './utf8ToBase64'; +import { utf8ToBase64 } from './utf8ToBase64.js'; describe('utf8ToBase64', () => { it('should convert utf8 to base64', () => { diff --git a/webapp/packages/core-utils/src/withTimestamp.test.ts b/webapp/packages/core-utils/src/withTimestamp.test.ts index 6111561f2d..f5db368b80 100644 --- a/webapp/packages/core-utils/src/withTimestamp.test.ts +++ b/webapp/packages/core-utils/src/withTimestamp.test.ts @@ -7,7 +7,7 @@ */ import { describe, expect, it, jest } from '@jest/globals'; -import { withTimestamp } from './withTimestamp'; +import { withTimestamp } from './withTimestamp.js'; describe('withTimestamp', () => { it('should generate a value with timestamp at the end', () => { diff --git a/webapp/packages/core-version-update/package.json b/webapp/packages/core-version-update/package.json index f2d6fae50d..40f735b052 100644 --- a/webapp/packages/core-version-update/package.json +++ b/webapp/packages/core-version-update/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-version-update", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-version-update/src/LocaleService.ts b/webapp/packages/core-version-update/src/LocaleService.ts index e7b46864f9..b881162aaf 100644 --- a/webapp/packages/core-version-update/src/LocaleService.ts +++ b/webapp/packages/core-version-update/src/LocaleService.ts @@ -14,24 +14,22 @@ export class VersionUpdateLocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-version-update/src/VersionUpdateService.ts b/webapp/packages/core-version-update/src/VersionUpdateService.ts index 29ecbae77d..3817cd5873 100644 --- a/webapp/packages/core-version-update/src/VersionUpdateService.ts +++ b/webapp/packages/core-version-update/src/VersionUpdateService.ts @@ -8,7 +8,7 @@ import { computed, makeObservable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { IVersion, VersionResource, VersionService } from '@cloudbeaver/core-version'; +import { type IVersion, VersionResource, VersionService } from '@cloudbeaver/core-version'; interface IInstructionProps { version: IVersion; diff --git a/webapp/packages/core-version-update/src/index.ts b/webapp/packages/core-version-update/src/index.ts index 1f90a4c28c..dbe8d8409e 100644 --- a/webapp/packages/core-version-update/src/index.ts +++ b/webapp/packages/core-version-update/src/index.ts @@ -1,3 +1,10 @@ -export { manifest as coreVersionUpdateManifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export { manifest as coreVersionUpdateManifest } from './manifest.js'; -export * from './VersionUpdateService'; +export * from './VersionUpdateService.js'; diff --git a/webapp/packages/core-version-update/src/manifest.ts b/webapp/packages/core-version-update/src/manifest.ts index 51b0d1929b..8d182f855f 100644 --- a/webapp/packages/core-version-update/src/manifest.ts +++ b/webapp/packages/core-version-update/src/manifest.ts @@ -13,7 +13,7 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./VersionUpdateService').then(m => m.VersionUpdateService), - () => import('./LocaleService').then(m => m.VersionUpdateLocaleService), + () => import('./VersionUpdateService.js').then(m => m.VersionUpdateService), + () => import('./LocaleService.js').then(m => m.VersionUpdateLocaleService), ], }; diff --git a/webapp/packages/core-version/package.json b/webapp/packages/core-version/package.json index 1d75a6cf14..d49c8266dc 100644 --- a/webapp/packages/core-version/package.json +++ b/webapp/packages/core-version/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-version", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-version/src/VersionLocaleService.ts b/webapp/packages/core-version/src/VersionLocaleService.ts index c74671c326..87fa41e15a 100644 --- a/webapp/packages/core-version/src/VersionLocaleService.ts +++ b/webapp/packages/core-version/src/VersionLocaleService.ts @@ -14,26 +14,24 @@ export class VersionLocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; case 'de': - return (await import('./locales/de')).default; + return (await import('./locales/de.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-version/src/index.ts b/webapp/packages/core-version/src/index.ts index e52df73284..741346835c 100644 --- a/webapp/packages/core-version/src/index.ts +++ b/webapp/packages/core-version/src/index.ts @@ -1,5 +1,12 @@ -export { manifest as coreVersionManifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export { manifest as coreVersionManifest } from './manifest.js'; -export * from './VersionResource'; -export * from './VersionService'; -export * from './useAppVersion'; +export * from './VersionResource.js'; +export * from './VersionService.js'; +export * from './useAppVersion.js'; diff --git a/webapp/packages/core-version/src/manifest.ts b/webapp/packages/core-version/src/manifest.ts index c092433a8e..6ae16ada96 100644 --- a/webapp/packages/core-version/src/manifest.ts +++ b/webapp/packages/core-version/src/manifest.ts @@ -13,8 +13,8 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./VersionService').then(m => m.VersionService), - () => import('./VersionResource').then(m => m.VersionResource), - () => import('./VersionLocaleService').then(m => m.VersionLocaleService), + () => import('./VersionService.js').then(m => m.VersionService), + () => import('./VersionResource.js').then(m => m.VersionResource), + () => import('./VersionLocaleService.js').then(m => m.VersionLocaleService), ], }; diff --git a/webapp/packages/core-version/src/useAppVersion.tsx b/webapp/packages/core-version/src/useAppVersion.tsx index 9eff821132..fccd4e3db6 100644 --- a/webapp/packages/core-version/src/useAppVersion.tsx +++ b/webapp/packages/core-version/src/useAppVersion.tsx @@ -7,7 +7,7 @@ */ import { useService } from '@cloudbeaver/core-di'; -import { VersionService } from './VersionService'; +import { VersionService } from './VersionService.js'; export function useAppVersion(short = false) { const versionService = useService(VersionService); diff --git a/webapp/packages/core-view/package.json b/webapp/packages/core-view/package.json index 6b70d0be31..ba234d189a 100644 --- a/webapp/packages/core-view/package.json +++ b/webapp/packages/core-view/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-view", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-view/src/Action/ActionItem.ts b/webapp/packages/core-view/src/Action/ActionItem.ts index 4f1ca21084..1e8c4d8bfa 100644 --- a/webapp/packages/core-view/src/Action/ActionItem.ts +++ b/webapp/packages/core-view/src/Action/ActionItem.ts @@ -8,11 +8,11 @@ import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import { flat } from '@cloudbeaver/core-utils'; -import type { IAction } from './IAction'; -import type { IActionHandler } from './IActionHandler'; -import type { IActionInfo } from './IActionInfo'; -import type { IActionItem } from './IActionItem'; -import type { IKeyBindingHandler } from './KeyBinding/IKeyBindingHandler'; +import type { IAction } from './IAction.js'; +import type { IActionHandler } from './IActionHandler.js'; +import type { IActionInfo } from './IActionInfo.js'; +import type { IActionItem } from './IActionItem.js'; +import type { IKeyBindingHandler } from './KeyBinding/IKeyBindingHandler.js'; export class ActionItem implements IActionItem { readonly action: IAction; diff --git a/webapp/packages/core-view/src/Action/ActionService.ts b/webapp/packages/core-view/src/Action/ActionService.ts index aed9fa3122..47c27fba28 100644 --- a/webapp/packages/core-view/src/Action/ActionService.ts +++ b/webapp/packages/core-view/src/Action/ActionService.ts @@ -9,12 +9,12 @@ import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import { injectable } from '@cloudbeaver/core-di'; import { isNotNullDefined } from '@cloudbeaver/core-utils'; -import { DATA_CONTEXT_MENU } from '../Menu/DATA_CONTEXT_MENU'; -import { ActionItem } from './ActionItem'; -import type { IAction } from './IAction'; -import type { IActionHandler, IActionHandlerOptions } from './IActionHandler'; -import type { IActionItem } from './IActionItem'; -import { KeyBindingService } from './KeyBinding/KeyBindingService'; +import { DATA_CONTEXT_MENU } from '../Menu/DATA_CONTEXT_MENU.js'; +import { ActionItem } from './ActionItem.js'; +import type { IAction } from './IAction.js'; +import type { IActionHandler, IActionHandlerOptions } from './IActionHandler.js'; +import type { IActionItem } from './IActionItem.js'; +import { KeyBindingService } from './KeyBinding/KeyBindingService.js'; @injectable() export class ActionService { diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_ADD.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_ADD.ts index 53662e2970..c420862e3a 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_ADD.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_ADD.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_ADD = createAction('add', { label: 'ui_add', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_CANCEL.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_CANCEL.ts index 185565f41e..7d3bbd25de 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_CANCEL.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_CANCEL.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_CANCEL = createAction('cancel', { label: 'ui_processing_cancel', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_COLLAPSE_ALL.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_COLLAPSE_ALL.ts index 14fb1f0313..d8b1e5f4e0 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_COLLAPSE_ALL.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_COLLAPSE_ALL.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_COLLAPSE_ALL = createAction('collapse-all', { label: 'collapse-all', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_CREATE.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_CREATE.ts index a76bd006ee..376a3e3ea7 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_CREATE.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_CREATE.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_CREATE = createAction('create', { label: 'core_view_action_create_label', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_DELETE.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_DELETE.ts index f748ab4ce5..97c2f1775a 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_DELETE.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_DELETE.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_DELETE = createAction('delete', { label: 'ui_delete', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_DOWNLOAD.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_DOWNLOAD.ts index f09741f49c..236392106c 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_DOWNLOAD.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_DOWNLOAD.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_DOWNLOAD = createAction('download', { label: 'ui_download', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_DUPLICATE.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_DUPLICATE.ts index fa7570fad0..6756e3c3fb 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_DUPLICATE.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_DUPLICATE.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_DUPLICATE = createAction('duplicate', { label: 'ui_duplicate', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_EDIT.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_EDIT.ts index 3f822fd467..3510873dce 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_EDIT.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_EDIT.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_EDIT = createAction('edit', { label: 'core_view_action_edit_label', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_EXPORT.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_EXPORT.ts index f5c31aeea4..24ae1c93fa 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_EXPORT.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_EXPORT.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_EXPORT = createAction('export', { label: 'ui_export', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_FILTER.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_FILTER.ts index 3928725ff6..3580feb099 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_FILTER.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_FILTER.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_FILTER = createAction('filter', { label: 'filter', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_IMPORT.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_IMPORT.ts index 3f2501fbcc..3b19d60f4f 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_IMPORT.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_IMPORT.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_IMPORT = createAction('import', { label: 'ui_import', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_LAYOUT.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_LAYOUT.ts index 9d235e1738..f11298c219 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_LAYOUT.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_LAYOUT.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_LAYOUT = createAction('layout', { label: 'core_view_layout', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_NEW_FOLDER.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_NEW_FOLDER.ts index ad0282be52..b96c496d6d 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_NEW_FOLDER.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_NEW_FOLDER.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_NEW_FOLDER = createAction('create-folder', { label: 'core_view_action_new_folder', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_OPEN.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_OPEN.ts index 4f286988cf..609055f258 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_OPEN.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_OPEN.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_OPEN = createAction('open', { label: 'app_navigationTree_openNodeTab', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_OPEN_IN_TAB.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_OPEN_IN_TAB.ts index d2e57ccbde..d688f2d3bd 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_OPEN_IN_TAB.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_OPEN_IN_TAB.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_OPEN_IN_TAB = createAction('open-in-tab', { label: 'ui_open_in_tab', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_REDO.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_REDO.ts index 818b9f36e6..e7d59be64a 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_REDO.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_REDO.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_REDO = createAction('redo', { label: 'ui_redo', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_REFRESH.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_REFRESH.ts index 37c072138d..003a80bd92 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_REFRESH.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_REFRESH.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_REFRESH = createAction('refresh', { label: 'app_navigationTree_refresh', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_RENAME.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_RENAME.ts index 694f97b5ce..476c93e5fd 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_RENAME.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_RENAME.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_RENAME = createAction('rename', { label: 'ui_rename', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_REVERT.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_REVERT.ts index 010d7f5600..531d6fd445 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_REVERT.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_REVERT.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_REVERT = createAction('revert', { label: 'ui_revert', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_SAVE.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_SAVE.ts index 7a508f4a48..04ac9b0959 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_SAVE.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_SAVE.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_SAVE = createAction('save', { label: 'ui_processing_save', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_SETTINGS.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_SETTINGS.ts index ae4babe776..084f57efa4 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_SETTINGS.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_SETTINGS.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_SETTINGS = createAction('settings', { label: 'ui_settings', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_UNDO.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_UNDO.ts index e0bedb449f..758e939432 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_UNDO.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_UNDO.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_UNDO = createAction('undo', { label: 'ui_undo', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_UPLOAD.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_UPLOAD.ts index f3b20c8c15..dbeff7fb85 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_UPLOAD.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_UPLOAD.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_UPLOAD = createAction('upload', { label: 'ui_upload', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_ZOOM_IN.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_ZOOM_IN.ts index 31d2613555..536eac3898 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_ZOOM_IN.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_ZOOM_IN.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_ZOOM_IN = createAction('zoom-in', { label: 'core_view_zoom_in', diff --git a/webapp/packages/core-view/src/Action/Actions/ACTION_ZOOM_OUT.ts b/webapp/packages/core-view/src/Action/Actions/ACTION_ZOOM_OUT.ts index bfc14c39ff..5f63cb7822 100644 --- a/webapp/packages/core-view/src/Action/Actions/ACTION_ZOOM_OUT.ts +++ b/webapp/packages/core-view/src/Action/Actions/ACTION_ZOOM_OUT.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createAction } from '../createAction'; +import { createAction } from '../createAction.js'; export const ACTION_ZOOM_OUT = createAction('zoom-out', { label: 'core_view_zoom_out', diff --git a/webapp/packages/core-view/src/Action/IAction.ts b/webapp/packages/core-view/src/Action/IAction.ts index 0ee33d5419..9362ef6e80 100644 --- a/webapp/packages/core-view/src/Action/IAction.ts +++ b/webapp/packages/core-view/src/Action/IAction.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IActionInfo } from './IActionInfo'; +import type { IActionInfo } from './IActionInfo.js'; export interface IAction { id: string; diff --git a/webapp/packages/core-view/src/Action/IActionHandler.ts b/webapp/packages/core-view/src/Action/IActionHandler.ts index f1d496fd29..007c988c4d 100644 --- a/webapp/packages/core-view/src/Action/IActionHandler.ts +++ b/webapp/packages/core-view/src/Action/IActionHandler.ts @@ -8,9 +8,9 @@ import type { DataContextGetter, IDataContextProvider } from '@cloudbeaver/core-data-context'; import type { ILoadableState } from '@cloudbeaver/core-utils'; -import type { IMenu } from '../Menu/IMenu'; -import type { IAction } from './IAction'; -import type { IActionInfo } from './IActionInfo'; +import type { IMenu } from '../Menu/IMenu.js'; +import type { IAction } from './IAction.js'; +import type { IActionInfo } from './IActionInfo.js'; export interface IActionHandler { id: string; diff --git a/webapp/packages/core-view/src/Action/IActionItem.ts b/webapp/packages/core-view/src/Action/IActionItem.ts index 0145972c17..fd7a37e5ea 100644 --- a/webapp/packages/core-view/src/Action/IActionItem.ts +++ b/webapp/packages/core-view/src/Action/IActionItem.ts @@ -5,10 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAction } from './IAction'; -import type { IActionHandler } from './IActionHandler'; -import type { IActionInfo } from './IActionInfo'; -import type { IKeyBindingHandler } from './KeyBinding/IKeyBindingHandler'; +import type { IAction } from './IAction.js'; +import type { IActionHandler } from './IActionHandler.js'; +import type { IActionInfo } from './IActionInfo.js'; +import type { IKeyBindingHandler } from './KeyBinding/IKeyBindingHandler.js'; export interface IActionItem { action: IAction; diff --git a/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_OPEN_IN_TAB.ts b/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_OPEN_IN_TAB.ts index 438321acce..4fe905625a 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_OPEN_IN_TAB.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_OPEN_IN_TAB.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createKeyBinding } from '../createKeyBinding'; +import { createKeyBinding } from '../createKeyBinding.js'; export const KEY_BINDING_OPEN_IN_TAB = createKeyBinding({ id: 'open-in-tab', diff --git a/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_REDO.ts b/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_REDO.ts index 795778fd97..55505ac576 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_REDO.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_REDO.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createKeyBinding } from '../createKeyBinding'; +import { createKeyBinding } from '../createKeyBinding.js'; export const KEY_BINDING_REDO = createKeyBinding({ id: 'redo', diff --git a/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_SAVE.ts b/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_SAVE.ts index 0ad524b1ff..7ed2ee6d53 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_SAVE.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_SAVE.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createKeyBinding } from '../createKeyBinding'; +import { createKeyBinding } from '../createKeyBinding.js'; export const KEY_BINDING_SAVE = createKeyBinding({ id: 'save', diff --git a/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_UNDO.ts b/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_UNDO.ts index a07786db74..7c5264f346 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_UNDO.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/Bindings/KEY_BINDING_UNDO.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createKeyBinding } from '../createKeyBinding'; +import { createKeyBinding } from '../createKeyBinding.js'; export const KEY_BINDING_UNDO = createKeyBinding({ id: 'undo', diff --git a/webapp/packages/core-view/src/Action/KeyBinding/IKeyBindingHandler.ts b/webapp/packages/core-view/src/Action/KeyBinding/IKeyBindingHandler.ts index d66e5155ed..5cb9b6a52b 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/IKeyBindingHandler.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/IKeyBindingHandler.ts @@ -7,8 +7,8 @@ */ import type { DataContextGetter, IDataContextProvider } from '@cloudbeaver/core-data-context'; -import type { IAction } from '../../Action/IAction'; -import type { IKeyBinding } from './IKeyBinding'; +import type { IAction } from '../../Action/IAction.js'; +import type { IKeyBinding } from './IKeyBinding.js'; export interface IKeyBindingHandler { id: string; diff --git a/webapp/packages/core-view/src/Action/KeyBinding/KeyBindingService.ts b/webapp/packages/core-view/src/Action/KeyBinding/KeyBindingService.ts index b5647ad1f0..9bf762091b 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/KeyBindingService.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/KeyBindingService.ts @@ -8,8 +8,8 @@ import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import { injectable } from '@cloudbeaver/core-di'; -import type { IAction } from '../../Action/IAction'; -import type { IKeyBindingHandler, IKeyBindingHandlerOptions } from './IKeyBindingHandler'; +import type { IAction } from '../../Action/IAction.js'; +import type { IKeyBindingHandler, IKeyBindingHandlerOptions } from './IKeyBindingHandler.js'; @injectable() export class KeyBindingService { diff --git a/webapp/packages/core-view/src/Action/KeyBinding/createKeyBinding.ts b/webapp/packages/core-view/src/Action/KeyBinding/createKeyBinding.ts index 863b18da78..fa7e947394 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/createKeyBinding.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/createKeyBinding.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IKeyBinding } from './IKeyBinding'; +import type { IKeyBinding } from './IKeyBinding.js'; interface IKeyBindingOptions { id: string; diff --git a/webapp/packages/core-view/src/Action/KeyBinding/getBindingLabel.ts b/webapp/packages/core-view/src/Action/KeyBinding/getBindingLabel.ts index e8a0de19ce..9028cc3193 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/getBindingLabel.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/getBindingLabel.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { getOSSpecificKeys } from './getCommonAndOSSpecificKeys'; -import type { IKeyBinding } from './IKeyBinding'; +import { getOSSpecificKeys } from './getCommonAndOSSpecificKeys.js'; +import type { IKeyBinding } from './IKeyBinding.js'; export function getBindingLabel(binding: IKeyBinding) { let bindingLabel = getOSSpecificKeys(binding) ?? binding.keys; diff --git a/webapp/packages/core-view/src/Action/KeyBinding/getCommonAndOSSpecificKeys.ts b/webapp/packages/core-view/src/Action/KeyBinding/getCommonAndOSSpecificKeys.ts index 43bd1b5106..306091b008 100644 --- a/webapp/packages/core-view/src/Action/KeyBinding/getCommonAndOSSpecificKeys.ts +++ b/webapp/packages/core-view/src/Action/KeyBinding/getCommonAndOSSpecificKeys.ts @@ -7,7 +7,7 @@ */ import { getOS, OperatingSystem } from '@cloudbeaver/core-utils'; -import type { IKeyBinding } from './IKeyBinding'; +import type { IKeyBinding } from './IKeyBinding.js'; export function getCommonAndOSSpecificKeys(keyBinding: IKeyBinding | undefined): string[] { if (keyBinding === undefined) { diff --git a/webapp/packages/core-view/src/Action/createAction.ts b/webapp/packages/core-view/src/Action/createAction.ts index 974d764db3..07704e0aff 100644 --- a/webapp/packages/core-view/src/Action/createAction.ts +++ b/webapp/packages/core-view/src/Action/createAction.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAction } from './IAction'; -import type { IActionInfo } from './IActionInfo'; +import type { IAction } from './IAction.js'; +import type { IActionInfo } from './IActionInfo.js'; const actionSymbol = Symbol('@action'); diff --git a/webapp/packages/core-view/src/LoadableStateContext/DATA_CONTEXT_LOADABLE_STATE.ts b/webapp/packages/core-view/src/LoadableStateContext/DATA_CONTEXT_LOADABLE_STATE.ts index 0a70918004..1ab00124fa 100644 --- a/webapp/packages/core-view/src/LoadableStateContext/DATA_CONTEXT_LOADABLE_STATE.ts +++ b/webapp/packages/core-view/src/LoadableStateContext/DATA_CONTEXT_LOADABLE_STATE.ts @@ -8,7 +8,7 @@ import { observable } from 'mobx'; import { createDataContext } from '@cloudbeaver/core-data-context'; -import { flat, ILoadableState } from '@cloudbeaver/core-utils'; +import { flat, type ILoadableState } from '@cloudbeaver/core-utils'; interface ILoadableStateContext { readonly loaders: ILoadableState[]; diff --git a/webapp/packages/core-view/src/LocaleService.ts b/webapp/packages/core-view/src/LocaleService.ts index 483bb120d5..e74d5b618b 100644 --- a/webapp/packages/core-view/src/LocaleService.ts +++ b/webapp/packages/core-view/src/LocaleService.ts @@ -14,26 +14,24 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; case 'de': - return (await import('./locales/de')).default; + return (await import('./locales/de.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/core-view/src/Menu/DATA_CONTEXT_MENU.ts b/webapp/packages/core-view/src/Menu/DATA_CONTEXT_MENU.ts index d257a28de7..58ed6fded9 100644 --- a/webapp/packages/core-view/src/Menu/DATA_CONTEXT_MENU.ts +++ b/webapp/packages/core-view/src/Menu/DATA_CONTEXT_MENU.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { IMenu } from './IMenu'; +import type { IMenu } from './IMenu.js'; export const DATA_CONTEXT_MENU = createDataContext('menu'); diff --git a/webapp/packages/core-view/src/Menu/DATA_CONTEXT_SUBMENU_ITEM.ts b/webapp/packages/core-view/src/Menu/DATA_CONTEXT_SUBMENU_ITEM.ts index ef766d233e..11ab9c2790 100644 --- a/webapp/packages/core-view/src/Menu/DATA_CONTEXT_SUBMENU_ITEM.ts +++ b/webapp/packages/core-view/src/Menu/DATA_CONTEXT_SUBMENU_ITEM.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { IMenuSubMenuItem } from './MenuItem/IMenuSubMenuItem'; +import type { IMenuSubMenuItem } from './MenuItem/IMenuSubMenuItem.js'; export const DATA_CONTEXT_SUBMENU_ITEM = createDataContext('submenu-item'); diff --git a/webapp/packages/core-view/src/Menu/IMenu.ts b/webapp/packages/core-view/src/Menu/IMenu.ts index 734c8db974..4ef0fd5950 100644 --- a/webapp/packages/core-view/src/Menu/IMenu.ts +++ b/webapp/packages/core-view/src/Menu/IMenu.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAction } from '../Action/IAction'; +import type { IAction } from '../Action/IAction.js'; export interface IMenu { id: string; diff --git a/webapp/packages/core-view/src/Menu/IMenuHandler.ts b/webapp/packages/core-view/src/Menu/IMenuHandler.ts index 54b19e6980..94d7e3ed61 100644 --- a/webapp/packages/core-view/src/Menu/IMenuHandler.ts +++ b/webapp/packages/core-view/src/Menu/IMenuHandler.ts @@ -8,8 +8,8 @@ import type { DataContextGetter, IDataContextProvider } from '@cloudbeaver/core-data-context'; import type { ILoadableState } from '@cloudbeaver/core-utils'; -import type { IMenu } from './IMenu'; -import type { MenuSubMenuItemIconComponent } from './MenuItem/IMenuSubMenuItem'; +import type { IMenu } from './IMenu.js'; +import type { MenuSubMenuItemIconComponent } from './MenuItem/IMenuSubMenuItem.js'; export interface IMenuHandler { id: string; diff --git a/webapp/packages/core-view/src/Menu/IMenuItemsCreator.ts b/webapp/packages/core-view/src/Menu/IMenuItemsCreator.ts index 43665c8957..e16fd83e6c 100644 --- a/webapp/packages/core-view/src/Menu/IMenuItemsCreator.ts +++ b/webapp/packages/core-view/src/Menu/IMenuItemsCreator.ts @@ -7,9 +7,9 @@ */ import type { DataContextGetter, IDataContextProvider } from '@cloudbeaver/core-data-context'; -import type { IAction } from '../Action/IAction'; -import type { IMenu } from './IMenu'; -import type { IMenuItem } from './MenuItem/IMenuItem'; +import type { IAction } from '../Action/IAction.js'; +import type { IMenu } from './IMenu.js'; +import type { IMenuItem } from './MenuItem/IMenuItem.js'; export type MenuCreatorItem = IMenuItem | IAction | IMenu; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/IMenuActionItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/IMenuActionItem.ts index 2740610d0f..7fe82294d3 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/IMenuActionItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/IMenuActionItem.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IActionItem } from '../../Action/IActionItem'; -import type { IMenuItem } from './IMenuItem'; +import type { IActionItem } from '../../Action/IActionItem.js'; +import type { IMenuItem } from './IMenuItem.js'; export interface IMenuActionItem extends IMenuItem { action: IActionItem; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/IMenuBaseItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/IMenuBaseItem.ts index 6c85b0a74a..b99ac34819 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/IMenuBaseItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/IMenuBaseItem.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuItem } from './IMenuItem'; +import type { IMenuItem } from './IMenuItem.js'; interface IMenuBaseItemCommonProperties { label?: string; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/IMenuCheckboxItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/IMenuCheckboxItem.ts index ef7decb47e..d572fda629 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/IMenuCheckboxItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/IMenuCheckboxItem.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuItem } from './IMenuItem'; +import type { IMenuItem } from './IMenuItem.js'; interface IMenuCheckboxItemCommonProperties { checked?: boolean; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/IMenuCustomItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/IMenuCustomItem.ts index e67efbdbf1..185d3c3f04 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/IMenuCustomItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/IMenuCustomItem.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { IDataContext } from '@cloudbeaver/core-data-context'; +import { type IDataContext } from '@cloudbeaver/core-data-context'; -import type { IMenuItem } from './IMenuItem'; +import type { IMenuItem } from './IMenuItem.js'; interface IMenuCustomItemCommonProperties { hidden?: boolean; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/IMenuGroupItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/IMenuGroupItem.ts index 0d9794b603..0c40d2bbcf 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/IMenuGroupItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/IMenuGroupItem.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuItem } from './IMenuItem'; +import type { IMenuItem } from './IMenuItem.js'; export interface IMenuGroupItem extends IMenuItem { items: IMenuItem[]; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/IMenuLazyItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/IMenuLazyItem.ts index 184a9c073f..fe3f3c68eb 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/IMenuLazyItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/IMenuLazyItem.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuItem } from './IMenuItem'; +import type { IMenuItem } from './IMenuItem.js'; export interface IMenuLazyItem extends IMenuItem { task: Promise | null; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/IMenuSeparatorItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/IMenuSeparatorItem.ts index 0e14b48afe..55a238e8a7 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/IMenuSeparatorItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/IMenuSeparatorItem.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuItem } from './IMenuItem'; +import type { IMenuItem } from './IMenuItem.js'; export type IMenuSeparatorItem = IMenuItem; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/IMenuSubMenuItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/IMenuSubMenuItem.ts index b80ba2fe15..6c3f8d7e98 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/IMenuSubMenuItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/IMenuSubMenuItem.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenu } from '../IMenu'; -import type { IMenuActionItem } from './IMenuActionItem'; -import type { IMenuItem, IMenuItemEvents } from './IMenuItem'; +import type { IMenu } from '../IMenu.js'; +import type { IMenuActionItem } from './IMenuActionItem.js'; +import type { IMenuItem, IMenuItemEvents } from './IMenuItem.js'; export interface IMenuSubMenuEvents extends IMenuItemEvents { onOpen?: () => void; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuActionItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuActionItem.ts index 4387c49d89..451fc6e137 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuActionItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuActionItem.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IActionItem } from '../../Action/IActionItem'; -import type { IMenuActionItem } from './IMenuActionItem'; -import { MenuItem } from './MenuItem'; +import type { IActionItem } from '../../Action/IActionItem.js'; +import type { IMenuActionItem } from './IMenuActionItem.js'; +import { MenuItem } from './MenuItem.js'; export class MenuActionItem extends MenuItem implements IMenuActionItem { readonly action: IActionItem; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuBaseItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuBaseItem.ts index 45406735b8..e6853b91f7 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuBaseItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuBaseItem.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuBaseItem, IMenuBaseItemOptions, MenuBaseItemIconComponent } from './IMenuBaseItem'; -import type { IMenuItemEvents } from './IMenuItem'; -import { MenuItem } from './MenuItem'; +import type { IMenuBaseItem, IMenuBaseItemOptions, MenuBaseItemIconComponent } from './IMenuBaseItem.js'; +import type { IMenuItemEvents } from './IMenuItem.js'; +import { MenuItem } from './MenuItem.js'; interface IMenuBaseItemPropertyGetters { getExtraProps?: () => TExtraProps; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuCheckboxItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuCheckboxItem.ts index 45c5ffe25e..ca2574c597 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuCheckboxItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuCheckboxItem.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuCheckboxItem, IMenuCheckboxItemOptions } from './IMenuCheckboxItem'; -import type { IMenuItemEvents } from './IMenuItem'; -import { MenuItem } from './MenuItem'; +import type { IMenuCheckboxItem, IMenuCheckboxItemOptions } from './IMenuCheckboxItem.js'; +import type { IMenuItemEvents } from './IMenuItem.js'; +import { MenuItem } from './MenuItem.js'; interface IMenuBaseItemPropertyGetters { isDisabled?: () => boolean; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuCustomItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuCustomItem.ts index 1986c1100d..a233899d79 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuCustomItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuCustomItem.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ICustomMenuItemComponent, IMenuCustomItem, IMenuCustomItemOptions } from './IMenuCustomItem'; -import type { IMenuItemEvents } from './IMenuItem'; -import { MenuItem } from './MenuItem'; +import type { ICustomMenuItemComponent, IMenuCustomItem, IMenuCustomItemOptions } from './IMenuCustomItem.js'; +import type { IMenuItemEvents } from './IMenuItem.js'; +import { MenuItem } from './MenuItem.js'; interface IMenuCustomItemPropertyGetters { getExtraProps?: () => TExtraProps; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuGroupItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuGroupItem.ts index 0f451630da..64ebf87b19 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuGroupItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuGroupItem.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuGroupItem } from './IMenuGroupItem'; -import type { IMenuItem } from './IMenuItem'; -import { MenuItem } from './MenuItem'; +import type { IMenuGroupItem } from './IMenuGroupItem.js'; +import type { IMenuItem } from './IMenuItem.js'; +import { MenuItem } from './MenuItem.js'; export class MenuGroupItem extends MenuItem implements IMenuGroupItem { items: IMenuItem[]; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuItem.ts index ebf6175083..becf9cff89 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuItem.ts @@ -7,7 +7,7 @@ */ import { uuid } from '@cloudbeaver/core-utils'; -import type { IMenuItem, IMenuItemEvents } from './IMenuItem'; +import type { IMenuItem, IMenuItemEvents } from './IMenuItem.js'; export abstract class MenuItem implements IMenuItem { readonly id: string; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuLazyItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuLazyItem.ts index 7e8ab44e46..801304e01d 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuLazyItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuLazyItem.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuItem } from './IMenuItem'; -import type { IMenuLazyItem } from './IMenuLazyItem'; -import { MenuItem } from './MenuItem'; +import type { IMenuItem } from './IMenuItem.js'; +import type { IMenuLazyItem } from './IMenuLazyItem.js'; +import { MenuItem } from './MenuItem.js'; export abstract class MenuLazyItem extends MenuItem implements IMenuLazyItem { task: Promise | null; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuSeparatorItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuSeparatorItem.ts index 182f852c5e..ba71137321 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuSeparatorItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuSeparatorItem.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenuSeparatorItem } from './IMenuSeparatorItem'; -import { MenuItem } from './MenuItem'; +import type { IMenuSeparatorItem } from './IMenuSeparatorItem.js'; +import { MenuItem } from './MenuItem.js'; export class MenuSeparatorItem extends MenuItem implements IMenuSeparatorItem { readonly hidden: boolean; diff --git a/webapp/packages/core-view/src/Menu/MenuItem/MenuSubMenuItem.ts b/webapp/packages/core-view/src/Menu/MenuItem/MenuSubMenuItem.ts index 83ebfb2f6c..951a543ca6 100644 --- a/webapp/packages/core-view/src/Menu/MenuItem/MenuSubMenuItem.ts +++ b/webapp/packages/core-view/src/Menu/MenuItem/MenuSubMenuItem.ts @@ -5,10 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IMenu } from '../IMenu'; -import type { IMenuActionItem } from './IMenuActionItem'; -import type { IMenuSubMenuEvents, IMenuSubMenuItem, IMenuSubMenuItemOptions, MenuSubMenuItemIconComponent } from './IMenuSubMenuItem'; -import { MenuItem } from './MenuItem'; +import type { IMenu } from '../IMenu.js'; +import type { IMenuActionItem } from './IMenuActionItem.js'; +import type { IMenuSubMenuEvents, IMenuSubMenuItem, IMenuSubMenuItemOptions, MenuSubMenuItemIconComponent } from './IMenuSubMenuItem.js'; +import { MenuItem } from './MenuItem.js'; export class MenuSubMenuItem extends MenuItem implements IMenuSubMenuItem { readonly menu: IMenu; @@ -20,7 +20,7 @@ export class MenuSubMenuItem extends MenuItem implements * experimental, can be changed */ readonly action?: IMenuActionItem; - readonly events?: IMenuSubMenuEvents; + override readonly events?: IMenuSubMenuEvents; readonly hidden: boolean; readonly getExtraProps?: () => TExtraProps; readonly iconComponent?: () => MenuSubMenuItemIconComponent; diff --git a/webapp/packages/core-view/src/Menu/MenuService.ts b/webapp/packages/core-view/src/Menu/MenuService.ts index 77e2eb6629..9347798991 100644 --- a/webapp/packages/core-view/src/Menu/MenuService.ts +++ b/webapp/packages/core-view/src/Menu/MenuService.ts @@ -7,20 +7,20 @@ */ import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import { injectable } from '@cloudbeaver/core-di'; -import { flat, ILoadableState, isNotNullDefined } from '@cloudbeaver/core-utils'; - -import { ActionService } from '../Action/ActionService'; -import { isAction } from '../Action/createAction'; -import type { IAction } from '../Action/IAction'; -import { isMenu } from './createMenu'; -import { DATA_CONTEXT_MENU } from './DATA_CONTEXT_MENU'; -import { DATA_CONTEXT_MENU_NESTED } from './DATA_CONTEXT_MENU_NESTED'; -import type { IMenuHandler, IMenuHandlerOptions } from './IMenuHandler'; -import type { IMenuItemsCreator, IMenuItemsCreatorOptions, MenuCreatorItem } from './IMenuItemsCreator'; -import type { IMenuActionItem } from './MenuItem/IMenuActionItem'; -import type { IMenuItem } from './MenuItem/IMenuItem'; -import { MenuActionItem } from './MenuItem/MenuActionItem'; -import { MenuSubMenuItem } from './MenuItem/MenuSubMenuItem'; +import { flat, type ILoadableState, isNotNullDefined } from '@cloudbeaver/core-utils'; + +import { ActionService } from '../Action/ActionService.js'; +import { isAction } from '../Action/createAction.js'; +import type { IAction } from '../Action/IAction.js'; +import { isMenu } from './createMenu.js'; +import { DATA_CONTEXT_MENU } from './DATA_CONTEXT_MENU.js'; +import { DATA_CONTEXT_MENU_NESTED } from './DATA_CONTEXT_MENU_NESTED.js'; +import type { IMenuHandler, IMenuHandlerOptions } from './IMenuHandler.js'; +import type { IMenuItemsCreator, IMenuItemsCreatorOptions, MenuCreatorItem } from './IMenuItemsCreator.js'; +import type { IMenuActionItem } from './MenuItem/IMenuActionItem.js'; +import type { IMenuItem } from './MenuItem/IMenuItem.js'; +import { MenuActionItem } from './MenuItem/MenuActionItem.js'; +import { MenuSubMenuItem } from './MenuItem/MenuSubMenuItem.js'; @injectable() export class MenuService { diff --git a/webapp/packages/core-view/src/Menu/createMenu.ts b/webapp/packages/core-view/src/Menu/createMenu.ts index 9d27c1bc49..efed31c46d 100644 --- a/webapp/packages/core-view/src/Menu/createMenu.ts +++ b/webapp/packages/core-view/src/Menu/createMenu.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAction } from '../Action/IAction'; -import type { IMenu } from './IMenu'; +import type { IAction } from '../Action/IAction.js'; +import type { IMenu } from './IMenu.js'; const menuSymbol = Symbol('@menu'); diff --git a/webapp/packages/core-view/src/Menu/menuExtractItems.ts b/webapp/packages/core-view/src/Menu/menuExtractItems.ts index 010f38ade2..81594a7dae 100644 --- a/webapp/packages/core-view/src/Menu/menuExtractItems.ts +++ b/webapp/packages/core-view/src/Menu/menuExtractItems.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAction } from '../Action/IAction'; -import type { MenuCreatorItem } from './IMenuItemsCreator'; -import type { IMenuItem } from './MenuItem/IMenuItem'; +import type { IAction } from '../Action/IAction.js'; +import type { MenuCreatorItem } from './IMenuItemsCreator.js'; +import type { IMenuItem } from './MenuItem/IMenuItem.js'; type MenuItem = IMenuItem | IAction; diff --git a/webapp/packages/core-view/src/Menu/useMenu.ts b/webapp/packages/core-view/src/Menu/useMenu.ts index 55003eff53..6f8c9c243c 100644 --- a/webapp/packages/core-view/src/Menu/useMenu.ts +++ b/webapp/packages/core-view/src/Menu/useMenu.ts @@ -10,14 +10,14 @@ import { computed, observable } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import type { IDataContext } from '@cloudbeaver/core-data-context'; import { useService } from '@cloudbeaver/core-di'; -import { flat, ILoadableState } from '@cloudbeaver/core-utils'; +import { flat, type ILoadableState } from '@cloudbeaver/core-utils'; -import type { IMenu } from './IMenu'; -import type { IMenuHandler } from './IMenuHandler'; -import type { MenuCreatorItem } from './IMenuItemsCreator'; -import type { IMenuItem } from './MenuItem/IMenuItem'; -import { MenuService } from './MenuService'; -import { useMenuContext } from './useMenuContext'; +import type { IMenu } from './IMenu.js'; +import type { IMenuHandler } from './IMenuHandler.js'; +import type { MenuCreatorItem } from './IMenuItemsCreator.js'; +import type { IMenuItem } from './MenuItem/IMenuItem.js'; +import { MenuService } from './MenuService.js'; +import { useMenuContext } from './useMenuContext.js'; export interface IMenuData { menu: IMenu; diff --git a/webapp/packages/core-view/src/Menu/useMenuContext.ts b/webapp/packages/core-view/src/Menu/useMenuContext.ts index ac7daa5425..04714068ed 100644 --- a/webapp/packages/core-view/src/Menu/useMenuContext.ts +++ b/webapp/packages/core-view/src/Menu/useMenuContext.ts @@ -9,10 +9,10 @@ import { useContext } from 'react'; import { type IDataContext, useDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; -import { DATA_CONTEXT_LOADABLE_STATE, loadableStateContext } from '../LoadableStateContext/DATA_CONTEXT_LOADABLE_STATE'; -import { CaptureViewContext } from '../View/CaptureViewContext'; -import { DATA_CONTEXT_MENU } from './DATA_CONTEXT_MENU'; -import type { IMenu } from './IMenu'; +import { DATA_CONTEXT_LOADABLE_STATE, loadableStateContext } from '../LoadableStateContext/DATA_CONTEXT_LOADABLE_STATE.js'; +import { CaptureViewContext } from '../View/CaptureViewContext.js'; +import { DATA_CONTEXT_MENU } from './DATA_CONTEXT_MENU.js'; +import type { IMenu } from './IMenu.js'; export function useMenuContext(menu: IMenu, _menuContext?: IDataContext): IDataContext { const viewContext = useContext(CaptureViewContext); diff --git a/webapp/packages/core-view/src/View/AppView.ts b/webapp/packages/core-view/src/View/AppView.ts index c075a68481..6ab3ec9394 100644 --- a/webapp/packages/core-view/src/View/AppView.ts +++ b/webapp/packages/core-view/src/View/AppView.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IActiveView } from './IActiveView'; -import { View } from './View'; +import type { IActiveView } from './IActiveView.js'; +import { View } from './View.js'; export class AppView extends View { getView(): IActiveView { diff --git a/webapp/packages/core-view/src/View/CaptureView.tsx b/webapp/packages/core-view/src/View/CaptureView.tsx index a0843b7340..02c0a17cf8 100644 --- a/webapp/packages/core-view/src/View/CaptureView.tsx +++ b/webapp/packages/core-view/src/View/CaptureView.tsx @@ -13,15 +13,15 @@ import { s, useFocus, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { isObjectsEqual } from '@cloudbeaver/core-utils'; -import { ActionService } from '../Action/ActionService'; -import type { IActionItem } from '../Action/IActionItem'; -import { getCommonAndOSSpecificKeys } from '../Action/KeyBinding/getCommonAndOSSpecificKeys'; +import { ActionService } from '../Action/ActionService.js'; +import type { IActionItem } from '../Action/IActionItem.js'; +import { getCommonAndOSSpecificKeys } from '../Action/KeyBinding/getCommonAndOSSpecificKeys.js'; import styles from './CaptureView.module.css'; -import { CaptureViewContext } from './CaptureViewContext'; -import type { IView } from './IView'; -import { parseHotkey } from './parseHotkey'; -import { useActiveView } from './useActiveView'; -import { useViewContext } from './useViewContext'; +import { CaptureViewContext } from './CaptureViewContext.js'; +import type { IView } from './IView.js'; +import { parseHotkey } from './parseHotkey.js'; +import { useActiveView } from './useActiveView.js'; +import { useViewContext } from './useViewContext.js'; export interface ICaptureViewProps { view: IView; diff --git a/webapp/packages/core-view/src/View/CaptureViewLazy.ts b/webapp/packages/core-view/src/View/CaptureViewLazy.ts index 38cb37f467..dea0054c61 100644 --- a/webapp/packages/core-view/src/View/CaptureViewLazy.ts +++ b/webapp/packages/core-view/src/View/CaptureViewLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const CaptureView = importLazyComponent(() => import('./CaptureView').then(m => m.CaptureView)); +export const CaptureView = importLazyComponent(() => import('./CaptureView.js').then(m => m.CaptureView)); diff --git a/webapp/packages/core-view/src/View/CaptureViewScope.tsx b/webapp/packages/core-view/src/View/CaptureViewScope.tsx index b1393beb3f..f584ff22d2 100644 --- a/webapp/packages/core-view/src/View/CaptureViewScope.tsx +++ b/webapp/packages/core-view/src/View/CaptureViewScope.tsx @@ -10,7 +10,7 @@ import { type PropsWithChildren, useContext } from 'react'; import { useDataContext } from '@cloudbeaver/core-data-context'; -import { CaptureViewContext } from './CaptureViewContext'; +import { CaptureViewContext } from './CaptureViewContext.js'; export const CaptureViewScope = observer(function CaptureViewScope({ children }) { const context = useContext(CaptureViewContext); diff --git a/webapp/packages/core-view/src/View/CaptureViewScopeLazy.ts b/webapp/packages/core-view/src/View/CaptureViewScopeLazy.ts index d8bf7067dc..a52884f8cc 100644 --- a/webapp/packages/core-view/src/View/CaptureViewScopeLazy.ts +++ b/webapp/packages/core-view/src/View/CaptureViewScopeLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const CaptureViewScope = importLazyComponent(() => import('./CaptureViewScope').then(m => m.CaptureViewScope)); +export const CaptureViewScope = importLazyComponent(() => import('./CaptureViewScope.js').then(m => m.CaptureViewScope)); diff --git a/webapp/packages/core-view/src/View/DATA_CONTEXT_VIEW.ts b/webapp/packages/core-view/src/View/DATA_CONTEXT_VIEW.ts index 0a1a4fe8e4..6099456dee 100644 --- a/webapp/packages/core-view/src/View/DATA_CONTEXT_VIEW.ts +++ b/webapp/packages/core-view/src/View/DATA_CONTEXT_VIEW.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { IView } from './IView'; +import type { IView } from './IView.js'; export const DATA_CONTEXT_VIEW = createDataContext>('app-view'); diff --git a/webapp/packages/core-view/src/View/IView.ts b/webapp/packages/core-view/src/View/IView.ts index d1f0d6b197..fb694995a8 100644 --- a/webapp/packages/core-view/src/View/IView.ts +++ b/webapp/packages/core-view/src/View/IView.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAction } from '../Action/IAction'; -import type { IActiveView } from './IActiveView'; +import type { IAction } from '../Action/IAction.js'; +import type { IActiveView } from './IActiveView.js'; export interface IView { parent: IView | null; diff --git a/webapp/packages/core-view/src/View/View.ts b/webapp/packages/core-view/src/View/View.ts index d310d16fe1..be601015a7 100644 --- a/webapp/packages/core-view/src/View/View.ts +++ b/webapp/packages/core-view/src/View/View.ts @@ -7,9 +7,9 @@ */ import { observable } from 'mobx'; -import type { IAction } from '../Action/IAction'; -import type { IActiveView } from './IActiveView'; -import type { IView } from './IView'; +import type { IAction } from '../Action/IAction.js'; +import type { IActiveView } from './IActiveView.js'; +import type { IView } from './IView.js'; export abstract class View implements IView { readonly parent: IView | null; diff --git a/webapp/packages/core-view/src/View/ViewService.ts b/webapp/packages/core-view/src/View/ViewService.ts index aa50a2c91a..654c1f3499 100644 --- a/webapp/packages/core-view/src/View/ViewService.ts +++ b/webapp/packages/core-view/src/View/ViewService.ts @@ -9,8 +9,8 @@ import { computed, makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import type { IActiveView } from './IActiveView'; -import type { IView } from './IView'; +import type { IActiveView } from './IActiveView.js'; +import type { IView } from './IView.js'; @injectable() export class ViewService { diff --git a/webapp/packages/core-view/src/View/parseHotkey.ts b/webapp/packages/core-view/src/View/parseHotkey.ts index 81d51019b1..02e8f43202 100644 --- a/webapp/packages/core-view/src/View/parseHotkey.ts +++ b/webapp/packages/core-view/src/View/parseHotkey.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { Hotkey, KeyboardModifiers } from 'react-hotkeys-hook/dist/types'; +import type { Hotkey, KeyboardModifiers } from 'react-hotkeys-hook/dist/types.js'; const reservedModifierKeywords = ['shift', 'alt', 'meta', 'mod', 'ctrl']; diff --git a/webapp/packages/core-view/src/View/useActiveView.ts b/webapp/packages/core-view/src/View/useActiveView.ts index 20af333154..ea2d1a0602 100644 --- a/webapp/packages/core-view/src/View/useActiveView.ts +++ b/webapp/packages/core-view/src/View/useActiveView.ts @@ -10,8 +10,8 @@ import { useEffect } from 'react'; import { useObjectRef } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import type { IView } from './IView'; -import { ViewService } from './ViewService'; +import type { IView } from './IView.js'; +import { ViewService } from './ViewService.js'; interface IViewController { focusView: () => void; diff --git a/webapp/packages/core-view/src/View/useCaptureViewContext.ts b/webapp/packages/core-view/src/View/useCaptureViewContext.ts index 72c691225e..3769dda09e 100644 --- a/webapp/packages/core-view/src/View/useCaptureViewContext.ts +++ b/webapp/packages/core-view/src/View/useCaptureViewContext.ts @@ -7,9 +7,9 @@ */ import { useContext } from 'react'; -import { IDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; +import { type IDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; -import { CaptureViewContext } from './CaptureViewContext'; +import { CaptureViewContext } from './CaptureViewContext.js'; export function useCaptureViewContext(capture: (context: IDataContext, id: string) => void): void { const context = useContext(CaptureViewContext); diff --git a/webapp/packages/core-view/src/View/useViewContext.ts b/webapp/packages/core-view/src/View/useViewContext.ts index 60967f348e..4b2302397d 100644 --- a/webapp/packages/core-view/src/View/useViewContext.ts +++ b/webapp/packages/core-view/src/View/useViewContext.ts @@ -7,11 +7,11 @@ */ import { useContext } from 'react'; -import { IDataContext, useDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; +import { type IDataContext, useDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; -import { CaptureViewContext } from './CaptureViewContext'; -import { DATA_CONTEXT_VIEW } from './DATA_CONTEXT_VIEW'; -import type { IView } from './IView'; +import { CaptureViewContext } from './CaptureViewContext.js'; +import { DATA_CONTEXT_VIEW } from './DATA_CONTEXT_VIEW.js'; +import type { IView } from './IView.js'; export function useViewContext(view: IView, parentContext: IDataContext | undefined): IDataContext { const context = useContext(CaptureViewContext); diff --git a/webapp/packages/core-view/src/index.ts b/webapp/packages/core-view/src/index.ts index 404ab38f94..f4002ea472 100644 --- a/webapp/packages/core-view/src/index.ts +++ b/webapp/packages/core-view/src/index.ts @@ -5,78 +5,78 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './Action/Actions/ACTION_ADD'; -export * from './Action/Actions/ACTION_CANCEL'; -export * from './Action/Actions/ACTION_COLLAPSE_ALL'; -export * from './Action/Actions/ACTION_CREATE'; -export * from './Action/Actions/ACTION_DELETE'; -export * from './Action/Actions/ACTION_EDIT'; -export * from './Action/Actions/ACTION_DUPLICATE'; -export * from './Action/Actions/ACTION_EXPORT'; -export * from './Action/Actions/ACTION_FILTER'; -export * from './Action/Actions/ACTION_LAYOUT'; -export * from './Action/Actions/ACTION_NEW_FOLDER'; -export * from './Action/Actions/ACTION_OPEN_IN_TAB'; -export * from './Action/Actions/ACTION_OPEN'; -export * from './Action/Actions/ACTION_REDO'; -export * from './Action/Actions/ACTION_REFRESH'; -export * from './Action/Actions/ACTION_RENAME'; -export * from './Action/Actions/ACTION_REVERT'; -export * from './Action/Actions/ACTION_SAVE'; -export * from './Action/Actions/ACTION_SETTINGS'; -export * from './Action/Actions/ACTION_UNDO'; -export * from './Action/Actions/ACTION_ZOOM_IN'; -export * from './Action/Actions/ACTION_ZOOM_OUT'; -export * from './Action/Actions/ACTION_DOWNLOAD'; -export * from './Action/Actions/ACTION_UPLOAD'; -export * from './Action/Actions/ACTION_IMPORT'; -export * from './Action/KeyBinding/Bindings/KEY_BINDING_OPEN_IN_TAB'; -export * from './Action/KeyBinding/Bindings/KEY_BINDING_REDO'; -export * from './Action/KeyBinding/Bindings/KEY_BINDING_UNDO'; -export * from './Action/KeyBinding/Bindings/KEY_BINDING_SAVE'; -export * from './Action/KeyBinding/KeyBindingService'; -export * from './Action/KeyBinding/createKeyBinding'; -export * from './Action/ActionService'; -export * from './Action/createAction'; -export * from './Action/IAction'; -export * from './Action/IActionHandler'; -export * from './Action/IActionInfo'; -export * from './Action/IActionItem'; -export * from './Action/KeyBinding/IKeyBinding'; -export * from './Action/KeyBinding/getCommonAndOSSpecificKeys'; -export * from './Action/KeyBinding/getBindingLabel'; -export * from './LoadableStateContext/DATA_CONTEXT_LOADABLE_STATE'; -export * from './Menu/MenuItem/IMenuCheckboxItem'; -export * from './Menu/MenuItem/IMenuActionItem'; -export * from './Menu/MenuItem/IMenuBaseItem'; -export * from './Menu/MenuItem/IMenuCustomItem'; -export * from './Menu/MenuItem/IMenuItem'; -export * from './Menu/MenuItem/IMenuSubMenuItem'; -export * from './Menu/MenuItem/MenuCheckboxItem'; -export * from './Menu/MenuItem/MenuActionItem'; -export * from './Menu/MenuItem/MenuBaseItem'; -export * from './Menu/MenuItem/MenuCustomItem'; -export * from './Menu/MenuItem/MenuGroupItem'; -export * from './Menu/MenuItem/MenuLazyItem'; -export * from './Menu/MenuItem/MenuSeparatorItem'; -export * from './Menu/MenuItem/MenuSubMenuItem'; -export * from './Menu/createMenu'; -export * from './Menu/DATA_CONTEXT_MENU_NESTED'; -export * from './Menu/DATA_CONTEXT_MENU'; -export * from './Menu/DATA_CONTEXT_SUBMENU_ITEM'; -export * from './Menu/IMenu'; -export * from './Menu/menuExtractItems'; -export * from './Menu/MenuService'; -export * from './Menu/useMenu'; -export * from './Menu/useMenuContext'; -export * from './View/AppView'; -export * from './View/CaptureViewScopeLazy'; -export * from './View/CaptureViewLazy'; -export * from './View/CaptureViewContext'; -export * from './View/IActiveView'; -export * from './View/IView'; -export * from './View/useActiveView'; -export * from './View/useCaptureViewContext'; -export * from './View/View'; -export * from './View/ViewService'; -export { manifest as coreViewManifest } from './manifest'; +export * from './Action/Actions/ACTION_ADD.js'; +export * from './Action/Actions/ACTION_CANCEL.js'; +export * from './Action/Actions/ACTION_COLLAPSE_ALL.js'; +export * from './Action/Actions/ACTION_CREATE.js'; +export * from './Action/Actions/ACTION_DELETE.js'; +export * from './Action/Actions/ACTION_EDIT.js'; +export * from './Action/Actions/ACTION_DUPLICATE.js'; +export * from './Action/Actions/ACTION_EXPORT.js'; +export * from './Action/Actions/ACTION_FILTER.js'; +export * from './Action/Actions/ACTION_LAYOUT.js'; +export * from './Action/Actions/ACTION_NEW_FOLDER.js'; +export * from './Action/Actions/ACTION_OPEN_IN_TAB.js'; +export * from './Action/Actions/ACTION_OPEN.js'; +export * from './Action/Actions/ACTION_REDO.js'; +export * from './Action/Actions/ACTION_REFRESH.js'; +export * from './Action/Actions/ACTION_RENAME.js'; +export * from './Action/Actions/ACTION_REVERT.js'; +export * from './Action/Actions/ACTION_SAVE.js'; +export * from './Action/Actions/ACTION_SETTINGS.js'; +export * from './Action/Actions/ACTION_UNDO.js'; +export * from './Action/Actions/ACTION_ZOOM_IN.js'; +export * from './Action/Actions/ACTION_ZOOM_OUT.js'; +export * from './Action/Actions/ACTION_DOWNLOAD.js'; +export * from './Action/Actions/ACTION_UPLOAD.js'; +export * from './Action/Actions/ACTION_IMPORT.js'; +export * from './Action/KeyBinding/Bindings/KEY_BINDING_OPEN_IN_TAB.js'; +export * from './Action/KeyBinding/Bindings/KEY_BINDING_REDO.js'; +export * from './Action/KeyBinding/Bindings/KEY_BINDING_UNDO.js'; +export * from './Action/KeyBinding/Bindings/KEY_BINDING_SAVE.js'; +export * from './Action/KeyBinding/KeyBindingService.js'; +export * from './Action/KeyBinding/createKeyBinding.js'; +export * from './Action/ActionService.js'; +export * from './Action/createAction.js'; +export * from './Action/IAction.js'; +export * from './Action/IActionHandler.js'; +export * from './Action/IActionInfo.js'; +export * from './Action/IActionItem.js'; +export * from './Action/KeyBinding/IKeyBinding.js'; +export * from './Action/KeyBinding/getCommonAndOSSpecificKeys.js'; +export * from './Action/KeyBinding/getBindingLabel.js'; +export * from './LoadableStateContext/DATA_CONTEXT_LOADABLE_STATE.js'; +export * from './Menu/MenuItem/IMenuCheckboxItem.js'; +export * from './Menu/MenuItem/IMenuActionItem.js'; +export * from './Menu/MenuItem/IMenuBaseItem.js'; +export * from './Menu/MenuItem/IMenuCustomItem.js'; +export * from './Menu/MenuItem/IMenuItem.js'; +export * from './Menu/MenuItem/IMenuSubMenuItem.js'; +export * from './Menu/MenuItem/MenuCheckboxItem.js'; +export * from './Menu/MenuItem/MenuActionItem.js'; +export * from './Menu/MenuItem/MenuBaseItem.js'; +export * from './Menu/MenuItem/MenuCustomItem.js'; +export * from './Menu/MenuItem/MenuGroupItem.js'; +export * from './Menu/MenuItem/MenuLazyItem.js'; +export * from './Menu/MenuItem/MenuSeparatorItem.js'; +export * from './Menu/MenuItem/MenuSubMenuItem.js'; +export * from './Menu/createMenu.js'; +export * from './Menu/DATA_CONTEXT_MENU_NESTED.js'; +export * from './Menu/DATA_CONTEXT_MENU.js'; +export * from './Menu/DATA_CONTEXT_SUBMENU_ITEM.js'; +export * from './Menu/IMenu.js'; +export * from './Menu/menuExtractItems.js'; +export * from './Menu/MenuService.js'; +export * from './Menu/useMenu.js'; +export * from './Menu/useMenuContext.js'; +export * from './View/AppView.js'; +export * from './View/CaptureViewScopeLazy.js'; +export * from './View/CaptureViewLazy.js'; +export * from './View/CaptureViewContext.js'; +export * from './View/IActiveView.js'; +export * from './View/IView.js'; +export * from './View/useActiveView.js'; +export * from './View/useCaptureViewContext.js'; +export * from './View/View.js'; +export * from './View/ViewService.js'; +export { manifest as coreViewManifest } from './manifest.js'; diff --git a/webapp/packages/core-view/src/manifest.ts b/webapp/packages/core-view/src/manifest.ts index 6bd84add71..ac1922f584 100644 --- a/webapp/packages/core-view/src/manifest.ts +++ b/webapp/packages/core-view/src/manifest.ts @@ -13,10 +13,10 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./Action/ActionService').then(m => m.ActionService), - () => import('./Action/KeyBinding/KeyBindingService').then(m => m.KeyBindingService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./Menu/MenuService').then(m => m.MenuService), - () => import('./View/ViewService').then(m => m.ViewService), + () => import('./Action/ActionService.js').then(m => m.ActionService), + () => import('./Action/KeyBinding/KeyBindingService.js').then(m => m.KeyBindingService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./Menu/MenuService.js').then(m => m.MenuService), + () => import('./View/ViewService.js').then(m => m.ViewService), ], }; diff --git a/webapp/packages/core-website/package.json b/webapp/packages/core-website/package.json index 0791083df7..50e8f6c4e1 100644 --- a/webapp/packages/core-website/package.json +++ b/webapp/packages/core-website/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/core-website", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/core-website/src/index.ts b/webapp/packages/core-website/src/index.ts index 83c0a3d7e6..38be8ec1f1 100644 --- a/webapp/packages/core-website/src/index.ts +++ b/webapp/packages/core-website/src/index.ts @@ -5,5 +5,5 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './WebsiteLinks'; -export * from './manifest'; +export * from './WebsiteLinks.js'; +export * from './manifest.js'; diff --git a/webapp/packages/plugin-administration/package.json b/webapp/packages/plugin-administration/package.json index 0ec0567fde..e5d3731730 100644 --- a/webapp/packages/plugin-administration/package.json +++ b/webapp/packages/plugin-administration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-administration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-administration/src/Administration/Administration.tsx b/webapp/packages/plugin-administration/src/Administration/Administration.tsx index 8f33b5face..1e2798b137 100644 --- a/webapp/packages/plugin-administration/src/Administration/Administration.tsx +++ b/webapp/packages/plugin-administration/src/Administration/Administration.tsx @@ -8,7 +8,12 @@ import { observer } from 'mobx-react-lite'; import { useLayoutEffect, useRef } from 'react'; -import { AdministrationItemService, AdministrationScreenService, filterOnlyActive, IAdministrationItemRoute } from '@cloudbeaver/core-administration'; +import { + AdministrationItemService, + AdministrationScreenService, + filterOnlyActive, + type IAdministrationItemRoute, +} from '@cloudbeaver/core-administration'; import { Loader, s, @@ -16,7 +21,7 @@ import { SlideBox, SlideElement, SlideOverlay, - StyleRegistry, + type StyleRegistry, ToolsActionStyles, ToolsPanelStyles, useS, @@ -25,10 +30,10 @@ import { useService } from '@cloudbeaver/core-di'; import { OptionsPanelService, TabList, TabListStyles, TabsState, TabStyles } from '@cloudbeaver/core-ui'; import { CaptureView } from '@cloudbeaver/core-view'; -import { AdministrationCaptureViewContext } from './AdministrationCaptureViewContext'; -import { AdministrationViewService } from './AdministrationViewService'; -import { DrawerItem } from './DrawerItem'; -import { ItemContent } from './ItemContent'; +import { AdministrationCaptureViewContext } from './AdministrationCaptureViewContext.js'; +import { AdministrationViewService } from './AdministrationViewService.js'; +import { DrawerItem } from './DrawerItem.js'; +import { ItemContent } from './ItemContent.js'; import style from './shared/Administration.module.css'; import AdministrationStylesTab from './shared/AdministrationTab.module.css'; import AdministrationStylesTabList from './shared/AdministrationTabList.module.css'; diff --git a/webapp/packages/plugin-administration/src/Administration/AdministrationViewService.ts b/webapp/packages/plugin-administration/src/Administration/AdministrationViewService.ts index 1a0a9964a5..226075efd7 100644 --- a/webapp/packages/plugin-administration/src/Administration/AdministrationViewService.ts +++ b/webapp/packages/plugin-administration/src/Administration/AdministrationViewService.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { AdministrationScreenService, IAdministrationItemRoute } from '@cloudbeaver/core-administration'; +import { AdministrationScreenService, type IAdministrationItemRoute } from '@cloudbeaver/core-administration'; import { injectable } from '@cloudbeaver/core-di'; -import { IActiveView, View } from '@cloudbeaver/core-view'; +import { type IActiveView, View } from '@cloudbeaver/core-view'; @injectable() export class AdministrationViewService extends View { diff --git a/webapp/packages/plugin-administration/src/Administration/ItemContent.tsx b/webapp/packages/plugin-administration/src/Administration/ItemContent.tsx index b0df0ff315..9db8aa6698 100644 --- a/webapp/packages/plugin-administration/src/Administration/ItemContent.tsx +++ b/webapp/packages/plugin-administration/src/Administration/ItemContent.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import { AdministrationItemService, IAdministrationItemRoute } from '@cloudbeaver/core-administration'; +import { AdministrationItemService, type IAdministrationItemRoute } from '@cloudbeaver/core-administration'; import { Loader, TextPlaceholder, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { TabPanel } from '@cloudbeaver/core-ui'; diff --git a/webapp/packages/plugin-administration/src/AdministrationMenu/AdministrationMenu.tsx b/webapp/packages/plugin-administration/src/AdministrationMenu/AdministrationMenu.tsx index 74053afbc4..2443e8afd9 100644 --- a/webapp/packages/plugin-administration/src/AdministrationMenu/AdministrationMenu.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationMenu/AdministrationMenu.tsx @@ -14,7 +14,7 @@ import { MenuBar } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; import { TopMenuWrapperStyles } from '@cloudbeaver/plugin-top-app-bar'; -import { MENU_APP_ADMINISTRATION_ACTIONS } from './MENU_APP_ADMINISTRATION_ACTIONS'; +import { MENU_APP_ADMINISTRATION_ACTIONS } from './MENU_APP_ADMINISTRATION_ACTIONS.js'; export const AdministrationMenu = observer(function AdministrationMenu() { const styles = useS(TopMenuWrapperStyles); diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx index ed0dddf66b..92a1c22e95 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx @@ -14,9 +14,9 @@ import { useService } from '@cloudbeaver/core-di'; import { EAdminPermission } from '@cloudbeaver/core-root'; import type { ScreenComponent } from '@cloudbeaver/core-routing'; -import { Administration } from '../Administration/Administration'; -import { AdministrationTopAppBar } from './AdministrationTopAppBar/AdministrationTopAppBar'; -import type { IAdministrationScreenParams } from './IAdministrationScreenParams'; +import { Administration } from '../Administration/Administration.js'; +import { AdministrationTopAppBar } from './AdministrationTopAppBar/AdministrationTopAppBar.js'; +import type { IAdministrationScreenParams } from './IAdministrationScreenParams.js'; export const AdministrationScreen: ScreenComponent = observer(function AdministrationScreen() { const administrationScreenService = useService(AdministrationScreenService); diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreenServiceBootstrap.ts b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreenServiceBootstrap.ts index efc8297012..913e81991f 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreenServiceBootstrap.ts +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreenServiceBootstrap.ts @@ -11,9 +11,9 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import { ScreenService } from '@cloudbeaver/core-routing'; -const AdministrationScreen = importLazyComponent(() => import('./AdministrationScreen').then(m => m.AdministrationScreen)); +const AdministrationScreen = importLazyComponent(() => import('./AdministrationScreen.js').then(m => m.AdministrationScreen)); const ConfigurationWizardScreen = importLazyComponent(() => - import('./ConfigurationWizard/ConfigurationWizardScreen').then(m => m.ConfigurationWizardScreen), + import('./ConfigurationWizard/ConfigurationWizardScreen.js').then(m => m.ConfigurationWizardScreen), ); @injectable() @@ -26,7 +26,7 @@ export class AdministrationScreenServiceBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { const canActivate = () => this.administrationScreenService.handleCanActivate.bind(this.administrationScreenService); this.screenService.create({ @@ -90,7 +90,7 @@ export class AdministrationScreenServiceBootstrap extends Bootstrap { }); } - async load(): Promise { + override async load(): Promise { await this.serverConfigResource.load(); if ( diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBar.tsx b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBar.tsx index 03b94f57be..3cbe5ab2b9 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBar.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBar.tsx @@ -8,7 +8,7 @@ import { Placeholder } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { AdministrationTopAppBarService } from './AdministrationTopAppBarService'; +import { AdministrationTopAppBarService } from './AdministrationTopAppBarService.js'; export function AdministrationTopAppBar() { const administrationTopAppBarService = useService(AdministrationTopAppBarService); diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx index 67b33de0b4..4605da771f 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx @@ -13,9 +13,9 @@ import { Translate, usePermission, useResource } from '@cloudbeaver/core-blocks' import { useService } from '@cloudbeaver/core-di'; import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; -import { Administration } from '../../Administration/Administration'; -import { WizardStepper } from './WizardStepper'; -import { WizardTopAppBar } from './WizardTopAppBar/WizardTopAppBar'; +import { Administration } from '../../Administration/Administration.js'; +import { WizardStepper } from './WizardStepper.js'; +import { WizardTopAppBar } from './WizardTopAppBar/WizardTopAppBar.js'; export const ConfigurationWizardScreen = observer(function ConfigurationWizardScreen() { useResource(ConfigurationWizardScreen, SessionPermissionsResource, undefined); diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBar.tsx b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBar.tsx index 4313f7df20..8ae8eae7e8 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBar.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBar.tsx @@ -8,7 +8,7 @@ import { Placeholder, TopAppBar } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { WizardTopAppBarService } from './WizardTopAppBarService'; +import { WizardTopAppBarService } from './WizardTopAppBarService.js'; export function WizardTopAppBar() { const wizardTopAppBarService = useService(WizardTopAppBarService); diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBarService.ts b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBarService.ts index 382c750be8..b5cbc52215 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBarService.ts +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBarService.ts @@ -8,7 +8,7 @@ import { Fill, importLazyComponent, PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; -const ConfigurationWizardTitle = importLazyComponent(() => import('./ConfigurationWizardTitle').then(m => m.ConfigurationWizardTitle)); +const ConfigurationWizardTitle = importLazyComponent(() => import('./ConfigurationWizardTitle.js').then(m => m.ConfigurationWizardTitle)); @injectable() export class WizardTopAppBarService { diff --git a/webapp/packages/plugin-administration/src/ConfigurationWizard/ConfigurationWizardPagesBootstrapService.ts b/webapp/packages/plugin-administration/src/ConfigurationWizard/ConfigurationWizardPagesBootstrapService.ts index 0fcda0823d..726e67ad01 100644 --- a/webapp/packages/plugin-administration/src/ConfigurationWizard/ConfigurationWizardPagesBootstrapService.ts +++ b/webapp/packages/plugin-administration/src/ConfigurationWizard/ConfigurationWizardPagesBootstrapService.ts @@ -9,19 +9,19 @@ import { AdministrationItemService, AdministrationItemType, ConfigurationWizardS import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { ADMINISTRATION_SERVER_CONFIGURATION_ITEM } from './ServerConfiguration/ADMINISTRATION_SERVER_CONFIGURATION_ITEM'; -import { ServerConfigurationService } from './ServerConfiguration/ServerConfigurationService'; +import { ADMINISTRATION_SERVER_CONFIGURATION_ITEM } from './ServerConfiguration/ADMINISTRATION_SERVER_CONFIGURATION_ITEM.js'; +import { ServerConfigurationService } from './ServerConfiguration/ServerConfigurationService.js'; -const FinishPage = importLazyComponent(() => import('./Finish/FinishPage').then(m => m.FinishPage)); -const FinishPageDrawerItem = importLazyComponent(() => import('./Finish/FinishPageDrawerItem').then(m => m.FinishPageDrawerItem)); +const FinishPage = importLazyComponent(() => import('./Finish/FinishPage.js').then(m => m.FinishPage)); +const FinishPageDrawerItem = importLazyComponent(() => import('./Finish/FinishPageDrawerItem.js').then(m => m.FinishPageDrawerItem)); const ServerConfigurationDrawerItem = importLazyComponent(() => - import('./ServerConfiguration/ServerConfigurationDrawerItem').then(m => m.ServerConfigurationDrawerItem), + import('./ServerConfiguration/ServerConfigurationDrawerItem.js').then(m => m.ServerConfigurationDrawerItem), ); const ServerConfigurationPage = importLazyComponent(() => - import('./ServerConfiguration/ServerConfigurationPage').then(m => m.ServerConfigurationPage), + import('./ServerConfiguration/ServerConfigurationPage.js').then(m => m.ServerConfigurationPage), ); -const WelcomeDrawerItem = importLazyComponent(() => import('./Welcome/WelcomeDrawerItem').then(m => m.WelcomeDrawerItem)); -const WelcomePage = importLazyComponent(() => import('./Welcome/WelcomePage').then(m => m.WelcomePage)); +const WelcomeDrawerItem = importLazyComponent(() => import('./Welcome/WelcomeDrawerItem.js').then(m => m.WelcomeDrawerItem)); +const WelcomePage = importLazyComponent(() => import('./Welcome/WelcomePage.js').then(m => m.WelcomePage)); @injectable() export class ConfigurationWizardPagesBootstrapService extends Bootstrap { @@ -33,7 +33,7 @@ export class ConfigurationWizardPagesBootstrapService extends Bootstrap { super(); } - register(): void { + override register(): void { this.administrationItemService.create({ name: 'welcome', type: AdministrationItemType.ConfigurationWizard, diff --git a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationFeaturesForm.tsx b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationFeaturesForm.tsx index 27a407bf2a..cbbf133b2f 100644 --- a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationFeaturesForm.tsx +++ b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationFeaturesForm.tsx @@ -8,10 +8,10 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { FormContext, GroupTitle, PlaceholderComponent, Switch, useResource, useTranslate } from '@cloudbeaver/core-blocks'; +import { FormContext, GroupTitle, type PlaceholderComponent, Switch, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { FeaturesResource } from '@cloudbeaver/core-root'; -import type { IConfigurationPlaceholderProps } from '../ServerConfigurationService'; +import type { IConfigurationPlaceholderProps } from '../ServerConfigurationService.js'; export const ServerConfigurationFeaturesForm: PlaceholderComponent = observer( function ServerConfigurationFeaturesForm({ state: { serverConfig }, configurationWizard }) { diff --git a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationInfoForm.tsx b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationInfoForm.tsx index df5410df09..5252458780 100644 --- a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationInfoForm.tsx +++ b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationInfoForm.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { Group, GroupTitle, InputField, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { ServerConfigResource, SESSION_EXPIRE_MIN_TIME, SESSION_TOUCH_TIME_PERIOD } from '@cloudbeaver/core-root'; -import type { IServerConfigurationPageState } from '../IServerConfigurationPageState'; +import type { IServerConfigurationPageState } from '../IServerConfigurationPageState.js'; interface Props { state: IServerConfigurationPageState; diff --git a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationNavigatorViewForm.tsx b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationNavigatorViewForm.tsx index b1a9f6ebb4..0bc0103576 100644 --- a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationNavigatorViewForm.tsx +++ b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationNavigatorViewForm.tsx @@ -11,7 +11,7 @@ import { useCallback } from 'react'; import { Switch, useTranslate } from '@cloudbeaver/core-blocks'; import { CONNECTION_NAVIGATOR_VIEW_SETTINGS, isNavigatorViewSettingsEqual } from '@cloudbeaver/core-root'; -import type { IServerConfigurationPageState } from '../IServerConfigurationPageState'; +import type { IServerConfigurationPageState } from '../IServerConfigurationPageState.js'; interface Props { configs: IServerConfigurationPageState; diff --git a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationDriversForm.tsx b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationDriversForm.tsx index d8fc095580..ba7e76c41b 100644 --- a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationDriversForm.tsx +++ b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationDriversForm.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useCallback } from 'react'; -import { Combobox, Group, GroupTitle, ITag, s, Tag, Tags, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks'; +import { Combobox, Group, GroupTitle, type ITag, s, Tag, Tags, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { DBDriverResource } from '@cloudbeaver/core-connections'; import { CachedMapAllKey, resourceKeyList } from '@cloudbeaver/core-resource'; import type { ServerConfigInput } from '@cloudbeaver/core-sdk'; diff --git a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationPage.tsx b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationPage.tsx index f1312a74ce..a01f481182 100644 --- a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationPage.tsx +++ b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationPage.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import { AdministrationItemContentComponent, ConfigurationWizardService } from '@cloudbeaver/core-administration'; +import { type AdministrationItemContentComponent, ConfigurationWizardService } from '@cloudbeaver/core-administration'; import { ColoredContainer, ConfirmationDialog, @@ -30,14 +30,14 @@ import { useService } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { DefaultNavigatorSettingsResource, ServerConfigResource } from '@cloudbeaver/core-root'; -import { ServerConfigurationConfigurationForm } from './Form/ServerConfigurationConfigurationForm'; -import { ServerConfigurationFeaturesForm } from './Form/ServerConfigurationFeaturesForm'; -import { ServerConfigurationInfoForm } from './Form/ServerConfigurationInfoForm'; -import { ServerConfigurationNavigatorViewForm } from './Form/ServerConfigurationNavigatorViewForm'; -import { ServerConfigurationSecurityForm } from './Form/ServerConfigurationSecurityForm'; -import { ServerConfigurationDriversForm } from './ServerConfigurationDriversForm'; +import { ServerConfigurationConfigurationForm } from './Form/ServerConfigurationConfigurationForm.js'; +import { ServerConfigurationFeaturesForm } from './Form/ServerConfigurationFeaturesForm.js'; +import { ServerConfigurationInfoForm } from './Form/ServerConfigurationInfoForm.js'; +import { ServerConfigurationNavigatorViewForm } from './Form/ServerConfigurationNavigatorViewForm.js'; +import { ServerConfigurationSecurityForm } from './Form/ServerConfigurationSecurityForm.js'; +import { ServerConfigurationDriversForm } from './ServerConfigurationDriversForm.js'; import style from './ServerConfigurationPage.module.css'; -import { ServerConfigurationService } from './ServerConfigurationService'; +import { ServerConfigurationService } from './ServerConfigurationService.js'; export const ServerConfigurationPage: AdministrationItemContentComponent = observer(function ServerConfigurationPage({ configurationWizard }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationService.ts b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationService.ts index 1f4f89bf32..e94cb92157 100644 --- a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationService.ts +++ b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfiguration/ServerConfigurationService.ts @@ -8,15 +8,15 @@ import { makeObservable, observable } from 'mobx'; import { AdministrationScreenService } from '@cloudbeaver/core-administration'; -import { ActionSnackbar, ActionSnackbarProps, PlaceholderContainer } from '@cloudbeaver/core-blocks'; +import { ActionSnackbar, type ActionSnackbarProps, PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { DEFAULT_NAVIGATOR_VIEW_SETTINGS } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; -import { ENotificationType, INotification, NotificationService } from '@cloudbeaver/core-events'; -import { Executor, ExecutorInterrupter, IExecutor, IExecutorHandler } from '@cloudbeaver/core-executor'; +import { ENotificationType, type INotification, NotificationService } from '@cloudbeaver/core-events'; +import { Executor, ExecutorInterrupter, type IExecutor, type IExecutorHandler } from '@cloudbeaver/core-executor'; import { DefaultNavigatorSettingsResource, ProductInfoResource, ServerConfigResource, SessionDataResource } from '@cloudbeaver/core-root'; -import { ADMINISTRATION_SERVER_CONFIGURATION_ITEM } from './ADMINISTRATION_SERVER_CONFIGURATION_ITEM'; -import type { IServerConfigurationPageState } from './IServerConfigurationPageState'; +import { ADMINISTRATION_SERVER_CONFIGURATION_ITEM } from './ADMINISTRATION_SERVER_CONFIGURATION_ITEM.js'; +import type { IServerConfigurationPageState } from './IServerConfigurationPageState.js'; export interface IConfigurationPlaceholderProps { configurationWizard: boolean; diff --git a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfigurationAdministrationNavService.ts b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfigurationAdministrationNavService.ts index d04e11f831..b5a632a832 100644 --- a/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfigurationAdministrationNavService.ts +++ b/webapp/packages/plugin-administration/src/ConfigurationWizard/ServerConfigurationAdministrationNavService.ts @@ -8,7 +8,7 @@ import { AdministrationScreenService } from '@cloudbeaver/core-administration'; import { injectable } from '@cloudbeaver/core-di'; -import { ADMINISTRATION_SERVER_CONFIGURATION_ITEM } from './ServerConfiguration/ADMINISTRATION_SERVER_CONFIGURATION_ITEM'; +import { ADMINISTRATION_SERVER_CONFIGURATION_ITEM } from './ServerConfiguration/ADMINISTRATION_SERVER_CONFIGURATION_ITEM.js'; @injectable() export class ServerConfigurationAdministrationNavService { diff --git a/webapp/packages/plugin-administration/src/LocaleService.ts b/webapp/packages/plugin-administration/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-administration/src/LocaleService.ts +++ b/webapp/packages/plugin-administration/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-administration/src/PluginBootstrap.ts b/webapp/packages/plugin-administration/src/PluginBootstrap.ts index 5a1ec12dc5..e20cb86b60 100644 --- a/webapp/packages/plugin-administration/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-administration/src/PluginBootstrap.ts @@ -14,9 +14,9 @@ import { ScreenService } from '@cloudbeaver/core-routing'; import { MenuBaseItem, MenuService } from '@cloudbeaver/core-view'; import { TOP_NAV_BAR_SETTINGS_MENU } from '@cloudbeaver/plugin-settings-menu'; -import { AdministrationTopAppBarService } from './AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBarService'; +import { AdministrationTopAppBarService } from './AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBarService.js'; -const AdministrationMenu = lazy(() => import('./AdministrationMenu/AdministrationMenu').then(m => ({ default: m.AdministrationMenu }))); +const AdministrationMenu = lazy(() => import('./AdministrationMenu/AdministrationMenu.js').then(m => ({ default: m.AdministrationMenu }))); const AppStateMenu = lazy(() => import('@cloudbeaver/plugin-top-app-bar').then(m => ({ default: m.AppStateMenu }))); @injectable() @@ -31,7 +31,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.administrationTopAppBarService.placeholder.add(AdministrationMenu, 0); this.administrationTopAppBarService.placeholder.add(AppStateMenu); @@ -75,7 +75,7 @@ export class PluginBootstrap extends Bootstrap { if (index > -1) { const item = items.splice(index, 1); - items.unshift(item[0]); + items.unshift(item[0]!); } return items; diff --git a/webapp/packages/plugin-administration/src/index.ts b/webapp/packages/plugin-administration/src/index.ts index db7c1254cd..0aab2652e4 100644 --- a/webapp/packages/plugin-administration/src/index.ts +++ b/webapp/packages/plugin-administration/src/index.ts @@ -1,14 +1,21 @@ -import { manifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { manifest } from './manifest.js'; export default manifest; -export * from './AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBarService'; -export * from './AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBarService'; -export * from './AdministrationMenu/MENU_APP_ADMINISTRATION_ACTIONS'; -export * from './ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationConfigurationForm'; -export * from './ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationInfoForm'; -export * from './ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationNavigatorViewForm'; -export * from './ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationSecurityForm'; -export * from './ConfigurationWizard/ServerConfiguration/IServerConfigurationPageState'; -export * from './ConfigurationWizard/ServerConfiguration/ServerConfigurationService'; -export * from './ConfigurationWizard/ServerConfigurationAdministrationNavService'; +export * from './AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBarService.js'; +export * from './AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBarService.js'; +export * from './AdministrationMenu/MENU_APP_ADMINISTRATION_ACTIONS.js'; +export * from './ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationConfigurationForm.js'; +export * from './ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationInfoForm.js'; +export * from './ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationNavigatorViewForm.js'; +export * from './ConfigurationWizard/ServerConfiguration/Form/ServerConfigurationSecurityForm.js'; +export * from './ConfigurationWizard/ServerConfiguration/IServerConfigurationPageState.js'; +export * from './ConfigurationWizard/ServerConfiguration/ServerConfigurationService.js'; +export * from './ConfigurationWizard/ServerConfigurationAdministrationNavService.js'; diff --git a/webapp/packages/plugin-administration/src/manifest.ts b/webapp/packages/plugin-administration/src/manifest.ts index 624d951d24..83619435e0 100644 --- a/webapp/packages/plugin-administration/src/manifest.ts +++ b/webapp/packages/plugin-administration/src/manifest.ts @@ -13,14 +13,14 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./ConfigurationWizard/ServerConfiguration/ServerConfigurationService').then(m => m.ServerConfigurationService), - () => import('./ConfigurationWizard/ServerConfigurationAdministrationNavService').then(m => m.ServerConfigurationAdministrationNavService), - () => import('./ConfigurationWizard/ConfigurationWizardPagesBootstrapService').then(m => m.ConfigurationWizardPagesBootstrapService), - () => import('./AdministrationScreen/AdministrationScreenServiceBootstrap').then(m => m.AdministrationScreenServiceBootstrap), - () => import('./AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBarService').then(m => m.AdministrationTopAppBarService), - () => import('./AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBarService').then(m => m.WizardTopAppBarService), - () => import('./Administration/AdministrationViewService').then(m => m.AdministrationViewService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./ConfigurationWizard/ServerConfiguration/ServerConfigurationService.js').then(m => m.ServerConfigurationService), + () => import('./ConfigurationWizard/ServerConfigurationAdministrationNavService.js').then(m => m.ServerConfigurationAdministrationNavService), + () => import('./ConfigurationWizard/ConfigurationWizardPagesBootstrapService.js').then(m => m.ConfigurationWizardPagesBootstrapService), + () => import('./AdministrationScreen/AdministrationScreenServiceBootstrap.js').then(m => m.AdministrationScreenServiceBootstrap), + () => import('./AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBarService.js').then(m => m.AdministrationTopAppBarService), + () => import('./AdministrationScreen/ConfigurationWizard/WizardTopAppBar/WizardTopAppBarService.js').then(m => m.WizardTopAppBarService), + () => import('./Administration/AdministrationViewService.js').then(m => m.AdministrationViewService), ], }; diff --git a/webapp/packages/plugin-authentication-administration/package.json b/webapp/packages/plugin-authentication-administration/package.json index b5c01d9c66..8d7f0c8c6e 100644 --- a/webapp/packages/plugin-authentication-administration/package.json +++ b/webapp/packages/plugin-authentication-administration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-authentication-administration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/ServerConfiguration/AuthenticationProviders.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/ServerConfiguration/AuthenticationProviders.tsx index 7ce9f7758c..7218e4ae59 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/ServerConfiguration/AuthenticationProviders.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/ServerConfiguration/AuthenticationProviders.tsx @@ -9,13 +9,13 @@ import { observer } from 'mobx-react-lite'; import React, { useContext } from 'react'; import { AUTH_PROVIDER_LOCAL_ID, AuthProviderService, AuthProvidersResource, AuthSettingsService } from '@cloudbeaver/core-authentication'; -import { FormContext, Group, GroupTitle, PlaceholderComponent, Switch, useExecutor, useResource, useTranslate } from '@cloudbeaver/core-blocks'; +import { FormContext, Group, GroupTitle, type PlaceholderComponent, Switch, useExecutor, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import { isDefined } from '@cloudbeaver/core-utils'; import type { IConfigurationPlaceholderProps } from '@cloudbeaver/plugin-administration'; -import { ServerConfigurationAdminForm } from './ServerConfigurationAdminForm'; +import { ServerConfigurationAdminForm } from './ServerConfigurationAdminForm.js'; export const AuthenticationProviders: PlaceholderComponent = observer(function AuthenticationProviders({ state: { serverConfig }, diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/ServerConfiguration/ServerConfigurationAuthenticationBootstrap.ts b/webapp/packages/plugin-authentication-administration/src/Administration/ServerConfiguration/ServerConfigurationAuthenticationBootstrap.ts index 2a6b7d4d25..f7a872a601 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/ServerConfiguration/ServerConfigurationAuthenticationBootstrap.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/ServerConfiguration/ServerConfigurationAuthenticationBootstrap.ts @@ -9,12 +9,12 @@ import { AdministrationScreenService } from '@cloudbeaver/core-administration'; import { AUTH_PROVIDER_LOCAL_ID, AuthProvidersResource, PasswordPolicyService } from '@cloudbeaver/core-authentication'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorInterrupter, IExecutorHandler } from '@cloudbeaver/core-executor'; +import { ExecutorInterrupter, type IExecutorHandler } from '@cloudbeaver/core-executor'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import { PasswordPolicyResource, ServerConfigResource } from '@cloudbeaver/core-root'; import { - ILoadConfigData, - IServerConfigSaveData, + type ILoadConfigData, + type IServerConfigSaveData, ServerConfigurationService, serverConfigValidationContext, } from '@cloudbeaver/plugin-administration'; @@ -33,13 +33,11 @@ export class ServerConfigurationAuthenticationBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.serverConfigurationService.validationTask.addHandler(this.validateForm); this.serverConfigurationService.loadConfigTask.addHandler(this.loadServerConfig); } - load(): void {} - private readonly loadServerConfig: IExecutorHandler = async (data, contexts) => { if (!data.reset) { return; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Contexts/teamFormConfigureContext.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Contexts/teamFormConfigureContext.ts index 56d2935a8d..a5363402ca 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Contexts/teamFormConfigureContext.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Contexts/teamFormConfigureContext.ts @@ -8,7 +8,7 @@ import type { TeamInfo } from '@cloudbeaver/core-authentication'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import type { ITeamFormState } from '../ITeamFormProps'; +import type { ITeamFormState } from '../ITeamFormProps.js'; export interface ITeamFormConfigureContext { readonly info: TeamInfo | undefined; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/CreateTeam.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/CreateTeam.tsx index 4633c24c63..7e96ed402b 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/CreateTeam.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/CreateTeam.tsx @@ -11,8 +11,8 @@ import { Container, Group, GroupTitle, Loader, s, Translate, useS, useTranslate import { useService } from '@cloudbeaver/core-di'; import style from './CreateTeam.module.css'; -import { CreateTeamService } from './CreateTeamService'; -import { TeamForm } from './TeamForm'; +import { CreateTeamService } from './CreateTeamService.js'; +import { TeamForm } from './TeamForm.js'; export const CreateTeam: React.FC = observer(function CreateTeam() { const translate = useTranslate(); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/CreateTeamService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/CreateTeamService.ts index 4638430ebe..fc6c6b1fce 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/CreateTeamService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/CreateTeamService.ts @@ -10,10 +10,10 @@ import { makeObservable, observable } from 'mobx'; import { TeamsResource } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; -import type { ITeamFormState } from './ITeamFormProps'; -import { TeamFormService } from './TeamFormService'; -import { TeamFormState } from './TeamFormState'; -import { TeamsAdministrationNavService } from './TeamsAdministrationNavService'; +import type { ITeamFormState } from './ITeamFormProps.js'; +import { TeamFormService } from './TeamFormService.js'; +import { TeamFormState } from './TeamFormState.js'; +import { TeamsAdministrationNavService } from './TeamsAdministrationNavService.js'; @injectable() export class CreateTeamService { diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/ConnectionList.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/ConnectionList.tsx index e19005ab97..3ff4d110b2 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/ConnectionList.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/ConnectionList.tsx @@ -24,14 +24,14 @@ import { useS, useTranslate, } from '@cloudbeaver/core-blocks'; -import { Connection, DBDriverResource } from '@cloudbeaver/core-connections'; +import { type Connection, DBDriverResource } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import styles from './ConnectionList.module.css'; -import { getFilteredConnections } from './getFilteredConnections'; -import { GrantedConnectionsTableHeader, IFilterState } from './GrantedConnectionsTableHeader/GrantedConnectionsTableHeader'; -import { GrantedConnectionsTableInnerHeader } from './GrantedConnectionsTableHeader/GrantedConnectionsTableInnerHeader'; -import { GrantedConnectionsTableItem } from './GrantedConnectionsTableItem'; +import { getFilteredConnections } from './getFilteredConnections.js'; +import { GrantedConnectionsTableHeader, type IFilterState } from './GrantedConnectionsTableHeader/GrantedConnectionsTableHeader.js'; +import { GrantedConnectionsTableInnerHeader } from './GrantedConnectionsTableHeader/GrantedConnectionsTableInnerHeader.js'; +import { GrantedConnectionsTableItem } from './GrantedConnectionsTableItem.js'; interface Props { connectionList: Connection[]; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnections.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnections.tsx index ec94d32f1f..17e04edb8b 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnections.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnections.tsx @@ -20,17 +20,23 @@ import { useS, useTranslate, } from '@cloudbeaver/core-blocks'; -import { Connection, ConnectionInfoProjectKey, ConnectionInfoResource, DBDriverResource, isCloudConnection } from '@cloudbeaver/core-connections'; +import { + type Connection, + ConnectionInfoProjectKey, + ConnectionInfoResource, + DBDriverResource, + isCloudConnection, +} from '@cloudbeaver/core-connections'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import { isGlobalProject, ProjectInfo, ProjectInfoResource } from '@cloudbeaver/core-projects'; +import { isGlobalProject, type ProjectInfo, ProjectInfoResource } from '@cloudbeaver/core-projects'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; +import { type TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; -import type { ITeamFormProps } from '../ITeamFormProps'; -import { ConnectionList } from './ConnectionList'; +import type { ITeamFormProps } from '../ITeamFormProps.js'; +import { ConnectionList } from './ConnectionList.js'; import style from './GrantedConnections.module.css'; -import { GrantedConnectionList } from './GrantedConnectionsList'; -import { useGrantedConnections } from './useGrantedConnections'; +import { GrantedConnectionList } from './GrantedConnectionsList.js'; +import { useGrantedConnections } from './useGrantedConnections.js'; export const GrantedConnections: TabContainerPanelComponent = observer(function GrantedConnections({ tabId, state: formState }) { const styles = useS(style); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsList.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsList.tsx index 9f98a122e3..e8547a1bc5 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsList.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsList.tsx @@ -24,15 +24,15 @@ import { useS, useTranslate, } from '@cloudbeaver/core-blocks'; -import { Connection, DBDriverResource } from '@cloudbeaver/core-connections'; +import { type Connection, DBDriverResource } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; -import { getFilteredConnections } from './getFilteredConnections'; +import { getFilteredConnections } from './getFilteredConnections.js'; import style from './GrantedConnectionsList.module.css'; -import { GrantedConnectionsTableHeader, IFilterState } from './GrantedConnectionsTableHeader/GrantedConnectionsTableHeader'; -import { GrantedConnectionsTableInnerHeader } from './GrantedConnectionsTableHeader/GrantedConnectionsTableInnerHeader'; -import { GrantedConnectionsTableItem } from './GrantedConnectionsTableItem'; +import { GrantedConnectionsTableHeader, type IFilterState } from './GrantedConnectionsTableHeader/GrantedConnectionsTableHeader.js'; +import { GrantedConnectionsTableInnerHeader } from './GrantedConnectionsTableHeader/GrantedConnectionsTableInnerHeader.js'; +import { GrantedConnectionsTableItem } from './GrantedConnectionsTableItem.js'; interface Props { grantedConnections: Connection[]; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsTabService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsTabService.ts index 2732bd8b89..8ef2445527 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsTabService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsTabService.ts @@ -10,19 +10,19 @@ import React from 'react'; import { TeamsResource } from '@cloudbeaver/core-authentication'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { executorHandlerFilter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; +import { executorHandlerFilter, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { isGlobalProject, ProjectInfoResource } from '@cloudbeaver/core-projects'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { AdminConnectionGrantInfo, GraphQLService } from '@cloudbeaver/core-sdk'; -import { isArraysEqual, MetadataValueGetter } from '@cloudbeaver/core-utils'; +import { type AdminConnectionGrantInfo, GraphQLService } from '@cloudbeaver/core-sdk'; +import { isArraysEqual, type MetadataValueGetter } from '@cloudbeaver/core-utils'; -import { teamContext } from '../Contexts/teamContext'; -import type { ITeamFormProps, ITeamFormSubmitData } from '../ITeamFormProps'; -import { TeamFormService } from '../TeamFormService'; -import type { IGrantedConnectionsTabState } from './IGrantedConnectionsTabState'; +import { teamContext } from '../Contexts/teamContext.js'; +import type { ITeamFormProps, ITeamFormSubmitData } from '../ITeamFormProps.js'; +import { TeamFormService } from '../TeamFormService.js'; +import type { IGrantedConnectionsTabState } from './IGrantedConnectionsTabState.js'; const GrantedConnections = React.lazy(async () => { - const { GrantedConnections } = await import('./GrantedConnections'); + const { GrantedConnections } = await import('./GrantedConnections.js'); return { default: GrantedConnections }; }); @@ -41,7 +41,7 @@ export class GrantedConnectionsTabService extends Bootstrap { this.key = 'granted-connections'; } - register(): void { + override register(): void { this.teamFormService.tabsContainer.add({ key: this.key, name: 'administration_teams_team_granted_connections_tab_title', @@ -57,8 +57,6 @@ export class GrantedConnectionsTabService extends Bootstrap { this.teamFormService.configureTask.addHandler(() => this.projectInfoResource.load(CachedMapAllKey)); } - load(): Promise | void {} - private isEnabled(): boolean { return this.projectInfoResource.values.some(isGlobalProject); } diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsTableItem.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsTableItem.tsx index 5b611396ac..231da110c2 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsTableItem.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/GrantedConnectionsTableItem.tsx @@ -38,7 +38,7 @@ export const GrantedConnectionsTableItem = observer(function GrantedConne - {icon && } + {icon && } {name} diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/useGrantedConnections.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/useGrantedConnections.tsx index 2451873227..b273a50c04 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/useGrantedConnections.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedConnections/useGrantedConnections.tsx @@ -7,15 +7,15 @@ */ import { action, computed, observable } from 'mobx'; -import { TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication'; +import { type TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { useTabState } from '@cloudbeaver/core-ui'; -import { ILoadableState, isArraysEqual } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isArraysEqual } from '@cloudbeaver/core-utils'; -import type { TeamFormMode } from '../ITeamFormProps'; -import type { IGrantedConnectionsTabState } from './IGrantedConnectionsTabState'; +import type { TeamFormMode } from '../ITeamFormProps.js'; +import type { IGrantedConnectionsTabState } from './IGrantedConnectionsTabState.js'; interface State extends ILoadableState { state: IGrantedConnectionsTabState; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUserList.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUserList.tsx index ee2cf8aec8..d07ed564dc 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUserList.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUserList.tsx @@ -30,12 +30,12 @@ import { useService } from '@cloudbeaver/core-di'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { getFilteredUsers } from './getFilteredUsers'; +import { getFilteredUsers } from './getFilteredUsers.js'; import style from './GrantedUserList.module.css'; -import { GrantedUsersTableHeader, IFilterState } from './GrantedUsersTableHeader/GrantedUsersTableHeader'; -import { GrantedUsersTableInnerHeader } from './GrantedUsersTableHeader/GrantedUsersTableInnerHeader'; -import { GrantedUsersTableItem } from './GrantedUsersTableItem'; -import type { IGrantedUser } from './IGrantedUser'; +import { GrantedUsersTableHeader, type IFilterState } from './GrantedUsersTableHeader/GrantedUsersTableHeader.js'; +import { GrantedUsersTableInnerHeader } from './GrantedUsersTableHeader/GrantedUsersTableInnerHeader.js'; +import { GrantedUsersTableItem } from './GrantedUsersTableItem.js'; +import type { IGrantedUser } from './IGrantedUser.js'; interface Props { grantedUsers: IGrantedUser[]; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsers.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsers.tsx index a6769d3b2a..496c6fbf3b 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsers.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsers.tsx @@ -11,14 +11,14 @@ import { UsersResource, UsersResourceFilterKey } from '@cloudbeaver/core-authent import { Container, Group, InfoItem, Loader, s, TextPlaceholder, useAutoLoad, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { CachedResourceOffsetPageListKey } from '@cloudbeaver/core-resource'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; +import { type TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; -import type { ITeamFormProps } from '../ITeamFormProps'; -import { GrantedUserList } from './GrantedUserList'; +import type { ITeamFormProps } from '../ITeamFormProps.js'; +import { GrantedUserList } from './GrantedUserList.js'; import style from './GrantedUsers.module.css'; -import type { IGrantedUser } from './IGrantedUser'; -import { useGrantedUsers } from './useGrantedUsers'; -import { UserList } from './UserList'; +import type { IGrantedUser } from './IGrantedUser.js'; +import { useGrantedUsers } from './useGrantedUsers.js'; +import { UserList } from './UserList.js'; export const GrantedUsers: TabContainerPanelComponent = observer(function GrantedUsers({ tabId, state: formState }) { const styles = useS(style); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsersTabService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsersTabService.ts index c631baa12f..44988a44c6 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsersTabService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsersTabService.ts @@ -11,15 +11,15 @@ import { TeamRolesResource, TeamsResource, UsersResource } from '@cloudbeaver/co import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import { isArraysEqual, isObjectsEqual, MetadataValueGetter } from '@cloudbeaver/core-utils'; +import { isArraysEqual, isObjectsEqual, type MetadataValueGetter } from '@cloudbeaver/core-utils'; -import { teamContext } from '../Contexts/teamContext'; -import type { ITeamFormProps, ITeamFormSubmitData } from '../ITeamFormProps'; -import { TeamFormService } from '../TeamFormService'; -import type { IGrantedUsersTabState } from './IGrantedUsersTabState'; +import { teamContext } from '../Contexts/teamContext.js'; +import type { ITeamFormProps, ITeamFormSubmitData } from '../ITeamFormProps.js'; +import { TeamFormService } from '../TeamFormService.js'; +import type { IGrantedUsersTabState } from './IGrantedUsersTabState.js'; const GrantedUsers = React.lazy(async () => { - const { GrantedUsers } = await import('./GrantedUsers'); + const { GrantedUsers } = await import('./GrantedUsers.js'); return { default: GrantedUsers }; }); @@ -38,7 +38,7 @@ export class GrantedUsersTabService extends Bootstrap { this.key = 'granted-users'; } - register(): void { + override register(): void { this.teamFormService.tabsContainer.add({ key: this.key, name: 'administration_teams_team_granted_users_tab_title', @@ -51,8 +51,6 @@ export class GrantedUsersTabService extends Bootstrap { this.teamFormService.afterFormSubmittingTask.addHandler(this.save.bind(this)); } - load(): void {} - private stateGetter(context: ITeamFormProps): MetadataValueGetter { return () => ({ loading: false, diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsersTableItem.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsersTableItem.tsx index 38123138b1..5782909738 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsersTableItem.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/GrantedUsersTableItem.tsx @@ -45,7 +45,7 @@ export const GrantedUsersTableItem = observer(function GrantedUsersTableI - + {name} {teamRoles.length > 0 && ( diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/UserList.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/UserList.tsx index de515c6fb2..79cc3bc680 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/UserList.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/UserList.tsx @@ -29,11 +29,11 @@ import { useService } from '@cloudbeaver/core-di'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import type { AdminUserInfoFragment } from '@cloudbeaver/core-sdk'; -import { getFilteredUsers } from './getFilteredUsers'; -import { GrantedUsersTableHeader, IFilterState } from './GrantedUsersTableHeader/GrantedUsersTableHeader'; +import { getFilteredUsers } from './getFilteredUsers.js'; +import { GrantedUsersTableHeader, type IFilterState } from './GrantedUsersTableHeader/GrantedUsersTableHeader.js'; import style from './UserList.module.css'; -import { UsersTableInnerHeader } from './UsersTableInnerHeader'; -import { UsersTableItem } from './UsersTableItem'; +import { UsersTableInnerHeader } from './UsersTableInnerHeader.js'; +import { UsersTableItem } from './UsersTableItem.js'; interface Props { userList: AdminUserInfoFragment[]; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/UsersTableItem.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/UsersTableItem.tsx index 8b06976b8c..71c9f9d57c 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/UsersTableItem.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/UsersTableItem.tsx @@ -28,7 +28,7 @@ export const UsersTableItem = observer(function UsersTableItem({ id, name - + {name} diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/useGrantedUsers.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/useGrantedUsers.tsx index f6e49ca23e..5cfa9ca97c 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/useGrantedUsers.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/GrantedUsers/useGrantedUsers.tsx @@ -7,15 +7,15 @@ */ import { action, computed, observable, toJS } from 'mobx'; -import { TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication'; +import { type TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { useTabState } from '@cloudbeaver/core-ui'; -import { ILoadableState, isArraysEqual, isObjectsEqual } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isArraysEqual, isObjectsEqual } from '@cloudbeaver/core-utils'; -import type { TeamFormMode } from '../ITeamFormProps'; -import type { IGrantedUsersTabState } from './IGrantedUsersTabState'; +import type { TeamFormMode } from '../ITeamFormProps.js'; +import type { IGrantedUsersTabState } from './IGrantedUsersTabState.js'; interface State extends ILoadableState { state: IGrantedUsersTabState; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/Permissions.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/Permissions.tsx index 453803e8eb..a0574b1d60 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/Permissions.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/Permissions.tsx @@ -11,7 +11,7 @@ import { PermissionsResource } from '@cloudbeaver/core-administration'; import { FieldCheckbox, Group, GroupTitle, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import type { ITeamFormProps } from '../ITeamFormProps'; +import type { ITeamFormProps } from '../ITeamFormProps.js'; export const Permissions = observer(function Permissions({ state }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamMetaParameters.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamMetaParameters.tsx index 6684d02da5..741055b788 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamMetaParameters.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamMetaParameters.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { TeamMetaParametersResource } from '@cloudbeaver/core-authentication'; import { Group, GroupTitle, ObjectPropertyInfoForm, useResource, useTranslate } from '@cloudbeaver/core-blocks'; -import type { ITeamFormState } from '../ITeamFormProps'; +import type { ITeamFormState } from '../ITeamFormProps.js'; interface IProps { state: ITeamFormState; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptions.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptions.tsx index bd431e88c1..97082c6e5d 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptions.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptions.tsx @@ -11,9 +11,9 @@ import { Container, Group, InputField, Textarea, useResource, useTranslate } fro import { ServerConfigResource } from '@cloudbeaver/core-root'; import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui'; -import type { ITeamFormProps } from '../ITeamFormProps'; -import { Permissions } from './Permissions'; -import { TeamMetaParameters } from './TeamMetaParameters'; +import type { ITeamFormProps } from '../ITeamFormProps.js'; +import { Permissions } from './Permissions.js'; +import { TeamMetaParameters } from './TeamMetaParameters.js'; export const TeamOptions: TabContainerPanelComponent = observer(function TeamOptions({ state }) { const serverConfigResource = useResource(TeamOptions, ServerConfigResource, undefined); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptionsTabService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptionsTabService.ts index d5578fcdec..4fa9273eca 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptionsTabService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptionsTabService.ts @@ -13,12 +13,12 @@ import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { LocalizationService } from '@cloudbeaver/core-localization'; import { getUniqueName } from '@cloudbeaver/core-utils'; -import { teamContext } from '../Contexts/teamContext'; -import type { ITeamFormFillConfigData, ITeamFormSubmitData } from '../ITeamFormProps'; -import { TeamFormService } from '../TeamFormService'; +import { teamContext } from '../Contexts/teamContext.js'; +import type { ITeamFormFillConfigData, ITeamFormSubmitData } from '../ITeamFormProps.js'; +import { TeamFormService } from '../TeamFormService.js'; const TeamOptions = React.lazy(async () => { - const { TeamOptions } = await import('./TeamOptions'); + const { TeamOptions } = await import('./TeamOptions.js'); return { default: TeamOptions }; }); @@ -32,7 +32,7 @@ export class TeamOptionsTabService extends Bootstrap { super(); } - register(): void { + override register(): void { this.teamFormService.tabsContainer.add({ key: 'options', name: 'ui_options', @@ -49,8 +49,6 @@ export class TeamOptionsTabService extends Bootstrap { this.teamFormService.fillConfigTask.addHandler(this.fillConfig.bind(this)); } - load(): void {} - private async prepareConfig({ state }: ITeamFormSubmitData, contexts: IExecutionContextProvider) { const config = contexts.getContext(teamContext); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamForm.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamForm.tsx index 9594c4592b..2f0eb3f7e7 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamForm.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamForm.tsx @@ -26,11 +26,11 @@ import { useService } from '@cloudbeaver/core-di'; import { ENotificationType } from '@cloudbeaver/core-events'; import { TabList, TabPanelList, TabsState } from '@cloudbeaver/core-ui'; -import { teamContext } from './Contexts/teamContext'; -import type { ITeamFormState } from './ITeamFormProps'; +import { teamContext } from './Contexts/teamContext.js'; +import type { ITeamFormState } from './ITeamFormProps.js'; import style from './TeamForm.module.css'; -import { ITeamFormActionsContext, TeamFormActionsContext } from './TeamFormActionsContext'; -import { TeamFormService } from './TeamFormService'; +import { type ITeamFormActionsContext, TeamFormActionsContext } from './TeamFormActionsContext.js'; +import { TeamFormService } from './TeamFormService.js'; interface Props { state: ITeamFormState; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormActionsContext.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormActionsContext.ts index 1ee0f2893d..f8c47d3e44 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormActionsContext.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormActionsContext.ts @@ -1,8 +1,16 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ import { createContext } from 'react'; -import type { ITeamFormState } from './ITeamFormProps'; + +import type { ITeamFormState } from './ITeamFormProps.js'; export interface ITeamFormActionsContext { save: ITeamFormState['save']; } -export const TeamFormActionsContext = createContext(null); \ No newline at end of file +export const TeamFormActionsContext = createContext(null); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormBaseActions.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormBaseActions.tsx index 03cbc29238..f38ff2fd6a 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormBaseActions.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormBaseActions.tsx @@ -8,10 +8,10 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { Button, PlaceholderComponent, useTranslate } from '@cloudbeaver/core-blocks'; +import { Button, type PlaceholderComponent, useTranslate } from '@cloudbeaver/core-blocks'; -import type { ITeamFormProps } from './ITeamFormProps'; -import { TeamFormActionsContext } from './TeamFormActionsContext'; +import type { ITeamFormProps } from './ITeamFormProps.js'; +import { TeamFormActionsContext } from './TeamFormActionsContext.js'; export const TeamFormBaseActions: PlaceholderComponent = observer(function TeamFormBaseActions({ state, onCancel }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormService.ts index 467a831c37..b406da9c33 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormService.ts @@ -10,13 +10,13 @@ import React from 'react'; import { PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; import { ENotificationType, NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorHandlersCollection, ExecutorInterrupter, IExecutorHandler, IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; +import { ExecutorHandlersCollection, ExecutorInterrupter, type IExecutorHandler, type IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; import { TabsContainer } from '@cloudbeaver/core-ui'; -import type { ITeamFormFillConfigData, ITeamFormProps, ITeamFormState, ITeamFormSubmitData } from './ITeamFormProps'; +import type { ITeamFormFillConfigData, ITeamFormProps, ITeamFormState, ITeamFormSubmitData } from './ITeamFormProps.js'; const TeamFormBaseActions = React.lazy(async () => { - const { TeamFormBaseActions } = await import('./TeamFormBaseActions'); + const { TeamFormBaseActions } = await import('./TeamFormBaseActions.js'); return { default: TeamFormBaseActions }; }); @@ -110,7 +110,7 @@ export class TeamFormService { } else { this.notificationService.notify( { - title: status.messages[0], + title: status.messages[0]!, message: status.messages.slice(1).join('\n'), }, status.saved ? ENotificationType.Success : ENotificationType.Error, diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormState.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormState.ts index bf6e39ca9c..c4a19c9d38 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormState.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamFormState.ts @@ -8,13 +8,13 @@ import { computed, makeObservable, observable } from 'mobx'; import type { TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication'; -import { Executor, IExecutionContextProvider, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutionContextProvider, type IExecutor } from '@cloudbeaver/core-executor'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import { teamFormConfigureContext } from './Contexts/teamFormConfigureContext'; -import { ITeamFormStateInfo, teamFormStateContext } from './Contexts/teamFormStateContext'; -import type { ITeamFormState, ITeamFormSubmitData, TeamFormMode } from './ITeamFormProps'; -import type { TeamFormService } from './TeamFormService'; +import { teamFormConfigureContext } from './Contexts/teamFormConfigureContext.js'; +import { type ITeamFormStateInfo, teamFormStateContext } from './Contexts/teamFormStateContext.js'; +import type { ITeamFormState, ITeamFormSubmitData, TeamFormMode } from './ITeamFormProps.js'; +import type { TeamFormService } from './TeamFormService.js'; export class TeamFormState implements ITeamFormState { mode: TeamFormMode; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsAdministrationNavService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsAdministrationNavService.ts index c224ecb411..0d3a0cf04b 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsAdministrationNavService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsAdministrationNavService.ts @@ -7,7 +7,7 @@ */ import { injectable } from '@cloudbeaver/core-di'; -import { EUsersAdministrationSub, UsersAdministrationNavigationService } from '../UsersAdministrationNavigationService'; +import { EUsersAdministrationSub, UsersAdministrationNavigationService } from '../UsersAdministrationNavigationService.js'; @injectable() export class TeamsAdministrationNavService { diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsPage.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsPage.tsx index 9d6a4be411..673d887197 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsPage.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsPage.tsx @@ -10,10 +10,10 @@ import { observer } from 'mobx-react-lite'; import { ColoredContainer, Container, Group, ToolsAction, ToolsPanel, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { CreateTeam } from './CreateTeam'; -import { CreateTeamService } from './CreateTeamService'; -import { TeamsTable } from './TeamsTable/TeamsTable'; -import { useTeamsTable } from './TeamsTable/useTeamsTable'; +import { CreateTeam } from './CreateTeam.js'; +import { CreateTeamService } from './CreateTeamService.js'; +import { TeamsTable } from './TeamsTable/TeamsTable.js'; +import { useTeamsTable } from './TeamsTable/useTeamsTable.js'; interface Props { param?: string | null; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/Team.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/Team.tsx index 97ddcd2355..8b874504ae 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/Team.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/Team.tsx @@ -11,9 +11,9 @@ import type { TeamInfo } from '@cloudbeaver/core-authentication'; import { Loader, Placeholder, s, TableColumnValue, TableItem, TableItemExpand, TableItemSelect, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { TeamsAdministrationService } from '../TeamsAdministrationService'; +import { TeamsAdministrationService } from '../TeamsAdministrationService.js'; import style from './Team.module.css'; -import { TeamEdit } from './TeamEdit'; +import { TeamEdit } from './TeamEdit.js'; interface Props { team: TeamInfo; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/TeamEdit.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/TeamEdit.tsx index 967117c7ea..e5aff28a98 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/TeamEdit.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/TeamEdit.tsx @@ -12,8 +12,8 @@ import { TeamsResource } from '@cloudbeaver/core-authentication'; import { Container, s, TableContext, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { TeamForm } from '../TeamForm'; -import { useTeamFormState } from '../useTeamFormState'; +import { TeamForm } from '../TeamForm.js'; +import { useTeamFormState } from '../useTeamFormState.js'; import style from './TeamEdit.module.css'; interface Props { diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/TeamsTable.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/TeamsTable.tsx index f9b5d4f3d4..7b94b6286d 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/TeamsTable.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/TeamsTable.tsx @@ -12,7 +12,7 @@ import { ExceptionMessageStyles, Loader, SContext, - StyleRegistry, + type StyleRegistry, Table, TableBody, TableColumnHeader, @@ -22,7 +22,7 @@ import { } from '@cloudbeaver/core-blocks'; import type { ILoadableState } from '@cloudbeaver/core-utils'; -import { Team } from './Team'; +import { Team } from './Team.js'; import teamsTableStyle from './TeamsTable.module.css'; const registry: StyleRegistry = [ diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/useTeamsTable.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/useTeamsTable.tsx index 02f902e226..328714a9e8 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/useTeamsTable.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/TeamsTable/useTeamsTable.tsx @@ -7,7 +7,7 @@ */ import { computed, observable } from 'mobx'; -import { compareTeams, TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication'; +import { compareTeams, type TeamInfo, TeamsResource } from '@cloudbeaver/core-authentication'; import { ConfirmationDialogDelete, TableState, useObservableRef, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/useTeamFormState.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/useTeamFormState.ts index 7a68826065..de2c4a5074 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/useTeamFormState.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/useTeamFormState.ts @@ -10,9 +10,9 @@ import { useState } from 'react'; import type { TeamsResource } from '@cloudbeaver/core-authentication'; import { useService } from '@cloudbeaver/core-di'; -import type { ITeamFormState } from './ITeamFormProps'; -import { TeamFormService } from './TeamFormService'; -import { TeamFormState } from './TeamFormState'; +import type { ITeamFormState } from './ITeamFormProps.js'; +import { TeamFormService } from './TeamFormService.js'; +import { TeamFormState } from './TeamFormState.js'; export function useTeamFormState(resource: TeamsResource, configure?: (state: ITeamFormState) => any): ITeamFormState { const service = useService(TeamFormService); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserForm.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserForm.tsx index 99bd4c784e..89251c7f6e 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserForm.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserForm.tsx @@ -10,13 +10,13 @@ import { observer } from 'mobx-react-lite'; import { Button, Container, Form, s, StatusMessage, useAutoLoad, useForm, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { FormMode, IFormState, TabList, TabPanelList, TabsState } from '@cloudbeaver/core-ui'; +import { FormMode, type IFormState, TabList, TabPanelList, TabsState } from '@cloudbeaver/core-ui'; import { getFirstException } from '@cloudbeaver/core-utils'; import style from './AdministrationUserForm.module.css'; -import { AdministrationUserFormDeleteButton } from './AdministrationUserFormDeleteButton'; -import { AdministrationUserFormService, IUserFormState } from './AdministrationUserFormService'; -import { getUserFormInfoPart } from './Info/getUserFormInfoPart'; +import { AdministrationUserFormDeleteButton } from './AdministrationUserFormDeleteButton.js'; +import { AdministrationUserFormService, type IUserFormState } from './AdministrationUserFormService.js'; +import { getUserFormInfoPart } from './Info/getUserFormInfoPart.js'; interface Props { state: IFormState; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormDeleteButton.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormDeleteButton.tsx index a757ff5b6a..0d3fe845ff 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormDeleteButton.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormDeleteButton.tsx @@ -6,13 +6,13 @@ * you may not use this file except in compliance with the License. */ import { UsersResource } from '@cloudbeaver/core-authentication'; -import { Button, ButtonProps, useTranslate } from '@cloudbeaver/core-blocks'; +import { Button, type ButtonProps, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { CommonDialogService } from '@cloudbeaver/core-dialogs'; -import { AdministrationUsersManagementService } from '../../../AdministrationUsersManagementService'; -import { DeleteUserDialog } from './DeleteUserDialog'; -import { DisableUserDialog } from './DisableUserDialog'; +import { AdministrationUsersManagementService } from '../../../AdministrationUsersManagementService.js'; +import { DeleteUserDialog } from './DeleteUserDialog.js'; +import { DisableUserDialog } from './DisableUserDialog.js'; interface Props extends ButtonProps { userId: string; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormService.ts index 4ca66aaac1..3d72020735 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormService.ts @@ -8,7 +8,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { LocalizationService } from '@cloudbeaver/core-localization'; -import { FormBaseService, IFormProps } from '@cloudbeaver/core-ui'; +import { FormBaseService, type IFormProps } from '@cloudbeaver/core-ui'; export interface IUserFormState { userId: string | null; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormState.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormState.ts index 587c6839ec..532980a93e 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormState.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserFormState.ts @@ -8,7 +8,7 @@ import type { IServiceProvider } from '@cloudbeaver/core-di'; import { FormState } from '@cloudbeaver/core-ui'; -import type { AdministrationUserFormService, IUserFormState } from './AdministrationUserFormService'; +import type { AdministrationUserFormService, IUserFormState } from './AdministrationUserFormService.js'; export class AdministrationUserFormState extends FormState { constructor(serviceProvider: IServiceProvider, service: AdministrationUserFormService, config: IUserFormState) { diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccess.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccess.tsx index cb5846299e..0ac6d7a39e 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccess.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccess.tsx @@ -34,9 +34,9 @@ import { CachedMapAllKey, resourceKeyList } from '@cloudbeaver/core-resource'; import { type TabContainerPanelComponent, useTab, useTabState } from '@cloudbeaver/core-ui'; import { isDefined } from '@cloudbeaver/core-utils'; -import type { UserFormProps } from '../AdministrationUserFormService'; -import type { UserFormConnectionAccessPart } from './UserFormConnectionAccessPart'; -import { UserFormConnectionTableItem } from './UserFormConnectionTableItem'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; +import type { UserFormConnectionAccessPart } from './UserFormConnectionAccessPart.js'; +import { UserFormConnectionTableItem } from './UserFormConnectionTableItem.js'; export const UserFormConnectionAccess: TabContainerPanelComponent = observer(function UserFormConnectionAccess({ tabId }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPanel.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPanel.tsx index 1c0b19b408..9c70e08cc6 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPanel.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPanel.tsx @@ -10,9 +10,9 @@ import { observer } from 'mobx-react-lite'; import { Container, Group, useAutoLoad, useTranslate } from '@cloudbeaver/core-blocks'; import { type TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; -import type { UserFormProps } from '../AdministrationUserFormService'; -import { getUserFormInfoPart } from '../Info/getUserFormInfoPart'; -import { UserFormConnectionAccess } from './UserFormConnectionAccess'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; +import { getUserFormInfoPart } from '../Info/getUserFormInfoPart.js'; +import { UserFormConnectionAccess } from './UserFormConnectionAccess.js'; export const UserFormConnectionAccessPanel: TabContainerPanelComponent = observer(function UserFormConnectionAccessPanel({ tabId, diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPart.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPart.ts index 6cc4e3cf2a..c8cc58c306 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPart.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPart.ts @@ -8,11 +8,11 @@ import type { UsersResource } from '@cloudbeaver/core-authentication'; import { isGlobalProject, type ProjectInfoResource } from '@cloudbeaver/core-projects'; import { type AdminConnectionGrantInfo, AdminSubjectType } from '@cloudbeaver/core-sdk'; -import { FormMode, FormPart, IFormState } from '@cloudbeaver/core-ui'; +import { FormMode, FormPart, type IFormState } from '@cloudbeaver/core-ui'; import { isArraysEqual } from '@cloudbeaver/core-utils'; -import type { IUserFormState } from '../AdministrationUserFormService'; -import type { UserFormInfoPart } from '../Info/UserFormInfoPart'; +import type { IUserFormState } from '../AdministrationUserFormService.js'; +import type { UserFormInfoPart } from '../Info/UserFormInfoPart.js'; export class UserFormConnectionAccessPart extends FormPart { constructor( @@ -24,7 +24,7 @@ export class UserFormConnectionAccessPart extends FormPart { - const { UserFormConnectionAccessPanel } = await import('./UserFormConnectionAccessPanel'); + const { UserFormConnectionAccessPanel } = await import('./UserFormConnectionAccessPanel.js'); return { default: UserFormConnectionAccessPanel }; }); @@ -28,7 +28,7 @@ export class UserFormConnectionAccessPartBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.administrationUserFormService.parts.add({ key: 'connections_access', name: 'authentication_administration_user_connections_access', @@ -40,6 +40,4 @@ export class UserFormConnectionAccessPartBootstrap extends Bootstrap { getLoader: () => getCachedMapResourceLoaderState(this.projectInfoResource, () => CachedMapAllKey), }); } - - load(): void {} } diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionTableItem.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionTableItem.tsx index f73c4f889b..b2d4bef716 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionTableItem.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/UserFormConnectionTableItem.tsx @@ -13,7 +13,7 @@ import { useService } from '@cloudbeaver/core-di'; import { AdminSubjectType } from '@cloudbeaver/core-sdk'; import { useTabState } from '@cloudbeaver/core-ui'; -import type { UserFormConnectionAccessPart } from './UserFormConnectionAccessPart'; +import type { UserFormConnectionAccessPart } from './UserFormConnectionAccessPart.js'; interface Props { connection: Connection; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/getUserFormConnectionAccessPart.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/getUserFormConnectionAccessPart.ts index a96b94d8e5..b0ad3b350f 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/getUserFormConnectionAccessPart.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/ConnectionAccess/getUserFormConnectionAccessPart.ts @@ -10,9 +10,9 @@ import { createDataContext, DATA_CONTEXT_DI_PROVIDER } from '@cloudbeaver/core-d import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import type { IFormState } from '@cloudbeaver/core-ui'; -import type { IUserFormState } from '../AdministrationUserFormService'; -import { getUserFormInfoPart } from '../Info/getUserFormInfoPart'; -import { UserFormConnectionAccessPart } from './UserFormConnectionAccessPart'; +import type { IUserFormState } from '../AdministrationUserFormService.js'; +import { getUserFormInfoPart } from '../Info/getUserFormInfoPart.js'; +import { UserFormConnectionAccessPart } from './UserFormConnectionAccessPart.js'; const DATA_CONTEXT_USER_FORM_CONNECTION_ACCESS_PART = createDataContext('User Form Connection Access Part'); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfo.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfo.tsx index ffcf2a7818..43a3c26dee 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfo.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfo.tsx @@ -9,15 +9,15 @@ import { observer } from 'mobx-react-lite'; import { Container, FieldCheckbox, Group, GroupTitle, Placeholder, useAutoLoad, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { TabContainerPanelComponent, useTab, useTabState } from '@cloudbeaver/core-ui'; +import { type TabContainerPanelComponent, useTab, useTabState } from '@cloudbeaver/core-ui'; -import { AdministrationUsersManagementService } from '../../../../AdministrationUsersManagementService'; -import type { UserFormProps } from '../AdministrationUserFormService'; -import { UserFormInfoCredentials } from './UserFormInfoCredentials'; -import { UserFormInfoMetaParameters } from './UserFormInfoMetaParameters'; -import type { UserFormInfoPart } from './UserFormInfoPart'; -import { UserFormInfoPartService } from './UserFormInfoPartService'; -import { UserFormInfoTeams } from './UserFormInfoTeams'; +import { AdministrationUsersManagementService } from '../../../../AdministrationUsersManagementService.js'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; +import { UserFormInfoCredentials } from './UserFormInfoCredentials.js'; +import { UserFormInfoMetaParameters } from './UserFormInfoMetaParameters.js'; +import type { UserFormInfoPart } from './UserFormInfoPart.js'; +import { UserFormInfoPartService } from './UserFormInfoPartService.js'; +import { UserFormInfoTeams } from './UserFormInfoTeams.js'; export const UserFormInfo: TabContainerPanelComponent = observer(function UserFormInfo({ tabId, formState }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx index 5a7458ab63..7c72c6c0d8 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx @@ -20,8 +20,8 @@ import { import { FormMode } from '@cloudbeaver/core-ui'; import { isValuesEqual } from '@cloudbeaver/core-utils'; -import type { UserFormProps } from '../AdministrationUserFormService'; -import type { UserFormInfoPart } from './UserFormInfoPart'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; +import type { UserFormInfoPart } from './UserFormInfoPart.js'; const PASSWORD_PLACEHOLDER = '••••••'; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoMetaParameters.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoMetaParameters.tsx index c65832da1b..add6ff1a98 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoMetaParameters.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoMetaParameters.tsx @@ -10,8 +10,8 @@ import { observer } from 'mobx-react-lite'; import { UserMetaParametersResource } from '@cloudbeaver/core-authentication'; import { Group, GroupTitle, ObjectPropertyInfoForm, useResource, useTranslate } from '@cloudbeaver/core-blocks'; -import type { UserFormProps } from '../AdministrationUserFormService'; -import type { UserFormInfoPart } from './UserFormInfoPart'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; +import type { UserFormInfoPart } from './UserFormInfoPart.js'; interface Props extends UserFormProps { tabState: UserFormInfoPart; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoPart.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoPart.ts index edb1925b33..2e90853826 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoPart.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoPart.ts @@ -9,14 +9,14 @@ import { observable, toJS } from 'mobx'; import type { AdminUser, AuthRolesResource, UserResourceIncludes, UsersResource } from '@cloudbeaver/core-authentication'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import { CachedResourceIncludeArgs } from '@cloudbeaver/core-resource'; +import { type CachedResourceIncludeArgs } from '@cloudbeaver/core-resource'; import type { ServerConfigResource } from '@cloudbeaver/core-root'; import type { AdminUserInfoFragment } from '@cloudbeaver/core-sdk'; -import { FormMode, FormPart, formValidationContext, IFormState } from '@cloudbeaver/core-ui'; +import { FormMode, FormPart, formValidationContext, type IFormState } from '@cloudbeaver/core-ui'; import { isArraysEqual, isDefined, isObjectsEqual, isValuesEqual } from '@cloudbeaver/core-utils'; -import type { IUserFormState } from '../AdministrationUserFormService'; -import type { IUserFormInfoState } from './IUserFormInfoState'; +import type { IUserFormState } from '../AdministrationUserFormService.js'; +import type { IUserFormInfoState } from './IUserFormInfoState.js'; const DEFAULT_ENABLED = true; @@ -39,7 +39,7 @@ export class UserFormInfoPart extends FormPart, contexts: IExecutionContextProvider>): void | Promise { + protected override format(data: IFormState, contexts: IExecutionContextProvider>): void | Promise { this.state.password = this.state.password.trim(); const metaParameters = this.state.metaParameters; @@ -56,7 +56,7 @@ export class UserFormInfoPart extends FormPart { - const { UserFormInfo } = await import('./UserFormInfo'); + const { UserFormInfo } = await import('./UserFormInfo.js'); return { default: UserFormInfo }; }); @@ -23,7 +23,7 @@ export class UserFormInfoPartBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.administrationUserFormService.parts.add({ key: 'info', name: 'authentication_administration_user_info', @@ -33,6 +33,4 @@ export class UserFormInfoPartBootstrap extends Bootstrap { stateGetter: props => () => getUserFormInfoPart(props.formState), }); } - - load(): void {} } diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoPartService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoPartService.ts index 6c4623243f..886abc1c1b 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoPartService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoPartService.ts @@ -8,7 +8,7 @@ import { PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; -import type { UserFormProps } from '../AdministrationUserFormService'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; @injectable() export class UserFormInfoPartService { diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoTeams.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoTeams.tsx index 30c6b0638e..c0c4e36462 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoTeams.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoTeams.tsx @@ -13,8 +13,8 @@ import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import { isDefined } from '@cloudbeaver/core-utils'; -import type { UserFormProps } from '../AdministrationUserFormService'; -import type { UserFormInfoPart } from './UserFormInfoPart'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; +import type { UserFormInfoPart } from './UserFormInfoPart.js'; interface Props extends UserFormProps { tabState: UserFormInfoPart; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/getUserFormInfoPart.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/getUserFormInfoPart.ts index 8c3a7a18f8..60179969bb 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/getUserFormInfoPart.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/getUserFormInfoPart.ts @@ -10,8 +10,8 @@ import { createDataContext, DATA_CONTEXT_DI_PROVIDER } from '@cloudbeaver/core-d import { ServerConfigResource } from '@cloudbeaver/core-root'; import type { IFormState } from '@cloudbeaver/core-ui'; -import type { IUserFormState } from '../AdministrationUserFormService'; -import { UserFormInfoPart } from './UserFormInfoPart'; +import type { IUserFormState } from '../AdministrationUserFormService.js'; +import { UserFormInfoPart } from './UserFormInfoPart.js'; const DATA_CONTEXT_USER_FORM_INFO_PART = createDataContext('User Form Info Part'); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginInfoPanel.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginInfoPanel.tsx index 67c344ecd5..e6944cbe72 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginInfoPanel.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginInfoPanel.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { Fragment } from 'react'; -import { AdminUserOrigin, UsersResource } from '@cloudbeaver/core-authentication'; +import { type AdminUserOrigin, UsersResource } from '@cloudbeaver/core-authentication'; import { Button, Combobox, @@ -23,9 +23,9 @@ import { import { useService } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; -import { FormMode, TabContainerPanelComponent, useTab, useTabState } from '@cloudbeaver/core-ui'; +import { FormMode, type TabContainerPanelComponent, useTab, useTabState } from '@cloudbeaver/core-ui'; -import type { UserFormProps } from '../AdministrationUserFormService'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; interface IState { selectedOrigin: string; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginInfoTab.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginInfoTab.tsx index 15849ae2d7..c4f82b323d 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginInfoTab.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginInfoTab.tsx @@ -8,9 +8,9 @@ import { observer } from 'mobx-react-lite'; import { Translate } from '@cloudbeaver/core-blocks'; -import { Tab, TabContainerTabComponent, TabTitle } from '@cloudbeaver/core-ui'; +import { Tab, type TabContainerTabComponent, TabTitle } from '@cloudbeaver/core-ui'; -import type { UserFormProps } from '../AdministrationUserFormService'; +import type { UserFormProps } from '../AdministrationUserFormService.js'; export const UserFormOriginInfoTab: TabContainerTabComponent = observer(function UserFormOriginInfoTab(props) { return ( diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginPartBootstrap.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginPartBootstrap.ts index 3f8530af0a..b04ff82546 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginPartBootstrap.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Origin/UserFormOriginPartBootstrap.ts @@ -11,25 +11,28 @@ import { UsersResource } from '@cloudbeaver/core-authentication'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { FormMode } from '@cloudbeaver/core-ui'; -import { AdministrationUserFormService } from '../AdministrationUserFormService'; +import { AdministrationUserFormService } from '../AdministrationUserFormService.js'; const UserFormOriginInfoPanel = React.lazy(async () => { - const { UserFormOriginInfoPanel } = await import('./UserFormOriginInfoPanel'); + const { UserFormOriginInfoPanel } = await import('./UserFormOriginInfoPanel.js'); return { default: UserFormOriginInfoPanel }; }); const UserFormOriginInfoTab = React.lazy(async () => { - const { UserFormOriginInfoTab } = await import('./UserFormOriginInfoTab'); + const { UserFormOriginInfoTab } = await import('./UserFormOriginInfoTab.js'); return { default: UserFormOriginInfoTab }; }); @injectable() export class UserFormOriginPartBootstrap extends Bootstrap { - constructor(private readonly administrationUserFormService: AdministrationUserFormService, private readonly usersResource: UsersResource) { + constructor( + private readonly administrationUserFormService: AdministrationUserFormService, + private readonly usersResource: UsersResource, + ) { super(); } - register(): void { + override register(): void { this.administrationUserFormService.parts.add({ key: 'origin', order: 2, @@ -38,6 +41,4 @@ export class UserFormOriginPartBootstrap extends Bootstrap { tab: () => UserFormOriginInfoTab, }); } - - load(): void {} } diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/UserFormBaseBootstrap.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/UserFormBaseBootstrap.ts index 2de30200fd..4096cf21dd 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/UserFormBaseBootstrap.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/UserFormBaseBootstrap.ts @@ -12,8 +12,4 @@ export class UserFormBaseBootstrap extends Bootstrap { constructor() { super(); } - - register(): void | Promise {} - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministration.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministration.tsx index 81545e2537..aa685c114f 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministration.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministration.tsx @@ -8,17 +8,17 @@ import { observer } from 'mobx-react-lite'; import type { AdministrationItemContentComponent } from '@cloudbeaver/core-administration'; -import { s, SContext, StyleRegistry, ToolsPanel, useS, useTranslate } from '@cloudbeaver/core-blocks'; +import { s, SContext, type StyleRegistry, ToolsPanel, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ITabData, Tab, TabList, TabPanel, TabPanelStyles, TabsState, TabStyles, TabTitle, TabTitleStyles } from '@cloudbeaver/core-ui'; +import { type ITabData, Tab, TabList, TabPanel, TabPanelStyles, TabsState, TabStyles, TabTitle, TabTitleStyles } from '@cloudbeaver/core-ui'; import style from './shared/UsersAdministration.module.css'; import tabStyle from './shared/UsersAdministrationTab.module.css'; import tabPanelStyle from './shared/UsersAdministrationTabPanel.module.css'; import TabTitleModuleStyles from './shared/UsersAdministrationTabTitle.module.css'; -import { TeamsPage } from './Teams/TeamsPage'; -import { EUsersAdministrationSub, UsersAdministrationNavigationService } from './UsersAdministrationNavigationService'; -import { UsersPage } from './UsersTable/UsersPage'; +import { TeamsPage } from './Teams/TeamsPage.js'; +import { EUsersAdministrationSub, UsersAdministrationNavigationService } from './UsersAdministrationNavigationService.js'; +import { UsersPage } from './UsersTable/UsersPage.js'; const tabPanelRegistry: StyleRegistry = [[TabPanelStyles, { mode: 'append', styles: [tabPanelStyle] }]]; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministrationNavigationService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministrationNavigationService.ts index 66ceb128cd..cd8a39ae01 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministrationNavigationService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministrationNavigationService.ts @@ -8,7 +8,7 @@ import { AdministrationScreenService } from '@cloudbeaver/core-administration'; import { injectable } from '@cloudbeaver/core-di'; -import { ADMINISTRATION_ITEM_USER_CREATE_PARAM } from './ADMINISTRATION_ITEM_USER_CREATE_PARAM'; +import { ADMINISTRATION_ITEM_USER_CREATE_PARAM } from './ADMINISTRATION_ITEM_USER_CREATE_PARAM.js'; export enum EUsersAdministrationSub { Users = 'users', diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministrationService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministrationService.ts index 8324213420..488c542481 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministrationService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersAdministrationService.ts @@ -8,26 +8,26 @@ import React from 'react'; import { AdministrationItemService } from '@cloudbeaver/core-administration'; -import { AdminUser, TeamsResource, UsersResource } from '@cloudbeaver/core-authentication'; +import { type AdminUser, TeamsResource, UsersResource } from '@cloudbeaver/core-authentication'; import { PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { CreateTeamService } from './Teams/CreateTeamService'; -import { EUsersAdministrationSub, UsersAdministrationNavigationService } from './UsersAdministrationNavigationService'; -import { CreateUserService } from './UsersTable/CreateUserService'; +import { CreateTeamService } from './Teams/CreateTeamService.js'; +import { EUsersAdministrationSub, UsersAdministrationNavigationService } from './UsersAdministrationNavigationService.js'; +import { CreateUserService } from './UsersTable/CreateUserService.js'; const UserCredentialsList = React.lazy(async () => { - const { UserCredentialsList } = await import('./UsersTable/UserCredentialsList'); + const { UserCredentialsList } = await import('./UsersTable/UserCredentialsList.js'); return { default: UserCredentialsList }; }); const UsersDrawerItem = React.lazy(async () => { - const { UsersDrawerItem } = await import('./UsersDrawerItem'); + const { UsersDrawerItem } = await import('./UsersDrawerItem.js'); return { default: UsersDrawerItem }; }); const UsersAdministration = React.lazy(async () => { - const { UsersAdministration } = await import('./UsersAdministration'); + const { UsersAdministration } = await import('./UsersAdministration.js'); return { default: UsersAdministration }; }); @@ -49,7 +49,7 @@ export class UsersAdministrationService extends Bootstrap { super(); } - register() { + override register() { this.administrationItemService.create({ name: UsersAdministrationNavigationService.ItemName, order: 4, @@ -78,8 +78,6 @@ export class UsersAdministrationService extends Bootstrap { this.userDetailsInfoPlaceholder.add(UserCredentialsList, 0); } - load(): void | Promise {} - private async cancelCreate(param: string | null, configurationWizard: boolean, outside: boolean) { if (param === 'create') { this.createUserService.close(); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUser.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUser.tsx index ea70624414..0f01bf5e0d 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUser.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUser.tsx @@ -10,8 +10,8 @@ import { observer } from 'mobx-react-lite'; import { Container, Group, GroupTitle, Loader, s, Translate, useS, useTranslate } from '@cloudbeaver/core-blocks'; import type { IFormState } from '@cloudbeaver/core-ui'; -import { AdministrationUserForm } from '../UserForm/AdministrationUserForm'; -import type { IUserFormState } from '../UserForm/AdministrationUserFormService'; +import { AdministrationUserForm } from '../UserForm/AdministrationUserForm.js'; +import type { IUserFormState } from '../UserForm/AdministrationUserFormService.js'; import style from './CreateUser.module.css'; interface Props { diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUserBootstrap.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUserBootstrap.ts index 3506881d68..d9d393a554 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUserBootstrap.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUserBootstrap.ts @@ -11,10 +11,10 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { CachedMapAllKey, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; import { ACTION_CREATE, ActionService, MenuService } from '@cloudbeaver/core-view'; -import { AdministrationUsersManagementService } from '../../../AdministrationUsersManagementService'; -import { MENU_USERS_ADMINISTRATION } from '../../../Menus/MENU_USERS_ADMINISTRATION'; -import { ADMINISTRATION_ITEM_USER_CREATE_PARAM } from '../ADMINISTRATION_ITEM_USER_CREATE_PARAM'; -import { CreateUserService } from './CreateUserService'; +import { AdministrationUsersManagementService } from '../../../AdministrationUsersManagementService.js'; +import { MENU_USERS_ADMINISTRATION } from '../../../Menus/MENU_USERS_ADMINISTRATION.js'; +import { ADMINISTRATION_ITEM_USER_CREATE_PARAM } from '../ADMINISTRATION_ITEM_USER_CREATE_PARAM.js'; +import { CreateUserService } from './CreateUserService.js'; @injectable() export class CreateUserBootstrap extends Bootstrap { @@ -28,7 +28,7 @@ export class CreateUserBootstrap extends Bootstrap { super(); } - register() { + override register() { this.menuService.addCreator({ menus: [MENU_USERS_ADMINISTRATION], getItems(context, items) { diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUserService.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUserService.ts index d2e5c83cf0..62aae4f736 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUserService.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/CreateUserService.ts @@ -10,9 +10,9 @@ import { makeObservable, observable } from 'mobx'; import { PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { injectable, IServiceProvider } from '@cloudbeaver/core-di'; -import { AdministrationUserFormService } from '../UserForm/AdministrationUserFormService'; -import { AdministrationUserFormState } from '../UserForm/AdministrationUserFormState'; -import { UsersAdministrationNavigationService } from '../UsersAdministrationNavigationService'; +import { AdministrationUserFormService } from '../UserForm/AdministrationUserFormService.js'; +import { AdministrationUserFormState } from '../UserForm/AdministrationUserFormState.js'; +import { UsersAdministrationNavigationService } from '../UsersAdministrationNavigationService.js'; export interface IToolsContainerProps { param: string | null | undefined; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/Filters/UsersTableFilters.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/Filters/UsersTableFilters.tsx index 429571b61b..603250a291 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/Filters/UsersTableFilters.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/Filters/UsersTableFilters.tsx @@ -12,7 +12,7 @@ import { AuthRolesResource } from '@cloudbeaver/core-authentication'; import { Combobox, Filter, Group, IconOrImage, s, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks'; import styles from './UsersTableFilters.module.css'; -import { IUserFilters, USER_ROLE_ALL, USER_STATUSES } from './useUsersTableFilters'; +import { type IUserFilters, USER_ROLE_ALL, USER_STATUSES } from './useUsersTableFilters.js'; interface Props { filters: IUserFilters; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/User.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/User.tsx index 1747a680d3..236c686f2b 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/User.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/User.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import { AdminUser, UsersResource } from '@cloudbeaver/core-authentication'; +import { type AdminUser, UsersResource } from '@cloudbeaver/core-authentication'; import { Checkbox, Loader, @@ -23,10 +23,10 @@ import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { clsx } from '@cloudbeaver/core-utils'; -import { AdministrationUsersManagementService } from '../../../AdministrationUsersManagementService'; -import { UsersAdministrationService } from '../UsersAdministrationService'; +import { AdministrationUsersManagementService } from '../../../AdministrationUsersManagementService.js'; +import { UsersAdministrationService } from '../UsersAdministrationService.js'; import style from './User.module.css'; -import { UserEdit } from './UserEdit'; +import { UserEdit } from './UserEdit.js'; interface Props { user: AdminUser; @@ -68,11 +68,11 @@ export const User = observer(function User({ user, displayAuthRole, selec - + {user.userId} {displayAuthRole && ( - + {user.authRole} )} @@ -87,7 +87,7 @@ export const User = observer(function User({ user, displayAuthRole, selec onChange={handleEnabledCheckboxChange} /> - + diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UserCredentialsList.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UserCredentialsList.tsx index ec63bc528a..98d4ec6939 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UserCredentialsList.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UserCredentialsList.tsx @@ -10,10 +10,10 @@ import { Fragment } from 'react'; import { Menu, MenuButton, MenuItem, useMenuState } from 'reakit'; import { AUTH_PROVIDER_LOCAL_ID } from '@cloudbeaver/core-authentication'; -import { BaseDropdownStyles, PlaceholderComponent, s, StaticImage, useS, useTranslate } from '@cloudbeaver/core-blocks'; +import { BaseDropdownStyles, type PlaceholderComponent, s, StaticImage, useS, useTranslate } from '@cloudbeaver/core-blocks'; import type { ObjectOrigin } from '@cloudbeaver/core-sdk'; -import type { IUserDetailsInfoProps } from '../UsersAdministrationService'; +import type { IUserDetailsInfoProps } from '../UsersAdministrationService.js'; import style from './UserCredentialsList.module.css'; const MAX_VISIBLE_CREDENTIALS = 3; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UserEdit.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UserEdit.tsx index a02db324e6..66a9d19b5f 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UserEdit.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UserEdit.tsx @@ -7,11 +7,11 @@ */ import { observer } from 'mobx-react-lite'; -import { Container, Loader, s, TableItemExpandProps, useS } from '@cloudbeaver/core-blocks'; +import { Container, Loader, s, type TableItemExpandProps, useS } from '@cloudbeaver/core-blocks'; import { FormMode } from '@cloudbeaver/core-ui'; -import { AdministrationUserForm } from '../UserForm/AdministrationUserForm'; -import { useAdministrationUserFormState } from './useAdministrationUserFormState'; +import { AdministrationUserForm } from '../UserForm/AdministrationUserForm.js'; +import { useAdministrationUserFormState } from './useAdministrationUserFormState.js'; import style from './UserEdit.module.css'; export const UserEdit = observer>(function UserEdit({ item, onClose }) { diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersAdministrationToolsPanel.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersAdministrationToolsPanel.tsx index 98814f19ac..3ba6260980 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersAdministrationToolsPanel.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersAdministrationToolsPanel.tsx @@ -7,11 +7,11 @@ */ import { observer } from 'mobx-react-lite'; -import { s, SContext, StyleRegistry, ToolsAction, ToolsPanel, useTranslate } from '@cloudbeaver/core-blocks'; +import { s, SContext, type StyleRegistry, ToolsAction, ToolsPanel, useTranslate } from '@cloudbeaver/core-blocks'; import { MenuBar, MenuBarItemStyles } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import { MENU_USERS_ADMINISTRATION } from '../../../Menus/MENU_USERS_ADMINISTRATION'; +import { MENU_USERS_ADMINISTRATION } from '../../../Menus/MENU_USERS_ADMINISTRATION.js'; import UsersAdministrationMenuBarItemStyles from './UsersAdministrationMenuBarItemStyles.module.css'; import styles from './UsersAdministrationToolsPanel.module.css'; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersPage.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersPage.tsx index ef242c0bf3..60cff2c711 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersPage.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersPage.tsx @@ -11,14 +11,14 @@ import { AuthRolesResource } from '@cloudbeaver/core-authentication'; import { ColoredContainer, Container, Group, Placeholder, useAutoLoad, useResource } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { AdministrationUsersManagementService } from '../../../AdministrationUsersManagementService'; -import { CreateUser } from './CreateUser'; -import { CreateUserService } from './CreateUserService'; -import { UsersTableFilters } from './Filters/UsersTableFilters'; -import { useUsersTableFilters } from './Filters/useUsersTableFilters'; -import { UsersAdministrationToolsPanel } from './UsersAdministrationToolsPanel'; -import { UsersTable } from './UsersTable'; -import { useUsersTable } from './useUsersTable'; +import { AdministrationUsersManagementService } from '../../../AdministrationUsersManagementService.js'; +import { CreateUser } from './CreateUser.js'; +import { CreateUserService } from './CreateUserService.js'; +import { UsersTableFilters } from './Filters/UsersTableFilters.js'; +import { useUsersTableFilters } from './Filters/useUsersTableFilters.js'; +import { UsersAdministrationToolsPanel } from './UsersAdministrationToolsPanel.js'; +import { UsersTable } from './UsersTable.js'; +import { useUsersTable } from './useUsersTable.js'; interface Props { param?: string | null; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersTable.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersTable.tsx index 76b71d5b26..b663d7fa3f 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersTable.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/UsersTable.tsx @@ -20,7 +20,7 @@ import { } from '@cloudbeaver/core-blocks'; import type { AdminUserInfoFragment } from '@cloudbeaver/core-sdk'; -import { User } from './User'; +import { User } from './User.js'; interface Props { users: AdminUserInfoFragment[]; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/useAdministrationUserFormState.ts b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/useAdministrationUserFormState.ts index 65d15e83ba..9b12fdc112 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/useAdministrationUserFormState.ts +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/useAdministrationUserFormState.ts @@ -9,8 +9,8 @@ import { useRef } from 'react'; import { IServiceProvider, useService } from '@cloudbeaver/core-di'; -import { AdministrationUserFormService } from '../UserForm/AdministrationUserFormService'; -import { AdministrationUserFormState } from '../UserForm/AdministrationUserFormState'; +import { AdministrationUserFormService } from '../UserForm/AdministrationUserFormService.js'; +import { AdministrationUserFormState } from '../UserForm/AdministrationUserFormState.js'; export function useAdministrationUserFormState(id: string | null, configure?: (state: AdministrationUserFormState) => any) { const service = useService(AdministrationUserFormService); diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/useUsersTable.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/useUsersTable.tsx index 19cf506a0d..271c2b4976 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/useUsersTable.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UsersTable/useUsersTable.tsx @@ -7,15 +7,15 @@ */ import { action, computed, observable } from 'mobx'; -import { AdminUser, compareUsers, UsersResource, UsersResourceFilterKey, UsersResourceNewUsers } from '@cloudbeaver/core-authentication'; +import { type AdminUser, compareUsers, UsersResource, UsersResourceFilterKey, UsersResourceNewUsers } from '@cloudbeaver/core-authentication'; import { ConfirmationDialogDelete, TableState, useObservableRef, useOffsetPagination, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; import { resourceKeyList } from '@cloudbeaver/core-resource'; -import { ILoadableState, isArraysEqual, isDefined } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isArraysEqual, isDefined } from '@cloudbeaver/core-utils'; -import type { IUserFilters } from './Filters/useUsersTableFilters'; +import type { IUserFilters } from './Filters/useUsersTableFilters.js'; interface State { loading: boolean; @@ -67,7 +67,7 @@ export function useUsersTable(filters: IUserFilters) { return; } - const deletionList = this.state.selectedList.filter(([_, value]) => value).map(([userId]) => userId); + const deletionList = this.state.selectedList.filter(([_, value]) => value).map(([userId]) => userId!); if (deletionList.length === 0) { return; } diff --git a/webapp/packages/plugin-authentication-administration/src/AdministrationUsersManagementService.ts b/webapp/packages/plugin-authentication-administration/src/AdministrationUsersManagementService.ts index 8a77b309cb..e94c6ae4bb 100644 --- a/webapp/packages/plugin-authentication-administration/src/AdministrationUsersManagementService.ts +++ b/webapp/packages/plugin-authentication-administration/src/AdministrationUsersManagementService.ts @@ -11,7 +11,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { type ILoadableState, isArraysEqual } from '@cloudbeaver/core-utils'; -import { externalUserProviderStatusContext } from './externalUserProviderStatusContext'; +import { externalUserProviderStatusContext } from './externalUserProviderStatusContext.js'; @injectable() export class AdministrationUsersManagementService { diff --git a/webapp/packages/plugin-authentication-administration/src/AuthenticationLocaleService.ts b/webapp/packages/plugin-authentication-administration/src/AuthenticationLocaleService.ts index 8e1257a264..8ef7843abf 100644 --- a/webapp/packages/plugin-authentication-administration/src/AuthenticationLocaleService.ts +++ b/webapp/packages/plugin-authentication-administration/src/AuthenticationLocaleService.ts @@ -14,24 +14,22 @@ export class AuthenticationLocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-authentication-administration/src/PluginBootstrap.ts b/webapp/packages/plugin-authentication-administration/src/PluginBootstrap.ts index 8c29d26d81..2625553358 100644 --- a/webapp/packages/plugin-authentication-administration/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-authentication-administration/src/PluginBootstrap.ts @@ -12,7 +12,7 @@ import { ServerConfigurationAdministrationNavService, ServerConfigurationService import { AuthenticationService } from '@cloudbeaver/plugin-authentication'; const AuthenticationProviders = React.lazy(async () => { - const { AuthenticationProviders } = await import('./Administration/ServerConfiguration/AuthenticationProviders'); + const { AuthenticationProviders } = await import('./Administration/ServerConfiguration/AuthenticationProviders.js'); return { default: AuthenticationProviders }; }); @@ -26,10 +26,8 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.serverConfigurationService.configurationContainer.add(AuthenticationProviders, 0); this.authenticationService.setConfigureAuthProvider(() => this.serverConfigurationAdministrationNavService.navToSettings()); } - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-authentication-administration/src/index.ts b/webapp/packages/plugin-authentication-administration/src/index.ts index 8d392bcc29..a9701da603 100644 --- a/webapp/packages/plugin-authentication-administration/src/index.ts +++ b/webapp/packages/plugin-authentication-administration/src/index.ts @@ -5,21 +5,21 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { manifest } from './manifest'; +import { manifest } from './manifest.js'; export default manifest; -export * from './Administration/Users/UsersAdministrationNavigationService'; -export * from './Administration/Users/Teams/TeamFormService'; -export * from './Administration/Users/Teams/ITeamFormProps'; -export * from './Administration/Users/Teams/Contexts/teamContext'; -export * from './Administration/Users/UsersTable/CreateUserService'; -export * from './Administration/Users/UsersAdministrationService'; -export * from './Administration/Users/UserForm/AdministrationUserFormService'; -export * from './Administration/Users/UserForm/AdministrationUserFormState'; -export * from './Administration/Users/UserForm/Info/getUserFormInfoPart'; -export * from './Administration/Users/UserForm/Info/UserFormInfoPart'; -export * from './Administration/Users/UserForm/Info/UserFormInfoPartService'; -export * from './Menus/MENU_USERS_ADMINISTRATION'; -export * from './AdministrationUsersManagementService'; -export * from './externalUserProviderStatusContext'; +export * from './Administration/Users/UsersAdministrationNavigationService.js'; +export * from './Administration/Users/Teams/TeamFormService.js'; +export * from './Administration/Users/Teams/ITeamFormProps.js'; +export * from './Administration/Users/Teams/Contexts/teamContext.js'; +export * from './Administration/Users/UsersTable/CreateUserService.js'; +export * from './Administration/Users/UsersAdministrationService.js'; +export * from './Administration/Users/UserForm/AdministrationUserFormService.js'; +export * from './Administration/Users/UserForm/AdministrationUserFormState.js'; +export * from './Administration/Users/UserForm/Info/getUserFormInfoPart.js'; +export * from './Administration/Users/UserForm/Info/UserFormInfoPart.js'; +export * from './Administration/Users/UserForm/Info/UserFormInfoPartService.js'; +export * from './Menus/MENU_USERS_ADMINISTRATION.js'; +export * from './AdministrationUsersManagementService.js'; +export * from './externalUserProviderStatusContext.js'; diff --git a/webapp/packages/plugin-authentication-administration/src/manifest.ts b/webapp/packages/plugin-authentication-administration/src/manifest.ts index ebcfb4962a..7647a55b02 100644 --- a/webapp/packages/plugin-authentication-administration/src/manifest.ts +++ b/webapp/packages/plugin-authentication-administration/src/manifest.ts @@ -13,32 +13,32 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./Administration/Users/UsersAdministrationService').then(m => m.UsersAdministrationService), - () => import('./AuthenticationLocaleService').then(m => m.AuthenticationLocaleService), - () => import('./Administration/Users/UsersTable/CreateUserService').then(m => m.CreateUserService), - () => import('./Administration/Users/UsersAdministrationNavigationService').then(m => m.UsersAdministrationNavigationService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./Administration/Users/UsersAdministrationService.js').then(m => m.UsersAdministrationService), + () => import('./AuthenticationLocaleService.js').then(m => m.AuthenticationLocaleService), + () => import('./Administration/Users/UsersTable/CreateUserService.js').then(m => m.CreateUserService), + () => import('./Administration/Users/UsersAdministrationNavigationService.js').then(m => m.UsersAdministrationNavigationService), () => - import('./Administration/ServerConfiguration/ServerConfigurationAuthenticationBootstrap').then( + import('./Administration/ServerConfiguration/ServerConfigurationAuthenticationBootstrap.js').then( m => m.ServerConfigurationAuthenticationBootstrap, ), - () => import('./Administration/Users/UserForm/AdministrationUserFormService').then(m => m.AdministrationUserFormService), - () => import('./Administration/Users/Teams/TeamsAdministrationService').then(m => m.TeamsAdministrationService), - () => import('./Administration/Users/Teams/CreateTeamService').then(m => m.CreateTeamService), - () => import('./Administration/Users/Teams/TeamsAdministrationNavService').then(m => m.TeamsAdministrationNavService), - () => import('./Administration/Users/Teams/TeamFormService').then(m => m.TeamFormService), - () => import('./Administration/Users/Teams/Options/TeamOptionsTabService').then(m => m.TeamOptionsTabService), - () => import('./Administration/Users/Teams/GrantedUsers/GrantedUsersTabService').then(m => m.GrantedUsersTabService), - () => import('./Administration/Users/Teams/GrantedConnections/GrantedConnectionsTabService').then(m => m.GrantedConnectionsTabService), - () => import('./Administration/Users/UsersTable/CreateUserBootstrap').then(m => m.CreateUserBootstrap), - () => import('./Administration/Users/UserForm/UserFormBaseBootstrap').then(m => m.UserFormBaseBootstrap), - () => import('./Administration/Users/UserForm/Info/UserFormInfoPartBootstrap').then(m => m.UserFormInfoPartBootstrap), - () => import('./Administration/Users/UserForm/Origin/UserFormOriginPartBootstrap').then(m => m.UserFormOriginPartBootstrap), + () => import('./Administration/Users/UserForm/AdministrationUserFormService.js').then(m => m.AdministrationUserFormService), + () => import('./Administration/Users/Teams/TeamsAdministrationService.js').then(m => m.TeamsAdministrationService), + () => import('./Administration/Users/Teams/CreateTeamService.js').then(m => m.CreateTeamService), + () => import('./Administration/Users/Teams/TeamsAdministrationNavService.js').then(m => m.TeamsAdministrationNavService), + () => import('./Administration/Users/Teams/TeamFormService.js').then(m => m.TeamFormService), + () => import('./Administration/Users/Teams/Options/TeamOptionsTabService.js').then(m => m.TeamOptionsTabService), + () => import('./Administration/Users/Teams/GrantedUsers/GrantedUsersTabService.js').then(m => m.GrantedUsersTabService), + () => import('./Administration/Users/Teams/GrantedConnections/GrantedConnectionsTabService.js').then(m => m.GrantedConnectionsTabService), + () => import('./Administration/Users/UsersTable/CreateUserBootstrap.js').then(m => m.CreateUserBootstrap), + () => import('./Administration/Users/UserForm/UserFormBaseBootstrap.js').then(m => m.UserFormBaseBootstrap), + () => import('./Administration/Users/UserForm/Info/UserFormInfoPartBootstrap.js').then(m => m.UserFormInfoPartBootstrap), + () => import('./Administration/Users/UserForm/Origin/UserFormOriginPartBootstrap.js').then(m => m.UserFormOriginPartBootstrap), () => - import('./Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPartBootstrap').then( + import('./Administration/Users/UserForm/ConnectionAccess/UserFormConnectionAccessPartBootstrap.js').then( m => m.UserFormConnectionAccessPartBootstrap, ), - () => import('./Administration/Users/UserForm/Info/UserFormInfoPartService').then(m => m.UserFormInfoPartService), - () => import('./AdministrationUsersManagementService').then(m => m.AdministrationUsersManagementService), + () => import('./Administration/Users/UserForm/Info/UserFormInfoPartService.js').then(m => m.UserFormInfoPartService), + () => import('./AdministrationUsersManagementService.js').then(m => m.AdministrationUsersManagementService), ], }; diff --git a/webapp/packages/plugin-authentication/package.json b/webapp/packages/plugin-authentication/package.json index ef1fc18713..62a8375991 100644 --- a/webapp/packages/plugin-authentication/package.json +++ b/webapp/packages/plugin-authentication/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-authentication", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-authentication/src/AuthenticationLocaleService.ts b/webapp/packages/plugin-authentication/src/AuthenticationLocaleService.ts index 8e1257a264..8ef7843abf 100644 --- a/webapp/packages/plugin-authentication/src/AuthenticationLocaleService.ts +++ b/webapp/packages/plugin-authentication/src/AuthenticationLocaleService.ts @@ -14,24 +14,22 @@ export class AuthenticationLocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-authentication/src/AuthenticationService.ts b/webapp/packages/plugin-authentication/src/AuthenticationService.ts index 0373168ed7..41dbedd4ec 100644 --- a/webapp/packages/plugin-authentication/src/AuthenticationService.ts +++ b/webapp/packages/plugin-authentication/src/AuthenticationService.ts @@ -15,23 +15,23 @@ import { AuthProviderContext, AuthProviderService, AuthProvidersResource, - RequestedProvider, + type RequestedProvider, UserInfoResource, - UserLogoutInfo, + type UserLogoutInfo, } from '@cloudbeaver/core-authentication'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; -import { Executor, ExecutorInterrupter, IExecutionContextProvider, IExecutorHandler } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutionContextProvider, type IExecutorHandler } from '@cloudbeaver/core-executor'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { ISessionAction, ServerConfigResource, sessionActionContext, SessionActionService, SessionDataResource } from '@cloudbeaver/core-root'; +import { type ISessionAction, ServerConfigResource, sessionActionContext, SessionActionService, SessionDataResource } from '@cloudbeaver/core-root'; import { ScreenService, WindowsService } from '@cloudbeaver/core-routing'; import { NavigationService } from '@cloudbeaver/core-ui'; import { uuid } from '@cloudbeaver/core-utils'; -import { AuthDialogService } from './Dialog/AuthDialogService'; -import type { IAuthOptions } from './IAuthOptions'; -import { isAutoLoginSessionAction } from './isAutoLoginSessionAction'; +import { AuthDialogService } from './Dialog/AuthDialogService.js'; +import type { IAuthOptions } from './IAuthOptions.js'; +import { isAutoLoginSessionAction } from './isAutoLoginSessionAction.js'; export type AuthEventType = 'before' | 'after'; @@ -153,7 +153,7 @@ export class AuthenticationService extends Bootstrap { const configurableProvider = providers.find(provider => provider.configurable); if (configurableProvider?.configurations?.length === 1) { - const configuration = configurableProvider.configurations[0]; + const configuration = configurableProvider.configurations[0]!; options.providerId = configurableProvider.id; options.configurationId = configuration.id; @@ -193,7 +193,7 @@ export class AuthenticationService extends Bootstrap { await this.auth(true, { accessRequest: true, providerId: null, linkUser: false }); } - register(): void { + override register(): void { // this.sessionDataResource.beforeLoad.addHandler( // ExecutorInterrupter.interrupter(() => this.appAuthService.isAuthNeeded()) // ); diff --git a/webapp/packages/plugin-authentication/src/Dialog/AuthDialog.tsx b/webapp/packages/plugin-authentication/src/Dialog/AuthDialog.tsx index 73f0de315c..afb2444280 100644 --- a/webapp/packages/plugin-authentication/src/Dialog/AuthDialog.tsx +++ b/webapp/packages/plugin-authentication/src/Dialog/AuthDialog.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import { AuthProvider, AuthProviderConfiguration, UserInfoResource } from '@cloudbeaver/core-authentication'; +import { type AuthProvider, type AuthProviderConfiguration, UserInfoResource } from '@cloudbeaver/core-authentication'; import { Checkbox, CommonDialogBody, @@ -26,17 +26,17 @@ import { useTranslate, } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { CommonDialogService, DialogComponent } from '@cloudbeaver/core-dialogs'; +import { CommonDialogService, type DialogComponent } from '@cloudbeaver/core-dialogs'; import { Tab, TabList, TabsState, TabTitle } from '@cloudbeaver/core-ui'; -import { AuthenticationService } from '../AuthenticationService'; -import type { IAuthOptions } from '../IAuthOptions'; +import { AuthenticationService } from '../AuthenticationService.js'; +import type { IAuthOptions } from '../IAuthOptions.js'; import style from './AuthDialog.module.css'; -import { AuthDialogFooter } from './AuthDialogFooter'; -import { AuthProviderForm } from './AuthProviderForm/AuthProviderForm'; -import { ConfigurationsList } from './AuthProviderForm/ConfigurationsList'; -import { FEDERATED_AUTH } from './FEDERATED_AUTH'; -import { getAuthProviderTabId, useAuthDialogState } from './useAuthDialogState'; +import { AuthDialogFooter } from './AuthDialogFooter.js'; +import { AuthProviderForm } from './AuthProviderForm/AuthProviderForm.js'; +import { ConfigurationsList } from './AuthProviderForm/ConfigurationsList.js'; +import { FEDERATED_AUTH } from './FEDERATED_AUTH.js'; +import { getAuthProviderTabId, useAuthDialogState } from './useAuthDialogState.js'; export const AuthDialog: DialogComponent = observer(function AuthDialog({ payload: { providerId, configurationId, linkUser = false, accessRequest = false }, diff --git a/webapp/packages/plugin-authentication/src/Dialog/AuthDialogService.ts b/webapp/packages/plugin-authentication/src/Dialog/AuthDialogService.ts index b6fb8bf08e..f495380bf0 100644 --- a/webapp/packages/plugin-authentication/src/Dialog/AuthDialogService.ts +++ b/webapp/packages/plugin-authentication/src/Dialog/AuthDialogService.ts @@ -8,8 +8,8 @@ import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; -import type { IAuthOptions } from '../IAuthOptions'; -import { AuthDialog } from './AuthDialog'; +import type { IAuthOptions } from '../IAuthOptions.js'; +import { AuthDialog } from './AuthDialog.js'; @injectable() export class AuthDialogService { diff --git a/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx b/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx index d1a2e0764c..1cef309f13 100644 --- a/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx +++ b/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx @@ -24,7 +24,7 @@ export const AuthProviderForm = observer(function AuthProviderForm({ prov credentials.credentials = {}; } - const profile = provider.credentialProfiles[credentials.profile as any as number]; + const profile = provider.credentialProfiles[credentials.profile as any as number]!; return ( diff --git a/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/ConfigurationsList.tsx b/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/ConfigurationsList.tsx index fbe3e556e5..79121c5031 100644 --- a/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/ConfigurationsList.tsx +++ b/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/ConfigurationsList.tsx @@ -8,7 +8,12 @@ import { observer } from 'mobx-react-lite'; import { useState } from 'react'; -import { AuthProvider, AuthProviderConfiguration, AuthProvidersResource, comparePublicAuthConfigurations } from '@cloudbeaver/core-authentication'; +import { + type AuthProvider, + type AuthProviderConfiguration, + AuthProvidersResource, + comparePublicAuthConfigurations, +} from '@cloudbeaver/core-authentication'; import { Button, Cell, @@ -30,7 +35,7 @@ import type { ITask } from '@cloudbeaver/core-executor'; import type { UserInfo } from '@cloudbeaver/core-sdk'; import { ServerConfigurationAdministrationNavService } from '@cloudbeaver/plugin-administration'; -import { AuthenticationService } from '../../AuthenticationService'; +import { AuthenticationService } from '../../AuthenticationService.js'; import styles from './ConfigurationsList.module.css'; interface IProviderConfiguration { diff --git a/webapp/packages/plugin-authentication/src/Dialog/useAuthDialogState.ts b/webapp/packages/plugin-authentication/src/Dialog/useAuthDialogState.ts index d1e0c51b21..355643b981 100644 --- a/webapp/packages/plugin-authentication/src/Dialog/useAuthDialogState.ts +++ b/webapp/packages/plugin-authentication/src/Dialog/useAuthDialogState.ts @@ -9,7 +9,13 @@ import { action, computed, observable, untracked } from 'mobx'; import { useEffect } from 'react'; import { AdministrationScreenService } from '@cloudbeaver/core-administration'; -import { AuthInfoService, AuthProvider, AuthProviderConfiguration, AuthProvidersResource, IAuthCredentials } from '@cloudbeaver/core-authentication'; +import { + AuthInfoService, + type AuthProvider, + type AuthProviderConfiguration, + AuthProvidersResource, + type IAuthCredentials, +} from '@cloudbeaver/core-authentication'; import { ConfirmationDialog, useObservableRef, useResource } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; @@ -19,7 +25,7 @@ import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import { EServerErrorCode, GQLError, type UserInfo } from '@cloudbeaver/core-sdk'; import { errorOf, isArraysEqual } from '@cloudbeaver/core-utils'; -import { FEDERATED_AUTH } from './FEDERATED_AUTH'; +import { FEDERATED_AUTH } from './FEDERATED_AUTH.js'; interface IData { state: IState; @@ -223,8 +229,8 @@ export function useAuthDialogState(accessRequest: boolean, providerId: string | ...state.credentials, credentials: { ...state.credentials.credentials, - user: state.credentials.credentials.user?.trim(), - password: state.credentials.credentials.password?.trim(), + user: state.credentials.credentials['user']?.trim(), + password: state.credentials.credentials['password']?.trim(), }, }, forceSessionsLogout: state.forceSessionsLogout, diff --git a/webapp/packages/plugin-authentication/src/PluginBootstrap.ts b/webapp/packages/plugin-authentication/src/PluginBootstrap.ts index b6416254d3..851544b468 100644 --- a/webapp/packages/plugin-authentication/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-authentication/src/PluginBootstrap.ts @@ -11,7 +11,7 @@ import { ServerConfigResource } from '@cloudbeaver/core-root'; import { MenuBaseItem, MenuService } from '@cloudbeaver/core-view'; import { TOP_NAV_BAR_SETTINGS_MENU } from '@cloudbeaver/plugin-settings-menu'; -import { AuthenticationService } from './AuthenticationService'; +import { AuthenticationService } from './AuthenticationService.js'; @injectable() export class PluginBootstrap extends Bootstrap { @@ -24,7 +24,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.menuService.addCreator({ menus: [TOP_NAV_BAR_SETTINGS_MENU], getItems: (context, items) => { @@ -63,7 +63,7 @@ export class PluginBootstrap extends Bootstrap { if (index > -1) { const item = items.splice(index, 1); - items.push(item[0]); + items.push(item[0]!); } return items; diff --git a/webapp/packages/plugin-authentication/src/UserLoadingErrorDialogBootstrap.ts b/webapp/packages/plugin-authentication/src/UserLoadingErrorDialogBootstrap.ts index 02a59b7d82..ef71fc1090 100644 --- a/webapp/packages/plugin-authentication/src/UserLoadingErrorDialogBootstrap.ts +++ b/webapp/packages/plugin-authentication/src/UserLoadingErrorDialogBootstrap.ts @@ -22,9 +22,6 @@ export class UserLoadingErrorDialogBootstrap extends Bootstrap { userInfoResource.onException.addHandler(this.handleException.bind(this)); } - register(): void | Promise {} - load(): void | Promise {} - private async handleException(exception: Error) { this.notificationService.logException(exception, 'plugin_authentication_user_loading_error'); const result = await this.commonDialogService.open(ConfirmationDialog, { diff --git a/webapp/packages/plugin-authentication/src/index.ts b/webapp/packages/plugin-authentication/src/index.ts index 998e8e8c93..7bdfe231b4 100644 --- a/webapp/packages/plugin-authentication/src/index.ts +++ b/webapp/packages/plugin-authentication/src/index.ts @@ -1,5 +1,12 @@ -import { manifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { manifest } from './manifest.js'; -export * from './AuthenticationService'; -export * from './Dialog/AuthDialogService'; +export * from './AuthenticationService.js'; +export * from './Dialog/AuthDialogService.js'; export default manifest; diff --git a/webapp/packages/plugin-authentication/src/isAutoLoginSessionAction.ts b/webapp/packages/plugin-authentication/src/isAutoLoginSessionAction.ts index 2601aff3f9..84a4ddb557 100644 --- a/webapp/packages/plugin-authentication/src/isAutoLoginSessionAction.ts +++ b/webapp/packages/plugin-authentication/src/isAutoLoginSessionAction.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IAutoLoginSessionAction } from './IAutoLoginSessionAction'; +import type { IAutoLoginSessionAction } from './IAutoLoginSessionAction.js'; export function isAutoLoginSessionAction(obj: any): obj is IAutoLoginSessionAction { return obj && 'action' in obj && obj.action === 'auto-login'; diff --git a/webapp/packages/plugin-authentication/src/manifest.ts b/webapp/packages/plugin-authentication/src/manifest.ts index e8de2c9133..1c4f207a08 100644 --- a/webapp/packages/plugin-authentication/src/manifest.ts +++ b/webapp/packages/plugin-authentication/src/manifest.ts @@ -13,10 +13,10 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./AuthenticationService').then(m => m.AuthenticationService), - () => import('./Dialog/AuthDialogService').then(m => m.AuthDialogService), - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./AuthenticationLocaleService').then(m => m.AuthenticationLocaleService), - () => import('./UserLoadingErrorDialogBootstrap').then(m => m.UserLoadingErrorDialogBootstrap), + () => import('./AuthenticationService.js').then(m => m.AuthenticationService), + () => import('./Dialog/AuthDialogService.js').then(m => m.AuthDialogService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./AuthenticationLocaleService.js').then(m => m.AuthenticationLocaleService), + () => import('./UserLoadingErrorDialogBootstrap.js').then(m => m.UserLoadingErrorDialogBootstrap), ], }; diff --git a/webapp/packages/plugin-browser/package.json b/webapp/packages/plugin-browser/package.json index 3ec9dfbb0d..c09f7eef21 100644 --- a/webapp/packages/plugin-browser/package.json +++ b/webapp/packages/plugin-browser/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-browser", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-browser/src/LocaleService.ts b/webapp/packages/plugin-browser/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-browser/src/LocaleService.ts +++ b/webapp/packages/plugin-browser/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-browser/src/PluginBrowserBootstrap.ts b/webapp/packages/plugin-browser/src/PluginBrowserBootstrap.ts index 1b66b7d24f..8ba616a579 100644 --- a/webapp/packages/plugin-browser/src/PluginBrowserBootstrap.ts +++ b/webapp/packages/plugin-browser/src/PluginBrowserBootstrap.ts @@ -8,7 +8,7 @@ import type { ProcessSnackbarProps } from '@cloudbeaver/core-blocks'; import { ServiceWorkerService } from '@cloudbeaver/core-browser'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { IProcessNotificationContainer, NotificationService } from '@cloudbeaver/core-events'; +import { type IProcessNotificationContainer, NotificationService } from '@cloudbeaver/core-events'; import { LocalizationService } from '@cloudbeaver/core-localization'; @injectable() @@ -23,7 +23,7 @@ export class PluginBrowserBootstrap extends Bootstrap { super(); this.notification = null; } - register(): void { + override register(): void { // TODO: notification appears in unexpected moment // this.serviceWorkerService.onUpdate.addHandler(({ type, progress }) => { // progress = progress || 0; diff --git a/webapp/packages/plugin-browser/src/PluginBrowserPreloadingBootstrap.ts b/webapp/packages/plugin-browser/src/PluginBrowserPreloadingBootstrap.ts index 7f0e12580d..8229138420 100644 --- a/webapp/packages/plugin-browser/src/PluginBrowserPreloadingBootstrap.ts +++ b/webapp/packages/plugin-browser/src/PluginBrowserPreloadingBootstrap.ts @@ -13,7 +13,7 @@ export class PluginBrowserPreloadingBootstrap extends Bootstrap { constructor(private readonly serviceWorkerService: ServiceWorkerService) { super(); } - register(): void { + override register(): void { this.serviceWorkerService.onUpdate.addHandler(({ type, progress }) => { progress = progress || 0; diff --git a/webapp/packages/plugin-browser/src/index.ts b/webapp/packages/plugin-browser/src/index.ts index eea6e3db82..207796d3f5 100644 --- a/webapp/packages/plugin-browser/src/index.ts +++ b/webapp/packages/plugin-browser/src/index.ts @@ -1,4 +1,11 @@ -import { browserPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { browserPlugin } from './manifest.js'; export default browserPlugin; export { browserPlugin }; diff --git a/webapp/packages/plugin-browser/src/manifest.ts b/webapp/packages/plugin-browser/src/manifest.ts index 81cfb2ab6a..378f833644 100644 --- a/webapp/packages/plugin-browser/src/manifest.ts +++ b/webapp/packages/plugin-browser/src/manifest.ts @@ -9,9 +9,9 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const browserPlugin: PluginManifest = { info: { name: 'Browser plugin' }, - preload: [() => import('./PluginBrowserPreloadingBootstrap').then(m => m.PluginBrowserPreloadingBootstrap)], + preload: [() => import('./PluginBrowserPreloadingBootstrap.js').then(m => m.PluginBrowserPreloadingBootstrap)], providers: [ - () => import('./PluginBrowserBootstrap').then(m => m.PluginBrowserBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./PluginBrowserBootstrap.js').then(m => m.PluginBrowserBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-codemirror6/package.json b/webapp/packages/plugin-codemirror6/package.json index b0b86f1a71..912d422cf1 100644 --- a/webapp/packages/plugin-codemirror6/package.json +++ b/webapp/packages/plugin-codemirror6/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-codemirror6", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-codemirror6/src/Editor.tsx b/webapp/packages/plugin-codemirror6/src/Editor.tsx index f4fa2cf1b8..25b4c4b118 100644 --- a/webapp/packages/plugin-codemirror6/src/Editor.tsx +++ b/webapp/packages/plugin-codemirror6/src/Editor.tsx @@ -10,12 +10,12 @@ import { forwardRef } from 'react'; import { s, useS } from '@cloudbeaver/core-blocks'; -import type { IEditorProps } from './IEditorProps'; -import type { IEditorRef } from './IEditorRef'; -import { ReactCodemirror } from './ReactCodemirror'; -import { EDITOR_BASE_STYLES } from './theme'; -import { useCodemirrorExtensions } from './useCodemirrorExtensions'; -import { type IDefaultExtensions, useEditorDefaultExtensions } from './useEditorDefaultExtensions'; +import type { IEditorProps } from './IEditorProps.js'; +import type { IEditorRef } from './IEditorRef.js'; +import { ReactCodemirror } from './ReactCodemirror.js'; +import { EDITOR_BASE_STYLES } from './theme/index.js'; +import { useCodemirrorExtensions } from './useCodemirrorExtensions.js'; +import { type IDefaultExtensions, useEditorDefaultExtensions } from './useEditorDefaultExtensions.js'; export const Editor = observer( forwardRef(function Editor( diff --git a/webapp/packages/plugin-codemirror6/src/EditorLoader.ts b/webapp/packages/plugin-codemirror6/src/EditorLoader.ts index 84f909daf8..dbede18f46 100644 --- a/webapp/packages/plugin-codemirror6/src/EditorLoader.ts +++ b/webapp/packages/plugin-codemirror6/src/EditorLoader.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const EditorLoader = importLazyComponent(() => import('./Editor').then(m => m.Editor)); +export const EditorLoader = importLazyComponent(() => import('./Editor.js').then(m => m.Editor)); diff --git a/webapp/packages/plugin-codemirror6/src/Hyperlink/Hyperlink.ts b/webapp/packages/plugin-codemirror6/src/Hyperlink/Hyperlink.ts index bc52846bb7..e626d64ba8 100644 --- a/webapp/packages/plugin-codemirror6/src/Hyperlink/Hyperlink.ts +++ b/webapp/packages/plugin-codemirror6/src/Hyperlink/Hyperlink.ts @@ -7,7 +7,7 @@ */ import { RangeSet, RangeValue } from '@codemirror/state'; -import type { IHyperlinkInfo } from './IHyperlinkInfo'; +import type { IHyperlinkInfo } from './IHyperlinkInfo.js'; export const enum HyperlinkState { Inactive, diff --git a/webapp/packages/plugin-codemirror6/src/Hyperlink/HyperlinkLoader.ts b/webapp/packages/plugin-codemirror6/src/Hyperlink/HyperlinkLoader.ts index 4c06333eaa..11a61d2573 100644 --- a/webapp/packages/plugin-codemirror6/src/Hyperlink/HyperlinkLoader.ts +++ b/webapp/packages/plugin-codemirror6/src/Hyperlink/HyperlinkLoader.ts @@ -7,6 +7,6 @@ */ import type { SelectionRange } from '@codemirror/state'; -import type { IHyperlinkInfo } from './IHyperlinkInfo'; +import type { IHyperlinkInfo } from './IHyperlinkInfo.js'; export type HyperlinkLoader = (pos: SelectionRange) => Promise; diff --git a/webapp/packages/plugin-codemirror6/src/Hyperlink/useHyperlink.ts b/webapp/packages/plugin-codemirror6/src/Hyperlink/useHyperlink.ts index 39965a2897..50a3b5fd1b 100644 --- a/webapp/packages/plugin-codemirror6/src/Hyperlink/useHyperlink.ts +++ b/webapp/packages/plugin-codemirror6/src/Hyperlink/useHyperlink.ts @@ -5,12 +5,12 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { combineConfig, Compartment, EditorState, Extension, Facet, Range, SelectionRange, StateEffect, StateField } from '@codemirror/state'; +import { combineConfig, Compartment, EditorState, type Extension, Facet, Range, SelectionRange, StateEffect, StateField } from '@codemirror/state'; import { Decoration, EditorView, ViewPlugin, ViewUpdate } from '@codemirror/view'; -import { Hyperlink, HyperlinkState } from './Hyperlink'; -import type { HyperlinkLoader } from './HyperlinkLoader'; -import type { IHyperlinkInfo } from './IHyperlinkInfo'; +import { Hyperlink, HyperlinkState } from './Hyperlink.js'; +import type { HyperlinkLoader } from './HyperlinkLoader.js'; +import type { IHyperlinkInfo } from './IHyperlinkInfo.js'; export interface HyperlinksConfig { loadLinkInfo: HyperlinkLoader; diff --git a/webapp/packages/plugin-codemirror6/src/IEditorProps.ts b/webapp/packages/plugin-codemirror6/src/IEditorProps.ts index 8d125fe4a0..7bf59f99fe 100644 --- a/webapp/packages/plugin-codemirror6/src/IEditorProps.ts +++ b/webapp/packages/plugin-codemirror6/src/IEditorProps.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IReactCodeMirrorProps } from './IReactCodemirrorProps'; +import type { IReactCodeMirrorProps } from './IReactCodemirrorProps.js'; export interface IEditorProps extends IReactCodeMirrorProps { className?: string; diff --git a/webapp/packages/plugin-codemirror6/src/ReactCodemirror.tsx b/webapp/packages/plugin-codemirror6/src/ReactCodemirror.tsx index 4240880525..9c5372af72 100644 --- a/webapp/packages/plugin-codemirror6/src/ReactCodemirror.tsx +++ b/webapp/packages/plugin-codemirror6/src/ReactCodemirror.tsx @@ -6,18 +6,18 @@ * you may not use this file except in compliance with the License. */ import { MergeView } from '@codemirror/merge'; -import { Annotation, Compartment, EditorState, Extension, StateEffect, TransactionSpec } from '@codemirror/state'; +import { Annotation, Compartment, EditorState, type Extension, StateEffect, type TransactionSpec } from '@codemirror/state'; import { EditorView, ViewUpdate } from '@codemirror/view'; import { observer } from 'mobx-react-lite'; import { forwardRef, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react'; import { useObjectRef } from '@cloudbeaver/core-blocks'; -import type { IEditorRef } from './IEditorRef'; -import type { IReactCodeMirrorProps } from './IReactCodemirrorProps'; -import { type IReactCodemirrorContext, ReactCodemirrorContext } from './ReactCodemirrorContext'; -import { useCodemirrorExtensions } from './useCodemirrorExtensions'; -import { validateCursorBoundaries } from './validateCursorBoundaries'; +import type { IEditorRef } from './IEditorRef.js'; +import type { IReactCodeMirrorProps } from './IReactCodemirrorProps.js'; +import { type IReactCodemirrorContext, ReactCodemirrorContext } from './ReactCodemirrorContext.js'; +import { useCodemirrorExtensions } from './useCodemirrorExtensions.js'; +import { validateCursorBoundaries } from './validateCursorBoundaries.js'; const External = Annotation.define(); diff --git a/webapp/packages/plugin-codemirror6/src/ReactCodemirrorPanel.tsx b/webapp/packages/plugin-codemirror6/src/ReactCodemirrorPanel.tsx index 68e0d69486..9dc6998f5a 100644 --- a/webapp/packages/plugin-codemirror6/src/ReactCodemirrorPanel.tsx +++ b/webapp/packages/plugin-codemirror6/src/ReactCodemirrorPanel.tsx @@ -11,7 +11,7 @@ import { observer } from 'mobx-react-lite'; import { useContext, useLayoutEffect, useMemo } from 'react'; import { createPortal } from 'react-dom'; -import { ReactCodemirrorContext } from './ReactCodemirrorContext'; +import { ReactCodemirrorContext } from './ReactCodemirrorContext.js'; interface Props extends React.PropsWithChildren { className?: string; diff --git a/webapp/packages/plugin-codemirror6/src/index.ts b/webapp/packages/plugin-codemirror6/src/index.ts index 9566873e06..eb895a8906 100644 --- a/webapp/packages/plugin-codemirror6/src/index.ts +++ b/webapp/packages/plugin-codemirror6/src/index.ts @@ -1,16 +1,23 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ import { createComplexLoader } from '@cloudbeaver/core-blocks'; -export * from './ReactCodemirrorPanel'; -export * from './EditorLoader'; -export * from './IEditorProps'; -export * from './IEditorRef'; -export * from './useEditorDefaultExtensions'; -export * from './useEditorAutocompletion'; -export * from './useCodemirrorExtensions'; +export * from './ReactCodemirrorPanel.js'; +export * from './EditorLoader.js'; +export * from './IEditorProps.js'; +export * from './IEditorRef.js'; +export * from './useEditorDefaultExtensions.js'; +export * from './useEditorAutocompletion.js'; +export * from './useCodemirrorExtensions.js'; -export * from './Hyperlink/HyperlinkLoader'; -export * from './Hyperlink/IHyperlinkInfo'; -export * from './Hyperlink/useHyperlink'; +export * from './Hyperlink/HyperlinkLoader.js'; +export * from './Hyperlink/IHyperlinkInfo.js'; +export * from './Hyperlink/useHyperlink.js'; export * from '@codemirror/view'; export * from '@codemirror/state'; diff --git a/webapp/packages/plugin-codemirror6/src/theme/index.ts b/webapp/packages/plugin-codemirror6/src/theme/index.ts index 15c73a4500..ccfd82ad64 100644 --- a/webapp/packages/plugin-codemirror6/src/theme/index.ts +++ b/webapp/packages/plugin-codemirror6/src/theme/index.ts @@ -1 +1,8 @@ -export * from './styles'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './styles.js'; diff --git a/webapp/packages/plugin-codemirror6/src/useCodemirrorExtensions.ts b/webapp/packages/plugin-codemirror6/src/useCodemirrorExtensions.ts index f5c23882b4..d41407f16f 100644 --- a/webapp/packages/plugin-codemirror6/src/useCodemirrorExtensions.ts +++ b/webapp/packages/plugin-codemirror6/src/useCodemirrorExtensions.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Compartment, Extension } from '@codemirror/state'; +import { Compartment, type Extension } from '@codemirror/state'; import { useState } from 'react'; export function useCodemirrorExtensions(extensions?: Map, staticExtensions?: Extension): Map { diff --git a/webapp/packages/plugin-codemirror6/src/useEditorDefaultExtensions.ts b/webapp/packages/plugin-codemirror6/src/useEditorDefaultExtensions.ts index dac139273e..064a31640c 100644 --- a/webapp/packages/plugin-codemirror6/src/useEditorDefaultExtensions.ts +++ b/webapp/packages/plugin-codemirror6/src/useEditorDefaultExtensions.ts @@ -8,7 +8,7 @@ import { defaultKeymap, indentWithTab } from '@codemirror/commands'; import { bracketMatching, foldGutter, indentOnInput, syntaxHighlighting } from '@codemirror/language'; import { highlightSelectionMatches } from '@codemirror/search'; -import { Compartment, Extension } from '@codemirror/state'; +import { Compartment, type Extension } from '@codemirror/state'; import { crosshairCursor, dropCursor, diff --git a/webapp/packages/plugin-codemirror6/src/validateCursorBoundaries.ts b/webapp/packages/plugin-codemirror6/src/validateCursorBoundaries.ts index 352a0b08d0..59035ea4ef 100644 --- a/webapp/packages/plugin-codemirror6/src/validateCursorBoundaries.ts +++ b/webapp/packages/plugin-codemirror6/src/validateCursorBoundaries.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ISelection } from './IReactCodemirrorProps'; +import type { ISelection } from './IReactCodemirrorProps.js'; export function validateCursorBoundaries(selection: ISelection, documentLength: number): ISelection { return { diff --git a/webapp/packages/plugin-connection-custom/package.json b/webapp/packages/plugin-connection-custom/package.json index a2fd23c28a..d9162a81d1 100644 --- a/webapp/packages/plugin-connection-custom/package.json +++ b/webapp/packages/plugin-connection-custom/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-connection-custom", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-connection-custom/src/CustomConnectionPluginBootstrap.ts b/webapp/packages/plugin-connection-custom/src/CustomConnectionPluginBootstrap.ts index 82f88c634b..dccb54acfc 100644 --- a/webapp/packages/plugin-connection-custom/src/CustomConnectionPluginBootstrap.ts +++ b/webapp/packages/plugin-connection-custom/src/CustomConnectionPluginBootstrap.ts @@ -14,10 +14,10 @@ import { CachedMapAllKey, getCachedMapResourceLoaderState } from '@cloudbeaver/c import { ActionService, MenuService } from '@cloudbeaver/core-view'; import { MENU_CONNECTIONS } from '@cloudbeaver/plugin-connections'; -import { ACTION_CONNECTION_CUSTOM } from './Actions/ACTION_CONNECTION_CUSTOM'; -import { CustomConnectionSettingsService } from './CustomConnectionSettingsService'; +import { ACTION_CONNECTION_CUSTOM } from './Actions/ACTION_CONNECTION_CUSTOM.js'; +import { CustomConnectionSettingsService } from './CustomConnectionSettingsService.js'; -const DriverSelectorDialog = importLazyComponent(() => import('./DriverSelector/DriverSelectorDialog').then(m => m.DriverSelectorDialog)); +const DriverSelectorDialog = importLazyComponent(() => import('./DriverSelector/DriverSelectorDialog.js').then(m => m.DriverSelectorDialog)); @injectable() export class CustomConnectionPluginBootstrap extends Bootstrap { @@ -32,7 +32,7 @@ export class CustomConnectionPluginBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.menuService.addCreator({ menus: [MENU_CONNECTIONS], getItems: (context, items) => [...items, ACTION_CONNECTION_CUSTOM], diff --git a/webapp/packages/plugin-connection-custom/src/DriverSelector/DriverSelector.tsx b/webapp/packages/plugin-connection-custom/src/DriverSelector/DriverSelector.tsx index 1bcc791911..3e299b264d 100644 --- a/webapp/packages/plugin-connection-custom/src/DriverSelector/DriverSelector.tsx +++ b/webapp/packages/plugin-connection-custom/src/DriverSelector/DriverSelector.tsx @@ -10,7 +10,7 @@ import { useMemo, useState } from 'react'; import { ItemList, ItemListSearch, s, useFocus, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import { Driver, IDriver } from './Driver'; +import { Driver, type IDriver } from './Driver.js'; import style from './DriverSelector.module.css'; interface Props { diff --git a/webapp/packages/plugin-connection-custom/src/DriverSelector/DriverSelectorDialog.tsx b/webapp/packages/plugin-connection-custom/src/DriverSelector/DriverSelectorDialog.tsx index 9a0e351244..fa161c1baf 100644 --- a/webapp/packages/plugin-connection-custom/src/DriverSelector/DriverSelectorDialog.tsx +++ b/webapp/packages/plugin-connection-custom/src/DriverSelector/DriverSelectorDialog.tsx @@ -13,9 +13,9 @@ import type { DialogComponent } from '@cloudbeaver/core-dialogs'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { DriverSelector } from './DriverSelector'; +import { DriverSelector } from './DriverSelector.js'; import styles from './DriverSelectorDialog.module.css'; -import { useDriverSelectorDialog } from './useDriverSelectorDialog'; +import { useDriverSelectorDialog } from './useDriverSelectorDialog.js'; export const DriverSelectorDialog: DialogComponent = observer(function DriverSelectorDialog({ rejectDialog }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-connection-custom/src/DriverSelector/useDriverSelectorDialog.ts b/webapp/packages/plugin-connection-custom/src/DriverSelector/useDriverSelectorDialog.ts index 96151858ca..49b5236146 100644 --- a/webapp/packages/plugin-connection-custom/src/DriverSelector/useDriverSelectorDialog.ts +++ b/webapp/packages/plugin-connection-custom/src/DriverSelector/useDriverSelectorDialog.ts @@ -32,7 +32,7 @@ export function useDriverSelectorDialog(drivers: string[], onSelect?: () => void return; } - const state = await this.publicConnectionFormService.open(projects[0].id, { driverId }, this.drivers); + const state = await this.publicConnectionFormService.open(projects[0]!.id, { driverId }, this.drivers); if (state) { onSelect?.(); diff --git a/webapp/packages/plugin-connection-custom/src/LocaleService.ts b/webapp/packages/plugin-connection-custom/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-connection-custom/src/LocaleService.ts +++ b/webapp/packages/plugin-connection-custom/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-connection-custom/src/index.ts b/webapp/packages/plugin-connection-custom/src/index.ts index faec463c06..85ef110ac4 100644 --- a/webapp/packages/plugin-connection-custom/src/index.ts +++ b/webapp/packages/plugin-connection-custom/src/index.ts @@ -1,5 +1,12 @@ -import { customConnectionPluginManifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { customConnectionPluginManifest } from './manifest.js'; export default customConnectionPluginManifest; -export * from './CustomConnectionSettingsService'; +export * from './CustomConnectionSettingsService.js'; diff --git a/webapp/packages/plugin-connection-custom/src/manifest.ts b/webapp/packages/plugin-connection-custom/src/manifest.ts index 8c8ca61be0..8d9659f6e6 100644 --- a/webapp/packages/plugin-connection-custom/src/manifest.ts +++ b/webapp/packages/plugin-connection-custom/src/manifest.ts @@ -13,8 +13,8 @@ export const customConnectionPluginManifest: PluginManifest = { }, providers: [ - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./CustomConnectionPluginBootstrap').then(m => m.CustomConnectionPluginBootstrap), - () => import('./CustomConnectionSettingsService').then(m => m.CustomConnectionSettingsService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./CustomConnectionPluginBootstrap.js').then(m => m.CustomConnectionPluginBootstrap), + () => import('./CustomConnectionSettingsService.js').then(m => m.CustomConnectionSettingsService), ], }; diff --git a/webapp/packages/plugin-connection-search/package.json b/webapp/packages/plugin-connection-search/package.json index ba61294eb3..c66da87544 100644 --- a/webapp/packages/plugin-connection-search/package.json +++ b/webapp/packages/plugin-connection-search/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-connection-search", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-connection-search/src/LocaleService.ts b/webapp/packages/plugin-connection-search/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-connection-search/src/LocaleService.ts +++ b/webapp/packages/plugin-connection-search/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-connection-search/src/Search/ConnectionSearchService.ts b/webapp/packages/plugin-connection-search/src/Search/ConnectionSearchService.ts index 4a37d88ebf..498c8b4e68 100644 --- a/webapp/packages/plugin-connection-search/src/Search/ConnectionSearchService.ts +++ b/webapp/packages/plugin-connection-search/src/Search/ConnectionSearchService.ts @@ -12,13 +12,13 @@ import { ConnectionInfoResource, ConnectionsManagerService, createConnectionPara import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorInterrupter, IExecutorHandler } from '@cloudbeaver/core-executor'; +import { ExecutorInterrupter, type IExecutorHandler } from '@cloudbeaver/core-executor'; import { ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; import type { AdminConnectionSearchInfo } from '@cloudbeaver/core-sdk'; import { OptionsPanelService } from '@cloudbeaver/core-ui'; -import { ConnectionFormService, ConnectionFormState, IConnectionFormState } from '@cloudbeaver/plugin-connections'; +import { ConnectionFormService, ConnectionFormState, type IConnectionFormState } from '@cloudbeaver/plugin-connections'; -import { SearchDatabase } from './SearchDatabase'; +import { SearchDatabase } from './SearchDatabase.js'; const formGetter = () => SearchDatabase; @@ -163,7 +163,7 @@ export class ConnectionSearchService { this.formState .setOptions('create', 'public') - .setConfig(projects[0].id, { + .setConfig(projects[0]!.id, { ...this.connectionInfoResource.getEmptyConfig(), driverId: database.defaultDriver, host: database.host, diff --git a/webapp/packages/plugin-connection-search/src/Search/DatabaseList.tsx b/webapp/packages/plugin-connection-search/src/Search/DatabaseList.tsx index 8e5c2099be..1b68127a85 100644 --- a/webapp/packages/plugin-connection-search/src/Search/DatabaseList.tsx +++ b/webapp/packages/plugin-connection-search/src/Search/DatabaseList.tsx @@ -11,7 +11,7 @@ import { useCallback, useState } from 'react'; import { Form, ItemList, ItemListSearch, s, TextPlaceholder, useFocus, useS, useTranslate } from '@cloudbeaver/core-blocks'; import type { AdminConnectionSearchInfo } from '@cloudbeaver/core-sdk'; -import { Database } from './Database'; +import { Database } from './Database.js'; import style from './DatabaseList.module.css'; interface Props { diff --git a/webapp/packages/plugin-connection-search/src/Search/SearchDatabase.tsx b/webapp/packages/plugin-connection-search/src/Search/SearchDatabase.tsx index cbfa23566d..e7381091ad 100644 --- a/webapp/packages/plugin-connection-search/src/Search/SearchDatabase.tsx +++ b/webapp/packages/plugin-connection-search/src/Search/SearchDatabase.tsx @@ -15,8 +15,8 @@ import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import type { AdminConnectionSearchInfo } from '@cloudbeaver/core-sdk'; import { ConnectionFormLoader } from '@cloudbeaver/plugin-connections'; -import { ConnectionSearchService } from './ConnectionSearchService'; -import { DatabaseList } from './DatabaseList'; +import { ConnectionSearchService } from './ConnectionSearchService.js'; +import { DatabaseList } from './DatabaseList.js'; import style from './SearchDatabase.module.css'; export const SearchDatabase: React.FC = observer(function SearchDatabase() { diff --git a/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts b/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts index 8e3a155ab3..12fe73e25d 100644 --- a/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts +++ b/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts @@ -13,9 +13,9 @@ import { EAdminPermission, PermissionsService } from '@cloudbeaver/core-root'; import { ActionService, MenuService } from '@cloudbeaver/core-view'; import { MENU_CONNECTIONS } from '@cloudbeaver/plugin-connections'; -import { ACTION_CONNECTION_SEARCH } from './Actions/ACTION_CONNECTION_SEARCH'; -import { ConnectionSearchSettingsService } from './ConnectionSearchSettingsService'; -import { ConnectionSearchService } from './Search/ConnectionSearchService'; +import { ACTION_CONNECTION_SEARCH } from './Actions/ACTION_CONNECTION_SEARCH.js'; +import { ConnectionSearchSettingsService } from './ConnectionSearchSettingsService.js'; +import { ConnectionSearchService } from './Search/ConnectionSearchService.js'; @injectable() export class SearchConnectionPluginBootstrap extends Bootstrap { @@ -31,7 +31,7 @@ export class SearchConnectionPluginBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.menuService.addCreator({ menus: [MENU_CONNECTIONS], getItems: (context, items) => [...items, ACTION_CONNECTION_SEARCH], diff --git a/webapp/packages/plugin-connection-search/src/index.ts b/webapp/packages/plugin-connection-search/src/index.ts index 22f185f033..55dc1e976b 100644 --- a/webapp/packages/plugin-connection-search/src/index.ts +++ b/webapp/packages/plugin-connection-search/src/index.ts @@ -1,5 +1,12 @@ -import { connectionSearchPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { connectionSearchPlugin } from './manifest.js'; export default connectionSearchPlugin; -export * from './ConnectionSearchSettingsService'; +export * from './ConnectionSearchSettingsService.js'; diff --git a/webapp/packages/plugin-connection-search/src/manifest.ts b/webapp/packages/plugin-connection-search/src/manifest.ts index 8384ead4e7..c7c73a3ab6 100644 --- a/webapp/packages/plugin-connection-search/src/manifest.ts +++ b/webapp/packages/plugin-connection-search/src/manifest.ts @@ -12,9 +12,9 @@ export const connectionSearchPlugin: PluginManifest = { name: 'Search connection plugin', }, providers: [ - () => import('./SearchConnectionPluginBootstrap').then(m => m.SearchConnectionPluginBootstrap), - () => import('./Search/ConnectionSearchService').then(m => m.ConnectionSearchService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./ConnectionSearchSettingsService').then(m => m.ConnectionSearchSettingsService), + () => import('./SearchConnectionPluginBootstrap.js').then(m => m.SearchConnectionPluginBootstrap), + () => import('./Search/ConnectionSearchService.js').then(m => m.ConnectionSearchService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./ConnectionSearchSettingsService.js').then(m => m.ConnectionSearchSettingsService), ], }; diff --git a/webapp/packages/plugin-connection-template/package.json b/webapp/packages/plugin-connection-template/package.json index f011ce67ac..fc7f8c3075 100644 --- a/webapp/packages/plugin-connection-template/package.json +++ b/webapp/packages/plugin-connection-template/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-connection-template", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialog.tsx b/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialog.tsx index b95f0a07e2..67467a826f 100644 --- a/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialog.tsx +++ b/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialog.tsx @@ -25,10 +25,10 @@ import type { DialogComponent } from '@cloudbeaver/core-dialogs'; import { ConnectionAuthenticationFormLoader } from '@cloudbeaver/plugin-connections'; import style from './ConnectionDialog.module.css'; -import { ConnectionDialogFooter } from './ConnectionDialogFooter'; -import { ConnectionStep } from './EConnectionStep'; -import { TemplateConnectionSelector } from './TemplateConnectionSelector/TemplateConnectionSelector'; -import { useConnectionDialog } from './useConnectionDialog'; +import { ConnectionDialogFooter } from './ConnectionDialogFooter.js'; +import { ConnectionStep } from './EConnectionStep.js'; +import { TemplateConnectionSelector } from './TemplateConnectionSelector/TemplateConnectionSelector.js'; +import { useConnectionDialog } from './useConnectionDialog.js'; export const ConnectionDialog: DialogComponent = observer(function ConnectionDialog({ rejectDialog }) { const styles = useS(style); diff --git a/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialogFooter.tsx b/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialogFooter.tsx index 941456183d..cd31fd5910 100644 --- a/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialogFooter.tsx +++ b/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialogFooter.tsx @@ -21,8 +21,8 @@ export const ConnectionDialogFooter = observer(function ConnectionDialogF const styles = useS(style); const translate = useTranslate(); return ( -
-
+
+
diff --git a/webapp/packages/plugin-connection-template/src/ConnectionDialog/TemplateConnectionSelector/TemplateConnectionSelector.tsx b/webapp/packages/plugin-connection-template/src/ConnectionDialog/TemplateConnectionSelector/TemplateConnectionSelector.tsx index ae25a3fad7..6bcd515f8a 100644 --- a/webapp/packages/plugin-connection-template/src/ConnectionDialog/TemplateConnectionSelector/TemplateConnectionSelector.tsx +++ b/webapp/packages/plugin-connection-template/src/ConnectionDialog/TemplateConnectionSelector/TemplateConnectionSelector.tsx @@ -14,9 +14,9 @@ import { useService } from '@cloudbeaver/core-di'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { TemplateConnectionsResource } from '../../TemplateConnectionsResource'; -import { TemplateConnectionsService } from '../../TemplateConnectionsService'; -import { TemplateConnectionItem } from './TemplateConnectionItem'; +import { TemplateConnectionsResource } from '../../TemplateConnectionsResource.js'; +import { TemplateConnectionsService } from '../../TemplateConnectionsService.js'; +import { TemplateConnectionItem } from './TemplateConnectionItem.js'; interface Props { className?: string; diff --git a/webapp/packages/plugin-connection-template/src/ConnectionDialog/useConnectionDialog.ts b/webapp/packages/plugin-connection-template/src/ConnectionDialog/useConnectionDialog.ts index 2d74b7be5e..900c2747ec 100644 --- a/webapp/packages/plugin-connection-template/src/ConnectionDialog/useConnectionDialog.ts +++ b/webapp/packages/plugin-connection-template/src/ConnectionDialog/useConnectionDialog.ts @@ -10,12 +10,12 @@ import { action, computed, observable } from 'mobx'; import { AuthProviderService } from '@cloudbeaver/core-authentication'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { - Connection, + type Connection, ConnectionInfoProjectKey, ConnectionInfoResource, - ConnectionInitConfig, + type ConnectionInitConfig, createConnectionParam, - DBDriver, + type DBDriver, DBDriverResource, USER_NAME_PROPERTY_ID, } from '@cloudbeaver/core-connections'; @@ -26,8 +26,8 @@ import { NetworkHandlerAuthType } from '@cloudbeaver/core-sdk'; import { getUniqueName } from '@cloudbeaver/core-utils'; import type { IConnectionAuthenticationConfig } from '@cloudbeaver/plugin-connections'; -import { TemplateConnectionsService } from '../TemplateConnectionsService'; -import { ConnectionStep } from './EConnectionStep'; +import { TemplateConnectionsService } from '../TemplateConnectionsService.js'; +import { ConnectionStep } from './EConnectionStep.js'; interface IState { readonly networkHandlers: string[]; diff --git a/webapp/packages/plugin-connection-template/src/LocaleService.ts b/webapp/packages/plugin-connection-template/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-connection-template/src/LocaleService.ts +++ b/webapp/packages/plugin-connection-template/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-connection-template/src/TemplateConnectionPluginBootstrap.ts b/webapp/packages/plugin-connection-template/src/TemplateConnectionPluginBootstrap.ts index 7e1455f069..b432263eec 100644 --- a/webapp/packages/plugin-connection-template/src/TemplateConnectionPluginBootstrap.ts +++ b/webapp/packages/plugin-connection-template/src/TemplateConnectionPluginBootstrap.ts @@ -14,11 +14,11 @@ import { CachedMapAllKey, getCachedDataResourceLoaderState, getCachedMapResource import { ActionService, MenuService } from '@cloudbeaver/core-view'; import { MENU_CONNECTIONS } from '@cloudbeaver/plugin-connections'; -import { ACTION_CONNECTION_TEMPLATE } from './Actions/ACTION_CONNECTION_TEMPLATE'; -import { TemplateConnectionsResource } from './TemplateConnectionsResource'; -import { TemplateConnectionsService } from './TemplateConnectionsService'; +import { ACTION_CONNECTION_TEMPLATE } from './Actions/ACTION_CONNECTION_TEMPLATE.js'; +import { TemplateConnectionsResource } from './TemplateConnectionsResource.js'; +import { TemplateConnectionsService } from './TemplateConnectionsService.js'; -const ConnectionDialog = importLazyComponent(() => import('./ConnectionDialog/ConnectionDialog').then(m => m.ConnectionDialog)); +const ConnectionDialog = importLazyComponent(() => import('./ConnectionDialog/ConnectionDialog.js').then(m => m.ConnectionDialog)); @injectable() export class TemplateConnectionPluginBootstrap extends Bootstrap { @@ -35,7 +35,7 @@ export class TemplateConnectionPluginBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.menuService.addCreator({ menus: [MENU_CONNECTIONS], getItems: (context, items) => [...items, ACTION_CONNECTION_TEMPLATE], diff --git a/webapp/packages/plugin-connection-template/src/TemplateConnectionsResource.ts b/webapp/packages/plugin-connection-template/src/TemplateConnectionsResource.ts index d82f877b7d..3da507a893 100644 --- a/webapp/packages/plugin-connection-template/src/TemplateConnectionsResource.ts +++ b/webapp/packages/plugin-connection-template/src/TemplateConnectionsResource.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { AppAuthService } from '@cloudbeaver/core-authentication'; -import { Connection, ConnectionInfoResource } from '@cloudbeaver/core-connections'; +import { type Connection, ConnectionInfoResource } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { SessionDataResource } from '@cloudbeaver/core-root'; diff --git a/webapp/packages/plugin-connection-template/src/TemplateConnectionsService.ts b/webapp/packages/plugin-connection-template/src/TemplateConnectionsService.ts index 8150bdd7e8..0a118bdac7 100644 --- a/webapp/packages/plugin-connection-template/src/TemplateConnectionsService.ts +++ b/webapp/packages/plugin-connection-template/src/TemplateConnectionsService.ts @@ -9,7 +9,7 @@ import type { Connection } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { ProjectsService } from '@cloudbeaver/core-projects'; -import { TemplateConnectionsResource } from './TemplateConnectionsResource'; +import { TemplateConnectionsResource } from './TemplateConnectionsResource.js'; @injectable() export class TemplateConnectionsService { diff --git a/webapp/packages/plugin-connection-template/src/index.ts b/webapp/packages/plugin-connection-template/src/index.ts index f441811f85..c0f1cc95d2 100644 --- a/webapp/packages/plugin-connection-template/src/index.ts +++ b/webapp/packages/plugin-connection-template/src/index.ts @@ -1,3 +1,10 @@ -import { connectionTemplate } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { connectionTemplate } from './manifest.js'; export default connectionTemplate; diff --git a/webapp/packages/plugin-connection-template/src/manifest.ts b/webapp/packages/plugin-connection-template/src/manifest.ts index bb7f565c03..2b94abaa48 100644 --- a/webapp/packages/plugin-connection-template/src/manifest.ts +++ b/webapp/packages/plugin-connection-template/src/manifest.ts @@ -13,9 +13,9 @@ export const connectionTemplate: PluginManifest = { }, providers: [ - () => import('./TemplateConnectionsResource').then(m => m.TemplateConnectionsResource), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./TemplateConnectionPluginBootstrap').then(m => m.TemplateConnectionPluginBootstrap), - () => import('./TemplateConnectionsService').then(m => m.TemplateConnectionsService), + () => import('./TemplateConnectionsResource.js').then(m => m.TemplateConnectionsResource), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./TemplateConnectionPluginBootstrap.js').then(m => m.TemplateConnectionPluginBootstrap), + () => import('./TemplateConnectionsService.js').then(m => m.TemplateConnectionsService), ], }; diff --git a/webapp/packages/plugin-connections-administration/package.json b/webapp/packages/plugin-connections-administration/package.json index 49aeb1c144..6b849c8ef4 100644 --- a/webapp/packages/plugin-connections-administration/package.json +++ b/webapp/packages/plugin-connections-administration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-connections-administration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministration.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministration.tsx index 64816b12d7..e98371c1aa 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministration.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministration.tsx @@ -19,7 +19,7 @@ import { Loader, s, SContext, - StyleRegistry, + type StyleRegistry, ToolsAction, ToolsPanel, useS, @@ -28,10 +28,10 @@ import { import { useService } from '@cloudbeaver/core-di'; import ConnectionsAdministrationStyle from './ConnectionsAdministration.module.css'; -import { ConnectionsTable } from './ConnectionsTable/ConnectionsTable'; -import { useConnectionsTable } from './ConnectionsTable/useConnectionsTable'; -import { CreateConnection } from './CreateConnection/CreateConnection'; -import { CreateConnectionService } from './CreateConnectionService'; +import { ConnectionsTable } from './ConnectionsTable/ConnectionsTable.js'; +import { useConnectionsTable } from './ConnectionsTable/useConnectionsTable.js'; +import { CreateConnection } from './CreateConnection/CreateConnection.js'; +import { CreateConnectionService } from './CreateConnectionService.js'; const registry: StyleRegistry = [ [ diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministrationService.ts b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministrationService.ts index 2baba73cbb..fd2c756733 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministrationService.ts +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministrationService.ts @@ -9,31 +9,31 @@ import React from 'react'; import { AdministrationItemService, AdministrationItemType } from '@cloudbeaver/core-administration'; import { ConfirmationDialog, PlaceholderContainer } from '@cloudbeaver/core-blocks'; -import { ConnectionInfoResource, DatabaseConnection } from '@cloudbeaver/core-connections'; +import { ConnectionInfoResource, type DatabaseConnection } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { CreateConnectionService } from './CreateConnectionService'; +import { CreateConnectionService } from './CreateConnectionService.js'; export interface IConnectionDetailsPlaceholderProps { connection: DatabaseConnection; } const ConnectionsAdministration = React.lazy(async () => { - const { ConnectionsAdministration } = await import('./ConnectionsAdministration'); + const { ConnectionsAdministration } = await import('./ConnectionsAdministration.js'); return { default: ConnectionsAdministration }; }); const ConnectionsDrawerItem = React.lazy(async () => { - const { ConnectionsDrawerItem } = await import('./ConnectionsDrawerItem'); + const { ConnectionsDrawerItem } = await import('./ConnectionsDrawerItem.js'); return { default: ConnectionsDrawerItem }; }); const Origin = React.lazy(async () => { - const { Origin } = await import('./ConnectionsTable/ConnectionDetailsInfo/Origin'); + const { Origin } = await import('./ConnectionsTable/ConnectionDetailsInfo/Origin.js'); return { default: Origin }; }); const SSH = React.lazy(async () => { - const { SSH } = await import('./ConnectionsTable/ConnectionDetailsInfo/SSH'); + const { SSH } = await import('./ConnectionsTable/ConnectionDetailsInfo/SSH.js'); return { default: SSH }; }); @@ -51,7 +51,7 @@ export class ConnectionsAdministrationService extends Bootstrap { super(); } - register(): void { + override register(): void { this.administrationItemService.create({ name: 'connections', type: AdministrationItemType.Administration, @@ -77,8 +77,6 @@ export class ConnectionsAdministrationService extends Bootstrap { this.connectionDetailsPlaceholder.add(SSH, 2); } - load(): void | Promise {} - private async refreshUserConnections(configuration: boolean, outside: boolean, outsideAdminPage: boolean): Promise { // TODO: we have to track users' leaving the page if (outside) { diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/Connection.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/Connection.tsx index 8aa2311419..e186a878c4 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/Connection.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/Connection.tsx @@ -19,13 +19,13 @@ import { useResource, useS, } from '@cloudbeaver/core-blocks'; -import { DatabaseConnection, IConnectionInfoParams } from '@cloudbeaver/core-connections'; +import { type DatabaseConnection, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; -import { ConnectionsAdministrationService } from '../ConnectionsAdministrationService'; +import { ConnectionsAdministrationService } from '../ConnectionsAdministrationService.js'; import styles from './Connection.module.css'; -import { ConnectionEdit } from './ConnectionEdit'; +import { ConnectionEdit } from './ConnectionEdit.js'; interface Props { connectionKey: IConnectionInfoParams; diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/Origin.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/Origin.tsx index b576322589..9a27111399 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/Origin.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/Origin.tsx @@ -8,9 +8,9 @@ import { observer } from 'mobx-react-lite'; import { AUTH_PROVIDER_LOCAL_ID } from '@cloudbeaver/core-authentication'; -import { PlaceholderComponent, s, StaticImage, useS } from '@cloudbeaver/core-blocks'; +import { type PlaceholderComponent, s, StaticImage, useS } from '@cloudbeaver/core-blocks'; -import type { IConnectionDetailsPlaceholderProps } from '../../ConnectionsAdministrationService'; +import type { IConnectionDetailsPlaceholderProps } from '../../ConnectionsAdministrationService.js'; import ConnectionDetailsStyles from './ConnectionDetailsStyles.module.css'; export const Origin: PlaceholderComponent = observer(function Origin({ connection }) { diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/SSH.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/SSH.tsx index d48ec6c914..32e16e2902 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/SSH.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/SSH.tsx @@ -7,10 +7,10 @@ */ import { observer } from 'mobx-react-lite'; -import { PlaceholderComponent, s, StaticImage, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks'; +import { type PlaceholderComponent, s, StaticImage, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { NetworkHandlerResource, SSH_TUNNEL_ID } from '@cloudbeaver/core-connections'; -import type { IConnectionDetailsPlaceholderProps } from '../../ConnectionsAdministrationService'; +import type { IConnectionDetailsPlaceholderProps } from '../../ConnectionsAdministrationService.js'; import ConnectionDetailsStyles from './ConnectionDetailsStyles.module.css'; export const SSH: PlaceholderComponent = observer(function SSH({ connection }) { diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/Template.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/Template.tsx index 14bb574d5b..c72b0b4792 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/Template.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionDetailsInfo/Template.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import { PlaceholderComponent, s, StaticImage, useS } from '@cloudbeaver/core-blocks'; +import { type PlaceholderComponent, s, StaticImage, useS } from '@cloudbeaver/core-blocks'; -import type { IConnectionDetailsPlaceholderProps } from '../../ConnectionsAdministrationService'; +import type { IConnectionDetailsPlaceholderProps } from '../../ConnectionsAdministrationService.js'; import ConnectionDetailsStyles from './ConnectionDetailsStyles.module.css'; export const Template: PlaceholderComponent = observer(function Template({ connection }) { diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionEdit.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionEdit.tsx index d2c1c750ae..c28882cfd9 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionEdit.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionEdit.tsx @@ -9,7 +9,7 @@ import { observer } from 'mobx-react-lite'; import { useMemo } from 'react'; import { Loader, s, useS } from '@cloudbeaver/core-blocks'; -import { ConnectionInfoResource, IConnectionInfoParams } from '@cloudbeaver/core-connections'; +import { ConnectionInfoResource, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { ConnectionFormLoader, useConnectionFormState } from '@cloudbeaver/plugin-connections'; diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionsTable.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionsTable.tsx index f619e99e4f..4d7d60bad2 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionsTable.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsTable/ConnectionsTable.tsx @@ -13,8 +13,8 @@ import { useService } from '@cloudbeaver/core-di'; import { isGlobalProject, isSharedProject, ProjectsService } from '@cloudbeaver/core-projects'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { Connection } from './Connection'; -import { IConnectionsTableState } from './useConnectionsTable'; +import { Connection } from './Connection.js'; +import { type IConnectionsTableState } from './useConnectionsTable.js'; interface Props { state: IConnectionsTableState; @@ -42,8 +42,8 @@ export const ConnectionsTable = observer(function ConnectionsTable({ stat {state.connections.map((connection, i) => ( { - const { CustomConnection } = await import('./Manual/CustomConnection'); + const { CustomConnection } = await import('./Manual/CustomConnection.js'); return { default: CustomConnection }; }); @@ -22,7 +22,7 @@ export class CreateConnectionBaseBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.createConnectionService.tabsContainer.add({ key: 'manual', name: 'connections_connection_create_custom', @@ -30,6 +30,4 @@ export class CreateConnectionBaseBootstrap extends Bootstrap { panel: () => CustomConnection, }); } - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/ConnectionManualService.ts b/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/ConnectionManualService.ts index cc751c9eb1..8b51edd2f6 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/ConnectionManualService.ts +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/ConnectionManualService.ts @@ -8,7 +8,7 @@ import { ConnectionInfoResource } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; -import { CreateConnectionService } from '../../CreateConnectionService'; +import { CreateConnectionService } from '../../CreateConnectionService.js'; @injectable() export class ConnectionManualService { diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/CustomConnection.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/CustomConnection.tsx index 05346baae5..4eb31dd440 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/CustomConnection.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/CustomConnection.tsx @@ -16,8 +16,8 @@ import { NotificationService } from '@cloudbeaver/core-events'; import { isSharedProject, ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { ConnectionManualService } from './ConnectionManualService'; -import { DriverList } from './DriverList'; +import { ConnectionManualService } from './ConnectionManualService.js'; +import { DriverList } from './DriverList.js'; export const CustomConnection = observer(function CustomConnection() { const projectsService = useService(ProjectsService); @@ -36,7 +36,7 @@ export const CustomConnection = observer(function CustomConnection() { const shared = projectsService.activeProjects.filter(isSharedProject); if (shared.length > 0) { - connectionManualService.select(shared[0].id, driverId); + connectionManualService.select(shared[0]!.id, driverId); } else { notificationService.logError({ title: 'core_projects_no_default_project', diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/DriverList.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/DriverList.tsx index c221d8df69..55337018cc 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/DriverList.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnection/Manual/DriverList.tsx @@ -11,7 +11,7 @@ import { useMemo, useState } from 'react'; import { ItemList, ItemListSearch, s, useFocus, useS, useTranslate } from '@cloudbeaver/core-blocks'; import type { DBDriver } from '@cloudbeaver/core-connections'; -import { Driver } from './Driver'; +import { Driver } from './Driver.js'; import styles from './DriverList.module.css'; interface Props { diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnectionService.ts b/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnectionService.ts index fc1051c911..d94744121c 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnectionService.ts +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/CreateConnectionService.ts @@ -13,9 +13,9 @@ import { injectable } from '@cloudbeaver/core-di'; import { ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; import type { ConnectionConfig } from '@cloudbeaver/core-sdk'; import { TabsContainer } from '@cloudbeaver/core-ui'; -import { ConnectionFormService, ConnectionFormState, IConnectionFormState } from '@cloudbeaver/plugin-connections'; +import { ConnectionFormService, ConnectionFormState, type IConnectionFormState } from '@cloudbeaver/plugin-connections'; -import { ConnectionsAdministrationNavService } from './ConnectionsAdministrationNavService'; +import { ConnectionsAdministrationNavService } from './ConnectionsAdministrationNavService.js'; export interface ICreateMethodOptions { configurationWizard?: { @@ -76,10 +76,10 @@ export class CreateConnectionService { return aPriority - bPriority; }); - return sorted[0].key; + return sorted[0]!.key; } - return tabs[0].key; + return tabs[0]!.key; } setCreateMethod(method?: string | null): void { diff --git a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccess.tsx b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccess.tsx index 1e6d294002..9faa6ddead 100644 --- a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccess.tsx +++ b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccess.tsx @@ -26,13 +26,13 @@ import { import { isCloudConnection } from '@cloudbeaver/core-connections'; import type { TLocalizationToken } from '@cloudbeaver/core-localization'; import { CachedMapAllKey, CachedResourceOffsetPageListKey } from '@cloudbeaver/core-resource'; -import { TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; +import { type TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; import type { IConnectionFormProps } from '@cloudbeaver/plugin-connections'; import styles from './ConnectionAccess.module.css'; -import { ConnectionAccessGrantedList } from './ConnectionAccessGrantedList'; -import { ConnectionAccessList } from './ConnectionAccessList'; -import { useConnectionAccessState } from './useConnectionAccessState'; +import { ConnectionAccessGrantedList } from './ConnectionAccessGrantedList.js'; +import { ConnectionAccessList } from './ConnectionAccessList.js'; +import { useConnectionAccessState } from './useConnectionAccessState.js'; export const ConnectionAccess: TabContainerPanelComponent = observer(function ConnectionAccess({ tabId, state: formState }) { const state = useConnectionAccessState(formState.info); diff --git a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessGrantedList.tsx b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessGrantedList.tsx index c365ca1fff..12426de2e7 100644 --- a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessGrantedList.tsx +++ b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessGrantedList.tsx @@ -28,10 +28,10 @@ import type { TLocalizationToken } from '@cloudbeaver/core-localization'; import type { AdminUserInfoFragment } from '@cloudbeaver/core-sdk'; import styles from './ConnectionAccessGrantedList.module.css'; -import { ConnectionAccessTableHeader, IFilterState } from './ConnectionAccessTableHeader/ConnectionAccessTableHeader'; -import { ConnectionAccessTableInnerHeader } from './ConnectionAccessTableHeader/ConnectionAccessTableInnerHeader'; -import { ConnectionAccessTableItem } from './ConnectionAccessTableItem'; -import { getFilteredTeams, getFilteredUsers } from './getFilteredSubjects'; +import { ConnectionAccessTableHeader, type IFilterState } from './ConnectionAccessTableHeader/ConnectionAccessTableHeader.js'; +import { ConnectionAccessTableInnerHeader } from './ConnectionAccessTableHeader/ConnectionAccessTableInnerHeader.js'; +import { ConnectionAccessTableItem } from './ConnectionAccessTableItem.js'; +import { getFilteredTeams, getFilteredUsers } from './getFilteredSubjects.js'; interface Props { grantedUsers: AdminUserInfoFragment[]; diff --git a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessList.tsx b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessList.tsx index 3edbc8d0ef..c3d292c221 100644 --- a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessList.tsx +++ b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessList.tsx @@ -27,10 +27,10 @@ import { import type { AdminUserInfoFragment } from '@cloudbeaver/core-sdk'; import styles from './ConnectionAccessList.module.css'; -import { ConnectionAccessTableHeader, IFilterState } from './ConnectionAccessTableHeader/ConnectionAccessTableHeader'; -import { ConnectionAccessTableInnerHeader } from './ConnectionAccessTableHeader/ConnectionAccessTableInnerHeader'; -import { ConnectionAccessTableItem } from './ConnectionAccessTableItem'; -import { getFilteredTeams, getFilteredUsers } from './getFilteredSubjects'; +import { ConnectionAccessTableHeader, type IFilterState } from './ConnectionAccessTableHeader/ConnectionAccessTableHeader.js'; +import { ConnectionAccessTableInnerHeader } from './ConnectionAccessTableHeader/ConnectionAccessTableInnerHeader.js'; +import { ConnectionAccessTableItem } from './ConnectionAccessTableItem.js'; +import { getFilteredTeams, getFilteredUsers } from './getFilteredSubjects.js'; interface Props { userList: AdminUserInfoFragment[]; diff --git a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessTabService.ts b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessTabService.ts index 427066a173..9ac0e447b0 100644 --- a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessTabService.ts +++ b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessTabService.ts @@ -8,9 +8,9 @@ import React from 'react'; import { AdministrationScreenService } from '@cloudbeaver/core-administration'; -import { ConnectionInfoResource, createConnectionParam, IConnectionInfoParams } from '@cloudbeaver/core-connections'; +import { ConnectionInfoResource, createConnectionParam, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { executorHandlerFilter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; +import { executorHandlerFilter, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { isGlobalProject, ProjectInfoResource } from '@cloudbeaver/core-projects'; import { EAdminPermission, PermissionsService } from '@cloudbeaver/core-root'; import { formStateContext } from '@cloudbeaver/core-ui'; @@ -18,15 +18,15 @@ import type { MetadataValueGetter } from '@cloudbeaver/core-utils'; import { connectionConfigContext, ConnectionFormService, - IConnectionFormProps, - IConnectionFormState, - IConnectionFormSubmitData, + type IConnectionFormProps, + type IConnectionFormState, + type IConnectionFormSubmitData, } from '@cloudbeaver/plugin-connections'; -import type { IConnectionAccessTabState } from './IConnectionAccessTabState'; +import type { IConnectionAccessTabState } from './IConnectionAccessTabState.js'; const ConnectionAccess = React.lazy(async () => { - const { ConnectionAccess } = await import('./ConnectionAccess'); + const { ConnectionAccess } = await import('./ConnectionAccess.js'); return { default: ConnectionAccess }; }); @@ -45,7 +45,7 @@ export class ConnectionAccessTabService extends Bootstrap { this.key = 'access'; } - register(): void { + override register(): void { this.connectionFormService.tabsContainer.add({ key: this.key, name: 'connections_connection_edit_access', @@ -62,8 +62,6 @@ export class ConnectionAccessTabService extends Bootstrap { this.connectionFormService.formStateTask.addHandler(executorHandlerFilter(this.isAccessTabActive.bind(this), this.formState.bind(this))); } - load(): void {} - private isAccessTabActive(state: IConnectionFormState): boolean { return ( state.projectId !== null && diff --git a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/useConnectionAccessState.ts b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/useConnectionAccessState.ts index d29a71af05..9e3202fbdc 100644 --- a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/useConnectionAccessState.ts +++ b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/useConnectionAccessState.ts @@ -13,9 +13,9 @@ import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import type { DatabaseConnectionFragment } from '@cloudbeaver/core-sdk'; import { useTabState } from '@cloudbeaver/core-ui'; -import { ILoadableState, isArraysEqual, isContainsException } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isArraysEqual, isContainsException } from '@cloudbeaver/core-utils'; -import type { IConnectionAccessTabState } from './IConnectionAccessTabState'; +import type { IConnectionAccessTabState } from './IConnectionAccessTabState.js'; interface State extends ILoadableState { state: IConnectionAccessTabState; diff --git a/webapp/packages/plugin-connections-administration/src/LocaleService.ts b/webapp/packages/plugin-connections-administration/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-connections-administration/src/LocaleService.ts +++ b/webapp/packages/plugin-connections-administration/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-connections-administration/src/index.ts b/webapp/packages/plugin-connections-administration/src/index.ts index 939e1ee7f7..70b1414394 100644 --- a/webapp/packages/plugin-connections-administration/src/index.ts +++ b/webapp/packages/plugin-connections-administration/src/index.ts @@ -1,11 +1,18 @@ -import { connectionPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { connectionPlugin } from './manifest.js'; -export * from './Administration/Connections/ConnectionsAdministration'; -export * from './Administration/Connections/CreateConnection/Manual/ConnectionManualService'; -export * from './Administration/Connections/ConnectionsAdministrationNavService'; -export * from './Administration/Connections/ConnectionsAdministrationService'; -export * from './Administration/Connections/CreateConnection/CreateConnectionBaseBootstrap'; -export * from './Administration/Connections/CreateConnectionService'; -export * from './ConnectionForm/ConnectionAccess/ConnectionAccessTabService'; +export * from './Administration/Connections/ConnectionsAdministration.js'; +export * from './Administration/Connections/CreateConnection/Manual/ConnectionManualService.js'; +export * from './Administration/Connections/ConnectionsAdministrationNavService.js'; +export * from './Administration/Connections/ConnectionsAdministrationService.js'; +export * from './Administration/Connections/CreateConnection/CreateConnectionBaseBootstrap.js'; +export * from './Administration/Connections/CreateConnectionService.js'; +export * from './ConnectionForm/ConnectionAccess/ConnectionAccessTabService.js'; export default connectionPlugin; diff --git a/webapp/packages/plugin-connections-administration/src/manifest.ts b/webapp/packages/plugin-connections-administration/src/manifest.ts index 1258c1c3d4..c0b8b2b430 100644 --- a/webapp/packages/plugin-connections-administration/src/manifest.ts +++ b/webapp/packages/plugin-connections-administration/src/manifest.ts @@ -13,12 +13,12 @@ export const connectionPlugin: PluginManifest = { }, providers: [ - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./Administration/Connections/ConnectionsAdministrationService').then(m => m.ConnectionsAdministrationService), - () => import('./Administration/Connections/ConnectionsAdministrationNavService').then(m => m.ConnectionsAdministrationNavService), - () => import('./Administration/Connections/CreateConnectionService').then(m => m.CreateConnectionService), - () => import('./Administration/Connections/CreateConnection/Manual/ConnectionManualService').then(m => m.ConnectionManualService), - () => import('./Administration/Connections/CreateConnection/CreateConnectionBaseBootstrap').then(m => m.CreateConnectionBaseBootstrap), - () => import('./ConnectionForm/ConnectionAccess/ConnectionAccessTabService').then(m => m.ConnectionAccessTabService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./Administration/Connections/ConnectionsAdministrationService.js').then(m => m.ConnectionsAdministrationService), + () => import('./Administration/Connections/ConnectionsAdministrationNavService.js').then(m => m.ConnectionsAdministrationNavService), + () => import('./Administration/Connections/CreateConnectionService.js').then(m => m.CreateConnectionService), + () => import('./Administration/Connections/CreateConnection/Manual/ConnectionManualService.js').then(m => m.ConnectionManualService), + () => import('./Administration/Connections/CreateConnection/CreateConnectionBaseBootstrap.js').then(m => m.CreateConnectionBaseBootstrap), + () => import('./ConnectionForm/ConnectionAccess/ConnectionAccessTabService.js').then(m => m.ConnectionAccessTabService), ], }; diff --git a/webapp/packages/plugin-connections/package.json b/webapp/packages/plugin-connections/package.json index 5ffdf09e13..466a68ff55 100644 --- a/webapp/packages/plugin-connections/package.json +++ b/webapp/packages/plugin-connections/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-connections", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthService.ts b/webapp/packages/plugin-connections/src/ConnectionAuthService.ts index ddcc5d2d3b..f2a7712c07 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionAuthService.ts @@ -8,19 +8,19 @@ import { AuthInfoService, AuthProviderService } from '@cloudbeaver/core-authentication'; import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { - Connection, + type Connection, ConnectionInfoResource, ConnectionsManagerService, createConnectionParam, - IConnectionInfoParams, - IRequireConnectionExecutorData, + type IConnectionInfoParams, + type IRequireConnectionExecutorData, } from '@cloudbeaver/core-connections'; import { Dependency, injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { AuthenticationService } from '@cloudbeaver/plugin-authentication'; -const DatabaseAuthDialog = importLazyComponent(() => import('./DatabaseAuthDialog/DatabaseAuthDialog').then(m => m.DatabaseAuthDialog)); +const DatabaseAuthDialog = importLazyComponent(() => import('./DatabaseAuthDialog/DatabaseAuthDialog.js').then(m => m.DatabaseAuthDialog)); @injectable() export class ConnectionAuthService extends Dependency { diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationDialog.tsx b/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationDialog.tsx index 80c4f0143e..357a296ab9 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationDialog.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationDialog.tsx @@ -24,7 +24,7 @@ import type { DialogComponent } from '@cloudbeaver/core-dialogs'; import type { ConnectionConfig } from '@cloudbeaver/core-sdk'; import style from './ConnectionAuthenticationDialog.module.css'; -import { ConnectionAuthenticationFormLoader } from './ConnectionAuthenticationFormLoader'; +import { ConnectionAuthenticationFormLoader } from './ConnectionAuthenticationFormLoader.js'; export interface ConnectionAuthenticationDialogPayload { config: ConnectionConfig; diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationDialogLoader.ts b/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationDialogLoader.ts index f44390ca48..f1f87ec502 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationDialogLoader.ts +++ b/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationDialogLoader.ts @@ -8,5 +8,5 @@ import { importLazyComponent } from '@cloudbeaver/core-blocks'; export const ConnectionAuthenticationDialogLoader = importLazyComponent(() => - import('./ConnectionAuthenticationDialog').then(module => module.ConnectionAuthenticationDialog), + import('./ConnectionAuthenticationDialog.js').then(module => module.ConnectionAuthenticationDialog), ); diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationForm.tsx b/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationForm.tsx index 75d4f18d95..395ec6644d 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationForm.tsx @@ -23,8 +23,8 @@ import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import type { ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; -import type { IConnectionAuthenticationConfig } from './IConnectionAuthenticationConfig'; -import { NetworkHandlers } from './NetworkHandlers'; +import type { IConnectionAuthenticationConfig } from './IConnectionAuthenticationConfig.js'; +import { NetworkHandlers } from './NetworkHandlers.js'; export interface ConnectionAuthenticationFormProps { config: Partial; diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationFormLoader.ts b/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationFormLoader.ts index d0fa37b6bf..bf662d5a83 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationFormLoader.ts +++ b/webapp/packages/plugin-connections/src/ConnectionAuthentication/ConnectionAuthenticationFormLoader.ts @@ -8,5 +8,5 @@ import { importLazyComponent } from '@cloudbeaver/core-blocks'; export const ConnectionAuthenticationFormLoader = importLazyComponent(() => - import('./ConnectionAuthenticationForm').then(m => m.ConnectionAuthenticationForm), + import('./ConnectionAuthenticationForm.js').then(m => m.ConnectionAuthenticationForm), ); diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx b/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx index ecadd494c3..d8cc310a91 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx @@ -12,10 +12,10 @@ import { NetworkHandlerResource, SSH_TUNNEL_ID } from '@cloudbeaver/core-connect import { useService } from '@cloudbeaver/core-di'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { NetworkHandlerAuthType, NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; +import { NetworkHandlerAuthType, type NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; -import { SSHKeyUploader } from '../ConnectionForm/SSH/SSHKeyUploader'; -import { PROPERTY_FEATURE_SECURED } from '../ConnectionForm/SSL/PROPERTY_FEATURE_SECURED'; +import { SSHKeyUploader } from '../ConnectionForm/SSH/SSHKeyUploader.js'; +import { PROPERTY_FEATURE_SECURED } from '../ConnectionForm/SSL/PROPERTY_FEATURE_SECURED.js'; interface Props { id: string; diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlers.tsx b/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlers.tsx index 1ecfa70222..499965f334 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlers.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlers.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { Group } from '@cloudbeaver/core-blocks'; import type { NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; -import { NetworkHandlerAuthForm } from './NetworkHandlerAuthForm'; +import { NetworkHandlerAuthForm } from './NetworkHandlerAuthForm.js'; interface Props { networkHandlers: string[]; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectFormActionsContext.ts b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectFormActionsContext.ts index ede908fc15..8342f8120d 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectFormActionsContext.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectFormActionsContext.ts @@ -1,9 +1,17 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ import { createContext } from 'react'; -import type { IConnectionFormState } from './IConnectionFormProps'; + +import type { IConnectionFormState } from './IConnectionFormProps.js'; export interface IConnectionFormActionsContext { save: IConnectionFormState['save']; test: IConnectionFormState['test']; } -export const ConnectionFormActionsContext = createContext(null); \ No newline at end of file +export const ConnectionFormActionsContext = createContext(null); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionForm.tsx index 6e1978a290..73c66567e3 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionForm.tsx @@ -14,11 +14,11 @@ import { ENotificationType } from '@cloudbeaver/core-events'; import type { ConnectionConfig } from '@cloudbeaver/core-sdk'; import { TabList, TabPanelList, TabsState } from '@cloudbeaver/core-ui'; -import { ConnectionFormActionsContext, IConnectionFormActionsContext } from './ConnectFormActionsContext'; +import { ConnectionFormActionsContext, type IConnectionFormActionsContext } from './ConnectFormActionsContext.js'; import style from './ConnectionForm.module.css'; -import { ConnectionFormService } from './ConnectionFormService'; -import { connectionConfigContext } from './Contexts/connectionConfigContext'; -import type { IConnectionFormState } from './IConnectionFormProps'; +import { ConnectionFormService } from './ConnectionFormService.js'; +import { connectionConfigContext } from './Contexts/connectionConfigContext.js'; +import type { IConnectionFormState } from './IConnectionFormProps.js'; export interface ConnectionFormProps { state: IConnectionFormState; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormBaseActions.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormBaseActions.tsx index 0a98724dc5..4ce7d22946 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormBaseActions.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormBaseActions.tsx @@ -9,13 +9,13 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; import { AUTH_PROVIDER_LOCAL_ID } from '@cloudbeaver/core-authentication'; -import { Button, getComputed, PlaceholderComponent, useResource, useTranslate } from '@cloudbeaver/core-blocks'; +import { Button, getComputed, type PlaceholderComponent, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { DatabaseAuthModelsResource, DBDriverResource } from '@cloudbeaver/core-connections'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import { useAuthenticationAction } from '@cloudbeaver/core-ui'; -import { ConnectionFormActionsContext } from './ConnectFormActionsContext'; -import type { IConnectionFormProps } from './IConnectionFormProps'; +import { ConnectionFormActionsContext } from './ConnectFormActionsContext.js'; +import type { IConnectionFormProps } from './IConnectionFormProps.js'; export const ConnectionFormBaseActions: PlaceholderComponent = observer(function ConnectionFormBaseActions({ state, @@ -52,11 +52,11 @@ export const ConnectionFormBaseActions: PlaceholderComponent )} {!disableTest && ( - )} - diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormBaseActionsLoader.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormBaseActionsLoader.tsx index 2de202ba87..4a98ed9c58 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormBaseActionsLoader.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormBaseActionsLoader.tsx @@ -8,6 +8,6 @@ import React from 'react'; export const ConnectionFormBaseActionsLoader = React.lazy(async () => { - const { ConnectionFormBaseActions } = await import('./ConnectionFormBaseActions'); + const { ConnectionFormBaseActions } = await import('./ConnectionFormBaseActions.js'); return { default: ConnectionFormBaseActions }; }); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormLoader.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormLoader.tsx index 3c6af442fc..6f7380bb64 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormLoader.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormLoader.tsx @@ -8,6 +8,6 @@ import React from 'react'; export const ConnectionFormLoader = React.lazy(async () => { - const { ConnectionForm } = await import('./ConnectionForm'); + const { ConnectionForm } = await import('./ConnectionForm.js'); return { default: ConnectionForm }; }); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormService.ts b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormService.ts index 7ecc26c6eb..bc66406537 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormService.ts @@ -11,15 +11,15 @@ import { PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { ENotificationType, NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorHandlersCollection, ExecutorInterrupter, IExecutorHandler, IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; +import { ExecutorHandlersCollection, ExecutorInterrupter, type IExecutorHandler, type IExecutorHandlersCollection } from '@cloudbeaver/core-executor'; import { LocalizationService } from '@cloudbeaver/core-localization'; import { TabsContainer } from '@cloudbeaver/core-ui'; -import { ConnectionAuthenticationDialogLoader } from '../ConnectionAuthentication/ConnectionAuthenticationDialogLoader'; -import { ConnectionFormBaseActionsLoader } from './ConnectionFormBaseActionsLoader'; -import { connectionConfigContext } from './Contexts/connectionConfigContext'; -import { connectionCredentialsStateContext } from './Contexts/connectionCredentialsStateContext'; -import type { IConnectionFormFillConfigData, IConnectionFormProps, IConnectionFormState, IConnectionFormSubmitData } from './IConnectionFormProps'; +import { ConnectionAuthenticationDialogLoader } from '../ConnectionAuthentication/ConnectionAuthenticationDialogLoader.js'; +import { ConnectionFormBaseActionsLoader } from './ConnectionFormBaseActionsLoader.js'; +import { connectionConfigContext } from './Contexts/connectionConfigContext.js'; +import { connectionCredentialsStateContext } from './Contexts/connectionCredentialsStateContext.js'; +import type { IConnectionFormFillConfigData, IConnectionFormProps, IConnectionFormState, IConnectionFormSubmitData } from './IConnectionFormProps.js'; export interface IConnectionFormValidation { valid: boolean; @@ -112,7 +112,7 @@ export class ConnectionFormService { } else { this.notificationService.notify( { - title: status.messages[0], + title: status.messages[0]!, message: status.messages.slice(1).join('\n'), }, status.saved ? ENotificationType.Success : ENotificationType.Error, diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormState.ts b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormState.ts index 8a846d4338..9a84fb51b8 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormState.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionFormState.ts @@ -7,17 +7,17 @@ */ import { action, computed, makeObservable, observable } from 'mobx'; -import { ConnectionInfoResource, createConnectionParam, DatabaseConnection, IConnectionInfoParams } from '@cloudbeaver/core-connections'; -import { Executor, IExecutionContextProvider, IExecutor } from '@cloudbeaver/core-executor'; +import { ConnectionInfoResource, createConnectionParam, type DatabaseConnection, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; +import { Executor, type IExecutionContextProvider, type IExecutor } from '@cloudbeaver/core-executor'; import type { ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; import type { ResourceKeySimple } from '@cloudbeaver/core-resource'; import type { ConnectionConfig } from '@cloudbeaver/core-sdk'; import { formStateContext, type IFormStateInfo } from '@cloudbeaver/core-ui'; import { MetadataMap, uuid } from '@cloudbeaver/core-utils'; -import { connectionFormConfigureContext } from './connectionFormConfigureContext'; -import type { ConnectionFormService } from './ConnectionFormService'; -import type { ConnectionFormMode, ConnectionFormType, IConnectionFormState, IConnectionFormSubmitData } from './IConnectionFormProps'; +import { connectionFormConfigureContext } from './connectionFormConfigureContext.js'; +import type { ConnectionFormService } from './ConnectionFormService.js'; +import type { ConnectionFormMode, ConnectionFormType, IConnectionFormState, IConnectionFormSubmitData } from './IConnectionFormProps.js'; export class ConnectionFormState implements IConnectionFormState { mode: ConnectionFormMode; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/ConnectionDriverPropertiesTabService.ts b/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/ConnectionDriverPropertiesTabService.ts index 0b66ab25e3..6a275f786e 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/ConnectionDriverPropertiesTabService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/ConnectionDriverPropertiesTabService.ts @@ -13,15 +13,18 @@ import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { isObjectPropertyInfoStateEqual } from '@cloudbeaver/core-sdk'; import { formStateContext } from '@cloudbeaver/core-ui'; -import { connectionFormConfigureContext } from '../connectionFormConfigureContext'; -import { ConnectionFormService } from '../ConnectionFormService'; -import { connectionConfigContext } from '../Contexts/connectionConfigContext'; -import type { IConnectionFormFillConfigData, IConnectionFormState, IConnectionFormSubmitData } from '../IConnectionFormProps'; -import { DriverPropertiesLoader } from './DriverPropertiesLoader'; +import { connectionFormConfigureContext } from '../connectionFormConfigureContext.js'; +import { ConnectionFormService } from '../ConnectionFormService.js'; +import { connectionConfigContext } from '../Contexts/connectionConfigContext.js'; +import type { IConnectionFormFillConfigData, IConnectionFormState, IConnectionFormSubmitData } from '../IConnectionFormProps.js'; +import { DriverPropertiesLoader } from './DriverPropertiesLoader.js'; @injectable() export class ConnectionDriverPropertiesTabService extends Bootstrap { - constructor(private readonly connectionFormService: ConnectionFormService, private readonly dbDriverResource: DBDriverResource) { + constructor( + private readonly connectionFormService: ConnectionFormService, + private readonly dbDriverResource: DBDriverResource, + ) { super(); makeObservable(this, { @@ -29,7 +32,7 @@ export class ConnectionDriverPropertiesTabService extends Bootstrap { }); } - register(): void { + override register(): void { this.connectionFormService.tabsContainer.add({ key: 'driver_properties', name: 'customConnection_properties', @@ -53,8 +56,6 @@ export class ConnectionDriverPropertiesTabService extends Bootstrap { this.connectionFormService.configureTask.addHandler(this.configure.bind(this)); } - load(): void {} - private configure(data: IConnectionFormState, contexts: IExecutionContextProvider) { const configuration = contexts.getContext(connectionFormConfigureContext); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/DriverProperties.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/DriverProperties.tsx index 7a36004650..957e7e2479 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/DriverProperties.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/DriverProperties.tsx @@ -9,12 +9,12 @@ import { computed, observable, runInAction } from 'mobx'; import { observer } from 'mobx-react-lite'; import { useMemo, useState } from 'react'; -import { ColoredContainer, Group, IProperty, PropertiesTable, s, useResource, useS } from '@cloudbeaver/core-blocks'; +import { ColoredContainer, Group, type IProperty, PropertiesTable, s, useResource, useS } from '@cloudbeaver/core-blocks'; import { DBDriverResource } from '@cloudbeaver/core-connections'; -import { TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; +import { type TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui'; import { uuid } from '@cloudbeaver/core-utils'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; import styles from './DriverProperties.module.css'; export const DriverProperties: TabContainerPanelComponent = observer(function DriverProperties({ tabId, state: formState }) { diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/DriverPropertiesLoader.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/DriverPropertiesLoader.tsx index 4dc568ff3f..396a77c632 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/DriverPropertiesLoader.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/DriverProperties/DriverPropertiesLoader.tsx @@ -8,6 +8,6 @@ import React from 'react'; export const DriverPropertiesLoader = React.lazy(async () => { - const { DriverProperties } = await import('./DriverProperties'); + const { DriverProperties } = await import('./DriverProperties.js'); return { default: DriverProperties }; }); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ConnectionOptionsTabService.ts b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ConnectionOptionsTabService.ts index 74506198f6..7084fc2ced 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ConnectionOptionsTabService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ConnectionOptionsTabService.ts @@ -13,28 +13,28 @@ import { ConnectionInfoProjectKey, createConnectionParam, DatabaseAuthModelsResource, - DatabaseConnection, + type DatabaseConnection, DBDriverResource, isJDBCConnection, } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { LocalizationService } from '@cloudbeaver/core-localization'; -import { isSharedProject, ProjectInfoResource } from '@cloudbeaver/core-projects'; -import { DriverConfigurationType, isObjectPropertyInfoStateEqual, ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; +import { ProjectInfoResource } from '@cloudbeaver/core-projects'; +import { DriverConfigurationType, isObjectPropertyInfoStateEqual, type ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; import { formStateContext } from '@cloudbeaver/core-ui'; import { getUniqueName, isNotNullDefined, isValuesEqual } from '@cloudbeaver/core-utils'; -import { connectionFormConfigureContext } from '../connectionFormConfigureContext'; -import { ConnectionFormService } from '../ConnectionFormService'; -import { connectionConfigContext } from '../Contexts/connectionConfigContext'; -import { connectionCredentialsStateContext } from '../Contexts/connectionCredentialsStateContext'; -import type { IConnectionFormFillConfigData, IConnectionFormState, IConnectionFormSubmitData } from '../IConnectionFormProps'; -import { getConnectionName } from './getConnectionName'; -import { getDefaultConfigurationType } from './getDefaultConfigurationType'; +import { connectionFormConfigureContext } from '../connectionFormConfigureContext.js'; +import { ConnectionFormService } from '../ConnectionFormService.js'; +import { connectionConfigContext } from '../Contexts/connectionConfigContext.js'; +import { connectionCredentialsStateContext } from '../Contexts/connectionCredentialsStateContext.js'; +import type { IConnectionFormFillConfigData, IConnectionFormState, IConnectionFormSubmitData } from '../IConnectionFormProps.js'; +import { getConnectionName } from './getConnectionName.js'; +import { getDefaultConfigurationType } from './getDefaultConfigurationType.js'; export const Options = React.lazy(async () => { - const { Options } = await import('./Options'); + const { Options } = await import('./Options.js'); return { default: Options }; }); @@ -61,7 +61,7 @@ export class ConnectionOptionsTabService extends Bootstrap { }); } - register(): void { + override register(): void { this.connectionFormService.tabsContainer.add({ key: 'options', name: 'customConnection_main', @@ -82,8 +82,6 @@ export class ConnectionOptionsTabService extends Bootstrap { this.connectionFormService.fillConfigTask.addHandler(this.fillConfig.bind(this)); } - load(): void {} - private async save({ state, submitType }: IConnectionFormSubmitData, contexts: IExecutionContextProvider) { const status = contexts.getContext(this.connectionFormService.connectionStatusContext); const config = contexts.getContext(connectionConfigContext); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx index 39ada137a4..2f980957bc 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx @@ -32,7 +32,7 @@ import { useS, useTranslate, } from '@cloudbeaver/core-blocks'; -import { DatabaseAuthModelsResource, DBDriver, DBDriverResource, isLocalConnection } from '@cloudbeaver/core-connections'; +import { DatabaseAuthModelsResource, type DBDriver, DBDriverResource, isLocalConnection } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { ServerConfigResource } from '@cloudbeaver/core-root'; @@ -41,16 +41,16 @@ import { type TabContainerPanelComponent, TabsContext, useAuthenticationAction } import { EMPTY_ARRAY } from '@cloudbeaver/core-utils'; import { ProjectSelect } from '@cloudbeaver/plugin-projects'; -import { ConnectionAuthModelCredentialsForm } from '../ConnectionAuthModelCredentials/ConnectionAuthModelCredentialsForm'; -import { ConnectionAuthModelSelector } from '../ConnectionAuthModelCredentials/ConnectionAuthModelSelector'; -import { ConnectionFormService } from '../ConnectionFormService'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; -import { CONNECTION_FORM_SHARED_CREDENTIALS_TAB_ID } from '../SharedCredentials/CONNECTION_FORM_SHARED_CREDENTIALS_TAB_ID'; -import { AdvancedPropertiesForm } from './AdvancedPropertiesForm'; +import { ConnectionAuthModelCredentialsForm } from '../ConnectionAuthModelCredentials/ConnectionAuthModelCredentialsForm.js'; +import { ConnectionAuthModelSelector } from '../ConnectionAuthModelCredentials/ConnectionAuthModelSelector.js'; +import { ConnectionFormService } from '../ConnectionFormService.js'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; +import { CONNECTION_FORM_SHARED_CREDENTIALS_TAB_ID } from '../SharedCredentials/CONNECTION_FORM_SHARED_CREDENTIALS_TAB_ID.js'; +import { AdvancedPropertiesForm } from './AdvancedPropertiesForm.js'; import styles from './Options.module.css'; -import { ParametersForm } from './ParametersForm'; -import { ProviderPropertiesForm } from './ProviderPropertiesForm'; -import { useOptions } from './useOptions'; +import { ParametersForm } from './ParametersForm.js'; +import { ProviderPropertiesForm } from './ProviderPropertiesForm.js'; +import { useOptions } from './useOptions.js'; const PROFILE_AUTH_MODEL_ID = 'profile'; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/useOptions.ts b/webapp/packages/plugin-connections/src/ConnectionForm/Options/useOptions.ts index 473de8dce7..71838be53e 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/useOptions.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/useOptions.ts @@ -8,13 +8,13 @@ import { runInAction } from 'mobx'; import { useObjectRef } from '@cloudbeaver/core-blocks'; -import { DBDriver, DBDriverResource, isJDBCConnection } from '@cloudbeaver/core-connections'; +import { type DBDriver, DBDriverResource, isJDBCConnection } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import type { DatabaseAuthModel } from '@cloudbeaver/core-sdk'; -import type { IConnectionFormState } from '../IConnectionFormProps'; -import { getConnectionName } from './getConnectionName'; -import { getDefaultConfigurationType } from './getDefaultConfigurationType'; +import type { IConnectionFormState } from '../IConnectionFormProps.js'; +import { getConnectionName } from './getConnectionName.js'; +import { getDefaultConfigurationType } from './getDefaultConfigurationType.js'; export function useOptions(state: IConnectionFormState) { const dbDriverResource = useService(DBDriverResource); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionFormAuthenticationAction.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionFormAuthenticationAction.tsx index 15f83c73eb..381486275b 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionFormAuthenticationAction.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionFormAuthenticationAction.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import { AUTH_PROVIDER_LOCAL_ID } from '@cloudbeaver/core-authentication'; -import { Button, getComputed, PlaceholderComponent, useResource, useTranslate } from '@cloudbeaver/core-blocks'; +import { Button, getComputed, type PlaceholderComponent, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { DatabaseAuthModelsResource, DBDriverResource } from '@cloudbeaver/core-connections'; import { useAuthenticationAction } from '@cloudbeaver/core-ui'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; export const AuthenticationButton: PlaceholderComponent = observer(function ConnectionFormAuthenticationAction({ state }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.ts b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.ts index 183d2a0661..e84f81ffc6 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.ts @@ -11,20 +11,20 @@ import { isLocalConnection } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import { connectionFormConfigureContext } from '../connectionFormConfigureContext'; -import { ConnectionFormService } from '../ConnectionFormService'; -import type { IConnectionFormState } from '../IConnectionFormProps'; +import { connectionFormConfigureContext } from '../connectionFormConfigureContext.js'; +import { ConnectionFormService } from '../ConnectionFormService.js'; +import type { IConnectionFormState } from '../IConnectionFormProps.js'; export const ConnectionFormAuthenticationAction = React.lazy(async () => { - const { ConnectionFormAuthenticationAction } = await import('./ConnectionFormAuthenticationAction'); + const { ConnectionFormAuthenticationAction } = await import('./ConnectionFormAuthenticationAction.js'); return { default: ConnectionFormAuthenticationAction }; }); export const OriginInfo = React.lazy(async () => { - const { OriginInfo } = await import('./OriginInfo'); + const { OriginInfo } = await import('./OriginInfo.js'); return { default: OriginInfo }; }); export const OriginInfoTab = React.lazy(async () => { - const { OriginInfoTab } = await import('./OriginInfoTab'); + const { OriginInfoTab } = await import('./OriginInfoTab.js'); return { default: OriginInfoTab }; }); @@ -34,7 +34,7 @@ export class ConnectionOriginInfoTabService extends Bootstrap { super(); } - register(): void { + override register(): void { this.connectionFormService.tabsContainer.add({ key: 'origin', order: 3, @@ -49,8 +49,6 @@ export class ConnectionOriginInfoTabService extends Bootstrap { this.connectionFormService.actionsContainer.add(ConnectionFormAuthenticationAction, 0); } - load(): void {} - private configure(data: IConnectionFormState, contexts: IExecutionContextProvider) { const configuration = contexts.getContext(connectionFormConfigureContext); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/OriginInfo.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/OriginInfo.tsx index 36fb966197..d2b50cf785 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/OriginInfo.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/OriginInfo.tsx @@ -22,9 +22,9 @@ import { useTranslate, } from '@cloudbeaver/core-blocks'; import { createConnectionParam, DatabaseAuthModelsResource, DBDriverResource } from '@cloudbeaver/core-connections'; -import { TabContainerPanelComponent, useTab, useTabState } from '@cloudbeaver/core-ui'; +import { type TabContainerPanelComponent, useTab, useTabState } from '@cloudbeaver/core-ui'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; import styles from './OriginInfo.module.css'; export const OriginInfo: TabContainerPanelComponent = observer(function OriginInfo({ diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/OriginInfoTab.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/OriginInfoTab.tsx index 8f918f04eb..32f08be4e5 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/OriginInfoTab.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/OriginInfoTab.tsx @@ -8,9 +8,9 @@ import { observer } from 'mobx-react-lite'; import { Translate } from '@cloudbeaver/core-blocks'; -import { Tab, TabContainerTabComponent, TabTitle } from '@cloudbeaver/core-ui'; +import { Tab, type TabContainerTabComponent, TabTitle } from '@cloudbeaver/core-ui'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; export const OriginInfoTab: TabContainerTabComponent = observer(function OriginInfoTab({ state: { info }, ...rest }) { return ( diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts index 6a0c8dbef4..a1ac615e61 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts @@ -11,27 +11,30 @@ import React from 'react'; import { DBDriverResource, SSH_TUNNEL_ID } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import { DriverConfigurationType, NetworkHandlerAuthType, NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; +import { DriverConfigurationType, NetworkHandlerAuthType, type NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; import { formStateContext } from '@cloudbeaver/core-ui'; -import { connectionFormConfigureContext } from '../connectionFormConfigureContext'; -import { ConnectionFormService } from '../ConnectionFormService'; -import { connectionConfigContext } from '../Contexts/connectionConfigContext'; -import { connectionCredentialsStateContext } from '../Contexts/connectionCredentialsStateContext'; -import type { IConnectionFormFillConfigData, IConnectionFormState, IConnectionFormSubmitData } from '../IConnectionFormProps'; +import { connectionFormConfigureContext } from '../connectionFormConfigureContext.js'; +import { ConnectionFormService } from '../ConnectionFormService.js'; +import { connectionConfigContext } from '../Contexts/connectionConfigContext.js'; +import { connectionCredentialsStateContext } from '../Contexts/connectionCredentialsStateContext.js'; +import type { IConnectionFormFillConfigData, IConnectionFormState, IConnectionFormSubmitData } from '../IConnectionFormProps.js'; export const SSHTab = React.lazy(async () => { - const { SSHTab } = await import('./SSHTab'); + const { SSHTab } = await import('./SSHTab.js'); return { default: SSHTab }; }); export const SSHPanel = React.lazy(async () => { - const { SSHPanel } = await import('./SSHPanel'); + const { SSHPanel } = await import('./SSHPanel.js'); return { default: SSHPanel }; }); @injectable() export class ConnectionSSHTabService extends Bootstrap { - constructor(private readonly connectionFormService: ConnectionFormService, private readonly dbDriverResource: DBDriverResource) { + constructor( + private readonly connectionFormService: ConnectionFormService, + private readonly dbDriverResource: DBDriverResource, + ) { super(); makeObservable(this, { @@ -40,7 +43,7 @@ export class ConnectionSSHTabService extends Bootstrap { }); } - register(): void { + override register(): void { this.connectionFormService.tabsContainer.add({ key: 'ssh', name: 'customConnection_main', @@ -70,8 +73,6 @@ export class ConnectionSSHTabService extends Bootstrap { this.connectionFormService.fillConfigTask.addHandler(this.fillConfig.bind(this)); } - load(): void {} - private fillConfig({ state, updated }: IConnectionFormFillConfigData, contexts: IExecutionContextProvider) { if (!updated) { return; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx index 6c6c22a30f..c52f54f34c 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx @@ -30,14 +30,14 @@ import { NetworkHandlerResource, SSH_TUNNEL_ID } from '@cloudbeaver/core-connect import { useService } from '@cloudbeaver/core-di'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { NetworkHandlerAuthType, NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; +import { NetworkHandlerAuthType, type NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui'; import { isSafari } from '@cloudbeaver/core-utils'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; -import { authTypes } from './authTypes'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; +import { authTypes } from './authTypes.js'; import styles from './SSH.module.css'; -import { SSHKeyUploader } from './SSHKeyUploader'; +import { SSHKeyUploader } from './SSHKeyUploader.js'; interface Props extends IConnectionFormProps { handlerState: NetworkHandlerConfigInput; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHPanel.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHPanel.tsx index a29ffb1dad..e7937036ce 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHPanel.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHPanel.tsx @@ -10,8 +10,8 @@ import { observer } from 'mobx-react-lite'; import { SSH_TUNNEL_ID } from '@cloudbeaver/core-connections'; import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; -import { SSH } from './SSH'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; +import { SSH } from './SSH.js'; export const SSHPanel: TabContainerPanelComponent = observer(function SSHPanel(props) { const state = props.state.config.networkHandlersConfig?.find(state => state.id === SSH_TUNNEL_ID); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHTab.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHTab.tsx index 363c8f38e4..92c7b13aa0 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHTab.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHTab.tsx @@ -9,9 +9,9 @@ import { observer } from 'mobx-react-lite'; import { Translate, useResource } from '@cloudbeaver/core-blocks'; import { NetworkHandlerResource, SSH_TUNNEL_ID } from '@cloudbeaver/core-connections'; -import { Tab, TabContainerTabComponent, TabTitle } from '@cloudbeaver/core-ui'; +import { Tab, type TabContainerTabComponent, TabTitle } from '@cloudbeaver/core-ui'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; export const SSHTab: TabContainerTabComponent = observer(function SSHTab(props) { const handler = useResource(SSHTab, NetworkHandlerResource, SSH_TUNNEL_ID); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/ConnectionSSLTabService.ts b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/ConnectionSSLTabService.ts index 34c58c1551..b62f948fd7 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/ConnectionSSLTabService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/ConnectionSSLTabService.ts @@ -16,22 +16,22 @@ import type { NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; import { formStateContext } from '@cloudbeaver/core-ui'; import { isNotNullDefined, isObjectsEqual } from '@cloudbeaver/core-utils'; -import { connectionFormConfigureContext } from '../connectionFormConfigureContext'; -import { ConnectionFormService } from '../ConnectionFormService'; -import { connectionConfigContext } from '../Contexts/connectionConfigContext'; -import { connectionCredentialsStateContext } from '../Contexts/connectionCredentialsStateContext'; -import type { IConnectionFormFillConfigData, IConnectionFormState, IConnectionFormSubmitData } from '../IConnectionFormProps'; -import { getSSLDefaultConfig } from './getSSLDefaultConfig'; -import { getSSLDriverHandler } from './getSSLDriverHandler'; -import { PROPERTY_FEATURE_SECURED } from './PROPERTY_FEATURE_SECURED'; -import { SSL_CODE_NAME } from './SSL_CODE_NAME'; +import { connectionFormConfigureContext } from '../connectionFormConfigureContext.js'; +import { ConnectionFormService } from '../ConnectionFormService.js'; +import { connectionConfigContext } from '../Contexts/connectionConfigContext.js'; +import { connectionCredentialsStateContext } from '../Contexts/connectionCredentialsStateContext.js'; +import type { IConnectionFormFillConfigData, IConnectionFormState, IConnectionFormSubmitData } from '../IConnectionFormProps.js'; +import { getSSLDefaultConfig } from './getSSLDefaultConfig.js'; +import { getSSLDriverHandler } from './getSSLDriverHandler.js'; +import { PROPERTY_FEATURE_SECURED } from './PROPERTY_FEATURE_SECURED.js'; +import { SSL_CODE_NAME } from './SSL_CODE_NAME.js'; export const SSLTab = React.lazy(async () => { - const { SSLTab } = await import('./SSLTab'); + const { SSLTab } = await import('./SSLTab.js'); return { default: SSLTab }; }); export const SSLPanel = React.lazy(async () => { - const { SSLPanel } = await import('./SSLPanel'); + const { SSLPanel } = await import('./SSLPanel.js'); return { default: SSLPanel }; }); @@ -50,7 +50,7 @@ export class ConnectionSSLTabService extends Bootstrap { }); } - register(): void { + override register(): void { this.connectionFormService.tabsContainer.add({ key: 'ssl', order: 4, @@ -76,8 +76,6 @@ export class ConnectionSSLTabService extends Bootstrap { this.connectionFormService.fillConfigTask.addHandler(this.fillConfig.bind(this)); } - load(): void {} - private async fillConfig({ state, updated }: IConnectionFormFillConfigData, contexts: IExecutionContextProvider) { if (!updated || !state.config.driverId) { return; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSL.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSL.tsx index 9ad83b7c5a..be86d56881 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSL.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSL.tsx @@ -30,8 +30,8 @@ import type { NetworkHandlerConfigInput, NetworkHandlerDescriptor } from '@cloud import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui'; import { isSafari } from '@cloudbeaver/core-utils'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; -import { SAVED_VALUE_INDICATOR } from './SAVED_VALUE_INDICATOR'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; +import { SAVED_VALUE_INDICATOR } from './SAVED_VALUE_INDICATOR.js'; import styles from './SSL.module.css'; interface Props extends IConnectionFormProps { diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSLPanel.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSLPanel.tsx index e26562769d..3092595fd3 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSLPanel.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSLPanel.tsx @@ -12,10 +12,10 @@ import { DBDriverResource, NetworkHandlerResource } from '@cloudbeaver/core-conn import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import type { TabContainerTabComponent } from '@cloudbeaver/core-ui'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; -import { getSSLDefaultConfig } from './getSSLDefaultConfig'; -import { getSSLDriverHandler } from './getSSLDriverHandler'; -import { SSL } from './SSL'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; +import { getSSLDefaultConfig } from './getSSLDefaultConfig.js'; +import { getSSLDriverHandler } from './getSSLDriverHandler.js'; +import { SSL } from './SSL.js'; export const SSLPanel: TabContainerTabComponent = observer(function SSLPanel(props) { const networkHandlerResource = useResource(SSLPanel, NetworkHandlerResource, CachedMapAllKey); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSLTab.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSLTab.tsx index fa805f35a6..bcde1ab239 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSLTab.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/SSLTab.tsx @@ -10,10 +10,10 @@ import { observer } from 'mobx-react-lite'; import { Translate, useResource } from '@cloudbeaver/core-blocks'; import { DBDriverResource, NetworkHandlerResource } from '@cloudbeaver/core-connections'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { Tab, TabContainerTabComponent, TabTitle } from '@cloudbeaver/core-ui'; +import { Tab, type TabContainerTabComponent, TabTitle } from '@cloudbeaver/core-ui'; -import type { IConnectionFormProps } from '../IConnectionFormProps'; -import { getSSLDriverHandler } from './getSSLDriverHandler'; +import type { IConnectionFormProps } from '../IConnectionFormProps.js'; +import { getSSLDriverHandler } from './getSSLDriverHandler.js'; export const SSLTab: TabContainerTabComponent = observer(function SSLTab(props) { const networkHandlerResource = useResource(SSLTab, NetworkHandlerResource, CachedMapAllKey); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/getSSLDriverHandler.ts b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/getSSLDriverHandler.ts index c0effc1b1b..0b78f3b1c8 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSL/getSSLDriverHandler.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSL/getSSLDriverHandler.ts @@ -7,7 +7,7 @@ */ import type { NetworkHandlerDescriptor } from '@cloudbeaver/core-sdk'; -import { SSL_CODE_NAME } from './SSL_CODE_NAME'; +import { SSL_CODE_NAME } from './SSL_CODE_NAME.js'; export function getSSLDriverHandler(descriptors: NetworkHandlerDescriptor[], applicableHandlers: string[]) { const result = descriptors.find(descriptor => applicableHandlers.includes(descriptor.id) && descriptor.codeName === SSL_CODE_NAME); diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/connectionFormConfigureContext.ts b/webapp/packages/plugin-connections/src/ConnectionForm/connectionFormConfigureContext.ts index 12b9e8cb4c..d59940ffe3 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/connectionFormConfigureContext.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/connectionFormConfigureContext.ts @@ -10,7 +10,7 @@ import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; import type { CachedResourceIncludeArgs } from '@cloudbeaver/core-resource'; import type { GetUserConnectionsQueryVariables } from '@cloudbeaver/core-sdk'; -import type { IConnectionFormState } from './IConnectionFormProps'; +import type { IConnectionFormState } from './IConnectionFormProps.js'; export type ConnectionFormInfoIncludes = CachedResourceIncludeArgs; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/useConnectionFormState.ts b/webapp/packages/plugin-connections/src/ConnectionForm/useConnectionFormState.ts index 993c5c13e7..1acac4c2df 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/useConnectionFormState.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/useConnectionFormState.ts @@ -11,9 +11,9 @@ import type { ConnectionInfoResource } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; -import { ConnectionFormService } from './ConnectionFormService'; -import { ConnectionFormState } from './ConnectionFormState'; -import type { IConnectionFormState } from './IConnectionFormProps'; +import { ConnectionFormService } from './ConnectionFormService.js'; +import { ConnectionFormState } from './ConnectionFormState.js'; +import type { IConnectionFormState } from './IConnectionFormProps.js'; export function useConnectionFormState(resource: ConnectionInfoResource, configure?: (state: IConnectionFormState) => any): IConnectionFormState { const projectsService = useService(ProjectsService); diff --git a/webapp/packages/plugin-connections/src/ConnectionShieldLazy.ts b/webapp/packages/plugin-connections/src/ConnectionShieldLazy.ts index 7ee2d65b0d..195e5b6176 100644 --- a/webapp/packages/plugin-connections/src/ConnectionShieldLazy.ts +++ b/webapp/packages/plugin-connections/src/ConnectionShieldLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const ConnectionShieldLazy = importLazyComponent(() => import('./ConnectionShield').then(m => m.ConnectionShield)); +export const ConnectionShieldLazy = importLazyComponent(() => import('./ConnectionShield.js').then(m => m.ConnectionShield)); diff --git a/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts b/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts index fa07fe2712..27b802b921 100644 --- a/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts +++ b/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { - Connection, + type Connection, ConnectionInfoResource, ConnectionsManagerService, ConnectionsSettingsService, @@ -21,24 +21,24 @@ import { CONNECTION_NAVIGATOR_VIEW_SETTINGS, EAdminPermission, isNavigatorViewSettingsEqual, - NavigatorViewSettings, + type NavigatorViewSettings, PermissionsService, ServerConfigResource, } from '@cloudbeaver/core-root'; import { ACTION_DELETE, ActionService, MenuSeparatorItem, MenuService } from '@cloudbeaver/core-view'; import { MENU_APP_ACTIONS } from '@cloudbeaver/plugin-top-app-bar'; -import { PluginConnectionsSettingsService } from '../PluginConnectionsSettingsService'; -import { PublicConnectionFormService } from '../PublicConnectionForm/PublicConnectionFormService'; -import { ACTION_CONNECTION_CHANGE_CREDENTIALS } from './Actions/ACTION_CONNECTION_CHANGE_CREDENTIALS'; -import { ACTION_CONNECTION_DISCONNECT } from './Actions/ACTION_CONNECTION_DISCONNECT'; -import { ACTION_CONNECTION_DISCONNECT_ALL } from './Actions/ACTION_CONNECTION_DISCONNECT_ALL'; -import { ACTION_CONNECTION_EDIT } from './Actions/ACTION_CONNECTION_EDIT'; -import { ACTION_CONNECTION_VIEW_ADVANCED } from './Actions/ACTION_CONNECTION_VIEW_ADVANCED'; -import { ACTION_CONNECTION_VIEW_SIMPLE } from './Actions/ACTION_CONNECTION_VIEW_SIMPLE'; -import { ACTION_CONNECTION_VIEW_SYSTEM_OBJECTS } from './Actions/ACTION_CONNECTION_VIEW_SYSTEM_OBJECTS'; -import { MENU_CONNECTION_VIEW } from './MENU_CONNECTION_VIEW'; -import { MENU_CONNECTIONS } from './MENU_CONNECTIONS'; +import { PluginConnectionsSettingsService } from '../PluginConnectionsSettingsService.js'; +import { PublicConnectionFormService } from '../PublicConnectionForm/PublicConnectionFormService.js'; +import { ACTION_CONNECTION_CHANGE_CREDENTIALS } from './Actions/ACTION_CONNECTION_CHANGE_CREDENTIALS.js'; +import { ACTION_CONNECTION_DISCONNECT } from './Actions/ACTION_CONNECTION_DISCONNECT.js'; +import { ACTION_CONNECTION_DISCONNECT_ALL } from './Actions/ACTION_CONNECTION_DISCONNECT_ALL.js'; +import { ACTION_CONNECTION_EDIT } from './Actions/ACTION_CONNECTION_EDIT.js'; +import { ACTION_CONNECTION_VIEW_ADVANCED } from './Actions/ACTION_CONNECTION_VIEW_ADVANCED.js'; +import { ACTION_CONNECTION_VIEW_SIMPLE } from './Actions/ACTION_CONNECTION_VIEW_SIMPLE.js'; +import { ACTION_CONNECTION_VIEW_SYSTEM_OBJECTS } from './Actions/ACTION_CONNECTION_VIEW_SYSTEM_OBJECTS.js'; +import { MENU_CONNECTION_VIEW } from './MENU_CONNECTION_VIEW.js'; +import { MENU_CONNECTIONS } from './MENU_CONNECTIONS.js'; @injectable() export class ConnectionMenuBootstrap extends Bootstrap { @@ -58,7 +58,7 @@ export class ConnectionMenuBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.addConnectionsMenuToTopAppBar(); this.menuService.addCreator({ diff --git a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseAuthDialog.tsx b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseAuthDialog.tsx index 77fd5652f3..0e5ed972dd 100644 --- a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseAuthDialog.tsx +++ b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseAuthDialog.tsx @@ -11,8 +11,8 @@ import { CommonDialogHeader, CommonDialogWrapper, useResource, useTranslate } fr import { ConnectionInfoResource, ConnectionPublicSecretsResource, DBDriverResource, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; import type { DialogComponent } from '@cloudbeaver/core-dialogs'; -import { DatabaseCredentialsAuthDialog } from './DatabaseCredentialsAuthDialog/DatabaseCredentialsAuthDialog'; -import { DatabaseSecretAuthDialog } from './DatabaseSecretAuthDialog/DatabaseSecretAuthDialog'; +import { DatabaseCredentialsAuthDialog } from './DatabaseCredentialsAuthDialog/DatabaseCredentialsAuthDialog.js'; +import { DatabaseSecretAuthDialog } from './DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.js'; interface Payload { connection: IConnectionInfoParams; diff --git a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/DatabaseCredentialsAuthDialog.tsx b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/DatabaseCredentialsAuthDialog.tsx index b7775339b8..d61a03bc36 100644 --- a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/DatabaseCredentialsAuthDialog.tsx +++ b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/DatabaseCredentialsAuthDialog.tsx @@ -23,10 +23,10 @@ import { } from '@cloudbeaver/core-blocks'; import type { IConnectionInfoParams } from '@cloudbeaver/core-connections'; -import { ConnectionAuthenticationFormLoader } from '../../ConnectionAuthentication/ConnectionAuthenticationFormLoader'; +import { ConnectionAuthenticationFormLoader } from '../../ConnectionAuthentication/ConnectionAuthenticationFormLoader.js'; import style from './DatabaseCredentialsAuthDialog.module.css'; -import { DatabaseCredentialsAuthDialogFooter } from './DatabaseCredentialsAuthDialogFooter'; -import { useDatabaseCredentialsAuthDialog } from './useDatabaseCredentialsAuthDialog'; +import { DatabaseCredentialsAuthDialogFooter } from './DatabaseCredentialsAuthDialogFooter.js'; +import { useDatabaseCredentialsAuthDialog } from './useDatabaseCredentialsAuthDialog.js'; interface Props { connection: IConnectionInfoParams; @@ -77,7 +77,7 @@ export const DatabaseCredentialsAuthDialog = observer(function DatabaseCr )} diff --git a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts index 06c9378c10..fb22afe9cd 100644 --- a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts +++ b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts @@ -10,18 +10,18 @@ import { action, computed, observable } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { ConnectionInfoResource, - ConnectionInitConfig, - DatabaseConnection, - DBDriver, + type ConnectionInitConfig, + type DatabaseConnection, + type DBDriver, DBDriverResource, - IConnectionInfoParams, + type IConnectionInfoParams, USER_NAME_PROPERTY_ID, } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { NetworkHandlerAuthType } from '@cloudbeaver/core-sdk'; import type { ILoadableState } from '@cloudbeaver/core-utils'; -import type { IConnectionAuthenticationConfig } from '../../ConnectionAuthentication/IConnectionAuthenticationConfig'; +import type { IConnectionAuthenticationConfig } from '../../ConnectionAuthentication/IConnectionAuthenticationConfig.js'; interface IState extends ILoadableState { readonly authModelId: string | null; diff --git a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.m.css b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.module.css similarity index 100% rename from webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.m.css rename to webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.module.css diff --git a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.tsx b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.tsx index 416bf9c739..32fab3fbe6 100644 --- a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.tsx +++ b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseSecretAuthDialog/DatabaseSecretAuthDialog.tsx @@ -25,7 +25,7 @@ import { } from '@cloudbeaver/core-blocks'; import { ConnectionInfoResource, ConnectionPublicSecretsResource, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; -import style from './DatabaseSecretAuthDialog.m.css'; +import style from './DatabaseSecretAuthDialog.module.css'; interface Props { connectionKey: IConnectionInfoParams; diff --git a/webapp/packages/plugin-connections/src/LocaleService.ts b/webapp/packages/plugin-connections/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-connections/src/LocaleService.ts +++ b/webapp/packages/plugin-connections/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-connections/src/NavNodes/ConnectionFoldersBootstrap.ts b/webapp/packages/plugin-connections/src/NavNodes/ConnectionFoldersBootstrap.ts index ba67aab8f5..89b60d1da1 100644 --- a/webapp/packages/plugin-connections/src/NavNodes/ConnectionFoldersBootstrap.ts +++ b/webapp/packages/plugin-connections/src/NavNodes/ConnectionFoldersBootstrap.ts @@ -19,21 +19,21 @@ import { createConnectionParam, getConnectionFolderId, getConnectionFolderIdFromNodeId, - IConnectionFolderParam, - IConnectionInfoParams, + type IConnectionFolderParam, + type IConnectionInfoParams, } from '@cloudbeaver/core-connections'; import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorInterrupter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; +import { ExecutorInterrupter, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { LocalizationService } from '@cloudbeaver/core-localization'; import { ENodeMoveType, getNodesFromContext, - INodeMoveData, + type INodeMoveData, NAV_NODE_TYPE_FOLDER, - NavNode, + type NavNode, NavNodeInfoResource, NavNodeManagerService, navNodeMoveContext, @@ -43,13 +43,13 @@ import { ROOT_NODE_PATH, } from '@cloudbeaver/core-navigation-tree'; import { getProjectNodeId, NAV_NODE_TYPE_PROJECT, ProjectInfoResource } from '@cloudbeaver/core-projects'; -import { CachedMapAllKey, resourceKeyList, ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { CachedMapAllKey, resourceKeyList, type ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { createPath } from '@cloudbeaver/core-utils'; -import { ACTION_NEW_FOLDER, ActionService, IAction, MenuService } from '@cloudbeaver/core-view'; +import { ACTION_NEW_FOLDER, ActionService, type IAction, MenuService } from '@cloudbeaver/core-view'; import { DATA_CONTEXT_ELEMENTS_TREE, type IElementsTree, MENU_ELEMENTS_TREE_TOOLS } from '@cloudbeaver/plugin-navigation-tree'; import { FolderDialog } from '@cloudbeaver/plugin-projects'; -import { NAV_NODE_TYPE_CONNECTION } from './NAV_NODE_TYPE_CONNECTION'; +import { NAV_NODE_TYPE_CONNECTION } from './NAV_NODE_TYPE_CONNECTION.js'; interface ITargetNode { projectId: string; @@ -80,7 +80,7 @@ export class ConnectionFoldersBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.navNodeInfoResource.onItemUpdate.addHandler(this.syncWithNavTree.bind(this)); this.navNodeInfoResource.onItemDelete.addHandler(this.syncWithNavTree.bind(this)); this.navNodeManagerService.onMove.addHandler(this.moveConnectionToFolder.bind(this)); @@ -321,7 +321,7 @@ export class ConnectionFoldersBootstrap extends Bootstrap { const editableProjects = this.connectionsManagerService.createConnectionProjects; if (editableProjects.length > 0) { - const project = editableProjects[0]; + const project = editableProjects[0]!; return { projectId: project.id, @@ -332,7 +332,7 @@ export class ConnectionFoldersBootstrap extends Bootstrap { return; } - const targetFolder = selected[0]; + const targetFolder = selected[0]!; const parentIds = [...this.navNodeInfoResource.getParents(targetFolder), targetFolder]; const parents = this.navNodeInfoResource.get(resourceKeyList(parentIds)); const projectNode = parents.find(parent => parent?.nodeType === NAV_NODE_TYPE_PROJECT); diff --git a/webapp/packages/plugin-connections/src/PluginBootstrap.ts b/webapp/packages/plugin-connections/src/PluginBootstrap.ts index d0c09c3b5b..09687f9836 100644 --- a/webapp/packages/plugin-connections/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-connections/src/PluginBootstrap.ts @@ -12,8 +12,4 @@ export class PluginBootstrap extends Bootstrap { constructor() { super(); } - - register(): void {} - - load(): void {} } diff --git a/webapp/packages/plugin-connections/src/PublicConnectionForm/PublicConnectionForm.tsx b/webapp/packages/plugin-connections/src/PublicConnectionForm/PublicConnectionForm.tsx index 2201d95a10..e348a869da 100644 --- a/webapp/packages/plugin-connections/src/PublicConnectionForm/PublicConnectionForm.tsx +++ b/webapp/packages/plugin-connections/src/PublicConnectionForm/PublicConnectionForm.tsx @@ -11,9 +11,9 @@ import { useCallback } from 'react'; import { Loader, s, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ConnectionFormLoader } from '../ConnectionForm/ConnectionFormLoader'; +import { ConnectionFormLoader } from '../ConnectionForm/ConnectionFormLoader.js'; import styles from './PublicConnectionForm.module.css'; -import { PublicConnectionFormService } from './PublicConnectionFormService'; +import { PublicConnectionFormService } from './PublicConnectionFormService.js'; export const PublicConnectionForm: React.FC = observer(function PublicConnectionForm() { const service = useService(PublicConnectionFormService); diff --git a/webapp/packages/plugin-connections/src/PublicConnectionForm/PublicConnectionFormService.ts b/webapp/packages/plugin-connections/src/PublicConnectionForm/PublicConnectionFormService.ts index 272bf0747f..bff7ea0a33 100644 --- a/webapp/packages/plugin-connections/src/PublicConnectionForm/PublicConnectionFormService.ts +++ b/webapp/packages/plugin-connections/src/PublicConnectionForm/PublicConnectionFormService.ts @@ -9,22 +9,22 @@ import { action, makeObservable, observable } from 'mobx'; import { UserInfoResource } from '@cloudbeaver/core-authentication'; import { ConfirmationDialog, importLazyComponent } from '@cloudbeaver/core-blocks'; -import { ConnectionInfoResource, ConnectionsManagerService, createConnectionParam, IConnectionInfoParams } from '@cloudbeaver/core-connections'; +import { ConnectionInfoResource, ConnectionsManagerService, createConnectionParam, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; -import { executorHandlerFilter, ExecutorInterrupter, IExecutorHandler } from '@cloudbeaver/core-executor'; +import { executorHandlerFilter, ExecutorInterrupter, type IExecutorHandler } from '@cloudbeaver/core-executor'; import { ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; import type { ResourceKey, ResourceKeySimple } from '@cloudbeaver/core-resource'; import type { ConnectionConfig } from '@cloudbeaver/core-sdk'; import { OptionsPanelService } from '@cloudbeaver/core-ui'; import { AuthenticationService } from '@cloudbeaver/plugin-authentication'; -import { ConnectionFormService } from '../ConnectionForm/ConnectionFormService'; -import { ConnectionFormState } from '../ConnectionForm/ConnectionFormState'; -import type { IConnectionFormState } from '../ConnectionForm/IConnectionFormProps'; +import { ConnectionFormService } from '../ConnectionForm/ConnectionFormService.js'; +import { ConnectionFormState } from '../ConnectionForm/ConnectionFormState.js'; +import type { IConnectionFormState } from '../ConnectionForm/IConnectionFormProps.js'; -const PublicConnectionForm = importLazyComponent(() => import('./PublicConnectionForm').then(m => m.PublicConnectionForm)); +const PublicConnectionForm = importLazyComponent(() => import('./PublicConnectionForm.js').then(m => m.PublicConnectionForm)); const formGetter = () => PublicConnectionForm; diff --git a/webapp/packages/plugin-connections/src/index.ts b/webapp/packages/plugin-connections/src/index.ts index c725ec1cca..c5f442faa6 100644 --- a/webapp/packages/plugin-connections/src/index.ts +++ b/webapp/packages/plugin-connections/src/index.ts @@ -1,27 +1,34 @@ -import { connectionPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { connectionPlugin } from './manifest.js'; -export * from './ConnectionAuthentication/IConnectionAuthenticationConfig'; -export * from './ConnectionAuthentication/ConnectionAuthenticationFormLoader'; -export * from './ConnectionForm/Options/ConnectionOptionsTabService'; -export * from './ConnectionForm/DriverProperties/ConnectionDriverPropertiesTabService'; -export * from './ConnectionForm/SSH/ConnectionSSHTabService'; -export * from './ConnectionForm/OriginInfo/ConnectionOriginInfoTabService'; -export * from './ConnectionForm/Contexts/connectionConfigContext'; -export * from './ConnectionForm/Contexts/connectionCredentialsStateContext'; -export * from './ConnectionForm/ConnectionFormBaseActionsLoader'; -export * from './ConnectionForm/connectionFormConfigureContext'; -export * from './ConnectionForm/ConnectionFormLoader'; -export * from './ConnectionForm/ConnectionFormService'; -export * from './ConnectionForm/ConnectionFormState'; -export * from './ConnectionForm/IConnectionFormProps'; -export * from './ConnectionForm/useConnectionFormState'; -export * from './ConnectionForm/SharedCredentials/CONNECTION_FORM_SHARED_CREDENTIALS_TAB_ID'; -export * from './ConnectionForm/ConnectionAuthModelCredentials/ConnectionAuthModelCredentialsForm'; -export * from './ContextMenu/MENU_CONNECTION_VIEW'; -export * from './ContextMenu/MENU_CONNECTIONS'; -export * from './PublicConnectionForm/PublicConnectionFormService'; -export * from './ConnectionAuthService'; -export * from './PluginConnectionsSettingsService'; -export * from './ConnectionShieldLazy'; +export * from './ConnectionAuthentication/IConnectionAuthenticationConfig.js'; +export * from './ConnectionAuthentication/ConnectionAuthenticationFormLoader.js'; +export * from './ConnectionForm/Options/ConnectionOptionsTabService.js'; +export * from './ConnectionForm/DriverProperties/ConnectionDriverPropertiesTabService.js'; +export * from './ConnectionForm/SSH/ConnectionSSHTabService.js'; +export * from './ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.js'; +export * from './ConnectionForm/Contexts/connectionConfigContext.js'; +export * from './ConnectionForm/Contexts/connectionCredentialsStateContext.js'; +export * from './ConnectionForm/ConnectionFormBaseActionsLoader.js'; +export * from './ConnectionForm/connectionFormConfigureContext.js'; +export * from './ConnectionForm/ConnectionFormLoader.js'; +export * from './ConnectionForm/ConnectionFormService.js'; +export * from './ConnectionForm/ConnectionFormState.js'; +export * from './ConnectionForm/IConnectionFormProps.js'; +export * from './ConnectionForm/useConnectionFormState.js'; +export * from './ConnectionForm/SharedCredentials/CONNECTION_FORM_SHARED_CREDENTIALS_TAB_ID.js'; +export * from './ConnectionForm/ConnectionAuthModelCredentials/ConnectionAuthModelCredentialsForm.js'; +export * from './ContextMenu/MENU_CONNECTION_VIEW.js'; +export * from './ContextMenu/MENU_CONNECTIONS.js'; +export * from './PublicConnectionForm/PublicConnectionFormService.js'; +export * from './ConnectionAuthService.js'; +export * from './PluginConnectionsSettingsService.js'; +export * from './ConnectionShieldLazy.js'; export default connectionPlugin; diff --git a/webapp/packages/plugin-connections/src/manifest.ts b/webapp/packages/plugin-connections/src/manifest.ts index 1dcc87c848..642fc7c779 100644 --- a/webapp/packages/plugin-connections/src/manifest.ts +++ b/webapp/packages/plugin-connections/src/manifest.ts @@ -13,18 +13,18 @@ export const connectionPlugin: PluginManifest = { }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./ContextMenu/ConnectionMenuBootstrap').then(m => m.ConnectionMenuBootstrap), - () => import('./PublicConnectionForm/PublicConnectionFormService').then(m => m.PublicConnectionFormService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./ConnectionAuthService').then(m => m.ConnectionAuthService), - () => import('./ConnectionForm/ConnectionFormService').then(m => m.ConnectionFormService), - () => import('./ConnectionForm/Options/ConnectionOptionsTabService').then(m => m.ConnectionOptionsTabService), - () => import('./ConnectionForm/DriverProperties/ConnectionDriverPropertiesTabService').then(m => m.ConnectionDriverPropertiesTabService), - () => import('./ConnectionForm/SSH/ConnectionSSHTabService').then(m => m.ConnectionSSHTabService), - () => import('./ConnectionForm/OriginInfo/ConnectionOriginInfoTabService').then(m => m.ConnectionOriginInfoTabService), - () => import('./NavNodes/ConnectionFoldersBootstrap').then(m => m.ConnectionFoldersBootstrap), - () => import('./ConnectionForm/SSL/ConnectionSSLTabService').then(m => m.ConnectionSSLTabService), - () => import('./PluginConnectionsSettingsService').then(m => m.PluginConnectionsSettingsService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./ContextMenu/ConnectionMenuBootstrap.js').then(m => m.ConnectionMenuBootstrap), + () => import('./PublicConnectionForm/PublicConnectionFormService.js').then(m => m.PublicConnectionFormService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./ConnectionAuthService.js').then(m => m.ConnectionAuthService), + () => import('./ConnectionForm/ConnectionFormService.js').then(m => m.ConnectionFormService), + () => import('./ConnectionForm/Options/ConnectionOptionsTabService.js').then(m => m.ConnectionOptionsTabService), + () => import('./ConnectionForm/DriverProperties/ConnectionDriverPropertiesTabService.js').then(m => m.ConnectionDriverPropertiesTabService), + () => import('./ConnectionForm/SSH/ConnectionSSHTabService.js').then(m => m.ConnectionSSHTabService), + () => import('./ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.js').then(m => m.ConnectionOriginInfoTabService), + () => import('./NavNodes/ConnectionFoldersBootstrap.js').then(m => m.ConnectionFoldersBootstrap), + () => import('./ConnectionForm/SSL/ConnectionSSLTabService.js').then(m => m.ConnectionSSLTabService), + () => import('./PluginConnectionsSettingsService.js').then(m => m.PluginConnectionsSettingsService), ], }; diff --git a/webapp/packages/plugin-d3js/package.json b/webapp/packages/plugin-d3js/package.json index 7b1923c238..a6caa6b4b7 100644 --- a/webapp/packages/plugin-d3js/package.json +++ b/webapp/packages/plugin-d3js/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-d3js", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-d3js/src/index.ts b/webapp/packages/plugin-d3js/src/index.ts index 7c644ac5f8..7b8de60091 100644 --- a/webapp/packages/plugin-d3js/src/index.ts +++ b/webapp/packages/plugin-d3js/src/index.ts @@ -1,4 +1,11 @@ -import { pluginD3js } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { pluginD3js } from './manifest.js'; export default pluginD3js; diff --git a/webapp/packages/plugin-data-export/package.json b/webapp/packages/plugin-data-export/package.json index ea9a09faf4..383ced7fe5 100644 --- a/webapp/packages/plugin-data-export/package.json +++ b/webapp/packages/plugin-data-export/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-data-export", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-data-export/src/Bootstrap.ts b/webapp/packages/plugin-data-export/src/Bootstrap.ts index 533aef0d54..f23cbd959f 100644 --- a/webapp/packages/plugin-data-export/src/Bootstrap.ts +++ b/webapp/packages/plugin-data-export/src/Bootstrap.ts @@ -7,7 +7,7 @@ */ import { Bootstrap as B, injectable } from '@cloudbeaver/core-di'; -import { DataExportMenuService } from './DataExportMenuService'; +import { DataExportMenuService } from './DataExportMenuService.js'; @injectable() export class Bootstrap extends B { @@ -15,9 +15,7 @@ export class Bootstrap extends B { super(); } - register(): void { + override register(): void { this.dataExportMenuService.register(); } - - load(): void {} } diff --git a/webapp/packages/plugin-data-export/src/DataExportMenuService.ts b/webapp/packages/plugin-data-export/src/DataExportMenuService.ts index f926dd692b..fe514e48ba 100644 --- a/webapp/packages/plugin-data-export/src/DataExportMenuService.ts +++ b/webapp/packages/plugin-data-export/src/DataExportMenuService.ts @@ -20,12 +20,12 @@ import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU, DataViewerPresentationType, DataViewerService, - IDataContainerOptions, + type IDataContainerOptions, isResultSetDataSource, } from '@cloudbeaver/plugin-data-viewer'; import type { IDataQueryOptions } from '@cloudbeaver/plugin-sql-editor'; -const DataExportDialog = importLazyComponent(() => import('./Dialog/DataExportDialog').then(module => module.DataExportDialog)); +const DataExportDialog = importLazyComponent(() => import('./Dialog/DataExportDialog.js').then(module => module.DataExportDialog)); @injectable() export class DataExportMenuService { diff --git a/webapp/packages/plugin-data-export/src/DataExportProcessService.ts b/webapp/packages/plugin-data-export/src/DataExportProcessService.ts index 3f449313a2..b32df380b8 100644 --- a/webapp/packages/plugin-data-export/src/DataExportProcessService.ts +++ b/webapp/packages/plugin-data-export/src/DataExportProcessService.ts @@ -8,12 +8,12 @@ import type { IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { DataTransferParameters, GraphQLService } from '@cloudbeaver/core-sdk'; +import { type DataTransferParameters, GraphQLService } from '@cloudbeaver/core-sdk'; import { Deferred, GlobalConstants, OrderedMap } from '@cloudbeaver/core-utils'; -import { ExportFromContainerProcess } from './ExportFromContainerProcess'; -import { ExportFromResultsProcess } from './ExportFromResultsProcess'; -import type { IExportContext } from './IExportContext'; +import { ExportFromContainerProcess } from './ExportFromContainerProcess.js'; +import { ExportFromResultsProcess } from './ExportFromResultsProcess.js'; +import type { IExportContext } from './IExportContext.js'; interface Process { taskId: string; diff --git a/webapp/packages/plugin-data-export/src/DataExportService.ts b/webapp/packages/plugin-data-export/src/DataExportService.ts index 60b52fec00..f0d9d2ea83 100644 --- a/webapp/packages/plugin-data-export/src/DataExportService.ts +++ b/webapp/packages/plugin-data-export/src/DataExportService.ts @@ -9,9 +9,9 @@ import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import type { DataTransferParameters } from '@cloudbeaver/core-sdk'; -import { DataExportProcessService } from './DataExportProcessService'; -import { ExportNotification } from './ExportNotification/ExportNotification'; -import type { IExportContext } from './IExportContext'; +import { DataExportProcessService } from './DataExportProcessService.js'; +import { ExportNotification } from './ExportNotification/ExportNotification.js'; +import type { IExportContext } from './IExportContext.js'; @injectable() export class DataExportService { diff --git a/webapp/packages/plugin-data-export/src/DataTransferProcessorsResource.ts b/webapp/packages/plugin-data-export/src/DataTransferProcessorsResource.ts index 7869b1557a..282fc7e015 100644 --- a/webapp/packages/plugin-data-export/src/DataTransferProcessorsResource.ts +++ b/webapp/packages/plugin-data-export/src/DataTransferProcessorsResource.ts @@ -8,7 +8,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedMapAllKey, CachedMapResource, resourceKeyList } from '@cloudbeaver/core-resource'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { DataTransferProcessorInfo, GraphQLService } from '@cloudbeaver/core-sdk'; +import { type DataTransferProcessorInfo, GraphQLService } from '@cloudbeaver/core-sdk'; @injectable() export class DataTransferProcessorsResource extends CachedMapResource { diff --git a/webapp/packages/plugin-data-export/src/Dialog/DataExportDialog.tsx b/webapp/packages/plugin-data-export/src/Dialog/DataExportDialog.tsx index 623d84da6d..374e14a8f4 100644 --- a/webapp/packages/plugin-data-export/src/Dialog/DataExportDialog.tsx +++ b/webapp/packages/plugin-data-export/src/Dialog/DataExportDialog.tsx @@ -10,12 +10,12 @@ import { observer } from 'mobx-react-lite'; import { useResource } from '@cloudbeaver/core-blocks'; import type { DialogComponent } from '@cloudbeaver/core-dialogs'; -import type { IExportContext } from '../IExportContext'; -import { DefaultExportOutputSettingsResource } from './DefaultExportOutputSettingsResource'; -import { EDataExportStep } from './EDataExportStep'; -import { ProcessorConfigureDialog } from './ProcessorConfigureDialog'; -import { ProcessorSelectDialog } from './ProcessorSelectDialog'; -import { useDataExportDialog } from './useDataExportDialog'; +import type { IExportContext } from '../IExportContext.js'; +import { DefaultExportOutputSettingsResource } from './DefaultExportOutputSettingsResource.js'; +import { EDataExportStep } from './EDataExportStep.js'; +import { ProcessorConfigureDialog } from './ProcessorConfigureDialog.js'; +import { ProcessorSelectDialog } from './ProcessorSelectDialog.js'; +import { useDataExportDialog } from './useDataExportDialog.js'; export const DataExportDialog: DialogComponent = observer(function DataExportDialog({ payload, rejectDialog }) { useResource(DataExportDialog, DefaultExportOutputSettingsResource, undefined, { forceSuspense: true }); diff --git a/webapp/packages/plugin-data-export/src/Dialog/DefaultExportOutputSettingsResource.ts b/webapp/packages/plugin-data-export/src/Dialog/DefaultExportOutputSettingsResource.ts index 1f53083a50..c2ee088e1b 100644 --- a/webapp/packages/plugin-data-export/src/Dialog/DefaultExportOutputSettingsResource.ts +++ b/webapp/packages/plugin-data-export/src/Dialog/DefaultExportOutputSettingsResource.ts @@ -7,7 +7,7 @@ */ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { DataTransferDefaultExportSettings, GraphQLService } from '@cloudbeaver/core-sdk'; +import { type DataTransferDefaultExportSettings, GraphQLService } from '@cloudbeaver/core-sdk'; @injectable() export class DefaultExportOutputSettingsResource extends CachedDataResource { diff --git a/webapp/packages/plugin-data-export/src/Dialog/ExportProcessorList/ExportProcessorList.tsx b/webapp/packages/plugin-data-export/src/Dialog/ExportProcessorList/ExportProcessorList.tsx index 18a379c742..ed91f5c213 100644 --- a/webapp/packages/plugin-data-export/src/Dialog/ExportProcessorList/ExportProcessorList.tsx +++ b/webapp/packages/plugin-data-export/src/Dialog/ExportProcessorList/ExportProcessorList.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { ItemList } from '@cloudbeaver/core-blocks'; import type { DataTransferProcessorInfo } from '@cloudbeaver/core-sdk'; -import { ProcessorItem } from './ProcessorItem'; +import { ProcessorItem } from './ProcessorItem.js'; interface Props { processors: DataTransferProcessorInfo[]; diff --git a/webapp/packages/plugin-data-export/src/Dialog/ExportProcessorList/ProcessorItem.tsx b/webapp/packages/plugin-data-export/src/Dialog/ExportProcessorList/ProcessorItem.tsx index 8fa7ad8658..e92523c69d 100644 --- a/webapp/packages/plugin-data-export/src/Dialog/ExportProcessorList/ProcessorItem.tsx +++ b/webapp/packages/plugin-data-export/src/Dialog/ExportProcessorList/ProcessorItem.tsx @@ -24,7 +24,7 @@ export const ProcessorItem = observer(function ProcessorItem({ processor, return ( - + {processor.name} {processor.description} diff --git a/webapp/packages/plugin-data-export/src/Dialog/OutputOptionsForm.tsx b/webapp/packages/plugin-data-export/src/Dialog/OutputOptionsForm.tsx index c1987a9d40..e292622188 100644 --- a/webapp/packages/plugin-data-export/src/Dialog/OutputOptionsForm.tsx +++ b/webapp/packages/plugin-data-export/src/Dialog/OutputOptionsForm.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { Combobox, Container, FieldCheckbox, Loader, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import type { DataTransferOutputSettings } from '@cloudbeaver/core-sdk'; -import { DefaultExportOutputSettingsResource } from './DefaultExportOutputSettingsResource'; +import { DefaultExportOutputSettingsResource } from './DefaultExportOutputSettingsResource.js'; interface Props { outputSettings: Partial; diff --git a/webapp/packages/plugin-data-export/src/Dialog/ProcessorConfigureDialog.tsx b/webapp/packages/plugin-data-export/src/Dialog/ProcessorConfigureDialog.tsx index 75b7a1d329..3c4e3e6966 100644 --- a/webapp/packages/plugin-data-export/src/Dialog/ProcessorConfigureDialog.tsx +++ b/webapp/packages/plugin-data-export/src/Dialog/ProcessorConfigureDialog.tsx @@ -14,7 +14,7 @@ import { CommonDialogHeader, CommonDialogWrapper, ErrorMessage, - IProperty, + type IProperty, PropertiesTable, s, useErrorDetails, @@ -22,11 +22,11 @@ import { useTranslate, } from '@cloudbeaver/core-blocks'; import type { DataTransferOutputSettings, DataTransferProcessorInfo } from '@cloudbeaver/core-sdk'; -import { ITabData, Tab, TabList, TabsState, TabTitle } from '@cloudbeaver/core-ui'; +import { type ITabData, Tab, TabList, TabsState, TabTitle } from '@cloudbeaver/core-ui'; -import { OutputOptionsForm } from './OutputOptionsForm'; +import { OutputOptionsForm } from './OutputOptionsForm.js'; import style from './ProcessorConfigureDialog.module.css'; -import { ProcessorConfigureDialogFooter } from './ProcessorConfigureDialogFooter'; +import { ProcessorConfigureDialogFooter } from './ProcessorConfigureDialogFooter.js'; interface Props { processor: DataTransferProcessorInfo; diff --git a/webapp/packages/plugin-data-export/src/Dialog/ProcessorSelectDialog.tsx b/webapp/packages/plugin-data-export/src/Dialog/ProcessorSelectDialog.tsx index ed1e364830..4c761e152d 100644 --- a/webapp/packages/plugin-data-export/src/Dialog/ProcessorSelectDialog.tsx +++ b/webapp/packages/plugin-data-export/src/Dialog/ProcessorSelectDialog.tsx @@ -11,9 +11,9 @@ import { CommonDialogBody, CommonDialogHeader, CommonDialogWrapper, s, useResour import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import type { DataTransferProcessorInfo } from '@cloudbeaver/core-sdk'; -import { DataTransferProcessorsResource } from '../DataTransferProcessorsResource'; -import type { IExportContext } from '../IExportContext'; -import { ExportProcessorList } from './ExportProcessorList/ExportProcessorList'; +import { DataTransferProcessorsResource } from '../DataTransferProcessorsResource.js'; +import type { IExportContext } from '../IExportContext.js'; +import { ExportProcessorList } from './ExportProcessorList/ExportProcessorList.js'; import style from './ProcessorSelectDialog.module.css'; interface Props { diff --git a/webapp/packages/plugin-data-export/src/Dialog/useDataExportDialog.ts b/webapp/packages/plugin-data-export/src/Dialog/useDataExportDialog.ts index 57daa2fa6b..dfbf66d5b1 100644 --- a/webapp/packages/plugin-data-export/src/Dialog/useDataExportDialog.ts +++ b/webapp/packages/plugin-data-export/src/Dialog/useDataExportDialog.ts @@ -7,17 +7,17 @@ */ import { action, computed, observable, toJS } from 'mobx'; -import { IProperty, useObservableRef } from '@cloudbeaver/core-blocks'; +import { type IProperty, useObservableRef } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { LocalizationService } from '@cloudbeaver/core-localization'; import type { DataTransferOutputSettings, DataTransferProcessorInfo } from '@cloudbeaver/core-sdk'; -import { DataExportService } from '../DataExportService'; -import { DataTransferProcessorsResource } from '../DataTransferProcessorsResource'; -import type { IExportContext } from '../IExportContext'; -import { DefaultExportOutputSettingsResource } from './DefaultExportOutputSettingsResource'; -import { EDataExportStep } from './EDataExportStep'; +import { DataExportService } from '../DataExportService.js'; +import { DataTransferProcessorsResource } from '../DataTransferProcessorsResource.js'; +import type { IExportContext } from '../IExportContext.js'; +import { DefaultExportOutputSettingsResource } from './DefaultExportOutputSettingsResource.js'; +import { EDataExportStep } from './EDataExportStep.js'; interface State { readonly properties: IProperty[]; diff --git a/webapp/packages/plugin-data-export/src/ExportFromContainerProcess.ts b/webapp/packages/plugin-data-export/src/ExportFromContainerProcess.ts index 9ae42a62dd..23621d9949 100644 --- a/webapp/packages/plugin-data-export/src/ExportFromContainerProcess.ts +++ b/webapp/packages/plugin-data-export/src/ExportFromContainerProcess.ts @@ -7,7 +7,7 @@ */ import type { IConnectionInfoParams } from '@cloudbeaver/core-connections'; import type { NotificationService } from '@cloudbeaver/core-events'; -import { AsyncTaskInfo, DataTransferParameters, GraphQLService, ServerInternalError } from '@cloudbeaver/core-sdk'; +import { type AsyncTaskInfo, type DataTransferParameters, GraphQLService, ServerInternalError } from '@cloudbeaver/core-sdk'; import { CancellablePromise, cancellableTimeout, Deferred, EDeferredState } from '@cloudbeaver/core-utils'; const DELAY_BETWEEN_TRIES = 1000; @@ -53,7 +53,7 @@ export class ExportFromContainerProcess extends Deferred { * this method just mark process as cancelling * to avoid racing conditions the server request will be executed in synchronous manner in start method */ - cancel() { + override cancel() { if (this.getState() !== EDeferredState.PENDING) { return; } diff --git a/webapp/packages/plugin-data-export/src/ExportFromResultsProcess.ts b/webapp/packages/plugin-data-export/src/ExportFromResultsProcess.ts index 5fc5f4b144..7865a2607c 100644 --- a/webapp/packages/plugin-data-export/src/ExportFromResultsProcess.ts +++ b/webapp/packages/plugin-data-export/src/ExportFromResultsProcess.ts @@ -7,7 +7,7 @@ */ import type { IConnectionInfoParams } from '@cloudbeaver/core-connections'; import type { NotificationService } from '@cloudbeaver/core-events'; -import { AsyncTaskInfo, DataTransferParameters, GraphQLService, ServerInternalError } from '@cloudbeaver/core-sdk'; +import { type AsyncTaskInfo, type DataTransferParameters, GraphQLService, ServerInternalError } from '@cloudbeaver/core-sdk'; import { CancellablePromise, cancellableTimeout, Deferred, EDeferredState } from '@cloudbeaver/core-utils'; const DELAY_BETWEEN_TRIES = 1000; @@ -54,7 +54,7 @@ export class ExportFromResultsProcess extends Deferred { * this method just mark process as cancelling * to avoid racing conditions the server request will be executed in synchronous manner in start method */ - cancel() { + override cancel() { if (this.getState() !== EDeferredState.PENDING) { return; } diff --git a/webapp/packages/plugin-data-export/src/ExportNotification/ExportNotification.tsx b/webapp/packages/plugin-data-export/src/ExportNotification/ExportNotification.tsx index 6231f54fb3..595e1fe6b5 100644 --- a/webapp/packages/plugin-data-export/src/ExportNotification/ExportNotification.tsx +++ b/webapp/packages/plugin-data-export/src/ExportNotification/ExportNotification.tsx @@ -23,8 +23,8 @@ import { ENotificationType } from '@cloudbeaver/core-events'; import { EDeferredState } from '@cloudbeaver/core-utils'; import styles from './ExportNotification.module.css'; -import type { IExportNotification } from './IExportNotification'; -import { useExportNotification } from './useExportNotification'; +import type { IExportNotification } from './IExportNotification.js'; +import { useExportNotification } from './useExportNotification.js'; interface Props { notification: IExportNotification; diff --git a/webapp/packages/plugin-data-export/src/ExportNotification/useExportNotification.ts b/webapp/packages/plugin-data-export/src/ExportNotification/useExportNotification.ts index 4c9acdecc5..0f1bf25230 100644 --- a/webapp/packages/plugin-data-export/src/ExportNotification/useExportNotification.ts +++ b/webapp/packages/plugin-data-export/src/ExportNotification/useExportNotification.ts @@ -14,8 +14,8 @@ import { LocalizationService } from '@cloudbeaver/core-localization'; import { ServerErrorType, ServerInternalError } from '@cloudbeaver/core-sdk'; import { EDeferredState, errorOf } from '@cloudbeaver/core-utils'; -import { DataExportProcessService } from '../DataExportProcessService'; -import type { IExportNotification, IExportNotificationStatus } from './IExportNotification'; +import { DataExportProcessService } from '../DataExportProcessService.js'; +import type { IExportNotification, IExportNotificationStatus } from './IExportNotification.js'; export function useExportNotification(notification: IExportNotification) { const dataExportProcessService = useService(DataExportProcessService); diff --git a/webapp/packages/plugin-data-export/src/LocaleService.ts b/webapp/packages/plugin-data-export/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-data-export/src/LocaleService.ts +++ b/webapp/packages/plugin-data-export/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-data-export/src/index.ts b/webapp/packages/plugin-data-export/src/index.ts index e3b911ba54..827916889e 100644 --- a/webapp/packages/plugin-data-export/src/index.ts +++ b/webapp/packages/plugin-data-export/src/index.ts @@ -1,4 +1,11 @@ -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; -export * from './DataExportMenuService'; -export * from './DataExportService'; +export * from './DataExportMenuService.js'; +export * from './DataExportService.js'; diff --git a/webapp/packages/plugin-data-export/src/manifest.ts b/webapp/packages/plugin-data-export/src/manifest.ts index c2a8e77884..b178d0fda7 100644 --- a/webapp/packages/plugin-data-export/src/manifest.ts +++ b/webapp/packages/plugin-data-export/src/manifest.ts @@ -13,12 +13,12 @@ export const dataExportManifest: PluginManifest = { }, providers: [ - () => import('./Bootstrap').then(m => m.Bootstrap), - () => import('./DataExportMenuService').then(m => m.DataExportMenuService), - () => import('./DataExportService').then(m => m.DataExportService), - () => import('./DataExportProcessService').then(m => m.DataExportProcessService), - () => import('./DataTransferProcessorsResource').then(m => m.DataTransferProcessorsResource), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./Dialog/DefaultExportOutputSettingsResource').then(m => m.DefaultExportOutputSettingsResource), + () => import('./Bootstrap.js').then(m => m.Bootstrap), + () => import('./DataExportMenuService.js').then(m => m.DataExportMenuService), + () => import('./DataExportService.js').then(m => m.DataExportService), + () => import('./DataExportProcessService.js').then(m => m.DataExportProcessService), + () => import('./DataTransferProcessorsResource.js').then(m => m.DataTransferProcessorsResource), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./Dialog/DefaultExportOutputSettingsResource.js').then(m => m.DefaultExportOutputSettingsResource), ], }; diff --git a/webapp/packages/plugin-data-grid/package.json b/webapp/packages/plugin-data-grid/package.json index 08554571b8..24a5c5b54f 100644 --- a/webapp/packages/plugin-data-grid/package.json +++ b/webapp/packages/plugin-data-grid/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-data-grid", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-data-grid/src/DataGrid.tsx b/webapp/packages/plugin-data-grid/src/DataGrid.tsx index dec5e52440..a69616cc7e 100644 --- a/webapp/packages/plugin-data-grid/src/DataGrid.tsx +++ b/webapp/packages/plugin-data-grid/src/DataGrid.tsx @@ -16,6 +16,6 @@ import classes from './DataGrid.module.css'; export const DataGrid = observer( forwardRef(function DataGrid(props, ref) { - return ; + return ; }), ) as typeof ReactDataGrid; diff --git a/webapp/packages/plugin-data-grid/src/DataGridLazy.ts b/webapp/packages/plugin-data-grid/src/DataGridLazy.ts index 108e20e158..8eaa434dd9 100644 --- a/webapp/packages/plugin-data-grid/src/DataGridLazy.ts +++ b/webapp/packages/plugin-data-grid/src/DataGridLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const DataGrid = importLazyComponent(() => import('./DataGrid').then(m => m.DataGrid)); +export const DataGrid = importLazyComponent(() => import('./DataGrid.js').then(m => m.DataGrid)); diff --git a/webapp/packages/plugin-data-grid/src/PluginBootstrap.ts b/webapp/packages/plugin-data-grid/src/PluginBootstrap.ts index 949ba2fe1a..09687f9836 100644 --- a/webapp/packages/plugin-data-grid/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-data-grid/src/PluginBootstrap.ts @@ -12,8 +12,4 @@ export class PluginBootstrap extends Bootstrap { constructor() { super(); } - - register(): void | Promise {} - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-data-grid/src/index.ts b/webapp/packages/plugin-data-grid/src/index.ts index db2823fbf0..7c5a3d137d 100644 --- a/webapp/packages/plugin-data-grid/src/index.ts +++ b/webapp/packages/plugin-data-grid/src/index.ts @@ -5,12 +5,12 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { dataGridPlugin } from './manifest'; +import { dataGridPlugin } from './manifest.js'; export default dataGridPlugin; export { dataGridPlugin }; -export { DataGrid } from './DataGridLazy'; +export { DataGrid } from './DataGridLazy.js'; export { type CellSelectArgs, diff --git a/webapp/packages/plugin-data-grid/src/manifest.ts b/webapp/packages/plugin-data-grid/src/manifest.ts index 008963214e..629f68e5ab 100644 --- a/webapp/packages/plugin-data-grid/src/manifest.ts +++ b/webapp/packages/plugin-data-grid/src/manifest.ts @@ -9,5 +9,5 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const dataGridPlugin: PluginManifest = { info: { name: 'Data grid plugin' }, - providers: [() => import('./PluginBootstrap').then(m => m.PluginBootstrap)], + providers: [() => import('./PluginBootstrap.js').then(m => m.PluginBootstrap)], }; diff --git a/webapp/packages/plugin-data-import/package.json b/webapp/packages/plugin-data-import/package.json index a065d42143..65ce772372 100644 --- a/webapp/packages/plugin-data-import/package.json +++ b/webapp/packages/plugin-data-import/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-data-import", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-data-import/src/DataImportBootstrap.ts b/webapp/packages/plugin-data-import/src/DataImportBootstrap.ts index a132e23de6..016dc2daed 100644 --- a/webapp/packages/plugin-data-import/src/DataImportBootstrap.ts +++ b/webapp/packages/plugin-data-import/src/DataImportBootstrap.ts @@ -18,8 +18,8 @@ import { isResultSetDataModel, } from '@cloudbeaver/plugin-data-viewer'; -import { DataImportDialogLazy } from './DataImportDialog/DataImportDialogLazy'; -import { DataImportService } from './DataImportService'; +import { DataImportDialogLazy } from './DataImportDialog/DataImportDialogLazy.js'; +import { DataImportService } from './DataImportService.js'; @injectable() export class DataImportBootstrap extends Bootstrap { @@ -32,7 +32,7 @@ export class DataImportBootstrap extends Bootstrap { super(); } - register() { + override register() { this.actionService.addHandler({ id: 'data-import-base-handler', contexts: [DATA_CONTEXT_DV_DDM, DATA_CONTEXT_DV_DDM_RESULT_INDEX], diff --git a/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportDialog.tsx b/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportDialog.tsx index db530889e3..1eb895665c 100644 --- a/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportDialog.tsx +++ b/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportDialog.tsx @@ -19,11 +19,11 @@ import { } from '@cloudbeaver/core-blocks'; import type { DialogComponent } from '@cloudbeaver/core-dialogs'; -import { DataImportFileSelector } from './DataImportFileSelector'; -import { EDataImportDialogStep } from './EDataImportDialogStep'; -import type { IDataImportDialogState } from './IDataImportDialogState'; -import { ImportProcessorList } from './ImportProcessorList'; -import { useDataImportDialog } from './useDataImportDialog'; +import { DataImportFileSelector } from './DataImportFileSelector.js'; +import { EDataImportDialogStep } from './EDataImportDialogStep.js'; +import type { IDataImportDialogState } from './IDataImportDialogState.js'; +import { ImportProcessorList } from './ImportProcessorList.js'; +import { useDataImportDialog } from './useDataImportDialog.js'; export interface IDataImportDialogResult { file: File; diff --git a/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportDialogLazy.ts b/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportDialogLazy.ts index c795b46a93..766ec1a6e6 100644 --- a/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportDialogLazy.ts +++ b/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportDialogLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const DataImportDialogLazy = importLazyComponent(() => import('./DataImportDialog').then(m => m.DataImportDialog)); +export const DataImportDialogLazy = importLazyComponent(() => import('./DataImportDialog.js').then(m => m.DataImportDialog)); diff --git a/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportFileSelector.tsx b/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportFileSelector.tsx index 3ae552ca2a..d73f8ddb53 100644 --- a/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportFileSelector.tsx +++ b/webapp/packages/plugin-data-import/src/DataImportDialog/DataImportFileSelector.tsx @@ -9,9 +9,9 @@ import { observer } from 'mobx-react-lite'; import { Container, Group, InputFiles, s, Table, TableBody, TableColumnHeader, TableHeader, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import { DataImportFileItem } from './DataImportFileItem'; +import { DataImportFileItem } from './DataImportFileItem.js'; import classes from './DataImportFileSelector.module.css'; -import type { IDataImportDialogState } from './IDataImportDialogState'; +import type { IDataImportDialogState } from './IDataImportDialogState.js'; interface Props { state: IDataImportDialogState; @@ -24,7 +24,7 @@ export const DataImportFileSelector = observer(function DataImportFileSel function handleFileSelect(value: FileList | null) { if (value) { - state.file = value[0]; + state.file = value[0]!; } } diff --git a/webapp/packages/plugin-data-import/src/DataImportDialog/IDataImportDialogState.ts b/webapp/packages/plugin-data-import/src/DataImportDialog/IDataImportDialogState.ts index 23d75a7bad..2631efb81c 100644 --- a/webapp/packages/plugin-data-import/src/DataImportDialog/IDataImportDialogState.ts +++ b/webapp/packages/plugin-data-import/src/DataImportDialog/IDataImportDialogState.ts @@ -7,7 +7,7 @@ */ import type { DataTransferProcessorInfo } from '@cloudbeaver/core-sdk'; -import type { EDataImportDialogStep } from './EDataImportDialogStep'; +import type { EDataImportDialogStep } from './EDataImportDialogStep.js'; export interface IDataImportDialogState { step: EDataImportDialogStep; diff --git a/webapp/packages/plugin-data-import/src/DataImportDialog/ImportProcessorList.tsx b/webapp/packages/plugin-data-import/src/DataImportDialog/ImportProcessorList.tsx index 025f1fc151..bde989dcce 100644 --- a/webapp/packages/plugin-data-import/src/DataImportDialog/ImportProcessorList.tsx +++ b/webapp/packages/plugin-data-import/src/DataImportDialog/ImportProcessorList.tsx @@ -11,7 +11,7 @@ import { ItemList, ListItem, ListItemDescription, ListItemIcon, ListItemName, St import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import type { DataTransferProcessorInfo } from '@cloudbeaver/core-sdk'; -import { DataImportProcessorsResource } from '../DataImportProcessorsResource'; +import { DataImportProcessorsResource } from '../DataImportProcessorsResource.js'; import classes from './ImportProcessorList.module.css'; interface Props { @@ -27,7 +27,7 @@ export const ImportProcessorList = observer(function ImportProcessorList( {dataImportProcessorsResource.resource.values.map(processor => ( onSelect(processor)}> - + {processor.name} {processor.description} diff --git a/webapp/packages/plugin-data-import/src/DataImportDialog/useDataImportDialog.ts b/webapp/packages/plugin-data-import/src/DataImportDialog/useDataImportDialog.ts index eefdde64fd..6ad0c6a587 100644 --- a/webapp/packages/plugin-data-import/src/DataImportDialog/useDataImportDialog.ts +++ b/webapp/packages/plugin-data-import/src/DataImportDialog/useDataImportDialog.ts @@ -10,8 +10,8 @@ import { action, observable } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import type { DataTransferProcessorInfo } from '@cloudbeaver/core-sdk'; -import { EDataImportDialogStep } from './EDataImportDialogStep'; -import type { IDataImportDialogState } from './IDataImportDialogState'; +import { EDataImportDialogStep } from './EDataImportDialogStep.js'; +import type { IDataImportDialogState } from './IDataImportDialogState.js'; interface IDialog { state: IDataImportDialogState; diff --git a/webapp/packages/plugin-data-import/src/DataImportProcessorsResource.ts b/webapp/packages/plugin-data-import/src/DataImportProcessorsResource.ts index 5b8f376a83..b0e8dbca87 100644 --- a/webapp/packages/plugin-data-import/src/DataImportProcessorsResource.ts +++ b/webapp/packages/plugin-data-import/src/DataImportProcessorsResource.ts @@ -8,7 +8,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedMapAllKey, CachedMapResource, resourceKeyList } from '@cloudbeaver/core-resource'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { DataTransferProcessorInfo, GraphQLService } from '@cloudbeaver/core-sdk'; +import { type DataTransferProcessorInfo, GraphQLService } from '@cloudbeaver/core-sdk'; @injectable() export class DataImportProcessorsResource extends CachedMapResource { diff --git a/webapp/packages/plugin-data-import/src/DataImportService.ts b/webapp/packages/plugin-data-import/src/DataImportService.ts index 3b342f791d..a5bdfb61d5 100644 --- a/webapp/packages/plugin-data-import/src/DataImportService.ts +++ b/webapp/packages/plugin-data-import/src/DataImportService.ts @@ -14,7 +14,7 @@ import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core- import { AsyncTaskInfoService, GraphQLService } from '@cloudbeaver/core-sdk'; import { getProgressPercent } from '@cloudbeaver/core-utils'; -import { DataImportSettingsService } from './DataImportSettingsService'; +import { DataImportSettingsService } from './DataImportSettingsService.js'; @injectable() export class DataImportService { diff --git a/webapp/packages/plugin-data-import/src/LocaleService.ts b/webapp/packages/plugin-data-import/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-data-import/src/LocaleService.ts +++ b/webapp/packages/plugin-data-import/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-data-import/src/index.ts b/webapp/packages/plugin-data-import/src/index.ts index 0f09daaf4c..afd96bbf94 100644 --- a/webapp/packages/plugin-data-import/src/index.ts +++ b/webapp/packages/plugin-data-import/src/index.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export { dataImportPluginManifest } from './manifest'; +export { dataImportPluginManifest } from './manifest.js'; -export * from './DataImportSettingsService'; +export * from './DataImportSettingsService.js'; diff --git a/webapp/packages/plugin-data-import/src/manifest.ts b/webapp/packages/plugin-data-import/src/manifest.ts index c1ca6a5c29..b6161aa346 100644 --- a/webapp/packages/plugin-data-import/src/manifest.ts +++ b/webapp/packages/plugin-data-import/src/manifest.ts @@ -13,10 +13,10 @@ export const dataImportPluginManifest: PluginManifest = { }, providers: [ - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./DataImportSettingsService').then(m => m.DataImportSettingsService), - () => import('./DataImportBootstrap').then(m => m.DataImportBootstrap), - () => import('./DataImportService').then(m => m.DataImportService), - () => import('./DataImportProcessorsResource').then(m => m.DataImportProcessorsResource), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./DataImportSettingsService.js').then(m => m.DataImportSettingsService), + () => import('./DataImportBootstrap.js').then(m => m.DataImportBootstrap), + () => import('./DataImportService.js').then(m => m.DataImportService), + () => import('./DataImportProcessorsResource.js').then(m => m.DataImportProcessorsResource), ], }; diff --git a/webapp/packages/plugin-data-spreadsheet-new/package.json b/webapp/packages/plugin-data-spreadsheet-new/package.json index 51b83b9726..17c897ab45 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/package.json +++ b/webapp/packages/plugin-data-spreadsheet-new/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-data-spreadsheet-new", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/CellEditor.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/CellEditor.tsx index fa08af02da..38e0df059c 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/CellEditor.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/CellEditor.tsx @@ -13,12 +13,12 @@ import { usePopper } from 'react-popper'; import { s, useS } from '@cloudbeaver/core-blocks'; import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; import { InlineEditor } from '@cloudbeaver/core-ui'; -import { RenderEditCellProps } from '@cloudbeaver/plugin-data-grid'; +import { type RenderEditCellProps } from '@cloudbeaver/plugin-data-grid'; import type { IResultSetElementKey, IResultSetRowKey } from '@cloudbeaver/plugin-data-viewer'; import style from './CellEditor.module.css'; -import { DataGridContext, IColumnResizeInfo } from './DataGridContext'; -import { TableDataContext } from './TableDataContext'; +import { DataGridContext, type IColumnResizeInfo } from './DataGridContext.js'; +import { TableDataContext } from './TableDataContext.js'; export interface IEditorRef { focus: () => void; @@ -112,7 +112,7 @@ export const CellEditor = observer, ' > {editorPortal && createPortal( -
+
; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/CellRenderer/CellRenderer.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/CellRenderer/CellRenderer.tsx index 87d3222386..d24c35a799 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/CellRenderer/CellRenderer.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/CellRenderer/CellRenderer.tsx @@ -13,13 +13,18 @@ import { getComputed, useCombinedHandler, useMouse, useObjectRef, useObservableR import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; import { clsx } from '@cloudbeaver/core-utils'; import { type CalculatedColumn, Cell, type CellRendererProps } from '@cloudbeaver/plugin-data-grid'; -import { DatabaseEditChangeType, IResultSetElementKey, IResultSetRowKey, isBooleanValuePresentationAvailable } from '@cloudbeaver/plugin-data-viewer'; - -import { CellPosition, EditingContext } from '../../Editing/EditingContext'; -import { DataGridContext } from '../DataGridContext'; -import { DataGridSelectionContext } from '../DataGridSelection/DataGridSelectionContext'; -import { TableDataContext } from '../TableDataContext'; -import { CellContext } from './CellContext'; +import { + DatabaseEditChangeType, + type IResultSetElementKey, + type IResultSetRowKey, + isBooleanValuePresentationAvailable, +} from '@cloudbeaver/plugin-data-viewer'; + +import { type CellPosition, EditingContext } from '../../Editing/EditingContext.js'; +import { DataGridContext } from '../DataGridContext.js'; +import { DataGridSelectionContext } from '../DataGridSelection/DataGridSelectionContext.js'; +import { TableDataContext } from '../TableDataContext.js'; +import { CellContext } from './CellContext.js'; export const CellRenderer = observer>(function CellRenderer(props) { const { rowIdx, row, column, isCellSelected, onDoubleClick, selectCell } = props; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuCellEditingService.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuCellEditingService.ts index 298b6f8788..3a39b9bfd5 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuCellEditingService.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuCellEditingService.ts @@ -18,7 +18,7 @@ import { ResultSetViewAction, } from '@cloudbeaver/plugin-data-viewer'; -import { DataGridContextMenuService } from './DataGridContextMenuService'; +import { DataGridContextMenuService } from './DataGridContextMenuService.js'; @injectable() export class DataGridContextMenuCellEditingService { diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuFilter/DataGridContextMenuFilterService.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuFilter/DataGridContextMenuFilterService.ts index 54e065d5bf..33401a6b79 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuFilter/DataGridContextMenuFilterService.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuFilter/DataGridContextMenuFilterService.ts @@ -7,14 +7,19 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; -import { CommonDialogService, ComputedContextMenuModel, DialogueStateResult, IContextMenuItem, IMenuContext } from '@cloudbeaver/core-dialogs'; +import { + CommonDialogService, + ComputedContextMenuModel, + DialogueStateResult, + type IContextMenuItem, + type IMenuContext, +} from '@cloudbeaver/core-dialogs'; import { ClipboardService } from '@cloudbeaver/core-ui'; import { replaceMiddle } from '@cloudbeaver/core-utils'; import { DatabaseDataConstraintAction, - IDatabaseDataModel, - IDatabaseDataOptions, - IResultSetColumnKey, + type IDatabaseDataModel, + type IResultSetColumnKey, IS_NOT_NULL_ID, IS_NULL_ID, isFilterConstraint, @@ -26,9 +31,9 @@ import { wrapOperationArgument, } from '@cloudbeaver/plugin-data-viewer'; -import { DataGridContextMenuService, IDataGridCellMenuContext } from '../DataGridContextMenuService'; +import { DataGridContextMenuService, type IDataGridCellMenuContext } from '../DataGridContextMenuService.js'; -const FilterCustomValueDialog = importLazyComponent(() => import('./FilterCustomValueDialog').then(m => m.FilterCustomValueDialog)); +const FilterCustomValueDialog = importLazyComponent(() => import('./FilterCustomValueDialog.js').then(m => m.FilterCustomValueDialog)); @injectable() export class DataGridContextMenuFilterService { diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuOrderService.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuOrderService.ts index 6005d997ff..2c5bac60e0 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuOrderService.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuOrderService.ts @@ -9,17 +9,17 @@ import { injectable } from '@cloudbeaver/core-di'; import { DatabaseDataConstraintAction, EOrder, - IDatabaseDataModel, - IDatabaseDataOptions, - IResultSetColumnKey, + type IDatabaseDataModel, + type IDatabaseDataOptions, + type IResultSetColumnKey, isResultSetDataModel, isResultSetDataSource, - Order, + type Order, ResultSetDataAction, ResultSetDataSource, } from '@cloudbeaver/plugin-data-viewer'; -import { DataGridContextMenuService } from './DataGridContextMenuService'; +import { DataGridContextMenuService } from './DataGridContextMenuService.js'; @injectable() export class DataGridContextMenuOrderService { diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.ts index fe4b084dd9..25d8c630d3 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.ts @@ -18,7 +18,7 @@ import { ResultSetFormatAction, } from '@cloudbeaver/plugin-data-viewer'; -import { DataGridContextMenuService } from './DataGridContextMenuService'; +import { DataGridContextMenuService } from './DataGridContextMenuService.js'; @injectable() export class DataGridContextMenuSaveContentService { diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuService.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuService.ts index 525481161f..a1673bbc2b 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuService.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuService.ts @@ -6,8 +6,8 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { ContextMenuService, IContextMenuItem, IMenuPanel } from '@cloudbeaver/core-dialogs'; -import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { ContextMenuService, type IContextMenuItem, type IMenuPanel } from '@cloudbeaver/core-dialogs'; +import { Executor, type IExecutor } from '@cloudbeaver/core-executor'; import type { IDatabaseDataModel, IDataPresentationActions, IDataTableActions, IResultSetElementKey } from '@cloudbeaver/plugin-data-viewer'; export interface IDataGridCellMenuContext { @@ -65,6 +65,4 @@ export class DataGridContextMenuService { add(panelId: string, menuItem: IContextMenuItem): void { this.contextMenuService.addMenuItem(panelId, menuItem); } - - register(): void {} } diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridLoader.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridLoader.tsx index dfa0977d5f..50e3c0e462 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridLoader.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridLoader.tsx @@ -9,7 +9,7 @@ import { ComplexLoader, createComplexLoader } from '@cloudbeaver/core-blocks'; import type { IDataPresentationProps } from '@cloudbeaver/plugin-data-viewer'; const loader = createComplexLoader(async function loader() { - const { DataGridTable } = await import('./DataGridTable'); + const { DataGridTable } = await import('./DataGridTable.js'); return { DataGridTable }; }); diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridSelection/DataGridSelectionContext.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridSelection/DataGridSelectionContext.ts index 8151e2a7dd..9627fff27c 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridSelection/DataGridSelectionContext.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridSelection/DataGridSelectionContext.ts @@ -9,7 +9,7 @@ import { createContext } from 'react'; import type { IResultSetElementKey } from '@cloudbeaver/plugin-data-viewer'; -import type { IDraggingPosition } from '../useGridDragging'; +import type { IDraggingPosition } from '../useGridDragging.js'; export interface IDataGridSelectionContext { selectedCells: Map; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridSelection/useGridSelectionContext.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridSelection/useGridSelectionContext.tsx index f09645b9cf..f18bda0753 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridSelection/useGridSelectionContext.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridSelection/useGridSelectionContext.tsx @@ -10,16 +10,16 @@ import { useState } from 'react'; import { useObjectRef } from '@cloudbeaver/core-blocks'; import { - IResultSetColumnKey, - IResultSetElementKey, - IResultSetRowKey, + type IResultSetColumnKey, + type IResultSetElementKey, + type IResultSetRowKey, ResultSetDataKeysUtils, ResultSetSelectAction, } from '@cloudbeaver/plugin-data-viewer'; -import type { ITableData } from '../TableDataContext'; -import type { IDraggingPosition } from '../useGridDragging'; -import type { IDataGridSelectionContext } from './DataGridSelectionContext'; +import type { ITableData } from '../TableDataContext.js'; +import type { IDraggingPosition } from '../useGridDragging.js'; +import type { IDataGridSelectionContext } from './DataGridSelectionContext.js'; interface IGridSelectionState { range: boolean; @@ -92,12 +92,12 @@ export function useGridSelectionContext(tableData: ITableData, selectionAction: for (let rowIdx = firstRowIndex; rowIdx <= lastRowIndex; rowIdx++) { const row = props.tableData.getRow(rowIdx)!; const newElements = rowSelection - .filter(element => !rowsSelection[i].some(column => ResultSetDataKeysUtils.isEqual(column.column, element))) + .filter(element => !rowsSelection[i]!.some(column => ResultSetDataKeysUtils.isEqual(column.column, element))) .map(column => ({ row, column })); temporarySelection.set( ResultSetDataKeysUtils.serialize(row), - [...rowsSelection[i], ...newElements].filter(column => { + [...rowsSelection[i]!, ...newElements].filter(column => { if (selected) { return !rowSelection.some(key => ResultSetDataKeysUtils.isEqual(key, column.column)); } diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridTable.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridTable.tsx index 58602e249b..31f1b5cd8a 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridTable.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridTable.tsx @@ -17,34 +17,34 @@ import { useCaptureViewContext } from '@cloudbeaver/core-view'; import { type CellSelectArgs, DataGrid, type DataGridHandle, type Position } from '@cloudbeaver/plugin-data-grid'; import { DATA_CONTEXT_DV_PRESENTATION, - DatabaseDataSelectActionsData, + type DatabaseDataSelectActionsData, DatabaseEditChangeType, DatabaseSelectAction, DataViewerPresentationType, - IDatabaseDataModel, - IDataPresentationProps, - IResultSetEditActionData, - IResultSetElementKey, - IResultSetPartialKey, - IResultSetRowKey, + type IDatabaseDataModel, + type IDataPresentationProps, + type IResultSetEditActionData, + type IResultSetElementKey, + type IResultSetPartialKey, + type IResultSetRowKey, ResultSetDataKeysUtils, ResultSetDataSource, ResultSetSelectAction, ResultSetViewAction, } from '@cloudbeaver/plugin-data-viewer'; -import { CellPosition, EditingContext } from '../Editing/EditingContext'; -import { useEditing } from '../Editing/useEditing'; -import { CellRenderer } from './CellRenderer/CellRenderer'; -import { DataGridContext, IColumnResizeInfo, IDataGridContext } from './DataGridContext'; -import { DataGridSelectionContext } from './DataGridSelection/DataGridSelectionContext'; -import { useGridSelectionContext } from './DataGridSelection/useGridSelectionContext'; +import { type CellPosition, EditingContext } from '../Editing/EditingContext.js'; +import { useEditing } from '../Editing/useEditing.js'; +import { CellRenderer } from './CellRenderer/CellRenderer.js'; +import { DataGridContext, type IColumnResizeInfo, type IDataGridContext } from './DataGridContext.js'; +import { DataGridSelectionContext } from './DataGridSelection/DataGridSelectionContext.js'; +import { useGridSelectionContext } from './DataGridSelection/useGridSelectionContext.js'; import classes from './DataGridTable.module.css'; -import { CellFormatter } from './Formatters/CellFormatter'; -import { TableDataContext } from './TableDataContext'; -import { useGridDragging } from './useGridDragging'; -import { useGridSelectedCellsCopy } from './useGridSelectedCellsCopy'; -import { useTableData } from './useTableData'; +import { CellFormatter } from './Formatters/CellFormatter.js'; +import { TableDataContext } from './TableDataContext.js'; +import { useGridDragging } from './useGridDragging.js'; +import { useGridSelectedCellsCopy } from './useGridSelectedCellsCopy.js'; +import { useTableData } from './useTableData.js'; interface IInnerState { lastCount: number; @@ -177,7 +177,7 @@ export const DataGridTable = observer(function DataGridT const selectedElements = selectionAction.getSelectedElements(); if (selectedElements.length > 0) { - key = selectedElements[0]; + key = selectedElements[0]!; } else { key = { column: viewAction.columnKeys[0], row: viewAction.rowKeys[0] }; } @@ -267,7 +267,7 @@ export const DataGridTable = observer(function DataGridT if (filteredRows.length > 0) { const editor = tableData.editor; - const firstRow = filteredRows[0]; + const firstRow = filteredRows[0]!; const editingState = tableData.editor.getElementState(firstRow); editor.delete(...filteredRows); @@ -318,7 +318,7 @@ export const DataGridTable = observer(function DataGridT return; } - const key = data.value[data.value.length - 1].key; + const key = data.value[data.value.length - 1]!.key; const idx = tableData.getColumnIndexFromColumnKey(key.column); const rowIdx = tableData.getRowIndexFromKey(key.row); diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.tsx index 815ec878bd..549f032835 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.tsx @@ -12,13 +12,13 @@ import { getComputed, s, useObjectRef, useS } from '@cloudbeaver/core-blocks'; import type { RenderCellProps } from '@cloudbeaver/plugin-data-grid'; import type { IDataPresentationActions, IResultSetElementKey, IResultSetRowKey } from '@cloudbeaver/plugin-data-viewer'; -import { EditingContext } from '../../Editing/EditingContext'; -import { CellContext } from '../CellRenderer/CellContext'; -import { DataGridContext } from '../DataGridContext'; -import { TableDataContext } from '../TableDataContext'; +import { EditingContext } from '../../Editing/EditingContext.js'; +import { CellContext } from '../CellRenderer/CellContext.js'; +import { DataGridContext } from '../DataGridContext.js'; +import { TableDataContext } from '../TableDataContext.js'; import style from './CellFormatter.module.css'; -import { CellFormatterFactory } from './CellFormatterFactory'; -import { CellMenu } from './Menu/CellMenu'; +import { CellFormatterFactory } from './CellFormatterFactory.js'; +import { CellMenu } from './Menu/CellMenu.js'; interface Props extends RenderCellProps { className?: string; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatterFactory.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatterFactory.tsx index e7b2debe19..491f7f99f5 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatterFactory.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatterFactory.tsx @@ -9,13 +9,13 @@ import { observer } from 'mobx-react-lite'; import { useContext, useRef } from 'react'; import type { RenderCellProps } from '@cloudbeaver/plugin-data-grid'; -import { IResultSetRowKey, isBooleanValuePresentationAvailable } from '@cloudbeaver/plugin-data-viewer'; +import { type IResultSetRowKey, isBooleanValuePresentationAvailable } from '@cloudbeaver/plugin-data-viewer'; -import { CellContext } from '../CellRenderer/CellContext'; -import { TableDataContext } from '../TableDataContext'; -import { BlobFormatter } from './CellFormatters/BlobFormatter'; -import { BooleanFormatter } from './CellFormatters/BooleanFormatter'; -import { TextFormatter } from './CellFormatters/TextFormatter'; +import { CellContext } from '../CellRenderer/CellContext.js'; +import { TableDataContext } from '../TableDataContext.js'; +import { BlobFormatter } from './CellFormatters/BlobFormatter.js'; +import { BooleanFormatter } from './CellFormatters/BooleanFormatter.js'; +import { TextFormatter } from './CellFormatters/TextFormatter.js'; interface IProps extends RenderCellProps { isEditing: boolean; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/BlobFormatter.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/BlobFormatter.tsx index bc923d03b6..5da685ae7c 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/BlobFormatter.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/BlobFormatter.tsx @@ -12,10 +12,10 @@ import { getComputed, s, useS } from '@cloudbeaver/core-blocks'; import type { RenderCellProps } from '@cloudbeaver/plugin-data-grid'; import { type IResultSetRowKey, isResultSetContentValue } from '@cloudbeaver/plugin-data-viewer'; -import { EditingContext } from '../../../Editing/EditingContext'; -import { CellContext } from '../../CellRenderer/CellContext'; -import { DataGridContext } from '../../DataGridContext'; -import { TableDataContext } from '../../TableDataContext'; +import { EditingContext } from '../../../Editing/EditingContext.js'; +import { CellContext } from '../../CellRenderer/CellContext.js'; +import { DataGridContext } from '../../DataGridContext.js'; +import { TableDataContext } from '../../TableDataContext.js'; import style from './BlobFormatter.module.css'; export const BlobFormatter = observer>(function BlobFormatter({ column, row }) { diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/BooleanFormatter.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/BooleanFormatter.tsx index 71763cf618..abff08fd22 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/BooleanFormatter.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/BooleanFormatter.tsx @@ -12,10 +12,10 @@ import { getComputed, s, useS } from '@cloudbeaver/core-blocks'; import type { RenderCellProps } from '@cloudbeaver/plugin-data-grid'; import type { IResultSetRowKey } from '@cloudbeaver/plugin-data-viewer'; -import { EditingContext } from '../../../Editing/EditingContext'; -import { CellContext } from '../../CellRenderer/CellContext'; -import { DataGridContext } from '../../DataGridContext'; -import { TableDataContext } from '../../TableDataContext'; +import { EditingContext } from '../../../Editing/EditingContext.js'; +import { CellContext } from '../../CellRenderer/CellContext.js'; +import { DataGridContext } from '../../DataGridContext.js'; +import { TableDataContext } from '../../TableDataContext.js'; import style from './BooleanFormatter.module.css'; export const BooleanFormatter = observer>(function BooleanFormatter({ column, row }) { diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/TextFormatter.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/TextFormatter.tsx index 97213b5601..9dfd301993 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/TextFormatter.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatters/TextFormatter.tsx @@ -13,13 +13,13 @@ import { isValidUrl } from '@cloudbeaver/core-utils'; import type { RenderCellProps } from '@cloudbeaver/plugin-data-grid'; import type { IResultSetRowKey } from '@cloudbeaver/plugin-data-viewer'; -import { EditingContext } from '../../../Editing/EditingContext'; -import type { IEditorRef } from '../../CellEditor'; -import { CellContext } from '../../CellRenderer/CellContext'; -import { TableDataContext } from '../../TableDataContext'; +import { EditingContext } from '../../../Editing/EditingContext.js'; +import type { IEditorRef } from '../../CellEditor.js'; +import { CellContext } from '../../CellRenderer/CellContext.js'; +import { TableDataContext } from '../../TableDataContext.js'; import styles from './TextFormatter.module.css'; -const CellEditor = importLazyComponent(() => import('../../CellEditor').then(module => module.CellEditor)); +const CellEditor = importLazyComponent(() => import('../../CellEditor.js').then(module => module.CellEditor)); export const TextFormatter = observer>(function TextFormatter({ row, column }) { const editorRef = useRef(null); diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/IndexFormatter.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/IndexFormatter.tsx index e6dd505972..d78a77dc7d 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/IndexFormatter.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/IndexFormatter.tsx @@ -11,7 +11,7 @@ import { useContext } from 'react'; import type { RenderCellProps } from '@cloudbeaver/plugin-data-grid'; import type { IResultSetRowKey } from '@cloudbeaver/plugin-data-viewer'; -import { CellContext } from '../CellRenderer/CellContext'; +import { CellContext } from '../CellRenderer/CellContext.js'; export const IndexFormatter: React.FC> = observer(function IndexFormatter(props) { const context = useContext(CellContext); diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/Menu/CellMenu.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/Menu/CellMenu.tsx index 7203b16afa..26dc0dabe5 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/Menu/CellMenu.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/Menu/CellMenu.tsx @@ -7,12 +7,12 @@ */ import { observer } from 'mobx-react-lite'; -import { Icon, MenuPanelItemAndTriggerStyles, MenuTrigger, s, SContext, StyleRegistry, useS } from '@cloudbeaver/core-blocks'; +import { Icon, MenuPanelItemAndTriggerStyles, MenuTrigger, s, SContext, type StyleRegistry, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; import type { IDatabaseDataModel, IDataPresentationActions, IDataTableActions, IResultSetElementKey } from '@cloudbeaver/plugin-data-viewer'; -import { DataGridContextMenuService } from '../../DataGridContextMenu/DataGridContextMenuService'; +import { DataGridContextMenuService } from '../../DataGridContextMenu/DataGridContextMenuService.js'; import styles from './CellMenu.module.css'; interface Props { diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/OrderButton.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/OrderButton.tsx index caa24d0795..51736ef6de 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/OrderButton.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/OrderButton.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { IconOrImage, s, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import { DatabaseDataConstraintAction, EOrder, getNextOrder, IDatabaseDataModel, ResultSetDataSource } from '@cloudbeaver/plugin-data-viewer'; +import { DatabaseDataConstraintAction, EOrder, getNextOrder, type IDatabaseDataModel, ResultSetDataSource } from '@cloudbeaver/plugin-data-viewer'; import style from './OrderButton.module.css'; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/TableColumnHeader.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/TableColumnHeader.tsx index 907430caf7..ca6b2e6678 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/TableColumnHeader.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/TableColumnHeader.tsx @@ -13,12 +13,12 @@ import type { SqlResultColumn } from '@cloudbeaver/core-sdk'; import type { RenderHeaderCellProps } from '@cloudbeaver/plugin-data-grid'; import { DatabaseDataConstraintAction, isResultSetDataModel, ResultSetDataSource } from '@cloudbeaver/plugin-data-viewer'; -import { DataGridContext } from '../DataGridContext'; -import { DataGridSelectionContext } from '../DataGridSelection/DataGridSelectionContext'; -import { TableDataContext } from '../TableDataContext'; -import { OrderButton } from './OrderButton'; +import { DataGridContext } from '../DataGridContext.js'; +import { DataGridSelectionContext } from '../DataGridSelection/DataGridSelectionContext.js'; +import { TableDataContext } from '../TableDataContext.js'; +import { OrderButton } from './OrderButton.js'; import style from './TableColumnHeader.module.css'; -import { useTableColumnDnD } from './useTableColumnDnD'; +import { useTableColumnDnD } from './useTableColumnDnD.js'; export const TableColumnHeader = observer>(function TableColumnHeader({ column: calculatedColumn }) { const dataGridContext = useContext(DataGridContext); diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/TableIndexColumnHeader.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/TableIndexColumnHeader.tsx index 3b5a35adb3..d6ef14007c 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/TableIndexColumnHeader.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/TableIndexColumnHeader.tsx @@ -11,9 +11,9 @@ import { useContext } from 'react'; import { getComputed, IconOrImage, s, useS, useTranslate } from '@cloudbeaver/core-blocks'; import type { RenderHeaderCellProps } from '@cloudbeaver/plugin-data-grid'; -import { DataGridContext } from '../DataGridContext'; -import { DataGridSelectionContext } from '../DataGridSelection/DataGridSelectionContext'; -import { TableDataContext } from '../TableDataContext'; +import { DataGridContext } from '../DataGridContext.js'; +import { DataGridSelectionContext } from '../DataGridSelection/DataGridSelectionContext.js'; +import { TableDataContext } from '../TableDataContext.js'; import style from './TableIndexColumnHeader.module.css'; export const TableIndexColumnHeader = observer>(function TableIndexColumnHeader(props) { diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/useTableColumnDnD.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/useTableColumnDnD.ts index 92ae83b8ed..b24d833ce2 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/useTableColumnDnD.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/TableColumnHeader/useTableColumnDnD.ts @@ -7,13 +7,13 @@ */ import { useCombinedRef } from '@cloudbeaver/core-blocks'; import { useDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; -import { IDNDBox, IDNDData, useDNDBox, useDNDData } from '@cloudbeaver/core-ui'; +import { type IDNDBox, type IDNDData, useDNDBox, useDNDData } from '@cloudbeaver/core-ui'; import { DATA_CONTEXT_DV_DDM, DATA_CONTEXT_DV_DDM_RESULT_INDEX, DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY, - IDatabaseDataModel, - IResultSetColumnKey, + type IDatabaseDataModel, + type IResultSetColumnKey, isResultSetDataModel, ResultSetDataSource, ResultSetViewAction, diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useGridSelectedCellsCopy.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useGridSelectedCellsCopy.ts index 19ea8c2d80..f5d94a00d8 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useGridSelectedCellsCopy.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useGridSelectedCellsCopy.ts @@ -14,15 +14,15 @@ import { copyToClipboard } from '@cloudbeaver/core-utils'; import { DatabaseSelectAction, DataViewerService, - IResultSetColumnKey, - IResultSetElementKey, + type IResultSetColumnKey, + type IResultSetElementKey, ResultSetDataKeysUtils, ResultSetSelectAction, useDataViewerCopyHandler, } from '@cloudbeaver/plugin-data-viewer'; -import type { IDataGridSelectionContext } from './DataGridSelection/DataGridSelectionContext'; -import type { ITableData } from './TableDataContext'; +import type { IDataGridSelectionContext } from './DataGridSelection/DataGridSelectionContext.js'; +import type { ITableData } from './TableDataContext.js'; const EVENT_KEY_CODE = { C: 'KeyC', @@ -34,7 +34,7 @@ function getCellCopyValue(tableData: ITableData, key: IResultSetElementKey): str function getSelectedCellsValue(tableData: ITableData, selectedCells: Map) { const orderedSelectedCells = new Map( - [...selectedCells].sort((a, b) => tableData.getRowIndexFromKey(a[1][0].row) - tableData.getRowIndexFromKey(b[1][0].row)), + [...selectedCells].sort((a, b) => tableData.getRowIndexFromKey(a[1]![0]!.row) - tableData.getRowIndexFromKey(b[1]![0]!.row)), ); const selectedColumns: IResultSetColumnKey[] = []; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useTableData.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useTableData.tsx index c559d7922a..baef6a9960 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useTableData.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useTableData.tsx @@ -10,11 +10,10 @@ import { computed, observable } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import type { Column } from '@cloudbeaver/plugin-data-grid'; import { - DatabaseDataConstraintAction, - IDatabaseDataModel, - IResultSetColumnKey, - IResultSetElementKey, - IResultSetRowKey, + type IDatabaseDataModel, + type IResultSetColumnKey, + type IResultSetElementKey, + type IResultSetRowKey, ResultSetDataAction, ResultSetDataContentAction, ResultSetDataKeysUtils, @@ -24,11 +23,11 @@ import { ResultSetViewAction, } from '@cloudbeaver/plugin-data-viewer'; -import { IndexFormatter } from './Formatters/IndexFormatter'; -import { TableColumnHeader } from './TableColumnHeader/TableColumnHeader'; -import { TableIndexColumnHeader } from './TableColumnHeader/TableIndexColumnHeader'; -import type { ITableData } from './TableDataContext'; -import { useTableDataMeasurements } from './useTableDataMeasurements'; +import { IndexFormatter } from './Formatters/IndexFormatter.js'; +import { TableColumnHeader } from './TableColumnHeader/TableColumnHeader.js'; +import { TableIndexColumnHeader } from './TableColumnHeader/TableIndexColumnHeader.js'; +import type { ITableData } from './TableDataContext.js'; +import { useTableDataMeasurements } from './useTableDataMeasurements.js'; export const indexColumn: Column = { key: 'index', @@ -90,7 +89,7 @@ export function useTableData( let left = 0; for (let i = 0; i < columnIndex; i++) { - const column = this.columns[i]; + const column = this.columns[i]!; left += column.width as number; } @@ -126,9 +125,9 @@ export function useTableData( getRowIndexFromKey(rowKey) { return this.rows.findIndex(row => ResultSetDataKeysUtils.isEqual(rowKey, row)); }, - getColumnsInRange(startIndex, endIndex) { + getColumnsInRange(startIndex, endIndex): Column[] { if (startIndex === endIndex) { - return [this.columns[startIndex]]; + return [this.columns[startIndex]!]; } const firstIndex = Math.min(startIndex, endIndex); diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useTableDataMeasurements.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useTableDataMeasurements.ts index 21a1941c23..6f031adbd6 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useTableDataMeasurements.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/useTableDataMeasurements.ts @@ -69,7 +69,7 @@ export function useTableDataMeasurements(model: IDatabaseDataModel width + COLUMN_PADDING); - const width = Math.min(COLUMN_HEADER_MAX_WIDTH, Math.max(columnsWidth[0], cellsWidth[0] ?? 0)); + const width = Math.min(COLUMN_HEADER_MAX_WIDTH, Math.max(columnsWidth[0]!, cellsWidth[0] ?? 0)); this.cache.set(serializedKey, width); }, diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGridSettingsService.test.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGridSettingsService.test.ts index 7906a90768..b8370bfd0f 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGridSettingsService.test.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGridSettingsService.test.ts @@ -10,7 +10,7 @@ import { expect, test } from '@jest/globals'; import { coreAdministrationManifest } from '@cloudbeaver/core-administration'; import { coreAppManifest } from '@cloudbeaver/core-app'; import { coreAuthenticationManifest } from '@cloudbeaver/core-authentication'; -import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication'; +import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication.js'; import { coreBrowserManifest } from '@cloudbeaver/core-browser'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreConnectionsManifest } from '@cloudbeaver/core-connections'; @@ -20,18 +20,18 @@ import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreNavigationTree } from '@cloudbeaver/core-navigation-tree'; import { coreProjectsManifest } from '@cloudbeaver/core-projects'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreRoutingManifest } from '@cloudbeaver/core-routing'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { coreStorageManifest } from '@cloudbeaver/core-storage'; import { coreUIManifest } from '@cloudbeaver/core-ui'; import { coreViewManifest } from '@cloudbeaver/core-view'; @@ -42,8 +42,8 @@ import { navigationTreePlugin } from '@cloudbeaver/plugin-navigation-tree'; import { objectViewerManifest } from '@cloudbeaver/plugin-object-viewer'; import { createApp } from '@cloudbeaver/tests-runner'; -import { DataGridSettingsService } from './DataGridSettingsService'; -import { dataSpreadsheetNewManifest } from './manifest'; +import { DataGridSettingsService } from './DataGridSettingsService.js'; +import { dataSpreadsheetNewManifest } from './manifest.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/Editing/useEditing.ts b/webapp/packages/plugin-data-spreadsheet-new/src/Editing/useEditing.ts index a56dbde8d0..e2543b300d 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/Editing/useEditing.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/Editing/useEditing.ts @@ -11,7 +11,7 @@ import { useState } from 'react'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import type { CellPosition, IEditingContext } from './EditingContext'; +import type { CellPosition, IEditingContext } from './EditingContext.js'; interface IEditingState { editing: boolean; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/LocaleService.ts b/webapp/packages/plugin-data-spreadsheet-new/src/LocaleService.ts index 483bb120d5..e74d5b618b 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/LocaleService.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/LocaleService.ts @@ -14,26 +14,24 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; case 'de': - return (await import('./locales/de')).default; + return (await import('./locales/de.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/SpreadsheetBootstrap.ts b/webapp/packages/plugin-data-spreadsheet-new/src/SpreadsheetBootstrap.ts index 72a8c94f45..415d03a409 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/SpreadsheetBootstrap.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/SpreadsheetBootstrap.ts @@ -11,14 +11,14 @@ import { ExceptionsCatcherService } from '@cloudbeaver/core-events'; import { ResultDataFormat } from '@cloudbeaver/core-sdk'; import { DataPresentationService } from '@cloudbeaver/plugin-data-viewer'; -import { DataGridContextMenuCellEditingService } from './DataGrid/DataGridContextMenu/DataGridContextMenuCellEditingService'; -import { DataGridContextMenuFilterService } from './DataGrid/DataGridContextMenu/DataGridContextMenuFilter/DataGridContextMenuFilterService'; -import { DataGridContextMenuOrderService } from './DataGrid/DataGridContextMenu/DataGridContextMenuOrderService'; -import { DataGridContextMenuSaveContentService } from './DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService'; -import { DataGridContextMenuService } from './DataGrid/DataGridContextMenu/DataGridContextMenuService'; -import { DataGridSettingsService } from './DataGridSettingsService'; +import { DataGridContextMenuCellEditingService } from './DataGrid/DataGridContextMenu/DataGridContextMenuCellEditingService.js'; +import { DataGridContextMenuFilterService } from './DataGrid/DataGridContextMenu/DataGridContextMenuFilter/DataGridContextMenuFilterService.js'; +import { DataGridContextMenuOrderService } from './DataGrid/DataGridContextMenu/DataGridContextMenuOrderService.js'; +import { DataGridContextMenuSaveContentService } from './DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.js'; +import { DataGridContextMenuService } from './DataGrid/DataGridContextMenu/DataGridContextMenuService.js'; +import { DataGridSettingsService } from './DataGridSettingsService.js'; -const SpreadsheetGrid = importLazyComponent(() => import('./SpreadsheetGrid').then(m => m.SpreadsheetGrid)); +const SpreadsheetGrid = importLazyComponent(() => import('./SpreadsheetGrid.js').then(m => m.SpreadsheetGrid)); @injectable() export class SpreadsheetBootstrap extends Bootstrap { @@ -36,7 +36,7 @@ export class SpreadsheetBootstrap extends Bootstrap { exceptionsCatcherService.ignore('ResizeObserver loop completed with undelivered notifications.'); // Produces by react-data-grid } - register(): void | Promise { + override register(): void | Promise { this.dataPresentationService.add({ id: 'spreadsheet_grid', dataFormat: ResultDataFormat.Resultset, @@ -66,6 +66,4 @@ export class SpreadsheetBootstrap extends Bootstrap { }, }); } - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/SpreadsheetGrid.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/SpreadsheetGrid.tsx index f0a747957b..96c018b148 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/SpreadsheetGrid.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/SpreadsheetGrid.tsx @@ -7,7 +7,7 @@ */ import type { IDataPresentationProps } from '@cloudbeaver/plugin-data-viewer'; -import { DataGridLoader } from './DataGrid/DataGridLoader'; +import { DataGridLoader } from './DataGrid/DataGridLoader.js'; export const SpreadsheetGrid: React.FC = function SpreadsheetGrid(props) { return ; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/index.ts b/webapp/packages/plugin-data-spreadsheet-new/src/index.ts index ab5e0e1f96..73ac170d73 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/index.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/index.ts @@ -1 +1,8 @@ -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/manifest.ts b/webapp/packages/plugin-data-spreadsheet-new/src/manifest.ts index a1d6a1e2d5..c82f27c91b 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/manifest.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/manifest.ts @@ -10,16 +10,16 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const dataSpreadsheetNewManifest: PluginManifest = { info: { name: 'New spreadsheet implementation' }, providers: [ - () => import('./SpreadsheetBootstrap').then(m => m.SpreadsheetBootstrap), - () => import('./DataGridSettingsService').then(m => m.DataGridSettingsService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./DataGrid/DataGridContextMenu/DataGridContextMenuService').then(m => m.DataGridContextMenuService), - () => import('./DataGrid/DataGridContextMenu/DataGridContextMenuOrderService').then(m => m.DataGridContextMenuOrderService), + () => import('./SpreadsheetBootstrap.js').then(m => m.SpreadsheetBootstrap), + () => import('./DataGridSettingsService.js').then(m => m.DataGridSettingsService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./DataGrid/DataGridContextMenu/DataGridContextMenuService.js').then(m => m.DataGridContextMenuService), + () => import('./DataGrid/DataGridContextMenu/DataGridContextMenuOrderService.js').then(m => m.DataGridContextMenuOrderService), () => - import('./DataGrid/DataGridContextMenu/DataGridContextMenuFilter/DataGridContextMenuFilterService').then( + import('./DataGrid/DataGridContextMenu/DataGridContextMenuFilter/DataGridContextMenuFilterService.js').then( m => m.DataGridContextMenuFilterService, ), - () => import('./DataGrid/DataGridContextMenu/DataGridContextMenuCellEditingService').then(m => m.DataGridContextMenuCellEditingService), - () => import('./DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService').then(m => m.DataGridContextMenuSaveContentService), + () => import('./DataGrid/DataGridContextMenu/DataGridContextMenuCellEditingService.js').then(m => m.DataGridContextMenuCellEditingService), + () => import('./DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.js').then(m => m.DataGridContextMenuSaveContentService), ], }; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/package.json b/webapp/packages/plugin-data-viewer-result-set-grouping/package.json index 312d8f5081..3ccc8f0ee5 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/package.json +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-data-viewer-result-set-grouping", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVGroupingColumnEditorDialog/DVGroupingColumnEditorDialog.tsx b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVGroupingColumnEditorDialog/DVGroupingColumnEditorDialog.tsx index acca9f7b21..5a0d7e9bda 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVGroupingColumnEditorDialog/DVGroupingColumnEditorDialog.tsx +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVGroupingColumnEditorDialog/DVGroupingColumnEditorDialog.tsx @@ -22,9 +22,9 @@ import { } from '@cloudbeaver/core-blocks'; import type { DialogComponentProps } from '@cloudbeaver/core-dialogs'; -import type { IResultSetGroupingData } from '../DataContext/DATA_CONTEXT_DV_DDM_RS_GROUPING'; +import type { IResultSetGroupingData } from '../DataContext/DATA_CONTEXT_DV_DDM_RS_GROUPING.js'; import styles from './DVGroupingColumnEditorDialog.module.css'; -import { GroupingColumnEditorTable } from './GroupingColumnEditorTable'; +import { GroupingColumnEditorTable } from './GroupingColumnEditorTable.js'; interface Payload { grouping: IResultSetGroupingData; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVGroupingColumnEditorDialog/GroupingColumnEditorTable.tsx b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVGroupingColumnEditorDialog/GroupingColumnEditorTable.tsx index a4700fdfac..fa028a09ac 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVGroupingColumnEditorDialog/GroupingColumnEditorTable.tsx +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVGroupingColumnEditorDialog/GroupingColumnEditorTable.tsx @@ -11,7 +11,7 @@ import { useState } from 'react'; import { Button, Container, Form, Group, GroupTitle, InputField, s, Table, TableBody, useS } from '@cloudbeaver/core-blocks'; import styles from './GroupingColumnEditorTable.module.css'; -import { GroupingTableItem } from './GroupingTableItem'; +import { GroupingTableItem } from './GroupingTableItem.js'; interface Props { title: string; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPluginBootstrap.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPluginBootstrap.ts index 1846d0b236..02a9bb92f8 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPluginBootstrap.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPluginBootstrap.ts @@ -19,24 +19,24 @@ import { DataPresentationService, DataPresentationType, DataViewerPresentationType, - IDatabaseDataModel, + type IDatabaseDataModel, isResultSetDataSource, ResultSetDataAction, ResultSetDataSource, ResultSetSelectAction, } from '@cloudbeaver/plugin-data-viewer'; -import { ACTION_DATA_VIEWER_GROUPING_CLEAR } from './Actions/ACTION_DATA_VIEWER_GROUPING_CLEAR'; -import { ACTION_DATA_VIEWER_GROUPING_CONFIGURE } from './Actions/ACTION_DATA_VIEWER_GROUPING_CONFIGURE'; -import { ACTION_DATA_VIEWER_GROUPING_REMOVE_COLUMN } from './Actions/ACTION_DATA_VIEWER_GROUPING_REMOVE_COLUMN'; -import { ACTION_DATA_VIEWER_GROUPING_SHOW_DUPLICATES } from './Actions/ACTION_DATA_VIEWER_GROUPING_SHOW_DUPLICATES'; -import { DATA_CONTEXT_DV_DDM_RS_GROUPING } from './DataContext/DATA_CONTEXT_DV_DDM_RS_GROUPING'; +import { ACTION_DATA_VIEWER_GROUPING_CLEAR } from './Actions/ACTION_DATA_VIEWER_GROUPING_CLEAR.js'; +import { ACTION_DATA_VIEWER_GROUPING_CONFIGURE } from './Actions/ACTION_DATA_VIEWER_GROUPING_CONFIGURE.js'; +import { ACTION_DATA_VIEWER_GROUPING_REMOVE_COLUMN } from './Actions/ACTION_DATA_VIEWER_GROUPING_REMOVE_COLUMN.js'; +import { ACTION_DATA_VIEWER_GROUPING_SHOW_DUPLICATES } from './Actions/ACTION_DATA_VIEWER_GROUPING_SHOW_DUPLICATES.js'; +import { DATA_CONTEXT_DV_DDM_RS_GROUPING } from './DataContext/DATA_CONTEXT_DV_DDM_RS_GROUPING.js'; const DVGroupingColumnEditorDialog = importLazyComponent(() => - import('./DVGroupingColumnEditorDialog/DVGroupingColumnEditorDialog').then(module => module.DVGroupingColumnEditorDialog), + import('./DVGroupingColumnEditorDialog/DVGroupingColumnEditorDialog.js').then(module => module.DVGroupingColumnEditorDialog), ); const DVResultSetGroupingPresentation = importLazyComponent(() => - import('./DVResultSetGroupingPresentation').then(module => module.DVResultSetGroupingPresentation), + import('./DVResultSetGroupingPresentation.js').then(module => module.DVResultSetGroupingPresentation), ); @injectable() @@ -50,7 +50,7 @@ export class DVResultSetGroupingPluginBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.registerPresentation(); this.registerActions(); } diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPresentation.tsx b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPresentation.tsx index 108c90dd3a..f2ba43b907 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPresentation.tsx +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPresentation.tsx @@ -10,14 +10,14 @@ import { observer } from 'mobx-react-lite'; import { s, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { useTabLocalState } from '@cloudbeaver/core-ui'; import { CaptureViewScope } from '@cloudbeaver/core-view'; -import { DataPresentationComponent, isResultSetDataModel, TableViewerLoader } from '@cloudbeaver/plugin-data-viewer'; +import { type DataPresentationComponent, isResultSetDataModel, TableViewerLoader } from '@cloudbeaver/plugin-data-viewer'; -import { DEFAULT_GROUPING_QUERY_OPERATION } from './DEFAULT_GROUPING_QUERY_OPERATION'; +import { DEFAULT_GROUPING_QUERY_OPERATION } from './DEFAULT_GROUPING_QUERY_OPERATION.js'; import styles from './DVResultSetGroupingPresentation.module.css'; -import { DVResultSetGroupingPresentationContext } from './DVResultSetGroupingPresentationContext'; -import type { IDVResultSetGroupingPresentationState } from './IDVResultSetGroupingPresentationState'; -import { useGroupingDataModel } from './useGroupingDataModel'; -import { useGroupingDnDColumns } from './useGroupingDnDColumns'; +import { DVResultSetGroupingPresentationContext } from './DVResultSetGroupingPresentationContext.js'; +import type { IDVResultSetGroupingPresentationState } from './IDVResultSetGroupingPresentationState.js'; +import { useGroupingDataModel } from './useGroupingDataModel.js'; +import { useGroupingDnDColumns } from './useGroupingDnDColumns.js'; export const DVResultSetGroupingPresentation: DataPresentationComponent = observer(function DVResultSetGroupingPresentation({ model: unknownModel, diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPresentationContext.tsx b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPresentationContext.tsx index 9595c7bc76..4e73fc9531 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPresentationContext.tsx +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/DVResultSetGroupingPresentationContext.tsx @@ -9,9 +9,9 @@ import { observer } from 'mobx-react-lite'; import { useCaptureViewContext } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_DV_DDM_RS_GROUPING } from './DataContext/DATA_CONTEXT_DV_DDM_RS_GROUPING'; -import type { IDVResultSetGroupingPresentationState } from './IDVResultSetGroupingPresentationState'; -import { useGroupingData } from './useGroupingData'; +import { DATA_CONTEXT_DV_DDM_RS_GROUPING } from './DataContext/DATA_CONTEXT_DV_DDM_RS_GROUPING.js'; +import type { IDVResultSetGroupingPresentationState } from './IDVResultSetGroupingPresentationState.js'; +import { useGroupingData } from './useGroupingData.js'; interface Props { state: IDVResultSetGroupingPresentationState; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/GroupingDataSource.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/GroupingDataSource.ts index 8ce9a4f5e8..a946f26598 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/GroupingDataSource.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/GroupingDataSource.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import type { IDatabaseResultSet } from '@cloudbeaver/plugin-data-viewer'; -import { IDataQueryOptions, QueryDataSource } from '@cloudbeaver/plugin-sql-editor'; +import { type IDataQueryOptions, QueryDataSource } from '@cloudbeaver/plugin-sql-editor'; export interface IDataGroupingOptions extends IDataQueryOptions { query: string; @@ -17,7 +17,7 @@ export interface IDataGroupingOptions extends IDataQueryOptions { } export class GroupingDataSource extends QueryDataSource { - async request(prevResults: IDatabaseResultSet[]): Promise { + override async request(prevResults: IDatabaseResultSet[]): Promise { await this.generateQuery(); return await super.request(prevResults); } diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/IDVResultSetGroupingPresentationState.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/IDVResultSetGroupingPresentationState.ts index 3bd78a11ae..d82ad11182 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/IDVResultSetGroupingPresentationState.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/IDVResultSetGroupingPresentationState.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IGroupingQueryState } from './IGroupingQueryState'; +import type { IGroupingQueryState } from './IGroupingQueryState.js'; export interface IDVResultSetGroupingPresentationState extends IGroupingQueryState { presentationId: string; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/LocaleService.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/LocaleService.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/index.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/index.ts index dc9e65d40b..b9fc2fe7c9 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/index.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/index.ts @@ -1,4 +1,11 @@ -import { dvResultSetGroupingPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { dvResultSetGroupingPlugin } from './manifest.js'; export { dvResultSetGroupingPlugin }; export default dvResultSetGroupingPlugin; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/manifest.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/manifest.ts index 99caba3e54..ecd94844ad 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/manifest.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/manifest.ts @@ -10,7 +10,7 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const dvResultSetGroupingPlugin: PluginManifest = { info: { name: 'Result Set Grouping plugin' }, providers: [ - () => import('./DVResultSetGroupingPluginBootstrap').then(m => m.DVResultSetGroupingPluginBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./DVResultSetGroupingPluginBootstrap.js').then(m => m.DVResultSetGroupingPluginBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingData.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingData.ts index 7ae87f3162..189b2fa62a 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingData.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingData.ts @@ -9,9 +9,9 @@ import { action } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; -import type { IResultSetGroupingData } from './DataContext/DATA_CONTEXT_DV_DDM_RS_GROUPING'; -import { DEFAULT_GROUPING_QUERY_OPERATION } from './DEFAULT_GROUPING_QUERY_OPERATION'; -import type { IDVResultSetGroupingPresentationState } from './IDVResultSetGroupingPresentationState'; +import type { IResultSetGroupingData } from './DataContext/DATA_CONTEXT_DV_DDM_RS_GROUPING.js'; +import { DEFAULT_GROUPING_QUERY_OPERATION } from './DEFAULT_GROUPING_QUERY_OPERATION.js'; +import type { IDVResultSetGroupingPresentationState } from './IDVResultSetGroupingPresentationState.js'; export interface IPrivateGroupingData extends IResultSetGroupingData { state: IDVResultSetGroupingPresentationState; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingDataModel.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingDataModel.ts index 7310c8e382..6b224257dd 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingDataModel.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingDataModel.ts @@ -17,13 +17,13 @@ import { DatabaseDataAccessMode, DatabaseDataModel, DataViewerSettingsService, - IDatabaseDataModel, + type IDatabaseDataModel, ResultSetDataSource, TableViewerStorageService, } from '@cloudbeaver/plugin-data-viewer'; -import { GroupingDataSource } from './GroupingDataSource'; -import type { IGroupingQueryState } from './IGroupingQueryState'; +import { GroupingDataSource } from './GroupingDataSource.js'; +import type { IGroupingQueryState } from './IGroupingQueryState.js'; export interface IGroupingDataModel { model: IDatabaseDataModel; diff --git a/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingDnDColumns.ts b/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingDnDColumns.ts index b429d734ee..6153b40b16 100644 --- a/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingDnDColumns.ts +++ b/webapp/packages/plugin-data-viewer-result-set-grouping/src/useGroupingDnDColumns.ts @@ -5,20 +5,20 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { IDNDBox, useDNDBox } from '@cloudbeaver/core-ui'; +import { type IDNDBox, useDNDBox } from '@cloudbeaver/core-ui'; import { DATA_CONTEXT_DV_DDM, DATA_CONTEXT_DV_DDM_RESULT_INDEX, DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY, - IDatabaseDataModel, - IResultSetColumnKey, + type IDatabaseDataModel, + type IResultSetColumnKey, isResultSetDataSource, ResultSetDataAction, ResultSetDataSource, } from '@cloudbeaver/plugin-data-viewer'; -import type { IGroupingQueryState } from './IGroupingQueryState'; -import type { IGroupingDataModel } from './useGroupingDataModel'; +import type { IGroupingQueryState } from './IGroupingQueryState.js'; +import type { IGroupingDataModel } from './useGroupingDataModel.js'; interface IGroupingQueryResult { dndBox: IDNDBox; diff --git a/webapp/packages/plugin-data-viewer-result-trace-details/package.json b/webapp/packages/plugin-data-viewer-result-trace-details/package.json index bc213d37a2..8dac1136cc 100644 --- a/webapp/packages/plugin-data-viewer-result-trace-details/package.json +++ b/webapp/packages/plugin-data-viewer-result-trace-details/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-data-viewer-result-trace-details", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-data-viewer-result-trace-details/src/DVResultTraceDetailsBootstrap.ts b/webapp/packages/plugin-data-viewer-result-trace-details/src/DVResultTraceDetailsBootstrap.ts index 1988effedb..abc8686d96 100644 --- a/webapp/packages/plugin-data-viewer-result-trace-details/src/DVResultTraceDetailsBootstrap.ts +++ b/webapp/packages/plugin-data-viewer-result-trace-details/src/DVResultTraceDetailsBootstrap.ts @@ -11,7 +11,7 @@ import { ResultDataFormat } from '@cloudbeaver/core-sdk'; import { DataPresentationService, DataPresentationType } from '@cloudbeaver/plugin-data-viewer'; const DVResultTraceDetailsPresentation = importLazyComponent(() => - import('./DVResultTraceDetailsPresentation').then(module => module.DVResultTraceDetailsPresentation), + import('./DVResultTraceDetailsPresentation.js').then(module => module.DVResultTraceDetailsPresentation), ); @injectable() @@ -20,7 +20,7 @@ export class DVResultTraceDetailsBootstrap extends Bootstrap { super(); } - register() { + override register() { this.dataPresentationService.add({ id: 'result-trace-details-presentation', type: DataPresentationType.toolsPanel, diff --git a/webapp/packages/plugin-data-viewer-result-trace-details/src/DVResultTraceDetailsPresentation.tsx b/webapp/packages/plugin-data-viewer-result-trace-details/src/DVResultTraceDetailsPresentation.tsx index 2bb2d82d9b..4de085e436 100644 --- a/webapp/packages/plugin-data-viewer-result-trace-details/src/DVResultTraceDetailsPresentation.tsx +++ b/webapp/packages/plugin-data-viewer-result-trace-details/src/DVResultTraceDetailsPresentation.tsx @@ -8,13 +8,13 @@ import { observer } from 'mobx-react-lite'; import { s, TextPlaceholder, useAutoLoad, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import { DynamicTraceProperty } from '@cloudbeaver/core-sdk'; +import { type DynamicTraceProperty } from '@cloudbeaver/core-sdk'; import { type Column, DataGrid } from '@cloudbeaver/plugin-data-grid'; -import { type DataPresentationComponent, IDatabaseDataOptions, isResultSetDataModel, isResultSetDataSource } from '@cloudbeaver/plugin-data-viewer'; +import { type DataPresentationComponent, type IDatabaseDataOptions, isResultSetDataModel } from '@cloudbeaver/plugin-data-viewer'; import classes from './DVResultTraceDetailsPresentation.module.css'; -import { HeaderCell } from './ResultTraceDetailsTable/HeaderCell'; -import { useResultTraceDetails } from './useResultTraceDetails'; +import { HeaderCell } from './ResultTraceDetailsTable/HeaderCell.js'; +import { useResultTraceDetails } from './useResultTraceDetails.js'; const COLUMNS: Column[] = [ { diff --git a/webapp/packages/plugin-data-viewer-result-trace-details/src/LocaleService.ts b/webapp/packages/plugin-data-viewer-result-trace-details/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-data-viewer-result-trace-details/src/LocaleService.ts +++ b/webapp/packages/plugin-data-viewer-result-trace-details/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-data-viewer-result-trace-details/src/ResultTraceDetailsTable/HeaderCell.tsx b/webapp/packages/plugin-data-viewer-result-trace-details/src/ResultTraceDetailsTable/HeaderCell.tsx index d4b11ff939..d4486b558a 100644 --- a/webapp/packages/plugin-data-viewer-result-trace-details/src/ResultTraceDetailsTable/HeaderCell.tsx +++ b/webapp/packages/plugin-data-viewer-result-trace-details/src/ResultTraceDetailsTable/HeaderCell.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useTranslate } from '@cloudbeaver/core-blocks'; -import { DynamicTraceProperty } from '@cloudbeaver/core-sdk'; +import { type DynamicTraceProperty } from '@cloudbeaver/core-sdk'; import type { RenderHeaderCellProps } from '@cloudbeaver/plugin-data-grid'; export const HeaderCell = observer>(function HeaderCell(props) { diff --git a/webapp/packages/plugin-data-viewer-result-trace-details/src/index.ts b/webapp/packages/plugin-data-viewer-result-trace-details/src/index.ts index 51b8e7f461..6febf55292 100644 --- a/webapp/packages/plugin-data-viewer-result-trace-details/src/index.ts +++ b/webapp/packages/plugin-data-viewer-result-trace-details/src/index.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { dataViewerResultTraceDetailsPlugin } from './manifest'; +import { dataViewerResultTraceDetailsPlugin } from './manifest.js'; export default dataViewerResultTraceDetailsPlugin; export { dataViewerResultTraceDetailsPlugin }; diff --git a/webapp/packages/plugin-data-viewer-result-trace-details/src/manifest.ts b/webapp/packages/plugin-data-viewer-result-trace-details/src/manifest.ts index 8baf9b5970..f0bb2616c7 100644 --- a/webapp/packages/plugin-data-viewer-result-trace-details/src/manifest.ts +++ b/webapp/packages/plugin-data-viewer-result-trace-details/src/manifest.ts @@ -13,8 +13,8 @@ export const dataViewerResultTraceDetailsPlugin: PluginManifest = { }, providers: [ - () => import('./DVResultTraceDetailsBootstrap').then(m => m.DVResultTraceDetailsBootstrap), - () => import('./DVResultTraceDetailsService').then(m => m.DVResultTraceDetailsService), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./DVResultTraceDetailsBootstrap.js').then(m => m.DVResultTraceDetailsBootstrap), + () => import('./DVResultTraceDetailsService.js').then(m => m.DVResultTraceDetailsService), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-data-viewer-result-trace-details/src/useResultTraceDetails.tsx b/webapp/packages/plugin-data-viewer-result-trace-details/src/useResultTraceDetails.tsx index 5b3c39e15c..2d9fa0bca4 100644 --- a/webapp/packages/plugin-data-viewer-result-trace-details/src/useResultTraceDetails.tsx +++ b/webapp/packages/plugin-data-viewer-result-trace-details/src/useResultTraceDetails.tsx @@ -10,16 +10,16 @@ import { computed, observable } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import type { DynamicTraceProperty, GetSqlDynamicTraceMutation } from '@cloudbeaver/core-sdk'; -import { ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; import { DatabaseMetadataAction, - IDatabaseDataModel, - IResultSetElementKey, + type IDatabaseDataModel, + type IResultSetElementKey, ResultSetCacheAction, ResultSetDataSource, } from '@cloudbeaver/plugin-data-viewer'; -import { DVResultTraceDetailsService } from './DVResultTraceDetailsService'; +import { DVResultTraceDetailsService } from './DVResultTraceDetailsService.js'; type ResultTraceDetailsPromise = Promise; diff --git a/webapp/packages/plugin-data-viewer/package.json b/webapp/packages/plugin-data-viewer/package.json index a8de39ad99..5e89e2be5b 100644 --- a/webapp/packages/plugin-data-viewer/package.json +++ b/webapp/packages/plugin-data-viewer/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-data-viewer", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-data-viewer/src/ContainerDataSource.ts b/webapp/packages/plugin-data-viewer/src/ContainerDataSource.ts index 9c20a9310a..bce69e823d 100644 --- a/webapp/packages/plugin-data-viewer/src/ContainerDataSource.ts +++ b/webapp/packages/plugin-data-viewer/src/ContainerDataSource.ts @@ -15,18 +15,18 @@ import { AsyncTaskInfoService, GraphQLService, ResultDataFormat, - SqlExecuteInfo, - SqlQueryResults, - UpdateResultsDataBatchMutationVariables, + type SqlExecuteInfo, + type SqlQueryResults, + type UpdateResultsDataBatchMutationVariables, } from '@cloudbeaver/core-sdk'; import { uuid } from '@cloudbeaver/core-utils'; -import { DocumentEditAction } from './DatabaseDataModel/Actions/Document/DocumentEditAction'; -import type { IResultSetBlobValue } from './DatabaseDataModel/Actions/ResultSet/IResultSetBlobValue'; -import { ResultSetEditAction } from './DatabaseDataModel/Actions/ResultSet/ResultSetEditAction'; -import type { IDatabaseDataOptions } from './DatabaseDataModel/IDatabaseDataOptions'; -import type { IDatabaseResultSet } from './DatabaseDataModel/IDatabaseResultSet'; -import { ResultSetDataSource } from './ResultSet/ResultSetDataSource'; +import { DocumentEditAction } from './DatabaseDataModel/Actions/Document/DocumentEditAction.js'; +import type { IResultSetBlobValue } from './DatabaseDataModel/Actions/ResultSet/IResultSetBlobValue.js'; +import { ResultSetEditAction } from './DatabaseDataModel/Actions/ResultSet/ResultSetEditAction.js'; +import type { IDatabaseDataOptions } from './DatabaseDataModel/IDatabaseDataOptions.js'; +import type { IDatabaseResultSet } from './DatabaseDataModel/IDatabaseResultSet.js'; +import { ResultSetDataSource } from './ResultSet/ResultSetDataSource.js'; export interface IDataContainerOptions extends IDatabaseDataOptions { containerNodePath: string; @@ -35,11 +35,11 @@ export interface IDataContainerOptions extends IDatabaseDataOptions { export class ContainerDataSource extends ResultSetDataSource { currentTask: ITask | null; - get canCancel(): boolean { + override get canCancel(): boolean { return this.currentTask?.cancellable || false; } - get cancelled(): boolean { + override get cancelled(): boolean { return this.currentTask?.cancelled || false; } @@ -60,11 +60,11 @@ export class ContainerDataSource extends ResultSetDataSource { + override async cancel(): Promise { await super.cancel(); await this.currentTask?.cancel(); } @@ -215,7 +215,7 @@ export class ContainerDataSource extends ResultSetDataSource { + override register(): void | Promise { this.dataViewerTabService.registerTabHandler(); this.dataViewerTabService.register(); this.tableFooterMenuService.register(); diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerDataChangeConfirmationService.ts b/webapp/packages/plugin-data-viewer/src/DataViewerDataChangeConfirmationService.ts index 709e17736e..f1c6503ef6 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerDataChangeConfirmationService.ts +++ b/webapp/packages/plugin-data-viewer/src/DataViewerDataChangeConfirmationService.ts @@ -9,12 +9,12 @@ import { ConfirmationDialog } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; -import { executorHandlerFilter, ExecutorInterrupter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; +import { executorHandlerFilter, ExecutorInterrupter, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import { DatabaseEditAction } from './DatabaseDataModel/Actions/DatabaseEditAction'; -import type { IRequestEventData } from './DatabaseDataModel/IDatabaseDataModel'; -import { DatabaseDataSourceOperation } from './DatabaseDataModel/IDatabaseDataSource'; -import { TableViewerStorageService } from './TableViewer/TableViewerStorageService'; +import { DatabaseEditAction } from './DatabaseDataModel/Actions/DatabaseEditAction.js'; +import type { IRequestEventData } from './DatabaseDataModel/IDatabaseDataModel.js'; +import { DatabaseDataSourceOperation } from './DatabaseDataModel/IDatabaseDataSource.js'; +import { TableViewerStorageService } from './TableViewer/TableViewerStorageService.js'; @injectable() export class DataViewerDataChangeConfirmationService { diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerPage/DataViewerPanel.tsx b/webapp/packages/plugin-data-viewer/src/DataViewerPage/DataViewerPanel.tsx index fbdac373f0..29496f0829 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerPage/DataViewerPanel.tsx +++ b/webapp/packages/plugin-data-viewer/src/DataViewerPage/DataViewerPanel.tsx @@ -11,10 +11,10 @@ import { useCallback } from 'react'; import { TextPlaceholder, useAutoLoad, useTranslate } from '@cloudbeaver/core-blocks'; import type { ObjectPagePanelComponent } from '@cloudbeaver/plugin-object-viewer'; -import type { IDataViewerPageState } from '../IDataViewerPageState'; -import { TableViewerLoader } from '../TableViewer/TableViewerLoader'; +import type { IDataViewerPageState } from '../IDataViewerPageState.js'; +import { TableViewerLoader } from '../TableViewer/TableViewerLoader.js'; import classes from './DataViewerPanel.module.css'; -import { useDataViewerPanel } from './useDataViewerPanel'; +import { useDataViewerPanel } from './useDataViewerPanel.js'; export const DataViewerPanel: ObjectPagePanelComponent = observer(function DataViewerPanel({ tab, page }) { const translate = useTranslate(); @@ -63,7 +63,7 @@ export const DataViewerPanel: ObjectPagePanelComponent = o return ( = observer(function DataViewerTab({ tab, page, onSelect }) { const navNodeManagerService = useService(NavNodeManagerService); diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerPage/useDataViewerPanel.ts b/webapp/packages/plugin-data-viewer/src/DataViewerPage/useDataViewerPanel.ts index 8277447a77..21991950f3 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerPage/useDataViewerPanel.ts +++ b/webapp/packages/plugin-data-viewer/src/DataViewerPage/useDataViewerPanel.ts @@ -11,14 +11,14 @@ import { NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; import type { ITab } from '@cloudbeaver/plugin-navigation-tabs'; import type { IObjectViewerTabState } from '@cloudbeaver/plugin-object-viewer'; -import { ContainerDataSource } from '../ContainerDataSource'; -import { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel'; -import { DataPresentationService } from '../DataPresentationService'; -import { DataViewerDataChangeConfirmationService } from '../DataViewerDataChangeConfirmationService'; -import { DataViewerTableService } from '../DataViewerTableService'; -import { DataViewerTabService } from '../DataViewerTabService'; -import { TableViewerStorageService } from '../TableViewer/TableViewerStorageService'; -import { useDataViewerModel } from '../useDataViewerModel'; +import { ContainerDataSource } from '../ContainerDataSource.js'; +import { type IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel.js'; +import { DataPresentationService } from '../DataPresentationService.js'; +import { DataViewerDataChangeConfirmationService } from '../DataViewerDataChangeConfirmationService.js'; +import { DataViewerTableService } from '../DataViewerTableService.js'; +import { DataViewerTabService } from '../DataViewerTabService.js'; +import { TableViewerStorageService } from '../TableViewer/TableViewerStorageService.js'; +import { useDataViewerModel } from '../useDataViewerModel.js'; export function useDataViewerPanel(tab: ITab) { const dataViewerTableService = useService(DataViewerTableService); diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerService.ts b/webapp/packages/plugin-data-viewer/src/DataViewerService.ts index 03f96962e3..9c9383e7e3 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerService.ts +++ b/webapp/packages/plugin-data-viewer/src/DataViewerService.ts @@ -9,7 +9,7 @@ import type { Connection } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; -import { DataViewerSettingsService } from './DataViewerSettingsService'; +import { DataViewerSettingsService } from './DataViewerSettingsService.js'; @injectable() export class DataViewerService { diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.test.ts b/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.test.ts index 27531197f1..84c157715f 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.test.ts +++ b/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.test.ts @@ -10,7 +10,7 @@ import { beforeAll, describe, expect, test } from '@jest/globals'; import { coreAdministrationManifest } from '@cloudbeaver/core-administration'; import { coreAppManifest } from '@cloudbeaver/core-app'; import { coreAuthenticationManifest } from '@cloudbeaver/core-authentication'; -import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication'; +import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication.js'; import { coreBrowserManifest } from '@cloudbeaver/core-browser'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreConnectionsManifest } from '@cloudbeaver/core-connections'; @@ -20,18 +20,18 @@ import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreNavigationTree } from '@cloudbeaver/core-navigation-tree'; import { coreProjectsManifest } from '@cloudbeaver/core-projects'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreRoutingManifest } from '@cloudbeaver/core-routing'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { coreStorageManifest } from '@cloudbeaver/core-storage'; import { coreUIManifest } from '@cloudbeaver/core-ui'; import { coreViewManifest } from '@cloudbeaver/core-view'; @@ -41,8 +41,8 @@ import { navigationTreePlugin } from '@cloudbeaver/plugin-navigation-tree'; import { objectViewerManifest } from '@cloudbeaver/plugin-object-viewer'; import { createApp } from '@cloudbeaver/tests-runner'; -import { DataViewerSettingsService } from './DataViewerSettingsService'; -import { dataViewerManifest } from './manifest'; +import { DataViewerSettingsService } from './DataViewerSettingsService.js'; +import { dataViewerManifest } from './manifest.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.ts b/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.ts index ecd33d456a..4af707b9e4 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.ts +++ b/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.ts @@ -10,7 +10,7 @@ import { ServerSettingsManagerService } from '@cloudbeaver/core-root'; import { createSettingsAliasResolver, ESettingsValueType, - ISettingDescription, + type ISettingDescription, ROOT_SETTINGS_LAYER, SettingsManagerService, SettingsProvider, @@ -19,7 +19,7 @@ import { } from '@cloudbeaver/core-settings'; import { schema, schemaExtra } from '@cloudbeaver/core-utils'; -import { DATA_EDITOR_SETTINGS_GROUP } from './DATA_EDITOR_SETTINGS_GROUP'; +import { DATA_EDITOR_SETTINGS_GROUP } from './DATA_EDITOR_SETTINGS_GROUP.js'; const FETCH_MIN = 10; const FETCH_MAX = 5000; diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerTabService.ts b/webapp/packages/plugin-data-viewer/src/DataViewerTabService.ts index ed2b276f48..9cd6f1109f 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerTabService.ts +++ b/webapp/packages/plugin-data-viewer/src/DataViewerTabService.ts @@ -6,20 +6,26 @@ * you may not use this file except in compliance with the License. */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -import { ConnectionInfoResource, ConnectionsManagerService, IConnectionExecutorData } from '@cloudbeaver/core-connections'; +import { ConnectionInfoResource, ConnectionsManagerService, type IConnectionExecutorData } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorInterrupter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import { INodeNavigationData, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; +import { ExecutorInterrupter, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; +import { type INodeNavigationData, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; import { resourceKeyList } from '@cloudbeaver/core-resource'; -import { ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; -import { DBObjectPageService, IObjectViewerTabState, isObjectViewerTab, ObjectPage, ObjectViewerTabService } from '@cloudbeaver/plugin-object-viewer'; - -import type { IDataViewerPageState } from './IDataViewerPageState'; -import { TableViewerStorageService } from './TableViewer/TableViewerStorageService'; - -const DataViewerTab = importLazyComponent(() => import('./DataViewerPage/DataViewerTab').then(module => module.DataViewerTab)); -const DataViewerPanel = importLazyComponent(() => import('./DataViewerPage/DataViewerPanel').then(module => module.DataViewerPanel)); +import { type ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; +import { + DBObjectPageService, + type IObjectViewerTabState, + isObjectViewerTab, + ObjectPage, + ObjectViewerTabService, +} from '@cloudbeaver/plugin-object-viewer'; + +import type { IDataViewerPageState } from './IDataViewerPageState.js'; +import { TableViewerStorageService } from './TableViewer/TableViewerStorageService.js'; + +const DataViewerTab = importLazyComponent(() => import('./DataViewerPage/DataViewerTab.js').then(module => module.DataViewerTab)); +const DataViewerPanel = importLazyComponent(() => import('./DataViewerPage/DataViewerPanel.js').then(module => module.DataViewerPanel)); @injectable() export class DataViewerTabService { diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerTableService.ts b/webapp/packages/plugin-data-viewer/src/DataViewerTableService.ts index ed9aac9466..7b8ba3b633 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerTableService.ts +++ b/webapp/packages/plugin-data-viewer/src/DataViewerTableService.ts @@ -5,18 +5,18 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Connection, ConnectionExecutionContextService, createConnectionParam } from '@cloudbeaver/core-connections'; +import { type Connection, ConnectionExecutionContextService, createConnectionParam } from '@cloudbeaver/core-connections'; import { injectable, IServiceProvider } from '@cloudbeaver/core-di'; -import { EObjectFeature, NavNode, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; +import { EObjectFeature, type NavNode, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; import { AsyncTaskInfoService, GraphQLService } from '@cloudbeaver/core-sdk'; -import { ContainerDataSource } from './ContainerDataSource'; -import { DatabaseDataModel } from './DatabaseDataModel/DatabaseDataModel'; -import type { IDatabaseDataModel } from './DatabaseDataModel/IDatabaseDataModel'; -import { DatabaseDataAccessMode } from './DatabaseDataModel/IDatabaseDataSource'; -import { DataViewerService } from './DataViewerService'; -import { DataViewerSettingsService } from './DataViewerSettingsService'; -import { TableViewerStorageService } from './TableViewer/TableViewerStorageService'; +import { ContainerDataSource } from './ContainerDataSource.js'; +import { DatabaseDataModel } from './DatabaseDataModel/DatabaseDataModel.js'; +import type { IDatabaseDataModel } from './DatabaseDataModel/IDatabaseDataModel.js'; +import { DatabaseDataAccessMode } from './DatabaseDataModel/IDatabaseDataSource.js'; +import { DataViewerService } from './DataViewerService.js'; +import { DataViewerSettingsService } from './DataViewerSettingsService.js'; +import { TableViewerStorageService } from './TableViewer/TableViewerStorageService.js'; @injectable() export class DataViewerTableService { diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataActionDecorator.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataActionDecorator.ts index 0cf0b5dad8..c7032e799d 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataActionDecorator.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataActionDecorator.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IDatabaseDataActionInterface } from '../IDatabaseDataAction'; +import type { IDatabaseDataActionInterface } from '../IDatabaseDataAction.js'; const ACTION_PARAMS = 'custom:data-viewer/action/params'; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataConstraintAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataConstraintAction.ts index 32f249f729..4f53fc948e 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataConstraintAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataConstraintAction.ts @@ -7,15 +7,15 @@ */ import { computed, makeObservable } from 'mobx'; -import { DataTypeLogicalOperation, ResultDataFormat, SqlDataFilterConstraint } from '@cloudbeaver/core-sdk'; +import { type DataTypeLogicalOperation, ResultDataFormat, type SqlDataFilterConstraint } from '@cloudbeaver/core-sdk'; -import { DatabaseDataAction } from '../DatabaseDataAction'; -import type { IDatabaseDataOptions } from '../IDatabaseDataOptions'; -import type { IDatabaseDataSource } from '../IDatabaseDataSource'; -import type { IDatabaseResultSet } from '../IDatabaseResultSet'; -import { EOrder, Order } from '../Order'; -import { databaseDataAction } from './DatabaseDataActionDecorator'; -import type { IDatabaseDataConstraintAction } from './IDatabaseDataConstraintAction'; +import { DatabaseDataAction } from '../DatabaseDataAction.js'; +import type { IDatabaseDataOptions } from '../IDatabaseDataOptions.js'; +import type { IDatabaseDataSource } from '../IDatabaseDataSource.js'; +import type { IDatabaseResultSet } from '../IDatabaseResultSet.js'; +import { EOrder, type Order } from '../Order.js'; +import { databaseDataAction } from './DatabaseDataActionDecorator.js'; +import type { IDatabaseDataConstraintAction } from './IDatabaseDataConstraintAction.js'; export const IS_NULL_ID = 'IS_NULL'; export const IS_NOT_NULL_ID = 'IS_NOT_NULL'; @@ -252,7 +252,7 @@ export class DatabaseDataConstraintAction return currentConstraint.orderAsc ? EOrder.asc : EOrder.desc; } - updateResults(results: IDatabaseResultSet[]): void { + override updateResults(results: IDatabaseResultSet[]): void { const nextResult = results[this.resultIndex]; if (!this.source.options || results.length !== this.source.results.length || !nextResult) { return; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataResultAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataResultAction.ts index 0451104234..e63805b15f 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataResultAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataResultAction.ts @@ -7,11 +7,11 @@ */ import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { DatabaseDataAction } from '../DatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; -import type { IDatabaseDataSource } from '../IDatabaseDataSource'; -import { databaseDataAction } from './DatabaseDataActionDecorator'; -import type { IDatabaseDataResultAction } from './IDatabaseDataResultAction'; +import { DatabaseDataAction } from '../DatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; +import type { IDatabaseDataSource } from '../IDatabaseDataSource.js'; +import { databaseDataAction } from './DatabaseDataActionDecorator.js'; +import type { IDatabaseDataResultAction } from './IDatabaseDataResultAction.js'; @databaseDataAction() export abstract class DatabaseDataResultAction diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseEditAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseEditAction.ts index e46e98e3ac..7c3b276530 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseEditAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseEditAction.ts @@ -5,19 +5,19 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { DatabaseDataAction } from '../DatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; -import type { IDatabaseDataSource } from '../IDatabaseDataSource'; -import { databaseDataAction } from './DatabaseDataActionDecorator'; +import { DatabaseDataAction } from '../DatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; +import type { IDatabaseDataSource } from '../IDatabaseDataSource.js'; +import { databaseDataAction } from './DatabaseDataActionDecorator.js'; import type { DatabaseEditChangeType, IDatabaseDataEditAction, IDatabaseDataEditActionData, IDatabaseDataEditApplyActionData, -} from './IDatabaseDataEditAction'; +} from './IDatabaseDataEditAction.js'; @databaseDataAction() export abstract class DatabaseEditAction diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseMetadataAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseMetadataAction.ts index 053b4146d3..5caf236e2f 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseMetadataAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseMetadataAction.ts @@ -8,10 +8,10 @@ import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import { DatabaseDataAction } from '../DatabaseDataAction'; -import type { IDatabaseDataSource } from '../IDatabaseDataSource'; -import { databaseDataAction } from './DatabaseDataActionDecorator'; -import type { IDatabaseDataMetadataAction } from './IDatabaseDataMetadataAction'; +import { DatabaseDataAction } from '../DatabaseDataAction.js'; +import type { IDatabaseDataSource } from '../IDatabaseDataSource.js'; +import { databaseDataAction } from './DatabaseDataActionDecorator.js'; +import type { IDatabaseDataMetadataAction } from './IDatabaseDataMetadataAction.js'; @databaseDataAction() export class DatabaseMetadataAction extends DatabaseDataAction implements IDatabaseDataMetadataAction { diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseRefreshAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseRefreshAction.ts index 6d18444e15..82640825b8 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseRefreshAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseRefreshAction.ts @@ -9,10 +9,10 @@ import { observable } from 'mobx'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { DatabaseDataAction } from '../DatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; -import type { IDatabaseDataSource } from '../IDatabaseDataSource'; -import { databaseDataAction } from './DatabaseDataActionDecorator'; +import { DatabaseDataAction } from '../DatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; +import type { IDatabaseDataSource } from '../IDatabaseDataSource.js'; +import { databaseDataAction } from './DatabaseDataActionDecorator.js'; export interface IDatabaseRefreshState { interval: number; @@ -71,7 +71,7 @@ export class DatabaseRefreshAction extends this.state.paused = false; } - dispose(): void { + override dispose(): void { this.stopTimer(); } diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseSelectAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseSelectAction.ts index 098d0a3bb6..c49240d2c4 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseSelectAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseSelectAction.ts @@ -5,14 +5,14 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { DatabaseDataAction } from '../DatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; -import type { IDatabaseDataSource } from '../IDatabaseDataSource'; -import { databaseDataAction } from './DatabaseDataActionDecorator'; -import type { DatabaseDataSelectActionsData, IDatabaseDataSelectAction } from './IDatabaseDataSelectAction'; +import { DatabaseDataAction } from '../DatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; +import type { IDatabaseDataSource } from '../IDatabaseDataSource.js'; +import { databaseDataAction } from './DatabaseDataActionDecorator.js'; +import type { DatabaseDataSelectActionsData, IDatabaseDataSelectAction } from './IDatabaseDataSelectAction.js'; @databaseDataAction() export abstract class DatabaseSelectAction diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/Document/DocumentDataAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/Document/DocumentDataAction.ts index 515b013c27..a2a6f3ae0d 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/Document/DocumentDataAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/Document/DocumentDataAction.ts @@ -9,16 +9,16 @@ import { computed, makeObservable } from 'mobx'; import { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import type { IDatabaseDataSource } from '../../IDatabaseDataSource'; -import type { IDatabaseResultSet } from '../../IDatabaseResultSet'; -import { databaseDataAction } from '../DatabaseDataActionDecorator'; -import { DatabaseDataResultAction } from '../DatabaseDataResultAction'; -import type { IDatabaseDataDocument } from './IDatabaseDataDocument'; -import type { IDocumentElementKey } from './IDocumentElementKey'; +import type { IDatabaseDataSource } from '../../IDatabaseDataSource.js'; +import type { IDatabaseResultSet } from '../../IDatabaseResultSet.js'; +import { databaseDataAction } from '../DatabaseDataActionDecorator.js'; +import { DatabaseDataResultAction } from '../DatabaseDataResultAction.js'; +import type { IDatabaseDataDocument } from './IDatabaseDataDocument.js'; +import type { IDocumentElementKey } from './IDocumentElementKey.js'; @databaseDataAction() export class DocumentDataAction extends DatabaseDataResultAction { - static dataFormat = [ResultDataFormat.Document]; + static override dataFormat = [ResultDataFormat.Document]; get documents(): IDatabaseDataDocument[] { return this.result.data?.rowsWithMetaData?.map(row => row.data[0]) || []; @@ -60,7 +60,7 @@ export class DocumentDataAction extends DatabaseDataResultAction { - static dataFormat = [ResultDataFormat.Document]; + static override dataFormat = [ResultDataFormat.Document]; readonly editedElements: Map; private readonly data: DocumentDataAction; @@ -168,7 +168,7 @@ export class DocumentEditAction extends DatabaseEditAction extends IDatabaseDataAction { has(key: TKey, scope: symbol): boolean; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataConstraintAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataConstraintAction.ts index f6210bbc65..8b3b5c6123 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataConstraintAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataConstraintAction.ts @@ -7,9 +7,9 @@ */ import type { SqlDataFilterConstraint } from '@cloudbeaver/core-sdk'; -import type { IDatabaseDataAction } from '../IDatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; -import type { Order } from '../Order'; +import type { IDatabaseDataAction } from '../IDatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; +import type { Order } from '../Order.js'; export interface IDatabaseDataConstraintAction extends IDatabaseDataAction { readonly filterConstraints: SqlDataFilterConstraint[]; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataEditAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataEditAction.ts index 701de5b68b..97a8fe8206 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataEditAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataEditAction.ts @@ -7,8 +7,8 @@ */ import type { ISyncExecutor } from '@cloudbeaver/core-executor'; -import type { IDatabaseDataAction } from '../IDatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; +import type { IDatabaseDataAction } from '../IDatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; // order is matter, used for sorting and changes diff export enum DatabaseEditChangeType { diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataFormatAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataFormatAction.ts index fd6c43fc7c..e275bd74d8 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataFormatAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataFormatAction.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IDatabaseDataAction } from '../IDatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; +import type { IDatabaseDataAction } from '../IDatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; export interface IDatabaseDataFormatAction extends IDatabaseDataAction { isReadOnly: (key: TKey) => boolean; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataMetadataAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataMetadataAction.ts index 181de66694..8053e0fa6d 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataMetadataAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataMetadataAction.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IDatabaseDataAction } from '../IDatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; +import type { IDatabaseDataAction } from '../IDatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; export interface IDatabaseDataMetadataAction extends IDatabaseDataAction { get(key: string): T | undefined; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataResultAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataResultAction.ts index c83273bec1..d970cb3628 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataResultAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataResultAction.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IDatabaseDataAction } from '../IDatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; +import type { IDatabaseDataAction } from '../IDatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; export interface IDatabaseDataResultAction extends IDatabaseDataAction { readonly empty: boolean; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataSelectAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataSelectAction.ts index 11fe56ba01..a49645ff64 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataSelectAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataSelectAction.ts @@ -7,8 +7,8 @@ */ import type { ISyncExecutor } from '@cloudbeaver/core-executor'; -import type { IDatabaseDataAction } from '../IDatabaseDataAction'; -import type { IDatabaseDataResult } from '../IDatabaseDataResult'; +import type { IDatabaseDataAction } from '../IDatabaseDataAction.js'; +import type { IDatabaseDataResult } from '../IDatabaseDataResult.js'; export type DatabaseDataSelectActionsData = | { diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/DataContext/DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/DataContext/DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY.ts index cd786fb249..9bf0b811f1 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/DataContext/DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/DataContext/DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY.ts @@ -7,7 +7,7 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { IResultSetColumnKey } from '../IResultSetDataKey'; +import type { IResultSetColumnKey } from '../IResultSetDataKey.js'; export const DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY = createDataContext( 'data-viewer-database-data-model-result-set-column-key', diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetBinaryValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetBinaryValue.ts index 1cf8f3888a..2f135b2fc1 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetBinaryValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetBinaryValue.ts @@ -1,4 +1,11 @@ -import type { IResultSetContentValue } from './IResultSetContentValue'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import type { IResultSetContentValue } from './IResultSetContentValue.js'; export interface IResultSetBinaryValue extends IResultSetContentValue { binary: string; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetBlobValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetBlobValue.ts index 6a262ae82c..3a0c169630 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetBlobValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetBlobValue.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetFileValue } from './IResultSetFileValue'; +import type { IResultSetFileValue } from './IResultSetFileValue.js'; export interface IResultSetBlobValue extends IResultSetFileValue { blob: Blob; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetContentValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetContentValue.ts index 6e27869f28..381440a592 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetContentValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetContentValue.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetComplexValue } from './IResultSetComplexValue'; +import type { IResultSetComplexValue } from './IResultSetComplexValue.js'; export interface IResultSetContentValue extends IResultSetComplexValue { $type: 'content'; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetDataContentAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetDataContentAction.ts index 2cadad2189..5f648ac3b5 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetDataContentAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetDataContentAction.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetElementKey } from './IResultSetDataKey'; +import type { IResultSetElementKey } from './IResultSetDataKey.js'; export interface IResultSetDataContentAction { isLoading: (element: IResultSetElementKey) => boolean; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetFileValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetFileValue.ts index 8af75f11a0..d9030e5ca3 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetFileValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetFileValue.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetComplexValue } from './IResultSetComplexValue'; +import type { IResultSetComplexValue } from './IResultSetComplexValue.js'; export interface IResultSetFileValue extends IResultSetComplexValue { $type: 'file'; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetGeometryValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetGeometryValue.ts index 7656a8d27a..d0901f25c7 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetGeometryValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/IResultSetGeometryValue.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetComplexValue } from './IResultSetComplexValue'; +import type { IResultSetComplexValue } from './IResultSetComplexValue.js'; export interface IResultSetGeometryValue extends IResultSetComplexValue { $type: 'geometry'; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetCacheAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetCacheAction.ts index 4cde45648b..5a04f04691 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetCacheAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetCacheAction.ts @@ -9,13 +9,13 @@ import { action, makeObservable, observable } from 'mobx'; import { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { DatabaseDataAction } from '../../DatabaseDataAction'; -import type { IDatabaseDataSource } from '../../IDatabaseDataSource'; -import type { IDatabaseResultSet } from '../../IDatabaseResultSet'; -import { databaseDataAction } from '../DatabaseDataActionDecorator'; -import type { IDatabaseDataCacheAction } from '../IDatabaseDataCacheAction'; -import type { IResultSetElementKey, IResultSetRowKey } from './IResultSetDataKey'; -import { ResultSetDataAction } from './ResultSetDataAction'; +import { DatabaseDataAction } from '../../DatabaseDataAction.js'; +import type { IDatabaseDataSource } from '../../IDatabaseDataSource.js'; +import type { IDatabaseResultSet } from '../../IDatabaseResultSet.js'; +import { databaseDataAction } from '../DatabaseDataActionDecorator.js'; +import type { IDatabaseDataCacheAction } from '../IDatabaseDataCacheAction.js'; +import type { IResultSetElementKey, IResultSetRowKey } from './IResultSetDataKey.js'; +import { ResultSetDataAction } from './ResultSetDataAction.js'; @databaseDataAction() export class ResultSetCacheAction @@ -26,7 +26,10 @@ export class ResultSetCacheAction private readonly cache: Map>; - constructor(source: IDatabaseDataSource, private readonly data: ResultSetDataAction) { + constructor( + source: IDatabaseDataSource, + private readonly data: ResultSetDataAction, + ) { super(source); this.cache = new Map(); @@ -113,11 +116,11 @@ export class ResultSetCacheAction } } - afterResultUpdate() { + override afterResultUpdate() { this.cache.clear(); } - dispose(): void { + override dispose(): void { this.cache.clear(); } diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetDataAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetDataAction.ts index 53bfef3dcc..1e0ae96104 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetDataAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetDataAction.ts @@ -7,21 +7,21 @@ */ import { computed, makeObservable } from 'mobx'; -import { DataTypeLogicalOperation, ResultDataFormat, SqlResultColumn } from '@cloudbeaver/core-sdk'; - -import type { IDatabaseDataSource } from '../../IDatabaseDataSource'; -import type { IDatabaseResultSet } from '../../IDatabaseResultSet'; -import { databaseDataAction } from '../DatabaseDataActionDecorator'; -import { DatabaseDataResultAction } from '../DatabaseDataResultAction'; -import type { IResultSetContentValue } from './IResultSetContentValue'; -import type { IResultSetColumnKey, IResultSetElementKey, IResultSetRowKey } from './IResultSetDataKey'; -import { isResultSetContentValue } from './isResultSetContentValue'; -import { ResultSetDataKeysUtils } from './ResultSetDataKeysUtils'; -import type { IResultSetValue } from './ResultSetFormatAction'; +import { type DataTypeLogicalOperation, ResultDataFormat, type SqlResultColumn } from '@cloudbeaver/core-sdk'; + +import type { IDatabaseDataSource } from '../../IDatabaseDataSource.js'; +import type { IDatabaseResultSet } from '../../IDatabaseResultSet.js'; +import { databaseDataAction } from '../DatabaseDataActionDecorator.js'; +import { DatabaseDataResultAction } from '../DatabaseDataResultAction.js'; +import type { IResultSetContentValue } from './IResultSetContentValue.js'; +import type { IResultSetColumnKey, IResultSetElementKey, IResultSetRowKey } from './IResultSetDataKey.js'; +import { isResultSetContentValue } from './isResultSetContentValue.js'; +import { ResultSetDataKeysUtils } from './ResultSetDataKeysUtils.js'; +import type { IResultSetValue } from './ResultSetFormatAction.js'; @databaseDataAction() export class ResultSetDataAction extends DatabaseDataResultAction { - static dataFormat = [ResultDataFormat.Resultset]; + static override dataFormat = [ResultDataFormat.Resultset]; get rows() { return this.result.data?.rowsWithMetaData || []; @@ -95,7 +95,7 @@ export class ResultSetDataAction extends DatabaseDataResultAction { - static dataFormat = [ResultDataFormat.Resultset]; + static override dataFormat = [ResultDataFormat.Resultset]; - readonly applyAction: ISyncExecutor>; + override readonly applyAction: ISyncExecutor>; private readonly editorData: Map; private readonly data: ResultSetDataAction; @@ -528,7 +528,7 @@ export class ResultSetEditAction extends DatabaseEditAction { - static dataFormat = [ResultDataFormat.Resultset]; + static override dataFormat = [ResultDataFormat.Resultset]; get elements(): IResultSetElementKey[] { return Array.from(this.selectedElements.values()).flat(); } - readonly actions: ISyncExecutor>; + override readonly actions: ISyncExecutor>; readonly selectedElements: Map; private focusedElement: IResultSetElementKey | null; @@ -78,7 +78,7 @@ export class ResultSetSelectAction extends DatabaseSelectAction ResultSetDataKeysUtils.isEqual(key, focus.row))) { for (let index = focusIndex; index >= 0; index--) { - const previousElement = previous[index]; + const previousElement = previous[index]!; const row = current.find(key => ResultSetDataKeysUtils.isEqual(key, previousElement)); if (row) { @@ -87,7 +87,7 @@ export class ResultSetSelectAction extends DatabaseSelectAction ResultSetDataKeysUtils.isEqual(key, nextElement)); if (row) { @@ -96,7 +96,7 @@ export class ResultSetSelectAction extends DatabaseSelectAction 0) { - this.focus(data.value[data.value.length - 1].key); + this.focus(data.value[data.value.length - 1]!.key); } this.clear(); } @@ -361,13 +361,13 @@ export class ResultSetSelectAction extends DatabaseSelectAction 0) { - this.focus(data.value[0].key); + this.focus(data.value[0]!.key); this.clear(); } break; case DatabaseEditChangeType.update: if (data.value && data.value.length > 0) { - this.focus(data.value[data.value.length - 1].key); + this.focus(data.value[data.value.length - 1]!.key); } break; } diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetViewAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetViewAction.ts index ff10c9f8f5..1cc805781d 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetViewAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/ResultSetViewAction.ts @@ -7,21 +7,21 @@ */ import { action, computed, makeObservable, observable } from 'mobx'; -import { DataTypeLogicalOperation, ResultDataFormat, SqlResultColumn } from '@cloudbeaver/core-sdk'; - -import { DatabaseDataAction } from '../../DatabaseDataAction'; -import type { IDatabaseDataAction } from '../../IDatabaseDataAction'; -import type { IDatabaseDataSource } from '../../IDatabaseDataSource'; -import type { IDatabaseResultSet } from '../../IDatabaseResultSet'; -import { databaseDataAction } from '../DatabaseDataActionDecorator'; -import { compareResultSetRowKeys } from './compareResultSetRowKeys'; -import type { IResultSetComplexValue } from './IResultSetComplexValue'; -import type { IResultSetColumnKey, IResultSetElementKey, IResultSetRowKey } from './IResultSetDataKey'; -import { isResultSetContentValue } from './isResultSetContentValue'; -import { ResultSetDataAction } from './ResultSetDataAction'; -import { ResultSetDataKeysUtils } from './ResultSetDataKeysUtils'; -import { ResultSetEditAction } from './ResultSetEditAction'; -import type { IResultSetValue } from './ResultSetFormatAction'; +import { type DataTypeLogicalOperation, ResultDataFormat, type SqlResultColumn } from '@cloudbeaver/core-sdk'; + +import { DatabaseDataAction } from '../../DatabaseDataAction.js'; +import type { IDatabaseDataAction } from '../../IDatabaseDataAction.js'; +import type { IDatabaseDataSource } from '../../IDatabaseDataSource.js'; +import type { IDatabaseResultSet } from '../../IDatabaseResultSet.js'; +import { databaseDataAction } from '../DatabaseDataActionDecorator.js'; +import { compareResultSetRowKeys } from './compareResultSetRowKeys.js'; +import type { IResultSetComplexValue } from './IResultSetComplexValue.js'; +import type { IResultSetColumnKey, IResultSetElementKey, IResultSetRowKey } from './IResultSetDataKey.js'; +import { isResultSetContentValue } from './isResultSetContentValue.js'; +import { ResultSetDataAction } from './ResultSetDataAction.js'; +import { ResultSetDataKeysUtils } from './ResultSetDataKeysUtils.js'; +import { ResultSetEditAction } from './ResultSetEditAction.js'; +import type { IResultSetValue } from './ResultSetFormatAction.js'; @databaseDataAction() export class ResultSetViewAction extends DatabaseDataAction implements IDatabaseDataAction { @@ -40,7 +40,7 @@ export class ResultSetViewAction extends DatabaseDataAction this.data.columns[i]); + return this.columnsOrder.map(i => this.data.columns[i]!); } private columnsOrder: number[] = []; @@ -141,7 +141,7 @@ export class ResultSetViewAction extends DatabaseDataAction operation.argumentCount === 1 || operation.argumentCount === 0); } - updateResult(result: IDatabaseResultSet, index: number): void { + override updateResult(result: IDatabaseResultSet, index: number): void { super.updateResult(result, index); if (this.columnsOrder.length !== this.data.columns.length) { this.columnsOrder = this.data.columns.map((key, index) => index); diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/compareResultSetRowKeys.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/compareResultSetRowKeys.ts index a50c7601f5..cfd6bb079e 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/compareResultSetRowKeys.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/compareResultSetRowKeys.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetRowKey } from './IResultSetDataKey'; +import type { IResultSetRowKey } from './IResultSetDataKey.js'; export function compareResultSetRowKeys(a: IResultSetRowKey, b: IResultSetRowKey): number { // subIndex is used to sort rows with the same index diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetBlobValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetBlobValue.ts index c1104d2eed..347f83a172 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetBlobValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetBlobValue.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { createResultSetFileValue } from './createResultSetFileValue'; -import type { IResultSetBlobValue } from './IResultSetBlobValue'; +import { createResultSetFileValue } from './createResultSetFileValue.js'; +import type { IResultSetBlobValue } from './IResultSetBlobValue.js'; export function createResultSetBlobValue(blob: Blob, fileId?: string): IResultSetBlobValue { return { diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetContentValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetContentValue.ts index 8a49a820e1..570d0f7760 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetContentValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetContentValue.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetContentValue } from './IResultSetContentValue'; +import type { IResultSetContentValue } from './IResultSetContentValue.js'; export function createResultSetContentValue(data: Omit): IResultSetContentValue { return { diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetFileValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetFileValue.ts index d71f279034..606e18d1f1 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetFileValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/createResultSetFileValue.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetFileValue } from './IResultSetFileValue'; +import type { IResultSetFileValue } from './IResultSetFileValue.js'; export function createResultSetFileValue(fileId: string | null, contentType?: string, contentLength?: number): IResultSetFileValue { return { diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue.ts index 2301c3eea5..823609ff2e 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetBinaryValue } from './IResultSetBinaryValue'; -import { isResultSetContentValue } from './isResultSetContentValue'; +import type { IResultSetBinaryValue } from './IResultSetBinaryValue.js'; +import { isResultSetContentValue } from './isResultSetContentValue.js'; export function isResultSetBinaryValue(value: any): value is IResultSetBinaryValue { return isResultSetContentValue(value) && 'binary' in value; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.ts index 21bc2b3938..c8e8d8f1eb 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetBlobValue } from './IResultSetBlobValue'; -import { isResultSetFileValue } from './isResultSetFileValue'; +import type { IResultSetBlobValue } from './IResultSetBlobValue.js'; +import { isResultSetFileValue } from './isResultSetFileValue.js'; export function isResultSetBlobValue(value: any): value is IResultSetBlobValue { return isResultSetFileValue(value) && 'blob' in value && value.blob instanceof Blob; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetComplexValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetComplexValue.ts index 6d71d114c2..72523a0108 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetComplexValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetComplexValue.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetComplexValue } from './IResultSetComplexValue'; +import type { IResultSetComplexValue } from './IResultSetComplexValue.js'; export function isResultSetComplexValue(value: any): value is IResultSetComplexValue { return value !== null && typeof value === 'object' && '$type' in value && typeof value.$type === 'string'; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.ts index 1892bd1423..bddd5cfc7a 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetContentValue } from './IResultSetContentValue'; -import { isResultSetComplexValue } from './isResultSetComplexValue'; +import type { IResultSetContentValue } from './IResultSetContentValue.js'; +import { isResultSetComplexValue } from './isResultSetComplexValue.js'; export function isResultSetContentValue(value: any): value is IResultSetContentValue { return isResultSetComplexValue(value) && value.$type === 'content'; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetFileValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetFileValue.ts index ae7dc7b199..b12b891cc8 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetFileValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetFileValue.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetFileValue } from './IResultSetFileValue'; -import { isResultSetComplexValue } from './isResultSetComplexValue'; +import type { IResultSetFileValue } from './IResultSetFileValue.js'; +import { isResultSetComplexValue } from './isResultSetComplexValue.js'; export function isResultSetFileValue(value: any): value is IResultSetFileValue { return isResultSetComplexValue(value) && value.$type === 'file'; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetGeometryValue.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetGeometryValue.ts index fbd3b90809..5a5ffe63da 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetGeometryValue.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/ResultSet/isResultSetGeometryValue.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetGeometryValue } from './IResultSetGeometryValue'; -import { isResultSetComplexValue } from './isResultSetComplexValue'; +import type { IResultSetGeometryValue } from './IResultSetGeometryValue.js'; +import { isResultSetComplexValue } from './isResultSetComplexValue.js'; export function isResultSetGeometryValue(value: any): value is IResultSetGeometryValue { return isResultSetComplexValue(value) && value.$type === 'geometry'; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.ts index b56300d59b..dd50ab5d52 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { IDatabaseDataModel } from '../IDatabaseDataModel'; +import type { IDatabaseDataModel } from '../IDatabaseDataModel.js'; export const DATA_CONTEXT_DV_DDM = createDataContext('data-viewer-database-data-model'); diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataAction.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataAction.ts index a81dc77c25..3f58761181 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataAction.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataAction.ts @@ -7,9 +7,9 @@ */ import { makeObservable, observable } from 'mobx'; -import type { IDatabaseDataAction, IDatabaseDataActionClass, IDatabaseDataActionInterface } from './IDatabaseDataAction'; -import type { IDatabaseDataResult } from './IDatabaseDataResult'; -import type { IDatabaseDataSource } from './IDatabaseDataSource'; +import type { IDatabaseDataAction, IDatabaseDataActionClass, IDatabaseDataActionInterface } from './IDatabaseDataAction.js'; +import type { IDatabaseDataResult } from './IDatabaseDataResult.js'; +import type { IDatabaseDataSource } from './IDatabaseDataSource.js'; export abstract class DatabaseDataAction implements IDatabaseDataAction { result!: TResult; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataActions.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataActions.ts index 5165f61c25..2b1a16cdc9 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataActions.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataActions.ts @@ -10,12 +10,12 @@ import { action, makeObservable, runInAction } from 'mobx'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import { getDependingDataActions } from './Actions/DatabaseDataActionDecorator'; -import { isDatabaseDataAction } from './DatabaseDataAction'; -import type { IDatabaseDataAction, IDatabaseDataActionClass, IDatabaseDataActionInterface } from './IDatabaseDataAction'; -import type { IDatabaseDataActions } from './IDatabaseDataActions'; -import type { IDatabaseDataResult } from './IDatabaseDataResult'; -import type { IDatabaseDataSource } from './IDatabaseDataSource'; +import { getDependingDataActions } from './Actions/DatabaseDataActionDecorator.js'; +import { isDatabaseDataAction } from './DatabaseDataAction.js'; +import type { IDatabaseDataAction, IDatabaseDataActionClass, IDatabaseDataActionInterface } from './IDatabaseDataAction.js'; +import type { IDatabaseDataActions } from './IDatabaseDataActions.js'; +import type { IDatabaseDataResult } from './IDatabaseDataResult.js'; +import type { IDatabaseDataSource } from './IDatabaseDataSource.js'; type ActionsList = Array>; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataFormat.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataFormat.ts index 23889ed711..74aaf6152d 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataFormat.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataFormat.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { DatabaseDataModel } from './DatabaseDataModel'; +import type { DatabaseDataModel } from './DatabaseDataModel.js'; export interface DatabaseDataFormat { processResult: (model: DatabaseDataModel, data: T) => void; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataModel.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataModel.ts index fd2ac4af80..eadfee8830 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataModel.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataModel.ts @@ -7,12 +7,12 @@ */ import { makeObservable, observable } from 'mobx'; -import { Executor, ExecutorInterrupter, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutor } from '@cloudbeaver/core-executor'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; import { uuid } from '@cloudbeaver/core-utils'; -import type { IDatabaseDataModel, IRequestEventData } from './IDatabaseDataModel'; -import type { DatabaseDataAccessMode, IDatabaseDataSource, IRequestInfo } from './IDatabaseDataSource'; +import type { IDatabaseDataModel, IRequestEventData } from './IDatabaseDataModel.js'; +import type { DatabaseDataAccessMode, IDatabaseDataSource, IRequestInfo } from './IDatabaseDataSource.js'; export class DatabaseDataModel = IDatabaseDataSource> implements IDatabaseDataModel { id: string; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataSource.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataSource.ts index 72fc095062..aed18b399f 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataSource.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataSource.ts @@ -8,20 +8,20 @@ import { action, makeObservable, observable, toJS } from 'mobx'; import type { IServiceProvider } from '@cloudbeaver/core-di'; -import { Executor, ExecutorInterrupter, IExecutor, ITask, Task } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutor, type ITask, Task } from '@cloudbeaver/core-executor'; import { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { DatabaseDataActions } from './DatabaseDataActions'; -import type { IDatabaseDataActionClass, IDatabaseDataActionInterface } from './IDatabaseDataAction'; -import type { IDatabaseDataActions } from './IDatabaseDataActions'; -import type { IDatabaseDataResult } from './IDatabaseDataResult'; +import { DatabaseDataActions } from './DatabaseDataActions.js'; +import type { IDatabaseDataActionClass, IDatabaseDataActionInterface } from './IDatabaseDataAction.js'; +import type { IDatabaseDataActions } from './IDatabaseDataActions.js'; +import type { IDatabaseDataResult } from './IDatabaseDataResult.js'; import { DatabaseDataAccessMode, DatabaseDataSourceOperation, - IDatabaseDataSource, - IDatabaseDataSourceOperationEvent, - IRequestInfo, -} from './IDatabaseDataSource'; + type IDatabaseDataSource, + type IDatabaseDataSourceOperationEvent, + type IRequestInfo, +} from './IDatabaseDataSource.js'; export abstract class DatabaseDataSource implements IDatabaseDataSource { access: DatabaseDataAccessMode; @@ -118,7 +118,7 @@ export abstract class DatabaseDataSource index) { - return this.results[index]; + return this.results[index]!; } return null; @@ -246,7 +246,7 @@ export abstract class DatabaseDataSource { tryGet: >( diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataEditor.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataEditor.ts index 06f8bb5c56..f793248faf 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataEditor.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataEditor.ts @@ -7,7 +7,7 @@ */ import type { IExecutor } from '@cloudbeaver/core-executor'; -import type { IDatabaseDataResult } from './IDatabaseDataResult'; +import type { IDatabaseDataResult } from './IDatabaseDataResult.js'; export enum DataUpdateType { delete, diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataModel.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataModel.ts index 5b06576352..5557d1b31a 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataModel.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataModel.ts @@ -8,7 +8,7 @@ import type { IExecutor } from '@cloudbeaver/core-executor'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import type { DatabaseDataAccessMode, IDatabaseDataSource, IDatabaseDataSourceOperationEvent, IRequestInfo } from './IDatabaseDataSource'; +import type { DatabaseDataAccessMode, IDatabaseDataSource, IDatabaseDataSourceOperationEvent, IRequestInfo } from './IDatabaseDataSource.js'; export interface IRequestEventData = IDatabaseDataSource> extends IDatabaseDataSourceOperationEvent { model: IDatabaseDataModel; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataSource.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataSource.ts index 87b2363736..a8705f3605 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataSource.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataSource.ts @@ -7,12 +7,12 @@ */ import type { IServiceProvider } from '@cloudbeaver/core-di'; import type { IExecutor } from '@cloudbeaver/core-executor'; -import { TLocalizationToken } from '@cloudbeaver/core-localization'; +import { type TLocalizationToken } from '@cloudbeaver/core-localization'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import type { IDatabaseDataActionClass, IDatabaseDataActionInterface } from './IDatabaseDataAction'; -import type { IDatabaseDataActions } from './IDatabaseDataActions'; -import type { IDatabaseDataResult } from './IDatabaseDataResult'; +import type { IDatabaseDataActionClass, IDatabaseDataActionInterface } from './IDatabaseDataAction.js'; +import type { IDatabaseDataActions } from './IDatabaseDataActions.js'; +import type { IDatabaseDataResult } from './IDatabaseDataResult.js'; export enum DatabaseDataSourceOperation { /** Abstract operation with data, should not lead to data lost */ diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseResultSet.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseResultSet.ts index db3c9a8aac..e72d0dcd60 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseResultSet.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseResultSet.ts @@ -7,7 +7,7 @@ */ import type { SqlResultSet } from '@cloudbeaver/core-sdk'; -import type { IDatabaseDataResult } from './IDatabaseDataResult'; +import type { IDatabaseDataResult } from './IDatabaseDataResult.js'; export interface IDatabaseResultSet extends IDatabaseDataResult { totalCount: number | null; diff --git a/webapp/packages/plugin-data-viewer/src/IDataViewerTableStorage.ts b/webapp/packages/plugin-data-viewer/src/IDataViewerTableStorage.ts index cbbdb8ce81..337f960147 100644 --- a/webapp/packages/plugin-data-viewer/src/IDataViewerTableStorage.ts +++ b/webapp/packages/plugin-data-viewer/src/IDataViewerTableStorage.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IDatabaseDataModel } from './DatabaseDataModel/IDatabaseDataModel'; -import { IDatabaseDataSource } from './DatabaseDataModel/IDatabaseDataSource'; +import type { IDatabaseDataModel } from './DatabaseDataModel/IDatabaseDataModel.js'; +import { type IDatabaseDataSource } from './DatabaseDataModel/IDatabaseDataSource.js'; export interface IDataViewerTableStorage { has(tableId: string): boolean; diff --git a/webapp/packages/plugin-data-viewer/src/LocaleService.ts b/webapp/packages/plugin-data-viewer/src/LocaleService.ts index 483bb120d5..e74d5b618b 100644 --- a/webapp/packages/plugin-data-viewer/src/LocaleService.ts +++ b/webapp/packages/plugin-data-viewer/src/LocaleService.ts @@ -14,26 +14,24 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; case 'de': - return (await import('./locales/de')).default; + return (await import('./locales/de.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-data-viewer/src/ResultSet/ResultSetDataSource.ts b/webapp/packages/plugin-data-viewer/src/ResultSet/ResultSetDataSource.ts index f9ec52fb74..ec4d6df294 100644 --- a/webapp/packages/plugin-data-viewer/src/ResultSet/ResultSetDataSource.ts +++ b/webapp/packages/plugin-data-viewer/src/ResultSet/ResultSetDataSource.ts @@ -12,9 +12,9 @@ import type { IServiceProvider } from '@cloudbeaver/core-di'; import type { ITask } from '@cloudbeaver/core-executor'; import type { AsyncTaskInfoService, GraphQLService } from '@cloudbeaver/core-sdk'; -import { DatabaseDataSource } from '../DatabaseDataModel/DatabaseDataSource'; -import { IDatabaseDataOptions } from '../DatabaseDataModel/IDatabaseDataOptions'; -import type { IDatabaseResultSet } from '../DatabaseDataModel/IDatabaseResultSet'; +import { DatabaseDataSource } from '../DatabaseDataModel/DatabaseDataSource.js'; +import { type IDatabaseDataOptions } from '../DatabaseDataModel/IDatabaseDataOptions.js'; +import type { IDatabaseResultSet } from '../DatabaseDataModel/IDatabaseResultSet.js'; export abstract class ResultSetDataSource extends DatabaseDataSource { executionContext: IConnectionExecutionContext | null; @@ -22,7 +22,7 @@ export abstract class ResultSetDataSource exten private keepExecutionContextOnDispose: boolean; constructor( - readonly serviceProvider: IServiceProvider, + override readonly serviceProvider: IServiceProvider, protected graphQLService: GraphQLService, protected asyncTaskInfoService: AsyncTaskInfoService, ) { @@ -37,11 +37,11 @@ export abstract class ResultSetDataSource exten }); } - isReadonly(resultIndex: number): boolean { + override isReadonly(resultIndex: number): boolean { return super.isReadonly(resultIndex) || !this.executionContext?.context || this.getResult(resultIndex)?.data?.hasRowIdentifier === false; } - async cancel(): Promise { + override async cancel(): Promise { await super.cancel(); await this.cancelLoadTotalCount(); } @@ -97,12 +97,12 @@ export abstract class ResultSetDataSource exten return this.totalCountRequestTask; } - setResults(results: IDatabaseResultSet[]): this { + override setResults(results: IDatabaseResultSet[]): this { this.closeResults(this.results.filter(result => !results.some(r => r.id === result.id))); return super.setResults(results); } - async dispose(): Promise { + override async dispose(): Promise { await super.dispose(); if (this.keepExecutionContextOnDispose) { await this.closeResults(this.results); @@ -127,11 +127,11 @@ export abstract class ResultSetDataSource exten if ( prevResults.length === 1 && - prevResults[0].contextId === context.id && - prevResults[0].connectionId === context.connectionId && - prevResults[0].id !== null + prevResults[0]!.contextId === context.id && + prevResults[0]!.connectionId === context.connectionId && + prevResults[0]!.id !== null ) { - resultId = prevResults[0].id; + resultId = prevResults[0]!.id; } return resultId; diff --git a/webapp/packages/plugin-data-viewer/src/ResultSet/ResultSetTableFooterMenuService.ts b/webapp/packages/plugin-data-viewer/src/ResultSet/ResultSetTableFooterMenuService.ts index 7f9f4d9f02..fc4051c8b8 100644 --- a/webapp/packages/plugin-data-viewer/src/ResultSet/ResultSetTableFooterMenuService.ts +++ b/webapp/packages/plugin-data-viewer/src/ResultSet/ResultSetTableFooterMenuService.ts @@ -10,16 +10,16 @@ import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { ActionService, MenuService } from '@cloudbeaver/core-view'; -import { DatabaseDataConstraintAction } from '../DatabaseDataModel/Actions/DatabaseDataConstraintAction'; -import { DatabaseMetadataAction } from '../DatabaseDataModel/Actions/DatabaseMetadataAction'; -import { DATA_CONTEXT_DV_DDM } from '../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -import { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel'; -import { IDatabaseDataOptions } from '../DatabaseDataModel/IDatabaseDataOptions'; -import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from '../TableViewer/TableFooter/TableFooterMenu/DATA_VIEWER_DATA_MODEL_ACTIONS_MENU'; -import { ACTION_COUNT_TOTAL_ELEMENTS } from './ACTION_COUNT_TOTAL_ELEMENTS'; -import { isResultSetDataModel } from './isResultSetDataModel'; -import { ResultSetDataSource } from './ResultSetDataSource'; +import { DatabaseDataConstraintAction } from '../DatabaseDataModel/Actions/DatabaseDataConstraintAction.js'; +import { DatabaseMetadataAction } from '../DatabaseDataModel/Actions/DatabaseMetadataAction.js'; +import { DATA_CONTEXT_DV_DDM } from '../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +import { type IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel.js'; +import { type IDatabaseDataOptions } from '../DatabaseDataModel/IDatabaseDataOptions.js'; +import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from '../TableViewer/TableFooter/TableFooterMenu/DATA_VIEWER_DATA_MODEL_ACTIONS_MENU.js'; +import { ACTION_COUNT_TOTAL_ELEMENTS } from './ACTION_COUNT_TOTAL_ELEMENTS.js'; +import { isResultSetDataModel } from './isResultSetDataModel.js'; +import { ResultSetDataSource } from './ResultSetDataSource.js'; interface IResultSetActionsMetadata { totalCount: { diff --git a/webapp/packages/plugin-data-viewer/src/ResultSet/isResultSetDataModel.ts b/webapp/packages/plugin-data-viewer/src/ResultSet/isResultSetDataModel.ts index 1b25f9fb3e..ff75d44860 100644 --- a/webapp/packages/plugin-data-viewer/src/ResultSet/isResultSetDataModel.ts +++ b/webapp/packages/plugin-data-viewer/src/ResultSet/isResultSetDataModel.ts @@ -5,10 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { DatabaseDataModel } from '../DatabaseDataModel/DatabaseDataModel'; -import { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel'; -import { IDatabaseDataOptions } from '../DatabaseDataModel/IDatabaseDataOptions'; -import { ResultSetDataSource } from './ResultSetDataSource'; +import { DatabaseDataModel } from '../DatabaseDataModel/DatabaseDataModel.js'; +import { type IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel.js'; +import { type IDatabaseDataOptions } from '../DatabaseDataModel/IDatabaseDataOptions.js'; +import { ResultSetDataSource } from './ResultSetDataSource.js'; export function isResultSetDataModel( dataModel: IDatabaseDataModel | undefined | null, diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/DataPresentation.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/DataPresentation.tsx index 845d5f0f29..36433921a3 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/DataPresentation.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/DataPresentation.tsx @@ -10,11 +10,11 @@ import { observer } from 'mobx-react-lite'; import { s, TextPlaceholder } from '@cloudbeaver/core-blocks'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel'; -import type { IDataPresentationOptions } from '../DataPresentationService'; +import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel.js'; +import type { IDataPresentationOptions } from '../DataPresentationService.js'; import styles from './DataPresentation.module.css'; -import type { IDataTableActions } from './IDataTableActions'; -import { TableStatistics } from './TableStatistics'; +import type { IDataTableActions } from './IDataTableActions.js'; +import { TableStatistics } from './TableStatistics.js'; interface Props { model: IDatabaseDataModel; diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/DataViewerViewService.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/DataViewerViewService.ts index 4b1f1c89ae..dfa5bda00e 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/DataViewerViewService.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/DataViewerViewService.ts @@ -6,8 +6,8 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { ACTION_REDO, ACTION_SAVE, ACTION_UNDO, IActiveView, View } from '@cloudbeaver/core-view'; -import { ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; +import { ACTION_REDO, ACTION_SAVE, ACTION_UNDO, type IActiveView, View } from '@cloudbeaver/core-view'; +import { type ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; @injectable() export class DataViewerViewService extends View { diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/IDataTableActions.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/IDataTableActions.ts index 02bc2ee970..36bbbfbea8 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/IDataTableActions.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/IDataTableActions.ts @@ -7,7 +7,7 @@ */ import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel'; +import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel.js'; export interface IDataTableActions { presentationId: string | undefined; diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableError.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableError.tsx index 8010649f86..946cb9bb7c 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableError.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableError.tsx @@ -13,7 +13,7 @@ import { Button, IconOrImage, s, useErrorDetails, useObservableRef, useS, useSta import { ServerErrorType, ServerInternalError } from '@cloudbeaver/core-sdk'; import { errorOf } from '@cloudbeaver/core-utils'; -import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel'; +import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel.js'; import styles from './TableError.module.css'; interface Props { diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooter.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooter.tsx index 3ebfd6870b..0d0d703d4c 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooter.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooter.tsx @@ -9,9 +9,9 @@ import { observer } from 'mobx-react-lite'; import { Container, Fill, s, ToolsPanel, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; +import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; import styles from './TableFooter.module.css'; -import { TableFooterMenu } from './TableFooterMenu/TableFooterMenu'; +import { TableFooterMenu } from './TableFooterMenu/TableFooterMenu.js'; interface Props { resultIndex: number; diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/FetchSizeAction.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/FetchSizeAction.tsx index 89f368be94..dcd50c12a7 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/FetchSizeAction.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/FetchSizeAction.tsx @@ -10,10 +10,10 @@ import { useEffect, useRef, useState } from 'react'; import { Container, Form, getComputed, s, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ICustomMenuItemComponent } from '@cloudbeaver/core-view'; +import { type ICustomMenuItemComponent } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_DV_DDM } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DataViewerSettingsService } from '../../../../DataViewerSettingsService'; +import { DATA_CONTEXT_DV_DDM } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DataViewerSettingsService } from '../../../../DataViewerSettingsService.js'; import styles from './FetchSizeAction.module.css'; export const FetchSizeAction: ICustomMenuItemComponent = observer(function FetchSizeAction({ context }) { diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/TableFetchSizeActionBootstrap.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/TableFetchSizeActionBootstrap.ts index 2b81de588e..6e2847d542 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/TableFetchSizeActionBootstrap.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/TableFetchSizeActionBootstrap.ts @@ -9,11 +9,11 @@ import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { MenuCustomItem, MenuService } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_DV_DDM } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from '../DATA_VIEWER_DATA_MODEL_ACTIONS_MENU'; +import { DATA_CONTEXT_DV_DDM } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from '../DATA_VIEWER_DATA_MODEL_ACTIONS_MENU.js'; -const FetchSizeAction = importLazyComponent(() => import('./FetchSizeAction').then(module => module.FetchSizeAction)); +const FetchSizeAction = importLazyComponent(() => import('./FetchSizeAction.js').then(module => module.FetchSizeAction)); @injectable() export class TableFetchSizeActionBootstrap extends Bootstrap { @@ -21,7 +21,7 @@ export class TableFetchSizeActionBootstrap extends Bootstrap { super(); } - register() { + override register() { this.registerGeneralActions(); } diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/AutoRefreshSettingsDialog.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/AutoRefreshSettingsDialog.tsx index 24e88a783c..2feebeb2a9 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/AutoRefreshSettingsDialog.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/AutoRefreshSettingsDialog.tsx @@ -26,7 +26,7 @@ import { } from '@cloudbeaver/core-blocks'; import type { DialogComponentProps } from '@cloudbeaver/core-dialogs'; -import { IDatabaseRefreshState } from '../../../../DatabaseDataModel/Actions/DatabaseRefreshAction'; +import type { IDatabaseRefreshState } from '../../../../DatabaseDataModel/Actions/DatabaseRefreshAction.js'; import style from './AutoRefreshSettingsDialog.module.css'; interface Payload { diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/RefreshMenuAction.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/RefreshMenuAction.tsx index b3326bedd9..4b86ec1d4d 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/RefreshMenuAction.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/RefreshMenuAction.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import { forwardRef, useEffect } from 'react'; -import { CRegistryList, IComponentsTreeNodeValidator, TimerIcon, useParentProps } from '@cloudbeaver/core-blocks'; -import { MenuBarAction, MenuBarItem, MenuBarItemProps } from '@cloudbeaver/core-ui'; +import { type CRegistryList, type IComponentsTreeNodeValidator, TimerIcon, useParentProps } from '@cloudbeaver/core-blocks'; +import { MenuBarAction, MenuBarItem, type MenuBarItemProps } from '@cloudbeaver/core-ui'; import { ACTION_REFRESH } from '@cloudbeaver/core-view'; -import { getRefreshState } from './getRefreshState'; +import { getRefreshState } from './getRefreshState.js'; const RefreshMenuItem: typeof MenuBarItem = observer( forwardRef(function RefreshMenuItem(props, ref) { diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/TableRefreshActionBootstrap.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/TableRefreshActionBootstrap.ts index 1b55ce0786..1f82ff8c92 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/TableRefreshActionBootstrap.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/TableRefreshActionBootstrap.ts @@ -8,21 +8,23 @@ import { observable } from 'mobx'; import { importLazyComponent } from '@cloudbeaver/core-blocks'; -import { IDataContextProvider } from '@cloudbeaver/core-data-context'; +import { type IDataContextProvider } from '@cloudbeaver/core-data-context'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { LocalizationService } from '@cloudbeaver/core-localization'; import { declensionOfNumber } from '@cloudbeaver/core-utils'; import { ACTION_REFRESH, ActionService, MenuBaseItem, menuExtractItems, MenuSeparatorItem, MenuService } from '@cloudbeaver/core-view'; -import { IDatabaseRefreshState } from '../../../../DatabaseDataModel/Actions/DatabaseRefreshAction'; -import { DATA_CONTEXT_DV_DDM } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from '../DATA_VIEWER_DATA_MODEL_ACTIONS_MENU'; -import { getRefreshState } from './getRefreshState'; -import { MENU_DATA_VIEWER_AUTO_REFRESH } from './MENU_DATA_VIEWER_AUTO_REFRESH'; +import { type IDatabaseRefreshState } from '../../../../DatabaseDataModel/Actions/DatabaseRefreshAction.js'; +import { DATA_CONTEXT_DV_DDM } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from '../DATA_VIEWER_DATA_MODEL_ACTIONS_MENU.js'; +import { getRefreshState } from './getRefreshState.js'; +import { MENU_DATA_VIEWER_AUTO_REFRESH } from './MENU_DATA_VIEWER_AUTO_REFRESH.js'; -const AutoRefreshSettingsDialog = importLazyComponent(() => import('./AutoRefreshSettingsDialog').then(module => module.AutoRefreshSettingsDialog)); +const AutoRefreshSettingsDialog = importLazyComponent(() => + import('./AutoRefreshSettingsDialog.js').then(module => module.AutoRefreshSettingsDialog), +); const AUTO_REFRESH_INTERVALS = [5, 10, 15, 30, 60]; @@ -37,7 +39,7 @@ export class TableRefreshActionBootstrap extends Bootstrap { super(); } - register() { + override register() { this.registerGeneralActions(); } diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/getRefreshState.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/getRefreshState.ts index e6d1683fbb..2ef13f1eb2 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/getRefreshState.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/RefreshAction/getRefreshState.ts @@ -5,12 +5,12 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { IDataContextProvider } from '@cloudbeaver/core-data-context'; +import { type IDataContextProvider } from '@cloudbeaver/core-data-context'; -import { DatabaseRefreshAction } from '../../../../DatabaseDataModel/Actions/DatabaseRefreshAction'; -import { DATA_CONTEXT_DV_DDM } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -import { IDatabaseDataResult } from '../../../../DatabaseDataModel/IDatabaseDataResult'; +import { DatabaseRefreshAction } from '../../../../DatabaseDataModel/Actions/DatabaseRefreshAction.js'; +import { DATA_CONTEXT_DV_DDM } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +import { type IDatabaseDataResult } from '../../../../DatabaseDataModel/IDatabaseDataResult.js'; export function getRefreshState(context: IDataContextProvider): DatabaseRefreshAction | null { const model = context.get(DATA_CONTEXT_DV_DDM)!; diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/TableFooterMenu.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/TableFooterMenu.tsx index dad9253b68..6cc8f11177 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/TableFooterMenu.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/TableFooterMenu.tsx @@ -12,12 +12,12 @@ import { useDataContextLink } from '@cloudbeaver/core-data-context'; import { MenuBar, MenuBarItemStyles, MenuBarStyles } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_DV_DDM } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -import type { IDatabaseDataModel } from '../../../DatabaseDataModel/IDatabaseDataModel'; -import { DATA_CONTEXT_DATA_VIEWER_SIMPLE } from '../../TableHeader/DATA_CONTEXT_DATA_VIEWER_SIMPLE'; -import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from './DATA_VIEWER_DATA_MODEL_ACTIONS_MENU'; -import { REFRESH_MENU_ITEM_REGISTRY } from './RefreshAction/RefreshMenuAction'; +import { DATA_CONTEXT_DV_DDM } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +import type { IDatabaseDataModel } from '../../../DatabaseDataModel/IDatabaseDataModel.js'; +import { DATA_CONTEXT_DATA_VIEWER_SIMPLE } from '../../TableHeader/DATA_CONTEXT_DATA_VIEWER_SIMPLE.js'; +import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from './DATA_VIEWER_DATA_MODEL_ACTIONS_MENU.js'; +import { REFRESH_MENU_ITEM_REGISTRY } from './RefreshAction/RefreshMenuAction.js'; interface Props { resultIndex: number; diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService.ts index 29a284252b..d2820b630b 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService.ts @@ -17,14 +17,14 @@ import { MenuService, } from '@cloudbeaver/core-view'; -import { DatabaseEditAction } from '../../../DatabaseDataModel/Actions/DatabaseEditAction'; -import { DatabaseSelectAction } from '../../../DatabaseDataModel/Actions/DatabaseSelectAction'; -import { DatabaseEditChangeType } from '../../../DatabaseDataModel/Actions/IDatabaseDataEditAction'; -import { DATA_CONTEXT_DV_DDM } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -import { DATA_CONTEXT_DV_PRESENTATION, DataViewerPresentationType } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_PRESENTATION'; -import type { IDatabaseDataModel } from '../../../DatabaseDataModel/IDatabaseDataModel'; -import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from './DATA_VIEWER_DATA_MODEL_ACTIONS_MENU'; +import { DatabaseEditAction } from '../../../DatabaseDataModel/Actions/DatabaseEditAction.js'; +import { DatabaseSelectAction } from '../../../DatabaseDataModel/Actions/DatabaseSelectAction.js'; +import { DatabaseEditChangeType } from '../../../DatabaseDataModel/Actions/IDatabaseDataEditAction.js'; +import { DATA_CONTEXT_DV_DDM } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +import { DATA_CONTEXT_DV_PRESENTATION, DataViewerPresentationType } from '../../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_PRESENTATION.js'; +import type { IDatabaseDataModel } from '../../../DatabaseDataModel/IDatabaseDataModel.js'; +import { DATA_VIEWER_DATA_MODEL_ACTIONS_MENU } from './DATA_VIEWER_DATA_MODEL_ACTIONS_MENU.js'; @injectable() export class TableFooterMenuService { diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeader.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeader.tsx index 188e265238..43d8efe713 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeader.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeader.tsx @@ -10,9 +10,9 @@ import { observer } from 'mobx-react-lite'; import { Placeholder, s, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; +import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; import classes from './TableHeader.module.css'; -import { TableHeaderService } from './TableHeaderService'; +import { TableHeaderService } from './TableHeaderService.js'; interface Props { model: IDatabaseDataModel; diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderMenu.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderMenu.tsx index fe9cdb3742..528118435b 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderMenu.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderMenu.tsx @@ -7,16 +7,16 @@ */ import { observer } from 'mobx-react-lite'; -import { PlaceholderComponent, useS } from '@cloudbeaver/core-blocks'; +import { type PlaceholderComponent, useS } from '@cloudbeaver/core-blocks'; import { useDataContextLink } from '@cloudbeaver/core-data-context'; import { MenuBar, MenuBarItemStyles, MenuBarStyles } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_DV_DDM } from '../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -import { DATA_CONTEXT_DATA_VIEWER_SIMPLE } from './DATA_CONTEXT_DATA_VIEWER_SIMPLE'; -import { DATA_VIEWER_DATA_MODEL_TOOLS_MENU } from './DATA_VIEWER_DATA_MODEL_TOOLS_MENU'; -import type { ITableHeaderPlaceholderProps } from './TableHeaderService'; +import { DATA_CONTEXT_DV_DDM } from '../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +import { DATA_CONTEXT_DATA_VIEWER_SIMPLE } from './DATA_CONTEXT_DATA_VIEWER_SIMPLE.js'; +import { DATA_VIEWER_DATA_MODEL_TOOLS_MENU } from './DATA_VIEWER_DATA_MODEL_TOOLS_MENU.js'; +import type { ITableHeaderPlaceholderProps } from './TableHeaderService.js'; export const TableHeaderMenu: PlaceholderComponent = observer(function TableHeaderMenu({ model, simple, resultIndex }) { const menu = useMenu({ menu: DATA_VIEWER_DATA_MODEL_TOOLS_MENU }); @@ -28,5 +28,5 @@ export const TableHeaderMenu: PlaceholderComponent context.set(DATA_CONTEXT_DATA_VIEWER_SIMPLE, simple, id); }); - return ; + return ; }); diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderService.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderService.ts index 5bcc9b2c96..ec1951accf 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderService.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderService.ts @@ -11,21 +11,20 @@ import { PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ActionService, DATA_CONTEXT_MENU, MenuService } from '@cloudbeaver/core-view'; -import { DatabaseDataConstraintAction } from '../../DatabaseDataModel/Actions/DatabaseDataConstraintAction'; -import { DATA_VIEWER_CONSTRAINTS_DELETE_ACTION } from '../../DatabaseDataModel/Actions/ResultSet/Actions/DATA_VIEWER_CONSTRAINTS_DELETE_ACTION'; -import { DATA_CONTEXT_DV_DDM } from '../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; -import { IDatabaseDataOptions } from '../../DatabaseDataModel/IDatabaseDataOptions'; -import { isResultSetDataSource, ResultSetDataSource } from '../../ResultSet/ResultSetDataSource'; -import { DATA_VIEWER_DATA_MODEL_TOOLS_MENU } from './DATA_VIEWER_DATA_MODEL_TOOLS_MENU'; +import { DatabaseDataConstraintAction } from '../../DatabaseDataModel/Actions/DatabaseDataConstraintAction.js'; +import { DATA_VIEWER_CONSTRAINTS_DELETE_ACTION } from '../../DatabaseDataModel/Actions/ResultSet/Actions/DATA_VIEWER_CONSTRAINTS_DELETE_ACTION.js'; +import { DATA_CONTEXT_DV_DDM } from '../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +import { DATA_CONTEXT_DV_DDM_RESULT_INDEX } from '../../DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; +import { isResultSetDataSource, ResultSetDataSource } from '../../ResultSet/ResultSetDataSource.js'; +import { DATA_VIEWER_DATA_MODEL_TOOLS_MENU } from './DATA_VIEWER_DATA_MODEL_TOOLS_MENU.js'; export const TableWhereFilter = React.lazy(async () => { - const { TableWhereFilter } = await import('./TableWhereFilter'); + const { TableWhereFilter } = await import('./TableWhereFilter.js'); return { default: TableWhereFilter }; }); export const TableHeaderMenu = React.lazy(async () => { - const { TableHeaderMenu } = await import('./TableHeaderMenu'); + const { TableHeaderMenu } = await import('./TableHeaderMenu.js'); return { default: TableHeaderMenu }; }); @@ -46,7 +45,7 @@ export class TableHeaderService extends Bootstrap { super(); } - register(): void { + override register(): void { this.tableHeaderPlaceholder.add(TableWhereFilter, 1); this.tableHeaderPlaceholder.add(TableHeaderMenu, 2); diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableWhereFilter.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableWhereFilter.tsx index c1329f59a2..ecdfc0673b 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableWhereFilter.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableWhereFilter.tsx @@ -7,12 +7,12 @@ */ import { observer } from 'mobx-react-lite'; -import { Container, PlaceholderComponent, useTranslate } from '@cloudbeaver/core-blocks'; +import { Container, type PlaceholderComponent, useTranslate } from '@cloudbeaver/core-blocks'; import { InlineEditor } from '@cloudbeaver/core-ui'; -import type { ITableHeaderPlaceholderProps } from './TableHeaderService'; +import type { ITableHeaderPlaceholderProps } from './TableHeaderService.js'; import styles from './TableWhereFilter.module.css'; -import { useWhereFilter } from './useWhereFilter'; +import { useWhereFilter } from './useWhereFilter.js'; export const TableWhereFilter: PlaceholderComponent = observer(function TableWhereFilter({ model, resultIndex }) { const translate = useTranslate(); @@ -23,9 +23,9 @@ export const TableWhereFilter: PlaceholderComponent + { - const { TableViewer } = await import('./TableViewer'); + const { TableViewer } = await import('./TableViewer.js'); return { default: TableViewer }; }); diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableViewerStorageService.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/TableViewerStorageService.ts index 5362c9505e..6fdc9c65cc 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableViewerStorageService.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableViewerStorageService.ts @@ -8,11 +8,11 @@ import { computed, makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; -import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel'; -import { IDatabaseDataSource } from '../DatabaseDataModel/IDatabaseDataSource'; -import type { IDataViewerTableStorage } from '../IDataViewerTableStorage'; +import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel.js'; +import { type IDatabaseDataSource } from '../DatabaseDataModel/IDatabaseDataSource.js'; +import type { IDataViewerTableStorage } from '../IDataViewerTableStorage.js'; export interface ITableViewerStorageChangeEventData { type: 'add' | 'remove'; diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/DataValuePanelBootstrap.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/DataValuePanelBootstrap.ts index 487c7114b4..aacf0b069d 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/DataValuePanelBootstrap.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/DataValuePanelBootstrap.ts @@ -9,12 +9,12 @@ import React from 'react'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { DatabaseDataResultAction } from '../../DatabaseDataModel/Actions/DatabaseDataResultAction'; -import { DataPresentationService, DataPresentationType } from '../../DataPresentationService'; -import { DataValuePanelService } from './DataValuePanelService'; +import { DatabaseDataResultAction } from '../../DatabaseDataModel/Actions/DatabaseDataResultAction.js'; +import { DataPresentationService, DataPresentationType } from '../../DataPresentationService.js'; +import { DataValuePanelService } from './DataValuePanelService.js'; export const ValuePanel = React.lazy(async () => { - const { ValuePanel } = await import('./ValuePanel'); + const { ValuePanel } = await import('./ValuePanel.js'); return { default: ValuePanel }; }); @@ -27,7 +27,7 @@ export class DataValuePanelBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.dataPresentationService.add({ id: 'value-text-presentation', type: DataPresentationType.toolsPanel, diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/DataValuePanelService.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/DataValuePanelService.ts index b05339a072..86bbc2f771 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/DataValuePanelService.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/DataValuePanelService.ts @@ -7,9 +7,9 @@ */ import { injectable } from '@cloudbeaver/core-di'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { ITabInfo, ITabInfoOptions, TabsContainer } from '@cloudbeaver/core-ui'; +import { type ITabInfo, type ITabInfoOptions, TabsContainer } from '@cloudbeaver/core-ui'; -import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; +import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; export interface IDataValuePanelOptions { dataFormat: ResultDataFormat[]; diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/ValuePanel.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/ValuePanel.tsx index f5f2c86b01..7b634ad603 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/ValuePanel.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/ValuePanel/ValuePanel.tsx @@ -13,11 +13,11 @@ import { useService } from '@cloudbeaver/core-di'; import { TabList, TabPanelList, TabPanelStyles, TabsState, TabStyles } from '@cloudbeaver/core-ui'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import { DatabaseDataResultAction } from '../../DatabaseDataModel/Actions/DatabaseDataResultAction'; -import { DatabaseMetadataAction } from '../../DatabaseDataModel/Actions/DatabaseMetadataAction'; -import { DatabaseSelectAction } from '../../DatabaseDataModel/Actions/DatabaseSelectAction'; -import type { DataPresentationComponent } from '../../DataPresentationService'; -import { DataValuePanelService } from './DataValuePanelService'; +import { DatabaseDataResultAction } from '../../DatabaseDataModel/Actions/DatabaseDataResultAction.js'; +import { DatabaseMetadataAction } from '../../DatabaseDataModel/Actions/DatabaseMetadataAction.js'; +import { DatabaseSelectAction } from '../../DatabaseDataModel/Actions/DatabaseSelectAction.js'; +import type { DataPresentationComponent } from '../../DataPresentationService.js'; +import { DataValuePanelService } from './DataValuePanelService.js'; import styles from './shared/ValuePanel.module.css'; import ValuePanelEditorTabPanel from './shared/ValuePanelEditorTabPanel.module.css'; import ValuePanelEditorTabs from './shared/ValuePanelEditorTabs.module.css'; @@ -63,7 +63,7 @@ export const ValuePanel: DataPresentationComponent = observer(function ValuePane const hasCurrentTabCells = currentTabId && displayed.some(tab => tab.key === currentTabId); if (displayed.length > 0 && !hasCurrentTabCells) { - currentTabId = displayed[0].key; + currentTabId = displayed[0]!.key; } return ( diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/BooleanValuePresentation.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/BooleanValuePresentation.tsx index 9e94b85561..eeba7b5a7b 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/BooleanValuePresentation.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/BooleanValuePresentation.tsx @@ -11,14 +11,14 @@ import { Radio, TextPlaceholder, useTranslate } from '@cloudbeaver/core-blocks'; import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui'; import { isDefined } from '@cloudbeaver/core-utils'; -import { ResultSetEditAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetEditAction'; -import { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction'; -import { ResultSetViewAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetViewAction'; -import { isResultSetDataModel } from '../../ResultSet/isResultSetDataModel'; -import type { IDataValuePanelProps } from '../../TableViewer/ValuePanel/DataValuePanelService'; +import { ResultSetEditAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetEditAction.js'; +import { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction.js'; +import { ResultSetViewAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetViewAction.js'; +import { isResultSetDataModel } from '../../ResultSet/isResultSetDataModel.js'; +import type { IDataValuePanelProps } from '../../TableViewer/ValuePanel/DataValuePanelService.js'; import classes from './BooleanValuePresentation.module.css'; -import { preprocessBooleanValue } from './preprocessBooleanValue'; +import { preprocessBooleanValue } from './preprocessBooleanValue.js'; export const BooleanValuePresentation: TabContainerPanelComponent = observer(function BooleanValuePresentation({ model: unknownModel, @@ -41,7 +41,7 @@ export const BooleanValuePresentation: TabContainerPanelComponent{translate('data_viewer_presentation_value_no_active_elements')}; } - const firstSelectedCell = activeElements[0]; + const firstSelectedCell = activeElements[0]!; const cellValue = viewAction.getCellValue(firstSelectedCell); const value = preprocessBooleanValue(cellValue); @@ -54,9 +54,9 @@ export const BooleanValuePresentation: TabContainerPanelComponent +
{nullable && ( import('./BooleanValuePresentation').then(module => module.BooleanValuePresentation)); +const BooleanValuePresentation = importLazyComponent(() => import('./BooleanValuePresentation.js').then(module => module.BooleanValuePresentation)); @injectable() export class BooleanValuePresentationBootstrap extends Bootstrap { @@ -23,7 +23,7 @@ export class BooleanValuePresentationBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.dataValuePanelService.add({ key: 'boolean-presentation', options: { @@ -44,7 +44,7 @@ export class BooleanValuePresentationBootstrap extends Bootstrap { if (activeElements.length > 0) { const view = source.getAction(context.resultIndex, ResultSetViewAction); - const firstSelectedCell = activeElements[0]; + const firstSelectedCell = activeElements[0]!; const cellValue = view.getCellValue(firstSelectedCell); const column = view.getColumn(firstSelectedCell.column); diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/isBooleanValuePresentationAvailable.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/isBooleanValuePresentationAvailable.ts index f752880eac..a8ff3dddf1 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/isBooleanValuePresentationAvailable.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/isBooleanValuePresentationAvailable.ts @@ -7,7 +7,7 @@ */ import type { SqlResultColumn } from '@cloudbeaver/core-sdk'; -import type { IResultSetValue } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; +import type { IResultSetValue } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; export function isStringifiedBoolean(value: string): boolean { return ['false', 'true'].includes(value.toLowerCase()); diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/preprocessBooleanValue.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/preprocessBooleanValue.ts index 27860aeff1..48f72128f2 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/preprocessBooleanValue.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/preprocessBooleanValue.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetValue } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -import { isStringifiedBoolean } from './isBooleanValuePresentationAvailable'; +import type { IResultSetValue } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +import { isStringifiedBoolean } from './isBooleanValuePresentationAvailable.js'; export function preprocessBooleanValue(cellValue: IResultSetValue): boolean | null | undefined { if (typeof cellValue === 'string' && isStringifiedBoolean(cellValue)) { diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx index 41e56e7806..3f2c38bba8 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx @@ -13,12 +13,12 @@ import { ActionIconButton, Button, Container, Fill, Loader, s, useS, useSuspense import { type TabContainerPanelComponent, useTabLocalState } from '@cloudbeaver/core-ui'; import { blobToBase64, bytesToSize, throttle } from '@cloudbeaver/core-utils'; -import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue'; -import { isResultSetDataModel } from '../../ResultSet/isResultSetDataModel'; -import type { IDataValuePanelProps } from '../../TableViewer/ValuePanel/DataValuePanelService'; -import { QuotaPlaceholder } from '../QuotaPlaceholder'; +import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.js'; +import { isResultSetDataModel } from '../../ResultSet/isResultSetDataModel.js'; +import type { IDataValuePanelProps } from '../../TableViewer/ValuePanel/DataValuePanelService.js'; +import { QuotaPlaceholder } from '../QuotaPlaceholder.js'; import styles from './ImageValuePresentation.module.css'; -import { useValuePanelImageValue } from './useValuePanelImageValue'; +import { useValuePanelImageValue } from './useValuePanelImageValue.js'; export const ImageValuePresentation: TabContainerPanelComponent = observer(function ImageValuePresentation({ model: unknownModel, diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentationBootstrap.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentationBootstrap.ts index c537e44d18..d5dd45ae81 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentationBootstrap.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentationBootstrap.ts @@ -9,13 +9,13 @@ import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction'; -import { ResultSetViewAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetViewAction'; -import { isResultSetDataSource } from '../../ResultSet/ResultSetDataSource'; -import { DataValuePanelService } from '../../TableViewer/ValuePanel/DataValuePanelService'; -import { isImageValuePresentationAvailable } from './isImageValuePresentationAvailable'; +import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction.js'; +import { ResultSetViewAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetViewAction.js'; +import { isResultSetDataSource } from '../../ResultSet/ResultSetDataSource.js'; +import { DataValuePanelService } from '../../TableViewer/ValuePanel/DataValuePanelService.js'; +import { isImageValuePresentationAvailable } from './isImageValuePresentationAvailable.js'; -const ImageValuePresentation = importLazyComponent(() => import('./ImageValuePresentation').then(module => module.ImageValuePresentation)); +const ImageValuePresentation = importLazyComponent(() => import('./ImageValuePresentation.js').then(module => module.ImageValuePresentation)); @injectable() export class ImageValuePresentationBootstrap extends Bootstrap { @@ -23,7 +23,7 @@ export class ImageValuePresentationBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.dataValuePanelService.add({ key: 'image-presentation', options: { @@ -45,7 +45,7 @@ export class ImageValuePresentationBootstrap extends Bootstrap { if (activeElements.length > 0) { const view = source.getAction(context.resultIndex, ResultSetViewAction); - const firstSelectedCell = activeElements[0]; + const firstSelectedCell = activeElements[0]!; const cellValue = view.getCellValue(firstSelectedCell); diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/isImageValuePresentationAvailable.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/isImageValuePresentationAvailable.ts index 418737f629..c6c3bbcd0a 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/isImageValuePresentationAvailable.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/isImageValuePresentationAvailable.ts @@ -7,10 +7,10 @@ */ import { getMIME, isImageFormat, isValidUrl } from '@cloudbeaver/core-utils'; -import { isResultSetBinaryValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue'; -import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue'; -import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue'; -import type { IResultSetValue } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; +import { isResultSetBinaryValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue.js'; +import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.js'; +import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.js'; +import type { IResultSetValue } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; export function isImageValuePresentationAvailable(value: IResultSetValue) { let contentType = null; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/useValuePanelImageValue.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/useValuePanelImageValue.ts index 856d0c52d9..b0a501c694 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/useValuePanelImageValue.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/useValuePanelImageValue.ts @@ -13,18 +13,18 @@ import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { download, getMIME, isImageFormat, isValidUrl } from '@cloudbeaver/core-utils'; -import { createResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/createResultSetBlobValue'; -import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey'; -import { isResultSetBinaryValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue'; -import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue'; -import { isResultSetFileValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetFileValue'; -import { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction'; -import { ResultSetEditAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetEditAction'; -import { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction'; -import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; -import { DataViewerService } from '../../DataViewerService'; -import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource'; +import { createResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/createResultSetBlobValue.js'; +import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey.js'; +import { isResultSetBinaryValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue.js'; +import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.js'; +import { isResultSetFileValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetFileValue.js'; +import { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction.js'; +import { ResultSetEditAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetEditAction.js'; +import { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction.js'; +import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; +import { DataViewerService } from '../../DataViewerService.js'; +import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource.js'; interface Props { model: IDatabaseDataModel; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx index 4d3726ec9a..185d640206 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx @@ -11,10 +11,10 @@ import { Container, Link, s, usePermission, useS, useTranslate } from '@cloudbea import { EAdminPermission } from '@cloudbeaver/core-root'; import { WebsiteLinks } from '@cloudbeaver/core-website'; -import type { IResultSetElementKey } from '../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey'; -import { ResultSetDataContentAction } from '../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction'; -import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel'; -import { ResultSetDataSource } from '../ResultSet/ResultSetDataSource'; +import type { IResultSetElementKey } from '../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey.js'; +import { ResultSetDataContentAction } from '../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction.js'; +import type { IDatabaseDataModel } from '../DatabaseDataModel/IDatabaseDataModel.js'; +import { ResultSetDataSource } from '../ResultSet/ResultSetDataSource.js'; import styles from './QuotaPlaceholder.module.css'; interface Props { diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValueEditor.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValueEditor.tsx index 06b90a6824..6c26c9de62 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValueEditor.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValueEditor.tsx @@ -10,8 +10,8 @@ import { useMemo } from 'react'; import { EditorLoader, useCodemirrorExtensions } from '@cloudbeaver/plugin-codemirror6'; -import { useDataViewerCopyHandler } from '../../useDataViewerCopyHandler'; -import { getTypeExtension } from './getTypeExtension'; +import { useDataViewerCopyHandler } from '../../useDataViewerCopyHandler.js'; +import { getTypeExtension } from './getTypeExtension.js'; interface Props { contentType: string; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentation.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentation.tsx index 1b959c2017..6de6b538de 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentation.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentation.tsx @@ -8,27 +8,27 @@ import { observable } from 'mobx'; import { observer } from 'mobx-react-lite'; -import { ActionIconButton, Container, Group, Loader, s, SContext, StyleRegistry, useS, useTranslate } from '@cloudbeaver/core-blocks'; +import { ActionIconButton, Container, Group, Loader, s, SContext, type StyleRegistry, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { TabContainerPanelComponent, TabList, TabsState, TabStyles, useTabLocalState } from '@cloudbeaver/core-ui'; +import { type TabContainerPanelComponent, TabList, TabsState, TabStyles, useTabLocalState } from '@cloudbeaver/core-ui'; -import { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction'; -import { ResultSetEditAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetEditAction'; -import { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction'; -import { DataViewerService } from '../../DataViewerService'; -import { isResultSetDataModel } from '../../ResultSet/isResultSetDataModel'; -import type { IDataValuePanelProps } from '../../TableViewer/ValuePanel/DataValuePanelService'; -import { getDefaultLineWrapping } from './getDefaultLineWrapping'; -import { isTextValueReadonly } from './isTextValueReadonly'; +import { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction.js'; +import { ResultSetEditAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetEditAction.js'; +import { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction.js'; +import { DataViewerService } from '../../DataViewerService.js'; +import { isResultSetDataModel } from '../../ResultSet/isResultSetDataModel.js'; +import type { IDataValuePanelProps } from '../../TableViewer/ValuePanel/DataValuePanelService.js'; +import { getDefaultLineWrapping } from './getDefaultLineWrapping.js'; +import { isTextValueReadonly } from './isTextValueReadonly.js'; import styles from './shared/TextValuePresentation.module.css'; import TextValuePresentationTab from './shared/TextValuePresentationTab.module.css'; -import { TextValueEditor } from './TextValueEditor'; -import { TextValuePresentationService } from './TextValuePresentationService'; -import { TextValueTruncatedMessage } from './TextValueTruncatedMessage'; -import { useAutoContentType } from './useAutoContentType'; -import { useTextValueGetter } from './useTextValueGetter'; +import { TextValueEditor } from './TextValueEditor.js'; +import { TextValuePresentationService } from './TextValuePresentationService.js'; +import { TextValueTruncatedMessage } from './TextValueTruncatedMessage.js'; +import { useAutoContentType } from './useAutoContentType.js'; +import { useTextValueGetter } from './useTextValueGetter.js'; const tabRegistry: StyleRegistry = [[TabStyles, { mode: 'append', styles: [TextValuePresentationTab] }]]; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentationBootstrap.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentationBootstrap.ts index 8aeaad69fa..b2e447dbb7 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentationBootstrap.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentationBootstrap.ts @@ -11,12 +11,12 @@ import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import { isResultSetDataSource } from '../../ResultSet/ResultSetDataSource'; -import { DataValuePanelService } from '../../TableViewer/ValuePanel/DataValuePanelService'; -import { isBlobPresentationAvailable } from './isTextValuePresentationAvailable'; -import { TextValuePresentationService } from './TextValuePresentationService'; +import { isResultSetDataSource } from '../../ResultSet/ResultSetDataSource.js'; +import { DataValuePanelService } from '../../TableViewer/ValuePanel/DataValuePanelService.js'; +import { isBlobPresentationAvailable } from './isTextValuePresentationAvailable.js'; +import { TextValuePresentationService } from './TextValuePresentationService.js'; -const TextValuePresentation = importLazyComponent(() => import('./TextValuePresentation').then(module => module.TextValuePresentation)); +const TextValuePresentation = importLazyComponent(() => import('./TextValuePresentation.js').then(module => module.TextValuePresentation)); @injectable() export class TextValuePresentationBootstrap extends Bootstrap { @@ -27,7 +27,7 @@ export class TextValuePresentationBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.dataValuePanelService.add({ key: 'text-presentation', options: { diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentationService.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentationService.ts index 2c6429590f..4a583185fc 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentationService.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentationService.ts @@ -6,11 +6,11 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { ITabInfo, ITabInfoOptions, TabsContainer } from '@cloudbeaver/core-ui'; +import { type ITabInfo, type ITabInfoOptions, TabsContainer } from '@cloudbeaver/core-ui'; -import { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; -import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource'; -import type { IDataValuePanelOptions, IDataValuePanelProps } from '../../TableViewer/ValuePanel/DataValuePanelService'; +import { type IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; +import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource.js'; +import type { IDataValuePanelOptions, IDataValuePanelProps } from '../../TableViewer/ValuePanel/DataValuePanelService.js'; export interface ITextValuePanelProps extends Omit { model: IDatabaseDataModel; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValueTruncatedMessage.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValueTruncatedMessage.tsx index 53b3f2eca2..acadb5c366 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValueTruncatedMessage.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValueTruncatedMessage.tsx @@ -12,15 +12,15 @@ import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { bytesToSize, isNotNullDefined } from '@cloudbeaver/core-utils'; -import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey'; -import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue'; -import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue'; -import { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction'; -import { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; -import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource'; -import { QuotaPlaceholder } from '../QuotaPlaceholder'; -import { MAX_BLOB_PREVIEW_SIZE } from './MAX_BLOB_PREVIEW_SIZE'; +import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey.js'; +import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.js'; +import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.js'; +import { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction.js'; +import { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; +import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource.js'; +import { QuotaPlaceholder } from '../QuotaPlaceholder.js'; +import { MAX_BLOB_PREVIEW_SIZE } from './MAX_BLOB_PREVIEW_SIZE.js'; interface Props { resultIndex: number; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/isTextValuePresentationAvailable.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/isTextValuePresentationAvailable.ts index 5809a7c16d..545c877273 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/isTextValuePresentationAvailable.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/isTextValuePresentationAvailable.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { isResultSetBinaryValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue'; -import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue'; -import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction'; -import { ResultSetViewAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetViewAction'; -import { ITextValuePanelProps } from './TextValuePresentationService'; +import { isResultSetBinaryValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue.js'; +import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.js'; +import { ResultSetSelectAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction.js'; +import { ResultSetViewAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetViewAction.js'; +import { type ITextValuePanelProps } from './TextValuePresentationService.js'; export function isBlobPresentationAvailable(context: ITextValuePanelProps | undefined): boolean { const source = context?.model.source; @@ -24,7 +24,7 @@ export function isBlobPresentationAvailable(context: ITextValuePanelProps | unde if (activeElements.length > 0) { const view = source.getAction(context.resultIndex, ResultSetViewAction); - const firstSelectedCell = activeElements[0]; + const firstSelectedCell = activeElements[0]!; const cellValue = view.getCellValue(firstSelectedCell); diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/isTextValueReadonly.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/isTextValueReadonly.ts index 6a124c8bf5..a927689d4a 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/isTextValueReadonly.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/isTextValueReadonly.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey'; -import type { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction'; -import type { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; -import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource'; +import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey.js'; +import type { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction.js'; +import type { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; +import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource.js'; interface Args { contentAction: ResultSetDataContentAction; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/useAutoContentType.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/useAutoContentType.ts index d4e74ce7fd..5971519c5a 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/useAutoContentType.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/useAutoContentType.ts @@ -8,13 +8,13 @@ import { useService } from '@cloudbeaver/core-di'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; -import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey'; -import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue'; -import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue'; -import type { IResultSetValue, ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel'; -import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource'; -import { TextValuePresentationService } from './TextValuePresentationService'; +import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey.js'; +import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.js'; +import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.js'; +import type { IResultSetValue, ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +import type { IDatabaseDataModel } from '../../DatabaseDataModel/IDatabaseDataModel.js'; +import { ResultSetDataSource } from '../../ResultSet/ResultSetDataSource.js'; +import { TextValuePresentationService } from './TextValuePresentationService.js'; interface Args { resultIndex: number; @@ -70,7 +70,7 @@ export function useAutoContentType({ dataFormat, model, formatAction, resultInde } if (activeTabs.length > 0 && !activeTabs.some(tab => tab.key === currentContentType)) { - currentContentType = activeTabs[0].key; + currentContentType = activeTabs[0]!.key; } return currentContentType; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/useTextValueGetter.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/useTextValueGetter.ts index b87c169244..a39c6c66e1 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/useTextValueGetter.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/useTextValueGetter.ts @@ -11,14 +11,14 @@ import { useObservableRef, useSuspense } from '@cloudbeaver/core-blocks'; import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; import { blobToBase64, isNotNullDefined, removeMetadataFromDataURL } from '@cloudbeaver/core-utils'; -import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey'; -import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue'; -import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue'; -import type { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction'; -import type { ResultSetEditAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetEditAction'; -import type { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -import { formatText } from './formatText'; -import { MAX_BLOB_PREVIEW_SIZE } from './MAX_BLOB_PREVIEW_SIZE'; +import type { IResultSetElementKey } from '../../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey.js'; +import { isResultSetBlobValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.js'; +import { isResultSetContentValue } from '../../DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.js'; +import type { ResultSetDataContentAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction.js'; +import type { ResultSetEditAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetEditAction.js'; +import type { ResultSetFormatAction } from '../../DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +import { formatText } from './formatText.js'; +import { MAX_BLOB_PREVIEW_SIZE } from './MAX_BLOB_PREVIEW_SIZE.js'; interface IUseTextValueArgs { dataFormat: ResultDataFormat | null; diff --git a/webapp/packages/plugin-data-viewer/src/index.ts b/webapp/packages/plugin-data-viewer/src/index.ts index ec00ff030d..6694d88dc1 100644 --- a/webapp/packages/plugin-data-viewer/src/index.ts +++ b/webapp/packages/plugin-data-viewer/src/index.ts @@ -5,87 +5,87 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './manifest'; +export * from './manifest.js'; -export * from './DatabaseDataModel/Actions/Document/DocumentDataAction'; -export * from './DatabaseDataModel/Actions/Document/DocumentEditAction'; -export * from './DatabaseDataModel/Actions/Document/IDatabaseDataDocument'; -export * from './DatabaseDataModel/Actions/Document/IDocumentElementKey'; -export * from './DatabaseDataModel/Actions/ResultSet/DataContext/DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY'; -export * from './DatabaseDataModel/DataContext/DATA_CONTEXT_DV_PRESENTATION'; -export * from './DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM'; -export * from './DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX'; -export * from './DatabaseDataModel/Actions/ResultSet/compareResultSetRowKeys'; -export * from './DatabaseDataModel/Actions/ResultSet/createResultSetBlobValue'; -export * from './DatabaseDataModel/Actions/ResultSet/createResultSetContentValue'; -export * from './DatabaseDataModel/Actions/ResultSet/createResultSetFileValue'; -export * from './DatabaseDataModel/Actions/ResultSet/IResultSetDataKey'; -export * from './DatabaseDataModel/Actions/ResultSet/IResultSetBlobValue'; -export * from './DatabaseDataModel/Actions/ResultSet/IResultSetComplexValue'; -export * from './DatabaseDataModel/Actions/ResultSet/IResultSetFileValue'; -export * from './DatabaseDataModel/Actions/ResultSet/IResultSetContentValue'; -export * from './DatabaseDataModel/Actions/ResultSet/IResultSetGeometryValue'; -export * from './DatabaseDataModel/Actions/ResultSet/IResultSetBinaryValue'; -export * from './DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue'; -export * from './DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue'; -export * from './DatabaseDataModel/Actions/ResultSet/isResultSetComplexValue'; -export * from './DatabaseDataModel/Actions/ResultSet/isResultSetContentValue'; -export * from './DatabaseDataModel/Actions/ResultSet/isResultSetFileValue'; -export * from './DatabaseDataModel/Actions/ResultSet/isResultSetGeometryValue'; -export * from './DatabaseDataModel/Actions/DatabaseDataConstraintAction'; -export * from './DatabaseDataModel/Actions/ResultSet/ResultSetDataAction'; -export * from './DatabaseDataModel/Actions/ResultSet/ResultSetDataKeysUtils'; -export * from './DatabaseDataModel/Actions/ResultSet/ResultSetEditAction'; -export * from './DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction'; -export * from './DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction'; -export * from './DatabaseDataModel/Actions/ResultSet/ResultSetViewAction'; -export * from './DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction'; -export * from './DatabaseDataModel/Actions/DatabaseDataActionDecorator'; -export * from './DatabaseDataModel/Actions/DatabaseDataResultAction'; -export * from './DatabaseDataModel/Actions/DatabaseEditAction'; -export * from './DatabaseDataModel/Actions/DatabaseMetadataAction'; -export * from './DatabaseDataModel/Actions/DatabaseSelectAction'; -export * from './DatabaseDataModel/Actions/IDatabaseDataConstraintAction'; -export * from './DatabaseDataModel/Actions/IDatabaseDataEditAction'; -export * from './DatabaseDataModel/Actions/IDatabaseDataFormatAction'; -export * from './DatabaseDataModel/Actions/IDatabaseDataMetadataAction'; -export * from './DatabaseDataModel/Actions/IDatabaseDataResultAction'; -export * from './DatabaseDataModel/Actions/IDatabaseDataSelectAction'; -export * from './DatabaseDataModel/Actions/ResultSet/ResultSetCacheAction'; -export * from './DatabaseDataModel/DatabaseDataAction'; -export * from './DatabaseDataModel/DatabaseDataActions'; -export * from './DatabaseDataModel/DatabaseDataFormat'; -export * from './DatabaseDataModel/DatabaseDataModel'; -export * from './DatabaseDataModel/DatabaseDataSource'; -export * from './DatabaseDataModel/IDatabaseDataAction'; -export * from './DatabaseDataModel/IDatabaseDataActions'; -export * from './DatabaseDataModel/IDatabaseDataEditor'; -export * from './DatabaseDataModel/IDatabaseDataModel'; -export * from './DatabaseDataModel/IDatabaseDataOptions'; -export * from './DatabaseDataModel/IDatabaseDataResult'; -export * from './DatabaseDataModel/IDatabaseDataSource'; -export * from './DatabaseDataModel/IDatabaseResultSet'; -export * from './DatabaseDataModel/Order'; -export * from './DataViewerService'; -export * from './useDataViewerModel'; +export * from './DatabaseDataModel/Actions/Document/DocumentDataAction.js'; +export * from './DatabaseDataModel/Actions/Document/DocumentEditAction.js'; +export * from './DatabaseDataModel/Actions/Document/IDatabaseDataDocument.js'; +export * from './DatabaseDataModel/Actions/Document/IDocumentElementKey.js'; +export * from './DatabaseDataModel/Actions/ResultSet/DataContext/DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY.js'; +export * from './DatabaseDataModel/DataContext/DATA_CONTEXT_DV_PRESENTATION.js'; +export * from './DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM.js'; +export * from './DatabaseDataModel/DataContext/DATA_CONTEXT_DV_DDM_RESULT_INDEX.js'; +export * from './DatabaseDataModel/Actions/ResultSet/compareResultSetRowKeys.js'; +export * from './DatabaseDataModel/Actions/ResultSet/createResultSetBlobValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/createResultSetContentValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/createResultSetFileValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/IResultSetDataKey.js'; +export * from './DatabaseDataModel/Actions/ResultSet/IResultSetBlobValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/IResultSetComplexValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/IResultSetFileValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/IResultSetContentValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/IResultSetGeometryValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/IResultSetBinaryValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/isResultSetBinaryValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/isResultSetBlobValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/isResultSetComplexValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/isResultSetContentValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/isResultSetFileValue.js'; +export * from './DatabaseDataModel/Actions/ResultSet/isResultSetGeometryValue.js'; +export * from './DatabaseDataModel/Actions/DatabaseDataConstraintAction.js'; +export * from './DatabaseDataModel/Actions/ResultSet/ResultSetDataAction.js'; +export * from './DatabaseDataModel/Actions/ResultSet/ResultSetDataKeysUtils.js'; +export * from './DatabaseDataModel/Actions/ResultSet/ResultSetEditAction.js'; +export * from './DatabaseDataModel/Actions/ResultSet/ResultSetFormatAction.js'; +export * from './DatabaseDataModel/Actions/ResultSet/ResultSetSelectAction.js'; +export * from './DatabaseDataModel/Actions/ResultSet/ResultSetViewAction.js'; +export * from './DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction.js'; +export * from './DatabaseDataModel/Actions/DatabaseDataActionDecorator.js'; +export * from './DatabaseDataModel/Actions/DatabaseDataResultAction.js'; +export * from './DatabaseDataModel/Actions/DatabaseEditAction.js'; +export * from './DatabaseDataModel/Actions/DatabaseMetadataAction.js'; +export * from './DatabaseDataModel/Actions/DatabaseSelectAction.js'; +export * from './DatabaseDataModel/Actions/IDatabaseDataConstraintAction.js'; +export * from './DatabaseDataModel/Actions/IDatabaseDataEditAction.js'; +export * from './DatabaseDataModel/Actions/IDatabaseDataFormatAction.js'; +export * from './DatabaseDataModel/Actions/IDatabaseDataMetadataAction.js'; +export * from './DatabaseDataModel/Actions/IDatabaseDataResultAction.js'; +export * from './DatabaseDataModel/Actions/IDatabaseDataSelectAction.js'; +export * from './DatabaseDataModel/Actions/ResultSet/ResultSetCacheAction.js'; +export * from './DatabaseDataModel/DatabaseDataAction.js'; +export * from './DatabaseDataModel/DatabaseDataActions.js'; +export * from './DatabaseDataModel/DatabaseDataFormat.js'; +export * from './DatabaseDataModel/DatabaseDataModel.js'; +export * from './DatabaseDataModel/DatabaseDataSource.js'; +export * from './DatabaseDataModel/IDatabaseDataAction.js'; +export * from './DatabaseDataModel/IDatabaseDataActions.js'; +export * from './DatabaseDataModel/IDatabaseDataEditor.js'; +export * from './DatabaseDataModel/IDatabaseDataModel.js'; +export * from './DatabaseDataModel/IDatabaseDataOptions.js'; +export * from './DatabaseDataModel/IDatabaseDataResult.js'; +export * from './DatabaseDataModel/IDatabaseDataSource.js'; +export * from './DatabaseDataModel/IDatabaseResultSet.js'; +export * from './DatabaseDataModel/Order.js'; +export * from './DataViewerService.js'; +export * from './useDataViewerModel.js'; // All Services and Components that is provided by this plugin should be exported here -export * from './TableViewer/TableViewerStorageService'; -export * from './TableViewer/ValuePanel/DataValuePanelService'; +export * from './TableViewer/TableViewerStorageService.js'; +export * from './TableViewer/ValuePanel/DataValuePanelService.js'; -export * from './TableViewer/IDataTableActions'; -export * from './TableViewer/IDataPresentationActions'; +export * from './TableViewer/IDataTableActions.js'; +export * from './TableViewer/IDataPresentationActions.js'; -export * from './TableViewer/TableViewerLoader'; -export * from './TableViewer/TableFooter/TableFooterMenu/DATA_VIEWER_DATA_MODEL_ACTIONS_MENU'; -export * from './TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService'; +export * from './TableViewer/TableViewerLoader.js'; +export * from './TableViewer/TableFooter/TableFooterMenu/DATA_VIEWER_DATA_MODEL_ACTIONS_MENU.js'; +export * from './TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService.js'; -export * from './ContainerDataSource'; -export * from './ResultSet/ResultSetDataSource'; -export * from './ResultSet/isResultSetDataModel'; -export * from './DataPresentationService'; -export * from './DataViewerDataChangeConfirmationService'; -export * from './ValuePanelPresentation/BooleanValue/isBooleanValuePresentationAvailable'; -export * from './useDataViewerCopyHandler'; -export * from './DataViewerSettingsService'; -export * from './DATA_EDITOR_SETTINGS_GROUP'; +export * from './ContainerDataSource.js'; +export * from './ResultSet/ResultSetDataSource.js'; +export * from './ResultSet/isResultSetDataModel.js'; +export * from './DataPresentationService.js'; +export * from './DataViewerDataChangeConfirmationService.js'; +export * from './ValuePanelPresentation/BooleanValue/isBooleanValuePresentationAvailable.js'; +export * from './useDataViewerCopyHandler.js'; +export * from './DataViewerSettingsService.js'; +export * from './DATA_EDITOR_SETTINGS_GROUP.js'; diff --git a/webapp/packages/plugin-data-viewer/src/manifest.ts b/webapp/packages/plugin-data-viewer/src/manifest.ts index 4c15d82580..f53e56ec9c 100644 --- a/webapp/packages/plugin-data-viewer/src/manifest.ts +++ b/webapp/packages/plugin-data-viewer/src/manifest.ts @@ -13,27 +13,27 @@ export const dataViewerManifest: PluginManifest = { }, providers: [ - () => import('./TableViewer/TableFooter/TableFooterMenu/RefreshAction/TableRefreshActionBootstrap').then(m => m.TableRefreshActionBootstrap), - () => import('./DataViewerBootstrap').then(m => m.DataViewerBootstrap), - () => import('./DataViewerTabService').then(m => m.DataViewerTabService), - () => import('./DataViewerTableService').then(m => m.DataViewerTableService), - () => import('./DataPresentationService').then(m => m.DataPresentationService), - () => import('./TableViewer/TableViewerStorageService').then(m => m.TableViewerStorageService), - () => import('./TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService').then(m => m.TableFooterMenuService), - () => import('./TableViewer/TableHeader/TableHeaderService').then(m => m.TableHeaderService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./TableViewer/ValuePanel/DataValuePanelService').then(m => m.DataValuePanelService), - () => import('./ValuePanelPresentation/TextValue/TextValuePresentationService').then(m => m.TextValuePresentationService), - () => import('./DataViewerDataChangeConfirmationService').then(m => m.DataViewerDataChangeConfirmationService), - () => import('./ValuePanelPresentation/TextValue/TextValuePresentationBootstrap').then(m => m.TextValuePresentationBootstrap), - () => import('./ValuePanelPresentation/ImageValue/ImageValuePresentationBootstrap').then(m => m.ImageValuePresentationBootstrap), - () => import('./ValuePanelPresentation/BooleanValue/BooleanValuePresentationBootstrap').then(m => m.BooleanValuePresentationBootstrap), - () => import('./TableViewer/ValuePanel/DataValuePanelBootstrap').then(m => m.DataValuePanelBootstrap), - () => import('./DataViewerSettingsService').then(m => m.DataViewerSettingsService), - () => import('./DataViewerService').then(m => m.DataViewerService), - () => import('./ResultSet/ResultSetTableFooterMenuService').then(m => m.ResultSetTableFooterMenuService), - () => import('./TableViewer/DataViewerViewService').then(m => m.DataViewerViewService), + () => import('./TableViewer/TableFooter/TableFooterMenu/RefreshAction/TableRefreshActionBootstrap.js').then(m => m.TableRefreshActionBootstrap), + () => import('./DataViewerBootstrap.js').then(m => m.DataViewerBootstrap), + () => import('./DataViewerTabService.js').then(m => m.DataViewerTabService), + () => import('./DataViewerTableService.js').then(m => m.DataViewerTableService), + () => import('./DataPresentationService.js').then(m => m.DataPresentationService), + () => import('./TableViewer/TableViewerStorageService.js').then(m => m.TableViewerStorageService), + () => import('./TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService.js').then(m => m.TableFooterMenuService), + () => import('./TableViewer/TableHeader/TableHeaderService.js').then(m => m.TableHeaderService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./TableViewer/ValuePanel/DataValuePanelService.js').then(m => m.DataValuePanelService), + () => import('./ValuePanelPresentation/TextValue/TextValuePresentationService.js').then(m => m.TextValuePresentationService), + () => import('./DataViewerDataChangeConfirmationService.js').then(m => m.DataViewerDataChangeConfirmationService), + () => import('./ValuePanelPresentation/TextValue/TextValuePresentationBootstrap.js').then(m => m.TextValuePresentationBootstrap), + () => import('./ValuePanelPresentation/ImageValue/ImageValuePresentationBootstrap.js').then(m => m.ImageValuePresentationBootstrap), + () => import('./ValuePanelPresentation/BooleanValue/BooleanValuePresentationBootstrap.js').then(m => m.BooleanValuePresentationBootstrap), + () => import('./TableViewer/ValuePanel/DataValuePanelBootstrap.js').then(m => m.DataValuePanelBootstrap), + () => import('./DataViewerSettingsService.js').then(m => m.DataViewerSettingsService), + () => import('./DataViewerService.js').then(m => m.DataViewerService), + () => import('./ResultSet/ResultSetTableFooterMenuService.js').then(m => m.ResultSetTableFooterMenuService), + () => import('./TableViewer/DataViewerViewService.js').then(m => m.DataViewerViewService), () => - import('./TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/TableFetchSizeActionBootstrap').then(m => m.TableFetchSizeActionBootstrap), + import('./TableViewer/TableFooter/TableFooterMenu/FetchSizeAction/TableFetchSizeActionBootstrap.js').then(m => m.TableFetchSizeActionBootstrap), ], }; diff --git a/webapp/packages/plugin-data-viewer/src/useDataViewerCopyHandler.ts b/webapp/packages/plugin-data-viewer/src/useDataViewerCopyHandler.ts index 837a7be108..f76d6eb56d 100644 --- a/webapp/packages/plugin-data-viewer/src/useDataViewerCopyHandler.ts +++ b/webapp/packages/plugin-data-viewer/src/useDataViewerCopyHandler.ts @@ -10,7 +10,7 @@ import type React from 'react'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { DataViewerService } from './DataViewerService'; +import { DataViewerService } from './DataViewerService.js'; export function useDataViewerCopyHandler() { const notificationService = useService(NotificationService); diff --git a/webapp/packages/plugin-data-viewer/src/useDataViewerModel.ts b/webapp/packages/plugin-data-viewer/src/useDataViewerModel.ts index 7873c6afbb..43e81fbe8b 100644 --- a/webapp/packages/plugin-data-viewer/src/useDataViewerModel.ts +++ b/webapp/packages/plugin-data-viewer/src/useDataViewerModel.ts @@ -8,11 +8,11 @@ import { action, computed, observable } from 'mobx'; import { useObservableRef, useResource } from '@cloudbeaver/core-blocks'; -import { ConnectionInfoResource, IConnectionInfoParams } from '@cloudbeaver/core-connections'; +import { ConnectionInfoResource, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; -import { ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; +import { type ILoadableState, isContainsException } from '@cloudbeaver/core-utils'; -import { TableViewerStorageService } from './TableViewer/TableViewerStorageService'; +import { TableViewerStorageService } from './TableViewer/TableViewerStorageService.js'; export interface IDataViewerDatabaseDataModel extends ILoadableState { connectionKey: IConnectionInfoParams | undefined; diff --git a/webapp/packages/plugin-datasource-context-switch/package.json b/webapp/packages/plugin-datasource-context-switch/package.json index e8902a81ac..c44217b4a5 100644 --- a/webapp/packages/plugin-datasource-context-switch/package.json +++ b/webapp/packages/plugin-datasource-context-switch/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-datasource-context-switch", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSchemaManagerBootstrap.ts b/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSchemaManagerBootstrap.ts index b8f852597b..52f365d7e4 100644 --- a/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSchemaManagerBootstrap.ts +++ b/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSchemaManagerBootstrap.ts @@ -25,13 +25,15 @@ import { OptionsPanelService } from '@cloudbeaver/core-ui'; import { MenuBaseItem, menuExtractItems, MenuSeparatorItem, MenuService } from '@cloudbeaver/core-view'; import { MENU_APP_ACTIONS } from '@cloudbeaver/plugin-top-app-bar'; -import { ConnectionSchemaManagerService } from './ConnectionSchemaManagerService'; -import type { IConnectionSelectorExtraProps } from './ConnectionSelector/IConnectionSelectorExtraProps'; -import { MENU_CONNECTION_DATA_CONTAINER_SELECTOR } from './MENU_CONNECTION_DATA_CONTAINER_SELECTOR'; -import { MENU_CONNECTION_SELECTOR } from './MENU_CONNECTION_SELECTOR'; +import { ConnectionSchemaManagerService } from './ConnectionSchemaManagerService.js'; +import type { IConnectionSelectorExtraProps } from './ConnectionSelector/IConnectionSelectorExtraProps.js'; +import { MENU_CONNECTION_DATA_CONTAINER_SELECTOR } from './MENU_CONNECTION_DATA_CONTAINER_SELECTOR.js'; +import { MENU_CONNECTION_SELECTOR } from './MENU_CONNECTION_SELECTOR.js'; -const ConnectionIcon = importLazyComponent(() => import('./ConnectionSelector/ConnectionIcon').then(module => module.ConnectionIcon)); -const ConnectionIconSmall = importLazyComponent(() => import('./ConnectionSelector/ConnectionIconSmall').then(module => module.ConnectionIconSmall)); +const ConnectionIcon = importLazyComponent(() => import('./ConnectionSelector/ConnectionIcon.js').then(module => module.ConnectionIcon)); +const ConnectionIconSmall = importLazyComponent(() => + import('./ConnectionSelector/ConnectionIconSmall.js').then(module => module.ConnectionIconSmall), +); @injectable() export class ConnectionSchemaManagerBootstrap extends Bootstrap { @@ -54,7 +56,7 @@ export class ConnectionSchemaManagerBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.addTopAppMenuItems(); this.connectionInfoResource.onDataUpdate.addHandler( diff --git a/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSchemaManagerService.ts b/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSchemaManagerService.ts index e61ff1e75f..cfb378c4bf 100644 --- a/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSchemaManagerService.ts +++ b/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSchemaManagerService.ts @@ -8,18 +8,18 @@ import { action, computed, makeObservable, observable, runInAction } from 'mobx'; import { - Connection, + type Connection, ConnectionInfoResource, ConnectionsManagerService, DBDriverResource, - IConnectionInfoParams, - IConnectionProvider, - IConnectionSetter, - IExecutionContextProvider, - IObjectCatalogProvider, - IObjectCatalogSetter, - IObjectSchemaProvider, - IObjectSchemaSetter, + type IConnectionInfoParams, + type IConnectionProvider, + type IConnectionSetter, + type IExecutionContextProvider, + type IObjectCatalogProvider, + type IObjectCatalogSetter, + type IObjectSchemaProvider, + type IObjectSchemaSetter, isConnectionProvider, isConnectionSetter, isExecutionContextProvider, @@ -27,24 +27,24 @@ import { isObjectCatalogSetter, isObjectSchemaProvider, isObjectSchemaSetter, - IStructContainers, - ObjectContainer, + type IStructContainers, + type ObjectContainer, serializeConnectionParam, } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { ExtensionUtils, IExtension } from '@cloudbeaver/core-extensions'; +import { ExtensionUtils, type IExtension } from '@cloudbeaver/core-extensions'; import { type IDataContextActiveNode, type IObjectNavNodeProvider, isObjectNavNodeProvider } from '@cloudbeaver/core-navigation-tree'; import { - IProjectProvider, - IProjectSetter, - IProjectSetterState, + type IProjectProvider, + type IProjectSetter, + type IProjectSetterState, isProjectProvider, isProjectSetter, isProjectSetterState, } from '@cloudbeaver/core-projects'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; -import { ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; +import { type ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; export interface IConnectionInfo { name?: string; diff --git a/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSelector/ConnectionIcon.tsx b/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSelector/ConnectionIcon.tsx index d0d90d3ca6..3b3b960619 100644 --- a/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSelector/ConnectionIcon.tsx +++ b/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSelector/ConnectionIcon.tsx @@ -7,13 +7,21 @@ */ import { observer } from 'mobx-react-lite'; -import { ConnectionImageWithMask, ConnectionImageWithMaskSvgStyles, s, SContext, StyleRegistry, useResource, useS } from '@cloudbeaver/core-blocks'; +import { + ConnectionImageWithMask, + ConnectionImageWithMaskSvgStyles, + s, + SContext, + type StyleRegistry, + useResource, + useS, +} from '@cloudbeaver/core-blocks'; import { ConnectionInfoResource, DBDriverResource } from '@cloudbeaver/core-connections'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import styles from './ConnectionIcon.module.css'; import ConnectionImageWithMaskSvgBackgroundStyles from './ConnectionImageWithMask.module.css'; -import type { IConnectionSelectorExtraProps } from './IConnectionSelectorExtraProps'; +import type { IConnectionSelectorExtraProps } from './IConnectionSelectorExtraProps.js'; export interface ConnectionIconProps extends IConnectionSelectorExtraProps { size?: number; diff --git a/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSelector/ConnectionIconSmall.tsx b/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSelector/ConnectionIconSmall.tsx index f20b494df8..1edea06d53 100644 --- a/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSelector/ConnectionIconSmall.tsx +++ b/webapp/packages/plugin-datasource-context-switch/src/ConnectionSchemaManager/ConnectionSelector/ConnectionIconSmall.tsx @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ConnectionIcon, ConnectionIconProps } from './ConnectionIcon'; +import { ConnectionIcon, type ConnectionIconProps } from './ConnectionIcon.js'; export const ConnectionIconSmall: React.FC = function ConnectionIconSmall(props) { return ; diff --git a/webapp/packages/plugin-datasource-context-switch/src/LocaleService.ts b/webapp/packages/plugin-datasource-context-switch/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-datasource-context-switch/src/LocaleService.ts +++ b/webapp/packages/plugin-datasource-context-switch/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-datasource-context-switch/src/PluginBootstrap.ts b/webapp/packages/plugin-datasource-context-switch/src/PluginBootstrap.ts index 949ba2fe1a..09687f9836 100644 --- a/webapp/packages/plugin-datasource-context-switch/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-datasource-context-switch/src/PluginBootstrap.ts @@ -12,8 +12,4 @@ export class PluginBootstrap extends Bootstrap { constructor() { super(); } - - register(): void | Promise {} - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-datasource-context-switch/src/index.ts b/webapp/packages/plugin-datasource-context-switch/src/index.ts index ed176fc2aa..86ca0e8599 100644 --- a/webapp/packages/plugin-datasource-context-switch/src/index.ts +++ b/webapp/packages/plugin-datasource-context-switch/src/index.ts @@ -1,4 +1,11 @@ -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; -export * from './ConnectionSchemaManager/ConnectionSchemaManagerBootstrap'; -export * from './ConnectionSchemaManager/ConnectionSchemaManagerService'; +export * from './ConnectionSchemaManager/ConnectionSchemaManagerBootstrap.js'; +export * from './ConnectionSchemaManager/ConnectionSchemaManagerService.js'; diff --git a/webapp/packages/plugin-datasource-context-switch/src/manifest.ts b/webapp/packages/plugin-datasource-context-switch/src/manifest.ts index 660e8af895..9342c83fee 100644 --- a/webapp/packages/plugin-datasource-context-switch/src/manifest.ts +++ b/webapp/packages/plugin-datasource-context-switch/src/manifest.ts @@ -13,9 +13,9 @@ export const datasourceContextSwitchPluginManifest: PluginManifest = { }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./ConnectionSchemaManager/ConnectionSchemaManagerService').then(m => m.ConnectionSchemaManagerService), - () => import('./ConnectionSchemaManager/ConnectionSchemaManagerBootstrap').then(m => m.ConnectionSchemaManagerBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./ConnectionSchemaManager/ConnectionSchemaManagerService.js').then(m => m.ConnectionSchemaManagerService), + () => import('./ConnectionSchemaManager/ConnectionSchemaManagerBootstrap.js').then(m => m.ConnectionSchemaManagerBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-datasource-transaction-manager/package.json b/webapp/packages/plugin-datasource-transaction-manager/package.json index ec21e9ed7f..50655af823 100644 --- a/webapp/packages/plugin-datasource-transaction-manager/package.json +++ b/webapp/packages/plugin-datasource-transaction-manager/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-datasource-transaction-manager", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-datasource-transaction-manager/src/LocaleService.ts b/webapp/packages/plugin-datasource-transaction-manager/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-datasource-transaction-manager/src/LocaleService.ts +++ b/webapp/packages/plugin-datasource-transaction-manager/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-datasource-transaction-manager/src/TransactionManagerBootstrap.ts b/webapp/packages/plugin-datasource-transaction-manager/src/TransactionManagerBootstrap.ts index 2492d18a6b..b3a8c343de 100644 --- a/webapp/packages/plugin-datasource-transaction-manager/src/TransactionManagerBootstrap.ts +++ b/webapp/packages/plugin-datasource-transaction-manager/src/TransactionManagerBootstrap.ts @@ -13,8 +13,8 @@ import { ConnectionInfoResource, ConnectionsManagerService, createConnectionParam, - IConnectionExecutionContextUpdateTaskInfo, - IConnectionExecutorData, + type IConnectionExecutionContextUpdateTaskInfo, + type IConnectionExecutorData, isConnectionInfoParamEqual, } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; @@ -28,10 +28,10 @@ import { ActionService, MenuService } from '@cloudbeaver/core-view'; import { ConnectionSchemaManagerService } from '@cloudbeaver/plugin-datasource-context-switch'; import { MENU_APP_ACTIONS } from '@cloudbeaver/plugin-top-app-bar'; -import { ACTION_DATASOURCE_TRANSACTION_COMMIT } from './actions/ACTION_DATASOURCE_TRANSACTION_COMMIT'; -import { ACTION_DATASOURCE_TRANSACTION_COMMIT_MODE_TOGGLE } from './actions/ACTION_DATASOURCE_TRANSACTION_COMMIT_MODE_TOGGLE'; -import { ACTION_DATASOURCE_TRANSACTION_ROLLBACK } from './actions/ACTION_DATASOURCE_TRANSACTION_ROLLBACK'; -import { TransactionManagerSettingsService } from './TransactionManagerSettingsService'; +import { ACTION_DATASOURCE_TRANSACTION_COMMIT } from './actions/ACTION_DATASOURCE_TRANSACTION_COMMIT.js'; +import { ACTION_DATASOURCE_TRANSACTION_COMMIT_MODE_TOGGLE } from './actions/ACTION_DATASOURCE_TRANSACTION_COMMIT_MODE_TOGGLE.js'; +import { ACTION_DATASOURCE_TRANSACTION_ROLLBACK } from './actions/ACTION_DATASOURCE_TRANSACTION_ROLLBACK.js'; +import { TransactionManagerSettingsService } from './TransactionManagerSettingsService.js'; @injectable() export class TransactionManagerBootstrap extends Bootstrap { @@ -52,7 +52,7 @@ export class TransactionManagerBootstrap extends Bootstrap { super(); } - register() { + override register() { this.connectionsManagerService.onDisconnect.addHandler(this.disconnectHandler.bind(this)); this.menuService.addCreator({ diff --git a/webapp/packages/plugin-datasource-transaction-manager/src/index.ts b/webapp/packages/plugin-datasource-transaction-manager/src/index.ts index a6e2490188..cd6c0fd3d1 100644 --- a/webapp/packages/plugin-datasource-transaction-manager/src/index.ts +++ b/webapp/packages/plugin-datasource-transaction-manager/src/index.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export { datasourceTransactionManagerPlugin } from './manifest'; +export { datasourceTransactionManagerPlugin } from './manifest.js'; -export { TransactionManagerSettingsService } from './TransactionManagerSettingsService'; +export { TransactionManagerSettingsService } from './TransactionManagerSettingsService.js'; diff --git a/webapp/packages/plugin-datasource-transaction-manager/src/manifest.ts b/webapp/packages/plugin-datasource-transaction-manager/src/manifest.ts index 3a0f225920..bf9094704d 100644 --- a/webapp/packages/plugin-datasource-transaction-manager/src/manifest.ts +++ b/webapp/packages/plugin-datasource-transaction-manager/src/manifest.ts @@ -13,8 +13,8 @@ export const datasourceTransactionManagerPlugin: PluginManifest = { }, providers: [ - () => import('./TransactionManagerBootstrap').then(m => m.TransactionManagerBootstrap), - () => import('./TransactionManagerSettingsService').then(m => m.TransactionManagerSettingsService), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./TransactionManagerBootstrap.js').then(m => m.TransactionManagerBootstrap), + () => import('./TransactionManagerSettingsService.js').then(m => m.TransactionManagerSettingsService), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-ddl-viewer/package.json b/webapp/packages/plugin-ddl-viewer/package.json index fdf600879b..18785c6cf3 100644 --- a/webapp/packages/plugin-ddl-viewer/package.json +++ b/webapp/packages/plugin-ddl-viewer/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-ddl-viewer", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerFooterService.ts b/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerFooterService.ts index 9b0e2bf930..9f2be15e15 100644 --- a/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerFooterService.ts +++ b/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerFooterService.ts @@ -13,9 +13,9 @@ import { ACTION_SAVE, ActionService, MenuService } from '@cloudbeaver/core-view' import { LocalStorageSqlDataSource } from '@cloudbeaver/plugin-sql-editor'; import { ACTION_SQL_EDITOR_OPEN, SqlEditorNavigatorService } from '@cloudbeaver/plugin-sql-editor-navigation-tab'; -import { DATA_CONTEXT_DDL_VIEWER_NODE } from './DATA_CONTEXT_DDL_VIEWER_NODE'; -import { DATA_CONTEXT_DDL_VIEWER_VALUE } from './DATA_CONTEXT_DDL_VIEWER_VALUE'; -import { MENU_DDL_VIEWER_FOOTER } from './MENU_DDL_VIEWER_FOOTER'; +import { DATA_CONTEXT_DDL_VIEWER_NODE } from './DATA_CONTEXT_DDL_VIEWER_NODE.js'; +import { DATA_CONTEXT_DDL_VIEWER_VALUE } from './DATA_CONTEXT_DDL_VIEWER_VALUE.js'; +import { MENU_DDL_VIEWER_FOOTER } from './MENU_DDL_VIEWER_FOOTER.js'; @injectable() export class DDLViewerFooterService { diff --git a/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerTab.tsx b/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerTab.tsx index 33ff76ce33..a009271679 100644 --- a/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerTab.tsx +++ b/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerTab.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { TabIcon, Tab, TabTitle } from '@cloudbeaver/core-ui'; import type { NavNodeTransformViewComponent } from '@cloudbeaver/plugin-navigation-tree'; -import { NAV_NODE_DDL_ID } from '../NAV_NODE_DDL_ID'; +import { NAV_NODE_DDL_ID } from '../NAV_NODE_DDL_ID.js'; export const DDLViewerTab: NavNodeTransformViewComponent = observer(function DDLViewerTab({ folderId }) { const title = folderId.startsWith(NAV_NODE_DDL_ID) ? 'DDL' : 'Body'; diff --git a/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerTabPanel.tsx b/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerTabPanel.tsx index 86fa22f6b8..28a4dc7c28 100644 --- a/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerTabPanel.tsx +++ b/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DDLViewerTabPanel.tsx @@ -21,11 +21,11 @@ import { useCodemirrorExtensions } from '@cloudbeaver/plugin-codemirror6'; import type { NavNodeTransformViewComponent } from '@cloudbeaver/plugin-navigation-tree'; import { SQLCodeEditorLoader, useSqlDialectExtension } from '@cloudbeaver/plugin-sql-editor-new'; -import { DATA_CONTEXT_DDL_VIEWER_NODE } from './DATA_CONTEXT_DDL_VIEWER_NODE'; -import { DATA_CONTEXT_DDL_VIEWER_VALUE } from './DATA_CONTEXT_DDL_VIEWER_VALUE'; -import { DdlResource } from './DdlResource'; +import { DATA_CONTEXT_DDL_VIEWER_NODE } from './DATA_CONTEXT_DDL_VIEWER_NODE.js'; +import { DATA_CONTEXT_DDL_VIEWER_VALUE } from './DATA_CONTEXT_DDL_VIEWER_VALUE.js'; +import { DdlResource } from './DdlResource.js'; import style from './DDLViewerTabPanel.module.css'; -import { MENU_DDL_VIEWER_FOOTER } from './MENU_DDL_VIEWER_FOOTER'; +import { MENU_DDL_VIEWER_FOOTER } from './MENU_DDL_VIEWER_FOOTER.js'; export const DDLViewerTabPanel: NavNodeTransformViewComponent = observer(function DDLViewerTabPanel({ nodeId, folderId }) { const styles = useS(style, MenuBarStyles, MenuBarItemStyles); diff --git a/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DdlResource.ts b/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DdlResource.ts index 8008646de9..e11ffc0458 100644 --- a/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DdlResource.ts +++ b/webapp/packages/plugin-ddl-viewer/src/DdlViewer/DdlResource.ts @@ -7,12 +7,15 @@ */ import { injectable } from '@cloudbeaver/core-di'; import { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; -import { CachedMapResource, isResourceAlias, ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { CachedMapResource, isResourceAlias, type ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { GraphQLService } from '@cloudbeaver/core-sdk'; @injectable() export class DdlResource extends CachedMapResource { - constructor(private readonly graphQLService: GraphQLService, private readonly navNodeInfoResource: NavNodeInfoResource) { + constructor( + private readonly graphQLService: GraphQLService, + private readonly navNodeInfoResource: NavNodeInfoResource, + ) { super(); this.navNodeInfoResource.outdateResource(this); diff --git a/webapp/packages/plugin-ddl-viewer/src/DdlViewerBootstrap.ts b/webapp/packages/plugin-ddl-viewer/src/DdlViewerBootstrap.ts index 3c6fd1e126..88ff200467 100644 --- a/webapp/packages/plugin-ddl-viewer/src/DdlViewerBootstrap.ts +++ b/webapp/packages/plugin-ddl-viewer/src/DdlViewerBootstrap.ts @@ -10,14 +10,14 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { EObjectFeature, NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; import { NavNodeViewService } from '@cloudbeaver/plugin-navigation-tree'; -import { DDLViewerFooterService } from './DdlViewer/DDLViewerFooterService'; -import { NAV_NODE_DDL_ID } from './NAV_NODE_DDL_ID'; -import { NAV_NODE_EXTENDED_DDL_ID } from './NAV_NODE_EXTENDED_DDL_ID'; +import { DDLViewerFooterService } from './DdlViewer/DDLViewerFooterService.js'; +import { NAV_NODE_DDL_ID } from './NAV_NODE_DDL_ID.js'; +import { NAV_NODE_EXTENDED_DDL_ID } from './NAV_NODE_EXTENDED_DDL_ID.js'; -const DDLViewerTab = importLazyComponent(() => import('./DdlViewer/DDLViewerTab').then(m => m.DDLViewerTab)); -const DDLViewerTabPanel = importLazyComponent(() => import('./DdlViewer/DDLViewerTabPanel').then(m => m.DDLViewerTabPanel)); +const DDLViewerTab = importLazyComponent(() => import('./DdlViewer/DDLViewerTab.js').then(m => m.DDLViewerTab)); +const DDLViewerTabPanel = importLazyComponent(() => import('./DdlViewer/DDLViewerTabPanel.js').then(m => m.DDLViewerTabPanel)); const ExtendedDDLViewerTabPanel = importLazyComponent(() => - import('./ExtendedDDLViewer/ExtendedDDLViewerTabPanel').then(m => m.ExtendedDDLViewerTabPanel), + import('./ExtendedDDLViewer/ExtendedDDLViewerTabPanel.js').then(m => m.ExtendedDDLViewerTabPanel), ); @injectable() @@ -30,7 +30,7 @@ export class DdlViewerBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.navNodeViewService.addTransform({ tab: (nodeId, folderId) => { if (folderId.startsWith(NAV_NODE_DDL_ID) || folderId.startsWith(NAV_NODE_EXTENDED_DDL_ID)) { @@ -68,6 +68,4 @@ export class DdlViewerBootstrap extends Bootstrap { this.ddlViewerFooterService.register(); } - - load(): void {} } diff --git a/webapp/packages/plugin-ddl-viewer/src/ExtendedDDLViewer/ExtendedDDLResource.ts b/webapp/packages/plugin-ddl-viewer/src/ExtendedDDLViewer/ExtendedDDLResource.ts index 3d9e45efa3..69e4c2c9c7 100644 --- a/webapp/packages/plugin-ddl-viewer/src/ExtendedDDLViewer/ExtendedDDLResource.ts +++ b/webapp/packages/plugin-ddl-viewer/src/ExtendedDDLViewer/ExtendedDDLResource.ts @@ -7,12 +7,15 @@ */ import { injectable } from '@cloudbeaver/core-di'; import { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; -import { CachedMapResource, isResourceAlias, ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { CachedMapResource, isResourceAlias, type ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { GraphQLService } from '@cloudbeaver/core-sdk'; @injectable() export class ExtendedDDLResource extends CachedMapResource { - constructor(private readonly graphQLService: GraphQLService, private readonly navNodeInfoResource: NavNodeInfoResource) { + constructor( + private readonly graphQLService: GraphQLService, + private readonly navNodeInfoResource: NavNodeInfoResource, + ) { super(); this.navNodeInfoResource.outdateResource(this); diff --git a/webapp/packages/plugin-ddl-viewer/src/ExtendedDDLViewer/ExtendedDDLViewerTabPanel.tsx b/webapp/packages/plugin-ddl-viewer/src/ExtendedDDLViewer/ExtendedDDLViewerTabPanel.tsx index f7226ba4df..bd9ff42aa4 100644 --- a/webapp/packages/plugin-ddl-viewer/src/ExtendedDDLViewer/ExtendedDDLViewerTabPanel.tsx +++ b/webapp/packages/plugin-ddl-viewer/src/ExtendedDDLViewer/ExtendedDDLViewerTabPanel.tsx @@ -21,11 +21,11 @@ import { useCodemirrorExtensions } from '@cloudbeaver/plugin-codemirror6'; import type { NavNodeTransformViewComponent } from '@cloudbeaver/plugin-navigation-tree'; import { SQLCodeEditorLoader, useSqlDialectExtension } from '@cloudbeaver/plugin-sql-editor-new'; -import { DATA_CONTEXT_DDL_VIEWER_NODE } from '../DdlViewer/DATA_CONTEXT_DDL_VIEWER_NODE'; -import { DATA_CONTEXT_DDL_VIEWER_VALUE } from '../DdlViewer/DATA_CONTEXT_DDL_VIEWER_VALUE'; +import { DATA_CONTEXT_DDL_VIEWER_NODE } from '../DdlViewer/DATA_CONTEXT_DDL_VIEWER_NODE.js'; +import { DATA_CONTEXT_DDL_VIEWER_VALUE } from '../DdlViewer/DATA_CONTEXT_DDL_VIEWER_VALUE.js'; import style from '../DdlViewer/DDLViewerTabPanel.module.css'; -import { MENU_DDL_VIEWER_FOOTER } from '../DdlViewer/MENU_DDL_VIEWER_FOOTER'; -import { ExtendedDDLResource } from './ExtendedDDLResource'; +import { MENU_DDL_VIEWER_FOOTER } from '../DdlViewer/MENU_DDL_VIEWER_FOOTER.js'; +import { ExtendedDDLResource } from './ExtendedDDLResource.js'; export const ExtendedDDLViewerTabPanel: NavNodeTransformViewComponent = observer(function ExtendedDDLViewerTabPanel({ nodeId, folderId }) { const styles = useS(style); diff --git a/webapp/packages/plugin-ddl-viewer/src/index.ts b/webapp/packages/plugin-ddl-viewer/src/index.ts index 9e5e6ba322..91d1b0add5 100644 --- a/webapp/packages/plugin-ddl-viewer/src/index.ts +++ b/webapp/packages/plugin-ddl-viewer/src/index.ts @@ -1,4 +1,11 @@ -import { manifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { manifest } from './manifest.js'; // All Services and Components that is provided by this plugin should be exported here diff --git a/webapp/packages/plugin-ddl-viewer/src/manifest.ts b/webapp/packages/plugin-ddl-viewer/src/manifest.ts index be83beacdd..72202e05bd 100644 --- a/webapp/packages/plugin-ddl-viewer/src/manifest.ts +++ b/webapp/packages/plugin-ddl-viewer/src/manifest.ts @@ -13,9 +13,9 @@ export const manifest: PluginManifest = { }, providers: [ - () => import('./DdlViewerBootstrap').then(m => m.DdlViewerBootstrap), - () => import('./DdlViewer/DDLViewerFooterService').then(m => m.DDLViewerFooterService), - () => import('./ExtendedDDLViewer/ExtendedDDLResource').then(m => m.ExtendedDDLResource), - () => import('./DdlViewer/DdlResource').then(m => m.DdlResource), + () => import('./DdlViewerBootstrap.js').then(m => m.DdlViewerBootstrap), + () => import('./DdlViewer/DDLViewerFooterService.js').then(m => m.DDLViewerFooterService), + () => import('./ExtendedDDLViewer/ExtendedDDLResource.js').then(m => m.ExtendedDDLResource), + () => import('./DdlViewer/DdlResource.js').then(m => m.DdlResource), ], }; diff --git a/webapp/packages/plugin-devtools/package.json b/webapp/packages/plugin-devtools/package.json index 988dd73508..a5bc7cc693 100644 --- a/webapp/packages/plugin-devtools/package.json +++ b/webapp/packages/plugin-devtools/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-devtools", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-devtools/src/ContextMenu/SearchResourceMenuItem.ts b/webapp/packages/plugin-devtools/src/ContextMenu/SearchResourceMenuItem.ts index 2749d24945..4d40c111bb 100644 --- a/webapp/packages/plugin-devtools/src/ContextMenu/SearchResourceMenuItem.ts +++ b/webapp/packages/plugin-devtools/src/ContextMenu/SearchResourceMenuItem.ts @@ -8,7 +8,7 @@ import type { IContextMenuItemProps } from '@cloudbeaver/core-ui'; import { MenuCustomItem } from '@cloudbeaver/core-view'; -import { SearchResourceMenuItemComponent } from './SearchResourceMenuItemComponent'; +import { SearchResourceMenuItemComponent } from './SearchResourceMenuItemComponent.js'; export class SearchResourceMenuItem extends MenuCustomItem { constructor() { diff --git a/webapp/packages/plugin-devtools/src/ContextMenu/SearchResourceMenuItemComponent.tsx b/webapp/packages/plugin-devtools/src/ContextMenu/SearchResourceMenuItemComponent.tsx index c3a623f753..6d67352f3c 100644 --- a/webapp/packages/plugin-devtools/src/ContextMenu/SearchResourceMenuItemComponent.tsx +++ b/webapp/packages/plugin-devtools/src/ContextMenu/SearchResourceMenuItemComponent.tsx @@ -13,7 +13,7 @@ import { useDataContextLink } from '@cloudbeaver/core-data-context'; import type { IContextMenuItemProps } from '@cloudbeaver/core-ui'; import type { ICustomMenuItemComponent } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_MENU_SEARCH } from './DATA_CONTEXT_MENU_SEARCH'; +import { DATA_CONTEXT_MENU_SEARCH } from './DATA_CONTEXT_MENU_SEARCH.js'; import styles from './SearchResourceMenuItemComponent.module.css'; export const SearchResourceMenuItemComponent: ICustomMenuItemComponent = observer(function SearchResourceMenuItemComponent({ diff --git a/webapp/packages/plugin-devtools/src/DevToolsService.ts b/webapp/packages/plugin-devtools/src/DevToolsService.ts index 89a6a0174c..0012672614 100644 --- a/webapp/packages/plugin-devtools/src/DevToolsService.ts +++ b/webapp/packages/plugin-devtools/src/DevToolsService.ts @@ -75,7 +75,7 @@ export class DevToolsService { function getDefaultDevToolsSettings(): IDevToolsSettings { return { - enabled: process.env.NODE_ENV === 'development', + enabled: process.env['NODE_ENV'] === 'development', distributed: false, configuration: false, }; diff --git a/webapp/packages/plugin-devtools/src/PluginBootstrap.ts b/webapp/packages/plugin-devtools/src/PluginBootstrap.ts index b52a1042f0..ce7cfb8ed1 100644 --- a/webapp/packages/plugin-devtools/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-devtools/src/PluginBootstrap.ts @@ -5,26 +5,26 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { App, Bootstrap, injectable, IServiceConstructor, IServiceProvider } from '@cloudbeaver/core-di'; +import { App, Bootstrap, injectable, type IServiceConstructor, IServiceProvider } from '@cloudbeaver/core-di'; import { CachedResource } from '@cloudbeaver/core-resource'; import { EAdminPermission, PermissionsService } from '@cloudbeaver/core-root'; import { ActionService, DATA_CONTEXT_SUBMENU_ITEM, MenuBaseItem, MenuService } from '@cloudbeaver/core-view'; import { TOP_NAV_BAR_SETTINGS_MENU } from '@cloudbeaver/plugin-settings-menu'; import { MENU_USER_PROFILE } from '@cloudbeaver/plugin-user-profile'; -import { ACTION_DEVTOOLS } from './actions/ACTION_DEVTOOLS'; -import { ACTION_DEVTOOLS_MODE_CONFIGURATION } from './actions/ACTION_DEVTOOLS_MODE_CONFIGURATION'; -import { ACTION_DEVTOOLS_MODE_DISTRIBUTED } from './actions/ACTION_DEVTOOLS_MODE_DISTRIBUTED'; -import { DATA_CONTEXT_MENU_SEARCH } from './ContextMenu/DATA_CONTEXT_MENU_SEARCH'; -import { SearchResourceMenuItem } from './ContextMenu/SearchResourceMenuItem'; -import { DevToolsService } from './DevToolsService'; -import { MENU_DEVTOOLS } from './menu/MENU_DEVTOOLS'; -import { MENU_PLUGIN } from './menu/MENU_PLUGIN'; -import { MENU_PLUGINS } from './menu/MENU_PLUGINS'; -import { MENU_RESOURCE } from './menu/MENU_RESOURCE'; -import { MENU_RESOURCES } from './menu/MENU_RESOURCES'; -import { PluginSubMenuItem } from './menu/PluginSubMenuItem'; -import { ResourceSubMenuItem } from './menu/ResourceSubMenuItem'; +import { ACTION_DEVTOOLS } from './actions/ACTION_DEVTOOLS.js'; +import { ACTION_DEVTOOLS_MODE_CONFIGURATION } from './actions/ACTION_DEVTOOLS_MODE_CONFIGURATION.js'; +import { ACTION_DEVTOOLS_MODE_DISTRIBUTED } from './actions/ACTION_DEVTOOLS_MODE_DISTRIBUTED.js'; +import { DATA_CONTEXT_MENU_SEARCH } from './ContextMenu/DATA_CONTEXT_MENU_SEARCH.js'; +import { SearchResourceMenuItem } from './ContextMenu/SearchResourceMenuItem.js'; +import { DevToolsService } from './DevToolsService.js'; +import { MENU_DEVTOOLS } from './menu/MENU_DEVTOOLS.js'; +import { MENU_PLUGIN } from './menu/MENU_PLUGIN.js'; +import { MENU_PLUGINS } from './menu/MENU_PLUGINS.js'; +import { MENU_RESOURCE } from './menu/MENU_RESOURCE.js'; +import { MENU_RESOURCES } from './menu/MENU_RESOURCES.js'; +import { PluginSubMenuItem } from './menu/PluginSubMenuItem.js'; +import { ResourceSubMenuItem } from './menu/ResourceSubMenuItem.js'; @injectable() export class PluginBootstrap extends Bootstrap { @@ -39,7 +39,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.menuService.addCreator({ menus: [TOP_NAV_BAR_SETTINGS_MENU], isApplicable: () => this.permissionsService.has(EAdminPermission.admin), diff --git a/webapp/packages/plugin-devtools/src/index.ts b/webapp/packages/plugin-devtools/src/index.ts index fd325378da..4854342ff1 100644 --- a/webapp/packages/plugin-devtools/src/index.ts +++ b/webapp/packages/plugin-devtools/src/index.ts @@ -1,6 +1,13 @@ -import { devToolsPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { devToolsPlugin } from './manifest.js'; export { devToolsPlugin }; export default devToolsPlugin; -export * from './DevToolsService'; +export * from './DevToolsService.js'; diff --git a/webapp/packages/plugin-devtools/src/manifest.ts b/webapp/packages/plugin-devtools/src/manifest.ts index a185c4766f..e3d0c8ccea 100644 --- a/webapp/packages/plugin-devtools/src/manifest.ts +++ b/webapp/packages/plugin-devtools/src/manifest.ts @@ -11,5 +11,5 @@ export const devToolsPlugin: PluginManifest = { info: { name: 'DevTools plugin', }, - providers: [() => import('./PluginBootstrap').then(m => m.PluginBootstrap), () => import('./DevToolsService').then(m => m.DevToolsService)], + providers: [() => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), () => import('./DevToolsService.js').then(m => m.DevToolsService)], }; diff --git a/webapp/packages/plugin-devtools/src/menu/PluginSubMenuItem.ts b/webapp/packages/plugin-devtools/src/menu/PluginSubMenuItem.ts index e9d19cb816..16bc269c24 100644 --- a/webapp/packages/plugin-devtools/src/menu/PluginSubMenuItem.ts +++ b/webapp/packages/plugin-devtools/src/menu/PluginSubMenuItem.ts @@ -8,7 +8,7 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; import { MenuSubMenuItem } from '@cloudbeaver/core-view'; -import { MENU_PLUGIN } from './MENU_PLUGIN'; +import { MENU_PLUGIN } from './MENU_PLUGIN.js'; export class PluginSubMenuItem extends MenuSubMenuItem { readonly plugin: PluginManifest; diff --git a/webapp/packages/plugin-devtools/src/menu/ResourceSubMenuItem.ts b/webapp/packages/plugin-devtools/src/menu/ResourceSubMenuItem.ts index 1f49a4f028..f39a3db117 100644 --- a/webapp/packages/plugin-devtools/src/menu/ResourceSubMenuItem.ts +++ b/webapp/packages/plugin-devtools/src/menu/ResourceSubMenuItem.ts @@ -8,7 +8,7 @@ import type { IServiceConstructor } from '@cloudbeaver/core-di'; import { MenuSubMenuItem } from '@cloudbeaver/core-view'; -import { MENU_RESOURCE } from './MENU_RESOURCE'; +import { MENU_RESOURCE } from './MENU_RESOURCE.js'; export class ResourceSubMenuItem extends MenuSubMenuItem { readonly resource: IServiceConstructor; diff --git a/webapp/packages/plugin-gis-viewer/package.json b/webapp/packages/plugin-gis-viewer/package.json index ec2d5088bf..3445ff03a6 100644 --- a/webapp/packages/plugin-gis-viewer/package.json +++ b/webapp/packages/plugin-gis-viewer/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-gis-viewer", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-gis-viewer/src/CrsInput.tsx b/webapp/packages/plugin-gis-viewer/src/CrsInput.tsx index eaf545eef5..8945a5eb6c 100644 --- a/webapp/packages/plugin-gis-viewer/src/CrsInput.tsx +++ b/webapp/packages/plugin-gis-viewer/src/CrsInput.tsx @@ -8,7 +8,7 @@ import { Combobox } from '@cloudbeaver/core-blocks'; import classes from './CrsInput.module.css'; -import type { CrsKey } from './LeafletMap'; +import type { CrsKey } from './LeafletMap.js'; interface Props { value: CrsKey; @@ -19,8 +19,8 @@ const items: CrsKey[] = ['Simple', 'EPSG:3395', 'EPSG:3857', 'EPSG:4326', 'EPSG: export function CrsInput(props: Props) { return ( -
- +
+
); } diff --git a/webapp/packages/plugin-gis-viewer/src/GISValuePresentation.tsx b/webapp/packages/plugin-gis-viewer/src/GISValuePresentation.tsx index f599970393..cbfad5c71e 100644 --- a/webapp/packages/plugin-gis-viewer/src/GISValuePresentation.tsx +++ b/webapp/packages/plugin-gis-viewer/src/GISValuePresentation.tsx @@ -8,22 +8,22 @@ import { observer } from 'mobx-react-lite'; import proj4 from 'proj4'; import { useCallback, useState } from 'react'; -import wellknown, { GeoJSONGeometry } from 'wellknown'; +import wellknown, { type GeoJSONGeometry } from 'wellknown'; import { TextPlaceholder, useTranslate } from '@cloudbeaver/core-blocks'; import { - IDatabaseDataModel, - IResultSetElementKey, + type IDatabaseDataModel, + type IResultSetElementKey, ResultSetDataKeysUtils, ResultSetDataSource, ResultSetSelectAction, ResultSetViewAction, } from '@cloudbeaver/plugin-data-viewer'; -import { CrsInput } from './CrsInput'; +import { CrsInput } from './CrsInput.js'; import classes from './GISValuePresentation.module.css'; -import { CrsKey, IAssociatedValue, IGeoJSONFeature, LeafletMap } from './LeafletMap'; -import { ResultSetGISAction } from './ResultSetGISAction'; +import { type CrsKey, type IAssociatedValue, type IGeoJSONFeature, LeafletMap } from './LeafletMap.js'; +import { ResultSetGISAction } from './ResultSetGISAction.js'; proj4.defs('EPSG:3395', '+title=World Mercator +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'); @@ -153,11 +153,11 @@ export const GISValuePresentation = observer(function GISValuePresentatio } return ( -
-
+
+
-
+
diff --git a/webapp/packages/plugin-gis-viewer/src/GISViewer.tsx b/webapp/packages/plugin-gis-viewer/src/GISViewer.tsx index 606b20da66..1041be5d18 100644 --- a/webapp/packages/plugin-gis-viewer/src/GISViewer.tsx +++ b/webapp/packages/plugin-gis-viewer/src/GISViewer.tsx @@ -8,7 +8,7 @@ import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui'; import { type IDataValuePanelProps, isResultSetDataModel } from '@cloudbeaver/plugin-data-viewer'; -import { GISValuePresentation } from './GISValuePresentation'; +import { GISValuePresentation } from './GISValuePresentation.js'; export const GISViewer: TabContainerPanelComponent = function GISViewer({ model: unknownModel, resultIndex }) { const model = unknownModel as any; diff --git a/webapp/packages/plugin-gis-viewer/src/GISViewerBootstrap.ts b/webapp/packages/plugin-gis-viewer/src/GISViewerBootstrap.ts index f432b31c79..5fee869512 100644 --- a/webapp/packages/plugin-gis-viewer/src/GISViewerBootstrap.ts +++ b/webapp/packages/plugin-gis-viewer/src/GISViewerBootstrap.ts @@ -11,10 +11,10 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ResultDataFormat } from '@cloudbeaver/core-sdk'; import { DataValuePanelService, isResultSetDataSource, ResultSetSelectAction } from '@cloudbeaver/plugin-data-viewer'; -import { ResultSetGISAction } from './ResultSetGISAction'; +import { ResultSetGISAction } from './ResultSetGISAction.js'; const GISViewer = lazy(async () => { - const { GISViewer } = await import('./GISViewer'); + const { GISViewer } = await import('./GISViewer.js'); return { default: GISViewer }; }); @@ -25,7 +25,7 @@ export class GISViewerBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.dataValuePanelService.add({ key: 'gis-presentation', options: { @@ -48,11 +48,9 @@ export class GISViewerBootstrap extends Bootstrap { if (activeElements.length === 0) { return true; } else { - return !gis.isGISFormat(activeElements[0]); + return !gis.isGISFormat(activeElements[0]!); } }, }); } - - load(): void {} } diff --git a/webapp/packages/plugin-gis-viewer/src/LeafletMap.tsx b/webapp/packages/plugin-gis-viewer/src/LeafletMap.tsx index 5e9058d810..d9cdb31863 100644 --- a/webapp/packages/plugin-gis-viewer/src/LeafletMap.tsx +++ b/webapp/packages/plugin-gis-viewer/src/LeafletMap.tsx @@ -121,7 +121,7 @@ export const LeafletMap: React.FC = function LeafletMap({ geoJSON, crsKey popupContent += ''; for (let i = 0; i < associatedValues.length; i++) { - const { key, value } = associatedValues[i]; + const { key, value } = associatedValues[i]!; if (value === undefined || typeof value === 'object') { continue; @@ -141,7 +141,7 @@ export const LeafletMap: React.FC = function LeafletMap({ geoJSON, crsKey geoJSONLayerRef.clearLayers(); for (let i = 0; i < geoJSON.length; i++) { - geoJSONLayerRef.addData(geoJSON[i]); + geoJSONLayerRef.addData(geoJSON[i]!); } const bounds = geoJSONLayerRef.getBounds(); diff --git a/webapp/packages/plugin-gis-viewer/src/LocaleService.ts b/webapp/packages/plugin-gis-viewer/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-gis-viewer/src/LocaleService.ts +++ b/webapp/packages/plugin-gis-viewer/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-gis-viewer/src/ResultSetGISAction.ts b/webapp/packages/plugin-gis-viewer/src/ResultSetGISAction.ts index fcad8b8799..9f3fb53c17 100644 --- a/webapp/packages/plugin-gis-viewer/src/ResultSetGISAction.ts +++ b/webapp/packages/plugin-gis-viewer/src/ResultSetGISAction.ts @@ -11,13 +11,13 @@ import { DatabaseDataAction, type IDatabaseDataSource, type IDatabaseResultSet, - IResultSetElementKey, - IResultSetGeometryValue, + type IResultSetElementKey, + type IResultSetGeometryValue, isResultSetGeometryValue, ResultSetViewAction, } from '@cloudbeaver/plugin-data-viewer'; -import type { IDatabaseDataGISAction } from './IDatabaseDataGISAction'; +import type { IDatabaseDataGISAction } from './IDatabaseDataGISAction.js'; @databaseDataAction() export class ResultSetGISAction diff --git a/webapp/packages/plugin-gis-viewer/src/index.ts b/webapp/packages/plugin-gis-viewer/src/index.ts index 899d1e1836..6e98e0bdfc 100644 --- a/webapp/packages/plugin-gis-viewer/src/index.ts +++ b/webapp/packages/plugin-gis-viewer/src/index.ts @@ -1,5 +1,12 @@ -import { manifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { manifest } from './manifest.js'; export default manifest; -export * from './ResultSetGISAction'; +export * from './ResultSetGISAction.js'; diff --git a/webapp/packages/plugin-gis-viewer/src/manifest.ts b/webapp/packages/plugin-gis-viewer/src/manifest.ts index 9ecdd388b2..1dc97a1e4e 100644 --- a/webapp/packages/plugin-gis-viewer/src/manifest.ts +++ b/webapp/packages/plugin-gis-viewer/src/manifest.ts @@ -11,5 +11,5 @@ export const manifest: PluginManifest = { info: { name: 'GIS Viewer plugin', }, - providers: [() => import('./GISViewerBootstrap').then(m => m.GISViewerBootstrap), () => import('./LocaleService').then(m => m.LocaleService)], + providers: [() => import('./GISViewerBootstrap.js').then(m => m.GISViewerBootstrap), () => import('./LocaleService.js').then(m => m.LocaleService)], }; diff --git a/webapp/packages/plugin-help/package.json b/webapp/packages/plugin-help/package.json index b47e12f971..31dcb5f79f 100644 --- a/webapp/packages/plugin-help/package.json +++ b/webapp/packages/plugin-help/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-help", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-help/src/LocaleService.ts b/webapp/packages/plugin-help/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-help/src/LocaleService.ts +++ b/webapp/packages/plugin-help/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-help/src/PluginBootstrap.ts b/webapp/packages/plugin-help/src/PluginBootstrap.ts index c8fdca538e..f813bcb0e9 100644 --- a/webapp/packages/plugin-help/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-help/src/PluginBootstrap.ts @@ -10,14 +10,14 @@ import { ActionSnackbar, importLazyComponent } from '@cloudbeaver/core-blocks'; import { LocalStorageSaveService } from '@cloudbeaver/core-browser'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { CommonDialogService } from '@cloudbeaver/core-dialogs'; -import { ENotificationType, INotification, NotificationService } from '@cloudbeaver/core-events'; +import { ENotificationType, type INotification, NotificationService } from '@cloudbeaver/core-events'; import { ScreenService } from '@cloudbeaver/core-routing'; import { ActionService, menuExtractItems, MenuService } from '@cloudbeaver/core-view'; import { MENU_APP_STATE } from '@cloudbeaver/plugin-top-app-bar'; -import { ACTION_APP_HELP } from './actions/ACTION_APP_HELP'; +import { ACTION_APP_HELP } from './actions/ACTION_APP_HELP.js'; -const ShortcutsDialog = importLazyComponent(() => import('./Shortcuts/ShortcutsDialog').then(m => m.ShortcutsDialog)); +const ShortcutsDialog = importLazyComponent(() => import('./Shortcuts/ShortcutsDialog.js').then(m => m.ShortcutsDialog)); @injectable() export class PluginBootstrap extends Bootstrap { @@ -34,9 +34,9 @@ export class PluginBootstrap extends Bootstrap { this.errorNotification = null; } - async load(): Promise {} + override async load(): Promise {} - register(): void { + override register(): void { this.addTopAppMenuItems(); this.addMultiTabSupportNotification(); } diff --git a/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts b/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts index a6ee2d7489..bf4158577f 100644 --- a/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts +++ b/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { getOS, OperatingSystem } from '@cloudbeaver/core-utils'; -import { getCommonAndOSSpecificKeys, IKeyBinding, KEY_BINDING_OPEN_IN_TAB, KEY_BINDING_REDO, KEY_BINDING_UNDO } from '@cloudbeaver/core-view'; +import { getCommonAndOSSpecificKeys, type IKeyBinding, KEY_BINDING_OPEN_IN_TAB, KEY_BINDING_REDO, KEY_BINDING_UNDO } from '@cloudbeaver/core-view'; import { KEY_BINDING_COLLAPSE_ALL, KEY_BINDING_ENABLE_FILTER, KEY_BINDING_LINK_OBJECT } from '@cloudbeaver/plugin-navigation-tree'; import { KEY_BINDING_SQL_EDITOR_EXECUTE, @@ -16,7 +16,7 @@ import { KEY_BINDING_SQL_EDITOR_SHOW_EXECUTION_PLAN, } from '@cloudbeaver/plugin-sql-editor'; -import type { IShortcut } from './IShortcut'; +import type { IShortcut } from './IShortcut.js'; export const DATA_VIEWER_SHORTCUTS: IShortcut[] = [ { diff --git a/webapp/packages/plugin-help/src/Shortcuts/Shortcut.tsx b/webapp/packages/plugin-help/src/Shortcuts/Shortcut.tsx index d7591daa4e..294480fcc7 100644 --- a/webapp/packages/plugin-help/src/Shortcuts/Shortcut.tsx +++ b/webapp/packages/plugin-help/src/Shortcuts/Shortcut.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { s, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import type { IShortcut } from './IShortcut'; +import type { IShortcut } from './IShortcut.js'; import styles from './Shortcut.module.css'; interface Props { diff --git a/webapp/packages/plugin-help/src/Shortcuts/ShortcutsDialog.tsx b/webapp/packages/plugin-help/src/Shortcuts/ShortcutsDialog.tsx index aea2a272a5..4c00077824 100644 --- a/webapp/packages/plugin-help/src/Shortcuts/ShortcutsDialog.tsx +++ b/webapp/packages/plugin-help/src/Shortcuts/ShortcutsDialog.tsx @@ -22,8 +22,8 @@ import { import type { DialogComponent } from '@cloudbeaver/core-dialogs'; import { WebsiteLinks } from '@cloudbeaver/core-website'; -import { Shortcut } from './Shortcut'; -import { DATA_VIEWER_SHORTCUTS, NAVIGATION_TREE_SHORTCUTS, SQL_EDITOR_SHORTCUTS } from './SHORTCUTS_DATA'; +import { Shortcut } from './Shortcut.js'; +import { DATA_VIEWER_SHORTCUTS, NAVIGATION_TREE_SHORTCUTS, SQL_EDITOR_SHORTCUTS } from './SHORTCUTS_DATA.js'; import style from './ShortcutsDialog.module.css'; export const ShortcutsDialog: DialogComponent = function ShortcutsDialog({ rejectDialog }) { diff --git a/webapp/packages/plugin-help/src/index.ts b/webapp/packages/plugin-help/src/index.ts index e2e38fb300..4f4c9cb3ab 100644 --- a/webapp/packages/plugin-help/src/index.ts +++ b/webapp/packages/plugin-help/src/index.ts @@ -1,3 +1,10 @@ -import { manifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { manifest } from './manifest.js'; export default manifest; diff --git a/webapp/packages/plugin-help/src/manifest.ts b/webapp/packages/plugin-help/src/manifest.ts index c05806ff01..4421a59be3 100644 --- a/webapp/packages/plugin-help/src/manifest.ts +++ b/webapp/packages/plugin-help/src/manifest.ts @@ -12,5 +12,5 @@ export const manifest: PluginManifest = { name: 'Help plugin', }, - providers: [() => import('./PluginBootstrap').then(m => m.PluginBootstrap), () => import('./LocaleService').then(m => m.LocaleService)], + providers: [() => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), () => import('./LocaleService.js').then(m => m.LocaleService)], }; diff --git a/webapp/packages/plugin-localization/package.json b/webapp/packages/plugin-localization/package.json index 8667beeef2..2f7b7a129e 100644 --- a/webapp/packages/plugin-localization/package.json +++ b/webapp/packages/plugin-localization/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-localization", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-localization/src/PluginBootstrap.ts b/webapp/packages/plugin-localization/src/PluginBootstrap.ts index 2297d1ed03..f8c19bf9a3 100644 --- a/webapp/packages/plugin-localization/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-localization/src/PluginBootstrap.ts @@ -19,7 +19,7 @@ export class PluginBootstrap extends Bootstrap { this.reactionDisposer = null; } - register(): void { + override register(): void { this.reactionDisposer = autorun(() => schemaExtra.setLocale(this.localizationService.currentLanguage)); this.localizationService.addProvider(async locale => { await schemaExtra.loadLocale(locale); @@ -27,7 +27,7 @@ export class PluginBootstrap extends Bootstrap { }); } - dispose(): void { + override dispose(): void { this.reactionDisposer?.(); } } diff --git a/webapp/packages/plugin-localization/src/index.ts b/webapp/packages/plugin-localization/src/index.ts index f69e8e7f86..4e798315ae 100644 --- a/webapp/packages/plugin-localization/src/index.ts +++ b/webapp/packages/plugin-localization/src/index.ts @@ -5,6 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { localizationPlugin } from './manifest'; +import { localizationPlugin } from './manifest.js'; export default localizationPlugin; diff --git a/webapp/packages/plugin-localization/src/manifest.ts b/webapp/packages/plugin-localization/src/manifest.ts index fa6eeec745..564adcad93 100644 --- a/webapp/packages/plugin-localization/src/manifest.ts +++ b/webapp/packages/plugin-localization/src/manifest.ts @@ -9,5 +9,5 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const localizationPlugin: PluginManifest = { info: { name: 'Localization plugin' }, - providers: [() => import('./PluginBootstrap').then(m => m.PluginBootstrap)], + providers: [() => import('./PluginBootstrap.js').then(m => m.PluginBootstrap)], }; diff --git a/webapp/packages/plugin-log-viewer/package.json b/webapp/packages/plugin-log-viewer/package.json index 9a66b7a78c..edda5124df 100644 --- a/webapp/packages/plugin-log-viewer/package.json +++ b/webapp/packages/plugin-log-viewer/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-log-viewer", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -54,4 +55,4 @@ "typescript": "^5", "typescript-plugin-css-modules": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/plugin-log-viewer/src/LocaleService.ts b/webapp/packages/plugin-log-viewer/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-log-viewer/src/LocaleService.ts +++ b/webapp/packages/plugin-log-viewer/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogEntry.tsx b/webapp/packages/plugin-log-viewer/src/LogViewer/LogEntry.tsx index 0e8cd1adf2..d768f80e67 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogEntry.tsx +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogEntry.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { Container, IconOrImage, Link, s, TableColumnValue, TableItem, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { isSameDay } from '@cloudbeaver/core-utils'; -import type { ILogEntry } from './ILogEntry'; +import type { ILogEntry } from './ILogEntry.js'; import classes from './LogEntry.module.css'; interface Props { diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.tsx b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.tsx index bb383e8c71..98fc22ea64 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.tsx +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.tsx @@ -11,9 +11,9 @@ import { useCallback, useEffect } from 'react'; import { Pane, ResizerControls, s, Split, TextPlaceholder, useS, useSplitUserState, useTranslate } from '@cloudbeaver/core-blocks'; import style from './LogViewer.module.css'; -import { LogViewerInfoPanel } from './LogViewerInfoPanel'; -import { LogViewerTable } from './LogViewerTable'; -import { useLogViewer } from './useLogViewer'; +import { LogViewerInfoPanel } from './LogViewerInfoPanel.js'; +import { LogViewerTable } from './LogViewerTable.js'; +import { useLogViewer } from './useLogViewer.js'; export const LogViewer = observer(function LogViewer() { const styles = useS(style); diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerBootstrap.ts b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerBootstrap.ts index 5bcbea5c64..5c1ff7a868 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerBootstrap.ts +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerBootstrap.ts @@ -10,10 +10,10 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ActionService, menuExtractItems, MenuService } from '@cloudbeaver/core-view'; import { MENU_TOOLS, ToolsPanelService } from '@cloudbeaver/plugin-tools-panel'; -import { ACTION_LOG_VIEWER_ENABLE } from '../Actions/ACTION_LOG_VIEWER_ENABLE'; -import { LogViewerService } from './LogViewerService'; +import { ACTION_LOG_VIEWER_ENABLE } from '../Actions/ACTION_LOG_VIEWER_ENABLE.js'; +import { LogViewerService } from './LogViewerService.js'; -const LogViewer = importLazyComponent(() => import('./LogViewer').then(m => m.LogViewer)); +const LogViewer = importLazyComponent(() => import('./LogViewer.js').then(m => m.LogViewer)); @injectable() export class LogViewerBootstrap extends Bootstrap { @@ -26,7 +26,7 @@ export class LogViewerBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.menuService.addCreator({ menus: [MENU_TOOLS], getItems: (context, items) => [...items, ACTION_LOG_VIEWER_ENABLE], diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerInfoPanel.tsx b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerInfoPanel.tsx index a132ebb2dc..80adde202b 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerInfoPanel.tsx +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerInfoPanel.tsx @@ -10,7 +10,7 @@ import { useCallback } from 'react'; import { Container, MenuBarSmallItem, s, Textarea, useClipboard, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import type { ILogEntry } from './ILogEntry'; +import type { ILogEntry } from './ILogEntry.js'; import classes from './LogViewerInfoPanel.module.css'; interface Props { diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerService.ts b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerService.ts index 41a54b6707..5dd7191f30 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerService.ts +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerService.ts @@ -11,7 +11,7 @@ import { UserDataService } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; import { ToolsPanelService } from '@cloudbeaver/plugin-tools-panel'; -import { LogViewerSettingsService } from './LogViewerSettingsService'; +import { LogViewerSettingsService } from './LogViewerSettingsService.js'; const logViewerSettingsKey = 'log-viewer'; diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerSettingsService.test.ts b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerSettingsService.test.ts index 8864b159a9..9a0f3d7aa5 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerSettingsService.test.ts +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerSettingsService.test.ts @@ -9,30 +9,30 @@ import { expect, test } from '@jest/globals'; import { coreAppManifest } from '@cloudbeaver/core-app'; import { coreAuthenticationManifest } from '@cloudbeaver/core-authentication'; -import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication'; +import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication.js'; import { coreBrowserManifest } from '@cloudbeaver/core-browser'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreRoutingManifest } from '@cloudbeaver/core-routing'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { coreStorageManifest } from '@cloudbeaver/core-storage'; import { coreViewManifest } from '@cloudbeaver/core-view'; import toolsPanelPlugin from '@cloudbeaver/plugin-tools-panel'; import { createApp } from '@cloudbeaver/tests-runner'; -import { logViewerPlugin } from '../manifest'; -import { LogViewerSettingsService } from './LogViewerSettingsService'; +import { logViewerPlugin } from '../manifest.js'; +import { LogViewerSettingsService } from './LogViewerSettingsService.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx index d433f89962..587b7be20d 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx @@ -9,8 +9,8 @@ import { observer } from 'mobx-react-lite'; import { Container, MenuBarSmallItem, s, Table, TableBody, TableColumnHeader, TableHeader, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import type { ILogEntry } from './ILogEntry'; -import { LogEntry } from './LogEntry'; +import type { ILogEntry } from './ILogEntry.js'; +import { LogEntry } from './LogEntry.js'; import styles from './LogViewerTable.module.css'; interface Props { diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/useLogViewer.tsx b/webapp/packages/plugin-log-viewer/src/LogViewer/useLogViewer.tsx index 510cf76a8f..89416e164b 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/useLogViewer.tsx +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/useLogViewer.tsx @@ -10,9 +10,9 @@ import { observable } from 'mobx'; import { useObjectRef, useObservableRef, useResource } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { SessionLogsResource } from '../SessionLogsResource'; -import type { ILogEntry } from './ILogEntry'; -import { LogViewerService } from './LogViewerService'; +import { SessionLogsResource } from '../SessionLogsResource.js'; +import type { ILogEntry } from './ILogEntry.js'; +import { LogViewerService } from './LogViewerService.js'; interface Props { selectedItem: ILogEntry | null; diff --git a/webapp/packages/plugin-log-viewer/src/SessionLogsEventHandler.ts b/webapp/packages/plugin-log-viewer/src/SessionLogsEventHandler.ts index 3e8decffa4..db6ee0282c 100644 --- a/webapp/packages/plugin-log-viewer/src/SessionLogsEventHandler.ts +++ b/webapp/packages/plugin-log-viewer/src/SessionLogsEventHandler.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { ISessionEvent, SessionEventSource, SessionEventTopic, TopicEventHandler } from '@cloudbeaver/core-root'; +import { type ISessionEvent, SessionEventSource, SessionEventTopic, TopicEventHandler } from '@cloudbeaver/core-root'; import type { CbSessionLogEvent as ISessionLogEvent } from '@cloudbeaver/core-sdk'; export { type ISessionLogEvent }; diff --git a/webapp/packages/plugin-log-viewer/src/SessionLogsResource.ts b/webapp/packages/plugin-log-viewer/src/SessionLogsResource.ts index e157e757d5..06d8b6b611 100644 --- a/webapp/packages/plugin-log-viewer/src/SessionLogsResource.ts +++ b/webapp/packages/plugin-log-viewer/src/SessionLogsResource.ts @@ -11,11 +11,11 @@ import { AppAuthService } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; import { ServerEventId, SessionDataResource } from '@cloudbeaver/core-root'; -import { GraphQLService, LogEntry } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type LogEntry } from '@cloudbeaver/core-sdk'; import { uuid } from '@cloudbeaver/core-utils'; -import { LogViewerSettingsService } from './LogViewer/LogViewerSettingsService'; -import { SessionLogsEventHandler } from './SessionLogsEventHandler'; +import { LogViewerSettingsService } from './LogViewer/LogViewerSettingsService.js'; +import { SessionLogsEventHandler } from './SessionLogsEventHandler.js'; export interface ILogEntry extends LogEntry { id: string; diff --git a/webapp/packages/plugin-log-viewer/src/index.ts b/webapp/packages/plugin-log-viewer/src/index.ts index f679167ad0..32a9a7be90 100644 --- a/webapp/packages/plugin-log-viewer/src/index.ts +++ b/webapp/packages/plugin-log-viewer/src/index.ts @@ -1,8 +1,15 @@ -import { logViewerPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { logViewerPlugin } from './manifest.js'; -export * from './LogViewer/LogViewerBootstrap'; -export * from './LogViewer/LogViewerService'; -export * from './LogViewer/LogViewerSettingsService'; +export * from './LogViewer/LogViewerBootstrap.js'; +export * from './LogViewer/LogViewerService.js'; +export * from './LogViewer/LogViewerSettingsService.js'; export { logViewerPlugin }; export default logViewerPlugin; diff --git a/webapp/packages/plugin-log-viewer/src/manifest.ts b/webapp/packages/plugin-log-viewer/src/manifest.ts index 2ae61c1086..3dbf9fd744 100644 --- a/webapp/packages/plugin-log-viewer/src/manifest.ts +++ b/webapp/packages/plugin-log-viewer/src/manifest.ts @@ -10,11 +10,11 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const logViewerPlugin: PluginManifest = { info: { name: 'Log viewer plugin' }, providers: [ - () => import('./LogViewer/LogViewerBootstrap').then(m => m.LogViewerBootstrap), - () => import('./LogViewer/LogViewerService').then(m => m.LogViewerService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./LogViewer/LogViewerSettingsService').then(m => m.LogViewerSettingsService), - () => import('./SessionLogsResource').then(m => m.SessionLogsResource), - () => import('./SessionLogsEventHandler').then(m => m.SessionLogsEventHandler), + () => import('./LogViewer/LogViewerBootstrap.js').then(m => m.LogViewerBootstrap), + () => import('./LogViewer/LogViewerService.js').then(m => m.LogViewerService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./LogViewer/LogViewerSettingsService.js').then(m => m.LogViewerSettingsService), + () => import('./SessionLogsResource.js').then(m => m.SessionLogsResource), + () => import('./SessionLogsEventHandler.js').then(m => m.SessionLogsEventHandler), ], }; diff --git a/webapp/packages/plugin-navigation-tabs/package.json b/webapp/packages/plugin-navigation-tabs/package.json index 310a97c803..802f237030 100644 --- a/webapp/packages/plugin-navigation-tabs/package.json +++ b/webapp/packages/plugin-navigation-tabs/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-navigation-tabs", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/NavigationTabsBar.tsx b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/NavigationTabsBar.tsx index 1c08a68700..2a60729e76 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/NavigationTabsBar.tsx +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/NavigationTabsBar.tsx @@ -9,16 +9,16 @@ import { observer } from 'mobx-react-lite'; import { useCallback, useEffect, useState } from 'react'; import { UserInfoResource } from '@cloudbeaver/core-authentication'; -import { Loader, s, SContext, StyleRegistry, TextPlaceholder, useExecutor, useS, useTranslate } from '@cloudbeaver/core-blocks'; +import { Loader, s, SContext, type StyleRegistry, TextPlaceholder, useExecutor, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ITabData, TabPanel, TabsBox, TabStyles } from '@cloudbeaver/core-ui'; +import { type ITabData, TabPanel, TabsBox, TabStyles } from '@cloudbeaver/core-ui'; import { CaptureView } from '@cloudbeaver/core-view'; -import { NavigationTabsService } from '../NavigationTabsService'; +import { NavigationTabsService } from '../NavigationTabsService.js'; import styles from './shared/NavigationTabsBar.module.css'; import NavigationTabsBarTab from './shared/NavigationTabsBarTab.module.css'; -import { TabHandlerPanel } from './Tabs/TabHandlerPanel'; -import { TabHandlerTab } from './Tabs/TabHandlerTab'; +import { TabHandlerPanel } from './Tabs/TabHandlerPanel.js'; +import { TabHandlerTab } from './Tabs/TabHandlerTab.js'; interface Props { className?: string; diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/TabHandlerPanel.tsx b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/TabHandlerPanel.tsx index 34f54c333b..a59ac7739c 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/TabHandlerPanel.tsx +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/TabHandlerPanel.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { useTab } from './useTab'; -import { useTabHandler } from './useTabHandler'; +import { useTab } from './useTab.js'; +import { useTabHandler } from './useTabHandler.js'; export const TabHandlerPanel = observer<{ tabId: string }>(function TabHandlerPanel({ tabId }) { const tab = useTab(tabId); diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/TabHandlerTab.tsx b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/TabHandlerTab.tsx index 744425fe5a..6d9250ce47 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/TabHandlerTab.tsx +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/TabHandlerTab.tsx @@ -7,8 +7,8 @@ */ import { observer } from 'mobx-react-lite'; -import { useTab } from './useTab'; -import { useTabHandler } from './useTabHandler'; +import { useTab } from './useTab.js'; +import { useTabHandler } from './useTabHandler.js'; interface IProps { tabId: string; diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/useTab.ts b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/useTab.ts index e7101af17a..b898d6fe0e 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/useTab.ts +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/useTab.ts @@ -7,7 +7,7 @@ */ import { useService } from '@cloudbeaver/core-di'; -import { NavigationTabsService } from '../../NavigationTabsService'; +import { NavigationTabsService } from '../../NavigationTabsService.js'; export function useTab(tabId: string) { const navigationTabs = useService(NavigationTabsService); diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/useTabHandler.ts b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/useTabHandler.ts index 3b74417232..2671011c90 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/useTabHandler.ts +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/Tabs/useTabHandler.ts @@ -7,7 +7,7 @@ */ import { useService } from '@cloudbeaver/core-di'; -import { NavigationTabsService } from '../../NavigationTabsService'; +import { NavigationTabsService } from '../../NavigationTabsService.js'; export function useTabHandler(handlerId: string) { const navigationTabs = useService(NavigationTabsService); diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/index.ts b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/index.ts index bb292dbb43..478e3a7793 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/index.ts +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsBar/index.ts @@ -1 +1,8 @@ -export * from './NavigationTabsBar'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './NavigationTabsBar.js'; diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsService.ts b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsService.ts index 47d6a97672..6e96dc7533 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsService.ts +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/NavigationTabsService.ts @@ -11,16 +11,16 @@ import { AdministrationScreenService } from '@cloudbeaver/core-administration'; import { AppAuthService, UserInfoResource } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { ProjectsService } from '@cloudbeaver/core-projects'; -import { resourceKeyList, ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { resourceKeyList, type ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { StorageService } from '@cloudbeaver/core-storage'; import { isArraysEqual, MetadataMap, TempMap } from '@cloudbeaver/core-utils'; -import { ACTION_OPEN_IN_TAB, IActiveView, View } from '@cloudbeaver/core-view'; +import { ACTION_OPEN_IN_TAB, type IActiveView, View } from '@cloudbeaver/core-view'; -import type { ITab, ITabMetadata } from './ITab'; -import { TabHandler, TabHandlerEvent, TabHandlerOptions, TabSyncHandlerEvent } from './TabHandler'; -import { ITabNavigationContext, TabNavigationContext } from './TabNavigationContext'; +import type { ITab, ITabMetadata } from './ITab.js'; +import { TabHandler, type TabHandlerEvent, type TabHandlerOptions, type TabSyncHandlerEvent } from './TabHandler.js'; +import { type ITabNavigationContext, TabNavigationContext } from './TabNavigationContext.js'; interface INavigatorHistory { history: string[]; @@ -67,7 +67,7 @@ export class NavigationTabsService extends View { let projectId = MULTI_PROJECTS; if (this.projectsService.activeProjects.length === 1) { - projectId = this.projectsService.activeProjects[0].id; + projectId = this.projectsService.activeProjects[0]!.id; } if (!this.tempHistoryState.has(projectId)) { diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/TabHandler.ts b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/TabHandler.ts index f1c3491797..2fa03920d9 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/TabHandler.ts +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/TabHandler.ts @@ -7,7 +7,7 @@ */ import type { IExtension } from '@cloudbeaver/core-extensions'; -import type { ITab } from './ITab'; +import type { ITab } from './ITab.js'; export interface TabHandlerTabProps { tab: ITab; diff --git a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/TabNavigationContext.ts b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/TabNavigationContext.ts index 5623d406df..1e4cdb3a79 100644 --- a/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/TabNavigationContext.ts +++ b/webapp/packages/plugin-navigation-tabs/src/NavigationTabs/TabNavigationContext.ts @@ -10,8 +10,8 @@ import { observable } from 'mobx'; import type { UserInfoResource } from '@cloudbeaver/core-authentication'; import { uuid } from '@cloudbeaver/core-utils'; -import type { ITab, ITabOptions } from './ITab'; -import type { NavigationTabsService } from './NavigationTabsService'; +import type { ITab, ITabOptions } from './ITab.js'; +import type { NavigationTabsService } from './NavigationTabsService.js'; export interface ITabNavigationContext { readonly isNewlyCreated: boolean; diff --git a/webapp/packages/plugin-navigation-tabs/src/PluginBootstrap.ts b/webapp/packages/plugin-navigation-tabs/src/PluginBootstrap.ts index 7465b57cf0..a9a772100a 100644 --- a/webapp/packages/plugin-navigation-tabs/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-navigation-tabs/src/PluginBootstrap.ts @@ -11,7 +11,7 @@ import { AppScreenService } from '@cloudbeaver/core-app'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; const NavigationTabsBar = React.lazy(async () => { - const { NavigationTabsBar } = await import('./NavigationTabs/NavigationTabsBar'); + const { NavigationTabsBar } = await import('./NavigationTabs/NavigationTabsBar/index.js'); return { default: NavigationTabsBar }; }); @@ -21,9 +21,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.appScreenService.rightAreaTop.add(NavigationTabsBar); } - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-navigation-tabs/src/index.ts b/webapp/packages/plugin-navigation-tabs/src/index.ts index 92b114aae1..f51a0a0c71 100644 --- a/webapp/packages/plugin-navigation-tabs/src/index.ts +++ b/webapp/packages/plugin-navigation-tabs/src/index.ts @@ -1,8 +1,15 @@ -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; -export * from './NavigationTabs/NavigationTabsService'; -export * from './NavigationTabs/TabNavigationContext'; -export * from './NavigationTabs/ITab'; -export * from './NavigationTabs/TabHandler'; -export * from './NavigationTabs/NavigationTabsBar/Tabs/useTab'; -export * from './NavigationTabs/NavigationTabsBar'; +export * from './NavigationTabs/NavigationTabsService.js'; +export * from './NavigationTabs/TabNavigationContext.js'; +export * from './NavigationTabs/ITab.js'; +export * from './NavigationTabs/TabHandler.js'; +export * from './NavigationTabs/NavigationTabsBar/Tabs/useTab.js'; +export * from './NavigationTabs/NavigationTabsBar/index.js'; diff --git a/webapp/packages/plugin-navigation-tabs/src/manifest.ts b/webapp/packages/plugin-navigation-tabs/src/manifest.ts index 758c609db7..413104069c 100644 --- a/webapp/packages/plugin-navigation-tabs/src/manifest.ts +++ b/webapp/packages/plugin-navigation-tabs/src/manifest.ts @@ -10,7 +10,7 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const navigationTabsPlugin: PluginManifest = { info: { name: 'Navigation tabs plugin' }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./NavigationTabs/NavigationTabsService').then(m => m.NavigationTabsService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./NavigationTabs/NavigationTabsService.js').then(m => m.NavigationTabsService), ], }; diff --git a/webapp/packages/plugin-navigation-tree-filters/package.json b/webapp/packages/plugin-navigation-tree-filters/package.json index ac297944a2..ab6da4e45c 100644 --- a/webapp/packages/plugin-navigation-tree-filters/package.json +++ b/webapp/packages/plugin-navigation-tree-filters/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-navigation-tree-filters", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-navigation-tree-filters/src/LocaleService.ts b/webapp/packages/plugin-navigation-tree-filters/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-navigation-tree-filters/src/LocaleService.ts +++ b/webapp/packages/plugin-navigation-tree-filters/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersBootstrap.ts b/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersBootstrap.ts index d69ec08a6b..2808bb6d7f 100644 --- a/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersBootstrap.ts +++ b/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersBootstrap.ts @@ -13,10 +13,10 @@ import { LocalizationService } from '@cloudbeaver/core-localization'; import { DATA_CONTEXT_NAV_NODE, ENodeFeature, NavTreeResource, NodeManagerUtils } from '@cloudbeaver/core-navigation-tree'; import { DATA_CONTEXT_MENU, MenuBaseItem, MenuService } from '@cloudbeaver/core-view'; -import { MENU_NAVIGATION_TREE_FILTERS } from './MENU_NAVIGATION_TREE_FILTERS'; +import { MENU_NAVIGATION_TREE_FILTERS } from './MENU_NAVIGATION_TREE_FILTERS.js'; const NavigationTreeFiltersDialog = importLazyComponent(() => - import('./NavigationTreeFiltersDialog/NavigationTreeFiltersDialog').then(m => m.NavigationTreeFiltersDialog), + import('./NavigationTreeFiltersDialog/NavigationTreeFiltersDialog.js').then(m => m.NavigationTreeFiltersDialog), ); @injectable() @@ -31,7 +31,7 @@ export class NavigationTreeFiltersBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.menuService.addCreator({ root: true, contexts: [DATA_CONTEXT_NAV_NODE], diff --git a/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersDialog/FiltersTable.tsx b/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersDialog/FiltersTable.tsx index 44801e06b6..dfcbb9c3f7 100644 --- a/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersDialog/FiltersTable.tsx +++ b/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersDialog/FiltersTable.tsx @@ -11,7 +11,7 @@ import { useState } from 'react'; import { Button, Form, Group, InputField, s, Table, TableBody, useS, useTranslate } from '@cloudbeaver/core-blocks'; import styles from './FiltersTable.module.css'; -import { FiltersTableItem } from './FiltersTableItem'; +import { FiltersTableItem } from './FiltersTableItem.js'; interface Props { title: string; @@ -35,7 +35,7 @@ export const FiltersTable = observer(function FiltersTable({ title, filte } return ( - +

{title}

@@ -47,7 +47,7 @@ export const FiltersTable = observer(function FiltersTable({ title, filte value={filter} onChange={v => setFilter(String(v))} /> -
diff --git a/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersDialog/NavigationTreeFiltersDialog.tsx b/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersDialog/NavigationTreeFiltersDialog.tsx index e1b340ee6a..ba5dff6a28 100644 --- a/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersDialog/NavigationTreeFiltersDialog.tsx +++ b/webapp/packages/plugin-navigation-tree-filters/src/NavigationTreeFiltersDialog/NavigationTreeFiltersDialog.tsx @@ -25,9 +25,9 @@ import type { DialogComponentProps } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; import { type NavNode, NavTreeResource } from '@cloudbeaver/core-navigation-tree'; -import { FiltersTable } from './FiltersTable'; +import { FiltersTable } from './FiltersTable.js'; import styles from './NavigationTreeFiltersDialog.module.css'; -import { useFilters } from './useFilters'; +import { useFilters } from './useFilters.js'; interface Payload { node: NavNode; diff --git a/webapp/packages/plugin-navigation-tree-filters/src/index.ts b/webapp/packages/plugin-navigation-tree-filters/src/index.ts index d6ea17fb9a..e96979ec00 100644 --- a/webapp/packages/plugin-navigation-tree-filters/src/index.ts +++ b/webapp/packages/plugin-navigation-tree-filters/src/index.ts @@ -1,4 +1,11 @@ -import { navigationTreeFiltersPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { navigationTreeFiltersPlugin } from './manifest.js'; export { navigationTreeFiltersPlugin }; export default navigationTreeFiltersPlugin; diff --git a/webapp/packages/plugin-navigation-tree-filters/src/manifest.ts b/webapp/packages/plugin-navigation-tree-filters/src/manifest.ts index 7ffe3332ec..2ba18477a3 100644 --- a/webapp/packages/plugin-navigation-tree-filters/src/manifest.ts +++ b/webapp/packages/plugin-navigation-tree-filters/src/manifest.ts @@ -13,7 +13,7 @@ export const navigationTreeFiltersPlugin: PluginManifest = { }, providers: [ - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./NavigationTreeFiltersBootstrap').then(m => m.NavigationTreeFiltersBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./NavigationTreeFiltersBootstrap.js').then(m => m.NavigationTreeFiltersBootstrap), ], }; diff --git a/webapp/packages/plugin-navigation-tree-rm/package.json b/webapp/packages/plugin-navigation-tree-rm/package.json index 9e506d3371..4f8449a6fa 100644 --- a/webapp/packages/plugin-navigation-tree-rm/package.json +++ b/webapp/packages/plugin-navigation-tree-rm/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-navigation-tree-rm", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-navigation-tree-rm/src/LocaleService.ts b/webapp/packages/plugin-navigation-tree-rm/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/LocaleService.ts +++ b/webapp/packages/plugin-navigation-tree-rm/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-navigation-tree-rm/src/NavNodes/ResourceFoldersBootstrap.ts b/webapp/packages/plugin-navigation-tree-rm/src/NavNodes/ResourceFoldersBootstrap.ts index 4f21e50ff4..f285c2dac5 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/NavNodes/ResourceFoldersBootstrap.ts +++ b/webapp/packages/plugin-navigation-tree-rm/src/NavNodes/ResourceFoldersBootstrap.ts @@ -40,16 +40,16 @@ import { RESOURCES_NODE_PATH, } from '@cloudbeaver/core-resource-manager'; import { createPath, getPathParent } from '@cloudbeaver/core-utils'; -import { ACTION_NEW_FOLDER, ActionService, IAction, MenuService } from '@cloudbeaver/core-view'; +import { ACTION_NEW_FOLDER, ActionService, type IAction, MenuService } from '@cloudbeaver/core-view'; import { DATA_CONTEXT_ELEMENTS_TREE, MENU_ELEMENTS_TREE_TOOLS } from '@cloudbeaver/plugin-navigation-tree'; import { FolderDialog } from '@cloudbeaver/plugin-projects'; import { ResourceManagerService } from '@cloudbeaver/plugin-resource-manager'; -import { NavResourceNodeService } from '../NavResourceNodeService'; -import { DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID } from '../Tree/DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID'; -import { getResourceKeyFromNodeId } from './getResourceKeyFromNodeId'; -import { getResourceNodeId } from './getResourceNodeId'; -import { getRmProjectNodeId } from './getRmProjectNodeId'; +import { NavResourceNodeService } from '../NavResourceNodeService.js'; +import { DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID } from '../Tree/DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID.js'; +import { getResourceKeyFromNodeId } from './getResourceKeyFromNodeId.js'; +import { getResourceNodeId } from './getResourceNodeId.js'; +import { getRmProjectNodeId } from './getRmProjectNodeId.js'; interface ITargetNode { projectId: string; @@ -80,7 +80,7 @@ export class ResourceFoldersBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.syncNavTree(); this.actionService.addHandler({ @@ -247,7 +247,7 @@ export class ResourceFoldersBootstrap extends Bootstrap { const editableProjects = this.projectsService.activeProjects.filter(project => project.canEditResources); if (editableProjects.length > 0) { - const project = editableProjects[0]; + const project = editableProjects[0]!; return { projectId: project.id, @@ -258,7 +258,7 @@ export class ResourceFoldersBootstrap extends Bootstrap { return; } - const targetFolder = selected[0]; + const targetFolder = selected[0]!; const parentIds = [...this.navNodeInfoResource.getParents(targetFolder), targetFolder]; const parents = this.navNodeInfoResource.get(resourceKeyList(parentIds)); const projectNode = parents.find(parent => parent?.nodeType === NAV_NODE_TYPE_RM_PROJECT); diff --git a/webapp/packages/plugin-navigation-tree-rm/src/NavNodes/getResourceKeyFromNodeId.ts b/webapp/packages/plugin-navigation-tree-rm/src/NavNodes/getResourceKeyFromNodeId.ts index 5dcb14bb2f..9d815358a5 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/NavNodes/getResourceKeyFromNodeId.ts +++ b/webapp/packages/plugin-navigation-tree-rm/src/NavNodes/getResourceKeyFromNodeId.ts @@ -14,7 +14,7 @@ export function getResourceKeyFromNodeId(nodeId: string): string | undefined { } const parts = getPathParts(nodeId.replace('//', '\\')); - const projectId = parts[1]; + const projectId = parts[1]!; const path = createPath(...parts.slice(2, parts.length - 1)); let name: string | undefined; diff --git a/webapp/packages/plugin-navigation-tree-rm/src/NavResourceNodeService.ts b/webapp/packages/plugin-navigation-tree-rm/src/NavResourceNodeService.ts index e45d3fbed1..5703526056 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/NavResourceNodeService.ts +++ b/webapp/packages/plugin-navigation-tree-rm/src/NavResourceNodeService.ts @@ -12,7 +12,7 @@ import { LocalizationService } from '@cloudbeaver/core-localization'; import { ResourceManagerResource } from '@cloudbeaver/core-resource-manager'; import { getPathName } from '@cloudbeaver/core-utils'; -import { getResourceNodeId } from './NavNodes/getResourceNodeId'; +import { getResourceNodeId } from './NavNodes/getResourceNodeId.js'; @injectable() export class NavResourceNodeService { diff --git a/webapp/packages/plugin-navigation-tree-rm/src/NavTreeRMContextMenuService.ts b/webapp/packages/plugin-navigation-tree-rm/src/NavTreeRMContextMenuService.ts index 0f3557ac56..71e368beb2 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/NavTreeRMContextMenuService.ts +++ b/webapp/packages/plugin-navigation-tree-rm/src/NavTreeRMContextMenuService.ts @@ -11,14 +11,14 @@ import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dial import { NotificationService } from '@cloudbeaver/core-events'; import { LocalizationService } from '@cloudbeaver/core-localization'; import { DATA_CONTEXT_NAV_NODE, ENodeFeature } from '@cloudbeaver/core-navigation-tree'; -import { isResourceOfType, ProjectInfoResource, ProjectInfoResourceType } from '@cloudbeaver/core-projects'; +import { isResourceOfType, ProjectInfoResource, type ProjectInfoResourceType } from '@cloudbeaver/core-projects'; import { getRmResourceKey, NAV_NODE_TYPE_RM_FOLDER, NAV_NODE_TYPE_RM_RESOURCE } from '@cloudbeaver/core-resource-manager'; import { createPath, getPathParent } from '@cloudbeaver/core-utils'; import { ACTION_DELETE, ACTION_RENAME, ActionService } from '@cloudbeaver/core-view'; import { DATA_CONTEXT_NAV_NODE_ACTIONS } from '@cloudbeaver/plugin-navigation-tree'; -import { getResourceKeyFromNodeId } from './NavNodes/getResourceKeyFromNodeId'; -import { NavResourceNodeService } from './NavResourceNodeService'; +import { getResourceKeyFromNodeId } from './NavNodes/getResourceKeyFromNodeId.js'; +import { NavResourceNodeService } from './NavResourceNodeService.js'; @injectable() export class NavTreeRMContextMenuService extends Bootstrap { @@ -33,7 +33,7 @@ export class NavTreeRMContextMenuService extends Bootstrap { super(); } - register(): void { + override register(): void { this.actionService.addHandler({ id: 'nav-node-rm-handler', contexts: [DATA_CONTEXT_NAV_NODE], @@ -128,6 +128,4 @@ export class NavTreeRMContextMenuService extends Bootstrap { }, }); } - - load(): void {} } diff --git a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/NavigationNodeProjectControl.tsx b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/NavigationNodeProjectControl.tsx index 465dc27e19..52aae568e9 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/NavigationNodeProjectControl.tsx +++ b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/NavigationNodeProjectControl.tsx @@ -18,14 +18,14 @@ import { CaptureViewContext } from '@cloudbeaver/core-view'; import { ElementsTreeContext, isDraggingInsideProject, - NavTreeControlComponent, - NavTreeControlProps, + type NavTreeControlComponent, + type NavTreeControlProps, TreeNodeMenuLoader, } from '@cloudbeaver/plugin-navigation-tree'; import { ResourceManagerService } from '@cloudbeaver/plugin-resource-manager'; -import { getRmProjectNodeId } from '../../NavNodes/getRmProjectNodeId'; -import { DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID } from '../DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID'; +import { getRmProjectNodeId } from '../../NavNodes/getRmProjectNodeId.js'; +import { DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID } from '../DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID.js'; import style from './NavigationNodeProjectControl.module.css'; export const NavigationNodeProjectControl: NavTreeControlComponent = observer( diff --git a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/ProjectsSettingsForm.tsx b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/ProjectsSettingsForm.tsx index d399c39ef9..ccf39eee1d 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/ProjectsSettingsForm.tsx +++ b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/ProjectsSettingsForm.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import { type PlaceholderComponent, PlaceholderElement, Switch, useTranslate } from '@cloudbeaver/core-blocks'; +import { type PlaceholderComponent, type PlaceholderElement, Switch, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { ProjectsService } from '@cloudbeaver/core-projects'; import type { IElementsTreeSettingsProps } from '@cloudbeaver/plugin-navigation-tree'; diff --git a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/navigationTreeProjectSearchCompare.ts b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/navigationTreeProjectSearchCompare.ts index 7c230de607..343de9e5b8 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/navigationTreeProjectSearchCompare.ts +++ b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/navigationTreeProjectSearchCompare.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { NAV_NODE_TYPE_RM_PROJECT } from '@cloudbeaver/core-resource-manager'; -import { EEquality, elementsTreeNameFilterNode, NavNodeFilterCompareFn } from '@cloudbeaver/plugin-navigation-tree'; +import { EEquality, elementsTreeNameFilterNode, type NavNodeFilterCompareFn } from '@cloudbeaver/plugin-navigation-tree'; export const navigationTreeProjectSearchCompare: NavNodeFilterCompareFn = function navigationTreeProjectSearchCompare(tree, node, filter) { if (node.nodeType === NAV_NODE_TYPE_RM_PROJECT) { diff --git a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/navigationTreeProjectsRendererRenderer.tsx b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/navigationTreeProjectsRendererRenderer.tsx index 2d1a0929f7..f9afd52ed3 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/navigationTreeProjectsRendererRenderer.tsx +++ b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ProjectsRenderer/navigationTreeProjectsRendererRenderer.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { getComputed, s, SContext, StyleRegistry, Translate, TreeNodeNestedMessage, useS } from '@cloudbeaver/core-blocks'; +import { getComputed, s, SContext, type StyleRegistry, Translate, TreeNodeNestedMessage, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import type { NavNodeInfoResource, ProjectsNavNodeService } from '@cloudbeaver/core-navigation-tree'; import { ProjectsService } from '@cloudbeaver/core-projects'; @@ -26,7 +26,7 @@ import { } from '@cloudbeaver/plugin-navigation-tree'; import type { ResourceManagerService } from '@cloudbeaver/plugin-resource-manager'; -import { NavigationNodeProjectControl } from './NavigationNodeProjectControl'; +import { NavigationNodeProjectControl } from './NavigationNodeProjectControl.js'; import style from './NavigationTreeProjectsRendererRenderer.module.css'; const registry: StyleRegistry = [ diff --git a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ResourceManagerTree.tsx b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ResourceManagerTree.tsx index a4d6077afc..5a16484e31 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ResourceManagerTree.tsx +++ b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ResourceManagerTree.tsx @@ -20,22 +20,22 @@ import { createElementsTreeSettings, ElementsTreeLoader, getNavigationTreeUserSettingsId, - IElementsTreeSettings, + type IElementsTreeSettings, NavigationTreeService, validateElementsTreeSettings, } from '@cloudbeaver/plugin-navigation-tree'; import { ResourceManagerService } from '@cloudbeaver/plugin-resource-manager'; -import { navigationTreeProjectFilter } from './ProjectsRenderer/navigationTreeProjectFilter'; -import { navigationTreeProjectSearchCompare } from './ProjectsRenderer/navigationTreeProjectSearchCompare'; -import { navigationTreeProjectsExpandStateGetter } from './ProjectsRenderer/navigationTreeProjectsExpandStateGetter'; -import { navigationTreeProjectsRendererRenderer } from './ProjectsRenderer/navigationTreeProjectsRendererRenderer'; -import { navigationTreeResourceTypeFilter } from './ProjectsRenderer/navigationTreeResourceTypeFilter'; -import { ProjectsSettingsPlaceholderElement } from './ProjectsRenderer/ProjectsSettingsForm'; -import { navigationTreeResourceExpandStateGetter } from './ResourceFolderRenderer/navigationTreeResourceExpandStateGetter'; +import { navigationTreeProjectFilter } from './ProjectsRenderer/navigationTreeProjectFilter.js'; +import { navigationTreeProjectSearchCompare } from './ProjectsRenderer/navigationTreeProjectSearchCompare.js'; +import { navigationTreeProjectsExpandStateGetter } from './ProjectsRenderer/navigationTreeProjectsExpandStateGetter.js'; +import { navigationTreeProjectsRendererRenderer } from './ProjectsRenderer/navigationTreeProjectsRendererRenderer.js'; +import { navigationTreeResourceTypeFilter } from './ProjectsRenderer/navigationTreeResourceTypeFilter.js'; +import { ProjectsSettingsPlaceholderElement } from './ProjectsRenderer/ProjectsSettingsForm.js'; +import { navigationTreeResourceExpandStateGetter } from './ResourceFolderRenderer/navigationTreeResourceExpandStateGetter.js'; import style from './ResourceManagerTree.module.css'; -import { ResourceManagerTreeCaptureViewContext } from './ResourceManagerTreeCaptureViewContext'; -import { transformResourceNodeInfo } from './ResourceRenderer/transformResourceNodeInfo'; +import { ResourceManagerTreeCaptureViewContext } from './ResourceManagerTreeCaptureViewContext.js'; +import { transformResourceNodeInfo } from './ResourceRenderer/transformResourceNodeInfo.js'; interface Props extends React.PropsWithChildren { resourceTypeId?: string; diff --git a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ResourceManagerTreeCaptureViewContext.tsx b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ResourceManagerTreeCaptureViewContext.tsx index 7a192f398f..9c75209e51 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/Tree/ResourceManagerTreeCaptureViewContext.tsx +++ b/webapp/packages/plugin-navigation-tree-rm/src/Tree/ResourceManagerTreeCaptureViewContext.tsx @@ -7,7 +7,7 @@ */ import { useCaptureViewContext } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID } from './DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID'; +import { DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID } from './DATA_CONTEXT_RESOURCE_MANAGER_TREE_RESOURCE_TYPE_ID.js'; interface Props { resourceTypeId?: string; diff --git a/webapp/packages/plugin-navigation-tree-rm/src/index.ts b/webapp/packages/plugin-navigation-tree-rm/src/index.ts index ee57e56c62..15fd321502 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/index.ts +++ b/webapp/packages/plugin-navigation-tree-rm/src/index.ts @@ -1,10 +1,17 @@ -import { navigationTreeRMPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { navigationTreeRMPlugin } from './manifest.js'; -export * from './NavNodes/getResourceKeyFromNodeId'; -export * from './NavNodes/getResourceNodeId'; -export * from './NavNodes/getRmProjectNodeId'; -export * from './Tree/ResourceManagerTree'; -export * from './NavResourceNodeService'; +export * from './NavNodes/getResourceKeyFromNodeId.js'; +export * from './NavNodes/getResourceNodeId.js'; +export * from './NavNodes/getRmProjectNodeId.js'; +export * from './Tree/ResourceManagerTree.js'; +export * from './NavResourceNodeService.js'; export { navigationTreeRMPlugin }; export default navigationTreeRMPlugin; diff --git a/webapp/packages/plugin-navigation-tree-rm/src/manifest.ts b/webapp/packages/plugin-navigation-tree-rm/src/manifest.ts index 5e2d1e229d..e1aceba1bd 100644 --- a/webapp/packages/plugin-navigation-tree-rm/src/manifest.ts +++ b/webapp/packages/plugin-navigation-tree-rm/src/manifest.ts @@ -10,9 +10,9 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const navigationTreeRMPlugin: PluginManifest = { info: { name: 'Navigation Tree RM plugin' }, providers: [ - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./NavResourceNodeService').then(m => m.NavResourceNodeService), - () => import('./NavNodes/ResourceFoldersBootstrap').then(m => m.ResourceFoldersBootstrap), - () => import('./NavTreeRMContextMenuService').then(m => m.NavTreeRMContextMenuService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./NavResourceNodeService.js').then(m => m.NavResourceNodeService), + () => import('./NavNodes/ResourceFoldersBootstrap.js').then(m => m.ResourceFoldersBootstrap), + () => import('./NavTreeRMContextMenuService.js').then(m => m.NavTreeRMContextMenuService), ], }; diff --git a/webapp/packages/plugin-navigation-tree/package.json b/webapp/packages/plugin-navigation-tree/package.json index 29c374c818..a5cf66bed3 100644 --- a/webapp/packages/plugin-navigation-tree/package.json +++ b/webapp/packages/plugin-navigation-tree/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-navigation-tree", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -70,4 +71,4 @@ "typescript": "^5", "typescript-plugin-css-modules": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/plugin-navigation-tree/src/LocaleService.ts b/webapp/packages/plugin-navigation-tree/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-navigation-tree/src/LocaleService.ts +++ b/webapp/packages/plugin-navigation-tree/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionGroup/navigationTreeConnectionGroupFilter.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionGroup/navigationTreeConnectionGroupFilter.ts index 90d6c3357d..aaadf307db 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionGroup/navigationTreeConnectionGroupFilter.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionGroup/navigationTreeConnectionGroupFilter.ts @@ -8,7 +8,7 @@ import { ENodeFeature, EObjectFeature, type NavNode, type NavNodeInfoResource, ROOT_NODE_PATH } from '@cloudbeaver/core-navigation-tree'; import { resourceKeyList } from '@cloudbeaver/core-resource'; -import type { IElementsTreeFilter } from '../ElementsTree/useElementsTree'; +import type { IElementsTreeFilter } from '../ElementsTree/useElementsTree.js'; export const NAVIGATION_TREE_CONNECTION_GROUPS = { unsorted: 'nav-tree://connection-group/unsorted', diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionGroup/navigationTreeConnectionGroupRenderer.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionGroup/navigationTreeConnectionGroupRenderer.tsx index 4ff9858357..e588a45a82 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionGroup/navigationTreeConnectionGroupRenderer.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionGroup/navigationTreeConnectionGroupRenderer.tsx @@ -7,8 +7,8 @@ */ import { s, Translate, useS } from '@cloudbeaver/core-blocks'; -import type { NavigationNodeRendererComponent } from '../ElementsTree/NavigationNodeComponent'; -import { NAVIGATION_TREE_CONNECTION_GROUPS } from './navigationTreeConnectionGroupFilter'; +import type { NavigationNodeRendererComponent } from '../ElementsTree/NavigationNodeComponent.js'; +import { NAVIGATION_TREE_CONNECTION_GROUPS } from './navigationTreeConnectionGroupFilter.js'; import style from './NavigationTreeConnectionGroupRenderer.module.css'; export function navigationTreeConnectionGroupRenderer(nodeId: string): NavigationNodeRendererComponent | undefined { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionsRenderer/ConnectionNavNodeControl.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionsRenderer/ConnectionNavNodeControl.tsx index 8c9540db0c..68ba24cc34 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionsRenderer/ConnectionNavNodeControl.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionsRenderer/ConnectionNavNodeControl.tsx @@ -24,10 +24,10 @@ import { useService } from '@cloudbeaver/core-di'; import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; import { EObjectFeature, NavNodeInfoResource, NavTreeResource } from '@cloudbeaver/core-navigation-tree'; -import type { NavTreeControlComponent, NavTreeControlProps } from '../ElementsTree/NavigationNodeComponent'; +import type { NavTreeControlComponent, NavTreeControlProps } from '../ElementsTree/NavigationNodeComponent.js'; import style from '../ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeControl.module.css'; -import { NavigationNodeExpand } from '../ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeExpand'; -import { TreeNodeMenuLoader } from '../ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader'; +import { NavigationNodeExpand } from '../ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeExpand.js'; +import { TreeNodeMenuLoader } from '../ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader.js'; export const ConnectionNavNodeControl: NavTreeControlComponent = observer( forwardRef(function ConnectionNavNodeControl({ node, nodeInfo, dndElement, dndPlaceholder, className, onClick }, ref) { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionsRenderer/navTreeConnectionRenderer.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionsRenderer/navTreeConnectionRenderer.tsx index a75b4d291d..00534fa489 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionsRenderer/navTreeConnectionRenderer.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ConnectionsRenderer/navTreeConnectionRenderer.tsx @@ -12,10 +12,10 @@ import { NAV_NODE_TYPE_CONNECTION } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; -import type { NavigationNodeRendererComponent } from '../ElementsTree/NavigationNodeComponent'; -import { NavigationNodeRendererLoader } from '../ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader'; -import type { IElementsTreeCustomRenderer } from '../ElementsTree/useElementsTree'; -import { ConnectionNavNodeControl } from './ConnectionNavNodeControl'; +import type { NavigationNodeRendererComponent } from '../ElementsTree/NavigationNodeComponent.js'; +import { NavigationNodeRendererLoader } from '../ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader.js'; +import type { IElementsTreeCustomRenderer } from '../ElementsTree/useElementsTree.js'; +import { ConnectionNavNodeControl } from './ConnectionNavNodeControl.js'; export function navTreeConnectionRenderer(navNodeInfoResource: NavNodeInfoResource): IElementsTreeCustomRenderer { return nodeId => { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/DATA_CONTEXT_ELEMENTS_TREE.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/DATA_CONTEXT_ELEMENTS_TREE.ts index 4b5c97c550..b456a87bdf 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/DATA_CONTEXT_ELEMENTS_TREE.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/DATA_CONTEXT_ELEMENTS_TREE.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { IElementsTree } from './useElementsTree'; +import type { IElementsTree } from './useElementsTree.js'; export const DATA_CONTEXT_ELEMENTS_TREE = createDataContext('elements-tree'); diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTree.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTree.tsx index c4874de907..53c1935788 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTree.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTree.tsx @@ -14,7 +14,7 @@ import { EventTreeNodeSelectFlag, FolderExplorer, FolderExplorerPath, - PlaceholderElement, + type PlaceholderElement, s, Translate, TreeNodeNested, @@ -25,22 +25,22 @@ import { useService } from '@cloudbeaver/core-di'; import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; import { EObjectFeature, type NavNode, NavNodeInfoResource, NavTreeResource, ROOT_NODE_PATH } from '@cloudbeaver/core-navigation-tree'; -import { useNavTreeDropBox } from '../useNavTreeDropBox'; +import { useNavTreeDropBox } from '../useNavTreeDropBox.js'; import style from './ElementsTree.module.css'; -import { ElementsTreeContentLoader } from './ElementsTreeContentLoader'; -import { ElementsTreeContext, IElementsTreeContext } from './ElementsTreeContext'; -import { elementsTreeNameFilter } from './elementsTreeNameFilter'; -import { ElementsTreeTools } from './ElementsTreeTools/ElementsTreeTools'; -import type { IElementsTreeSettingsProps } from './ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService'; -import type { NavTreeControlComponent } from './NavigationNodeComponent'; -import { NavigationNodeNested } from './NavigationTreeNode/NavigationNode/NavigationNodeNested'; -import { NavigationNodeElement } from './NavigationTreeNode/NavigationNodeElement'; -import type { NavNodeFilterCompareFn } from './NavNodeFilterCompareFn'; -import { elementsTreeLimitFilter } from './NavTreeLimitFilter/elementsTreeLimitFilter'; -import { elementsTreeLimitRenderer } from './NavTreeLimitFilter/elementsTreeLimitRenderer'; -import { useDropOutside } from './useDropOutside'; -import { IElementsTreeOptions, useElementsTree } from './useElementsTree'; -import { useElementsTreeFolderExplorer } from './useElementsTreeFolderExplorer'; +import { ElementsTreeContentLoader } from './ElementsTreeContentLoader.js'; +import { ElementsTreeContext, type IElementsTreeContext } from './ElementsTreeContext.js'; +import { elementsTreeNameFilter } from './elementsTreeNameFilter.js'; +import { ElementsTreeTools } from './ElementsTreeTools/ElementsTreeTools.js'; +import type { IElementsTreeSettingsProps } from './ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService.js'; +import type { NavTreeControlComponent } from './NavigationNodeComponent.js'; +import { NavigationNodeNested } from './NavigationTreeNode/NavigationNode/NavigationNodeNested.js'; +import { NavigationNodeElement } from './NavigationTreeNode/NavigationNodeElement.js'; +import type { NavNodeFilterCompareFn } from './NavNodeFilterCompareFn.js'; +import { elementsTreeLimitFilter } from './NavTreeLimitFilter/elementsTreeLimitFilter.js'; +import { elementsTreeLimitRenderer } from './NavTreeLimitFilter/elementsTreeLimitRenderer.js'; +import { useDropOutside } from './useDropOutside.js'; +import { type IElementsTreeOptions, useElementsTree } from './useElementsTree.js'; +import { useElementsTreeFolderExplorer } from './useElementsTreeFolderExplorer.js'; export interface ElementsTreeProps extends IElementsTreeOptions, React.PropsWithChildren { /** Specifies the root path for the tree. ROOT_NODE_PATH will be used if not defined */ diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeContentLoader.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeContentLoader.tsx index 0b46c81365..629d022ee3 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeContentLoader.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeContentLoader.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { getComputed, Loader, Translate, TreeNodeNestedMessage } from '@cloudbeaver/core-blocks'; import type { ILoadableState } from '@cloudbeaver/core-utils'; -import type { IElementsTreeContext } from './ElementsTreeContext'; +import type { IElementsTreeContext } from './ElementsTreeContext.js'; interface Props { context: IElementsTreeContext; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeContext.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeContext.ts index fb6fe66b24..bdede6ec0a 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeContext.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeContext.ts @@ -9,8 +9,8 @@ import { createContext } from 'react'; import type { IFolderExplorerContext } from '@cloudbeaver/core-blocks'; -import type { NavTreeControlComponent } from './NavigationNodeComponent'; -import type { IElementsTree } from './useElementsTree'; +import type { NavTreeControlComponent } from './NavigationNodeComponent.js'; +import type { IElementsTree } from './useElementsTree.js'; export interface IElementsTreeContext { tree: IElementsTree; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeLoader.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeLoader.ts index 65c34bdc62..5dc651c11a 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeLoader.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeLoader.ts @@ -8,6 +8,6 @@ import React from 'react'; export const ElementsTreeLoader = React.lazy(async () => { - const { ElementsTree } = await import('./ElementsTree'); + const { ElementsTree } = await import('./ElementsTree.js'); return { default: ElementsTree }; }); diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeFilter.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeFilter.tsx index 141196e6f5..5aa0d1e6ca 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeFilter.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeFilter.tsx @@ -9,7 +9,7 @@ import { observer } from 'mobx-react-lite'; import { Filter, s, useFocus, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import type { IElementsTree } from '../useElementsTree'; +import type { IElementsTree } from '../useElementsTree.js'; import styles from './ElementsTreeFilter.module.css'; interface Props { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeTools.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeTools.tsx index a4ee870c89..9f38443f90 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeTools.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeTools.tsx @@ -12,24 +12,24 @@ import { ActionIconButton, Fill, IconButtonStyles, - PlaceholderElement, + type PlaceholderElement, s, SContext, - StyleRegistry, + type StyleRegistry, useS, useTranslate, } from '@cloudbeaver/core-blocks'; import { useCaptureViewContext } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_ELEMENTS_TREE } from '../DATA_CONTEXT_ELEMENTS_TREE'; -import type { IElementsTree } from '../useElementsTree'; -import { ElementsTreeFilter } from './ElementsTreeFilter'; +import { DATA_CONTEXT_ELEMENTS_TREE } from '../DATA_CONTEXT_ELEMENTS_TREE.js'; +import type { IElementsTree } from '../useElementsTree.js'; +import { ElementsTreeFilter } from './ElementsTreeFilter.js'; import ElementsTreeToolsStyles from './ElementsTreeTools.module.css'; import ElementsTreeToolsIconButtonStyles from './ElementsTreeToolsIconButton.module.css'; -import { ElementsTreeToolsMenu } from './ElementsTreeToolsMenu'; -import { DATA_CONTEXT_NAV_TREE_ROOT } from './NavigationTreeSettings/DATA_CONTEXT_NAV_TREE_ROOT'; -import type { IElementsTreeSettingsProps } from './NavigationTreeSettings/ElementsTreeSettingsService'; -import { NavigationTreeSettings } from './NavigationTreeSettings/NavigationTreeSettings'; +import { ElementsTreeToolsMenu } from './ElementsTreeToolsMenu.js'; +import { DATA_CONTEXT_NAV_TREE_ROOT } from './NavigationTreeSettings/DATA_CONTEXT_NAV_TREE_ROOT.js'; +import type { IElementsTreeSettingsProps } from './NavigationTreeSettings/ElementsTreeSettingsService.js'; +import { NavigationTreeSettings } from './NavigationTreeSettings/NavigationTreeSettings.js'; const registry: StyleRegistry = [ [ diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenu.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenu.tsx index b9d44569b8..bc7bcf5f49 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenu.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenu.tsx @@ -7,16 +7,16 @@ */ import { observer } from 'mobx-react-lite'; -import { s, SContext, StyleRegistry, useS } from '@cloudbeaver/core-blocks'; +import { s, SContext, type StyleRegistry, useS } from '@cloudbeaver/core-blocks'; import { useDataContextLink } from '@cloudbeaver/core-data-context'; import { MenuBar, MenuBarItemStyles, MenuBarStyles } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_ELEMENTS_TREE } from '../DATA_CONTEXT_ELEMENTS_TREE'; -import type { IElementsTree } from '../useElementsTree'; +import { DATA_CONTEXT_ELEMENTS_TREE } from '../DATA_CONTEXT_ELEMENTS_TREE.js'; +import type { IElementsTree } from '../useElementsTree.js'; import elementsTreeMenuBarItemStyles from './ElementsTreeMenuBarItem.module.css'; import style from './ElementsTreeToolsMenu.module.css'; -import { MENU_ELEMENTS_TREE_TOOLS } from './MENU_ELEMENTS_TREE_TOOLS'; +import { MENU_ELEMENTS_TREE_TOOLS } from './MENU_ELEMENTS_TREE_TOOLS.js'; interface Props { tree: IElementsTree; @@ -45,7 +45,7 @@ export const ElementsTreeToolsMenu = observer(function ElementsTreeToolsM return (
- +
); diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService.ts index 3ac45b71a0..49b1bed038 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService.ts @@ -13,23 +13,22 @@ import { ACTION_COLLAPSE_ALL, ACTION_FILTER, ActionService, - DATA_CONTEXT_MENU, getBindingLabel, - IAction, + type IAction, KeyBindingService, MenuService, } from '@cloudbeaver/core-view'; import { ConnectionSchemaManagerService } from '@cloudbeaver/plugin-datasource-context-switch'; -import { getNavigationTreeUserSettingsId } from '../../getNavigationTreeUserSettingsId'; -import { ACTION_LINK_OBJECT } from '../ACTION_LINK_OBJECT'; -import { DATA_CONTEXT_ELEMENTS_TREE } from '../DATA_CONTEXT_ELEMENTS_TREE'; -import { KEY_BINDING_COLLAPSE_ALL } from '../KEY_BINDING_COLLAPSE_ALL'; -import { KEY_BINDING_LINK_OBJECT } from '../KEY_BINDING_LINK_OBJECT'; -import { MENU_ELEMENTS_TREE_TOOLS } from './MENU_ELEMENTS_TREE_TOOLS'; -import { createElementsTreeSettings, validateElementsTreeSettings } from './NavigationTreeSettings/createElementsTreeSettings'; -import { DATA_CONTEXT_NAV_TREE_ROOT } from './NavigationTreeSettings/DATA_CONTEXT_NAV_TREE_ROOT'; -import { KEY_BINDING_ENABLE_FILTER } from './NavigationTreeSettings/KEY_BINDING_ENABLE_FILTER'; +import { getNavigationTreeUserSettingsId } from '../../getNavigationTreeUserSettingsId.js'; +import { ACTION_LINK_OBJECT } from '../ACTION_LINK_OBJECT.js'; +import { DATA_CONTEXT_ELEMENTS_TREE } from '../DATA_CONTEXT_ELEMENTS_TREE.js'; +import { KEY_BINDING_COLLAPSE_ALL } from '../KEY_BINDING_COLLAPSE_ALL.js'; +import { KEY_BINDING_LINK_OBJECT } from '../KEY_BINDING_LINK_OBJECT.js'; +import { MENU_ELEMENTS_TREE_TOOLS } from './MENU_ELEMENTS_TREE_TOOLS.js'; +import { createElementsTreeSettings, validateElementsTreeSettings } from './NavigationTreeSettings/createElementsTreeSettings.js'; +import { DATA_CONTEXT_NAV_TREE_ROOT } from './NavigationTreeSettings/DATA_CONTEXT_NAV_TREE_ROOT.js'; +import { KEY_BINDING_ENABLE_FILTER } from './NavigationTreeSettings/KEY_BINDING_ENABLE_FILTER.js'; @injectable() export class ElementsTreeToolsMenuService { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeBaseSettingsForm.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeBaseSettingsForm.tsx index e105678428..ed1b8eb6f5 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeBaseSettingsForm.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeBaseSettingsForm.tsx @@ -9,7 +9,7 @@ import { observer } from 'mobx-react-lite'; import { GroupTitle, type PlaceholderComponent, Switch, useTranslate } from '@cloudbeaver/core-blocks'; -import type { IElementsTreeSettingsProps } from './ElementsTreeSettingsService'; +import type { IElementsTreeSettingsProps } from './ElementsTreeSettingsService.js'; export const ElementsTreeBaseSettingsForm: PlaceholderComponent = observer(function ElementsTreeBaseSettingsForm({ tree: { root, settings }, diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService.ts index 48ed0dff69..45712360a4 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService.ts @@ -8,8 +8,8 @@ import { PlaceholderContainer } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; -import type { IElementsTree } from '../../useElementsTree'; -import { ElementsTreeBaseSettingsForm } from './ElementsTreeBaseSettingsForm'; +import type { IElementsTree } from '../../useElementsTree.js'; +import { ElementsTreeBaseSettingsForm } from './ElementsTreeBaseSettingsForm.js'; export interface IElementsTreeSettingsProps { tree: IElementsTree; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/NavigationTreeSettings.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/NavigationTreeSettings.tsx index 30cc694339..56bd541ec2 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/NavigationTreeSettings.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/NavigationTreeSettings.tsx @@ -7,10 +7,10 @@ */ import { observer } from 'mobx-react-lite'; -import { Group, Loader, Placeholder, PlaceholderElement, s, useS } from '@cloudbeaver/core-blocks'; +import { Group, Loader, Placeholder, type PlaceholderElement, s, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ElementsTreeSettingsService, IElementsTreeSettingsProps } from './ElementsTreeSettingsService'; +import { ElementsTreeSettingsService, type IElementsTreeSettingsProps } from './ElementsTreeSettingsService.js'; import NavigationTreeSettingsStyles from './NavigationTreeSettings.module.css'; interface Props extends IElementsTreeSettingsProps { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/createElementsTreeSettings.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/createElementsTreeSettings.ts index f2838151a6..ede0403de8 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/createElementsTreeSettings.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/createElementsTreeSettings.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { IElementsTreeSettings } from '../../useElementsTree'; +import type { IElementsTreeSettings } from '../../useElementsTree.js'; export function createElementsTreeSettings(defaults?: Partial): IElementsTreeSettings { return { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavNodeFilterCompareFn.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavNodeFilterCompareFn.ts index dfe857134a..111b37fd7d 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavNodeFilterCompareFn.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavNodeFilterCompareFn.ts @@ -7,7 +7,7 @@ */ import type { NavNode } from '@cloudbeaver/core-navigation-tree'; -import type { IElementsTree } from './useElementsTree'; +import type { IElementsTree } from './useElementsTree.js'; export enum EEquality { none, diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavTreeLimitFilter/elementsTreeLimitFilter.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavTreeLimitFilter/elementsTreeLimitFilter.ts index 9c8f11ccc5..fcad196461 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavTreeLimitFilter/elementsTreeLimitFilter.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavTreeLimitFilter/elementsTreeLimitFilter.ts @@ -8,7 +8,7 @@ import type { NavTreeResource } from '@cloudbeaver/core-navigation-tree'; import { CachedResourceOffsetPageKey, CachedResourceOffsetPageTargetKey } from '@cloudbeaver/core-resource'; -import type { IElementsTreeFilter } from '../useElementsTree'; +import type { IElementsTreeFilter } from '../useElementsTree.js'; export const NAVIGATION_TREE_LIMIT = { limit: 'nav-tree://limit', diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavTreeLimitFilter/elementsTreeLimitRenderer.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavTreeLimitFilter/elementsTreeLimitRenderer.tsx index 3a4b6c0877..7a4450aff5 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavTreeLimitFilter/elementsTreeLimitRenderer.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavTreeLimitFilter/elementsTreeLimitRenderer.tsx @@ -12,8 +12,8 @@ import { useService } from '@cloudbeaver/core-di'; import { NavTreeResource } from '@cloudbeaver/core-navigation-tree'; import { CachedResourceOffsetPageKey, CachedResourceOffsetPageTargetKey, getNextPageOffset } from '@cloudbeaver/core-resource'; -import type { NavigationNodeRendererComponent } from '../NavigationNodeComponent'; -import { NAVIGATION_TREE_LIMIT } from './elementsTreeLimitFilter'; +import type { NavigationNodeRendererComponent } from '../NavigationNodeComponent.js'; +import { NAVIGATION_TREE_LIMIT } from './elementsTreeLimitFilter.js'; import styles from './elementsTreeLimitRenderer.module.css'; export function elementsTreeLimitRenderer(nodeId: string): NavigationNodeRendererComponent | undefined { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationNodeComponent.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationNodeComponent.ts index db3eb3bd39..4571fa68e3 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationNodeComponent.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationNodeComponent.ts @@ -9,7 +9,7 @@ import type React from 'react'; import type { NavNode } from '@cloudbeaver/core-navigation-tree'; -import type { INavTreeNodeInfo } from './INavTreeNodeInfo'; +import type { INavTreeNodeInfo } from './INavTreeNodeInfo.js'; export type NavTreeNodeComponent = React.FC<{ nodeId: string; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode.tsx index 8be8212500..31ce6ba92e 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode.tsx @@ -14,13 +14,13 @@ import { useService } from '@cloudbeaver/core-di'; import { DATA_CONTEXT_NAV_NODE, DATA_CONTEXT_NAV_NODES, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; import { useDNDData } from '@cloudbeaver/core-ui'; -import { useNavTreeDropBox } from '../../useNavTreeDropBox'; -import type { NavigationNodeComponent } from '../NavigationNodeComponent'; +import { useNavTreeDropBox } from '../../useNavTreeDropBox.js'; +import type { NavigationNodeComponent } from '../NavigationNodeComponent.js'; import style from './NavigationNode.module.css'; -import { DATA_ATTRIBUTE_NODE_EDITING } from './NavigationNode/DATA_ATTRIBUTE_NODE_EDITING'; -import { NavigationNodeNested } from './NavigationNode/NavigationNodeNested'; -import { NavigationNodeControlRenderer } from './NavigationNodeControlRenderer'; -import { useNavigationNode } from './useNavigationNode'; +import { DATA_ATTRIBUTE_NODE_EDITING } from './NavigationNode/DATA_ATTRIBUTE_NODE_EDITING.js'; +import { NavigationNodeNested } from './NavigationNode/NavigationNodeNested.js'; +import { NavigationNodeControlRenderer } from './NavigationNodeControlRenderer.js'; +import { useNavigationNode } from './useNavigationNode.js'; export const NavigationNode: NavigationNodeComponent = observer(function NavigationNode({ node, diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeControl.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeControl.tsx index 6c9ee61770..67cb8c62d2 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeControl.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeControl.tsx @@ -26,12 +26,12 @@ import { useService } from '@cloudbeaver/core-di'; import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; import { getNodePlainName, type INodeActions, NavNodeInfoResource, NavTreeResource } from '@cloudbeaver/core-navigation-tree'; -import type { NavTreeControlComponent } from '../../NavigationNodeComponent'; -import { TreeNodeMenuLoader } from '../TreeNodeMenu/TreeNodeMenuLoader'; -import { DATA_ATTRIBUTE_NODE_EDITING } from './DATA_ATTRIBUTE_NODE_EDITING'; +import type { NavTreeControlComponent } from '../../NavigationNodeComponent.js'; +import { TreeNodeMenuLoader } from '../TreeNodeMenu/TreeNodeMenuLoader.js'; +import { DATA_ATTRIBUTE_NODE_EDITING } from './DATA_ATTRIBUTE_NODE_EDITING.js'; import style from './NavigationNodeControl.module.css'; -import { NavigationNodeExpand } from './NavigationNodeExpand'; -import { NavigationNodeEditorLoader } from './NavigationNodeLoaders'; +import { NavigationNodeExpand } from './NavigationNodeExpand.js'; +import { NavigationNodeEditorLoader } from './NavigationNodeLoaders.js'; interface IEditingState { saving: boolean; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeExpand.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeExpand.tsx index 3bd8572484..cb31b84c67 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeExpand.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeExpand.tsx @@ -10,7 +10,7 @@ import { useContext, useDeferredValue } from 'react'; import { getComputed, TreeNodeExpand } from '@cloudbeaver/core-blocks'; -import { ElementsTreeContext } from '../../ElementsTreeContext'; +import { ElementsTreeContext } from '../../ElementsTreeContext.js'; interface Props { nodeId: string; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeLoaders.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeLoaders.ts index 296f3b82d1..88cb38b4db 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeLoaders.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeLoaders.ts @@ -8,11 +8,11 @@ import React from 'react'; export const NavigationNodeControlLoader = React.lazy(async () => { - const { NavigationNodeControl } = await import('./NavigationNodeControl'); + const { NavigationNodeControl } = await import('./NavigationNodeControl.js'); return { default: NavigationNodeControl }; }); export const NavigationNodeEditorLoader = React.lazy(async () => { - const { NavigationNodeEditor } = await import('./NavigationNodeEditor'); + const { NavigationNodeEditor } = await import('./NavigationNodeEditor.js'); return { default: NavigationNodeEditor }; }); diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.tsx index 40ca95731e..3e11284142 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.tsx @@ -11,8 +11,8 @@ import { forwardRef, useContext, useDeferredValue, useMemo } from 'react'; import { getComputed, s, TreeNodeNested, TreeNodeNestedMessage, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { isArraysEqual } from '@cloudbeaver/core-utils'; -import { ElementsTreeContext } from '../../ElementsTreeContext'; -import type { NavTreeNodeComponent } from '../../NavigationNodeComponent'; +import { ElementsTreeContext } from '../../ElementsTreeContext.js'; +import type { NavTreeNodeComponent } from '../../NavigationNodeComponent.js'; import style from './NavigationNodeNested.module.css'; interface Props { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeControlRenderer.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeControlRenderer.tsx index 86a3e3a51f..f26522dbbe 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeControlRenderer.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeControlRenderer.tsx @@ -12,11 +12,11 @@ import { getComputed, s, TreeNodeContext, useMergeRefs, useObjectRef, useS } fro import { useService } from '@cloudbeaver/core-di'; import { type NavNode, NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; -import { ElementsTreeContext } from '../ElementsTreeContext'; -import type { NavTreeControlComponent } from '../NavigationNodeComponent'; -import { NavigationNodeControlLoader } from './NavigationNode/NavigationNodeLoaders'; +import { ElementsTreeContext } from '../ElementsTreeContext.js'; +import type { NavTreeControlComponent } from '../NavigationNodeComponent.js'; +import { NavigationNodeControlLoader } from './NavigationNode/NavigationNodeLoaders.js'; import style from './NavigationNodeControlRenderer.module.css'; -import type { INavigationNode } from './useNavigationNode'; +import type { INavigationNode } from './useNavigationNode.js'; interface Props { node: NavNode; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeDragged.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeDragged.tsx index f12efa2568..bbe3b8b208 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeDragged.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeDragged.tsx @@ -10,10 +10,10 @@ import { useContext } from 'react'; import { getComputed, TreeNode, useObjectRef } from '@cloudbeaver/core-blocks'; -import { ElementsTreeContext } from '../ElementsTreeContext'; -import type { NavigationNodeComponent } from '../NavigationNodeComponent'; -import { transformNodeInfo } from '../transformNodeInfo'; -import { NavigationNodeControlLoader } from './NavigationNode/NavigationNodeLoaders'; +import { ElementsTreeContext } from '../ElementsTreeContext.js'; +import type { NavigationNodeComponent } from '../NavigationNodeComponent.js'; +import { transformNodeInfo } from '../transformNodeInfo.js'; +import { NavigationNodeControlLoader } from './NavigationNode/NavigationNodeLoaders.js'; export const NavigationNodeDragged: NavigationNodeComponent = observer(function NavigationNodeDragged({ node, className, control: externalControl }) { const contextRef = useObjectRef({ diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeElement.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeElement.tsx index 0e69a92e7b..ff6b7ef918 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeElement.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeElement.tsx @@ -12,9 +12,9 @@ import { Translate, TreeNodeNestedMessage } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; -import { ElementsTreeContext } from '../ElementsTreeContext'; -import type { NavTreeNodeComponent } from '../NavigationNodeComponent'; -import { NavigationNodeRendererLoader } from './NavigationNodeRendererLoader'; +import { ElementsTreeContext } from '../ElementsTreeContext.js'; +import type { NavTreeNodeComponent } from '../NavigationNodeComponent.js'; +import { NavigationNodeRendererLoader } from './NavigationNodeRendererLoader.js'; export const NavigationNodeElement: NavTreeNodeComponent = observer(function NavigationNodeElement({ nodeId, path, expanded, dragging, className }) { const context = useContext(ElementsTreeContext); diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRenderer.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRenderer.tsx index 818b9cb80c..c66435c137 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRenderer.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRenderer.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import type { NavigationNodeComponent } from '../NavigationNodeComponent'; -import { NavigationNode } from './NavigationNode'; -import { NavigationNodeDragged } from './NavigationNodeDragged'; +import type { NavigationNodeComponent } from '../NavigationNodeComponent.js'; +import { NavigationNode } from './NavigationNode.js'; +import { NavigationNodeDragged } from './NavigationNodeDragged.js'; export const NavigationNodeRenderer: NavigationNodeComponent = observer(function NavigationNodeRenderer({ dragging, ...rest }) { if (dragging) { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader.ts index a72b93f21b..7269dcaceb 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader.ts @@ -8,6 +8,6 @@ import React from 'react'; export const NavigationNodeRendererLoader = React.lazy(async () => { - const { NavigationNodeRenderer } = await import('./NavigationNodeRenderer'); + const { NavigationNodeRenderer } = await import('./NavigationNodeRenderer.js'); return { default: NavigationNodeRenderer }; }); diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenu.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenu.tsx index d5bd090d83..e541d91013 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenu.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenu.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import { getComputed, Icon, IMouseContextMenu, s, useS } from '@cloudbeaver/core-blocks'; +import { getComputed, Icon, type IMouseContextMenu, s, useS } from '@cloudbeaver/core-blocks'; import { ConnectionInfoResource, DATA_CONTEXT_CONNECTION } from '@cloudbeaver/core-connections'; import { useDataContextLink } from '@cloudbeaver/core-data-context'; import { useService } from '@cloudbeaver/core-di'; @@ -15,8 +15,8 @@ import { DATA_CONTEXT_NAV_NODE, type INodeActions, type NavNode } from '@cloudbe import { ContextMenu } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import { MENU_NAV_TREE } from '../../MENU_NAV_TREE'; -import { DATA_CONTEXT_NAV_NODE_ACTIONS } from './DATA_CONTEXT_NAV_NODE_ACTIONS'; +import { MENU_NAV_TREE } from '../../MENU_NAV_TREE.js'; +import { DATA_CONTEXT_NAV_NODE_ACTIONS } from './DATA_CONTEXT_NAV_NODE_ACTIONS.js'; import style from './TreeNodeMenu.module.css'; export interface TreeNodeMenuProps { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader.ts index 7a8725c6c8..af33486a1b 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader.ts @@ -8,6 +8,6 @@ import React from 'react'; export const TreeNodeMenuLoader = React.lazy(async () => { - const { TreeNodeMenu } = await import('./TreeNodeMenu'); + const { TreeNodeMenu } = await import('./TreeNodeMenu.js'); return { default: TreeNodeMenu }; }); diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/useNavigationNode.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/useNavigationNode.ts index d1d72f5ad3..f91d96e920 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/useNavigationNode.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/useNavigationNode.ts @@ -13,11 +13,11 @@ import { EObjectFeature, type NavNode, NavNodeInfoResource } from '@cloudbeaver/ import { resourceKeyList } from '@cloudbeaver/core-resource'; import type { IDNDData } from '@cloudbeaver/core-ui'; -import { useChildren } from '../../../NodesManager/useChildren'; -import { useNode } from '../../../NodesManager/useNode'; -import { ElementsTreeContext } from '../ElementsTreeContext'; -import type { NavTreeControlComponent } from '../NavigationNodeComponent'; -import type { IElementsTree } from '../useElementsTree'; +import { useChildren } from '../../../NodesManager/useChildren.js'; +import { useNode } from '../../../NodesManager/useNode.js'; +import { ElementsTreeContext } from '../ElementsTreeContext.js'; +import type { NavTreeControlComponent } from '../NavigationNodeComponent.js'; +import type { IElementsTree } from '../useElementsTree.js'; export interface INavigationNode { ref: React.RefObject; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/elementsTreeNameFilter.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/elementsTreeNameFilter.ts index 6f9ec26b31..04e80e0bba 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/elementsTreeNameFilter.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/elementsTreeNameFilter.ts @@ -9,8 +9,8 @@ import type { NavNode, NavNodeInfoResource, NavTreeResource } from '@cloudbeaver import { resourceKeyList } from '@cloudbeaver/core-resource'; import type { MetadataMap } from '@cloudbeaver/core-utils'; -import { EEquality, NavNodeFilterCompareFn } from './NavNodeFilterCompareFn'; -import type { IElementsTree, IElementsTreeFilter, ITreeNodeState } from './useElementsTree'; +import { EEquality, type NavNodeFilterCompareFn } from './NavNodeFilterCompareFn.js'; +import type { IElementsTree, IElementsTreeFilter, ITreeNodeState } from './useElementsTree.js'; function isDefined(val: T | undefined | null): val is T { return val !== undefined && val !== null; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/transformFilteredNodeInfo.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/transformFilteredNodeInfo.ts index 0c578fa312..6555552815 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/transformFilteredNodeInfo.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/transformFilteredNodeInfo.ts @@ -7,7 +7,7 @@ */ import type { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; -import type { IElementsTreeCustomNodeInfo } from './useElementsTree'; +import type { IElementsTreeCustomNodeInfo } from './useElementsTree.js'; export function transformFilteredNodeInfo(navNodeInfoResource: NavNodeInfoResource): IElementsTreeCustomNodeInfo { return function transformFilteredNodeInfo(nodeId, info) { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/transformNodeInfo.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/transformNodeInfo.ts index e1304a1e24..a966ddc634 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/transformNodeInfo.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/transformNodeInfo.ts @@ -7,8 +7,8 @@ */ import type { NavNode } from '@cloudbeaver/core-navigation-tree'; -import type { INavTreeNodeInfo } from './INavTreeNodeInfo'; -import type { IElementsTreeCustomNodeInfo } from './useElementsTree'; +import type { INavTreeNodeInfo } from './INavTreeNodeInfo.js'; +import type { IElementsTreeCustomNodeInfo } from './useElementsTree.js'; export function transformNodeInfo(node: NavNode, transformers: IElementsTreeCustomNodeInfo[]): INavTreeNodeInfo { return transformers.reduce((info, transformer) => transformer(node.id, info), { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/useElementsTree.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/useElementsTree.ts index 3e64eaf56c..8f0e4f1e05 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/useElementsTree.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/useElementsTree.ts @@ -8,11 +8,19 @@ import { action, autorun, computed, observable, runInAction } from 'mobx'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { getComputed, IFolderExplorerContext, useExecutor, useObjectRef, useObservableRef, useResource, useUserData } from '@cloudbeaver/core-blocks'; +import { + getComputed, + type IFolderExplorerContext, + useExecutor, + useObjectRef, + useObservableRef, + useResource, + useUserData, +} from '@cloudbeaver/core-blocks'; import { ConnectionInfoActiveProjectKey, ConnectionInfoResource } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorInterrupter, ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { ExecutorInterrupter, type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { type NavNode, NavNodeInfoResource, NavTreeResource, ROOT_NODE_PATH } from '@cloudbeaver/core-navigation-tree'; import { ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; import { @@ -23,13 +31,13 @@ import { ResourceKeyUtils, } from '@cloudbeaver/core-resource'; import type { IDNDData } from '@cloudbeaver/core-ui'; -import { ILoadableState, MetadataMap, throttle } from '@cloudbeaver/core-utils'; +import { type ILoadableState, MetadataMap, throttle } from '@cloudbeaver/core-utils'; -import { ElementsTreeService } from './ElementsTreeService'; -import type { IElementsTreeAction } from './IElementsTreeAction'; -import type { INavTreeNodeInfo } from './INavTreeNodeInfo'; -import type { NavigationNodeRendererComponent } from './NavigationNodeComponent'; -import { transformNodeInfo } from './transformNodeInfo'; +import { ElementsTreeService } from './ElementsTreeService.js'; +import type { IElementsTreeAction } from './IElementsTreeAction.js'; +import type { INavTreeNodeInfo } from './INavTreeNodeInfo.js'; +import type { NavigationNodeRendererComponent } from './NavigationNodeComponent.js'; +import { transformNodeInfo } from './transformNodeInfo.js'; export type IElementsTreeCustomRenderer = (nodeId: string) => NavigationNodeRendererComponent | undefined; export type IElementsTreeCustomNodeInfo = (nodeId: string, info: INavTreeNodeInfo) => INavTreeNodeInfo; @@ -261,7 +269,7 @@ export function useElementsTree(options: IOptions): IElementsTree { nodeId === options.root && elementsTree.getNodeChildren(nodeId).length === 1 ) { - const nextNode = elementsTree.getNodeChildren(nodeId)[0]; + const nextNode = elementsTree.getNodeChildren(nodeId)[0]!; if (elementsTree.isNodeExpandable(nextNode) || elementsTree.isNodeExpanded(nextNode)) { options.folderExplorer.open(navNodeInfoResource.getParents(nextNode), nextNode); @@ -282,7 +290,7 @@ export function useElementsTree(options: IOptions): IElementsTree { const pathIndex = folderExplorer.state.fullPath.indexOf(nodeId); if (pathIndex >= 0) { - folderExplorer.open(folderExplorer.state.fullPath.slice(0, pathIndex - 1), folderExplorer.state.fullPath[pathIndex - 1]); + folderExplorer.open(folderExplorer.state.fullPath.slice(0, pathIndex - 1), folderExplorer.state.fullPath[pathIndex - 1]!); } }); }, @@ -583,7 +591,7 @@ export function useElementsTree(options: IOptions): IElementsTree { }); if (path.length > 0) { - await functionsRef.loadTree(path[0]); + await functionsRef.loadTree(path[0]!); } } }, diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/useElementsTreeFolderExplorer.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/useElementsTreeFolderExplorer.ts index 4ada8b589b..c50ef80f37 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/useElementsTreeFolderExplorer.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/useElementsTreeFolderExplorer.ts @@ -9,7 +9,7 @@ import { useEffect } from 'react'; import { getComputed, useFolderExplorer } from '@cloudbeaver/core-blocks'; -import type { IElementsTreeSettings } from './useElementsTree'; +import type { IElementsTreeSettings } from './useElementsTree.js'; export function useElementsTreeFolderExplorer(baseRoot: string, settings: IElementsTreeSettings | undefined) { const folderExplorer = useFolderExplorer(baseRoot, { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTree.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTree.tsx index f772433c0e..5f94ed089c 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTree.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTree.tsx @@ -8,35 +8,35 @@ import { observer } from 'mobx-react-lite'; import { useMemo } from 'react'; -import { s, SContext, StyleRegistry, Translate, useS, useUserData } from '@cloudbeaver/core-blocks'; +import { s, SContext, type StyleRegistry, Translate, useS, useUserData } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NavNodeInfoResource, NavTreeResource, ProjectsNavNodeService, ROOT_NODE_PATH } from '@cloudbeaver/core-navigation-tree'; import { ProjectsService } from '@cloudbeaver/core-projects'; import { CaptureView } from '@cloudbeaver/core-view'; -import { ElementsTreeToolsStyles } from '../index'; -import { NavNodeViewService } from '../NodesManager/NavNodeView/NavNodeViewService'; -import { navigationTreeConnectionGroupFilter } from './ConnectionGroup/navigationTreeConnectionGroupFilter'; -import { navigationTreeConnectionGroupRenderer } from './ConnectionGroup/navigationTreeConnectionGroupRenderer'; -import { navTreeConnectionRenderer } from './ConnectionsRenderer/navTreeConnectionRenderer'; -import { ElementsTree } from './ElementsTree/ElementsTree'; +import { ElementsTreeToolsStyles } from '../index.js'; +import { NavNodeViewService } from '../NodesManager/NavNodeView/NavNodeViewService.js'; +import { navigationTreeConnectionGroupFilter } from './ConnectionGroup/navigationTreeConnectionGroupFilter.js'; +import { navigationTreeConnectionGroupRenderer } from './ConnectionGroup/navigationTreeConnectionGroupRenderer.js'; +import { navTreeConnectionRenderer } from './ConnectionsRenderer/navTreeConnectionRenderer.js'; +import { ElementsTree } from './ElementsTree/ElementsTree.js'; import { createElementsTreeSettings, validateElementsTreeSettings, -} from './ElementsTree/ElementsTreeTools/NavigationTreeSettings/createElementsTreeSettings'; -import { transformFilteredNodeInfo } from './ElementsTree/transformFilteredNodeInfo'; -import type { IElementsTreeSettings } from './ElementsTree/useElementsTree'; +} from './ElementsTree/ElementsTreeTools/NavigationTreeSettings/createElementsTreeSettings.js'; +import { transformFilteredNodeInfo } from './ElementsTree/transformFilteredNodeInfo.js'; +import type { IElementsTreeSettings } from './ElementsTree/useElementsTree.js'; import elementsTreeToolsStyles from './ElementsTreeTools.module.css'; -import { getNavigationTreeUserSettingsId } from './getNavigationTreeUserSettingsId'; +import { getNavigationTreeUserSettingsId } from './getNavigationTreeUserSettingsId.js'; import style from './NavigationTree.module.css'; -import { navigationTreeDuplicateFilter } from './navigationTreeDuplicateIdFilter'; -import { NavigationTreeService } from './NavigationTreeService'; -import { navigationTreeProjectFilter } from './ProjectsRenderer/navigationTreeProjectFilter'; -import { navigationTreeProjectSearchCompare } from './ProjectsRenderer/navigationTreeProjectSearchCompare'; -import { navigationTreeProjectsExpandStateGetter } from './ProjectsRenderer/navigationTreeProjectsExpandStateGetter'; -import { navigationTreeProjectsRendererRenderer } from './ProjectsRenderer/navigationTreeProjectsRendererRenderer'; -import { ProjectsSettingsPlaceholderElement } from './ProjectsRenderer/ProjectsSettingsForm'; -import { useNavigationTree } from './useNavigationTree'; +import { navigationTreeDuplicateFilter } from './navigationTreeDuplicateIdFilter.js'; +import { NavigationTreeService } from './NavigationTreeService.js'; +import { navigationTreeProjectFilter } from './ProjectsRenderer/navigationTreeProjectFilter.js'; +import { navigationTreeProjectSearchCompare } from './ProjectsRenderer/navigationTreeProjectSearchCompare.js'; +import { navigationTreeProjectsExpandStateGetter } from './ProjectsRenderer/navigationTreeProjectsExpandStateGetter.js'; +import { navigationTreeProjectsRendererRenderer } from './ProjectsRenderer/navigationTreeProjectsRendererRenderer.js'; +import { ProjectsSettingsPlaceholderElement } from './ProjectsRenderer/ProjectsSettingsForm.js'; +import { useNavigationTree } from './useNavigationTree.js'; const registry: StyleRegistry = [ [ diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeBootstrap.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeBootstrap.ts index ff1a684575..5e04975bd8 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeBootstrap.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeBootstrap.ts @@ -8,9 +8,9 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { LeftBarPanelService } from '@cloudbeaver/core-ui'; -import { NavigationTreeSettingsService } from '../NavigationTreeSettingsService'; -import { ElementsTreeToolsMenuService } from './ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService'; -import { NavigationTreePanel } from './NavigationTreePanel'; +import { NavigationTreeSettingsService } from '../NavigationTreeSettingsService.js'; +import { ElementsTreeToolsMenuService } from './ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService.js'; +import { NavigationTreePanel } from './NavigationTreePanel.js'; @injectable() export class NavigationTreeBootstrap extends Bootstrap { @@ -22,7 +22,7 @@ export class NavigationTreeBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.elementsTreeToolsMenuService.register(); this.leftBarPanelService.tabsContainer.add({ key: 'navigation-tree-tab', @@ -33,5 +33,5 @@ export class NavigationTreeBootstrap extends Bootstrap { }); } - async load(): Promise {} + override async load(): Promise {} } diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeLoader.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeLoader.ts index e13ada75d9..ed2f764c90 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeLoader.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeLoader.ts @@ -8,6 +8,6 @@ import React from 'react'; export const NavigationTreeLoader = React.lazy(async () => { - const { NavigationTree } = await import('./NavigationTree'); + const { NavigationTree } = await import('./NavigationTree.js'); return { default: NavigationTree }; }); diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreePanel.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreePanel.tsx index c99d0eae02..653db219de 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreePanel.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreePanel.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { s, useS } from '@cloudbeaver/core-blocks'; import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui'; -import { NavigationTreeLoader } from './NavigationTreeLoader'; +import { NavigationTreeLoader } from './NavigationTreeLoader.js'; import style from './NavigationTreePanel.module.css'; export const NavigationTreePanel: TabContainerPanelComponent = observer(function NavigationTreePanel() { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeService.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeService.ts index ad867e50f2..a24e34646a 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeService.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/NavigationTreeService.ts @@ -11,24 +11,24 @@ import { ConnectionInfoResource, ConnectionsManagerService, createConnectionParam, - IConnectionInfoParams, + type IConnectionInfoParams, NavNodeExtensionsService, } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { EObjectFeature, NavNodeInfoResource, NavNodeManagerService, NavTreeResource, ROOT_NODE_PATH } from '@cloudbeaver/core-navigation-tree'; import { CACHED_RESOURCE_DEFAULT_PAGE_OFFSET, CachedResourceOffsetPageKey, CachedResourceOffsetPageTargetKey, - ResourceKey, + type ResourceKey, resourceKeyList, } from '@cloudbeaver/core-resource'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import { ACTION_COLLAPSE_ALL, ACTION_FILTER, IActiveView, View } from '@cloudbeaver/core-view'; +import { ACTION_COLLAPSE_ALL, ACTION_FILTER, type IActiveView, View } from '@cloudbeaver/core-view'; -import { ACTION_LINK_OBJECT } from './ElementsTree/ACTION_LINK_OBJECT'; -import type { ITreeNodeState } from './ElementsTree/useElementsTree'; +import { ACTION_LINK_OBJECT } from './ElementsTree/ACTION_LINK_OBJECT.js'; +import type { ITreeNodeState } from './ElementsTree/useElementsTree.js'; export interface INavigationNodeSelectionData { id: ResourceKey; diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/NavigationNodeProjectControl.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/NavigationNodeProjectControl.tsx index 533c33062f..6a38feeb4b 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/NavigationNodeProjectControl.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/NavigationNodeProjectControl.tsx @@ -13,10 +13,10 @@ import { useService } from '@cloudbeaver/core-di'; import { EventContext, EventStopPropagationFlag } from '@cloudbeaver/core-events'; import { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; -import { ElementsTreeContext } from '../ElementsTree/ElementsTreeContext'; -import type { NavTreeControlComponent, NavTreeControlProps } from '../ElementsTree/NavigationNodeComponent'; -import { isDraggingInsideProject } from '../ElementsTree/NavigationTreeNode/isDraggingInsideProject'; -import { TreeNodeMenuLoader } from '../ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader'; +import { ElementsTreeContext } from '../ElementsTree/ElementsTreeContext.js'; +import type { NavTreeControlComponent, NavTreeControlProps } from '../ElementsTree/NavigationNodeComponent.js'; +import { isDraggingInsideProject } from '../ElementsTree/NavigationTreeNode/isDraggingInsideProject.js'; +import { TreeNodeMenuLoader } from '../ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader.js'; import style from './NavigationNodeProjectControl.module.css'; export const NavigationNodeProjectControl: NavTreeControlComponent = observer( diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/ProjectsSettingsForm.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/ProjectsSettingsForm.tsx index 9a3b14cc3e..45f828b6b0 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/ProjectsSettingsForm.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/ProjectsSettingsForm.tsx @@ -7,11 +7,11 @@ */ import { observer } from 'mobx-react-lite'; -import { type PlaceholderComponent, PlaceholderElement, Switch, useTranslate } from '@cloudbeaver/core-blocks'; +import { type PlaceholderComponent, type PlaceholderElement, Switch, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { ProjectsService } from '@cloudbeaver/core-projects'; -import type { IElementsTreeSettingsProps } from '../ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService'; +import type { IElementsTreeSettingsProps } from '../ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService.js'; export const ProjectsSettingsForm: PlaceholderComponent = observer(function ProjectsSettingsForm({ tree: { root, settings }, diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectFilter.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectFilter.ts index b19396625a..8b2a3008e6 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectFilter.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectFilter.ts @@ -5,11 +5,11 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { NavNode, NavNodeInfoResource, NavTreeResource, ProjectsNavNodeService, ROOT_NODE_PATH } from '@cloudbeaver/core-navigation-tree'; +import { type NavNode, NavNodeInfoResource, NavTreeResource, ProjectsNavNodeService, ROOT_NODE_PATH } from '@cloudbeaver/core-navigation-tree'; import { NAV_NODE_TYPE_PROJECT, ProjectsService } from '@cloudbeaver/core-projects'; import { resourceKeyList } from '@cloudbeaver/core-resource'; -import type { IElementsTreeFilter } from '../ElementsTree/useElementsTree'; +import type { IElementsTreeFilter } from '../ElementsTree/useElementsTree.js'; export function navigationTreeProjectFilter( projectsNavNodeService: ProjectsNavNodeService, diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectSearchCompare.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectSearchCompare.ts index 277e05dbff..984032268c 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectSearchCompare.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectSearchCompare.ts @@ -7,8 +7,8 @@ */ import { NAV_NODE_TYPE_PROJECT } from '@cloudbeaver/core-projects'; -import { elementsTreeNameFilterNode } from '../ElementsTree/elementsTreeNameFilter'; -import { EEquality, type NavNodeFilterCompareFn } from '../ElementsTree/NavNodeFilterCompareFn'; +import { elementsTreeNameFilterNode } from '../ElementsTree/elementsTreeNameFilter.js'; +import { EEquality, type NavNodeFilterCompareFn } from '../ElementsTree/NavNodeFilterCompareFn.js'; export const navigationTreeProjectSearchCompare: NavNodeFilterCompareFn = function navigationTreeProjectSearchCompare(tree, node, filter) { if (node.nodeType === NAV_NODE_TYPE_PROJECT) { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectsExpandStateGetter.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectsExpandStateGetter.ts index 5074275486..9c5efeb8c2 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectsExpandStateGetter.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectsExpandStateGetter.ts @@ -8,7 +8,7 @@ import type { NavNodeInfoResource, ProjectsNavNodeService } from '@cloudbeaver/core-navigation-tree'; import { NAV_NODE_TYPE_PROJECT, ProjectsService } from '@cloudbeaver/core-projects'; -import type { IElementsTreeNodeExpandInfoGetter } from '../ElementsTree/useElementsTree'; +import type { IElementsTreeNodeExpandInfoGetter } from '../ElementsTree/useElementsTree.js'; export function navigationTreeProjectsExpandStateGetter( navNodeInfoResource: NavNodeInfoResource, diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectsRendererRenderer.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectsRendererRenderer.tsx index a97e38853c..96177d03a0 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectsRendererRenderer.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ProjectsRenderer/navigationTreeProjectsRendererRenderer.tsx @@ -8,19 +8,19 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { getComputed, s, SContext, StyleRegistry, Translate, TreeNodeNestedMessage, useS } from '@cloudbeaver/core-blocks'; +import { getComputed, s, SContext, type StyleRegistry, Translate, TreeNodeNestedMessage, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import type { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; import { NAV_NODE_TYPE_PROJECT, ProjectsService } from '@cloudbeaver/core-projects'; -import { NavigationNodeControlRendererStyles, NavigationNodeNestedStyles } from '../../index'; -import { useNode } from '../../NodesManager/useNode'; -import { ElementsTreeContext } from '../ElementsTree/ElementsTreeContext'; -import type { NavigationNodeRendererComponent } from '../ElementsTree/NavigationNodeComponent'; -import { isDraggingInsideProject } from '../ElementsTree/NavigationTreeNode/isDraggingInsideProject'; -import { NavigationNodeRendererLoader } from '../ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader'; -import type { IElementsTreeCustomRenderer } from '../ElementsTree/useElementsTree'; -import { NavigationNodeProjectControl } from './NavigationNodeProjectControl'; +import { NavigationNodeControlRendererStyles, NavigationNodeNestedStyles } from '../../index.js'; +import { useNode } from '../../NodesManager/useNode.js'; +import { ElementsTreeContext } from '../ElementsTree/ElementsTreeContext.js'; +import type { NavigationNodeRendererComponent } from '../ElementsTree/NavigationNodeComponent.js'; +import { isDraggingInsideProject } from '../ElementsTree/NavigationTreeNode/isDraggingInsideProject.js'; +import { NavigationNodeRendererLoader } from '../ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader.js'; +import type { IElementsTreeCustomRenderer } from '../ElementsTree/useElementsTree.js'; +import { NavigationNodeProjectControl } from './NavigationNodeProjectControl.js'; import style from './NavigationTreeProjectsRendererRenderer.module.css'; const registry: StyleRegistry = [ diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/navigationTreeDuplicateIdFilter.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/navigationTreeDuplicateIdFilter.ts index 43806f96b9..4c55206db6 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/navigationTreeDuplicateIdFilter.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/navigationTreeDuplicateIdFilter.ts @@ -7,8 +7,8 @@ */ import { untracked } from 'mobx'; -import type { NavNodeViewService } from '../NodesManager/NavNodeView/NavNodeViewService'; -import type { IElementsTreeFilter } from './ElementsTree/useElementsTree'; +import type { NavNodeViewService } from '../NodesManager/NavNodeView/NavNodeViewService.js'; +import type { IElementsTreeFilter } from './ElementsTree/useElementsTree.js'; export function navigationTreeDuplicateFilter(navNodeViewService: NavNodeViewService): IElementsTreeFilter { return (tree, filter, node, children) => { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/useNavTreeDropBox.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/useNavTreeDropBox.ts index f954f3642f..70fa41f8f1 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/useNavTreeDropBox.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/useNavTreeDropBox.ts @@ -11,7 +11,7 @@ import { useStateDelay } from '@cloudbeaver/core-blocks'; import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import { useService } from '@cloudbeaver/core-di'; import { ENodeMoveType, type NavNode, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; -import { IDNDBox, useDNDBox } from '@cloudbeaver/core-ui'; +import { type IDNDBox, useDNDBox } from '@cloudbeaver/core-ui'; import { throttleAsync } from '@cloudbeaver/core-utils'; interface INodeState { diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/useNavigationTree.ts b/webapp/packages/plugin-navigation-tree/src/NavigationTree/useNavigationTree.ts index efc1514718..4db15ad9e5 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/useNavigationTree.ts +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/useNavigationTree.ts @@ -10,7 +10,7 @@ import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import type { NavNode } from '@cloudbeaver/core-navigation-tree'; -import { NavigationTreeService } from './NavigationTreeService'; +import { NavigationTreeService } from './NavigationTreeService.js'; interface INavigationTree { navigationTreeService: NavigationTreeService; diff --git a/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeContextMenuService.ts b/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeContextMenuService.ts index ca362f4622..18fd02b79e 100644 --- a/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeContextMenuService.ts +++ b/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeContextMenuService.ts @@ -37,7 +37,7 @@ import { MenuService, } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_NAV_NODE_ACTIONS } from '../NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/DATA_CONTEXT_NAV_NODE_ACTIONS'; +import { DATA_CONTEXT_NAV_NODE_ACTIONS } from '../NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/DATA_CONTEXT_NAV_NODE_ACTIONS.js'; export interface INodeMenuData { node: NavNode; @@ -60,7 +60,7 @@ export class NavNodeContextMenuService extends Bootstrap { super(); } - register(): void { + override register(): void { this.navTreeResource.beforeNodeDelete.addPostHandler(async (data, contexts) => { if (ExecutorInterrupter.isInterrupted(contexts)) { return; diff --git a/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeView/NavNodeViewService.test.ts b/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeView/NavNodeViewService.test.ts index 69af912a51..51061ac9e5 100644 --- a/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeView/NavNodeViewService.test.ts +++ b/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeView/NavNodeViewService.test.ts @@ -10,7 +10,7 @@ import { describe, expect, test } from '@jest/globals'; import { coreAdministrationManifest } from '@cloudbeaver/core-administration'; import { coreAppManifest } from '@cloudbeaver/core-app'; import { coreAuthenticationManifest } from '@cloudbeaver/core-authentication'; -import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication'; +import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication.js'; import { coreBrowserManifest } from '@cloudbeaver/core-browser'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreConnectionsManifest } from '@cloudbeaver/core-connections'; @@ -21,10 +21,10 @@ import { coreNavigationTree } from '@cloudbeaver/core-navigation-tree'; import { coreProductManifest } from '@cloudbeaver/core-product'; import { coreProjectsManifest } from '@cloudbeaver/core-projects'; import { coreRootManifest } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; import { coreRoutingManifest } from '@cloudbeaver/core-routing'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; @@ -36,8 +36,8 @@ import { datasourceContextSwitchPluginManifest } from '@cloudbeaver/plugin-datas import { navigationTabsPlugin } from '@cloudbeaver/plugin-navigation-tabs'; import { createApp, getService } from '@cloudbeaver/tests-runner'; -import { navigationTreePlugin } from '../../manifest'; -import { NavNodeViewService } from './NavNodeViewService'; +import { navigationTreePlugin } from '../../manifest.js'; +import { NavNodeViewService } from './NavNodeViewService.js'; const endpoint = createGQLEndpoint(); mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); diff --git a/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeView/NavNodeViewService.ts b/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeView/NavNodeViewService.ts index 1242cf41f9..a9d9f6c1e5 100644 --- a/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeView/NavNodeViewService.ts +++ b/webapp/packages/plugin-navigation-tree/src/NodesManager/NavNodeView/NavNodeViewService.ts @@ -11,7 +11,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { NavTreeResource } from '@cloudbeaver/core-navigation-tree'; -import type { INavNodeFolderTransform, NavNodeFolderTransformFn, NavNodeTransformView } from './IFolderTransform'; +import type { INavNodeFolderTransform, NavNodeFolderTransformFn, NavNodeTransformView } from './IFolderTransform.js'; export interface INodeDuplicateList { nodes: string[]; diff --git a/webapp/packages/plugin-navigation-tree/src/NodesManager/NodeLink.tsx b/webapp/packages/plugin-navigation-tree/src/NodesManager/NodeLink.tsx index a707cb5cb8..f3f6e85140 100644 --- a/webapp/packages/plugin-navigation-tree/src/NodesManager/NodeLink.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NodesManager/NodeLink.tsx @@ -11,7 +11,7 @@ import { Link } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { parseNodeParentId } from '@cloudbeaver/core-navigation-tree'; -import { NavigationTreeService } from '../NavigationTree/NavigationTreeService'; +import { NavigationTreeService } from '../NavigationTree/NavigationTreeService.js'; import styles from './NodeLink.module.css'; export interface NodeLinkProps { @@ -31,7 +31,7 @@ export const NodeLink: React.FC> = functi if (nodeId) { return ( - + {children} ); diff --git a/webapp/packages/plugin-navigation-tree/src/NodesManager/NodeLinkLoader.ts b/webapp/packages/plugin-navigation-tree/src/NodesManager/NodeLinkLoader.ts index fe69ab1c24..dd08143e1c 100644 --- a/webapp/packages/plugin-navigation-tree/src/NodesManager/NodeLinkLoader.ts +++ b/webapp/packages/plugin-navigation-tree/src/NodesManager/NodeLinkLoader.ts @@ -8,6 +8,6 @@ import React from 'react'; export const NodeLinkLoader = React.lazy(async () => { - const { NodeLink } = await import('./NodeLink'); + const { NodeLink } = await import('./NodeLink.js'); return { default: NodeLink }; }); diff --git a/webapp/packages/plugin-navigation-tree/src/NodesManager/useChildren.ts b/webapp/packages/plugin-navigation-tree/src/NodesManager/useChildren.ts index 5109933434..517135832b 100644 --- a/webapp/packages/plugin-navigation-tree/src/NodesManager/useChildren.ts +++ b/webapp/packages/plugin-navigation-tree/src/NodesManager/useChildren.ts @@ -10,7 +10,7 @@ import { useCallback } from 'react'; import { useService } from '@cloudbeaver/core-di'; import { NavTreeResource, ROOT_NODE_PATH } from '@cloudbeaver/core-navigation-tree'; -import { NavigationTreeService } from '../NavigationTree/NavigationTreeService'; +import { NavigationTreeService } from '../NavigationTree/NavigationTreeService.js'; interface Hook { children: string[] | undefined; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/DataTransformers/applyTransforms.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/DataTransformers/applyTransforms.ts index 7ea11fa424..9607662614 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/DataTransformers/applyTransforms.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/DataTransformers/applyTransforms.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { TreeDataTransformer } from './TreeDataTransformer'; +import type { TreeDataTransformer } from './TreeDataTransformer.js'; export function applyTransforms(id: string, data: T, transformers?: TreeDataTransformer[]) { if (!transformers) { diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/DataTransformers/rootTransformers.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/DataTransformers/rootTransformers.ts index ad16c6657d..241d2586f9 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/DataTransformers/rootTransformers.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/DataTransformers/rootTransformers.ts @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { INode } from '../INode'; -import type { INodeState } from '../INodeState'; -import type { TreeDataTransformer } from './TreeDataTransformer'; +import type { INode } from '../INode.js'; +import type { INodeState } from '../INodeState.js'; +import type { TreeDataTransformer } from './TreeDataTransformer.js'; export function rootNodeStateTransformer(root: string): TreeDataTransformer { return function rootNodeStateTransformer(nodeId, data) { diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/Node.tsx b/webapp/packages/plugin-navigation-tree/src/TreeNew/Node.tsx index 5d1034e5f3..269102603d 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/Node.tsx +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/Node.tsx @@ -10,11 +10,11 @@ import { useContext } from 'react'; import { TreeNode } from '@cloudbeaver/core-blocks'; -import { TreeContext } from './contexts/TreeContext'; -import { TreeDataContext } from './contexts/TreeDataContext'; -import type { NodeComponent } from './INodeRenderer'; -import { NodeControl } from './NodeControl'; -import { useNodeDnD } from './useNodeDnD'; +import { TreeContext } from './contexts/TreeContext.js'; +import { TreeDataContext } from './contexts/TreeDataContext.js'; +import type { NodeComponent } from './INodeRenderer.js'; +import { NodeControl } from './NodeControl.js'; +import { useNodeDnD } from './useNodeDnD.js'; export const Node: NodeComponent = observer(function Node({ nodeId, offsetHeight, controlRenderer, childrenRenderer }) { const tree = useContext(TreeContext)!; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeChildren.tsx b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeChildren.tsx index 4e73f223f7..d4c0bb9a58 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeChildren.tsx +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeChildren.tsx @@ -10,10 +10,10 @@ import { useContext, useId } from 'react'; import { getComputed, TreeNodeNested } from '@cloudbeaver/core-blocks'; -import { NodeSizeCacheContext } from './contexts/NodeSizeCacheContext'; -import { TreeDataContext } from './contexts/TreeDataContext'; -import { TreeVirtualizationContext } from './contexts/TreeVirtualizationContext'; -import { NodeRenderer } from './NodeRenderer'; +import { NodeSizeCacheContext } from './contexts/NodeSizeCacheContext.js'; +import { TreeDataContext } from './contexts/TreeDataContext.js'; +import { TreeVirtualizationContext } from './contexts/TreeVirtualizationContext.js'; +import { NodeRenderer } from './NodeRenderer.js'; interface Props { nodeId: string; @@ -49,7 +49,7 @@ const NodeChildrenObserved = observer(function NodeChildren({ nodeId, off const elements = []; for (let i = 0; i < children.length; i++) { - const child = children[i]; + const child = children[i]!; const size = sizeCache.getSize(child); if (offset + size < viewPortFrom) { diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeControl.tsx b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeControl.tsx index 2ebe879f02..1729ec6000 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeControl.tsx +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeControl.tsx @@ -10,9 +10,9 @@ import { forwardRef, useContext } from 'react'; import { TreeNodeControl, TreeNodeExpand, TreeNodeIcon, TreeNodeName } from '@cloudbeaver/core-blocks'; -import { TreeContext } from './contexts/TreeContext'; -import { TreeDataContext } from './contexts/TreeDataContext'; -import type { NodeControlComponent } from './INodeRenderer'; +import { TreeContext } from './contexts/TreeContext.js'; +import { TreeDataContext } from './contexts/TreeDataContext.js'; +import type { NodeControlComponent } from './INodeRenderer.js'; export const NodeControl: NodeControlComponent = observer( forwardRef(function NodeControl({ nodeId }, ref) { diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeControlLazy.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeControlLazy.ts index 0807ca27c6..41d20b4cce 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeControlLazy.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeControlLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const NodeControl = importLazyComponent(() => import('./NodeControl').then(m => m.NodeControl)); +export const NodeControl = importLazyComponent(() => import('./NodeControl.js').then(m => m.NodeControl)); diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeLazy.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeLazy.ts index da870f42c2..bb5050e7fa 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeLazy.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const Node = importLazyComponent(() => import('./Node').then(m => m.Node)); +export const Node = importLazyComponent(() => import('./Node.js').then(m => m.Node)); diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeRenderer.tsx b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeRenderer.tsx index 1719998b05..5cb9d77a36 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeRenderer.tsx +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/NodeRenderer.tsx @@ -8,9 +8,9 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; -import { TreeContext } from './contexts/TreeContext'; -import type { NodeComponent } from './INodeRenderer'; -import { Node } from './Node'; +import { TreeContext } from './contexts/TreeContext.js'; +import type { NodeComponent } from './INodeRenderer.js'; +import { Node } from './Node.js'; export const NodeRenderer: NodeComponent = observer(function NodeRenderer(props) { const tree = useContext(TreeContext)!; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/Tree.tsx b/webapp/packages/plugin-navigation-tree/src/TreeNew/Tree.tsx index 1b837e0a14..fee6114ca6 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/Tree.tsx +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/Tree.tsx @@ -9,18 +9,18 @@ import { observer } from 'mobx-react-lite'; import type { IDataContext } from '@cloudbeaver/core-data-context'; -import { NodeSizeCacheContext } from './contexts/NodeSizeCacheContext'; -import { TreeContext } from './contexts/TreeContext'; -import { TreeDataContext } from './contexts/TreeDataContext'; -import { TreeDnDContext } from './contexts/TreeDnDContext'; -import { TreeVirtualizationContext } from './contexts/TreeVirtualizationContext'; -import type { INodeRenderer } from './INodeRenderer'; -import { NodeChildren } from './NodeChildren'; -import { useNodeSizeCache } from './useNodeSizeCache'; -import { useTree } from './useTree'; -import type { ITreeData } from './useTreeData'; -import { useTreeDnD } from './useTreeDnD'; -import { useTreeVirtualization } from './useTreeVirtualization'; +import { NodeSizeCacheContext } from './contexts/NodeSizeCacheContext.js'; +import { TreeContext } from './contexts/TreeContext.js'; +import { TreeDataContext } from './contexts/TreeDataContext.js'; +import { TreeDnDContext } from './contexts/TreeDnDContext.js'; +import { TreeVirtualizationContext } from './contexts/TreeVirtualizationContext.js'; +import type { INodeRenderer } from './INodeRenderer.js'; +import { NodeChildren } from './NodeChildren.js'; +import { useNodeSizeCache } from './useNodeSizeCache.js'; +import { useTree } from './useTree.js'; +import type { ITreeData } from './useTreeData.js'; +import { useTreeDnD } from './useTreeDnD.js'; +import { useTreeVirtualization } from './useTreeVirtualization.js'; export interface NavigationTreeNewProps { data: ITreeData; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/TreeLazy.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/TreeLazy.ts index 77f0f129d0..1e6f49a9a5 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/TreeLazy.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/TreeLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const Tree = importLazyComponent(() => import('./Tree').then(m => m.Tree)); +export const Tree = importLazyComponent(() => import('./Tree.js').then(m => m.Tree)); diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/TreeState.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/TreeState.ts index b343427829..4177480110 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/TreeState.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/TreeState.ts @@ -7,6 +7,6 @@ */ import type { MetadataMap } from '@cloudbeaver/core-utils'; -import type { INodeState } from './INodeState'; +import type { INodeState } from './INodeState.js'; export type TreeState = MetadataMap; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/NodeSizeCacheContext.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/NodeSizeCacheContext.ts index 03eaadef45..2130bd046a 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/NodeSizeCacheContext.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/NodeSizeCacheContext.ts @@ -7,6 +7,6 @@ */ import { createContext } from 'react'; -import type { INodeSizeCache } from '../useNodeSizeCache'; +import type { INodeSizeCache } from '../useNodeSizeCache.js'; export const NodeSizeCacheContext = createContext(undefined); diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeContext.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeContext.ts index 46bb2ad6d3..354a890475 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeContext.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeContext.ts @@ -7,6 +7,6 @@ */ import { createContext } from 'react'; -import type { ITree } from '../useTree'; +import type { ITree } from '../useTree.js'; export const TreeContext = createContext(undefined); diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeDataContext.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeDataContext.ts index 39f7564a77..32107ea0c8 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeDataContext.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeDataContext.ts @@ -7,6 +7,6 @@ */ import { createContext } from 'react'; -import type { ITreeData } from '../useTreeData'; +import type { ITreeData } from '../useTreeData.js'; export const TreeDataContext = createContext(undefined); diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeDnDContext.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeDnDContext.ts index 7328faae1a..63befb0287 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeDnDContext.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeDnDContext.ts @@ -7,6 +7,6 @@ */ import { createContext } from 'react'; -import type { ITreeDnD } from '../useTreeDnD'; +import type { ITreeDnD } from '../useTreeDnD.js'; export const TreeDnDContext = createContext(undefined); diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeVirtualizationContext.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeVirtualizationContext.ts index 99b8290777..7186bd1ede 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeVirtualizationContext.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/contexts/TreeVirtualizationContext.ts @@ -7,6 +7,6 @@ */ import { createContext } from 'react'; -import type { ITreeVirtualization } from '../useTreeVirtualization'; +import type { ITreeVirtualization } from '../useTreeVirtualization.js'; export const TreeVirtualizationContext = createContext(undefined); diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/useNodeDnD.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/useNodeDnD.ts index 5c25f4d305..8fa865610a 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/useNodeDnD.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/useNodeDnD.ts @@ -10,7 +10,7 @@ import { useContext } from 'react'; import { useDataContext } from '@cloudbeaver/core-data-context'; import { useDNDData } from '@cloudbeaver/core-ui'; -import { TreeDnDContext } from './contexts/TreeDnDContext'; +import { TreeDnDContext } from './contexts/TreeDnDContext.js'; export function useNodeDnD(nodeId: string, onDragStart: () => void) { const treeDnD = useContext(TreeDnDContext)!; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/useNodeSizeCache.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/useNodeSizeCache.ts index 787d56cdc7..24546fde00 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/useNodeSizeCache.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/useNodeSizeCache.ts @@ -11,8 +11,8 @@ import { useState } from 'react'; import { useObjectRef } from '@cloudbeaver/core-blocks'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import type { ITree } from './useTree'; -import type { ITreeData } from './useTreeData'; +import type { ITree } from './useTree.js'; +import type { ITreeData } from './useTreeData.js'; export interface INodeSizeCache { getSize(id: string): number; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/useTree.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/useTree.ts index 9bd410f7dd..92abcbe6cf 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/useTree.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/useTree.ts @@ -9,8 +9,8 @@ import { observable } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; -import type { INodeRenderer, NodeComponent } from './INodeRenderer'; -import type { ITreeData } from './useTreeData'; +import type { INodeRenderer, NodeComponent } from './INodeRenderer.js'; +import type { ITreeData } from './useTreeData.js'; interface IOptions { data: ITreeData; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeData.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeData.ts index 8293f6b972..b6d2449c46 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeData.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeData.ts @@ -5,19 +5,19 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { computed, IComputedValue, observable } from 'mobx'; +import { computed, type IComputedValue, observable } from 'mobx'; import { useEffect, useState } from 'react'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import { applyTransforms } from './DataTransformers/applyTransforms'; -import { rootNodeStateTransformer, rootNodeTransformer } from './DataTransformers/rootTransformers'; -import type { TreeDataTransformer } from './DataTransformers/TreeDataTransformer'; -import type { INode } from './INode'; -import type { INodeState } from './INodeState'; -import type { TreeState } from './TreeState'; -import { useTreeState } from './useTreeState'; +import { applyTransforms } from './DataTransformers/applyTransforms.js'; +import { rootNodeStateTransformer, rootNodeTransformer } from './DataTransformers/rootTransformers.js'; +import type { TreeDataTransformer } from './DataTransformers/TreeDataTransformer.js'; +import type { INode } from './INode.js'; +import type { INodeState } from './INodeState.js'; +import type { TreeState } from './TreeState.js'; +import { useTreeState } from './useTreeState.js'; interface IOptions { rootId: string; diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeState.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeState.ts index 3c1fc9e49f..2c276a6dd0 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeState.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeState.ts @@ -11,8 +11,8 @@ import { useState } from 'react'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import { MetadataMap } from '@cloudbeaver/core-utils'; -import type { INodeState } from './INodeState'; -import type { TreeState } from './TreeState'; +import type { INodeState } from './INodeState.js'; +import type { TreeState } from './TreeState.js'; export interface ITreeState { getState(id: string): Readonly; diff --git a/webapp/packages/plugin-navigation-tree/src/index.ts b/webapp/packages/plugin-navigation-tree/src/index.ts index 7dfb774086..78f7f8bcde 100644 --- a/webapp/packages/plugin-navigation-tree/src/index.ts +++ b/webapp/packages/plugin-navigation-tree/src/index.ts @@ -5,61 +5,61 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -export * from './manifest'; +export * from './manifest.js'; -export * from './NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/createElementsTreeSettings'; -export * from './NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/DATA_CONTEXT_NAV_TREE_ROOT'; -export * from './NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/KEY_BINDING_ENABLE_FILTER'; -export * from './NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService'; +export * from './NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/createElementsTreeSettings.js'; +export * from './NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/DATA_CONTEXT_NAV_TREE_ROOT.js'; +export * from './NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/KEY_BINDING_ENABLE_FILTER.js'; +export * from './NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService.js'; -export * from './NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeLoaders'; -export * from './NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/DATA_CONTEXT_NAV_NODE_ACTIONS'; -export * from './NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader'; -export * from './NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader'; -export * from './NavigationTree/ElementsTree/NavigationTreeNode/isDraggingInsideProject'; +export * from './NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeLoaders.js'; +export * from './NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/DATA_CONTEXT_NAV_NODE_ACTIONS.js'; +export * from './NavigationTree/ElementsTree/NavigationTreeNode/TreeNodeMenu/TreeNodeMenuLoader.js'; +export * from './NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeRendererLoader.js'; +export * from './NavigationTree/ElementsTree/NavigationTreeNode/isDraggingInsideProject.js'; -export * from './NavigationTree/ElementsTree/ACTION_LINK_OBJECT'; -export * from './NavigationTree/ElementsTree/DATA_CONTEXT_ELEMENTS_TREE'; +export * from './NavigationTree/ElementsTree/ACTION_LINK_OBJECT.js'; +export * from './NavigationTree/ElementsTree/DATA_CONTEXT_ELEMENTS_TREE.js'; -export * from './NavigationTree/ElementsTree/ElementsTreeLoader'; +export * from './NavigationTree/ElementsTree/ElementsTreeLoader.js'; -export * from './NavigationTree/ElementsTree/ElementsTreeContext'; -export * from './NavigationTree/ElementsTree/KEY_BINDING_COLLAPSE_ALL'; -export * from './NavigationTree/ElementsTree/KEY_BINDING_LINK_OBJECT'; -export * from './NavigationTree/ElementsTree/MENU_NAV_TREE'; -export * from './NavigationTree/ElementsTree/NavigationNodeComponent'; -export * from './NavigationTree/ElementsTree/NavNodeFilterCompareFn'; -export * from './NavigationTree/ElementsTree/useElementsTree'; -export * from './NavigationTree/ElementsTree/ElementsTreeTools/MENU_ELEMENTS_TREE_TOOLS'; -export * from './NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService'; -export * from './NavigationTree/ElementsTree/elementsTreeNameFilter'; -export * from './NavigationTree/ElementsTree/ElementsTreeService'; -export * from './NavigationTree/NavigationTreeBootstrap'; -export * from './NavigationTree/NavigationTreeService'; +export * from './NavigationTree/ElementsTree/ElementsTreeContext.js'; +export * from './NavigationTree/ElementsTree/KEY_BINDING_COLLAPSE_ALL.js'; +export * from './NavigationTree/ElementsTree/KEY_BINDING_LINK_OBJECT.js'; +export * from './NavigationTree/ElementsTree/MENU_NAV_TREE.js'; +export * from './NavigationTree/ElementsTree/NavigationNodeComponent.js'; +export * from './NavigationTree/ElementsTree/NavNodeFilterCompareFn.js'; +export * from './NavigationTree/ElementsTree/useElementsTree.js'; +export * from './NavigationTree/ElementsTree/ElementsTreeTools/MENU_ELEMENTS_TREE_TOOLS.js'; +export * from './NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService.js'; +export * from './NavigationTree/ElementsTree/elementsTreeNameFilter.js'; +export * from './NavigationTree/ElementsTree/ElementsTreeService.js'; +export * from './NavigationTree/NavigationTreeBootstrap.js'; +export * from './NavigationTree/NavigationTreeService.js'; export { default as ElementsTreeToolsStyles } from './NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeTools.module.css'; export { default as ElementsTreeFilterStyles } from './NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeFilter.module.css'; export { default as NavigationNodeNestedStyles } from './NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.module.css'; export { default as NavigationNodeControlRendererStyles } from './NavigationTree/ElementsTree/NavigationTreeNode/NavigationNodeControlRenderer.module.css'; export { default as NavigationNodeControlStyles } from './NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeControl.module.css'; -export * from './NavigationTree/NavigationTreeLoader'; -export * from './TreeNew/INodeRenderer'; -export * from './TreeNew/TreeLazy'; -export * from './TreeNew/NodeLazy'; -export * from './TreeNew/contexts/TreeContext'; -export * from './TreeNew/contexts/TreeDataContext'; -export * from './TreeNew/NodeControlLazy'; -export * from './TreeNew/useTreeData'; -export * from './TreeNew/INode'; +export * from './NavigationTree/NavigationTreeLoader.js'; +export * from './TreeNew/INodeRenderer.js'; +export * from './TreeNew/TreeLazy.js'; +export * from './TreeNew/NodeLazy.js'; +export * from './TreeNew/contexts/TreeContext.js'; +export * from './TreeNew/contexts/TreeDataContext.js'; +export * from './TreeNew/NodeControlLazy.js'; +export * from './TreeNew/useTreeData.js'; +export * from './TreeNew/INode.js'; -export * from './NavigationTree/getNavigationTreeUserSettingsId'; -export * from './NodesManager/NavNodeView/IFolderTransform'; -export * from './NodesManager/NavNodeView/NavNodeViewService'; -export * from './NodesManager/NavNodeContextMenuService'; -export * from './NodesManager/useDatabaseObjectInfo'; -export * from './NodesManager/useNode'; -export * from './NodesManager/useChildren'; +export * from './NavigationTree/getNavigationTreeUserSettingsId.js'; +export * from './NodesManager/NavNodeView/IFolderTransform.js'; +export * from './NodesManager/NavNodeView/NavNodeViewService.js'; +export * from './NodesManager/NavNodeContextMenuService.js'; +export * from './NodesManager/useDatabaseObjectInfo.js'; +export * from './NodesManager/useNode.js'; +export * from './NodesManager/useChildren.js'; -export * from './NodesManager/NodeLinkLoader'; +export * from './NodesManager/NodeLinkLoader.js'; -export * from './NavigationTreeSettingsService'; +export * from './NavigationTreeSettingsService.js'; diff --git a/webapp/packages/plugin-navigation-tree/src/manifest.ts b/webapp/packages/plugin-navigation-tree/src/manifest.ts index 2d1a656346..6b9d66bb38 100644 --- a/webapp/packages/plugin-navigation-tree/src/manifest.ts +++ b/webapp/packages/plugin-navigation-tree/src/manifest.ts @@ -10,17 +10,17 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const navigationTreePlugin: PluginManifest = { info: { name: 'Navigation Tree plugin' }, providers: [ - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./NavigationTree/NavigationTreeService').then(m => m.NavigationTreeService), - () => import('./NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService').then(m => m.ElementsTreeToolsMenuService), - () => import('./NavigationTree/NavigationTreeBootstrap').then(m => m.NavigationTreeBootstrap), - () => import('./NodesManager/NavNodeContextMenuService').then(m => m.NavNodeContextMenuService), - () => import('./NodesManager/NavNodeView/NavNodeViewService').then(m => m.NavNodeViewService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./NavigationTree/NavigationTreeService.js').then(m => m.NavigationTreeService), + () => import('./NavigationTree/ElementsTree/ElementsTreeTools/ElementsTreeToolsMenuService.js').then(m => m.ElementsTreeToolsMenuService), + () => import('./NavigationTree/NavigationTreeBootstrap.js').then(m => m.NavigationTreeBootstrap), + () => import('./NodesManager/NavNodeContextMenuService.js').then(m => m.NavNodeContextMenuService), + () => import('./NodesManager/NavNodeView/NavNodeViewService.js').then(m => m.NavNodeViewService), () => - import('./NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService').then( + import('./NavigationTree/ElementsTree/ElementsTreeTools/NavigationTreeSettings/ElementsTreeSettingsService.js').then( m => m.ElementsTreeSettingsService, ), - () => import('./NavigationTreeSettingsService').then(m => m.NavigationTreeSettingsService), - () => import('./NavigationTree/ElementsTree/ElementsTreeService').then(m => m.ElementsTreeService), + () => import('./NavigationTreeSettingsService.js').then(m => m.NavigationTreeSettingsService), + () => import('./NavigationTree/ElementsTree/ElementsTreeService.js').then(m => m.ElementsTreeService), ], }; diff --git a/webapp/packages/plugin-object-viewer/package.json b/webapp/packages/plugin-object-viewer/package.json index 66731ad140..b949759774 100644 --- a/webapp/packages/plugin-object-viewer/package.json +++ b/webapp/packages/plugin-object-viewer/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-object-viewer", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-object-viewer/src/IObjectViewerTabContext.ts b/webapp/packages/plugin-object-viewer/src/IObjectViewerTabContext.ts index 46a26b0b70..5b5942f4e9 100644 --- a/webapp/packages/plugin-object-viewer/src/IObjectViewerTabContext.ts +++ b/webapp/packages/plugin-object-viewer/src/IObjectViewerTabContext.ts @@ -8,8 +8,8 @@ import type { INodeNavigationContext } from '@cloudbeaver/core-navigation-tree'; import type { ITab, ITabNavigationContext } from '@cloudbeaver/plugin-navigation-tabs'; -import type { IObjectViewerTabState } from './IObjectViewerTabState'; -import type { ObjectPage } from './ObjectPage/ObjectPage'; +import type { IObjectViewerTabState } from './IObjectViewerTabState.js'; +import type { ObjectPage } from './ObjectPage/ObjectPage.js'; export interface IObjectViewerTabContext { isSupported: boolean; diff --git a/webapp/packages/plugin-object-viewer/src/LocaleService.ts b/webapp/packages/plugin-object-viewer/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-object-viewer/src/LocaleService.ts +++ b/webapp/packages/plugin-object-viewer/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPagePanel.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPagePanel.tsx index 11ffc1ba11..6c75c123a5 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPagePanel.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPagePanel.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import type { ObjectPagePanelComponent } from './ObjectPage'; +import type { ObjectPagePanelComponent } from './ObjectPage.js'; export const DBObjectPagePanel: ObjectPagePanelComponent = observer(function DBObjectPagePanel({ tab, page }) { const Panel = page.getPanelComponent(); diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPageService.ts b/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPageService.ts index d7359edaf2..e3f4e135f2 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPageService.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPageService.ts @@ -10,8 +10,8 @@ import { action, computed, makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import type { ITab } from '@cloudbeaver/plugin-navigation-tabs'; -import type { IObjectViewerTabState } from '../IObjectViewerTabState'; -import { ObjectPage, ObjectPageCallback, ObjectPageOptions } from './ObjectPage'; +import type { IObjectViewerTabState } from '../IObjectViewerTabState.js'; +import { ObjectPage, type ObjectPageCallback, type ObjectPageOptions } from './ObjectPage.js'; @injectable() export class DBObjectPageService { diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPageTab.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPageTab.tsx index 688891573a..2e65f223b7 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPageTab.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPage/DBObjectPageTab.tsx @@ -10,8 +10,8 @@ import { useCallback } from 'react'; import type { ITab } from '@cloudbeaver/plugin-navigation-tabs'; -import type { IObjectViewerTabState } from '../IObjectViewerTabState'; -import type { ObjectPage } from './ObjectPage'; +import type { IObjectViewerTabState } from '../IObjectViewerTabState.js'; +import type { ObjectPage } from './ObjectPage.js'; interface IProps { tab: ITab; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPage/ObjectPage.ts b/webapp/packages/plugin-object-viewer/src/ObjectPage/ObjectPage.ts index b45a825114..6bf0307963 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPage/ObjectPage.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectPage/ObjectPage.ts @@ -9,7 +9,7 @@ import { makeObservable, observable } from 'mobx'; import type { ITab } from '@cloudbeaver/plugin-navigation-tabs'; -import type { IObjectViewerTabState } from '../IObjectViewerTabState'; +import type { IObjectViewerTabState } from '../IObjectViewerTabState.js'; export interface ObjectPageTabProps { tab: ITab; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/FolderPanelRenderer.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/FolderPanelRenderer.tsx index 011a93f3cc..b0cba57f71 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/FolderPanelRenderer.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/FolderPanelRenderer.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { useService } from '@cloudbeaver/core-di'; import { NavNodeViewService, useNode } from '@cloudbeaver/plugin-navigation-tree'; -import { ObjectPropertyTable } from './ObjectPropertyTable/ObjectPropertyTable'; +import { ObjectPropertyTable } from './ObjectPropertyTable/ObjectPropertyTable.js'; interface IFolderPanelRendererProps { nodeId: string; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/FolderTabRenderer.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/FolderTabRenderer.tsx index 0c325a3324..b575dff236 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/FolderTabRenderer.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/FolderTabRenderer.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { useService } from '@cloudbeaver/core-di'; import { NavNodeViewService } from '@cloudbeaver/plugin-navigation-tree'; -import { NavNodeTab } from './NavNodeTab'; +import { NavNodeTab } from './NavNodeTab.js'; interface IFolderTabRendererProps { nodeId: string; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataPanel.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataPanel.tsx index 9339cf477a..a155bc506b 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataPanel.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataPanel.tsx @@ -7,7 +7,7 @@ */ import type { NavNodeTransformViewComponent } from '@cloudbeaver/plugin-navigation-tree'; -import { ObjectProperties } from './ObjectProperties'; +import { ObjectProperties } from './ObjectProperties.js'; export const NavNodeMetadataPanel: NavNodeTransformViewComponent = function NavNodeMetadataPanel({ nodeId }) { return ; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataViewBootstrap.ts b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataViewBootstrap.ts index b01404ea5a..218826bcf8 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataViewBootstrap.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataViewBootstrap.ts @@ -9,18 +9,21 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ENodeFeature, NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; import { NavNodeViewService } from '@cloudbeaver/plugin-navigation-tree'; -import { NavNodeMetadataPanel } from './NavNodeMetadataPanel'; -import { NavNodeMetadataTab } from './NavNodeMetadataTab'; +import { NavNodeMetadataPanel } from './NavNodeMetadataPanel.js'; +import { NavNodeMetadataTab } from './NavNodeMetadataTab.js'; const navNodeMetadataId = 'object-viewer://metadata'; @injectable() export class NavNodeMetadataViewBootstrap extends Bootstrap { - constructor(private readonly navNodeViewService: NavNodeViewService, private readonly navNodeInfoResource: NavNodeInfoResource) { + constructor( + private readonly navNodeViewService: NavNodeViewService, + private readonly navNodeInfoResource: NavNodeInfoResource, + ) { super(); } - register(): void { + override register(): void { this.navNodeViewService.addTransform({ order: 1, tab: (nodeId, folderId) => { @@ -47,6 +50,4 @@ export class NavNodeMetadataViewBootstrap extends Bootstrap { }, }); } - - load(): void {} } diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/ObjectProperty.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/ObjectProperty.tsx index 55bbf47391..2c9bfe528d 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/ObjectProperty.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/NavNodeMetadata/ObjectProperty.tsx @@ -7,10 +7,10 @@ */ import { observer } from 'mobx-react-lite'; -import { FieldCheckbox, ILayoutSizeProps, InputField } from '@cloudbeaver/core-blocks'; +import { FieldCheckbox, type ILayoutSizeProps, InputField } from '@cloudbeaver/core-blocks'; import type { ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; -import { additionalProps, filterProperty, getValue, matchType } from '../../helpers'; +import { additionalProps, filterProperty, getValue, matchType } from '../../helpers.js'; interface Props extends ILayoutSizeProps { objectProperty?: ObjectPropertyInfo; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderPanel.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderPanel.tsx index f868ae582e..fe59b1ae04 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderPanel.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderPanel.tsx @@ -14,9 +14,9 @@ import { type DBObject, DBObjectParentKey, DBObjectResource, NavNodeInfoResource import { isDefined } from '@cloudbeaver/core-utils'; import { type NavNodeTransformViewComponent, NavNodeViewService } from '@cloudbeaver/plugin-navigation-tree'; -import { TableLoader } from '../../ObjectPropertyTable/Table/TableLoader'; +import { TableLoader } from '../../ObjectPropertyTable/Table/TableLoader.js'; import classes from './VirtualFolderPanel.module.css'; -import { VirtualFolderUtils } from './VirtualFolderUtils'; +import { VirtualFolderUtils } from './VirtualFolderUtils.js'; export const VirtualFolderPanel: NavNodeTransformViewComponent = observer(function VirtualFolderPanel({ folderId, nodeId }) { const translate = useTranslate(); @@ -47,7 +47,7 @@ export const VirtualFolderPanel: NavNodeTransformViewComponent = observer(functi {objects.length === 0 ? ( {translate('plugin_object_viewer_table_no_items')} ) : ( -
+
)} diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderTab.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderTab.tsx index b35d156c89..2ac112d095 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderTab.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderTab.tsx @@ -8,7 +8,7 @@ import { TabIcon, Tab, TabTitle } from '@cloudbeaver/core-ui'; import type { NavNodeTransformViewComponent } from '@cloudbeaver/plugin-navigation-tree'; -import { VirtualFolderUtils } from './VirtualFolderUtils'; +import { VirtualFolderUtils } from './VirtualFolderUtils.js'; export const VirtualFolderTab: NavNodeTransformViewComponent = function VirtualFolderTab({ folderId }) { const nodeType = VirtualFolderUtils.getNodeType(folderId); diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderViewBootstrap.ts b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderViewBootstrap.ts index 313e23c394..15d9485b8d 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderViewBootstrap.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderViewBootstrap.ts @@ -10,10 +10,10 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; import { NavNodeViewService } from '@cloudbeaver/plugin-navigation-tree'; -import { VirtualFolderUtils } from './VirtualFolderUtils'; +import { VirtualFolderUtils } from './VirtualFolderUtils.js'; -const VirtualFolderTab = importLazyComponent(() => import('./VirtualFolderTab').then(m => m.VirtualFolderTab)); -const VirtualFolderPanel = importLazyComponent(() => import('./VirtualFolderPanel').then(m => m.VirtualFolderPanel)); +const VirtualFolderTab = importLazyComponent(() => import('./VirtualFolderTab.js').then(m => m.VirtualFolderTab)); +const VirtualFolderPanel = importLazyComponent(() => import('./VirtualFolderPanel.js').then(m => m.VirtualFolderPanel)); @injectable() export class VirtualFolderViewBootstrap extends Bootstrap { @@ -24,7 +24,7 @@ export class VirtualFolderViewBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.navNodeViewService.addTransform({ order: 2, tab: (nodeId, folderId) => { @@ -67,6 +67,4 @@ export class VirtualFolderViewBootstrap extends Bootstrap { }, }); } - - load(): void {} } diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectFolders.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectFolders.tsx index c5cb82b953..01353eec83 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectFolders.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectFolders.tsx @@ -8,11 +8,11 @@ import { observer } from 'mobx-react-lite'; import { useEffect } from 'react'; -import { SContext, StyleRegistry, TextPlaceholder, useResource, useTranslate } from '@cloudbeaver/core-blocks'; +import { SContext, type StyleRegistry, TextPlaceholder, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NavNodeManagerService, NavTreeResource } from '@cloudbeaver/core-navigation-tree'; import { - ITabData, + type ITabData, TabList, TabListStyles, TabPanel, @@ -26,9 +26,9 @@ import { MetadataMap } from '@cloudbeaver/core-utils'; import type { ITab } from '@cloudbeaver/plugin-navigation-tabs'; import { NavNodeViewService } from '@cloudbeaver/plugin-navigation-tree'; -import type { IObjectViewerTabState } from '../IObjectViewerTabState'; -import { FolderPanelRenderer } from './FolderPanelRenderer'; -import { FolderTabRenderer } from './FolderTabRenderer'; +import type { IObjectViewerTabState } from '../IObjectViewerTabState.js'; +import { FolderPanelRenderer } from './FolderPanelRenderer.js'; +import { FolderTabRenderer } from './FolderTabRenderer.js'; import NavNodeTabStyle from './NavNodeTab.module.css'; import ObjectFoldersNavNodeTab from './shared/ObjectFoldersNavNodeTab.module.css'; import ObjectFoldersTab from './shared/ObjectFoldersTab.module.css'; @@ -95,7 +95,7 @@ export const ObjectFolders = observer(function ObjectFolders({ tab }) { const wrongFolder = !folders.includes(folderId) && folders.length > 0 && children.isLoaded() && !children.isLoading() && !children.isOutdated(); if (wrongFolder) { - folderId = folders[0]; + folderId = folders[0]!; } function openFolder(tabData: ITabData) { diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPagePanel.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPagePanel.tsx index 090862090d..0e12d8fb56 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPagePanel.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPagePanel.tsx @@ -9,8 +9,8 @@ import { observer } from 'mobx-react-lite'; import { s, useS } from '@cloudbeaver/core-blocks'; -import type { ObjectPagePanelComponent } from '../ObjectPage/ObjectPage'; -import { ObjectFolders } from './ObjectFolders'; +import type { ObjectPagePanelComponent } from '../ObjectPage/ObjectPage.js'; +import { ObjectFolders } from './ObjectFolders.js'; import classes from './ObjectPropertiesPagePanel.module.css'; export const ObjectPropertiesPagePanel: ObjectPagePanelComponent = observer(function ObjectPropertiesPagePanel({ tab }) { diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPageService.ts b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPageService.ts index 33770bcc30..cf40be2935 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPageService.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPageService.ts @@ -10,11 +10,11 @@ import { NotificationService } from '@cloudbeaver/core-events'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { type INodeNavigationData, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; -import { DBObjectPageService } from '../ObjectPage/DBObjectPageService'; -import type { ObjectPage } from '../ObjectPage/ObjectPage'; -import { ObjectViewerTabService } from '../ObjectViewerTabService'; -import { ObjectPropertiesPagePanel } from './ObjectPropertiesPagePanel'; -import { ObjectPropertiesPageTab } from './ObjectPropertiesPageTab'; +import { DBObjectPageService } from '../ObjectPage/DBObjectPageService.js'; +import type { ObjectPage } from '../ObjectPage/ObjectPage.js'; +import { ObjectViewerTabService } from '../ObjectViewerTabService.js'; +import { ObjectPropertiesPagePanel } from './ObjectPropertiesPagePanel.js'; +import { ObjectPropertiesPageTab } from './ObjectPropertiesPageTab.js'; @injectable() export class ObjectPropertiesPageService { diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPageTab.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPageTab.tsx index 2e5d275a00..9ca694cb9f 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPageTab.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertiesPageTab.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { useTranslate } from '@cloudbeaver/core-blocks'; import { Tab, TabIcon, TabTitle } from '@cloudbeaver/core-ui'; -import type { ObjectPageTabComponent } from '../ObjectPage/ObjectPage'; +import type { ObjectPageTabComponent } from '../ObjectPage/ObjectPage.js'; export const ObjectPropertiesPageTab: ObjectPageTabComponent = observer(function ObjectPropertiesPageTab({ page, onSelect }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTable.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTable.tsx index aa75b83337..9ea353db69 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTable.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTable.tsx @@ -15,7 +15,7 @@ import { isDefined } from '@cloudbeaver/core-utils'; import { NavNodeViewService } from '@cloudbeaver/plugin-navigation-tree'; import styles from './ObjectPropertyTable.module.css'; -import { TableLoader } from './Table/TableLoader'; +import { TableLoader } from './Table/TableLoader.js'; interface ObjectPropertyTableProps { objectId: string; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooter.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooter.tsx index 1cf569e782..76b0a7968f 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooter.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooter.tsx @@ -15,7 +15,7 @@ import { resourceKeyList } from '@cloudbeaver/core-resource'; import { MenuBar, MenuBarItemStyles, MenuBarStyles } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import { MENU_OBJECT_VIEWER_FOOTER } from './MENU_OBJECT_VIEWER_FOOTER'; +import { MENU_OBJECT_VIEWER_FOOTER } from './MENU_OBJECT_VIEWER_FOOTER.js'; interface Props { state: TableState; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooterService.ts b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooterService.ts index 420ad00194..1b3a8d3ce0 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooterService.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooterService.ts @@ -11,7 +11,7 @@ import { DATA_CONTEXT_NAV_NODES, ENodeFeature, NavTreeResource, NavTreeSettingsS import { resourceKeyList } from '@cloudbeaver/core-resource'; import { ACTION_DELETE, ActionService, MenuService } from '@cloudbeaver/core-view'; -import { MENU_OBJECT_VIEWER_FOOTER } from './MENU_OBJECT_VIEWER_FOOTER'; +import { MENU_OBJECT_VIEWER_FOOTER } from './MENU_OBJECT_VIEWER_FOOTER.js'; @injectable() export class ObjectPropertyTableFooterService { diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/CellFormatter.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/CellFormatter.tsx index 5a62873aa6..00f14b82d6 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/CellFormatter.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/CellFormatter.tsx @@ -18,9 +18,9 @@ import { useMenu } from '@cloudbeaver/core-view'; import type { RenderCellProps } from '@cloudbeaver/plugin-data-grid'; import { MENU_NAV_TREE, useNode } from '@cloudbeaver/plugin-navigation-tree'; -import { getValue } from '../../helpers'; +import { getValue } from '../../helpers.js'; import classes from './CellFormatter.module.css'; -import { TableContext } from './TableContext'; +import { TableContext } from './TableContext.js'; interface Props { value: string; @@ -72,11 +72,11 @@ export const Menu = observer(function Menu({ value, node }) { return (
-
+
{value}
- {!menuEmpty && } + {!menuEmpty && }
@@ -97,8 +97,8 @@ export const CellFormatter = observer>(function CellFo const value = property ? getValue(property.value) : ''; return ( -
- {columnIdx === 0 && !!node ? : {value}} +
+ {columnIdx === 0 && !!node ? : {value}}
); }); diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnIcon/ColumnIcon.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnIcon/ColumnIcon.tsx index 233d123036..c2aa9de182 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnIcon/ColumnIcon.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnIcon/ColumnIcon.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ICustomColumn } from '../../Column'; -import { IconFormatter } from './IconFormatter'; +import type { ICustomColumn } from '../../Column.js'; +import { IconFormatter } from './IconFormatter.js'; export const ColumnIcon: ICustomColumn = { key: 'columnIcon', diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnSelect/ColumnSelect.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnSelect/ColumnSelect.tsx index 38eebede60..572348902e 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnSelect/ColumnSelect.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnSelect/ColumnSelect.tsx @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ICustomColumn } from '../../Column'; -import { SelectorFormatter } from './SelectorFormatter'; +import type { ICustomColumn } from '../../Column.js'; +import { SelectorFormatter } from './SelectorFormatter.js'; export const ColumnSelect: ICustomColumn = { key: 'columnSelector', diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnSelect/SelectorFormatter.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnSelect/SelectorFormatter.tsx index d72f4133ce..26237f114f 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnSelect/SelectorFormatter.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Columns/ColumnSelect/SelectorFormatter.tsx @@ -12,7 +12,7 @@ import { Checkbox, getComputed, s, useS } from '@cloudbeaver/core-blocks'; import type { DBObject } from '@cloudbeaver/core-navigation-tree'; import type { RenderCellProps } from '@cloudbeaver/plugin-data-grid'; -import { TableContext } from '../../TableContext'; +import { TableContext } from '../../TableContext.js'; import style from './SelectorFormatter.module.css'; export const SelectorFormatter = observer>(function SelectorFormatter(props) { diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/HeaderRenderer.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/HeaderRenderer.tsx index e1e2d67451..b0f159cd8c 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/HeaderRenderer.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/HeaderRenderer.tsx @@ -12,14 +12,14 @@ import type { DBObject } from '@cloudbeaver/core-navigation-tree'; import type { RenderHeaderCellProps } from '@cloudbeaver/plugin-data-grid'; import classes from './HeaderRenderer.module.css'; -import { TableContext } from './TableContext'; +import { TableContext } from './TableContext.js'; export const HeaderRenderer = observer>(function HeaderRenderer(props) { const tableContext = useContext(TableContext); const dataColumn = tableContext.tableData?.columns.find(column => column.key === props.column.key); return ( -
+
{props.column.name}
); diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Table.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Table.tsx index 5104632652..e09743b0ff 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Table.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/Table.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useCallback, useState } from 'react'; -import { IScrollState, Link, s, useControlledScroll, useExecutor, useS, useTable, useTranslate } from '@cloudbeaver/core-blocks'; +import { type IScrollState, Link, s, useControlledScroll, useExecutor, useS, useTable, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { type DBObject, NavTreeResource } from '@cloudbeaver/core-navigation-tree'; import type { ObjectPropertyInfo } from '@cloudbeaver/core-sdk'; @@ -16,16 +16,16 @@ import { useTabLocalState } from '@cloudbeaver/core-ui'; import { isDefined, TextTools } from '@cloudbeaver/core-utils'; import { DataGrid } from '@cloudbeaver/plugin-data-grid'; -import { getValue } from '../../helpers'; -import { ObjectPropertyTableFooter } from '../ObjectPropertyTableFooter'; -import { CellFormatter } from './CellFormatter'; -import type { IDataColumn } from './Column'; -import { ColumnIcon } from './Columns/ColumnIcon/ColumnIcon'; -import { ColumnSelect } from './Columns/ColumnSelect/ColumnSelect'; -import { HeaderRenderer } from './HeaderRenderer'; +import { getValue } from '../../helpers.js'; +import { ObjectPropertyTableFooter } from '../ObjectPropertyTableFooter.js'; +import { CellFormatter } from './CellFormatter.js'; +import type { IDataColumn } from './Column.js'; +import { ColumnIcon } from './Columns/ColumnIcon/ColumnIcon.js'; +import { ColumnSelect } from './Columns/ColumnSelect/ColumnSelect.js'; +import { HeaderRenderer } from './HeaderRenderer.js'; import classes from './Table.module.css'; -import { TableContext } from './TableContext'; -import { useTableData } from './useTableData'; +import { TableContext } from './TableContext.js'; +import { useTableData } from './useTableData.js'; const CELL_FONT = '400 12px Roboto'; const COLUMN_FONT = '700 12px Roboto'; @@ -45,9 +45,9 @@ function getMeasuredCells(columns: ObjectPropertyInfo[], rows: DBObject[]) { for (const row of rows.slice(0, 100)) { if (row.object?.properties) { for (let i = 0; i < row.object.properties.length; i++) { - const value = getValue(row.object.properties[i].value); + const value = getValue(row.object.properties[i]!.value); - if (value.length > rowStrings[i].length) { + if (value.length > rowStrings[i]!.length) { rowStrings[i] = value; } } @@ -64,7 +64,7 @@ function getMeasuredCells(columns: ObjectPropertyInfo[], rows: DBObject[]) { text: rowStrings, }).map(width => width + CELL_PADDING + CELL_BORDER); - const widthData = columnNames.map((_, i) => Math.max(columnsWidth[i], cellsWidth[i] ?? 0)); + const widthData = columnNames.map((_, i) => Math.max(columnsWidth[i]!, cellsWidth[i] ?? 0)); return widthData; } @@ -94,7 +94,7 @@ export const Table = observer(function Table({ objects, hasNextPage, name: property.displayName ?? '', description: property.description, columnDataIndex: null, - width: Math.min(300, measuredCells[index]), + width: Math.min(300, measuredCells[index]!), minWidth: 40, resizable: true, renderCell: props => , diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/TableContext.ts b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/TableContext.ts index c9a9bc9f67..5b387e1774 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/TableContext.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/TableContext.ts @@ -9,7 +9,7 @@ import { createContext } from 'react'; import type { TableState } from '@cloudbeaver/core-blocks'; -import type { ITableData } from './useTableData'; +import type { ITableData } from './useTableData.js'; interface ITableContext { tableData: ITableData | null; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/TableLoader.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/TableLoader.tsx index 31e9d44636..725f703331 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/TableLoader.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/TableLoader.tsx @@ -7,10 +7,10 @@ */ import { ComplexLoader, createComplexLoader } from '@cloudbeaver/core-blocks'; -import type { TableProps } from './Table'; +import type { TableProps } from './Table.js'; const loader = createComplexLoader(async function loader() { - const { Table } = await import('./Table'); + const { Table } = await import('./Table.js'); return { Table }; }); diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/useTableData.ts b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/useTableData.ts index e660ddb815..11479f26a7 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/useTableData.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/useTableData.ts @@ -9,7 +9,7 @@ import { useObjectRef } from '@cloudbeaver/core-blocks'; import type { DBObject } from '@cloudbeaver/core-navigation-tree'; import type { CalculatedColumn as GridCalculatedColumn } from '@cloudbeaver/plugin-data-grid'; -import type { ICustomColumn, IDataColumn } from './Column'; +import type { ICustomColumn, IDataColumn } from './Column.js'; type CalculatedColumn = GridCalculatedColumn; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectViewerBootstrap.ts b/webapp/packages/plugin-object-viewer/src/ObjectViewerBootstrap.ts index 8eb0931a1a..6bd92d85ec 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectViewerBootstrap.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectViewerBootstrap.ts @@ -7,9 +7,9 @@ */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { ObjectPropertiesPageService } from './ObjectPropertiesPage/ObjectPropertiesPageService'; -import { ObjectPropertyTableFooterService } from './ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooterService'; -import { ObjectViewerTabService } from './ObjectViewerTabService'; +import { ObjectPropertiesPageService } from './ObjectPropertiesPage/ObjectPropertiesPageService.js'; +import { ObjectPropertyTableFooterService } from './ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooterService.js'; +import { ObjectViewerTabService } from './ObjectViewerTabService.js'; @injectable() export class ObjectViewerBootstrap extends Bootstrap { @@ -21,11 +21,9 @@ export class ObjectViewerBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.objectViewerTabService.registerTabHandler(); this.objectPropertiesPageService.registerDBObjectPage(); this.objectPropertyTableFooterService.registerFooterActions(); } - - load(): void {} } diff --git a/webapp/packages/plugin-object-viewer/src/ObjectViewerPanel/ObjectViewerPanel.tsx b/webapp/packages/plugin-object-viewer/src/ObjectViewerPanel/ObjectViewerPanel.tsx index 67ebecb23f..8c72ba9f8f 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectViewerPanel/ObjectViewerPanel.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectViewerPanel/ObjectViewerPanel.tsx @@ -8,7 +8,7 @@ import { runInAction } from 'mobx'; import { observer } from 'mobx-react-lite'; -import { s, SContext, StyleRegistry, TextPlaceholder, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks'; +import { s, SContext, type StyleRegistry, TextPlaceholder, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { ConnectionInfoResource } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { NavNodeInfoResource } from '@cloudbeaver/core-navigation-tree'; @@ -17,10 +17,10 @@ import { MetadataMap } from '@cloudbeaver/core-utils'; import { ConnectionShieldLazy } from '@cloudbeaver/plugin-connections'; import type { TabHandlerPanelComponent } from '@cloudbeaver/plugin-navigation-tabs'; -import type { IObjectViewerTabState } from '../IObjectViewerTabState'; -import { DBObjectPagePanel } from '../ObjectPage/DBObjectPagePanel'; -import { DBObjectPageService } from '../ObjectPage/DBObjectPageService'; -import { DBObjectPageTab } from '../ObjectPage/DBObjectPageTab'; +import type { IObjectViewerTabState } from '../IObjectViewerTabState.js'; +import { DBObjectPagePanel } from '../ObjectPage/DBObjectPagePanel.js'; +import { DBObjectPageService } from '../ObjectPage/DBObjectPageService.js'; +import { DBObjectPageTab } from '../ObjectPage/DBObjectPageTab.js'; import styles from './shared/ObjectViewerPanel.module.css'; import ObjectViewerPanelTab from './shared/ObjectViewerPanelTab.module.css'; diff --git a/webapp/packages/plugin-object-viewer/src/ObjectViewerTab.tsx b/webapp/packages/plugin-object-viewer/src/ObjectViewerTab.tsx index 6359e7e05b..0b6caeed9a 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectViewerTab.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectViewerTab.tsx @@ -9,12 +9,12 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; import { useDataContext } from '@cloudbeaver/core-data-context'; -import { ITabData, Tab, TabIcon, TabTitle } from '@cloudbeaver/core-ui'; +import { type ITabData, Tab, TabIcon, TabTitle } from '@cloudbeaver/core-ui'; import { CaptureViewContext } from '@cloudbeaver/core-view'; import type { TabHandlerTabComponent } from '@cloudbeaver/plugin-navigation-tabs'; import { useNode } from '@cloudbeaver/plugin-navigation-tree'; -import type { IObjectViewerTabState } from './IObjectViewerTabState'; +import type { IObjectViewerTabState } from './IObjectViewerTabState.js'; export const ObjectViewerTab: TabHandlerTabComponent = observer(function ObjectViewerTab({ tab, onSelect, onClose }) { const viewContext = useContext(CaptureViewContext); diff --git a/webapp/packages/plugin-object-viewer/src/ObjectViewerTabService.ts b/webapp/packages/plugin-object-viewer/src/ObjectViewerTabService.ts index beec8c4126..e67e1e131d 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectViewerTabService.ts +++ b/webapp/packages/plugin-object-viewer/src/ObjectViewerTabService.ts @@ -9,7 +9,6 @@ import { action, makeObservable, runInAction } from 'mobx'; import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { - Connection, ConnectionExecutionContextResource, ConnectionInfoActiveProjectKey, ConnectionInfoResource, @@ -17,7 +16,7 @@ import { connectionProvider, createConnectionParam, executionContextProvider, - IConnectionInfoParams, + type IConnectionInfoParams, isConnectionInfoParamEqual, objectCatalogProvider, objectSchemaProvider, @@ -26,7 +25,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import type { IExecutionContextProvider, ISyncContextLoader } from '@cloudbeaver/core-executor'; import { - INavNodeRenameData, + type INavNodeRenameData, type INodeNavigationData, NavNodeManagerService, NavTreeResource, @@ -34,17 +33,17 @@ import { objectNavNodeProvider, } from '@cloudbeaver/core-navigation-tree'; import { projectProvider } from '@cloudbeaver/core-projects'; -import { ResourceKey, resourceKeyList, ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; -import { ITab, NavigationTabsService, TabHandler } from '@cloudbeaver/plugin-navigation-tabs'; +import { type ResourceKey, resourceKeyList, type ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { type ITab, NavigationTabsService, TabHandler } from '@cloudbeaver/plugin-navigation-tabs'; -import type { IObjectViewerTabContext } from './IObjectViewerTabContext'; -import type { IObjectViewerTabState } from './IObjectViewerTabState'; -import { DBObjectPageService } from './ObjectPage/DBObjectPageService'; -import type { ObjectPage } from './ObjectPage/ObjectPage'; -import { objectViewerTabHandlerKey } from './objectViewerTabHandlerKey'; +import type { IObjectViewerTabContext } from './IObjectViewerTabContext.js'; +import type { IObjectViewerTabState } from './IObjectViewerTabState.js'; +import { DBObjectPageService } from './ObjectPage/DBObjectPageService.js'; +import type { ObjectPage } from './ObjectPage/ObjectPage.js'; +import { objectViewerTabHandlerKey } from './objectViewerTabHandlerKey.js'; -const ObjectViewerPanel = importLazyComponent(() => import('./ObjectViewerPanel/ObjectViewerPanel').then(m => m.ObjectViewerPanel)); -const ObjectViewerTab = importLazyComponent(() => import('./ObjectViewerTab').then(m => m.ObjectViewerTab)); +const ObjectViewerPanel = importLazyComponent(() => import('./ObjectViewerPanel/ObjectViewerPanel.js').then(m => m.ObjectViewerPanel)); +const ObjectViewerTab = importLazyComponent(() => import('./ObjectViewerTab.js').then(m => m.ObjectViewerTab)); @injectable() export class ObjectViewerTabService { diff --git a/webapp/packages/plugin-object-viewer/src/index.ts b/webapp/packages/plugin-object-viewer/src/index.ts index 6decd9f6c9..8c5a5ff9f2 100644 --- a/webapp/packages/plugin-object-viewer/src/index.ts +++ b/webapp/packages/plugin-object-viewer/src/index.ts @@ -1,7 +1,14 @@ -export * from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +export * from './manifest.js'; // All Services and Components that is provided by this plugin should be exported here -export * from './ObjectPage/DBObjectPageService'; -export * from './ObjectPage/ObjectPage'; -export * from './ObjectViewerTabService'; -export * from './IObjectViewerTabState'; +export * from './ObjectPage/DBObjectPageService.js'; +export * from './ObjectPage/ObjectPage.js'; +export * from './ObjectViewerTabService.js'; +export * from './IObjectViewerTabState.js'; diff --git a/webapp/packages/plugin-object-viewer/src/manifest.ts b/webapp/packages/plugin-object-viewer/src/manifest.ts index 63d902dd87..9d53b3c31a 100644 --- a/webapp/packages/plugin-object-viewer/src/manifest.ts +++ b/webapp/packages/plugin-object-viewer/src/manifest.ts @@ -11,13 +11,13 @@ export const objectViewerManifest: PluginManifest = { info: { name: 'Object Viewer Plugin' }, providers: [ - () => import('./ObjectViewerBootstrap').then(m => m.ObjectViewerBootstrap), - () => import('./ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataViewBootstrap').then(m => m.NavNodeMetadataViewBootstrap), - () => import('./ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderViewBootstrap').then(m => m.VirtualFolderViewBootstrap), - () => import('./ObjectPropertiesPage/ObjectPropertiesPageService').then(m => m.ObjectPropertiesPageService), - () => import('./ObjectViewerTabService').then(m => m.ObjectViewerTabService), - () => import('./ObjectPage/DBObjectPageService').then(m => m.DBObjectPageService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooterService').then(m => m.ObjectPropertyTableFooterService), + () => import('./ObjectViewerBootstrap.js').then(m => m.ObjectViewerBootstrap), + () => import('./ObjectPropertiesPage/NavNodeView/NavNodeMetadata/NavNodeMetadataViewBootstrap.js').then(m => m.NavNodeMetadataViewBootstrap), + () => import('./ObjectPropertiesPage/NavNodeView/VirtualFolder/VirtualFolderViewBootstrap.js').then(m => m.VirtualFolderViewBootstrap), + () => import('./ObjectPropertiesPage/ObjectPropertiesPageService.js').then(m => m.ObjectPropertiesPageService), + () => import('./ObjectViewerTabService.js').then(m => m.ObjectViewerTabService), + () => import('./ObjectPage/DBObjectPageService.js').then(m => m.DBObjectPageService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTableFooterService.js').then(m => m.ObjectPropertyTableFooterService), ], }; diff --git a/webapp/packages/plugin-product-information-administration/package.json b/webapp/packages/plugin-product-information-administration/package.json index a6e31b6efd..89216ef4e3 100644 --- a/webapp/packages/plugin-product-information-administration/package.json +++ b/webapp/packages/plugin-product-information-administration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-product-information-administration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-product-information-administration/src/LocaleService.ts b/webapp/packages/plugin-product-information-administration/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-product-information-administration/src/LocaleService.ts +++ b/webapp/packages/plugin-product-information-administration/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-product-information-administration/src/ProductInfoNavigationService.ts b/webapp/packages/plugin-product-information-administration/src/ProductInfoNavigationService.ts index e85ecb15e3..a6078dbe75 100644 --- a/webapp/packages/plugin-product-information-administration/src/ProductInfoNavigationService.ts +++ b/webapp/packages/plugin-product-information-administration/src/ProductInfoNavigationService.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { AdministrationScreenService, IRouteParams } from '@cloudbeaver/core-administration'; +import { AdministrationScreenService, type IRouteParams } from '@cloudbeaver/core-administration'; import { injectable } from '@cloudbeaver/core-di'; @injectable() diff --git a/webapp/packages/plugin-product-information-administration/src/ProductInfoPage.tsx b/webapp/packages/plugin-product-information-administration/src/ProductInfoPage.tsx index 168c25ccdd..ed3ad62ee6 100644 --- a/webapp/packages/plugin-product-information-administration/src/ProductInfoPage.tsx +++ b/webapp/packages/plugin-product-information-administration/src/ProductInfoPage.tsx @@ -7,13 +7,13 @@ */ import { observer } from 'mobx-react-lite'; -import { type AdministrationItemContentComponent, AdministrationItemContentProps } from '@cloudbeaver/core-administration'; -import { s, SContext, StyleRegistry, ToolsPanel, useS } from '@cloudbeaver/core-blocks'; +import { type AdministrationItemContentComponent, type AdministrationItemContentProps } from '@cloudbeaver/core-administration'; +import { s, SContext, type StyleRegistry, ToolsPanel, useS } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ITabData, TabList, TabPanelList, TabPanelStyles, TabsState, TabStyles, TabTitleStyles } from '@cloudbeaver/core-ui'; +import { type ITabData, TabList, TabPanelList, TabPanelStyles, TabsState, TabStyles, TabTitleStyles } from '@cloudbeaver/core-ui'; -import { ProductInfoNavigationService } from './ProductInfoNavigationService'; -import { ProductInfoService } from './ProductInfoService'; +import { ProductInfoNavigationService } from './ProductInfoNavigationService.js'; +import { ProductInfoService } from './ProductInfoService.js'; import style from './shared/ProductInfoPage.module.css'; import tabStyle from './shared/ProductInfoPageTab.module.css'; import tabPanelStyle from './shared/ProductInfoPageTabPanel.module.css'; diff --git a/webapp/packages/plugin-product-information-administration/src/ProductInfoService.ts b/webapp/packages/plugin-product-information-administration/src/ProductInfoService.ts index 631ac0a135..aae0ac6b75 100644 --- a/webapp/packages/plugin-product-information-administration/src/ProductInfoService.ts +++ b/webapp/packages/plugin-product-information-administration/src/ProductInfoService.ts @@ -6,18 +6,18 @@ * you may not use this file except in compliance with the License. */ import { - AdministrationItemContentProps, + type AdministrationItemContentProps, AdministrationItemService, AdministrationItemType, - IAdministrationItem, + type IAdministrationItem, } from '@cloudbeaver/core-administration'; import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { Dependency, injectable } from '@cloudbeaver/core-di'; import { ServerLicenseStatusResource } from '@cloudbeaver/core-root'; -import { ITabInfoOptions, TabsContainer } from '@cloudbeaver/core-ui'; +import { type ITabInfoOptions, TabsContainer } from '@cloudbeaver/core-ui'; -const ProductInfoDrawerItem = importLazyComponent(() => import('./ProductInfoDrawerItem').then(m => m.ProductInfoDrawerItem)); -const ProductInfoPage = importLazyComponent(() => import('./ProductInfoPage').then(m => m.ProductInfoPage)); +const ProductInfoDrawerItem = importLazyComponent(() => import('./ProductInfoDrawerItem.js').then(m => m.ProductInfoDrawerItem)); +const ProductInfoPage = importLazyComponent(() => import('./ProductInfoPage.js').then(m => m.ProductInfoPage)); @injectable() export class ProductInfoService extends Dependency { diff --git a/webapp/packages/plugin-product-information-administration/src/index.ts b/webapp/packages/plugin-product-information-administration/src/index.ts index 6841439df9..5836593b50 100644 --- a/webapp/packages/plugin-product-information-administration/src/index.ts +++ b/webapp/packages/plugin-product-information-administration/src/index.ts @@ -5,10 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { productInformationPlugin } from './manifest'; +import { productInformationPlugin } from './manifest.js'; -export * from './ProductInfoNavigationService'; -export * from './ProductInfoService'; +export * from './ProductInfoNavigationService.js'; +export * from './ProductInfoService.js'; export { productInformationPlugin }; export default productInformationPlugin; diff --git a/webapp/packages/plugin-product-information-administration/src/manifest.ts b/webapp/packages/plugin-product-information-administration/src/manifest.ts index 60b651ab38..70d420a477 100644 --- a/webapp/packages/plugin-product-information-administration/src/manifest.ts +++ b/webapp/packages/plugin-product-information-administration/src/manifest.ts @@ -10,8 +10,8 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const productInformationPlugin: PluginManifest = { info: { name: 'Product administration plugin' }, providers: [ - () => import('./ProductInfoService').then(m => m.ProductInfoService), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./ProductInfoNavigationService').then(m => m.ProductInfoNavigationService), + () => import('./ProductInfoService.js').then(m => m.ProductInfoService), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./ProductInfoNavigationService.js').then(m => m.ProductInfoNavigationService), ], }; diff --git a/webapp/packages/plugin-product/package.json b/webapp/packages/plugin-product/package.json index 6cb39bd397..0f37fd3048 100644 --- a/webapp/packages/plugin-product/package.json +++ b/webapp/packages/plugin-product/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-product", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-product/src/LocaleService.ts b/webapp/packages/plugin-product/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-product/src/LocaleService.ts +++ b/webapp/packages/plugin-product/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-product/src/ProductBootstrap.ts b/webapp/packages/plugin-product/src/ProductBootstrap.ts index 9c380ecc4c..085fbd341a 100644 --- a/webapp/packages/plugin-product/src/ProductBootstrap.ts +++ b/webapp/packages/plugin-product/src/ProductBootstrap.ts @@ -12,7 +12,7 @@ import { ProductInfoResource } from '@cloudbeaver/core-root'; import { MenuBaseItem, MenuService } from '@cloudbeaver/core-view'; import { TOP_NAV_BAR_SETTINGS_MENU } from '@cloudbeaver/plugin-settings-menu'; -const ProductInfoDialog = importLazyComponent(() => import('./ProductInfoDialog').then(m => m.ProductInfoDialog)); +const ProductInfoDialog = importLazyComponent(() => import('./ProductInfoDialog.js').then(m => m.ProductInfoDialog)); @injectable() export class ProductBootstrap extends Bootstrap { @@ -24,7 +24,7 @@ export class ProductBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.menuService.addCreator({ menus: [TOP_NAV_BAR_SETTINGS_MENU], isApplicable: () => !!this.productInfoResource.data, diff --git a/webapp/packages/plugin-product/src/index.ts b/webapp/packages/plugin-product/src/index.ts index edab3b0c68..69c9cfc9cc 100644 --- a/webapp/packages/plugin-product/src/index.ts +++ b/webapp/packages/plugin-product/src/index.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { productPlugin } from './manifest'; +import { productPlugin } from './manifest.js'; export { default as ProductInfoDialogStyles } from './ProductInfoDialog.module.css'; diff --git a/webapp/packages/plugin-product/src/manifest.ts b/webapp/packages/plugin-product/src/manifest.ts index 98ed0acf1d..4acf7dc8e6 100644 --- a/webapp/packages/plugin-product/src/manifest.ts +++ b/webapp/packages/plugin-product/src/manifest.ts @@ -9,5 +9,5 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const productPlugin: PluginManifest = { info: { name: 'Product plugin' }, - providers: [() => import('./ProductBootstrap').then(m => m.ProductBootstrap), () => import('./LocaleService').then(m => m.LocaleService)], + providers: [() => import('./ProductBootstrap.js').then(m => m.ProductBootstrap), () => import('./LocaleService.js').then(m => m.LocaleService)], }; diff --git a/webapp/packages/plugin-projects/package.json b/webapp/packages/plugin-projects/package.json index 38169e13c1..443c221e13 100644 --- a/webapp/packages/plugin-projects/package.json +++ b/webapp/packages/plugin-projects/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-projects", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-projects/src/FolderDialog.tsx b/webapp/packages/plugin-projects/src/FolderDialog.tsx index 14dd162f07..37555527fe 100644 --- a/webapp/packages/plugin-projects/src/FolderDialog.tsx +++ b/webapp/packages/plugin-projects/src/FolderDialog.tsx @@ -28,11 +28,11 @@ import { useTranslate, } from '@cloudbeaver/core-blocks'; import type { DialogComponent } from '@cloudbeaver/core-dialogs'; -import { ProjectInfo, ProjectInfoResource } from '@cloudbeaver/core-projects'; +import { type ProjectInfo, ProjectInfoResource } from '@cloudbeaver/core-projects'; import { createPath, throttleAsync } from '@cloudbeaver/core-utils'; import style from './FolderDialog.module.css'; -import { ProjectSelect } from './ProjectSelect'; +import { ProjectSelect } from './ProjectSelect.js'; interface IFolderDialogState { value: string; diff --git a/webapp/packages/plugin-projects/src/LocaleService.ts b/webapp/packages/plugin-projects/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-projects/src/LocaleService.ts +++ b/webapp/packages/plugin-projects/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-projects/src/PluginBootstrap.ts b/webapp/packages/plugin-projects/src/PluginBootstrap.ts index 408f8333b6..ef431c04be 100644 --- a/webapp/packages/plugin-projects/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-projects/src/PluginBootstrap.ts @@ -13,7 +13,5 @@ export class PluginBootstrap extends Bootstrap { super(); } - async load(): Promise {} - - register(): void {} + override async load(): Promise {} } diff --git a/webapp/packages/plugin-projects/src/ProjectSelect.tsx b/webapp/packages/plugin-projects/src/ProjectSelect.tsx index d3d3ad5461..772deeb77e 100644 --- a/webapp/packages/plugin-projects/src/ProjectSelect.tsx +++ b/webapp/packages/plugin-projects/src/ProjectSelect.tsx @@ -9,7 +9,7 @@ import { observer } from 'mobx-react-lite'; import { Combobox, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ProjectInfo, ProjectInfoResource, projectInfoSortByName, ProjectsService } from '@cloudbeaver/core-projects'; +import { type ProjectInfo, ProjectInfoResource, projectInfoSortByName, ProjectsService } from '@cloudbeaver/core-projects'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; interface Props { @@ -44,7 +44,7 @@ export const ProjectSelect = observer(function ProjectSelect({ const projectsLoader = useResource(ProjectSelect, ProjectInfoResource, CachedMapAllKey, { onData: () => { if ((!value && possibleOptions.length > 0) || (value && !possibleOptions.includes(value))) { - onChange(possibleOptions[0]); + onChange(possibleOptions[0]!); } }, }); diff --git a/webapp/packages/plugin-projects/src/index.ts b/webapp/packages/plugin-projects/src/index.ts index 687285f5c1..749008126c 100644 --- a/webapp/packages/plugin-projects/src/index.ts +++ b/webapp/packages/plugin-projects/src/index.ts @@ -1,6 +1,13 @@ -import { manifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { manifest } from './manifest.js'; -export * from './FolderDialog'; -export * from './ProjectSelect'; +export * from './FolderDialog.js'; +export * from './ProjectSelect.js'; export default manifest; diff --git a/webapp/packages/plugin-projects/src/manifest.ts b/webapp/packages/plugin-projects/src/manifest.ts index 594fc0cdcf..8129c5bb00 100644 --- a/webapp/packages/plugin-projects/src/manifest.ts +++ b/webapp/packages/plugin-projects/src/manifest.ts @@ -12,5 +12,5 @@ export const manifest: PluginManifest = { name: 'Projects plugin', }, - providers: [() => import('./PluginBootstrap').then(m => m.PluginBootstrap), () => import('./LocaleService').then(m => m.LocaleService)], + providers: [() => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), () => import('./LocaleService.js').then(m => m.LocaleService)], }; diff --git a/webapp/packages/plugin-react-data-grid/package.json b/webapp/packages/plugin-react-data-grid/package.json index 8ac4b0139a..766eb81468 100644 --- a/webapp/packages/plugin-react-data-grid/package.json +++ b/webapp/packages/plugin-react-data-grid/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-react-data-grid", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-resource-manager-administration/package.json b/webapp/packages/plugin-resource-manager-administration/package.json index f5a2f1245e..2b8bfb98e8 100644 --- a/webapp/packages/plugin-resource-manager-administration/package.json +++ b/webapp/packages/plugin-resource-manager-administration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-resource-manager-administration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-resource-manager-administration/src/LocaleService.ts b/webapp/packages/plugin-resource-manager-administration/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-resource-manager-administration/src/LocaleService.ts +++ b/webapp/packages/plugin-resource-manager-administration/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-resource-manager-administration/src/PluginBootstrap.ts b/webapp/packages/plugin-resource-manager-administration/src/PluginBootstrap.ts index 02c53617db..9a404a757f 100644 --- a/webapp/packages/plugin-resource-manager-administration/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-resource-manager-administration/src/PluginBootstrap.ts @@ -7,11 +7,11 @@ */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { ExecutorInterrupter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; +import { ExecutorInterrupter, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { ServerConfigResource } from '@cloudbeaver/core-root'; -import { ILoadConfigData, ServerConfigurationService } from '@cloudbeaver/plugin-administration'; +import { type ILoadConfigData, ServerConfigurationService } from '@cloudbeaver/plugin-administration'; -import { ResourceManagerSettings } from './ResourceManagerSettings'; +import { ResourceManagerSettings } from './ResourceManagerSettings.js'; @injectable() export class PluginBootstrap extends Bootstrap { @@ -25,12 +25,12 @@ export class PluginBootstrap extends Bootstrap { this.loadConfigHandler = this.loadConfigHandler.bind(this); } - register(): void | Promise { + override register(): void | Promise { this.serverConfigurationService.pluginsContainer.add(ResourceManagerSettings, 0); this.serverConfigurationService.loadConfigTask.addHandler(this.loadConfigHandler); } - async load(): Promise {} + override async load(): Promise {} private async loadConfigHandler(data: ILoadConfigData, contexts: IExecutionContextProvider) { if (!data.reset) { diff --git a/webapp/packages/plugin-resource-manager-administration/src/ResourceManagerSettings.tsx b/webapp/packages/plugin-resource-manager-administration/src/ResourceManagerSettings.tsx index f7e1ce3f5e..5a8a464636 100644 --- a/webapp/packages/plugin-resource-manager-administration/src/ResourceManagerSettings.tsx +++ b/webapp/packages/plugin-resource-manager-administration/src/ResourceManagerSettings.tsx @@ -7,7 +7,7 @@ */ import { observer } from 'mobx-react-lite'; -import { GroupTitle, PlaceholderComponent, Switch, useTranslate } from '@cloudbeaver/core-blocks'; +import { GroupTitle, type PlaceholderComponent, Switch, useTranslate } from '@cloudbeaver/core-blocks'; import type { IConfigurationPlaceholderProps } from '@cloudbeaver/plugin-administration'; export const ResourceManagerSettings: PlaceholderComponent = observer(function ResourceManagerSettings({ state }) { diff --git a/webapp/packages/plugin-resource-manager-administration/src/index.ts b/webapp/packages/plugin-resource-manager-administration/src/index.ts index 12718f52dc..7b8fd0c760 100644 --- a/webapp/packages/plugin-resource-manager-administration/src/index.ts +++ b/webapp/packages/plugin-resource-manager-administration/src/index.ts @@ -1,3 +1,10 @@ -import { resourceManagerAdministrationPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { resourceManagerAdministrationPlugin } from './manifest.js'; export default resourceManagerAdministrationPlugin; diff --git a/webapp/packages/plugin-resource-manager-administration/src/manifest.ts b/webapp/packages/plugin-resource-manager-administration/src/manifest.ts index 7b6c9a33a0..6eafbb8300 100644 --- a/webapp/packages/plugin-resource-manager-administration/src/manifest.ts +++ b/webapp/packages/plugin-resource-manager-administration/src/manifest.ts @@ -9,5 +9,5 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const resourceManagerAdministrationPlugin: PluginManifest = { info: { name: 'Resource manager administration plugin' }, - providers: [() => import('./PluginBootstrap').then(m => m.PluginBootstrap), () => import('./LocaleService').then(m => m.LocaleService)], + providers: [() => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), () => import('./LocaleService.js').then(m => m.LocaleService)], }; diff --git a/webapp/packages/plugin-resource-manager-scripts/package.json b/webapp/packages/plugin-resource-manager-scripts/package.json index 7290d1f8c4..a6879adfc2 100644 --- a/webapp/packages/plugin-resource-manager-scripts/package.json +++ b/webapp/packages/plugin-resource-manager-scripts/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-resource-manager-scripts", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-resource-manager-scripts/src/LocaleService.ts b/webapp/packages/plugin-resource-manager-scripts/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/LocaleService.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-resource-manager-scripts/src/PluginBootstrap.ts b/webapp/packages/plugin-resource-manager-scripts/src/PluginBootstrap.ts index 3505895f84..3f27ceb767 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/PluginBootstrap.ts @@ -13,10 +13,10 @@ import { SideBarPanelService } from '@cloudbeaver/core-ui'; import { ActionService, menuExtractItems, MenuService } from '@cloudbeaver/core-view'; import { MENU_TOOLS } from '@cloudbeaver/plugin-tools-panel'; -import { ACTION_RESOURCE_MANAGER_SCRIPTS } from './Actions/ACTION_RESOURCE_MANAGER_SCRIPTS'; -import { ResourceManagerScriptsService } from './ResourceManagerScriptsService'; +import { ACTION_RESOURCE_MANAGER_SCRIPTS } from './Actions/ACTION_RESOURCE_MANAGER_SCRIPTS.js'; +import { ResourceManagerScriptsService } from './ResourceManagerScriptsService.js'; -const ResourceManagerScripts = importLazyComponent(() => import('./ResourceManagerScripts').then(m => m.ResourceManagerScripts)); +const ResourceManagerScripts = importLazyComponent(() => import('./ResourceManagerScripts.js').then(m => m.ResourceManagerScripts)); @injectable() export class PluginBootstrap extends Bootstrap { @@ -30,7 +30,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.registerMenu(); this.sideBarPanelService.tabsContainer.add({ key: 'resource-manager-scripts-tab', diff --git a/webapp/packages/plugin-resource-manager-scripts/src/ResourceManagerScripts.tsx b/webapp/packages/plugin-resource-manager-scripts/src/ResourceManagerScripts.tsx index 6e1d4c17e9..72d05d122d 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/ResourceManagerScripts.tsx +++ b/webapp/packages/plugin-resource-manager-scripts/src/ResourceManagerScripts.tsx @@ -11,7 +11,7 @@ import { Flex, useTranslate } from '@cloudbeaver/core-blocks'; import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui'; import { ResourceManagerTree } from '@cloudbeaver/plugin-navigation-tree-rm'; -import { SCRIPTS_TYPE_ID } from './SCRIPTS_TYPE_ID'; +import { SCRIPTS_TYPE_ID } from './SCRIPTS_TYPE_ID.js'; export const ResourceManagerScripts: TabContainerPanelComponent = observer(function ResourceManagerScripts() { const translate = useTranslate(); diff --git a/webapp/packages/plugin-resource-manager-scripts/src/ResourceManagerScriptsService.ts b/webapp/packages/plugin-resource-manager-scripts/src/ResourceManagerScriptsService.ts index 35464bc8b9..9697e256fb 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/ResourceManagerScriptsService.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/ResourceManagerScriptsService.ts @@ -8,15 +8,15 @@ import { computed, makeObservable } from 'mobx'; import { UserDataService } from '@cloudbeaver/core-authentication'; -import { IConnectionExecutionContextInfo, NOT_INITIALIZED_CONTEXT_ID } from '@cloudbeaver/core-connections'; +import { type IConnectionExecutionContextInfo, NOT_INITIALIZED_CONTEXT_ID } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import type { ProjectInfo } from '@cloudbeaver/core-projects'; import { getRmResourceKey, ResourceManagerResource } from '@cloudbeaver/core-resource-manager'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import { ResourceManagerService } from '@cloudbeaver/plugin-resource-manager'; -import { ResourceManagerScriptsSettingsService } from './ResourceManagerScriptsSettingsService'; -import { SCRIPTS_TYPE_ID } from './SCRIPTS_TYPE_ID'; +import { ResourceManagerScriptsSettingsService } from './ResourceManagerScriptsSettingsService.js'; +import { SCRIPTS_TYPE_ID } from './SCRIPTS_TYPE_ID.js'; const queryResourceManagerScriptsSettingsKey = 'resource-manager-scripts'; diff --git a/webapp/packages/plugin-resource-manager-scripts/src/index.ts b/webapp/packages/plugin-resource-manager-scripts/src/index.ts index e23fc71f49..8b4bfb2d6f 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/index.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/index.ts @@ -1,8 +1,15 @@ -import { resourceManagerScriptsPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { resourceManagerScriptsPlugin } from './manifest.js'; export default resourceManagerScriptsPlugin; -export * from './ResourceManagerScriptsService'; -export * from './SaveScriptDialog'; -export * from './SCRIPTS_TYPE_ID'; -export * from './ResourceManagerScriptsSettingsService'; +export * from './ResourceManagerScriptsService.js'; +export * from './SaveScriptDialog.js'; +export * from './SCRIPTS_TYPE_ID.js'; +export * from './ResourceManagerScriptsSettingsService.js'; diff --git a/webapp/packages/plugin-resource-manager-scripts/src/manifest.ts b/webapp/packages/plugin-resource-manager-scripts/src/manifest.ts index 8ca4df9515..fd0c2db4ed 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/manifest.ts +++ b/webapp/packages/plugin-resource-manager-scripts/src/manifest.ts @@ -10,9 +10,9 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const resourceManagerScriptsPlugin: PluginManifest = { info: { name: 'Resource manager scripts plugin' }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./ResourceManagerScriptsService').then(m => m.ResourceManagerScriptsService), - () => import('./ResourceManagerScriptsSettingsService').then(m => m.ResourceManagerScriptsSettingsService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./ResourceManagerScriptsService.js').then(m => m.ResourceManagerScriptsService), + () => import('./ResourceManagerScriptsSettingsService.js').then(m => m.ResourceManagerScriptsSettingsService), ], }; diff --git a/webapp/packages/plugin-resource-manager/package.json b/webapp/packages/plugin-resource-manager/package.json index 1ada50293c..6871e7274a 100644 --- a/webapp/packages/plugin-resource-manager/package.json +++ b/webapp/packages/plugin-resource-manager/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-resource-manager", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", @@ -42,4 +43,4 @@ "@testing-library/jest-dom": "^6", "typescript": "^5" } -} \ No newline at end of file +} diff --git a/webapp/packages/plugin-resource-manager/src/LocaleService.ts b/webapp/packages/plugin-resource-manager/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-resource-manager/src/LocaleService.ts +++ b/webapp/packages/plugin-resource-manager/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-resource-manager/src/PluginBootstrap.ts b/webapp/packages/plugin-resource-manager/src/PluginBootstrap.ts index ade093ea7d..ef431c04be 100644 --- a/webapp/packages/plugin-resource-manager/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-resource-manager/src/PluginBootstrap.ts @@ -13,7 +13,5 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void | Promise {} - - async load(): Promise {} + override async load(): Promise {} } diff --git a/webapp/packages/plugin-resource-manager/src/ResourceManagerSettingsService.test.ts b/webapp/packages/plugin-resource-manager/src/ResourceManagerSettingsService.test.ts index 5007c8cbbd..d6e8280d75 100644 --- a/webapp/packages/plugin-resource-manager/src/ResourceManagerSettingsService.test.ts +++ b/webapp/packages/plugin-resource-manager/src/ResourceManagerSettingsService.test.ts @@ -10,21 +10,21 @@ import { expect, test } from '@jest/globals'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { createApp } from '@cloudbeaver/tests-runner'; -import { resourceManagerPlugin } from './manifest'; -import { ResourceManagerSettingsService } from './ResourceManagerSettingsService'; +import { resourceManagerPlugin } from './manifest.js'; +import { ResourceManagerSettingsService } from './ResourceManagerSettingsService.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint)); diff --git a/webapp/packages/plugin-resource-manager/src/ResourceProjectsResource.ts b/webapp/packages/plugin-resource-manager/src/ResourceProjectsResource.ts index 29ddc396b5..4d8eda0729 100644 --- a/webapp/packages/plugin-resource-manager/src/ResourceProjectsResource.ts +++ b/webapp/packages/plugin-resource-manager/src/ResourceProjectsResource.ts @@ -9,7 +9,7 @@ import { UserInfoResource } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; import { SharedProjectsResource } from '@cloudbeaver/core-resource-manager'; -import { GraphQLService, RmProject } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type RmProject } from '@cloudbeaver/core-sdk'; export type Project = Omit; diff --git a/webapp/packages/plugin-resource-manager/src/index.ts b/webapp/packages/plugin-resource-manager/src/index.ts index e339c1810b..dfeae6dd24 100644 --- a/webapp/packages/plugin-resource-manager/src/index.ts +++ b/webapp/packages/plugin-resource-manager/src/index.ts @@ -1,7 +1,14 @@ -import { resourceManagerPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { resourceManagerPlugin } from './manifest.js'; export default resourceManagerPlugin; -export * from './ResourceManagerSettingsService'; -export * from './RESOURCE_NAME_REGEX'; -export * from './ResourceManagerService'; +export * from './ResourceManagerSettingsService.js'; +export * from './RESOURCE_NAME_REGEX.js'; +export * from './ResourceManagerService.js'; diff --git a/webapp/packages/plugin-resource-manager/src/manifest.ts b/webapp/packages/plugin-resource-manager/src/manifest.ts index 30f9f26b07..c18b6d132a 100644 --- a/webapp/packages/plugin-resource-manager/src/manifest.ts +++ b/webapp/packages/plugin-resource-manager/src/manifest.ts @@ -11,10 +11,10 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const resourceManagerPlugin: PluginManifest = { info: { name: 'Resource manager plugin' }, providers: [ - () => import('./ResourceManagerSettingsService').then(m => m.ResourceManagerSettingsService), - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./ResourceManagerService').then(m => m.ResourceManagerService), - // () => import('./ResourceProjectsResource').then(m => m.ResourceProjectsResource), + () => import('./ResourceManagerSettingsService.js').then(m => m.ResourceManagerSettingsService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./ResourceManagerService.js').then(m => m.ResourceManagerService), + // () => import('./ResourceProjectsResource.js').then(m => m.ResourceProjectsResource), ], }; diff --git a/webapp/packages/plugin-root/package.json b/webapp/packages/plugin-root/package.json index e4744fbd8d..8738dfdcfb 100644 --- a/webapp/packages/plugin-root/package.json +++ b/webapp/packages/plugin-root/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-root", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationNotification.tsx b/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationNotification.tsx index 3d8f524099..b8f149c8d9 100644 --- a/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationNotification.tsx +++ b/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationNotification.tsx @@ -19,12 +19,12 @@ import { useTranslate, } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ENotificationType, NotificationComponentProps } from '@cloudbeaver/core-events'; +import { ENotificationType, type NotificationComponentProps } from '@cloudbeaver/core-events'; import { DataSynchronizationService } from '@cloudbeaver/core-root'; import { groupBy, objectValues } from '@cloudbeaver/core-utils'; import styles from './DataSynchronizationNotification.module.css'; -import { DataSynchronizationNotificationMessages } from './DataSynchronizationNotificationMessages'; +import { DataSynchronizationNotificationMessages } from './DataSynchronizationNotificationMessages.js'; export const DataSynchronizationNotification = observer(function DataSynchronizationNotification({ notification }) { const dataSynchronizationService = useService(DataSynchronizationService); diff --git a/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationNotificationMessages.tsx b/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationNotificationMessages.tsx index 049b09e2de..e73b4e4082 100644 --- a/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationNotificationMessages.tsx +++ b/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationNotificationMessages.tsx @@ -24,7 +24,7 @@ export const DataSynchronizationNotificationMessages = observer +
{message}
); diff --git a/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationResolverBootstrap.ts b/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationResolverBootstrap.ts index 7745f24f8d..69957ef6f8 100644 --- a/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationResolverBootstrap.ts +++ b/webapp/packages/plugin-root/src/DataSynchronization/DataSynchronizationResolverBootstrap.ts @@ -6,10 +6,10 @@ * you may not use this file except in compliance with the License. */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { ENotificationType, INotification, NotificationService } from '@cloudbeaver/core-events'; +import { ENotificationType, type INotification, NotificationService } from '@cloudbeaver/core-events'; import { DataSynchronizationService, ServerConfigResource } from '@cloudbeaver/core-root'; -import { DataSynchronizationNotification } from './DataSynchronizationNotification'; +import { DataSynchronizationNotification } from './DataSynchronizationNotification.js'; @injectable() export class DataSynchronizationResolverBootstrap extends Bootstrap { @@ -24,12 +24,10 @@ export class DataSynchronizationResolverBootstrap extends Bootstrap { this.activeNotification = null; } - register(): void { + override register(): void { this.dataSynchronizationService.onSynchronizationRequest.addHandler(this.handleNetworkStateChange.bind(this)); } - load(): void | Promise {} - private handleNetworkStateChange(): void { if (this.activeNotification || this.serverConfigResource.configurationMode) { return; diff --git a/webapp/packages/plugin-root/src/LocaleService.ts b/webapp/packages/plugin-root/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-root/src/LocaleService.ts +++ b/webapp/packages/plugin-root/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-root/src/NetworkStateNotification/NetworkStateNotificationService.ts b/webapp/packages/plugin-root/src/NetworkStateNotification/NetworkStateNotificationService.ts index 00d2c11a26..7ef918d343 100644 --- a/webapp/packages/plugin-root/src/NetworkStateNotification/NetworkStateNotificationService.ts +++ b/webapp/packages/plugin-root/src/NetworkStateNotification/NetworkStateNotificationService.ts @@ -6,24 +6,25 @@ * you may not use this file except in compliance with the License. */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { INotification, NotificationService } from '@cloudbeaver/core-events'; +import { type INotification, NotificationService } from '@cloudbeaver/core-events'; import { NetworkStateService } from '@cloudbeaver/core-root'; @injectable() export class NetworkStateNotificationService extends Bootstrap { private activeNotification: INotification | null; - constructor(private readonly notificationService: NotificationService, private readonly networkStateService: NetworkStateService) { + constructor( + private readonly notificationService: NotificationService, + private readonly networkStateService: NetworkStateService, + ) { super(); this.activeNotification = null; } - register(): void { + override register(): void { this.networkStateService.networkStateExecutor.addHandler(this.handleNetworkStateChange.bind(this)); } - load(): void | Promise {} - private handleNetworkStateChange(state: boolean): void { if (!state) { if (this.activeNotification) { diff --git a/webapp/packages/plugin-root/src/PluginBootstrap.ts b/webapp/packages/plugin-root/src/PluginBootstrap.ts index 949ba2fe1a..09687f9836 100644 --- a/webapp/packages/plugin-root/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-root/src/PluginBootstrap.ts @@ -12,8 +12,4 @@ export class PluginBootstrap extends Bootstrap { constructor() { super(); } - - register(): void | Promise {} - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-root/src/ServerNodeChangedDialog/ServerNodeChangedDialogService.ts b/webapp/packages/plugin-root/src/ServerNodeChangedDialog/ServerNodeChangedDialogService.ts index 68ec83a3f2..6cdc81699e 100644 --- a/webapp/packages/plugin-root/src/ServerNodeChangedDialog/ServerNodeChangedDialogService.ts +++ b/webapp/packages/plugin-root/src/ServerNodeChangedDialog/ServerNodeChangedDialogService.ts @@ -12,7 +12,7 @@ import { ENotificationType, NotificationService } from '@cloudbeaver/core-events import { ServerNodeService } from '@cloudbeaver/core-root'; import { RouterService } from '@cloudbeaver/core-routing'; -import { ServerNodeChangedDialog } from './ServerNodeChangedDialog'; +import { ServerNodeChangedDialog } from './ServerNodeChangedDialog.js'; @injectable() export class ServerNodeChangedDialogService extends Bootstrap { @@ -25,12 +25,10 @@ export class ServerNodeChangedDialogService extends Bootstrap { super(); } - register(): void { + override register(): void { this.serverNodeService.onApplicationRunIdChange.addPostHandler(this.handleServerNodeChanged.bind(this)); } - load(): void | Promise {} - private async handleServerNodeChanged(): Promise { const state = await this.commonDialogService.open(ServerNodeChangedDialog, null); diff --git a/webapp/packages/plugin-root/src/index.ts b/webapp/packages/plugin-root/src/index.ts index ca6138db41..264a462215 100644 --- a/webapp/packages/plugin-root/src/index.ts +++ b/webapp/packages/plugin-root/src/index.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { rootPlugin } from './manifest'; +import { rootPlugin } from './manifest.js'; export { default as ServerNodeChangedDialogStyles } from './ServerNodeChangedDialog/ServerNodeChangedDialog.module.css'; diff --git a/webapp/packages/plugin-root/src/manifest.ts b/webapp/packages/plugin-root/src/manifest.ts index 28ed5bfbd5..e8c731acc1 100644 --- a/webapp/packages/plugin-root/src/manifest.ts +++ b/webapp/packages/plugin-root/src/manifest.ts @@ -10,10 +10,10 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const rootPlugin: PluginManifest = { info: { name: 'Root plugin' }, providers: [ - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./ServerNodeChangedDialog/ServerNodeChangedDialogService').then(m => m.ServerNodeChangedDialogService), - () => import('./NetworkStateNotification/NetworkStateNotificationService').then(m => m.NetworkStateNotificationService), - () => import('./DataSynchronization/DataSynchronizationResolverBootstrap').then(m => m.DataSynchronizationResolverBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./ServerNodeChangedDialog/ServerNodeChangedDialogService.js').then(m => m.ServerNodeChangedDialogService), + () => import('./NetworkStateNotification/NetworkStateNotificationService.js').then(m => m.NetworkStateNotificationService), + () => import('./DataSynchronization/DataSynchronizationResolverBootstrap.js').then(m => m.DataSynchronizationResolverBootstrap), ], }; diff --git a/webapp/packages/plugin-session-expiration/package.json b/webapp/packages/plugin-session-expiration/package.json index 84c384df7f..61dc28544e 100644 --- a/webapp/packages/plugin-session-expiration/package.json +++ b/webapp/packages/plugin-session-expiration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-session-expiration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-session-expiration/src/LocaleService.ts b/webapp/packages/plugin-session-expiration/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-session-expiration/src/LocaleService.ts +++ b/webapp/packages/plugin-session-expiration/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-session-expiration/src/PluginBootstrap.ts b/webapp/packages/plugin-session-expiration/src/PluginBootstrap.ts index 949ba2fe1a..09687f9836 100644 --- a/webapp/packages/plugin-session-expiration/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-session-expiration/src/PluginBootstrap.ts @@ -12,8 +12,4 @@ export class PluginBootstrap extends Bootstrap { constructor() { super(); } - - register(): void | Promise {} - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-session-expiration/src/SessionExpireDialog/SessionExpiredDialogBootstrap.ts b/webapp/packages/plugin-session-expiration/src/SessionExpireDialog/SessionExpiredDialogBootstrap.ts index 83bf5b3f95..4eab4b79ad 100644 --- a/webapp/packages/plugin-session-expiration/src/SessionExpireDialog/SessionExpiredDialogBootstrap.ts +++ b/webapp/packages/plugin-session-expiration/src/SessionExpireDialog/SessionExpiredDialogBootstrap.ts @@ -12,7 +12,7 @@ import { ENotificationType, NotificationService } from '@cloudbeaver/core-events import { SessionExpireService } from '@cloudbeaver/core-root'; import { RouterService } from '@cloudbeaver/core-routing'; -import { SessionExpiredDialog } from './SessionExpiredDialog'; +import { SessionExpiredDialog } from './SessionExpiredDialog.js'; @injectable() export class SessionExpiredDialogBootstrap extends Bootstrap { @@ -25,12 +25,10 @@ export class SessionExpiredDialogBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.sessionExpireService.onSessionExpire.addPostHandler(this.handleSessionExpired.bind(this)); } - load(): void | Promise {} - private async handleSessionExpired(): Promise { const state = await this.commonDialogService.open(SessionExpiredDialog, null); diff --git a/webapp/packages/plugin-session-expiration/src/SessionExpireWarningDialog/SessionExpireWarningDialogBootstrap.ts b/webapp/packages/plugin-session-expiration/src/SessionExpireWarningDialog/SessionExpireWarningDialogBootstrap.ts index 06ec2a584a..9b89ac637b 100644 --- a/webapp/packages/plugin-session-expiration/src/SessionExpireWarningDialog/SessionExpireWarningDialogBootstrap.ts +++ b/webapp/packages/plugin-session-expiration/src/SessionExpireWarningDialog/SessionExpireWarningDialogBootstrap.ts @@ -12,7 +12,7 @@ import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dial import { ServerConfigResource, SESSION_EXPIRE_MIN_TIME, SessionExpireService, SessionResource } from '@cloudbeaver/core-root'; import { GraphQLService } from '@cloudbeaver/core-sdk'; -const SessionExpireWarningDialog = importLazyComponent(() => import('./SessionExpireWarningDialog').then(m => m.SessionExpireWarningDialog)); +const SessionExpireWarningDialog = importLazyComponent(() => import('./SessionExpireWarningDialog.js').then(m => m.SessionExpireWarningDialog)); @injectable() export class SessionExpireWarningDialogBootstrap extends Bootstrap { private dialogInternalPromise: Promise | null; @@ -28,7 +28,7 @@ export class SessionExpireWarningDialogBootstrap extends Bootstrap { this.dialogInternalPromise = null; } - register(): void { + override register(): void { this.sessionExpireService.onSessionExpire.addHandler(this.close.bind(this)); this.sessionResource.onDataUpdate.addHandler(() => { const { valid, remainingTime } = this.sessionResource.data || {}; @@ -37,8 +37,6 @@ export class SessionExpireWarningDialogBootstrap extends Bootstrap { }); } - load(): void {} - private handleSessionResourceDataUpdate(isValid?: boolean, remainingTime?: number) { if (!this.serverConfigResource.anonymousAccessEnabled && !this.userInfoResource.data && !this.serverConfigResource.configurationMode) { return; diff --git a/webapp/packages/plugin-session-expiration/src/index.ts b/webapp/packages/plugin-session-expiration/src/index.ts index eeefbcb351..05fbc39654 100644 --- a/webapp/packages/plugin-session-expiration/src/index.ts +++ b/webapp/packages/plugin-session-expiration/src/index.ts @@ -1,4 +1,11 @@ -import { sessionExpirationPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { sessionExpirationPlugin } from './manifest.js'; export { sessionExpirationPlugin }; export default sessionExpirationPlugin; diff --git a/webapp/packages/plugin-session-expiration/src/manifest.ts b/webapp/packages/plugin-session-expiration/src/manifest.ts index ef3b4a1d63..90b4af736e 100644 --- a/webapp/packages/plugin-session-expiration/src/manifest.ts +++ b/webapp/packages/plugin-session-expiration/src/manifest.ts @@ -10,9 +10,9 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const sessionExpirationPlugin: PluginManifest = { info: { name: 'Session Expiration plugin' }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./SessionExpireDialog/SessionExpiredDialogBootstrap').then(m => m.SessionExpiredDialogBootstrap), - () => import('./SessionExpireWarningDialog/SessionExpireWarningDialogBootstrap').then(m => m.SessionExpireWarningDialogBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./SessionExpireDialog/SessionExpiredDialogBootstrap.js').then(m => m.SessionExpiredDialogBootstrap), + () => import('./SessionExpireWarningDialog/SessionExpireWarningDialogBootstrap.js').then(m => m.SessionExpireWarningDialogBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-settings-administration/package.json b/webapp/packages/plugin-settings-administration/package.json index cd029504b5..0a21583d06 100644 --- a/webapp/packages/plugin-settings-administration/package.json +++ b/webapp/packages/plugin-settings-administration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-settings-administration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-settings-administration/src/LocaleService.ts b/webapp/packages/plugin-settings-administration/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-settings-administration/src/LocaleService.ts +++ b/webapp/packages/plugin-settings-administration/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-settings-administration/src/SettingsAdministrationPluginBootstrap.ts b/webapp/packages/plugin-settings-administration/src/SettingsAdministrationPluginBootstrap.ts index 440729a212..e34f6dbc6b 100644 --- a/webapp/packages/plugin-settings-administration/src/SettingsAdministrationPluginBootstrap.ts +++ b/webapp/packages/plugin-settings-administration/src/SettingsAdministrationPluginBootstrap.ts @@ -9,8 +9,8 @@ import { AdministrationItemService, AdministrationItemType } from '@cloudbeaver/ import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -const SettingsAdministration = importLazyComponent(() => import('./SettingsAdministration').then(module => module.SettingsAdministration)); -const SettingsDrawerItem = importLazyComponent(() => import('./SettingsDrawerItem').then(module => module.SettingsDrawerItem)); +const SettingsAdministration = importLazyComponent(() => import('./SettingsAdministration.js').then(module => module.SettingsAdministration)); +const SettingsDrawerItem = importLazyComponent(() => import('./SettingsDrawerItem.js').then(module => module.SettingsDrawerItem)); @injectable() export class SettingsAdministrationPluginBootstrap extends Bootstrap { @@ -18,7 +18,7 @@ export class SettingsAdministrationPluginBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.administrationItemService.create({ name: 'settings', type: AdministrationItemType.Administration, @@ -27,6 +27,4 @@ export class SettingsAdministrationPluginBootstrap extends Bootstrap { getDrawerComponent: () => SettingsDrawerItem, }); } - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-settings-administration/src/index.ts b/webapp/packages/plugin-settings-administration/src/index.ts index 1e93b345e2..29adc125a5 100644 --- a/webapp/packages/plugin-settings-administration/src/index.ts +++ b/webapp/packages/plugin-settings-administration/src/index.ts @@ -1,4 +1,11 @@ -import { settingsAdministrationPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { settingsAdministrationPlugin } from './manifest.js'; export { settingsAdministrationPlugin }; export default settingsAdministrationPlugin; diff --git a/webapp/packages/plugin-settings-administration/src/manifest.ts b/webapp/packages/plugin-settings-administration/src/manifest.ts index f5a0129988..ddc611570c 100644 --- a/webapp/packages/plugin-settings-administration/src/manifest.ts +++ b/webapp/packages/plugin-settings-administration/src/manifest.ts @@ -10,7 +10,7 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const settingsAdministrationPlugin: PluginManifest = { info: { name: 'Settings Administration plugin' }, providers: [ - () => import('./SettingsAdministrationPluginBootstrap').then(m => m.SettingsAdministrationPluginBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./SettingsAdministrationPluginBootstrap.js').then(m => m.SettingsAdministrationPluginBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-settings-menu-administration/package.json b/webapp/packages/plugin-settings-menu-administration/package.json index c4bf3d6ba7..a8133fe6b1 100644 --- a/webapp/packages/plugin-settings-menu-administration/package.json +++ b/webapp/packages/plugin-settings-menu-administration/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-settings-menu-administration", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-settings-menu-administration/src/PluginBootstrap.ts b/webapp/packages/plugin-settings-menu-administration/src/PluginBootstrap.ts index 949ba2fe1a..09687f9836 100644 --- a/webapp/packages/plugin-settings-menu-administration/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-settings-menu-administration/src/PluginBootstrap.ts @@ -12,8 +12,4 @@ export class PluginBootstrap extends Bootstrap { constructor() { super(); } - - register(): void | Promise {} - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-settings-menu-administration/src/index.ts b/webapp/packages/plugin-settings-menu-administration/src/index.ts index 6a5654f12e..360a07219e 100644 --- a/webapp/packages/plugin-settings-menu-administration/src/index.ts +++ b/webapp/packages/plugin-settings-menu-administration/src/index.ts @@ -1,3 +1,10 @@ -import { settingsMenuAdministrationPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { settingsMenuAdministrationPlugin } from './manifest.js'; export default settingsMenuAdministrationPlugin; diff --git a/webapp/packages/plugin-settings-menu-administration/src/manifest.ts b/webapp/packages/plugin-settings-menu-administration/src/manifest.ts index e47dd1d327..956b978988 100644 --- a/webapp/packages/plugin-settings-menu-administration/src/manifest.ts +++ b/webapp/packages/plugin-settings-menu-administration/src/manifest.ts @@ -9,5 +9,5 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const settingsMenuAdministrationPlugin: PluginManifest = { info: { name: 'Settings menu administration plugin' }, - providers: [() => import('./PluginBootstrap').then(m => m.PluginBootstrap)], + providers: [() => import('./PluginBootstrap.js').then(m => m.PluginBootstrap)], }; diff --git a/webapp/packages/plugin-settings-menu/package.json b/webapp/packages/plugin-settings-menu/package.json index 8b0c2c6168..43e90c065b 100644 --- a/webapp/packages/plugin-settings-menu/package.json +++ b/webapp/packages/plugin-settings-menu/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-settings-menu", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-settings-menu/src/PluginBootstrap.ts b/webapp/packages/plugin-settings-menu/src/PluginBootstrap.ts index 700619a12e..1523dd12f8 100644 --- a/webapp/packages/plugin-settings-menu/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-settings-menu/src/PluginBootstrap.ts @@ -9,7 +9,7 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { menuExtractItems, MenuService } from '@cloudbeaver/core-view'; import { MENU_APP_STATE } from '@cloudbeaver/plugin-top-app-bar'; -import { TOP_NAV_BAR_SETTINGS_MENU } from './SettingsMenu/TOP_NAV_BAR_SETTINGS_MENU'; +import { TOP_NAV_BAR_SETTINGS_MENU } from './SettingsMenu/TOP_NAV_BAR_SETTINGS_MENU.js'; @injectable() export class PluginBootstrap extends Bootstrap { @@ -17,7 +17,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.addTopAppMenuItems(); } diff --git a/webapp/packages/plugin-settings-menu/src/SettingsMenu/SettingsMenu.tsx b/webapp/packages/plugin-settings-menu/src/SettingsMenu/SettingsMenu.tsx index 0be42914fc..7efc1d45bb 100644 --- a/webapp/packages/plugin-settings-menu/src/SettingsMenu/SettingsMenu.tsx +++ b/webapp/packages/plugin-settings-menu/src/SettingsMenu/SettingsMenu.tsx @@ -11,7 +11,7 @@ import { Icon } from '@cloudbeaver/core-blocks'; import { ContextMenu } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import { TOP_NAV_BAR_SETTINGS_MENU } from './TOP_NAV_BAR_SETTINGS_MENU'; +import { TOP_NAV_BAR_SETTINGS_MENU } from './TOP_NAV_BAR_SETTINGS_MENU.js'; export const SettingsMenu = observer(function SettingsMenu() { const menu = useMenu({ menu: TOP_NAV_BAR_SETTINGS_MENU }); diff --git a/webapp/packages/plugin-settings-menu/src/index.ts b/webapp/packages/plugin-settings-menu/src/index.ts index 497144bde5..3f820e3210 100644 --- a/webapp/packages/plugin-settings-menu/src/index.ts +++ b/webapp/packages/plugin-settings-menu/src/index.ts @@ -1,6 +1,13 @@ -import { settingsMenuPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { settingsMenuPlugin } from './manifest.js'; export default settingsMenuPlugin; -export * from './SettingsMenu/SettingsMenu'; -export * from './SettingsMenu/TOP_NAV_BAR_SETTINGS_MENU'; +export * from './SettingsMenu/SettingsMenu.js'; +export * from './SettingsMenu/TOP_NAV_BAR_SETTINGS_MENU.js'; diff --git a/webapp/packages/plugin-settings-menu/src/manifest.ts b/webapp/packages/plugin-settings-menu/src/manifest.ts index abfc5e425b..3ea45d2beb 100644 --- a/webapp/packages/plugin-settings-menu/src/manifest.ts +++ b/webapp/packages/plugin-settings-menu/src/manifest.ts @@ -9,5 +9,5 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const settingsMenuPlugin: PluginManifest = { info: { name: 'Settings menu plugin' }, - providers: [() => import('./PluginBootstrap').then(m => m.PluginBootstrap)], + providers: [() => import('./PluginBootstrap.js').then(m => m.PluginBootstrap)], }; diff --git a/webapp/packages/plugin-settings-panel/package.json b/webapp/packages/plugin-settings-panel/package.json index 374029ecbe..ffa1450e88 100644 --- a/webapp/packages/plugin-settings-panel/package.json +++ b/webapp/packages/plugin-settings-panel/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-settings-panel", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-settings-panel/src/LocaleService.ts b/webapp/packages/plugin-settings-panel/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-settings-panel/src/LocaleService.ts +++ b/webapp/packages/plugin-settings-panel/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/Settings.tsx b/webapp/packages/plugin-settings-panel/src/SettingsPanel/Settings.tsx index 9346815b1d..9b3c2223f4 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/Settings.tsx +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/Settings.tsx @@ -12,10 +12,10 @@ import { Container, Group, TextPlaceholder, useTranslate } from '@cloudbeaver/co import { type ISettingsSource, ROOT_SETTINGS_GROUP } from '@cloudbeaver/core-settings'; import { useTreeData } from '@cloudbeaver/plugin-navigation-tree'; -import { getSettingGroupId } from './getSettingGroupId'; -import { SettingsGroups } from './SettingsGroups/SettingsGroups'; -import { SettingsList } from './SettingsList'; -import { useSettings } from './useSettings'; +import { getSettingGroupId } from './getSettingGroupId.js'; +import { SettingsGroups } from './SettingsGroups/SettingsGroups.js'; +import { SettingsList } from './SettingsList.js'; +import { useSettings } from './useSettings.js'; export interface ISettingsProps { source: ISettingsSource; diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroup.tsx b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroup.tsx index 9fce782570..fda70488d7 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroup.tsx +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroup.tsx @@ -10,9 +10,9 @@ import { observer } from 'mobx-react-lite'; import { Group, GroupTitle } from '@cloudbeaver/core-blocks'; import type { ISettingDescription, ISettingsSource, SettingsGroup as SettingsGroupType } from '@cloudbeaver/core-settings'; -import { getSettingGroupId } from './getSettingGroupId'; -import { Setting } from './Setting'; -import { SettingsGroupTitle } from './SettingsGroupTitle'; +import { getSettingGroupId } from './getSettingGroupId.js'; +import { Setting } from './Setting.js'; +import { SettingsGroupTitle } from './SettingsGroupTitle.js'; interface Props { group: SettingsGroupType; diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroups/SettingsGroups.tsx b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroups/SettingsGroups.tsx index 4b963fbb85..ba3cc521aa 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroups/SettingsGroups.tsx +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroups/SettingsGroups.tsx @@ -7,9 +7,9 @@ */ import { observer } from 'mobx-react-lite'; -import { ITreeData, Tree } from '@cloudbeaver/plugin-navigation-tree'; +import { type ITreeData, Tree } from '@cloudbeaver/plugin-navigation-tree'; -import { groupNodeRenderer } from './groupNodeRenderer'; +import { groupNodeRenderer } from './groupNodeRenderer.js'; interface Props { treeData: ITreeData; diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroups/groupNodeRenderer.tsx b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroups/groupNodeRenderer.tsx index 3823152785..8fbc06d87b 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroups/groupNodeRenderer.tsx +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsGroups/groupNodeRenderer.tsx @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { INodeRenderer, Node, NodeComponent } from '@cloudbeaver/plugin-navigation-tree'; +import { type INodeRenderer, Node, type NodeComponent } from '@cloudbeaver/plugin-navigation-tree'; -import { GroupNodeControl } from './GroupNodeControl'; +import { GroupNodeControl } from './GroupNodeControl.js'; export const groupNodeRenderer: INodeRenderer = () => GroupNodeRenderer; diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsLazy.ts b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsLazy.ts index 32be743a2a..2b6e4744af 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsLazy.ts +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsLazy.ts @@ -7,4 +7,4 @@ */ import { importLazyComponent } from '@cloudbeaver/core-blocks'; -export const Settings = importLazyComponent(() => import('./Settings').then(m => m.Settings)); +export const Settings = importLazyComponent(() => import('./Settings.js').then(m => m.Settings)); diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsList.tsx b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsList.tsx index 6857c2ff0d..4a5d6c88b4 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsList.tsx +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/SettingsList.tsx @@ -16,8 +16,8 @@ import { } from '@cloudbeaver/core-settings'; import type { ITreeData } from '@cloudbeaver/plugin-navigation-tree'; -import { SettingsGroup } from './SettingsGroup'; -import { useTreeScrollSync } from './useTreeScrollSync'; +import { SettingsGroup } from './SettingsGroup.js'; +import { useTreeScrollSync } from './useTreeScrollSync.js'; interface Props { treeData: ITreeData; @@ -32,7 +32,7 @@ export const SettingsList = observer(function SettingsList({ treeData, so const ref = useTreeScrollSync(treeData, onSettingsOpen); while (groups.length) { - const groupId = groups[0]; + const groupId = groups[0]!; groups.splice(0, 1, ...treeData.getChildren(groupId)); const group = ROOT_SETTINGS_GROUP.get(groupId)!; diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/getSettingGroupId.ts b/webapp/packages/plugin-settings-panel/src/SettingsPanel/getSettingGroupId.ts index ed953e34e1..37576d2d56 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/getSettingGroupId.ts +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/getSettingGroupId.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { SETTINGS_GROUP_ID_PREFIX } from './SETTINGS_GROUP_ID_PREFIX'; +import { SETTINGS_GROUP_ID_PREFIX } from './SETTINGS_GROUP_ID_PREFIX.js'; export function getSettingGroupId(id: string): string { return `${SETTINGS_GROUP_ID_PREFIX}${id}`; diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/getSettingGroupIdFromElementId.ts b/webapp/packages/plugin-settings-panel/src/SettingsPanel/getSettingGroupIdFromElementId.ts index ac7aeac17d..83c60a20d8 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/getSettingGroupIdFromElementId.ts +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/getSettingGroupIdFromElementId.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { SETTINGS_GROUP_ID_PREFIX } from './SETTINGS_GROUP_ID_PREFIX'; +import { SETTINGS_GROUP_ID_PREFIX } from './SETTINGS_GROUP_ID_PREFIX.js'; export function getSettingGroupIdFromElementId(id: string): string { return id.replace(SETTINGS_GROUP_ID_PREFIX, ''); diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/querySettingsGroups.ts b/webapp/packages/plugin-settings-panel/src/SettingsPanel/querySettingsGroups.ts index a66ffb3a13..7141aac911 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/querySettingsGroups.ts +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/querySettingsGroups.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { SETTINGS_GROUP_ID_PREFIX } from './SETTINGS_GROUP_ID_PREFIX'; +import { SETTINGS_GROUP_ID_PREFIX } from './SETTINGS_GROUP_ID_PREFIX.js'; export function querySettingsGroups(element: HTMLElement): HTMLElement[] { return Array.from(element.querySelectorAll(`[id^="${SETTINGS_GROUP_ID_PREFIX}"]`)); diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/useSettings.ts b/webapp/packages/plugin-settings-panel/src/SettingsPanel/useSettings.ts index 0407d7b7a8..1d6ebb2090 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/useSettings.ts +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/useSettings.ts @@ -9,7 +9,7 @@ import { computed, observable } from 'mobx'; import { useAutoLoad, useObservableRef } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ISettingDescription, ROOT_SETTINGS_GROUP, SettingsGroup, SettingsManagerService } from '@cloudbeaver/core-settings'; +import { type ISettingDescription, ROOT_SETTINGS_GROUP, SettingsGroup, SettingsManagerService } from '@cloudbeaver/core-settings'; interface ISettings { settings: Map[]>; diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/useTreeScrollSync.ts b/webapp/packages/plugin-settings-panel/src/SettingsPanel/useTreeScrollSync.ts index 05f18865c4..779c6cbc2a 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/useTreeScrollSync.ts +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/useTreeScrollSync.ts @@ -10,8 +10,8 @@ import { useEffect, useRef } from 'react'; import { ROOT_SETTINGS_GROUP } from '@cloudbeaver/core-settings'; import type { ITreeData } from '@cloudbeaver/plugin-navigation-tree'; -import { getSettingGroupIdFromElementId } from './getSettingGroupIdFromElementId'; -import { querySettingsGroups } from './querySettingsGroups'; +import { getSettingGroupIdFromElementId } from './getSettingGroupIdFromElementId.js'; +import { querySettingsGroups } from './querySettingsGroups.js'; export function useTreeScrollSync(treeData: ITreeData, onSettingsOpen?: (groupId: string) => void): React.RefObject { const ref = useRef(null); diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanelPluginBootstrap.ts b/webapp/packages/plugin-settings-panel/src/SettingsPanelPluginBootstrap.ts index 02e5fa5d8d..e5fb56c168 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanelPluginBootstrap.ts +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanelPluginBootstrap.ts @@ -12,8 +12,4 @@ export class SettingsPanelPluginBootstrap extends Bootstrap { constructor() { super(); } - - register(): void | Promise {} - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-settings-panel/src/index.ts b/webapp/packages/plugin-settings-panel/src/index.ts index 5f4e4aa4fe..6389f9498c 100644 --- a/webapp/packages/plugin-settings-panel/src/index.ts +++ b/webapp/packages/plugin-settings-panel/src/index.ts @@ -1,4 +1,11 @@ -import { settingsPanelPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { settingsPanelPlugin } from './manifest.js'; -export * from './SettingsPanel/SettingsLazy'; +export * from './SettingsPanel/SettingsLazy.js'; export default settingsPanelPlugin; diff --git a/webapp/packages/plugin-settings-panel/src/manifest.ts b/webapp/packages/plugin-settings-panel/src/manifest.ts index c73ba24508..982256a90f 100644 --- a/webapp/packages/plugin-settings-panel/src/manifest.ts +++ b/webapp/packages/plugin-settings-panel/src/manifest.ts @@ -10,7 +10,7 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const settingsPanelPlugin: PluginManifest = { info: { name: 'Settings panel plugin' }, providers: [ - () => import('./SettingsPanelPluginBootstrap').then(m => m.SettingsPanelPluginBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./SettingsPanelPluginBootstrap.js').then(m => m.SettingsPanelPluginBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/package.json b/webapp/packages/plugin-sql-editor-navigation-tab-script/package.json index 109d3db437..d4e31d596a 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/package.json +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-sql-editor-navigation-tab-script", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/LocaleService.ts b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/LocaleService.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/PluginBootstrap.ts b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/PluginBootstrap.ts index dca7562347..227e2c821c 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/PluginBootstrap.ts @@ -23,7 +23,7 @@ import { DATA_CONTEXT_SQL_EDITOR_STATE, ESqlDataSourceFeatures, getSqlEditorName, - ISqlDataSource, + type ISqlDataSource, LocalStorageSqlDataSource, MemorySqlDataSource, SQL_EDITOR_TOOLS_MENU, @@ -32,9 +32,9 @@ import { } from '@cloudbeaver/plugin-sql-editor'; import { isSQLEditorTab, SqlEditorNavigatorService } from '@cloudbeaver/plugin-sql-editor-navigation-tab'; -import { ACTION_SAVE_AS_SCRIPT } from './ACTION_SAVE_AS_SCRIPT'; -import { ResourceSqlDataSource } from './ResourceSqlDataSource'; -import { SqlEditorTabResourceService } from './SqlEditorTabResourceService'; +import { ACTION_SAVE_AS_SCRIPT } from './ACTION_SAVE_AS_SCRIPT.js'; +import { ResourceSqlDataSource } from './ResourceSqlDataSource.js'; +import { SqlEditorTabResourceService } from './SqlEditorTabResourceService.js'; @injectable() export class PluginBootstrap extends Bootstrap { @@ -59,7 +59,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.navNodeManagerService.onCanOpen.addHandler(this.canOpenHandler.bind(this)); this.navNodeManagerService.navigator.addHandler(this.navigationHandler.bind(this)); diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSource.ts b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSource.ts index f34be516e4..ed9ec3bda9 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSource.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSource.ts @@ -10,19 +10,19 @@ import { action, computed, makeObservable, observable, runInAction, toJS } from import { ConnectionInfoResource, createConnectionParam, - IConnectionExecutionContextInfo, + type IConnectionExecutionContextInfo, NOT_INITIALIZED_CONTEXT_ID, } from '@cloudbeaver/core-connections'; import { TaskScheduler } from '@cloudbeaver/core-executor'; import type { ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; -import { isResourceAlias, ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { isResourceAlias, type ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { getRmResourceKey, ResourceManagerResource } from '@cloudbeaver/core-resource-manager'; import type { NetworkStateService } from '@cloudbeaver/core-root'; import { debounce, getPathName, isArraysEqual, isNotNullDefined, isObjectsEqual, isValuesEqual } from '@cloudbeaver/core-utils'; import { SCRIPTS_TYPE_ID } from '@cloudbeaver/plugin-resource-manager-scripts'; import { BaseSqlDataSource, ESqlDataSourceFeatures, SqlEditorService } from '@cloudbeaver/plugin-sql-editor'; -import type { IResourceSqlDataSourceState } from './IResourceSqlDataSourceState'; +import type { IResourceSqlDataSourceState } from './IResourceSqlDataSourceState.js'; interface IResourceActions { rename(dataSource: ResourceSqlDataSource, key: string, name: string): Promise; @@ -40,7 +40,7 @@ const VALUE_SYNC_DELAY = 1 * 1000; const DIFFERENT_PROJECT_MESSAGE_DISPLAY_DELAY = 4 * 1000; export class ResourceSqlDataSource extends BaseSqlDataSource { - static key = 'resource'; + static override key = 'resource'; get name(): string | null { if (!this.resourceKey || !this.projectId) { @@ -64,7 +64,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { return this.state.baseExecutionContext; } - get projectId(): string | null { + override get projectId(): string | null { if (this.resourceKey === undefined) { return super.projectId; } @@ -88,7 +88,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { return this.lastAction; } - get features(): ESqlDataSourceFeatures[] { + override get features(): ESqlDataSourceFeatures[] { if (this.isReadonly()) { return [ESqlDataSourceFeatures.script, ESqlDataSourceFeatures.query, ESqlDataSourceFeatures.executable]; } @@ -96,7 +96,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { return [ESqlDataSourceFeatures.script, ESqlDataSourceFeatures.query, ESqlDataSourceFeatures.executable, ESqlDataSourceFeatures.setName]; } - get isAutoSaveEnabled(): boolean { + override get isAutoSaveEnabled(): boolean { return this.sqlEditorService.autoSave; } @@ -142,7 +142,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { }); } - isReadonly(): boolean { + override isReadonly(): boolean { if (!this.projectId || !this.networkStateService.state) { return true; } @@ -152,7 +152,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { return !this.isLoaded() || !project?.canEditResources; } - isOutdated(): boolean { + override isOutdated(): boolean { if (this.projectId) { if (this.projectInfoResource.isOutdated(this.projectId)) { return true; @@ -162,11 +162,11 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { return this.resourceKey !== undefined && super.isOutdated(); } - isLoaded(): boolean { + override isLoaded(): boolean { return this.resourceKey === undefined || super.isLoaded() || this.loaded; } - isLoading(): boolean { + override isLoading(): boolean { return this.scheduler.executing; } @@ -200,7 +200,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { this.actions = actions; } - setName(name: string | null): void { + override setName(name: string | null): void { name = name?.trim() ?? null; if (!name || name === this.name) { return; @@ -214,11 +214,11 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { }); } - setProject(projectId: string | null): void { + override setProject(projectId: string | null): void { super.setProject(projectId); } - setScript(script: string): void { + override setScript(script: string): void { const previous = this.state.script; if (previous === script) { return; @@ -232,7 +232,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { } } - setExecutionContext(executionContext: IConnectionExecutionContextInfo | undefined): void { + override setExecutionContext(executionContext: IConnectionExecutionContextInfo | undefined): void { if (executionContext) { executionContext = JSON.parse(JSON.stringify(toJS(executionContext) ?? {})); } @@ -264,7 +264,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { } } - async load(): Promise { + override async load(): Promise { if (this.state.resourceKey && !this.resourceUseKeyId) { this.resourceUseKeyId = this.resourceManagerResource.useTracker.use(this.state.resourceKey); } @@ -276,7 +276,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { await this.read(); } - async save(): Promise { + override async save(): Promise { try { await this.write(); await this.saveProperties(); @@ -286,7 +286,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { } } - dispose(): void { + override dispose(): void { super.dispose(); this.resourceManagerResource.onItemUpdate.removeHandler(this.syncResource); if (this.state.resourceKey && this.resourceUseKeyId) { diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSourceBootstrap.ts b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSourceBootstrap.ts index 2f3d94e65d..695a667590 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSourceBootstrap.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSourceBootstrap.ts @@ -8,12 +8,12 @@ import { action, makeObservable, observable } from 'mobx'; import { ConfirmationDialog } from '@cloudbeaver/core-blocks'; -import { ConnectionInfoResource, IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; +import { ConnectionInfoResource, type IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; import { ProjectInfoResource, ProjectsService } from '@cloudbeaver/core-projects'; -import { ICachedTreeMoveData, resourceKeyList, ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { type ICachedTreeMoveData, resourceKeyList, type ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { ResourceManagerResource } from '@cloudbeaver/core-resource-manager'; import { NetworkStateService } from '@cloudbeaver/core-root'; import { StorageService } from '@cloudbeaver/core-storage'; @@ -25,9 +25,9 @@ import { ResourceManagerScriptsService, SCRIPTS_TYPE_ID } from '@cloudbeaver/plu import { createSqlDataSourceHistoryInitialState, getSqlEditorName, SqlDataSourceService, SqlEditorService } from '@cloudbeaver/plugin-sql-editor'; import { SqlEditorTabService } from '@cloudbeaver/plugin-sql-editor-navigation-tab'; -import type { IResourceSqlDataSourceState } from './IResourceSqlDataSourceState'; -import { ResourceSqlDataSource } from './ResourceSqlDataSource'; -import { SqlEditorTabResourceService } from './SqlEditorTabResourceService'; +import type { IResourceSqlDataSourceState } from './IResourceSqlDataSourceState.js'; +import { ResourceSqlDataSource } from './ResourceSqlDataSource.js'; +import { SqlEditorTabResourceService } from './SqlEditorTabResourceService.js'; const RESOURCE_TAB_STATE = 'sql_editor_resource_tab_state'; @@ -84,7 +84,7 @@ export class ResourceSqlDataSourceBootstrap extends Bootstrap { ); } - register(): void | Promise { + override register(): void | Promise { this.resourceManagerResource.onItemDelete.addHandler(this.resourceDeleteHandler.bind(this)); this.resourceManagerResource.onMove.addHandler(this.resourceMoveHandler.bind(this)); @@ -150,8 +150,6 @@ export class ResourceSqlDataSourceBootstrap extends Bootstrap { }); } - load(): void | Promise {} - private createState(editorId: string, script?: string, resourceKey?: string): IResourceSqlDataSourceState { let state = this.dataSourceStateState.get(editorId); diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/SqlEditorTabResourceService.ts b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/SqlEditorTabResourceService.ts index 4d51092044..e5d7b110fd 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/SqlEditorTabResourceService.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/SqlEditorTabResourceService.ts @@ -9,7 +9,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { SqlDataSourceService } from '@cloudbeaver/plugin-sql-editor'; import { SqlEditorTabService } from '@cloudbeaver/plugin-sql-editor-navigation-tab'; -import { ResourceSqlDataSource } from './ResourceSqlDataSource'; +import { ResourceSqlDataSource } from './ResourceSqlDataSource.js'; @injectable() export class SqlEditorTabResourceService { diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/index.ts b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/index.ts index e2e38fb300..4f4c9cb3ab 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/index.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/index.ts @@ -1,3 +1,10 @@ -import { manifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { manifest } from './manifest.js'; export default manifest; diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/manifest.ts b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/manifest.ts index c948d8307b..cef096511c 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/manifest.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/manifest.ts @@ -10,9 +10,9 @@ import type { PluginManifest } from '@cloudbeaver/core-di'; export const manifest: PluginManifest = { info: { name: 'Sql Editor Script plugin' }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./SqlEditorTabResourceService').then(m => m.SqlEditorTabResourceService), - () => import('./ResourceSqlDataSourceBootstrap').then(m => m.ResourceSqlDataSourceBootstrap), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./SqlEditorTabResourceService.js').then(m => m.SqlEditorTabResourceService), + () => import('./ResourceSqlDataSourceBootstrap.js').then(m => m.ResourceSqlDataSourceBootstrap), ], }; diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/package.json b/webapp/packages/plugin-sql-editor-navigation-tab/package.json index a421517658..ecaf8c3e95 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/package.json +++ b/webapp/packages/plugin-sql-editor-navigation-tab/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-sql-editor-navigation-tab", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/LocaleService.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/LocaleService.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorBootstrap.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorBootstrap.ts index 9502a84112..67e1758a95 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorBootstrap.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorBootstrap.ts @@ -7,11 +7,11 @@ */ import { RenameDialog } from '@cloudbeaver/core-blocks'; import { - Connection, + type Connection, ConnectionInfoResource, createConnectionParam, DATA_CONTEXT_CONNECTION, - IConnectionInfoParams, + type IConnectionInfoParams, isConnectionProvider, isObjectCatalogProvider, isObjectSchemaProvider, @@ -22,7 +22,7 @@ import type { IExecutorHandler } from '@cloudbeaver/core-executor'; import { ExtensionUtils } from '@cloudbeaver/core-extensions'; import { LocalizationService } from '@cloudbeaver/core-localization'; import { DATA_CONTEXT_NAV_NODE, EObjectFeature, NodeManagerUtils } from '@cloudbeaver/core-navigation-tree'; -import { ISessionAction, sessionActionContext, SessionActionService } from '@cloudbeaver/core-root'; +import { type ISessionAction, sessionActionContext, SessionActionService } from '@cloudbeaver/core-root'; import { ACTION_RENAME, ActionService, menuExtractItems, MenuService, ViewService } from '@cloudbeaver/core-view'; import { MENU_CONNECTIONS } from '@cloudbeaver/plugin-connections'; import { NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; @@ -37,13 +37,13 @@ import { } from '@cloudbeaver/plugin-sql-editor'; import { MENU_APP_ACTIONS } from '@cloudbeaver/plugin-top-app-bar'; -import { ACTION_SQL_EDITOR_NEW } from './ACTION_SQL_EDITOR_NEW'; -import { ACTION_SQL_EDITOR_OPEN } from './ACTION_SQL_EDITOR_OPEN'; -import { DATA_CONTEXT_SQL_EDITOR_TAB } from './DATA_CONTEXT_SQL_EDITOR_TAB'; -import { isSessionActionOpenSQLEditor } from './sessionActionOpenSQLEditor'; -import { SQL_EDITOR_SOURCE_ACTION } from './SQL_EDITOR_SOURCE_ACTION'; -import { SqlEditorNavigatorService } from './SqlEditorNavigatorService'; -import { SqlEditorTabService } from './SqlEditorTabService'; +import { ACTION_SQL_EDITOR_NEW } from './ACTION_SQL_EDITOR_NEW.js'; +import { ACTION_SQL_EDITOR_OPEN } from './ACTION_SQL_EDITOR_OPEN.js'; +import { DATA_CONTEXT_SQL_EDITOR_TAB } from './DATA_CONTEXT_SQL_EDITOR_TAB.js'; +import { isSessionActionOpenSQLEditor } from './sessionActionOpenSQLEditor.js'; +import { SQL_EDITOR_SOURCE_ACTION } from './SQL_EDITOR_SOURCE_ACTION.js'; +import { SqlEditorNavigatorService } from './SqlEditorNavigatorService.js'; +import { SqlEditorTabService } from './SqlEditorTabService.js'; interface IActiveConnectionContext { connectionKey?: IConnectionInfoParams; @@ -71,7 +71,7 @@ export class SqlEditorBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.registerTopAppBarItem(); this.menuService.addCreator({ @@ -180,8 +180,6 @@ export class SqlEditorBootstrap extends Bootstrap { }); } - load(): void {} - private registerTopAppBarItem() { this.menuService.addCreator({ menus: [MENU_APP_ACTIONS], diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorNavigatorService.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorNavigatorService.ts index 73a2b330c6..e121ed2076 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorNavigatorService.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorNavigatorService.ts @@ -5,18 +5,18 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ConnectionInfoResource, createConnectionParam, IConnectionInfoParams } from '@cloudbeaver/core-connections'; +import { ConnectionInfoResource, createConnectionParam, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; -import { Executor, IExecutionContextProvider, IExecutor } from '@cloudbeaver/core-executor'; +import { Executor, type IExecutionContextProvider, type IExecutor } from '@cloudbeaver/core-executor'; import { NavigationService } from '@cloudbeaver/core-ui'; import { uuid } from '@cloudbeaver/core-utils'; -import { ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; -import { ISqlEditorTabState, MemorySqlDataSource, SqlDataSourceService, SqlResultTabsService } from '@cloudbeaver/plugin-sql-editor'; +import { type ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; +import { type ISqlEditorTabState, MemorySqlDataSource, SqlDataSourceService, SqlResultTabsService } from '@cloudbeaver/plugin-sql-editor'; -import { isSQLEditorTab } from './isSQLEditorTab'; -import { SQL_EDITOR_SOURCE_ACTION } from './SQL_EDITOR_SOURCE_ACTION'; -import { SqlEditorTabService } from './SqlEditorTabService'; +import { isSQLEditorTab } from './isSQLEditorTab.js'; +import { SQL_EDITOR_SOURCE_ACTION } from './SQL_EDITOR_SOURCE_ACTION.js'; +import { SqlEditorTabService } from './SqlEditorTabService.js'; enum SQLEditorNavigationAction { create, diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorPanel.tsx b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorPanel.tsx index 66497f60b8..82d20dee12 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorPanel.tsx +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorPanel.tsx @@ -10,7 +10,7 @@ import { observer } from 'mobx-react-lite'; import { DATA_CONTEXT_TAB_ID, useTab } from '@cloudbeaver/core-ui'; import { useCaptureViewContext } from '@cloudbeaver/core-view'; import type { TabHandlerPanelComponent } from '@cloudbeaver/plugin-navigation-tabs'; -import { DATA_CONTEXT_SQL_EDITOR_STATE, ISqlEditorTabState, SqlEditor } from '@cloudbeaver/plugin-sql-editor'; +import { DATA_CONTEXT_SQL_EDITOR_STATE, type ISqlEditorTabState, SqlEditor } from '@cloudbeaver/plugin-sql-editor'; export const SqlEditorPanel: TabHandlerPanelComponent = observer(function SqlEditorPanel({ tab }) { const baseTab = useTab(tab.id); diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTab.tsx b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTab.tsx index 6700e23211..38cbdaf129 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTab.tsx +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTab.tsx @@ -9,21 +9,21 @@ import { observer } from 'mobx-react-lite'; import { useContext } from 'react'; import { IconOrImage, s, useTranslate } from '@cloudbeaver/core-blocks'; -import { Connection, ConnectionInfoResource, createConnectionParam } from '@cloudbeaver/core-connections'; +import { type Connection, ConnectionInfoResource, createConnectionParam } from '@cloudbeaver/core-connections'; import { useDataContext, useDataContextLink } from '@cloudbeaver/core-data-context'; import { useService } from '@cloudbeaver/core-di'; -import { ITabData, Tab, TabIcon, TabTitle } from '@cloudbeaver/core-ui'; +import { type ITabData, Tab, TabIcon, TabTitle } from '@cloudbeaver/core-ui'; import { CaptureViewContext } from '@cloudbeaver/core-view'; import type { TabHandlerTabComponent } from '@cloudbeaver/plugin-navigation-tabs'; import { DATA_CONTEXT_SQL_EDITOR_STATE, ESqlDataSourceFeatures, getSqlEditorName, - ISqlEditorTabState, + type ISqlEditorTabState, SqlDataSourceService, } from '@cloudbeaver/plugin-sql-editor'; -import { DATA_CONTEXT_SQL_EDITOR_TAB } from './DATA_CONTEXT_SQL_EDITOR_TAB'; +import { DATA_CONTEXT_SQL_EDITOR_TAB } from './DATA_CONTEXT_SQL_EDITOR_TAB.js'; import sqlEditorTabStyles from './SqlEditorTab.module.css'; export const SqlEditorTab: TabHandlerTabComponent = observer(function SqlEditorTab({ tab, onSelect, onClose }) { diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTabService.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTabService.ts index a4d7857fd1..be9c8fdc51 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTabService.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTabService.ts @@ -19,9 +19,9 @@ import { ContainerResource, createConnectionParam, executionContextProvider, - ICatalogData, - IConnectionExecutorData, - IConnectionInfoParams, + type ICatalogData, + type IConnectionExecutorData, + type IConnectionInfoParams, objectCatalogProvider, objectCatalogSetter, objectSchemaProvider, @@ -30,28 +30,28 @@ import { import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; -import { Executor, ExecutorInterrupter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; +import { Executor, ExecutorInterrupter, type IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { NavNodeInfoResource, NodeManagerUtils, objectNavNodeProvider } from '@cloudbeaver/core-navigation-tree'; import { projectProvider, projectSetter, projectSetterState } from '@cloudbeaver/core-projects'; -import { resourceKeyList, ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { resourceKeyList, type ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import type { NavNodeInfoFragment } from '@cloudbeaver/core-sdk'; import { isArraysEqual } from '@cloudbeaver/core-utils'; -import { ITab, ITabOptions, NavigationTabsService, TabHandler } from '@cloudbeaver/plugin-navigation-tabs'; +import { type ITab, type ITabOptions, NavigationTabsService, TabHandler } from '@cloudbeaver/plugin-navigation-tabs'; import { ESqlDataSourceFeatures, - ISQLDatasourceUpdateData, - ISqlEditorTabState, + type ISQLDatasourceUpdateData, + type ISqlEditorTabState, SQL_EDITOR_TAB_STATE_SCHEMA, SqlDataSourceService, SqlEditorService, SqlResultTabsService, } from '@cloudbeaver/plugin-sql-editor'; -import { isSQLEditorTab } from './isSQLEditorTab'; -import { sqlEditorTabHandlerKey } from './sqlEditorTabHandlerKey'; +import { isSQLEditorTab } from './isSQLEditorTab.js'; +import { sqlEditorTabHandlerKey } from './sqlEditorTabHandlerKey.js'; -const SqlEditorPanel = importLazyComponent(() => import('./SqlEditorPanel').then(m => m.SqlEditorPanel)); -const SqlEditorTab = importLazyComponent(() => import('./SqlEditorTab').then(m => m.SqlEditorTab)); +const SqlEditorPanel = importLazyComponent(() => import('./SqlEditorPanel.js').then(m => m.SqlEditorPanel)); +const SqlEditorTab = importLazyComponent(() => import('./SqlEditorTab.js').then(m => m.SqlEditorTab)); @injectable() export class SqlEditorTabService extends Bootstrap { @@ -111,7 +111,7 @@ export class SqlEditorTabService extends Bootstrap { }); } - register(): void { + override register(): void { this.sqlDataSourceService.onUpdate.addHandler(this.syncDatasourceUpdate.bind(this)); this.connectionsManagerService.onDisconnect.addHandler(this.disconnectHandler.bind(this)); this.connectionInfoResource.onItemDelete.addHandler(this.handleConnectionDelete.bind(this)); @@ -119,8 +119,6 @@ export class SqlEditorTabService extends Bootstrap { this.connectionExecutionContextResource.onItemDelete.addHandler(this.handleExecutionContextDelete.bind(this)); } - load(): void {} - createNewEditor(editorId: string, dataSourceKey: string, name?: string, source?: string, script?: string): ITabOptions | null { const order = this.getFreeEditorId(); diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/index.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/index.ts index deb0d8e027..ba0686f284 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/index.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/index.ts @@ -1,10 +1,17 @@ -import { sqlEditorTabPluginManifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { sqlEditorTabPluginManifest } from './manifest.js'; export default sqlEditorTabPluginManifest; -export { DATA_CONTEXT_SQL_EDITOR_TAB } from './DATA_CONTEXT_SQL_EDITOR_TAB'; -export { ACTION_SQL_EDITOR_OPEN } from './ACTION_SQL_EDITOR_OPEN'; +export { DATA_CONTEXT_SQL_EDITOR_TAB } from './DATA_CONTEXT_SQL_EDITOR_TAB.js'; +export { ACTION_SQL_EDITOR_OPEN } from './ACTION_SQL_EDITOR_OPEN.js'; -export * from './isSQLEditorTab'; -export * from './SqlEditorNavigatorService'; -export * from './SqlEditorTabService'; +export * from './isSQLEditorTab.js'; +export * from './SqlEditorNavigatorService.js'; +export * from './SqlEditorTabService.js'; diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/isSQLEditorTab.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/isSQLEditorTab.ts index 8039e14624..dd7a6299ea 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/isSQLEditorTab.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/isSQLEditorTab.ts @@ -8,7 +8,7 @@ import type { ITab } from '@cloudbeaver/plugin-navigation-tabs'; import type { ISqlEditorTabState } from '@cloudbeaver/plugin-sql-editor'; -import { sqlEditorTabHandlerKey } from './sqlEditorTabHandlerKey'; +import { sqlEditorTabHandlerKey } from './sqlEditorTabHandlerKey.js'; export function isSQLEditorTab(tab: ITab): tab is ITab; export function isSQLEditorTab(predicate: (tab: ITab) => boolean): (tab: ITab) => tab is ITab; diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/manifest.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/manifest.ts index c41b6b32c1..ea58f5ca95 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/manifest.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/manifest.ts @@ -13,9 +13,9 @@ export const sqlEditorTabPluginManifest: PluginManifest = { }, providers: [ - () => import('./SqlEditorBootstrap').then(m => m.SqlEditorBootstrap), - () => import('./SqlEditorTabService').then(m => m.SqlEditorTabService), - () => import('./SqlEditorNavigatorService').then(m => m.SqlEditorNavigatorService), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./SqlEditorBootstrap.js').then(m => m.SqlEditorBootstrap), + () => import('./SqlEditorTabService.js').then(m => m.SqlEditorTabService), + () => import('./SqlEditorNavigatorService.js').then(m => m.SqlEditorNavigatorService), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/sessionActionOpenSQLEditor.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/sessionActionOpenSQLEditor.ts index 069eb0232e..a2f1857fcc 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/sessionActionOpenSQLEditor.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/sessionActionOpenSQLEditor.ts @@ -7,7 +7,7 @@ */ import type { ISessionAction } from '@cloudbeaver/core-root'; -import { SESSION_ACTION_OPEN_SQL_EDITOR } from './SESSION_ACTION_OPEN_SQL_EDITOR'; +import { SESSION_ACTION_OPEN_SQL_EDITOR } from './SESSION_ACTION_OPEN_SQL_EDITOR.js'; export interface ISessionActionOpenSQLEditor { action: typeof SESSION_ACTION_OPEN_SQL_EDITOR; diff --git a/webapp/packages/plugin-sql-editor-new/package.json b/webapp/packages/plugin-sql-editor-new/package.json index e640b8aad4..1ab4d91e98 100644 --- a/webapp/packages/plugin-sql-editor-new/package.json +++ b/webapp/packages/plugin-sql-editor-new/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-sql-editor-new", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-sql-editor-new/src/LocaleService.ts b/webapp/packages/plugin-sql-editor-new/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-sql-editor-new/src/LocaleService.ts +++ b/webapp/packages/plugin-sql-editor-new/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-sql-editor-new/src/PluginBootstrap.ts b/webapp/packages/plugin-sql-editor-new/src/PluginBootstrap.ts index 49ddb1fa07..620e09d28b 100644 --- a/webapp/packages/plugin-sql-editor-new/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-sql-editor-new/src/PluginBootstrap.ts @@ -7,7 +7,7 @@ */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { SQLCodeEditorPanelService } from './SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanelService'; +import { SQLCodeEditorPanelService } from './SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanelService.js'; @injectable() export class PluginBootstrap extends Bootstrap { @@ -15,9 +15,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void | Promise { + override register(): void | Promise { this.sqlCodeEditorPanelService.registerPanel(); } - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/ACTIVE_QUERY_EXTENSION.ts b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/ACTIVE_QUERY_EXTENSION.ts index 14add42f57..6ef634e413 100644 --- a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/ACTIVE_QUERY_EXTENSION.ts +++ b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/ACTIVE_QUERY_EXTENSION.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Decoration, DecorationSet, EditorView, StateEffect, StateField } from '@cloudbeaver/plugin-codemirror6'; +import { Decoration, type DecorationSet, EditorView, StateEffect, StateField } from '@cloudbeaver/plugin-codemirror6'; const ACTIVE_QUERY_EFFECT_ADD = StateEffect.define<{ from: number; to: number | undefined }>({ map: (val, mapping) => ({ diff --git a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/QUERY_STATUS_GUTTER_EXTENSION.ts b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/QUERY_STATUS_GUTTER_EXTENSION.ts index 614f535137..c127da3c4f 100644 --- a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/QUERY_STATUS_GUTTER_EXTENSION.ts +++ b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/QUERY_STATUS_GUTTER_EXTENSION.ts @@ -12,7 +12,7 @@ type QueryGutterEffectType = 'run' | 'error'; const QUERY_STATUS_SIZE_MARKER = new (class extends GutterMarker {})(); const RUN_QUERY_MARKER = new (class extends GutterMarker { - toDOM(): Node { + override toDOM(): Node { const span = document.createElement('div'); span.className = 'running-query-line'; return span; @@ -20,7 +20,7 @@ const RUN_QUERY_MARKER = new (class extends GutterMarker { })(); const ERROR_QUERY_MARKER = new (class extends GutterMarker { - toDOM(): Node { + override toDOM(): Node { const span = document.createElement('div'); span.className = 'running-query-error-line'; return span; diff --git a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditor/SQLCodeEditorLoader.tsx b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditor/SQLCodeEditorLoader.tsx index 1c6cea1043..deb626b62d 100644 --- a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditor/SQLCodeEditorLoader.tsx +++ b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditor/SQLCodeEditorLoader.tsx @@ -12,7 +12,7 @@ import { ComplexLoader, createComplexLoader } from '@cloudbeaver/core-blocks'; import type { IDefaultExtensions, IEditorProps, IEditorRef } from '@cloudbeaver/plugin-codemirror6'; const loader = createComplexLoader(async function loader() { - const { SQLCodeEditor } = await import('./SQLCodeEditor'); + const { SQLCodeEditor } = await import('./SQLCodeEditor.js'); return { SQLCodeEditor }; }); diff --git a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditor/useSQLCodeEditor.ts b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditor/useSQLCodeEditor.ts index e7c55e9fd2..d0dc7b8967 100644 --- a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditor/useSQLCodeEditor.ts +++ b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditor/useSQLCodeEditor.ts @@ -10,8 +10,8 @@ import { observable } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; import type { EditorState, EditorView, IEditorRef } from '@cloudbeaver/plugin-codemirror6'; -import { clearActiveQueryHighlight, highlightActiveQuery } from '../ACTIVE_QUERY_EXTENSION'; -import { setGutter } from '../QUERY_STATUS_GUTTER_EXTENSION'; +import { clearActiveQueryHighlight, highlightActiveQuery } from '../ACTIVE_QUERY_EXTENSION.js'; +import { setGutter } from '../QUERY_STATUS_GUTTER_EXTENSION.js'; export interface IEditor { readonly view: EditorView | null; diff --git a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanel.tsx b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanel.tsx index f682806598..5838c196fb 100644 --- a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanel.tsx +++ b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanel.tsx @@ -12,19 +12,19 @@ import { MenuBarSmallItem, useExecutor, useS, useTranslate } from '@cloudbeaver/ import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { DATA_CONTEXT_NAV_NODE, getNodesFromContext, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; -import { TabContainerPanelComponent, useDNDBox } from '@cloudbeaver/core-ui'; -import { closeCompletion, IEditorRef, Prec, ReactCodemirrorPanel, useCodemirrorExtensions } from '@cloudbeaver/plugin-codemirror6'; +import { type TabContainerPanelComponent, useDNDBox } from '@cloudbeaver/core-ui'; +import { closeCompletion, type IEditorRef, Prec, ReactCodemirrorPanel, useCodemirrorExtensions } from '@cloudbeaver/plugin-codemirror6'; import type { ISqlEditorModeProps } from '@cloudbeaver/plugin-sql-editor'; -import { ACTIVE_QUERY_EXTENSION } from '../ACTIVE_QUERY_EXTENSION'; -import { QUERY_STATUS_GUTTER_EXTENSION } from '../QUERY_STATUS_GUTTER_EXTENSION'; -import { SQLCodeEditorLoader } from '../SQLCodeEditor/SQLCodeEditorLoader'; -import { useSQLCodeEditor } from '../SQLCodeEditor/useSQLCodeEditor'; -import { useSqlDialectAutocompletion } from '../useSqlDialectAutocompletion'; -import { useSqlDialectExtension } from '../useSqlDialectExtension'; +import { ACTIVE_QUERY_EXTENSION } from '../ACTIVE_QUERY_EXTENSION.js'; +import { QUERY_STATUS_GUTTER_EXTENSION } from '../QUERY_STATUS_GUTTER_EXTENSION.js'; +import { SQLCodeEditorLoader } from '../SQLCodeEditor/SQLCodeEditorLoader.js'; +import { useSQLCodeEditor } from '../SQLCodeEditor/useSQLCodeEditor.js'; +import { useSqlDialectAutocompletion } from '../useSqlDialectAutocompletion.js'; +import { useSqlDialectExtension } from '../useSqlDialectExtension.js'; import style from './SQLCodeEditorPanel.module.css'; -import { SqlEditorInfoBar } from './SqlEditorInfoBar'; -import { useSQLCodeEditorPanel } from './useSQLCodeEditorPanel'; +import { SqlEditorInfoBar } from './SqlEditorInfoBar.js'; +import { useSQLCodeEditorPanel } from './useSQLCodeEditorPanel.js'; export const SQLCodeEditorPanel: TabContainerPanelComponent = observer(function SQLCodeEditorPanel({ data }) { const notificationService = useService(NotificationService); @@ -101,7 +101,7 @@ export const SQLCodeEditorPanel: TabContainerPanelComponent } return ( -
+
data.value} @@ -119,12 +119,12 @@ export const SQLCodeEditorPanel: TabContainerPanelComponent > {data.isIncomingChanges && ( <> - + {translate('plugin_sql_editor_new_merge_conflict_keep_current_label')} - + {translate('plugin_sql_editor_new_merge_conflict_accept_incoming_label')} diff --git a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanelService.ts b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanelService.ts index fe3a087017..ace762842a 100644 --- a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanelService.ts +++ b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanelService.ts @@ -9,7 +9,7 @@ import { importLazyComponent } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; import { ESqlDataSourceFeatures, SqlEditorModeService } from '@cloudbeaver/plugin-sql-editor'; -const SQLCodeEditorPanel = importLazyComponent(() => import('./SQLCodeEditorPanel').then(module => module.SQLCodeEditorPanel)); +const SQLCodeEditorPanel = importLazyComponent(() => import('./SQLCodeEditorPanel.js').then(module => module.SQLCodeEditorPanel)); @injectable() export class SQLCodeEditorPanelService { diff --git a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/useSQLCodeEditorPanel.ts b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/useSQLCodeEditorPanel.ts index 313ad44b18..8105034b62 100644 --- a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/useSQLCodeEditorPanel.ts +++ b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/SQLCodeEditorPanel/useSQLCodeEditorPanel.ts @@ -12,7 +12,7 @@ import { useExecutor, useObservableRef } from '@cloudbeaver/core-blocks'; import { throttle } from '@cloudbeaver/core-utils'; import type { ISQLEditorData } from '@cloudbeaver/plugin-sql-editor'; -import type { IEditor } from '../SQLCodeEditor/useSQLCodeEditor'; +import type { IEditor } from '../SQLCodeEditor/useSQLCodeEditor.js'; interface State { highlightActiveQuery: () => void; diff --git a/webapp/packages/plugin-sql-editor-new/src/index.ts b/webapp/packages/plugin-sql-editor-new/src/index.ts index 1871f16af4..54b859f260 100644 --- a/webapp/packages/plugin-sql-editor-new/src/index.ts +++ b/webapp/packages/plugin-sql-editor-new/src/index.ts @@ -1,7 +1,14 @@ -import { sqlEditorNewPlugin } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { sqlEditorNewPlugin } from './manifest.js'; export default sqlEditorNewPlugin; -export * from './SQLEditor/SQLCodeEditor/SQLCodeEditorLoader'; -export * from './SQLEditor/useSqlDialectAutocompletion'; -export * from './SQLEditor/useSqlDialectExtension'; +export * from './SQLEditor/SQLCodeEditor/SQLCodeEditorLoader.js'; +export * from './SQLEditor/useSqlDialectAutocompletion.js'; +export * from './SQLEditor/useSqlDialectExtension.js'; diff --git a/webapp/packages/plugin-sql-editor-new/src/manifest.ts b/webapp/packages/plugin-sql-editor-new/src/manifest.ts index ec6340211c..691628c474 100644 --- a/webapp/packages/plugin-sql-editor-new/src/manifest.ts +++ b/webapp/packages/plugin-sql-editor-new/src/manifest.ts @@ -13,8 +13,8 @@ export const sqlEditorNewPlugin: PluginManifest = { }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanelService').then(m => m.SQLCodeEditorPanelService), - () => import('./LocaleService').then(m => m.LocaleService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./SQLEditor/SQLCodeEditorPanel/SQLCodeEditorPanelService.js').then(m => m.SQLCodeEditorPanelService), + () => import('./LocaleService.js').then(m => m.LocaleService), ], }; diff --git a/webapp/packages/plugin-sql-editor-screen/package.json b/webapp/packages/plugin-sql-editor-screen/package.json index ce3c4e7458..9d4d5e4f23 100644 --- a/webapp/packages/plugin-sql-editor-screen/package.json +++ b/webapp/packages/plugin-sql-editor-screen/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-sql-editor-screen", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-sql-editor-screen/src/LocaleService.ts b/webapp/packages/plugin-sql-editor-screen/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-sql-editor-screen/src/LocaleService.ts +++ b/webapp/packages/plugin-sql-editor-screen/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-sql-editor-screen/src/PluginBootstrap.ts b/webapp/packages/plugin-sql-editor-screen/src/PluginBootstrap.ts index 8c238efc4e..0a4ff6c443 100644 --- a/webapp/packages/plugin-sql-editor-screen/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-sql-editor-screen/src/PluginBootstrap.ts @@ -9,11 +9,11 @@ import type { IDataContextProvider } from '@cloudbeaver/core-data-context'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { MENU_TAB } from '@cloudbeaver/core-ui'; -import { ACTION_OPEN_IN_TAB, ActionService, IAction, KEY_BINDING_OPEN_IN_TAB, KeyBindingService, MenuService } from '@cloudbeaver/core-view'; +import { ACTION_OPEN_IN_TAB, ActionService, type IAction, KEY_BINDING_OPEN_IN_TAB, KeyBindingService, MenuService } from '@cloudbeaver/core-view'; import { DATA_CONTEXT_SQL_EDITOR_STATE, SqlDataSourceService } from '@cloudbeaver/plugin-sql-editor'; import { DATA_CONTEXT_SQL_EDITOR_TAB } from '@cloudbeaver/plugin-sql-editor-navigation-tab'; -import { SqlEditorScreenService } from './Screen/SqlEditorScreenService'; +import { SqlEditorScreenService } from './Screen/SqlEditorScreenService.js'; @injectable() export class PluginBootstrap extends Bootstrap { @@ -28,7 +28,7 @@ export class PluginBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.actionService.addHandler({ id: 'sql-editor-screen', actions: [ACTION_OPEN_IN_TAB], diff --git a/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreen.tsx b/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreen.tsx index aa505ef4b2..00b7adaec2 100644 --- a/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreen.tsx +++ b/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreen.tsx @@ -12,15 +12,15 @@ import { Loader, TextPlaceholder, useObservableRef, useResource, useTranslate } import { ConnectionExecutionContextResource, ConnectionExecutionContextService, - IConnectionExecutionContextInfo, + type IConnectionExecutionContextInfo, } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import type { ScreenComponent } from '@cloudbeaver/core-routing'; import { uuid } from '@cloudbeaver/core-utils'; -import { ISqlEditorTabState, MemorySqlDataSource, SqlDataSourceService, SqlEditor, SqlEditorService } from '@cloudbeaver/plugin-sql-editor'; +import { type ISqlEditorTabState, MemorySqlDataSource, SqlDataSourceService, SqlEditor, SqlEditorService } from '@cloudbeaver/plugin-sql-editor'; -import type { ISqlEditorScreenParams } from './ISqlEditorScreenParams'; +import type { ISqlEditorScreenParams } from './ISqlEditorScreenParams.js'; export const SqlEditorScreen: ScreenComponent = observer(function SqlEditorScreen({ contextId }) { const translate = useTranslate(); diff --git a/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreenBootstrap.ts b/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreenBootstrap.ts index c5c5dc91bf..d4a372ae4f 100644 --- a/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreenBootstrap.ts +++ b/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreenBootstrap.ts @@ -8,17 +8,18 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ScreenService } from '@cloudbeaver/core-routing'; -import { SqlEditorScreenService } from './SqlEditorScreenService'; +import { SqlEditorScreenService } from './SqlEditorScreenService.js'; @injectable() export class SqlEditorScreenBootstrap extends Bootstrap { - constructor(private readonly screenService: ScreenService, private readonly sqlEditorScreenService: SqlEditorScreenService) { + constructor( + private readonly screenService: ScreenService, + private readonly sqlEditorScreenService: SqlEditorScreenService, + ) { super(); } - register(): void { + override register(): void { this.screenService.create(this.sqlEditorScreenService.screen); } - - load(): void | Promise {} } diff --git a/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreenService.ts b/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreenService.ts index 76dc49af42..3663a555bb 100644 --- a/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreenService.ts +++ b/webapp/packages/plugin-sql-editor-screen/src/Screen/SqlEditorScreenService.ts @@ -6,10 +6,10 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { IScreen, ScreenService } from '@cloudbeaver/core-routing'; +import { type IScreen, ScreenService } from '@cloudbeaver/core-routing'; -import type { ISqlEditorScreenParams } from './ISqlEditorScreenParams'; -import { SqlEditorScreen } from './SqlEditorScreen'; +import type { ISqlEditorScreenParams } from './ISqlEditorScreenParams.js'; +import { SqlEditorScreen } from './SqlEditorScreen.js'; @injectable() export class SqlEditorScreenService { diff --git a/webapp/packages/plugin-sql-editor-screen/src/index.ts b/webapp/packages/plugin-sql-editor-screen/src/index.ts index ee6c8b0bda..65a141496f 100644 --- a/webapp/packages/plugin-sql-editor-screen/src/index.ts +++ b/webapp/packages/plugin-sql-editor-screen/src/index.ts @@ -1,3 +1,10 @@ -import { sqlEditorPagePluginManifest } from './manifest'; +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { sqlEditorPagePluginManifest } from './manifest.js'; export default sqlEditorPagePluginManifest; diff --git a/webapp/packages/plugin-sql-editor-screen/src/manifest.ts b/webapp/packages/plugin-sql-editor-screen/src/manifest.ts index e8693522bf..c5bb2e82d3 100644 --- a/webapp/packages/plugin-sql-editor-screen/src/manifest.ts +++ b/webapp/packages/plugin-sql-editor-screen/src/manifest.ts @@ -13,9 +13,9 @@ export const sqlEditorPagePluginManifest: PluginManifest = { }, providers: [ - () => import('./PluginBootstrap').then(m => m.PluginBootstrap), - () => import('./LocaleService').then(m => m.LocaleService), - () => import('./Screen/SqlEditorScreenBootstrap').then(m => m.SqlEditorScreenBootstrap), - () => import('./Screen/SqlEditorScreenService').then(m => m.SqlEditorScreenService), + () => import('./PluginBootstrap.js').then(m => m.PluginBootstrap), + () => import('./LocaleService.js').then(m => m.LocaleService), + () => import('./Screen/SqlEditorScreenBootstrap.js').then(m => m.SqlEditorScreenBootstrap), + () => import('./Screen/SqlEditorScreenService.js').then(m => m.SqlEditorScreenService), ], }; diff --git a/webapp/packages/plugin-sql-editor/package.json b/webapp/packages/plugin-sql-editor/package.json index 350d5bc8b7..9b2ec4b43e 100644 --- a/webapp/packages/plugin-sql-editor/package.json +++ b/webapp/packages/plugin-sql-editor/package.json @@ -1,5 +1,6 @@ { "name": "@cloudbeaver/plugin-sql-editor", + "type": "module", "sideEffects": [ "src/**/*.css", "src/**/*.scss", diff --git a/webapp/packages/plugin-sql-editor/src/DATA_CONTEXT_SQL_EDITOR_STATE.ts b/webapp/packages/plugin-sql-editor/src/DATA_CONTEXT_SQL_EDITOR_STATE.ts index caed3f4722..306c7a1772 100644 --- a/webapp/packages/plugin-sql-editor/src/DATA_CONTEXT_SQL_EDITOR_STATE.ts +++ b/webapp/packages/plugin-sql-editor/src/DATA_CONTEXT_SQL_EDITOR_STATE.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { ISqlEditorTabState } from './ISqlEditorTabState'; +import type { ISqlEditorTabState } from './ISqlEditorTabState.js'; export const DATA_CONTEXT_SQL_EDITOR_STATE = createDataContext('sql-editor-state'); diff --git a/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts b/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts index a89184dbe7..4cb87b9f42 100644 --- a/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts +++ b/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts @@ -7,7 +7,7 @@ */ import { schema } from '@cloudbeaver/core-utils'; -import { OUTPUT_LOG_TYPES } from './SqlResultTabs/OutputLogs/IOutputLogTypes'; +import { OUTPUT_LOG_TYPES } from './SqlResultTabs/OutputLogs/IOutputLogTypes.js'; export const RESULT_TAB_SCHEMA = schema.object({ tabId: schema.string(), diff --git a/webapp/packages/plugin-sql-editor/src/LocaleService.ts b/webapp/packages/plugin-sql-editor/src/LocaleService.ts index f8618985f9..a55cfec20e 100644 --- a/webapp/packages/plugin-sql-editor/src/LocaleService.ts +++ b/webapp/packages/plugin-sql-editor/src/LocaleService.ts @@ -14,24 +14,22 @@ export class LocaleService extends Bootstrap { super(); } - register(): void | Promise { + override register(): void { this.localizationService.addProvider(this.provider.bind(this)); } - load(): void | Promise {} - private async provider(locale: string) { switch (locale) { case 'ru': - return (await import('./locales/ru')).default; + return (await import('./locales/ru.js')).default; case 'it': - return (await import('./locales/it')).default; + return (await import('./locales/it.js')).default; case 'zh': - return (await import('./locales/zh')).default; + return (await import('./locales/zh.js')).default; case 'fr': - return (await import('./locales/fr')).default; + return (await import('./locales/fr.js')).default; default: - return (await import('./locales/en')).default; + return (await import('./locales/en.js')).default; } } } diff --git a/webapp/packages/plugin-sql-editor/src/MenuBootstrap.ts b/webapp/packages/plugin-sql-editor/src/MenuBootstrap.ts index 1087c98d20..96b333b8e8 100644 --- a/webapp/packages/plugin-sql-editor/src/MenuBootstrap.ts +++ b/webapp/packages/plugin-sql-editor/src/MenuBootstrap.ts @@ -14,7 +14,7 @@ import { ACTION_SAVE, ACTION_UNDO, ActionService, - IAction, + type IAction, KEY_BINDING_REDO, KEY_BINDING_SAVE, KEY_BINDING_UNDO, @@ -22,22 +22,22 @@ import { MenuService, } from '@cloudbeaver/core-view'; -import { ACTION_SQL_EDITOR_EXECUTE } from './actions/ACTION_SQL_EDITOR_EXECUTE'; -import { ACTION_SQL_EDITOR_EXECUTE_NEW } from './actions/ACTION_SQL_EDITOR_EXECUTE_NEW'; -import { ACTION_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/ACTION_SQL_EDITOR_EXECUTE_SCRIPT'; -import { ACTION_SQL_EDITOR_FORMAT } from './actions/ACTION_SQL_EDITOR_FORMAT'; -import { ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN'; -import { ACTION_SQL_EDITOR_SHOW_OUTPUT } from './actions/ACTION_SQL_EDITOR_SHOW_OUTPUT'; -import { KEY_BINDING_SQL_EDITOR_EXECUTE } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE'; -import { KEY_BINDING_SQL_EDITOR_EXECUTE_NEW } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE_NEW'; -import { KEY_BINDING_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE_SCRIPT'; -import { KEY_BINDING_SQL_EDITOR_FORMAT } from './actions/bindings/KEY_BINDING_SQL_EDITOR_FORMAT'; -import { KEY_BINDING_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_EXECUTION_PLAN'; -import { DATA_CONTEXT_SQL_EDITOR_STATE } from './DATA_CONTEXT_SQL_EDITOR_STATE'; -import { ESqlDataSourceFeatures } from './SqlDataSource/ESqlDataSourceFeatures'; -import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService'; -import { DATA_CONTEXT_SQL_EDITOR_DATA } from './SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA'; -import { SQL_EDITOR_TOOLS_MENU } from './SqlEditor/SQL_EDITOR_TOOLS_MENU'; +import { ACTION_SQL_EDITOR_EXECUTE } from './actions/ACTION_SQL_EDITOR_EXECUTE.js'; +import { ACTION_SQL_EDITOR_EXECUTE_NEW } from './actions/ACTION_SQL_EDITOR_EXECUTE_NEW.js'; +import { ACTION_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/ACTION_SQL_EDITOR_EXECUTE_SCRIPT.js'; +import { ACTION_SQL_EDITOR_FORMAT } from './actions/ACTION_SQL_EDITOR_FORMAT.js'; +import { ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN.js'; +import { ACTION_SQL_EDITOR_SHOW_OUTPUT } from './actions/ACTION_SQL_EDITOR_SHOW_OUTPUT.js'; +import { KEY_BINDING_SQL_EDITOR_EXECUTE } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE.js'; +import { KEY_BINDING_SQL_EDITOR_EXECUTE_NEW } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE_NEW.js'; +import { KEY_BINDING_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE_SCRIPT.js'; +import { KEY_BINDING_SQL_EDITOR_FORMAT } from './actions/bindings/KEY_BINDING_SQL_EDITOR_FORMAT.js'; +import { KEY_BINDING_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_EXECUTION_PLAN.js'; +import { DATA_CONTEXT_SQL_EDITOR_STATE } from './DATA_CONTEXT_SQL_EDITOR_STATE.js'; +import { ESqlDataSourceFeatures } from './SqlDataSource/ESqlDataSourceFeatures.js'; +import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService.js'; +import { DATA_CONTEXT_SQL_EDITOR_DATA } from './SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA.js'; +import { SQL_EDITOR_TOOLS_MENU } from './SqlEditor/SQL_EDITOR_TOOLS_MENU.js'; const SYNC_DELAY = 5 * 60 * 1000; @@ -53,7 +53,7 @@ export class MenuBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.windowEventsService.onFocusChange.addHandler(throttle(this.focusChangeHandler.bind(this), SYNC_DELAY, false)); this.actionService.addHandler({ id: 'sql-editor-base-handler', diff --git a/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts b/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts index 14723be1b6..4da5c9d2e6 100644 --- a/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts +++ b/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts @@ -14,17 +14,17 @@ import { AsyncTaskInfoService, GraphQLService, ResultDataFormat, - SqlExecuteInfo, - SqlQueryResults, - UpdateResultsDataBatchMutationVariables, + type SqlExecuteInfo, + type SqlQueryResults, + type UpdateResultsDataBatchMutationVariables, } from '@cloudbeaver/core-sdk'; import { uuid } from '@cloudbeaver/core-utils'; import { DocumentEditAction, - IDatabaseDataOptions, - IDatabaseResultSet, - IRequestInfo, - IResultSetBlobValue, + type IDatabaseDataOptions, + type IDatabaseResultSet, + type IRequestInfo, + type IResultSetBlobValue, ResultSetDataSource, ResultSetEditAction, } from '@cloudbeaver/plugin-data-viewer'; @@ -39,18 +39,18 @@ export interface IQueryRequestInfo extends IRequestInfo { export class QueryDataSource extends ResultSetDataSource { currentTask: ITask | null; - requestInfo: IQueryRequestInfo; + override requestInfo: IQueryRequestInfo; - get canCancel(): boolean { + override get canCancel(): boolean { return this.currentTask?.cancellable || false; } - get cancelled(): boolean { + override get cancelled(): boolean { return this.currentTask?.cancelled || false; } constructor( - readonly serviceProvider: IServiceProvider, + override readonly serviceProvider: IServiceProvider, graphQLService: GraphQLService, asyncTaskInfoService: AsyncTaskInfoService, ) { @@ -71,11 +71,11 @@ export class QueryDataSource { + override async cancel(): Promise { await super.cancel(); await this.currentTask?.cancel(); } @@ -153,7 +153,7 @@ export class QueryDataSource import('./SqlEditor').then(m => m.SqlEditor)); +export const SqlEditor = importLazyComponent(() => import('./SqlEditor.js').then(m => m.SqlEditor)); diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/BaseSqlDataSource.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/BaseSqlDataSource.ts index 8dc6b2345e..0b1d6d4ee6 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/BaseSqlDataSource.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/BaseSqlDataSource.ts @@ -8,15 +8,15 @@ import { action, computed, makeObservable, observable, toJS } from 'mobx'; import type { IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; import { isContainsException, isValuesEqual, staticImplements } from '@cloudbeaver/core-utils'; import type { IDatabaseDataModel } from '@cloudbeaver/plugin-data-viewer'; -import type { QueryDataSource } from '../QueryDataSource'; -import { ESqlDataSourceFeatures } from './ESqlDataSourceFeatures'; -import type { ISetScriptData, ISqlDataSource, ISqlDataSourceKey, ISqlEditorCursor } from './ISqlDataSource'; -import type { ISqlDataSourceHistory } from './SqlDataSourceHistory/ISqlDataSourceHistory'; -import { SqlDataSourceHistory } from './SqlDataSourceHistory/SqlDataSourceHistory'; +import type { QueryDataSource } from '../QueryDataSource.js'; +import { ESqlDataSourceFeatures } from './ESqlDataSourceFeatures.js'; +import type { ISetScriptData, ISqlDataSource, ISqlDataSourceKey, ISqlEditorCursor } from './ISqlDataSource.js'; +import type { ISqlDataSourceHistory } from './SqlDataSourceHistory/ISqlDataSourceHistory.js'; +import { SqlDataSourceHistory } from './SqlDataSourceHistory/SqlDataSourceHistory.js'; const SOURCE_HISTORY = 'history'; diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/ISqlDataSource.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/ISqlDataSource.ts index 8ad62380b4..d509f0f5ba 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/ISqlDataSource.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/ISqlDataSource.ts @@ -10,9 +10,9 @@ import type { ISyncExecutor } from '@cloudbeaver/core-executor'; import type { ILoadableState } from '@cloudbeaver/core-utils'; import type { IDatabaseDataModel } from '@cloudbeaver/plugin-data-viewer'; -import type { QueryDataSource } from '../QueryDataSource'; -import type { ESqlDataSourceFeatures } from './ESqlDataSourceFeatures'; -import type { ISqlDataSourceHistory } from './SqlDataSourceHistory/ISqlDataSourceHistory'; +import type { QueryDataSource } from '../QueryDataSource.js'; +import type { ESqlDataSourceFeatures } from './ESqlDataSourceFeatures.js'; +import type { ISqlDataSourceHistory } from './SqlDataSourceHistory/ISqlDataSourceHistory.js'; export interface ISqlDataSourceKey { readonly key: string; diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/ILocalStorageSqlDataSourceState.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/ILocalStorageSqlDataSourceState.ts index 29f0478b01..f109d9f534 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/ILocalStorageSqlDataSourceState.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/ILocalStorageSqlDataSourceState.ts @@ -7,7 +7,7 @@ */ import type { IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; -import type { ISqlDataSourceHistoryState } from '../SqlDataSourceHistory/ISqlDataSourceHistoryState'; +import type { ISqlDataSourceHistoryState } from '../SqlDataSourceHistory/ISqlDataSourceHistoryState.js'; export interface ILocalStorageSqlDataSourceState { script: string; diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/LocalStorageSqlDataSource.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/LocalStorageSqlDataSource.ts index e5d03c6038..ea86c489b6 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/LocalStorageSqlDataSource.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/LocalStorageSqlDataSource.ts @@ -9,9 +9,9 @@ import { computed, makeObservable, observable } from 'mobx'; import type { IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; -import { BaseSqlDataSource } from '../BaseSqlDataSource'; -import { ESqlDataSourceFeatures } from '../ESqlDataSourceFeatures'; -import type { ILocalStorageSqlDataSourceState } from './ILocalStorageSqlDataSourceState'; +import { BaseSqlDataSource } from '../BaseSqlDataSource.js'; +import { ESqlDataSourceFeatures } from '../ESqlDataSourceFeatures.js'; +import type { ILocalStorageSqlDataSourceState } from './ILocalStorageSqlDataSourceState.js'; export class LocalStorageSqlDataSource extends BaseSqlDataSource { get baseScript(): string { @@ -22,7 +22,7 @@ export class LocalStorageSqlDataSource extends BaseSqlDataSource { return this.state.executionContext; } - static key = 'local-storage'; + static override key = 'local-storage'; get name(): string | null { return this.state.name ?? null; @@ -36,15 +36,15 @@ export class LocalStorageSqlDataSource extends BaseSqlDataSource { return this.state.executionContext; } - get features(): ESqlDataSourceFeatures[] { + override get features(): ESqlDataSourceFeatures[] { return [ESqlDataSourceFeatures.script, ESqlDataSourceFeatures.query, ESqlDataSourceFeatures.executable, ESqlDataSourceFeatures.setName]; } - get isSaved(): boolean { + override get isSaved(): boolean { return true; } - get projectId(): string | null { + override get projectId(): string | null { // we will be able to attach any connection from any project return null; } @@ -62,11 +62,11 @@ export class LocalStorageSqlDataSource extends BaseSqlDataSource { }); } - isReadonly(): boolean { + override isReadonly(): boolean { return false; } - setName(name: string | null): void { + override setName(name: string | null): void { this.state.name = name ?? undefined; super.setName(name); } @@ -75,12 +75,12 @@ export class LocalStorageSqlDataSource extends BaseSqlDataSource { return true; } - setScript(script: string): void { + override setScript(script: string): void { this.state.script = script; super.setScript(script); } - setExecutionContext(executionContext?: IConnectionExecutionContextInfo): void { + override setExecutionContext(executionContext?: IConnectionExecutionContextInfo): void { this.state.executionContext = executionContext; super.setExecutionContext(executionContext); } diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/LocalStorageSqlDataSourceBootstrap.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/LocalStorageSqlDataSourceBootstrap.ts index 8e141e8b2d..eca66e4a6f 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/LocalStorageSqlDataSourceBootstrap.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/LocalStorage/LocalStorageSqlDataSourceBootstrap.ts @@ -10,11 +10,11 @@ import { action, makeObservable, observable } from 'mobx'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { StorageService } from '@cloudbeaver/core-storage'; -import { createSqlDataSourceHistoryInitialState } from '../SqlDataSourceHistory/createSqlDataSourceHistoryInitialState'; -import { validateSqlDataSourceHistoryState } from '../SqlDataSourceHistory/validateSqlDataSourceHistoryState'; -import { ISqlDataSourceOptions, SqlDataSourceService } from '../SqlDataSourceService'; -import type { ILocalStorageSqlDataSourceState } from './ILocalStorageSqlDataSourceState'; -import { LocalStorageSqlDataSource } from './LocalStorageSqlDataSource'; +import { createSqlDataSourceHistoryInitialState } from '../SqlDataSourceHistory/createSqlDataSourceHistoryInitialState.js'; +import { validateSqlDataSourceHistoryState } from '../SqlDataSourceHistory/validateSqlDataSourceHistoryState.js'; +import { type ISqlDataSourceOptions, SqlDataSourceService } from '../SqlDataSourceService.js'; +import type { ILocalStorageSqlDataSourceState } from './ILocalStorageSqlDataSourceState.js'; +import { LocalStorageSqlDataSource } from './LocalStorageSqlDataSource.js'; const localStorageKey = 'local-storage-sql-data-source'; @@ -65,7 +65,7 @@ export class LocalStorageSqlDataSourceBootstrap extends Bootstrap { ); } - register(): void | Promise { + override register(): void | Promise { this.sqlDataSourceService.register({ key: LocalStorageSqlDataSource.key, getDataSource: (editorId, options) => new LocalStorageSqlDataSource(this.createState(editorId, options)), @@ -73,8 +73,6 @@ export class LocalStorageSqlDataSourceBootstrap extends Bootstrap { }); } - load(): void | Promise {} - private createState(editorId: string, options?: ISqlDataSourceOptions): ILocalStorageSqlDataSourceState { let state = this.dataSourceStateState.get(editorId); diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/MemorySqlDataSource.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/MemorySqlDataSource.ts index fdfb84817c..7bb79ec64a 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/MemorySqlDataSource.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/MemorySqlDataSource.ts @@ -9,8 +9,8 @@ import { computed, makeObservable, observable } from 'mobx'; import type { IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; -import { BaseSqlDataSource } from './BaseSqlDataSource'; -import { ESqlDataSourceFeatures } from './ESqlDataSourceFeatures'; +import { BaseSqlDataSource } from './BaseSqlDataSource.js'; +import { ESqlDataSourceFeatures } from './ESqlDataSourceFeatures.js'; export class MemorySqlDataSource extends BaseSqlDataSource { get baseScript(): string { @@ -19,7 +19,7 @@ export class MemorySqlDataSource extends BaseSqlDataSource { get baseExecutionContext(): IConnectionExecutionContextInfo | undefined { return this._executionContext; } - static key = 'memory'; + static override key = 'memory'; get name(): string | null { return this._name; @@ -33,15 +33,15 @@ export class MemorySqlDataSource extends BaseSqlDataSource { return this._executionContext; } - get features(): ESqlDataSourceFeatures[] { + override get features(): ESqlDataSourceFeatures[] { return [ESqlDataSourceFeatures.script, ESqlDataSourceFeatures.query, ESqlDataSourceFeatures.executable, ESqlDataSourceFeatures.setName]; } - get isSaved(): boolean { + override get isSaved(): boolean { return true; } - get projectId(): string | null { + override get projectId(): string | null { // we will be able to attach any connection from any project return null; } @@ -65,21 +65,21 @@ export class MemorySqlDataSource extends BaseSqlDataSource { }); } - isReadonly(): boolean { + override isReadonly(): boolean { return false; } - setScript(script: string): void { + override setScript(script: string): void { this._script = script; super.setScript(script); } - setExecutionContext(executionContext?: IConnectionExecutionContextInfo): void { + override setExecutionContext(executionContext?: IConnectionExecutionContextInfo): void { this._executionContext = executionContext; super.setExecutionContext(executionContext); } - setName(name: string | null): void { + override setName(name: string | null): void { this._name = name; super.setName(name); } diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/ISqlDataSourceHistory.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/ISqlDataSourceHistory.ts index 4e1422bc00..f80e035bf3 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/ISqlDataSourceHistory.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/ISqlDataSourceHistory.ts @@ -7,7 +7,7 @@ */ import type { ISyncExecutor } from '@cloudbeaver/core-executor'; -import type { ISqlDataSourceHistoryState } from './ISqlDataSourceHistoryState'; +import type { ISqlDataSourceHistoryState } from './ISqlDataSourceHistoryState.js'; export interface ISqlDataSourceHistory { readonly state: ISqlDataSourceHistoryState; diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/ISqlDataSourceHistoryState.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/ISqlDataSourceHistoryState.ts index 03719f2107..76347f7e85 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/ISqlDataSourceHistoryState.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/ISqlDataSourceHistoryState.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ISqlDataSourceHistoryData } from './ISqlDataSourceHistoryData'; +import type { ISqlDataSourceHistoryData } from './ISqlDataSourceHistoryData.js'; export interface ISqlDataSourceHistoryState { history: ISqlDataSourceHistoryData[]; diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/SqlDataSourceHistory.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/SqlDataSourceHistory.ts index 2f1aa5da14..cc03554e5f 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/SqlDataSourceHistory.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/SqlDataSourceHistory.ts @@ -7,11 +7,11 @@ */ import { makeAutoObservable } from 'mobx'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; -import { createSqlDataSourceHistoryInitialState } from './createSqlDataSourceHistoryInitialState'; -import type { ISqlDataSourceHistory } from './ISqlDataSourceHistory'; -import type { ISqlDataSourceHistoryState } from './ISqlDataSourceHistoryState'; +import { createSqlDataSourceHistoryInitialState } from './createSqlDataSourceHistoryInitialState.js'; +import type { ISqlDataSourceHistory } from './ISqlDataSourceHistory.js'; +import type { ISqlDataSourceHistoryState } from './ISqlDataSourceHistoryState.js'; const HOT_HISTORY_SIZE = 30; const COMPRESSED_HISTORY_DELAY = 5000; @@ -31,7 +31,7 @@ export class SqlDataSourceHistory implements ISqlDataSourceHistory { add(value: string, source?: string): void { // skip history if value is the same as current - if (this.state.history[this.state.historyIndex].value === value) { + if (this.state.history[this.state.historyIndex]!.value === value) { return; } @@ -49,7 +49,7 @@ export class SqlDataSourceHistory implements ISqlDataSourceHistory { return; } this.state.historyIndex--; - const value = this.state.history[this.state.historyIndex].value; + const value = this.state.history[this.state.historyIndex]!.value; this.onNavigate.execute(value); } @@ -59,7 +59,7 @@ export class SqlDataSourceHistory implements ISqlDataSourceHistory { } this.state.historyIndex++; - const value = this.state.history[this.state.historyIndex].value; + const value = this.state.history[this.state.historyIndex]!.value; this.onNavigate.execute(value); } @@ -74,8 +74,8 @@ export class SqlDataSourceHistory implements ISqlDataSourceHistory { private compressHistory(): void { if (this.state.history.length > HOT_HISTORY_SIZE) { for (let i = this.state.history.length - HOT_HISTORY_SIZE; i > 1; i--) { - const prevEntity = this.state.history[i - 1]; - const entity = this.state.history[i]; + const prevEntity = this.state.history[i - 1]!; + const entity = this.state.history[i]!; if (prevEntity.timestamp === -1) { break; diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/createSqlDataSourceHistoryInitialState.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/createSqlDataSourceHistoryInitialState.ts index 76cface711..5dc7cfe9d4 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/createSqlDataSourceHistoryInitialState.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/createSqlDataSourceHistoryInitialState.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ISqlDataSourceHistoryState } from './ISqlDataSourceHistoryState'; +import type { ISqlDataSourceHistoryState } from './ISqlDataSourceHistoryState.js'; export function createSqlDataSourceHistoryInitialState(value = ''): ISqlDataSourceHistoryState { return { diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/validateSqlDataSourceHistoryData.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/validateSqlDataSourceHistoryData.ts index a0a0669bc9..38e0418422 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/validateSqlDataSourceHistoryData.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/validateSqlDataSourceHistoryData.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ISqlDataSourceHistoryData } from './ISqlDataSourceHistoryData'; +import type { ISqlDataSourceHistoryData } from './ISqlDataSourceHistoryData.js'; export function validateSqlDataSourceHistoryData(data: any): data is ISqlDataSourceHistoryData { return ( diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/validateSqlDataSourceHistoryState.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/validateSqlDataSourceHistoryState.ts index acc3634992..eb0376fdd5 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/validateSqlDataSourceHistoryState.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceHistory/validateSqlDataSourceHistoryState.ts @@ -5,8 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ISqlDataSourceHistoryState } from './ISqlDataSourceHistoryState'; -import { validateSqlDataSourceHistoryData } from './validateSqlDataSourceHistoryData'; +import type { ISqlDataSourceHistoryState } from './ISqlDataSourceHistoryState.js'; +import { validateSqlDataSourceHistoryData } from './validateSqlDataSourceHistoryData.js'; export function validateSqlDataSourceHistoryState(state: any): state is ISqlDataSourceHistoryState { return ( diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceService.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceService.ts index abd80476c4..fec3ea5f8a 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/SqlDataSourceService.ts @@ -9,11 +9,11 @@ import { action, computed, makeObservable, observable } from 'mobx'; import type { IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; -import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; +import { type ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor'; -import type { ISqlEditorTabState } from '../ISqlEditorTabState'; -import type { ISqlDataSource } from './ISqlDataSource'; -import { MemorySqlDataSource } from './MemorySqlDataSource'; +import type { ISqlEditorTabState } from '../ISqlEditorTabState.js'; +import type { ISqlDataSource } from './ISqlDataSource.js'; +import { MemorySqlDataSource } from './MemorySqlDataSource.js'; export interface ISqlDataSourceOptions { name?: string; diff --git a/webapp/packages/plugin-sql-editor/src/SqlDialectInfoService.ts b/webapp/packages/plugin-sql-editor/src/SqlDialectInfoService.ts index f583a1861f..3ce893192f 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDialectInfoService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDialectInfoService.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { ConnectionDialectResource, IConnectionExecutionContextInfo, IConnectionInfoParams } from '@cloudbeaver/core-connections'; +import { ConnectionDialectResource, type IConnectionExecutionContextInfo, type IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import type { SqlDialectInfo } from '@cloudbeaver/core-sdk'; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx index 1d5c2c70ea..e3dd6cc827 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx @@ -11,16 +11,16 @@ import { Loader, Pane, ResizerControls, s, Split, useS, useSplitUserState } from import { useService } from '@cloudbeaver/core-di'; import { CaptureView } from '@cloudbeaver/core-view'; -import type { ISqlEditorTabState } from './ISqlEditorTabState'; -import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService'; +import type { ISqlEditorTabState } from './ISqlEditorTabState.js'; +import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService.js'; import style from './SqlEditor.module.css'; -import { SqlEditorLoader } from './SqlEditor/SqlEditorLoader'; -import { SqlEditorOpenOverlay } from './SqlEditorOpenOverlay'; -import { SqlEditorOverlay } from './SqlEditorOverlay'; -import { SqlEditorStatusBar } from './SqlEditorStatusBar'; -import { SqlEditorView } from './SqlEditorView'; -import { SqlResultTabs } from './SqlResultTabs/SqlResultTabs'; -import { useDataSource } from './useDataSource'; +import { SqlEditorLoader } from './SqlEditor/SqlEditorLoader.js'; +import { SqlEditorOpenOverlay } from './SqlEditorOpenOverlay.js'; +import { SqlEditorOverlay } from './SqlEditorOverlay.js'; +import { SqlEditorStatusBar } from './SqlEditorStatusBar.js'; +import { SqlEditorView } from './SqlEditorView.js'; +import { SqlResultTabs } from './SqlResultTabs/SqlResultTabs.js'; +import { useDataSource } from './useDataSource.js'; export interface SqlEditorProps { state: ISqlEditorTabState; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA.ts b/webapp/packages/plugin-sql-editor/src/SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA.ts index 83a865a4e3..5cc63c3b81 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { ISQLEditorData } from './ISQLEditorData'; +import type { ISQLEditorData } from './ISQLEditorData.js'; export const DATA_CONTEXT_SQL_EDITOR_DATA = createDataContext('sql-editor-data'); diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/ISQLEditorData.ts b/webapp/packages/plugin-sql-editor/src/SqlEditor/ISQLEditorData.ts index 185938782d..844a3db034 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/ISQLEditorData.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/ISQLEditorData.ts @@ -8,10 +8,10 @@ import type { ISyncExecutor } from '@cloudbeaver/core-executor'; import type { SqlDialectInfo } from '@cloudbeaver/core-sdk'; -import type { ISqlDataSource, ISqlEditorCursor } from '../SqlDataSource/ISqlDataSource'; -import type { SQLProposal } from '../SqlEditorService'; -import type { ISQLScriptSegment, SQLParser } from '../SQLParser'; -import type { ISQLEditorMode } from './SQLEditorModeContext'; +import type { ISqlDataSource, ISqlEditorCursor } from '../SqlDataSource/ISqlDataSource.js'; +import type { SQLProposal } from '../SqlEditorService.js'; +import type { ISQLScriptSegment, SQLParser } from '../SQLParser.js'; +import type { ISQLEditorMode } from './SQLEditorModeContext.js'; export interface ISegmentExecutionData { segment: ISQLScriptSegment; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/ISqlEditorProps.ts b/webapp/packages/plugin-sql-editor/src/SqlEditor/ISqlEditorProps.ts index a6251e32cf..d6fa31b14b 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/ISqlEditorProps.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/ISqlEditorProps.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ISqlEditorTabState } from '../ISqlEditorTabState'; +import type { ISqlEditorTabState } from '../ISqlEditorTabState.js'; export interface ISqlEditorProps { state: ISqlEditorTabState; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLEditorActions.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLEditorActions.tsx index 64f8421231..c6a4868fcf 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLEditorActions.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLEditorActions.tsx @@ -9,12 +9,12 @@ import { observer } from 'mobx-react-lite'; import { ActionIconButton, getComputed, preventFocusHandler, s, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import type { ISqlEditorTabState } from '../ISqlEditorTabState'; -import { ESqlDataSourceFeatures } from '../SqlDataSource/ESqlDataSourceFeatures'; -import type { ISQLEditorData } from './ISQLEditorData'; +import type { ISqlEditorTabState } from '../ISqlEditorTabState.js'; +import { ESqlDataSourceFeatures } from '../SqlDataSource/ESqlDataSourceFeatures.js'; +import type { ISQLEditorData } from './ISQLEditorData.js'; import style from './SQLEditorActions.module.css'; -import { SqlEditorActionsMenu } from './SqlEditorActionsMenu'; -import { SqlEditorTools } from './SqlEditorTools'; +import { SqlEditorActionsMenu } from './SqlEditorActionsMenu.js'; +import { SqlEditorTools } from './SqlEditorTools.js'; interface Props { data: ISQLEditorData; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLEditorModeContext.ts b/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLEditorModeContext.ts index a0240c3f8e..f1b851f72a 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLEditorModeContext.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLEditorModeContext.ts @@ -7,8 +7,8 @@ */ import type { ISyncContextLoader } from '@cloudbeaver/core-executor'; -import type { ISQLScriptSegment } from '../SQLParser'; -import type { ISQLEditorData } from './ISQLEditorData'; +import type { ISQLScriptSegment } from '../SQLParser.js'; +import type { ISQLEditorData } from './ISQLEditorData.js'; export interface ISQLEditorMode { activeSegment: ISQLScriptSegment | undefined; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditor.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditor.tsx index 0f37a9af52..fa702c62b0 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditor.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditor.tsx @@ -8,20 +8,20 @@ import { observer } from 'mobx-react-lite'; import { useEffect, useMemo, useState } from 'react'; -import { getComputed, s, SContext, StyleRegistry, useS, useSplit } from '@cloudbeaver/core-blocks'; +import { getComputed, s, SContext, type StyleRegistry, useS, useSplit } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { ITabData, TabList, TabListStyles, TabPanelList, TabsState, TabStyles } from '@cloudbeaver/core-ui'; +import { type ITabData, TabList, TabListStyles, TabPanelList, TabsState, TabStyles } from '@cloudbeaver/core-ui'; import { MetadataMap } from '@cloudbeaver/core-utils'; import { useCaptureViewContext } from '@cloudbeaver/core-view'; -import { ISqlEditorModeProps, SqlEditorModeService } from '../SqlEditorModeService'; -import { DATA_CONTEXT_SQL_EDITOR_DATA } from './DATA_CONTEXT_SQL_EDITOR_DATA'; -import type { ISqlEditorProps } from './ISqlEditorProps'; +import { type ISqlEditorModeProps, SqlEditorModeService } from '../SqlEditorModeService.js'; +import { DATA_CONTEXT_SQL_EDITOR_DATA } from './DATA_CONTEXT_SQL_EDITOR_DATA.js'; +import type { ISqlEditorProps } from './ISqlEditorProps.js'; import styles from './shared/SqlEditor.module.css'; import SqlEditorTab from './shared/SqlEditorTab.module.css'; import SqlEditorTabList from './shared/SqlEditorTabList.module.css'; -import { SQLEditorActions } from './SQLEditorActions'; -import { useSqlEditor } from './useSqlEditor'; +import { SQLEditorActions } from './SQLEditorActions.js'; +import { useSqlEditor } from './useSqlEditor.js'; const sqlEditorRegistry: StyleRegistry = [ [TabListStyles, { mode: 'append', styles: [SqlEditorTabList] }], diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorActionsMenu.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorActionsMenu.tsx index f99c35482d..f2ad468081 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorActionsMenu.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorActionsMenu.tsx @@ -7,13 +7,13 @@ */ import { observer } from 'mobx-react-lite'; -import { s, SContext, StyleRegistry, useS } from '@cloudbeaver/core-blocks'; +import { s, SContext, type StyleRegistry, useS } from '@cloudbeaver/core-blocks'; import type { IDataContext } from '@cloudbeaver/core-data-context'; import { MenuBar, MenuBarItemStyles, MenuBarStyles } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import type { ISqlEditorTabState } from '../ISqlEditorTabState'; -import { SQL_EDITOR_ACTIONS_MENU } from './SQL_EDITOR_ACTIONS_MENU'; +import type { ISqlEditorTabState } from '../ISqlEditorTabState.js'; +import { SQL_EDITOR_ACTIONS_MENU } from './SQL_EDITOR_ACTIONS_MENU.js'; import SqlEditorActionsMenuBarStyles from './SqlEditorActionsMenuBar.module.css'; import SqlEditorActionsMenuBarItemStyles from './SqlEditorActionsMenuBarItem.module.css'; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorLoader.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorLoader.tsx index 8fbb86bfe8..1734a2239e 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorLoader.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorLoader.tsx @@ -9,10 +9,10 @@ import { observer } from 'mobx-react-lite'; import { ComplexLoader, createComplexLoader } from '@cloudbeaver/core-blocks'; -import type { ISqlEditorProps } from './ISqlEditorProps'; +import type { ISqlEditorProps } from './ISqlEditorProps.js'; const loader = createComplexLoader(async function loader() { - const { SqlEditor } = await import('./SqlEditor'); + const { SqlEditor } = await import('./SqlEditor.js'); return { SqlEditor }; }); diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorTools.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorTools.tsx index d7eae36191..ca7cb731a2 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorTools.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorTools.tsx @@ -9,12 +9,12 @@ import { observer } from 'mobx-react-lite'; import { ActionIconButton, getComputed, preventFocusHandler, s, UploadArea, useS, useTranslate } from '@cloudbeaver/core-blocks'; -import type { ISqlEditorTabState } from '../ISqlEditorTabState'; -import { ESqlDataSourceFeatures } from '../SqlDataSource/ESqlDataSourceFeatures'; -import type { ISQLEditorData } from './ISQLEditorData'; +import type { ISqlEditorTabState } from '../ISqlEditorTabState.js'; +import { ESqlDataSourceFeatures } from '../SqlDataSource/ESqlDataSourceFeatures.js'; +import type { ISQLEditorData } from './ISQLEditorData.js'; import style from './SqlEditorTools.module.css'; -import { SqlEditorToolsMenu } from './SqlEditorToolsMenu'; -import { useTools } from './useTools'; +import { SqlEditorToolsMenu } from './SqlEditorToolsMenu.js'; +import { useTools } from './useTools.js'; interface Props { data: ISQLEditorData; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorToolsMenu.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorToolsMenu.tsx index a0ade30886..e168cbbabd 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorToolsMenu.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorToolsMenu.tsx @@ -12,11 +12,11 @@ import { type IDataContext, useDataContextLink } from '@cloudbeaver/core-data-co import { MenuBar, MenuBarItemStyles, MenuBarStyles } from '@cloudbeaver/core-ui'; import { useMenu } from '@cloudbeaver/core-view'; -import { DATA_CONTEXT_SQL_EDITOR_STATE } from '../DATA_CONTEXT_SQL_EDITOR_STATE'; -import type { ISqlEditorTabState } from '../ISqlEditorTabState'; -import { DATA_CONTEXT_SQL_EDITOR_DATA } from './DATA_CONTEXT_SQL_EDITOR_DATA'; -import type { ISQLEditorData } from './ISQLEditorData'; -import { SQL_EDITOR_TOOLS_MENU } from './SQL_EDITOR_TOOLS_MENU'; +import { DATA_CONTEXT_SQL_EDITOR_STATE } from '../DATA_CONTEXT_SQL_EDITOR_STATE.js'; +import type { ISqlEditorTabState } from '../ISqlEditorTabState.js'; +import { DATA_CONTEXT_SQL_EDITOR_DATA } from './DATA_CONTEXT_SQL_EDITOR_DATA.js'; +import type { ISQLEditorData } from './ISQLEditorData.js'; +import { SQL_EDITOR_TOOLS_MENU } from './SQL_EDITOR_TOOLS_MENU.js'; import SqlEditorActionsMenuBarStyles from './SqlEditorActionsMenuBar.module.css'; import SqlEditorActionsMenuBarItemStyles from './SqlEditorActionsMenuBarItem.module.css'; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts b/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts index 4370dd7fe3..ba85ed2365 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { action, autorun, computed, IReactionDisposer, observable, runInAction, untracked } from 'mobx'; +import { action, autorun, computed, type IReactionDisposer, observable, runInAction, untracked } from 'mobx'; import { useEffect } from 'react'; import { ConfirmationDialog, useExecutor, useObservableRef } from '@cloudbeaver/core-blocks'; @@ -15,21 +15,21 @@ import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dial import { NotificationService } from '@cloudbeaver/core-events'; import { SyncExecutor } from '@cloudbeaver/core-executor'; import type { SqlCompletionProposal, SqlDialectInfo, SqlScriptInfoFragment } from '@cloudbeaver/core-sdk'; -import { createLastPromiseGetter, debounceAsync, LastPromiseGetter, throttleAsync } from '@cloudbeaver/core-utils'; - -import type { ISqlEditorTabState } from '../ISqlEditorTabState'; -import { ESqlDataSourceFeatures } from '../SqlDataSource/ESqlDataSourceFeatures'; -import type { ISqlDataSource, ISqlEditorCursor } from '../SqlDataSource/ISqlDataSource'; -import { SqlDataSourceService } from '../SqlDataSource/SqlDataSourceService'; -import { SqlDialectInfoService } from '../SqlDialectInfoService'; -import { SqlEditorService } from '../SqlEditorService'; -import { ISQLScriptSegment, SQLParser } from '../SQLParser'; -import { SqlExecutionPlanService } from '../SqlResultTabs/ExecutionPlan/SqlExecutionPlanService'; -import { OUTPUT_LOGS_TAB_ID } from '../SqlResultTabs/OutputLogs/OUTPUT_LOGS_TAB_ID'; -import { SqlQueryService } from '../SqlResultTabs/SqlQueryService'; -import { SqlResultTabsService } from '../SqlResultTabs/SqlResultTabsService'; -import type { ISQLEditorData } from './ISQLEditorData'; -import { SQLEditorModeContext } from './SQLEditorModeContext'; +import { createLastPromiseGetter, debounceAsync, type LastPromiseGetter, throttleAsync } from '@cloudbeaver/core-utils'; + +import type { ISqlEditorTabState } from '../ISqlEditorTabState.js'; +import { ESqlDataSourceFeatures } from '../SqlDataSource/ESqlDataSourceFeatures.js'; +import type { ISqlDataSource, ISqlEditorCursor } from '../SqlDataSource/ISqlDataSource.js'; +import { SqlDataSourceService } from '../SqlDataSource/SqlDataSourceService.js'; +import { SqlDialectInfoService } from '../SqlDialectInfoService.js'; +import { SqlEditorService } from '../SqlEditorService.js'; +import { type ISQLScriptSegment, SQLParser } from '../SQLParser.js'; +import { SqlExecutionPlanService } from '../SqlResultTabs/ExecutionPlan/SqlExecutionPlanService.js'; +import { OUTPUT_LOGS_TAB_ID } from '../SqlResultTabs/OutputLogs/OUTPUT_LOGS_TAB_ID.js'; +import { SqlQueryService } from '../SqlResultTabs/SqlQueryService.js'; +import { SqlResultTabsService } from '../SqlResultTabs/SqlResultTabsService.js'; +import type { ISQLEditorData } from './ISQLEditorData.js'; +import { SQLEditorModeContext } from './SQLEditorModeContext.js'; interface ISQLEditorDataPrivate extends ISQLEditorData { readonly sqlDialectInfoService: SqlDialectInfoService; @@ -342,11 +342,11 @@ export function useSqlEditor(state: ISqlEditorTabState): ISQLEditorData { queries.map(query => query.query), { onQueryExecutionStart: (query, index) => { - const segment = queries[index]; + const segment = queries[index]!; this.onSegmentExecute.execute({ segment, type: 'start' }); }, onQueryExecuted: (query, index, success) => { - const segment = queries[index]; + const segment = queries[index]!; this.onSegmentExecute.execute({ segment, type: 'end' }); if (!success) { diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx index 90f8e0faba..4e4e8bb934 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx @@ -8,17 +8,17 @@ import { action } from 'mobx'; import { useObservableRef } from '@cloudbeaver/core-blocks'; -import { Connection, ConnectionInfoResource, createConnectionParam } from '@cloudbeaver/core-connections'; +import { type Connection, ConnectionInfoResource, createConnectionParam } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; import { NotificationService } from '@cloudbeaver/core-events'; import { download, getTextFileReadingProcess, withTimestamp } from '@cloudbeaver/core-utils'; -import { getSqlEditorName } from '../getSqlEditorName'; -import type { ISqlEditorTabState } from '../ISqlEditorTabState'; -import { SqlDataSourceService } from '../SqlDataSource/SqlDataSourceService'; -import { SqlEditorSettingsService } from '../SqlEditorSettingsService'; -import { ScriptImportDialog } from './ScriptImportDialog'; +import { getSqlEditorName } from '../getSqlEditorName.js'; +import type { ISqlEditorTabState } from '../ISqlEditorTabState.js'; +import { SqlDataSourceService } from '../SqlDataSource/SqlDataSourceService.js'; +import { SqlEditorSettingsService } from '../SqlEditorSettingsService.js'; +import { ScriptImportDialog } from './ScriptImportDialog.js'; interface State { tryReadScript: (file: File, prevScript: string) => Promise; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorGroupTabsBootstrap.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorGroupTabsBootstrap.ts index dcdc162561..8aced476a8 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorGroupTabsBootstrap.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorGroupTabsBootstrap.ts @@ -10,10 +10,10 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { DATA_CONTEXT_TABS_CONTEXT, MENU_TAB } from '@cloudbeaver/core-ui'; import { ActionService, menuExtractItems, MenuService } from '@cloudbeaver/core-view'; -import { ACTION_TAB_CLOSE_SQL_RESULT_GROUP } from './ACTION_TAB_CLOSE_SQL_RESULT_GROUP'; -import { DATA_CONTEXT_SQL_EDITOR_STATE } from './DATA_CONTEXT_SQL_EDITOR_STATE'; -import { DATA_CONTEXT_SQL_EDITOR_RESULT_ID } from './SqlResultTabs/DATA_CONTEXT_SQL_EDITOR_RESULT_ID'; -import { SqlResultTabsService } from './SqlResultTabs/SqlResultTabsService'; +import { ACTION_TAB_CLOSE_SQL_RESULT_GROUP } from './ACTION_TAB_CLOSE_SQL_RESULT_GROUP.js'; +import { DATA_CONTEXT_SQL_EDITOR_STATE } from './DATA_CONTEXT_SQL_EDITOR_STATE.js'; +import { DATA_CONTEXT_SQL_EDITOR_RESULT_ID } from './SqlResultTabs/DATA_CONTEXT_SQL_EDITOR_RESULT_ID.js'; +import { SqlResultTabsService } from './SqlResultTabs/SqlResultTabsService.js'; @injectable() export class SqlEditorGroupTabsBootstrap extends Bootstrap { @@ -25,7 +25,7 @@ export class SqlEditorGroupTabsBootstrap extends Bootstrap { super(); } - register(): void { + override register(): void { this.menuService.addCreator({ menus: [MENU_TAB], contexts: [DATA_CONTEXT_SQL_EDITOR_RESULT_ID, DATA_CONTEXT_SQL_EDITOR_STATE], diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorModeService.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorModeService.ts index e2a10367bc..0f552bfe46 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorModeService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorModeService.ts @@ -8,8 +8,8 @@ import { injectable } from '@cloudbeaver/core-di'; import { TabsContainer } from '@cloudbeaver/core-ui'; -import type { ISqlEditorTabState } from './ISqlEditorTabState'; -import type { ISQLEditorData } from './SqlEditor/ISQLEditorData'; +import type { ISqlEditorTabState } from './ISqlEditorTabState.js'; +import type { ISQLEditorData } from './SqlEditor/ISQLEditorData.js'; export interface ISqlEditorModeProps { state: ISqlEditorTabState; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorOpenOverlay.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditorOpenOverlay.tsx index 66724d7255..f7fc74bbee 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorOpenOverlay.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorOpenOverlay.tsx @@ -19,7 +19,7 @@ import { useTranslate, } from '@cloudbeaver/core-blocks'; -import type { ISqlDataSource } from './SqlDataSource/ISqlDataSource'; +import type { ISqlDataSource } from './SqlDataSource/ISqlDataSource.js'; interface Props { dataSource: ISqlDataSource | undefined; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorOverlay.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditorOverlay.tsx index 7764a7c885..cc75c0331e 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorOverlay.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorOverlay.tsx @@ -34,10 +34,10 @@ import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { NodeManagerUtils } from '@cloudbeaver/core-navigation-tree'; -import type { ISqlEditorTabState } from './ISqlEditorTabState'; -import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService'; +import type { ISqlEditorTabState } from './ISqlEditorTabState.js'; +import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService.js'; import style from './SqlEditorOverlay.module.css'; -import { SqlEditorService } from './SqlEditorService'; +import { SqlEditorService } from './SqlEditorService.js'; interface Props { state: ISqlEditorTabState; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts index ec92bbcff0..b2c4b3a8d2 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts @@ -8,28 +8,28 @@ import { observable } from 'mobx'; import { - Connection, + type Connection, ConnectionExecutionContextProjectKey, ConnectionExecutionContextResource, ConnectionExecutionContextService, ConnectionInfoResource, ConnectionsManagerService, createConnectionParam, - IConnectionExecutionContext, - IConnectionExecutionContextInfo, - IConnectionInfoParams, + type IConnectionExecutionContext, + type IConnectionExecutionContextInfo, + type IConnectionInfoParams, } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { CachedMapAllKey } from '@cloudbeaver/core-resource'; import { FEATURE_GIT_ID, ServerConfigResource } from '@cloudbeaver/core-root'; -import { GraphQLService, SqlCompletionProposal, SqlScriptInfoFragment } from '@cloudbeaver/core-sdk'; +import { GraphQLService, type SqlCompletionProposal, type SqlScriptInfoFragment } from '@cloudbeaver/core-sdk'; -import { getSqlEditorName } from './getSqlEditorName'; -import type { ISqlEditorTabState } from './ISqlEditorTabState'; -import { ESqlDataSourceFeatures } from './SqlDataSource/ESqlDataSourceFeatures'; -import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService'; -import { SqlEditorSettingsService } from './SqlEditorSettingsService'; +import { getSqlEditorName } from './getSqlEditorName.js'; +import type { ISqlEditorTabState } from './ISqlEditorTabState.js'; +import { ESqlDataSourceFeatures } from './SqlDataSource/ESqlDataSourceFeatures.js'; +import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService.js'; +import { SqlEditorSettingsService } from './SqlEditorSettingsService.js'; export type SQLProposal = SqlCompletionProposal; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorSettingsService.test.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorSettingsService.test.ts index c6eabf1923..4245867767 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorSettingsService.test.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorSettingsService.test.ts @@ -10,7 +10,7 @@ import { expect, test } from '@jest/globals'; import { coreAdministrationManifest } from '@cloudbeaver/core-administration'; import { coreAppManifest } from '@cloudbeaver/core-app'; import { coreAuthenticationManifest } from '@cloudbeaver/core-authentication'; -import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication'; +import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication.js'; import { coreBrowserManifest } from '@cloudbeaver/core-browser'; import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; import { coreConnectionsManifest } from '@cloudbeaver/core-connections'; @@ -20,18 +20,18 @@ import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; import { coreNavigationTree } from '@cloudbeaver/core-navigation-tree'; import { coreProjectsManifest } from '@cloudbeaver/core-projects'; import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; -import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint'; -import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage'; -import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit'; -import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL'; -import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig'; +import { createGQLEndpoint } from '@cloudbeaver/core-root/dist/__custom_mocks__/createGQLEndpoint.js'; +import '@cloudbeaver/core-root/dist/__custom_mocks__/expectWebsocketClosedMessage.js'; +import { mockAppInit } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockAppInit.js'; +import { mockGraphQL } from '@cloudbeaver/core-root/dist/__custom_mocks__/mockGraphQL.js'; +import { mockServerConfig } from '@cloudbeaver/core-root/dist/__custom_mocks__/resolvers/mockServerConfig.js'; import { coreRoutingManifest } from '@cloudbeaver/core-routing'; import { coreSDKManifest } from '@cloudbeaver/core-sdk'; import { coreSettingsManifest } from '@cloudbeaver/core-settings'; import { expectDeprecatedSettingMessage, expectNoDeprecatedSettingMessage, -} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage'; +} from '@cloudbeaver/core-settings/dist/__custom_mocks__/expectDeprecatedSettingMessage.js'; import { coreStorageManifest } from '@cloudbeaver/core-storage'; import { coreUIManifest } from '@cloudbeaver/core-ui'; import { coreViewManifest } from '@cloudbeaver/core-view'; @@ -42,8 +42,8 @@ import { navigationTreePlugin } from '@cloudbeaver/plugin-navigation-tree'; import { objectViewerManifest } from '@cloudbeaver/plugin-object-viewer'; import { createApp } from '@cloudbeaver/tests-runner'; -import { sqlEditorPluginManifest } from './manifest'; -import { SqlEditorSettingsService } from './SqlEditorSettingsService'; +import { sqlEditorPluginManifest } from './manifest.js'; +import { SqlEditorSettingsService } from './SqlEditorSettingsService.js'; const endpoint = createGQLEndpoint(); const server = mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorSettingsService.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorSettingsService.ts index 23e3642ebb..ae57cf8bc6 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorSettingsService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorSettingsService.ts @@ -10,7 +10,7 @@ import { ServerSettingsManagerService } from '@cloudbeaver/core-root'; import { createSettingsAliasResolver, ESettingsValueType, - ISettingDescription, + type ISettingDescription, ROOT_SETTINGS_LAYER, SettingsManagerService, SettingsProvider, @@ -19,7 +19,7 @@ import { } from '@cloudbeaver/core-settings'; import { schema, schemaExtra } from '@cloudbeaver/core-utils'; -import { SQL_EDITOR_SETTINGS_GROUP } from './SQL_EDITOR_SETTINGS_GROUP'; +import { SQL_EDITOR_SETTINGS_GROUP } from './SQL_EDITOR_SETTINGS_GROUP.js'; const TABLE_ALIAS_OPTIONS = ['NONE', 'PLAIN', 'EXTENDED'] as const; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorStatusBar.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditorStatusBar.tsx index c06feb3294..59dc27d386 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorStatusBar.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorStatusBar.tsx @@ -9,7 +9,7 @@ import { observer } from 'mobx-react-lite'; import { Loader, s, useS } from '@cloudbeaver/core-blocks'; -import type { ISqlDataSource } from './SqlDataSource/ISqlDataSource'; +import type { ISqlDataSource } from './SqlDataSource/ISqlDataSource.js'; import classes from './SqlEditorStatusBar.module.css'; interface Props { diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorView.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorView.ts index 9cf194e66b..fa9a2e55ac 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorView.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorView.ts @@ -6,15 +6,15 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { ACTION_REDO, ACTION_SAVE, ACTION_UNDO, IActiveView, View } from '@cloudbeaver/core-view'; -import { ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; +import { ACTION_REDO, ACTION_SAVE, ACTION_UNDO, type IActiveView, View } from '@cloudbeaver/core-view'; +import { type ITab, NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs'; -import { ACTION_SQL_EDITOR_EXECUTE } from './actions/ACTION_SQL_EDITOR_EXECUTE'; -import { ACTION_SQL_EDITOR_EXECUTE_NEW } from './actions/ACTION_SQL_EDITOR_EXECUTE_NEW'; -import { ACTION_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/ACTION_SQL_EDITOR_EXECUTE_SCRIPT'; -import { ACTION_SQL_EDITOR_FORMAT } from './actions/ACTION_SQL_EDITOR_FORMAT'; -import { ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN'; -import { ACTION_SQL_EDITOR_SHOW_OUTPUT } from './actions/ACTION_SQL_EDITOR_SHOW_OUTPUT'; +import { ACTION_SQL_EDITOR_EXECUTE } from './actions/ACTION_SQL_EDITOR_EXECUTE.js'; +import { ACTION_SQL_EDITOR_EXECUTE_NEW } from './actions/ACTION_SQL_EDITOR_EXECUTE_NEW.js'; +import { ACTION_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/ACTION_SQL_EDITOR_EXECUTE_SCRIPT.js'; +import { ACTION_SQL_EDITOR_FORMAT } from './actions/ACTION_SQL_EDITOR_FORMAT.js'; +import { ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN.js'; +import { ACTION_SQL_EDITOR_SHOW_OUTPUT } from './actions/ACTION_SQL_EDITOR_SHOW_OUTPUT.js'; @injectable() export class SqlEditorView extends View { diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/DATA_CONTEXT_SQL_EDITOR_RESULT_ID.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/DATA_CONTEXT_SQL_EDITOR_RESULT_ID.ts index 58705f0421..4cdc0e4594 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/DATA_CONTEXT_SQL_EDITOR_RESULT_ID.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/DATA_CONTEXT_SQL_EDITOR_RESULT_ID.ts @@ -7,6 +7,6 @@ */ import { createDataContext } from '@cloudbeaver/core-data-context'; -import type { ISqlEditorResultTab } from '../ISqlEditorTabState'; +import type { ISqlEditorResultTab } from '../ISqlEditorTabState.js'; export const DATA_CONTEXT_SQL_EDITOR_RESULT_ID = createDataContext('sql-editor-result-id'); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.tsx b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.tsx index 10f53e1c19..abd6111b21 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.tsx @@ -25,8 +25,8 @@ import { import type { SqlExecutionPlanNode } from '@cloudbeaver/core-sdk'; import style from './ExecutionPlanTreeBlock.module.css'; -import { NestedNode } from './NestedNode'; -import { useExecutionPlanTreeState } from './useExecutionPlanTreeState'; +import { NestedNode } from './NestedNode.js'; +import { useExecutionPlanTreeState } from './useExecutionPlanTreeState.js'; interface Props { nodeList: SqlExecutionPlanNode[]; @@ -43,9 +43,9 @@ export const ExecutionPlanTreeBlock = observer(function ExecutionPlanTree return ( - + {state.nodes.length && state.columns.length ? ( -
+
{state.columns.map(property => { const name = property.displayName; @@ -67,8 +67,8 @@ export const ExecutionPlanTreeBlock = observer(function ExecutionPlanTree {translate('sql_execution_plan_placeholder')} )} - - + + diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx index 029371d619..ac13ee727f 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx @@ -54,7 +54,7 @@ export const UserFormInfoCredentials = observer(function UserFormInfoCred return ( {translate('authentication_user_credentials')} - + {translate('authentication_user_name')} {local && ( @@ -67,7 +67,7 @@ export const UserFormInfoCredentials = observer(function UserFormInfoCred autoComplete="new-password" placeholder={editing ? PASSWORD_PLACEHOLDER : ''} canShowPassword={tabState.state['password'] !== ''} - disabled={disabled} + readOnly={disabled} required={!editing} keepSize tiny @@ -79,7 +79,7 @@ export const UserFormInfoCredentials = observer(function UserFormInfoCred type="password" name="passwordRepeat" placeholder={editing ? PASSWORD_PLACEHOLDER : ''} - disabled={disabled} + readOnly={disabled} required={!editing} canShowPassword keepSize diff --git a/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx b/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx index 1cef309f13..d80bb3d3e0 100644 --- a/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx +++ b/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx @@ -51,7 +51,7 @@ export const AuthProviderForm = observer(function AuthProviderForm({ prov type={parameter.encryption === 'none' ? 'text' : 'password'} name={parameter.id} state={credentials.credentials} - disabled={authenticate} + readOnly={authenticate} canShowPassword={false} autoComplete={`section-authentication section-${provider.id} ${configuration?.id ?? ''} ${parameter.id}`} > diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx b/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx index d8cc310a91..a6f4298a67 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx @@ -67,10 +67,10 @@ export const NetworkHandlerAuthForm = observer(function NetworkHandlerAut {ssh && ( <> - + {translate(`connections_network_handler_${id}_user`, 'connections_network_handler_default_user')} - + {passwordLabel} diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/AdvancedPropertiesForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/AdvancedPropertiesForm.tsx index 8db7be00af..a949a2ebd5 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/AdvancedPropertiesForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/AdvancedPropertiesForm.tsx @@ -35,8 +35,7 @@ export const AdvancedPropertiesForm = observer(function AdvancedPropertie min={0} max={MAX_KEEP_ALIVE_INTERVAL} name="keepAliveInterval" - disabled={disabled} - readOnly={readonly} + readOnly={readonly || disabled} title={translate('connections_connection_keep_alive_tooltip')} state={config} defaultState={DEFAULT_CONFIG} diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx index d95cd5fa7f..d37e416c24 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx @@ -216,8 +216,7 @@ export const Options: TabContainerPanelComponent = observe type="text" name="url" state={config} - disabled={disabled} - readOnly={readonly} + readOnly={readonly || disabled} autoComplete={`section-${config.driverId || 'driver'} section-jdbc`} > {translate('plugin_connections_connection_form_part_main_url_jdbc')} @@ -245,7 +244,7 @@ export const Options: TabContainerPanelComponent = observe - + {translate('connections_connection_name')} {!config.template && ( @@ -262,7 +261,6 @@ export const Options: TabContainerPanelComponent = observe type="text" name="folder" state={config} - disabled={disabled} autoComplete={`section-${config.driverId || 'driver'} section-folder`} autoHide readOnly @@ -273,7 +271,7 @@ export const Options: TabContainerPanelComponent = observe )} - diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx index a83cbc8810..1a557dc05b 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx @@ -26,19 +26,19 @@ export const ParametersForm = observer(function ParametersForm({ config, {!embedded && ( - + {translate('plugin_connections_connection_form_part_main_custom_host')} - + {translate('plugin_connections_connection_form_part_main_custom_port')} )} - + {translate('plugin_connections_connection_form_part_main_custom_database')} {requiresServerName && ( - + {translate('plugin_connections_connection_form_part_main_custom_server_name')} )} diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx index c52f54f34c..93ca791def 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx @@ -109,10 +109,10 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st {translate('connections_network_handler_ssh_tunnel_auth_type')} - + {translate('connections_network_handler_ssh_tunnel_host')} - + {translate('connections_network_handler_ssh_tunnel_port')} @@ -121,8 +121,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st type="text" name="userName" state={handlerState} - disabled={disabled || !enabled} - readOnly={readonly} + readOnly={readonly || disabled || !enabled} required={handlerState.savePassword} tiny fill @@ -134,8 +133,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st name="password" autoComplete={isSafari ? 'section-connection-ssh-authentication section-ssh password' : 'new-password'} state={handlerState} - disabled={disabled || !enabled} - readOnly={readonly} + readOnly={readonly || disabled || !enabled} required={!passwordSaved && !keyAuth && handlerState.savePassword} description={passwordSaved ? translate('ui_processing_saved') : undefined} tiny @@ -171,8 +169,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st type="number" name="aliveInterval" state={handlerState.properties} - disabled={disabled || !enabled} - readOnly={readonly} + readOnly={readonly || disabled || !enabled} labelTooltip={aliveIntervalLabel} tiny > @@ -182,8 +179,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st type="number" name="sshConnectTimeout" state={handlerState.properties} - disabled={disabled || !enabled} - readOnly={readonly} + readOnly={readonly || disabled || !enabled} labelTooltip={connectTimeoutLabel} tiny > diff --git a/webapp/packages/plugin-resource-manager-scripts/src/SaveScriptDialog.tsx b/webapp/packages/plugin-resource-manager-scripts/src/SaveScriptDialog.tsx index d31edfd3cc..daca09f857 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/SaveScriptDialog.tsx +++ b/webapp/packages/plugin-resource-manager-scripts/src/SaveScriptDialog.tsx @@ -115,7 +115,7 @@ export const SaveScriptDialog: DialogComponent name="name" state={state} error={!state.valid} - disabled={state.projectId === null} + readOnly={state.projectId === null} description={errorMessage} onChange={state.validate} > diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/Setting.tsx b/webapp/packages/plugin-settings-panel/src/SettingsPanel/Setting.tsx index aa9c6a5feb..de2095aca7 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/Setting.tsx +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/Setting.tsx @@ -130,8 +130,7 @@ export const Setting = observer(function Setting({ source, setting }) { labelTooltip={description} value={value} description={description} - disabled={disabled} - readOnly={readOnly} + readOnly={readOnly || disabled} small onChange={handleChange} > diff --git a/webapp/packages/plugin-user-profile/src/UserProfileForm/UserAuthenticationPart/ChangePassword.tsx b/webapp/packages/plugin-user-profile/src/UserProfileForm/UserAuthenticationPart/ChangePassword.tsx index 8e9218414a..450929203f 100644 --- a/webapp/packages/plugin-user-profile/src/UserProfileForm/UserAuthenticationPart/ChangePassword.tsx +++ b/webapp/packages/plugin-user-profile/src/UserProfileForm/UserAuthenticationPart/ChangePassword.tsx @@ -35,7 +35,7 @@ export const ChangePassword = observer(function ChangePassword({ state, d type="password" name="oldPassword" state={state} - disabled={disabled} + readOnly={disabled} mapValue={(value?: string) => value?.trim() ?? ''} small required @@ -48,7 +48,7 @@ export const ChangePassword = observer(function ChangePassword({ state, d name="password" autoComplete="new-password" state={state} - disabled={disabled} + readOnly={disabled} mapValue={(value?: string) => value?.trim() ?? ''} small required @@ -60,7 +60,7 @@ export const ChangePassword = observer(function ChangePassword({ state, d type="password" name="repeatedPassword" state={state} - disabled={disabled} + readOnly={disabled} mapValue={(value?: string) => value?.trim() ?? ''} small required diff --git a/webapp/packages/plugin-user-profile/src/UserProfileForm/UserInfoPart/UserProfileFormInfo.tsx b/webapp/packages/plugin-user-profile/src/UserProfileForm/UserInfoPart/UserProfileFormInfo.tsx index fc1a71942d..1c2f1b3bef 100644 --- a/webapp/packages/plugin-user-profile/src/UserProfileForm/UserInfoPart/UserProfileFormInfo.tsx +++ b/webapp/packages/plugin-user-profile/src/UserProfileForm/UserInfoPart/UserProfileFormInfo.tsx @@ -30,13 +30,13 @@ export const UserProfileFormInfo: TabContainerPanelComponent {translate('plugin_user_profile_info')} - + {translate('plugin_user_profile_info_id')} - + {translate('plugin_user_profile_info_displayName')} - + {translate('authentication_user_role')} From 2e5b71e9dd1427456f2b6a9c65e1c3dde627444f Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Thu, 10 Oct 2024 17:38:54 +0200 Subject: [PATCH 049/155] CB-5563 [TE] Change credentials - 'save credentials' is not marked for auth even if it is saved (#2981) * CB-5563 adds saveCredentials to config when loading DriverInfo during driver authorization * CB-5640 fixes save creds checkbox state for SSL * Revert "CB-5640 fixes save creds checkbox state for SSL" This reverts commit e25fc3b5d44eac616d0428ea3d7a4458fdc4e7fd. --------- Co-authored-by: kseniaguzeeva <112612526+kseniaguzeeva@users.noreply.github.com> --- .../useDatabaseCredentialsAuthDialog.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts index fb22afe9cd..04fbd04c8b 100644 --- a/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts +++ b/webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts @@ -107,6 +107,7 @@ export function useDatabaseCredentialsAuthDialog( } } + this.config.saveCredentials = connection.saveCredentials; this.connection = connection; this.driver = driver; From 6220df48453d37ec5206bd2802bb6602c536b7e8 Mon Sep 17 00:00:00 2001 From: Serge Rider Date: Fri, 11 Oct 2024 06:04:55 +0200 Subject: [PATCH 050/155] dbeaver/pro#3420 Gson refactoring (#2965) --- .../src/io/cloudbeaver/WebServiceUtils.java | 3 ++- .../cloudbeaver/server/CBServerConfigurationController.java | 5 +++-- .../src/io/cloudbeaver/service/security/db/CBDatabase.java | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/WebServiceUtils.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/WebServiceUtils.java index e1ddccf294..46ff6fa6bb 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/WebServiceUtils.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/WebServiceUtils.java @@ -19,6 +19,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.InstanceCreator; +import com.google.gson.Strictness; import io.cloudbeaver.model.WebConnectionConfig; import io.cloudbeaver.model.WebNetworkHandlerConfigInput; import io.cloudbeaver.model.WebPropertyInfo; @@ -294,7 +295,7 @@ public static void saveAuthProperties( // Make new Gson parser with type adapters to deserialize into existing credentials InstanceCreator credTypeAdapter = type -> credentials; Gson credGson = new GsonBuilder() - .setLenient() + .setStrictness(Strictness.LENIENT) .registerTypeAdapter(credentials.getClass(), credTypeAdapter) .create(); diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationController.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationController.java index 883e326314..83302d3c71 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationController.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationController.java @@ -19,6 +19,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.InstanceCreator; +import com.google.gson.Strictness; import io.cloudbeaver.model.app.BaseServerConfigurationController; import io.cloudbeaver.model.app.BaseWebApplication; import io.cloudbeaver.model.config.CBAppConfig; @@ -336,7 +337,7 @@ protected GsonBuilder getGsonBuilder() { InstanceCreator smPasswordPoliceConfigCreator = type -> securityManagerConfiguration.getPasswordPolicyConfiguration(); return new GsonBuilder() - .setLenient() + .setStrictness(Strictness.LENIENT) .registerTypeAdapter(getServerConfiguration().getClass(), serverConfigCreator) .registerTypeAdapter(CBAppConfig.class, appConfigCreator) .registerTypeAdapter(DataSourceNavigatorSettings.class, navSettingsCreator) @@ -372,7 +373,7 @@ private synchronized void writeRuntimeConfig(Path runtimeConfigPath, Map Date: Fri, 11 Oct 2024 06:20:32 +0200 Subject: [PATCH 051/155] Dbeaver/pro#3420 Use long for serialization of configs --- .../model/app/BaseServerConfigurationController.java | 1 + .../server/CBServerConfigurationController.java | 7 +++---- .../server/CBServerConfigurationControllerEmbedded.java | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/BaseServerConfigurationController.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/BaseServerConfigurationController.java index e9d3887df0..781f904e81 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/BaseServerConfigurationController.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/BaseServerConfigurationController.java @@ -51,6 +51,7 @@ public Gson getGson() { return getGsonBuilder().create(); } + @NotNull protected abstract GsonBuilder getGsonBuilder(); public abstract T getServerConfiguration(); diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationController.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationController.java index 83302d3c71..637ea382d3 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationController.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationController.java @@ -16,10 +16,7 @@ */ package io.cloudbeaver.server; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.InstanceCreator; -import com.google.gson.Strictness; +import com.google.gson.*; import io.cloudbeaver.model.app.BaseServerConfigurationController; import io.cloudbeaver.model.app.BaseWebApplication; import io.cloudbeaver.model.config.CBAppConfig; @@ -327,6 +324,7 @@ public Map readConfigurationFile(Path path) throws DBException { } } + @NotNull protected GsonBuilder getGsonBuilder() { // Stupid way to populate existing objects but ok google (https://github.com/google/gson/issues/431) InstanceCreator appConfigCreator = type -> appConfiguration; @@ -338,6 +336,7 @@ protected GsonBuilder getGsonBuilder() { type -> securityManagerConfiguration.getPasswordPolicyConfiguration(); return new GsonBuilder() .setStrictness(Strictness.LENIENT) + .setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) .registerTypeAdapter(getServerConfiguration().getClass(), serverConfigCreator) .registerTypeAdapter(CBAppConfig.class, appConfigCreator) .registerTypeAdapter(DataSourceNavigatorSettings.class, navSettingsCreator) diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationControllerEmbedded.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationControllerEmbedded.java index d51c1f7cbd..87d28cd7d1 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationControllerEmbedded.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/CBServerConfigurationControllerEmbedded.java @@ -92,6 +92,7 @@ private void savePasswordPolicyConfig(Map originServerConfig, Ma } } + @NotNull @Override protected GsonBuilder getGsonBuilder() { GsonBuilder gsonBuilder = super.getGsonBuilder(); From c7fa466509def8808afe94283f6da37c11de1d2f Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Fri, 11 Oct 2024 10:52:55 +0200 Subject: [PATCH 052/155] CB-5707 Change font size in dialogs (#2973) * CB-5707 increases text size to confirmation dialog title * CB-5707 fixes headerTitle with composes styles * CB-5707 fixes dialogBodyContent with composes styles --------- Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com> --- .../src/CommonDialog/CommonDialog/CommonDialogBody.module.css | 2 ++ .../src/CommonDialog/CommonDialog/CommonDialogHeader.module.css | 1 + 2 files changed, 3 insertions(+) diff --git a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogBody.module.css b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogBody.module.css index a89cd87f49..19f3e2bccf 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogBody.module.css +++ b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogBody.module.css @@ -60,7 +60,9 @@ } .dialogBodyContent { + composes: theme-typography--body1 from global; flex: 1; + letter-spacing: normal; position: relative; display: flex; flex-direction: column; diff --git a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogHeader.module.css b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogHeader.module.css index b60ff87929..cd70decec4 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogHeader.module.css +++ b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogHeader.module.css @@ -27,6 +27,7 @@ } .headerTitle { + composes: theme-typography--headline6 from global; margin: 0; overflow: hidden; text-overflow: ellipsis; From eb41e6156acc04c2578c99ca8cdf38c0659f42af Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Fri, 11 Oct 2024 10:54:13 +0200 Subject: [PATCH 053/155] Cb 5728 update frontend dependencies (#2970) * CB-5728 updates dependencies without react-data-grid * CB-5728 updates react-data-grid library * CB-5728 updates dependencies after react-data-grid updation * CB-5728 fixes align in cells for react-data-grid --------- Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com> --- webapp/package.json | 2 +- .../Formatters/CellFormatter.module.css | 7 +- .../src/DataGrid/Formatters/CellFormatter.tsx | 1 + .../src/DataGrid/Formatters/Menu/CellMenu.tsx | 4 +- .../react-data-grid-dist/lib/bundle.cjs | 394 +-- .../react-data-grid-dist/lib/bundle.cjs.map | 2 +- .../react-data-grid-dist/lib/bundle.js | 2518 +++++++++-------- .../react-data-grid-dist/lib/bundle.js.map | 2 +- .../react-data-grid-dist/lib/index.d.ts | 47 +- .../react-data-grid-dist/lib/styles.css | 151 +- .../react-data-grid-dist/package.json | 57 +- webapp/yarn.lock | 2517 ++++++++-------- 12 files changed, 2847 insertions(+), 2855 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index 25dcd27415..8ff63b4aed 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -36,7 +36,7 @@ "@testing-library/user-event": "^14", "@types/react": "^18", "@types/react-dom": "^18", - "concurrently": "^8", + "concurrently": "^9", "husky": "^9", "lerna": "^5", "mobx": "^6", diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.module.css b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.module.css index a8fdcc42a1..f61bab5f30 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.module.css +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.module.css @@ -7,10 +7,10 @@ */ .wrapper { - height: 100%; display: flex; overflow: hidden; box-sizing: border-box; + position: relative; } .container { @@ -28,3 +28,8 @@ display: none; } } + +.cellMenu { + width: 25px; + height: 100%; +} diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.tsx index 549f032835..812c964346 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/CellFormatter.tsx @@ -59,6 +59,7 @@ export const CellFormatter = observer(function CellFormatter({ className, spreadsheetActions={spreadsheetActions} resultIndex={context.resultIndex} simple={context.simple} + className={s(styles, { cellMenu: true })} onStateSwitch={setMenuVisible} /> diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/Menu/CellMenu.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/Menu/CellMenu.tsx index 26dc0dabe5..bf0e70927c 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/Menu/CellMenu.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/Formatters/Menu/CellMenu.tsx @@ -21,6 +21,7 @@ interface Props { spreadsheetActions: IDataPresentationActions; resultIndex: number; cellKey: IResultSetElementKey; + className?: string; simple: boolean; onClick?: () => void; onStateSwitch?: (state: boolean) => void; @@ -41,6 +42,7 @@ export const CellMenu = observer(function CellMenu({ actions, spreadsheetActions, resultIndex, + className, cellKey, simple, onClick, @@ -70,7 +72,7 @@ export const CellMenu = observer(function CellMenu({ return ( -
+
diff --git a/webapp/packages/plugin-react-data-grid/react-data-grid-dist/lib/bundle.cjs b/webapp/packages/plugin-react-data-grid/react-data-grid-dist/lib/bundle.cjs index 88e288ac7b..b7987950b1 100644 --- a/webapp/packages/plugin-react-data-grid/react-data-grid-dist/lib/bundle.cjs +++ b/webapp/packages/plugin-react-data-grid/react-data-grid-dist/lib/bundle.cjs @@ -59,7 +59,7 @@ function onEditorNavigation({ return false; } -const measuringCellClassname = "mlln6zg7-0-0-beta-44"; +const measuringCellClassname = "mlln6zg7-0-0-beta-47"; function renderMeasuringCells(viewportColumns) { return viewportColumns.map(({ key, @@ -264,18 +264,12 @@ function canExitGrid({ return shiftKey ? atFirstCellInRow && atFirstRow : atLastCellInRow && atLastRow; } -const cell = "cj343x07-0-0-beta-44"; +const cell = "cj343x07-0-0-beta-47"; const cellClassname = `rdg-cell ${cell}`; -const cellFrozen = "csofj7r7-0-0-beta-44"; +const cellFrozen = "csofj7r7-0-0-beta-47"; const cellFrozenClassname = `rdg-cell-frozen ${cellFrozen}`; -function getRowStyle(rowIdx, height) { - if (height !== undefined) { - return { - '--rdg-grid-row-start': rowIdx, - '--rdg-row-height': `${height}px` - }; - } +function getRowStyle(rowIdx) { return { '--rdg-grid-row-start': rowIdx }; @@ -336,37 +330,32 @@ function getHeaderCellRowSpan(column, rowIdx) { return column.parent === undefined ? rowIdx : column.level - column.parent.level; } -const checkboxLabel = "c1bn88vv7-0-0-beta-44"; -const checkboxLabelClassname = `rdg-checkbox-label ${checkboxLabel}`; -const checkboxInput = "c1qt073l7-0-0-beta-44"; -const checkboxInputClassname = `rdg-checkbox-input ${checkboxInput}`; -const checkbox = "cf71kmq7-0-0-beta-44"; -const checkboxClassname = `rdg-checkbox ${checkbox}`; -const checkboxLabelDisabled = "c1lwve4p7-0-0-beta-44"; -const checkboxLabelDisabledClassname = `rdg-checkbox-label-disabled ${checkboxLabelDisabled}`; +const checkbox = "c1bn88vv7-0-0-beta-47"; +const checkboxClassname = `rdg-checkbox-input ${checkbox}`; function renderCheckbox({ onChange, + indeterminate, ...props }) { function handleChange(e) { onChange(e.target.checked, e.nativeEvent.shiftKey); } - return /*#__PURE__*/jsxRuntime.jsxs("label", { - className: clsx(checkboxLabelClassname, props.disabled && checkboxLabelDisabledClassname), - children: [/*#__PURE__*/jsxRuntime.jsx("input", { - type: "checkbox", - ...props, - className: checkboxInputClassname, - onChange: handleChange - }), /*#__PURE__*/jsxRuntime.jsx("div", { - className: checkboxClassname - })] + return /*#__PURE__*/jsxRuntime.jsx("input", { + ref: el => { + if (el) { + el.indeterminate = indeterminate === true; + } + }, + type: "checkbox", + className: checkboxClassname, + onChange: handleChange, + ...props }); } -const groupCellContent = "g1s9ylgp7-0-0-beta-44"; +const groupCellContent = "g1s9ylgp7-0-0-beta-47"; const groupCellContentClassname = `rdg-group-cell-content ${groupCellContent}`; -const caret = "cz54e4y7-0-0-beta-44"; +const caret = "cz54e4y7-0-0-beta-47"; const caretClassname = `rdg-caret ${caret}`; function renderToggleGroup(props) { return /*#__PURE__*/jsxRuntime.jsx(ToggleGroup, { @@ -421,6 +410,7 @@ function useDefaultRenderers() { function SelectCellFormatter({ value, tabIndex, + indeterminate, disabled, onChange, 'aria-label': ariaLabel, @@ -431,6 +421,7 @@ function SelectCellFormatter({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, tabIndex, + indeterminate, disabled, checked: value, onChange @@ -447,33 +438,61 @@ function useRowSelection() { if (rowSelectionContext === undefined || rowSelectionChangeContext === undefined) { throw new Error('useRowSelection must be used within DataGrid cells'); } - return [rowSelectionContext, rowSelectionChangeContext]; + return { + isRowSelectionDisabled: rowSelectionContext.isRowSelectionDisabled, + isRowSelected: rowSelectionContext.isRowSelected, + onRowSelectionChange: rowSelectionChangeContext + }; +} +const HeaderRowSelectionContext = /*#__PURE__*/react.createContext(undefined); +const HeaderRowSelectionProvider = HeaderRowSelectionContext.Provider; +const HeaderRowSelectionChangeContext = /*#__PURE__*/react.createContext(undefined); +const HeaderRowSelectionChangeProvider = HeaderRowSelectionChangeContext.Provider; +function useHeaderRowSelection() { + const headerRowSelectionContext = react.useContext(HeaderRowSelectionContext); + const headerRowSelectionChangeContext = react.useContext(HeaderRowSelectionChangeContext); + if (headerRowSelectionContext === undefined || headerRowSelectionChangeContext === undefined) { + throw new Error('useHeaderRowSelection must be used within DataGrid cells'); + } + return { + isIndeterminate: headerRowSelectionContext.isIndeterminate, + isRowSelected: headerRowSelectionContext.isRowSelected, + onRowSelectionChange: headerRowSelectionChangeContext + }; } -const SELECT_COLUMN_KEY = 'select-row'; +const SELECT_COLUMN_KEY = 'rdg-select-column'; function HeaderRenderer(props) { - const [isRowSelected, onRowSelectionChange] = useRowSelection(); + const { + isIndeterminate, + isRowSelected, + onRowSelectionChange + } = useHeaderRowSelection(); return /*#__PURE__*/jsxRuntime.jsx(SelectCellFormatter, { "aria-label": "Select All", tabIndex: props.tabIndex, + indeterminate: isIndeterminate, value: isRowSelected, onChange: checked => { onRowSelectionChange({ - type: 'HEADER', - checked + checked: isIndeterminate ? false : checked }); } }); } function SelectFormatter(props) { - const [isRowSelected, onRowSelectionChange] = useRowSelection(); + const { + isRowSelectionDisabled, + isRowSelected, + onRowSelectionChange + } = useRowSelection(); return /*#__PURE__*/jsxRuntime.jsx(SelectCellFormatter, { "aria-label": "Select", tabIndex: props.tabIndex, + disabled: isRowSelectionDisabled, value: isRowSelected, onChange: (checked, isShiftClick) => { onRowSelectionChange({ - type: 'ROW', row: props.row, checked, isShiftClick @@ -482,14 +501,16 @@ function SelectFormatter(props) { }); } function SelectGroupFormatter(props) { - const [isRowSelected, onRowSelectionChange] = useRowSelection(); + const { + isRowSelected, + onRowSelectionChange + } = useRowSelection(); return /*#__PURE__*/jsxRuntime.jsx(SelectCellFormatter, { "aria-label": "Select Group", tabIndex: props.tabIndex, value: isRowSelected, onChange: checked => { onRowSelectionChange({ - type: 'ROW', row: props.row, checked, isShiftClick: false @@ -802,7 +823,7 @@ function useColumnWidths(columns, viewportColumns, templateColumns, gridRef, gri } function measureColumnWidth(gridRef, key) { const selector = `[data-measuring-cell-key="${CSS.escape(key)}"]`; - const measuringCell = gridRef.current.querySelector(selector); + const measuringCell = gridRef.current?.querySelector(selector); return measuringCell?.getBoundingClientRect().width; } @@ -1035,9 +1056,9 @@ function useViewportRows({ }; } -const cellCopied = "c6ra8a37-0-0-beta-44"; +const cellCopied = "c6ra8a37-0-0-beta-47"; const cellCopiedClassname = `rdg-cell-copied ${cellCopied}`; -const cellDraggedOver = "cq910m07-0-0-beta-44"; +const cellDraggedOver = "cq910m07-0-0-beta-47"; const cellDraggedOverClassname = `rdg-cell-dragged-over ${cellDraggedOver}`; function Cell({ column, @@ -1135,16 +1156,15 @@ function Cell({ }) }); } -const CellComponent = /*#__PURE__*/react.memo( /*#__PURE__*/react.forwardRef(Cell)); -const CellComponent$1 = CellComponent; +const CellComponent = /*#__PURE__*/react.memo(/*#__PURE__*/react.forwardRef(Cell)); function defaultRenderCell(key, props) { return /*#__PURE__*/jsxRuntime.jsx(CellComponent, { ...props }, key); } -const cellDragHandle = "c1w9bbhr7-0-0-beta-44"; -const cellDragHandleFrozenClassname = "c1creorc7-0-0-beta-44"; +const cellDragHandle = "c1w9bbhr7-0-0-beta-47"; +const cellDragHandleFrozenClassname = "c1creorc7-0-0-beta-47"; const cellDragHandleClassname = `rdg-cell-drag-handle ${cellDragHandle}`; function DragHandle({ gridRowStart, @@ -1249,7 +1269,7 @@ function DragHandle({ }); } -const cellEditing = "cis5rrm7-0-0-beta-44"; +const cellEditing = "cis5rrm7-0-0-beta-47"; function EditCell({ column, colSpan, @@ -1260,7 +1280,7 @@ function EditCell({ onKeyDown, navigate }) { - const frameRequestRef = react.useRef(); + const frameRequestRef = react.useRef(undefined); const commitOnOutsideClick = column.editorOptions?.commitOnOutsideClick !== false; const commitOnOutsideMouseDown = useLatestFunc(() => { onClose(true, false); @@ -1333,6 +1353,7 @@ function EditCell({ children: [column.renderEditCell({ column, row, + rowIdx, onRowChange: onEditorRowChange, onClose }), column.editorOptions?.displayCellContent && column.renderCell({ @@ -1387,8 +1408,8 @@ function GroupedColumnHeaderCell({ }); } -const headerSortCellClassname = "h44jtk67-0-0-beta-44"; -const headerSortName = "hcgkhxz7-0-0-beta-44"; +const headerSortCellClassname = "h44jtk67-0-0-beta-47"; +const headerSortName = "hcgkhxz7-0-0-beta-47"; const headerSortNameClassname = `rdg-header-sort-name ${headerSortName}`; function renderHeaderCell({ column, @@ -1422,14 +1443,14 @@ function SortableHeaderCell({ }); } -const cellSortableClassname = "c6l2wv17-0-0-beta-44"; -const cellResizable = "c1kqdw7y7-0-0-beta-44"; +const cellSortableClassname = "c6l2wv17-0-0-beta-47"; +const cellResizable = "c1kqdw7y7-0-0-beta-47"; const cellResizableClassname = `rdg-cell-resizable ${cellResizable}`; -const resizeHandleClassname = "r1y6ywlx7-0-0-beta-44"; +const resizeHandleClassname = "r1y6ywlx7-0-0-beta-47"; const cellDraggableClassname = 'rdg-cell-draggable'; -const cellDragging = "c1bezg5o7-0-0-beta-44"; +const cellDragging = "c1bezg5o7-0-0-beta-47"; const cellDraggingClassname = `rdg-cell-dragging ${cellDragging}`; -const cellOver = "c1vc96037-0-0-beta-44"; +const cellOver = "c1vc96037-0-0-beta-47"; const cellOverClassname = `rdg-cell-drag-over ${cellOver}`; function HeaderCell({ column, @@ -1481,22 +1502,34 @@ function HeaderCell({ left } = headerCell.getBoundingClientRect(); const offset = isRtl ? event.clientX - left : right - event.clientX; + let hasDoubleClicked = false; function onPointerMove(event) { const { + width, right, left } = headerCell.getBoundingClientRect(); - const width = isRtl ? right + offset - event.clientX : event.clientX + offset - left; - if (width > 0) { - onColumnResize(column, clampColumnWidth(width, column)); + let newWidth = isRtl ? right + offset - event.clientX : event.clientX + offset - left; + newWidth = clampColumnWidth(newWidth, column); + if (width > 0 && newWidth !== width) { + onColumnResize(column, newWidth); } } - function onLostPointerCapture() { + function onDoubleClick() { + hasDoubleClicked = true; + onColumnResize(column, 'max-content'); + } + function onLostPointerCapture(event) { + if (!hasDoubleClicked) { + onPointerMove(event); + } currentTarget.removeEventListener('pointermove', onPointerMove); + currentTarget.removeEventListener('dblclick', onDoubleClick); currentTarget.removeEventListener('lostpointercapture', onLostPointerCapture); } currentTarget.setPointerCapture(pointerId); currentTarget.addEventListener('pointermove', onPointerMove); + currentTarget.addEventListener('dblclick', onDoubleClick); currentTarget.addEventListener('lostpointercapture', onLostPointerCapture); } function onSort(ctrlClick) { @@ -1540,9 +1573,6 @@ function HeaderCell({ onSort(event.ctrlKey || event.metaKey); } } - function onDoubleClick() { - onColumnResize(column, 'max-content'); - } function handleFocus(event) { onFocus?.(event); if (shouldFocusGrid) { @@ -1572,8 +1602,8 @@ function HeaderCell({ } function onDrop(event) { setIsOver(false); - if (event.dataTransfer.types.includes(dragDropKey)) { - const sourceKey = event.dataTransfer.getData(dragDropKey); + if (event.dataTransfer.types.includes(dragDropKey.toLowerCase())) { + const sourceKey = event.dataTransfer.getData(dragDropKey.toLowerCase()); if (sourceKey !== column.key) { event.preventDefault(); onColumnsReorder?.(sourceKey, column.key); @@ -1627,7 +1657,6 @@ function HeaderCell({ }), resizable && /*#__PURE__*/jsxRuntime.jsx("div", { className: resizeHandleClassname, onClick: stopPropagation, - onDoubleClick: onDoubleClick, onPointerDown: onPointerDown })] }); @@ -1637,15 +1666,15 @@ function isEventPertinent(event) { return !event.currentTarget.contains(relatedTarget); } -const row = "r1upfr807-0-0-beta-44"; +const row = "r1upfr807-0-0-beta-47"; const rowClassname = `rdg-row ${row}`; -const rowSelected = "r190mhd37-0-0-beta-44"; +const rowSelected = "r190mhd37-0-0-beta-47"; const rowSelectedClassname = 'rdg-row-selected'; -const rowSelectedWithFrozenCell = "r139qu9m7-0-0-beta-44"; +const rowSelectedWithFrozenCell = "r139qu9m7-0-0-beta-47"; const topSummaryRowClassname = 'rdg-top-summary-row'; const bottomSummaryRowClassname = 'rdg-bottom-summary-row'; -const headerRow = "h10tskcx7-0-0-beta-44"; +const headerRow = "h10tskcx7-0-0-beta-47"; const headerRowClassname = `rdg-header-row ${headerRow}`; function HeaderRow({ rowIdx, @@ -1670,7 +1699,7 @@ function HeaderRow({ if (colSpan !== undefined) { index += colSpan - 1; } - cells.push( /*#__PURE__*/jsxRuntime.jsx(HeaderCell, { + cells.push(/*#__PURE__*/jsxRuntime.jsx(HeaderCell, { column: column, colSpan: colSpan, rowIdx: rowIdx, @@ -1717,7 +1746,7 @@ function GroupedColumnHeaderRow({ const { idx } = parent; - cells.push( /*#__PURE__*/jsxRuntime.jsx(GroupedColumnHeaderCell, { + cells.push(/*#__PURE__*/jsxRuntime.jsx(GroupedColumnHeaderCell, { column: parent, rowIdx: rowIdx, isCellSelected: selectedCellIdx === idx, @@ -1738,8 +1767,8 @@ function Row({ className, rowIdx, gridRowStart, - height, selectedCellIdx, + isRowSelectionDisabled, isRowSelected, copiedCellIdx, draggedOverCellIdx, @@ -1799,21 +1828,24 @@ function Row({ })); } } + const selectionValue = react.useMemo(() => ({ + isRowSelected, + isRowSelectionDisabled + }), [isRowSelectionDisabled, isRowSelected]); return /*#__PURE__*/jsxRuntime.jsx(RowSelectionProvider, { - value: isRowSelected, + value: selectionValue, children: /*#__PURE__*/jsxRuntime.jsx("div", { role: "row", ref: ref, className: className, onMouseEnter: handleDragEnter, - style: getRowStyle(gridRowStart, height), + style: getRowStyle(gridRowStart), ...props, children: cells }) }); } -const RowComponent = /*#__PURE__*/react.memo( /*#__PURE__*/react.forwardRef(Row)); -const RowComponent$1 = RowComponent; +const RowComponent = /*#__PURE__*/react.memo(/*#__PURE__*/react.forwardRef(Row)); function defaultRenderRow(key, props) { return /*#__PURE__*/jsxRuntime.jsx(RowComponent, { ...props @@ -1854,7 +1886,7 @@ function ScrollToCell({ }); } -const arrow = "a3ejtar7-0-0-beta-44"; +const arrow = "a3ejtar7-0-0-beta-47"; const arrowClassname = `rdg-sort-arrow ${arrow}`; function renderSortStatus({ sortDirection, @@ -1889,14 +1921,14 @@ function renderSortPriority({ return priority; } -const root = "rnvodz57-0-0-beta-44"; +const root = "rnvodz57-0-0-beta-47"; const rootClassname = `rdg ${root}`; -const viewportDragging = "vlqv91k7-0-0-beta-44"; +const viewportDragging = "vlqv91k7-0-0-beta-47"; const viewportDraggingClassname = `rdg-viewport-dragging ${viewportDragging}`; -const focusSinkClassname = "f1lsfrzw7-0-0-beta-44"; -const focusSinkHeaderAndSummaryClassname = "f1cte0lg7-0-0-beta-44"; +const focusSinkClassname = "f1lsfrzw7-0-0-beta-47"; +const focusSinkHeaderAndSummaryClassname = "f1cte0lg7-0-0-beta-47"; -const summaryCellClassname = "s8wc6fl7-0-0-beta-44"; +const summaryCellClassname = "s8wc6fl7-0-0-beta-47"; function SummaryCell({ column, colSpan, @@ -1939,8 +1971,8 @@ function SummaryCell({ } const SummaryCell$1 = /*#__PURE__*/react.memo(SummaryCell); -const summaryRow = "skuhp557-0-0-beta-44"; -const topSummaryRow = "tf8l5ub7-0-0-beta-44"; +const summaryRow = "skuhp557-0-0-beta-47"; +const topSummaryRow = "tf8l5ub7-0-0-beta-47"; const summaryRowClassname = `rdg-summary-row ${summaryRow}`; function SummaryRow({ rowIdx, @@ -1966,7 +1998,7 @@ function SummaryRow({ index += colSpan - 1; } const isCellSelected = selectedCellIdx === column.idx; - cells.push( /*#__PURE__*/jsxRuntime.jsx(SummaryCell$1, { + cells.push(/*#__PURE__*/jsxRuntime.jsx(SummaryCell$1, { column: column, colSpan: colSpan, row: row, @@ -2001,6 +2033,7 @@ function DataGrid(props, ref) { headerRowHeight: rawHeaderRowHeight, summaryRowHeight: rawSummaryRowHeight, selectedRows, + isRowSelectionDisabled, onSelectedRowsChange, sortColumns, onSortColumnsChange, @@ -2103,11 +2136,23 @@ function DataGrid(props, ref) { renderSortStatus: renderSortStatus$1, renderCell }), [renderCheckbox$1, renderSortStatus$1, renderCell]); - const allRowsSelected = react.useMemo(() => { - const { - length - } = rows; - return length !== 0 && selectedRows != null && rowKeyGetter != null && selectedRows.size >= length && rows.every(row => selectedRows.has(rowKeyGetter(row))); + const headerSelectionValue = react.useMemo(() => { + let hasSelectedRow = false; + let hasUnselectedRow = false; + if (rowKeyGetter != null && selectedRows != null && selectedRows.size > 0) { + for (const row of rows) { + if (selectedRows.has(rowKeyGetter(row))) { + hasSelectedRow = true; + } else { + hasUnselectedRow = true; + } + if (hasSelectedRow && hasUnselectedRow) break; + } + } + return { + isRowSelected: hasSelectedRow && !hasUnselectedRow, + isIndeterminate: hasSelectedRow && hasUnselectedRow + }; }, [rows, selectedRows, rowKeyGetter]); const { rowOverscanStartIdx, @@ -2151,6 +2196,7 @@ function DataGrid(props, ref) { const onCellClickLatest = useLatestFunc(onCellClick); const onCellDoubleClickLatest = useLatestFunc(onCellDoubleClick); const onCellContextMenuLatest = useLatestFunc(onCellContextMenu); + const selectHeaderRowLatest = useLatestFunc(selectHeaderRow); const selectRowLatest = useLatestFunc(selectRow); const handleFormatterRowChangeLatest = useLatestFunc(updateRow); const selectCellLatest = useLatestFunc(selectCell); @@ -2203,44 +2249,51 @@ function DataGrid(props, ref) { setOverRowIdx(rowIdx); latestDraggedOverRowIdx.current = rowIdx; }, []); - function selectRow(args) { + function selectHeaderRow(args) { if (!onSelectedRowsChange) return; assertIsValidKeyGetter(rowKeyGetter); - if (args.type === 'HEADER') { - const newSelectedRows = new Set(selectedRows); - for (const row of rows) { - const rowKey = rowKeyGetter(row); - if (args.checked) { - newSelectedRows.add(rowKey); - } else { - newSelectedRows.delete(rowKey); - } + const newSelectedRows = new Set(selectedRows); + for (const row of rows) { + if (isRowSelectionDisabled?.(row) === true) continue; + const rowKey = rowKeyGetter(row); + if (args.checked) { + newSelectedRows.add(rowKey); + } else { + newSelectedRows.delete(rowKey); } - onSelectedRowsChange(newSelectedRows); - return; } + onSelectedRowsChange(newSelectedRows); + } + function selectRow(args) { + if (!onSelectedRowsChange) return; + assertIsValidKeyGetter(rowKeyGetter); const { row, checked, isShiftClick } = args; + if (isRowSelectionDisabled?.(row) === true) return; const newSelectedRows = new Set(selectedRows); const rowKey = rowKeyGetter(row); + const previousRowIdx = lastSelectedRowIdx.current; + const rowIdx = rows.indexOf(row); + lastSelectedRowIdx.current = rowIdx; if (checked) { newSelectedRows.add(rowKey); - const previousRowIdx = lastSelectedRowIdx.current; - const rowIdx = rows.indexOf(row); - lastSelectedRowIdx.current = rowIdx; - if (isShiftClick && previousRowIdx !== -1 && previousRowIdx !== rowIdx) { - const step = sign(rowIdx - previousRowIdx); - for (let i = previousRowIdx + step; i !== rowIdx; i += step) { - const row = rows[i]; + } else { + newSelectedRows.delete(rowKey); + } + if (isShiftClick && previousRowIdx !== -1 && previousRowIdx !== rowIdx && previousRowIdx < rows.length) { + const step = sign(rowIdx - previousRowIdx); + for (let i = previousRowIdx + step; i !== rowIdx; i += step) { + const row = rows[i]; + if (isRowSelectionDisabled?.(row) === true) continue; + if (checked) { newSelectedRows.add(rowKeyGetter(row)); + } else { + newSelectedRows.delete(rowKeyGetter(row)); } } - } else { - newSelectedRows.delete(rowKey); - lastSelectedRowIdx.current = -1; } onSelectedRowsChange(newSelectedRows); } @@ -2373,7 +2426,6 @@ function DataGrid(props, ref) { assertIsValidKeyGetter(rowKeyGetter); const rowKey = rowKeyGetter(row); selectRow({ - type: 'ROW', row, checked: !selectedRows.has(rowKey), isShiftClick: false @@ -2705,13 +2757,13 @@ function DataGrid(props, ref) { rowIdx, row, viewportColumns: rowColumns, + isRowSelectionDisabled: isRowSelectionDisabled?.(row) ?? false, isRowSelected, onCellClick: onCellClickLatest, onCellDoubleClick: onCellDoubleClickLatest, onCellContextMenu: onCellContextMenuLatest, rowClass, gridRowStart, - height: getRowHeight(rowIdx), copiedCellIdx: copiedCell !== null && copiedCell.row === row ? columns.findIndex(c => c.key === copiedCell.columnKey) : undefined, selectedCellIdx: selectedRowIdx === rowIdx ? selectedIdx : undefined, draggedOverCellIdx: getDraggedOverCellIdx(rowIdx), @@ -2759,9 +2811,7 @@ function DataGrid(props, ref) { gridTemplateColumns, gridTemplateRows: templateRows, '--rdg-header-row-height': `${headerRowHeight}px`, - '--rdg-summary-row-height': `${summaryRowHeight}px`, '--rdg-scroll-height': `${scrollHeight}px`, - '--rdg-sign': isRtl ? -1 : 1, ...layoutCssVars }, dir: direction, @@ -2769,12 +2819,12 @@ function DataGrid(props, ref) { onScroll: handleScroll, onKeyDown: handleKeyDown, "data-testid": testId, - children: [/*#__PURE__*/jsxRuntime.jsx(DataGridDefaultRenderersProvider, { + children: [/*#__PURE__*/jsxRuntime.jsxs(DataGridDefaultRenderersProvider, { value: defaultGridComponents, - children: /*#__PURE__*/jsxRuntime.jsxs(RowSelectionChangeProvider, { - value: selectRowLatest, - children: [/*#__PURE__*/jsxRuntime.jsxs(RowSelectionProvider, { - value: allRowsSelected, + children: [/*#__PURE__*/jsxRuntime.jsx(HeaderRowSelectionChangeProvider, { + value: selectHeaderRowLatest, + children: /*#__PURE__*/jsxRuntime.jsxs(HeaderRowSelectionProvider, { + value: headerSelectionValue, children: [Array.from({ length: groupedColumnHeaderRowsCount }, (_, index) => /*#__PURE__*/jsxRuntime.jsx(GroupedColumnHeaderRow$1, { @@ -2796,47 +2846,50 @@ function DataGrid(props, ref) { shouldFocusGrid: !selectedCellIsWithinSelectionBounds, direction: direction })] - }), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, { - children: [topSummaryRows?.map((row, rowIdx) => { - const gridRowStart = headerRowsCount + 1 + rowIdx; - const summaryRowIdx = mainHeaderRowIdx + 1 + rowIdx; - const isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx; - const top = headerRowsHeight + summaryRowHeight * rowIdx; - return /*#__PURE__*/jsxRuntime.jsx(SummaryRow$1, { - "aria-rowindex": gridRowStart, - rowIdx: summaryRowIdx, - gridRowStart: gridRowStart, - row: row, - top: top, - bottom: undefined, - viewportColumns: getRowViewportColumns(summaryRowIdx), - lastFrozenColumnIndex: lastFrozenColumnIndex, - selectedCellIdx: isSummaryRowSelected ? selectedPosition.idx : undefined, - isTop: true, - selectCell: selectCellLatest - }, rowIdx); - }), getViewportRows(), bottomSummaryRows?.map((row, rowIdx) => { - const gridRowStart = headerAndTopSummaryRowsCount + rows.length + rowIdx + 1; - const summaryRowIdx = rows.length + rowIdx; - const isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx; - const top = clientHeight > totalRowHeight ? gridHeight - summaryRowHeight * (bottomSummaryRows.length - rowIdx) : undefined; - const bottom = top === undefined ? summaryRowHeight * (bottomSummaryRows.length - 1 - rowIdx) : undefined; - return /*#__PURE__*/jsxRuntime.jsx(SummaryRow$1, { - "aria-rowindex": ariaRowCount - bottomSummaryRowsCount + rowIdx + 1, - rowIdx: summaryRowIdx, - gridRowStart: gridRowStart, - row: row, - top: top, - bottom: bottom, - viewportColumns: getRowViewportColumns(summaryRowIdx), - lastFrozenColumnIndex: lastFrozenColumnIndex, - selectedCellIdx: isSummaryRowSelected ? selectedPosition.idx : undefined, - isTop: false, - selectCell: selectCellLatest - }, rowIdx); - })] + }) + }), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, { + children: [topSummaryRows?.map((row, rowIdx) => { + const gridRowStart = headerRowsCount + 1 + rowIdx; + const summaryRowIdx = mainHeaderRowIdx + 1 + rowIdx; + const isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx; + const top = headerRowsHeight + summaryRowHeight * rowIdx; + return /*#__PURE__*/jsxRuntime.jsx(SummaryRow$1, { + "aria-rowindex": gridRowStart, + rowIdx: summaryRowIdx, + gridRowStart: gridRowStart, + row: row, + top: top, + bottom: undefined, + viewportColumns: getRowViewportColumns(summaryRowIdx), + lastFrozenColumnIndex: lastFrozenColumnIndex, + selectedCellIdx: isSummaryRowSelected ? selectedPosition.idx : undefined, + isTop: true, + selectCell: selectCellLatest + }, rowIdx); + }), /*#__PURE__*/jsxRuntime.jsx(RowSelectionChangeProvider, { + value: selectRowLatest, + children: getViewportRows() + }), bottomSummaryRows?.map((row, rowIdx) => { + const gridRowStart = headerAndTopSummaryRowsCount + rows.length + rowIdx + 1; + const summaryRowIdx = rows.length + rowIdx; + const isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx; + const top = clientHeight > totalRowHeight ? gridHeight - summaryRowHeight * (bottomSummaryRows.length - rowIdx) : undefined; + const bottom = top === undefined ? summaryRowHeight * (bottomSummaryRows.length - 1 - rowIdx) : undefined; + return /*#__PURE__*/jsxRuntime.jsx(SummaryRow$1, { + "aria-rowindex": ariaRowCount - bottomSummaryRowsCount + rowIdx + 1, + rowIdx: summaryRowIdx, + gridRowStart: gridRowStart, + row: row, + top: top, + bottom: bottom, + viewportColumns: getRowViewportColumns(summaryRowIdx), + lastFrozenColumnIndex: lastFrozenColumnIndex, + selectedCellIdx: isSummaryRowSelected ? selectedPosition.idx : undefined, + isTop: false, + selectCell: selectCellLatest + }, rowIdx); })] - }) + })] }), renderDragHandle(), renderMeasuringCells(viewportColumns), isTreeGrid && /*#__PURE__*/jsxRuntime.jsx("div", { ref: focusSinkRef, tabIndex: isGroupRowFocused ? 0 : -1, @@ -2905,7 +2958,7 @@ function GroupCell({ } const GroupCell$1 = /*#__PURE__*/react.memo(GroupCell); -const groupRow = "g1yxluv37-0-0-beta-44"; +const groupRow = "g1yxluv37-0-0-beta-47"; const groupRowClassname = `rdg-group-row ${groupRow}`; function GroupedRow({ className, @@ -2916,9 +2969,9 @@ function GroupedRow({ isRowSelected, selectCell, gridRowStart, - height, groupBy, toggleGroup, + isRowSelectionDisabled, ...props }) { const idx = viewportColumns[0].key === SELECT_COLUMN_KEY ? row.level + 1 : row.level; @@ -2928,8 +2981,12 @@ function GroupedRow({ idx: -1 }); } + const selectionValue = react.useMemo(() => ({ + isRowSelectionDisabled: false, + isRowSelected + }), [isRowSelected]); return /*#__PURE__*/jsxRuntime.jsx(RowSelectionProvider, { - value: isRowSelected, + value: selectionValue, children: /*#__PURE__*/jsxRuntime.jsx("div", { role: "row", "aria-level": row.level + 1, @@ -2938,7 +2995,7 @@ function GroupedRow({ "aria-expanded": row.isExpanded, className: clsx(rowClassname, groupRowClassname, `rdg-row-${rowIdx % 2 === 0 ? 'even' : 'odd'}`, className, selectedCellIdx === -1 && rowSelectedClassname), onClick: handleSelectGroup, - style: getRowStyle(gridRowStart, height), + style: getRowStyle(gridRowStart), ...props, children: viewportColumns.map(column => /*#__PURE__*/jsxRuntime.jsx(GroupCell$1, { id: row.id, @@ -3295,7 +3352,7 @@ function isReadonlyArray(arr) { } const TreeDataGrid$1 = /*#__PURE__*/react.forwardRef(TreeDataGrid); -const textEditorInternalClassname = "t7vyx3i7-0-0-beta-44"; +const textEditorInternalClassname = "t7vyx3i7-0-0-beta-47"; const textEditorClassname = `rdg-text-editor ${textEditorInternalClassname}`; function autoFocusAndSelect(input) { input?.focus(); @@ -3319,9 +3376,9 @@ function textEditor({ }); } -exports.Cell = CellComponent$1; +exports.Cell = CellComponent; exports.DataGridDefaultRenderersProvider = DataGridDefaultRenderersProvider; -exports.Row = RowComponent$1; +exports.Row = RowComponent; exports.SELECT_COLUMN_KEY = SELECT_COLUMN_KEY; exports.SelectCellFormatter = SelectCellFormatter; exports.SelectColumn = SelectColumn; @@ -3335,5 +3392,6 @@ exports.renderSortPriority = renderSortPriority; exports.renderToggleGroup = renderToggleGroup; exports.renderValue = renderValue; exports.textEditor = textEditor; +exports.useHeaderRowSelection = useHeaderRowSelection; exports.useRowSelection = useRowSelection; //# sourceMappingURL=bundle.cjs.map diff --git a/webapp/packages/plugin-react-data-grid/react-data-grid-dist/lib/bundle.cjs.map b/webapp/packages/plugin-react-data-grid/react-data-grid-dist/lib/bundle.cjs.map index a0731d41f3..4c948f9921 100644 --- a/webapp/packages/plugin-react-data-grid/react-data-grid-dist/lib/bundle.cjs.map +++ b/webapp/packages/plugin-react-data-grid/react-data-grid-dist/lib/bundle.cjs.map @@ -1 +1 @@ -{"version":3,"file":"bundle.cjs","sources":["../src/utils/colSpanUtils.ts","../src/utils/domUtils.ts","../src/utils/eventUtils.ts","../src/utils/keyboardUtils.ts","../src/utils/renderMeasuringCells.tsx","../src/utils/selectedCellUtils.ts","../src/style/cell.ts","../src/utils/styleUtils.ts","../src/utils/index.ts","../src/cellRenderers/renderCheckbox.tsx","../src/cellRenderers/renderToggleGroup.tsx","../src/cellRenderers/renderValue.tsx","../src/DataGridDefaultRenderersProvider.ts","../src/cellRenderers/SelectCellFormatter.tsx","../src/hooks/useRowSelection.ts","../src/Columns.tsx","../src/hooks/useCalculatedColumns.ts","../src/hooks/useLayoutEffect.ts","../src/hooks/useColumnWidths.ts","../src/hooks/useGridDimensions.ts","../src/hooks/useLatestFunc.ts","../src/hooks/useRovingTabIndex.ts","../src/hooks/useViewportColumns.ts","../src/hooks/useViewportRows.ts","../src/Cell.tsx","../src/DragHandle.tsx","../src/EditCell.tsx","../src/GroupedColumnHeaderCell.tsx","../src/renderHeaderCell.tsx","../src/HeaderCell.tsx","../src/style/row.ts","../src/HeaderRow.tsx","../src/GroupedColumnHeaderRow.tsx","../src/Row.tsx","../src/ScrollToCell.tsx","../src/sortStatus.tsx","../src/style/core.ts","../src/SummaryCell.tsx","../src/SummaryRow.tsx","../src/DataGrid.tsx","../src/GroupCell.tsx","../src/GroupRow.tsx","../src/TreeDataGrid.tsx","../src/editors/textEditor.tsx"],"sourcesContent":["import type { CalculatedColumn, ColSpanArgs } from '../types';\n\nexport function getColSpan(\n column: CalculatedColumn,\n lastFrozenColumnIndex: number,\n args: ColSpanArgs\n): number | undefined {\n const colSpan = typeof column.colSpan === 'function' ? column.colSpan(args) : 1;\n if (\n Number.isInteger(colSpan) &&\n colSpan! > 1 &&\n // ignore colSpan if it spans over both frozen and regular columns\n (!column.frozen || column.idx + colSpan! - 1 <= lastFrozenColumnIndex)\n ) {\n return colSpan!;\n }\n return undefined;\n}\n","import type { Maybe } from '../types';\n\nexport function stopPropagation(event: React.SyntheticEvent) {\n event.stopPropagation();\n}\n\nexport function scrollIntoView(element: Maybe) {\n element?.scrollIntoView({ inline: 'nearest', block: 'nearest' });\n}\n","import type { CellEvent } from '../types';\n\nexport function createCellEvent>(\n event: E\n): CellEvent {\n let defaultPrevented = false;\n const cellEvent = {\n ...event,\n preventGridDefault() {\n defaultPrevented = true;\n },\n isGridDefaultPrevented() {\n return defaultPrevented;\n }\n };\n\n Object.setPrototypeOf(cellEvent, Object.getPrototypeOf(event));\n\n return cellEvent;\n}\n","// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values\nconst nonInputKeys = new Set([\n // Special keys\n 'Unidentified',\n // Modifier keys\n 'Alt',\n 'AltGraph',\n 'CapsLock',\n 'Control',\n 'Fn',\n 'FnLock',\n 'Meta',\n 'NumLock',\n 'ScrollLock',\n 'Shift',\n // Whitespace keys\n 'Tab',\n // Navigation keys\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'End',\n 'Home',\n 'PageDown',\n 'PageUp',\n // Editing\n 'Insert',\n // UI keys\n 'ContextMenu',\n 'Escape',\n 'Pause',\n 'Play',\n // Device keys\n 'PrintScreen',\n // Function keys\n 'F1',\n // 'F2', /!\\ specifically allowed, do not edit\n 'F3',\n 'F4',\n 'F5',\n 'F6',\n 'F7',\n 'F8',\n 'F9',\n 'F10',\n 'F11',\n 'F12'\n]);\n\nexport function isCtrlKeyHeldDown(e: React.KeyboardEvent): boolean {\n return (e.ctrlKey || e.metaKey) && e.key !== 'Control';\n}\n\nexport function isDefaultCellInput(event: React.KeyboardEvent): boolean {\n const vKey = 86;\n if (isCtrlKeyHeldDown(event) && event.keyCode !== vKey) return false;\n return !nonInputKeys.has(event.key);\n}\n\n/**\n * By default, the following navigation keys are enabled while an editor is open, under specific conditions:\n * - Tab:\n * - The editor must be an , a