@epam/ai-dial-chat-shared 1.2.0-dev.98 → 1.2.0-rc.0

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 (51) hide show
  1. package/components/ConfirmationDialog/ConfirmationDialog.js +34 -0
  2. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.js +21 -0
  3. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +6 -0
  4. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +24 -0
  5. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -0
  6. package/components/ConfirmationView/ConfirmationFooter.js +42 -0
  7. package/components/ConfirmationView/ConfirmationView.js +39 -0
  8. package/components/ConfirmationView/ConfirmationView.module.scss.js +7 -0
  9. package/components/CopyButton/CopyButton.js +5 -5
  10. package/components/EntityHeader/EntityHeader.js +14 -13
  11. package/components/EntityTypeLabel/EntityTypeLabel.js +2 -2
  12. package/components/FeaturedChip/FeaturedChip.js +9 -14
  13. package/components/InitialsAvatar/InitialsAvatar.js +10 -27
  14. package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +65 -64
  15. package/components/MarkdownRenderer/MDMessageViewer.js +25 -17
  16. package/components/MarkdownRenderer/MarkdownRenderer.js +119 -118
  17. package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +7 -7
  18. package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +2 -2
  19. package/components/MarkdownRenderer/PlainTextRenderer.js +21 -0
  20. package/components/MarkdownRenderer/Table/MarkdownTable.js +62 -65
  21. package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
  22. package/components/MarkdownRenderer/Table/TableHeader.js +18 -21
  23. package/components/MarkdownRenderer/ThinkingShimmer.js +14 -0
  24. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js +3 -2
  25. package/components/PanelEmptyState/PanelEmptyState.js +2 -1
  26. package/components/TextRefinementField/TextRefinementField.js +86 -0
  27. package/constants/dial.js +2 -2
  28. package/constants/resizable-fields.js +2 -2
  29. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +248 -236
  30. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +17 -14
  31. package/file-manager/OperationLoaderModal/OperationLoaderModal.js +17 -20
  32. package/file-manager/upload-batch.js +2 -2
  33. package/file-manager/upload-queue.js +17 -0
  34. package/file-manager.d.ts +25 -14
  35. package/file-manager.js +4 -3
  36. package/hooks/useTextRefinement.js +66 -0
  37. package/hooks/useUnsavedChangesGuard.js +30 -0
  38. package/index.css +2 -2
  39. package/index.d.ts +510 -46
  40. package/index.js +73 -62
  41. package/markdown.d.ts +64 -8
  42. package/markdown.js +5 -4
  43. package/models/chat.js +4 -2
  44. package/package.json +5 -5
  45. package/utils/entity-field-limits.js +4 -0
  46. package/utils/entity-type.js +15 -0
  47. package/utils/format-price.js +13 -9
  48. package/utils/is-skill-selection-unsupported.js +4 -0
  49. package/utils/syntax-highlighting.js +13 -0
  50. package/components/InitialsAvatar/InitialsAvatar.module.scss.js +0 -6
  51. package/file-manager/UploadProgressModal/UploadProgressModal.js +0 -50
@@ -1,58 +1,58 @@
1
- import { DialFileManagerActionProfile as e, DialFileManagerVariant as t } from "../file-manager-variant.js";
1
+ import { mergeClasses as e } from "../../utils/merge-class.js";
2
+ import { DialFileManagerActionProfile as t, DialFileManagerVariant as n } from "../file-manager-variant.js";
2
3
  import { getParentFolderPath as ee } from "../path.js";
3
- import { FileUploadStatus as n } from "../upload-batch.js";
4
4
  import { useGridEditingScroll as te } from "../useGridEditingScroll/useGridEditingScroll.js";
5
5
  import { OperationLoaderModal as ne } from "../OperationLoaderModal/OperationLoaderModal.js";
6
- import { UploadProgressModal as re } from "../UploadProgressModal/UploadProgressModal.js";
7
- import { NOT_ALLOWED_SYMBOLS_REGEXP as ie, PrimaryButton as r, Spinner as ae } from "@epam/ai-dial-ui-kit";
8
- import { memo as i, useEffect as oe, useMemo as a, useState as se } from "react";
9
- import { Fragment as ce, jsx as o, jsxs as s } from "react/jsx-runtime";
10
- import { DialFileManager as le, DialFileManagerActions as c, DialFileManagerTabs as ue, GridSelectionMode as de } from "@epam/ai-dial-react-file-manager";
6
+ import { toUploadQueueItems as re } from "../upload-queue.js";
7
+ import { NOT_ALLOWED_SYMBOLS_REGEXP as ie, PrimaryButton as ae, Spinner as oe, TransferQueue as se } from "@epam/ai-dial-ui-kit";
8
+ import { memo as r, useCallback as ce, useEffect as le, useMemo as i, useState as ue } from "react";
9
+ import { Fragment as de, jsx as a, jsxs as o } from "react/jsx-runtime";
10
+ import { DialFileManager as fe, DialFileManagerActions as s, DialFileManagerTabs as c, GridSelectionMode as pe } from "@epam/ai-dial-react-file-manager";
11
11
  //#region src/file-manager/DialFileManagerShell/DialFileManagerShell.tsx
12
- var l = (e, t) => {
12
+ var me = (e, t) => {
13
13
  if (e.isDownloading) return t.downloadingLabel;
14
14
  if (e.isDeleting) return t.deletingLabel;
15
15
  if (e.isRenaming && !e.isMoving) return t.renamingLabel;
16
16
  if (e.isUnsharing) return t.unsharingLabel;
17
17
  if (e.isRemovingAccess) return t.removingAccessLabel;
18
- }, u = ({ controller: i, labels: u, activeTab: d, tabs: f, onTabChange: p, selectedPaths: m, onSelectedPathsChange: fe, variant: pe, actionProfile: me, autoSelectUploadedItems: he = !1, allowedFileTypes: ge, maxSelectableFileSize: h, oversizedUploadMessage: g, isRowSelectable: _, getDisabledTooltip: _e, unsupportedFileTypeTooltip: ve }) => {
19
- let { items: ye, isLoading: be, error: xe, path: v, onPathChange: Se, retry: Ce, onSearchFiles: we, isSearching: y, searchResults: b, clearSearchResults: Te, expandedPaths: x, loadedPaths: S, onExpandedPathsChange: C, onFolderPopupPathChange: w, folderPopupLoadingPaths: T, onUploadFiles: E, onUploadArchive: D, onValidateUpload: O, uploadBatchState: k, cancelUpload: A, clearUploadBatch: Ee, onCreateFolder: De, onCreateFolderValidate: Oe, onDownloadFiles: ke, isDownloading: Ae, onDeleteFiles: je, isDeleting: Me, onMoveToFiles: Ne, onRenameValidate: Pe, isRenaming: Fe, onCopyFiles: Ie, isCopying: Le, isMoving: j, cancelCopyMove: Re, uploadEnabled: M, isNewButtonDisabled: N, disabledNewButtonTooltip: P, visibleColumns: F, dateLocale: I, dateOptions: L, actionLabels: R, sharedWithMeIds: ze, sharedByMePaths: z, onUnshareFiles: Be, isUnsharing: Ve, onRemoveFilesAccess: He, isRemovingAccess: Ue, fileMetadata: B, isFileMetadataLoading: V, onGetInfo: We, clearMetadata: H } = i, [U, Ge] = se(void 0), { handleGridApiChange: Ke, reset: W } = te();
20
- oe(() => {
21
- W();
22
- }, [d, W]);
23
- let G = a(() => {
18
+ }, l = ({ controller: r, labels: l, activeTab: u, tabs: d, onTabChange: f, selectedPaths: p, onSelectedPathsChange: he, variant: m, actionProfile: ge, autoSelectUploadedItems: _e = !1, allowedFileTypes: ve, maxSelectableFileSize: h, oversizedUploadMessage: g, isRowSelectable: _, getDisabledTooltip: ye, unsupportedFileTypeTooltip: be }) => {
19
+ let { items: xe, isLoading: Se, error: Ce, path: v, onPathChange: we, retry: Te, onSearchFiles: Ee, isSearching: De, searchResults: Oe, clearSearchResults: ke, expandedPaths: y, loadedPaths: b, onExpandedPathsChange: x, onFolderPopupPathChange: Ae, folderPopupLoadingPaths: S, onUploadFiles: C, onUploadArchive: je, onValidateUpload: Me, uploadBatchState: w, cancelUpload: T, cancelUploadFile: Ne, clearUploadBatch: E, onCreateFolder: Pe, onCreateFolderValidate: Fe, onDownloadFiles: D, isDownloading: Ie, onDeleteFiles: Le, isDeleting: Re, onMoveToFiles: ze, onRenameValidate: Be, isRenaming: Ve, onCopyFiles: He, isCopying: Ue, isMoving: O, cancelCopyMove: We, uploadEnabled: k, isNewButtonDisabled: A, disabledNewButtonTooltip: j, visibleColumns: M, dateLocale: N, dateOptions: P, actionLabels: F, sharedWithMeIds: Ge, sharedByMePaths: I, onUnshareFiles: Ke, isUnsharing: qe, onRemoveFilesAccess: Je, isRemovingAccess: Ye, fileMetadata: L, isFileMetadataLoading: R, onGetInfo: Xe, clearMetadata: z, sectionTab: Ze } = r, B = Ze ?? u, [V, Qe] = ue(void 0), { handleGridApiChange: $e, reset: H } = te();
20
+ le(() => {
21
+ H();
22
+ }, [B, H]);
23
+ let U = i(() => {
24
24
  let e = {};
25
- return c.Download in R && (e[c.Download] = u.downloadLabel), c.Delete in R && (e[c.Delete] = u.deleteLabel), c.Rename in R && (e[c.Rename] = u.renameLabel), c.Copy in R && (e[c.Copy] = u.copyLabel), c.Move in R && (e[c.Move] = u.moveLabel), c.Duplicate in R && (e[c.Duplicate] = u.duplicateLabel), c.Unshare in R && (e[c.Unshare] = u.unshareLabel), c.RemoveAccess in R && (e[c.RemoveAccess] = u.removeAccessLabel), e;
25
+ return s.Download in F && (e[s.Download] = l.downloadLabel), s.Delete in F && (e[s.Delete] = l.deleteLabel), s.Rename in F && (e[s.Rename] = l.renameLabel), s.Copy in F && (e[s.Copy] = l.copyLabel), s.Move in F && (e[s.Move] = l.moveLabel), s.Duplicate in F && (e[s.Duplicate] = l.duplicateLabel), s.Unshare in F && (e[s.Unshare] = l.unshareLabel), s.RemoveAccess in F && (e[s.RemoveAccess] = l.removeAccessLabel), e;
26
26
  }, [
27
- R,
28
- u.downloadLabel,
29
- u.deleteLabel,
30
- u.renameLabel,
31
- u.copyLabel,
32
- u.moveLabel,
33
- u.duplicateLabel,
34
- u.unshareLabel,
35
- u.removeAccessLabel
36
- ]), K = a(() => c.Info in R ? {
37
- ...G,
38
- [c.Info]: u.infoLabel
39
- } : G, [
40
- G,
41
- R,
42
- u.infoLabel
43
- ]), q = a(() => {
44
- if (m.size === 0) return !1;
45
- for (let e of m) if (!z.has(e)) return !1;
27
+ F,
28
+ l.downloadLabel,
29
+ l.deleteLabel,
30
+ l.renameLabel,
31
+ l.copyLabel,
32
+ l.moveLabel,
33
+ l.duplicateLabel,
34
+ l.unshareLabel,
35
+ l.removeAccessLabel
36
+ ]), W = i(() => s.Info in F ? {
37
+ ...U,
38
+ [s.Info]: l.infoLabel
39
+ } : U, [
40
+ U,
41
+ F,
42
+ l.infoLabel
43
+ ]), G = i(() => {
44
+ if (p.size === 0) return !1;
45
+ for (let e of p) if (!I.has(e)) return !1;
46
46
  return !0;
47
- }, [m, z]), J = a(() => {
48
- if (q) return G;
49
- let { [c.RemoveAccess]: e, ...t } = G;
47
+ }, [p, I]), K = i(() => {
48
+ if (G) return U;
49
+ let { [s.RemoveAccess]: e, ...t } = U;
50
50
  return t;
51
- }, [G, q]), qe = a(() => ({
52
- selectionMode: de.MULTIPLE,
53
- visibleColumns: F,
54
- dateLocale: I,
55
- dateOptions: L,
51
+ }, [U, G]), et = i(() => ({
52
+ selectionMode: pe.MULTIPLE,
53
+ visibleColumns: M,
54
+ dateLocale: N,
55
+ dateOptions: P,
56
56
  additionalGridOptions: {
57
57
  domLayout: "normal",
58
58
  rowSelection: {
@@ -60,241 +60,253 @@ var l = (e, t) => {
60
60
  isRowSelectable: _ ?? (() => !0)
61
61
  }
62
62
  },
63
- actionLabels: K
63
+ actionLabels: W
64
64
  }), [
65
- F,
66
- I,
67
- L,
68
- K,
65
+ M,
66
+ N,
67
+ P,
68
+ W,
69
69
  _
70
- ]), Je = a(() => ({
71
- header: u.treeHeaderByTab[d],
72
- tabs: f,
73
- activeTab: d,
74
- onTabChange: p,
75
- expandedPaths: x,
76
- loadedPaths: S,
77
- loadingPaths: T,
78
- onExpandedPathsChange: C,
79
- actionLabels: G
70
+ ]), tt = i(() => ({
71
+ header: m === n.Attach ? null : l.treeHeaderByTab[u],
72
+ containerClassName: m === n.Attach ? "min-h-0 h-full w-[360px] shrink-0 rounded-xl bg-layer-raised shadow-sm" : void 0,
73
+ tabsAriaLabel: l.treeHeaderByTab[u],
74
+ tabs: d,
75
+ activeTab: u,
76
+ onTabChange: f,
77
+ expandedPaths: y,
78
+ loadedPaths: b,
79
+ loadingPaths: S,
80
+ onExpandedPathsChange: x,
81
+ actionLabels: U
80
82
  }), [
81
- u.treeHeaderByTab,
82
- f,
83
+ l.treeHeaderByTab,
84
+ m,
83
85
  d,
84
- p,
85
- x,
86
+ u,
87
+ f,
88
+ y,
89
+ b,
86
90
  S,
87
- T,
88
- C,
89
- G
90
- ]), Y = pe === t.Standalone && me === e.Full && d === ue.MyFiles && M, Ye = a(() => ({
91
+ x,
92
+ U
93
+ ]), q = m === n.Standalone && ge === t.Full && B === c.MyFiles && k, nt = i(() => ({
91
94
  showHiddenFilesToggle: !0,
92
- hiddenFilesSwitcherLabel: u.hiddenFilesLabel,
93
- showHiddenFilesLabel: u.showHiddenFilesLabel,
94
- hideHiddenFilesLabel: u.hideHiddenFilesLabel,
95
- isNewButtonDisabled: N,
96
- disabledNewButtonTooltip: P,
95
+ hiddenFilesSwitcherLabel: l.hiddenFilesLabel,
96
+ showHiddenFilesLabel: l.showHiddenFilesLabel,
97
+ hideHiddenFilesLabel: l.hideHiddenFilesLabel,
98
+ isNewButtonDisabled: A,
99
+ disabledNewButtonTooltip: j,
97
100
  newActions: {
98
- uploadFiles: { label: u.uploadFilesLabel },
99
- newFolder: { label: u.newFolderLabel },
100
- ...Y ? { uploadArchive: { label: u.uploadArchiveAction } } : {}
101
+ uploadFiles: {
102
+ label: l.uploadFilesLabel,
103
+ icon: null
104
+ },
105
+ newFolder: {
106
+ label: l.newFolderLabel,
107
+ icon: null
108
+ },
109
+ ...q ? { uploadArchive: {
110
+ label: l.uploadArchiveAction,
111
+ icon: null
112
+ } } : {}
101
113
  }
102
114
  }), [
103
- u.hiddenFilesLabel,
104
- u.showHiddenFilesLabel,
105
- u.hideHiddenFilesLabel,
106
- N,
107
- P,
108
- u.uploadFilesLabel,
109
- u.newFolderLabel,
110
- Y,
111
- u.uploadArchiveAction
112
- ]), Xe = a(() => ({
113
- getSelectionLabel: u.getSelectionLabel,
114
- actionLabels: J
115
- }), [u.getSelectionLabel, J]), Ze = a(() => ({
116
- cancelLabel: u.deleteCancelLabel,
117
- confirmLabel: u.deleteConfirmLabel,
118
- titleRenderer: u.deleteConfirmTitle,
119
- contentRenderer: u.deleteConfirmBody
115
+ l.hiddenFilesLabel,
116
+ l.showHiddenFilesLabel,
117
+ l.hideHiddenFilesLabel,
118
+ A,
119
+ j,
120
+ l.uploadFilesLabel,
121
+ l.newFolderLabel,
122
+ q,
123
+ l.uploadArchiveAction
124
+ ]), rt = i(() => ({
125
+ getSelectionLabel: l.getSelectionLabel,
126
+ actionLabels: K
127
+ }), [l.getSelectionLabel, K]), it = i(() => ({
128
+ cancelLabel: l.deleteCancelLabel,
129
+ confirmLabel: l.deleteConfirmLabel,
130
+ closeLabel: l.deleteCloseLabel,
131
+ titleRenderer: l.deleteConfirmTitle,
132
+ contentRenderer: l.deleteConfirmBody
120
133
  }), [
121
- u.deleteCancelLabel,
122
- u.deleteConfirmLabel,
123
- u.deleteConfirmTitle,
124
- u.deleteConfirmBody
125
- ]), Qe = a(() => {
134
+ l.deleteCancelLabel,
135
+ l.deleteConfirmLabel,
136
+ l.deleteCloseLabel,
137
+ l.deleteConfirmTitle,
138
+ l.deleteConfirmBody
139
+ ]), at = i(() => {
126
140
  let e;
127
- for (let t of m) {
141
+ for (let t of p) {
128
142
  let n = ee(t);
129
143
  if (e === void 0) e = n;
130
144
  else if (e !== n) return;
131
145
  }
132
146
  return e;
133
- }, [m]), X = U != null && T.has(U), Z = X ? U : Qe, $e = a(() => ({
134
- copyLabel: u.copyLabel,
135
- moveLabel: u.moveLabel,
136
- addFolderLabel: u.addFolderLabel,
137
- hiddenFilesSwitcherLabel: u.hiddenFilesSwitcherLabel,
138
- getCopyHeader: u.getCopyHeader,
139
- getMoveHeader: u.getMoveHeader,
140
- disabledPathTooltip: X ? u.folderPickerLoadingTooltip : u.moveSourceDisabledTooltip,
141
- emptyStateTitle: u.folderPickerEmptyStateTitle,
142
- emptyStateDescription: u.folderPickerEmptyStateDescription,
143
- sourceFolder: Z,
144
- destinationFolderPath: U,
145
- setDestinationFolderPath: Ge,
146
- filesLoading: X
147
+ }, [p]), J = V != null && S.has(V), Y = J ? V : at, ot = i(() => ({
148
+ copyLabel: l.copyLabel,
149
+ moveLabel: l.moveLabel,
150
+ addFolderLabel: l.addFolderLabel,
151
+ hiddenFilesSwitcherLabel: l.hiddenFilesSwitcherLabel,
152
+ getCopyHeader: l.getCopyHeader,
153
+ getMoveHeader: l.getMoveHeader,
154
+ disabledPathTooltip: J ? l.folderPickerLoadingTooltip : l.moveSourceDisabledTooltip,
155
+ emptyStateTitle: l.folderPickerEmptyStateTitle,
156
+ emptyStateDescription: l.folderPickerEmptyStateDescription,
157
+ sourceFolder: Y,
158
+ destinationFolderPath: V,
159
+ setDestinationFolderPath: Qe,
160
+ filesLoading: J
147
161
  }), [
148
- u.copyLabel,
149
- u.moveLabel,
150
- u.addFolderLabel,
151
- u.hiddenFilesSwitcherLabel,
152
- u.getCopyHeader,
153
- u.getMoveHeader,
154
- u.folderPickerLoadingTooltip,
155
- u.moveSourceDisabledTooltip,
156
- u.folderPickerEmptyStateTitle,
157
- u.folderPickerEmptyStateDescription,
158
- X,
159
- Z,
160
- U
161
- ]), et = () => {
162
- A(), Ee();
163
- }, tt = a(() => ({
164
- fileMetadata: B,
165
- loading: V,
166
- clearMetadata: H,
167
- header: u.metadataHeader,
168
- nameLabel: u.metadataNameLabel,
169
- pathLabel: u.metadataPathLabel,
170
- modifiedDateLabel: u.metadataModifiedDateLabel,
171
- sizeLabel: u.metadataSizeLabel,
172
- authorLabel: u.metadataAuthorLabel
162
+ l.copyLabel,
163
+ l.moveLabel,
164
+ l.addFolderLabel,
165
+ l.hiddenFilesSwitcherLabel,
166
+ l.getCopyHeader,
167
+ l.getMoveHeader,
168
+ l.folderPickerLoadingTooltip,
169
+ l.moveSourceDisabledTooltip,
170
+ l.folderPickerEmptyStateTitle,
171
+ l.folderPickerEmptyStateDescription,
172
+ J,
173
+ Y,
174
+ V
175
+ ]), st = ce(() => {
176
+ T(), E();
177
+ }, [T, E]), X = i(() => re(w?.files ?? []), [w]), ct = i(() => ({
178
+ fileMetadata: L,
179
+ loading: R,
180
+ clearMetadata: z,
181
+ header: l.metadataHeader,
182
+ nameLabel: l.metadataNameLabel,
183
+ pathLabel: l.metadataPathLabel,
184
+ modifiedDateLabel: l.metadataModifiedDateLabel,
185
+ sizeLabel: l.metadataSizeLabel,
186
+ authorLabel: l.metadataAuthorLabel
173
187
  }), [
174
- B,
175
- V,
176
- H,
177
- u.metadataHeader,
178
- u.metadataNameLabel,
179
- u.metadataPathLabel,
180
- u.metadataModifiedDateLabel,
181
- u.metadataSizeLabel,
182
- u.metadataAuthorLabel
183
- ]), Q = l({
184
- isDownloading: Ae,
185
- isDeleting: Me,
186
- isRenaming: Fe,
187
- isMoving: j,
188
- isUnsharing: Ve,
189
- isRemovingAccess: Ue
190
- }, u), nt = a(() => {
191
- if (k == null) return "";
192
- let e = k.files.filter((e) => e.status !== n.Uploading).length;
193
- return u.getUploadProgressText(e, k.files.length);
194
- }, [k, u]), $ = a(() => b != null && !y ? {
195
- title: u.searchEmptyStateTitle,
196
- description: ""
197
- } : v.split("/").filter(Boolean).length > 1 ? {
198
- title: u.folderEmptyStateTitle,
188
+ L,
189
+ R,
190
+ z,
191
+ l.metadataHeader,
192
+ l.metadataNameLabel,
193
+ l.metadataPathLabel,
194
+ l.metadataModifiedDateLabel,
195
+ l.metadataSizeLabel,
196
+ l.metadataAuthorLabel
197
+ ]), Z = me({
198
+ isDownloading: Ie,
199
+ isDeleting: Re,
200
+ isRenaming: Ve,
201
+ isMoving: O,
202
+ isUnsharing: qe,
203
+ isRemovingAccess: Ye
204
+ }, l), Q = m === n.Standalone ? "bg-layer-base" : "bg-layer-sunken", $ = i(() => v.split("/").filter(Boolean).length > 1 ? {
205
+ title: l.folderEmptyStateTitle,
199
206
  description: ""
200
- } : u.emptyStateByTab[d], [
201
- b,
202
- y,
207
+ } : l.emptyStateByTab[B], [
203
208
  v,
204
- u.searchEmptyStateTitle,
205
- u.folderEmptyStateTitle,
206
- u.emptyStateByTab,
207
- d
209
+ l.folderEmptyStateTitle,
210
+ l.emptyStateByTab,
211
+ B
208
212
  ]);
209
- return /* @__PURE__ */ s(ce, { children: [
210
- xe == null ? /* @__PURE__ */ s("div", {
211
- className: "relative flex min-h-0 w-full grow overflow-auto bg-layer-sunken",
212
- children: [/* @__PURE__ */ o(le, {
213
- className: "min-h-0 w-full grow bg-layer-sunken",
214
- gridClassName: "size-full",
215
- items: ye,
213
+ return /* @__PURE__ */ o(de, { children: [
214
+ Ce == null ? /* @__PURE__ */ o("div", {
215
+ className: e("relative flex min-h-0 w-full grow overflow-auto", Q),
216
+ children: [/* @__PURE__ */ a(fe, {
217
+ className: e("min-h-0 w-full grow", Q),
218
+ contentClassName: m === n.Attach ? "px-0 pb-0" : void 0,
219
+ gridClassName: m === n.Attach ? "size-full gap-6 px-6 py-4" : "size-full",
220
+ items: xe,
216
221
  path: v,
217
- onPathChange: Se,
218
- onGridApiChange: Ke,
219
- filesLoading: be,
220
- allowedFileTypes: ge,
222
+ onPathChange: we,
223
+ onGridApiChange: $e,
224
+ filesLoading: Se,
225
+ allowedFileTypes: ve,
221
226
  maxSelectableFileSize: h,
222
227
  maxFileSize: h,
223
228
  uploadValidationMessages: g == null ? void 0 : { oversizedFiles: g },
224
- selectedPaths: m,
225
- onSelectedPathsChange: fe,
226
- navigationPanelOptions: { searchable: !0 },
229
+ selectedPaths: p,
230
+ onSelectedPathsChange: he,
231
+ navigationPanelOptions: {
232
+ searchable: !0,
233
+ placeholder: l.searchPlaceholderByTab?.[B]
234
+ },
227
235
  hideSearchPathItemName: !0,
228
- onSearchFiles: we,
229
- searchInProgress: y,
230
- searchResults: b ?? [],
231
- clearSearchResults: Te,
232
- gridOptions: qe,
233
- treeOptions: Je,
234
- onFolderPopupPathChange: w,
235
- toolbarOptions: Ye,
236
- bulkActionsToolbarOptions: Xe,
237
- autoSelectUploadedItems: he,
236
+ onSearchFiles: Ee,
237
+ searchInProgress: De,
238
+ searchResults: Oe ?? [],
239
+ clearSearchResults: ke,
240
+ gridOptions: et,
241
+ treeOptions: tt,
242
+ onFolderPopupPathChange: Ae,
243
+ toolbarOptions: nt,
244
+ bulkActionsToolbarOptions: rt,
245
+ autoSelectUploadedItems: _e,
238
246
  emptyStateTitle: $.title,
239
247
  emptyStateDescription: $.description,
240
- uploadEnabled: M,
241
- sharedWithMeIds: ze,
242
- sharedByMePaths: z,
243
- onUnshareFiles: Be,
244
- onRemoveFilesAccess: He,
245
- fileMetadataPopupOptions: tt,
246
- onGetInfo: We,
247
- onUploadFiles: E,
248
- onUploadArchive: D,
249
- onValidateUpload: O,
250
- onCreateFolder: De,
251
- onCreateFolderValidate: Oe,
252
- onDownloadFiles: ke,
253
- onDeleteFiles: je,
254
- onMoveToFiles: Ne,
255
- onCopyFiles: Ie,
256
- onRenameValidate: Pe,
257
- renameValidationMessages: u.renameValidationMessages,
258
- isRenameFileAvailable: M,
259
- deleteConfirmationOptions: Ze,
260
- conflictResolutionPopupOptions: u.conflictResolutionPopupOptions,
261
- destinationFolderPopupOptions: $e,
248
+ searchEmptyStateTitle: l.searchEmptyStateTitle,
249
+ uploadEnabled: k,
250
+ sharedWithMeIds: Ge,
251
+ sharedByMePaths: I,
252
+ onUnshareFiles: Ke,
253
+ onRemoveFilesAccess: Je,
254
+ fileMetadataPopupOptions: ct,
255
+ onGetInfo: Xe,
256
+ onUploadFiles: C,
257
+ onUploadArchive: je,
258
+ onValidateUpload: Me,
259
+ onCreateFolder: Pe,
260
+ onCreateFolderValidate: Fe,
261
+ onDownloadFiles: D,
262
+ onDeleteFiles: Le,
263
+ onMoveToFiles: ze,
264
+ onCopyFiles: He,
265
+ onRenameValidate: Be,
266
+ renameValidationMessages: l.renameValidationMessages,
267
+ isRenameFileAvailable: k,
268
+ deleteConfirmationOptions: it,
269
+ conflictResolutionPopupOptions: l.conflictResolutionPopupOptions,
270
+ destinationFolderPopupOptions: ot,
262
271
  forbiddenSymbolsRegExp: ie,
263
- forbiddenSymbolsTooltip: u.forbiddenSymbolsTooltip,
264
- getDisabledTooltip: _e,
265
- unsupportedFileTypeTooltip: ve
266
- }), Q != null && /* @__PURE__ */ o("div", {
272
+ forbiddenSymbolsTooltip: l.forbiddenSymbolsTooltip,
273
+ getDisabledTooltip: ye,
274
+ unsupportedFileTypeTooltip: be
275
+ }), Z != null && /* @__PURE__ */ a("div", {
267
276
  "aria-live": "polite",
268
277
  className: "absolute inset-0 z-[52] flex items-center justify-center bg-backdrop desktop:p-4",
269
- children: /* @__PURE__ */ o(ae, {
278
+ children: /* @__PURE__ */ a(oe, {
270
279
  size: 32,
271
280
  fullWidth: !1,
272
- ariaLabel: Q
281
+ ariaLabel: Z
273
282
  })
274
283
  })]
275
- }) : /* @__PURE__ */ s("div", {
284
+ }) : /* @__PURE__ */ o("div", {
276
285
  role: "alert",
277
286
  className: "flex flex-col items-center gap-4 p-6",
278
- children: [/* @__PURE__ */ o("p", { children: u.errorMessage }), /* @__PURE__ */ o(r, {
279
- label: u.retryLabel,
280
- onClick: Ce
287
+ children: [/* @__PURE__ */ a("p", { children: l.errorMessage }), /* @__PURE__ */ a(ae, {
288
+ label: l.retryLabel,
289
+ onClick: Te
281
290
  })]
282
291
  }),
283
- k != null && /* @__PURE__ */ o(re, {
284
- batchState: k,
285
- uploadProgressTitle: u.uploadProgressTitle,
286
- uploadProgressText: nt,
287
- cancelLabel: u.cancelLabel,
288
- onCancel: et
292
+ /* @__PURE__ */ a("div", {
293
+ className: "fixed bottom-4 end-4 z-[70]",
294
+ children: /* @__PURE__ */ a(se, {
295
+ title: l.getUploadQueueTitle(X.length),
296
+ items: X,
297
+ onClose: st,
298
+ onCancelItem: Ne,
299
+ labels: l.uploadQueueLabels
300
+ })
289
301
  }),
290
- (Le || j) && /* @__PURE__ */ o(ne, {
291
- title: j ? u.operationLoaderMoveTitle : u.operationLoaderCopyTitle,
292
- text: j ? u.movingLabel : u.copyingLabel,
293
- cancelLabel: u.operationLoaderCancelLabel,
294
- onCancel: Re
302
+ (Ue || O) && /* @__PURE__ */ a(ne, {
303
+ title: O ? l.operationLoaderMoveTitle : l.operationLoaderCopyTitle,
304
+ text: O ? l.movingLabel : l.copyingLabel,
305
+ cancelLabel: l.operationLoaderCancelLabel,
306
+ onCancel: We
295
307
  })
296
308
  ] });
297
309
  };
298
- i(u);
310
+ r(l);
299
311
  //#endregion
300
- export { u as DialFileManagerShell };
312
+ export { l as DialFileManagerShell };
@@ -1,6 +1,6 @@
1
1
  import { isHiddenPath as e } from "../path.js";
2
2
  import { DialFileManagerShell as t } from "../DialFileManagerShell/DialFileManagerShell.js";
3
- import { Popup as n, PopupSize as r, PrimaryButton as i } from "@epam/ai-dial-ui-kit";
3
+ import { ButtonVariant as n, Popup as r, PopupSize as i } from "@epam/ai-dial-ui-kit";
4
4
  import { memo as a, useCallback as o, useMemo as s } from "react";
5
5
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
6
  import { DialFileNodeType as u } from "@epam/ai-dial-react-file-manager";
@@ -60,27 +60,30 @@ var d = a(({ isOpen: a, onClose: d, onAttach: f, onSkippedUnsupportedFiles: p, o
60
60
  z,
61
61
  T
62
62
  ]), { title: U, attachLabel: W, headerDescription: G, ...K } = b;
63
- return /* @__PURE__ */ c(n, {
63
+ return /* @__PURE__ */ c(r, {
64
64
  open: a,
65
- header: /* @__PURE__ */ l("div", {
66
- className: "flex flex-col gap-1",
67
- children: [/* @__PURE__ */ c("span", { children: U }), G != null && /* @__PURE__ */ c("p", {
65
+ header: G == null ? U : /* @__PURE__ */ l("div", {
66
+ className: "flex min-w-0 flex-1 flex-col gap-1",
67
+ children: [/* @__PURE__ */ c("h3", {
68
+ className: "dial-h1-text truncate text-primary",
69
+ children: U
70
+ }), /* @__PURE__ */ c("p", {
68
71
  className: "dial-small-text text-start",
69
72
  children: G
70
73
  })]
71
74
  }),
72
75
  ariaLabel: U,
73
- size: r.Lg,
76
+ size: i.Lg,
74
77
  className: "flex !h-[min(800px,100dvh)] w-full flex-col !bg-layer-sunken",
78
+ headerClassName: "pb-0",
79
+ footerClassName: "pt-0",
75
80
  onClose: d,
76
- footer: /* @__PURE__ */ c("div", {
77
- className: "flex justify-end px-6 py-4",
78
- children: /* @__PURE__ */ c(i, {
79
- label: W,
80
- disabled: B.length === 0 || L || g,
81
- onClick: H
82
- })
83
- }),
81
+ mainButtons: [{
82
+ label: W,
83
+ variant: n.Primary,
84
+ disabled: B.length === 0 || L || g,
85
+ onClick: H
86
+ }],
84
87
  children: /* @__PURE__ */ c("div", {
85
88
  className: "flex h-full min-h-0 flex-col",
86
89
  children: /* @__PURE__ */ c(t, {