@epam/ai-dial-chat-shared 1.3.0-dev.246 → 1.3.0-dev.249

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,365 +4,372 @@ import { DialFileManagerActionProfile as n, DialFileManagerVariant as r } from "
4
4
  import { getParentFolderPath as ee } from "../path.js";
5
5
  import { useGridEditingScroll as te } from "../useGridEditingScroll/useGridEditingScroll.js";
6
6
  import { OperationLoaderModal as ne } from "../OperationLoaderModal/OperationLoaderModal.js";
7
- import { TransferQueueRowKind as i, buildTransferQueueLabels as re, parseTransferQueueRowId as ie, toTransferQueueItems as ae } from "../upload-queue.js";
8
- import a from "./DialFileManagerShell.module.scss.js";
9
- import { Button as oe, ButtonAppearance as se, ButtonVariant as o, ElementSize as ce, ErrorMessageNotification as le, NOT_ALLOWED_SYMBOLS_REGEXP as ue, Spinner as de, TransferQueue as fe } from "@epam/ai-dial-ui-kit";
10
- import { memo as s, useCallback as c, useEffect as pe, useMemo as l, useState as me } from "react";
11
- import { Fragment as he, jsx as u, jsxs as d } from "react/jsx-runtime";
12
- import { DialFileManager as ge, DialFileManagerActions as f, DialFileManagerTabs as _e, GridSelectionMode as ve } from "@epam/ai-dial-react-file-manager";
7
+ import { TransferQueueRowKind as re, buildTransferQueueLabels as ie, parseTransferQueueRowId as ae, toTransferQueueItems as oe } from "../upload-queue.js";
8
+ import i from "./DialFileManagerShell.module.scss.js";
9
+ import { Button as se, ButtonAppearance as ce, ButtonVariant as a, ElementSize as le, ErrorMessageNotification as ue, LiveRegion as de, LiveRegionElement as fe, NOT_ALLOWED_SYMBOLS_REGEXP as pe, Spinner as me, TransferQueue as he } from "@epam/ai-dial-ui-kit";
10
+ import { memo as o, useCallback as s, useEffect as ge, useMemo as c, useState as _e } from "react";
11
+ import { Fragment as ve, jsx as l, jsxs as u } from "react/jsx-runtime";
12
+ import { DialFileManager as ye, DialFileManagerActions as d, DialFileManagerTabs as be, GridSelectionMode as xe } from "@epam/ai-dial-react-file-manager";
13
13
  //#region src/file-manager/DialFileManagerShell/DialFileManagerShell.tsx
14
- var ye = (e, t) => {
14
+ var Se = (e, t) => {
15
15
  if (e.isDeleting) return t.deletingLabel;
16
16
  if (e.isRenaming && !e.isMoving) return t.renamingLabel;
17
17
  if (e.isUnsharing) return t.unsharingLabel;
18
18
  if (e.isRemovingAccess) return t.removingAccessLabel;
19
- }, p = ({ controller: s, labels: p, activeTab: m, tabs: h, onTabChange: g, selectedPaths: _, onSelectedPathsChange: be, variant: v, actionProfile: xe, autoSelectUploadedItems: Se = !1, allowedFileTypes: Ce, maxSelectableFileSize: y, oversizedUploadMessage: b, isRowSelectable: x, getDisabledTooltip: we, unsupportedFileTypeTooltip: Te, treeContainerClassName: S, onPreview: Ee, onTableFileClick: De, previewExtensions: Oe, styles: ke }) => {
20
- let { items: Ae, isLoading: je, error: Me, path: C, onPathChange: Ne, retry: Pe, onSearchFiles: Fe, isSearching: Ie, searchResults: Le, clearSearchResults: Re, expandedPaths: w, loadedPaths: T, onExpandedPathsChange: E, onFolderPopupPathChange: ze, folderPopupLoadingPaths: D, onUploadFiles: Be, onUploadArchive: Ve, onValidateUpload: He, uploadBatchState: O, cancelUpload: k, cancelUploadFile: A, clearUploadBatch: j, downloadBatchState: M, cancelDownloadFile: Ue, cancelAllDownloads: N, clearDownloadBatch: P, onCreateFolder: We, onCreateFolderValidate: Ge, onDownloadFiles: Ke, onDeleteFiles: qe, isDeleting: Je, onMoveToFiles: Ye, onRenameValidate: Xe, isRenaming: Ze, onCopyFiles: Qe, isCopying: $e, isMoving: F, cancelCopyMove: et, uploadEnabled: I, isNewButtonDisabled: L, disabledNewButtonTooltip: R, visibleColumns: z, dateLocale: B, dateOptions: V, actionLabels: H, sharedWithMeIds: tt, sharedByMePaths: U, onUnshareFiles: nt, isUnsharing: rt, onRemoveFilesAccess: it, isRemovingAccess: at, fileMetadata: W, isFileMetadataLoading: G, onGetInfo: ot, clearMetadata: K, sectionTab: st } = s, q = st ?? m, [J, ct] = me(void 0), { handleGridApiChange: lt, reset: Y } = te();
21
- pe(() => {
22
- Y();
23
- }, [q, Y]);
24
- let X = l(() => {
19
+ }, f = ({ controller: o, labels: f, activeTab: p, tabs: m, onTabChange: h, selectedPaths: g, onSelectedPathsChange: Ce, variant: _, actionProfile: we, autoSelectUploadedItems: Te = !1, allowedFileTypes: Ee, maxSelectableFileSize: v, oversizedUploadMessage: y, isRowSelectable: b, getDisabledTooltip: De, unsupportedFileTypeTooltip: Oe, treeContainerClassName: x, onPreview: ke, onTableFileClick: Ae, previewExtensions: je, styles: Me }) => {
20
+ let { items: Ne, isLoading: Pe, error: Fe, path: S, onPathChange: Ie, retry: Le, onSearchFiles: Re, isSearching: ze, searchResults: Be, clearSearchResults: Ve, expandedPaths: He, loadedPaths: Ue, onExpandedPathsChange: We, onFolderPopupPathChange: Ge, folderPopupLoadingPaths: C, onUploadFiles: Ke, onUploadArchive: qe, onValidateUpload: Je, uploadBatchState: w, cancelUpload: T, cancelUploadFile: E, clearUploadBatch: D, downloadBatchState: O, cancelDownloadFile: k, cancelAllDownloads: A, clearDownloadBatch: j, onCreateFolder: Ye, onCreateFolderValidate: Xe, onDownloadFiles: Ze, onDeleteFiles: Qe, isDeleting: $e, onMoveToFiles: et, onRenameValidate: tt, isRenaming: nt, onCopyFiles: rt, isCopying: it, isMoving: M, cancelCopyMove: at, uploadEnabled: N, isNewButtonDisabled: P, disabledNewButtonTooltip: F, visibleColumns: I, dateLocale: L, dateOptions: R, actionLabels: z, sharedWithMeIds: ot, sharedByMePaths: B, onUnshareFiles: st, isUnsharing: ct, onRemoveFilesAccess: lt, isRemovingAccess: ut, fileMetadata: V, isFileMetadataLoading: H, onGetInfo: dt, clearMetadata: U, sectionTab: ft } = o, W = ft ?? p, [G, pt] = _e(void 0), { handleGridApiChange: mt, reset: K } = te();
21
+ ge(() => {
22
+ K();
23
+ }, [W, K]);
24
+ let q = c(() => {
25
25
  let e = {};
26
- return f.Download in H && (e[f.Download] = p.downloadLabel), f.Delete in H && (e[f.Delete] = p.deleteLabel), f.Rename in H && (e[f.Rename] = p.renameLabel), f.Copy in H && (e[f.Copy] = p.copyLabel), f.Move in H && (e[f.Move] = p.moveLabel), f.Duplicate in H && (e[f.Duplicate] = p.duplicateLabel), f.Unshare in H && (e[f.Unshare] = p.unshareLabel), f.RemoveAccess in H && (e[f.RemoveAccess] = p.removeAccessLabel), e;
26
+ return d.Download in z && (e[d.Download] = f.downloadLabel), d.Delete in z && (e[d.Delete] = f.deleteLabel), d.Rename in z && (e[d.Rename] = f.renameLabel), d.Copy in z && (e[d.Copy] = f.copyLabel), d.Move in z && (e[d.Move] = f.moveLabel), d.Duplicate in z && (e[d.Duplicate] = f.duplicateLabel), d.Unshare in z && (e[d.Unshare] = f.unshareLabel), d.RemoveAccess in z && (e[d.RemoveAccess] = f.removeAccessLabel), e;
27
27
  }, [
28
- H,
29
- p.downloadLabel,
30
- p.deleteLabel,
31
- p.renameLabel,
32
- p.copyLabel,
33
- p.moveLabel,
34
- p.duplicateLabel,
35
- p.unshareLabel,
36
- p.removeAccessLabel
37
- ]), ut = l(() => {
38
- let e = p.previewLabel == null ? X : {
39
- ...X,
40
- [f.Preview]: p.previewLabel
28
+ z,
29
+ f.downloadLabel,
30
+ f.deleteLabel,
31
+ f.renameLabel,
32
+ f.copyLabel,
33
+ f.moveLabel,
34
+ f.duplicateLabel,
35
+ f.unshareLabel,
36
+ f.removeAccessLabel
37
+ ]), J = c(() => {
38
+ let e = f.previewLabel == null ? q : {
39
+ ...q,
40
+ [d.Preview]: f.previewLabel
41
41
  };
42
- return f.Info in H ? {
42
+ return d.Info in z ? {
43
43
  ...e,
44
- [f.Info]: p.infoLabel
44
+ [d.Info]: f.infoLabel
45
45
  } : e;
46
46
  }, [
47
- X,
48
- H,
49
- p.infoLabel,
50
- p.previewLabel
51
- ]), dt = l(() => {
52
- if (_.size === 0) return !1;
53
- for (let e of _) if (!U.has(e)) return !1;
47
+ q,
48
+ z,
49
+ f.infoLabel,
50
+ f.previewLabel
51
+ ]), Y = c(() => {
52
+ if (g.size === 0) return !1;
53
+ for (let e of g) if (!B.has(e)) return !1;
54
54
  return !0;
55
- }, [_, U]), ft = l(() => {
56
- if (dt) return X;
57
- let { [f.RemoveAccess]: e, ...t } = X;
55
+ }, [g, B]), X = c(() => {
56
+ if (Y) return q;
57
+ let { [d.RemoveAccess]: e, ...t } = q;
58
58
  return t;
59
- }, [X, dt]), Z = v === r.Attach, pt = l(() => ({
60
- selectionMode: ve.MULTIPLE,
59
+ }, [q, Y]), Z = _ === r.Attach, ht = c(() => ({
60
+ selectionMode: xe.MULTIPLE,
61
61
  filterable: !1,
62
62
  withoutHeaderBorders: !0,
63
63
  containerClassName: "rounded-none shadow-none",
64
- visibleColumns: z,
65
- dateLocale: B,
66
- dateOptions: V,
64
+ visibleColumns: I,
65
+ dateLocale: L,
66
+ dateOptions: R,
67
67
  additionalGridOptions: {
68
68
  domLayout: "normal",
69
69
  rowSelection: {
70
70
  mode: "multiRow",
71
- isRowSelectable: x ?? (() => !0)
71
+ isRowSelectable: b ?? (() => !0)
72
72
  }
73
73
  },
74
- actionLabels: ut
74
+ actionLabels: J
75
75
  }), [
76
- z,
77
- B,
78
- V,
79
- ut,
80
- x
81
- ]), mt = l(() => ({
82
- header: p.treeHeader ?? null,
83
- containerClassName: S ?? (v === r.Attach ? "min-h-0 h-full w-[360px] shrink-0 border-e border-tertiary bg-layer-raised" : void 0),
84
- tabsAriaLabel: p.treeHeaderByTab[m],
85
- tabs: h,
86
- activeTab: m,
87
- onTabChange: g,
88
- expandedPaths: w,
89
- loadedPaths: T,
90
- loadingPaths: D,
91
- onExpandedPathsChange: E,
92
- actionLabels: X
76
+ I,
77
+ L,
78
+ R,
79
+ J,
80
+ b
81
+ ]), gt = c(() => ({
82
+ header: f.treeHeader ?? null,
83
+ containerClassName: x ?? (_ === r.Attach ? "min-h-0 h-full w-[360px] shrink-0 border-e border-tertiary bg-layer-raised" : void 0),
84
+ tabsAriaLabel: f.treeHeaderByTab[p],
85
+ tabs: m,
86
+ activeTab: p,
87
+ onTabChange: h,
88
+ expandedPaths: He,
89
+ loadedPaths: Ue,
90
+ loadingPaths: C,
91
+ onExpandedPathsChange: We,
92
+ actionLabels: q
93
93
  }), [
94
- p.treeHeader,
95
- p.treeHeaderByTab,
96
- S,
97
- v,
98
- h,
94
+ f.treeHeader,
95
+ f.treeHeaderByTab,
96
+ x,
97
+ _,
99
98
  m,
100
- g,
101
- w,
102
- T,
103
- D,
104
- E,
105
- X
106
- ]), ht = v === r.Standalone && xe === n.Full && q === _e.MyFiles && I, gt = l(() => ({
99
+ p,
100
+ h,
101
+ He,
102
+ Ue,
103
+ C,
104
+ We,
105
+ q
106
+ ]), _t = _ === r.Standalone && we === n.Full && W === be.MyFiles && N, vt = c(() => ({
107
107
  showHiddenFilesToggle: !0,
108
- ...Z ? { newButtonVariant: o.Neutral } : {},
109
- hiddenFilesSwitcherLabel: p.hiddenFilesLabel,
110
- showHiddenFilesLabel: p.showHiddenFilesLabel,
111
- hideHiddenFilesLabel: p.hideHiddenFilesLabel,
112
- isNewButtonDisabled: L,
113
- disabledNewButtonTooltip: R,
108
+ ...Z ? { newButtonVariant: a.Neutral } : {},
109
+ hiddenFilesSwitcherLabel: f.hiddenFilesLabel,
110
+ showHiddenFilesLabel: f.showHiddenFilesLabel,
111
+ hideHiddenFilesLabel: f.hideHiddenFilesLabel,
112
+ isNewButtonDisabled: P,
113
+ disabledNewButtonTooltip: F,
114
114
  newActions: {
115
115
  uploadFiles: {
116
- label: p.uploadFilesLabel,
116
+ label: f.uploadFilesLabel,
117
117
  icon: null
118
118
  },
119
119
  newFolder: {
120
- label: p.newFolderLabel,
120
+ label: f.newFolderLabel,
121
121
  icon: null
122
122
  },
123
- ...ht ? { uploadArchive: {
124
- label: p.uploadArchiveAction,
123
+ ..._t ? { uploadArchive: {
124
+ label: f.uploadArchiveAction,
125
125
  icon: null
126
126
  } } : {}
127
127
  }
128
128
  }), [
129
129
  Z,
130
- p.hiddenFilesLabel,
131
- p.showHiddenFilesLabel,
132
- p.hideHiddenFilesLabel,
133
- L,
134
- R,
135
- p.uploadFilesLabel,
136
- p.newFolderLabel,
137
- ht,
138
- p.uploadArchiveAction
139
- ]), _t = l(() => Z ? void 0 : {
140
- getSelectionLabel: p.getSelectionLabel,
141
- actionLabels: ft
130
+ f.hiddenFilesLabel,
131
+ f.showHiddenFilesLabel,
132
+ f.hideHiddenFilesLabel,
133
+ P,
134
+ F,
135
+ f.uploadFilesLabel,
136
+ f.newFolderLabel,
137
+ _t,
138
+ f.uploadArchiveAction
139
+ ]), yt = c(() => Z ? void 0 : {
140
+ getSelectionLabel: f.getSelectionLabel,
141
+ actionLabels: X
142
142
  }, [
143
143
  Z,
144
- p.getSelectionLabel,
145
- ft
146
- ]), vt = l(() => ({
147
- cancelLabel: p.deleteCancelLabel,
148
- confirmLabel: p.deleteConfirmLabel,
149
- closeLabel: p.deleteCloseLabel,
150
- titleRenderer: p.deleteConfirmTitle,
151
- contentRenderer: p.deleteConfirmBody
144
+ f.getSelectionLabel,
145
+ X
146
+ ]), bt = c(() => ({
147
+ cancelLabel: f.deleteCancelLabel,
148
+ confirmLabel: f.deleteConfirmLabel,
149
+ closeLabel: f.deleteCloseLabel,
150
+ titleRenderer: f.deleteConfirmTitle,
151
+ contentRenderer: f.deleteConfirmBody
152
152
  }), [
153
- p.deleteCancelLabel,
154
- p.deleteConfirmLabel,
155
- p.deleteCloseLabel,
156
- p.deleteConfirmTitle,
157
- p.deleteConfirmBody
158
- ]), yt = l(() => {
153
+ f.deleteCancelLabel,
154
+ f.deleteConfirmLabel,
155
+ f.deleteCloseLabel,
156
+ f.deleteConfirmTitle,
157
+ f.deleteConfirmBody
158
+ ]), xt = c(() => {
159
159
  let e;
160
- for (let t of _) {
160
+ for (let t of g) {
161
161
  let n = ee(t);
162
162
  if (e === void 0) e = n;
163
163
  else if (e !== n) return;
164
164
  }
165
165
  return e;
166
- }, [_]), Q = J != null && D.has(J), bt = Q ? J : yt, xt = l(() => ({
167
- copyLabel: p.copyLabel,
168
- moveLabel: p.moveLabel,
169
- addFolderLabel: p.addFolderLabel,
170
- hiddenFilesSwitcherLabel: p.hiddenFilesSwitcherLabel,
171
- getCopyHeader: p.getCopyHeader,
172
- getMoveHeader: p.getMoveHeader,
173
- disabledPathTooltip: Q ? p.folderPickerLoadingTooltip : p.moveSourceDisabledTooltip,
174
- movedIntoItselfTooltip: p.movedIntoItselfTooltip,
175
- emptyStateTitle: p.folderPickerEmptyStateTitle,
176
- emptyStateDescription: p.folderPickerEmptyStateDescription,
177
- sourceFolder: bt,
178
- destinationFolderPath: J,
179
- setDestinationFolderPath: ct,
166
+ }, [g]), Q = G != null && C.has(G), St = Q ? G : xt, Ct = c(() => ({
167
+ copyLabel: f.copyLabel,
168
+ moveLabel: f.moveLabel,
169
+ addFolderLabel: f.addFolderLabel,
170
+ hiddenFilesSwitcherLabel: f.hiddenFilesSwitcherLabel,
171
+ getCopyHeader: f.getCopyHeader,
172
+ getMoveHeader: f.getMoveHeader,
173
+ disabledPathTooltip: Q ? f.folderPickerLoadingTooltip : f.moveSourceDisabledTooltip,
174
+ movedIntoItselfTooltip: f.movedIntoItselfTooltip,
175
+ emptyStateTitle: f.folderPickerEmptyStateTitle,
176
+ emptyStateDescription: f.folderPickerEmptyStateDescription,
177
+ sourceFolder: St,
178
+ destinationFolderPath: G,
179
+ setDestinationFolderPath: pt,
180
180
  filesLoading: Q
181
181
  }), [
182
- p.copyLabel,
183
- p.moveLabel,
184
- p.addFolderLabel,
185
- p.hiddenFilesSwitcherLabel,
186
- p.getCopyHeader,
187
- p.getMoveHeader,
188
- p.folderPickerLoadingTooltip,
189
- p.moveSourceDisabledTooltip,
190
- p.movedIntoItselfTooltip,
191
- p.folderPickerEmptyStateTitle,
192
- p.folderPickerEmptyStateDescription,
182
+ f.copyLabel,
183
+ f.moveLabel,
184
+ f.addFolderLabel,
185
+ f.hiddenFilesSwitcherLabel,
186
+ f.getCopyHeader,
187
+ f.getMoveHeader,
188
+ f.folderPickerLoadingTooltip,
189
+ f.moveSourceDisabledTooltip,
190
+ f.movedIntoItselfTooltip,
191
+ f.folderPickerEmptyStateTitle,
192
+ f.folderPickerEmptyStateDescription,
193
193
  Q,
194
- bt,
195
- J
196
- ]), St = c(() => {
197
- k(), N(), j(), P();
194
+ St,
195
+ G
196
+ ]), wt = s(() => {
197
+ T(), A(), D(), j();
198
198
  }, [
199
- k,
200
- N,
201
- j,
202
- P
203
- ]), Ct = c((e) => {
204
- let t = ie(e);
205
- t?.kind === i.Upload ? A(t.entryId) : t?.kind === i.Download && Ue(t.entryId);
206
- }, [A, Ue]), wt = l(() => ae(O, M, p.uploadFailureMessages), [
199
+ T,
200
+ A,
201
+ D,
202
+ j
203
+ ]), Tt = s((e) => {
204
+ let t = ae(e);
205
+ t?.kind === re.Upload ? E(t.entryId) : t?.kind === re.Download && k(t.entryId);
206
+ }, [E, k]), Et = c(() => oe(w, O, f.uploadFailureMessages), [
207
+ w,
207
208
  O,
208
- M,
209
- p.uploadFailureMessages
210
- ]), Tt = O?.files.length ?? 0, Et = M?.files.length ?? 0, Dt = p.getTransferQueueTitle?.({
211
- uploads: Tt,
212
- downloads: Et
213
- }) ?? p.getUploadQueueTitle(Tt + Et), Ot = l(() => re({
214
- uploadLabels: p.uploadQueueLabels,
215
- downloadLabels: p.downloadQueueLabels,
216
- mixedProgressLabel: p.transferQueueProgressAriaLabel,
217
- uploadNames: new Set(O?.files.map((e) => e.name)),
218
- downloadNames: new Set(M?.files.map((e) => e.name))
209
+ f.uploadFailureMessages
210
+ ]), Dt = w?.files.length ?? 0, Ot = O?.files.length ?? 0, kt = f.getTransferQueueTitle?.({
211
+ uploads: Dt,
212
+ downloads: Ot
213
+ }) ?? f.getUploadQueueTitle(Dt + Ot), At = c(() => ie({
214
+ uploadLabels: f.uploadQueueLabels,
215
+ downloadLabels: f.downloadQueueLabels,
216
+ mixedProgressLabel: f.transferQueueProgressAriaLabel,
217
+ uploadNames: new Set(w?.files.map((e) => e.name)),
218
+ downloadNames: new Set(O?.files.map((e) => e.name))
219
219
  }), [
220
- p.uploadQueueLabels,
221
- p.downloadQueueLabels,
222
- p.transferQueueProgressAriaLabel,
223
- O,
224
- M
225
- ]), kt = l(() => ({
226
- fileMetadata: W,
227
- loading: G,
228
- clearMetadata: K,
229
- header: p.metadataHeader,
230
- nameLabel: p.metadataNameLabel,
231
- pathLabel: p.metadataPathLabel,
232
- modifiedDateLabel: p.metadataModifiedDateLabel,
233
- sizeLabel: p.metadataSizeLabel,
234
- authorLabel: p.metadataAuthorLabel
220
+ f.uploadQueueLabels,
221
+ f.downloadQueueLabels,
222
+ f.transferQueueProgressAriaLabel,
223
+ w,
224
+ O
225
+ ]), jt = c(() => ({
226
+ fileMetadata: V,
227
+ loading: H,
228
+ clearMetadata: U,
229
+ header: f.metadataHeader,
230
+ nameLabel: f.metadataNameLabel,
231
+ pathLabel: f.metadataPathLabel,
232
+ modifiedDateLabel: f.metadataModifiedDateLabel,
233
+ sizeLabel: f.metadataSizeLabel,
234
+ authorLabel: f.metadataAuthorLabel
235
235
  }), [
236
- W,
237
- G,
238
- K,
239
- p.metadataHeader,
240
- p.metadataNameLabel,
241
- p.metadataPathLabel,
242
- p.metadataModifiedDateLabel,
243
- p.metadataSizeLabel,
244
- p.metadataAuthorLabel
245
- ]), At = ye({
246
- isDeleting: Je,
247
- isRenaming: Ze,
248
- isMoving: F,
249
- isUnsharing: rt,
250
- isRemovingAccess: at
251
- }, p), $ = l(() => C.split("/").filter(Boolean).length > 1 ? {
252
- title: p.folderEmptyStateTitle,
236
+ V,
237
+ H,
238
+ U,
239
+ f.metadataHeader,
240
+ f.metadataNameLabel,
241
+ f.metadataPathLabel,
242
+ f.metadataModifiedDateLabel,
243
+ f.metadataSizeLabel,
244
+ f.metadataAuthorLabel
245
+ ]), $ = Se({
246
+ isDeleting: $e,
247
+ isRenaming: nt,
248
+ isMoving: M,
249
+ isUnsharing: ct,
250
+ isRemovingAccess: ut
251
+ }, f), Mt = c(() => S.split("/").filter(Boolean).length > 1 ? {
252
+ title: f.folderEmptyStateTitle,
253
253
  description: ""
254
- } : p.emptyStateByTab[q], [
255
- C,
256
- p.folderEmptyStateTitle,
257
- p.emptyStateByTab,
258
- q
259
- ]), jt = t({ "--dfms-surface": ke?.colors?.surface });
260
- return /* @__PURE__ */ d(he, { children: [
261
- Me == null ? /* @__PURE__ */ d("div", {
262
- style: jt,
263
- className: e("relative flex min-h-0 w-full grow overflow-auto", a.surface),
264
- children: [/* @__PURE__ */ u(ge, {
265
- className: e("min-h-0 w-full grow", a.surface, Z && "p-0"),
266
- contentClassName: Z ? "px-0 pb-0" : void 0,
267
- gridClassName: v === r.Attach ? "size-full gap-6 px-6 py-4" : "size-full",
268
- items: Ae,
269
- path: C,
270
- onPathChange: Ne,
271
- onGridApiChange: lt,
272
- filesLoading: je,
273
- allowedFileTypes: Ce,
274
- maxSelectableFileSize: y,
275
- maxFileSize: y,
276
- uploadValidationMessages: b == null ? void 0 : { oversizedFiles: b },
277
- selectedPaths: _,
278
- onSelectedPathsChange: be,
279
- navigationPanelOptions: {
280
- searchable: !0,
281
- placeholder: p.searchPlaceholderByTab?.[q]
282
- },
283
- hideSearchPathItemName: !0,
284
- onSearchFiles: Fe,
285
- searchInProgress: Ie,
286
- searchResults: Le ?? [],
287
- clearSearchResults: Re,
288
- gridOptions: pt,
289
- treeOptions: mt,
290
- onFolderPopupPathChange: ze,
291
- toolbarOptions: gt,
292
- bulkActionsToolbarOptions: _t,
293
- autoSelectUploadedItems: Se,
294
- emptyStateTitle: $.title,
295
- emptyStateDescription: $.description,
296
- searchEmptyStateTitle: p.searchEmptyStateTitle,
297
- uploadEnabled: I,
298
- sharedWithMeIds: tt,
299
- sharedByMePaths: U,
300
- onUnshareFiles: nt,
301
- onRemoveFilesAccess: it,
302
- fileMetadataPopupOptions: kt,
303
- onGetInfo: ot,
304
- onPreview: Ee,
305
- onTableFileClick: De,
306
- previewExtensions: Oe,
307
- onUploadFiles: Be,
308
- onUploadArchive: Ve,
309
- onValidateUpload: He,
310
- onCreateFolder: We,
311
- onCreateFolderValidate: Ge,
312
- onDownloadFiles: Ke,
313
- onDeleteFiles: qe,
314
- onMoveToFiles: Ye,
315
- onCopyFiles: Qe,
316
- onRenameValidate: Xe,
317
- renameValidationMessages: p.renameValidationMessages,
318
- isRenameFileAvailable: I,
319
- deleteConfirmationOptions: vt,
320
- conflictResolutionPopupOptions: p.conflictResolutionPopupOptions,
321
- destinationFolderPopupOptions: xt,
322
- forbiddenSymbolsRegExp: ue,
323
- forbiddenSymbolsTooltip: p.forbiddenSymbolsTooltip,
324
- getDisabledTooltip: we,
325
- unsupportedFileTypeTooltip: Te
326
- }), At != null && /* @__PURE__ */ u("div", {
327
- "aria-live": "polite",
328
- className: "absolute inset-0 z-52 flex items-center justify-center bg-backdrop desktop:p-4",
329
- children: /* @__PURE__ */ u(de, {
330
- size: 32,
331
- fullWidth: !1,
332
- ariaLabel: At
254
+ } : f.emptyStateByTab[W], [
255
+ S,
256
+ f.folderEmptyStateTitle,
257
+ f.emptyStateByTab,
258
+ W
259
+ ]), Nt = t({ "--dfms-surface": Me?.colors?.surface });
260
+ return /* @__PURE__ */ u(ve, { children: [
261
+ Fe == null ? /* @__PURE__ */ u("div", {
262
+ style: Nt,
263
+ className: e("relative flex min-h-0 w-full grow overflow-auto", i.surface),
264
+ children: [
265
+ /* @__PURE__ */ l(ye, {
266
+ className: e("min-h-0 w-full grow", i.surface, Z && "p-0"),
267
+ contentClassName: Z ? "px-0 pb-0" : void 0,
268
+ gridClassName: _ === r.Attach ? "size-full gap-6 px-6 py-4" : "size-full",
269
+ items: Ne,
270
+ path: S,
271
+ onPathChange: Ie,
272
+ onGridApiChange: mt,
273
+ filesLoading: Pe,
274
+ allowedFileTypes: Ee,
275
+ maxSelectableFileSize: v,
276
+ maxFileSize: v,
277
+ uploadValidationMessages: y == null ? void 0 : { oversizedFiles: y },
278
+ selectedPaths: g,
279
+ onSelectedPathsChange: Ce,
280
+ navigationPanelOptions: {
281
+ searchable: !0,
282
+ placeholder: f.searchPlaceholderByTab?.[W]
283
+ },
284
+ hideSearchPathItemName: !0,
285
+ onSearchFiles: Re,
286
+ searchInProgress: ze,
287
+ searchResults: Be ?? [],
288
+ clearSearchResults: Ve,
289
+ gridOptions: ht,
290
+ treeOptions: gt,
291
+ onFolderPopupPathChange: Ge,
292
+ toolbarOptions: vt,
293
+ bulkActionsToolbarOptions: yt,
294
+ autoSelectUploadedItems: Te,
295
+ emptyStateTitle: Mt.title,
296
+ emptyStateDescription: Mt.description,
297
+ searchEmptyStateTitle: f.searchEmptyStateTitle,
298
+ uploadEnabled: N,
299
+ sharedWithMeIds: ot,
300
+ sharedByMePaths: B,
301
+ onUnshareFiles: st,
302
+ onRemoveFilesAccess: lt,
303
+ fileMetadataPopupOptions: jt,
304
+ onGetInfo: dt,
305
+ onPreview: ke,
306
+ onTableFileClick: Ae,
307
+ previewExtensions: je,
308
+ onUploadFiles: Ke,
309
+ onUploadArchive: qe,
310
+ onValidateUpload: Je,
311
+ onCreateFolder: Ye,
312
+ onCreateFolderValidate: Xe,
313
+ onDownloadFiles: Ze,
314
+ onDeleteFiles: Qe,
315
+ onMoveToFiles: et,
316
+ onCopyFiles: rt,
317
+ onRenameValidate: tt,
318
+ renameValidationMessages: f.renameValidationMessages,
319
+ isRenameFileAvailable: N,
320
+ deleteConfirmationOptions: bt,
321
+ conflictResolutionPopupOptions: f.conflictResolutionPopupOptions,
322
+ destinationFolderPopupOptions: Ct,
323
+ forbiddenSymbolsRegExp: pe,
324
+ forbiddenSymbolsTooltip: f.forbiddenSymbolsTooltip,
325
+ getDisabledTooltip: De,
326
+ unsupportedFileTypeTooltip: Oe
327
+ }),
328
+ /* @__PURE__ */ l(de, {
329
+ visuallyHidden: !0,
330
+ as: fe.Span,
331
+ children: $ ?? ""
332
+ }),
333
+ $ != null && /* @__PURE__ */ l("div", {
334
+ className: "absolute inset-0 z-52 flex items-center justify-center bg-backdrop desktop:p-4",
335
+ children: /* @__PURE__ */ l(me, {
336
+ size: 32,
337
+ fullWidth: !1,
338
+ ariaLabel: $
339
+ })
333
340
  })
334
- })]
335
- }) : /* @__PURE__ */ u("div", {
341
+ ]
342
+ }) : /* @__PURE__ */ l("div", {
336
343
  className: "p-6",
337
- children: /* @__PURE__ */ u(le, {
338
- message: p.errorMessage,
339
- action: /* @__PURE__ */ u(oe, {
340
- variant: o.Neutral,
341
- appearance: se.Outlined,
342
- size: ce.Small,
343
- label: p.retryLabel,
344
- onClick: Pe
344
+ children: /* @__PURE__ */ l(ue, {
345
+ message: f.errorMessage,
346
+ action: /* @__PURE__ */ l(se, {
347
+ variant: a.Neutral,
348
+ appearance: ce.Outlined,
349
+ size: le.Small,
350
+ label: f.retryLabel,
351
+ onClick: Le
345
352
  })
346
353
  })
347
354
  }),
348
- /* @__PURE__ */ u("div", {
355
+ /* @__PURE__ */ l("div", {
349
356
  className: "fixed inset-e-4 bottom-4 z-51",
350
- children: /* @__PURE__ */ u(fe, {
351
- title: Dt,
352
- items: wt,
353
- onClose: St,
354
- onCancelItem: Ct,
355
- labels: Ot
357
+ children: /* @__PURE__ */ l(he, {
358
+ title: kt,
359
+ items: Et,
360
+ onClose: wt,
361
+ onCancelItem: Tt,
362
+ labels: At
356
363
  })
357
364
  }),
358
- ($e || F) && /* @__PURE__ */ u(ne, {
359
- title: F ? p.operationLoaderMoveTitle : p.operationLoaderCopyTitle,
360
- text: F ? p.movingLabel : p.copyingLabel,
361
- cancelLabel: p.operationLoaderCancelLabel,
362
- onCancel: et
365
+ (it || M) && /* @__PURE__ */ l(ne, {
366
+ title: M ? f.operationLoaderMoveTitle : f.operationLoaderCopyTitle,
367
+ text: M ? f.movingLabel : f.copyingLabel,
368
+ cancelLabel: f.operationLoaderCancelLabel,
369
+ onCancel: at
363
370
  })
364
371
  ] });
365
372
  };
366
- s(p);
373
+ o(f);
367
374
  //#endregion
368
- export { p as DialFileManagerShell };
375
+ export { f as DialFileManagerShell };