@epam/ai-dial-react-file-manager 0.1.0-dev.21 → 0.1.0-dev.23
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/ai-dial-react-file-manager.es.js +1116 -1101
- package/dist/index.css +1 -1
- package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +2 -2
- package/dist/src/components/FileManager/constants.d.ts +1 -1
- package/dist/src/components/FileManager/utils.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as o, jsxs as X, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
-
import { IconCircleFilled as Un, IconChevronDown as Ja, IconDotsVertical as ln, IconFolder as pa, IconPlus as
|
|
2
|
+
import { IconCircleFilled as Un, IconChevronDown as Ja, IconDotsVertical as ln, IconFolder as pa, IconPlus as es, IconFile as ts, IconFileZip as ns, IconCopyMinus as os, IconFolderPlus as Qo, IconEye as So, IconX as as, IconArrowLeft as ss, IconEyeOff as rs, IconAlertCircleFilled as is, IconAlertTriangleFilled as ls, IconCaretRightFilled as cs, IconUserX as Ao, IconCopy as Po, IconTrashX as Mo, IconDownload as ko, IconExternalLink as Fo, IconPencilMinus as fa, IconInfoCircle as ds, IconFileDescription as us } from "@tabler/icons-react";
|
|
3
3
|
import an from "classnames";
|
|
4
4
|
import * as Ge from "react";
|
|
5
|
-
import { useState as z, useMemo as
|
|
6
|
-
import { DialFolderName as Oo, DialFileName as Lo, Dropdown as ht, DropdownTrigger as ma, DIAL_ICON_SIZE as zo, DialGrid as Ca, Popup as _o, PopupSize as Gn, DialRadioGroup as Jo, RadioGroupOrientation as ea, NeutralButton as
|
|
5
|
+
import { useState as z, useMemo as j, useCallback as d, useRef as ce, useEffect as pe, createContext as hs, useLayoutEffect as ps, useContext as fs, useImperativeHandle as ms } from "react";
|
|
6
|
+
import { DialFolderName as Oo, DialFileName as Lo, Dropdown as ht, DropdownTrigger as ma, DIAL_ICON_SIZE as zo, DialGrid as Ca, Popup as _o, PopupSize as Gn, DialRadioGroup as Jo, RadioGroupOrientation as ea, NeutralButton as sn, PrimaryButton as on, GhostIconButton as Et, BASE_ICON_PROPS as P, mergeClasses as Ee, NotificationVariant as Eo, ElementSize as jn, NOT_ALLOWED_SYMBOLS_REGEXP as Cs, DialTooltipContainer as gs, DialTooltipTrigger as vs, DialTooltipContent as ys, Notification as ws, ButtonAppearance as ga, Switch as va, DialTooltip as Vn, FlexibleActionsDirection as tn, BASE_ICON_SIZE as ya, ConfirmationPopup as Ns, ConfirmationPopupVariant as Ds, DialBreadcrumb as xs, Search as bs, ButtonVariant as Ts, Tabs as Rs, ButtonDropdown as ta, Skeleton as qt, SkeletonVariant as Yt, DialEllipsisTooltip as Tt, DialItemType as We, DialFileIcon as Is, DialSharedEntityIndicator as na, DialIcon as Fs, Spinner as Es, editableContainerProps as Ss, Input as As, useEditableItem as Ps, DialNoDataContent as wa, DialDateCellRenderer as Na, convertGridDateToDate as Ms, DEFAULT_GRID_DATE_LOCALE as ks, DEFAULT_GRID_DATE_FORMAT_OPTIONS as Os, DropdownItemType as Da, DialConditionalResizableContainer as Ls, DialCollapsibleSidebar as zs } from "@epam/ai-dial-ui-kit";
|
|
7
7
|
import { extensions as oa } from "mime-types";
|
|
8
|
-
import { createPortal as
|
|
8
|
+
import { createPortal as _s } from "react-dom";
|
|
9
9
|
const xa = (e) => /* @__PURE__ */ Ge.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ge.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.1812 1.2002H2.80615C2.43319 1.2002 2.07551 1.34835 1.81178 1.61208C1.54806 1.8758 1.3999 2.23348 1.3999 2.60645V5.48145C1.3999 5.85441 1.54806 6.21209 1.81178 6.47581C2.07551 6.73954 2.43319 6.8877 2.80615 6.8877H15.1812C15.5541 6.8877 15.9118 6.73954 16.1755 6.47581C16.4392 6.21209 16.5874 5.85441 16.5874 5.48145V2.60645C16.5874 2.23348 16.4392 1.8758 16.1755 1.61208C15.9118 1.34835 15.5541 1.2002 15.1812 1.2002ZM14.8999 5.2002H3.0874V2.8877H14.8999V5.2002ZM12 7.80017C12.3107 7.80017 12.5625 8.05201 12.5625 8.36267V11.7377H15.9375C16.2482 11.7377 16.5 11.9895 16.5 12.3002C16.5 12.6108 16.2482 12.8627 15.9375 12.8627H12.5625V16.2377C12.5625 16.5483 12.3107 16.8002 12 16.8002C11.6893 16.8002 11.4375 16.5483 11.4375 16.2377V12.8627H8.0625C7.75184 12.8627 7.5 12.6108 7.5 12.3002C7.5 11.9895 7.75184 11.7377 8.0625 11.7377H11.4375V8.36267C11.4375 8.05201 11.6893 7.80017 12 7.80017ZM2.41188 12.5883C2.14816 12.3246 2 11.9669 2 11.5939V9.00018H3.6875V11.3127H6.1001V13.0002H3.40625C3.03329 13.0002 2.6756 12.852 2.41188 12.5883Z", fill: "currentColor" })), ba = (e) => /* @__PURE__ */ Ge.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ge.createElement("path", { d: "M9.00049 7.7998C9.3108 7.80007 9.56279 8.05198 9.56299 8.3623V11.7373H12.938C13.2483 11.7376 13.5003 11.9895 13.5005 12.2998C13.5005 12.6103 13.2484 12.862 12.938 12.8623H9.56299V16.2373C9.56299 16.5478 9.31092 16.7995 9.00049 16.7998C8.68983 16.7998 8.43799 16.548 8.43799 16.2373V12.8623H5.06299C4.75233 12.8623 4.50049 12.6105 4.50049 12.2998C4.50069 11.9893 4.75245 11.7373 5.06299 11.7373H8.43799V8.3623C8.43819 8.05181 8.68995 7.7998 9.00049 7.7998ZM15.1812 1.2002C15.5541 1.2002 15.9116 1.34858 16.1753 1.6123C16.439 1.87603 16.5874 2.23348 16.5874 2.60645V5.48145C16.5874 5.85441 16.439 6.21186 16.1753 6.47559C15.9116 6.73931 15.5541 6.8877 15.1812 6.8877H2.80615C2.43319 6.8877 2.07573 6.73931 1.81201 6.47559C1.54829 6.21186 1.3999 5.85441 1.3999 5.48145V2.60645C1.3999 2.23348 1.54829 1.87603 1.81201 1.6123C2.07573 1.34858 2.43319 1.2002 2.80615 1.2002H15.1812ZM3.0874 2.8877V5.2002H14.8999V2.8877H3.0874Z", fill: "currentColor" })), Bo = (e) => /* @__PURE__ */ Ge.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ge.createElement("path", { d: "M3.009 12.5527C2.77901 12.4216 2.5877 12.2321 2.45443 12.0034C2.32116 11.7746 2.25064 11.5147 2.25 11.25V3.75C2.25 2.925 2.925 2.25 3.75 2.25H11.25C11.8125 2.25 12.1185 2.53875 12.375 3M10.5 15.75H7.25025C6.98757 15.75 6.72747 15.6983 6.48479 15.5977C6.24211 15.4972 6.0216 15.3499 5.83586 15.1641C5.65012 14.9784 5.50278 14.7579 5.40226 14.5152C5.30174 14.2725 5.25 14.0124 5.25 13.7498V7.25025C5.25 6.71975 5.46074 6.21098 5.83586 5.83586C6.21098 5.46074 6.71975 5.25 7.25025 5.25H13.7498C14.0124 5.25 14.2725 5.30174 14.5152 5.40226C14.7579 5.50278 14.9784 5.65012 15.1641 5.83586C15.3499 6.0216 15.4972 6.24211 15.5977 6.48479C15.6983 6.72747 15.75 6.98757 15.75 7.25025V10.5M12.75 16.5L16.5 12.75M16.5 12.75V16.125M16.5 12.75H13.125", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Wo = (e) => /* @__PURE__ */ Ge.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ge.createElement("path", { d: "M9.75 14.25H3.75C3.35218 14.25 2.97064 14.092 2.68934 13.8107C2.40804 13.5294 2.25 13.1478 2.25 12.75V4.5C2.25 4.10218 2.40804 3.72064 2.68934 3.43934C2.97064 3.15804 3.35218 3 3.75 3H6.75L9 5.25H14.25C14.6478 5.25 15.0294 5.40804 15.3107 5.68934C15.592 5.97064 15.75 6.35218 15.75 6.75V9.75M12 16.5L15.75 12.75M15.75 12.75V16.125M15.75 12.75H12.375", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Ho = (e) => /* @__PURE__ */ Ge.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ge.createElement("path", { d: "M4.5 15.75V14.25C4.5 13.4544 4.81607 12.6913 5.37868 12.1287C5.94129 11.5661 6.70435 11.25 7.5 11.25H9.75M15.75 12.75L12 16.5M12 16.5V13.125M12 16.5H15.375M6 5.25C6 6.04565 6.31607 6.80871 6.87868 7.37132C7.44129 7.93393 8.20435 8.25 9 8.25C9.79565 8.25 10.5587 7.93393 11.1213 7.37132C11.6839 6.80871 12 6.04565 12 5.25C12 4.45435 11.6839 3.69129 11.1213 3.12868C10.5587 2.56607 9.79565 2.25 9 2.25C8.20435 2.25 7.44129 2.56607 6.87868 3.12868C6.31607 3.69129 6 4.45435 6 5.25Z", stroke: "#7F8792", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
10
10
|
var nn = /* @__PURE__ */ ((e) => (e.MyFiles = "my_files", e.Shared = "shared", e.Organization = "organization", e.Review = "review", e))(nn || {}), w = /* @__PURE__ */ ((e) => (e.AddSibling = "addSibling", e.AddChild = "addChild", e.Duplicate = "duplicate", e.Copy = "copy", e.Move = "move", e.Download = "download", e.Delete = "delete", e.Rename = "rename", e.Info = "info", e.Unshare = "unshare", e.RemoveAccess = "removeAccess", e.ManagePermissions = "managePermissions", e.Preview = "preview", e.OpenInNewTab = "openInNewTab", e))(w || {}), Ce = /* @__PURE__ */ ((e) => (e.Replace = "replace", e.Duplicate = "duplicate", e.Cancel = "cancel", e))(Ce || {}), ke = /* @__PURE__ */ ((e) => (e.ReplaceAll = "replaceAll", e.DuplicateAll = "duplicateAll", e.DecideForEach = "decideForEach", e))(ke || {}), ge = /* @__PURE__ */ ((e) => (e.Copy = "copy", e.Move = "move", e))(ge || {}), Rt = /* @__PURE__ */ ((e) => (e.Tree = "tree", e.Grid = "grid", e))(Rt || {}), ut = /* @__PURE__ */ ((e) => (e.Tree = "tree", e.Grid = "grid", e))(ut || {}), Be = /* @__PURE__ */ ((e) => (e.Folder = "folder", e.Child = "child", e.Sibling = "sibling", e))(Be || {}), ye = /* @__PURE__ */ ((e) => (e.Name = "name", e.UpdatedAt = "updatedAt", e.Size = "size", e.Author = "author", e.Owner = "owner", e.Path = "path", e.Actions = "__actions", e.Version = "version", e))(ye || {});
|
|
11
|
-
const
|
|
11
|
+
const Bs = "w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-base", aa = "w-full text-secondary flex items-center gap-2", Ws = "flex min-h-0 min-w-0 h-full gap-4 overflow-hidden", Hs = "flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4", Us = "h-full rounded bg-layer-raised text-secondary min-w-0", Gs = "flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0", Vs = "opacity-0 pointer-events-none group-hover/grid-row:opacity-100 group-hover/grid-row:pointer-events-auto", $s = 280, js = "Files", st = 20, Zs = "Files", Ro = ".dial_folder", sa = "New folder", Xs = 280, qs = 460, ra = 44, Ys = 800, Ks = [
|
|
12
12
|
ye.Name,
|
|
13
13
|
ye.UpdatedAt,
|
|
14
14
|
ye.Size,
|
|
15
15
|
ye.Author,
|
|
16
16
|
ye.Actions
|
|
17
17
|
];
|
|
18
|
-
var
|
|
18
|
+
var L = /* @__PURE__ */ ((e) => (e.ITEM = "item", e.FOLDER = "folder", e))(L || {}), Qs = /* @__PURE__ */ ((e) => (e.FILE = "FILE", e.PROMPT = "PROMPT", e.CONVERSATION = "CONVERSATION", e.APPLICATION = "APPLICATION", e.TOOLSET = "TOOL_SET", e))(Qs || {}), St = /* @__PURE__ */ ((e) => (e.READ = "READ", e.WRITE = "WRITE", e.SHARE = "SHARE", e))(St || {});
|
|
19
19
|
const ia = ({
|
|
20
20
|
open: e,
|
|
21
21
|
onClose: t,
|
|
22
|
-
onReplace:
|
|
22
|
+
onReplace: r,
|
|
23
23
|
onDuplicate: a,
|
|
24
24
|
onDecideForEach: n,
|
|
25
|
-
conflictingFiles:
|
|
25
|
+
conflictingFiles: s,
|
|
26
26
|
singleFileTitle: l = "Replace Or Duplicate Item",
|
|
27
27
|
multipleFilesTitle: i = "Replace Or Duplicate Items",
|
|
28
28
|
message: p,
|
|
@@ -33,20 +33,20 @@ const ia = ({
|
|
|
33
33
|
nameColumnLabel: y = "Name",
|
|
34
34
|
actionColumnLabel: g = "Action"
|
|
35
35
|
}) => {
|
|
36
|
-
const m =
|
|
36
|
+
const m = s.length === 1, b = m ? s[0]?.name : "", D = C?.[Ce.Replace] ?? "Replace", h = C?.[Ce.Duplicate] ?? "Duplicate", f = C?.[Ce.Cancel] ?? "Cancel", T = c?.[ke.ReplaceAll] ?? "Replace all", x = c?.[ke.DuplicateAll] ?? "Duplicate all", F = c?.[ke.DecideForEach] ?? "Decide for each", [I, S] = z(
|
|
37
37
|
Ce.Replace
|
|
38
|
-
), [
|
|
38
|
+
), [O, M] = z(
|
|
39
39
|
ke.ReplaceAll
|
|
40
|
-
), [
|
|
40
|
+
), [V, A] = z(
|
|
41
41
|
new Map(
|
|
42
|
-
|
|
42
|
+
s.map((W) => [
|
|
43
43
|
W.path,
|
|
44
44
|
Ce.Replace
|
|
45
45
|
])
|
|
46
46
|
)
|
|
47
|
-
), [
|
|
47
|
+
), [_, B] = z(
|
|
48
48
|
void 0
|
|
49
|
-
),
|
|
49
|
+
), k = m ? l : i, Q = /* @__PURE__ */ X(Ie, { children: [
|
|
50
50
|
"Item with the name ",
|
|
51
51
|
/* @__PURE__ */ X("span", { className: "text-primary", children: [
|
|
52
52
|
'"',
|
|
@@ -55,7 +55,7 @@ const ia = ({
|
|
|
55
55
|
] }),
|
|
56
56
|
" ",
|
|
57
57
|
"already exists in this destination."
|
|
58
|
-
] }),
|
|
58
|
+
] }), te = `${s.length} items with the same names already exist in this destination.`, U = p ?? (m ? Q : te), Y = j(
|
|
59
59
|
() => [
|
|
60
60
|
{
|
|
61
61
|
id: Ce.Replace,
|
|
@@ -67,13 +67,13 @@ const ia = ({
|
|
|
67
67
|
}
|
|
68
68
|
],
|
|
69
69
|
[D, h]
|
|
70
|
-
), fe =
|
|
70
|
+
), fe = j(() => s.map((W) => ({
|
|
71
71
|
id: W.path,
|
|
72
72
|
name: W.name,
|
|
73
73
|
path: W.path,
|
|
74
|
-
nodeType: W.nodeType ??
|
|
75
|
-
action:
|
|
76
|
-
})), [
|
|
74
|
+
nodeType: W.nodeType ?? L.ITEM,
|
|
75
|
+
action: V.get(W.path) || Ce.Replace
|
|
76
|
+
})), [s, V]), we = j(() => [
|
|
77
77
|
{
|
|
78
78
|
field: "name",
|
|
79
79
|
headerName: y,
|
|
@@ -82,17 +82,17 @@ const ia = ({
|
|
|
82
82
|
floatingFilter: !1,
|
|
83
83
|
filter: !1,
|
|
84
84
|
resizable: !1,
|
|
85
|
-
cellRenderer: (W) => W.data?.nodeType ===
|
|
85
|
+
cellRenderer: (W) => W.data?.nodeType === L.FOLDER ? /* @__PURE__ */ o(
|
|
86
86
|
Oo,
|
|
87
87
|
{
|
|
88
88
|
name: W.data.name,
|
|
89
|
-
iconSize:
|
|
89
|
+
iconSize: st
|
|
90
90
|
}
|
|
91
91
|
) : /* @__PURE__ */ o(
|
|
92
92
|
Lo,
|
|
93
93
|
{
|
|
94
94
|
name: W.data.name,
|
|
95
|
-
iconSize:
|
|
95
|
+
iconSize: st
|
|
96
96
|
}
|
|
97
97
|
)
|
|
98
98
|
},
|
|
@@ -111,12 +111,18 @@ const ia = ({
|
|
|
111
111
|
{
|
|
112
112
|
key: Ce.Replace,
|
|
113
113
|
label: D,
|
|
114
|
-
icon: /* @__PURE__ */ o(
|
|
114
|
+
icon: /* @__PURE__ */ o(
|
|
115
|
+
Un,
|
|
116
|
+
{
|
|
117
|
+
size: 10,
|
|
118
|
+
className: "text-text-visual-violet-1"
|
|
119
|
+
}
|
|
120
|
+
)
|
|
115
121
|
},
|
|
116
122
|
{
|
|
117
123
|
key: Ce.Duplicate,
|
|
118
124
|
label: h,
|
|
119
|
-
icon: /* @__PURE__ */ o(Un, { size: 10, className: "text-
|
|
125
|
+
icon: /* @__PURE__ */ o(Un, { size: 10, className: "text-success" })
|
|
120
126
|
},
|
|
121
127
|
{
|
|
122
128
|
key: Ce.Cancel,
|
|
@@ -125,7 +131,7 @@ const ia = ({
|
|
|
125
131
|
}
|
|
126
132
|
], De = be.find(
|
|
127
133
|
(ne) => ne.key === W.data.action
|
|
128
|
-
), G =
|
|
134
|
+
), G = _ === W.data.path;
|
|
129
135
|
return /* @__PURE__ */ o("div", { className: "flex items-center h-full", children: /* @__PURE__ */ o(
|
|
130
136
|
ht,
|
|
131
137
|
{
|
|
@@ -133,7 +139,7 @@ const ia = ({
|
|
|
133
139
|
open: G,
|
|
134
140
|
items: be,
|
|
135
141
|
onItemClick: ({ key: ne }) => {
|
|
136
|
-
|
|
142
|
+
A((he) => {
|
|
137
143
|
const _e = new Map(he);
|
|
138
144
|
return _e.set(
|
|
139
145
|
W.data.path,
|
|
@@ -173,8 +179,8 @@ const ia = ({
|
|
|
173
179
|
D,
|
|
174
180
|
h,
|
|
175
181
|
f,
|
|
176
|
-
|
|
177
|
-
]), xe =
|
|
182
|
+
_
|
|
183
|
+
]), xe = j(
|
|
178
184
|
() => [
|
|
179
185
|
{
|
|
180
186
|
id: ke.ReplaceAll,
|
|
@@ -187,7 +193,7 @@ const ia = ({
|
|
|
187
193
|
{
|
|
188
194
|
id: ke.DecideForEach,
|
|
189
195
|
name: F,
|
|
190
|
-
content:
|
|
196
|
+
content: O === ke.DecideForEach ? /* @__PURE__ */ o("div", { className: "mt-4", children: /* @__PURE__ */ o(
|
|
191
197
|
Ca,
|
|
192
198
|
{
|
|
193
199
|
columnDefs: we,
|
|
@@ -206,33 +212,33 @@ const ia = ({
|
|
|
206
212
|
T,
|
|
207
213
|
x,
|
|
208
214
|
F,
|
|
209
|
-
|
|
215
|
+
O,
|
|
210
216
|
we,
|
|
211
217
|
fe
|
|
212
218
|
]
|
|
213
219
|
), ue = d(() => {
|
|
214
|
-
S(Ce.Replace),
|
|
220
|
+
S(Ce.Replace), M(ke.ReplaceAll), A(
|
|
215
221
|
new Map(
|
|
216
|
-
|
|
222
|
+
s.map((W) => [
|
|
217
223
|
W.path,
|
|
218
224
|
Ce.Replace
|
|
219
225
|
])
|
|
220
226
|
)
|
|
221
227
|
);
|
|
222
|
-
}, [
|
|
228
|
+
}, [s]), Te = d(() => {
|
|
223
229
|
ue(), t();
|
|
224
230
|
}, [ue, t]), Ne = d(() => {
|
|
225
231
|
if (ue(), m)
|
|
226
|
-
I === Ce.Replace ?
|
|
227
|
-
else if (
|
|
228
|
-
|
|
229
|
-
else if (
|
|
232
|
+
I === Ce.Replace ? r() : a();
|
|
233
|
+
else if (O === ke.ReplaceAll)
|
|
234
|
+
r();
|
|
235
|
+
else if (O === ke.DuplicateAll)
|
|
230
236
|
a();
|
|
231
|
-
else if (
|
|
232
|
-
const W =
|
|
237
|
+
else if (O === ke.DecideForEach && n) {
|
|
238
|
+
const W = s.map(
|
|
233
239
|
(be) => ({
|
|
234
240
|
file: be,
|
|
235
|
-
action:
|
|
241
|
+
action: V.get(be.path) || Ce.Replace
|
|
236
242
|
})
|
|
237
243
|
);
|
|
238
244
|
n(W);
|
|
@@ -241,12 +247,12 @@ const ia = ({
|
|
|
241
247
|
ue,
|
|
242
248
|
m,
|
|
243
249
|
I,
|
|
244
|
-
|
|
250
|
+
r,
|
|
245
251
|
a,
|
|
246
|
-
|
|
252
|
+
O,
|
|
247
253
|
n,
|
|
248
|
-
|
|
249
|
-
|
|
254
|
+
s,
|
|
255
|
+
V
|
|
250
256
|
]);
|
|
251
257
|
return /* @__PURE__ */ o(
|
|
252
258
|
_o,
|
|
@@ -255,19 +261,19 @@ const ia = ({
|
|
|
255
261
|
onClose: Te,
|
|
256
262
|
size: m ? Gn.Sm : Gn.Md,
|
|
257
263
|
className: an([!m && "w-[600px]"]),
|
|
258
|
-
header:
|
|
264
|
+
header: k,
|
|
259
265
|
preventKeyboardOnOpen: !0,
|
|
260
266
|
footer: /* @__PURE__ */ X("div", { className: "flex justify-end gap-3 py-4 px-6 border-t border-tertiary", children: [
|
|
261
|
-
/* @__PURE__ */ o(
|
|
267
|
+
/* @__PURE__ */ o(sn, { onClick: Te, label: u }),
|
|
262
268
|
/* @__PURE__ */ o(on, { onClick: Ne, label: v })
|
|
263
269
|
] }),
|
|
264
270
|
children: /* @__PURE__ */ X("div", { className: "px-6 py-4", children: [
|
|
265
|
-
/* @__PURE__ */ o("p", { className: "text-secondary mb-4 break-words", children:
|
|
271
|
+
/* @__PURE__ */ o("p", { className: "text-secondary mb-4 break-words", children: U }),
|
|
266
272
|
m ? /* @__PURE__ */ o(
|
|
267
273
|
Jo,
|
|
268
274
|
{
|
|
269
275
|
elementId: "single-file-conflict",
|
|
270
|
-
radioButtons:
|
|
276
|
+
radioButtons: Y,
|
|
271
277
|
activeRadioButton: I,
|
|
272
278
|
orientation: ea.Column,
|
|
273
279
|
onChange: (W) => S(W)
|
|
@@ -277,34 +283,34 @@ const ia = ({
|
|
|
277
283
|
{
|
|
278
284
|
elementId: "multiple-files-conflict",
|
|
279
285
|
radioButtons: xe,
|
|
280
|
-
activeRadioButton:
|
|
286
|
+
activeRadioButton: O,
|
|
281
287
|
orientation: ea.Column,
|
|
282
|
-
onChange: (W) =>
|
|
288
|
+
onChange: (W) => M(W),
|
|
283
289
|
formItemChildrenClassName: "gap-3"
|
|
284
290
|
}
|
|
285
291
|
)
|
|
286
292
|
] })
|
|
287
293
|
}
|
|
288
294
|
);
|
|
289
|
-
},
|
|
295
|
+
}, Js = ({
|
|
290
296
|
getContextMenuItems: e,
|
|
291
297
|
isRowDisabled: t,
|
|
292
|
-
allowedFileTypes:
|
|
298
|
+
allowedFileTypes: r,
|
|
293
299
|
maxSelectableFileSize: a,
|
|
294
300
|
buttonClassName: n
|
|
295
301
|
}) => {
|
|
296
|
-
const
|
|
302
|
+
const s = ce(e);
|
|
297
303
|
pe(() => {
|
|
298
|
-
|
|
304
|
+
s.current = e;
|
|
299
305
|
}, [e]);
|
|
300
306
|
const l = d(
|
|
301
307
|
(p) => {
|
|
302
308
|
if (!p.data || t(
|
|
303
309
|
p.data,
|
|
304
|
-
|
|
310
|
+
r,
|
|
305
311
|
a
|
|
306
312
|
)) return null;
|
|
307
|
-
const c = p.data ?
|
|
313
|
+
const c = p.data ? s.current?.(p.data) ?? [] : [];
|
|
308
314
|
return c.length ? /* @__PURE__ */ o(
|
|
309
315
|
ht,
|
|
310
316
|
{
|
|
@@ -312,13 +318,13 @@ const ia = ({
|
|
|
312
318
|
allowedPlacements: ["top-start", "top-end", "bottom-start"],
|
|
313
319
|
items: c,
|
|
314
320
|
className: Ee("sticky right-0", n),
|
|
315
|
-
children: /* @__PURE__ */ o(Et, { icon: /* @__PURE__ */ o(ln, { ...
|
|
321
|
+
children: /* @__PURE__ */ o(Et, { icon: /* @__PURE__ */ o(ln, { ...P }) })
|
|
316
322
|
}
|
|
317
323
|
) : null;
|
|
318
324
|
},
|
|
319
|
-
[
|
|
325
|
+
[r, a, n, t]
|
|
320
326
|
);
|
|
321
|
-
return { actionsColumnDef:
|
|
327
|
+
return { actionsColumnDef: j(
|
|
322
328
|
() => ({
|
|
323
329
|
colId: "__actions",
|
|
324
330
|
headerName: "",
|
|
@@ -334,17 +340,17 @@ const ia = ({
|
|
|
334
340
|
}),
|
|
335
341
|
[l]
|
|
336
342
|
) };
|
|
337
|
-
},
|
|
343
|
+
}, er = ({
|
|
338
344
|
onRename: e
|
|
339
345
|
}) => {
|
|
340
|
-
const [t,
|
|
341
|
-
(
|
|
342
|
-
e(
|
|
346
|
+
const [t, r] = z(Rt.Grid), a = d(
|
|
347
|
+
(s) => {
|
|
348
|
+
e(s), r(Rt.Grid);
|
|
343
349
|
},
|
|
344
350
|
[e]
|
|
345
351
|
), n = d(
|
|
346
|
-
(
|
|
347
|
-
e(
|
|
352
|
+
(s) => {
|
|
353
|
+
e(s), r(Rt.Tree);
|
|
348
354
|
},
|
|
349
355
|
[e]
|
|
350
356
|
);
|
|
@@ -354,64 +360,64 @@ const ia = ({
|
|
|
354
360
|
onTreeRename: n
|
|
355
361
|
};
|
|
356
362
|
};
|
|
357
|
-
function
|
|
358
|
-
const
|
|
363
|
+
function tr(e, t) {
|
|
364
|
+
const r = ce(null), [a, n] = z(!1);
|
|
359
365
|
return pe(() => {
|
|
360
|
-
if (!
|
|
361
|
-
const
|
|
366
|
+
if (!r.current) return;
|
|
367
|
+
const s = new ResizeObserver(([l]) => {
|
|
362
368
|
const i = l.contentRect.width;
|
|
363
369
|
n(i < e);
|
|
364
370
|
});
|
|
365
|
-
return
|
|
366
|
-
}, [e, t]), { containerRef:
|
|
371
|
+
return s.observe(t?.current || r?.current), () => s.disconnect();
|
|
372
|
+
}, [e, t]), { containerRef: r, isBelowBreakpoint: a };
|
|
367
373
|
}
|
|
368
|
-
var
|
|
374
|
+
var nr = /* @__PURE__ */ ((e) => (e.MULTIPLE = "MULTIPLE", e.SINGLE = "SINGLE", e))(nr || {});
|
|
369
375
|
const Ke = (e, t) => {
|
|
370
376
|
if (!(!e || !e.length || !t))
|
|
371
|
-
for (const
|
|
372
|
-
if (
|
|
373
|
-
const a = Ke(
|
|
377
|
+
for (const r of e) {
|
|
378
|
+
if (r.path === t) return r;
|
|
379
|
+
const a = Ke(r.items, t);
|
|
374
380
|
if (a) return a;
|
|
375
381
|
}
|
|
376
382
|
}, It = (e, t) => {
|
|
377
383
|
if (!e?.length) return;
|
|
378
384
|
if (!t) return e[0];
|
|
379
|
-
const
|
|
380
|
-
if (
|
|
385
|
+
const r = Ke(e, t);
|
|
386
|
+
if (r && r.nodeType === L.FOLDER) return r;
|
|
381
387
|
const a = t.split("/").filter(Boolean);
|
|
382
388
|
if (a.length <= 1) return e[0];
|
|
383
389
|
const n = "/" + a.slice(0, a.length - 1).join("/");
|
|
384
390
|
return Ke(e, n) ?? e[0];
|
|
385
|
-
}, Ft = (e) => (e ?? "").toLowerCase(),
|
|
391
|
+
}, Ft = (e) => (e ?? "").toLowerCase(), or = (e) => Ft(e).replace(/^\./, ""), ar = (e) => {
|
|
386
392
|
if (!e) return [];
|
|
387
|
-
const t = [],
|
|
393
|
+
const t = [], r = (a) => {
|
|
388
394
|
const n = a.items ?? [];
|
|
389
|
-
for (const
|
|
390
|
-
t.push(
|
|
395
|
+
for (const s of n)
|
|
396
|
+
t.push(s), s.nodeType === L.FOLDER && r(s);
|
|
391
397
|
};
|
|
392
|
-
return
|
|
393
|
-
}, Ta = (e) => (e.name ?? e.path.split("/").pop() ?? "").startsWith("."),
|
|
398
|
+
return r(e), t;
|
|
399
|
+
}, Ta = (e) => (e.name ?? e.path.split("/").pop() ?? "").startsWith("."), rn = (e) => {
|
|
394
400
|
if (!e) return "0 bytes";
|
|
395
|
-
const t = 1024,
|
|
396
|
-
return e >=
|
|
397
|
-
},
|
|
401
|
+
const t = 1024, r = t * 1024;
|
|
402
|
+
return e >= r ? `${(e / r).toFixed(1)} MB` : e >= t ? `${(e / t).toFixed(0)} KB` : `${e} bytes`;
|
|
403
|
+
}, sr = (e, t = "en-US", r = {
|
|
398
404
|
year: "numeric",
|
|
399
405
|
month: "short",
|
|
400
406
|
day: "2-digit"
|
|
401
407
|
}) => {
|
|
402
408
|
if (!e) return "";
|
|
403
409
|
try {
|
|
404
|
-
return new Intl.DateTimeFormat(t,
|
|
410
|
+
return new Intl.DateTimeFormat(t, r).format(new Date(e));
|
|
405
411
|
} catch {
|
|
406
412
|
return e;
|
|
407
413
|
}
|
|
408
414
|
};
|
|
409
|
-
function Uo(e, t,
|
|
415
|
+
function Uo(e, t, r) {
|
|
410
416
|
if (!e || e.includes("*/*"))
|
|
411
417
|
return !0;
|
|
412
|
-
const a = t.toLowerCase(), n =
|
|
413
|
-
return e.some((
|
|
414
|
-
const l =
|
|
418
|
+
const a = t.toLowerCase(), n = r && r.includes(".") ? `.${r.split(".").at(-1).toLowerCase()}` : void 0;
|
|
419
|
+
return e.some((s) => {
|
|
420
|
+
const l = s.toLowerCase();
|
|
415
421
|
if (l.startsWith("."))
|
|
416
422
|
return n === l;
|
|
417
423
|
if (l.endsWith("/*")) {
|
|
@@ -421,99 +427,108 @@ function Uo(e, t, s) {
|
|
|
421
427
|
return a === l;
|
|
422
428
|
});
|
|
423
429
|
}
|
|
424
|
-
const
|
|
425
|
-
const [t,
|
|
426
|
-
return t === "*" ? ["all"] :
|
|
430
|
+
const rr = (e) => e?.map((t) => t.endsWith("/*") ? t.replace("/*", "s") : ir(t).flat().map((r) => `.${r}`)).flat().join(", ") || "", ir = (e) => {
|
|
431
|
+
const [t, r] = e.split("/");
|
|
432
|
+
return t === "*" ? ["all"] : r === "*" ? Object.entries(oa).reduce((a, [n, s]) => {
|
|
427
433
|
const [l] = n.split("/");
|
|
428
|
-
return l === t && a.push(...
|
|
434
|
+
return l === t && a.push(...s), a;
|
|
429
435
|
}, []) : oa[e] || [];
|
|
430
436
|
}, Zn = (e) => {
|
|
431
437
|
if (!e) return;
|
|
432
438
|
const t = e.flags.replace(/[gy]/g, "");
|
|
433
439
|
return new RegExp(e.source, t);
|
|
434
440
|
};
|
|
435
|
-
function Go(e, t,
|
|
441
|
+
function Go(e, t, r) {
|
|
436
442
|
if (t && Zn(t)?.test(e.name))
|
|
437
|
-
return
|
|
443
|
+
return r ?? `This ${e.isFolder ? "folder" : "file"} contains forbidden characters in its name. Please rename it.`;
|
|
438
444
|
}
|
|
439
|
-
const
|
|
445
|
+
const lr = (e) => {
|
|
440
446
|
const t = e.lastIndexOf("/");
|
|
441
447
|
return t >= 0 ? {
|
|
442
448
|
parent: e.slice(0, t),
|
|
443
449
|
name: e.slice(t + 1)
|
|
444
450
|
} : { parent: "", name: e };
|
|
445
|
-
},
|
|
446
|
-
const a = !e.contentLength ||
|
|
451
|
+
}, cr = (e, t, r) => {
|
|
452
|
+
const a = !e.contentLength || r == null || e.contentLength <= r, n = !e.contentType || Uo(t, e.contentType, e.name);
|
|
447
453
|
return a && n;
|
|
448
|
-
},
|
|
449
|
-
if (e.nodeType ===
|
|
450
|
-
const
|
|
454
|
+
}, dr = (e, t, r, a, n) => {
|
|
455
|
+
if (e.nodeType === L.FOLDER) return;
|
|
456
|
+
const s = !e.contentLength || r == null || e.contentLength <= r;
|
|
451
457
|
if (!(!e.contentType || Uo(t, e.contentType, e.name)))
|
|
452
|
-
return a ?? (t?.length ? `Unsupported file type. Supported types: ${
|
|
453
|
-
if (!
|
|
454
|
-
return n ?? `File is too large. Maximum size: ${
|
|
455
|
-
},
|
|
456
|
-
|
|
458
|
+
return a ?? (t?.length ? `Unsupported file type. Supported types: ${rr(t)}.` : "Unsupported file type.");
|
|
459
|
+
if (!s)
|
|
460
|
+
return n ?? `File is too large. Maximum size: ${rn(r)}.`;
|
|
461
|
+
}, ur = new Intl.Collator(void 0, {
|
|
462
|
+
sensitivity: "base",
|
|
463
|
+
numeric: !0
|
|
464
|
+
}), hr = (e, t, r, a, n) => {
|
|
465
|
+
if (typeof e == "string" && typeof t == "string" && e && t) {
|
|
466
|
+
const s = ur.compare(e, t);
|
|
467
|
+
return s === 0 ? 0 : s > 0 ? 1 : -1;
|
|
468
|
+
}
|
|
469
|
+
return e === t ? 0 : e ? t ? e > t ? 1 : -1 : n ? 1 : -1 : n ? -1 : 1;
|
|
470
|
+
}, pr = (e) => e.replace(/\/+$/, "").split("/").filter(Boolean).length, Kt = (e) => {
|
|
471
|
+
const t = `${sa} `, r = new RegExp(`^${sa} (\\d+)$`), a = new Set(
|
|
457
472
|
e.map((i) => i.name.toLowerCase())
|
|
458
473
|
), n = e.map((i) => {
|
|
459
|
-
const p = i.name.match(
|
|
474
|
+
const p = i.name.match(r);
|
|
460
475
|
return p ? parseInt(p[1], 10) : 0;
|
|
461
476
|
}).reduce((i, p) => Math.max(i, p), 0);
|
|
462
|
-
let
|
|
463
|
-
for (; a.has(
|
|
464
|
-
l++,
|
|
465
|
-
return
|
|
466
|
-
},
|
|
467
|
-
const [t,
|
|
477
|
+
let s = `${t}${n + 1}`, l = n + 1;
|
|
478
|
+
for (; a.has(s.toLowerCase()); )
|
|
479
|
+
l++, s = `${t}${l}`;
|
|
480
|
+
return s;
|
|
481
|
+
}, fr = (e) => {
|
|
482
|
+
const [t, r] = z(e?.showHiddenFiles ?? !1), a = !!e?.onShowHiddenFilesChange, n = a ? e.showHiddenFiles ?? !1 : t, s = d(
|
|
468
483
|
(i) => {
|
|
469
|
-
a ? e?.onShowHiddenFilesChange?.(i) :
|
|
484
|
+
a ? e?.onShowHiddenFilesChange?.(i) : r(i);
|
|
470
485
|
},
|
|
471
486
|
[a, e]
|
|
472
487
|
), l = d(() => {
|
|
473
488
|
const i = !n;
|
|
474
|
-
a ? e?.onShowHiddenFilesChange?.(i) :
|
|
489
|
+
a ? e?.onShowHiddenFilesChange?.(i) : r(i);
|
|
475
490
|
}, [n, a, e]);
|
|
476
491
|
return {
|
|
477
492
|
areHiddenFilesVisible: n,
|
|
478
493
|
toggleHiddenFilesVisibility: l,
|
|
479
|
-
setAreHiddenFilesVisible:
|
|
494
|
+
setAreHiddenFilesVisible: s
|
|
480
495
|
};
|
|
481
|
-
},
|
|
482
|
-
const [t,
|
|
496
|
+
}, mr = (e) => {
|
|
497
|
+
const [t, r] = z(
|
|
483
498
|
e?.collapsed ?? !1
|
|
484
|
-
), a = !!e?.onCollapseChange, n = a ? e.collapsed ?? !1 : t,
|
|
499
|
+
), a = !!e?.onCollapseChange, n = a ? e.collapsed ?? !1 : t, s = d(
|
|
485
500
|
(i) => {
|
|
486
|
-
a ? e?.onCollapseChange?.(i) :
|
|
501
|
+
a ? e?.onCollapseChange?.(i) : r(i);
|
|
487
502
|
},
|
|
488
503
|
[a, e]
|
|
489
504
|
), l = d(() => {
|
|
490
505
|
const i = !n;
|
|
491
|
-
a ? e?.onCollapseChange?.(i) :
|
|
506
|
+
a ? e?.onCollapseChange?.(i) : r(i);
|
|
492
507
|
}, [n, a, e]);
|
|
493
508
|
return {
|
|
494
509
|
isTreeCollapsed: n,
|
|
495
510
|
toggleTreeCollapse: l,
|
|
496
|
-
setIsTreeCollapsed:
|
|
511
|
+
setIsTreeCollapsed: s
|
|
497
512
|
};
|
|
498
|
-
}, la = (e, t,
|
|
513
|
+
}, la = (e, t, r) => {
|
|
499
514
|
if (!t.has(e))
|
|
500
515
|
return e;
|
|
501
|
-
const a =
|
|
516
|
+
const a = r === L.FOLDER ? (n, s) => `${n} (${s})` : (n, s) => {
|
|
502
517
|
const l = n.lastIndexOf("."), i = l > 0, p = i ? n.slice(0, l) : n, C = i ? n.slice(l) : "";
|
|
503
|
-
return `${p} (${
|
|
518
|
+
return `${p} (${s})${C}`;
|
|
504
519
|
};
|
|
505
520
|
for (let n = 1; ; n++) {
|
|
506
|
-
const
|
|
507
|
-
if (!t.has(
|
|
521
|
+
const s = a(e, n);
|
|
522
|
+
if (!t.has(s)) return s;
|
|
508
523
|
}
|
|
509
524
|
}, Io = (e) => e.name, Ra = ({
|
|
510
525
|
getDestinationFiles: e,
|
|
511
526
|
onResolve: t
|
|
512
527
|
}) => {
|
|
513
|
-
const [
|
|
514
|
-
p.current = !0, a(f),
|
|
528
|
+
const [r, a] = z([]), [n, s] = z(!1), [l, i] = z(null), p = ce(!1), C = d((f) => {
|
|
529
|
+
p.current = !0, a(f), s(!0);
|
|
515
530
|
}, []), c = d(() => {
|
|
516
|
-
p.current = !1,
|
|
531
|
+
p.current = !1, s(!1), a([]), i(null);
|
|
517
532
|
}, []), v = d(
|
|
518
533
|
(f, T) => {
|
|
519
534
|
const x = e(f), F = new Set(x.map(Io)), I = T.filter((S) => F.has(S.name));
|
|
@@ -526,13 +541,13 @@ const cs = (e) => {
|
|
|
526
541
|
), u = d(
|
|
527
542
|
(f, T, x, F) => {
|
|
528
543
|
const I = e(f), S = new Set(I.map(Io));
|
|
529
|
-
return T.map((
|
|
530
|
-
const
|
|
531
|
-
return (!x || !
|
|
532
|
-
sourceUrl:
|
|
533
|
-
destinationUrl: `${f}/${
|
|
534
|
-
overwrite: x &&
|
|
535
|
-
nodeType:
|
|
544
|
+
return T.map((O) => {
|
|
545
|
+
const M = O.name, V = S.has(M), A = x && V ? M : la(M, S, O.nodeType);
|
|
546
|
+
return (!x || !V) && S.add(A), {
|
|
547
|
+
sourceUrl: O.path,
|
|
548
|
+
destinationUrl: `${f}/${A}`,
|
|
549
|
+
overwrite: x && V,
|
|
550
|
+
nodeType: O.nodeType ?? L.ITEM,
|
|
536
551
|
...F ?? {}
|
|
537
552
|
};
|
|
538
553
|
});
|
|
@@ -541,13 +556,13 @@ const cs = (e) => {
|
|
|
541
556
|
), y = d(
|
|
542
557
|
(f, T, x, F) => {
|
|
543
558
|
const I = e(f), S = new Set(I.map(Io));
|
|
544
|
-
return T.filter((
|
|
545
|
-
const
|
|
546
|
-
return
|
|
547
|
-
sourceUrl:
|
|
559
|
+
return T.filter((M) => x.get(M.path) !== Ce.Cancel).map((M) => {
|
|
560
|
+
const V = x.get(M.path), A = S.has(M.name), _ = V === Ce.Replace && A, B = _ ? M.name : la(M.name, S, M.nodeType);
|
|
561
|
+
return _ || S.add(B), {
|
|
562
|
+
sourceUrl: M.path,
|
|
548
563
|
destinationUrl: `${f}/${B}`,
|
|
549
|
-
overwrite:
|
|
550
|
-
nodeType:
|
|
564
|
+
overwrite: _,
|
|
565
|
+
nodeType: M.nodeType ?? L.ITEM,
|
|
551
566
|
...F ?? {}
|
|
552
567
|
};
|
|
553
568
|
});
|
|
@@ -597,7 +612,7 @@ const cs = (e) => {
|
|
|
597
612
|
T,
|
|
598
613
|
f,
|
|
599
614
|
new Map(
|
|
600
|
-
|
|
615
|
+
r.map((I) => [
|
|
601
616
|
I.path,
|
|
602
617
|
Ce.Cancel
|
|
603
618
|
])
|
|
@@ -607,7 +622,7 @@ const cs = (e) => {
|
|
|
607
622
|
t?.(F, T), c();
|
|
608
623
|
}, [
|
|
609
624
|
c,
|
|
610
|
-
|
|
625
|
+
r,
|
|
611
626
|
t,
|
|
612
627
|
l,
|
|
613
628
|
y
|
|
@@ -615,7 +630,7 @@ const cs = (e) => {
|
|
|
615
630
|
(f) => {
|
|
616
631
|
if (!l) return;
|
|
617
632
|
const { files: T, destinationFolder: x, metadata: F } = l, I = new Map(
|
|
618
|
-
f.map((
|
|
633
|
+
f.map((O) => [O.file.path, O.action])
|
|
619
634
|
), S = y(
|
|
620
635
|
x,
|
|
621
636
|
T,
|
|
@@ -632,7 +647,7 @@ const cs = (e) => {
|
|
|
632
647
|
]
|
|
633
648
|
);
|
|
634
649
|
return {
|
|
635
|
-
conflictingFiles:
|
|
650
|
+
conflictingFiles: r,
|
|
636
651
|
conflictResolutionOpen: n,
|
|
637
652
|
hasActiveConflictRef: p,
|
|
638
653
|
checkForConflicts: v,
|
|
@@ -646,13 +661,13 @@ const cs = (e) => {
|
|
|
646
661
|
handleCancelAll: D,
|
|
647
662
|
handleDecideForEach: h
|
|
648
663
|
};
|
|
649
|
-
},
|
|
664
|
+
}, Cr = ({
|
|
650
665
|
getDestinationFiles: e,
|
|
651
666
|
onCopyFiles: t,
|
|
652
|
-
onMoveToFiles:
|
|
667
|
+
onMoveToFiles: r,
|
|
653
668
|
onCopySuccess: a,
|
|
654
669
|
onMoveSuccess: n,
|
|
655
|
-
onDuplicateSuccess:
|
|
670
|
+
onDuplicateSuccess: s,
|
|
656
671
|
getCopyHeader: l,
|
|
657
672
|
getMoveHeader: i
|
|
658
673
|
}) => {
|
|
@@ -662,24 +677,24 @@ const cs = (e) => {
|
|
|
662
677
|
hasActiveConflictRef: F,
|
|
663
678
|
startConflictResolution: I,
|
|
664
679
|
resolveConflictsWithStrategy: S,
|
|
665
|
-
closeConflictResolution:
|
|
666
|
-
openConflictResolution:
|
|
667
|
-
handleReplaceAll:
|
|
668
|
-
handleDuplicateAll:
|
|
669
|
-
handleCancelAll:
|
|
680
|
+
closeConflictResolution: O,
|
|
681
|
+
openConflictResolution: M,
|
|
682
|
+
handleReplaceAll: V,
|
|
683
|
+
handleDuplicateAll: A,
|
|
684
|
+
handleCancelAll: _,
|
|
670
685
|
handleDecideForEach: B
|
|
671
686
|
} = Ra({
|
|
672
687
|
getDestinationFiles: e,
|
|
673
688
|
onResolve: (G, ne) => {
|
|
674
|
-
G?.length && (h?.type === ge.Copy ? (t?.(G, ne), a?.()) : h?.type === ge.Move && h.sourceFolder && (
|
|
689
|
+
G?.length && (h?.type === ge.Copy ? (t?.(G, ne), a?.()) : h?.type === ge.Move && h.sourceFolder && (r?.(
|
|
675
690
|
G,
|
|
676
691
|
h.sourceFolder,
|
|
677
692
|
ne
|
|
678
693
|
), n?.()));
|
|
679
694
|
}
|
|
680
|
-
}),
|
|
695
|
+
}), k = d(() => {
|
|
681
696
|
v([]), y([]), f(null), D(void 0);
|
|
682
|
-
}, []),
|
|
697
|
+
}, []), Q = d(
|
|
683
698
|
(G) => {
|
|
684
699
|
const ne = I(G, c, {
|
|
685
700
|
type: ge.Copy
|
|
@@ -690,7 +705,7 @@ const cs = (e) => {
|
|
|
690
705
|
c,
|
|
691
706
|
!1
|
|
692
707
|
);
|
|
693
|
-
t?.(he, G), a?.(),
|
|
708
|
+
t?.(he, G), a?.(), k();
|
|
694
709
|
}
|
|
695
710
|
},
|
|
696
711
|
[
|
|
@@ -699,9 +714,9 @@ const cs = (e) => {
|
|
|
699
714
|
S,
|
|
700
715
|
t,
|
|
701
716
|
a,
|
|
702
|
-
|
|
717
|
+
k
|
|
703
718
|
]
|
|
704
|
-
),
|
|
719
|
+
), te = d(
|
|
705
720
|
(G, ne) => {
|
|
706
721
|
const he = ne || (h?.sourceFolder ?? "/");
|
|
707
722
|
if (!I(G, u, {
|
|
@@ -713,29 +728,29 @@ const cs = (e) => {
|
|
|
713
728
|
u,
|
|
714
729
|
!0
|
|
715
730
|
);
|
|
716
|
-
|
|
731
|
+
r?.(Oe, he, G), n?.(), k();
|
|
717
732
|
}
|
|
718
733
|
},
|
|
719
734
|
[
|
|
720
735
|
u,
|
|
721
736
|
I,
|
|
722
737
|
S,
|
|
723
|
-
|
|
738
|
+
r,
|
|
724
739
|
n,
|
|
725
|
-
|
|
740
|
+
k,
|
|
726
741
|
h
|
|
727
742
|
]
|
|
728
|
-
),
|
|
729
|
-
|
|
730
|
-
}, [
|
|
731
|
-
|
|
732
|
-
}, [
|
|
733
|
-
|
|
734
|
-
}, [
|
|
743
|
+
), U = d(() => {
|
|
744
|
+
V(), k();
|
|
745
|
+
}, [V, k]), Y = d(() => {
|
|
746
|
+
A(), k();
|
|
747
|
+
}, [A, k]), fe = d(() => {
|
|
748
|
+
_(), k();
|
|
749
|
+
}, [_, k]), we = d(
|
|
735
750
|
(G) => {
|
|
736
|
-
B(G),
|
|
751
|
+
B(G), k();
|
|
737
752
|
},
|
|
738
|
-
[B,
|
|
753
|
+
[B, k]
|
|
739
754
|
), xe = d(
|
|
740
755
|
(G) => {
|
|
741
756
|
const ne = G.at(0)?.parentPath ?? "/", he = S(
|
|
@@ -743,17 +758,17 @@ const cs = (e) => {
|
|
|
743
758
|
G,
|
|
744
759
|
!1
|
|
745
760
|
);
|
|
746
|
-
t?.(he, ne),
|
|
761
|
+
t?.(he, ne), s?.();
|
|
747
762
|
},
|
|
748
|
-
[t,
|
|
763
|
+
[t, s, S]
|
|
749
764
|
), ue = d(
|
|
750
765
|
(G) => {
|
|
751
766
|
m(G), C(!0);
|
|
752
767
|
},
|
|
753
768
|
[]
|
|
754
769
|
), Te = d(() => {
|
|
755
|
-
C(!1), F.current ||
|
|
756
|
-
}, [
|
|
770
|
+
C(!1), F.current || k();
|
|
771
|
+
}, [k, F]), [Ne, W] = z(), be = d(
|
|
757
772
|
(G) => {
|
|
758
773
|
v(G);
|
|
759
774
|
const ne = G[0]?.parentPath ?? G[0]?.folderId;
|
|
@@ -775,37 +790,37 @@ const cs = (e) => {
|
|
|
775
790
|
handleDuplicate: xe,
|
|
776
791
|
handleCloseDestinationFolderPopup: Te,
|
|
777
792
|
handleOpenDestinationFolderPopup: ue,
|
|
778
|
-
handleCopyTo:
|
|
779
|
-
handleMoveTo:
|
|
793
|
+
handleCopyTo: Q,
|
|
794
|
+
handleMoveTo: te,
|
|
780
795
|
openDestinationFolderPopup: p,
|
|
781
796
|
destinationFolderMode: g,
|
|
782
797
|
destinationFolderTitle: Ne,
|
|
783
798
|
handleSetCopiedFiles: be,
|
|
784
799
|
handleSetMovedFiles: De,
|
|
785
|
-
clearState:
|
|
800
|
+
clearState: k,
|
|
786
801
|
conflictingFiles: T,
|
|
787
802
|
conflictResolutionOpen: x,
|
|
788
|
-
openConflictResolution:
|
|
789
|
-
closeConflictResolution:
|
|
790
|
-
handleConflictReplace:
|
|
803
|
+
openConflictResolution: M,
|
|
804
|
+
closeConflictResolution: O,
|
|
805
|
+
handleConflictReplace: U,
|
|
791
806
|
handleConflictCancel: fe,
|
|
792
|
-
handleConflictDuplicate:
|
|
807
|
+
handleConflictDuplicate: Y,
|
|
793
808
|
handleConflictDecideForEach: we,
|
|
794
809
|
sourceFolder: b
|
|
795
810
|
};
|
|
796
|
-
},
|
|
811
|
+
}, gr = ({
|
|
797
812
|
path: e,
|
|
798
813
|
defaultPath: t,
|
|
799
|
-
onPathChange:
|
|
814
|
+
onPathChange: r,
|
|
800
815
|
onSelectionClear: a
|
|
801
816
|
}) => {
|
|
802
|
-
const n = e !== void 0, [
|
|
817
|
+
const n = e !== void 0, [s, l] = z(
|
|
803
818
|
t
|
|
804
|
-
), i = n ? e :
|
|
819
|
+
), i = n ? e : s, p = d(
|
|
805
820
|
(c) => {
|
|
806
|
-
n || l(c),
|
|
821
|
+
n || l(c), r?.(c);
|
|
807
822
|
},
|
|
808
|
-
[n,
|
|
823
|
+
[n, r]
|
|
809
824
|
), C = d(
|
|
810
825
|
(c) => {
|
|
811
826
|
p(c), a?.();
|
|
@@ -817,17 +832,17 @@ const cs = (e) => {
|
|
|
817
832
|
setCurrentPath: p,
|
|
818
833
|
handlePathChange: C
|
|
819
834
|
};
|
|
820
|
-
},
|
|
835
|
+
}, vr = ({
|
|
821
836
|
onDeleteFiles: e,
|
|
822
837
|
onDeleteSuccess: t
|
|
823
838
|
}) => {
|
|
824
|
-
const [
|
|
839
|
+
const [r, a] = z(!1), [n, s] = z([]), [l, i] = z(""), p = d(
|
|
825
840
|
(v, u) => {
|
|
826
|
-
|
|
841
|
+
s(v), i(u), a(!0);
|
|
827
842
|
},
|
|
828
843
|
[]
|
|
829
844
|
), C = d(() => {
|
|
830
|
-
a(!1),
|
|
845
|
+
a(!1), s([]);
|
|
831
846
|
}, []), c = d(() => {
|
|
832
847
|
if (e && n.length > 0) {
|
|
833
848
|
const v = n.map((u) => ({
|
|
@@ -845,52 +860,52 @@ const cs = (e) => {
|
|
|
845
860
|
l
|
|
846
861
|
]);
|
|
847
862
|
return {
|
|
848
|
-
deleteConfirmationOpen:
|
|
863
|
+
deleteConfirmationOpen: r,
|
|
849
864
|
itemsToDelete: n,
|
|
850
865
|
openDeleteConfirmation: p,
|
|
851
866
|
closeDeleteConfirmation: C,
|
|
852
867
|
confirmDelete: c
|
|
853
868
|
};
|
|
854
|
-
},
|
|
869
|
+
}, yr = ({
|
|
855
870
|
onDownloadFiles: e,
|
|
856
871
|
customDownloadItemsAction: t,
|
|
857
|
-
onDownloadSuccess:
|
|
872
|
+
onDownloadSuccess: r
|
|
858
873
|
}) => ({
|
|
859
874
|
handleDownloadFiles: d(
|
|
860
875
|
(n) => {
|
|
861
|
-
t && n.length > 0 ? t(n) : e && n.length > 0 && (e(n),
|
|
876
|
+
t && n.length > 0 ? t(n) : e && n.length > 0 && (e(n), r?.());
|
|
862
877
|
},
|
|
863
|
-
[e,
|
|
878
|
+
[e, r, t]
|
|
864
879
|
)
|
|
865
|
-
}),
|
|
880
|
+
}), wr = (e) => "dataTransfer" in e && e.dataTransfer !== null, Nr = ({
|
|
866
881
|
onUploadFiles: e,
|
|
867
882
|
onValidateUpload: t,
|
|
868
|
-
maxFileSize:
|
|
883
|
+
maxFileSize: r,
|
|
869
884
|
allowedFileTypes: a,
|
|
870
885
|
validationMessages: n = {},
|
|
871
|
-
onUploadArchive:
|
|
886
|
+
onUploadArchive: s,
|
|
872
887
|
prepareUploadFileName: l,
|
|
873
888
|
uploadEnabled: i = !0,
|
|
874
889
|
currentFolder: p
|
|
875
890
|
} = {}) => {
|
|
876
|
-
const [C, c] = z(!1), [v, u] = z(!1), [y, g] = z(), m = ce(null), b = ce(""), D = ce([]), h =
|
|
891
|
+
const [C, c] = z(!1), [v, u] = z(!1), [y, g] = z(), m = ce(null), b = ce(""), D = ce([]), h = j(() => !!p?.permissions?.includes(St.WRITE), [p]), [f, T] = z(/* @__PURE__ */ new Map()), [x, F] = z(null), I = d(
|
|
877
892
|
(R) => !a || a.includes("*/*") ? R : R.filter(
|
|
878
|
-
({ fileContent: H, name:
|
|
893
|
+
({ fileContent: H, name: $ }) => Uo(a, H.type, $)
|
|
879
894
|
),
|
|
880
895
|
[a]
|
|
881
896
|
), S = d(() => {
|
|
882
897
|
T(/* @__PURE__ */ new Map()), F(null);
|
|
883
898
|
}, []), {
|
|
884
|
-
conflictingFiles:
|
|
885
|
-
conflictResolutionOpen:
|
|
886
|
-
hasActiveConflictRef:
|
|
887
|
-
startConflictResolution:
|
|
888
|
-
closeConflictResolution:
|
|
899
|
+
conflictingFiles: O,
|
|
900
|
+
conflictResolutionOpen: M,
|
|
901
|
+
hasActiveConflictRef: V,
|
|
902
|
+
startConflictResolution: A,
|
|
903
|
+
closeConflictResolution: _,
|
|
889
904
|
openConflictResolution: B,
|
|
890
|
-
handleReplaceAll:
|
|
891
|
-
handleDuplicateAll:
|
|
892
|
-
handleCancelAll:
|
|
893
|
-
handleDecideForEach:
|
|
905
|
+
handleReplaceAll: k,
|
|
906
|
+
handleDuplicateAll: Q,
|
|
907
|
+
handleCancelAll: te,
|
|
908
|
+
handleDecideForEach: U
|
|
894
909
|
} = Ra({
|
|
895
910
|
getDestinationFiles: () => D.current,
|
|
896
911
|
onResolve: (R, H) => {
|
|
@@ -899,77 +914,77 @@ const cs = (e) => {
|
|
|
899
914
|
return;
|
|
900
915
|
}
|
|
901
916
|
if (!x) return;
|
|
902
|
-
const
|
|
903
|
-
const Z = f.get(
|
|
917
|
+
const $ = R.map((J) => {
|
|
918
|
+
const Z = f.get(J.sourceUrl);
|
|
904
919
|
if (!Z)
|
|
905
920
|
return;
|
|
906
|
-
const me =
|
|
921
|
+
const me = J.destinationUrl.split("/").pop();
|
|
907
922
|
return {
|
|
908
923
|
fileContent: Z.fileContent,
|
|
909
924
|
name: me
|
|
910
925
|
};
|
|
911
926
|
}).filter(Boolean);
|
|
912
|
-
if (
|
|
913
|
-
const { fileContent:
|
|
914
|
-
|
|
915
|
-
} else
|
|
927
|
+
if ($[0]?.fileContent?.type === "application/zip") {
|
|
928
|
+
const { fileContent: J, name: Z } = $[0];
|
|
929
|
+
s?.(J, Z, H);
|
|
930
|
+
} else $.length > 0 && e?.($, H);
|
|
916
931
|
S();
|
|
917
932
|
}
|
|
918
933
|
});
|
|
919
934
|
pe(() => {
|
|
920
|
-
i && h || (c(!1), u(!1), g(void 0),
|
|
935
|
+
i && h || (c(!1), u(!1), g(void 0), _(), S());
|
|
921
936
|
}, [
|
|
922
937
|
i,
|
|
923
|
-
|
|
938
|
+
_,
|
|
924
939
|
S,
|
|
925
940
|
h
|
|
926
941
|
]), pe(() => {
|
|
927
942
|
if (!i || !h) return;
|
|
928
943
|
let R = 0;
|
|
929
944
|
const H = (me) => {
|
|
930
|
-
|
|
931
|
-
},
|
|
945
|
+
wr(me) && me.dataTransfer.types.includes(Zs) && (R++, u(!0));
|
|
946
|
+
}, $ = () => {
|
|
932
947
|
R--, R === 0 && u(!1);
|
|
933
|
-
},
|
|
948
|
+
}, J = () => {
|
|
934
949
|
R = 0, u(!1);
|
|
935
950
|
}, Z = (me) => {
|
|
936
951
|
me.preventDefault();
|
|
937
952
|
};
|
|
938
|
-
return window.addEventListener("dragenter", H), window.addEventListener("dragleave",
|
|
939
|
-
window.removeEventListener("dragenter", H), window.removeEventListener("dragleave",
|
|
953
|
+
return window.addEventListener("dragenter", H), window.addEventListener("dragleave", $), window.addEventListener("drop", J), window.addEventListener("dragover", Z), () => {
|
|
954
|
+
window.removeEventListener("dragenter", H), window.removeEventListener("dragleave", $), window.removeEventListener("drop", J), window.removeEventListener("dragover", Z);
|
|
940
955
|
};
|
|
941
956
|
}, [i, h]);
|
|
942
|
-
const
|
|
943
|
-
(R) =>
|
|
944
|
-
[
|
|
957
|
+
const Y = d(
|
|
958
|
+
(R) => r ? R.filter((H) => H.fileContent.size > r).map((H) => H.name) : [],
|
|
959
|
+
[r]
|
|
945
960
|
), fe = d(
|
|
946
|
-
(R, H) => R.map((
|
|
947
|
-
id:
|
|
948
|
-
name:
|
|
961
|
+
(R, H) => R.map(($) => ({
|
|
962
|
+
id: $.name,
|
|
963
|
+
name: $.name,
|
|
949
964
|
folderId: H,
|
|
950
|
-
path:
|
|
951
|
-
nodeType:
|
|
965
|
+
path: $.name,
|
|
966
|
+
nodeType: L.ITEM,
|
|
952
967
|
parentPath: H,
|
|
953
|
-
contentLength:
|
|
968
|
+
contentLength: $.fileContent.size
|
|
954
969
|
})),
|
|
955
970
|
[]
|
|
956
971
|
), we = d(
|
|
957
|
-
async (R, H,
|
|
972
|
+
async (R, H, $) => {
|
|
958
973
|
if (!i || !h) return !1;
|
|
959
|
-
g(void 0), D.current =
|
|
960
|
-
const
|
|
974
|
+
g(void 0), D.current = $;
|
|
975
|
+
const J = l ? R.map((ae) => ({
|
|
961
976
|
...ae,
|
|
962
977
|
name: l(ae.name)
|
|
963
|
-
})) : R, Z =
|
|
978
|
+
})) : R, Z = Y(J);
|
|
964
979
|
if (Z.length > 0) {
|
|
965
|
-
const ae =
|
|
980
|
+
const ae = r ? (r / 1048576).toFixed(2) : 0, Ve = n.oversizedFiles || `Files exceed maximum size (${ae}MB): ${Z.join(", ")}`;
|
|
966
981
|
return g(Ve), !1;
|
|
967
982
|
}
|
|
968
983
|
if (t)
|
|
969
984
|
try {
|
|
970
985
|
const ae = await t(
|
|
971
|
-
|
|
972
|
-
|
|
986
|
+
J,
|
|
987
|
+
$,
|
|
973
988
|
H
|
|
974
989
|
);
|
|
975
990
|
if (!ae.valid)
|
|
@@ -981,43 +996,43 @@ const cs = (e) => {
|
|
|
981
996
|
n.validationError || "Validation error occurred"
|
|
982
997
|
), !1;
|
|
983
998
|
}
|
|
984
|
-
const me = new Map(
|
|
999
|
+
const me = new Map(J.map((ae) => [ae.name, ae]));
|
|
985
1000
|
T(me);
|
|
986
1001
|
const Ae = fe(
|
|
987
|
-
|
|
1002
|
+
J,
|
|
988
1003
|
H
|
|
989
1004
|
);
|
|
990
|
-
return F({ destinationFolder: H }),
|
|
1005
|
+
return F({ destinationFolder: H }), A(H, Ae, {
|
|
991
1006
|
destinationFolder: H
|
|
992
|
-
}).hasConflicts ? !1 : (e?.(
|
|
1007
|
+
}).hasConflicts ? !1 : (e?.(J, H), S(), !0);
|
|
993
1008
|
},
|
|
994
1009
|
[
|
|
995
1010
|
i,
|
|
996
1011
|
e,
|
|
997
1012
|
t,
|
|
998
1013
|
l,
|
|
999
|
-
|
|
1000
|
-
|
|
1014
|
+
Y,
|
|
1015
|
+
r,
|
|
1001
1016
|
n,
|
|
1002
1017
|
fe,
|
|
1003
|
-
|
|
1018
|
+
A,
|
|
1004
1019
|
S,
|
|
1005
1020
|
h
|
|
1006
1021
|
]
|
|
1007
1022
|
), xe = d(() => {
|
|
1008
|
-
|
|
1009
|
-
}, [
|
|
1010
|
-
|
|
1011
|
-
}, [
|
|
1012
|
-
|
|
1013
|
-
}, [
|
|
1023
|
+
k(), S();
|
|
1024
|
+
}, [k, S]), ue = d(() => {
|
|
1025
|
+
Q(), S();
|
|
1026
|
+
}, [Q, S]), Te = d(() => {
|
|
1027
|
+
te(), S();
|
|
1028
|
+
}, [te, S]), Ne = d(
|
|
1014
1029
|
(R) => {
|
|
1015
|
-
|
|
1030
|
+
U(R), S();
|
|
1016
1031
|
},
|
|
1017
|
-
[
|
|
1032
|
+
[U, S]
|
|
1018
1033
|
), W = d(() => {
|
|
1019
|
-
|
|
1020
|
-
}, [
|
|
1034
|
+
_(), V.current || S();
|
|
1035
|
+
}, [_, V, S]), be = d(
|
|
1021
1036
|
(R) => {
|
|
1022
1037
|
!i || !h || (R.preventDefault(), R.stopPropagation(), R.dataTransfer.types.includes("Files") && c(!0));
|
|
1023
1038
|
},
|
|
@@ -1026,8 +1041,8 @@ const cs = (e) => {
|
|
|
1026
1041
|
(R) => {
|
|
1027
1042
|
if (!i || !h) return;
|
|
1028
1043
|
R.preventDefault(), R.stopPropagation();
|
|
1029
|
-
const H = R.currentTarget.getBoundingClientRect(),
|
|
1030
|
-
(
|
|
1044
|
+
const H = R.currentTarget.getBoundingClientRect(), $ = R.clientX, J = R.clientY;
|
|
1045
|
+
($ <= H.left || $ >= H.right || J <= H.top || J >= H.bottom) && c(!1);
|
|
1031
1046
|
},
|
|
1032
1047
|
[i, h]
|
|
1033
1048
|
), G = d(
|
|
@@ -1036,12 +1051,12 @@ const cs = (e) => {
|
|
|
1036
1051
|
},
|
|
1037
1052
|
[i, h]
|
|
1038
1053
|
), ne = d(
|
|
1039
|
-
async (R, H,
|
|
1054
|
+
async (R, H, $) => {
|
|
1040
1055
|
if (!i || !h || (R.preventDefault(), R.stopPropagation(), c(!1), !R.dataTransfer.types.includes("Files")))
|
|
1041
1056
|
return;
|
|
1042
|
-
const
|
|
1057
|
+
const J = Array.from(R.dataTransfer.items || []), Z = [];
|
|
1043
1058
|
let me = !1;
|
|
1044
|
-
if (
|
|
1059
|
+
if (J.length > 0 && J.forEach((ae) => {
|
|
1045
1060
|
if (ae.kind === "file") {
|
|
1046
1061
|
if (ae.webkitGetAsEntry?.()?.isDirectory) {
|
|
1047
1062
|
me = !0;
|
|
@@ -1066,7 +1081,7 @@ const cs = (e) => {
|
|
|
1066
1081
|
);
|
|
1067
1082
|
return;
|
|
1068
1083
|
}
|
|
1069
|
-
await we(Pe, H,
|
|
1084
|
+
await we(Pe, H, $);
|
|
1070
1085
|
},
|
|
1071
1086
|
[
|
|
1072
1087
|
i,
|
|
@@ -1086,11 +1101,11 @@ const cs = (e) => {
|
|
|
1086
1101
|
return;
|
|
1087
1102
|
}
|
|
1088
1103
|
if (!R.files?.length) return;
|
|
1089
|
-
const
|
|
1104
|
+
const $ = Array.from(R.files).map((Z) => ({
|
|
1090
1105
|
fileContent: Z,
|
|
1091
1106
|
name: Z.name
|
|
1092
|
-
})),
|
|
1093
|
-
if (
|
|
1107
|
+
})), J = I($);
|
|
1108
|
+
if (J.length === 0) {
|
|
1094
1109
|
g(
|
|
1095
1110
|
n.unsupportedFiles || "Selected files are not supported"
|
|
1096
1111
|
), R.value = "";
|
|
@@ -1098,7 +1113,7 @@ const cs = (e) => {
|
|
|
1098
1113
|
}
|
|
1099
1114
|
try {
|
|
1100
1115
|
await we(
|
|
1101
|
-
|
|
1116
|
+
J,
|
|
1102
1117
|
b.current,
|
|
1103
1118
|
D.current
|
|
1104
1119
|
);
|
|
@@ -1132,13 +1147,13 @@ const cs = (e) => {
|
|
|
1132
1147
|
[i, h]
|
|
1133
1148
|
), Oe = d(
|
|
1134
1149
|
(R, H) => {
|
|
1135
|
-
if (!
|
|
1136
|
-
const
|
|
1137
|
-
|
|
1138
|
-
const
|
|
1139
|
-
const Z =
|
|
1150
|
+
if (!s || !i || !h) return;
|
|
1151
|
+
const $ = document.createElement("input");
|
|
1152
|
+
$.type = "file", $.accept = ".zip,application/zip", $.multiple = !1, $.style.display = "none";
|
|
1153
|
+
const J = () => {
|
|
1154
|
+
const Z = $.files?.[0];
|
|
1140
1155
|
if (!Z) {
|
|
1141
|
-
document.body.removeChild(
|
|
1156
|
+
document.body.removeChild($);
|
|
1142
1157
|
return;
|
|
1143
1158
|
}
|
|
1144
1159
|
const me = Z.name.replace(/\.zip$/i, ""), Ae = l ? l(me) : me, Pe = {
|
|
@@ -1146,32 +1161,32 @@ const cs = (e) => {
|
|
|
1146
1161
|
name: Ae,
|
|
1147
1162
|
folderId: R,
|
|
1148
1163
|
path: `${R}/${Ae}`,
|
|
1149
|
-
nodeType:
|
|
1164
|
+
nodeType: L.FOLDER,
|
|
1150
1165
|
parentPath: R,
|
|
1151
1166
|
contentLength: Z.size,
|
|
1152
1167
|
contentType: Z.type
|
|
1153
1168
|
};
|
|
1154
1169
|
if (D.current = H, F({ destinationFolder: R }), T(
|
|
1155
1170
|
/* @__PURE__ */ new Map([[Pe.path, { fileContent: Z, name: Ae }]])
|
|
1156
|
-
),
|
|
1171
|
+
), A(R, [Pe], {
|
|
1157
1172
|
destinationFolder: R
|
|
1158
1173
|
}).hasConflicts) {
|
|
1159
|
-
document.body.removeChild(
|
|
1174
|
+
document.body.removeChild($);
|
|
1160
1175
|
return;
|
|
1161
1176
|
}
|
|
1162
1177
|
try {
|
|
1163
|
-
|
|
1178
|
+
s(Z, Ae, R);
|
|
1164
1179
|
} finally {
|
|
1165
|
-
document.body.removeChild(
|
|
1180
|
+
document.body.removeChild($);
|
|
1166
1181
|
}
|
|
1167
1182
|
};
|
|
1168
|
-
|
|
1183
|
+
$.addEventListener("change", J), document.body.appendChild($), $.click();
|
|
1169
1184
|
},
|
|
1170
1185
|
[
|
|
1171
|
-
|
|
1186
|
+
s,
|
|
1172
1187
|
i,
|
|
1173
1188
|
h,
|
|
1174
|
-
|
|
1189
|
+
A,
|
|
1175
1190
|
l
|
|
1176
1191
|
]
|
|
1177
1192
|
), Se = d(() => {
|
|
@@ -1190,9 +1205,9 @@ const cs = (e) => {
|
|
|
1190
1205
|
openFileDialog: _e,
|
|
1191
1206
|
openArchiveDialog: Oe,
|
|
1192
1207
|
fileInputRef: m,
|
|
1193
|
-
uploadConflictingFiles:
|
|
1194
|
-
uploadConflictResolutionOpen:
|
|
1195
|
-
hasActiveUploadConflictRef:
|
|
1208
|
+
uploadConflictingFiles: O,
|
|
1209
|
+
uploadConflictResolutionOpen: M,
|
|
1210
|
+
hasActiveUploadConflictRef: V,
|
|
1196
1211
|
openUploadConflictResolution: B,
|
|
1197
1212
|
closeUploadConflictResolution: W,
|
|
1198
1213
|
handleUploadConflictReplace: xe,
|
|
@@ -1200,26 +1215,26 @@ const cs = (e) => {
|
|
|
1200
1215
|
handleUploadConflictCancel: Te,
|
|
1201
1216
|
handleUploadConflictDecideForEach: Ne
|
|
1202
1217
|
};
|
|
1203
|
-
}, Ia =
|
|
1218
|
+
}, Ia = hs(void 0), Fa = {
|
|
1204
1219
|
hiddenItemWarning: `${Eo.Warning}__A dot at the start of the name will make the item hidden`
|
|
1205
1220
|
}, Ea = {
|
|
1206
1221
|
consecutiveDotsError: "Name cannot contain consecutive dots"
|
|
1207
|
-
},
|
|
1222
|
+
}, Dr = {
|
|
1208
1223
|
emptyName: "Name cannot be empty",
|
|
1209
1224
|
duplicateName: "An item with this name already exists",
|
|
1210
1225
|
hiddenItemWarning: Fa.hiddenItemWarning,
|
|
1211
1226
|
consecutiveDotsError: Ea.consecutiveDotsError
|
|
1212
1227
|
};
|
|
1213
|
-
function
|
|
1228
|
+
function xr(e) {
|
|
1214
1229
|
let t = e.length;
|
|
1215
1230
|
for (; t > 0 && e[t - 1] === "/"; ) t--;
|
|
1216
1231
|
return e.slice(0, t);
|
|
1217
1232
|
}
|
|
1218
|
-
function
|
|
1219
|
-
const
|
|
1220
|
-
return a === -1 ? t :
|
|
1233
|
+
function br(e, t) {
|
|
1234
|
+
const r = xr(e), a = r.lastIndexOf("/");
|
|
1235
|
+
return a === -1 ? t : r.slice(0, a + 1) + t;
|
|
1221
1236
|
}
|
|
1222
|
-
function
|
|
1237
|
+
function Tr(e) {
|
|
1223
1238
|
const t = e.lastIndexOf(".");
|
|
1224
1239
|
return t === -1 || t === 0 ? e : e.substring(0, t);
|
|
1225
1240
|
}
|
|
@@ -1227,48 +1242,48 @@ function ca(e) {
|
|
|
1227
1242
|
const t = e.lastIndexOf(".");
|
|
1228
1243
|
return t === -1 || t === 0 ? "" : e.substring(t);
|
|
1229
1244
|
}
|
|
1230
|
-
const
|
|
1245
|
+
const Rr = ({
|
|
1231
1246
|
items: e,
|
|
1232
1247
|
onRenameValidate: t,
|
|
1233
|
-
validationMessages:
|
|
1248
|
+
validationMessages: r,
|
|
1234
1249
|
onMoveToFiles: a
|
|
1235
1250
|
}) => {
|
|
1236
|
-
const [n,
|
|
1251
|
+
const [n, s] = z(), l = j(
|
|
1237
1252
|
() => ({
|
|
1238
|
-
...
|
|
1239
|
-
...
|
|
1253
|
+
...Dr,
|
|
1254
|
+
...r
|
|
1240
1255
|
}),
|
|
1241
|
-
[
|
|
1242
|
-
), i =
|
|
1256
|
+
[r]
|
|
1257
|
+
), i = j(() => n?.path, [n]), p = d(
|
|
1243
1258
|
(y) => {
|
|
1244
1259
|
const g = Ke(e, y);
|
|
1245
|
-
g &&
|
|
1260
|
+
g && s(g);
|
|
1246
1261
|
},
|
|
1247
1262
|
[e]
|
|
1248
1263
|
), C = d(() => {
|
|
1249
|
-
|
|
1264
|
+
s(void 0);
|
|
1250
1265
|
}, []), c = d(
|
|
1251
1266
|
(y) => {
|
|
1252
1267
|
if (!n || !a) {
|
|
1253
|
-
|
|
1268
|
+
s(void 0);
|
|
1254
1269
|
return;
|
|
1255
1270
|
}
|
|
1256
|
-
const g = n.nodeType ===
|
|
1271
|
+
const g = n.nodeType === L.ITEM;
|
|
1257
1272
|
let m = y.trim();
|
|
1258
1273
|
if (g) {
|
|
1259
1274
|
const f = ca(n.name);
|
|
1260
1275
|
f && !m.endsWith(f) && (m = m + f);
|
|
1261
1276
|
}
|
|
1262
1277
|
if (m === n.name) {
|
|
1263
|
-
|
|
1278
|
+
s(void 0);
|
|
1264
1279
|
return;
|
|
1265
1280
|
}
|
|
1266
|
-
const b =
|
|
1281
|
+
const b = br(
|
|
1267
1282
|
n.path,
|
|
1268
1283
|
m
|
|
1269
1284
|
), D = n.parentPath;
|
|
1270
1285
|
if (!D) {
|
|
1271
|
-
|
|
1286
|
+
s(void 0);
|
|
1272
1287
|
return;
|
|
1273
1288
|
}
|
|
1274
1289
|
const h = {
|
|
@@ -1276,7 +1291,7 @@ const Ts = ({
|
|
|
1276
1291
|
destinationUrl: b,
|
|
1277
1292
|
nodeType: n.nodeType
|
|
1278
1293
|
};
|
|
1279
|
-
a([h], D, D),
|
|
1294
|
+
a([h], D, D), s(void 0);
|
|
1280
1295
|
},
|
|
1281
1296
|
[n, a]
|
|
1282
1297
|
), v = d(
|
|
@@ -1288,7 +1303,7 @@ const Ts = ({
|
|
|
1288
1303
|
return l.consecutiveDotsError;
|
|
1289
1304
|
if (m.startsWith("."))
|
|
1290
1305
|
return l.hiddenItemWarning;
|
|
1291
|
-
const b = g.nodeType ===
|
|
1306
|
+
const b = g.nodeType === L.ITEM;
|
|
1292
1307
|
let D = m;
|
|
1293
1308
|
if (b) {
|
|
1294
1309
|
const f = ca(g.name);
|
|
@@ -1310,7 +1325,7 @@ const Ts = ({
|
|
|
1310
1325
|
return null;
|
|
1311
1326
|
},
|
|
1312
1327
|
[t, l, e]
|
|
1313
|
-
), u = d((y) => y.nodeType ===
|
|
1328
|
+
), u = d((y) => y.nodeType === L.ITEM ? Tr(y.name) : y.name, []);
|
|
1314
1329
|
return {
|
|
1315
1330
|
renamedPath: i,
|
|
1316
1331
|
renamedItem: n,
|
|
@@ -1321,87 +1336,87 @@ const Ts = ({
|
|
|
1321
1336
|
getDisplayName: u
|
|
1322
1337
|
};
|
|
1323
1338
|
}, Sa = (e) => {
|
|
1324
|
-
const [t,
|
|
1339
|
+
const [t, r] = z(e?.expandedPaths ?? /* @__PURE__ */ new Set()), a = j(
|
|
1325
1340
|
() => !!e?.onExpandedPathsChange,
|
|
1326
1341
|
[e?.onExpandedPathsChange]
|
|
1327
|
-
), n =
|
|
1342
|
+
), n = j(
|
|
1328
1343
|
() => a ? e?.expandedPaths ?? /* @__PURE__ */ new Set() : t,
|
|
1329
1344
|
[a, e?.expandedPaths, t]
|
|
1330
1345
|
);
|
|
1331
1346
|
pe(() => {
|
|
1332
|
-
a && e?.expandedPaths &&
|
|
1347
|
+
a && e?.expandedPaths && r(new Set(e.expandedPaths));
|
|
1333
1348
|
}, [a, e?.expandedPaths]);
|
|
1334
|
-
const
|
|
1349
|
+
const s = d(
|
|
1335
1350
|
(c) => {
|
|
1336
|
-
a ? e?.onExpandedPathsChange?.(c) :
|
|
1351
|
+
a ? e?.onExpandedPathsChange?.(c) : r(c);
|
|
1337
1352
|
},
|
|
1338
1353
|
[a, e]
|
|
1339
1354
|
), l = d(
|
|
1340
1355
|
(c) => {
|
|
1341
1356
|
const v = new Set(n);
|
|
1342
|
-
v.has(c) ? v.delete(c) : v.add(c),
|
|
1357
|
+
v.has(c) ? v.delete(c) : v.add(c), s(v);
|
|
1343
1358
|
},
|
|
1344
|
-
[n,
|
|
1359
|
+
[n, s]
|
|
1345
1360
|
), i = d(() => {
|
|
1346
|
-
|
|
1347
|
-
}, [
|
|
1361
|
+
s(/* @__PURE__ */ new Set());
|
|
1362
|
+
}, [s]), p = d(
|
|
1348
1363
|
(c) => {
|
|
1349
1364
|
const v = new Set(n);
|
|
1350
|
-
v.add(c),
|
|
1365
|
+
v.add(c), s(v);
|
|
1351
1366
|
},
|
|
1352
|
-
[n,
|
|
1367
|
+
[n, s]
|
|
1353
1368
|
), C = d(
|
|
1354
1369
|
(c) => {
|
|
1355
1370
|
const v = new Set(n);
|
|
1356
|
-
v.delete(c),
|
|
1371
|
+
v.delete(c), s(v);
|
|
1357
1372
|
},
|
|
1358
|
-
[n,
|
|
1373
|
+
[n, s]
|
|
1359
1374
|
);
|
|
1360
1375
|
return {
|
|
1361
1376
|
expandedPaths: n,
|
|
1362
|
-
setExpandedPaths:
|
|
1377
|
+
setExpandedPaths: s,
|
|
1363
1378
|
togglePath: l,
|
|
1364
1379
|
collapseAll: i,
|
|
1365
1380
|
expandPath: p,
|
|
1366
1381
|
collapsePath: C,
|
|
1367
1382
|
isControlled: a
|
|
1368
1383
|
};
|
|
1369
|
-
},
|
|
1384
|
+
}, Ir = ({
|
|
1370
1385
|
newActions: e,
|
|
1371
1386
|
currentFolder: t,
|
|
1372
|
-
onUploadFiles:
|
|
1387
|
+
onUploadFiles: r,
|
|
1373
1388
|
onCreateFolder: a,
|
|
1374
1389
|
onUploadArchive: n,
|
|
1375
|
-
onCreateNewItem:
|
|
1390
|
+
onCreateNewItem: s,
|
|
1376
1391
|
isNewButtonDisabled: l
|
|
1377
1392
|
}) => {
|
|
1378
|
-
const i =
|
|
1393
|
+
const i = j(() => {
|
|
1379
1394
|
const c = [];
|
|
1380
1395
|
return e && (e.newFolder && c.push({
|
|
1381
1396
|
key: "new-folder",
|
|
1382
1397
|
label: e.newFolder.label,
|
|
1383
|
-
icon: e?.newFolder?.icon !== void 0 ? e?.newFolder?.icon : /* @__PURE__ */ o(pa, { ...
|
|
1398
|
+
icon: e?.newFolder?.icon !== void 0 ? e?.newFolder?.icon : /* @__PURE__ */ o(pa, { ...P, className: "text-secondary" }),
|
|
1384
1399
|
onClick: () => {
|
|
1385
1400
|
a && a();
|
|
1386
1401
|
}
|
|
1387
1402
|
}), e.newItem && c.push({
|
|
1388
1403
|
key: "new-item",
|
|
1389
1404
|
label: e.newItem.label,
|
|
1390
|
-
icon: e?.newItem?.icon !== void 0 ? e?.newItem?.icon : /* @__PURE__ */ o(
|
|
1405
|
+
icon: e?.newItem?.icon !== void 0 ? e?.newItem?.icon : /* @__PURE__ */ o(es, { ...P, className: "text-secondary" }),
|
|
1391
1406
|
onClick: () => {
|
|
1392
|
-
|
|
1407
|
+
s && s();
|
|
1393
1408
|
}
|
|
1394
1409
|
}), e.uploadFiles && c.push({
|
|
1395
1410
|
key: "upload-file",
|
|
1396
1411
|
label: e.uploadFiles.label,
|
|
1397
|
-
icon: e?.uploadFiles?.icon !== void 0 ? e?.uploadFiles?.icon : /* @__PURE__ */ o(
|
|
1412
|
+
icon: e?.uploadFiles?.icon !== void 0 ? e?.uploadFiles?.icon : /* @__PURE__ */ o(ts, { ...P, className: "text-secondary" }),
|
|
1398
1413
|
onClick: () => {
|
|
1399
|
-
|
|
1414
|
+
r && r();
|
|
1400
1415
|
}
|
|
1401
1416
|
}), e.uploadArchive && c.push({
|
|
1402
1417
|
key: "upload-archive",
|
|
1403
1418
|
label: e.uploadArchive.label,
|
|
1404
|
-
icon: e?.uploadArchive?.icon !== void 0 ? e?.uploadArchive?.icon : /* @__PURE__ */ o(
|
|
1419
|
+
icon: e?.uploadArchive?.icon !== void 0 ? e?.uploadArchive?.icon : /* @__PURE__ */ o(ns, { ...P, className: "text-secondary" }),
|
|
1405
1420
|
onClick: () => {
|
|
1406
1421
|
n && n();
|
|
1407
1422
|
}
|
|
@@ -1409,13 +1424,13 @@ const Ts = ({
|
|
|
1409
1424
|
}, [
|
|
1410
1425
|
e,
|
|
1411
1426
|
a,
|
|
1412
|
-
|
|
1427
|
+
r,
|
|
1413
1428
|
n,
|
|
1414
|
-
|
|
1415
|
-
]), p =
|
|
1429
|
+
s
|
|
1430
|
+
]), p = j(
|
|
1416
1431
|
() => i?.length > 0,
|
|
1417
1432
|
[i]
|
|
1418
|
-
), C =
|
|
1433
|
+
), C = j(
|
|
1419
1434
|
() => !t?.permissions?.includes(St.WRITE) || !!l,
|
|
1420
1435
|
[t, l]
|
|
1421
1436
|
);
|
|
@@ -1424,37 +1439,37 @@ const Ts = ({
|
|
|
1424
1439
|
isNewButtonVisible: p,
|
|
1425
1440
|
isNewButtonDisabled: C
|
|
1426
1441
|
};
|
|
1427
|
-
},
|
|
1442
|
+
}, Fr = {
|
|
1428
1443
|
emptyName: "Folder name cannot be empty",
|
|
1429
1444
|
duplicateName: "A folder with this name already exists",
|
|
1430
1445
|
hiddenItemWarning: Fa.hiddenItemWarning,
|
|
1431
1446
|
consecutiveDotsError: Ea.consecutiveDotsError
|
|
1432
|
-
},
|
|
1447
|
+
}, Er = ({
|
|
1433
1448
|
currentFolder: e,
|
|
1434
1449
|
onCreateFolder: t,
|
|
1435
|
-
onValidateFolderName:
|
|
1450
|
+
onValidateFolderName: r,
|
|
1436
1451
|
validationMessages: a,
|
|
1437
1452
|
items: n = []
|
|
1438
1453
|
}) => {
|
|
1439
|
-
const [
|
|
1454
|
+
const [s, l] = z(!1), [i, p] = z(null), [C, c] = z(
|
|
1440
1455
|
Be.Folder
|
|
1441
1456
|
), [v, u] = z(null), [y, g] = z(
|
|
1442
1457
|
null
|
|
1443
|
-
), [m, b] = z(""), D = ce(e?.path), h =
|
|
1458
|
+
), [m, b] = z(""), D = ce(e?.path), h = j(
|
|
1444
1459
|
() => ({
|
|
1445
|
-
...
|
|
1460
|
+
...Fr,
|
|
1446
1461
|
...a
|
|
1447
1462
|
}),
|
|
1448
1463
|
[a]
|
|
1449
|
-
), f =
|
|
1464
|
+
), f = j(() => {
|
|
1450
1465
|
if (C === Be.Folder)
|
|
1451
1466
|
return e;
|
|
1452
1467
|
if (C === Be.Sibling && v) {
|
|
1453
|
-
const
|
|
1468
|
+
const A = It(n, v.parentPath || "");
|
|
1454
1469
|
return {
|
|
1455
1470
|
path: v.parentPath,
|
|
1456
|
-
items:
|
|
1457
|
-
nodeType:
|
|
1471
|
+
items: A?.items || [],
|
|
1472
|
+
nodeType: L.FOLDER,
|
|
1458
1473
|
name: v?.parentPath?.split("/")?.pop() || "",
|
|
1459
1474
|
folderId: ""
|
|
1460
1475
|
};
|
|
@@ -1462,97 +1477,97 @@ const Ts = ({
|
|
|
1462
1477
|
return C === Be.Child ? v : e;
|
|
1463
1478
|
}, [C, v, e, n]);
|
|
1464
1479
|
pe(() => {
|
|
1465
|
-
const
|
|
1466
|
-
D.current !==
|
|
1467
|
-
}, [f?.path,
|
|
1480
|
+
const A = f?.path;
|
|
1481
|
+
D.current !== A && s && (l(!1), p(null), b("")), D.current = A;
|
|
1482
|
+
}, [f?.path, s]);
|
|
1468
1483
|
const T = d(() => {
|
|
1469
|
-
if (
|
|
1484
|
+
if (s) return;
|
|
1470
1485
|
D.current = e?.path || "/";
|
|
1471
|
-
const
|
|
1472
|
-
(
|
|
1473
|
-
), B = Kt(
|
|
1474
|
-
p(
|
|
1475
|
-
}, [
|
|
1476
|
-
(
|
|
1477
|
-
if (
|
|
1478
|
-
D.current =
|
|
1479
|
-
const
|
|
1480
|
-
(
|
|
1481
|
-
),
|
|
1482
|
-
b(
|
|
1486
|
+
const A = `__new_folder_${Date.now()}`, _ = (e?.items ?? []).filter(
|
|
1487
|
+
(k) => k.nodeType === L.FOLDER
|
|
1488
|
+
), B = Kt(_);
|
|
1489
|
+
p(A), b(B), l(!0), c(Be.Folder), u(e || null);
|
|
1490
|
+
}, [s, e]), x = d(
|
|
1491
|
+
(A) => {
|
|
1492
|
+
if (s) return;
|
|
1493
|
+
D.current = A?.parentPath || "/";
|
|
1494
|
+
const _ = `__new_folder_${Date.now()}`, k = (It(n, A?.parentPath || "/")?.items ?? []).filter(
|
|
1495
|
+
(te) => te.nodeType === L.FOLDER
|
|
1496
|
+
), Q = Kt(k);
|
|
1497
|
+
b(Q), p(_), l(!0), c(Be.Sibling), u(A), g(A?.parentPath || "/");
|
|
1483
1498
|
},
|
|
1484
|
-
[
|
|
1499
|
+
[s, n]
|
|
1485
1500
|
), F = d(
|
|
1486
|
-
(
|
|
1487
|
-
if (
|
|
1488
|
-
D.current =
|
|
1489
|
-
const
|
|
1490
|
-
(
|
|
1491
|
-
),
|
|
1492
|
-
b(
|
|
1501
|
+
(A) => {
|
|
1502
|
+
if (s) return;
|
|
1503
|
+
D.current = A.path;
|
|
1504
|
+
const _ = `__new_folder_${Date.now()}`, B = (A?.items ?? []).filter(
|
|
1505
|
+
(Q) => Q.nodeType === L.FOLDER
|
|
1506
|
+
), k = Kt(B);
|
|
1507
|
+
b(k), p(_), l(!0), c(Be.Child), u(A), g(A?.path || "/");
|
|
1493
1508
|
},
|
|
1494
|
-
[
|
|
1509
|
+
[s]
|
|
1495
1510
|
), I = d(
|
|
1496
|
-
(
|
|
1497
|
-
if (
|
|
1498
|
-
D.current =
|
|
1499
|
-
const B = (It(n,
|
|
1500
|
-
(
|
|
1501
|
-
),
|
|
1502
|
-
b(
|
|
1511
|
+
(A) => {
|
|
1512
|
+
if (s) return;
|
|
1513
|
+
D.current = A?.parentPath || "/";
|
|
1514
|
+
const B = (It(n, A?.parentPath || "/")?.items ?? []).filter(
|
|
1515
|
+
(Q) => Q.nodeType === L.FOLDER
|
|
1516
|
+
), k = Kt(B);
|
|
1517
|
+
b(k), c(Be.Sibling), u(A), g(A?.parentPath || "/"), l(!0);
|
|
1503
1518
|
},
|
|
1504
|
-
[
|
|
1519
|
+
[s, n]
|
|
1505
1520
|
), S = d(
|
|
1506
|
-
(
|
|
1507
|
-
if (
|
|
1508
|
-
D.current =
|
|
1509
|
-
const
|
|
1510
|
-
(
|
|
1511
|
-
), B = Kt(
|
|
1512
|
-
b(B), c(Be.Child), u(
|
|
1521
|
+
(A) => {
|
|
1522
|
+
if (s) return;
|
|
1523
|
+
D.current = A.path;
|
|
1524
|
+
const _ = (A?.items ?? []).filter(
|
|
1525
|
+
(k) => k.nodeType === L.FOLDER
|
|
1526
|
+
), B = Kt(_);
|
|
1527
|
+
b(B), c(Be.Child), u(A), g(A?.path || "/"), l(!0);
|
|
1513
1528
|
},
|
|
1514
|
-
[
|
|
1515
|
-
),
|
|
1529
|
+
[s]
|
|
1530
|
+
), O = d(() => {
|
|
1516
1531
|
l(!1), p(null), c(Be.Folder), u(null), g(null), D.current = void 0, b("");
|
|
1517
|
-
}, []),
|
|
1518
|
-
(
|
|
1519
|
-
const
|
|
1520
|
-
if (!
|
|
1532
|
+
}, []), M = d(
|
|
1533
|
+
(A) => {
|
|
1534
|
+
const _ = A.trim();
|
|
1535
|
+
if (!_)
|
|
1521
1536
|
return h.emptyName;
|
|
1522
|
-
if (
|
|
1537
|
+
if (_.includes(".."))
|
|
1523
1538
|
return h.consecutiveDotsError;
|
|
1524
|
-
if (
|
|
1539
|
+
if (_.startsWith(".") && _.length > 1)
|
|
1525
1540
|
return h.hiddenItemWarning;
|
|
1526
1541
|
if (f && f.items && new Set(
|
|
1527
|
-
(f.items ?? []).filter((
|
|
1528
|
-
).has(
|
|
1542
|
+
(f.items ?? []).filter((k) => k.nodeType === L.FOLDER).map((k) => k.name.toLowerCase())
|
|
1543
|
+
).has(_.toLowerCase()))
|
|
1529
1544
|
return h.duplicateName;
|
|
1530
|
-
if (
|
|
1531
|
-
const B =
|
|
1545
|
+
if (r && f) {
|
|
1546
|
+
const B = r(_, f);
|
|
1532
1547
|
if (B)
|
|
1533
1548
|
return B;
|
|
1534
1549
|
}
|
|
1535
1550
|
return null;
|
|
1536
1551
|
},
|
|
1537
|
-
[f,
|
|
1538
|
-
),
|
|
1539
|
-
async (
|
|
1540
|
-
const
|
|
1541
|
-
if (!
|
|
1552
|
+
[f, r, h]
|
|
1553
|
+
), V = d(
|
|
1554
|
+
async (A) => {
|
|
1555
|
+
const _ = A.trim();
|
|
1556
|
+
if (!_)
|
|
1542
1557
|
return;
|
|
1543
|
-
|
|
1544
|
-
const
|
|
1558
|
+
O();
|
|
1559
|
+
const k = `${f?.path ?? "/"}/${_}`, Q = `${k}/${Ro}`, U = {
|
|
1545
1560
|
fileContent: new File([], Ro, {
|
|
1546
1561
|
type: "text/plain"
|
|
1547
1562
|
}),
|
|
1548
1563
|
name: Ro
|
|
1549
1564
|
};
|
|
1550
|
-
t && await t(
|
|
1565
|
+
t && await t(U, k, Q);
|
|
1551
1566
|
},
|
|
1552
|
-
[f, t,
|
|
1567
|
+
[f, t, O]
|
|
1553
1568
|
);
|
|
1554
1569
|
return {
|
|
1555
|
-
isCreatingFolder:
|
|
1570
|
+
isCreatingFolder: s,
|
|
1556
1571
|
createdFolderPath: y,
|
|
1557
1572
|
newFolderTempId: i,
|
|
1558
1573
|
newFolderDefaultName: m,
|
|
@@ -1561,76 +1576,76 @@ const Ts = ({
|
|
|
1561
1576
|
startTreeSiblingFolderCreation: I,
|
|
1562
1577
|
startGridChildFolderCreation: F,
|
|
1563
1578
|
startTreeChildFolderCreation: S,
|
|
1564
|
-
cancelFolderCreation:
|
|
1565
|
-
saveFolderCreation:
|
|
1566
|
-
validateFolderName:
|
|
1579
|
+
cancelFolderCreation: O,
|
|
1580
|
+
saveFolderCreation: V,
|
|
1581
|
+
validateFolderName: M
|
|
1567
1582
|
};
|
|
1568
|
-
},
|
|
1583
|
+
}, Sr = ({
|
|
1569
1584
|
additionalButtons: e,
|
|
1570
1585
|
expandedPathsLength: t,
|
|
1571
|
-
collapseAll:
|
|
1586
|
+
collapseAll: r
|
|
1572
1587
|
}) => {
|
|
1573
1588
|
const a = t === 0;
|
|
1574
1589
|
return {
|
|
1575
|
-
additionalButtons:
|
|
1590
|
+
additionalButtons: j(() => /* @__PURE__ */ X(Ie, { children: [
|
|
1576
1591
|
e,
|
|
1577
1592
|
/* @__PURE__ */ o(
|
|
1578
1593
|
Et,
|
|
1579
1594
|
{
|
|
1580
1595
|
disabled: a,
|
|
1581
1596
|
size: jn.Small,
|
|
1582
|
-
onClick:
|
|
1583
|
-
icon: /* @__PURE__ */ o(
|
|
1597
|
+
onClick: r,
|
|
1598
|
+
icon: /* @__PURE__ */ o(os, { size: zo.LG, stroke: 1.5 }),
|
|
1584
1599
|
"aria-label": "collapse-all"
|
|
1585
1600
|
}
|
|
1586
1601
|
)
|
|
1587
|
-
] }), [e, a,
|
|
1602
|
+
] }), [e, a, r])
|
|
1588
1603
|
};
|
|
1589
|
-
},
|
|
1590
|
-
const [t,
|
|
1604
|
+
}, Ar = ({ onGetInfo: e }) => {
|
|
1605
|
+
const [t, r] = z(!1), [a, n] = z(void 0), s = d(
|
|
1591
1606
|
async (i) => {
|
|
1592
|
-
n(i),
|
|
1607
|
+
n(i), r(!0), e && await e(i);
|
|
1593
1608
|
},
|
|
1594
1609
|
[e]
|
|
1595
1610
|
), l = d(() => {
|
|
1596
|
-
|
|
1611
|
+
r(!1), n(void 0);
|
|
1597
1612
|
}, []);
|
|
1598
1613
|
return {
|
|
1599
1614
|
isMetadataPopupOpen: t,
|
|
1600
1615
|
selectedFileForMetadata: a,
|
|
1601
|
-
openMetadataPopup:
|
|
1616
|
+
openMetadataPopup: s,
|
|
1602
1617
|
closeMetadataPopup: l
|
|
1603
1618
|
};
|
|
1604
1619
|
};
|
|
1605
|
-
function
|
|
1620
|
+
function Pr(e) {
|
|
1606
1621
|
const t = [];
|
|
1607
|
-
function
|
|
1622
|
+
function r(a) {
|
|
1608
1623
|
for (const n of a)
|
|
1609
|
-
t.push(n), n.items &&
|
|
1624
|
+
t.push(n), n.items && r(n.items);
|
|
1610
1625
|
}
|
|
1611
|
-
return
|
|
1626
|
+
return r(e), t;
|
|
1612
1627
|
}
|
|
1613
1628
|
function da(e, t) {
|
|
1614
|
-
const
|
|
1615
|
-
return e.filter((a) => Ft(a.name).includes(
|
|
1629
|
+
const r = Ft(t);
|
|
1630
|
+
return e.filter((a) => Ft(a.name).includes(r));
|
|
1616
1631
|
}
|
|
1617
|
-
function
|
|
1632
|
+
function Mr({
|
|
1618
1633
|
onSearchFiles: e,
|
|
1619
1634
|
clearSearchResults: t,
|
|
1620
|
-
currentPath:
|
|
1635
|
+
currentPath: r,
|
|
1621
1636
|
searchResults: a = [],
|
|
1622
1637
|
searchInProgress: n = !1,
|
|
1623
|
-
navigationPanelValue:
|
|
1638
|
+
navigationPanelValue: s,
|
|
1624
1639
|
onNavigationPanelSearchChange: l,
|
|
1625
1640
|
allItems: i = [],
|
|
1626
1641
|
activeTab: p
|
|
1627
1642
|
}) {
|
|
1628
|
-
const [C, c] = z(""), v = ce(!1), u = ce(!1), y = ce([]), g = ce(
|
|
1643
|
+
const [C, c] = z(""), v = ce(!1), u = ce(!1), y = ce([]), g = ce(r), m = ce(p);
|
|
1629
1644
|
pe(() => {
|
|
1630
|
-
|
|
1631
|
-
}, [
|
|
1645
|
+
s != null && c(String(s));
|
|
1646
|
+
}, [s]);
|
|
1632
1647
|
const b = String(
|
|
1633
|
-
|
|
1648
|
+
s ?? C ?? ""
|
|
1634
1649
|
).trim(), D = u.current && (n || a.length > 0 || b !== ""), h = d(
|
|
1635
1650
|
(F) => {
|
|
1636
1651
|
const I = F.trim();
|
|
@@ -1638,9 +1653,9 @@ function Ps({
|
|
|
1638
1653
|
u.current = !1, v.current = !1;
|
|
1639
1654
|
return;
|
|
1640
1655
|
}
|
|
1641
|
-
u.current = !0, e &&
|
|
1656
|
+
u.current = !0, e && r && !v.current && (v.current = !0, e(r, I));
|
|
1642
1657
|
},
|
|
1643
|
-
[e,
|
|
1658
|
+
[e, r]
|
|
1644
1659
|
), f = d(() => {
|
|
1645
1660
|
v.current = !1, u.current = !1, y.current = [], c(""), l?.(""), t?.();
|
|
1646
1661
|
}, [t, l]), T = d(
|
|
@@ -1651,23 +1666,23 @@ function Ps({
|
|
|
1651
1666
|
[l, h, f]
|
|
1652
1667
|
);
|
|
1653
1668
|
pe(() => {
|
|
1654
|
-
(g.current !==
|
|
1669
|
+
(g.current !== r || m.current !== p) && (g.current = r, m.current = p, v.current = !1, u.current = !1, y.current = [], c(""), l?.(""), t?.());
|
|
1655
1670
|
}, [
|
|
1656
|
-
|
|
1671
|
+
r,
|
|
1657
1672
|
p,
|
|
1658
1673
|
l,
|
|
1659
1674
|
t
|
|
1660
1675
|
]), pe(() => {
|
|
1661
1676
|
n || (y.current = a);
|
|
1662
1677
|
}, [a, n]);
|
|
1663
|
-
const x =
|
|
1678
|
+
const x = j(() => {
|
|
1664
1679
|
if (e) {
|
|
1665
1680
|
const I = n ? y.current : a;
|
|
1666
1681
|
return !b || I.length === 0 ? I : da(I, b);
|
|
1667
1682
|
}
|
|
1668
1683
|
if (!b || !i.length)
|
|
1669
1684
|
return [];
|
|
1670
|
-
const F =
|
|
1685
|
+
const F = Pr(i);
|
|
1671
1686
|
return da(F, b);
|
|
1672
1687
|
}, [
|
|
1673
1688
|
e,
|
|
@@ -1687,20 +1702,20 @@ function Ps({
|
|
|
1687
1702
|
searchResultsRows: x
|
|
1688
1703
|
};
|
|
1689
1704
|
}
|
|
1690
|
-
function
|
|
1705
|
+
function kr({
|
|
1691
1706
|
selectedPaths: e,
|
|
1692
1707
|
defaultSelectedPaths: t,
|
|
1693
|
-
onSelectedPathsChange:
|
|
1708
|
+
onSelectedPathsChange: r
|
|
1694
1709
|
}) {
|
|
1695
|
-
const a = e !== void 0, [n,
|
|
1710
|
+
const a = e !== void 0, [n, s] = z(() => t ?? /* @__PURE__ */ new Set()), l = j(
|
|
1696
1711
|
() => a ? e : n,
|
|
1697
1712
|
[a, e, n]
|
|
1698
1713
|
), i = d(
|
|
1699
1714
|
(C) => {
|
|
1700
1715
|
const c = new Set(C);
|
|
1701
|
-
|
|
1716
|
+
r?.(c), a || s(c);
|
|
1702
1717
|
},
|
|
1703
|
-
[a,
|
|
1718
|
+
[a, r]
|
|
1704
1719
|
), p = d(() => {
|
|
1705
1720
|
i(/* @__PURE__ */ new Set());
|
|
1706
1721
|
}, [i]);
|
|
@@ -1711,13 +1726,13 @@ function Ms({
|
|
|
1711
1726
|
isControlled: a
|
|
1712
1727
|
};
|
|
1713
1728
|
}
|
|
1714
|
-
const
|
|
1729
|
+
const Or = ({
|
|
1715
1730
|
managerLabel: e,
|
|
1716
1731
|
children: t,
|
|
1717
|
-
className:
|
|
1732
|
+
className: r,
|
|
1718
1733
|
items: a = [],
|
|
1719
1734
|
rootItem: n,
|
|
1720
|
-
path:
|
|
1735
|
+
path: s,
|
|
1721
1736
|
defaultPath: l,
|
|
1722
1737
|
filesLoading: i,
|
|
1723
1738
|
selectedPaths: p,
|
|
@@ -1737,17 +1752,17 @@ const ks = ({
|
|
|
1737
1752
|
onPathChange: F,
|
|
1738
1753
|
onTableFileClick: I,
|
|
1739
1754
|
handleSelectionClick: S,
|
|
1740
|
-
onGridApiChange:
|
|
1741
|
-
onCopyFiles:
|
|
1742
|
-
onMoveToFiles:
|
|
1743
|
-
onDeleteFiles:
|
|
1744
|
-
onDownloadFiles:
|
|
1755
|
+
onGridApiChange: O,
|
|
1756
|
+
onCopyFiles: M,
|
|
1757
|
+
onMoveToFiles: V,
|
|
1758
|
+
onDeleteFiles: A,
|
|
1759
|
+
onDownloadFiles: _,
|
|
1745
1760
|
onRenameValidate: B,
|
|
1746
|
-
renameValidationMessages:
|
|
1747
|
-
forbiddenSymbolsRegExp:
|
|
1748
|
-
forbiddenSymbolsTooltip:
|
|
1749
|
-
onUploadFiles:
|
|
1750
|
-
onValidateUpload:
|
|
1761
|
+
renameValidationMessages: k,
|
|
1762
|
+
forbiddenSymbolsRegExp: Q = Cs,
|
|
1763
|
+
forbiddenSymbolsTooltip: te,
|
|
1764
|
+
onUploadFiles: U,
|
|
1765
|
+
onValidateUpload: Y,
|
|
1751
1766
|
uploadEnabled: fe,
|
|
1752
1767
|
uploadValidationMessages: we,
|
|
1753
1768
|
maxFileSize: xe,
|
|
@@ -1765,8 +1780,8 @@ const ks = ({
|
|
|
1765
1780
|
onSearchFiles: Se,
|
|
1766
1781
|
searchResults: R,
|
|
1767
1782
|
searchInProgress: H,
|
|
1768
|
-
clearSearchResults:
|
|
1769
|
-
allowedFileTypes:
|
|
1783
|
+
clearSearchResults: $,
|
|
1784
|
+
allowedFileTypes: J,
|
|
1770
1785
|
maxSelectableFileSize: Z,
|
|
1771
1786
|
getDisabledTooltip: me,
|
|
1772
1787
|
fileTooLargeTooltip: Ae,
|
|
@@ -1777,7 +1792,7 @@ const ks = ({
|
|
|
1777
1792
|
sharedWithMeIds: He,
|
|
1778
1793
|
onFolderPopupPathChange: pt,
|
|
1779
1794
|
onManagePermissions: cn,
|
|
1780
|
-
onPreview:
|
|
1795
|
+
onPreview: rt,
|
|
1781
1796
|
onOpenInNewTab: ft,
|
|
1782
1797
|
previewExtensions: Xn,
|
|
1783
1798
|
isRenameFileAvailable: qn,
|
|
@@ -1802,14 +1817,14 @@ const ks = ({
|
|
|
1802
1817
|
selectedPaths: Ze,
|
|
1803
1818
|
clearSelection: Xe,
|
|
1804
1819
|
setSelectedPaths: it
|
|
1805
|
-
} =
|
|
1820
|
+
} = kr({
|
|
1806
1821
|
selectedPaths: p,
|
|
1807
1822
|
defaultSelectedPaths: C,
|
|
1808
1823
|
onSelectedPathsChange: c
|
|
1809
1824
|
}), gn = ce(!1), Je = ce(null), Qn = d(
|
|
1810
1825
|
(E, K, oe) => {
|
|
1811
1826
|
if (je) {
|
|
1812
|
-
const { parent: Ye, name: To } =
|
|
1827
|
+
const { parent: Ye, name: To } = lr(K);
|
|
1813
1828
|
Je.current = {
|
|
1814
1829
|
fileNames: /* @__PURE__ */ new Set([To]),
|
|
1815
1830
|
destinationFolder: Ye
|
|
@@ -1823,9 +1838,9 @@ const ks = ({
|
|
|
1823
1838
|
je && (Je.current = {
|
|
1824
1839
|
fileNames: new Set(E.map((oe) => oe.name)),
|
|
1825
1840
|
destinationFolder: K
|
|
1826
|
-
}),
|
|
1841
|
+
}), U?.(E, K);
|
|
1827
1842
|
},
|
|
1828
|
-
[
|
|
1843
|
+
[U, je]
|
|
1829
1844
|
), eo = d(
|
|
1830
1845
|
(E, K, oe) => {
|
|
1831
1846
|
je && (Je.current = {
|
|
@@ -1834,7 +1849,7 @@ const ks = ({
|
|
|
1834
1849
|
}), ue?.(E, K, oe);
|
|
1835
1850
|
},
|
|
1836
1851
|
[ue, je]
|
|
1837
|
-
), to =
|
|
1852
|
+
), to = j(() => {
|
|
1838
1853
|
const E = /* @__PURE__ */ new Map();
|
|
1839
1854
|
return Ze.forEach((K) => {
|
|
1840
1855
|
const oe = Ke(a, K);
|
|
@@ -1856,12 +1871,12 @@ const ks = ({
|
|
|
1856
1871
|
it(K);
|
|
1857
1872
|
}
|
|
1858
1873
|
}, [a, Ze, it]);
|
|
1859
|
-
const { currentPath: de, setCurrentPath: Fe, handlePathChange: qe } =
|
|
1860
|
-
path:
|
|
1874
|
+
const { currentPath: de, setCurrentPath: Fe, handlePathChange: qe } = gr({
|
|
1875
|
+
path: s,
|
|
1861
1876
|
defaultPath: l,
|
|
1862
1877
|
onPathChange: F,
|
|
1863
1878
|
onSelectionClear: Xe
|
|
1864
|
-
}), Mt =
|
|
1879
|
+
}), Mt = j(() => {
|
|
1865
1880
|
const {
|
|
1866
1881
|
showFiles: E = !0,
|
|
1867
1882
|
showFolders: K = !0,
|
|
@@ -1873,25 +1888,25 @@ const ks = ({
|
|
|
1873
1888
|
T?.setDestinationFolderPath ? T.setDestinationFolderPath(E) : no(E);
|
|
1874
1889
|
},
|
|
1875
1890
|
[T]
|
|
1876
|
-
), { areHiddenFilesVisible: lt, toggleHiddenFilesVisibility: yn } =
|
|
1891
|
+
), { areHiddenFilesVisible: lt, toggleHiddenFilesVisibility: yn } = fr({
|
|
1877
1892
|
showHiddenFiles: v,
|
|
1878
1893
|
onShowHiddenFilesChange: u
|
|
1879
|
-
}), { isTreeCollapsed: wn, toggleTreeCollapse: vt, setIsTreeCollapsed: oo } =
|
|
1894
|
+
}), { isTreeCollapsed: wn, toggleTreeCollapse: vt, setIsTreeCollapsed: oo } = mr({
|
|
1880
1895
|
collapsed: y?.collapsed,
|
|
1881
1896
|
onCollapseChange: y?.onCollapseChange
|
|
1882
1897
|
}), {
|
|
1883
1898
|
renamedPath: yt,
|
|
1884
1899
|
renamedItem: ao,
|
|
1885
|
-
renameHandler:
|
|
1886
|
-
renameSaveHandler:
|
|
1900
|
+
renameHandler: so,
|
|
1901
|
+
renameSaveHandler: ro,
|
|
1887
1902
|
renameCancelHandler: io,
|
|
1888
1903
|
renameValidateHandler: lo,
|
|
1889
1904
|
getDisplayName: Ot
|
|
1890
|
-
} =
|
|
1905
|
+
} = Rr({
|
|
1891
1906
|
items: a,
|
|
1892
1907
|
onRenameValidate: B,
|
|
1893
|
-
validationMessages:
|
|
1894
|
-
onMoveToFiles:
|
|
1908
|
+
validationMessages: k,
|
|
1909
|
+
onMoveToFiles: V
|
|
1895
1910
|
}), {
|
|
1896
1911
|
isSearchMode: wt,
|
|
1897
1912
|
searchValue: Nn,
|
|
@@ -1900,9 +1915,9 @@ const ks = ({
|
|
|
1900
1915
|
handleSearchChange: _t,
|
|
1901
1916
|
handleSearchClear: le,
|
|
1902
1917
|
searchResultsRows: Dn
|
|
1903
|
-
} =
|
|
1918
|
+
} = Mr({
|
|
1904
1919
|
onSearchFiles: Se,
|
|
1905
|
-
clearSearchResults:
|
|
1920
|
+
clearSearchResults: $,
|
|
1906
1921
|
currentPath: de,
|
|
1907
1922
|
searchResults: R,
|
|
1908
1923
|
searchInProgress: H,
|
|
@@ -1910,11 +1925,11 @@ const ks = ({
|
|
|
1910
1925
|
onNavigationPanelSearchChange: m?.onSearchChange,
|
|
1911
1926
|
allItems: a,
|
|
1912
1927
|
activeTab: h?.activeTab
|
|
1913
|
-
}),
|
|
1928
|
+
}), se = j(
|
|
1914
1929
|
() => It(a, de) ?? a[0],
|
|
1915
1930
|
[a, de]
|
|
1916
1931
|
), Le = d(
|
|
1917
|
-
(E, K) => !K || !E ? !1 :
|
|
1932
|
+
(E, K) => !K || !E ? !1 : pr(E.path) > K,
|
|
1918
1933
|
[]
|
|
1919
1934
|
), Me = d(() => {
|
|
1920
1935
|
Pt?.();
|
|
@@ -1937,10 +1952,10 @@ const ks = ({
|
|
|
1937
1952
|
handleConflictCancel: fo,
|
|
1938
1953
|
handleConflictDecideForEach: mo,
|
|
1939
1954
|
sourceFolder: Co
|
|
1940
|
-
} =
|
|
1955
|
+
} = Cr({
|
|
1941
1956
|
getDestinationFiles: (E) => It(a, E)?.items ?? [],
|
|
1942
|
-
onCopyFiles:
|
|
1943
|
-
onMoveToFiles:
|
|
1957
|
+
onCopyFiles: M,
|
|
1958
|
+
onMoveToFiles: V,
|
|
1944
1959
|
onCopySuccess: Xe,
|
|
1945
1960
|
onMoveSuccess: Xe,
|
|
1946
1961
|
onDuplicateSuccess: Xe,
|
|
@@ -1956,11 +1971,11 @@ const ks = ({
|
|
|
1956
1971
|
openDeleteConfirmation: Pn,
|
|
1957
1972
|
closeDeleteConfirmation: Mn,
|
|
1958
1973
|
confirmDelete: Dt
|
|
1959
|
-
} =
|
|
1960
|
-
onDeleteFiles:
|
|
1974
|
+
} = vr({
|
|
1975
|
+
onDeleteFiles: A,
|
|
1961
1976
|
onDeleteSuccess: Xe
|
|
1962
|
-
}), { handleDownloadFiles: ot } =
|
|
1963
|
-
onDownloadFiles:
|
|
1977
|
+
}), { handleDownloadFiles: ot } = yr({
|
|
1978
|
+
onDownloadFiles: _,
|
|
1964
1979
|
customDownloadItemsAction: un,
|
|
1965
1980
|
onDownloadSuccess: Xe
|
|
1966
1981
|
}), {
|
|
@@ -1982,39 +1997,39 @@ const ks = ({
|
|
|
1982
1997
|
handleUploadConflictDuplicate: Do,
|
|
1983
1998
|
handleUploadConflictCancel: xo,
|
|
1984
1999
|
handleUploadConflictDecideForEach: $t
|
|
1985
|
-
} =
|
|
2000
|
+
} = Nr({
|
|
1986
2001
|
onUploadFiles: Jn,
|
|
1987
|
-
onValidateUpload:
|
|
2002
|
+
onValidateUpload: Y,
|
|
1988
2003
|
maxFileSize: xe,
|
|
1989
2004
|
onUploadArchive: eo,
|
|
1990
2005
|
prepareUploadFileName: Te,
|
|
1991
|
-
allowedFileTypes:
|
|
2006
|
+
allowedFileTypes: J,
|
|
1992
2007
|
validationMessages: we,
|
|
1993
2008
|
uploadEnabled: fe,
|
|
1994
|
-
currentFolder:
|
|
2009
|
+
currentFolder: se
|
|
1995
2010
|
}), zn = d(
|
|
1996
2011
|
(E) => {
|
|
1997
2012
|
le();
|
|
1998
|
-
const K = de ?? "", oe =
|
|
2013
|
+
const K = de ?? "", oe = se?.items ?? [];
|
|
1999
2014
|
Ht(E, K, oe);
|
|
2000
2015
|
},
|
|
2001
|
-
[de,
|
|
2016
|
+
[de, se, Ht, le]
|
|
2002
2017
|
), dt = d(() => {
|
|
2003
2018
|
le();
|
|
2004
|
-
const E = de ?? "", K =
|
|
2019
|
+
const E = de ?? "", K = se?.items ?? [];
|
|
2005
2020
|
Ut(E, K);
|
|
2006
|
-
}, [de,
|
|
2021
|
+
}, [de, se, Ut, le]), _n = d(() => {
|
|
2007
2022
|
le();
|
|
2008
|
-
const E = de ?? "", K =
|
|
2023
|
+
const E = de ?? "", K = se?.items ?? [];
|
|
2009
2024
|
Gt(E, K);
|
|
2010
|
-
}, [de,
|
|
2011
|
-
le(), mt?.(de,
|
|
2012
|
-
}, [mt, de,
|
|
2013
|
-
le(), dn?.(de,
|
|
2025
|
+
}, [de, se, Gt, le]), Bn = d(() => {
|
|
2026
|
+
le(), mt?.(de, se);
|
|
2027
|
+
}, [mt, de, se, le]), Wn = d(() => {
|
|
2028
|
+
le(), dn?.(de, se);
|
|
2014
2029
|
}, [
|
|
2015
2030
|
dn,
|
|
2016
2031
|
de,
|
|
2017
|
-
|
|
2032
|
+
se,
|
|
2018
2033
|
le
|
|
2019
2034
|
]), bo = d(
|
|
2020
2035
|
(E) => {
|
|
@@ -2034,14 +2049,14 @@ const ks = ({
|
|
|
2034
2049
|
cancelFolderCreation: Aa,
|
|
2035
2050
|
saveFolderCreation: Pa,
|
|
2036
2051
|
validateFolderName: Ma
|
|
2037
|
-
} =
|
|
2038
|
-
currentFolder:
|
|
2052
|
+
} = Er({
|
|
2053
|
+
currentFolder: se,
|
|
2039
2054
|
onCreateFolder: Qn,
|
|
2040
2055
|
onValidateFolderName: W,
|
|
2041
2056
|
validationMessages: be,
|
|
2042
2057
|
items: a
|
|
2043
2058
|
}), qo = d(() => {
|
|
2044
|
-
if (ve && Le(
|
|
2059
|
+
if (ve && Le(se, ve - 1)) {
|
|
2045
2060
|
Me();
|
|
2046
2061
|
return;
|
|
2047
2062
|
}
|
|
@@ -2049,42 +2064,42 @@ const ks = ({
|
|
|
2049
2064
|
}, [
|
|
2050
2065
|
le,
|
|
2051
2066
|
at,
|
|
2052
|
-
|
|
2067
|
+
se,
|
|
2053
2068
|
ve,
|
|
2054
2069
|
Le,
|
|
2055
2070
|
Me
|
|
2056
|
-
]), { newActions: ka, isNewButtonVisible: Oa, isNewButtonDisabled: La } =
|
|
2071
|
+
]), { newActions: ka, isNewButtonVisible: Oa, isNewButtonDisabled: La } = Ir(
|
|
2057
2072
|
{
|
|
2058
2073
|
newActions: h?.newActions,
|
|
2059
|
-
currentFolder:
|
|
2074
|
+
currentFolder: se,
|
|
2060
2075
|
onUploadFiles: mt ? Bn : dt,
|
|
2061
2076
|
onUploadArchive: _n,
|
|
2062
2077
|
onCreateFolder: qo,
|
|
2063
2078
|
onCreateNewItem: Wn,
|
|
2064
2079
|
isNewButtonDisabled: h?.isNewButtonDisabled
|
|
2065
2080
|
}
|
|
2066
|
-
), za =
|
|
2081
|
+
), za = j(() => {
|
|
2067
2082
|
if (wt) {
|
|
2068
|
-
let
|
|
2069
|
-
kt || (
|
|
2070
|
-
(
|
|
2071
|
-
)), et || (
|
|
2072
|
-
(
|
|
2073
|
-
)), lt || (
|
|
2074
|
-
const Zt =
|
|
2075
|
-
...
|
|
2076
|
-
id:
|
|
2077
|
-
name:
|
|
2078
|
-
updatedAt:
|
|
2079
|
-
size:
|
|
2080
|
-
contentLength:
|
|
2081
|
-
author:
|
|
2082
|
-
path:
|
|
2083
|
-
nodeType:
|
|
2084
|
-
extension:
|
|
2083
|
+
let q = Dn;
|
|
2084
|
+
kt || (q = q.filter(
|
|
2085
|
+
(re) => re.nodeType !== L.ITEM
|
|
2086
|
+
)), et || (q = q.filter(
|
|
2087
|
+
(re) => re.nodeType !== L.FOLDER
|
|
2088
|
+
)), lt || (q = q.filter((re) => !re.path.split("/").filter(Boolean).some((Xt) => Xt.startsWith("."))));
|
|
2089
|
+
const Zt = q.map((re) => ({
|
|
2090
|
+
...re,
|
|
2091
|
+
id: re.id ?? re.path,
|
|
2092
|
+
name: re.name ?? re.path.split("/").pop() ?? "",
|
|
2093
|
+
updatedAt: re.updatedAt,
|
|
2094
|
+
size: re.contentLength,
|
|
2095
|
+
contentLength: re.contentLength,
|
|
2096
|
+
author: re.author,
|
|
2097
|
+
path: re.path,
|
|
2098
|
+
nodeType: re.nodeType,
|
|
2099
|
+
extension: re.extension,
|
|
2085
2100
|
isTemporary: !1,
|
|
2086
|
-
owner:
|
|
2087
|
-
folderId:
|
|
2101
|
+
owner: re.owner,
|
|
2102
|
+
folderId: re.folderId
|
|
2088
2103
|
}));
|
|
2089
2104
|
return N && ee && Zt.unshift({
|
|
2090
2105
|
id: ee,
|
|
@@ -2092,32 +2107,32 @@ const ks = ({
|
|
|
2092
2107
|
updatedAt: void 0,
|
|
2093
2108
|
author: void 0,
|
|
2094
2109
|
path: de ?? "/",
|
|
2095
|
-
nodeType:
|
|
2110
|
+
nodeType: L.FOLDER,
|
|
2096
2111
|
extension: void 0,
|
|
2097
2112
|
isTemporary: !0,
|
|
2098
2113
|
owner: void 0
|
|
2099
2114
|
}), Zt;
|
|
2100
2115
|
}
|
|
2101
|
-
const E = Ft(Lt).trim(), K =
|
|
2102
|
-
let oe = E ?
|
|
2103
|
-
kt || (oe = oe.filter((
|
|
2104
|
-
(
|
|
2105
|
-
)), lt || (oe = oe.filter((
|
|
2106
|
-
const Ye = oe.map((
|
|
2107
|
-
...
|
|
2108
|
-
id:
|
|
2109
|
-
name:
|
|
2110
|
-
updatedAt:
|
|
2111
|
-
size:
|
|
2112
|
-
author:
|
|
2113
|
-
path:
|
|
2114
|
-
nodeType:
|
|
2115
|
-
extension:
|
|
2116
|
+
const E = Ft(Lt).trim(), K = se?.items ?? [];
|
|
2117
|
+
let oe = E ? ar(se) : K;
|
|
2118
|
+
kt || (oe = oe.filter((q) => q.nodeType !== L.ITEM)), et || (oe = oe.filter(
|
|
2119
|
+
(q) => q.nodeType !== L.FOLDER
|
|
2120
|
+
)), lt || (oe = oe.filter((q) => E ? !q.path.split("/").filter(Boolean).some((re) => re.startsWith(".")) : !Ta(q)));
|
|
2121
|
+
const Ye = oe.map((q) => ({
|
|
2122
|
+
...q,
|
|
2123
|
+
id: q.id ?? q.path,
|
|
2124
|
+
name: q.name ?? q.path.split("/").pop() ?? "",
|
|
2125
|
+
updatedAt: q.updatedAt,
|
|
2126
|
+
size: q.contentLength,
|
|
2127
|
+
author: q.author,
|
|
2128
|
+
path: q.path,
|
|
2129
|
+
nodeType: q.nodeType,
|
|
2130
|
+
extension: q.extension,
|
|
2116
2131
|
isTemporary: !1,
|
|
2117
|
-
owner:
|
|
2118
|
-
contentType:
|
|
2119
|
-
contentLength:
|
|
2120
|
-
folderId:
|
|
2132
|
+
owner: q.owner,
|
|
2133
|
+
contentType: q.contentType,
|
|
2134
|
+
contentLength: q.contentLength,
|
|
2135
|
+
folderId: q.folderId
|
|
2121
2136
|
}));
|
|
2122
2137
|
if (N && ee && !E && Ye.unshift({
|
|
2123
2138
|
id: ee,
|
|
@@ -2125,23 +2140,23 @@ const ks = ({
|
|
|
2125
2140
|
updatedAt: void 0,
|
|
2126
2141
|
author: void 0,
|
|
2127
2142
|
path: de ?? "/",
|
|
2128
|
-
nodeType:
|
|
2143
|
+
nodeType: L.FOLDER,
|
|
2129
2144
|
extension: void 0,
|
|
2130
2145
|
isTemporary: !0,
|
|
2131
2146
|
owner: void 0
|
|
2132
2147
|
}), !E) return Ye;
|
|
2133
2148
|
const To = E.split(/\s+/).filter(Boolean);
|
|
2134
|
-
return Ye.filter((
|
|
2135
|
-
if (
|
|
2136
|
-
const Zt = Ft(
|
|
2149
|
+
return Ye.filter((q) => {
|
|
2150
|
+
if (q.isTemporary) return !0;
|
|
2151
|
+
const Zt = Ft(q.name), re = Ft(q.author), Ko = or(q.extension);
|
|
2137
2152
|
return To.every(
|
|
2138
|
-
(Xt) => Zt.includes(Xt) ||
|
|
2153
|
+
(Xt) => Zt.includes(Xt) || re.includes(Xt) || Ko.includes(Xt)
|
|
2139
2154
|
);
|
|
2140
2155
|
});
|
|
2141
2156
|
}, [
|
|
2142
2157
|
wt,
|
|
2143
2158
|
Dn,
|
|
2144
|
-
|
|
2159
|
+
se,
|
|
2145
2160
|
Lt,
|
|
2146
2161
|
lt,
|
|
2147
2162
|
N,
|
|
@@ -2162,13 +2177,13 @@ const ks = ({
|
|
|
2162
2177
|
if (!K?.items) return;
|
|
2163
2178
|
const oe = /* @__PURE__ */ new Set();
|
|
2164
2179
|
for (const Ye of K.items)
|
|
2165
|
-
E.fileNames.has(Ye.name) &&
|
|
2180
|
+
E.fileNames.has(Ye.name) && cr(Ye, J, Z) && oe.add(Ye.path);
|
|
2166
2181
|
oe.size > 0 && (it(oe), Je.current = null);
|
|
2167
2182
|
}, [
|
|
2168
2183
|
a,
|
|
2169
2184
|
de,
|
|
2170
2185
|
it,
|
|
2171
|
-
|
|
2186
|
+
J,
|
|
2172
2187
|
Z
|
|
2173
2188
|
]), pe(() => {
|
|
2174
2189
|
!gn.current && Cn && (dt(), gn.current = !0);
|
|
@@ -2185,13 +2200,13 @@ const ks = ({
|
|
|
2185
2200
|
[qe]
|
|
2186
2201
|
), Wa = d(
|
|
2187
2202
|
(E) => {
|
|
2188
|
-
E.nodeType ===
|
|
2203
|
+
E.nodeType === L.FOLDER ? qe(E.path) : I?.(E);
|
|
2189
2204
|
},
|
|
2190
2205
|
[qe, I]
|
|
2191
2206
|
), { expandedPaths: bt, setExpandedPaths: jt, collapseAll: Ha } = Sa({
|
|
2192
2207
|
expandedPaths: y?.expandedPaths,
|
|
2193
2208
|
onExpandedPathsChange: y?.onExpandedPathsChange
|
|
2194
|
-
}), { additionalButtons: Ua } =
|
|
2209
|
+
}), { additionalButtons: Ua } = Sr({
|
|
2195
2210
|
collapseAll: Ha,
|
|
2196
2211
|
expandedPathsLength: bt.size,
|
|
2197
2212
|
additionalButtons: y?.additionalButtons
|
|
@@ -2274,16 +2289,16 @@ const ks = ({
|
|
|
2274
2289
|
selectedFileForMetadata: Xa,
|
|
2275
2290
|
openMetadataPopup: qa,
|
|
2276
2291
|
closeMetadataPopup: Yo
|
|
2277
|
-
} =
|
|
2292
|
+
} = Ar({ onGetInfo: G }), Ya = d(() => {
|
|
2278
2293
|
Yo(), De?.clearMetadata?.();
|
|
2279
|
-
}, [Yo, De]), Ka =
|
|
2280
|
-
if (
|
|
2281
|
-
return Zn(
|
|
2282
|
-
}, [
|
|
2294
|
+
}, [Yo, De]), Ka = j(() => {
|
|
2295
|
+
if (Q)
|
|
2296
|
+
return Zn(Q);
|
|
2297
|
+
}, [Q]), Qa = {
|
|
2283
2298
|
managerLabel: e,
|
|
2284
|
-
className:
|
|
2299
|
+
className: r,
|
|
2285
2300
|
items: a,
|
|
2286
|
-
allowedFileTypes:
|
|
2301
|
+
allowedFileTypes: J,
|
|
2287
2302
|
maxSelectableFileSize: Z,
|
|
2288
2303
|
rootItem: n,
|
|
2289
2304
|
filesLoading: i,
|
|
@@ -2323,7 +2338,7 @@ const ks = ({
|
|
|
2323
2338
|
selectedFiles: to,
|
|
2324
2339
|
setSelectedPaths: it,
|
|
2325
2340
|
clearSelection: Xe,
|
|
2326
|
-
currentFolder:
|
|
2341
|
+
currentFolder: se,
|
|
2327
2342
|
gridRows: za,
|
|
2328
2343
|
handleCopyTo: xn,
|
|
2329
2344
|
handleMoveTo: bn,
|
|
@@ -2342,9 +2357,9 @@ const ks = ({
|
|
|
2342
2357
|
renamedPath: yt,
|
|
2343
2358
|
renamedItem: ao,
|
|
2344
2359
|
forbiddenSymbolsRegExp: Ka,
|
|
2345
|
-
forbiddenSymbolsTooltip:
|
|
2346
|
-
onRename:
|
|
2347
|
-
onRenameSave:
|
|
2360
|
+
forbiddenSymbolsTooltip: te,
|
|
2361
|
+
onRename: so,
|
|
2362
|
+
onRenameSave: ro,
|
|
2348
2363
|
onRenameCancel: io,
|
|
2349
2364
|
onRenameValidate: lo,
|
|
2350
2365
|
getDisplayName: Ot,
|
|
@@ -2360,7 +2375,7 @@ const ks = ({
|
|
|
2360
2375
|
handleTableRowClick: Wa,
|
|
2361
2376
|
onTableFileClick: I,
|
|
2362
2377
|
handleSelectionClick: S,
|
|
2363
|
-
onGridApiChange:
|
|
2378
|
+
onGridApiChange: O,
|
|
2364
2379
|
isDragging: vo,
|
|
2365
2380
|
uploadError: yo,
|
|
2366
2381
|
handleDragEnter: Wt,
|
|
@@ -2368,8 +2383,8 @@ const ks = ({
|
|
|
2368
2383
|
handleDragOver: ct,
|
|
2369
2384
|
handleDrop: zn,
|
|
2370
2385
|
clearUploadError: kn,
|
|
2371
|
-
onUploadFiles:
|
|
2372
|
-
onValidateUpload:
|
|
2386
|
+
onUploadFiles: U,
|
|
2387
|
+
onValidateUpload: Y,
|
|
2373
2388
|
maxFileSize: xe,
|
|
2374
2389
|
isDraggingOverWindow: ze,
|
|
2375
2390
|
openFileDialog: dt,
|
|
@@ -2413,7 +2428,7 @@ const ks = ({
|
|
|
2413
2428
|
onSearchFiles: Se,
|
|
2414
2429
|
searchInProgress: H,
|
|
2415
2430
|
searchResults: R,
|
|
2416
|
-
clearSearchResults:
|
|
2431
|
+
clearSearchResults: $,
|
|
2417
2432
|
isSearchMode: wt,
|
|
2418
2433
|
emptyStateIcon: ae,
|
|
2419
2434
|
emptyStateTitle: Ve,
|
|
@@ -2422,7 +2437,7 @@ const ks = ({
|
|
|
2422
2437
|
sharedWithMeIds: He,
|
|
2423
2438
|
onFolderPopupPathChange: pt,
|
|
2424
2439
|
onManagePermissions: cn,
|
|
2425
|
-
onPreview:
|
|
2440
|
+
onPreview: rt,
|
|
2426
2441
|
onOpenInNewTab: ft,
|
|
2427
2442
|
previewExtensions: Xn,
|
|
2428
2443
|
isRenameFileAvailable: qn,
|
|
@@ -2440,13 +2455,13 @@ const ks = ({
|
|
|
2440
2455
|
onNewFolderDepthExceeded: Pt
|
|
2441
2456
|
};
|
|
2442
2457
|
return /* @__PURE__ */ o(Ia.Provider, { value: Qa, children: t });
|
|
2443
|
-
},
|
|
2458
|
+
}, Lr = ({
|
|
2444
2459
|
disabledGridRowIds: e,
|
|
2445
2460
|
gridRows: t,
|
|
2446
|
-
getDisabledTooltip:
|
|
2461
|
+
getDisabledTooltip: r,
|
|
2447
2462
|
getRowDisabledTooltip: a,
|
|
2448
2463
|
allowedFileTypes: n,
|
|
2449
|
-
maxSelectableFileSize:
|
|
2464
|
+
maxSelectableFileSize: s
|
|
2450
2465
|
}) => {
|
|
2451
2466
|
const [l, i] = z(null), [p, C] = z(null);
|
|
2452
2467
|
pe(() => {
|
|
@@ -2478,31 +2493,31 @@ const ks = ({
|
|
|
2478
2493
|
g.removeEventListener("mousemove", u), g.removeEventListener("mouseleave", y);
|
|
2479
2494
|
};
|
|
2480
2495
|
}, [e]);
|
|
2481
|
-
const c =
|
|
2496
|
+
const c = j(() => {
|
|
2482
2497
|
if (l)
|
|
2483
2498
|
return t.find((u) => u.path === l);
|
|
2484
|
-
}, [l, t]), v =
|
|
2499
|
+
}, [l, t]), v = j(() => {
|
|
2485
2500
|
if (c) {
|
|
2486
|
-
if (
|
|
2487
|
-
const u =
|
|
2501
|
+
if (r) {
|
|
2502
|
+
const u = r(c);
|
|
2488
2503
|
if (u) return u;
|
|
2489
2504
|
}
|
|
2490
2505
|
return a(
|
|
2491
2506
|
c,
|
|
2492
2507
|
n,
|
|
2493
|
-
|
|
2508
|
+
s
|
|
2494
2509
|
);
|
|
2495
2510
|
}
|
|
2496
2511
|
}, [
|
|
2497
2512
|
c,
|
|
2498
|
-
|
|
2513
|
+
r,
|
|
2499
2514
|
a,
|
|
2500
2515
|
n,
|
|
2501
|
-
|
|
2516
|
+
s
|
|
2502
2517
|
]);
|
|
2503
|
-
return /* @__PURE__ */ o(Ie, { children: v && p &&
|
|
2504
|
-
/* @__PURE__ */ X(
|
|
2505
|
-
/* @__PURE__ */ o(
|
|
2518
|
+
return /* @__PURE__ */ o(Ie, { children: v && p && _s(
|
|
2519
|
+
/* @__PURE__ */ X(gs, { open: !0, placement: "top", children: [
|
|
2520
|
+
/* @__PURE__ */ o(vs, { asChild: !0, children: /* @__PURE__ */ o(
|
|
2506
2521
|
"div",
|
|
2507
2522
|
{
|
|
2508
2523
|
className: an(
|
|
@@ -2517,23 +2532,23 @@ const ks = ({
|
|
|
2517
2532
|
}
|
|
2518
2533
|
}
|
|
2519
2534
|
) }),
|
|
2520
|
-
/* @__PURE__ */ o(
|
|
2535
|
+
/* @__PURE__ */ o(ys, { className: "max-w-[300px] rounded border border-ui-outline-primary bg-ui-popover px-3 py-1.5 text-center text-primary shadow-md fill-ui-popover", children: v })
|
|
2521
2536
|
] }),
|
|
2522
2537
|
document.body
|
|
2523
2538
|
) });
|
|
2524
2539
|
}, ua = () => typeof window < "u" && window.innerWidth < 640, Vo = () => {
|
|
2525
2540
|
const [e, t] = z(ua());
|
|
2526
2541
|
return pe(() => {
|
|
2527
|
-
const
|
|
2528
|
-
return window.addEventListener("resize",
|
|
2542
|
+
const r = () => t(ua());
|
|
2543
|
+
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
2529
2544
|
}, []), e;
|
|
2530
|
-
},
|
|
2545
|
+
}, zr = ({
|
|
2531
2546
|
onClose: e,
|
|
2532
2547
|
onConfirm: t,
|
|
2533
|
-
onFolderPopupPathChange:
|
|
2548
|
+
onFolderPopupPathChange: r,
|
|
2534
2549
|
setDestinationFolderPath: a,
|
|
2535
2550
|
open: n,
|
|
2536
|
-
copyLabel:
|
|
2551
|
+
copyLabel: s = "Copy",
|
|
2537
2552
|
moveLabel: l = "Move",
|
|
2538
2553
|
addFolderLabel: i = "Add folder",
|
|
2539
2554
|
mode: p = ge.Copy,
|
|
@@ -2552,43 +2567,43 @@ const ks = ({
|
|
|
2552
2567
|
processDestinationFolderPath: x,
|
|
2553
2568
|
...F
|
|
2554
2569
|
}) => {
|
|
2555
|
-
const [I, S] = z(!1), [
|
|
2556
|
-
S(
|
|
2557
|
-
}, []), B =
|
|
2558
|
-
const
|
|
2559
|
-
return v &&
|
|
2570
|
+
const [I, S] = z(!1), [O, M] = z(!1), V = ce(null), A = Vo(), _ = d((U) => {
|
|
2571
|
+
S(U);
|
|
2572
|
+
}, []), B = j(() => {
|
|
2573
|
+
const U = [];
|
|
2574
|
+
return v && U.push({
|
|
2560
2575
|
key: "add-folder",
|
|
2561
2576
|
label: i,
|
|
2562
|
-
icon: /* @__PURE__ */ o(Qo, { ...
|
|
2577
|
+
icon: /* @__PURE__ */ o(Qo, { ...P, className: "text-secondary" }),
|
|
2563
2578
|
onClick: () => {
|
|
2564
|
-
|
|
2579
|
+
V.current?.createFolder(), M(!1);
|
|
2565
2580
|
}
|
|
2566
|
-
}), c &&
|
|
2581
|
+
}), c && U.push({
|
|
2567
2582
|
key: "show-hidden-files",
|
|
2568
2583
|
label: C,
|
|
2569
|
-
icon: /* @__PURE__ */ o(So, { ...
|
|
2584
|
+
icon: /* @__PURE__ */ o(So, { ...P, className: "text-secondary" }),
|
|
2570
2585
|
onClick: () => {
|
|
2571
|
-
S((
|
|
2586
|
+
S((Y) => !Y), M(!1);
|
|
2572
2587
|
}
|
|
2573
|
-
}),
|
|
2588
|
+
}), U;
|
|
2574
2589
|
}, [
|
|
2575
2590
|
i,
|
|
2576
2591
|
C,
|
|
2577
2592
|
c,
|
|
2578
2593
|
v
|
|
2579
|
-
]),
|
|
2580
|
-
(
|
|
2581
|
-
if (
|
|
2582
|
-
let
|
|
2583
|
-
|
|
2594
|
+
]), k = d(
|
|
2595
|
+
(U) => {
|
|
2596
|
+
if (U) {
|
|
2597
|
+
let Y = x ? x(U) : U;
|
|
2598
|
+
r?.(Y), a?.(Y);
|
|
2584
2599
|
}
|
|
2585
2600
|
},
|
|
2586
2601
|
[
|
|
2587
|
-
|
|
2602
|
+
r,
|
|
2588
2603
|
a,
|
|
2589
2604
|
x
|
|
2590
2605
|
]
|
|
2591
|
-
),
|
|
2606
|
+
), Q = p === ge.Copy ? "Copy to" : "Move to", te = j(() => !h || !b ? !1 : b === h, [h, b]);
|
|
2592
2607
|
return /* @__PURE__ */ o(
|
|
2593
2608
|
_o,
|
|
2594
2609
|
{
|
|
@@ -2599,18 +2614,18 @@ const ks = ({
|
|
|
2599
2614
|
size: Gn.Lg,
|
|
2600
2615
|
className: "md:!h-[800px] !bg-layer-sunken",
|
|
2601
2616
|
footer: /* @__PURE__ */ X("div", { className: "flex justify-between items-center gap-2 p-4 md:px-6", children: [
|
|
2602
|
-
/* @__PURE__ */ o("div", { className: "flex items-center gap-4 min-w-0", children:
|
|
2617
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-4 min-w-0", children: A ? /* @__PURE__ */ o(
|
|
2603
2618
|
ht,
|
|
2604
2619
|
{
|
|
2605
2620
|
items: B,
|
|
2606
|
-
open:
|
|
2607
|
-
onOpenChange:
|
|
2621
|
+
open: O,
|
|
2622
|
+
onOpenChange: M,
|
|
2608
2623
|
children: /* @__PURE__ */ o(
|
|
2609
2624
|
Et,
|
|
2610
2625
|
{
|
|
2611
2626
|
size: jn.Large,
|
|
2612
2627
|
"aria-label": "More options",
|
|
2613
|
-
icon: /* @__PURE__ */ o(ln, { ...
|
|
2628
|
+
icon: /* @__PURE__ */ o(ln, { ...P })
|
|
2614
2629
|
}
|
|
2615
2630
|
)
|
|
2616
2631
|
}
|
|
@@ -2620,48 +2635,48 @@ const ks = ({
|
|
|
2620
2635
|
{
|
|
2621
2636
|
label: i,
|
|
2622
2637
|
appearance: ga.Ghost,
|
|
2623
|
-
iconBefore: /* @__PURE__ */ o(Qo, { ...
|
|
2638
|
+
iconBefore: /* @__PURE__ */ o(Qo, { ...P }),
|
|
2624
2639
|
onClick: () => {
|
|
2625
|
-
|
|
2640
|
+
V.current?.createFolder();
|
|
2626
2641
|
}
|
|
2627
2642
|
}
|
|
2628
2643
|
),
|
|
2629
|
-
v && c && /* @__PURE__ */ o("div", { className: "w-px h-[26px] bg-
|
|
2644
|
+
v && c && /* @__PURE__ */ o("div", { className: "w-px h-[26px] bg-control-disable my-2" }),
|
|
2630
2645
|
c && /* @__PURE__ */ o(Ie, { children: /* @__PURE__ */ o("div", { className: "inline-flex items-center cursor-pointer", children: /* @__PURE__ */ o(
|
|
2631
2646
|
va,
|
|
2632
2647
|
{
|
|
2633
|
-
label: C,
|
|
2648
|
+
labelProps: { label: C },
|
|
2634
2649
|
isOn: I,
|
|
2635
|
-
onChange:
|
|
2636
|
-
|
|
2650
|
+
onChange: _,
|
|
2651
|
+
id: "hidden-files-switch-modal"
|
|
2637
2652
|
}
|
|
2638
2653
|
) }) })
|
|
2639
2654
|
] }) }),
|
|
2640
2655
|
/* @__PURE__ */ X("div", { className: "flex space-x-4 items-center", children: [
|
|
2641
|
-
/* @__PURE__ */ o(
|
|
2642
|
-
|
|
2656
|
+
/* @__PURE__ */ o(sn, { onClick: e, label: "Cancel" }),
|
|
2657
|
+
te ? /* @__PURE__ */ o(Vn, { tooltip: D, children: /* @__PURE__ */ o(
|
|
2643
2658
|
on,
|
|
2644
2659
|
{
|
|
2645
2660
|
onClick: t,
|
|
2646
|
-
label: p === "copy" ?
|
|
2647
|
-
disabled:
|
|
2648
|
-
"aria-disabled":
|
|
2661
|
+
label: p === "copy" ? s : l,
|
|
2662
|
+
disabled: te,
|
|
2663
|
+
"aria-disabled": te
|
|
2649
2664
|
}
|
|
2650
2665
|
) }) : /* @__PURE__ */ o(
|
|
2651
2666
|
on,
|
|
2652
2667
|
{
|
|
2653
2668
|
onClick: t,
|
|
2654
|
-
label: p === "copy" ?
|
|
2669
|
+
label: p === "copy" ? s : l
|
|
2655
2670
|
}
|
|
2656
2671
|
)
|
|
2657
2672
|
] })
|
|
2658
2673
|
] }),
|
|
2659
|
-
header: m ??
|
|
2660
|
-
ariaLabel:
|
|
2674
|
+
header: m ?? Q,
|
|
2675
|
+
ariaLabel: Q,
|
|
2661
2676
|
children: /* @__PURE__ */ X("div", { className: "bg-layer-sunken h-full flex flex-col", children: [
|
|
2662
|
-
T && /* @__PURE__ */ o("div", { className: "px-6 mb-4 pt-4", children: /* @__PURE__ */ o(
|
|
2677
|
+
T && /* @__PURE__ */ o("div", { className: "px-6 mb-4 pt-4", children: /* @__PURE__ */ o(ws, { ...T }) }),
|
|
2663
2678
|
/* @__PURE__ */ o("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ o(
|
|
2664
|
-
|
|
2679
|
+
hi,
|
|
2665
2680
|
{
|
|
2666
2681
|
...F,
|
|
2667
2682
|
gridClassName: "size-full",
|
|
@@ -2669,10 +2684,10 @@ const ks = ({
|
|
|
2669
2684
|
F.className,
|
|
2670
2685
|
"bg-layer-sunken h-full flex pt-0"
|
|
2671
2686
|
),
|
|
2672
|
-
actionsRef:
|
|
2687
|
+
actionsRef: V,
|
|
2673
2688
|
path: h,
|
|
2674
2689
|
showHiddenFiles: I,
|
|
2675
|
-
onShowHiddenFilesChange:
|
|
2690
|
+
onShowHiddenFilesChange: _,
|
|
2676
2691
|
treeOptions: {
|
|
2677
2692
|
...F.treeOptions,
|
|
2678
2693
|
collapsed: f,
|
|
@@ -2686,7 +2701,7 @@ const ks = ({
|
|
|
2686
2701
|
},
|
|
2687
2702
|
onUploadFiles: u,
|
|
2688
2703
|
onValidateUpload: y,
|
|
2689
|
-
onPathChange:
|
|
2704
|
+
onPathChange: k,
|
|
2690
2705
|
maxFileSize: g
|
|
2691
2706
|
}
|
|
2692
2707
|
) })
|
|
@@ -2694,31 +2709,31 @@ const ks = ({
|
|
|
2694
2709
|
}
|
|
2695
2710
|
);
|
|
2696
2711
|
};
|
|
2697
|
-
function
|
|
2712
|
+
function _r({
|
|
2698
2713
|
actions: e,
|
|
2699
2714
|
direction: t = tn.Normal,
|
|
2700
|
-
moreButtonWidth:
|
|
2715
|
+
moreButtonWidth: r = ya,
|
|
2701
2716
|
actionsGap: a = 8,
|
|
2702
2717
|
containerPadding: n = 8,
|
|
2703
|
-
dependencies:
|
|
2718
|
+
dependencies: s = []
|
|
2704
2719
|
}) {
|
|
2705
2720
|
const l = ce(null), i = ce(null), p = ce(null), C = ce(null), c = ce([]), [v, u] = z(0), y = d(
|
|
2706
2721
|
(b, D) => {
|
|
2707
|
-
const h = p.current?.offsetWidth ?? 0, f = C.current?.offsetWidth ?? 0, T = h + f, F = D.getBoundingClientRect().width - T -
|
|
2722
|
+
const h = p.current?.offsetWidth ?? 0, f = C.current?.offsetWidth ?? 0, T = h + f, F = D.getBoundingClientRect().width - T - r - a * 2 - n * 2;
|
|
2708
2723
|
let I = 0, S = 0;
|
|
2709
2724
|
if (t === tn.Reverse)
|
|
2710
|
-
for (let
|
|
2725
|
+
for (let O = b.length - 1; O >= 0 && (I += b[O] + a, !(I > F)); O--)
|
|
2711
2726
|
S++;
|
|
2712
2727
|
else
|
|
2713
|
-
for (const
|
|
2714
|
-
if (I +=
|
|
2728
|
+
for (const O of b) {
|
|
2729
|
+
if (I += O + a, I > F) break;
|
|
2715
2730
|
S++;
|
|
2716
2731
|
}
|
|
2717
2732
|
u(S);
|
|
2718
2733
|
},
|
|
2719
|
-
[a, n, t,
|
|
2734
|
+
[a, n, t, r]
|
|
2720
2735
|
);
|
|
2721
|
-
|
|
2736
|
+
ps(
|
|
2722
2737
|
() => {
|
|
2723
2738
|
if (!i.current || !l.current) return;
|
|
2724
2739
|
const D = Array.from(i.current.children).map(
|
|
@@ -2728,7 +2743,7 @@ function zs({
|
|
|
2728
2743
|
},
|
|
2729
2744
|
// Re-measure when the action list or layout-affecting deps (e.g. isMobile) change
|
|
2730
2745
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2731
|
-
[e, y, ...
|
|
2746
|
+
[e, y, ...s]
|
|
2732
2747
|
), pe(() => {
|
|
2733
2748
|
if (!l.current) return;
|
|
2734
2749
|
let b = null;
|
|
@@ -2746,7 +2761,7 @@ function zs({
|
|
|
2746
2761
|
e.length,
|
|
2747
2762
|
y,
|
|
2748
2763
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2749
|
-
...
|
|
2764
|
+
...s
|
|
2750
2765
|
]);
|
|
2751
2766
|
const g = t === tn.Reverse ? e.slice(0, e.length - v) : e.slice(v);
|
|
2752
2767
|
return {
|
|
@@ -2760,17 +2775,17 @@ function zs({
|
|
|
2760
2775
|
}
|
|
2761
2776
|
};
|
|
2762
2777
|
}
|
|
2763
|
-
const
|
|
2778
|
+
const Br = 12, Wr = 8, Hr = ({ getSelectionLabel: e, onClearSelection: t, actions: r, selectedCount: a }) => {
|
|
2764
2779
|
const n = Vo(), {
|
|
2765
|
-
refs: { containerRef:
|
|
2780
|
+
refs: { containerRef: s, leftSectionRef: l, measureRef: i },
|
|
2766
2781
|
visibleActions: p,
|
|
2767
2782
|
hiddenActions: C
|
|
2768
|
-
} =
|
|
2769
|
-
actions:
|
|
2783
|
+
} = _r({
|
|
2784
|
+
actions: r,
|
|
2770
2785
|
direction: tn.Reverse,
|
|
2771
2786
|
dependencies: [n],
|
|
2772
|
-
actionsGap:
|
|
2773
|
-
containerPadding:
|
|
2787
|
+
actionsGap: Br,
|
|
2788
|
+
containerPadding: Wr
|
|
2774
2789
|
}), c = e(a);
|
|
2775
2790
|
return /* @__PURE__ */ X(Ie, { children: [
|
|
2776
2791
|
/* @__PURE__ */ o(
|
|
@@ -2778,13 +2793,13 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2778
2793
|
{
|
|
2779
2794
|
ref: i,
|
|
2780
2795
|
className: "absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",
|
|
2781
|
-
children:
|
|
2796
|
+
children: r.map(({ key: v, icon: u, title: y }) => /* @__PURE__ */ o(sn, { iconBefore: u, label: y }, v))
|
|
2782
2797
|
}
|
|
2783
2798
|
),
|
|
2784
2799
|
/* @__PURE__ */ X(
|
|
2785
2800
|
"div",
|
|
2786
2801
|
{
|
|
2787
|
-
ref:
|
|
2802
|
+
ref: s,
|
|
2788
2803
|
className: "rounded bg-layer-raised p-2 flex justify-between items-center w-full",
|
|
2789
2804
|
role: "toolbar",
|
|
2790
2805
|
"aria-label": "File bulk actions",
|
|
@@ -2796,7 +2811,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2796
2811
|
onClick: t,
|
|
2797
2812
|
textClassName: "text-accent whitespace-nowrap",
|
|
2798
2813
|
appearance: ga.Ghost,
|
|
2799
|
-
iconBefore: /* @__PURE__ */ o(
|
|
2814
|
+
iconBefore: /* @__PURE__ */ o(as, { ...P })
|
|
2800
2815
|
}
|
|
2801
2816
|
) }),
|
|
2802
2817
|
/* @__PURE__ */ X("div", { className: "flex flex-1 w-full gap-3 items-center justify-end", children: [
|
|
@@ -2809,14 +2824,14 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2809
2824
|
Et,
|
|
2810
2825
|
{
|
|
2811
2826
|
className: "h-[38px]",
|
|
2812
|
-
icon: /* @__PURE__ */ o(ln, { ...
|
|
2827
|
+
icon: /* @__PURE__ */ o(ln, { ...P })
|
|
2813
2828
|
}
|
|
2814
2829
|
)
|
|
2815
2830
|
}
|
|
2816
2831
|
),
|
|
2817
2832
|
p.map(
|
|
2818
2833
|
({ key: v, icon: u, tooltip: y, title: g, onClick: m, disabled: b }) => /* @__PURE__ */ o(
|
|
2819
|
-
|
|
2834
|
+
sn,
|
|
2820
2835
|
{
|
|
2821
2836
|
className: "!p-[9px]",
|
|
2822
2837
|
iconBefore: u,
|
|
@@ -2833,13 +2848,13 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2833
2848
|
}
|
|
2834
2849
|
)
|
|
2835
2850
|
] });
|
|
2836
|
-
},
|
|
2851
|
+
}, Ur = ({
|
|
2837
2852
|
open: e,
|
|
2838
2853
|
itemsToDelete: t,
|
|
2839
|
-
onClose:
|
|
2854
|
+
onClose: r,
|
|
2840
2855
|
onConfirm: a,
|
|
2841
2856
|
cancelLabel: n = "Cancel",
|
|
2842
|
-
confirmLabel:
|
|
2857
|
+
confirmLabel: s = "Delete",
|
|
2843
2858
|
titleRenderer: l,
|
|
2844
2859
|
contentRenderer: i
|
|
2845
2860
|
}) => {
|
|
@@ -2869,26 +2884,26 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2869
2884
|
] }) })
|
|
2870
2885
|
] }), u = i?.(p) || v;
|
|
2871
2886
|
return /* @__PURE__ */ o(
|
|
2872
|
-
|
|
2887
|
+
Ns,
|
|
2873
2888
|
{
|
|
2874
2889
|
open: e,
|
|
2875
2890
|
header: c,
|
|
2876
2891
|
ariaLabel: C,
|
|
2877
|
-
confirmLabel:
|
|
2892
|
+
confirmLabel: s,
|
|
2878
2893
|
cancelLabel: n,
|
|
2879
|
-
variant:
|
|
2880
|
-
onClose:
|
|
2894
|
+
variant: Ds.Danger,
|
|
2895
|
+
onClose: r,
|
|
2881
2896
|
onConfirm: a,
|
|
2882
2897
|
children: u
|
|
2883
2898
|
}
|
|
2884
2899
|
);
|
|
2885
|
-
}, ha = (e) => e.split("/").map((t) => t.trim()).filter(Boolean),
|
|
2900
|
+
}, ha = (e) => e.split("/").map((t) => t.trim()).filter(Boolean), Gr = "w-full flex items-center justify-between gap-4", Vr = "min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-raised px-3 flex items-center rounded", $r = "w-[260px]", jr = ({
|
|
2886
2901
|
ariaLabel: e = "Breadcrumb",
|
|
2887
2902
|
labelClassName: t,
|
|
2888
|
-
onItemClick:
|
|
2903
|
+
onItemClick: r,
|
|
2889
2904
|
path: a,
|
|
2890
2905
|
makeHref: n,
|
|
2891
|
-
rootItemPath:
|
|
2906
|
+
rootItemPath: s,
|
|
2892
2907
|
rootItemLabel: l,
|
|
2893
2908
|
breadcrumbsHiddenPathPart: i,
|
|
2894
2909
|
className: p,
|
|
@@ -2903,79 +2918,81 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2903
2918
|
searchContainerClassName: D,
|
|
2904
2919
|
isCompactView: h = !1
|
|
2905
2920
|
}) => {
|
|
2906
|
-
const f =
|
|
2921
|
+
const f = j(() => {
|
|
2907
2922
|
if (!a) return;
|
|
2908
|
-
let
|
|
2909
|
-
const
|
|
2910
|
-
let
|
|
2923
|
+
let M = ha(a);
|
|
2924
|
+
const V = [...M];
|
|
2925
|
+
let A = 0;
|
|
2911
2926
|
if (i) {
|
|
2912
|
-
const
|
|
2913
|
-
if (
|
|
2914
|
-
const
|
|
2915
|
-
(
|
|
2927
|
+
const B = ha(i);
|
|
2928
|
+
if (B.length) {
|
|
2929
|
+
const k = M.findIndex(
|
|
2930
|
+
(Q, te) => B.every((U, Y) => M[te + Y] === U)
|
|
2916
2931
|
);
|
|
2917
|
-
|
|
2918
|
-
...
|
|
2919
|
-
...
|
|
2932
|
+
k !== -1 && (A = B.length, M = [
|
|
2933
|
+
...M.slice(0, k),
|
|
2934
|
+
...M.slice(k + B.length)
|
|
2920
2935
|
]);
|
|
2921
2936
|
}
|
|
2922
2937
|
}
|
|
2923
|
-
if (!
|
|
2924
|
-
const
|
|
2925
|
-
const
|
|
2938
|
+
if (!M.length) return [{ label: "/" }];
|
|
2939
|
+
const _ = M.map((B, k) => {
|
|
2940
|
+
const Q = k < M.length - A ? k : k + A, te = V.slice(0, Q + 1), U = typeof n == "function" ? n(te, Q) : void 0;
|
|
2926
2941
|
return {
|
|
2927
|
-
label:
|
|
2928
|
-
href:
|
|
2929
|
-
onClick:
|
|
2930
|
-
|
|
2942
|
+
label: B,
|
|
2943
|
+
href: U,
|
|
2944
|
+
onClick: r ? (Y) => {
|
|
2945
|
+
Y.preventDefault(), r(U);
|
|
2931
2946
|
} : void 0
|
|
2932
2947
|
};
|
|
2933
2948
|
});
|
|
2934
|
-
if (
|
|
2935
|
-
const
|
|
2936
|
-
if (
|
|
2937
|
-
(
|
|
2938
|
-
) &&
|
|
2939
|
-
const
|
|
2949
|
+
if (s && l) {
|
|
2950
|
+
const B = s.split("/").filter(Boolean), k = a.split("/").filter(Boolean);
|
|
2951
|
+
if (B.every(
|
|
2952
|
+
(te, U) => k[U] === te
|
|
2953
|
+
) && _.length > 0) {
|
|
2954
|
+
const te = _.slice(B.length);
|
|
2940
2955
|
return [
|
|
2941
2956
|
{
|
|
2942
2957
|
label: l,
|
|
2943
|
-
href:
|
|
2944
|
-
onClick:
|
|
2945
|
-
|
|
2958
|
+
href: s,
|
|
2959
|
+
onClick: r ? (U) => {
|
|
2960
|
+
U.preventDefault(), r(s);
|
|
2946
2961
|
} : void 0
|
|
2947
2962
|
},
|
|
2948
|
-
...
|
|
2963
|
+
...te
|
|
2949
2964
|
];
|
|
2950
2965
|
}
|
|
2951
2966
|
}
|
|
2952
|
-
return
|
|
2967
|
+
return _;
|
|
2953
2968
|
}, [
|
|
2954
2969
|
a,
|
|
2955
2970
|
i,
|
|
2956
|
-
|
|
2971
|
+
s,
|
|
2957
2972
|
l,
|
|
2958
2973
|
n,
|
|
2959
|
-
|
|
2960
|
-
]), [T, x] = z(!1), F =
|
|
2974
|
+
r
|
|
2975
|
+
]), [T, x] = z(!1), F = (M) => {
|
|
2976
|
+
m?.(M ?? "");
|
|
2977
|
+
}, I = d(() => {
|
|
2961
2978
|
if (h && !T) {
|
|
2962
2979
|
x(!0);
|
|
2963
|
-
const
|
|
2964
|
-
|
|
2980
|
+
const M = document.getElementById(u);
|
|
2981
|
+
M && M.focus();
|
|
2965
2982
|
}
|
|
2966
|
-
}, [u, T, h]),
|
|
2983
|
+
}, [u, T, h]), S = d(() => {
|
|
2967
2984
|
(!v || String(v).trim() === "") && m?.("");
|
|
2968
|
-
}, [v, m]),
|
|
2969
|
-
|
|
2985
|
+
}, [v, m]), O = d(() => h && T ? /* @__PURE__ */ o(
|
|
2986
|
+
sn,
|
|
2970
2987
|
{
|
|
2971
2988
|
className: "!p-[9px]",
|
|
2972
|
-
iconBefore: /* @__PURE__ */ o(
|
|
2989
|
+
iconBefore: /* @__PURE__ */ o(ss, { ...P }),
|
|
2973
2990
|
onClick: () => {
|
|
2974
2991
|
x(!1), m?.("");
|
|
2975
2992
|
}
|
|
2976
2993
|
}
|
|
2977
|
-
) : /* @__PURE__ */ o("div", { className:
|
|
2978
|
-
|
|
2994
|
+
) : /* @__PURE__ */ o("div", { className: Vr, children: /* @__PURE__ */ o(
|
|
2995
|
+
xs,
|
|
2979
2996
|
{
|
|
2980
2997
|
pathItems: f,
|
|
2981
2998
|
ariaLabel: e,
|
|
@@ -2995,7 +3012,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2995
3012
|
"div",
|
|
2996
3013
|
{
|
|
2997
3014
|
className: Ee(
|
|
2998
|
-
|
|
3015
|
+
Gr,
|
|
2999
3016
|
{
|
|
3000
3017
|
"gap-3": h
|
|
3001
3018
|
},
|
|
@@ -3003,25 +3020,25 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3003
3020
|
),
|
|
3004
3021
|
"aria-label": "navigation-panel",
|
|
3005
3022
|
children: [
|
|
3006
|
-
|
|
3023
|
+
O(),
|
|
3007
3024
|
c && /* @__PURE__ */ o(
|
|
3008
3025
|
"div",
|
|
3009
3026
|
{
|
|
3010
|
-
className: Ee(
|
|
3027
|
+
className: Ee($r, {
|
|
3011
3028
|
"w-[40px]": h && !T,
|
|
3012
3029
|
"w-full": h && T
|
|
3013
3030
|
}),
|
|
3014
3031
|
role: "search",
|
|
3015
3032
|
"aria-label": "Search",
|
|
3016
|
-
onClick:
|
|
3033
|
+
onClick: I,
|
|
3017
3034
|
children: /* @__PURE__ */ o(
|
|
3018
|
-
|
|
3035
|
+
bs,
|
|
3019
3036
|
{
|
|
3020
3037
|
id: u,
|
|
3021
3038
|
value: v ?? "",
|
|
3022
|
-
onChange:
|
|
3039
|
+
onChange: F,
|
|
3023
3040
|
disabled: y,
|
|
3024
|
-
onBlur:
|
|
3041
|
+
onBlur: S,
|
|
3025
3042
|
invalid: g,
|
|
3026
3043
|
className: b,
|
|
3027
3044
|
wrapperClassName: h && !T ? "pl-2.5" : "",
|
|
@@ -3033,15 +3050,15 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3033
3050
|
]
|
|
3034
3051
|
}
|
|
3035
3052
|
);
|
|
3036
|
-
},
|
|
3053
|
+
}, Zr = ({
|
|
3037
3054
|
tabs: e,
|
|
3038
3055
|
activeTab: t,
|
|
3039
|
-
onTabChange:
|
|
3056
|
+
onTabChange: r,
|
|
3040
3057
|
areHiddenFilesVisible: a,
|
|
3041
3058
|
onToggleHiddenFiles: n,
|
|
3042
|
-
isNewButtonVisible:
|
|
3059
|
+
isNewButtonVisible: s,
|
|
3043
3060
|
isNewButtonDisabled: l,
|
|
3044
|
-
newButtonVariant: i =
|
|
3061
|
+
newButtonVariant: i = Ts.Primary,
|
|
3045
3062
|
newButtonDropdownItems: p = [],
|
|
3046
3063
|
newButtonLabel: C = "New",
|
|
3047
3064
|
hiddenFilesSwitcherLabel: c = "Hidden files",
|
|
@@ -3050,11 +3067,11 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3050
3067
|
showHiddenFilesToggle: y = !0,
|
|
3051
3068
|
disabledNewButtonTooltip: g
|
|
3052
3069
|
}) => {
|
|
3053
|
-
const m = Vo(), b =
|
|
3070
|
+
const m = Vo(), b = j(() => [
|
|
3054
3071
|
{
|
|
3055
3072
|
key: "hidden-files-switch",
|
|
3056
3073
|
label: a ? u : v,
|
|
3057
|
-
icon: a ? /* @__PURE__ */ o(
|
|
3074
|
+
icon: a ? /* @__PURE__ */ o(rs, { ...P, className: "text-secondary" }) : /* @__PURE__ */ o(So, { ...P, className: "text-secondary" }),
|
|
3058
3075
|
onClick: () => n?.(!a)
|
|
3059
3076
|
}
|
|
3060
3077
|
], [
|
|
@@ -3062,27 +3079,24 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3062
3079
|
u,
|
|
3063
3080
|
v,
|
|
3064
3081
|
n
|
|
3065
|
-
]), D = () => e && t &&
|
|
3066
|
-
|
|
3082
|
+
]), D = () => e && t && r ? /* @__PURE__ */ o(
|
|
3083
|
+
Rs,
|
|
3067
3084
|
{
|
|
3068
3085
|
tabs: e,
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
screenThreshold: Ir.Tablet,
|
|
3072
|
-
smallScreenContainerClassName: "w-fit bg-transparent h-[38px] overflow-hidden",
|
|
3073
|
-
smallScreenDropdownItemClassName: "px-3 h-[38px]"
|
|
3086
|
+
activeTabId: t,
|
|
3087
|
+
onTabChange: (T) => r(T)
|
|
3074
3088
|
}
|
|
3075
3089
|
) : null, h = () => /* @__PURE__ */ X(Ie, { children: [
|
|
3076
3090
|
y && /* @__PURE__ */ o(
|
|
3077
3091
|
va,
|
|
3078
3092
|
{
|
|
3079
|
-
|
|
3080
|
-
label: c,
|
|
3093
|
+
id: "hidden-files-switch",
|
|
3094
|
+
labelProps: { label: c },
|
|
3081
3095
|
isOn: a,
|
|
3082
3096
|
onChange: n
|
|
3083
3097
|
}
|
|
3084
3098
|
),
|
|
3085
|
-
|
|
3099
|
+
s && /* @__PURE__ */ o(
|
|
3086
3100
|
Vn,
|
|
3087
3101
|
{
|
|
3088
3102
|
tooltip: l && g ? g : void 0,
|
|
@@ -3112,7 +3126,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3112
3126
|
)
|
|
3113
3127
|
}
|
|
3114
3128
|
),
|
|
3115
|
-
|
|
3129
|
+
s ? /* @__PURE__ */ o(
|
|
3116
3130
|
Vn,
|
|
3117
3131
|
{
|
|
3118
3132
|
tooltip: l && g ? g : void 0,
|
|
@@ -3132,13 +3146,13 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3132
3146
|
/* @__PURE__ */ o("div", { className: "flex-1 min-w-0", children: D() }),
|
|
3133
3147
|
/* @__PURE__ */ o("div", { className: "flex gap-2 shrink-0 items-center", children: m ? f() : h() })
|
|
3134
3148
|
] });
|
|
3135
|
-
},
|
|
3149
|
+
}, Xr = 100, Qt = 16, Ue = "text-secondary", Hn = "text-primary min-w-0", qr = "text-primary break-words min-w-0", Jt = "bg-layer-sunken", Yr = ({
|
|
3136
3150
|
open: e,
|
|
3137
3151
|
onClose: t,
|
|
3138
|
-
fileMetadata:
|
|
3152
|
+
fileMetadata: r,
|
|
3139
3153
|
loading: a = !1,
|
|
3140
3154
|
header: n = "Information",
|
|
3141
|
-
nameLabel:
|
|
3155
|
+
nameLabel: s = "Name:",
|
|
3142
3156
|
pathLabel: l = "Path:",
|
|
3143
3157
|
modifiedDateLabel: i = "Modified Date:",
|
|
3144
3158
|
sizeLabel: p = "Size:",
|
|
@@ -3157,9 +3171,9 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3157
3171
|
"div",
|
|
3158
3172
|
{
|
|
3159
3173
|
className: "grid gap-4 items-center dial-small-text",
|
|
3160
|
-
style: { gridTemplateColumns: `${
|
|
3174
|
+
style: { gridTemplateColumns: `${Xr}px 1fr` },
|
|
3161
3175
|
children: a ? /* @__PURE__ */ X(Ie, { children: [
|
|
3162
|
-
/* @__PURE__ */ o("div", { className: Ue, children:
|
|
3176
|
+
/* @__PURE__ */ o("div", { className: Ue, children: s }),
|
|
3163
3177
|
/* @__PURE__ */ o(
|
|
3164
3178
|
qt,
|
|
3165
3179
|
{
|
|
@@ -3209,15 +3223,15 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3209
3223
|
className: Jt
|
|
3210
3224
|
}
|
|
3211
3225
|
)
|
|
3212
|
-
] }) :
|
|
3213
|
-
/* @__PURE__ */ o("div", { className: Ue, children:
|
|
3214
|
-
/* @__PURE__ */ o("div", { className: Hn, children: /* @__PURE__ */ o(Tt, { text:
|
|
3226
|
+
] }) : r ? /* @__PURE__ */ X(Ie, { children: [
|
|
3227
|
+
/* @__PURE__ */ o("div", { className: Ue, children: s }),
|
|
3228
|
+
/* @__PURE__ */ o("div", { className: Hn, children: /* @__PURE__ */ o(Tt, { text: r.name }) }),
|
|
3215
3229
|
/* @__PURE__ */ o("div", { className: Ue, children: i }),
|
|
3216
3230
|
/* @__PURE__ */ o("div", { className: Hn, children: /* @__PURE__ */ o(
|
|
3217
3231
|
Tt,
|
|
3218
3232
|
{
|
|
3219
|
-
text:
|
|
3220
|
-
|
|
3233
|
+
text: sr(
|
|
3234
|
+
r.updatedAt,
|
|
3221
3235
|
c,
|
|
3222
3236
|
v
|
|
3223
3237
|
)
|
|
@@ -3227,55 +3241,55 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3227
3241
|
/* @__PURE__ */ o("div", { className: Hn, children: /* @__PURE__ */ o(
|
|
3228
3242
|
Tt,
|
|
3229
3243
|
{
|
|
3230
|
-
text:
|
|
3244
|
+
text: rn(r.contentLength)
|
|
3231
3245
|
}
|
|
3232
3246
|
) }),
|
|
3233
3247
|
/* @__PURE__ */ o("div", { className: Ue, children: C }),
|
|
3234
|
-
/* @__PURE__ */ o("div", { className: Hn, children: /* @__PURE__ */ o(Tt, { text:
|
|
3248
|
+
/* @__PURE__ */ o("div", { className: Hn, children: /* @__PURE__ */ o(Tt, { text: r.author || "—" }) }),
|
|
3235
3249
|
/* @__PURE__ */ o("div", { className: Ue, children: l }),
|
|
3236
|
-
/* @__PURE__ */ o("div", { className:
|
|
3250
|
+
/* @__PURE__ */ o("div", { className: qr, children: decodeURIComponent(r.path) })
|
|
3237
3251
|
] }) : null
|
|
3238
3252
|
}
|
|
3239
3253
|
) })
|
|
3240
3254
|
}
|
|
3241
|
-
),
|
|
3255
|
+
), Kr = {
|
|
3242
3256
|
size: 10,
|
|
3243
3257
|
stroke: 2
|
|
3244
|
-
},
|
|
3258
|
+
}, Qr = 26, en = "__new_folder", Jr = ({
|
|
3245
3259
|
name: e,
|
|
3246
3260
|
type: t,
|
|
3247
|
-
shared:
|
|
3261
|
+
shared: r = !1,
|
|
3248
3262
|
loading: a = !1,
|
|
3249
3263
|
sharedIndicatorClassName: n,
|
|
3250
|
-
sharedIndicatorTooltip:
|
|
3264
|
+
sharedIndicatorTooltip: s,
|
|
3251
3265
|
fileExtension: l,
|
|
3252
3266
|
...i
|
|
3253
3267
|
}) => {
|
|
3254
3268
|
const p = (C) => /* @__PURE__ */ X("span", { className: "inline-flex relative text-secondary", role: "img", children: [
|
|
3255
3269
|
C,
|
|
3256
|
-
|
|
3270
|
+
r && /* @__PURE__ */ o("span", { className: "absolute -bottom-0.5 -left-0.5", children: /* @__PURE__ */ o(
|
|
3257
3271
|
na,
|
|
3258
3272
|
{
|
|
3259
3273
|
className: n,
|
|
3260
|
-
sharedIndicatorTooltip:
|
|
3274
|
+
sharedIndicatorTooltip: s
|
|
3261
3275
|
}
|
|
3262
3276
|
) })
|
|
3263
3277
|
] });
|
|
3264
3278
|
if (a)
|
|
3265
|
-
return p(/* @__PURE__ */ o(
|
|
3279
|
+
return p(/* @__PURE__ */ o(Es, {}));
|
|
3266
3280
|
if (t === We.File) {
|
|
3267
3281
|
const C = l || (e.includes(".") ? e.split(".").pop() : void 0);
|
|
3268
3282
|
return /* @__PURE__ */ o(
|
|
3269
|
-
|
|
3283
|
+
Is,
|
|
3270
3284
|
{
|
|
3271
3285
|
...i,
|
|
3272
3286
|
extension: C ?? "",
|
|
3273
3287
|
className: "text-secondary",
|
|
3274
|
-
indicator:
|
|
3288
|
+
indicator: r ? /* @__PURE__ */ o(
|
|
3275
3289
|
na,
|
|
3276
3290
|
{
|
|
3277
3291
|
className: n,
|
|
3278
|
-
sharedIndicatorTooltip:
|
|
3292
|
+
sharedIndicatorTooltip: s
|
|
3279
3293
|
}
|
|
3280
3294
|
) : null,
|
|
3281
3295
|
label: "File type icon"
|
|
@@ -3284,27 +3298,27 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3284
3298
|
}
|
|
3285
3299
|
return t === We.Folder ? p(
|
|
3286
3300
|
/* @__PURE__ */ o(
|
|
3287
|
-
|
|
3301
|
+
Fs,
|
|
3288
3302
|
{
|
|
3289
3303
|
icon: /* @__PURE__ */ o(
|
|
3290
3304
|
pa,
|
|
3291
3305
|
{
|
|
3292
3306
|
className: i.className,
|
|
3293
|
-
size: i.size ??
|
|
3294
|
-
stroke: i.stroke ??
|
|
3307
|
+
size: i.size ?? P.size,
|
|
3308
|
+
stroke: i.stroke ?? P.stroke
|
|
3295
3309
|
}
|
|
3296
3310
|
),
|
|
3297
3311
|
className: "inline-block align-middle"
|
|
3298
3312
|
}
|
|
3299
3313
|
)
|
|
3300
3314
|
) : null;
|
|
3301
|
-
},
|
|
3315
|
+
}, ei = ({
|
|
3302
3316
|
name: e,
|
|
3303
3317
|
type: t,
|
|
3304
|
-
elementId:
|
|
3318
|
+
elementId: r,
|
|
3305
3319
|
loading: a = !1,
|
|
3306
3320
|
shared: n = !1,
|
|
3307
|
-
iconClassName:
|
|
3321
|
+
iconClassName: s,
|
|
3308
3322
|
iconIndicator: l,
|
|
3309
3323
|
iconLabel: i,
|
|
3310
3324
|
iconSize: p,
|
|
@@ -3329,29 +3343,29 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3329
3343
|
""
|
|
3330
3344
|
);
|
|
3331
3345
|
return /* @__PURE__ */ o(Vn, { tooltip: x, children: y || (T ? /* @__PURE__ */ o(
|
|
3332
|
-
|
|
3346
|
+
ls,
|
|
3333
3347
|
{
|
|
3334
|
-
...
|
|
3348
|
+
...P,
|
|
3335
3349
|
className: "text-warning-icon",
|
|
3336
3350
|
"aria-label": "warning"
|
|
3337
3351
|
}
|
|
3338
3352
|
) : /* @__PURE__ */ o(
|
|
3339
|
-
|
|
3353
|
+
is,
|
|
3340
3354
|
{
|
|
3341
|
-
...
|
|
3355
|
+
...P,
|
|
3342
3356
|
className: "text-error",
|
|
3343
3357
|
"aria-label": "alert"
|
|
3344
3358
|
}
|
|
3345
3359
|
)) });
|
|
3346
3360
|
};
|
|
3347
|
-
return /* @__PURE__ */ X("div", { className: "flex gap-2 items-center", ...
|
|
3361
|
+
return /* @__PURE__ */ X("div", { className: "flex gap-2 items-center", ...Ss, children: [
|
|
3348
3362
|
/* @__PURE__ */ o(
|
|
3349
|
-
|
|
3363
|
+
Jr,
|
|
3350
3364
|
{
|
|
3351
3365
|
name: e,
|
|
3352
3366
|
type: t,
|
|
3353
3367
|
label: i,
|
|
3354
|
-
className:
|
|
3368
|
+
className: s,
|
|
3355
3369
|
indicator: l,
|
|
3356
3370
|
size: p,
|
|
3357
3371
|
stroke: C,
|
|
@@ -3363,13 +3377,13 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3363
3377
|
}
|
|
3364
3378
|
),
|
|
3365
3379
|
/* @__PURE__ */ o(
|
|
3366
|
-
|
|
3380
|
+
As,
|
|
3367
3381
|
{
|
|
3368
3382
|
containerClassName: Ee(
|
|
3369
3383
|
"!h-5 !py-[1px] !pl-[7px] pr-[7px]",
|
|
3370
3384
|
u
|
|
3371
3385
|
),
|
|
3372
|
-
id:
|
|
3386
|
+
id: r,
|
|
3373
3387
|
value: e,
|
|
3374
3388
|
onChange: m,
|
|
3375
3389
|
invalid: c,
|
|
@@ -3381,10 +3395,10 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3381
3395
|
}, $n = ({
|
|
3382
3396
|
name: e,
|
|
3383
3397
|
type: t,
|
|
3384
|
-
elementId:
|
|
3398
|
+
elementId: r,
|
|
3385
3399
|
editing: a = !1,
|
|
3386
3400
|
loading: n = !1,
|
|
3387
|
-
creating:
|
|
3401
|
+
creating: s = !1,
|
|
3388
3402
|
shared: l = !1,
|
|
3389
3403
|
iconSize: i = ya,
|
|
3390
3404
|
validate: p,
|
|
@@ -3401,10 +3415,10 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3401
3415
|
forbiddenSymbolsTooltip: f,
|
|
3402
3416
|
...T
|
|
3403
3417
|
}) => {
|
|
3404
|
-
const { value: x, invalid: F, invalidMessage: I, onChange: S, inputRef:
|
|
3418
|
+
const { value: x, invalid: F, invalidMessage: I, onChange: S, inputRef: O } = Ps({
|
|
3405
3419
|
value: e,
|
|
3406
3420
|
isEditing: a,
|
|
3407
|
-
isCreating:
|
|
3421
|
+
isCreating: s,
|
|
3408
3422
|
isLoading: n,
|
|
3409
3423
|
onValidate: p,
|
|
3410
3424
|
onCancel: v,
|
|
@@ -3412,15 +3426,15 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3412
3426
|
onCreateFolderCancel: u,
|
|
3413
3427
|
onCreateFolderSave: y
|
|
3414
3428
|
});
|
|
3415
|
-
if (!a && !
|
|
3416
|
-
const
|
|
3429
|
+
if (!a && !s) {
|
|
3430
|
+
const M = Go(
|
|
3417
3431
|
{
|
|
3418
3432
|
name: e,
|
|
3419
3433
|
isFolder: t === We.Folder
|
|
3420
3434
|
},
|
|
3421
3435
|
h,
|
|
3422
3436
|
f
|
|
3423
|
-
),
|
|
3437
|
+
), V = !!M;
|
|
3424
3438
|
return t === We.Folder ? /* @__PURE__ */ o(
|
|
3425
3439
|
Oo,
|
|
3426
3440
|
{
|
|
@@ -3431,8 +3445,8 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3431
3445
|
className: "max-w-[428px] truncate",
|
|
3432
3446
|
sharedIndicatorClassName: m,
|
|
3433
3447
|
hideTooltip: D,
|
|
3434
|
-
isInvalidName:
|
|
3435
|
-
tooltipContent:
|
|
3448
|
+
isInvalidName: V,
|
|
3449
|
+
tooltipContent: M
|
|
3436
3450
|
}
|
|
3437
3451
|
) : /* @__PURE__ */ o(
|
|
3438
3452
|
Lo,
|
|
@@ -3444,20 +3458,20 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3444
3458
|
iconSize: i,
|
|
3445
3459
|
sharedIndicatorClassName: m,
|
|
3446
3460
|
hideTooltip: D,
|
|
3447
|
-
isInvalidName:
|
|
3448
|
-
tooltipContent:
|
|
3461
|
+
isInvalidName: V,
|
|
3462
|
+
tooltipContent: M
|
|
3449
3463
|
}
|
|
3450
3464
|
);
|
|
3451
3465
|
}
|
|
3452
3466
|
return /* @__PURE__ */ o(
|
|
3453
|
-
|
|
3467
|
+
ei,
|
|
3454
3468
|
{
|
|
3455
3469
|
type: t,
|
|
3456
3470
|
name: x,
|
|
3457
|
-
elementId:
|
|
3471
|
+
elementId: r,
|
|
3458
3472
|
inputInvalid: F,
|
|
3459
3473
|
inputInvalidMessage: I,
|
|
3460
|
-
inputRef:
|
|
3474
|
+
inputRef: O,
|
|
3461
3475
|
onChange: S,
|
|
3462
3476
|
iconSize: i,
|
|
3463
3477
|
fileExtension: c,
|
|
@@ -3466,13 +3480,13 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3466
3480
|
sharedIndicatorClassName: m
|
|
3467
3481
|
}
|
|
3468
3482
|
);
|
|
3469
|
-
},
|
|
3483
|
+
}, ti = ({
|
|
3470
3484
|
items: e,
|
|
3471
3485
|
showFiles: t = !1,
|
|
3472
|
-
expandedPaths:
|
|
3486
|
+
expandedPaths: r,
|
|
3473
3487
|
loadingPaths: a = /* @__PURE__ */ new Set(),
|
|
3474
3488
|
loadedPaths: n = /* @__PURE__ */ new Set(),
|
|
3475
|
-
sharedByMePaths:
|
|
3489
|
+
sharedByMePaths: s = /* @__PURE__ */ new Set(),
|
|
3476
3490
|
selectedPath: l,
|
|
3477
3491
|
emptyStateTitle: i = "No Folders",
|
|
3478
3492
|
emptyStateDescription: p,
|
|
@@ -3492,49 +3506,49 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3492
3506
|
onCreateFolderCancel: F,
|
|
3493
3507
|
forbiddenSymbolsRegExp: I,
|
|
3494
3508
|
forbiddenSymbolsTooltip: S,
|
|
3495
|
-
newFolderDefaultName:
|
|
3509
|
+
newFolderDefaultName: O
|
|
3496
3510
|
}) => {
|
|
3497
|
-
const { expandedPaths:
|
|
3498
|
-
expandedPaths:
|
|
3511
|
+
const { expandedPaths: M, togglePath: V } = Sa({
|
|
3512
|
+
expandedPaths: r ?? /* @__PURE__ */ new Set(),
|
|
3499
3513
|
onExpandedPathsChange: T
|
|
3500
|
-
}),
|
|
3501
|
-
m?.(B),
|
|
3502
|
-
},
|
|
3503
|
-
let
|
|
3504
|
-
return
|
|
3514
|
+
}), A = (B) => {
|
|
3515
|
+
m?.(B), V(B.path);
|
|
3516
|
+
}, _ = (B, k, Q) => {
|
|
3517
|
+
let te = B;
|
|
3518
|
+
return Q && Q.path === u && (te = [
|
|
3505
3519
|
{
|
|
3506
3520
|
folderId: en,
|
|
3507
3521
|
id: en,
|
|
3508
3522
|
items: [],
|
|
3509
|
-
name:
|
|
3510
|
-
nodeType:
|
|
3523
|
+
name: O || "",
|
|
3524
|
+
nodeType: L.FOLDER,
|
|
3511
3525
|
parentPath: u,
|
|
3512
3526
|
path: `${u}/${en}`
|
|
3513
3527
|
},
|
|
3514
3528
|
...B
|
|
3515
|
-
]),
|
|
3516
|
-
const { path:
|
|
3517
|
-
if (!c && Ta(
|
|
3529
|
+
]), te.map((U) => {
|
|
3530
|
+
const { path: Y, nodeType: fe, name: we, items: xe } = U, ue = fe === L.FOLDER;
|
|
3531
|
+
if (!c && Ta(U)) return null;
|
|
3518
3532
|
if (!ue && !t) return;
|
|
3519
|
-
const Te = Array.isArray(xe) && xe.length > 0 && xe.some((H) => H.nodeType ===
|
|
3520
|
-
{ name:
|
|
3533
|
+
const Te = Array.isArray(xe) && xe.length > 0 && xe.some((H) => H.nodeType === L.FOLDER || t), Ne = M.has(Y), W = l === Y, be = a.has(Y), De = v === Y || Y === `${u}/${en}`, G = n.has(Y), ne = s.has(Y), he = g && y && Y === g && ue, _e = f && ((H) => f(H, U)), Oe = W ? "bg-control-accent-alpha rounded" : "", Se = he ? [] : b?.(U) ?? [], R = I ? Go(
|
|
3534
|
+
{ name: U.name, isFolder: ue },
|
|
3521
3535
|
I,
|
|
3522
3536
|
S
|
|
3523
3537
|
) : void 0;
|
|
3524
|
-
return /* @__PURE__ */ o("div", { className: "cursor-pointer text-secondary", children: /* @__PURE__ */ X("div", { className: "flex flex-col w-full", "aria-label": "folder", children: [
|
|
3538
|
+
return /* @__PURE__ */ o("div", { className: "cursor-pointer text-secondary", children: /* @__PURE__ */ X("div", { className: "flex flex-col w-full gap-1", "aria-label": "folder", children: [
|
|
3525
3539
|
/* @__PURE__ */ o(
|
|
3526
3540
|
ht,
|
|
3527
3541
|
{
|
|
3528
3542
|
trigger: [ma.ContextMenu],
|
|
3529
|
-
className: "w-full",
|
|
3543
|
+
className: "w-full h-[32px]",
|
|
3530
3544
|
anchorToMouse: !0,
|
|
3531
3545
|
items: Se,
|
|
3532
3546
|
children: /* @__PURE__ */ X(
|
|
3533
3547
|
"div",
|
|
3534
3548
|
{
|
|
3535
|
-
style: { paddingLeft: `${
|
|
3549
|
+
style: { paddingLeft: `${k * Qr}px` },
|
|
3536
3550
|
className: Ee(
|
|
3537
|
-
"py-1 gap-
|
|
3551
|
+
"py-1 pr-3 gap-2 dial-small-paragraph-text flex justify-between hover:bg-control-accent-alpha-hover rounded group/item w-full relative",
|
|
3538
3552
|
Oe
|
|
3539
3553
|
),
|
|
3540
3554
|
"aria-selected": W,
|
|
@@ -3543,19 +3557,19 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3543
3557
|
"div",
|
|
3544
3558
|
{
|
|
3545
3559
|
className: "absolute size-full left-0 top-0 z-0",
|
|
3546
|
-
onClick: () =>
|
|
3560
|
+
onClick: () => A(U)
|
|
3547
3561
|
}
|
|
3548
3562
|
),
|
|
3549
3563
|
/* @__PURE__ */ o(
|
|
3550
3564
|
"div",
|
|
3551
3565
|
{
|
|
3552
3566
|
className: "relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",
|
|
3553
|
-
onClick: () => !De &&
|
|
3567
|
+
onClick: () => !De && A(U),
|
|
3554
3568
|
children: /* @__PURE__ */ X(Ie, { children: [
|
|
3555
3569
|
ue && /* @__PURE__ */ o(
|
|
3556
|
-
|
|
3570
|
+
cs,
|
|
3557
3571
|
{
|
|
3558
|
-
...
|
|
3572
|
+
...Kr,
|
|
3559
3573
|
className: an(
|
|
3560
3574
|
"flex-shrink-0",
|
|
3561
3575
|
Ne && "rotate-90 transition-all",
|
|
@@ -3566,21 +3580,21 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3566
3580
|
/* @__PURE__ */ o(
|
|
3567
3581
|
$n,
|
|
3568
3582
|
{
|
|
3569
|
-
elementId: `${
|
|
3583
|
+
elementId: `${Y}-tree-item`,
|
|
3570
3584
|
name: he ? y : we,
|
|
3571
3585
|
type: ue ? We.Folder : We.File,
|
|
3572
3586
|
loading: be,
|
|
3573
3587
|
shared: ne,
|
|
3574
3588
|
sharedIndicatorClassName: Ee(
|
|
3575
|
-
"group-hover/item:bg-accent-
|
|
3576
|
-
W && "bg-accent-
|
|
3589
|
+
"group-hover/item:bg-control-accent-alpha-hover",
|
|
3590
|
+
W && "bg-bg-control-accent-alpha"
|
|
3577
3591
|
),
|
|
3578
|
-
iconSize:
|
|
3592
|
+
iconSize: st,
|
|
3579
3593
|
forbiddenSymbolsRegExp: I,
|
|
3580
3594
|
forbiddenSymbolsTooltip: R,
|
|
3581
3595
|
...!he && {
|
|
3582
3596
|
editing: De,
|
|
3583
|
-
creating:
|
|
3597
|
+
creating: Y === `${u}/${en}`,
|
|
3584
3598
|
onSave: D,
|
|
3585
3599
|
onCancel: h,
|
|
3586
3600
|
validate: _e,
|
|
@@ -3604,7 +3618,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3604
3618
|
{
|
|
3605
3619
|
size: jn.Small,
|
|
3606
3620
|
className: "invisible group-hover/item:visible",
|
|
3607
|
-
icon: /* @__PURE__ */ o(ln, { ...
|
|
3621
|
+
icon: /* @__PURE__ */ o(ln, { ...P })
|
|
3608
3622
|
}
|
|
3609
3623
|
)
|
|
3610
3624
|
}
|
|
@@ -3614,11 +3628,11 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3614
3628
|
)
|
|
3615
3629
|
}
|
|
3616
3630
|
),
|
|
3617
|
-
Ne && (xe ||
|
|
3618
|
-
] }) }, `${
|
|
3631
|
+
Ne && (xe || U?.path === u) && _(xe || [], k + 1, U)
|
|
3632
|
+
] }) }, `${Y}-children`);
|
|
3619
3633
|
});
|
|
3620
3634
|
};
|
|
3621
|
-
return /* @__PURE__ */ o("div", { className: "flex-1 size-full overflow-y-auto", "aria-label": "folders-tree", children: e.length > 0 ?
|
|
3635
|
+
return /* @__PURE__ */ o("div", { className: "flex-1 size-full overflow-y-auto", "aria-label": "folders-tree", children: e.length > 0 ? _(e, 0) : /* @__PURE__ */ o(
|
|
3622
3636
|
wa,
|
|
3623
3637
|
{
|
|
3624
3638
|
title: i,
|
|
@@ -3626,13 +3640,13 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3626
3640
|
icon: C
|
|
3627
3641
|
}
|
|
3628
3642
|
) });
|
|
3629
|
-
},
|
|
3643
|
+
}, ni = ({
|
|
3630
3644
|
selectedFiles: e,
|
|
3631
3645
|
actionLabels: t,
|
|
3632
|
-
onDuplicate:
|
|
3646
|
+
onDuplicate: r,
|
|
3633
3647
|
onCopy: a,
|
|
3634
3648
|
onMove: n,
|
|
3635
|
-
onDownload:
|
|
3649
|
+
onDownload: s,
|
|
3636
3650
|
onUnshare: l,
|
|
3637
3651
|
onRemoveAccess: i,
|
|
3638
3652
|
onDelete: p,
|
|
@@ -3641,7 +3655,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3641
3655
|
sharedByMePaths: v,
|
|
3642
3656
|
onClearSelection: u,
|
|
3643
3657
|
forbiddenSymbolsRegExp: y
|
|
3644
|
-
}) =>
|
|
3658
|
+
}) => j(() => {
|
|
3645
3659
|
const g = [], m = Array.from(e.values());
|
|
3646
3660
|
if (!m.length || !t)
|
|
3647
3661
|
return g;
|
|
@@ -3655,7 +3669,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3655
3669
|
label: t[w.RemoveAccess],
|
|
3656
3670
|
title: t[w.RemoveAccess],
|
|
3657
3671
|
disabled: h,
|
|
3658
|
-
icon: /* @__PURE__ */ o(Ao, { size:
|
|
3672
|
+
icon: /* @__PURE__ */ o(Ao, { size: P.size, className: "text-secondary" }),
|
|
3659
3673
|
onClick: () => {
|
|
3660
3674
|
i(m), u();
|
|
3661
3675
|
}
|
|
@@ -3668,8 +3682,8 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3668
3682
|
icon: /* @__PURE__ */ o(
|
|
3669
3683
|
Wo,
|
|
3670
3684
|
{
|
|
3671
|
-
width:
|
|
3672
|
-
height:
|
|
3685
|
+
width: P.size,
|
|
3686
|
+
height: P.size,
|
|
3673
3687
|
className: "text-secondary"
|
|
3674
3688
|
}
|
|
3675
3689
|
),
|
|
@@ -3681,8 +3695,8 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3681
3695
|
icon: /* @__PURE__ */ o(
|
|
3682
3696
|
Bo,
|
|
3683
3697
|
{
|
|
3684
|
-
width:
|
|
3685
|
-
height:
|
|
3698
|
+
width: P.size,
|
|
3699
|
+
height: P.size,
|
|
3686
3700
|
className: "text-secondary"
|
|
3687
3701
|
}
|
|
3688
3702
|
),
|
|
@@ -3691,8 +3705,8 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3691
3705
|
key: w.Duplicate,
|
|
3692
3706
|
label: t[w.Duplicate],
|
|
3693
3707
|
title: t[w.Duplicate],
|
|
3694
|
-
icon: /* @__PURE__ */ o(Po, { ...
|
|
3695
|
-
onClick: () =>
|
|
3708
|
+
icon: /* @__PURE__ */ o(Po, { ...P, className: "text-secondary" }),
|
|
3709
|
+
onClick: () => r(m)
|
|
3696
3710
|
}), t[w.Delete]) {
|
|
3697
3711
|
const h = m.some(
|
|
3698
3712
|
(f) => f.permissions && !f.permissions.includes(St.WRITE)
|
|
@@ -3701,7 +3715,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3701
3715
|
key: w.Delete,
|
|
3702
3716
|
label: t[w.Delete],
|
|
3703
3717
|
title: t[w.Delete],
|
|
3704
|
-
icon: /* @__PURE__ */ o(Mo, { ...
|
|
3718
|
+
icon: /* @__PURE__ */ o(Mo, { ...P, className: "text-secondary" }),
|
|
3705
3719
|
disabled: h,
|
|
3706
3720
|
tooltip: h ? "Selected items contain item which can not be deleted" : void 0,
|
|
3707
3721
|
onClick: () => {
|
|
@@ -3714,8 +3728,8 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3714
3728
|
key: w.Download,
|
|
3715
3729
|
label: t[w.Download],
|
|
3716
3730
|
title: t[w.Download],
|
|
3717
|
-
icon: /* @__PURE__ */ o(ko, { ...
|
|
3718
|
-
onClick: () =>
|
|
3731
|
+
icon: /* @__PURE__ */ o(ko, { ...P, className: "text-secondary" }),
|
|
3732
|
+
onClick: () => s(m)
|
|
3719
3733
|
}), t[w.Unshare] && l) {
|
|
3720
3734
|
const h = m.some(
|
|
3721
3735
|
(f) => !c?.includes(f.path)
|
|
@@ -3729,8 +3743,8 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3729
3743
|
icon: /* @__PURE__ */ o(
|
|
3730
3744
|
Ho,
|
|
3731
3745
|
{
|
|
3732
|
-
width:
|
|
3733
|
-
height:
|
|
3746
|
+
width: P.size,
|
|
3747
|
+
height: P.size,
|
|
3734
3748
|
className: "text-secondary"
|
|
3735
3749
|
}
|
|
3736
3750
|
),
|
|
@@ -3747,21 +3761,21 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3747
3761
|
i,
|
|
3748
3762
|
n,
|
|
3749
3763
|
a,
|
|
3750
|
-
|
|
3764
|
+
r,
|
|
3751
3765
|
C,
|
|
3752
3766
|
p,
|
|
3753
|
-
|
|
3767
|
+
s,
|
|
3754
3768
|
c,
|
|
3755
3769
|
u,
|
|
3756
3770
|
v,
|
|
3757
3771
|
y
|
|
3758
|
-
]),
|
|
3772
|
+
]), oi = ({
|
|
3759
3773
|
id: e,
|
|
3760
3774
|
name: t,
|
|
3761
|
-
nodeType:
|
|
3775
|
+
nodeType: r,
|
|
3762
3776
|
size: a,
|
|
3763
3777
|
updatedAt: n,
|
|
3764
|
-
dateLocale:
|
|
3778
|
+
dateLocale: s,
|
|
3765
3779
|
dateOptions: l,
|
|
3766
3780
|
shared: i,
|
|
3767
3781
|
sharedIndicatorClassName: p,
|
|
@@ -3771,23 +3785,23 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3771
3785
|
}) => /* @__PURE__ */ o("div", { className: "flex", children: /* @__PURE__ */ o("div", { className: "flex flex-1 min-w-0", children: /* @__PURE__ */ o(
|
|
3772
3786
|
$n,
|
|
3773
3787
|
{
|
|
3774
|
-
type:
|
|
3788
|
+
type: r === L.FOLDER ? We.Folder : We.File,
|
|
3775
3789
|
name: t,
|
|
3776
3790
|
elementId: e,
|
|
3777
3791
|
shared: i,
|
|
3778
|
-
iconSize:
|
|
3792
|
+
iconSize: st,
|
|
3779
3793
|
sharedIndicatorClassName: p,
|
|
3780
3794
|
hideTooltip: C,
|
|
3781
3795
|
forbiddenSymbolsRegExp: c,
|
|
3782
3796
|
forbiddenSymbolsTooltip: v,
|
|
3783
3797
|
details: /* @__PURE__ */ X("div", { className: "flex items-center gap-1 dial-tiny-text text-secondary", children: [
|
|
3784
|
-
/* @__PURE__ */ o("span", { children:
|
|
3798
|
+
/* @__PURE__ */ o("span", { children: r === L.ITEM ? rn(a) : "" }),
|
|
3785
3799
|
n && a && /* @__PURE__ */ o(Un, { size: 2, className: "text-secondary" }),
|
|
3786
3800
|
n ? /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(
|
|
3787
3801
|
Na,
|
|
3788
3802
|
{
|
|
3789
3803
|
value: n,
|
|
3790
|
-
locale:
|
|
3804
|
+
locale: s?.toString(),
|
|
3791
3805
|
options: l,
|
|
3792
3806
|
className: "dial-tiny-text text-secondary",
|
|
3793
3807
|
hideTooltip: C
|
|
@@ -3795,14 +3809,14 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3795
3809
|
) }) : null
|
|
3796
3810
|
] })
|
|
3797
3811
|
}
|
|
3798
|
-
) }) }),
|
|
3812
|
+
) }) }), ai = (e) => (t, r, a) => ({
|
|
3799
3813
|
colId: ye.Name,
|
|
3800
3814
|
field: "name",
|
|
3801
3815
|
headerName: e,
|
|
3802
3816
|
flex: 1,
|
|
3803
3817
|
minWidth: 200,
|
|
3804
3818
|
cellRenderer: (n) => {
|
|
3805
|
-
const
|
|
3819
|
+
const s = n.data.nodeType, {
|
|
3806
3820
|
saveFolderCreation: l,
|
|
3807
3821
|
validateFolderName: i,
|
|
3808
3822
|
cancelFolderCreation: p,
|
|
@@ -3812,8 +3826,8 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3812
3826
|
disabledRowIds: u,
|
|
3813
3827
|
filesLoading: y
|
|
3814
3828
|
} = n.context, g = c?.has(n.data.path), m = v?.has(n.data.path), b = u?.has(n.data.path) ?? !1, D = Ee([
|
|
3815
|
-
"group-hover/grid-row:bg-accent-
|
|
3816
|
-
m && "bg-accent-
|
|
3829
|
+
"group-hover/grid-row:bg-control-accent-alpha-hover",
|
|
3830
|
+
m && "bg-control-accent-alpha"
|
|
3817
3831
|
]);
|
|
3818
3832
|
if (n.data?.isTemporary && n.data.id === C)
|
|
3819
3833
|
return /* @__PURE__ */ o(
|
|
@@ -3827,7 +3841,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3827
3841
|
loading: y,
|
|
3828
3842
|
shared: g,
|
|
3829
3843
|
sharedIndicatorClassName: D,
|
|
3830
|
-
iconSize:
|
|
3844
|
+
iconSize: st,
|
|
3831
3845
|
validate: i,
|
|
3832
3846
|
onSave: l,
|
|
3833
3847
|
onCancel: p,
|
|
@@ -3835,7 +3849,7 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3835
3849
|
onCreateFolderCancel: p,
|
|
3836
3850
|
inputContainerClassName: Ee([
|
|
3837
3851
|
"!h-9",
|
|
3838
|
-
a &&
|
|
3852
|
+
a && s === L.ITEM && "!h-10"
|
|
3839
3853
|
])
|
|
3840
3854
|
}
|
|
3841
3855
|
);
|
|
@@ -3849,24 +3863,24 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3849
3863
|
onRenameCancel: S
|
|
3850
3864
|
} = n.context;
|
|
3851
3865
|
if (h === Rt.Grid && f === n.data?.path && T && n.data) {
|
|
3852
|
-
const
|
|
3866
|
+
const V = x(T);
|
|
3853
3867
|
return /* @__PURE__ */ o(
|
|
3854
3868
|
$n,
|
|
3855
3869
|
{
|
|
3856
|
-
name:
|
|
3857
|
-
type:
|
|
3870
|
+
name: V,
|
|
3871
|
+
type: s === L.FOLDER ? We.Folder : We.File,
|
|
3858
3872
|
fileExtension: T.name.split(".").pop(),
|
|
3859
3873
|
elementId: `rename-${n.data.id}`,
|
|
3860
3874
|
editing: !0,
|
|
3861
3875
|
shared: g,
|
|
3862
3876
|
sharedIndicatorClassName: D,
|
|
3863
|
-
iconSize:
|
|
3864
|
-
validate: (
|
|
3877
|
+
iconSize: st,
|
|
3878
|
+
validate: (A) => F(A, T),
|
|
3865
3879
|
onSave: I,
|
|
3866
3880
|
onCancel: S,
|
|
3867
3881
|
inputContainerClassName: Ee([
|
|
3868
3882
|
"!h-9",
|
|
3869
|
-
a &&
|
|
3883
|
+
a && s === L.ITEM && "!h-10"
|
|
3870
3884
|
]),
|
|
3871
3885
|
forbiddenSymbolsRegExp: n.context.forbiddenSymbolsRegExp
|
|
3872
3886
|
}
|
|
@@ -3874,40 +3888,40 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3874
3888
|
}
|
|
3875
3889
|
if (a)
|
|
3876
3890
|
return /* @__PURE__ */ o(
|
|
3877
|
-
|
|
3891
|
+
oi,
|
|
3878
3892
|
{
|
|
3879
3893
|
id: n.data.id,
|
|
3880
3894
|
name: n.data.name,
|
|
3881
|
-
nodeType:
|
|
3895
|
+
nodeType: s,
|
|
3882
3896
|
size: n.data.size,
|
|
3883
3897
|
shared: g,
|
|
3884
3898
|
sharedIndicatorClassName: D,
|
|
3885
3899
|
updatedAt: n.data.updatedAt,
|
|
3886
3900
|
dateLocale: t,
|
|
3887
|
-
dateOptions:
|
|
3901
|
+
dateOptions: r,
|
|
3888
3902
|
hideTooltip: b,
|
|
3889
3903
|
forbiddenSymbolsRegExp: n.context.forbiddenSymbolsRegExp,
|
|
3890
3904
|
forbiddenSymbolsTooltip: n.context.forbiddenSymbolsTooltip
|
|
3891
3905
|
}
|
|
3892
3906
|
);
|
|
3893
|
-
const
|
|
3907
|
+
const M = Go(
|
|
3894
3908
|
{
|
|
3895
3909
|
name: n.data.name,
|
|
3896
|
-
isFolder:
|
|
3910
|
+
isFolder: s === L.FOLDER
|
|
3897
3911
|
},
|
|
3898
3912
|
n.context.forbiddenSymbolsRegExp,
|
|
3899
3913
|
n.context.forbiddenSymbolsTooltip
|
|
3900
3914
|
);
|
|
3901
|
-
return
|
|
3915
|
+
return s === L.FOLDER ? /* @__PURE__ */ o(
|
|
3902
3916
|
Oo,
|
|
3903
3917
|
{
|
|
3904
3918
|
name: n.data.name,
|
|
3905
3919
|
shared: g,
|
|
3906
3920
|
sharedIndicatorClassName: D,
|
|
3907
|
-
iconSize:
|
|
3921
|
+
iconSize: st,
|
|
3908
3922
|
hideTooltip: b,
|
|
3909
|
-
isInvalidName: !!
|
|
3910
|
-
tooltipContent:
|
|
3923
|
+
isInvalidName: !!M,
|
|
3924
|
+
tooltipContent: M
|
|
3911
3925
|
}
|
|
3912
3926
|
) : /* @__PURE__ */ o(
|
|
3913
3927
|
Lo,
|
|
@@ -3915,14 +3929,14 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3915
3929
|
name: n.data.name,
|
|
3916
3930
|
shared: g,
|
|
3917
3931
|
sharedIndicatorClassName: D,
|
|
3918
|
-
iconSize:
|
|
3932
|
+
iconSize: st,
|
|
3919
3933
|
hideTooltip: b,
|
|
3920
|
-
isInvalidName: !!
|
|
3921
|
-
tooltipContent:
|
|
3934
|
+
isInvalidName: !!M,
|
|
3935
|
+
tooltipContent: M
|
|
3922
3936
|
}
|
|
3923
3937
|
);
|
|
3924
3938
|
}
|
|
3925
|
-
}),
|
|
3939
|
+
}), si = (e) => (t, r) => ({
|
|
3926
3940
|
colId: ye.UpdatedAt,
|
|
3927
3941
|
field: "updatedAt",
|
|
3928
3942
|
headerName: e,
|
|
@@ -3934,14 +3948,14 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3934
3948
|
},
|
|
3935
3949
|
cellRendererParams: {
|
|
3936
3950
|
locale: t,
|
|
3937
|
-
options:
|
|
3951
|
+
options: r
|
|
3938
3952
|
},
|
|
3939
3953
|
filterValueGetter: (a) => {
|
|
3940
|
-
const n = a.data[a.colDef.field || ""],
|
|
3941
|
-
return
|
|
3942
|
-
t ||
|
|
3943
|
-
|
|
3944
|
-
).format(
|
|
3954
|
+
const n = a.data[a.colDef.field || ""], s = Ms(n);
|
|
3955
|
+
return s ? new Intl.DateTimeFormat(
|
|
3956
|
+
t || ks,
|
|
3957
|
+
r || Os
|
|
3958
|
+
).format(s) : "";
|
|
3945
3959
|
}
|
|
3946
3960
|
}), ri = (e) => ({
|
|
3947
3961
|
colId: ye.Size,
|
|
@@ -3949,9 +3963,9 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3949
3963
|
headerName: e,
|
|
3950
3964
|
width: 120,
|
|
3951
3965
|
suppressSizeToFit: !0,
|
|
3952
|
-
cellRenderer: (t) => t.data.nodeType ===
|
|
3953
|
-
filterValueGetter: (t) => t.data.nodeType ===
|
|
3954
|
-
}),
|
|
3966
|
+
cellRenderer: (t) => t.data.nodeType === L.ITEM ? rn(t.data.contentLength) : "",
|
|
3967
|
+
filterValueGetter: (t) => t.data.nodeType === L.ITEM ? rn(t.data.contentLength) : ""
|
|
3968
|
+
}), ii = (e) => {
|
|
3955
3969
|
const t = e.event;
|
|
3956
3970
|
if (!(t?.target ?? null)?.closest("input") || !t) return !1;
|
|
3957
3971
|
switch (t.key) {
|
|
@@ -3966,20 +3980,20 @@ const _s = 12, Bs = 8, Ws = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3966
3980
|
return !1;
|
|
3967
3981
|
}
|
|
3968
3982
|
};
|
|
3969
|
-
function
|
|
3983
|
+
function li({
|
|
3970
3984
|
userColumnDefs: e,
|
|
3971
3985
|
filterable: t,
|
|
3972
|
-
dateLocale:
|
|
3986
|
+
dateLocale: r,
|
|
3973
3987
|
dateOptions: a,
|
|
3974
3988
|
effectiveVisibleColumns: n,
|
|
3975
|
-
isCompactView:
|
|
3989
|
+
isCompactView: s,
|
|
3976
3990
|
hasActions: l,
|
|
3977
3991
|
actionsColumnDef: i,
|
|
3978
3992
|
rootItemLabel: p,
|
|
3979
3993
|
rootItemPath: C
|
|
3980
3994
|
}) {
|
|
3981
|
-
const c =
|
|
3982
|
-
|
|
3995
|
+
const c = j(() => [
|
|
3996
|
+
ai("Name")(r, a, s),
|
|
3983
3997
|
{
|
|
3984
3998
|
colId: ye.Path,
|
|
3985
3999
|
field: "path",
|
|
@@ -4001,7 +4015,7 @@ function ii({
|
|
|
4001
4015
|
return /* @__PURE__ */ o(Tt, { text: m, hideTooltip: y });
|
|
4002
4016
|
}
|
|
4003
4017
|
},
|
|
4004
|
-
|
|
4018
|
+
si("Modified Date")(r, a),
|
|
4005
4019
|
ri("Size"),
|
|
4006
4020
|
{
|
|
4007
4021
|
colId: ye.Author,
|
|
@@ -4019,15 +4033,15 @@ function ii({
|
|
|
4019
4033
|
suppressSizeToFit: !0,
|
|
4020
4034
|
cellRenderer: (u) => u.data.owner
|
|
4021
4035
|
}
|
|
4022
|
-
], [
|
|
4023
|
-
return { columnDefs:
|
|
4036
|
+
], [r, a, s, p, C]);
|
|
4037
|
+
return { columnDefs: j(() => {
|
|
4024
4038
|
const u = e?.map(
|
|
4025
|
-
(m) => typeof m == "function" ? m(
|
|
4039
|
+
(m) => typeof m == "function" ? m(r, a, s) : m
|
|
4026
4040
|
);
|
|
4027
4041
|
let y = u ?? c;
|
|
4028
4042
|
u || (y = y.filter(
|
|
4029
4043
|
(m) => m.colId && n.includes(m.colId)
|
|
4030
|
-
)), l && (
|
|
4044
|
+
)), l && (s && (y = y.slice(0, 1)), y.push(i));
|
|
4031
4045
|
const g = (m) => m.colId === ye.Name;
|
|
4032
4046
|
return y.map((m) => {
|
|
4033
4047
|
const b = {
|
|
@@ -4035,34 +4049,34 @@ function ii({
|
|
|
4035
4049
|
filter: t ? m.filter : !1,
|
|
4036
4050
|
floatingFilter: t ? m.floatingFilter : !1
|
|
4037
4051
|
};
|
|
4038
|
-
return g(m) && !m.suppressKeyboardEvent && (b.suppressKeyboardEvent =
|
|
4052
|
+
return g(m) && !m.suppressKeyboardEvent && (b.suppressKeyboardEvent = ii), b;
|
|
4039
4053
|
});
|
|
4040
4054
|
}, [
|
|
4041
4055
|
i,
|
|
4042
|
-
|
|
4056
|
+
r,
|
|
4043
4057
|
a,
|
|
4044
4058
|
c,
|
|
4045
4059
|
n,
|
|
4046
4060
|
t,
|
|
4047
4061
|
l,
|
|
4048
|
-
|
|
4062
|
+
s,
|
|
4049
4063
|
e
|
|
4050
4064
|
]) };
|
|
4051
4065
|
}
|
|
4052
|
-
const
|
|
4053
|
-
const e =
|
|
4066
|
+
const ci = () => {
|
|
4067
|
+
const e = fs(Ia);
|
|
4054
4068
|
if (!e)
|
|
4055
4069
|
throw new Error(
|
|
4056
4070
|
"useFileManagerContext must be used within <FileManagerProvider>"
|
|
4057
4071
|
);
|
|
4058
4072
|
return e;
|
|
4059
|
-
},
|
|
4073
|
+
}, di = ({
|
|
4060
4074
|
actionLabels: e,
|
|
4061
4075
|
onDuplicate: t,
|
|
4062
|
-
onCopy:
|
|
4076
|
+
onCopy: r,
|
|
4063
4077
|
onMove: a,
|
|
4064
4078
|
onDownload: n,
|
|
4065
|
-
onRename:
|
|
4079
|
+
onRename: s,
|
|
4066
4080
|
onDelete: l,
|
|
4067
4081
|
onInfo: i,
|
|
4068
4082
|
onUnshare: p,
|
|
@@ -4078,34 +4092,34 @@ const li = () => {
|
|
|
4078
4092
|
forbiddenSymbolsRegExp: h,
|
|
4079
4093
|
onGridCreateSiblingFolder: f,
|
|
4080
4094
|
onGridCreateChildFolder: T
|
|
4081
|
-
}) =>
|
|
4095
|
+
}) => j(() => (x) => {
|
|
4082
4096
|
const F = [];
|
|
4083
4097
|
if (!e)
|
|
4084
4098
|
return F;
|
|
4085
4099
|
const I = Zn(
|
|
4086
4100
|
h
|
|
4087
4101
|
)?.test(x.name);
|
|
4088
|
-
e[w.AddSibling] && x.nodeType ===
|
|
4102
|
+
e[w.AddSibling] && x.nodeType === L.FOLDER && F.push({
|
|
4089
4103
|
key: "addSibling",
|
|
4090
4104
|
label: e[w.AddSibling],
|
|
4091
4105
|
icon: /* @__PURE__ */ o(
|
|
4092
4106
|
ba,
|
|
4093
4107
|
{
|
|
4094
|
-
width:
|
|
4095
|
-
height:
|
|
4108
|
+
width: P.size,
|
|
4109
|
+
height: P.size,
|
|
4096
4110
|
className: "text-secondary"
|
|
4097
4111
|
}
|
|
4098
4112
|
),
|
|
4099
4113
|
onClick: () => f([x])
|
|
4100
|
-
}), e[w.AddChild] && x.nodeType ===
|
|
4114
|
+
}), e[w.AddChild] && x.nodeType === L.FOLDER && !I && F.push(
|
|
4101
4115
|
{
|
|
4102
4116
|
key: "addChild",
|
|
4103
4117
|
label: e[w.AddChild],
|
|
4104
4118
|
icon: /* @__PURE__ */ o(
|
|
4105
4119
|
xa,
|
|
4106
4120
|
{
|
|
4107
|
-
width:
|
|
4108
|
-
height:
|
|
4121
|
+
width: P.size,
|
|
4122
|
+
height: P.size,
|
|
4109
4123
|
className: "text-secondary"
|
|
4110
4124
|
}
|
|
4111
4125
|
),
|
|
@@ -4115,17 +4129,17 @@ const li = () => {
|
|
|
4115
4129
|
key: "divider",
|
|
4116
4130
|
type: Da.Divider
|
|
4117
4131
|
}
|
|
4118
|
-
), e[w.OpenInNewTab] && typeof g == "function" && x.nodeType ===
|
|
4132
|
+
), e[w.OpenInNewTab] && typeof g == "function" && x.nodeType === L.ITEM && !I && F.push({
|
|
4119
4133
|
key: w.OpenInNewTab,
|
|
4120
4134
|
label: e[w.OpenInNewTab],
|
|
4121
|
-
icon: /* @__PURE__ */ o(Fo, { ...
|
|
4135
|
+
icon: /* @__PURE__ */ o(Fo, { ...P, className: "text-secondary" }),
|
|
4122
4136
|
onClick: () => g?.(x)
|
|
4123
4137
|
});
|
|
4124
|
-
const S = x.nodeType ===
|
|
4138
|
+
const S = x.nodeType === L.ITEM || x.nodeType === L.FOLDER && D;
|
|
4125
4139
|
e[w.Duplicate] && S && !I && F.push({
|
|
4126
4140
|
key: w.Duplicate,
|
|
4127
4141
|
label: e[w.Duplicate],
|
|
4128
|
-
icon: /* @__PURE__ */ o(Po, { ...
|
|
4142
|
+
icon: /* @__PURE__ */ o(Po, { ...P, className: "text-secondary" }),
|
|
4129
4143
|
onClick: () => t(x)
|
|
4130
4144
|
}), e[w.Copy] && !I && F.push({
|
|
4131
4145
|
key: w.Copy,
|
|
@@ -4133,20 +4147,20 @@ const li = () => {
|
|
|
4133
4147
|
icon: /* @__PURE__ */ o(
|
|
4134
4148
|
Bo,
|
|
4135
4149
|
{
|
|
4136
|
-
width:
|
|
4137
|
-
height:
|
|
4150
|
+
width: P.size,
|
|
4151
|
+
height: P.size,
|
|
4138
4152
|
className: "text-secondary"
|
|
4139
4153
|
}
|
|
4140
4154
|
),
|
|
4141
|
-
onClick: () =>
|
|
4155
|
+
onClick: () => r(x)
|
|
4142
4156
|
}), e[w.Move] && !I && F.push({
|
|
4143
4157
|
key: w.Move,
|
|
4144
4158
|
label: e[w.Move],
|
|
4145
4159
|
icon: /* @__PURE__ */ o(
|
|
4146
4160
|
Wo,
|
|
4147
4161
|
{
|
|
4148
|
-
width:
|
|
4149
|
-
height:
|
|
4162
|
+
width: P.size,
|
|
4163
|
+
height: P.size,
|
|
4150
4164
|
className: "text-secondary"
|
|
4151
4165
|
}
|
|
4152
4166
|
),
|
|
@@ -4154,38 +4168,38 @@ const li = () => {
|
|
|
4154
4168
|
}), e[w.Download] && !I && F.push({
|
|
4155
4169
|
key: w.Download,
|
|
4156
4170
|
label: e[w.Download],
|
|
4157
|
-
icon: /* @__PURE__ */ o(ko, { ...
|
|
4171
|
+
icon: /* @__PURE__ */ o(ko, { ...P, className: "text-secondary" }),
|
|
4158
4172
|
onClick: () => n(x)
|
|
4159
|
-
}), e[w.ManagePermissions] && typeof u == "function" && x.nodeType ===
|
|
4173
|
+
}), e[w.ManagePermissions] && typeof u == "function" && x.nodeType === L.FOLDER && !I && F.push({
|
|
4160
4174
|
key: w.ManagePermissions,
|
|
4161
4175
|
label: e[w.ManagePermissions],
|
|
4162
|
-
icon: /* @__PURE__ */ o(Fo, { ...
|
|
4176
|
+
icon: /* @__PURE__ */ o(Fo, { ...P, className: "text-secondary" }),
|
|
4163
4177
|
onClick: () => u?.(x.path)
|
|
4164
4178
|
});
|
|
4165
|
-
const
|
|
4166
|
-
e[w.Preview] && typeof y == "function" && x.nodeType ===
|
|
4179
|
+
const O = x.name.split("."), M = O.length > 1 ? O[O.length - 1] : "", V = M && m?.includes(`.${M}`);
|
|
4180
|
+
e[w.Preview] && typeof y == "function" && x.nodeType === L.ITEM && V && !I && F.push({
|
|
4167
4181
|
key: w.Preview,
|
|
4168
4182
|
label: e[w.Preview],
|
|
4169
|
-
icon: /* @__PURE__ */ o(So, { ...
|
|
4183
|
+
icon: /* @__PURE__ */ o(So, { ...P, className: "text-secondary" }),
|
|
4170
4184
|
onClick: () => y?.(x.path)
|
|
4171
4185
|
});
|
|
4172
|
-
const
|
|
4173
|
-
e[w.Delete] &&
|
|
4186
|
+
const A = !x.permissions || x.permissions.includes(St.WRITE);
|
|
4187
|
+
e[w.Delete] && A && F.push({
|
|
4174
4188
|
key: w.Delete,
|
|
4175
4189
|
label: e[w.Delete],
|
|
4176
|
-
icon: /* @__PURE__ */ o(Mo, { ...
|
|
4190
|
+
icon: /* @__PURE__ */ o(Mo, { ...P, className: "text-secondary" }),
|
|
4177
4191
|
onClick: () => l(x, x.parentPath ?? "")
|
|
4178
4192
|
});
|
|
4179
|
-
const
|
|
4180
|
-
return e[w.Rename] &&
|
|
4193
|
+
const _ = x.nodeType === L.FOLDER || x.nodeType === L.ITEM && b;
|
|
4194
|
+
return e[w.Rename] && _ && A && F.push({
|
|
4181
4195
|
key: w.Rename,
|
|
4182
4196
|
label: e[w.Rename],
|
|
4183
|
-
icon: /* @__PURE__ */ o(fa, { ...
|
|
4184
|
-
onClick: () =>
|
|
4185
|
-
}), e[w.Info] && x.nodeType ===
|
|
4197
|
+
icon: /* @__PURE__ */ o(fa, { ...P, className: "text-secondary" }),
|
|
4198
|
+
onClick: () => s(x.path)
|
|
4199
|
+
}), e[w.Info] && x.nodeType === L.ITEM && !I && F.push({
|
|
4186
4200
|
key: w.Info,
|
|
4187
4201
|
label: e[w.Info],
|
|
4188
|
-
icon: /* @__PURE__ */ o(
|
|
4202
|
+
icon: /* @__PURE__ */ o(ds, { ...P, className: "text-secondary" }),
|
|
4189
4203
|
onClick: () => i(x)
|
|
4190
4204
|
}), e[w.Unshare] && c?.includes(x.path) && F.push({
|
|
4191
4205
|
key: w.Unshare,
|
|
@@ -4193,8 +4207,8 @@ const li = () => {
|
|
|
4193
4207
|
icon: /* @__PURE__ */ o(
|
|
4194
4208
|
Ho,
|
|
4195
4209
|
{
|
|
4196
|
-
width:
|
|
4197
|
-
height:
|
|
4210
|
+
width: P.size,
|
|
4211
|
+
height: P.size,
|
|
4198
4212
|
className: "text-secondary"
|
|
4199
4213
|
}
|
|
4200
4214
|
),
|
|
@@ -4202,17 +4216,17 @@ const li = () => {
|
|
|
4202
4216
|
}), e[w.RemoveAccess] && v?.has(x.path) && C && F.push({
|
|
4203
4217
|
key: w.RemoveAccess,
|
|
4204
4218
|
label: e[w.RemoveAccess],
|
|
4205
|
-
icon: /* @__PURE__ */ o(Ao, { size:
|
|
4219
|
+
icon: /* @__PURE__ */ o(Ao, { size: P.size, className: "text-secondary" }),
|
|
4206
4220
|
onClick: () => C(x)
|
|
4207
4221
|
}), F;
|
|
4208
4222
|
}, [
|
|
4209
4223
|
e,
|
|
4210
4224
|
t,
|
|
4211
|
-
|
|
4225
|
+
r,
|
|
4212
4226
|
a,
|
|
4213
4227
|
n,
|
|
4214
4228
|
l,
|
|
4215
|
-
|
|
4229
|
+
s,
|
|
4216
4230
|
i,
|
|
4217
4231
|
p,
|
|
4218
4232
|
C,
|
|
@@ -4227,32 +4241,32 @@ const li = () => {
|
|
|
4227
4241
|
h,
|
|
4228
4242
|
T,
|
|
4229
4243
|
f
|
|
4230
|
-
]),
|
|
4244
|
+
]), ui = ({
|
|
4231
4245
|
onGridAddSibling: e,
|
|
4232
4246
|
onGridAddChild: t,
|
|
4233
|
-
onTreeAddSibling:
|
|
4247
|
+
onTreeAddSibling: r,
|
|
4234
4248
|
onTreeAddChild: a
|
|
4235
4249
|
}) => {
|
|
4236
|
-
const [n,
|
|
4250
|
+
const [n, s] = z(
|
|
4237
4251
|
ut.Grid
|
|
4238
4252
|
), l = d(
|
|
4239
4253
|
(c) => {
|
|
4240
|
-
e?.(c),
|
|
4254
|
+
e?.(c), s(ut.Grid);
|
|
4241
4255
|
},
|
|
4242
4256
|
[e]
|
|
4243
4257
|
), i = d(
|
|
4244
4258
|
(c) => {
|
|
4245
|
-
|
|
4259
|
+
r?.(c), s(ut.Tree);
|
|
4246
4260
|
},
|
|
4247
|
-
[
|
|
4261
|
+
[r]
|
|
4248
4262
|
), p = d(
|
|
4249
4263
|
(c) => {
|
|
4250
|
-
t?.(c),
|
|
4264
|
+
t?.(c), s(ut.Grid);
|
|
4251
4265
|
},
|
|
4252
4266
|
[t]
|
|
4253
4267
|
), C = d(
|
|
4254
4268
|
(c) => {
|
|
4255
|
-
a?.(c),
|
|
4269
|
+
a?.(c), s(ut.Tree);
|
|
4256
4270
|
},
|
|
4257
4271
|
[a]
|
|
4258
4272
|
);
|
|
@@ -4263,14 +4277,14 @@ const li = () => {
|
|
|
4263
4277
|
onGridCreateChildFolder: p,
|
|
4264
4278
|
onTreeCreateChildFolder: C
|
|
4265
4279
|
};
|
|
4266
|
-
},
|
|
4280
|
+
}, hi = (e) => /* @__PURE__ */ o(Or, { ...e, children: /* @__PURE__ */ o(pi, {}) }), pi = () => {
|
|
4267
4281
|
const {
|
|
4268
4282
|
managerLabel: e,
|
|
4269
4283
|
className: t,
|
|
4270
|
-
items:
|
|
4284
|
+
items: r,
|
|
4271
4285
|
rootItem: a,
|
|
4272
4286
|
filesLoading: n,
|
|
4273
|
-
treeOptions:
|
|
4287
|
+
treeOptions: s,
|
|
4274
4288
|
showNavigationPanel: l,
|
|
4275
4289
|
navigationPanelOptions: i,
|
|
4276
4290
|
gridOptions: p,
|
|
@@ -4279,7 +4293,7 @@ const li = () => {
|
|
|
4279
4293
|
deleteConfirmationOptions: v,
|
|
4280
4294
|
destinationFolderPopupOptions: u,
|
|
4281
4295
|
conflictResolutionPopupOptions: y,
|
|
4282
|
-
compactViewWidthBreakpoint: g =
|
|
4296
|
+
compactViewWidthBreakpoint: g = Ys,
|
|
4283
4297
|
customBreakpointRef: m,
|
|
4284
4298
|
sharedByMePaths: b,
|
|
4285
4299
|
allowedFileTypes: D,
|
|
@@ -4290,17 +4304,17 @@ const li = () => {
|
|
|
4290
4304
|
toggleTreeCollapse: F,
|
|
4291
4305
|
currentPath: I,
|
|
4292
4306
|
gridRows: S,
|
|
4293
|
-
selectedPaths:
|
|
4294
|
-
selectedFiles:
|
|
4295
|
-
clearSelection:
|
|
4296
|
-
setSelectedPaths:
|
|
4297
|
-
effectiveSearchValue:
|
|
4307
|
+
selectedPaths: O,
|
|
4308
|
+
selectedFiles: M,
|
|
4309
|
+
clearSelection: V,
|
|
4310
|
+
setSelectedPaths: A,
|
|
4311
|
+
effectiveSearchValue: _,
|
|
4298
4312
|
handleBreadcrumbItemClick: B,
|
|
4299
|
-
handleSearchChange:
|
|
4300
|
-
handleTreeItemClick:
|
|
4301
|
-
handleTableRowClick:
|
|
4302
|
-
handleSelectionClick:
|
|
4303
|
-
onGridApiChange:
|
|
4313
|
+
handleSearchChange: k,
|
|
4314
|
+
handleTreeItemClick: Q,
|
|
4315
|
+
handleTableRowClick: te,
|
|
4316
|
+
handleSelectionClick: U,
|
|
4317
|
+
onGridApiChange: Y,
|
|
4304
4318
|
handleOpenDestinationFolderPopup: fe,
|
|
4305
4319
|
handleCloseDestinationFolderPopup: we,
|
|
4306
4320
|
openDestinationFolderPopup: xe,
|
|
@@ -4318,8 +4332,8 @@ const li = () => {
|
|
|
4318
4332
|
openDeleteConfirmation: Se,
|
|
4319
4333
|
closeDeleteConfirmation: R,
|
|
4320
4334
|
confirmDelete: H,
|
|
4321
|
-
deleteConfirmationOpen:
|
|
4322
|
-
itemsToDelete:
|
|
4335
|
+
deleteConfirmationOpen: $,
|
|
4336
|
+
itemsToDelete: J,
|
|
4323
4337
|
renamedPath: Z,
|
|
4324
4338
|
renamedItem: me,
|
|
4325
4339
|
onRename: Ae,
|
|
@@ -4330,7 +4344,7 @@ const li = () => {
|
|
|
4330
4344
|
forbiddenSymbolsRegExp: He,
|
|
4331
4345
|
forbiddenSymbolsTooltip: pt,
|
|
4332
4346
|
getDisplayName: cn,
|
|
4333
|
-
isDragging:
|
|
4347
|
+
isDragging: rt,
|
|
4334
4348
|
isDraggingOverWindow: ft,
|
|
4335
4349
|
handleDragEnter: Xn,
|
|
4336
4350
|
handleDragLeave: qn,
|
|
@@ -4376,8 +4390,8 @@ const li = () => {
|
|
|
4376
4390
|
onFolderPopupPathChange: oo,
|
|
4377
4391
|
onManagePermissions: yt,
|
|
4378
4392
|
onPreview: ao,
|
|
4379
|
-
onOpenInNewTab:
|
|
4380
|
-
previewExtensions:
|
|
4393
|
+
onOpenInNewTab: so,
|
|
4394
|
+
previewExtensions: ro,
|
|
4381
4395
|
isRenameFileAvailable: io,
|
|
4382
4396
|
isDuplicateFolderAvailable: lo,
|
|
4383
4397
|
getDisabledTooltip: Ot,
|
|
@@ -4388,20 +4402,20 @@ const li = () => {
|
|
|
4388
4402
|
hideSearchPathItemName: _t,
|
|
4389
4403
|
showHiddenFileSwitcherInDestinationPopup: le,
|
|
4390
4404
|
showCreateFolderButtonInDestinationPopup: Dn,
|
|
4391
|
-
newFolderDefaultName:
|
|
4392
|
-
} =
|
|
4393
|
-
width: Le =
|
|
4394
|
-
header: Me =
|
|
4395
|
-
containerClassName: xn =
|
|
4405
|
+
newFolderDefaultName: se
|
|
4406
|
+
} = ci(), {
|
|
4407
|
+
width: Le = $s,
|
|
4408
|
+
header: Me = js,
|
|
4409
|
+
containerClassName: xn = Us,
|
|
4396
4410
|
additionalButtons: bn,
|
|
4397
4411
|
...Tn
|
|
4398
|
-
} =
|
|
4412
|
+
} = s ?? {}, [Nt, Rn] = z(Le), { renameTriggerView: nt, onGridRename: co, onTreeRename: In } = er({ onRename: Ae }), {
|
|
4399
4413
|
createFolderTriggerView: Fn,
|
|
4400
4414
|
onGridCreateSiblingFolder: uo,
|
|
4401
4415
|
onTreeCreateSiblingFolder: En,
|
|
4402
4416
|
onGridCreateChildFolder: ho,
|
|
4403
4417
|
onTreeCreateChildFolder: Sn
|
|
4404
|
-
} =
|
|
4418
|
+
} = ui({
|
|
4405
4419
|
onGridAddSibling: G,
|
|
4406
4420
|
onGridAddChild: ne,
|
|
4407
4421
|
onTreeAddSibling: he,
|
|
@@ -4417,18 +4431,18 @@ const li = () => {
|
|
|
4417
4431
|
dateOptions: go,
|
|
4418
4432
|
selectionMode: An,
|
|
4419
4433
|
wrapCustomCellRenderers: Pn,
|
|
4420
|
-
visibleColumns: Mn =
|
|
4434
|
+
visibleColumns: Mn = Ks,
|
|
4421
4435
|
allowDisabledContextMenu: Dt = !1,
|
|
4422
4436
|
...ot
|
|
4423
|
-
} = p ?? {}, { containerRef: vo, isBelowBreakpoint: ze } =
|
|
4437
|
+
} = p ?? {}, { containerRef: vo, isBelowBreakpoint: ze } = tr(
|
|
4424
4438
|
g,
|
|
4425
4439
|
m
|
|
4426
|
-
), yo =
|
|
4440
|
+
), yo = j(() => tt ? [
|
|
4427
4441
|
ye.Name,
|
|
4428
4442
|
ye.Path,
|
|
4429
4443
|
ye.Actions
|
|
4430
4444
|
] : Mn, [tt, Mn]), Wt = d(
|
|
4431
|
-
(N, ee, ie) =>
|
|
4445
|
+
(N, ee, ie) => dr(
|
|
4432
4446
|
N,
|
|
4433
4447
|
ee,
|
|
4434
4448
|
ie,
|
|
@@ -4439,7 +4453,7 @@ const li = () => {
|
|
|
4439
4453
|
), xt = d(
|
|
4440
4454
|
(N, ee, ie) => !!Ot?.(N) || !!Wt(N, ee, ie),
|
|
4441
4455
|
[Wt, Ot]
|
|
4442
|
-
), ct =
|
|
4456
|
+
), ct = j(() => {
|
|
4443
4457
|
const N = /* @__PURE__ */ new Set();
|
|
4444
4458
|
for (const ee of S)
|
|
4445
4459
|
xt(ee, D, h) && N.add(ee.path);
|
|
@@ -4449,114 +4463,114 @@ const li = () => {
|
|
|
4449
4463
|
const ee = [], ie = [], Re = !N.parentPath, at = He?.test(
|
|
4450
4464
|
N.name
|
|
4451
4465
|
);
|
|
4452
|
-
return
|
|
4466
|
+
return s?.actionLabels && (s.actionLabels[w.AddSibling] && N.nodeType === L.FOLDER && !Re && ee.push({
|
|
4453
4467
|
key: "addSibling",
|
|
4454
|
-
label:
|
|
4468
|
+
label: s.actionLabels[w.AddSibling],
|
|
4455
4469
|
icon: /* @__PURE__ */ o(
|
|
4456
4470
|
ba,
|
|
4457
4471
|
{
|
|
4458
|
-
width:
|
|
4459
|
-
height:
|
|
4472
|
+
width: P.size,
|
|
4473
|
+
height: P.size,
|
|
4460
4474
|
className: "text-secondary"
|
|
4461
4475
|
}
|
|
4462
4476
|
),
|
|
4463
4477
|
onClick: () => En([N])
|
|
4464
|
-
}),
|
|
4478
|
+
}), s.actionLabels[w.AddChild] && N.nodeType === L.FOLDER && !at && ee.push({
|
|
4465
4479
|
key: "addChild",
|
|
4466
|
-
label:
|
|
4480
|
+
label: s.actionLabels[w.AddChild],
|
|
4467
4481
|
icon: /* @__PURE__ */ o(
|
|
4468
4482
|
xa,
|
|
4469
4483
|
{
|
|
4470
|
-
width:
|
|
4471
|
-
height:
|
|
4484
|
+
width: P.size,
|
|
4485
|
+
height: P.size,
|
|
4472
4486
|
className: "text-secondary"
|
|
4473
4487
|
}
|
|
4474
4488
|
),
|
|
4475
4489
|
onClick: () => Sn([N])
|
|
4476
|
-
}),
|
|
4490
|
+
}), s.actionLabels[w.Duplicate] && !Re && !at && ie.push({
|
|
4477
4491
|
key: "duplicate",
|
|
4478
|
-
label:
|
|
4479
|
-
icon: /* @__PURE__ */ o(Po, { ...
|
|
4492
|
+
label: s.actionLabels[w.Duplicate],
|
|
4493
|
+
icon: /* @__PURE__ */ o(Po, { ...P, className: "text-secondary" }),
|
|
4480
4494
|
onClick: () => W([N])
|
|
4481
|
-
}),
|
|
4495
|
+
}), s.actionLabels[w.Copy] && !Re && !at && ie.push({
|
|
4482
4496
|
key: ge.Copy,
|
|
4483
|
-
label:
|
|
4497
|
+
label: s.actionLabels[w.Copy],
|
|
4484
4498
|
icon: /* @__PURE__ */ o(
|
|
4485
4499
|
Bo,
|
|
4486
4500
|
{
|
|
4487
|
-
width:
|
|
4488
|
-
height:
|
|
4501
|
+
width: P.size,
|
|
4502
|
+
height: P.size,
|
|
4489
4503
|
className: "text-secondary"
|
|
4490
4504
|
}
|
|
4491
4505
|
),
|
|
4492
4506
|
onClick: () => {
|
|
4493
4507
|
Te([N]), fe(ge.Copy);
|
|
4494
4508
|
}
|
|
4495
|
-
}),
|
|
4509
|
+
}), s.actionLabels[w.Move] && !Re && !at && ie.push({
|
|
4496
4510
|
key: ge.Move,
|
|
4497
|
-
label:
|
|
4511
|
+
label: s.actionLabels[w.Move],
|
|
4498
4512
|
icon: /* @__PURE__ */ o(
|
|
4499
4513
|
Wo,
|
|
4500
4514
|
{
|
|
4501
|
-
width:
|
|
4502
|
-
height:
|
|
4515
|
+
width: P.size,
|
|
4516
|
+
height: P.size,
|
|
4503
4517
|
className: "text-secondary"
|
|
4504
4518
|
}
|
|
4505
4519
|
),
|
|
4506
4520
|
onClick: () => {
|
|
4507
4521
|
Ne([N]), fe(ge.Move);
|
|
4508
4522
|
}
|
|
4509
|
-
}),
|
|
4523
|
+
}), s.actionLabels[w.Download] && !Re && !at && ie.push({
|
|
4510
4524
|
key: "download",
|
|
4511
|
-
label:
|
|
4512
|
-
icon: /* @__PURE__ */ o(ko, { ...
|
|
4525
|
+
label: s.actionLabels[w.Download],
|
|
4526
|
+
icon: /* @__PURE__ */ o(ko, { ...P, className: "text-secondary" }),
|
|
4513
4527
|
onClick: () => Oe([N])
|
|
4514
|
-
}),
|
|
4528
|
+
}), s.actionLabels[w.ManagePermissions] && typeof yt == "function" && N.nodeType === L.FOLDER && !Re && ie.push({
|
|
4515
4529
|
key: w.ManagePermissions,
|
|
4516
|
-
label:
|
|
4530
|
+
label: s.actionLabels[w.ManagePermissions],
|
|
4517
4531
|
icon: /* @__PURE__ */ o(
|
|
4518
4532
|
Fo,
|
|
4519
4533
|
{
|
|
4520
|
-
...
|
|
4534
|
+
...P,
|
|
4521
4535
|
className: "text-secondary"
|
|
4522
4536
|
}
|
|
4523
4537
|
),
|
|
4524
4538
|
onClick: () => yt?.(N.path)
|
|
4525
|
-
}),
|
|
4539
|
+
}), s.actionLabels[w.Delete] && N.permissions?.includes(St.WRITE) && !Re && ie.push({
|
|
4526
4540
|
key: "delete",
|
|
4527
|
-
label:
|
|
4528
|
-
icon: /* @__PURE__ */ o(Mo, { ...
|
|
4541
|
+
label: s.actionLabels[w.Delete],
|
|
4542
|
+
icon: /* @__PURE__ */ o(Mo, { ...P, className: "text-secondary" }),
|
|
4529
4543
|
onClick: () => Se([N], N.parentPath ?? "")
|
|
4530
|
-
}),
|
|
4544
|
+
}), s.actionLabels[w.Rename] && !Re && ie.push({
|
|
4531
4545
|
key: "rename",
|
|
4532
|
-
label:
|
|
4546
|
+
label: s.actionLabels[w.Rename],
|
|
4533
4547
|
icon: /* @__PURE__ */ o(
|
|
4534
4548
|
fa,
|
|
4535
4549
|
{
|
|
4536
|
-
...
|
|
4550
|
+
...P,
|
|
4537
4551
|
className: "text-secondary"
|
|
4538
4552
|
}
|
|
4539
4553
|
),
|
|
4540
4554
|
onClick: () => In(N.path)
|
|
4541
|
-
}),
|
|
4555
|
+
}), s.actionLabels[w.Unshare] && vt?.includes(N.path) && !Re && ie.push({
|
|
4542
4556
|
key: "unshare",
|
|
4543
|
-
label:
|
|
4557
|
+
label: s.actionLabels[w.Unshare],
|
|
4544
4558
|
icon: /* @__PURE__ */ o(
|
|
4545
4559
|
Ho,
|
|
4546
4560
|
{
|
|
4547
|
-
width:
|
|
4548
|
-
height:
|
|
4561
|
+
width: P.size,
|
|
4562
|
+
height: P.size,
|
|
4549
4563
|
className: "text-secondary"
|
|
4550
4564
|
}
|
|
4551
4565
|
),
|
|
4552
4566
|
onClick: () => et?.([N])
|
|
4553
|
-
}),
|
|
4567
|
+
}), s.actionLabels[w.RemoveAccess] && b?.has(N.path) && !Re && ie.push({
|
|
4554
4568
|
key: w.RemoveAccess,
|
|
4555
|
-
label:
|
|
4569
|
+
label: s.actionLabels[w.RemoveAccess],
|
|
4556
4570
|
icon: /* @__PURE__ */ o(
|
|
4557
4571
|
Ao,
|
|
4558
4572
|
{
|
|
4559
|
-
size:
|
|
4573
|
+
size: P.size,
|
|
4560
4574
|
className: "text-secondary"
|
|
4561
4575
|
}
|
|
4562
4576
|
),
|
|
@@ -4568,7 +4582,7 @@ const li = () => {
|
|
|
4568
4582
|
] : ie;
|
|
4569
4583
|
},
|
|
4570
4584
|
[
|
|
4571
|
-
|
|
4585
|
+
s?.actionLabels,
|
|
4572
4586
|
He,
|
|
4573
4587
|
yt,
|
|
4574
4588
|
W,
|
|
@@ -4585,16 +4599,16 @@ const li = () => {
|
|
|
4585
4599
|
Sn,
|
|
4586
4600
|
En
|
|
4587
4601
|
]
|
|
4588
|
-
), kn =
|
|
4602
|
+
), kn = j(() => {
|
|
4589
4603
|
const N = /* @__PURE__ */ new Set();
|
|
4590
|
-
return
|
|
4591
|
-
}, [
|
|
4604
|
+
return M.forEach((ee, ie) => N.add(ie)), N;
|
|
4605
|
+
}, [M]), Ut = d(
|
|
4592
4606
|
(N, ee) => {
|
|
4593
|
-
|
|
4607
|
+
A(N), U?.(ee);
|
|
4594
4608
|
},
|
|
4595
|
-
[
|
|
4596
|
-
), On =
|
|
4597
|
-
selectedFiles:
|
|
4609
|
+
[U, A]
|
|
4610
|
+
), On = ni({
|
|
4611
|
+
selectedFiles: M,
|
|
4598
4612
|
actionLabels: c?.actionLabels,
|
|
4599
4613
|
onDuplicate: W,
|
|
4600
4614
|
onCopy: (N) => {
|
|
@@ -4610,14 +4624,14 @@ const li = () => {
|
|
|
4610
4624
|
getCurrentFolderPath: () => I ?? "/",
|
|
4611
4625
|
sharedWithMeIds: vt,
|
|
4612
4626
|
sharedByMePaths: b,
|
|
4613
|
-
onClearSelection:
|
|
4627
|
+
onClearSelection: V,
|
|
4614
4628
|
forbiddenSymbolsRegExp: He
|
|
4615
4629
|
}), Gt = d(
|
|
4616
4630
|
(N) => {
|
|
4617
4631
|
C?.onTabChange?.(N), Qe();
|
|
4618
4632
|
},
|
|
4619
4633
|
[C, Qe]
|
|
4620
|
-
), wo = d(() => C &&
|
|
4634
|
+
), wo = d(() => C && O.size === 0 ? /* @__PURE__ */ X(
|
|
4621
4635
|
"div",
|
|
4622
4636
|
{
|
|
4623
4637
|
className: aa,
|
|
@@ -4626,7 +4640,7 @@ const li = () => {
|
|
|
4626
4640
|
children: [
|
|
4627
4641
|
e,
|
|
4628
4642
|
/* @__PURE__ */ o(
|
|
4629
|
-
|
|
4643
|
+
Zr,
|
|
4630
4644
|
{
|
|
4631
4645
|
...C,
|
|
4632
4646
|
onTabChange: Gt,
|
|
@@ -4639,18 +4653,18 @@ const li = () => {
|
|
|
4639
4653
|
)
|
|
4640
4654
|
]
|
|
4641
4655
|
}
|
|
4642
|
-
) :
|
|
4656
|
+
) : O.size > 0 && c ? /* @__PURE__ */ o(
|
|
4643
4657
|
"div",
|
|
4644
4658
|
{
|
|
4645
4659
|
className: aa,
|
|
4646
4660
|
role: "toolbar",
|
|
4647
4661
|
"aria-label": "File Manager Toolbar",
|
|
4648
4662
|
children: /* @__PURE__ */ o(
|
|
4649
|
-
|
|
4663
|
+
Hr,
|
|
4650
4664
|
{
|
|
4651
4665
|
...c,
|
|
4652
|
-
selectedCount:
|
|
4653
|
-
onClearSelection:
|
|
4666
|
+
selectedCount: O.size,
|
|
4667
|
+
onClearSelection: V,
|
|
4654
4668
|
actions: On
|
|
4655
4669
|
}
|
|
4656
4670
|
)
|
|
@@ -4658,8 +4672,8 @@ const li = () => {
|
|
|
4658
4672
|
) : null, [
|
|
4659
4673
|
Gt,
|
|
4660
4674
|
c,
|
|
4661
|
-
|
|
4662
|
-
|
|
4675
|
+
O,
|
|
4676
|
+
V,
|
|
4663
4677
|
On,
|
|
4664
4678
|
f,
|
|
4665
4679
|
T,
|
|
@@ -4669,7 +4683,7 @@ const li = () => {
|
|
|
4669
4683
|
un,
|
|
4670
4684
|
e
|
|
4671
4685
|
]);
|
|
4672
|
-
|
|
4686
|
+
ms(
|
|
4673
4687
|
no,
|
|
4674
4688
|
() => ({
|
|
4675
4689
|
createFolder: je
|
|
@@ -4683,17 +4697,17 @@ const li = () => {
|
|
|
4683
4697
|
"aria-label": "File Manager Tree Navigation",
|
|
4684
4698
|
className: "min-h-0 min-w-0 h-full flex-none",
|
|
4685
4699
|
children: /* @__PURE__ */ o(
|
|
4686
|
-
|
|
4700
|
+
Ls,
|
|
4687
4701
|
{
|
|
4688
4702
|
defaultWidth: Nt,
|
|
4689
4703
|
width: Nt,
|
|
4690
4704
|
onResizeStop: Rn,
|
|
4691
4705
|
onResize: po,
|
|
4692
|
-
minWidth:
|
|
4693
|
-
maxWidth:
|
|
4706
|
+
minWidth: Xs,
|
|
4707
|
+
maxWidth: qs,
|
|
4694
4708
|
enabled: !x,
|
|
4695
4709
|
children: /* @__PURE__ */ o(
|
|
4696
|
-
|
|
4710
|
+
zs,
|
|
4697
4711
|
{
|
|
4698
4712
|
width: Nt,
|
|
4699
4713
|
title: Me,
|
|
@@ -4703,17 +4717,17 @@ const li = () => {
|
|
|
4703
4717
|
isOpened: !x,
|
|
4704
4718
|
onToggle: F,
|
|
4705
4719
|
children: /* @__PURE__ */ o(
|
|
4706
|
-
|
|
4720
|
+
ti,
|
|
4707
4721
|
{
|
|
4708
4722
|
...Tn,
|
|
4709
|
-
items:
|
|
4723
|
+
items: r,
|
|
4710
4724
|
rootItemPath: a?.path,
|
|
4711
4725
|
rootItemLabel: a?.label,
|
|
4712
4726
|
selectedPath: I,
|
|
4713
4727
|
sharedByMePaths: b,
|
|
4714
4728
|
forbiddenSymbolsRegExp: He,
|
|
4715
4729
|
forbiddenSymbolsTooltip: pt,
|
|
4716
|
-
onItemClick:
|
|
4730
|
+
onItemClick: Q,
|
|
4717
4731
|
areHiddenFilesVisible: f,
|
|
4718
4732
|
getContextMenuItems: Ht,
|
|
4719
4733
|
renamedPath: nt === Rt.Tree ? Z : void 0,
|
|
@@ -4723,7 +4737,7 @@ const li = () => {
|
|
|
4723
4737
|
createdFolderPath: Fn === ut.Tree ? $e : null,
|
|
4724
4738
|
onCreateFolderCancel: Qe,
|
|
4725
4739
|
onCreateFolderSave: Ct,
|
|
4726
|
-
newFolderDefaultName:
|
|
4740
|
+
newFolderDefaultName: se
|
|
4727
4741
|
}
|
|
4728
4742
|
)
|
|
4729
4743
|
}
|
|
@@ -4740,14 +4754,14 @@ const li = () => {
|
|
|
4740
4754
|
bn,
|
|
4741
4755
|
F,
|
|
4742
4756
|
Tn,
|
|
4743
|
-
|
|
4757
|
+
r,
|
|
4744
4758
|
a?.path,
|
|
4745
4759
|
a?.label,
|
|
4746
4760
|
I,
|
|
4747
4761
|
b,
|
|
4748
4762
|
He,
|
|
4749
4763
|
pt,
|
|
4750
|
-
|
|
4764
|
+
Q,
|
|
4751
4765
|
f,
|
|
4752
4766
|
Ht,
|
|
4753
4767
|
nt,
|
|
@@ -4759,8 +4773,8 @@ const li = () => {
|
|
|
4759
4773
|
$e,
|
|
4760
4774
|
Qe,
|
|
4761
4775
|
Ct,
|
|
4762
|
-
|
|
4763
|
-
]), Ln =
|
|
4776
|
+
se
|
|
4777
|
+
]), Ln = di({
|
|
4764
4778
|
actionLabels: p?.actionLabels,
|
|
4765
4779
|
onDuplicate: (N) => W([N]),
|
|
4766
4780
|
onCopy: (N) => {
|
|
@@ -4779,8 +4793,8 @@ const li = () => {
|
|
|
4779
4793
|
sharedByMePaths: b,
|
|
4780
4794
|
onManagePermissions: (N) => yt?.(N),
|
|
4781
4795
|
onPreview: (N) => ao?.(N),
|
|
4782
|
-
onOpenInNewTab: (N) =>
|
|
4783
|
-
previewExtensions:
|
|
4796
|
+
onOpenInNewTab: (N) => so?.(N),
|
|
4797
|
+
previewExtensions: ro,
|
|
4784
4798
|
isRenameFileAvailable: io,
|
|
4785
4799
|
isDuplicateFolderAvailable: lo,
|
|
4786
4800
|
forbiddenSymbolsRegExp: He,
|
|
@@ -4788,19 +4802,19 @@ const li = () => {
|
|
|
4788
4802
|
onGridCreateChildFolder: ho
|
|
4789
4803
|
}), Vt = d(
|
|
4790
4804
|
(N) => {
|
|
4791
|
-
const ee = Ke(
|
|
4805
|
+
const ee = Ke(r, N.path);
|
|
4792
4806
|
return ee ? Ln(ee) : [];
|
|
4793
4807
|
},
|
|
4794
|
-
[
|
|
4808
|
+
[r, Ln]
|
|
4795
4809
|
), Do = d(
|
|
4796
4810
|
(N, ee, ie) => Dt ? !1 : xt(N, ee, ie),
|
|
4797
4811
|
[Dt, xt]
|
|
4798
|
-
), { actionsColumnDef: xo } =
|
|
4812
|
+
), { actionsColumnDef: xo } = Js({
|
|
4799
4813
|
getContextMenuItems: Vt,
|
|
4800
4814
|
isRowDisabled: Do,
|
|
4801
4815
|
allowedFileTypes: D,
|
|
4802
|
-
buttonClassName: ze ? "" :
|
|
4803
|
-
}), { columnDefs: $t } =
|
|
4816
|
+
buttonClassName: ze ? "" : Vs
|
|
4817
|
+
}), { columnDefs: $t } = li({
|
|
4804
4818
|
userColumnDefs: fo,
|
|
4805
4819
|
filterable: mo,
|
|
4806
4820
|
dateLocale: Co,
|
|
@@ -4815,9 +4829,9 @@ const li = () => {
|
|
|
4815
4829
|
(N) => {
|
|
4816
4830
|
N.colDef.colId === "ag-Grid-SelectionColumn" || N.colDef.colId === ye.Actions || Z && N.data?.path === Z || N.data?.isTemporary || zt && zt.includes(
|
|
4817
4831
|
N.colDef.colId
|
|
4818
|
-
) || N.data &&
|
|
4832
|
+
) || N.data && te(N.data);
|
|
4819
4833
|
},
|
|
4820
|
-
[Z,
|
|
4834
|
+
[Z, te, zt]
|
|
4821
4835
|
), dt = d(
|
|
4822
4836
|
() => /* @__PURE__ */ o(
|
|
4823
4837
|
wa,
|
|
@@ -4828,7 +4842,7 @@ const li = () => {
|
|
|
4828
4842
|
containerClassName: "gap-3 size-full bg-layer-sunken border rounded-[4px] border-primary",
|
|
4829
4843
|
titleClassName: "mt-2 !text-lg",
|
|
4830
4844
|
icon: lt || /* @__PURE__ */ o(
|
|
4831
|
-
|
|
4845
|
+
us,
|
|
4832
4846
|
{
|
|
4833
4847
|
size: 100,
|
|
4834
4848
|
stroke: 0.5,
|
|
@@ -4838,21 +4852,22 @@ const li = () => {
|
|
|
4838
4852
|
}
|
|
4839
4853
|
),
|
|
4840
4854
|
[wn, lt, yn]
|
|
4841
|
-
), _n =
|
|
4855
|
+
), _n = j(() => (N) => N.path, []), Bn = j(
|
|
4842
4856
|
() => an(
|
|
4843
4857
|
"min-h-[248px] overflow-auto md:min-h-[266px]",
|
|
4844
|
-
|
|
4845
|
-
ft && !
|
|
4858
|
+
rt ? "border border-dashed border-info" : "",
|
|
4859
|
+
ft && !rt ? "border border-dashed border-primary" : ""
|
|
4846
4860
|
),
|
|
4847
|
-
[
|
|
4848
|
-
), Wn =
|
|
4861
|
+
[rt, ft]
|
|
4862
|
+
), Wn = j(
|
|
4849
4863
|
() => ({
|
|
4850
4864
|
...ot.additionalGridOptions,
|
|
4851
4865
|
onCellClicked: zn,
|
|
4852
|
-
headerHeight:
|
|
4853
|
-
rowHeight:
|
|
4866
|
+
headerHeight: ra,
|
|
4867
|
+
rowHeight: ra,
|
|
4854
4868
|
rowClass: "group/grid-row",
|
|
4855
4869
|
defaultColDef: {
|
|
4870
|
+
comparator: hr,
|
|
4856
4871
|
...ot.additionalGridOptions?.defaultColDef,
|
|
4857
4872
|
floatingFilter: i?.searchable ? !1 : ot.additionalGridOptions?.defaultColDef?.floatingFilter
|
|
4858
4873
|
},
|
|
@@ -4870,12 +4885,12 @@ const li = () => {
|
|
|
4870
4885
|
createdFolderPath: $e,
|
|
4871
4886
|
newFolderTempId: fn,
|
|
4872
4887
|
sharedByMePaths: b,
|
|
4873
|
-
selectedPaths:
|
|
4888
|
+
selectedPaths: O,
|
|
4874
4889
|
disabledRowIds: ct,
|
|
4875
4890
|
forbiddenSymbolsRegExp: He,
|
|
4876
4891
|
forbiddenSymbolsTooltip: pt,
|
|
4877
4892
|
hideSearchPathItemName: _t,
|
|
4878
|
-
newFolderDefaultName:
|
|
4893
|
+
newFolderDefaultName: se,
|
|
4879
4894
|
filesLoading: n
|
|
4880
4895
|
}
|
|
4881
4896
|
}),
|
|
@@ -4896,15 +4911,15 @@ const li = () => {
|
|
|
4896
4911
|
$e,
|
|
4897
4912
|
fn,
|
|
4898
4913
|
b,
|
|
4899
|
-
|
|
4914
|
+
O,
|
|
4900
4915
|
ct,
|
|
4901
4916
|
He,
|
|
4902
4917
|
pt,
|
|
4903
4918
|
_t,
|
|
4904
|
-
|
|
4919
|
+
se,
|
|
4905
4920
|
n
|
|
4906
4921
|
]
|
|
4907
|
-
), bo =
|
|
4922
|
+
), bo = j(
|
|
4908
4923
|
() => S.length === 0 && !tt && !n ? dt() : /* @__PURE__ */ o(
|
|
4909
4924
|
Ca,
|
|
4910
4925
|
{
|
|
@@ -4914,7 +4929,7 @@ const li = () => {
|
|
|
4914
4929
|
loading: n || vn,
|
|
4915
4930
|
getContextMenuItems: Vt,
|
|
4916
4931
|
withoutHeaderBorders: ze,
|
|
4917
|
-
onGridApiChange:
|
|
4932
|
+
onGridApiChange: Y,
|
|
4918
4933
|
className: Bn,
|
|
4919
4934
|
...ot,
|
|
4920
4935
|
selectionMode: An,
|
|
@@ -4922,7 +4937,7 @@ const li = () => {
|
|
|
4922
4937
|
additionalGridOptions: Wn,
|
|
4923
4938
|
selectedRowIds: kn,
|
|
4924
4939
|
onSelectionChange: Ut,
|
|
4925
|
-
wrapperBorder: !
|
|
4940
|
+
wrapperBorder: !rt && !ft,
|
|
4926
4941
|
disabledRowIds: ct,
|
|
4927
4942
|
allowDisabledContextMenu: Dt
|
|
4928
4943
|
}
|
|
@@ -4937,7 +4952,7 @@ const li = () => {
|
|
|
4937
4952
|
vn,
|
|
4938
4953
|
Vt,
|
|
4939
4954
|
ze,
|
|
4940
|
-
|
|
4955
|
+
Y,
|
|
4941
4956
|
Bn,
|
|
4942
4957
|
ot,
|
|
4943
4958
|
An,
|
|
@@ -4945,7 +4960,7 @@ const li = () => {
|
|
|
4945
4960
|
Wn,
|
|
4946
4961
|
kn,
|
|
4947
4962
|
Ut,
|
|
4948
|
-
|
|
4963
|
+
rt,
|
|
4949
4964
|
ft,
|
|
4950
4965
|
ct,
|
|
4951
4966
|
Dt
|
|
@@ -4955,27 +4970,27 @@ const li = () => {
|
|
|
4955
4970
|
"div",
|
|
4956
4971
|
{
|
|
4957
4972
|
className: Ee(
|
|
4958
|
-
|
|
4973
|
+
Bs,
|
|
4959
4974
|
{
|
|
4960
|
-
"gap-3 pt-4": c &&
|
|
4975
|
+
"gap-3 pt-4": c && O.size > 0,
|
|
4961
4976
|
"gap-4 p-3 pt-4": ze,
|
|
4962
|
-
"gap-2 pt-2": ze && c &&
|
|
4977
|
+
"gap-2 pt-2": ze && c && O.size > 0
|
|
4963
4978
|
},
|
|
4964
4979
|
t
|
|
4965
4980
|
),
|
|
4966
4981
|
children: [
|
|
4967
4982
|
wo(),
|
|
4968
|
-
/* @__PURE__ */ X("div", { className: Ee(
|
|
4983
|
+
/* @__PURE__ */ X("div", { className: Ee(Ws, Lt), children: [
|
|
4969
4984
|
No(),
|
|
4970
4985
|
/* @__PURE__ */ X(
|
|
4971
4986
|
"div",
|
|
4972
4987
|
{
|
|
4973
|
-
className: Ee(
|
|
4988
|
+
className: Ee(Hs, {
|
|
4974
4989
|
"gap-3": ze
|
|
4975
4990
|
}),
|
|
4976
4991
|
children: [
|
|
4977
4992
|
l && /* @__PURE__ */ o(
|
|
4978
|
-
|
|
4993
|
+
jr,
|
|
4979
4994
|
{
|
|
4980
4995
|
...i ?? {},
|
|
4981
4996
|
makeHref: (N) => N.join("/"),
|
|
@@ -4983,8 +4998,8 @@ const li = () => {
|
|
|
4983
4998
|
onItemClick: B,
|
|
4984
4999
|
rootItemPath: a?.path,
|
|
4985
5000
|
rootItemLabel: a?.label,
|
|
4986
|
-
value:
|
|
4987
|
-
onSearchChange:
|
|
5001
|
+
value: _,
|
|
5002
|
+
onSearchChange: k,
|
|
4988
5003
|
isCompactView: ze,
|
|
4989
5004
|
labelClassName: "dial-tiny-text"
|
|
4990
5005
|
}
|
|
@@ -4994,7 +5009,7 @@ const li = () => {
|
|
|
4994
5009
|
{
|
|
4995
5010
|
role: "region",
|
|
4996
5011
|
"aria-label": "File Manager Grid View",
|
|
4997
|
-
className: Ee(
|
|
5012
|
+
className: Ee(Gs, "relative"),
|
|
4998
5013
|
onDragEnter: Xn,
|
|
4999
5014
|
onDragLeave: qn,
|
|
5000
5015
|
onDragOver: Yn,
|
|
@@ -5002,7 +5017,7 @@ const li = () => {
|
|
|
5002
5017
|
children: [
|
|
5003
5018
|
bo,
|
|
5004
5019
|
/* @__PURE__ */ o(
|
|
5005
|
-
|
|
5020
|
+
Lr,
|
|
5006
5021
|
{
|
|
5007
5022
|
disabledGridRowIds: ct,
|
|
5008
5023
|
gridRows: S,
|
|
@@ -5020,17 +5035,17 @@ const li = () => {
|
|
|
5020
5035
|
)
|
|
5021
5036
|
] }),
|
|
5022
5037
|
/* @__PURE__ */ o(
|
|
5023
|
-
|
|
5038
|
+
Ur,
|
|
5024
5039
|
{
|
|
5025
5040
|
...v,
|
|
5026
|
-
open:
|
|
5027
|
-
itemsToDelete:
|
|
5041
|
+
open: $,
|
|
5042
|
+
itemsToDelete: J,
|
|
5028
5043
|
onClose: R,
|
|
5029
5044
|
onConfirm: H
|
|
5030
5045
|
}
|
|
5031
5046
|
),
|
|
5032
5047
|
/* @__PURE__ */ o(
|
|
5033
|
-
|
|
5048
|
+
zr,
|
|
5034
5049
|
{
|
|
5035
5050
|
...u,
|
|
5036
5051
|
open: xe,
|
|
@@ -5040,7 +5055,7 @@ const li = () => {
|
|
|
5040
5055
|
ue === ge.Copy ? be(N) : De(N), we();
|
|
5041
5056
|
},
|
|
5042
5057
|
mode: ue,
|
|
5043
|
-
items:
|
|
5058
|
+
items: r,
|
|
5044
5059
|
rootItem: a,
|
|
5045
5060
|
gridOptions: {
|
|
5046
5061
|
columnDefs: $t.filter(
|
|
@@ -5056,7 +5071,7 @@ const li = () => {
|
|
|
5056
5071
|
u?.setDestinationFolderPath?.(N);
|
|
5057
5072
|
},
|
|
5058
5073
|
sourceFolder: u?.sourceFolder ?? I,
|
|
5059
|
-
treeOptions: { header:
|
|
5074
|
+
treeOptions: { header: s?.header },
|
|
5060
5075
|
onFolderPopupPathChange: oo,
|
|
5061
5076
|
showHiddenFileSwitcher: le,
|
|
5062
5077
|
showCreateFolderButton: Dn,
|
|
@@ -5088,7 +5103,7 @@ const li = () => {
|
|
|
5088
5103
|
}
|
|
5089
5104
|
),
|
|
5090
5105
|
/* @__PURE__ */ o(
|
|
5091
|
-
|
|
5106
|
+
Yr,
|
|
5092
5107
|
{
|
|
5093
5108
|
open: qe,
|
|
5094
5109
|
onClose: kt,
|
|
@@ -5107,12 +5122,12 @@ const li = () => {
|
|
|
5107
5122
|
]
|
|
5108
5123
|
}
|
|
5109
5124
|
) });
|
|
5110
|
-
},
|
|
5111
|
-
const
|
|
5125
|
+
}, Ni = (e, t = nn.MyFiles) => {
|
|
5126
|
+
const r = Object.values(nn).includes(
|
|
5112
5127
|
t
|
|
5113
|
-
) ? t : nn.MyFiles, [a, n] = z(
|
|
5128
|
+
) ? t : nn.MyFiles, [a, n] = z(r), s = (i) => {
|
|
5114
5129
|
n(i);
|
|
5115
|
-
}, l =
|
|
5130
|
+
}, l = j(() => {
|
|
5116
5131
|
if (e)
|
|
5117
5132
|
return Object.values(nn).map((i) => ({
|
|
5118
5133
|
id: i,
|
|
@@ -5121,31 +5136,31 @@ const li = () => {
|
|
|
5121
5136
|
}, [e]);
|
|
5122
5137
|
return {
|
|
5123
5138
|
activeTab: a,
|
|
5124
|
-
handleTabChange:
|
|
5139
|
+
handleTabChange: s,
|
|
5125
5140
|
tabs: l
|
|
5126
5141
|
};
|
|
5127
5142
|
};
|
|
5128
5143
|
export {
|
|
5129
5144
|
ge as DestinationFolderMode,
|
|
5130
|
-
|
|
5131
|
-
|
|
5145
|
+
zr as DialDestinationFolderPopup,
|
|
5146
|
+
hi as DialFileManager,
|
|
5132
5147
|
w as DialFileManagerActions,
|
|
5133
5148
|
Ce as DialFileManagerConflictActions,
|
|
5134
5149
|
ke as DialFileManagerConflictStrategies,
|
|
5135
5150
|
nn as DialFileManagerTabs,
|
|
5136
|
-
|
|
5151
|
+
L as DialFileNodeType,
|
|
5137
5152
|
St as DialFilePermission,
|
|
5138
|
-
|
|
5139
|
-
|
|
5153
|
+
Qs as DialFileResourceType,
|
|
5154
|
+
ti as DialFoldersTree,
|
|
5140
5155
|
ye as FileManagerColumnKey,
|
|
5141
5156
|
ut as FileManagerCreateFolderTriggerView,
|
|
5142
5157
|
Be as FileManagerCreateFolderType,
|
|
5143
|
-
|
|
5158
|
+
Or as FileManagerProvider,
|
|
5144
5159
|
Rt as FileManagerRenameTriggerView,
|
|
5145
|
-
|
|
5146
|
-
|
|
5160
|
+
nr as GridSelectionMode,
|
|
5161
|
+
ai as NAME_COLUMN,
|
|
5147
5162
|
ri as SIZE_COLUMN,
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5163
|
+
si as UPDATED_AT_COLUMN,
|
|
5164
|
+
Ni as useDialFileManagerTabs,
|
|
5165
|
+
ci as useFileManagerContext
|
|
5151
5166
|
};
|