@pimcore/data-hub 2026.1.2 → 2026.1.4

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 (24) hide show
  1. package/dist/build/types/components/base-detail-view/components/config-toolbar/config-toolbar.d.ts +5 -1
  2. package/dist/build/types/components/base-detail-view/hooks/use-detail-view.d.ts +3 -1
  3. package/dist/build/types/components/base-detail-view/index.d.ts +1 -0
  4. package/dist/build/types/components/base-detail-view/track-config-error.d.ts +19 -0
  5. package/dist/build/types/modules/config/components/column-config-modal/base-column-editor.d.ts +2 -0
  6. package/dist/build/types/modules/config/components/column-config-modal/base-column-editor.styles.d.ts +14 -0
  7. package/dist/build/types/modules/config/components/column-config-modal/column-config-modal.d.ts +5 -1
  8. package/dist/build/types/modules/config/components/column-config-modal/fields-to-add-panel.d.ts +22 -0
  9. package/dist/build/types/modules/config/components/column-config-modal/index.d.ts +1 -1
  10. package/dist/build/types/modules/config/components/column-config-modal/types.d.ts +6 -0
  11. package/dist/build/types/modules/config/components/column-config-modal/use-add-column-groups.d.ts +17 -0
  12. package/dist/build/types/modules/config/components/column-config-modal/use-column-editor-state.d.ts +7 -3
  13. package/dist/build/types/modules/config/components/migration-modal/compact-layout-context.d.ts +23 -0
  14. package/dist/build/types/modules/config/components/migration-modal/index.d.ts +1 -0
  15. package/dist/build/types/modules/config/config-api-slice-enhanced.d.ts +59 -59
  16. package/dist/build/types/modules/config/config-api-slice.gen.d.ts +59 -59
  17. package/dist/build/types/modules/config/dynamic-types/dynamic-type-data-hub-adapter-abstract.d.ts +6 -0
  18. package/dist/build/types/modules/config/users-api-slice.gen.d.ts +17 -17
  19. package/dist/build/types/modules/config/utils/permission-helpers.d.ts +15 -0
  20. package/dist/build/types/modules/graphql/graphql-api-slice-enhanced.d.ts +63 -63
  21. package/dist/build/types/modules/graphql/graphql-api-slice.gen.d.ts +33 -33
  22. package/dist/build/types/modules/operators/thumbnails-api-slice.gen.d.ts +17 -17
  23. package/package.json +2 -2
  24. package/dist/build/types/modules/config/components/column-config-modal/use-add-column-dropdown.d.ts +0 -18
@@ -17,7 +17,11 @@ export interface ConfigToolbarProps {
17
17
  onSave: () => void;
18
18
  onRefresh: () => void;
19
19
  onDelete: () => void;
20
+ /** When false, the delete button is hidden. Defaults to shown. */
21
+ canDelete?: boolean;
22
+ /** Translation key for the disabled-save tooltip. Defaults to config_not_writeable. */
23
+ saveDisabledTooltipKey?: string;
20
24
  additionalButtons?: ReactNode[];
21
25
  leftAdditionalContent?: ReactNode;
22
26
  }
23
- export declare function ConfigToolbar({ configName, isWriteable, isLoading, isSaving, isDirty, onSave, onRefresh, onDelete, additionalButtons, leftAdditionalContent }: ConfigToolbarProps): React.JSX.Element;
27
+ export declare function ConfigToolbar({ configName, isWriteable, isLoading, isSaving, isDirty, onSave, onRefresh, onDelete, canDelete, saveDisabledTooltipKey, additionalButtons, leftAdditionalContent }: ConfigToolbarProps): React.JSX.Element;
@@ -14,6 +14,8 @@ export interface UseDetailViewProps<TFormValues, TBackendConfig> {
14
14
  modificationDate: number | undefined;
15
15
  isLoading: boolean;
16
16
  requestId: string | undefined;
17
+ /** When false, saving is blocked centrally (read-only / location-locked configuration). Defaults to true. */
18
+ isWriteable?: boolean;
17
19
  transformToForm: (backendConfig: TBackendConfig, configName: string) => TFormValues;
18
20
  transformToBackend: (formValues: TFormValues, existingConfig: TBackendConfig) => TBackendConfig;
19
21
  onSave: (updatedConfig: TBackendConfig, modificationDate: number) => Promise<{
@@ -29,4 +31,4 @@ export interface UseDetailViewReturn<TFormValues> {
29
31
  handleSave: () => void;
30
32
  handleValuesChange: () => void;
31
33
  }
32
- export declare function useDetailView<TFormValues extends Record<string, any>, TBackendConfig extends Record<string, any>>({ configName, configData, modificationDate, isLoading, requestId, transformToForm, transformToBackend, onSave, onChange, successMessageKey }: UseDetailViewProps<TFormValues, TBackendConfig>): UseDetailViewReturn<TFormValues>;
34
+ export declare function useDetailView<TFormValues extends Record<string, any>, TBackendConfig extends Record<string, any>>({ configName, configData, modificationDate, isLoading, requestId, isWriteable, transformToForm, transformToBackend, onSave, onChange, successMessageKey }: UseDetailViewProps<TFormValues, TBackendConfig>): UseDetailViewReturn<TFormValues>;
@@ -10,3 +10,4 @@
10
10
  export * from './base-detail-view';
11
11
  export * from './components/config-toolbar';
12
12
  export * from './hooks';
13
+ export * from './track-config-error';
@@ -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
+ /**
11
+ * Tracks an API error coming from a Data Hub config load/save.
12
+ *
13
+ * For a generic validation failure the backend returns the human-readable reason
14
+ * in `message` (e.g. "Please define a schema for the export"), while the default
15
+ * ApiError handling would only show the translated "Validation failed" error key
16
+ * and discard that reason. In that case we surface the message instead so the user
17
+ * sees what is actually wrong.
18
+ */
19
+ export declare const trackConfigError: (error: unknown) => void;
@@ -25,5 +25,7 @@ export interface BaseColumnEditorProps {
25
25
  language?: string;
26
26
  /** Called when the user changes the preview language inside the modal. */
27
27
  onLanguageChange?: (language: string) => void;
28
+ /** When true, only columns marked as exportable are offered in the add-column dropdown. */
29
+ exportableOnly?: boolean;
28
30
  }
29
31
  export declare const BaseColumnEditor: React.ForwardRefExoticComponent<BaseColumnEditorProps & React.RefAttributes<ColumnEditorHandle<SchemaColumn>>>;
@@ -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
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
11
+ body: import("antd-style").SerializedStyles;
12
+ fieldsPanel: import("antd-style").SerializedStyles;
13
+ list: import("antd-style").SerializedStyles;
14
+ }>;
@@ -21,6 +21,8 @@ export interface EditorRenderProps<TColumns = SchemaColumn> {
21
21
  entity: string;
22
22
  /** True in the split migration view — the editor should hide its own Apply/Discard toolbar. */
23
23
  hideToolbar: boolean;
24
+ /** When true, only columns marked as exportable are offered in the add-column dropdown. */
25
+ exportableOnly: boolean;
24
26
  onApply: (columns: TColumns[]) => void;
25
27
  onCancel: () => void;
26
28
  /** The currently persisted preview language for this entity. */
@@ -50,6 +52,8 @@ export interface ColumnConfigModalProps<TColumns = SchemaColumn> {
50
52
  language?: string;
51
53
  /** Called when the user changes the preview language so the adapter can persist it. */
52
54
  onLanguageChange?: (language: string) => void;
55
+ /** When true, only columns marked as exportable are offered in the add-column dropdown. */
56
+ exportableOnly?: boolean;
53
57
  /**
54
58
  * Render prop that returns the adapter-specific column editor element.
55
59
  * The consumer MUST forward the `ref` to their editor component (forwardRef).
@@ -66,4 +70,4 @@ export interface ColumnConfigModalProps<TColumns = SchemaColumn> {
66
70
  * migration path (MigrationModal with split view). The adapter-specific
67
71
  * editor is injected via the `renderEditor` render prop.
68
72
  */
69
- export declare const ColumnConfigModal: <TColumns = SchemaColumn>({ entity, classDefinitionId, columns, columnConfig, open, title, onApply, onCancel, language, onLanguageChange, renderEditor }: ColumnConfigModalProps<TColumns>) => React.JSX.Element;
73
+ export declare const ColumnConfigModal: <TColumns = SchemaColumn>({ entity, classDefinitionId, columns, columnConfig, open, title, onApply, onCancel, language, onLanguageChange, exportableOnly, renderEditor }: ColumnConfigModalProps<TColumns>) => React.JSX.Element;
@@ -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
+ import React from 'react';
11
+ import { type ColumnPickerGroup } from '@pimcore/studio-ui-bundle/components';
12
+ import { type GridColumnConfiguration } from '@pimcore/studio-ui-bundle/api/data-object';
13
+ export interface FieldsToAddPanelProps {
14
+ groups: Array<ColumnPickerGroup<GridColumnConfiguration>>;
15
+ onColumnSelect: (column: GridColumnConfiguration) => void;
16
+ onClose: () => void;
17
+ }
18
+ /**
19
+ * Embedded "Fields to add" panel shown inside the migrated column editor: the
20
+ * searchable ColumnPicker tree with a collapsible header.
21
+ */
22
+ export declare const FieldsToAddPanel: ({ groups, onColumnSelect, onClose }: FieldsToAddPanelProps) => React.JSX.Element;
@@ -8,7 +8,7 @@
8
8
  * @license Pimcore Open Core License (POCL)
9
9
  */
10
10
  export * from './column-config-modal';
11
- export * from './use-add-column-dropdown';
11
+ export * from './use-add-column-groups';
12
12
  export * from './types';
13
13
  export * from './column-preview';
14
14
  export * from './column-pipeline-form';
@@ -70,6 +70,12 @@ export interface AdvancedEditorColumn {
70
70
  /** Whether this column supports per-column locale selection. */
71
71
  localizable?: boolean;
72
72
  locale?: string | null;
73
+ /**
74
+ * Frontend-only: true for columns added during the current editing session.
75
+ * Drives the initial collapse state — only freshly added advanced columns mount
76
+ * expanded, while columns loaded from the persisted config stay collapsed. Never persisted.
77
+ */
78
+ isNew?: boolean;
73
79
  }
74
80
  /**
75
81
  * Converts a persisted SchemaColumn into an AdvancedEditorColumn draft.
@@ -0,0 +1,17 @@
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 ColumnPickerGroup } from '@pimcore/studio-ui-bundle/components';
11
+ import { type GridColumnConfiguration } from '@pimcore/studio-ui-bundle/api/data-object';
12
+ /**
13
+ * Builds grouped, selectable column groups for the studio ColumnPicker from a
14
+ * flat list of GridColumnConfiguration entries. Each leaf carries its column in
15
+ * `meta`, so the picker's `onSelect` can hand it back to the add-column handler.
16
+ */
17
+ export declare const useAddColumnGroups: (availableColumns: GridColumnConfiguration[]) => Array<ColumnPickerGroup<GridColumnConfiguration>>;
@@ -9,20 +9,24 @@
9
9
  */
10
10
  import { type GridColumnConfiguration } from '@pimcore/studio-ui-bundle/api/data-object';
11
11
  import { type AdvancedEditorColumn, type SchemaColumn } from './types';
12
- import { type AddColumnDropdownMenu } from './use-add-column-dropdown';
12
+ import { type ColumnPickerGroup } from '@pimcore/studio-ui-bundle/components';
13
13
  interface UseColumnEditorStateOptions {
14
14
  entity: string;
15
15
  classDefinitionId?: string;
16
16
  columns: SchemaColumn[];
17
17
  onApply: (columns: SchemaColumn[]) => void;
18
18
  onCancel: () => void;
19
+ /** When true, only columns marked as exportable are offered in the add-column dropdown. */
20
+ exportableOnly?: boolean;
19
21
  }
20
22
  interface UseColumnEditorStateResult {
21
23
  draft: AdvancedEditorColumn[];
22
24
  isLoading: boolean;
23
25
  objectId: number | null;
24
26
  availableFields: GridColumnConfiguration[];
25
- addColumnMenu: AddColumnDropdownMenu;
27
+ columnGroups: Array<ColumnPickerGroup<GridColumnConfiguration>>;
28
+ /** Adds an advanced (pipeline) column, or undefined when the schema offers none. */
29
+ onAddAdvancedColumn?: () => void;
26
30
  openElementSelector: () => void;
27
31
  handleAddColumnOfType: (column: GridColumnConfiguration) => void;
28
32
  handlePipelineChange: (id: string, pipeline: Record<string, any>) => void;
@@ -33,5 +37,5 @@ interface UseColumnEditorStateResult {
33
37
  handleReorder: (ids: string[]) => void;
34
38
  getColumns: () => SchemaColumn[];
35
39
  }
36
- export declare const useColumnEditorState: ({ entity, classDefinitionId, columns, onApply, onCancel }: UseColumnEditorStateOptions) => UseColumnEditorStateResult;
40
+ export declare const useColumnEditorState: ({ entity, classDefinitionId, columns, onApply, onCancel, exportableOnly }: UseColumnEditorStateOptions) => UseColumnEditorStateResult;
37
41
  export {};
@@ -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 React from 'react';
11
+ export interface CompactLayoutContextProps {
12
+ /**
13
+ * True when the editor is rendered in a horizontally constrained context
14
+ * (e.g. the migration modal's split view). Forms should collapse side-by-side
15
+ * layouts into tabs when this is set.
16
+ */
17
+ compact: boolean;
18
+ }
19
+ export interface CompactLayoutProviderProps extends Partial<CompactLayoutContextProps> {
20
+ children: React.ReactNode;
21
+ }
22
+ export declare const CompactLayoutProvider: ({ children, compact }: CompactLayoutProviderProps) => React.JSX.Element;
23
+ export declare const useCompactLayout: () => CompactLayoutContextProps;
@@ -8,3 +8,4 @@
8
8
  * @license Pimcore Open Core License (POCL)
9
9
  */
10
10
  export * from './migration-modal';
11
+ export * from './compact-layout-context';