@epam/ai-dial-chat-shared 1.2.0-dev.15 → 1.2.0-dev.152

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