@epam/ai-dial-ui-kit 0.15.0-dev.24 → 0.15.0-dev.27
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/dist/CHANGELOG.md +6 -0
- package/dist/DateCellRenderer-BZ8vGglE.cjs +1 -0
- package/dist/components/FileManager/FileManager.js +373 -372
- package/dist/components/FileManager/FileManagerProvider.js +266 -264
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
- package/dist/components/New/Button/Button.js +32 -32
- package/dist/components/New/Button/utils.js +18 -8
- package/dist/components/New/IconButton/IconButton.js +30 -28
- package/dist/components/New/InlineSelect/InlineSelect.js +78 -66
- package/dist/components-manifest.json +29 -3
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +2 -2
- package/dist/src/components/FileManager/FileManager.d.ts +2 -0
- package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
- package/dist/src/components/New/Button/Button.d.ts +4 -1
- package/dist/src/components/New/Button/utils.d.ts +15 -0
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +8 -0
- package/dist/{use-file-manager-tabs-4s-dbnmu.cjs → use-file-manager-tabs-LWyTVrbO.cjs} +2 -2
- package/package.json +1 -1
- package/dist/DateCellRenderer-CkFOYZGc.cjs +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as be, useCallback as r, useMemo as L, useEffect as N, useState as
|
|
1
|
+
import { jsxs as go, jsx as Co } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as be, useCallback as r, useMemo as L, useEffect as N, useState as Fo } from "react";
|
|
3
3
|
import { DialFileNodeType as F } from "../../models/file.js";
|
|
4
|
-
import { splitPathAndName as
|
|
5
|
-
import { useShowHiddenFiles as
|
|
6
|
-
import { useCollapseTree as
|
|
7
|
-
import { useFileClipboard as
|
|
8
|
-
import { useCurrentPath as
|
|
9
|
-
import { useFileDelete as
|
|
10
|
-
import { useFileDownload as
|
|
11
|
-
import { useFileUpload as
|
|
12
|
-
import { FileManagerContext as
|
|
13
|
-
import { useItemRenaming as
|
|
14
|
-
import { useExpandedPaths as
|
|
15
|
-
import { useNewActions as
|
|
16
|
-
import { useFolderCreation as
|
|
17
|
-
import { useTreeAdditionalButtons as
|
|
18
|
-
import { useFileMetadata as
|
|
19
|
-
import { useFileSearch as
|
|
20
|
-
import { usePathsSelection as
|
|
21
|
-
import { NOT_ALLOWED_SYMBOLS_REGEXP as
|
|
22
|
-
const
|
|
4
|
+
import { splitPathAndName as vo, findNodeByPath as te, findFolderForPath as ne, getFolderNestingDepth as Do, normalizeToLowerCase as oe, collectAllDescendants as To, isHiddenDotFile as Po, normalizeExtensionWithoutDot as So, isFileSelectable as yo, cleanForbiddenSymbolsRegExp as wo } from "./utils.js";
|
|
5
|
+
import { useShowHiddenFiles as Ro } from "./hooks/use-show-hidden-files.js";
|
|
6
|
+
import { useCollapseTree as Eo } from "./hooks/use-collapse-tree.js";
|
|
7
|
+
import { useFileClipboard as Mo } from "./hooks/use-file-clipboard.js";
|
|
8
|
+
import { useCurrentPath as Lo } from "./hooks/use-current-path.js";
|
|
9
|
+
import { useFileDelete as Ao } from "./hooks/use-file-delete.js";
|
|
10
|
+
import { useFileDownload as Bo } from "./hooks/use-file-download.js";
|
|
11
|
+
import { useFileUpload as bo } from "./hooks/use-file-upload.js";
|
|
12
|
+
import { FileManagerContext as Ho } from "./FileManagerContext.js";
|
|
13
|
+
import { useItemRenaming as Io } from "./hooks/use-item-renaming.js";
|
|
14
|
+
import { useExpandedPaths as xo } from "./components/FoldersTree/hooks/use-expanded-paths.js";
|
|
15
|
+
import { useNewActions as Vo } from "./hooks/use-new-actions.js";
|
|
16
|
+
import { useFolderCreation as No } from "./hooks/use-folder-creation.js";
|
|
17
|
+
import { useTreeAdditionalButtons as zo } from "./hooks/use-tree-additional-buttons.js";
|
|
18
|
+
import { useFileMetadata as Wo } from "./hooks/use-file-metadata.js";
|
|
19
|
+
import { useFileSearch as ko } from "./hooks/use-file-search.js";
|
|
20
|
+
import { usePathsSelection as Go } from "./hooks/use-paths-selection.js";
|
|
21
|
+
import { NOT_ALLOWED_SYMBOLS_REGEXP as Oo } from "../../constants/validation.js";
|
|
22
|
+
const ca = ({
|
|
23
23
|
managerLabel: He,
|
|
24
24
|
children: Ie,
|
|
25
25
|
className: xe,
|
|
@@ -52,55 +52,56 @@ const da = ({
|
|
|
52
52
|
onDownloadFiles: et,
|
|
53
53
|
onRenameValidate: tt,
|
|
54
54
|
renameValidationMessages: nt,
|
|
55
|
-
forbiddenSymbolsRegExp: k =
|
|
55
|
+
forbiddenSymbolsRegExp: k = Oo,
|
|
56
56
|
forbiddenSymbolsTooltip: ot,
|
|
57
|
+
skipForbiddenSymbolsCheckForActions: at,
|
|
57
58
|
onUploadFiles: G,
|
|
58
59
|
onValidateUpload: ie,
|
|
59
|
-
uploadEnabled:
|
|
60
|
-
uploadValidationMessages:
|
|
60
|
+
uploadEnabled: rt,
|
|
61
|
+
uploadValidationMessages: it,
|
|
61
62
|
maxFileSize: se,
|
|
62
63
|
onUploadArchive: le,
|
|
63
|
-
prepareUploadFileName:
|
|
64
|
+
prepareUploadFileName: st,
|
|
64
65
|
onCreateFolder: O,
|
|
65
66
|
onCreateFolderValidate: de,
|
|
66
67
|
folderCreationValidationMessages: ce,
|
|
67
68
|
fileMetadataPopupOptions: U,
|
|
68
69
|
onGetInfo: he,
|
|
69
|
-
onUnshareFiles:
|
|
70
|
-
onRemoveFilesAccess:
|
|
71
|
-
actionsRef:
|
|
72
|
-
sharedByMePaths:
|
|
70
|
+
onUnshareFiles: lt,
|
|
71
|
+
onRemoveFilesAccess: dt,
|
|
72
|
+
actionsRef: ct,
|
|
73
|
+
sharedByMePaths: ht,
|
|
73
74
|
onSearchFiles: pe,
|
|
74
75
|
searchResults: ue,
|
|
75
76
|
searchInProgress: fe,
|
|
76
77
|
clearSearchResults: me,
|
|
77
78
|
allowedFileTypes: B,
|
|
78
79
|
maxSelectableFileSize: _,
|
|
79
|
-
getDisabledTooltip:
|
|
80
|
-
fileTooLargeTooltip:
|
|
81
|
-
unsupportedFileTypeTooltip:
|
|
82
|
-
emptyStateIcon:
|
|
83
|
-
emptyStateTitle:
|
|
84
|
-
emptyStateDescription:
|
|
85
|
-
sharedWithMeIds:
|
|
86
|
-
onFolderPopupPathChange:
|
|
87
|
-
onManagePermissions:
|
|
88
|
-
onPreview:
|
|
89
|
-
onOpenInNewTab:
|
|
90
|
-
previewExtensions:
|
|
91
|
-
isRenameFileAvailable:
|
|
92
|
-
isDuplicateFolderAvailable:
|
|
80
|
+
getDisabledTooltip: pt,
|
|
81
|
+
fileTooLargeTooltip: ut,
|
|
82
|
+
unsupportedFileTypeTooltip: ft,
|
|
83
|
+
emptyStateIcon: mt,
|
|
84
|
+
emptyStateTitle: gt,
|
|
85
|
+
emptyStateDescription: Ct,
|
|
86
|
+
sharedWithMeIds: Ft,
|
|
87
|
+
onFolderPopupPathChange: vt,
|
|
88
|
+
onManagePermissions: Dt,
|
|
89
|
+
onPreview: Tt,
|
|
90
|
+
onOpenInNewTab: Pt,
|
|
91
|
+
previewExtensions: St,
|
|
92
|
+
isRenameFileAvailable: yt,
|
|
93
|
+
isDuplicateFolderAvailable: wt,
|
|
93
94
|
customUploadFileAction: b,
|
|
94
95
|
customCreateNewItemAction: ge,
|
|
95
96
|
customDuplicateAction: j,
|
|
96
|
-
customDeleteItemsAction:
|
|
97
|
-
customDownloadItemsAction:
|
|
98
|
-
customBreakpointRef:
|
|
99
|
-
gridClassName:
|
|
100
|
-
nonClickableTableColumns:
|
|
101
|
-
hideSearchPathItemName:
|
|
102
|
-
showHiddenFileSwitcherInDestinationPopup:
|
|
103
|
-
showCreateFolderButtonInDestinationPopup:
|
|
97
|
+
customDeleteItemsAction: Rt,
|
|
98
|
+
customDownloadItemsAction: Et,
|
|
99
|
+
customBreakpointRef: Mt,
|
|
100
|
+
gridClassName: Lt,
|
|
101
|
+
nonClickableTableColumns: At,
|
|
102
|
+
hideSearchPathItemName: Bt,
|
|
103
|
+
showHiddenFileSwitcherInDestinationPopup: bt,
|
|
104
|
+
showCreateFolderButtonInDestinationPopup: Ht,
|
|
104
105
|
autoSelectUploadedItems: D = !1,
|
|
105
106
|
maxNewFolderDepth: d,
|
|
106
107
|
onNewFolderDepthExceeded: q,
|
|
@@ -110,14 +111,14 @@ const da = ({
|
|
|
110
111
|
selectedPaths: m,
|
|
111
112
|
clearSelection: g,
|
|
112
113
|
setSelectedPaths: y
|
|
113
|
-
} =
|
|
114
|
+
} = Go({
|
|
114
115
|
selectedPaths: ke,
|
|
115
116
|
defaultSelectedPaths: Ge,
|
|
116
117
|
onSelectedPathsChange: Oe
|
|
117
|
-
}), Fe = be(!1), T = be(null),
|
|
118
|
+
}), Fe = be(!1), T = be(null), It = r(
|
|
118
119
|
(e, n, o) => {
|
|
119
120
|
if (D) {
|
|
120
|
-
const { parent: u, name: ee } =
|
|
121
|
+
const { parent: u, name: ee } = vo(n);
|
|
121
122
|
T.current = {
|
|
122
123
|
fileNames: /* @__PURE__ */ new Set([ee]),
|
|
123
124
|
destinationFolder: u
|
|
@@ -126,7 +127,7 @@ const da = ({
|
|
|
126
127
|
O?.(e, n, o);
|
|
127
128
|
},
|
|
128
129
|
[O, D]
|
|
129
|
-
),
|
|
130
|
+
), xt = r(
|
|
130
131
|
(e, n) => {
|
|
131
132
|
D && (T.current = {
|
|
132
133
|
fileNames: new Set(e.map((o) => o.name)),
|
|
@@ -134,7 +135,7 @@ const da = ({
|
|
|
134
135
|
}), G?.(e, n);
|
|
135
136
|
},
|
|
136
137
|
[G, D]
|
|
137
|
-
),
|
|
138
|
+
), Vt = r(
|
|
138
139
|
(e, n, o) => {
|
|
139
140
|
D && (T.current = {
|
|
140
141
|
fileNames: /* @__PURE__ */ new Set([n]),
|
|
@@ -142,7 +143,7 @@ const da = ({
|
|
|
142
143
|
}), le?.(e, n, o);
|
|
143
144
|
},
|
|
144
145
|
[le, D]
|
|
145
|
-
),
|
|
146
|
+
), Nt = L(() => {
|
|
146
147
|
const e = /* @__PURE__ */ new Map();
|
|
147
148
|
return m.forEach((n) => {
|
|
148
149
|
const o = te(c, n);
|
|
@@ -164,7 +165,7 @@ const da = ({
|
|
|
164
165
|
y(n);
|
|
165
166
|
}
|
|
166
167
|
}, [c, m, y]);
|
|
167
|
-
const { currentPath: s, setCurrentPath: w, handlePathChange: C } =
|
|
168
|
+
const { currentPath: s, setCurrentPath: w, handlePathChange: C } = Lo({
|
|
168
169
|
path: Ne,
|
|
169
170
|
defaultPath: ze,
|
|
170
171
|
onPathChange: Je,
|
|
@@ -176,39 +177,39 @@ const da = ({
|
|
|
176
177
|
...o
|
|
177
178
|
} = ae || {};
|
|
178
179
|
return { showFiles: e, showFolders: n, ...o };
|
|
179
|
-
}, [ae]), Y = X.showFiles, J = X.showFolders, [
|
|
180
|
+
}, [ae]), Y = X.showFiles, J = X.showFolders, [zt, Wt] = Fo(), kt = f?.destinationFolderPath ?? zt, K = r(
|
|
180
181
|
(e) => {
|
|
181
|
-
f?.setDestinationFolderPath ? f.setDestinationFolderPath(e) :
|
|
182
|
+
f?.setDestinationFolderPath ? f.setDestinationFolderPath(e) : Wt(e);
|
|
182
183
|
},
|
|
183
184
|
[f]
|
|
184
|
-
), { areHiddenFilesVisible: H, toggleHiddenFilesVisibility:
|
|
185
|
+
), { areHiddenFilesVisible: H, toggleHiddenFilesVisibility: Gt } = Ro({
|
|
185
186
|
showHiddenFiles: Ue,
|
|
186
187
|
onShowHiddenFilesChange: _e
|
|
187
|
-
}), { isTreeCollapsed:
|
|
188
|
+
}), { isTreeCollapsed: Ot, toggleTreeCollapse: Ut, setIsTreeCollapsed: _t } = Eo({
|
|
188
189
|
collapsed: v?.collapsed,
|
|
189
190
|
onCollapseChange: v?.onCollapseChange
|
|
190
191
|
}), {
|
|
191
|
-
renamedPath:
|
|
192
|
-
renamedItem:
|
|
193
|
-
renameHandler:
|
|
194
|
-
renameSaveHandler:
|
|
195
|
-
renameCancelHandler:
|
|
196
|
-
renameValidateHandler:
|
|
197
|
-
getDisplayName:
|
|
198
|
-
} =
|
|
192
|
+
renamedPath: jt,
|
|
193
|
+
renamedItem: qt,
|
|
194
|
+
renameHandler: Xt,
|
|
195
|
+
renameSaveHandler: Yt,
|
|
196
|
+
renameCancelHandler: Jt,
|
|
197
|
+
renameValidateHandler: Kt,
|
|
198
|
+
getDisplayName: Qt
|
|
199
|
+
} = Io({
|
|
199
200
|
items: c,
|
|
200
201
|
onRenameValidate: tt,
|
|
201
202
|
validationMessages: nt,
|
|
202
203
|
onMoveToFiles: re
|
|
203
204
|
}), {
|
|
204
205
|
isSearchMode: Q,
|
|
205
|
-
searchValue:
|
|
206
|
+
searchValue: Zt,
|
|
206
207
|
effectiveSearchValue: Z,
|
|
207
|
-
setSearchValue:
|
|
208
|
-
handleSearchChange:
|
|
208
|
+
setSearchValue: $t,
|
|
209
|
+
handleSearchChange: en,
|
|
209
210
|
handleSearchClear: i,
|
|
210
211
|
searchResultsRows: ve
|
|
211
|
-
} =
|
|
212
|
+
} = ko({
|
|
212
213
|
onSearchFiles: pe,
|
|
213
214
|
clearSearchResults: me,
|
|
214
215
|
currentPath: s,
|
|
@@ -222,30 +223,30 @@ const da = ({
|
|
|
222
223
|
() => ne(c, s) ?? c[0],
|
|
223
224
|
[c, s]
|
|
224
225
|
), h = r(
|
|
225
|
-
(e, n) => !n || !e ? !1 :
|
|
226
|
+
(e, n) => !n || !e ? !1 : Do(e.path) > n,
|
|
226
227
|
[]
|
|
227
228
|
), p = r(() => {
|
|
228
229
|
q?.();
|
|
229
230
|
}, [q]), {
|
|
230
|
-
handleCopyTo:
|
|
231
|
-
handleMoveTo:
|
|
232
|
-
handleDuplicate:
|
|
233
|
-
handleOpenDestinationFolderPopup:
|
|
234
|
-
handleCloseDestinationFolderPopup:
|
|
231
|
+
handleCopyTo: tn,
|
|
232
|
+
handleMoveTo: nn,
|
|
233
|
+
handleDuplicate: on,
|
|
234
|
+
handleOpenDestinationFolderPopup: an,
|
|
235
|
+
handleCloseDestinationFolderPopup: rn,
|
|
235
236
|
openDestinationFolderPopup: $,
|
|
236
|
-
handleSetCopiedFiles:
|
|
237
|
-
handleSetMovedFiles:
|
|
238
|
-
destinationFolderMode:
|
|
239
|
-
destinationFolderTitle:
|
|
240
|
-
conflictingFiles:
|
|
241
|
-
conflictResolutionOpen:
|
|
242
|
-
closeConflictResolution:
|
|
243
|
-
handleConflictReplace:
|
|
244
|
-
handleConflictDuplicate:
|
|
245
|
-
handleConflictCancel:
|
|
246
|
-
handleConflictDecideForEach:
|
|
247
|
-
sourceFolder:
|
|
248
|
-
} =
|
|
237
|
+
handleSetCopiedFiles: sn,
|
|
238
|
+
handleSetMovedFiles: ln,
|
|
239
|
+
destinationFolderMode: dn,
|
|
240
|
+
destinationFolderTitle: cn,
|
|
241
|
+
conflictingFiles: hn,
|
|
242
|
+
conflictResolutionOpen: pn,
|
|
243
|
+
closeConflictResolution: un,
|
|
244
|
+
handleConflictReplace: fn,
|
|
245
|
+
handleConflictDuplicate: mn,
|
|
246
|
+
handleConflictCancel: gn,
|
|
247
|
+
handleConflictDecideForEach: Cn,
|
|
248
|
+
sourceFolder: Fn
|
|
249
|
+
} = Mo({
|
|
249
250
|
getDestinationFiles: (e) => ne(c, e)?.items ?? [],
|
|
250
251
|
onCopyFiles: Ze,
|
|
251
252
|
onMoveToFiles: re,
|
|
@@ -259,50 +260,50 @@ const da = ({
|
|
|
259
260
|
$ || K(void 0);
|
|
260
261
|
}, [$, K]);
|
|
261
262
|
const {
|
|
262
|
-
deleteConfirmationOpen:
|
|
263
|
-
itemsToDelete:
|
|
264
|
-
openDeleteConfirmation:
|
|
265
|
-
closeDeleteConfirmation:
|
|
266
|
-
confirmDelete:
|
|
267
|
-
} =
|
|
263
|
+
deleteConfirmationOpen: vn,
|
|
264
|
+
itemsToDelete: Dn,
|
|
265
|
+
openDeleteConfirmation: Tn,
|
|
266
|
+
closeDeleteConfirmation: Pn,
|
|
267
|
+
confirmDelete: Sn
|
|
268
|
+
} = Ao({
|
|
268
269
|
onDeleteFiles: $e,
|
|
269
270
|
onDeleteSuccess: g
|
|
270
|
-
}), { handleDownloadFiles:
|
|
271
|
+
}), { handleDownloadFiles: yn } = Bo({
|
|
271
272
|
onDownloadFiles: et,
|
|
272
|
-
customDownloadItemsAction:
|
|
273
|
+
customDownloadItemsAction: Et,
|
|
273
274
|
onDownloadSuccess: g
|
|
274
275
|
}), {
|
|
275
|
-
isDragging:
|
|
276
|
-
isDraggingOverWindow:
|
|
277
|
-
uploadError:
|
|
278
|
-
handleDragEnter:
|
|
279
|
-
handleDragLeave:
|
|
280
|
-
handleDragOver:
|
|
276
|
+
isDragging: wn,
|
|
277
|
+
isDraggingOverWindow: Rn,
|
|
278
|
+
uploadError: En,
|
|
279
|
+
handleDragEnter: Mn,
|
|
280
|
+
handleDragLeave: Ln,
|
|
281
|
+
handleDragOver: An,
|
|
281
282
|
handleDrop: De,
|
|
282
|
-
clearError:
|
|
283
|
+
clearError: Bn,
|
|
283
284
|
openFileDialog: Te,
|
|
284
285
|
fileInputRef: Pe,
|
|
285
|
-
fileInputAccept:
|
|
286
|
-
handleFileInputChange:
|
|
286
|
+
fileInputAccept: bn,
|
|
287
|
+
handleFileInputChange: Hn,
|
|
287
288
|
openArchiveDialog: Se,
|
|
288
|
-
uploadConflictingFiles:
|
|
289
|
-
uploadConflictResolutionOpen:
|
|
290
|
-
closeUploadConflictResolution:
|
|
291
|
-
handleUploadConflictReplace:
|
|
292
|
-
handleUploadConflictDuplicate:
|
|
293
|
-
handleUploadConflictCancel:
|
|
294
|
-
handleUploadConflictDecideForEach:
|
|
295
|
-
} =
|
|
296
|
-
onUploadFiles:
|
|
289
|
+
uploadConflictingFiles: In,
|
|
290
|
+
uploadConflictResolutionOpen: xn,
|
|
291
|
+
closeUploadConflictResolution: Vn,
|
|
292
|
+
handleUploadConflictReplace: Nn,
|
|
293
|
+
handleUploadConflictDuplicate: zn,
|
|
294
|
+
handleUploadConflictCancel: Wn,
|
|
295
|
+
handleUploadConflictDecideForEach: kn
|
|
296
|
+
} = bo({
|
|
297
|
+
onUploadFiles: xt,
|
|
297
298
|
onValidateUpload: ie,
|
|
298
299
|
maxFileSize: se,
|
|
299
|
-
onUploadArchive:
|
|
300
|
-
prepareUploadFileName:
|
|
300
|
+
onUploadArchive: Vt,
|
|
301
|
+
prepareUploadFileName: st,
|
|
301
302
|
allowedFileTypes: B,
|
|
302
|
-
validationMessages:
|
|
303
|
-
uploadEnabled:
|
|
303
|
+
validationMessages: it,
|
|
304
|
+
uploadEnabled: rt,
|
|
304
305
|
currentFolder: l
|
|
305
|
-
}),
|
|
306
|
+
}), Gn = r(
|
|
306
307
|
(e) => {
|
|
307
308
|
i();
|
|
308
309
|
const n = s ?? "", o = l?.items ?? [];
|
|
@@ -313,20 +314,20 @@ const da = ({
|
|
|
313
314
|
i();
|
|
314
315
|
const e = s ?? "", n = l?.items ?? [];
|
|
315
316
|
return Te(e, n);
|
|
316
|
-
}, [s, l, Te, i]),
|
|
317
|
+
}, [s, l, Te, i]), On = r(() => {
|
|
317
318
|
i();
|
|
318
319
|
const e = s ?? "", n = l?.items ?? [];
|
|
319
320
|
Se(e, n);
|
|
320
|
-
}, [s, l, Se, i]),
|
|
321
|
+
}, [s, l, Se, i]), Un = r(() => {
|
|
321
322
|
i(), b?.(s, l);
|
|
322
|
-
}, [b, s, l, i]),
|
|
323
|
+
}, [b, s, l, i]), _n = r(() => {
|
|
323
324
|
i(), ge?.(s, l);
|
|
324
325
|
}, [
|
|
325
326
|
ge,
|
|
326
327
|
s,
|
|
327
328
|
l,
|
|
328
329
|
i
|
|
329
|
-
]),
|
|
330
|
+
]), jn = r(
|
|
330
331
|
(e) => {
|
|
331
332
|
j?.(e);
|
|
332
333
|
},
|
|
@@ -334,19 +335,19 @@ const da = ({
|
|
|
334
335
|
), {
|
|
335
336
|
isCreatingFolder: x,
|
|
336
337
|
newFolderTempId: P,
|
|
337
|
-
createdFolderPath:
|
|
338
|
+
createdFolderPath: qn,
|
|
338
339
|
newFolderDefaultName: V,
|
|
339
340
|
startFolderCreation: ye,
|
|
340
341
|
startGridSiblingFolderCreation: we,
|
|
341
342
|
startTreeSiblingFolderCreation: Re,
|
|
342
343
|
startGridChildFolderCreation: Ee,
|
|
343
344
|
startTreeChildFolderCreation: Me,
|
|
344
|
-
cancelFolderCreation:
|
|
345
|
-
saveFolderCreation:
|
|
346
|
-
validateFolderName:
|
|
347
|
-
} =
|
|
345
|
+
cancelFolderCreation: Xn,
|
|
346
|
+
saveFolderCreation: Yn,
|
|
347
|
+
validateFolderName: Jn
|
|
348
|
+
} = No({
|
|
348
349
|
currentFolder: l,
|
|
349
|
-
onCreateFolder:
|
|
350
|
+
onCreateFolder: It,
|
|
350
351
|
onValidateFolderName: de,
|
|
351
352
|
validationMessages: ce,
|
|
352
353
|
items: c
|
|
@@ -363,17 +364,17 @@ const da = ({
|
|
|
363
364
|
d,
|
|
364
365
|
h,
|
|
365
366
|
p
|
|
366
|
-
]), { newActions:
|
|
367
|
+
]), { newActions: Kn, isNewButtonVisible: Qn, isNewButtonDisabled: Zn } = Vo(
|
|
367
368
|
{
|
|
368
369
|
newActions: A?.newActions,
|
|
369
370
|
currentFolder: l,
|
|
370
|
-
onUploadFiles: b ?
|
|
371
|
-
onUploadArchive:
|
|
371
|
+
onUploadFiles: b ? Un : I,
|
|
372
|
+
onUploadArchive: On,
|
|
372
373
|
onCreateFolder: Le,
|
|
373
|
-
onCreateNewItem:
|
|
374
|
+
onCreateNewItem: _n,
|
|
374
375
|
isNewButtonDisabled: A?.isNewButtonDisabled
|
|
375
376
|
}
|
|
376
|
-
),
|
|
377
|
+
), $n = L(() => {
|
|
377
378
|
if (Q) {
|
|
378
379
|
let t = ve;
|
|
379
380
|
Y || (t = t.filter(
|
|
@@ -409,10 +410,10 @@ const da = ({
|
|
|
409
410
|
}), E;
|
|
410
411
|
}
|
|
411
412
|
const e = oe(Z).trim(), n = l?.items ?? [];
|
|
412
|
-
let o = e ?
|
|
413
|
+
let o = e ? To(l) : n;
|
|
413
414
|
Y || (o = o.filter((t) => t.nodeType !== F.ITEM)), J || (o = o.filter(
|
|
414
415
|
(t) => t.nodeType !== F.FOLDER
|
|
415
|
-
)), H || (o = o.filter((t) => e ? !t.path.split("/").filter(Boolean).some((a) => a.startsWith(".")) : !
|
|
416
|
+
)), H || (o = o.filter((t) => e ? !t.path.split("/").filter(Boolean).some((a) => a.startsWith(".")) : !Po(t)));
|
|
416
417
|
const u = o.map((t) => ({
|
|
417
418
|
...t,
|
|
418
419
|
id: t.id ?? t.path,
|
|
@@ -443,7 +444,7 @@ const da = ({
|
|
|
443
444
|
const ee = e.split(/\s+/).filter(Boolean);
|
|
444
445
|
return u.filter((t) => {
|
|
445
446
|
if (t.isTemporary) return !0;
|
|
446
|
-
const E = oe(t.name), a = oe(t.author), Be =
|
|
447
|
+
const E = oe(t.name), a = oe(t.author), Be = So(t.extension);
|
|
447
448
|
return ee.every(
|
|
448
449
|
(M) => E.includes(M) || a.includes(M) || Be.includes(M)
|
|
449
450
|
);
|
|
@@ -472,7 +473,7 @@ const da = ({
|
|
|
472
473
|
if (!n?.items) return;
|
|
473
474
|
const o = /* @__PURE__ */ new Set();
|
|
474
475
|
for (const u of n.items)
|
|
475
|
-
e.fileNames.has(u.name) &&
|
|
476
|
+
e.fileNames.has(u.name) && yo(u, B, _) && o.add(u.path);
|
|
476
477
|
o.size > 0 && (y(o), T.current = null);
|
|
477
478
|
}, [
|
|
478
479
|
c,
|
|
@@ -483,29 +484,29 @@ const da = ({
|
|
|
483
484
|
]), N(() => {
|
|
484
485
|
!Fe.current && Ce && I() && (Fe.current = !0);
|
|
485
486
|
}, [Ce, I]);
|
|
486
|
-
const
|
|
487
|
+
const eo = r(
|
|
487
488
|
(e) => {
|
|
488
489
|
C(e.path);
|
|
489
490
|
},
|
|
490
491
|
[C]
|
|
491
|
-
),
|
|
492
|
+
), to = r(
|
|
492
493
|
(e) => {
|
|
493
494
|
C(e);
|
|
494
495
|
},
|
|
495
496
|
[C]
|
|
496
|
-
),
|
|
497
|
+
), no = r(
|
|
497
498
|
(e) => {
|
|
498
499
|
e.nodeType === F.FOLDER ? C(e.path) : W?.(e);
|
|
499
500
|
},
|
|
500
501
|
[C, W]
|
|
501
|
-
), { expandedPaths: S, setExpandedPaths: R, collapseAll:
|
|
502
|
+
), { expandedPaths: S, setExpandedPaths: R, collapseAll: oo } = xo({
|
|
502
503
|
expandedPaths: v?.expandedPaths,
|
|
503
504
|
onExpandedPathsChange: v?.onExpandedPathsChange
|
|
504
|
-
}), { additionalButtons:
|
|
505
|
-
collapseAll:
|
|
505
|
+
}), { additionalButtons: ao } = zo({
|
|
506
|
+
collapseAll: oo,
|
|
506
507
|
expandedPathsLength: S.size,
|
|
507
508
|
additionalButtons: v?.additionalButtons
|
|
508
|
-
}),
|
|
509
|
+
}), ro = r(
|
|
509
510
|
(e) => {
|
|
510
511
|
if (e.length > 0) {
|
|
511
512
|
if (d && h(e[0], d)) {
|
|
@@ -522,7 +523,7 @@ const da = ({
|
|
|
522
523
|
h,
|
|
523
524
|
p
|
|
524
525
|
]
|
|
525
|
-
),
|
|
526
|
+
), io = r(
|
|
526
527
|
(e) => {
|
|
527
528
|
if (e.length > 0) {
|
|
528
529
|
if (d && h(e[0], d - 1)) {
|
|
@@ -542,7 +543,7 @@ const da = ({
|
|
|
542
543
|
d,
|
|
543
544
|
h
|
|
544
545
|
]
|
|
545
|
-
),
|
|
546
|
+
), so = r(
|
|
546
547
|
(e) => {
|
|
547
548
|
if (e.length > 0) {
|
|
548
549
|
if (d && h(e[0], d)) {
|
|
@@ -559,7 +560,7 @@ const da = ({
|
|
|
559
560
|
h,
|
|
560
561
|
p
|
|
561
562
|
]
|
|
562
|
-
),
|
|
563
|
+
), lo = r(
|
|
563
564
|
(e) => {
|
|
564
565
|
if (e.length > 0) {
|
|
565
566
|
if (d && h(e[0], d - 1)) {
|
|
@@ -580,16 +581,16 @@ const da = ({
|
|
|
580
581
|
p
|
|
581
582
|
]
|
|
582
583
|
), {
|
|
583
|
-
isMetadataPopupOpen:
|
|
584
|
-
selectedFileForMetadata:
|
|
585
|
-
openMetadataPopup:
|
|
584
|
+
isMetadataPopupOpen: co,
|
|
585
|
+
selectedFileForMetadata: ho,
|
|
586
|
+
openMetadataPopup: po,
|
|
586
587
|
closeMetadataPopup: Ae
|
|
587
|
-
} =
|
|
588
|
+
} = Wo({ onGetInfo: he }), uo = r(() => {
|
|
588
589
|
Ae(), U?.clearMetadata?.();
|
|
589
|
-
}, [Ae, U]),
|
|
590
|
+
}, [Ae, U]), fo = L(() => {
|
|
590
591
|
if (k)
|
|
591
|
-
return
|
|
592
|
-
}, [k]),
|
|
592
|
+
return wo(k);
|
|
593
|
+
}, [k]), mo = {
|
|
593
594
|
managerLabel: He,
|
|
594
595
|
className: xe,
|
|
595
596
|
items: c,
|
|
@@ -601,7 +602,7 @@ const da = ({
|
|
|
601
602
|
...v,
|
|
602
603
|
expandedPaths: S,
|
|
603
604
|
onExpandedPathsChange: R,
|
|
604
|
-
additionalButtons:
|
|
605
|
+
additionalButtons: ao
|
|
605
606
|
},
|
|
606
607
|
showNavigationPanel: je,
|
|
607
608
|
navigationPanelOptions: z,
|
|
@@ -611,154 +612,155 @@ const da = ({
|
|
|
611
612
|
deleteConfirmationOptions: qe,
|
|
612
613
|
destinationFolderPopupOptions: {
|
|
613
614
|
...f,
|
|
614
|
-
destinationFolderPath:
|
|
615
|
+
destinationFolderPath: kt,
|
|
615
616
|
setDestinationFolderPath: K,
|
|
616
|
-
header:
|
|
617
|
+
header: cn,
|
|
617
618
|
onCreateFolder: O,
|
|
618
619
|
onCreateFolderValidate: de,
|
|
619
620
|
folderCreationValidationMessages: ce,
|
|
620
|
-
sourceFolder:
|
|
621
|
+
sourceFolder: Fn
|
|
621
622
|
},
|
|
622
623
|
currentPath: s,
|
|
623
624
|
setCurrentPath: w,
|
|
624
|
-
searchValue:
|
|
625
|
+
searchValue: Zt,
|
|
625
626
|
effectiveSearchValue: Z,
|
|
626
|
-
setSearchValue:
|
|
627
|
+
setSearchValue: $t,
|
|
627
628
|
areHiddenFilesVisible: H,
|
|
628
|
-
toggleHiddenFilesVisibility:
|
|
629
|
-
isTreeCollapsed:
|
|
630
|
-
toggleTreeCollapse:
|
|
631
|
-
setIsTreeCollapsed:
|
|
629
|
+
toggleHiddenFilesVisibility: Gt,
|
|
630
|
+
isTreeCollapsed: Ot,
|
|
631
|
+
toggleTreeCollapse: Ut,
|
|
632
|
+
setIsTreeCollapsed: _t,
|
|
632
633
|
selectedPaths: m,
|
|
633
|
-
selectedFiles:
|
|
634
|
+
selectedFiles: Nt,
|
|
634
635
|
setSelectedPaths: y,
|
|
635
636
|
clearSelection: g,
|
|
636
637
|
currentFolder: l,
|
|
637
|
-
gridRows:
|
|
638
|
-
handleCopyTo:
|
|
639
|
-
handleMoveTo:
|
|
640
|
-
handleDuplicate: j ?
|
|
641
|
-
handleSetCopiedFiles:
|
|
642
|
-
handleSetMovedFiles:
|
|
638
|
+
gridRows: $n,
|
|
639
|
+
handleCopyTo: tn,
|
|
640
|
+
handleMoveTo: nn,
|
|
641
|
+
handleDuplicate: j ? jn : on,
|
|
642
|
+
handleSetCopiedFiles: sn,
|
|
643
|
+
handleSetMovedFiles: ln,
|
|
643
644
|
openDestinationFolderPopup: $,
|
|
644
|
-
handleCloseDestinationFolderPopup:
|
|
645
|
-
handleOpenDestinationFolderPopup:
|
|
646
|
-
destinationFolderMode:
|
|
647
|
-
handleGridAddSibling:
|
|
648
|
-
handleGridAddChild:
|
|
649
|
-
handleTreeAddSibling:
|
|
650
|
-
handleTreeAddChild:
|
|
651
|
-
handleDownloadFiles:
|
|
652
|
-
renamedPath:
|
|
653
|
-
renamedItem:
|
|
654
|
-
forbiddenSymbolsRegExp:
|
|
645
|
+
handleCloseDestinationFolderPopup: rn,
|
|
646
|
+
handleOpenDestinationFolderPopup: an,
|
|
647
|
+
destinationFolderMode: dn,
|
|
648
|
+
handleGridAddSibling: ro,
|
|
649
|
+
handleGridAddChild: io,
|
|
650
|
+
handleTreeAddSibling: so,
|
|
651
|
+
handleTreeAddChild: lo,
|
|
652
|
+
handleDownloadFiles: yn,
|
|
653
|
+
renamedPath: jt,
|
|
654
|
+
renamedItem: qt,
|
|
655
|
+
forbiddenSymbolsRegExp: fo,
|
|
655
656
|
forbiddenSymbolsTooltip: ot,
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
657
|
+
skipForbiddenSymbolsCheckForActions: at,
|
|
658
|
+
onRename: Xt,
|
|
659
|
+
onRenameSave: Yt,
|
|
660
|
+
onRenameCancel: Jt,
|
|
661
|
+
onRenameValidate: Kt,
|
|
662
|
+
getDisplayName: Qt,
|
|
663
|
+
openDeleteConfirmation: Rt || Tn,
|
|
664
|
+
closeDeleteConfirmation: Pn,
|
|
665
|
+
confirmDelete: Sn,
|
|
666
|
+
deleteConfirmationOpen: vn,
|
|
667
|
+
itemsToDelete: Dn,
|
|
666
668
|
handlePathChange: C,
|
|
667
|
-
handleTreeItemClick:
|
|
668
|
-
handleBreadcrumbItemClick:
|
|
669
|
-
handleSearchChange:
|
|
670
|
-
handleTableRowClick:
|
|
669
|
+
handleTreeItemClick: eo,
|
|
670
|
+
handleBreadcrumbItemClick: to,
|
|
671
|
+
handleSearchChange: en,
|
|
672
|
+
handleTableRowClick: no,
|
|
671
673
|
onTableFileClick: W,
|
|
672
674
|
handleSelectionClick: Ke,
|
|
673
675
|
onGridApiChange: Qe,
|
|
674
|
-
isDragging:
|
|
675
|
-
uploadError:
|
|
676
|
-
handleDragEnter:
|
|
677
|
-
handleDragLeave:
|
|
678
|
-
handleDragOver:
|
|
679
|
-
handleDrop:
|
|
680
|
-
clearUploadError:
|
|
676
|
+
isDragging: wn,
|
|
677
|
+
uploadError: En,
|
|
678
|
+
handleDragEnter: Mn,
|
|
679
|
+
handleDragLeave: Ln,
|
|
680
|
+
handleDragOver: An,
|
|
681
|
+
handleDrop: Gn,
|
|
682
|
+
clearUploadError: Bn,
|
|
681
683
|
onUploadFiles: G,
|
|
682
684
|
onValidateUpload: ie,
|
|
683
685
|
maxFileSize: se,
|
|
684
|
-
isDraggingOverWindow:
|
|
686
|
+
isDraggingOverWindow: Rn,
|
|
685
687
|
openFileDialog: I,
|
|
686
688
|
fileInputRef: Pe,
|
|
687
|
-
newActions:
|
|
688
|
-
isNewButtonVisible:
|
|
689
|
-
isNewButtonDisabled:
|
|
689
|
+
newActions: Kn,
|
|
690
|
+
isNewButtonVisible: Qn,
|
|
691
|
+
isNewButtonDisabled: Zn,
|
|
690
692
|
isCreatingFolder: x,
|
|
691
693
|
newFolderTempId: P,
|
|
692
|
-
createdFolderPath:
|
|
694
|
+
createdFolderPath: qn,
|
|
693
695
|
newFolderDefaultName: V,
|
|
694
696
|
startFolderCreation: Le,
|
|
695
|
-
cancelFolderCreation:
|
|
696
|
-
saveFolderCreation:
|
|
697
|
-
validateFolderName:
|
|
697
|
+
cancelFolderCreation: Xn,
|
|
698
|
+
saveFolderCreation: Yn,
|
|
699
|
+
validateFolderName: Jn,
|
|
698
700
|
conflictResolutionPopupOptions: Ye,
|
|
699
|
-
conflictingFiles:
|
|
700
|
-
conflictResolutionOpen:
|
|
701
|
-
closeConflictResolution:
|
|
702
|
-
handleConflictReplace:
|
|
703
|
-
handleConflictDuplicate:
|
|
704
|
-
handleConflictCancel:
|
|
705
|
-
handleConflictDecideForEach:
|
|
706
|
-
uploadConflictingFiles:
|
|
707
|
-
uploadConflictResolutionOpen:
|
|
708
|
-
closeUploadConflictResolution:
|
|
709
|
-
handleUploadConflictReplace:
|
|
710
|
-
handleUploadConflictDuplicate:
|
|
711
|
-
handleUploadConflictCancel:
|
|
712
|
-
handleUploadConflictDecideForEach:
|
|
701
|
+
conflictingFiles: hn,
|
|
702
|
+
conflictResolutionOpen: pn,
|
|
703
|
+
closeConflictResolution: un,
|
|
704
|
+
handleConflictReplace: fn,
|
|
705
|
+
handleConflictDuplicate: mn,
|
|
706
|
+
handleConflictCancel: gn,
|
|
707
|
+
handleConflictDecideForEach: Cn,
|
|
708
|
+
uploadConflictingFiles: In,
|
|
709
|
+
uploadConflictResolutionOpen: xn,
|
|
710
|
+
closeUploadConflictResolution: Vn,
|
|
711
|
+
handleUploadConflictReplace: Nn,
|
|
712
|
+
handleUploadConflictDuplicate: zn,
|
|
713
|
+
handleUploadConflictCancel: Wn,
|
|
714
|
+
handleUploadConflictDecideForEach: kn,
|
|
713
715
|
fileMetadataPopupOptions: U,
|
|
714
|
-
isMetadataPopupOpen:
|
|
715
|
-
selectedFileForMetadata:
|
|
716
|
-
openMetadataPopup:
|
|
717
|
-
closeMetadataPopup:
|
|
716
|
+
isMetadataPopupOpen: co,
|
|
717
|
+
selectedFileForMetadata: ho,
|
|
718
|
+
openMetadataPopup: po,
|
|
719
|
+
closeMetadataPopup: uo,
|
|
718
720
|
onGetInfo: he,
|
|
719
|
-
onUnshareFiles:
|
|
720
|
-
onRemoveFilesAccess:
|
|
721
|
-
actionsRef:
|
|
722
|
-
sharedByMePaths:
|
|
721
|
+
onUnshareFiles: lt,
|
|
722
|
+
onRemoveFilesAccess: dt,
|
|
723
|
+
actionsRef: ct,
|
|
724
|
+
sharedByMePaths: ht,
|
|
723
725
|
onSearchFiles: pe,
|
|
724
726
|
searchInProgress: fe,
|
|
725
727
|
searchResults: ue,
|
|
726
728
|
clearSearchResults: me,
|
|
727
729
|
isSearchMode: Q,
|
|
728
|
-
emptyStateIcon:
|
|
729
|
-
emptyStateTitle:
|
|
730
|
-
emptyStateDescription:
|
|
731
|
-
gridClassName:
|
|
732
|
-
sharedWithMeIds:
|
|
733
|
-
onFolderPopupPathChange:
|
|
734
|
-
onManagePermissions:
|
|
735
|
-
onPreview:
|
|
736
|
-
onOpenInNewTab:
|
|
737
|
-
previewExtensions:
|
|
738
|
-
isRenameFileAvailable:
|
|
739
|
-
isDuplicateFolderAvailable:
|
|
730
|
+
emptyStateIcon: mt,
|
|
731
|
+
emptyStateTitle: gt,
|
|
732
|
+
emptyStateDescription: Ct,
|
|
733
|
+
gridClassName: Lt,
|
|
734
|
+
sharedWithMeIds: Ft,
|
|
735
|
+
onFolderPopupPathChange: vt,
|
|
736
|
+
onManagePermissions: Dt,
|
|
737
|
+
onPreview: Tt,
|
|
738
|
+
onOpenInNewTab: Pt,
|
|
739
|
+
previewExtensions: St,
|
|
740
|
+
isRenameFileAvailable: yt,
|
|
741
|
+
isDuplicateFolderAvailable: wt,
|
|
740
742
|
customUploadFileAction: b,
|
|
741
|
-
customBreakpointRef:
|
|
742
|
-
nonClickableTableColumns:
|
|
743
|
-
hideSearchPathItemName:
|
|
744
|
-
getDisabledTooltip:
|
|
745
|
-
fileTooLargeTooltip:
|
|
746
|
-
unsupportedFileTypeTooltip:
|
|
747
|
-
showHiddenFileSwitcherInDestinationPopup:
|
|
748
|
-
showCreateFolderButtonInDestinationPopup:
|
|
743
|
+
customBreakpointRef: Mt,
|
|
744
|
+
nonClickableTableColumns: At,
|
|
745
|
+
hideSearchPathItemName: Bt,
|
|
746
|
+
getDisabledTooltip: pt,
|
|
747
|
+
fileTooLargeTooltip: ut,
|
|
748
|
+
unsupportedFileTypeTooltip: ft,
|
|
749
|
+
showHiddenFileSwitcherInDestinationPopup: bt,
|
|
750
|
+
showCreateFolderButtonInDestinationPopup: Ht,
|
|
749
751
|
maxNewFolderDepth: d,
|
|
750
752
|
onNewFolderDepthExceeded: q
|
|
751
753
|
};
|
|
752
|
-
return /* @__PURE__ */
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
+
return /* @__PURE__ */ go(Ho.Provider, { value: mo, children: [
|
|
755
|
+
/* @__PURE__ */ Co(
|
|
754
756
|
"input",
|
|
755
757
|
{
|
|
756
758
|
ref: Pe,
|
|
757
759
|
type: "file",
|
|
758
760
|
multiple: !0,
|
|
759
761
|
hidden: !0,
|
|
760
|
-
accept:
|
|
761
|
-
onChange:
|
|
762
|
+
accept: bn,
|
|
763
|
+
onChange: Hn,
|
|
762
764
|
"data-qa": "file-manager-upload-input"
|
|
763
765
|
}
|
|
764
766
|
),
|
|
@@ -766,5 +768,5 @@ const da = ({
|
|
|
766
768
|
] });
|
|
767
769
|
};
|
|
768
770
|
export {
|
|
769
|
-
|
|
771
|
+
ca as FileManagerProvider
|
|
770
772
|
};
|