From b7a56d9590f8e805a055618f382a2fc6818b73a4 Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Mon, 15 Jan 2024 18:07:30 +0100 Subject: [PATCH 1/9] CB-4382 fixed anonymous error --- .../core-blocks/src/ResourcesHooks/useResource.ts | 6 +----- webapp/packages/core-root/src/FeaturesResource.ts | 10 +++------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/webapp/packages/core-blocks/src/ResourcesHooks/useResource.ts b/webapp/packages/core-blocks/src/ResourcesHooks/useResource.ts index 43f4f455ad..dee7488790 100644 --- a/webapp/packages/core-blocks/src/ResourcesHooks/useResource.ts +++ b/webapp/packages/core-blocks/src/ResourcesHooks/useResource.ts @@ -349,10 +349,6 @@ export function useResource< return true; } - if (this.isError()) { - return true; - } - return this.resource.isLoaded(propertiesRef.key, propertiesRef.includes); }, get loading(): boolean { @@ -461,7 +457,7 @@ export function useResource< useEffect(() => { refObj.use(loadKey); - if (canLoad && !result.isError()) { + if (canLoad) { result.load(); } }, [canLoad, loadKey]); diff --git a/webapp/packages/core-root/src/FeaturesResource.ts b/webapp/packages/core-root/src/FeaturesResource.ts index de6c14b658..85e9d8de72 100644 --- a/webapp/packages/core-root/src/FeaturesResource.ts +++ b/webapp/packages/core-root/src/FeaturesResource.ts @@ -9,20 +9,16 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; import { GraphQLService, WebFeatureSet } from '@cloudbeaver/core-sdk'; -import { ServerConfigResource } from './ServerConfigResource'; +import { SessionPermissionsResource } from './SessionPermissionsResource'; export type ApplicationFeature = WebFeatureSet; @injectable() export class FeaturesResource extends CachedDataResource { - constructor(private readonly graphQLService: GraphQLService, serverConfigResource: ServerConfigResource) { + constructor(private readonly graphQLService: GraphQLService, permissionsResource: SessionPermissionsResource) { super(() => []); - this.sync( - serverConfigResource, - () => {}, - () => {}, - ); + permissionsResource.require(this, 'admin').outdateResource(this); } protected async loader(): Promise { From a02d5f116afbc71164a39438ddee73036824702c Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Mon, 15 Jan 2024 18:25:49 +0100 Subject: [PATCH 2/9] CB-4382 move EAdminPermission to root-resources in order to FeatureResource can import it --- .../AdministrationScreen/AdministrationScreenService.ts | 2 +- .../src/AuthConfigurationParametersResource.ts | 4 +--- .../core-authentication/src/AuthConfigurationsResource.ts | 2 +- .../packages/core-authentication/src/AuthRolesResource.ts | 4 +--- webapp/packages/core-authentication/src/UsersResource.ts | 2 +- webapp/packages/core-authentication/src/index.ts | 1 - .../packages/core-blocks/src/useAdministrationSettings.ts | 2 +- .../core-resource-manager/src/SharedProjectsResource.ts | 2 +- .../src => core-resource/src/Resource}/EAdminPermission.ts | 0 webapp/packages/core-resource/src/index.ts | 1 + webapp/packages/core-root/src/FeaturesResource.ts | 4 ++-- .../src/AdministrationScreen/AdministrationScreen.tsx | 2 +- .../ConfigurationWizard/ConfigurationWizardScreen.tsx | 2 +- .../packages/plugin-administration/src/PluginBootstrap.ts | 2 +- .../src/SearchConnectionPluginBootstrap.ts | 7 ++----- .../ConnectionAccess/ConnectionAccessTabService.ts | 2 +- .../src/ConnectionForm/Options/Options.tsx | 4 ++-- .../src/ContextMenu/ConnectionMenuBootstrap.ts | 3 +-- .../plugin-data-export/src/DataExportMenuService.ts | 2 +- .../src/ValuePanelPresentation/QuotaPlaceholder.tsx | 2 +- webapp/packages/plugin-devtools/src/PluginBootstrap.ts | 3 +-- 21 files changed, 22 insertions(+), 31 deletions(-) rename webapp/packages/{core-authentication/src => core-resource/src/Resource}/EAdminPermission.ts (100%) diff --git a/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts b/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts index cf14bf35d8..843aeb587c 100644 --- a/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts +++ b/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts @@ -7,10 +7,10 @@ */ import { computed, makeObservable, observable } from 'mobx'; -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { Executor, IExecutor } from '@cloudbeaver/core-executor'; +import { EAdminPermission } from '@cloudbeaver/core-resource'; import { PermissionsService, ServerConfigResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { RouterState, ScreenService } from '@cloudbeaver/core-routing'; import { LocalStorageSaveService } from '@cloudbeaver/core-settings'; diff --git a/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts b/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts index 0a1533220d..6567773bda 100644 --- a/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts +++ b/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { CachedMapResource, isResourceAlias, type ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { CachedMapResource, EAdminPermission, isResourceAlias, type ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; import { SessionDataResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { AuthProviderConfigurationParametersFragment, @@ -14,8 +14,6 @@ import { GraphQLService, } from '@cloudbeaver/core-sdk'; -import { EAdminPermission } from './EAdminPermission'; - @injectable() export class AuthConfigurationParametersResource extends CachedMapResource< string, diff --git a/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts b/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts index 41b18aff73..46f1f732df 100644 --- a/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts +++ b/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts @@ -11,6 +11,7 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedMapAllKey, CachedMapResource, + EAdminPermission, isResourceAlias, type ResourceKey, resourceKeyList, @@ -21,7 +22,6 @@ import { SessionPermissionsResource } from '@cloudbeaver/core-root'; import { AdminAuthProviderConfiguration, GetAuthProviderConfigurationsQueryVariables, GraphQLService } from '@cloudbeaver/core-sdk'; import type { AuthProviderConfiguration } from './AuthProvidersResource'; -import { EAdminPermission } from './EAdminPermission'; const NEW_CONFIGURATION_SYMBOL = Symbol('new-configuration'); diff --git a/webapp/packages/core-authentication/src/AuthRolesResource.ts b/webapp/packages/core-authentication/src/AuthRolesResource.ts index 6b1fc69d22..7f4a4594b3 100644 --- a/webapp/packages/core-authentication/src/AuthRolesResource.ts +++ b/webapp/packages/core-authentication/src/AuthRolesResource.ts @@ -6,12 +6,10 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { CachedDataResource } from '@cloudbeaver/core-resource'; +import { CachedDataResource, EAdminPermission } from '@cloudbeaver/core-resource'; import { SessionPermissionsResource } from '@cloudbeaver/core-root'; import { GraphQLService } from '@cloudbeaver/core-sdk'; -import { EAdminPermission } from './EAdminPermission'; - @injectable() export class AuthRolesResource extends CachedDataResource { constructor(private readonly graphQLService: GraphQLService, sessionPermissionsResource: SessionPermissionsResource) { diff --git a/webapp/packages/core-authentication/src/UsersResource.ts b/webapp/packages/core-authentication/src/UsersResource.ts index d54bc87a3a..7fb922a76d 100644 --- a/webapp/packages/core-authentication/src/UsersResource.ts +++ b/webapp/packages/core-authentication/src/UsersResource.ts @@ -13,6 +13,7 @@ import { CachedMapResource, CachedResourceOffsetPageKey, CachedResourceOffsetPageListKey, + EAdminPermission, isResourceAlias, type ResourceKey, resourceKeyList, @@ -27,7 +28,6 @@ import { AdminConnectionGrantInfo, AdminUserInfo, AdminUserInfoFragment, GetUser import { AUTH_PROVIDER_LOCAL_ID } from './AUTH_PROVIDER_LOCAL_ID'; import { AuthInfoService } from './AuthInfoService'; import { AuthProviderService } from './AuthProviderService'; -import { EAdminPermission } from './EAdminPermission'; import type { IAuthCredentials } from './IAuthCredentials'; const NEW_USER_SYMBOL = Symbol('new-user'); diff --git a/webapp/packages/core-authentication/src/index.ts b/webapp/packages/core-authentication/src/index.ts index b2b7c7af17..d5b3367103 100644 --- a/webapp/packages/core-authentication/src/index.ts +++ b/webapp/packages/core-authentication/src/index.ts @@ -18,5 +18,4 @@ export * from './UserInfoResource'; export * from './UserMetaParametersResource'; export * from './UsersResource'; export * from './TeamMetaParametersResource'; -export * from './EAdminPermission'; export * from './AUTH_SETTINGS_GROUP'; diff --git a/webapp/packages/core-blocks/src/useAdministrationSettings.ts b/webapp/packages/core-blocks/src/useAdministrationSettings.ts index 575d343af3..530a9e438d 100644 --- a/webapp/packages/core-blocks/src/useAdministrationSettings.ts +++ b/webapp/packages/core-blocks/src/useAdministrationSettings.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 { EAdminPermission } from '@cloudbeaver/core-authentication'; +import { EAdminPermission } from '@cloudbeaver/core-resource'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import { useResource } from './ResourcesHooks/useResource'; diff --git a/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts b/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts index beed7bb0ef..59eb2b0bbe 100644 --- a/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts +++ b/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts @@ -8,12 +8,12 @@ import { runInAction } from 'mobx'; import type { AdminObjectGrantInfo } from '@cloudbeaver/core-administration'; -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { injectable } from '@cloudbeaver/core-di'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { CachedMapAllKey, CachedMapResource, + EAdminPermission, type ResourceKey, type ResourceKeyList, resourceKeyList, diff --git a/webapp/packages/core-authentication/src/EAdminPermission.ts b/webapp/packages/core-resource/src/Resource/EAdminPermission.ts similarity index 100% rename from webapp/packages/core-authentication/src/EAdminPermission.ts rename to webapp/packages/core-resource/src/Resource/EAdminPermission.ts diff --git a/webapp/packages/core-resource/src/index.ts b/webapp/packages/core-resource/src/index.ts index de996d0233..b7c790935f 100644 --- a/webapp/packages/core-resource/src/index.ts +++ b/webapp/packages/core-resource/src/index.ts @@ -21,5 +21,6 @@ export * from './Resource/ResourceKey'; export * from './Resource/ResourceKeyAlias'; export * from './Resource/ResourceKeyList'; export * from './Resource/ResourceKeyListAlias'; +export * from './Resource/EAdminPermission'; export * from './Resource/ResourceKeyUtils'; export { coreResourceManifest } from './manifest'; diff --git a/webapp/packages/core-root/src/FeaturesResource.ts b/webapp/packages/core-root/src/FeaturesResource.ts index 85e9d8de72..f739a675a1 100644 --- a/webapp/packages/core-root/src/FeaturesResource.ts +++ b/webapp/packages/core-root/src/FeaturesResource.ts @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { CachedDataResource } from '@cloudbeaver/core-resource'; +import { CachedDataResource, EAdminPermission } from '@cloudbeaver/core-resource'; import { GraphQLService, WebFeatureSet } from '@cloudbeaver/core-sdk'; import { SessionPermissionsResource } from './SessionPermissionsResource'; @@ -18,7 +18,7 @@ export class FeaturesResource extends CachedDataResource { constructor(private readonly graphQLService: GraphQLService, permissionsResource: SessionPermissionsResource) { super(() => []); - permissionsResource.require(this, 'admin').outdateResource(this); + permissionsResource.require(this, EAdminPermission.admin).outdateResource(this); } protected async loader(): Promise { diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx index e60e78c02f..e526932ad6 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx @@ -9,9 +9,9 @@ import { observer } from 'mobx-react-lite'; import { useCallback } from 'react'; import { AdministrationScreenService } from '@cloudbeaver/core-administration'; -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { usePermission } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; +import { EAdminPermission } from '@cloudbeaver/core-resource'; import type { ScreenComponent } from '@cloudbeaver/core-routing'; import { Administration } from '../Administration/Administration'; diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx index 6a853eb20e..14aa9f4b08 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx @@ -9,9 +9,9 @@ import { observer } from 'mobx-react-lite'; import { useCallback } from 'react'; import { AdministrationItemService, AdministrationScreenService } from '@cloudbeaver/core-administration'; -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { Translate, usePermission, useResource } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; +import { EAdminPermission } from '@cloudbeaver/core-resource'; import { SessionPermissionsResource } from '@cloudbeaver/core-root'; import { Administration } from '../../Administration/Administration'; diff --git a/webapp/packages/plugin-administration/src/PluginBootstrap.ts b/webapp/packages/plugin-administration/src/PluginBootstrap.ts index 82b12c842c..dfba8a3446 100644 --- a/webapp/packages/plugin-administration/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-administration/src/PluginBootstrap.ts @@ -8,8 +8,8 @@ import { lazy } from 'react'; import { AdministrationScreenService } from '@cloudbeaver/core-administration'; -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; +import { EAdminPermission } from '@cloudbeaver/core-resource'; import { PermissionsService } from '@cloudbeaver/core-root'; import { ScreenService } from '@cloudbeaver/core-routing'; import { DATA_CONTEXT_MENU, MenuBaseItem, MenuService } from '@cloudbeaver/core-view'; diff --git a/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts b/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts index 33e66a97f7..40e8e093cd 100644 --- a/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts +++ b/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts @@ -5,11 +5,10 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { ConnectionsManagerService } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; -import { CachedMapAllKey, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; +import { CachedMapAllKey, EAdminPermission, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; import { PermissionsService } from '@cloudbeaver/core-root'; import { ActionService, DATA_CONTEXT_MENU, MenuService } from '@cloudbeaver/core-view'; import { MENU_CONNECTIONS } from '@cloudbeaver/plugin-connections'; @@ -52,9 +51,7 @@ export class SearchConnectionPluginBootstrap extends Bootstrap { return false; }, - getLoader: (context, action) => { - return getCachedMapResourceLoaderState(this.projectInfoResource, () => CachedMapAllKey); - }, + getLoader: (context, action) => getCachedMapResourceLoaderState(this.projectInfoResource, () => CachedMapAllKey), handler: async (context, action) => { switch (action) { case ACTION_CONNECTION_SEARCH: { 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 2b77f0ce7d..ea2d2a60cf 100644 --- a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessTabService.ts +++ b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessTabService.ts @@ -8,11 +8,11 @@ import React from 'react'; import { AdministrationScreenService } from '@cloudbeaver/core-administration'; -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { ConnectionInfoResource, createConnectionParam, IConnectionInfoParams } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { executorHandlerFilter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { isGlobalProject, ProjectInfoResource } from '@cloudbeaver/core-projects'; +import { EAdminPermission } from '@cloudbeaver/core-resource'; import { PermissionsService } from '@cloudbeaver/core-root'; import { formStateContext } from '@cloudbeaver/core-ui'; import type { MetadataValueGetter } from '@cloudbeaver/core-utils'; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx index b8727b3623..01a8251978 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useCallback, useRef } from 'react'; -import { AUTH_PROVIDER_LOCAL_ID, EAdminPermission } from '@cloudbeaver/core-authentication'; +import { AUTH_PROVIDER_LOCAL_ID } from '@cloudbeaver/core-authentication'; import { ColoredContainer, Combobox, @@ -34,7 +34,7 @@ import { } from '@cloudbeaver/core-blocks'; import { DatabaseAuthModelsResource, DBDriverResource, isLocalConnection } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; -import { CachedResourceListEmptyKey, resourceKeyList } from '@cloudbeaver/core-resource'; +import { CachedResourceListEmptyKey, EAdminPermission, resourceKeyList } from '@cloudbeaver/core-resource'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import { DriverConfigurationType } from '@cloudbeaver/core-sdk'; import { type TabContainerPanelComponent, useAuthenticationAction } from '@cloudbeaver/core-ui'; diff --git a/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts b/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts index d2bd3dc7f2..0d67b9d23a 100644 --- a/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts +++ b/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts @@ -5,7 +5,6 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { Connection, ConnectionInfoResource, @@ -17,7 +16,7 @@ import { import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { DATA_CONTEXT_NAV_NODE, EObjectFeature, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; -import { getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; +import { EAdminPermission, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; import { CONNECTION_NAVIGATOR_VIEW_SETTINGS, isNavigatorViewSettingsEqual, diff --git a/webapp/packages/plugin-data-export/src/DataExportMenuService.ts b/webapp/packages/plugin-data-export/src/DataExportMenuService.ts index e7845520a3..198b011e90 100644 --- a/webapp/packages/plugin-data-export/src/DataExportMenuService.ts +++ b/webapp/packages/plugin-data-export/src/DataExportMenuService.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 { EAdminPermission } from '@cloudbeaver/core-authentication'; import { createConnectionParam, DATA_CONTEXT_CONNECTION } from '@cloudbeaver/core-connections'; import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, IMenuContext } from '@cloudbeaver/core-dialogs'; import { DATA_CONTEXT_NAV_NODE, EObjectFeature } from '@cloudbeaver/core-navigation-tree'; +import { EAdminPermission } from '@cloudbeaver/core-resource'; import { SessionPermissionsResource } from '@cloudbeaver/core-root'; import { ACTION_EXPORT, ActionService, DATA_CONTEXT_MENU_NESTED, MenuService } from '@cloudbeaver/core-view'; import { IDatabaseDataSource, IDataContainerOptions, ITableFooterMenuContext, TableFooterMenuService } from '@cloudbeaver/plugin-data-viewer'; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx index 19a606e151..936ef9d34a 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx @@ -8,8 +8,8 @@ import { observer } from 'mobx-react-lite'; import styled, { css } from 'reshadow'; -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { Link, usePermission, useTranslate } from '@cloudbeaver/core-blocks'; +import { EAdminPermission } from '@cloudbeaver/core-resource'; interface Props { limit?: string; diff --git a/webapp/packages/plugin-devtools/src/PluginBootstrap.ts b/webapp/packages/plugin-devtools/src/PluginBootstrap.ts index 0bc89b9a9a..ccc055e65c 100644 --- a/webapp/packages/plugin-devtools/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-devtools/src/PluginBootstrap.ts @@ -5,9 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { EAdminPermission } from '@cloudbeaver/core-authentication'; import { App, Bootstrap, DIService, injectable, IServiceConstructor } from '@cloudbeaver/core-di'; -import { CachedResource } from '@cloudbeaver/core-resource'; +import { CachedResource, EAdminPermission } from '@cloudbeaver/core-resource'; import { PermissionsService } from '@cloudbeaver/core-root'; import { ActionService, DATA_CONTEXT_MENU, DATA_CONTEXT_SUBMENU_ITEM, MenuBaseItem, MenuService } from '@cloudbeaver/core-view'; import { TOP_NAV_BAR_SETTINGS_MENU } from '@cloudbeaver/plugin-settings-menu'; From e22e56f44a43a02da17d317781b8e985aa0f18cc Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Wed, 17 Jan 2024 12:10:35 +0100 Subject: [PATCH 3/9] CB-4282 EAdminPermission moved to core-root --- .../src/AdministrationScreen/AdministrationScreenService.ts | 3 +-- .../src/AuthConfigurationParametersResource.ts | 4 ++-- .../core-authentication/src/AuthConfigurationsResource.ts | 3 +-- webapp/packages/core-authentication/src/AuthRolesResource.ts | 4 ++-- webapp/packages/core-authentication/src/UsersResource.ts | 3 +-- webapp/packages/core-blocks/src/useAdministrationSettings.ts | 3 +-- .../core-resource-manager/src/SharedProjectsResource.ts | 3 +-- webapp/packages/core-resource/src/index.ts | 1 - .../src/Resource => core-root/src}/EAdminPermission.ts | 0 webapp/packages/core-root/src/FeaturesResource.ts | 3 ++- webapp/packages/core-root/src/index.ts | 1 + .../src/AdministrationScreen/AdministrationScreen.tsx | 2 +- .../ConfigurationWizard/ConfigurationWizardScreen.tsx | 3 +-- webapp/packages/plugin-administration/src/PluginBootstrap.ts | 3 +-- .../src/SearchConnectionPluginBootstrap.ts | 4 ++-- .../ConnectionAccess/ConnectionAccessTabService.ts | 3 +-- .../plugin-connections/src/ConnectionForm/Options/Options.tsx | 4 ++-- .../src/ContextMenu/ConnectionMenuBootstrap.ts | 3 ++- .../packages/plugin-data-export/src/DataExportMenuService.ts | 3 +-- .../src/ValuePanelPresentation/QuotaPlaceholder.tsx | 2 +- webapp/packages/plugin-devtools/src/PluginBootstrap.ts | 4 ++-- 21 files changed, 26 insertions(+), 33 deletions(-) rename webapp/packages/{core-resource/src/Resource => core-root/src}/EAdminPermission.ts (100%) diff --git a/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts b/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts index 843aeb587c..1948153ade 100644 --- a/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts +++ b/webapp/packages/core-administration/src/AdministrationScreen/AdministrationScreenService.ts @@ -10,8 +10,7 @@ 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 { EAdminPermission } from '@cloudbeaver/core-resource'; -import { PermissionsService, ServerConfigResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; +import { EAdminPermission, PermissionsService, ServerConfigResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { RouterState, ScreenService } from '@cloudbeaver/core-routing'; import { LocalStorageSaveService } from '@cloudbeaver/core-settings'; import { GlobalConstants } from '@cloudbeaver/core-utils'; diff --git a/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts b/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts index 6567773bda..19f223b322 100644 --- a/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts +++ b/webapp/packages/core-authentication/src/AuthConfigurationParametersResource.ts @@ -6,8 +6,8 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { CachedMapResource, EAdminPermission, isResourceAlias, type ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; -import { SessionDataResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; +import { CachedMapResource, isResourceAlias, type ResourceKey, ResourceKeyUtils } from '@cloudbeaver/core-resource'; +import { EAdminPermission, SessionDataResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { AuthProviderConfigurationParametersFragment, GetAuthProviderConfigurationParametersQueryVariables, diff --git a/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts b/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts index 46f1f732df..be4acb05d7 100644 --- a/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts +++ b/webapp/packages/core-authentication/src/AuthConfigurationsResource.ts @@ -11,14 +11,13 @@ import { injectable } from '@cloudbeaver/core-di'; import { CachedMapAllKey, CachedMapResource, - EAdminPermission, isResourceAlias, type ResourceKey, resourceKeyList, type ResourceKeySimple, ResourceKeyUtils, } from '@cloudbeaver/core-resource'; -import { SessionPermissionsResource } from '@cloudbeaver/core-root'; +import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { AdminAuthProviderConfiguration, GetAuthProviderConfigurationsQueryVariables, GraphQLService } from '@cloudbeaver/core-sdk'; import type { AuthProviderConfiguration } from './AuthProvidersResource'; diff --git a/webapp/packages/core-authentication/src/AuthRolesResource.ts b/webapp/packages/core-authentication/src/AuthRolesResource.ts index 7f4a4594b3..0cf05b8ef7 100644 --- a/webapp/packages/core-authentication/src/AuthRolesResource.ts +++ b/webapp/packages/core-authentication/src/AuthRolesResource.ts @@ -6,8 +6,8 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { CachedDataResource, EAdminPermission } from '@cloudbeaver/core-resource'; -import { SessionPermissionsResource } from '@cloudbeaver/core-root'; +import { CachedDataResource } from '@cloudbeaver/core-resource'; +import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { GraphQLService } from '@cloudbeaver/core-sdk'; @injectable() diff --git a/webapp/packages/core-authentication/src/UsersResource.ts b/webapp/packages/core-authentication/src/UsersResource.ts index 7fb922a76d..b51f0d1454 100644 --- a/webapp/packages/core-authentication/src/UsersResource.ts +++ b/webapp/packages/core-authentication/src/UsersResource.ts @@ -13,7 +13,6 @@ import { CachedMapResource, CachedResourceOffsetPageKey, CachedResourceOffsetPageListKey, - EAdminPermission, isResourceAlias, type ResourceKey, resourceKeyList, @@ -22,7 +21,7 @@ import { type ResourceKeySimple, ResourceKeyUtils, } from '@cloudbeaver/core-resource'; -import { ServerConfigResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; +import { EAdminPermission, ServerConfigResource, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { AdminConnectionGrantInfo, AdminUserInfo, AdminUserInfoFragment, GetUsersListQueryVariables, GraphQLService } from '@cloudbeaver/core-sdk'; import { AUTH_PROVIDER_LOCAL_ID } from './AUTH_PROVIDER_LOCAL_ID'; diff --git a/webapp/packages/core-blocks/src/useAdministrationSettings.ts b/webapp/packages/core-blocks/src/useAdministrationSettings.ts index 530a9e438d..9bfc5f6879 100644 --- a/webapp/packages/core-blocks/src/useAdministrationSettings.ts +++ b/webapp/packages/core-blocks/src/useAdministrationSettings.ts @@ -5,8 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { EAdminPermission } from '@cloudbeaver/core-resource'; -import { ServerConfigResource } from '@cloudbeaver/core-root'; +import { EAdminPermission, ServerConfigResource } from '@cloudbeaver/core-root'; import { useResource } from './ResourcesHooks/useResource'; import { usePermission } from './usePermission'; diff --git a/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts b/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts index 59eb2b0bbe..537fb515da 100644 --- a/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts +++ b/webapp/packages/core-resource-manager/src/SharedProjectsResource.ts @@ -13,13 +13,12 @@ import { ProjectInfoResource } from '@cloudbeaver/core-projects'; import { CachedMapAllKey, CachedMapResource, - EAdminPermission, type ResourceKey, type ResourceKeyList, resourceKeyList, ResourceKeyUtils, } from '@cloudbeaver/core-resource'; -import { SessionPermissionsResource } from '@cloudbeaver/core-root'; +import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { GraphQLService, RmProject, RmProjectPermissions, RmSubjectProjectPermissions } from '@cloudbeaver/core-sdk'; import { isArraysEqual } from '@cloudbeaver/core-utils'; diff --git a/webapp/packages/core-resource/src/index.ts b/webapp/packages/core-resource/src/index.ts index b7c790935f..de996d0233 100644 --- a/webapp/packages/core-resource/src/index.ts +++ b/webapp/packages/core-resource/src/index.ts @@ -21,6 +21,5 @@ export * from './Resource/ResourceKey'; export * from './Resource/ResourceKeyAlias'; export * from './Resource/ResourceKeyList'; export * from './Resource/ResourceKeyListAlias'; -export * from './Resource/EAdminPermission'; export * from './Resource/ResourceKeyUtils'; export { coreResourceManifest } from './manifest'; diff --git a/webapp/packages/core-resource/src/Resource/EAdminPermission.ts b/webapp/packages/core-root/src/EAdminPermission.ts similarity index 100% rename from webapp/packages/core-resource/src/Resource/EAdminPermission.ts rename to webapp/packages/core-root/src/EAdminPermission.ts diff --git a/webapp/packages/core-root/src/FeaturesResource.ts b/webapp/packages/core-root/src/FeaturesResource.ts index f739a675a1..cab98e6e7d 100644 --- a/webapp/packages/core-root/src/FeaturesResource.ts +++ b/webapp/packages/core-root/src/FeaturesResource.ts @@ -6,9 +6,10 @@ * you may not use this file except in compliance with the License. */ import { injectable } from '@cloudbeaver/core-di'; -import { CachedDataResource, EAdminPermission } from '@cloudbeaver/core-resource'; +import { CachedDataResource } from '@cloudbeaver/core-resource'; import { GraphQLService, WebFeatureSet } from '@cloudbeaver/core-sdk'; +import { EAdminPermission } from './EAdminPermission'; import { SessionPermissionsResource } from './SessionPermissionsResource'; export type ApplicationFeature = WebFeatureSet; diff --git a/webapp/packages/core-root/src/index.ts b/webapp/packages/core-root/src/index.ts index dd83fdde62..8869c33f54 100644 --- a/webapp/packages/core-root/src/index.ts +++ b/webapp/packages/core-root/src/index.ts @@ -18,6 +18,7 @@ export * from './SessionResource'; export * from './ServerService'; export * from './ServerSettingsService'; export * from './SessionActionService'; +export * from './EAdminPermission'; export * from './SessionDataResource'; export * from './SessionSettingsService'; export * from './SessionExpireService'; diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx index e526932ad6..724ec6fe16 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreen.tsx @@ -11,7 +11,7 @@ import { useCallback } from 'react'; import { AdministrationScreenService } from '@cloudbeaver/core-administration'; import { usePermission } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { EAdminPermission } from '@cloudbeaver/core-resource'; +import { EAdminPermission } from '@cloudbeaver/core-root'; import type { ScreenComponent } from '@cloudbeaver/core-routing'; import { Administration } from '../Administration/Administration'; diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx index 14aa9f4b08..67b33de0b4 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/ConfigurationWizard/ConfigurationWizardScreen.tsx @@ -11,8 +11,7 @@ import { useCallback } from 'react'; import { AdministrationItemService, AdministrationScreenService } from '@cloudbeaver/core-administration'; import { Translate, usePermission, useResource } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { EAdminPermission } from '@cloudbeaver/core-resource'; -import { SessionPermissionsResource } from '@cloudbeaver/core-root'; +import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { Administration } from '../../Administration/Administration'; import { WizardStepper } from './WizardStepper'; diff --git a/webapp/packages/plugin-administration/src/PluginBootstrap.ts b/webapp/packages/plugin-administration/src/PluginBootstrap.ts index dfba8a3446..94bf06dbcd 100644 --- a/webapp/packages/plugin-administration/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-administration/src/PluginBootstrap.ts @@ -9,8 +9,7 @@ import { lazy } from 'react'; import { AdministrationScreenService } from '@cloudbeaver/core-administration'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; -import { EAdminPermission } from '@cloudbeaver/core-resource'; -import { PermissionsService } from '@cloudbeaver/core-root'; +import { PermissionsService, EAdminPermission } from '@cloudbeaver/core-root'; import { ScreenService } from '@cloudbeaver/core-routing'; import { DATA_CONTEXT_MENU, MenuBaseItem, MenuService } from '@cloudbeaver/core-view'; import { TOP_NAV_BAR_SETTINGS_MENU } from '@cloudbeaver/plugin-settings-menu'; diff --git a/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts b/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts index 40e8e093cd..70c9eaa64d 100644 --- a/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts +++ b/webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts @@ -8,8 +8,8 @@ import { ConnectionsManagerService } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ProjectInfoResource } from '@cloudbeaver/core-projects'; -import { CachedMapAllKey, EAdminPermission, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; -import { PermissionsService } from '@cloudbeaver/core-root'; +import { CachedMapAllKey, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; +import { EAdminPermission, PermissionsService } from '@cloudbeaver/core-root'; import { ActionService, DATA_CONTEXT_MENU, MenuService } from '@cloudbeaver/core-view'; import { MENU_CONNECTIONS } from '@cloudbeaver/plugin-connections'; 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 ea2d2a60cf..26523da307 100644 --- a/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessTabService.ts +++ b/webapp/packages/plugin-connections-administration/src/ConnectionForm/ConnectionAccess/ConnectionAccessTabService.ts @@ -12,8 +12,7 @@ import { ConnectionInfoResource, createConnectionParam, IConnectionInfoParams } import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { executorHandlerFilter, IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { isGlobalProject, ProjectInfoResource } from '@cloudbeaver/core-projects'; -import { EAdminPermission } from '@cloudbeaver/core-resource'; -import { PermissionsService } from '@cloudbeaver/core-root'; +import { PermissionsService, EAdminPermission } from '@cloudbeaver/core-root'; import { formStateContext } from '@cloudbeaver/core-ui'; import type { MetadataValueGetter } from '@cloudbeaver/core-utils'; import { diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx index 01a8251978..ec25a5f123 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx @@ -34,8 +34,8 @@ import { } from '@cloudbeaver/core-blocks'; import { DatabaseAuthModelsResource, DBDriverResource, isLocalConnection } from '@cloudbeaver/core-connections'; import { useService } from '@cloudbeaver/core-di'; -import { CachedResourceListEmptyKey, EAdminPermission, resourceKeyList } from '@cloudbeaver/core-resource'; -import { ServerConfigResource } from '@cloudbeaver/core-root'; +import { CachedResourceListEmptyKey, resourceKeyList } from '@cloudbeaver/core-resource'; +import { EAdminPermission, ServerConfigResource } from '@cloudbeaver/core-root'; import { DriverConfigurationType } from '@cloudbeaver/core-sdk'; import { type TabContainerPanelComponent, useAuthenticationAction } from '@cloudbeaver/core-ui'; import { isSafari } from '@cloudbeaver/core-utils'; diff --git a/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts b/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts index 0d67b9d23a..713af2e3a1 100644 --- a/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts +++ b/webapp/packages/plugin-connections/src/ContextMenu/ConnectionMenuBootstrap.ts @@ -16,9 +16,10 @@ import { import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { DATA_CONTEXT_NAV_NODE, EObjectFeature, NavNodeManagerService } from '@cloudbeaver/core-navigation-tree'; -import { EAdminPermission, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; +import { getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; import { CONNECTION_NAVIGATOR_VIEW_SETTINGS, + EAdminPermission, isNavigatorViewSettingsEqual, NavigatorViewSettings, PermissionsService, diff --git a/webapp/packages/plugin-data-export/src/DataExportMenuService.ts b/webapp/packages/plugin-data-export/src/DataExportMenuService.ts index 198b011e90..3be598d14f 100644 --- a/webapp/packages/plugin-data-export/src/DataExportMenuService.ts +++ b/webapp/packages/plugin-data-export/src/DataExportMenuService.ts @@ -9,8 +9,7 @@ import { createConnectionParam, DATA_CONTEXT_CONNECTION } from '@cloudbeaver/cor import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, IMenuContext } from '@cloudbeaver/core-dialogs'; import { DATA_CONTEXT_NAV_NODE, EObjectFeature } from '@cloudbeaver/core-navigation-tree'; -import { EAdminPermission } from '@cloudbeaver/core-resource'; -import { SessionPermissionsResource } from '@cloudbeaver/core-root'; +import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { ACTION_EXPORT, ActionService, DATA_CONTEXT_MENU_NESTED, MenuService } from '@cloudbeaver/core-view'; import { IDatabaseDataSource, IDataContainerOptions, ITableFooterMenuContext, TableFooterMenuService } from '@cloudbeaver/plugin-data-viewer'; import type { IDataQueryOptions } from '@cloudbeaver/plugin-sql-editor'; diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx index 936ef9d34a..dd95cf78a4 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx @@ -9,7 +9,7 @@ import { observer } from 'mobx-react-lite'; import styled, { css } from 'reshadow'; import { Link, usePermission, useTranslate } from '@cloudbeaver/core-blocks'; -import { EAdminPermission } from '@cloudbeaver/core-resource'; +import { EAdminPermission } from '@cloudbeaver/core-root'; interface Props { limit?: string; diff --git a/webapp/packages/plugin-devtools/src/PluginBootstrap.ts b/webapp/packages/plugin-devtools/src/PluginBootstrap.ts index ccc055e65c..850d9b30dc 100644 --- a/webapp/packages/plugin-devtools/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-devtools/src/PluginBootstrap.ts @@ -6,8 +6,8 @@ * you may not use this file except in compliance with the License. */ import { App, Bootstrap, DIService, injectable, IServiceConstructor } from '@cloudbeaver/core-di'; -import { CachedResource, EAdminPermission } from '@cloudbeaver/core-resource'; -import { PermissionsService } from '@cloudbeaver/core-root'; +import { CachedResource } from '@cloudbeaver/core-resource'; +import { PermissionsService, EAdminPermission } from '@cloudbeaver/core-root'; import { ActionService, DATA_CONTEXT_MENU, 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'; From c9ae6e3541a8989c198102e932001411a669c254 Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Thu, 18 Jan 2024 11:21:18 +0100 Subject: [PATCH 4/9] CB-4382 update-ts-references --- .vscode/tasks.json | 8 ++++++++ webapp/packages/core-app/package.json | 3 ++- webapp/packages/core-app/tsconfig.json | 3 +++ webapp/packages/core-blocks/package.json | 2 +- webapp/packages/core-bootstrap/package.json | 3 ++- .../packages/core-notifications/package.json | 5 +++-- webapp/packages/core-ui/package.json | 2 +- webapp/packages/core-view/package.json | 3 ++- .../package.json | 3 ++- .../plugin-connection-search/package.json | 3 ++- .../packages/plugin-object-viewer/package.json | 2 +- .../plugin-settings-panel/package.json | 3 ++- .../packages/plugin-sql-generator/package.json | 3 ++- .../plugin-sql-generator/tsconfig.json | 3 +++ .../packages/plugin-tools-panel/package.json | 3 ++- .../package.json | 3 ++- .../tsconfig.json | 3 +++ webapp/packages/product-default/tsconfig.json | 18 +++++++++--------- 18 files changed, 50 insertions(+), 23 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a9a59d65e4..e4d2138e1d 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -73,6 +73,14 @@ "close": true, "clear": false } + }, + { + "label": "Update TS references CE", + "type": "shell", + "command": "yarn lerna run update-ts-references --stream", + "options": { + "cwd": "${workspaceFolder}/webapp" + } } ], "inputs": [ diff --git a/webapp/packages/core-app/package.json b/webapp/packages/core-app/package.json index ad0aa8a0c2..8ff5cf9c37 100644 --- a/webapp/packages/core-app/package.json +++ b/webapp/packages/core-app/package.json @@ -31,7 +31,8 @@ "@cloudbeaver/core-ui": "~0.1.0", "@cloudbeaver/core-version": "~0.1.0", "mobx-react-lite": "^4.0.5", - "react": "^18.2.0" + "react": "^18.2.0", + "@cloudbeaver/core-utils": "~0.1.0" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/core-app/tsconfig.json b/webapp/packages/core-app/tsconfig.json index 5b0ec4ac55..58c432283c 100644 --- a/webapp/packages/core-app/tsconfig.json +++ b/webapp/packages/core-app/tsconfig.json @@ -44,6 +44,9 @@ }, { "path": "../core-version/tsconfig.json" + }, + { + "path": "../core-utils/tsconfig.json" } ], "include": [ diff --git a/webapp/packages/core-blocks/package.json b/webapp/packages/core-blocks/package.json index 8406535ad6..19d23a66db 100644 --- a/webapp/packages/core-blocks/package.json +++ b/webapp/packages/core-blocks/package.json @@ -33,7 +33,7 @@ "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", - "reakit": "~1.x.x", + "reakit": "~1.3.11", "reakit-utils": "^0.15.2", "reshadow": "^0.0.1" }, diff --git a/webapp/packages/core-bootstrap/package.json b/webapp/packages/core-bootstrap/package.json index d41172a3cf..25ce117c6a 100644 --- a/webapp/packages/core-bootstrap/package.json +++ b/webapp/packages/core-bootstrap/package.json @@ -53,6 +53,7 @@ "peerDependencies": {}, "devDependencies": { "@types/react": "^18.2.42", - "typescript": "^5.3.2" + "typescript": "^5.3.2", + "typescript-plugin-css-modules": "^5.0.2" } } diff --git a/webapp/packages/core-notifications/package.json b/webapp/packages/core-notifications/package.json index 9ddd1570f9..03263150d5 100644 --- a/webapp/packages/core-notifications/package.json +++ b/webapp/packages/core-notifications/package.json @@ -24,12 +24,13 @@ "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", - "reakit": "~1.x.x", + "reakit": "~1.3.11", "reshadow": "^0.0.1" }, "peerDependencies": {}, "devDependencies": { "@types/react": "^18.2.42", - "typescript": "^5.3.2" + "typescript": "^5.3.2", + "typescript-plugin-css-modules": "^5.0.2" } } diff --git a/webapp/packages/core-ui/package.json b/webapp/packages/core-ui/package.json index 4784e50d7a..6e6d866653 100644 --- a/webapp/packages/core-ui/package.json +++ b/webapp/packages/core-ui/package.json @@ -34,7 +34,7 @@ "react": "^18.2.0", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", - "reakit": "~1.x.x", + "reakit": "~1.3.11", "reshadow": "^0.0.1" }, "peerDependencies": {}, diff --git a/webapp/packages/core-view/package.json b/webapp/packages/core-view/package.json index 0c2bba1665..45085b20de 100644 --- a/webapp/packages/core-view/package.json +++ b/webapp/packages/core-view/package.json @@ -33,6 +33,7 @@ "peerDependencies": {}, "devDependencies": { "@types/react": "^18.2.42", - "typescript": "^5.3.2" + "typescript": "^5.3.2", + "typescript-plugin-css-modules": "^5.0.2" } } diff --git a/webapp/packages/plugin-authentication-administration/package.json b/webapp/packages/plugin-authentication-administration/package.json index 6f3fbb21e0..6483450f0a 100644 --- a/webapp/packages/plugin-authentication-administration/package.json +++ b/webapp/packages/plugin-authentication-administration/package.json @@ -39,7 +39,8 @@ "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", - "reshadow": "^0.0.1" + "reshadow": "^0.0.1", + "reakit": "~1.3.11" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/plugin-connection-search/package.json b/webapp/packages/plugin-connection-search/package.json index 50d7f44521..c758cc8a9c 100644 --- a/webapp/packages/plugin-connection-search/package.json +++ b/webapp/packages/plugin-connection-search/package.json @@ -41,6 +41,7 @@ "peerDependencies": {}, "devDependencies": { "@types/react": "^18.2.42", - "typescript": "^5.3.2" + "typescript": "^5.3.2", + "typescript-plugin-css-modules": "^5.0.2" } } diff --git a/webapp/packages/plugin-object-viewer/package.json b/webapp/packages/plugin-object-viewer/package.json index c558b46eab..6dedc48de1 100644 --- a/webapp/packages/plugin-object-viewer/package.json +++ b/webapp/packages/plugin-object-viewer/package.json @@ -40,7 +40,7 @@ "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", - "reakit": "~1.x.x", + "reakit": "~1.3.11", "reshadow": "^0.0.1" }, "peerDependencies": {}, diff --git a/webapp/packages/plugin-settings-panel/package.json b/webapp/packages/plugin-settings-panel/package.json index 5c2fde07e0..a9c0fee248 100644 --- a/webapp/packages/plugin-settings-panel/package.json +++ b/webapp/packages/plugin-settings-panel/package.json @@ -33,6 +33,7 @@ "peerDependencies": {}, "devDependencies": { "@types/react": "^18.2.42", - "typescript": "^5.3.2" + "typescript": "^5.3.2", + "typescript-plugin-css-modules": "^5.0.2" } } diff --git a/webapp/packages/plugin-sql-generator/package.json b/webapp/packages/plugin-sql-generator/package.json index eb5e2f9283..90b2dedb90 100644 --- a/webapp/packages/plugin-sql-generator/package.json +++ b/webapp/packages/plugin-sql-generator/package.json @@ -34,7 +34,8 @@ "@cloudbeaver/plugin-sql-editor-new": "~0.1.0", "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", - "react": "^18.2.0" + "react": "^18.2.0", + "@cloudbeaver/core-utils": "~0.1.0" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/plugin-sql-generator/tsconfig.json b/webapp/packages/plugin-sql-generator/tsconfig.json index 282bb1c6ea..95e262f7f5 100644 --- a/webapp/packages/plugin-sql-generator/tsconfig.json +++ b/webapp/packages/plugin-sql-generator/tsconfig.json @@ -47,6 +47,9 @@ }, { "path": "../plugin-sql-editor-new/tsconfig.json" + }, + { + "path": "../core-utils/tsconfig.json" } ], "include": [ diff --git a/webapp/packages/plugin-tools-panel/package.json b/webapp/packages/plugin-tools-panel/package.json index 70ee7449f8..ea318c2ffa 100644 --- a/webapp/packages/plugin-tools-panel/package.json +++ b/webapp/packages/plugin-tools-panel/package.json @@ -34,6 +34,7 @@ "peerDependencies": {}, "devDependencies": { "@types/react": "^18.2.42", - "typescript": "^5.3.2" + "typescript": "^5.3.2", + "typescript-plugin-css-modules": "^5.0.2" } } diff --git a/webapp/packages/plugin-version-update-administration/package.json b/webapp/packages/plugin-version-update-administration/package.json index 3b132c84d0..37b3c35caf 100644 --- a/webapp/packages/plugin-version-update-administration/package.json +++ b/webapp/packages/plugin-version-update-administration/package.json @@ -30,7 +30,8 @@ "react-markdown": "^9.0.1", "reshadow": "^0.0.1", "semver": "^7.5.4", - "@cloudbeaver/core-localization": "~0.1.0" + "@cloudbeaver/core-localization": "~0.1.0", + "@cloudbeaver/core-utils": "~0.1.0" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/plugin-version-update-administration/tsconfig.json b/webapp/packages/plugin-version-update-administration/tsconfig.json index e377e7f465..99db8e5e49 100644 --- a/webapp/packages/plugin-version-update-administration/tsconfig.json +++ b/webapp/packages/plugin-version-update-administration/tsconfig.json @@ -32,6 +32,9 @@ }, { "path": "../core-localization/tsconfig.json" + }, + { + "path": "../core-utils/tsconfig.json" } ], "include": [ diff --git a/webapp/packages/product-default/tsconfig.json b/webapp/packages/product-default/tsconfig.json index ab07dce875..ade28e5f1b 100644 --- a/webapp/packages/product-default/tsconfig.json +++ b/webapp/packages/product-default/tsconfig.json @@ -15,9 +15,15 @@ { "path": "../core-di/tsconfig.json" }, + { + "path": "../core-localization/tsconfig.json" + }, { "path": "../core-product/tsconfig.json" }, + { + "path": "../core-task-manager/tsconfig.json" + }, { "path": "../core-version-update/tsconfig.json" }, @@ -147,6 +153,9 @@ { "path": "../plugin-sso/tsconfig.json" }, + { + "path": "../plugin-task-manager/tsconfig.json" + }, { "path": "../plugin-theme/tsconfig.json" }, @@ -170,15 +179,6 @@ }, { "path": "../plugin-version-update-administration/tsconfig.json" - }, - { - "path": "../core-localization/tsconfig.json" - }, - { - "path": "../core-task-manager/tsconfig.json" - }, - { - "path": "../plugin-task-manager/tsconfig.json" } ], "include": [ From 92aa70a18a74c4cd5d7f8117921cf846f9131878 Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Thu, 18 Jan 2024 12:06:58 +0100 Subject: [PATCH 5/9] =?UTF-8?q?=D0=A1B-4382=20removed=20unneeded=20deps=20?= =?UTF-8?q?in=20packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/packages/core-administration/package.json | 4 +--- webapp/packages/core-administration/tsconfig.json | 3 --- webapp/packages/core-bootstrap/package.json | 3 +-- webapp/packages/core-notifications/package.json | 5 +---- webapp/packages/core-notifications/tsconfig.json | 3 --- webapp/packages/core-resource-manager/package.json | 1 - webapp/packages/core-resource-manager/tsconfig.json | 3 --- webapp/packages/core-sdk/package.json | 9 --------- webapp/packages/core-view/package.json | 3 +-- webapp/packages/plugin-codemirror6/package.json | 3 +-- webapp/packages/plugin-connection-custom/package.json | 1 - webapp/packages/plugin-connection-custom/tsconfig.json | 3 --- webapp/packages/plugin-connection-search/package.json | 4 +--- webapp/packages/plugin-connection-search/tsconfig.json | 3 --- webapp/packages/plugin-d3js/package.json | 4 +--- webapp/packages/plugin-data-export/package.json | 7 +++---- webapp/packages/plugin-data-export/tsconfig.json | 9 +++------ webapp/packages/plugin-data-spreadsheet-new/package.json | 1 - webapp/packages/plugin-data-viewer/package.json | 5 ++--- webapp/packages/plugin-data-viewer/tsconfig.json | 9 +++------ webapp/packages/plugin-devtools/package.json | 1 - webapp/packages/plugin-devtools/tsconfig.json | 3 --- webapp/packages/plugin-root/package.json | 3 +-- 23 files changed, 19 insertions(+), 71 deletions(-) diff --git a/webapp/packages/core-administration/package.json b/webapp/packages/core-administration/package.json index dea20a2daf..a8208e3e31 100644 --- a/webapp/packages/core-administration/package.json +++ b/webapp/packages/core-administration/package.json @@ -18,7 +18,6 @@ "update-ts-references": "rimraf --glob dist && typescript-resolve-references" }, "dependencies": { - "@cloudbeaver/core-authentication": "~0.1.0", "@cloudbeaver/core-data-context": "~0.1.0", "@cloudbeaver/core-di": "~0.1.0", "@cloudbeaver/core-events": "~0.1.0", @@ -32,8 +31,7 @@ "@cloudbeaver/core-settings": "~0.1.0", "@cloudbeaver/core-theming": "~0.1.0", "@cloudbeaver/core-utils": "~0.1.0", - "mobx": "^6.12.0", - "reshadow": "^0.0.1" + "mobx": "^6.12.0" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/core-administration/tsconfig.json b/webapp/packages/core-administration/tsconfig.json index f426de9229..1587831354 100644 --- a/webapp/packages/core-administration/tsconfig.json +++ b/webapp/packages/core-administration/tsconfig.json @@ -6,9 +6,6 @@ "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" }, "references": [ - { - "path": "../core-authentication/tsconfig.json" - }, { "path": "../core-data-context/tsconfig.json" }, diff --git a/webapp/packages/core-bootstrap/package.json b/webapp/packages/core-bootstrap/package.json index 25ce117c6a..c309e2acb3 100644 --- a/webapp/packages/core-bootstrap/package.json +++ b/webapp/packages/core-bootstrap/package.json @@ -47,8 +47,7 @@ "@cloudbeaver/core-view": "~0.1.0", "mobx": "^6.12.0", "react": "^18.2.0", - "react-dom": "^18.2.0", - "reshadow": "^0.0.1" + "react-dom": "^18.2.0" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/core-notifications/package.json b/webapp/packages/core-notifications/package.json index 03263150d5..8375dbc479 100644 --- a/webapp/packages/core-notifications/package.json +++ b/webapp/packages/core-notifications/package.json @@ -19,13 +19,10 @@ "dependencies": { "@cloudbeaver/core-blocks": "~0.1.0", "@cloudbeaver/core-di": "~0.1.0", - "@cloudbeaver/core-dialogs": "~0.1.0", "@cloudbeaver/core-events": "~0.1.0", - "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", - "reakit": "~1.3.11", - "reshadow": "^0.0.1" + "reakit": "~1.3.11" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/core-notifications/tsconfig.json b/webapp/packages/core-notifications/tsconfig.json index b2bb6a4bfb..6344f58a9c 100644 --- a/webapp/packages/core-notifications/tsconfig.json +++ b/webapp/packages/core-notifications/tsconfig.json @@ -12,9 +12,6 @@ { "path": "../core-di/tsconfig.json" }, - { - "path": "../core-dialogs/tsconfig.json" - }, { "path": "../core-events/tsconfig.json" } diff --git a/webapp/packages/core-resource-manager/package.json b/webapp/packages/core-resource-manager/package.json index 7828d7b674..16fdaf42f1 100644 --- a/webapp/packages/core-resource-manager/package.json +++ b/webapp/packages/core-resource-manager/package.json @@ -18,7 +18,6 @@ }, "dependencies": { "@cloudbeaver/core-administration": "~0.1.0", - "@cloudbeaver/core-authentication": "~0.1.0", "@cloudbeaver/core-di": "~0.1.0", "@cloudbeaver/core-executor": "~0.1.0", "@cloudbeaver/core-navigation-tree": "~0.1.0", diff --git a/webapp/packages/core-resource-manager/tsconfig.json b/webapp/packages/core-resource-manager/tsconfig.json index 8d245a3fd3..0d0bd22212 100644 --- a/webapp/packages/core-resource-manager/tsconfig.json +++ b/webapp/packages/core-resource-manager/tsconfig.json @@ -9,9 +9,6 @@ { "path": "../core-administration/tsconfig.json" }, - { - "path": "../core-authentication/tsconfig.json" - }, { "path": "../core-di/tsconfig.json" }, diff --git a/webapp/packages/core-sdk/package.json b/webapp/packages/core-sdk/package.json index d6b41f4d77..bd6591d7d9 100644 --- a/webapp/packages/core-sdk/package.json +++ b/webapp/packages/core-sdk/package.json @@ -28,15 +28,6 @@ "mobx": "^6.12.0" }, "devDependencies": { - "@graphql-codegen/add": "~5.0.0", - "@graphql-codegen/cli": "~5.0.0", - "@graphql-codegen/near-operation-file-preset": "~3.0.0", - "@graphql-codegen/typescript": "~4.0.1", - "@graphql-codegen/typescript-graphql-files-modules": "~3.0.0", - "@graphql-codegen/typescript-graphql-request": "~6.0.1", - "@graphql-codegen/typescript-operations": "~4.0.1", - "@parcel/watcher": "~2.3.0", - "graphql": "^16.8.1", "typescript": "^5.3.2" }, "peerDependencies": {} diff --git a/webapp/packages/core-view/package.json b/webapp/packages/core-view/package.json index 45085b20de..eb88fa5269 100644 --- a/webapp/packages/core-view/package.json +++ b/webapp/packages/core-view/package.json @@ -27,8 +27,7 @@ "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", - "react-hotkeys-hook": "^4.4.1", - "reshadow": "^0.0.1" + "react-hotkeys-hook": "^4.4.1" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/plugin-codemirror6/package.json b/webapp/packages/plugin-codemirror6/package.json index f980174f2d..114ab40b39 100644 --- a/webapp/packages/plugin-codemirror6/package.json +++ b/webapp/packages/plugin-codemirror6/package.json @@ -35,8 +35,7 @@ "@lezer/highlight": "^1.2.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", - "react-dom": "^18.2.0", - "reshadow": "^0.0.1" + "react-dom": "^18.2.0" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/plugin-connection-custom/package.json b/webapp/packages/plugin-connection-custom/package.json index 0b37b0ace1..d8abfb19ea 100644 --- a/webapp/packages/plugin-connection-custom/package.json +++ b/webapp/packages/plugin-connection-custom/package.json @@ -26,7 +26,6 @@ "@cloudbeaver/core-plugin": "~0.1.0", "@cloudbeaver/core-projects": "~0.1.0", "@cloudbeaver/core-resource": "~0.1.0", - "@cloudbeaver/core-utils": "~0.1.0", "@cloudbeaver/core-view": "~0.1.0", "@cloudbeaver/plugin-connections": "~0.1.0", "mobx": "^6.12.0", diff --git a/webapp/packages/plugin-connection-custom/tsconfig.json b/webapp/packages/plugin-connection-custom/tsconfig.json index d97ec04fab..665c309c6c 100644 --- a/webapp/packages/plugin-connection-custom/tsconfig.json +++ b/webapp/packages/plugin-connection-custom/tsconfig.json @@ -33,9 +33,6 @@ { "path": "../core-resource/tsconfig.json" }, - { - "path": "../core-utils/tsconfig.json" - }, { "path": "../core-view/tsconfig.json" }, diff --git a/webapp/packages/plugin-connection-search/package.json b/webapp/packages/plugin-connection-search/package.json index c758cc8a9c..84b09a1860 100644 --- a/webapp/packages/plugin-connection-search/package.json +++ b/webapp/packages/plugin-connection-search/package.json @@ -17,7 +17,6 @@ "update-ts-references": "rimraf --glob dist && typescript-resolve-references" }, "dependencies": { - "@cloudbeaver/core-authentication": "~0.1.0", "@cloudbeaver/core-blocks": "~0.1.0", "@cloudbeaver/core-connections": "~0.1.0", "@cloudbeaver/core-di": "~0.1.0", @@ -35,8 +34,7 @@ "@cloudbeaver/plugin-connections": "~0.1.0", "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", - "react": "^18.2.0", - "reshadow": "^0.0.1" + "react": "^18.2.0" }, "peerDependencies": {}, "devDependencies": { diff --git a/webapp/packages/plugin-connection-search/tsconfig.json b/webapp/packages/plugin-connection-search/tsconfig.json index 64e73c95da..d83e8854b7 100644 --- a/webapp/packages/plugin-connection-search/tsconfig.json +++ b/webapp/packages/plugin-connection-search/tsconfig.json @@ -6,9 +6,6 @@ "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" }, "references": [ - { - "path": "../core-authentication/tsconfig.json" - }, { "path": "../core-blocks/tsconfig.json" }, diff --git a/webapp/packages/plugin-d3js/package.json b/webapp/packages/plugin-d3js/package.json index 57f0dc1baf..0ecf06f2e3 100644 --- a/webapp/packages/plugin-d3js/package.json +++ b/webapp/packages/plugin-d3js/package.json @@ -19,12 +19,10 @@ }, "dependencies": { "@cloudbeaver/core-di": "~0.1.0", - "d3": "^7.8.5", - "d3-drag": "^3.0.0" + "d3": "^7.8.5" }, "devDependencies": { "@types/d3": "^7.4.3", - "@types/d3-drag": "^3.0.7", "typescript": "^5.3.2" }, "peerDependencies": {} diff --git a/webapp/packages/plugin-data-export/package.json b/webapp/packages/plugin-data-export/package.json index 44107aeb0d..a08be134e7 100644 --- a/webapp/packages/plugin-data-export/package.json +++ b/webapp/packages/plugin-data-export/package.json @@ -37,14 +37,12 @@ "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", - "reshadow": "^0.0.1", - "@cloudbeaver/core-authentication": "~0.1.0" + "reshadow": "^0.0.1" }, "peerDependencies": {}, "devDependencies": { "@cloudbeaver/core-administration": "~0.1.0", "@cloudbeaver/core-app": "~0.1.0", - "@cloudbeaver/core-authentication": "~0.1.0", "@cloudbeaver/core-browser": "~0.1.0", "@cloudbeaver/core-connections": "~0.1.0", "@cloudbeaver/core-dialogs": "~0.1.0", @@ -71,6 +69,7 @@ "@types/jest": "^29.5.10", "@types/react": "^18.2.42", "typescript": "^5.3.2", - "typescript-plugin-css-modules": "^5.0.2" + "typescript-plugin-css-modules": "^5.0.2", + "@cloudbeaver/core-authentication": "~0.1.0" } } diff --git a/webapp/packages/plugin-data-export/tsconfig.json b/webapp/packages/plugin-data-export/tsconfig.json index 7d59bb68b0..c53fc9930f 100644 --- a/webapp/packages/plugin-data-export/tsconfig.json +++ b/webapp/packages/plugin-data-export/tsconfig.json @@ -54,18 +54,12 @@ { "path": "../plugin-sql-editor/tsconfig.json" }, - { - "path": "../core-authentication/tsconfig.json" - }, { "path": "../core-administration/tsconfig.json" }, { "path": "../core-app/tsconfig.json" }, - { - "path": "../core-authentication/tsconfig.json" - }, { "path": "../core-browser/tsconfig.json" }, @@ -131,6 +125,9 @@ }, { "path": "../tests-runner/tsconfig.json" + }, + { + "path": "../core-authentication/tsconfig.json" } ], "include": [ diff --git a/webapp/packages/plugin-data-spreadsheet-new/package.json b/webapp/packages/plugin-data-spreadsheet-new/package.json index b1411a300e..0bb6b44fd7 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/package.json +++ b/webapp/packages/plugin-data-spreadsheet-new/package.json @@ -33,7 +33,6 @@ "@cloudbeaver/core-browser": "~0.1.0", "@cloudbeaver/plugin-data-viewer": "~0.1.0", "@cloudbeaver/plugin-react-data-grid": "~0.1.0", - "@popperjs/core": "^2.11.8", "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", diff --git a/webapp/packages/plugin-data-viewer/package.json b/webapp/packages/plugin-data-viewer/package.json index 6d7fc64a96..caee26f3b3 100644 --- a/webapp/packages/plugin-data-viewer/package.json +++ b/webapp/packages/plugin-data-viewer/package.json @@ -18,7 +18,6 @@ "update-ts-references": "rimraf --glob dist && typescript-resolve-references" }, "dependencies": { - "@cloudbeaver/core-authentication": "~0.1.0", "@cloudbeaver/core-blocks": "~0.1.0", "@cloudbeaver/core-connections": "~0.1.0", "@cloudbeaver/core-data-context": "~0.1.0", @@ -50,7 +49,6 @@ "devDependencies": { "@cloudbeaver/core-administration": "~0.1.0", "@cloudbeaver/core-app": "~0.1.0", - "@cloudbeaver/core-authentication": "~0.1.0", "@cloudbeaver/core-browser": "~0.1.0", "@cloudbeaver/core-connections": "~0.1.0", "@cloudbeaver/core-dialogs": "~0.1.0", @@ -76,6 +74,7 @@ "@types/jest": "^29.5.10", "@types/react": "^18.2.42", "typescript": "^5.3.2", - "typescript-plugin-css-modules": "^5.0.2" + "typescript-plugin-css-modules": "^5.0.2", + "@cloudbeaver/core-authentication": "~0.1.0" } } diff --git a/webapp/packages/plugin-data-viewer/tsconfig.json b/webapp/packages/plugin-data-viewer/tsconfig.json index 55752367c5..75094644d5 100644 --- a/webapp/packages/plugin-data-viewer/tsconfig.json +++ b/webapp/packages/plugin-data-viewer/tsconfig.json @@ -6,9 +6,6 @@ "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" }, "references": [ - { - "path": "../core-authentication/tsconfig.json" - }, { "path": "../core-blocks/tsconfig.json" }, @@ -81,9 +78,6 @@ { "path": "../core-app/tsconfig.json" }, - { - "path": "../core-authentication/tsconfig.json" - }, { "path": "../core-browser/tsconfig.json" }, @@ -146,6 +140,9 @@ }, { "path": "../tests-runner/tsconfig.json" + }, + { + "path": "../core-authentication/tsconfig.json" } ], "include": [ diff --git a/webapp/packages/plugin-devtools/package.json b/webapp/packages/plugin-devtools/package.json index edc1b59a50..6473e7b519 100644 --- a/webapp/packages/plugin-devtools/package.json +++ b/webapp/packages/plugin-devtools/package.json @@ -17,7 +17,6 @@ "update-ts-references": "rimraf --glob dist && typescript-resolve-references" }, "dependencies": { - "@cloudbeaver/core-authentication": "~0.1.0", "@cloudbeaver/core-blocks": "~0.1.0", "@cloudbeaver/core-data-context": "~0.1.0", "@cloudbeaver/core-di": "~0.1.0", diff --git a/webapp/packages/plugin-devtools/tsconfig.json b/webapp/packages/plugin-devtools/tsconfig.json index f45fb0c6a6..5e4f868cf7 100644 --- a/webapp/packages/plugin-devtools/tsconfig.json +++ b/webapp/packages/plugin-devtools/tsconfig.json @@ -6,9 +6,6 @@ "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" }, "references": [ - { - "path": "../core-authentication/tsconfig.json" - }, { "path": "../core-blocks/tsconfig.json" }, diff --git a/webapp/packages/plugin-root/package.json b/webapp/packages/plugin-root/package.json index 6287e60eef..6dbb0bacf6 100644 --- a/webapp/packages/plugin-root/package.json +++ b/webapp/packages/plugin-root/package.json @@ -26,8 +26,7 @@ "@cloudbeaver/core-routing": "~0.1.0", "@cloudbeaver/core-utils": "~0.1.0", "mobx-react-lite": "^4.0.5", - "react": "^18.2.0", - "reshadow": "^0.0.1" + "react": "^18.2.0" }, "peerDependencies": {}, "devDependencies": { From 237ce24c4348bb1b246b2fae82288254effcc0e7 Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Thu, 18 Jan 2024 12:20:36 +0100 Subject: [PATCH 6/9] CB-4282 revert needed deps to be present --- webapp/packages/core-sdk/package.json | 9 +++++++++ webapp/packages/plugin-d3js/package.json | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/webapp/packages/core-sdk/package.json b/webapp/packages/core-sdk/package.json index bd6591d7d9..d6b41f4d77 100644 --- a/webapp/packages/core-sdk/package.json +++ b/webapp/packages/core-sdk/package.json @@ -28,6 +28,15 @@ "mobx": "^6.12.0" }, "devDependencies": { + "@graphql-codegen/add": "~5.0.0", + "@graphql-codegen/cli": "~5.0.0", + "@graphql-codegen/near-operation-file-preset": "~3.0.0", + "@graphql-codegen/typescript": "~4.0.1", + "@graphql-codegen/typescript-graphql-files-modules": "~3.0.0", + "@graphql-codegen/typescript-graphql-request": "~6.0.1", + "@graphql-codegen/typescript-operations": "~4.0.1", + "@parcel/watcher": "~2.3.0", + "graphql": "^16.8.1", "typescript": "^5.3.2" }, "peerDependencies": {} diff --git a/webapp/packages/plugin-d3js/package.json b/webapp/packages/plugin-d3js/package.json index 0ecf06f2e3..57f0dc1baf 100644 --- a/webapp/packages/plugin-d3js/package.json +++ b/webapp/packages/plugin-d3js/package.json @@ -19,10 +19,12 @@ }, "dependencies": { "@cloudbeaver/core-di": "~0.1.0", - "d3": "^7.8.5" + "d3": "^7.8.5", + "d3-drag": "^3.0.0" }, "devDependencies": { "@types/d3": "^7.4.3", + "@types/d3-drag": "^3.0.7", "typescript": "^5.3.2" }, "peerDependencies": {} From 4941d4ab46cb70cbe474033b5037ce720c80818c Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Thu, 18 Jan 2024 13:28:50 +0100 Subject: [PATCH 7/9] CB-4382 reverted popperjs for plugin-data-spreadsheet-new --- webapp/packages/plugin-data-spreadsheet-new/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/packages/plugin-data-spreadsheet-new/package.json b/webapp/packages/plugin-data-spreadsheet-new/package.json index 0bb6b44fd7..b1411a300e 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/package.json +++ b/webapp/packages/plugin-data-spreadsheet-new/package.json @@ -33,6 +33,7 @@ "@cloudbeaver/core-browser": "~0.1.0", "@cloudbeaver/plugin-data-viewer": "~0.1.0", "@cloudbeaver/plugin-react-data-grid": "~0.1.0", + "@popperjs/core": "^2.11.8", "mobx": "^6.12.0", "mobx-react-lite": "^4.0.5", "react": "^18.2.0", From 2baa69a6edc0f9fa8e8ffff09f4d07343bea242d Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Mon, 22 Jan 2024 15:06:48 +0100 Subject: [PATCH 8/9] CB-4382 TE error fix for fast opening admin server settings --- .../src/ProjectPermissionsResource.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/webapp/packages/core-resource-manager/src/ProjectPermissionsResource.ts b/webapp/packages/core-resource-manager/src/ProjectPermissionsResource.ts index 5b0acb423b..f43f32cb59 100644 --- a/webapp/packages/core-resource-manager/src/ProjectPermissionsResource.ts +++ b/webapp/packages/core-resource-manager/src/ProjectPermissionsResource.ts @@ -8,19 +8,15 @@ import type { PermissionInfo } from '@cloudbeaver/core-administration'; import { injectable } from '@cloudbeaver/core-di'; import { CachedDataResource } from '@cloudbeaver/core-resource'; -import { ServerConfigResource } from '@cloudbeaver/core-root'; +import { EAdminPermission, SessionPermissionsResource } from '@cloudbeaver/core-root'; import { GraphQLService } from '@cloudbeaver/core-sdk'; @injectable() export class ProjectPermissionsResource extends CachedDataResource { - constructor(private readonly graphQLService: GraphQLService, serverConfigResource: ServerConfigResource) { + constructor(private readonly graphQLService: GraphQLService, permissionsResource: SessionPermissionsResource) { super(() => []); - this.sync( - serverConfigResource, - () => {}, - () => {}, - ); + permissionsResource.require(this, EAdminPermission.admin).outdateResource(this); } protected async loader(): Promise { From a7449863a073d0a56cf4c6de2abe4a64bc49a9b5 Mon Sep 17 00:00:00 2001 From: "s.teleshev" Date: Wed, 24 Jan 2024 09:54:40 +0100 Subject: [PATCH 9/9] CB-4382 update yarn lock --- webapp/yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/yarn.lock b/webapp/yarn.lock index e6e1acc243..b02befe5c5 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -15537,7 +15537,7 @@ reakit-warning@^0.6.2: dependencies: reakit-utils "^0.15.2" -reakit@~1.3.11, reakit@~1.x.x: +reakit@~1.3.11: version "1.3.11" resolved "https://registry.yarnpkg.com/reakit/-/reakit-1.3.11.tgz#c15360ac43e94fbe4291d233af3ac5040428252e" integrity sha512-mYxw2z0fsJNOQKAEn5FJCPTU3rcrY33YZ/HzoWqZX0G7FwySp1wkCYW79WhuYMNIUFQ8s3Baob1RtsEywmZSig==