@pimcore/change-control-bundle 2026.3.0-canary.20260921-113351-d7bfba2

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 (81) hide show
  1. package/README.md +63 -0
  2. package/dist/build/types/api/change-control-api-slice.d.ts +874 -0
  3. package/dist/build/types/api/change-control-api-slice.gen.d.ts +1061 -0
  4. package/dist/build/types/main.d.ts +9 -0
  5. package/dist/build/types/plugins.d.ts +16 -0
  6. package/dist/build/types/review/change-tag/change-tag.d.ts +16 -0
  7. package/dist/build/types/review/change-tag/change-tag.styles.d.ts +12 -0
  8. package/dist/build/types/review/contract.d.ts +110 -0
  9. package/dist/build/types/review/core/compared-side.d.ts +18 -0
  10. package/dist/build/types/review/core/create-diff-fields.d.ts +29 -0
  11. package/dist/build/types/review/core/layout-utils.d.ts +22 -0
  12. package/dist/build/types/review/core/leaf-path.d.ts +21 -0
  13. package/dist/build/types/review/core/merge-object-data.d.ts +33 -0
  14. package/dist/build/types/review/core/process-layout-data.d.ts +35 -0
  15. package/dist/build/types/review/core/review-split.d.ts +15 -0
  16. package/dist/build/types/review/core/seed-ownership.d.ts +19 -0
  17. package/dist/build/types/review/core/subject-slots.d.ts +22 -0
  18. package/dist/build/types/review/core/subject-summary.d.ts +34 -0
  19. package/dist/build/types/review/core/use-recorded-fields.d.ts +41 -0
  20. package/dist/build/types/review/core/use-review-diff-data.d.ts +40 -0
  21. package/dist/build/types/review/fields/context-safe-field/context-safe-field.d.ts +48 -0
  22. package/dist/build/types/review/fields/diff-field-renderers/diff-field-renderers.d.ts +36 -0
  23. package/dist/build/types/review/fields/diff-field-renderers/diff-field-renderers.styles.d.ts +35 -0
  24. package/dist/build/types/review/fields/diff-field-row/diff-field-row.d.ts +37 -0
  25. package/dist/build/types/review/fields/diff-list-counts.d.ts +18 -0
  26. package/dist/build/types/review/fields/editable-field-collection/editable-field-collection.d.ts +18 -0
  27. package/dist/build/types/review/fields/editable-field-collection/editable-field-collection.styles.d.ts +40 -0
  28. package/dist/build/types/review/fields/field-error-boundary/field-error-boundary.d.ts +29 -0
  29. package/dist/build/types/review/fields/recorded-field-row/recorded-field-row.d.ts +31 -0
  30. package/dist/build/types/review/fields/review-exclusion-context/review-exclusion-context.d.ts +15 -0
  31. package/dist/build/types/review/fields/review-field-scope/review-field-scope.d.ts +20 -0
  32. package/dist/build/types/review/fields/row-layout-registry.d.ts +28 -0
  33. package/dist/build/types/review/fields/wide-field-cards/wide-field-cards.d.ts +33 -0
  34. package/dist/build/types/review/index.d.ts +19 -0
  35. package/dist/build/types/review/multi-subject-review/multi-subject-review.d.ts +18 -0
  36. package/dist/build/types/review/multi-subject-review/multi-subject-review.styles.d.ts +19 -0
  37. package/dist/build/types/review/registries/review-surface-registry.d.ts +31 -0
  38. package/dist/build/types/review/registries/slot-renderer-registry.d.ts +55 -0
  39. package/dist/build/types/review/review-diff-view/review-diff-view.d.ts +18 -0
  40. package/dist/build/types/review/review-diff-view/review-diff-view.styles.d.ts +224 -0
  41. package/dist/build/types/review/review-outcome-header/review-outcome-header.d.ts +19 -0
  42. package/dist/build/types/review/review-outcome-header/review-outcome-header.styles.d.ts +25 -0
  43. package/dist/build/types/review/review-stale-banner/review-stale-banner.d.ts +16 -0
  44. package/dist/build/types/review/review-stale-banner/review-stale-banner.styles.d.ts +18 -0
  45. package/dist/build/types/review/slots/build-slot-rows.d.ts +36 -0
  46. package/dist/build/types/review/slots/editable-scalar-cell/editable-scalar-cell.d.ts +23 -0
  47. package/dist/build/types/review/slots/raw-value.d.ts +11 -0
  48. package/dist/build/types/review/slots/renderers/entry-set-slot-renderer/entry-set-slot-renderer.d.ts +14 -0
  49. package/dist/build/types/review/slots/renderers/metadata-slot-renderer/metadata-slot-renderer.d.ts +16 -0
  50. package/dist/build/types/review/slots/renderers/tags-slot-renderer/tags-slot-renderer.d.ts +17 -0
  51. package/dist/build/types/review/slots/slot-diff-table/slot-diff-table.d.ts +38 -0
  52. package/dist/build/types/review/slots/slot-types.d.ts +73 -0
  53. package/dist/build/types/review/subject-rail/subject-rail.d.ts +35 -0
  54. package/dist/build/types/review/subject-rail/subject-rail.styles.d.ts +27 -0
  55. package/dist/build/types/review/surfaces/class-definition-review-surface/class-definition-review-surface.d.ts +20 -0
  56. package/dist/build/types/review/surfaces/class-definition-review-surface/class-definition-review-surface.styles.d.ts +17 -0
  57. package/dist/build/types/review/surfaces/class-definition-review-surface/class-review-diff.d.ts +66 -0
  58. package/dist/build/types/review/surfaces/class-definition-review-surface/class-review-editor/class-review-editor.d.ts +38 -0
  59. package/dist/build/types/review/surfaces/class-definition-review-surface/class-settings-fields/class-settings-fields.d.ts +11 -0
  60. package/dist/build/types/review/surfaces/class-definition-review-surface/layout-path.d.ts +25 -0
  61. package/dist/build/types/review/surfaces/class-definition-review-surface/settings-annotations.d.ts +23 -0
  62. package/dist/build/types/review/surfaces/class-definition-review-surface/studio-class-editor.d.ts +91 -0
  63. package/dist/build/types/review/surfaces/classification-store-review-surface/change-numerals/change-numerals.d.ts +20 -0
  64. package/dist/build/types/review/surfaces/classification-store-review-surface/change-numerals/change-numerals.styles.d.ts +17 -0
  65. package/dist/build/types/review/surfaces/classification-store-review-surface/classification-store-review-diff.d.ts +82 -0
  66. package/dist/build/types/review/surfaces/classification-store-review-surface/classification-store-review-surface.d.ts +18 -0
  67. package/dist/build/types/review/surfaces/classification-store-review-surface/classification-store-review-surface.styles.d.ts +38 -0
  68. package/dist/build/types/review/surfaces/classification-store-review-surface/collection-rows/collection-rows.d.ts +23 -0
  69. package/dist/build/types/review/surfaces/classification-store-review-surface/group-rows/group-rows.d.ts +23 -0
  70. package/dist/build/types/review/surfaces/default-review-surfaces.d.ts +20 -0
  71. package/dist/build/types/review/surfaces/default-slot-renderers.d.ts +20 -0
  72. package/dist/build/types/review/surfaces/object-review-surface/object-review-surface.d.ts +17 -0
  73. package/dist/build/types/review/surfaces/recorded-review-surface/recorded-review-surface.d.ts +28 -0
  74. package/dist/build/types/review/surfaces/review-surface/review-surface.d.ts +36 -0
  75. package/dist/build/types/review/surfaces/select-options-review-surface/select-options-review-diff.d.ts +42 -0
  76. package/dist/build/types/review/surfaces/select-options-review-surface/select-options-review-surface.d.ts +18 -0
  77. package/dist/build/types/review/surfaces/select-options-review-surface/select-options-review-surface.styles.d.ts +14 -0
  78. package/dist/build/types/review/surfaces/select-options-review-surface/studio-select-option-editor.d.ts +19 -0
  79. package/dist/build/types/review/surfaces/slot-review-surface/slot-review-surface.d.ts +18 -0
  80. package/dist/build/types/sdk/index.d.ts +10 -0
  81. package/package.json +84 -0
@@ -0,0 +1,9 @@
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
+ */
@@ -0,0 +1,16 @@
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 IAbstractPlugin } from '@pimcore/studio-ui-bundle';
11
+ /**
12
+ * The shared review lane's plugin shell. Registries bind at onInit and other plugins
13
+ * extend them from their onStartup (guaranteed to run after every onInit) — a new
14
+ * subject kind registers a surface, a new use-case registers at most a slot renderer.
15
+ */
16
+ export declare const ChangeControlPlugin: IAbstractPlugin;
@@ -0,0 +1,16 @@
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 type ChangeStatus = 'added' | 'removed' | 'changed' | 'moved';
12
+ export declare const STATUS_COLOUR: Record<ChangeStatus, string>;
13
+ export interface ChangeTagProps {
14
+ readonly status: ChangeStatus;
15
+ }
16
+ export declare const ChangeTag: (props: ChangeTagProps) => React.JSX.Element;
@@ -0,0 +1,12 @@
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
+ tag: import("antd-style").SerializedStyles;
12
+ }>;
@@ -0,0 +1,110 @@
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 React from 'react';
11
+ import { type Form } from '@pimcore/studio-ui-bundle/components';
12
+ import { type ReviewSlotData } from './slots/slot-types';
13
+ /**
14
+ * The review lane's cross-bundle contract: types plus the DI id, and nothing that
15
+ * emits runtime code. A consuming bundle imports this with `import type` (the
16
+ * component itself arrives through the container), so the contract never drags the
17
+ * review implementation into a foreign build.
18
+ */
19
+ /** Studio's extended form instance — the shell creates it via Form.useForm */
20
+ type StudioFormInstance = ReturnType<(typeof Form)['useForm']>[0];
21
+ /** DI id consuming bundles resolve the review surface under; serves every subject type */
22
+ export declare const REVIEW_DIFF_VIEW_COMPONENT_ID = "ChangeControl/Review/DiffView";
23
+ /** DI id for the multi-subject review; with fewer than two subjects it is the plain surface */
24
+ export declare const MULTI_SUBJECT_REVIEW_COMPONENT_ID = "ChangeControl/Review/MultiSubjectView";
25
+ /** The stored proposal payload slice the review view consumes. */
26
+ export interface ReviewPayload {
27
+ readonly editableData?: Record<string, unknown>;
28
+ /** base values the change was recorded against (resolved proposals only) */
29
+ readonly baseData?: Record<string, unknown>;
30
+ readonly [key: string]: unknown;
31
+ }
32
+ /** the compared side: the live subject, or the state the change was recorded against */
33
+ export type CompareTarget = 'current' | 'base';
34
+ export interface ReviewDiffViewProps {
35
+ /** engine subject type: 'object' | 'asset' | 'document' */
36
+ readonly subjectType: string;
37
+ /**
38
+ * Surface-registry key overriding the per-subject-type lookup — a shell whose change
39
+ * set is slot-shaped on ANY subject (tags on an object) names 'slots' here.
40
+ */
41
+ readonly surface?: string;
42
+ /** opaque subject reference as the engine stores it; numeric element id for elements */
43
+ readonly subjectRef: string;
44
+ /** the change-set id; slot-driven surfaces fetch their review payload by it */
45
+ readonly changeSetId?: string;
46
+ /** the caller's author context, couriered to the change-set API verbatim */
47
+ readonly contextRef?: string;
48
+ /**
49
+ * The subject-agnostic value set under review — the proposed values, or the
50
+ * recorded ones once the change set is read-only. Preferred over `payload`.
51
+ */
52
+ readonly proposed?: Record<string, unknown> | null;
53
+ /**
54
+ * The base value set the change was recorded against — enables the
55
+ * before → after compare. Falls back to payload.baseData.
56
+ */
57
+ readonly base?: Record<string, unknown> | null;
58
+ /** the stored proposal payload; legacy alias for `proposed` via editableData */
59
+ readonly payload?: ReviewPayload | null;
60
+ /** upstream fetch error from the shell, rendered as the load error */
61
+ readonly payloadError?: string;
62
+ /**
63
+ * The shell's stance: no approve, reject, exclude or amend. Defaults to "the change set
64
+ * has an outcome" (`state` set); a shell showing a superseded card on an open branch sets it.
65
+ */
66
+ readonly readOnly?: boolean;
67
+ /**
68
+ * Defaults to `base` when read-only — a merged change set's live state IS its proposed
69
+ * state, and comparing those would show nothing.
70
+ */
71
+ readonly compareAgainst?: CompareTarget;
72
+ /** form instance owned by the shell — its footer reads edited values on approve */
73
+ readonly form: StudioFormInstance;
74
+ /** resolved change-set state: 'merged' | 'discarded' */
75
+ readonly state?: string;
76
+ readonly resolvedAt?: number;
77
+ readonly staleVisible?: boolean;
78
+ readonly onLiveVersionChange?: (version: number) => void;
79
+ /** reports the excluded field paths whenever the reviewer toggles a row */
80
+ readonly onExcludedChange?: (paths: string[]) => void;
81
+ /** reports review-time edits, leaf address => render value, for the merge body */
82
+ readonly onAmendmentsChange?: (amendments: Record<string, unknown>) => void;
83
+ /** reports the changed-field count for the shell's title */
84
+ readonly onStatsChange?: (changedCount: number) => void;
85
+ /**
86
+ * Reports the review payload's slots once fetched — a shell that stashes a live
87
+ * preview derives its proposed maps from the same data the diff renders, instead
88
+ * of carrying a second copy on its own payload.
89
+ */
90
+ readonly onSlotsChange?: (slots: Record<string, ReviewSlotData>) => void;
91
+ /**
92
+ * The declared tab-contribution seam: a shell that owns MORE than the diff (a live
93
+ * preview, say) contributes tabs here and the surface renders them beside its own.
94
+ */
95
+ readonly extraTabs?: ReadonlyArray<{
96
+ key: string;
97
+ label: string;
98
+ children: React.ReactNode;
99
+ }>;
100
+ }
101
+ export interface MultiSubjectReviewProps extends ReviewDiffViewProps {
102
+ /**
103
+ * The exclusions keyed by subject, which is what a merge across several subjects takes —
104
+ * a leaf address only means something inside one subject's tree.
105
+ */
106
+ readonly onSubjectExcludedChange?: (bySubject: Record<string, string[]>) => void;
107
+ /** how many subjects the change set spans, so a shell can size its chrome to the answer */
108
+ readonly onSubjectCountChange?: (count: number) => void;
109
+ }
110
+ export {};
@@ -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 CompareTarget } from '../contract';
11
+ import { type ReviewSlotData } from '../slots/slot-types';
12
+ export declare const asRecord: (value: unknown) => Record<string, unknown> | undefined;
13
+ /**
14
+ * What the change set is compared against: live Main while it is open, and in history the
15
+ * base it recorded — never live, which has moved on and by then INCLUDES this very change.
16
+ * A change set that created the subject recorded no base, so all of it reads as added.
17
+ */
18
+ export declare const comparedSide: (slot: ReviewSlotData | undefined, compareAgainst: CompareTarget) => Record<string, unknown> | undefined;
@@ -0,0 +1,29 @@
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 IFormattedFieldData } from './process-layout-data';
11
+ export interface DiffField {
12
+ readonly fieldBreadcrumbTitle: string;
13
+ readonly fieldData: Record<string, unknown>;
14
+ readonly fieldPath: string;
15
+ readonly currentValue: unknown;
16
+ readonly proposedValue: unknown;
17
+ readonly isDifferent: boolean;
18
+ /** the field type is unknown to the registry — rendered as a raw value */
19
+ readonly unsupported?: boolean;
20
+ }
21
+ export declare function createDiffFields(currentFields: IFormattedFieldData[], proposedFields: IFormattedFieldData[]): DiffField[];
22
+ /**
23
+ * Group diff fields by breadcrumb title for collapsible sections.
24
+ */
25
+ export declare function groupByBreadcrumb(fields: DiffField[]): Array<{
26
+ title: string;
27
+ fields: DiffField[];
28
+ hasChanges: boolean;
29
+ }>;
@@ -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
+ /** Check if a layout tree contains any fieldcollections fields. */
11
+ export declare function hasFieldCollectionFields(layout: Array<Record<string, unknown>>): boolean;
12
+ /**
13
+ * Recursively prune a layout tree to only keep branches that contain
14
+ * data fields whose name is in the given set. This avoids triggering
15
+ * expensive sub-layout fetches (objectbricks, field-collections) for
16
+ * fields that aren't part of the change set under review.
17
+ */
18
+ export declare function pruneLayoutToFields(layout: Array<Record<string, unknown>>, fieldNames: Set<string>): Array<Record<string, unknown>>;
19
+ /** Class layout cache — keyed by classId, shared across all view instances. */
20
+ export declare const layoutCache: Map<string, {
21
+ children: Array<Record<string, unknown>>;
22
+ }>;
@@ -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
+ /** the engine's leaf-path grammar (LeafPath::split): `.` joins segments, `\` escapes */
11
+ export declare const splitLeafPath: (path: string) => string[];
12
+ /**
13
+ * An entry-set slot addresses its entries `<slot>.<entry>`; this is the entry alone, as the
14
+ * subject handler keyed it. An address that is not under the slot comes back whole.
15
+ */
16
+ export declare const entryOf: (address: string, slot: string) => string;
17
+ /**
18
+ * An entry-set's values re-keyed by entry, the slot prefix taken off each address. An EMPTY
19
+ * map travels as a record whose one leaf is the slot itself — that leaf is no entry.
20
+ */
21
+ export declare const entriesOf: (values: Record<string, unknown> | undefined, slot: string) => Record<string, unknown>;
@@ -0,0 +1,33 @@
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
+ * Check if a value looks like a relation reference ({id, type}).
12
+ */
13
+ export declare function isRelationRef(val: unknown): val is Record<string, unknown> & {
14
+ id: number;
15
+ type: string;
16
+ };
17
+ /**
18
+ * Walk an object tree, find relation-like values missing fullPath,
19
+ * fetch their paths from the API, and enrich in-place.
20
+ */
21
+ export declare function enrichRelationPaths(data: Record<string, unknown>): Promise<void>;
22
+ /**
23
+ * Walk a class layout tree and enrich every classificationstore field with
24
+ * group definitions for groups that are active in the proposed data but
25
+ * absent from the current object's activeGroupDefinitions (newly added groups).
26
+ */
27
+ export declare function enrichClassificationStoreGroups(layout: Array<Record<string, unknown>>, proposedObjectData: Record<string, unknown>, objectId: number): Promise<Array<Record<string, unknown>>>;
28
+ /**
29
+ * Recursively merge source into target. Source values override target.
30
+ * For relation-like objects ({id, type}), merge to preserve metadata.
31
+ * For arrays of relations, enrich each element with metadata from current.
32
+ */
33
+ export declare function deepMerge(target: Record<string, unknown>, source: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,35 @@
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 { DynamicTypeObjectDataRegistry } from '@pimcore/studio-ui-bundle/modules/element';
11
+ export interface IFormattedFieldData {
12
+ fieldBreadcrumbTitle: string;
13
+ fieldData: Record<string, unknown>;
14
+ fieldValue: unknown;
15
+ fieldPath?: string;
16
+ /** set when the field type is unknown to the registry — rendered as a raw value */
17
+ unsupported?: boolean;
18
+ }
19
+ export declare const getBreadcrumbTitle: (v1: string, v2: string) => string;
20
+ interface ProcessDataParams {
21
+ objectId: number;
22
+ layout: Array<Record<string, unknown>>;
23
+ objectData?: Record<string, unknown>;
24
+ objectDataRegistry: DynamicTypeObjectDataRegistry;
25
+ }
26
+ /**
27
+ * Recursively flattens a class layout tree into a flat list of field entries.
28
+ * Handles localized fields, field collections, object bricks, classification store.
29
+ */
30
+ export declare function processData({ objectId, layout, objectData, objectDataRegistry }: ProcessDataParams): Promise<IFormattedFieldData[]>;
31
+ /**
32
+ * Create a unique key for a field entry (for matching current vs proposed).
33
+ */
34
+ export declare function getFieldKey(item: IFormattedFieldData): string;
35
+ export {};
@@ -0,0 +1,15 @@
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
+ * Whether a surface sits in the subject split, beside the rail, or alone in the modal — the
12
+ * gutters differ, and the surface asks rather than the shell naming it on every render.
13
+ */
14
+ export declare const ReviewSplitContext: import("react").Context<boolean>;
15
+ export declare const useInSplit: () => boolean;
@@ -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
+ /** the slice fields the ownership rule reads */
11
+ export interface DraftEntityLike {
12
+ readonly modified?: boolean;
13
+ }
14
+ export declare const markLaneSeeded: (objectId: number) => void;
15
+ /**
16
+ * true when the entity exists and the editor owns it: either the editor put it there,
17
+ * or the editor has modified a seed this lane put there since
18
+ */
19
+ export declare const editorOwnsDraft: (entity: DraftEntityLike | null | undefined, objectId: number) => boolean;
@@ -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 { type ChangeSetReviewData, type ReviewSlotData } from '../slots/slot-types';
11
+ /**
12
+ * The slots of one subject. The primary's live at the payload's top level and its own entry
13
+ * reports none, so a surface asks here rather than choosing between the two itself.
14
+ */
15
+ export declare const slotsFor: (data: ChangeSetReviewData | undefined, subjectType?: string, subjectRef?: string) => Record<string, ReviewSlotData>;
16
+ /**
17
+ * The review payload as the lane types it. The generated slice is built from the spec dump
18
+ * committed with the foundation, which predates the subject fields the DTO now declares
19
+ * (label, applyOrder, isNew, per-subject slots) — so the lane keeps its own richer type and
20
+ * widens here, in one place, until the slice is regenerated.
21
+ */
22
+ export declare const reviewDataOf: (data: unknown) => ChangeSetReviewData | undefined;
@@ -0,0 +1,34 @@
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 ReviewSlotData } from '../slots/slot-types';
11
+ type Translate = (key: string, options?: Record<string, unknown>) => string;
12
+ export interface StoreTotals {
13
+ groups?: number;
14
+ keys?: number;
15
+ collections?: number;
16
+ }
17
+ /** one segment per kind, so a caller can put each kind's change counts next to its own size */
18
+ export interface StoreSummaryPart {
19
+ readonly kind: 'groups' | 'keys' | 'collections';
20
+ readonly text: string;
21
+ }
22
+ /**
23
+ * The sizes the payload knows: a slot the change left alone is not shipped and is left out
24
+ * rather than read as zero; collections only when there are any, most stores have none.
25
+ */
26
+ export declare const storeSummaryParts: (totals: StoreTotals, t: Translate) => StoreSummaryPart[];
27
+ export declare const storeSummary: (totals: StoreTotals, t: Translate) => string;
28
+ /**
29
+ * One line saying how big a subject is after the change — what the rail shows under a
30
+ * subject's kind, from the proposed side of its slots. Kinds without a natural size say
31
+ * nothing; the rail then shows the kind alone.
32
+ */
33
+ export declare const subjectSummary: (subjectType: string, slots: Record<string, ReviewSlotData> | undefined, t: Translate) => string | undefined;
34
+ export {};
@@ -0,0 +1,41 @@
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 DynamicTypeObjectDataRegistry } from '@pimcore/studio-ui-bundle/modules/element';
11
+ import { type DiffField } from './create-diff-fields';
12
+ /** A flat key/value entry — the plain fallback when no registry is available. */
13
+ export interface RecordedField {
14
+ readonly key: string;
15
+ readonly value: unknown;
16
+ }
17
+ export interface UseRecordedFieldsArgs {
18
+ /** the effect only runs when true (read-only) */
19
+ readonly enabled: boolean;
20
+ readonly objectId: number;
21
+ readonly registry: DynamicTypeObjectDataRegistry | null;
22
+ /** the recorded value set as submitted — never re-fetched from the live object */
23
+ readonly recorded: Record<string, unknown> | null | undefined;
24
+ /** the base the change was recorded against; enables before → after rows */
25
+ readonly base?: Record<string, unknown> | null;
26
+ }
27
+ export interface RecordedFieldsData {
28
+ readonly recordedFields: RecordedField[];
29
+ readonly recordedDiffFields: DiffField[];
30
+ /** true when the rows carry a real base side (before → after) */
31
+ readonly compare: boolean;
32
+ readonly loading: boolean;
33
+ readonly hasFieldCollections: boolean;
34
+ }
35
+ /**
36
+ * The recorded-values pipeline: renders the recorded values through the
37
+ * field-type registry when available, falling back to a plain key/value list.
38
+ * The live data-object fetch is intentionally skipped — the view is pinned to
39
+ * the recorded state.
40
+ */
41
+ export declare function useRecordedFields({ enabled, objectId, registry, recorded, base }: UseRecordedFieldsArgs): RecordedFieldsData;
@@ -0,0 +1,40 @@
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 DynamicTypeObjectDataRegistry } from '@pimcore/studio-ui-bundle/modules/element';
11
+ import { type DiffField } from './create-diff-fields';
12
+ export interface UseReviewDiffDataArgs {
13
+ /** the effect only runs when true (registry present, review mode, real object) */
14
+ readonly enabled: boolean;
15
+ readonly objectId: number;
16
+ readonly registry: DynamicTypeObjectDataRegistry | null;
17
+ /** the proposed value set (editable data) — the subject adapter provides it */
18
+ readonly proposed: Record<string, unknown> | null | undefined;
19
+ /** upstream fetch error, surfaced as the load error */
20
+ readonly proposedError?: string;
21
+ /** bumping it re-runs the pipeline — the stale banner promises fresh differences */
22
+ readonly refresh?: number;
23
+ }
24
+ export interface ReviewDiffData {
25
+ readonly diffFields: DiffField[];
26
+ readonly currentObjFull: Record<string, unknown> | undefined;
27
+ readonly loading: boolean;
28
+ readonly loadError: string | null;
29
+ readonly hasFieldCollections: boolean;
30
+ readonly formInitialValues: Record<string, unknown>;
31
+ /** increments per completed run; keying the form on it re-applies the initial values */
32
+ readonly runId: number;
33
+ }
34
+ /**
35
+ * The review-mode data pipeline: fetch the live object (always fresh — the left
36
+ * side of the diff is the current state), fetch and prune the class layout,
37
+ * merge the proposed values over the live data and flatten both sides into
38
+ * comparable field lists.
39
+ */
40
+ export declare function useReviewDiffData({ enabled, objectId, registry, proposed, proposedError, refresh }: UseReviewDiffDataArgs): ReviewDiffData;
@@ -0,0 +1,48 @@
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 DiffField } from '../../core/create-diff-fields';
12
+ /**
13
+ * Field types whose editable component consumes the object editor's
14
+ * EditFormContext, which the SDK does not export (and whose real provider
15
+ * auto-saves the live object). They render read-only in review until a
16
+ * review-scoped provider exists upstream. Nested occurrences count too —
17
+ * a block inside a field collection fails the same way.
18
+ */
19
+ export declare const NEEDS_EDIT_FORM_CONTEXT: Set<string>;
20
+ export declare const needsEditFormContext: (fieldType: string) => boolean;
21
+ /** Note shown under a field that had to fall back to read-only. */
22
+ export declare const ReadOnlyNote: React.FC;
23
+ /**
24
+ * Read-only render of an arbitrary field definition + value, using the same
25
+ * DataComponent path as the version compare view.
26
+ */
27
+ export interface ReadOnlyValueProps {
28
+ readonly fieldDef: Record<string, unknown>;
29
+ readonly value: unknown;
30
+ readonly fill?: boolean;
31
+ }
32
+ export declare const ReadOnlyValue: ({ fieldDef, value, fill }: ReadOnlyValueProps) => React.JSX.Element;
33
+ /**
34
+ * Degradation ladder for a proposed-side field that cannot render editable:
35
+ * read-only value plus a factual note, and a raw dump if even that fails.
36
+ */
37
+ export interface ProposedReadOnlyProps {
38
+ readonly fieldDef: Record<string, unknown>;
39
+ readonly value: unknown;
40
+ readonly fill?: boolean;
41
+ }
42
+ export declare const ProposedReadOnly: ({ fieldDef, value, fill }: ProposedReadOnlyProps) => React.JSX.Element;
43
+ /** Read-only degradation for a whole diff field's proposed side. */
44
+ export interface ProposedFieldFallbackProps {
45
+ readonly field: DiffField;
46
+ readonly fill?: boolean;
47
+ }
48
+ export declare const ProposedFieldFallback: ({ field, fill }: ProposedFieldFallbackProps) => React.JSX.Element;
@@ -0,0 +1,36 @@
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 DynamicTypeObjectDataRegistry } from '@pimcore/studio-ui-bundle/modules/element';
12
+ import { type DiffField } from '../../core/create-diff-fields';
13
+ /**
14
+ * Read-only field renderer using Studio's DataComponent (version comparison mode).
15
+ * Fields keep the width they have in the object editor — their own definition
16
+ * width, or the size default from FieldWidthProvider. Only the wide two-card
17
+ * layout fills its column, via `fill`.
18
+ */
19
+ interface ReadOnlyFieldInnerProps {
20
+ field: DiffField;
21
+ value?: unknown;
22
+ fill?: boolean;
23
+ }
24
+ export declare const ReadOnlyField: React.MemoExoticComponent<({ field, value, fill }: ReadOnlyFieldInnerProps) => React.JSX.Element>;
25
+ /**
26
+ * Editable field wrapped in Form.Item.
27
+ * Field collections use a custom flattened renderer that walks the layout
28
+ * and renders each sub-field individually via getObjectDataComponent().
29
+ */
30
+ interface EditableFormFieldInnerProps {
31
+ field: DiffField;
32
+ registry: DynamicTypeObjectDataRegistry;
33
+ fill?: boolean;
34
+ }
35
+ export declare const EditableFormField: React.MemoExoticComponent<({ field, registry, fill }: EditableFormFieldInnerProps) => React.JSX.Element>;
36
+ export {};
@@ -0,0 +1,35 @@
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
+ fieldFill: import("antd-style").SerializedStyles;
12
+ label: {
13
+ padding: string;
14
+ fontSize: number;
15
+ fontFamily: string;
16
+ color: string;
17
+ fontWeight: number;
18
+ };
19
+ locale: {
20
+ color: string;
21
+ marginLeft: number;
22
+ };
23
+ proposedCell: {
24
+ padding: string;
25
+ minHeight: number;
26
+ borderRadius: number;
27
+ display: "flex";
28
+ alignItems: "flex-start";
29
+ gap: number;
30
+ };
31
+ unsupported: {
32
+ color: string;
33
+ fontSize: number;
34
+ };
35
+ }>;