@epam/ai-dial-chat-shared 1.2.0-dev.61 → 1.2.0-dev.72

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.
@@ -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,203 @@ 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
72
  expandedPaths: x,
73
73
  loadedPaths: S,
74
74
  loadingPaths: T,
75
75
  onExpandedPathsChange: C,
76
76
  actionLabels: G
77
77
  }), [
78
- f.treeHeaderByTab,
79
- p,
78
+ u.treeHeaderByTab,
79
+ d,
80
80
  x,
81
81
  S,
82
82
  T,
83
83
  C,
84
84
  G
85
- ]), Y = de === t.Standalone && fe === e.Full && p === l.MyFiles && M, Je = a(() => ({
86
- tabs: m,
87
- activeTab: p,
88
- onTabChange: h,
85
+ ]), Y = pe === t.Standalone && me === e.Full && d === ue.MyFiles && M, Ye = a(() => ({
86
+ tabs: f,
87
+ activeTab: d,
88
+ onTabChange: p,
89
89
  showHiddenFilesToggle: !0,
90
- hiddenFilesSwitcherLabel: f.hiddenFilesLabel,
91
- showHiddenFilesLabel: f.showHiddenFilesLabel,
92
- hideHiddenFilesLabel: f.hideHiddenFilesLabel,
90
+ hiddenFilesSwitcherLabel: u.hiddenFilesLabel,
91
+ showHiddenFilesLabel: u.showHiddenFilesLabel,
92
+ hideHiddenFilesLabel: u.hideHiddenFilesLabel,
93
93
  isNewButtonDisabled: N,
94
94
  disabledNewButtonTooltip: P,
95
95
  newActions: {
96
- uploadFiles: { label: f.uploadFilesLabel },
97
- newFolder: { label: f.newFolderLabel },
98
- ...Y ? { uploadArchive: { label: f.uploadArchiveAction } } : {}
96
+ uploadFiles: { label: u.uploadFilesLabel },
97
+ newFolder: { label: u.newFolderLabel },
98
+ ...Y ? { uploadArchive: { label: u.uploadArchiveAction } } : {}
99
99
  }
100
100
  }), [
101
- m,
101
+ f,
102
+ d,
102
103
  p,
103
- h,
104
- f.hiddenFilesLabel,
105
- f.showHiddenFilesLabel,
106
- f.hideHiddenFilesLabel,
104
+ u.hiddenFilesLabel,
105
+ u.showHiddenFilesLabel,
106
+ u.hideHiddenFilesLabel,
107
107
  N,
108
108
  P,
109
- f.uploadFilesLabel,
110
- f.newFolderLabel,
109
+ u.uploadFilesLabel,
110
+ u.newFolderLabel,
111
111
  Y,
112
- f.uploadArchiveAction
113
- ]), Ye = a(() => ({
114
- getSelectionLabel: f.getSelectionLabel,
112
+ u.uploadArchiveAction
113
+ ]), Xe = a(() => ({
114
+ getSelectionLabel: u.getSelectionLabel,
115
115
  actionLabels: J
116
- }), [f.getSelectionLabel, J]), Xe = a(() => ({
117
- cancelLabel: f.deleteCancelLabel,
118
- confirmLabel: f.deleteConfirmLabel,
119
- titleRenderer: f.deleteConfirmTitle,
120
- contentRenderer: f.deleteConfirmBody
116
+ }), [u.getSelectionLabel, J]), Ze = a(() => ({
117
+ cancelLabel: u.deleteCancelLabel,
118
+ confirmLabel: u.deleteConfirmLabel,
119
+ titleRenderer: u.deleteConfirmTitle,
120
+ contentRenderer: u.deleteConfirmBody
121
121
  }), [
122
- f.deleteCancelLabel,
123
- f.deleteConfirmLabel,
124
- f.deleteConfirmTitle,
125
- f.deleteConfirmBody
126
- ]), Ze = a(() => {
122
+ u.deleteCancelLabel,
123
+ u.deleteConfirmLabel,
124
+ u.deleteConfirmTitle,
125
+ u.deleteConfirmBody
126
+ ]), Qe = a(() => {
127
127
  let e;
128
- for (let t of g) {
128
+ for (let t of m) {
129
129
  let n = ee(t);
130
130
  if (e === void 0) e = n;
131
131
  else if (e !== n) return;
132
132
  }
133
133
  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,
134
+ }, [m]), X = U != null && T.has(U), Z = X ? U : Qe, $e = a(() => ({
135
+ copyLabel: u.copyLabel,
136
+ moveLabel: u.moveLabel,
137
+ addFolderLabel: u.addFolderLabel,
138
+ hiddenFilesSwitcherLabel: u.hiddenFilesSwitcherLabel,
139
+ getCopyHeader: u.getCopyHeader,
140
+ getMoveHeader: u.getMoveHeader,
141
+ disabledPathTooltip: X ? u.folderPickerLoadingTooltip : u.moveSourceDisabledTooltip,
142
+ emptyStateTitle: u.folderPickerEmptyStateTitle,
143
+ emptyStateDescription: u.folderPickerEmptyStateDescription,
144
144
  sourceFolder: Z,
145
145
  destinationFolderPath: U,
146
- setDestinationFolderPath: We,
146
+ setDestinationFolderPath: Ge,
147
147
  filesLoading: X
148
148
  }), [
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,
149
+ u.copyLabel,
150
+ u.moveLabel,
151
+ u.addFolderLabel,
152
+ u.hiddenFilesSwitcherLabel,
153
+ u.getCopyHeader,
154
+ u.getMoveHeader,
155
+ u.folderPickerLoadingTooltip,
156
+ u.moveSourceDisabledTooltip,
157
+ u.folderPickerEmptyStateTitle,
158
+ u.folderPickerEmptyStateDescription,
159
159
  X,
160
160
  Z,
161
161
  U
162
- ]), $e = () => {
163
- Te(), A();
164
- }, et = a(() => ({
162
+ ]), et = () => {
163
+ A(), Ee();
164
+ }, tt = a(() => ({
165
165
  fileMetadata: B,
166
166
  loading: V,
167
167
  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
168
+ header: u.metadataHeader,
169
+ nameLabel: u.metadataNameLabel,
170
+ pathLabel: u.metadataPathLabel,
171
+ modifiedDateLabel: u.metadataModifiedDateLabel,
172
+ sizeLabel: u.metadataSizeLabel,
173
+ authorLabel: u.metadataAuthorLabel
174
174
  }), [
175
175
  B,
176
176
  V,
177
177
  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,
178
+ u.metadataHeader,
179
+ u.metadataNameLabel,
180
+ u.metadataPathLabel,
181
+ u.metadataModifiedDateLabel,
182
+ u.metadataSizeLabel,
183
+ u.metadataAuthorLabel
184
+ ]), Q = l({
185
+ isDownloading: Ae,
186
+ isDeleting: Me,
187
+ isRenaming: Fe,
188
188
  isMoving: j,
189
- isUnsharing: Be,
190
- isRemovingAccess: He
191
- }, f), tt = a(() => {
189
+ isUnsharing: Ve,
190
+ isRemovingAccess: Ue
191
+ }, u), nt = a(() => {
192
192
  if (k == null) return "";
193
193
  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,
194
+ return u.getUploadProgressText(e, k.files.length);
195
+ }, [k, u]), $ = a(() => b != null && !y ? {
196
+ title: u.searchEmptyStateTitle,
197
197
  description: ""
198
198
  } : v.split("/").filter(Boolean).length > 1 ? {
199
- title: f.folderEmptyStateTitle,
199
+ title: u.folderEmptyStateTitle,
200
200
  description: ""
201
- } : f.emptyStateByTab[p], [
201
+ } : u.emptyStateByTab[d], [
202
202
  b,
203
203
  y,
204
204
  v,
205
- f.searchEmptyStateTitle,
206
- f.folderEmptyStateTitle,
207
- f.emptyStateByTab,
208
- p
205
+ u.searchEmptyStateTitle,
206
+ u.folderEmptyStateTitle,
207
+ u.emptyStateByTab,
208
+ d
209
209
  ]);
210
210
  return /* @__PURE__ */ s(ce, { children: [
211
- be == null ? /* @__PURE__ */ s("div", {
211
+ xe == null ? /* @__PURE__ */ s("div", {
212
212
  className: "relative flex min-h-0 w-full grow overflow-auto bg-layer-sunken",
213
213
  children: [/* @__PURE__ */ o(le, {
214
214
  className: "min-h-0 w-full grow bg-layer-sunken",
215
215
  gridClassName: "size-full",
216
- items: ve,
216
+ items: ye,
217
217
  path: v,
218
- onPathChange: xe,
219
- onGridApiChange: Ge,
220
- filesLoading: ye,
221
- allowedFileTypes: me,
222
- maxSelectableFileSize: he,
223
- selectedPaths: g,
224
- onSelectedPathsChange: ue,
218
+ onPathChange: Se,
219
+ onGridApiChange: Ke,
220
+ filesLoading: be,
221
+ allowedFileTypes: ge,
222
+ maxSelectableFileSize: h,
223
+ maxFileSize: h,
224
+ uploadValidationMessages: g == null ? void 0 : { oversizedFiles: g },
225
+ selectedPaths: m,
226
+ onSelectedPathsChange: fe,
225
227
  navigationPanelOptions: { searchable: !0 },
226
228
  hideSearchPathItemName: !0,
227
- onSearchFiles: Ce,
229
+ onSearchFiles: we,
228
230
  searchInProgress: y,
229
231
  searchResults: b ?? [],
230
- clearSearchResults: we,
231
- gridOptions: Ke,
232
- treeOptions: qe,
232
+ clearSearchResults: Te,
233
+ gridOptions: qe,
234
+ treeOptions: Je,
233
235
  onFolderPopupPathChange: w,
234
- toolbarOptions: Je,
235
- bulkActionsToolbarOptions: Ye,
236
- autoSelectUploadedItems: pe,
236
+ toolbarOptions: Ye,
237
+ bulkActionsToolbarOptions: Xe,
238
+ autoSelectUploadedItems: he,
237
239
  emptyStateTitle: $.title,
238
240
  emptyStateDescription: $.description,
239
241
  uploadEnabled: M,
240
- sharedWithMeIds: Re,
242
+ sharedWithMeIds: ze,
241
243
  sharedByMePaths: z,
242
- onUnshareFiles: ze,
243
- onRemoveFilesAccess: Ve,
244
- fileMetadataPopupOptions: et,
245
- onGetInfo: Ue,
244
+ onUnshareFiles: Be,
245
+ onRemoveFilesAccess: He,
246
+ fileMetadataPopupOptions: tt,
247
+ onGetInfo: We,
246
248
  onUploadFiles: E,
247
249
  onUploadArchive: D,
248
250
  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,
251
+ onCreateFolder: De,
252
+ onCreateFolderValidate: Oe,
253
+ onDownloadFiles: ke,
254
+ onDeleteFiles: je,
255
+ onMoveToFiles: Ne,
256
+ onCopyFiles: Ie,
257
+ onRenameValidate: Pe,
258
+ renameValidationMessages: u.renameValidationMessages,
257
259
  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
260
+ deleteConfirmationOptions: Ze,
261
+ conflictResolutionPopupOptions: u.conflictResolutionPopupOptions,
262
+ destinationFolderPopupOptions: $e,
263
+ forbiddenSymbolsRegExp: ie,
264
+ forbiddenSymbolsTooltip: u.forbiddenSymbolsTooltip,
265
+ getDisabledTooltip: _e,
266
+ unsupportedFileTypeTooltip: ve
265
267
  }), Q != null && /* @__PURE__ */ o("div", {
266
268
  "aria-live": "polite",
267
269
  className: "absolute inset-0 z-[52] flex items-center justify-center bg-backdrop desktop:p-4",
@@ -274,26 +276,26 @@ var d = (e, t) => {
274
276
  }) : /* @__PURE__ */ s("div", {
275
277
  role: "alert",
276
278
  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
279
+ children: [/* @__PURE__ */ o("p", { children: u.errorMessage }), /* @__PURE__ */ o(r, {
280
+ label: u.retryLabel,
281
+ onClick: Ce
280
282
  })]
281
283
  }),
282
284
  k != null && /* @__PURE__ */ o(re, {
283
285
  batchState: k,
284
- uploadProgressTitle: f.uploadProgressTitle,
285
- uploadProgressText: tt,
286
- cancelLabel: f.cancelLabel,
287
- onCancel: $e
286
+ uploadProgressTitle: u.uploadProgressTitle,
287
+ uploadProgressText: nt,
288
+ cancelLabel: u.cancelLabel,
289
+ onCancel: et
288
290
  }),
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
291
+ (Le || j) && /* @__PURE__ */ o(ne, {
292
+ title: j ? u.operationLoaderMoveTitle : u.operationLoaderCopyTitle,
293
+ text: j ? u.movingLabel : u.copyingLabel,
294
+ cancelLabel: u.operationLoaderCancelLabel,
295
+ onCancel: Re
294
296
  })
295
297
  ] });
296
298
  };
297
- i(f);
299
+ i(u);
298
300
  //#endregion
299
- export { f as DialFileManagerShell };
301
+ 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
85
  className: "flex 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
  });
package/file-manager.d.ts CHANGED
@@ -190,8 +190,10 @@ export declare interface DialFileManagerShellProps {
190
190
  autoSelectUploadedItems?: boolean;
191
191
  /** MIME type filters for selectable files. */
192
192
  allowedFileTypes?: DialFileAcceptType[];
193
- /** Maximum file size in bytes for selectable files. */
193
+ /** Maximum file size in bytes for selectable files, and — reused as the ui-kit's own `maxFileSize` — the maximum size accepted for a newly-uploaded file. */
194
194
  maxSelectableFileSize?: number;
195
+ /** Pre-translated message shown by the ui-kit when a newly-selected file exceeds `maxSelectableFileSize`. Omit to leave upload-size validation unrestricted regardless of `maxSelectableFileSize`. */
196
+ oversizedUploadMessage?: string;
195
197
  /** Custom row-selectability predicate, forwarded to the grid's row selection. */
196
198
  isRowSelectable?: (node: {
197
199
  data?: FileManagerSelectableNode | null;
@@ -316,6 +318,8 @@ export declare interface FileManagerAttachModalProps {
316
318
  allowedFileTypes?: DialFileAcceptType[];
317
319
  /** Whether to auto-select items immediately after upload. Defaults to `false`. */
318
320
  autoSelectUploadedItems?: boolean;
321
+ /** Pre-translated message shown by the ui-kit when a newly-selected file exceeds `maxSelectableFileSize`. Omit to leave upload-size validation unrestricted regardless of `maxSelectableFileSize`. */
322
+ oversizedUploadMessage?: string;
319
323
  }
320
324
 
321
325
  /**
package/index.d.ts CHANGED
@@ -140,7 +140,9 @@ export declare enum AttachmentErrorReason {
140
140
  /** Upload failed because the device was offline. */
141
141
  Network = "network",
142
142
  /** File MIME type is not in the deployment's inputAttachmentTypes list. */
143
- UnsupportedType = "unsupported-type"
143
+ UnsupportedType = "unsupported-type",
144
+ /** File size exceeds the configured maximum attachment size. */
145
+ FileTooLarge = "file-too-large"
144
146
  }
145
147
 
146
148
  /** A file attachment referenced by a citation — same shape as `MessageAttachment` but scoped to annotations. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-shared",
3
3
  "description": "Shared domain models, utilities, and UI components for AI DIAL Chat libraries",
4
- "version": "1.2.0-dev.61",
4
+ "version": "1.2.0-dev.72",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  //#region src/types/attachment.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
- return e.Network = "network", e.UnsupportedType = "unsupported-type", e;
3
+ return e.Network = "network", e.UnsupportedType = "unsupported-type", e.FileTooLarge = "file-too-large", e;
4
4
  }({}), t = /* @__PURE__ */ function(e) {
5
5
  return e.File = "file", e.Image = "image", e.Audio = "audio", e.Prompt = "prompt", e.Pasted = "pasted", e.Link = "link", e;
6
6
  }({});