@epam/ai-dial-publish-panel 1.3.0-dev.33 → 1.3.0-dev.331

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 (33) hide show
  1. package/components/PublishAccessRuleEditor/PublishAccessRuleEditor.d.ts.map +1 -1
  2. package/components/PublishAccessRules/PublishAccessRules.d.ts.map +1 -1
  3. package/components/PublishFoldersTree/PublishFoldersTree.d.ts +1 -1
  4. package/components/PublishFoldersTree/PublishFoldersTree.d.ts.map +1 -1
  5. package/components/PublishHistoryList/PublishHistoryList.d.ts.map +1 -1
  6. package/components/PublishPanel/PublishFooter.d.ts +2 -0
  7. package/components/PublishPanel/PublishFooter.d.ts.map +1 -1
  8. package/components/PublishPanel/PublishPanel.d.ts +4 -2
  9. package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
  10. package/components/PublishPanel/StandalonePublishPanel.d.ts +8 -1
  11. package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
  12. package/components/SaveToFolderPanel/SaveToFolderPanel.d.ts +5 -0
  13. package/components/SaveToFolderPanel/SaveToFolderPanel.d.ts.map +1 -0
  14. package/components/SaveToFolderPanel/StandaloneSaveToFolderPanel.d.ts +5 -0
  15. package/components/SaveToFolderPanel/StandaloneSaveToFolderPanel.d.ts.map +1 -0
  16. package/index.css +3 -2
  17. package/index.d.ts +5 -0
  18. package/index.d.ts.map +1 -1
  19. package/index.js +859 -527
  20. package/models/folder-destination.d.ts +28 -0
  21. package/models/folder-destination.d.ts.map +1 -0
  22. package/models/publish-access-rule-editor.d.ts +1 -1
  23. package/models/publish-access-rule-editor.d.ts.map +1 -1
  24. package/models/publish-folders-tree.d.ts +19 -10
  25. package/models/publish-folders-tree.d.ts.map +1 -1
  26. package/models/publish.d.ts +3 -3
  27. package/models/save-to-folder-panel.d.ts +212 -0
  28. package/models/save-to-folder-panel.d.ts.map +1 -0
  29. package/package.json +5 -5
  30. package/types/save-to-folder.d.ts +15 -0
  31. package/types/save-to-folder.d.ts.map +1 -0
  32. package/utils/folder-destination.d.ts +17 -0
  33. package/utils/folder-destination.d.ts.map +1 -0
@@ -0,0 +1,28 @@
1
+ import { PublishFolderNode } from './publish';
2
+ /** A destination folder inside one of the roots of a multi-root folder tree. */
3
+ export interface FolderDestination {
4
+ /** Key of the root the folder belongs to, as given in {@link FolderDestinationRoot.key}. */
5
+ rootKey: string;
6
+ /** Folder path segments inside that root; `[]` is the root itself. */
7
+ path: string[];
8
+ }
9
+ /** One top-level root of a multi-root folder tree, e.g. Personal or Organization. */
10
+ export interface FolderDestinationRoot {
11
+ /** Stable identifier of the root, reported back in {@link FolderDestination.rootKey}. Must not contain `/`. */
12
+ key: string;
13
+ /** Visible name of the root node. */
14
+ label: string;
15
+ /** Folder nodes loaded so far under this root, with paths relative to the root. */
16
+ items: PublishFolderNode[];
17
+ /** Whether folders can be created under this root. Defaults to `true`. */
18
+ canCreateFolders?: boolean;
19
+ /** Expanded folder path keys inside this root, when the host controls them. */
20
+ expandedPaths?: Set<string>;
21
+ /** Called with this root's expanded folder path keys whenever they change. */
22
+ onExpandedPathsChange?: (paths: Set<string>) => void;
23
+ /** Folder path keys inside this root that the host is currently fetching. */
24
+ loadingPaths?: Set<string>;
25
+ /** Whether a folder under this root takes access rules, edited below the tree once selected. Defaults to `false`. */
26
+ hasAccessRules?: boolean;
27
+ }
28
+ //# sourceMappingURL=folder-destination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folder-destination.d.ts","sourceRoot":"","sources":["../../src/models/folder-destination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,gFAAgF;AAChF,MAAM,WAAW,iBAAiB;IAChC,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,qFAAqF;AACrF,MAAM,WAAW,qBAAqB;IACpC,+GAA+G;IAC/G,GAAG,EAAE,MAAM,CAAC;IACZ,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,6EAA6E;IAC7E,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,qHAAqH;IACrH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
@@ -75,7 +75,7 @@ export interface PublishAccessRuleEditorProps {
75
75
  maxTargets?: number;
76
76
  /** Text overrides. */
77
77
  labels?: PublishAccessRuleEditorLabels;
78
- /** Typography class for validation errors. Defaults to `'dial-small-text'`. */
78
+ /** Typography class for validation errors. Defaults to `'dial-tiny-text'`. */
79
79
  errorClassName?: string;
80
80
  /** Style overrides. */
81
81
  styles?: PublishAccessRuleEditorStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"publish-access-rule-editor.d.ts","sourceRoot":"","sources":["../../src/models/publish-access-rule-editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,iDAAiD;AACjD,MAAM,WAAW,6BAA6B;IAC5C,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qDAAqD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AAE,aAAa,CAAC;CACzB;AAED,wCAAwC;AACxC,MAAM,WAAW,4BAA4B;IAC3C,4CAA4C;IAC5C,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,sCAAsC;IACtC,MAAM,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACxC,wCAAwC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB;IACvB,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACxC"}
1
+ {"version":3,"file":"publish-access-rule-editor.d.ts","sourceRoot":"","sources":["../../src/models/publish-access-rule-editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,iDAAiD;AACjD,MAAM,WAAW,6BAA6B;IAC5C,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,CAAC;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D;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB;IACvB,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACxC"}
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties } from 'react';
2
+ import { FolderDestination, FolderDestinationRoot } from './folder-destination';
2
3
  import { PublishFolderNode } from './publish';
3
4
  /** Color overrides for the publish destination folder tree. */
4
5
  export interface PublishFoldersTreeColors {
@@ -16,14 +17,22 @@ export interface PublishFoldersTreeStyles {
16
17
  }
17
18
  /** Props for the publish destination folder tree. */
18
19
  export interface PublishFoldersTreeProps {
19
- /** Root-level folder nodes. */
20
- items: PublishFolderNode[];
21
- /** Currently selected destination path; `undefined` means no selection and `[]` means the bucket root. */
20
+ /** Root-level folder nodes of the single-root tree. Ignored when `roots` is set. Defaults to `[]`. */
21
+ items?: PublishFolderNode[];
22
+ /** Currently selected destination path of the single-root tree; `undefined` means no selection and `[]` means the bucket root. Ignored when `roots` is set. */
22
23
  selectedPath?: string[];
23
- /** Called when the selected destination changes. */
24
- onSelectedPathChange: (path: string[] | undefined) => void;
25
- /** Called when a new folder name is confirmed. */
26
- onCreateFolder: (parentPath: string[], name: string) => Promise<void>;
24
+ /** Called when the selected destination of the single-root tree changes. */
25
+ onSelectedPathChange?: (path: string[] | undefined) => void;
26
+ /** Called when a new folder name is confirmed in the single-root tree. */
27
+ onCreateFolder?: (parentPath: string[], name: string) => Promise<void>;
28
+ /** Renders one top-level node per root, in this order, instead of the single `rootLabel` root. */
29
+ roots?: FolderDestinationRoot[];
30
+ /** Currently selected destination in multi-root mode; `undefined` means no selection. */
31
+ destination?: FolderDestination;
32
+ /** Called when the selected destination changes in multi-root mode. */
33
+ onDestinationChange?: (destination: FolderDestination | undefined) => void;
34
+ /** Called when a new folder name is confirmed in multi-root mode, with the root and the parent path inside it. */
35
+ onCreateDestinationFolder?: (rootKey: string, parentPath: string[], name: string) => Promise<void>;
27
36
  /** Host-owned search query used to filter the tree. */
28
37
  searchQuery: string;
29
38
  /** Disables every control. Defaults to `false`. */
@@ -46,13 +55,13 @@ export interface PublishFoldersTreeProps {
46
55
  invalidFolderNameError?: string;
47
56
  /** Validation message for a duplicate folder name. Defaults to `'A folder with this name already exists.'`. */
48
57
  duplicateFolderNameError?: string;
49
- /** Label for the selectable bucket root. Defaults to `'Organization'`. */
58
+ /** Label for the selectable bucket root of the single-root tree. Ignored when `roots` is set. Defaults to `'Organization'`. */
50
59
  rootLabel?: string;
51
- /** Externally controlled expanded folder path keys. */
60
+ /** Externally controlled expanded folder path keys of the single-root tree; use `FolderDestinationRoot.expandedPaths` in multi-root mode. */
52
61
  expandedPaths?: Set<string>;
53
62
  /** Called when expanded folder path keys change. */
54
63
  onExpandedPathsChange?: (paths: Set<string>) => void;
55
- /** Folder path keys currently being fetched by the host. */
64
+ /** Folder path keys of the single-root tree currently being fetched by the host; use `FolderDestinationRoot.loadingPaths` in multi-root mode. */
56
65
  loadingPaths?: Set<string>;
57
66
  /** Style overrides. */
58
67
  styles?: PublishFoldersTreeStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"publish-folders-tree.d.ts","sourceRoot":"","sources":["../../src/models/publish-folders-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB;IACvC,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB;IACvC,uBAAuB;IACvB,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,2DAA2D;IAC3D,SAAS,CA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itError: boolean;
100
100
  /**
101
101
  * Whether resubmitting when `hasExistingPublicationInFolder` is true is
102
- * allowed (catalog: republishing replaces the existing version) or
103
- * blocked entirely (conversations have no update/replace semantics —
104
- * publishing again to the same folder is not supported). Default `true`.
102
+ * allowed (the host's backend overwrites the existing publication) or
103
+ * blocked entirely (it cannot — neither catalog entities nor conversations
104
+ * can be republished over an existing DIAL Core publication). Default `true`.
105
105
  */
106
106
  allowReplace?: boolean;
107
107
  }
@@ -0,0 +1,212 @@
1
+ import { CSSProperties, Ref, RefObject } from 'react';
2
+ import { PublishAccessRulesLabels } from '../components/PublishAccessRules/PublishAccessRules';
3
+ import { SaveToFolderView, SaveVersionMode } from '../types/save-to-folder';
4
+ import { FolderDestination, FolderDestinationRoot } from './folder-destination';
5
+ import { PublicationRule, PublishResourceSummary } from './publish';
6
+ import { PublishAccessRulesStyles } from './publish-access-rules-styles';
7
+ import { PublishFoldersTreeStyles } from './publish-folders-tree';
8
+ /** Text overrides for the body of the save-to-folder panel. */
9
+ export interface SaveToFolderPanelLabels {
10
+ /** Heading of the destination section. Defaults to `'Save to folder'`. */
11
+ saveToFolderHeading?: string;
12
+ /** Label of the action that opens the folder tree. Defaults to `'Change'`. */
13
+ changeFolderLabel?: string;
14
+ /** Accessible name of the destination path. Defaults to `'Destination folder'`. */
15
+ destinationAriaLabel?: string;
16
+ /** Heading of the version section. Defaults to `'Version'`. */
17
+ versionHeading?: string;
18
+ /** Label of the keep-version option; `{version}` is replaced. Defaults to `'Keep version {version}'`. */
19
+ keepVersionLabel?: string;
20
+ /** Label of the new-version option. Defaults to `'Save as new version'`. */
21
+ saveAsNewVersionLabel?: string;
22
+ /** Label of the new version input. Defaults to `'Version'`. */
23
+ newVersionLabel?: string;
24
+ /** Placeholder of the new version input. Defaults to `'Enter new version'`. */
25
+ newVersionPlaceholder?: string;
26
+ /** Placeholder and accessible name of the folder search. Defaults to `'Search folders'`. */
27
+ searchPlaceholder?: string;
28
+ /** Accessible name of the search clear button. Defaults to `'Clear search'`. */
29
+ clearSearchAriaLabel?: string;
30
+ /** Message shown when a folder search matches nothing; `{query}` is replaced. */
31
+ folderEmptyStateLabel?: string;
32
+ /** Label of the trailing folder-creation button. Defaults to `'Create new folder'`. */
33
+ createFolderLabel?: string;
34
+ /** Label of the action that cancels folder creation. Defaults to `'Cancel'`. */
35
+ cancelCreatingFolderLabel?: string;
36
+ /** Label of the context-menu action that creates a sibling folder. Defaults to `'Add sibling'`. */
37
+ addSiblingFolderLabel?: string;
38
+ /** Label of the context-menu action that creates a child folder. Defaults to `'Add child'`. */
39
+ addChildFolderLabel?: string;
40
+ /** Inline error for an empty new folder name. */
41
+ createFolderEmptyNameError?: string;
42
+ /** Inline error for a new folder name with forbidden characters. */
43
+ createFolderInvalidNameError?: string;
44
+ /** Inline error for a new folder name that duplicates a sibling. */
45
+ createFolderDuplicateNameError?: string;
46
+ /** Label of the action that retries a failed folder listing. Defaults to `'Retry'`. */
47
+ retryLabel?: string;
48
+ /** Version tag text in the summary row; `{version}` is replaced. */
49
+ summaryVersionLabel?: string;
50
+ }
51
+ /** Color overrides for the body of the save-to-folder panel. */
52
+ export interface SaveToFolderPanelColors {
53
+ /** Section heading text color. Defaults to `--text-primary`. */
54
+ headingText?: string;
55
+ /** Destination path text color. Defaults to `--text-secondary`. */
56
+ destinationText?: string;
57
+ /** Summary row border color. Defaults to `--stroke-tertiary`. */
58
+ summaryBorder?: string;
59
+ /** Summary row background color. Defaults to `--bg-layer-sunken`. */
60
+ summaryBackground?: string;
61
+ /** Version tag border color. Defaults to `--stroke-tertiary`. */
62
+ summaryVersionTagBorder?: string;
63
+ /** Version tag background color. Defaults to `--bg-control-accent-alpha`. */
64
+ summaryVersionTagBackground?: string;
65
+ /** Version tag text color. Defaults to `--text-accent`. */
66
+ summaryVersionTagText?: string;
67
+ }
68
+ /** Style overrides for the body of the save-to-folder panel. */
69
+ export interface SaveToFolderPanelStyles {
70
+ /** Color overrides. */
71
+ colors?: SaveToFolderPanelColors;
72
+ /** Style overrides forwarded to the folder tree. */
73
+ folderTree?: PublishFoldersTreeStyles;
74
+ /** Additional CSS custom properties applied to the body root. */
75
+ cssVars?: CSSProperties;
76
+ }
77
+ /** Version-choice props; the version section renders only when these are supplied. */
78
+ export interface SaveToFolderVersionProps {
79
+ /** Selected version mode. */
80
+ versionMode: SaveVersionMode;
81
+ /** Called with the next version mode. */
82
+ onVersionModeChange: (mode: SaveVersionMode) => void;
83
+ /** The resource's current version, shown in the keep-version option. */
84
+ currentVersion: string;
85
+ /** Value of the new version input. */
86
+ newVersion: string;
87
+ /** Called with the next new version value on every edit. */
88
+ onNewVersionChange: (version: string) => void;
89
+ /** Called when the new version input loses focus. */
90
+ onNewVersionBlur?: () => void;
91
+ /** Error shown under the new version input, already translated by the host. */
92
+ newVersionError?: string;
93
+ }
94
+ /** Access-rules props; the rules section renders below the tree while a folder of a root with `hasAccessRules` is selected. */
95
+ export interface SaveToFolderAccessRulesProps {
96
+ /** Access rules of the selected folder, combined with AND. */
97
+ rules: PublicationRule[];
98
+ /** Called with the full next rules array on add, remove, or clear. */
99
+ onRulesChange: (rules: PublicationRule[]) => void;
100
+ /** Options offered in the rule editor's source picker. */
101
+ sourceOptions: string[];
102
+ /** Whether the selected folder's existing rules are being fetched. Defaults to `false`. */
103
+ isLoading?: boolean;
104
+ /** Whether the most recent existing-rules fetch failed. Defaults to `false`. */
105
+ hasLoadError?: boolean;
106
+ /** Text overrides for the rules section. */
107
+ labels?: PublishAccessRulesLabels;
108
+ /** Style overrides for the rules section. */
109
+ styles?: PublishAccessRulesStyles;
110
+ }
111
+ /** Props shared by the body and the standalone shell of the save-to-folder panel. */
112
+ export interface SaveToFolderPanelBaseProps {
113
+ /** Summary row content; a `type` renders the entity header with icon and type badge. */
114
+ resource: PublishResourceSummary;
115
+ /** Top-level destination roots, in display order. */
116
+ roots: FolderDestinationRoot[];
117
+ /** The committed destination shown in the main view. */
118
+ destination: FolderDestination;
119
+ /** Called with the destination the user selected and confirmed in the folder tree. */
120
+ onDestinationChange: (destination: FolderDestination) => void;
121
+ /** Called when a new folder name is confirmed under `rootKey` at `parentPath`. */
122
+ onCreateFolder: (rootKey: string, parentPath: string[], name: string) => Promise<void>;
123
+ /** Version choice; omit for an unversioned resource. */
124
+ version?: SaveToFolderVersionProps;
125
+ /** Access rules for a destination under a root with `hasAccessRules`; omit to hide the section. */
126
+ accessRules?: SaveToFolderAccessRulesProps;
127
+ /** Whether a save is in flight; every control is disabled meanwhile. Defaults to `false`. */
128
+ isSubmitting?: boolean;
129
+ /** Error from the last save attempt, already translated; announced assertively. */
130
+ submitError?: string;
131
+ /** Error from loading folders, already translated; shown above the tree. */
132
+ foldersError?: string;
133
+ /** Called when the user retries a failed folder listing. */
134
+ onRetryFolders?: () => void;
135
+ /** Text overrides for the body. */
136
+ panelLabels?: SaveToFolderPanelLabels;
137
+ /** Style overrides for the body. */
138
+ panelStyles?: SaveToFolderPanelStyles;
139
+ /** Typography class of the section headings. Defaults to `'dial-body-semi-text'`. */
140
+ headingClassName?: string;
141
+ /** Typography class of the destination path. Defaults to `'dial-small-semi-text'`. */
142
+ destinationClassName?: string;
143
+ }
144
+ /** Props of the body of the save-to-folder panel. */
145
+ export interface SaveToFolderPanelProps extends SaveToFolderPanelBaseProps {
146
+ /** Which view to render. */
147
+ view: SaveToFolderView;
148
+ /** Called when the user activates Change in the main view. */
149
+ onChangeFolderClick: () => void;
150
+ /** Ref attached to the Change button, for returning focus after the folder view closes. */
151
+ changeFolderButtonRef?: Ref<HTMLButtonElement>;
152
+ /** Destination selected in the folder view but not yet confirmed. */
153
+ pendingDestination?: FolderDestination;
154
+ /** Called when the user selects or deselects a folder in the folder view. */
155
+ onPendingDestinationChange: (destination: FolderDestination | undefined) => void;
156
+ }
157
+ /** Text overrides for the shell of the standalone save-to-folder panel. */
158
+ export interface StandaloneSaveToFolderPanelLabels {
159
+ /** Main view title and dialog name. Defaults to `'Save'`. */
160
+ title?: string;
161
+ /** Folder view title. Defaults to `'Change folder'`. */
162
+ changeFolderTitle?: string;
163
+ /** Accessible name of the close button. Defaults to `'Close'`. */
164
+ closeAriaLabel?: string;
165
+ /** Accessible name of the folder view's back button. Defaults to `'Back'`. */
166
+ backAriaLabel?: string;
167
+ /** Cancel button label. Defaults to `'Cancel'`. */
168
+ cancelLabel?: string;
169
+ /** Save button label. Defaults to `'Save'`. */
170
+ saveLabel?: string;
171
+ /** Save button label while saving. Defaults to `'Saving…'`. */
172
+ savingLabel?: string;
173
+ /** Select button label in the folder view. Defaults to `'Select'`. */
174
+ selectLabel?: string;
175
+ }
176
+ /** Color overrides for the shell of the standalone save-to-folder panel. */
177
+ export interface StandaloneSaveToFolderPanelColors {
178
+ /** Backdrop background color. Defaults to `--bg-backdrop`. */
179
+ backdropBackground?: string;
180
+ /** Panel background color. Defaults to `--bg-layer-raised`. */
181
+ panelBackground?: string;
182
+ /** Panel leading-edge border color. Defaults to `--stroke-secondary`. */
183
+ panelBorder?: string;
184
+ /** Divider color below the header and above the footer. Defaults to `--stroke-tertiary`. */
185
+ dividerBorder?: string;
186
+ /** Scrollbar thumb color of the scrollable body. Defaults to `--stroke-secondary`. */
187
+ scrollbarThumb?: string;
188
+ /** Header title text color. Defaults to `--text-primary`. */
189
+ titleText?: string;
190
+ }
191
+ /** Props of the standalone save-to-folder panel. */
192
+ export interface StandaloneSaveToFolderPanelProps extends SaveToFolderPanelBaseProps {
193
+ /** Whether the panel is open. */
194
+ isOpen: boolean;
195
+ /** Called when the panel asks to close: Close, Cancel in the main view, backdrop, or Escape. */
196
+ onClose: () => void;
197
+ /** Called when the user confirms Save in the main view. */
198
+ onSubmit: () => void;
199
+ /** Whether Save is disabled, e.g. while the new version is invalid. Defaults to `false`. */
200
+ isSubmitDisabled?: boolean;
201
+ /** Focus target restored when the panel closes. */
202
+ returnFocusRef?: RefObject<HTMLElement | null>;
203
+ /** Called with the folder view's pending destination whenever it changes, including the reset to `destination` on opening and leaving that view. */
204
+ onPendingDestinationChange?: (destination: FolderDestination | undefined) => void;
205
+ /** Text overrides for the shell. */
206
+ labels?: StandaloneSaveToFolderPanelLabels;
207
+ /** Color overrides for the shell. */
208
+ colors?: StandaloneSaveToFolderPanelColors;
209
+ /** Typography class of the header title. Defaults to `'dial-body-semi-text'`. */
210
+ titleClassName?: string;
211
+ }
212
+ //# sourceMappingURL=save-to-folder-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-to-folder-panel.d.ts","sourceRoot":"","sources":["../../src/models/save-to-folder-panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,+DAA+D;AAC/D,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yGAAyG;IACzG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA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F,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-publish-panel",
3
3
  "description": "Publish-to-folder UI and state flow shared by catalog entity publish and conversation publish",
4
- "version": "1.3.0-dev.33",
4
+ "version": "1.3.0-dev.331",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -21,13 +21,13 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@tabler/icons-react": "^3.44.0"
24
+ "@tabler/icons-react": "^3.50.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "^19.2.8",
28
- "@epam/ai-dial-chat-shared": "1.3.0-dev.33",
29
- "@epam/ai-dial-ui-kit": "^0.15.3",
30
- "@epam/ai-dial-react-file-manager": "^0.3.4"
28
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.331",
29
+ "@epam/ai-dial-ui-kit": "^0.16.0-dev.72",
30
+ "@epam/ai-dial-react-file-manager": "^0.4.0-dev.25"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
@@ -0,0 +1,15 @@
1
+ /** Whether a save keeps the resource's current version or writes a new one. */
2
+ export declare enum SaveVersionMode {
3
+ /** Save in place under the current version. */
4
+ Keep = "keep",
5
+ /** Save the edits as a new version; the current one stays as last saved. */
6
+ New = "new"
7
+ }
8
+ /** Which view the save-to-folder panel shows. */
9
+ export declare enum SaveToFolderView {
10
+ /** Summary, destination and version choice. */
11
+ Main = "main",
12
+ /** The destination folder tree. */
13
+ ChangeFolder = "change-folder"
14
+ }
15
+ //# sourceMappingURL=save-to-folder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-to-folder.d.ts","sourceRoot":"","sources":["../../src/types/save-to-folder.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oBAAY,eAAe;IACzB,+CAA+C;IAC/C,IAAI,SAAS;IACb,4EAA4E;IAC5E,GAAG,QAAQ;CACZ;AAED,iDAAiD;AACjD,oBAAY,gBAAgB;IAC1B,+CAA+C;IAC/C,IAAI,SAAS;IACb,mCAAmC;IACnC,YAAY,kBAAkB;CAC/B"}
@@ -0,0 +1,17 @@
1
+ import { FolderDestination, FolderDestinationRoot } from '../models/folder-destination';
2
+ import { PublishFolderNode } from '../models/publish';
3
+ /** Returns the first path segment that stands for the root `rootKey` in a combined multi-root tree. */
4
+ export declare const toRootToken: (rootKey: string) => string;
5
+ /** Returns `destination` as a path in the combined multi-root tree. */
6
+ export declare const toRootedPath: (destination: FolderDestination) => string[];
7
+ /** Returns the destination a combined-tree path points at, or `undefined` when it does not start with a root token. */
8
+ export declare const fromRootedPath: (rootedPath: string[]) => FolderDestination | undefined;
9
+ /** Returns one top-level node per root, in the given order, with each root's folders sorted by name and re-pathed under its token. */
10
+ export declare const buildRootedFolderTree: (roots: FolderDestinationRoot[]) => PublishFolderNode[];
11
+ /** Returns the combined-tree path keys of every root node. */
12
+ export declare const getRootTokenKeys: (roots: FolderDestinationRoot[]) => string[];
13
+ /** Returns the union of every root's `keys(root)`, translated to combined-tree path keys. */
14
+ export declare const joinRootedKeys: (roots: FolderDestinationRoot[], keys: (root: FolderDestinationRoot) => Set<string> | undefined) => Set<string>;
15
+ /** Splits combined-tree path keys back into each root's own folder path keys; root nodes themselves are dropped. */
16
+ export declare const splitRootedKeys: (roots: FolderDestinationRoot[], keys: Set<string>) => Map<string, Set<string>>;
17
+ //# sourceMappingURL=folder-destination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folder-destination.d.ts","sourceRoot":"","sources":["../../src/utils/folder-destination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAW3D,uGAAuG;AACvG,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,KAAG,MACZ,CAAC;AAOnC,uEAAuE;AACvE,eAAO,MAAM,YAAY,GAAI,aAAa,iBAAiB,KAAG,MAAM,EAGnE,CAAC;AAEF,uHAAuH;AACvH,eAAO,MAAM,cAAc,GACzB,YAAY,MAAM,EAAE,KACnB,iBAAiB,GAAG,SAItB,CAAC;AAYF,sIAAsI;AACtI,eAAO,MAAM,qBAAqB,GAChC,OAAO,qBAAqB,EAAE,KAC7B,iBAAiB,EAQhB,CAAC;AAEL,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,EAAE,KAAG,MAAM,EAC5B,CAAC;AAE7C,6FAA6F;AAC7F,eAAO,MAAM,cAAc,GACzB,OAAO,qBAAqB,EAAE,EAC9B,MAAM,CAAC,IAAI,EAAE,qBAAqB,KAAK,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS,KAC7D,GAAG,CAAC,MAAM,CASZ,CAAC;AAEF,oHAAoH;AACpH,eAAO,MAAM,eAAe,GAC1B,OAAO,qBAAqB,EAAE,EAC9B,MAAM,GAAG,CAAC,MAAM,CAAC,KAChB,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAWzB,CAAC"}