@pimcore/studio-ui-bundle 1.0.0-canary.20251128-145826-f1bc4ba → 1.0.0-canary.20251201-130129-be122a9

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.
@@ -266,6 +266,7 @@ export declare const serviceIds: {
266
266
  'DynamicTypes/WidgetEditor/WidgetTypeRegistry': string;
267
267
  mainNavRegistry: string;
268
268
  widgetManager: string;
269
+ widgetRestorerRegistry: string;
269
270
  backgroundProcessor: string;
270
271
  debouncedFormRegistry: string;
271
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,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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pimcore/studio-ui-bundle",
3
- "version": "1.0.0-canary.20251128-145826-f1bc4ba",
3
+ "version": "1.0.0-canary.20251201-130129-be122a9",
4
4
  "keywords": [
5
5
  "pimcore",
6
6
  "pimcore-studio-ui"