@epam/ai-dial-chat-shared 1.4.0-dev.96 → 1.5.0-dev.2

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