@epam/ai-dial-chat-shared 1.2.0-dev.12 → 1.2.0-dev.120

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 (31) 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 +74 -56
  8. package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
  9. package/components/MarkdownRenderer/Table/table-serialization.js +23 -3
  10. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.js +48 -62
  11. package/components/MarkdownRenderer/ThinkingShimmer.js +14 -0
  12. package/constants/mime-types.js +49 -2
  13. package/constants/public-class-names.js +10 -0
  14. package/constants/resizable-fields.js +1 -1
  15. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +160 -159
  16. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +23 -22
  17. package/file-manager/UploadProgressModal/UploadProgressModal.js +26 -32
  18. package/file-manager.d.ts +10 -6
  19. package/hooks/useTextRefinement.js +66 -0
  20. package/index.css +2 -2
  21. package/index.d.ts +209 -10
  22. package/index.js +59 -56
  23. package/markdown.d.ts +61 -8
  24. package/markdown.js +13 -11
  25. package/package.json +3 -3
  26. package/types/attachment.js +1 -1
  27. package/utils/file-download.js +6 -6
  28. package/utils/is-skill-selection-unsupported.js +4 -0
  29. package/utils/latex.js +5 -3
  30. package/utils/merge-class.js +5 -4
  31. 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,202 @@ 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: { label: u.uploadFilesLabel },
99
+ newFolder: { label: u.newFolderLabel },
100
+ ...Y ? { uploadArchive: { label: u.uploadArchiveAction } } : {}
99
101
  }
100
102
  }), [
101
- m,
102
- p,
103
- h,
104
- f.hiddenFilesLabel,
105
- f.showHiddenFilesLabel,
106
- f.hideHiddenFilesLabel,
103
+ u.hiddenFilesLabel,
104
+ u.showHiddenFilesLabel,
105
+ u.hideHiddenFilesLabel,
107
106
  N,
108
107
  P,
109
- f.uploadFilesLabel,
110
- f.newFolderLabel,
108
+ u.uploadFilesLabel,
109
+ u.newFolderLabel,
111
110
  Y,
112
- f.uploadArchiveAction
113
- ]), Ye = a(() => ({
114
- getSelectionLabel: f.getSelectionLabel,
111
+ u.uploadArchiveAction
112
+ ]), Xe = a(() => ({
113
+ getSelectionLabel: u.getSelectionLabel,
115
114
  actionLabels: J
116
- }), [f.getSelectionLabel, J]), Xe = a(() => ({
117
- cancelLabel: f.deleteCancelLabel,
118
- confirmLabel: f.deleteConfirmLabel,
119
- titleRenderer: f.deleteConfirmTitle,
120
- contentRenderer: f.deleteConfirmBody
115
+ }), [u.getSelectionLabel, J]), Ze = a(() => ({
116
+ cancelLabel: u.deleteCancelLabel,
117
+ confirmLabel: u.deleteConfirmLabel,
118
+ titleRenderer: u.deleteConfirmTitle,
119
+ contentRenderer: u.deleteConfirmBody
121
120
  }), [
122
- f.deleteCancelLabel,
123
- f.deleteConfirmLabel,
124
- f.deleteConfirmTitle,
125
- f.deleteConfirmBody
126
- ]), Ze = a(() => {
121
+ u.deleteCancelLabel,
122
+ u.deleteConfirmLabel,
123
+ u.deleteConfirmTitle,
124
+ u.deleteConfirmBody
125
+ ]), Qe = a(() => {
127
126
  let e;
128
- for (let t of g) {
127
+ for (let t of m) {
129
128
  let n = ee(t);
130
129
  if (e === void 0) e = n;
131
130
  else if (e !== n) return;
132
131
  }
133
132
  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,
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,
144
143
  sourceFolder: Z,
145
144
  destinationFolderPath: U,
146
- setDestinationFolderPath: We,
145
+ setDestinationFolderPath: Ge,
147
146
  filesLoading: X
148
147
  }), [
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,
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,
159
158
  X,
160
159
  Z,
161
160
  U
162
- ]), $e = () => {
163
- Te(), A();
164
- }, et = a(() => ({
161
+ ]), et = () => {
162
+ A(), Ee();
163
+ }, tt = a(() => ({
165
164
  fileMetadata: B,
166
165
  loading: V,
167
166
  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
167
+ header: u.metadataHeader,
168
+ nameLabel: u.metadataNameLabel,
169
+ pathLabel: u.metadataPathLabel,
170
+ modifiedDateLabel: u.metadataModifiedDateLabel,
171
+ sizeLabel: u.metadataSizeLabel,
172
+ authorLabel: u.metadataAuthorLabel
174
173
  }), [
175
174
  B,
176
175
  V,
177
176
  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,
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,
188
187
  isMoving: j,
189
- isUnsharing: Be,
190
- isRemovingAccess: He
191
- }, f), tt = a(() => {
188
+ isUnsharing: Ve,
189
+ isRemovingAccess: Ue
190
+ }, u), nt = a(() => {
192
191
  if (k == null) return "";
193
192
  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,
193
+ return u.getUploadProgressText(e, k.files.length);
194
+ }, [k, u]), $ = a(() => b != null && !y ? {
195
+ title: u.searchEmptyStateTitle,
197
196
  description: ""
198
197
  } : v.split("/").filter(Boolean).length > 1 ? {
199
- title: f.folderEmptyStateTitle,
198
+ title: u.folderEmptyStateTitle,
200
199
  description: ""
201
- } : f.emptyStateByTab[p], [
200
+ } : u.emptyStateByTab[d], [
202
201
  b,
203
202
  y,
204
203
  v,
205
- f.searchEmptyStateTitle,
206
- f.folderEmptyStateTitle,
207
- f.emptyStateByTab,
208
- p
204
+ u.searchEmptyStateTitle,
205
+ u.folderEmptyStateTitle,
206
+ u.emptyStateByTab,
207
+ d
209
208
  ]);
210
209
  return /* @__PURE__ */ s(ce, { children: [
211
- be == null ? /* @__PURE__ */ s("div", {
210
+ xe == null ? /* @__PURE__ */ s("div", {
212
211
  className: "relative flex min-h-0 w-full grow overflow-auto bg-layer-sunken",
213
212
  children: [/* @__PURE__ */ o(le, {
214
213
  className: "min-h-0 w-full grow bg-layer-sunken",
215
214
  gridClassName: "size-full",
216
- items: ve,
215
+ items: ye,
217
216
  path: v,
218
- onPathChange: xe,
219
- onGridApiChange: Ge,
220
- filesLoading: ye,
221
- allowedFileTypes: me,
222
- maxSelectableFileSize: he,
223
- selectedPaths: g,
224
- onSelectedPathsChange: ue,
217
+ onPathChange: Se,
218
+ onGridApiChange: Ke,
219
+ filesLoading: be,
220
+ allowedFileTypes: ge,
221
+ maxSelectableFileSize: h,
222
+ maxFileSize: h,
223
+ uploadValidationMessages: g == null ? void 0 : { oversizedFiles: g },
224
+ selectedPaths: m,
225
+ onSelectedPathsChange: fe,
225
226
  navigationPanelOptions: { searchable: !0 },
226
227
  hideSearchPathItemName: !0,
227
- onSearchFiles: Ce,
228
+ onSearchFiles: we,
228
229
  searchInProgress: y,
229
230
  searchResults: b ?? [],
230
- clearSearchResults: we,
231
- gridOptions: Ke,
232
- treeOptions: qe,
231
+ clearSearchResults: Te,
232
+ gridOptions: qe,
233
+ treeOptions: Je,
233
234
  onFolderPopupPathChange: w,
234
- toolbarOptions: Je,
235
- bulkActionsToolbarOptions: Ye,
236
- autoSelectUploadedItems: pe,
235
+ toolbarOptions: Ye,
236
+ bulkActionsToolbarOptions: Xe,
237
+ autoSelectUploadedItems: he,
237
238
  emptyStateTitle: $.title,
238
239
  emptyStateDescription: $.description,
239
240
  uploadEnabled: M,
240
- sharedWithMeIds: Re,
241
+ sharedWithMeIds: ze,
241
242
  sharedByMePaths: z,
242
- onUnshareFiles: ze,
243
- onRemoveFilesAccess: Ve,
244
- fileMetadataPopupOptions: et,
245
- onGetInfo: Ue,
243
+ onUnshareFiles: Be,
244
+ onRemoveFilesAccess: He,
245
+ fileMetadataPopupOptions: tt,
246
+ onGetInfo: We,
246
247
  onUploadFiles: E,
247
248
  onUploadArchive: D,
248
249
  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,
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,
257
258
  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
259
+ deleteConfirmationOptions: Ze,
260
+ conflictResolutionPopupOptions: u.conflictResolutionPopupOptions,
261
+ destinationFolderPopupOptions: $e,
262
+ forbiddenSymbolsRegExp: ie,
263
+ forbiddenSymbolsTooltip: u.forbiddenSymbolsTooltip,
264
+ getDisabledTooltip: _e,
265
+ unsupportedFileTypeTooltip: ve
265
266
  }), Q != null && /* @__PURE__ */ o("div", {
266
267
  "aria-live": "polite",
267
268
  className: "absolute inset-0 z-[52] flex items-center justify-center bg-backdrop desktop:p-4",
@@ -274,26 +275,26 @@ var d = (e, t) => {
274
275
  }) : /* @__PURE__ */ s("div", {
275
276
  role: "alert",
276
277
  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
278
+ children: [/* @__PURE__ */ o("p", { children: u.errorMessage }), /* @__PURE__ */ o(r, {
279
+ label: u.retryLabel,
280
+ onClick: Ce
280
281
  })]
281
282
  }),
282
283
  k != null && /* @__PURE__ */ o(re, {
283
284
  batchState: k,
284
- uploadProgressTitle: f.uploadProgressTitle,
285
- uploadProgressText: tt,
286
- cancelLabel: f.cancelLabel,
287
- onCancel: $e
285
+ uploadProgressTitle: u.uploadProgressTitle,
286
+ uploadProgressText: nt,
287
+ cancelLabel: u.cancelLabel,
288
+ onCancel: et
288
289
  }),
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
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
294
295
  })
295
296
  ] });
296
297
  };
297
- i(f);
298
+ i(u);
298
299
  //#endregion
299
- export { f as DialFileManagerShell };
300
+ export { u as DialFileManagerShell };
@@ -5,38 +5,38 @@ 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,44 @@ 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;
62
+ ]), { title: U, attachLabel: W, headerDescription: G, ...K } = b;
63
63
  return /* @__PURE__ */ c(n, {
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,
72
+ ariaLabel: U,
73
73
  size: r.Lg,
74
74
  className: "flex !h-[min(800px,100dvh)] w-full flex-col !bg-layer-sunken",
75
75
  onClose: d,
76
76
  footer: /* @__PURE__ */ c("div", {
77
77
  className: "flex justify-end px-6 py-4",
78
78
  children: /* @__PURE__ */ c(i, {
79
- label: U,
80
- disabled: z.length === 0 || I || g,
81
- onClick: V
79
+ label: W,
80
+ disabled: B.length === 0 || L || g,
81
+ onClick: H
82
82
  })
83
83
  }),
84
84
  children: /* @__PURE__ */ c("div", {
85
- className: "flex min-h-0 flex-col",
85
+ className: "flex h-full min-h-0 flex-col",
86
86
  children: /* @__PURE__ */ c(t, {
87
87
  controller: h,
88
- labels: G,
88
+ labels: K,
89
89
  activeTab: _,
90
90
  tabs: v,
91
91
  onTabChange: y,
92
92
  selectedPaths: C,
93
- onSelectedPathsChange: B,
93
+ onSelectedPathsChange: V,
94
94
  variant: x,
95
95
  actionProfile: S,
96
96
  autoSelectUploadedItems: P,
@@ -98,7 +98,8 @@ var d = a(({ isOpen: a, onClose: d, onAttach: f, onSkippedUnsupportedFiles: p, o
98
98
  maxSelectableFileSize: D,
99
99
  isRowSelectable: A,
100
100
  getDisabledTooltip: j,
101
- unsupportedFileTypeTooltip: M
101
+ unsupportedFileTypeTooltip: M,
102
+ oversizedUploadMessage: F
102
103
  })
103
104
  })
104
105
  });
@@ -1,56 +1,50 @@
1
- import { DialFileName as e, NeutralButton as t, Popup as n } from "@epam/ai-dial-ui-kit";
2
- import { memo as r, useCallback as i } from "react";
3
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
1
+ import { DialFileName as e, ElementSize as t, NeutralButton as n, Popup as r, ProgressBar as i } from "@epam/ai-dial-ui-kit";
2
+ import { memo as a, useCallback as o } from "react";
3
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
4
  //#region src/file-manager/UploadProgressModal/UploadProgressModal.tsx
5
- var s = ({ batchState: r, uploadProgressTitle: s, uploadProgressText: c, cancelLabel: l, onCancel: u }) => {
6
- let { files: d } = r, f = i((e) => e === void 0 ? null : /* @__PURE__ */ a("div", {
7
- className: "h-1 w-full overflow-hidden rounded-full bg-control-disable-primary",
8
- "data-qa": "uploading-indicator",
9
- role: "progressbar",
10
- "aria-valuemin": 0,
11
- "aria-valuemax": 100,
12
- "aria-valuenow": e,
13
- children: /* @__PURE__ */ a("div", {
14
- className: "h-full rounded-full bg-control-accent transition-all duration-300",
15
- style: { width: `${e}%` }
16
- })
5
+ var l = ({ batchState: a, uploadProgressTitle: l, uploadProgressText: u, cancelLabel: d, onCancel: f }) => {
6
+ let { files: p } = a, m = o((e, n) => n === void 0 ? null : /* @__PURE__ */ s(i, {
7
+ value: n,
8
+ size: t.Small,
9
+ "aria-label": e,
10
+ "data-qa": "uploading-indicator"
17
11
  }), []);
18
- return /* @__PURE__ */ a(n, {
12
+ return /* @__PURE__ */ s(r, {
19
13
  className: "!h-fit !max-h-full !w-[400px] mobile:!w-full desktop:!max-h-[693px]",
20
- open: r.isOpen,
14
+ open: a.isOpen,
21
15
  closeOnOutsideClick: !1,
22
16
  hideClose: !0,
23
- onClose: u,
24
- footer: /* @__PURE__ */ a("div", {
17
+ onClose: f,
18
+ footer: /* @__PURE__ */ s("div", {
25
19
  className: "flex justify-end gap-2 px-6 py-4",
26
- children: /* @__PURE__ */ a(t, {
27
- label: l,
28
- onClick: u
20
+ children: /* @__PURE__ */ s(n, {
21
+ label: d,
22
+ onClick: f
29
23
  })
30
24
  }),
31
- header: /* @__PURE__ */ o("div", {
25
+ header: /* @__PURE__ */ c("div", {
32
26
  className: "flex flex-col gap-2",
33
- children: [/* @__PURE__ */ a("div", { children: s }), /* @__PURE__ */ a("div", {
27
+ children: [/* @__PURE__ */ s("div", { children: l }), /* @__PURE__ */ s("div", {
34
28
  className: "dial-small-text text-secondary",
35
29
  "data-qa": "uploading-items-count",
36
- children: c
30
+ children: u
37
31
  })]
38
32
  }),
39
- children: /* @__PURE__ */ a("div", {
33
+ children: /* @__PURE__ */ s("div", {
40
34
  className: "flex h-full max-h-full flex-col gap-4 px-6",
41
- children: /* @__PURE__ */ a("div", {
35
+ children: /* @__PURE__ */ s("div", {
42
36
  className: "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto",
43
- children: d.map((t) => /* @__PURE__ */ a("div", {
37
+ children: p.map((t) => /* @__PURE__ */ s("div", {
44
38
  className: "rounded bg-layer-sunken px-3 py-2",
45
- children: /* @__PURE__ */ a(e, {
39
+ children: /* @__PURE__ */ s(e, {
46
40
  name: t.name,
47
- details: f(t.percent)
41
+ details: m(t.name, t.percent)
48
42
  })
49
43
  }, t.id))
50
44
  })
51
45
  })
52
46
  });
53
47
  };
54
- r(s);
48
+ a(l);
55
49
  //#endregion
56
- export { s as UploadProgressModal };
50
+ export { l as UploadProgressModal };