@pimcore/studio-ui-bundle 1.0.0-canary.20251128-091124-470a500 → 1.0.0-canary.20251201-111655-54db9b6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. package/dist/build/types/src/core/app/config/services/service-ids.d.ts +2 -0
  2. package/dist/build/types/src/core/bootstrap.d.ts +1 -0
  3. package/dist/build/types/src/core/modules/app/app-loader/services/app-loader-registry.d.ts +22 -0
  4. package/dist/build/types/src/core/modules/app/base-layout/main-nav/services/main-nav-registry.d.ts +1 -0
  5. package/dist/build/types/src/core/modules/app/base-layout/main-nav/services/main-nav-widget-restorer.d.ts +18 -0
  6. package/dist/build/types/src/core/modules/asset/services/asset-opening-service.d.ts +2 -0
  7. package/dist/build/types/src/core/modules/data-object/services/data-object-opening-service.d.ts +2 -0
  8. package/dist/build/types/src/core/modules/document/services/document-opening-service.d.ts +2 -0
  9. package/dist/build/types/src/core/modules/element/services/element-widget-restorer.d.ts +19 -0
  10. package/dist/build/types/src/core/modules/widget-manager/components/widget-restorer.d.ts +11 -0
  11. package/dist/build/types/src/core/modules/widget-manager/hooks/use-widget-manager.d.ts +1 -0
  12. package/dist/build/types/src/core/modules/widget-manager/index.d.ts +10 -0
  13. package/dist/build/types/src/core/modules/widget-manager/services/static-widget-restorer.d.ts +21 -0
  14. package/dist/build/types/src/core/modules/widget-manager/services/widget-restorer-registry.d.ts +23 -0
  15. package/dist/build/types/src/core/modules/widget-manager/widget-manager-persistence.d.ts +14 -0
  16. package/dist/build/types/src/core/modules/widget-manager/widget-manager-slice.d.ts +2 -1
  17. package/dist/build/types/src/core/utils/redux-state-persistence.d.ts +21 -0
  18. package/dist/build/types/src/sdk/modules/app/index.d.ts +1 -0
  19. package/package.json +1 -1
@@ -242,6 +242,7 @@ export declare const serviceIds: {
242
242
  'Asset/ProcessorRegistry/SaveDataProcessor': string;
243
243
  'Element/ProcessorRegistry/IconProcessor': string;
244
244
  'WidgetManager/ProcessorRegistry/PerspectiveProcessor': string;
245
+ 'AppLoader/Registry': string;
245
246
  'DynamicTypes/FieldFilterRegistry': string;
246
247
  'DynamicTypes/BatchEditRegistry': string;
247
248
  'DynamicTypes/GridCellRegistry': string;
@@ -265,6 +266,7 @@ export declare const serviceIds: {
265
266
  'DynamicTypes/WidgetEditor/WidgetTypeRegistry': string;
266
267
  mainNavRegistry: string;
267
268
  widgetManager: string;
269
+ widgetRestorerRegistry: string;
268
270
  backgroundProcessor: string;
269
271
  debouncedFormRegistry: string;
270
272
  globalMessageBusProcess: string;
@@ -27,6 +27,7 @@ import './modules/app/theme/dynamic-types';
27
27
  import './modules/wysiwyg';
28
28
  import './modules/perspective-editor';
29
29
  import './modules/widget-editor';
30
+ import './modules/widget-manager';
30
31
  import 'flexlayout-react/style/light.css';
31
32
  import '../../../css/globals.css';
32
33
  import './modules/email';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ export interface Loader {
11
+ readonly name: string;
12
+ onLoad: () => Promise<void>;
13
+ }
14
+ export declare class AppLoaderRegistry {
15
+ protected readonly loaders: Map<string, Loader>;
16
+ registerLoader(loader: Loader): void;
17
+ getLoader(name: string, throwException?: boolean): Loader;
18
+ getLoaders(): Loader[];
19
+ loadAll(): Promise<void>;
20
+ hasLoader(name: string): boolean;
21
+ overrideLoader(loader: Loader): void;
22
+ }
@@ -26,6 +26,7 @@ export interface IMainNavItem {
26
26
  button?: () => React.JSX.Element;
27
27
  widgetConfig?: WidgetManagerTabConfig;
28
28
  className?: string;
29
+ hidden?: () => boolean;
29
30
  }
30
31
  export declare class MainNavRegistry {
31
32
  private readonly items;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ import { type WidgetRestorer } from '../../../../../modules/widget-manager/services/widget-restorer-registry';
11
+ import { type WidgetManagerTabConfig } from '../../../../../modules/widget-manager/widget-manager-slice';
12
+ import { type AppDispatch } from '../../../../../../sdk/app';
13
+ export declare class MainNavWidgetRestorer implements WidgetRestorer {
14
+ supports(config: WidgetManagerTabConfig): boolean;
15
+ restore(config: WidgetManagerTabConfig, dispatch: AppDispatch): boolean;
16
+ private findItem;
17
+ private findItemByWidgetConfig;
18
+ }
@@ -7,6 +7,7 @@
7
7
  * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
8
  * @license Pimcore Open Core License (POCL)
9
9
  */
10
+ import { type WidgetManagerTabConfig } from '../../../modules/widget-manager/widget-manager-slice';
10
11
  interface AssetConfig {
11
12
  id: number;
12
13
  }
@@ -17,6 +18,7 @@ export declare class AssetOpeningService {
17
18
  private isWidgetOpen;
18
19
  private switchToWidget;
19
20
  private fetchAndStoreAssetDraft;
21
+ getWidgetConfig(id: number, silent?: boolean): Promise<WidgetManagerTabConfig | undefined>;
20
22
  openAsset(config: AssetConfig): Promise<void>;
21
23
  }
22
24
  export declare const assetOpeningService: AssetOpeningService;
@@ -7,6 +7,7 @@
7
7
  * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
8
  * @license Pimcore Open Core License (POCL)
9
9
  */
10
+ import { type WidgetManagerTabConfig } from '../../../modules/widget-manager/widget-manager-slice';
10
11
  interface DataObjectConfig {
11
12
  id: number;
12
13
  }
@@ -17,6 +18,7 @@ export declare class DataObjectOpeningService {
17
18
  private isWidgetOpen;
18
19
  private switchToWidget;
19
20
  private fetchAndStoreDataObjectDraft;
21
+ getWidgetConfig(id: number, silent?: boolean): Promise<WidgetManagerTabConfig | undefined>;
20
22
  openDataObject(config: DataObjectConfig): Promise<void>;
21
23
  }
22
24
  export declare const dataObjectOpeningService: DataObjectOpeningService;
@@ -7,6 +7,7 @@
7
7
  * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
8
  * @license Pimcore Open Core License (POCL)
9
9
  */
10
+ import { type WidgetManagerTabConfig } from '../../../modules/widget-manager/widget-manager-slice';
10
11
  interface DocumentConfig {
11
12
  id: number;
12
13
  }
@@ -17,6 +18,7 @@ export declare class DocumentOpeningService {
17
18
  private isWidgetOpen;
18
19
  private switchToWidget;
19
20
  private fetchAndStoreDocumentDraft;
21
+ getWidgetConfig(id: number, silent?: boolean): Promise<WidgetManagerTabConfig | undefined>;
20
22
  openDocument(config: DocumentConfig): Promise<void>;
21
23
  }
22
24
  export declare const documentOpeningService: DocumentOpeningService;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ import { type WidgetRestorer } from '../../../modules/widget-manager/services/widget-restorer-registry';
11
+ import { type WidgetManagerTabConfig } from '../../../modules/widget-manager/widget-manager-slice';
12
+ import { type AppDispatch } from '../../../../sdk/app';
13
+ export declare class ElementWidgetRestorer implements WidgetRestorer {
14
+ supports(config: WidgetManagerTabConfig): boolean;
15
+ cleanConfig(config: WidgetManagerTabConfig): WidgetManagerTabConfig;
16
+ restore(config: WidgetManagerTabConfig, dispatch: AppDispatch): Promise<boolean>;
17
+ private getWidgetConfig;
18
+ }
19
+ export declare const elementWidgetRestorer: ElementWidgetRestorer;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ import React, { type PropsWithChildren } from 'react';
11
+ export declare const WidgetRestorer: ({ children }: PropsWithChildren) => React.JSX.Element | null;
@@ -11,6 +11,7 @@ import { type WidgetManagerTabConfig } from '../widget-manager-slice';
11
11
  import { TabNode } from 'flexlayout-react';
12
12
  interface useWidgetManagerReturn {
13
13
  openMainWidget: (tabConfig: WidgetManagerTabConfig) => void;
14
+ updateWidget: (tabConfig: WidgetManagerTabConfig) => void;
14
15
  openBottomWidget: (tabConfig: WidgetManagerTabConfig) => void;
15
16
  openLeftWidget: (tabConfig: WidgetManagerTabConfig) => void;
16
17
  openRightWidget: (tabConfig: WidgetManagerTabConfig) => void;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ export {};
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ import { type WidgetRestorer } from './widget-restorer-registry';
11
+ import { type WidgetManagerTabConfig } from '../widget-manager-slice';
12
+ import { type AppDispatch } from '../../../../sdk/app';
13
+ export declare class StaticWidgetRestorer implements WidgetRestorer {
14
+ private readonly widgets;
15
+ registerStaticWidget(config: WidgetManagerTabConfig): void;
16
+ getStaticWidget(id: string): WidgetManagerTabConfig | undefined;
17
+ supports(config: WidgetManagerTabConfig): boolean;
18
+ cleanConfig(config: WidgetManagerTabConfig): WidgetManagerTabConfig;
19
+ restore(config: WidgetManagerTabConfig, dispatch: AppDispatch): boolean;
20
+ }
21
+ export declare const staticWidgetRestorer: StaticWidgetRestorer;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ import { type WidgetManagerTabConfig } from '../widget-manager-slice';
11
+ import { type AppDispatch } from '../../../../sdk/app';
12
+ export interface WidgetRestorer {
13
+ supports: (config: WidgetManagerTabConfig) => boolean;
14
+ restore: (config: WidgetManagerTabConfig, dispatch: AppDispatch) => boolean | Promise<boolean>;
15
+ cleanConfig?: (config: WidgetManagerTabConfig) => WidgetManagerTabConfig;
16
+ }
17
+ export declare class WidgetRestorerRegistry {
18
+ private readonly restorers;
19
+ register(restorer: WidgetRestorer): void;
20
+ supports(config: WidgetManagerTabConfig): boolean;
21
+ cleanConfig(config: WidgetManagerTabConfig): WidgetManagerTabConfig;
22
+ restore(config: WidgetManagerTabConfig, dispatch: AppDispatch): Promise<boolean>;
23
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ import { type WidgetManagerState } from './widget-manager-slice';
11
+ import { type Reducer, type UnknownAction } from '@reduxjs/toolkit';
12
+ export declare const WIDGET_MANAGER_STORAGE_KEY = "widget_manager_inner_model";
13
+ export declare const getWidgetManagerStorageKey: (userId?: number) => string;
14
+ export declare const createWidgetManagerPersistedReducer: (reducer: Reducer<WidgetManagerState, UnknownAction>) => Reducer<WidgetManagerState, UnknownAction>;
@@ -34,6 +34,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<WidgetManagerState,
34
34
  updateMainWidgetContext: (state: import("immer").WritableDraft<WidgetManagerState>, action: PayloadAction<MainWidgetContext>) => void;
35
35
  setActiveWidgetById: (state: import("immer").WritableDraft<WidgetManagerState>, action: PayloadAction<string>) => void;
36
36
  openMainWidget: (state: import("immer").WritableDraft<WidgetManagerState>, action: PayloadAction<WidgetManagerTabConfig>) => void;
37
+ updateWidget: (state: import("immer").WritableDraft<WidgetManagerState>, action: PayloadAction<WidgetManagerTabConfig>) => void;
37
38
  openBottomWidget: (state: import("immer").WritableDraft<WidgetManagerState>, action: PayloadAction<WidgetManagerTabConfig>) => void;
38
39
  openLeftWidget: (state: import("immer").WritableDraft<WidgetManagerState>, action: PayloadAction<WidgetManagerTabConfig>) => void;
39
40
  openRightWidget: (state: import("immer").WritableDraft<WidgetManagerState>, action: PayloadAction<WidgetManagerTabConfig>) => void;
@@ -44,7 +45,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<WidgetManagerState,
44
45
  selectMainWidgetContext: (state: WidgetManagerState) => MainWidgetContext;
45
46
  }>;
46
47
  export declare const widgetManagerSliceName: "widget-manager";
47
- export declare const updateOuterModel: import("@reduxjs/toolkit").ActionCreatorWithPayload<IJsonModel, "widget-manager/updateOuterModel">, updateMainWidgetContext: import("@reduxjs/toolkit").ActionCreatorWithPayload<MainWidgetContext, "widget-manager/updateMainWidgetContext">, updateInnerModel: import("@reduxjs/toolkit").ActionCreatorWithPayload<IJsonModel, "widget-manager/updateInnerModel">, openMainWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/openMainWidget">, openBottomWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/openBottomWidget">, openLeftWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/openLeftWidget">, openRightWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/openRightWidget">, setActiveWidgetById: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "widget-manager/setActiveWidgetById">, closeWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "widget-manager/closeWidget">;
48
+ export declare const updateOuterModel: import("@reduxjs/toolkit").ActionCreatorWithPayload<IJsonModel, "widget-manager/updateOuterModel">, updateMainWidgetContext: import("@reduxjs/toolkit").ActionCreatorWithPayload<MainWidgetContext, "widget-manager/updateMainWidgetContext">, updateInnerModel: import("@reduxjs/toolkit").ActionCreatorWithPayload<IJsonModel, "widget-manager/updateInnerModel">, openMainWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/openMainWidget">, updateWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/updateWidget">, openBottomWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/openBottomWidget">, openLeftWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/openLeftWidget">, openRightWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidgetManagerTabConfig, "widget-manager/openRightWidget">, setActiveWidgetById: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "widget-manager/setActiveWidgetById">, closeWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "widget-manager/closeWidget">;
48
49
  export declare const selectInnerModel: import("reselect").Selector<{
49
50
  "widget-manager": WidgetManagerState;
50
51
  }, IJsonModel, []> & {
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This source file is available under the terms of the
3
+ * Pimcore Open Core License (POCL)
4
+ * Full copyright and license information is available in
5
+ * LICENSE.md which is distributed with this source code.
6
+ *
7
+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
8
+ * @license Pimcore Open Core License (POCL)
9
+ */
10
+ import { type Reducer, type UnknownAction } from '@reduxjs/toolkit';
11
+ export declare const loadReduxState: <T>(key: string) => T | undefined;
12
+ /**
13
+ * Higher-Order Reducer to automatically persist state changes.
14
+ * Acts like a middleware for a specific slice.
15
+ *
16
+ * @param reducer The original slice reducer
17
+ * @param key The local storage key
18
+ * @param selector Optional selector to persist only part of the state
19
+ * @param condition Optional condition function to determine if state should be saved
20
+ */
21
+ export declare const createPersistedReduxReducer: <S, A extends UnknownAction>(reducer: Reducer<S, A>, key: string | ((state: S) => string), selector?: (state: S) => any, condition?: (state: S) => boolean) => Reducer<S, A>;
@@ -21,3 +21,4 @@ export * from '../../../core/modules/app/settings/hooks/use-settings';
21
21
  export * from '../../../core/modules/app/base-layout/main-nav/services/main-nav-registry';
22
22
  export * from '../../../core/modules/app/base-layout/main-nav/hooks/use-main-nav';
23
23
  export * from '../../../core/modules/app/base-layout/right-sidebar/logo/subscription-details';
24
+ export * from '../../../core/modules/app/app-loader/services/app-loader-registry';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pimcore/studio-ui-bundle",
3
- "version": "1.0.0-canary.20251128-091124-470a500",
3
+ "version": "1.0.0-canary.20251201-111655-54db9b6",
4
4
  "keywords": [
5
5
  "pimcore",
6
6
  "pimcore-studio-ui"