@epam/ai-dial-publish-panel 1.3.0-dev.364 → 1.3.0-dev.371
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.
- package/components/UnpublishConfirmationDialog/UnpublishConfirmationDialog.d.ts +10 -0
- package/components/UnpublishConfirmationDialog/UnpublishConfirmationDialog.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +588 -555
- package/models/unpublish-confirmation-dialog.d.ts +50 -0
- package/models/unpublish-confirmation-dialog.d.ts.map +1 -0
- package/package.json +2 -2
- package/utils/publish-folder-tree.d.ts +2 -0
- package/utils/publish-folder-tree.d.ts.map +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Copy for {@link UnpublishConfirmationDialog}; every field has an English default. */
|
|
2
|
+
export interface UnpublishConfirmationDialogLabels {
|
|
3
|
+
/** Dialog title. Default: `'Unpublish?'`. */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Confirm button label. Default: `'Unpublish'`. */
|
|
6
|
+
confirmLabel?: string;
|
|
7
|
+
/** Cancel button label. Default: `'Cancel'`. */
|
|
8
|
+
cancelLabel?: string;
|
|
9
|
+
/** Name of the public root folder (path `''`). Default: `'Organization'`. */
|
|
10
|
+
rootFolderLabel?: string;
|
|
11
|
+
/** Accessible name of the folder radio group. Default: `'Published folders'`. */
|
|
12
|
+
folderGroupAriaLabel?: string;
|
|
13
|
+
/** Status announced while the request runs. Default: `'Requesting unpublish…'`. */
|
|
14
|
+
loadingStatusLabel?: string;
|
|
15
|
+
/** Message for a single published folder, given the entity name and the folder's display name. Default: `` `Unpublish "${name}" from "${folder}"?` ``. */
|
|
16
|
+
confirmMessage?: (name: string, folder: string) => string;
|
|
17
|
+
/** Message asking the user to pick one of several folders. Default: `` `Choose which folder to unpublish "${name}" from.` ``. */
|
|
18
|
+
selectFolderMessage?: (name: string) => string;
|
|
19
|
+
}
|
|
20
|
+
/** Color overrides for {@link UnpublishConfirmationDialog}, applied as CSS custom properties with app theme fallbacks. */
|
|
21
|
+
export interface UnpublishConfirmationDialogColors {
|
|
22
|
+
/** Text color of each folder option. Fallback: `--text-primary`. */
|
|
23
|
+
optionText?: string;
|
|
24
|
+
}
|
|
25
|
+
/** Props for {@link UnpublishConfirmationDialog}. */
|
|
26
|
+
export interface UnpublishConfirmationDialogProps {
|
|
27
|
+
/** Whether the dialog is open. */
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
/** Name of the entity being unpublished, interpolated into the message. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Published folders as `/`-joined paths; `''` is the public root. */
|
|
32
|
+
folders: string[];
|
|
33
|
+
/** The picked folder when there are several; `null` until one is picked. */
|
|
34
|
+
selectedFolder: string | null;
|
|
35
|
+
/** Called with the folder the user picks. */
|
|
36
|
+
onSelectedFolderChange: (folder: string) => void;
|
|
37
|
+
/** Whether the unpublish request is running; disables both actions and the folder options. Default: `false`. */
|
|
38
|
+
isLoading?: boolean;
|
|
39
|
+
/** Copy overrides. */
|
|
40
|
+
labels?: UnpublishConfirmationDialogLabels;
|
|
41
|
+
/** Typography class for each folder option. Default: `'dial-small-text'`. */
|
|
42
|
+
optionClassName?: string;
|
|
43
|
+
/** Color overrides. */
|
|
44
|
+
colors?: UnpublishConfirmationDialogColors;
|
|
45
|
+
/** Called when the user confirms. */
|
|
46
|
+
onConfirm: () => void;
|
|
47
|
+
/** Called when the dialog should close. */
|
|
48
|
+
onClose: () => void;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=unpublish-confirmation-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpublish-confirmation-dialog.d.ts","sourceRoot":"","sources":["../../src/models/unpublish-confirmation-dialog.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,MAAM,WAAW,iCAAiC;IAChD,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,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
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.
|
|
4
|
+
"version": "1.3.0-dev.371",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^19.2.8",
|
|
28
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
28
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.371",
|
|
29
29
|
"@epam/ai-dial-ui-kit": "^0.16.0",
|
|
30
30
|
"@epam/ai-dial-react-file-manager": "^0.4.1"
|
|
31
31
|
},
|
|
@@ -20,6 +20,8 @@ export declare const collectFolderKeys: (items: PublishFolderNode[]) => string[]
|
|
|
20
20
|
export declare const toFolderPathKey: (path: string[]) => string;
|
|
21
21
|
/** Splits a `DialFile`/`DialFoldersTree` string path back into folder path segments. */
|
|
22
22
|
export declare const fromFolderPathKey: (pathKey: string) => string[];
|
|
23
|
+
/** Returns the last segment of a `/`-joined folder path, or `rootLabel` for the public root (`''`). */
|
|
24
|
+
export declare const getFolderDisplayName: (pathKey: string, rootLabel: string) => string;
|
|
23
25
|
/** Converts `PublishFolderNode[]` to the `DialFile[]` shape `DialFoldersTree` requires. */
|
|
24
26
|
export declare const toDialFileTree: (items: PublishFolderNode[]) => DialFile[];
|
|
25
27
|
/** Error messages returned by {@link validateFolderName} for each rejection reason. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-folder-tree.d.ts","sourceRoot":"","sources":["../../src/utils/publish-folder-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAoB,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD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