@epam/ai-dial-chat-shared 1.4.0-dev.96 → 1.4.0-rc.1
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.
- package/components/MarkdownRenderer/Table/MarkdownTable.js +1 -1
- package/components/SortMenuButton/SortMenuButton.d.ts +5 -0
- package/components/SortMenuButton/SortMenuButton.d.ts.map +1 -0
- package/components/SortMenuButton/SortMenuButton.js +42 -0
- package/components/SortMenuButton/SortMenuButton.module.scss.js +4 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -1
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +265 -258
- package/file-manager/FileManagerDestinationPanel/FileManagerDestinationPanel.d.ts +26 -0
- package/file-manager/FileManagerDestinationPanel/FileManagerDestinationPanel.d.ts.map +1 -0
- package/file-manager/FileManagerDestinationPanel/FileManagerDestinationPanel.js +131 -0
- package/file-manager/destination-folders.d.ts +19 -0
- package/file-manager/destination-folders.d.ts.map +1 -0
- package/file-manager/destination-folders.js +27 -0
- package/file-manager/file-manager-controller.d.ts +2 -2
- package/file-manager/file-manager-controller.d.ts.map +1 -1
- package/file-manager/labels.d.ts +91 -19
- package/file-manager/labels.d.ts.map +1 -1
- package/hooks/useHasBeenTrue.d.ts +16 -0
- package/hooks/useHasBeenTrue.d.ts.map +1 -0
- package/hooks/useHasBeenTrue.js +8 -0
- package/hooks/useIsMobile.d.ts.map +1 -1
- package/hooks/useIsMobile.js +3 -10
- package/hooks/useIsPhone.d.ts.map +1 -1
- package/hooks/useIsPhone.js +3 -10
- package/hooks/useIsTablet.d.ts.map +1 -1
- package/hooks/useIsTablet.js +3 -10
- package/hooks/useMediaQueryMatch.d.ts +3 -0
- package/hooks/useMediaQueryMatch.d.ts.map +1 -0
- package/hooks/useMediaQueryMatch.js +12 -0
- package/index.css +2 -2
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -1
- package/index.js +82 -79
- package/models/sort-menu-button.d.ts +40 -0
- package/models/sort-menu-button.d.ts.map +1 -0
- package/package.json +3 -3
- package/utils/copy-to-clipboard.d.ts +0 -15
- package/utils/copy-to-clipboard.d.ts.map +1 -1
- package/utils/copy-to-clipboard.js +2 -59
- package/utils/markdown-rich-text.d.ts +16 -0
- package/utils/markdown-rich-text.d.ts.map +1 -0
- package/utils/markdown-rich-text.js +62 -0
- package/utils/org-unit.d.ts +22 -1
- package/utils/org-unit.d.ts.map +1 -1
- 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
|
|
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 {
|
|
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
|
|
11
|
-
import { Fragment as ye, jsx as c, jsxs as
|
|
12
|
-
import { DialFileManager as
|
|
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
|
|
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
|
-
},
|
|
20
|
-
let { items:
|
|
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
|
-
|
|
23
|
-
}, [
|
|
24
|
-
let
|
|
22
|
+
q();
|
|
23
|
+
}, [K, q]);
|
|
24
|
+
let J = s(() => {
|
|
25
25
|
let e = {};
|
|
26
|
-
return
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
]),
|
|
38
|
-
let e =
|
|
39
|
-
...
|
|
40
|
-
[
|
|
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
|
|
42
|
+
return l.Info in V ? {
|
|
43
43
|
...e,
|
|
44
|
-
[
|
|
44
|
+
[l.Info]: f.infoLabel
|
|
45
45
|
} : e;
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]),
|
|
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 (!
|
|
53
|
+
for (let e of h) if (!H.has(e)) return !1;
|
|
54
54
|
return !0;
|
|
55
|
-
}, [h,
|
|
56
|
-
if (
|
|
57
|
-
let { [
|
|
55
|
+
}, [h, H]), ht = s(() => {
|
|
56
|
+
if (mt) return J;
|
|
57
|
+
let { [l.RemoveAccess]: e, ...t } = J;
|
|
58
58
|
return t;
|
|
59
|
-
}, [
|
|
60
|
-
selectionMode:
|
|
59
|
+
}, [J, mt]), X = g === n.Attach, gt = s(() => ({
|
|
60
|
+
selectionMode: Ce.MULTIPLE,
|
|
61
61
|
filterable: !1,
|
|
62
62
|
withoutHeaderBorders: !0,
|
|
63
|
-
containerClassName:
|
|
64
|
-
visibleColumns:
|
|
65
|
-
dateLocale:
|
|
66
|
-
dateOptions:
|
|
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:
|
|
71
|
+
isRowSelectable: Ae ?? (() => !0),
|
|
72
72
|
hideDisabledCheckboxes: !0
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
-
actionLabels:
|
|
75
|
+
actionLabels: Y
|
|
76
76
|
}), [
|
|
77
|
-
I,
|
|
78
|
-
L,
|
|
79
77
|
R,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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:
|
|
91
|
-
loadedPaths:
|
|
92
|
-
loadingPaths:
|
|
93
|
-
onExpandedPathsChange:
|
|
94
|
-
actionLabels:
|
|
90
|
+
expandedPaths: We,
|
|
91
|
+
loadedPaths: C,
|
|
92
|
+
loadingPaths: w,
|
|
93
|
+
onExpandedPathsChange: Ge,
|
|
94
|
+
actionLabels: J
|
|
95
95
|
}), [
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
108
|
-
|
|
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
|
-
...
|
|
111
|
-
hiddenFilesSwitcherLabel:
|
|
112
|
-
showHiddenFilesLabel:
|
|
113
|
-
hideHiddenFilesLabel:
|
|
114
|
-
isNewButtonDisabled:
|
|
115
|
-
disabledNewButtonTooltip:
|
|
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:
|
|
118
|
+
label: f.uploadFilesLabel,
|
|
119
119
|
icon: null
|
|
120
120
|
},
|
|
121
121
|
newFolder: {
|
|
122
|
-
label:
|
|
122
|
+
label: f.newFolderLabel,
|
|
123
123
|
icon: null
|
|
124
124
|
},
|
|
125
|
-
...
|
|
126
|
-
label:
|
|
125
|
+
...vt ? { uploadArchive: {
|
|
126
|
+
label: f.uploadArchiveAction,
|
|
127
127
|
icon: null
|
|
128
128
|
} } : {}
|
|
129
129
|
}
|
|
130
130
|
}), [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
]),
|
|
142
|
-
getSelectionLabel:
|
|
143
|
-
actionLabels:
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
]),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
202
|
-
|
|
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
|
-
|
|
212
|
-
]),
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
]),
|
|
228
|
-
fileMetadata:
|
|
229
|
-
loading:
|
|
230
|
-
clearMetadata:
|
|
231
|
-
header:
|
|
232
|
-
nameLabel:
|
|
233
|
-
pathLabel:
|
|
234
|
-
modifiedDateLabel:
|
|
235
|
-
sizeLabel:
|
|
236
|
-
authorLabel:
|
|
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
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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:
|
|
247
|
+
isMoving: P,
|
|
251
248
|
isUnsharing: ct,
|
|
252
249
|
isRemovingAccess: ut
|
|
253
|
-
},
|
|
254
|
-
title:
|
|
250
|
+
}, f), Ft = s(() => S.split("/").filter(Boolean).length > 1 ? {
|
|
251
|
+
title: f.folderEmptyStateTitle,
|
|
255
252
|
description: ""
|
|
256
|
-
} :
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
]),
|
|
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__ */
|
|
269
|
-
|
|
270
|
-
style:
|
|
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(
|
|
274
|
-
className: e("min-h-0 w-full grow", i.surface,
|
|
275
|
-
contentClassName:
|
|
276
|
-
gridClassName: g ===
|
|
277
|
-
items:
|
|
278
|
-
path:
|
|
279
|
-
onPathChange:
|
|
280
|
-
onGridApiChange:
|
|
281
|
-
filesLoading:
|
|
282
|
-
allowedFileTypes:
|
|
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:
|
|
282
|
+
uploadValidationMessages: v == null ? void 0 : { oversizedFiles: v },
|
|
286
283
|
selectedPaths: h,
|
|
287
|
-
onSelectedPathsChange:
|
|
284
|
+
onSelectedPathsChange: Ee,
|
|
288
285
|
navigationPanelOptions: {
|
|
289
286
|
searchable: !0,
|
|
290
|
-
placeholder:
|
|
287
|
+
placeholder: f.searchPlaceholderByTab?.[K]
|
|
291
288
|
},
|
|
292
289
|
hideSearchPathItemName: !0,
|
|
293
|
-
onSearchFiles:
|
|
294
|
-
searchInProgress:
|
|
295
|
-
searchResults:
|
|
296
|
-
clearSearchResults:
|
|
297
|
-
gridOptions:
|
|
298
|
-
treeOptions:
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
bulkActionsToolbarOptions:
|
|
302
|
-
autoSelectUploadedItems:
|
|
303
|
-
emptyStateTitle:
|
|
304
|
-
emptyStateDescription:
|
|
305
|
-
searchEmptyStateTitle:
|
|
306
|
-
uploadEnabled:
|
|
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:
|
|
305
|
+
sharedByMePaths: H,
|
|
309
306
|
onUnshareFiles: st,
|
|
310
307
|
onRemoveFilesAccess: lt,
|
|
311
|
-
fileMetadataPopupOptions:
|
|
308
|
+
fileMetadataPopupOptions: Pt,
|
|
312
309
|
onGetInfo: dt,
|
|
313
|
-
onPreview:
|
|
314
|
-
onTableFileClick:
|
|
315
|
-
previewExtensions:
|
|
316
|
-
onUploadFiles:
|
|
317
|
-
onUploadArchive:
|
|
318
|
-
onValidateUpload:
|
|
319
|
-
onCreateFolder:
|
|
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:
|
|
327
|
-
isRenameFileAvailable:
|
|
328
|
-
deleteConfirmationOptions:
|
|
329
|
-
conflictResolutionPopupOptions:
|
|
330
|
-
|
|
323
|
+
renameValidationMessages: f.renameValidationMessages,
|
|
324
|
+
isRenameFileAvailable: F,
|
|
325
|
+
deleteConfirmationOptions: St,
|
|
326
|
+
conflictResolutionPopupOptions: f.conflictResolutionPopupOptions,
|
|
327
|
+
onDestinationRequest: Ct,
|
|
331
328
|
forbiddenSymbolsRegExp: pe,
|
|
332
|
-
forbiddenSymbolsTooltip:
|
|
333
|
-
getDisabledTooltip:
|
|
334
|
-
unsupportedFileTypeTooltip:
|
|
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:
|
|
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:
|
|
359
|
-
onClick:
|
|
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:
|
|
367
|
-
items:
|
|
368
|
-
onClose:
|
|
369
|
-
onCancelItem:
|
|
370
|
-
labels:
|
|
363
|
+
title: Mt,
|
|
364
|
+
items: kt,
|
|
365
|
+
onClose: Dt,
|
|
366
|
+
onCancelItem: Ot,
|
|
367
|
+
labels: Nt
|
|
371
368
|
})
|
|
372
369
|
}),
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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
|
-
|
|
390
|
+
ge(f);
|
|
384
391
|
//#endregion
|
|
385
|
-
export {
|
|
392
|
+
export { f as DialFileManagerShell };
|