@epam/ai-dial-react-file-manager 0.2.0-dev.10 → 0.2.0-dev.11
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 +986 -975
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { jsx as a, jsxs as X, Fragment as Ae } from "react/jsx-runtime";
|
|
2
2
|
import { IconCircleFilled as Un, IconChevronDown as Ja, IconDotsVertical as rn, IconFolder as fa, IconPlus as es, IconFile as ts, IconFileZip as ns, IconCopyMinus as os, IconFolderPlus as ea, IconEye as Ao, IconX as as, IconArrowLeft as ss, IconEyeOff as rs, IconAlertCircleFilled as is, IconAlertTriangleFilled as ls, IconCaretRightFilled as cs, IconUserX as Po, IconCopy as Oo, IconTrashX as Mo, IconDownload as ko, IconExternalLink as Eo, IconPencilMinus as ma, IconInfoCircle as ds, IconFileDescription as us } from "@tabler/icons-react";
|
|
3
3
|
import an from "classnames";
|
|
4
|
-
import * as
|
|
5
|
-
import { useState as _, useMemo as
|
|
6
|
-
import { DIAL_KIT_ICON_STROKE as Cs, BASE_ICON_SIZE as Lo, DialFolderName as _o, DialFileName as zo, Dropdown as ht, DropdownTrigger as Ca, DIAL_ICON_SIZE as Wo, Grid as ga, Popup as Ho, PopupSize as Gn, RadioGroup as ta, NeutralButton as Vn, PrimaryButton as on, GhostIconButton as pt, mergeClasses as
|
|
4
|
+
import * as Ve from "react";
|
|
5
|
+
import { useState as _, useMemo as j, useCallback as d, useRef as de, useEffect as fe, createContext as hs, useLayoutEffect as ps, useContext as fs, useImperativeHandle as ms } from "react";
|
|
6
|
+
import { DIAL_KIT_ICON_STROKE as Cs, BASE_ICON_SIZE as Lo, DialFolderName as _o, DialFileName as zo, Dropdown as ht, DropdownTrigger as Ca, DIAL_ICON_SIZE as Wo, Grid as ga, Popup as Ho, PopupSize as Gn, RadioGroup as ta, NeutralButton as Vn, PrimaryButton as on, GhostIconButton as pt, mergeClasses as Oe, NotificationVariant as So, ElementSize as ln, NOT_ALLOWED_SYMBOLS_REGEXP as gs, TooltipContainer as vs, TooltipPlacement as ys, TooltipTrigger as ws, TooltipContent as Ns, Notification as bs, ButtonAppearance as va, Switch as ya, Tooltip as $n, FlexibleActionsDirection as tn, ConfirmationPopup as Ds, ConfirmationPopupVariant as Ts, DialBreadcrumb as xs, Search as Is, ButtonVariant as Rs, Tabs as Fs, ButtonDropdown as na, Skeleton as Kt, SkeletonVariant as qt, EllipsisTooltip as It, DialItemType as Ue, DialFileIcon as Es, DialSharedEntityIndicator as oa, DialIcon as Ss, Spinner as As, editableContainerProps as Ps, Input as Os, useEditableItem as Ms, NoDataContent as wa, DateCellRenderer as Na, convertToDate as ks, DEFAULT_DATE_LOCALE as Ls, DEFAULT_DATE_FORMAT_OPTIONS as _s, DropdownItemType as ba, ConditionalResizableContainer as zs, CollapsibleSidebar as Ws, GRID_SELECTION_COLUMN_ID as Hs } from "@epam/ai-dial-ui-kit";
|
|
7
7
|
import { extensions as aa } from "mime-types";
|
|
8
8
|
import { createPortal as Bs } from "react-dom";
|
|
9
|
-
const Da = (e) => /* @__PURE__ */
|
|
9
|
+
const Da = (e) => /* @__PURE__ */ Ve.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ve.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" })), Ta = (e) => /* @__PURE__ */ Ve.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ve.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__ */ Ve.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ve.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" })), Uo = (e) => /* @__PURE__ */ Ve.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ve.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" })), Go = (e) => /* @__PURE__ */ Ve.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Ve.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" })), Zn = Cs, A = {
|
|
10
10
|
size: Lo,
|
|
11
11
|
stroke: Zn
|
|
12
12
|
};
|
|
13
|
-
var nn = /* @__PURE__ */ ((e) => (e.MyFiles = "my_files", e.Shared = "shared", e.Organization = "organization", e.Review = "review", e))(nn || {}), N = /* @__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))(N || {}),
|
|
13
|
+
var nn = /* @__PURE__ */ ((e) => (e.MyFiles = "my_files", e.Shared = "shared", e.Organization = "organization", e.Review = "review", e))(nn || {}), N = /* @__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))(N || {}), ge = /* @__PURE__ */ ((e) => (e.Replace = "replace", e.Duplicate = "duplicate", e.Cancel = "cancel", e))(ge || {}), He = /* @__PURE__ */ ((e) => (e.ReplaceAll = "replaceAll", e.DuplicateAll = "duplicateAll", e.DecideForEach = "decideForEach", e))(He || {}), ve = /* @__PURE__ */ ((e) => (e.Copy = "copy", e.Move = "move", e))(ve || {}), 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 || {}), Ne = /* @__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))(Ne || {});
|
|
14
14
|
const Us = "w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-base", sa = "w-full text-secondary flex items-center gap-2", Gs = "flex min-h-0 min-w-0 h-full gap-4 overflow-hidden", Vs = "flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4", $s = "h-full rounded bg-layer-raised text-secondary min-w-0", js = "flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0", Zs = "opacity-0 pointer-events-none group-hover/grid-row:opacity-100 group-hover/grid-row:pointer-events-auto", Xs = 280, Ks = "Files", st = 20, qs = "Files", Ro = ".dial_folder", ra = "New folder", Ys = 280, Qs = 460, Js = "ag-Grid-SelectionColumn", ia = 44, er = 800, tr = [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
Ne.Name,
|
|
16
|
+
Ne.UpdatedAt,
|
|
17
|
+
Ne.Size,
|
|
18
|
+
Ne.Author,
|
|
19
|
+
Ne.Actions
|
|
20
20
|
];
|
|
21
21
|
var k = /* @__PURE__ */ ((e) => (e.ITEM = "item", e.FOLDER = "folder", e))(k || {}), nr = /* @__PURE__ */ ((e) => (e.FILE = "FILE", e.PROMPT = "PROMPT", e.CONVERSATION = "CONVERSATION", e.APPLICATION = "APPLICATION", e.TOOLSET = "TOOL_SET", e))(nr || {}), St = /* @__PURE__ */ ((e) => (e.READ = "READ", e.WRITE = "WRITE", e.SHARE = "SHARE", e))(St || {});
|
|
22
22
|
const la = ({
|
|
@@ -31,55 +31,55 @@ const la = ({
|
|
|
31
31
|
message: p,
|
|
32
32
|
actionLabels: C,
|
|
33
33
|
strategyLabels: c,
|
|
34
|
-
confirmLabel:
|
|
34
|
+
confirmLabel: y = "Confirm",
|
|
35
35
|
cancelLabel: u = "Cancel",
|
|
36
|
-
nameColumnLabel:
|
|
36
|
+
nameColumnLabel: w = "Name",
|
|
37
37
|
actionColumnLabel: g = "Action"
|
|
38
38
|
}) => {
|
|
39
|
-
const m = s.length === 1, T = m ? s[0]?.name : "", D = C?.[
|
|
40
|
-
|
|
39
|
+
const m = s.length === 1, T = m ? s[0]?.name : "", D = C?.[ge.Replace] ?? "Replace", h = C?.[ge.Duplicate] ?? "Duplicate", f = C?.[ge.Cancel] ?? "Cancel", F = c?.[He.ReplaceAll] ?? "Replace all", v = c?.[He.DuplicateAll] ?? "Duplicate all", I = c?.[He.DecideForEach] ?? "Decide for each", [R, S] = _(
|
|
40
|
+
ge.Replace
|
|
41
41
|
), [L, W] = _(
|
|
42
|
-
|
|
42
|
+
He.ReplaceAll
|
|
43
43
|
), [M, P] = _(
|
|
44
44
|
new Map(
|
|
45
45
|
s.map((H) => [
|
|
46
46
|
H.path,
|
|
47
|
-
|
|
47
|
+
ge.Replace
|
|
48
48
|
])
|
|
49
49
|
)
|
|
50
|
-
), [z,
|
|
50
|
+
), [z, G] = _(
|
|
51
51
|
void 0
|
|
52
|
-
), O = m ? l : i,
|
|
52
|
+
), O = m ? l : i, K = /* @__PURE__ */ X(Ae, { children: [
|
|
53
53
|
"Item with the name ",
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ X("span", { className: "text-primary", children: [
|
|
55
55
|
'"',
|
|
56
56
|
T,
|
|
57
57
|
'"'
|
|
58
58
|
] }),
|
|
59
59
|
" ",
|
|
60
60
|
"already exists in this destination."
|
|
61
|
-
] }), oe = `${s.length} items with the same names already exist in this destination.`,
|
|
61
|
+
] }), oe = `${s.length} items with the same names already exist in this destination.`, V = p ?? (m ? K : oe), Z = j(
|
|
62
62
|
() => [
|
|
63
63
|
{
|
|
64
|
-
value:
|
|
64
|
+
value: ge.Replace,
|
|
65
65
|
label: D
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
value:
|
|
68
|
+
value: ge.Duplicate,
|
|
69
69
|
label: h
|
|
70
70
|
}
|
|
71
71
|
],
|
|
72
72
|
[D, h]
|
|
73
|
-
), ie =
|
|
73
|
+
), ie = j(() => s.map((H) => ({
|
|
74
74
|
id: H.path,
|
|
75
75
|
name: H.name,
|
|
76
76
|
path: H.path,
|
|
77
77
|
nodeType: H.nodeType ?? k.ITEM,
|
|
78
|
-
action: M.get(H.path) ||
|
|
79
|
-
})), [s, M]),
|
|
78
|
+
action: M.get(H.path) || ge.Replace
|
|
79
|
+
})), [s, M]), Re = j(() => [
|
|
80
80
|
{
|
|
81
81
|
field: "name",
|
|
82
|
-
headerName:
|
|
82
|
+
headerName: w,
|
|
83
83
|
flex: 1,
|
|
84
84
|
minWidth: 200,
|
|
85
85
|
floatingFilter: !1,
|
|
@@ -110,50 +110,50 @@ const la = ({
|
|
|
110
110
|
resizable: !1,
|
|
111
111
|
cellRenderer: (H) => {
|
|
112
112
|
if (!H.data) return null;
|
|
113
|
-
const
|
|
113
|
+
const xe = [
|
|
114
114
|
{
|
|
115
|
-
key:
|
|
115
|
+
key: ge.Replace,
|
|
116
116
|
label: D,
|
|
117
117
|
icon: /* @__PURE__ */ a(Un, { size: 10, className: "text-violet-1" })
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
|
-
key:
|
|
120
|
+
key: ge.Duplicate,
|
|
121
121
|
label: h,
|
|
122
122
|
icon: /* @__PURE__ */ a(Un, { size: 10, className: "text-success" })
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
|
-
key:
|
|
125
|
+
key: ge.Cancel,
|
|
126
126
|
label: f,
|
|
127
127
|
icon: /* @__PURE__ */ a(Un, { size: 10, className: "text-error" })
|
|
128
128
|
}
|
|
129
|
-
],
|
|
129
|
+
], De = xe.find(
|
|
130
130
|
(te) => te.key === H.data.action
|
|
131
|
-
),
|
|
131
|
+
), B = z === H.data.path;
|
|
132
132
|
return /* @__PURE__ */ a("div", { className: "flex items-center h-full", children: /* @__PURE__ */ a(
|
|
133
133
|
ht,
|
|
134
134
|
{
|
|
135
135
|
trigger: [Ca.Click],
|
|
136
|
-
open:
|
|
137
|
-
items:
|
|
136
|
+
open: B,
|
|
137
|
+
items: xe,
|
|
138
138
|
onItemClick: ({ key: te }) => {
|
|
139
|
-
P((
|
|
140
|
-
const
|
|
141
|
-
return
|
|
139
|
+
P((me) => {
|
|
140
|
+
const Le = new Map(me);
|
|
141
|
+
return Le.set(
|
|
142
142
|
H.data.path,
|
|
143
143
|
te
|
|
144
|
-
),
|
|
145
|
-
}),
|
|
144
|
+
), Le;
|
|
145
|
+
}), G(void 0);
|
|
146
146
|
},
|
|
147
147
|
placement: "bottom-start",
|
|
148
148
|
matchReferenceWidth: !1,
|
|
149
149
|
allowedPlacements: ["bottom-start", "top-start"],
|
|
150
150
|
onOpenChange: (te) => {
|
|
151
|
-
|
|
151
|
+
G(te ? H.data.path : void 0);
|
|
152
152
|
},
|
|
153
|
-
children: /* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
children: /* @__PURE__ */ X("button", { type: "button", className: "flex items-center gap-2", children: [
|
|
154
|
+
/* @__PURE__ */ X("span", { className: "flex items-center gap-2", children: [
|
|
155
|
+
De?.icon,
|
|
156
|
+
De?.label ?? D
|
|
157
157
|
] }),
|
|
158
158
|
/* @__PURE__ */ a(
|
|
159
159
|
Ja,
|
|
@@ -162,7 +162,7 @@ const la = ({
|
|
|
162
162
|
stroke: Zn,
|
|
163
163
|
className: an(
|
|
164
164
|
"text-secondary transition-transform",
|
|
165
|
-
|
|
165
|
+
B && "rotate-180"
|
|
166
166
|
)
|
|
167
167
|
}
|
|
168
168
|
)
|
|
@@ -172,29 +172,29 @@ const la = ({
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
], [
|
|
175
|
-
|
|
175
|
+
w,
|
|
176
176
|
g,
|
|
177
177
|
D,
|
|
178
178
|
h,
|
|
179
179
|
f,
|
|
180
180
|
z
|
|
181
|
-
]),
|
|
181
|
+
]), he = j(
|
|
182
182
|
() => [
|
|
183
183
|
{
|
|
184
|
-
value:
|
|
184
|
+
value: He.ReplaceAll,
|
|
185
185
|
label: F
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
|
-
value:
|
|
189
|
-
label:
|
|
188
|
+
value: He.DuplicateAll,
|
|
189
|
+
label: v
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
|
-
value:
|
|
192
|
+
value: He.DecideForEach,
|
|
193
193
|
label: I,
|
|
194
194
|
content: /* @__PURE__ */ a(
|
|
195
195
|
ga,
|
|
196
196
|
{
|
|
197
|
-
columnDefs:
|
|
197
|
+
columnDefs: Re,
|
|
198
198
|
rowData: ie,
|
|
199
199
|
getRowId: (H) => H.id,
|
|
200
200
|
wrapCustomCellRenderers: !1,
|
|
@@ -208,40 +208,40 @@ const la = ({
|
|
|
208
208
|
],
|
|
209
209
|
[
|
|
210
210
|
F,
|
|
211
|
-
|
|
211
|
+
v,
|
|
212
212
|
I,
|
|
213
|
-
|
|
213
|
+
Re,
|
|
214
214
|
ie
|
|
215
215
|
]
|
|
216
|
-
),
|
|
217
|
-
S(
|
|
216
|
+
), pe = d(() => {
|
|
217
|
+
S(ge.Replace), W(He.ReplaceAll), P(
|
|
218
218
|
new Map(
|
|
219
219
|
s.map((H) => [
|
|
220
220
|
H.path,
|
|
221
|
-
|
|
221
|
+
ge.Replace
|
|
222
222
|
])
|
|
223
223
|
)
|
|
224
224
|
);
|
|
225
|
-
}, [s]),
|
|
226
|
-
|
|
227
|
-
}, [
|
|
228
|
-
if (
|
|
229
|
-
R ===
|
|
230
|
-
else if (L ===
|
|
225
|
+
}, [s]), Fe = d(() => {
|
|
226
|
+
pe(), t();
|
|
227
|
+
}, [pe, t]), be = d(() => {
|
|
228
|
+
if (pe(), m)
|
|
229
|
+
R === ge.Replace ? r() : o();
|
|
230
|
+
else if (L === He.ReplaceAll)
|
|
231
231
|
r();
|
|
232
|
-
else if (L ===
|
|
232
|
+
else if (L === He.DuplicateAll)
|
|
233
233
|
o();
|
|
234
|
-
else if (L ===
|
|
234
|
+
else if (L === He.DecideForEach && n) {
|
|
235
235
|
const H = s.map(
|
|
236
|
-
(
|
|
237
|
-
file:
|
|
238
|
-
action: M.get(
|
|
236
|
+
(xe) => ({
|
|
237
|
+
file: xe,
|
|
238
|
+
action: M.get(xe.path) || ge.Replace
|
|
239
239
|
})
|
|
240
240
|
);
|
|
241
241
|
n(H);
|
|
242
242
|
}
|
|
243
243
|
}, [
|
|
244
|
-
|
|
244
|
+
pe,
|
|
245
245
|
m,
|
|
246
246
|
R,
|
|
247
247
|
r,
|
|
@@ -255,17 +255,17 @@ const la = ({
|
|
|
255
255
|
Ho,
|
|
256
256
|
{
|
|
257
257
|
open: e,
|
|
258
|
-
onClose:
|
|
258
|
+
onClose: Fe,
|
|
259
259
|
size: m ? Gn.Sm : Gn.Md,
|
|
260
260
|
className: an([!m && "w-[600px]"]),
|
|
261
261
|
header: O,
|
|
262
262
|
preventKeyboardOnOpen: !0,
|
|
263
|
-
footer: /* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */ a(Vn, { onClick:
|
|
265
|
-
/* @__PURE__ */ a(on, { onClick:
|
|
263
|
+
footer: /* @__PURE__ */ X("div", { className: "flex justify-end gap-3 py-4 px-6 border-t border-tertiary", children: [
|
|
264
|
+
/* @__PURE__ */ a(Vn, { onClick: Fe, label: u }),
|
|
265
|
+
/* @__PURE__ */ a(on, { onClick: be, label: y })
|
|
266
266
|
] }),
|
|
267
|
-
children: /* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */ a("p", { className: "text-secondary mb-4 break-words", children:
|
|
267
|
+
children: /* @__PURE__ */ X("div", { className: "px-6 py-4", children: [
|
|
268
|
+
/* @__PURE__ */ a("p", { className: "text-secondary mb-4 break-words", children: V }),
|
|
269
269
|
m ? /* @__PURE__ */ a(
|
|
270
270
|
ta,
|
|
271
271
|
{
|
|
@@ -280,7 +280,7 @@ const la = ({
|
|
|
280
280
|
{
|
|
281
281
|
id: "multiple-files-conflict",
|
|
282
282
|
ariaLabel: O,
|
|
283
|
-
items:
|
|
283
|
+
items: he,
|
|
284
284
|
value: L,
|
|
285
285
|
onChange: (H) => W(H),
|
|
286
286
|
contentClassName: "ml-0"
|
|
@@ -314,7 +314,7 @@ const la = ({
|
|
|
314
314
|
placement: "bottom-start",
|
|
315
315
|
allowedPlacements: ["top-start", "top-end", "bottom-start"],
|
|
316
316
|
items: c,
|
|
317
|
-
className:
|
|
317
|
+
className: Oe("sticky right-0", n),
|
|
318
318
|
children: /* @__PURE__ */ a(
|
|
319
319
|
pt,
|
|
320
320
|
{
|
|
@@ -326,7 +326,7 @@ const la = ({
|
|
|
326
326
|
},
|
|
327
327
|
[r, o, n, t]
|
|
328
328
|
);
|
|
329
|
-
return { actionsColumnDef:
|
|
329
|
+
return { actionsColumnDef: j(
|
|
330
330
|
() => ({
|
|
331
331
|
colId: "__actions",
|
|
332
332
|
headerName: "",
|
|
@@ -374,22 +374,22 @@ function sr(e, t) {
|
|
|
374
374
|
}, [e, t]), { containerRef: r, isBelowBreakpoint: o };
|
|
375
375
|
}
|
|
376
376
|
var rr = /* @__PURE__ */ ((e) => (e.MULTIPLE = "MULTIPLE", e.SINGLE = "SINGLE", e))(rr || {});
|
|
377
|
-
const
|
|
377
|
+
const qe = (e, t) => {
|
|
378
378
|
if (!(!e || !e.length || !t))
|
|
379
379
|
for (const r of e) {
|
|
380
380
|
if (r.path === t) return r;
|
|
381
|
-
const o =
|
|
381
|
+
const o = qe(r.items, t);
|
|
382
382
|
if (o) return o;
|
|
383
383
|
}
|
|
384
384
|
}, Ft = (e, t) => {
|
|
385
385
|
if (!e?.length) return;
|
|
386
386
|
if (!t) return e[0];
|
|
387
|
-
const r =
|
|
387
|
+
const r = qe(e, t);
|
|
388
388
|
if (r && r.nodeType === k.FOLDER) return r;
|
|
389
389
|
const o = t.split("/").filter(Boolean);
|
|
390
390
|
if (o.length <= 1) return e[0];
|
|
391
391
|
const n = "/" + o.slice(0, o.length - 1).join("/");
|
|
392
|
-
return
|
|
392
|
+
return qe(e, n) ?? e[0];
|
|
393
393
|
}, Et = (e) => (e ?? "").toLowerCase(), ir = (e) => Et(e).replace(/^\./, ""), lr = (e) => {
|
|
394
394
|
if (!e) return [];
|
|
395
395
|
const t = [], r = (o) => {
|
|
@@ -531,9 +531,9 @@ const hr = (e) => {
|
|
|
531
531
|
p.current = !0, o(f), s(!0);
|
|
532
532
|
}, []), c = d(() => {
|
|
533
533
|
p.current = !1, s(!1), o([]), i(null);
|
|
534
|
-
}, []),
|
|
534
|
+
}, []), y = d(
|
|
535
535
|
(f, F) => {
|
|
536
|
-
const
|
|
536
|
+
const v = e(f), I = new Set(v.map(Fo)), R = F.filter((S) => I.has(S.name));
|
|
537
537
|
return {
|
|
538
538
|
hasConflicts: R.length > 0,
|
|
539
539
|
conflicts: R
|
|
@@ -541,28 +541,28 @@ const hr = (e) => {
|
|
|
541
541
|
},
|
|
542
542
|
[e]
|
|
543
543
|
), u = d(
|
|
544
|
-
(f, F,
|
|
544
|
+
(f, F, v, I) => {
|
|
545
545
|
const R = e(f), S = new Set(R.map(Fo));
|
|
546
546
|
return F.map((L) => {
|
|
547
|
-
const W = L.name, M = S.has(W), P =
|
|
548
|
-
return (!
|
|
547
|
+
const W = L.name, M = S.has(W), P = v && M ? W : ca(W, S, L.nodeType);
|
|
548
|
+
return (!v || !M) && S.add(P), {
|
|
549
549
|
sourceUrl: L.path,
|
|
550
550
|
destinationUrl: `${f}/${P}`,
|
|
551
|
-
overwrite:
|
|
551
|
+
overwrite: v && M,
|
|
552
552
|
nodeType: L.nodeType ?? k.ITEM,
|
|
553
553
|
...I ?? {}
|
|
554
554
|
};
|
|
555
555
|
});
|
|
556
556
|
},
|
|
557
557
|
[e]
|
|
558
|
-
),
|
|
559
|
-
(f, F,
|
|
558
|
+
), w = d(
|
|
559
|
+
(f, F, v, I) => {
|
|
560
560
|
const R = e(f), S = new Set(R.map(Fo));
|
|
561
|
-
return F.filter((W) =>
|
|
562
|
-
const M =
|
|
563
|
-
return z || S.add(
|
|
561
|
+
return F.filter((W) => v.get(W.path) !== ge.Cancel).map((W) => {
|
|
562
|
+
const M = v.get(W.path), P = S.has(W.name), z = M === ge.Replace && P, G = z ? W.name : ca(W.name, S, W.nodeType);
|
|
563
|
+
return z || S.add(G), {
|
|
564
564
|
sourceUrl: W.path,
|
|
565
|
-
destinationUrl: `${f}/${
|
|
565
|
+
destinationUrl: `${f}/${G}`,
|
|
566
566
|
overwrite: z,
|
|
567
567
|
nodeType: W.nodeType ?? k.ITEM,
|
|
568
568
|
...I ?? {}
|
|
@@ -571,22 +571,22 @@ const hr = (e) => {
|
|
|
571
571
|
},
|
|
572
572
|
[e]
|
|
573
573
|
), g = d(
|
|
574
|
-
(f, F,
|
|
575
|
-
const I =
|
|
574
|
+
(f, F, v) => {
|
|
575
|
+
const I = y(f, F);
|
|
576
576
|
return I.hasConflicts && (i({
|
|
577
577
|
files: F,
|
|
578
578
|
destinationFolder: f,
|
|
579
|
-
metadata:
|
|
579
|
+
metadata: v
|
|
580
580
|
}), C(I.conflicts)), I;
|
|
581
581
|
},
|
|
582
|
-
[
|
|
582
|
+
[y, C]
|
|
583
583
|
), m = d(() => {
|
|
584
584
|
if (!l) return;
|
|
585
|
-
const { files: f, destinationFolder: F, metadata:
|
|
585
|
+
const { files: f, destinationFolder: F, metadata: v } = l, I = u(
|
|
586
586
|
F,
|
|
587
587
|
f,
|
|
588
588
|
!0,
|
|
589
|
-
|
|
589
|
+
v
|
|
590
590
|
);
|
|
591
591
|
t?.(I, F), c();
|
|
592
592
|
}, [
|
|
@@ -596,11 +596,11 @@ const hr = (e) => {
|
|
|
596
596
|
c
|
|
597
597
|
]), T = d(() => {
|
|
598
598
|
if (!l) return;
|
|
599
|
-
const { files: f, destinationFolder: F, metadata:
|
|
599
|
+
const { files: f, destinationFolder: F, metadata: v } = l, I = u(
|
|
600
600
|
F,
|
|
601
601
|
f,
|
|
602
602
|
!1,
|
|
603
|
-
|
|
603
|
+
v
|
|
604
604
|
);
|
|
605
605
|
t?.(I, F), c();
|
|
606
606
|
}, [
|
|
@@ -610,16 +610,16 @@ const hr = (e) => {
|
|
|
610
610
|
c
|
|
611
611
|
]), D = d(() => {
|
|
612
612
|
if (!l) return;
|
|
613
|
-
const { files: f, destinationFolder: F, metadata:
|
|
613
|
+
const { files: f, destinationFolder: F, metadata: v } = l, I = w(
|
|
614
614
|
F,
|
|
615
615
|
f,
|
|
616
616
|
new Map(
|
|
617
617
|
r.map((R) => [
|
|
618
618
|
R.path,
|
|
619
|
-
|
|
619
|
+
ge.Cancel
|
|
620
620
|
])
|
|
621
621
|
),
|
|
622
|
-
|
|
622
|
+
v
|
|
623
623
|
);
|
|
624
624
|
t?.(I, F), c();
|
|
625
625
|
}, [
|
|
@@ -627,23 +627,23 @@ const hr = (e) => {
|
|
|
627
627
|
r,
|
|
628
628
|
t,
|
|
629
629
|
l,
|
|
630
|
-
|
|
630
|
+
w
|
|
631
631
|
]), h = d(
|
|
632
632
|
(f) => {
|
|
633
633
|
if (!l) return;
|
|
634
|
-
const { files: F, destinationFolder:
|
|
634
|
+
const { files: F, destinationFolder: v, metadata: I } = l, R = new Map(
|
|
635
635
|
f.map((L) => [L.file.path, L.action])
|
|
636
|
-
), S =
|
|
637
|
-
|
|
636
|
+
), S = w(
|
|
637
|
+
v,
|
|
638
638
|
F,
|
|
639
639
|
R,
|
|
640
640
|
I
|
|
641
641
|
);
|
|
642
|
-
t?.(S,
|
|
642
|
+
t?.(S, v), c();
|
|
643
643
|
},
|
|
644
644
|
[
|
|
645
645
|
l,
|
|
646
|
-
|
|
646
|
+
w,
|
|
647
647
|
t,
|
|
648
648
|
c
|
|
649
649
|
]
|
|
@@ -652,10 +652,10 @@ const hr = (e) => {
|
|
|
652
652
|
conflictingFiles: r,
|
|
653
653
|
conflictResolutionOpen: n,
|
|
654
654
|
hasActiveConflictRef: p,
|
|
655
|
-
checkForConflicts:
|
|
655
|
+
checkForConflicts: y,
|
|
656
656
|
startConflictResolution: g,
|
|
657
657
|
resolveConflictsWithStrategy: u,
|
|
658
|
-
resolveConflictsWithDecisions:
|
|
658
|
+
resolveConflictsWithDecisions: w,
|
|
659
659
|
openConflictResolution: C,
|
|
660
660
|
closeConflictResolution: c,
|
|
661
661
|
handleReplaceAll: m,
|
|
@@ -673,9 +673,9 @@ const hr = (e) => {
|
|
|
673
673
|
getCopyHeader: l,
|
|
674
674
|
getMoveHeader: i
|
|
675
675
|
}) => {
|
|
676
|
-
const [p, C] = _(!1), [c,
|
|
676
|
+
const [p, C] = _(!1), [c, y] = _([]), [u, w] = _([]), [g, m] = _(ve.Copy), [T, D] = _(), [h, f] = _(null), {
|
|
677
677
|
conflictingFiles: F,
|
|
678
|
-
conflictResolutionOpen:
|
|
678
|
+
conflictResolutionOpen: v,
|
|
679
679
|
hasActiveConflictRef: I,
|
|
680
680
|
startConflictResolution: R,
|
|
681
681
|
resolveConflictsWithStrategy: S,
|
|
@@ -684,30 +684,30 @@ const hr = (e) => {
|
|
|
684
684
|
handleReplaceAll: M,
|
|
685
685
|
handleDuplicateAll: P,
|
|
686
686
|
handleCancelAll: z,
|
|
687
|
-
handleDecideForEach:
|
|
687
|
+
handleDecideForEach: G
|
|
688
688
|
} = Ia({
|
|
689
689
|
getDestinationFiles: e,
|
|
690
|
-
onResolve: (
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
onResolve: (B, te) => {
|
|
691
|
+
B?.length && (h?.type === ve.Copy ? (t?.(B, te), o?.()) : h?.type === ve.Move && h.sourceFolder && (r?.(
|
|
692
|
+
B,
|
|
693
693
|
h.sourceFolder,
|
|
694
694
|
te
|
|
695
695
|
), n?.()));
|
|
696
696
|
}
|
|
697
697
|
}), O = d(() => {
|
|
698
|
-
|
|
699
|
-
}, []),
|
|
700
|
-
(
|
|
701
|
-
const te = R(
|
|
702
|
-
type:
|
|
698
|
+
y([]), w([]), f(null), D(void 0);
|
|
699
|
+
}, []), K = d(
|
|
700
|
+
(B) => {
|
|
701
|
+
const te = R(B, c, {
|
|
702
|
+
type: ve.Copy
|
|
703
703
|
});
|
|
704
|
-
if (f({ type:
|
|
705
|
-
const
|
|
706
|
-
|
|
704
|
+
if (f({ type: ve.Copy }), !te.hasConflicts) {
|
|
705
|
+
const me = S(
|
|
706
|
+
B,
|
|
707
707
|
c,
|
|
708
708
|
!1
|
|
709
709
|
);
|
|
710
|
-
t?.(
|
|
710
|
+
t?.(me, B), o?.(), O();
|
|
711
711
|
}
|
|
712
712
|
},
|
|
713
713
|
[
|
|
@@ -719,18 +719,18 @@ const hr = (e) => {
|
|
|
719
719
|
O
|
|
720
720
|
]
|
|
721
721
|
), oe = d(
|
|
722
|
-
(
|
|
723
|
-
const
|
|
724
|
-
if (!R(
|
|
725
|
-
type:
|
|
726
|
-
sourceFolderPath:
|
|
722
|
+
(B, te) => {
|
|
723
|
+
const me = te || (h?.sourceFolder ?? "/");
|
|
724
|
+
if (!R(B, u, {
|
|
725
|
+
type: ve.Move,
|
|
726
|
+
sourceFolderPath: me
|
|
727
727
|
}).hasConflicts) {
|
|
728
|
-
const
|
|
729
|
-
|
|
728
|
+
const _e = S(
|
|
729
|
+
B,
|
|
730
730
|
u,
|
|
731
731
|
!0
|
|
732
732
|
);
|
|
733
|
-
r?.(
|
|
733
|
+
r?.(_e, me, B), n?.(), O();
|
|
734
734
|
}
|
|
735
735
|
},
|
|
736
736
|
[
|
|
@@ -742,72 +742,72 @@ const hr = (e) => {
|
|
|
742
742
|
O,
|
|
743
743
|
h
|
|
744
744
|
]
|
|
745
|
-
),
|
|
745
|
+
), V = d(() => {
|
|
746
746
|
M(), O();
|
|
747
747
|
}, [M, O]), Z = d(() => {
|
|
748
748
|
P(), O();
|
|
749
749
|
}, [P, O]), ie = d(() => {
|
|
750
750
|
z(), O();
|
|
751
|
-
}, [z, O]),
|
|
752
|
-
(
|
|
753
|
-
|
|
751
|
+
}, [z, O]), Re = d(
|
|
752
|
+
(B) => {
|
|
753
|
+
G(B), O();
|
|
754
754
|
},
|
|
755
|
-
[
|
|
756
|
-
),
|
|
757
|
-
(
|
|
758
|
-
const te =
|
|
755
|
+
[G, O]
|
|
756
|
+
), he = d(
|
|
757
|
+
(B) => {
|
|
758
|
+
const te = B.at(0)?.parentPath ?? "/", me = S(
|
|
759
759
|
te,
|
|
760
|
-
|
|
760
|
+
B,
|
|
761
761
|
!1
|
|
762
762
|
);
|
|
763
|
-
t?.(
|
|
763
|
+
t?.(me, te), s?.();
|
|
764
764
|
},
|
|
765
765
|
[t, s, S]
|
|
766
|
-
),
|
|
767
|
-
(
|
|
768
|
-
m(
|
|
766
|
+
), pe = d(
|
|
767
|
+
(B) => {
|
|
768
|
+
m(B), C(!0);
|
|
769
769
|
},
|
|
770
770
|
[]
|
|
771
|
-
),
|
|
771
|
+
), Fe = d(() => {
|
|
772
772
|
C(!1), I.current || O();
|
|
773
|
-
}, [O, I]), [
|
|
774
|
-
(
|
|
775
|
-
|
|
776
|
-
const te =
|
|
777
|
-
D(te), l &&
|
|
773
|
+
}, [O, I]), [be, H] = _(), xe = d(
|
|
774
|
+
(B) => {
|
|
775
|
+
y(B);
|
|
776
|
+
const te = B[0]?.parentPath ?? B[0]?.folderId;
|
|
777
|
+
D(te), l && B.length > 0 ? H(l(B.length, B[0]?.name)) : H(void 0);
|
|
778
778
|
},
|
|
779
779
|
[l]
|
|
780
|
-
),
|
|
781
|
-
(
|
|
782
|
-
|
|
783
|
-
const te =
|
|
780
|
+
), De = d(
|
|
781
|
+
(B) => {
|
|
782
|
+
w(B);
|
|
783
|
+
const te = B[0]?.parentPath ?? B[0]?.folderId;
|
|
784
784
|
D(te), f({
|
|
785
|
-
type:
|
|
785
|
+
type: ve.Move,
|
|
786
786
|
sourceFolder: te
|
|
787
|
-
}), i &&
|
|
787
|
+
}), i && B.length > 0 ? H(i(B.length, B[0]?.name)) : H(void 0);
|
|
788
788
|
},
|
|
789
789
|
[i]
|
|
790
790
|
);
|
|
791
791
|
return {
|
|
792
|
-
handleDuplicate:
|
|
793
|
-
handleCloseDestinationFolderPopup:
|
|
794
|
-
handleOpenDestinationFolderPopup:
|
|
795
|
-
handleCopyTo:
|
|
792
|
+
handleDuplicate: he,
|
|
793
|
+
handleCloseDestinationFolderPopup: Fe,
|
|
794
|
+
handleOpenDestinationFolderPopup: pe,
|
|
795
|
+
handleCopyTo: K,
|
|
796
796
|
handleMoveTo: oe,
|
|
797
797
|
openDestinationFolderPopup: p,
|
|
798
798
|
destinationFolderMode: g,
|
|
799
|
-
destinationFolderTitle:
|
|
800
|
-
handleSetCopiedFiles:
|
|
801
|
-
handleSetMovedFiles:
|
|
799
|
+
destinationFolderTitle: be,
|
|
800
|
+
handleSetCopiedFiles: xe,
|
|
801
|
+
handleSetMovedFiles: De,
|
|
802
802
|
clearState: O,
|
|
803
803
|
conflictingFiles: F,
|
|
804
|
-
conflictResolutionOpen:
|
|
804
|
+
conflictResolutionOpen: v,
|
|
805
805
|
openConflictResolution: W,
|
|
806
806
|
closeConflictResolution: L,
|
|
807
|
-
handleConflictReplace:
|
|
807
|
+
handleConflictReplace: V,
|
|
808
808
|
handleConflictCancel: ie,
|
|
809
809
|
handleConflictDuplicate: Z,
|
|
810
|
-
handleConflictDecideForEach:
|
|
810
|
+
handleConflictDecideForEach: Re,
|
|
811
811
|
sourceFolder: T
|
|
812
812
|
};
|
|
813
813
|
}, Nr = ({
|
|
@@ -839,19 +839,19 @@ const hr = (e) => {
|
|
|
839
839
|
onDeleteSuccess: t
|
|
840
840
|
}) => {
|
|
841
841
|
const [r, o] = _(!1), [n, s] = _([]), [l, i] = _(""), p = d(
|
|
842
|
-
(
|
|
843
|
-
s(
|
|
842
|
+
(y, u) => {
|
|
843
|
+
s(y), i(u), o(!0);
|
|
844
844
|
},
|
|
845
845
|
[]
|
|
846
846
|
), C = d(() => {
|
|
847
847
|
o(!1), s([]);
|
|
848
848
|
}, []), c = d(() => {
|
|
849
849
|
if (e && n.length > 0) {
|
|
850
|
-
const
|
|
850
|
+
const y = n.map((u) => ({
|
|
851
851
|
sourceUrl: u.path,
|
|
852
852
|
nodeType: u.nodeType
|
|
853
853
|
}));
|
|
854
|
-
e(
|
|
854
|
+
e(y, l), t?.();
|
|
855
855
|
}
|
|
856
856
|
C();
|
|
857
857
|
}, [
|
|
@@ -890,9 +890,9 @@ const hr = (e) => {
|
|
|
890
890
|
uploadEnabled: i = !0,
|
|
891
891
|
currentFolder: p
|
|
892
892
|
} = {}) => {
|
|
893
|
-
const [C, c] = _(!1), [
|
|
893
|
+
const [C, c] = _(!1), [y, u] = _(!1), [w, g] = _(), m = de(null), T = de(""), D = de([]), h = j(() => !!p?.permissions?.includes(St.WRITE), [p]), [f, F] = _(/* @__PURE__ */ new Map()), [v, I] = _(null), R = d(
|
|
894
894
|
(x) => !o || o.includes("*/*") ? x : x.filter(
|
|
895
|
-
({ fileContent:
|
|
895
|
+
({ fileContent: $, name: U }) => Vo(o, $.type, U)
|
|
896
896
|
),
|
|
897
897
|
[o]
|
|
898
898
|
), S = d(() => {
|
|
@@ -901,93 +901,94 @@ const hr = (e) => {
|
|
|
901
901
|
conflictingFiles: L,
|
|
902
902
|
conflictResolutionOpen: W,
|
|
903
903
|
hasActiveConflictRef: M,
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
904
|
+
checkForConflicts: P,
|
|
905
|
+
startConflictResolution: z,
|
|
906
|
+
closeConflictResolution: G,
|
|
907
|
+
openConflictResolution: O,
|
|
908
|
+
handleReplaceAll: K,
|
|
909
|
+
handleDuplicateAll: oe,
|
|
910
|
+
handleCancelAll: V,
|
|
911
|
+
handleDecideForEach: Z
|
|
911
912
|
} = Ia({
|
|
912
913
|
getDestinationFiles: () => D.current,
|
|
913
|
-
onResolve: (x,
|
|
914
|
+
onResolve: (x, $) => {
|
|
914
915
|
if (!i || !h) {
|
|
915
916
|
S();
|
|
916
917
|
return;
|
|
917
918
|
}
|
|
918
|
-
if (!
|
|
919
|
-
const
|
|
920
|
-
const
|
|
921
|
-
if (!
|
|
919
|
+
if (!v) return;
|
|
920
|
+
const U = x.map((q) => {
|
|
921
|
+
const J = f.get(q.sourceUrl);
|
|
922
|
+
if (!J)
|
|
922
923
|
return;
|
|
923
|
-
const
|
|
924
|
+
const Ce = q.destinationUrl.split("/").pop();
|
|
924
925
|
return {
|
|
925
|
-
fileContent:
|
|
926
|
-
name:
|
|
926
|
+
fileContent: J.fileContent,
|
|
927
|
+
name: Ce
|
|
927
928
|
};
|
|
928
929
|
}).filter(Boolean);
|
|
929
|
-
if (
|
|
930
|
-
const { fileContent:
|
|
931
|
-
s?.(
|
|
932
|
-
} else
|
|
930
|
+
if (v.isArchive && U[0]) {
|
|
931
|
+
const { fileContent: q, name: J } = U[0];
|
|
932
|
+
s?.(q, J, $);
|
|
933
|
+
} else U.length > 0 && e?.(U, $);
|
|
933
934
|
S();
|
|
934
935
|
}
|
|
935
936
|
});
|
|
936
937
|
fe(() => {
|
|
937
|
-
i && h || (c(!1), u(!1), g(void 0),
|
|
938
|
+
i && h || (c(!1), u(!1), g(void 0), G(), S());
|
|
938
939
|
}, [
|
|
939
940
|
i,
|
|
940
|
-
|
|
941
|
+
G,
|
|
941
942
|
S,
|
|
942
943
|
h
|
|
943
944
|
]), fe(() => {
|
|
944
945
|
if (!i || !h) return;
|
|
945
946
|
let x = 0;
|
|
946
|
-
const
|
|
947
|
-
Tr(
|
|
948
|
-
},
|
|
947
|
+
const $ = (Ce) => {
|
|
948
|
+
Tr(Ce) && Ce.dataTransfer.types.includes(qs) && (x++, u(!0));
|
|
949
|
+
}, U = () => {
|
|
949
950
|
x--, x === 0 && u(!1);
|
|
950
|
-
},
|
|
951
|
+
}, q = () => {
|
|
951
952
|
x = 0, u(!1);
|
|
952
|
-
},
|
|
953
|
-
|
|
953
|
+
}, J = (Ce) => {
|
|
954
|
+
Ce.preventDefault();
|
|
954
955
|
};
|
|
955
|
-
return window.addEventListener("dragenter",
|
|
956
|
-
window.removeEventListener("dragenter",
|
|
956
|
+
return window.addEventListener("dragenter", $), window.addEventListener("dragleave", U), window.addEventListener("drop", q), window.addEventListener("dragover", J), () => {
|
|
957
|
+
window.removeEventListener("dragenter", $), window.removeEventListener("dragleave", U), window.removeEventListener("drop", q), window.removeEventListener("dragover", J);
|
|
957
958
|
};
|
|
958
959
|
}, [i, h]);
|
|
959
|
-
const
|
|
960
|
-
(x) => r ? x.filter((
|
|
960
|
+
const ie = d(
|
|
961
|
+
(x) => r ? x.filter(($) => $.fileContent.size > r).map(($) => $.name) : [],
|
|
961
962
|
[r]
|
|
962
|
-
),
|
|
963
|
-
(x,
|
|
964
|
-
id:
|
|
965
|
-
name:
|
|
966
|
-
folderId:
|
|
967
|
-
path:
|
|
963
|
+
), Re = d(
|
|
964
|
+
(x, $) => x.map((U) => ({
|
|
965
|
+
id: U.name,
|
|
966
|
+
name: U.name,
|
|
967
|
+
folderId: $,
|
|
968
|
+
path: U.name,
|
|
968
969
|
nodeType: k.ITEM,
|
|
969
|
-
parentPath:
|
|
970
|
-
contentLength:
|
|
970
|
+
parentPath: $,
|
|
971
|
+
contentLength: U.fileContent.size
|
|
971
972
|
})),
|
|
972
973
|
[]
|
|
973
|
-
),
|
|
974
|
-
async (x,
|
|
974
|
+
), he = d(
|
|
975
|
+
async (x, $, U) => {
|
|
975
976
|
if (!i || !h) return !1;
|
|
976
|
-
g(void 0), D.current =
|
|
977
|
-
const
|
|
977
|
+
g(void 0), D.current = U;
|
|
978
|
+
const q = l ? x.map((ae) => ({
|
|
978
979
|
...ae,
|
|
979
980
|
name: l(ae.name)
|
|
980
|
-
})) : x,
|
|
981
|
-
if (
|
|
982
|
-
const ae = r ? (r / 1048576).toFixed(2) : 0,
|
|
983
|
-
return g(
|
|
981
|
+
})) : x, J = ie(q);
|
|
982
|
+
if (J.length > 0) {
|
|
983
|
+
const ae = r ? (r / 1048576).toFixed(2) : 0, Ee = n.oversizedFiles || `Files exceed maximum size (${ae}MB): ${J.join(", ")}`;
|
|
984
|
+
return g(Ee), !1;
|
|
984
985
|
}
|
|
985
986
|
if (t)
|
|
986
987
|
try {
|
|
987
988
|
const ae = await t(
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
989
|
+
q,
|
|
990
|
+
U,
|
|
991
|
+
$
|
|
991
992
|
);
|
|
992
993
|
if (!ae.valid)
|
|
993
994
|
return g(
|
|
@@ -998,104 +999,114 @@ const hr = (e) => {
|
|
|
998
999
|
n.validationError || "Validation error occurred"
|
|
999
1000
|
), !1;
|
|
1000
1001
|
}
|
|
1001
|
-
const
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1002
|
+
const Ce = Re(
|
|
1003
|
+
q,
|
|
1004
|
+
$
|
|
1005
|
+
), { conflicts: Ie } = P($, Ce), Te = new Set(Ie.map((ae) => ae.name)), ye = q.filter(
|
|
1006
|
+
(ae) => !Te.has(ae.name)
|
|
1006
1007
|
);
|
|
1007
|
-
return
|
|
1008
|
-
|
|
1009
|
-
|
|
1008
|
+
return ye.length > 0 && e?.(ye, $), Te.size === 0 ? (S(), !0) : (D.current = [
|
|
1009
|
+
...U,
|
|
1010
|
+
...Re(ye, $)
|
|
1011
|
+
], F(
|
|
1012
|
+
new Map(
|
|
1013
|
+
q.filter((ae) => Te.has(ae.name)).map((ae) => [ae.name, ae])
|
|
1014
|
+
)
|
|
1015
|
+
), I({ destinationFolder: $ }), z(
|
|
1016
|
+
$,
|
|
1017
|
+
Ce.filter((ae) => Te.has(ae.name)),
|
|
1018
|
+
{ destinationFolder: $ }
|
|
1019
|
+
), !1);
|
|
1010
1020
|
},
|
|
1011
1021
|
[
|
|
1012
1022
|
i,
|
|
1013
1023
|
e,
|
|
1014
1024
|
t,
|
|
1015
1025
|
l,
|
|
1016
|
-
|
|
1026
|
+
ie,
|
|
1017
1027
|
r,
|
|
1018
1028
|
n,
|
|
1019
|
-
|
|
1029
|
+
Re,
|
|
1020
1030
|
P,
|
|
1031
|
+
z,
|
|
1021
1032
|
S,
|
|
1022
1033
|
h
|
|
1023
1034
|
]
|
|
1024
|
-
),
|
|
1025
|
-
|
|
1026
|
-
}, [
|
|
1027
|
-
q(), S();
|
|
1028
|
-
}, [q, S]), xe = d(() => {
|
|
1035
|
+
), pe = d(() => {
|
|
1036
|
+
K(), S();
|
|
1037
|
+
}, [K, S]), Fe = d(() => {
|
|
1029
1038
|
oe(), S();
|
|
1030
|
-
}, [oe, S]),
|
|
1039
|
+
}, [oe, S]), be = d(() => {
|
|
1040
|
+
V(), S();
|
|
1041
|
+
}, [V, S]), H = d(
|
|
1031
1042
|
(x) => {
|
|
1032
|
-
|
|
1043
|
+
Z(x), S();
|
|
1033
1044
|
},
|
|
1034
|
-
[
|
|
1035
|
-
),
|
|
1036
|
-
|
|
1037
|
-
}, [
|
|
1045
|
+
[Z, S]
|
|
1046
|
+
), xe = d(() => {
|
|
1047
|
+
G(), M.current || S();
|
|
1048
|
+
}, [G, M, S]), De = d(
|
|
1038
1049
|
(x) => {
|
|
1039
1050
|
!i || !h || (x.preventDefault(), x.stopPropagation(), x.dataTransfer.types.includes("Files") && c(!0));
|
|
1040
1051
|
},
|
|
1041
1052
|
[i, h]
|
|
1042
|
-
),
|
|
1053
|
+
), B = d(
|
|
1043
1054
|
(x) => {
|
|
1044
1055
|
if (!i || !h) return;
|
|
1045
1056
|
x.preventDefault(), x.stopPropagation();
|
|
1046
|
-
const
|
|
1047
|
-
(
|
|
1057
|
+
const $ = x.currentTarget.getBoundingClientRect(), U = x.clientX, q = x.clientY;
|
|
1058
|
+
(U <= $.left || U >= $.right || q <= $.top || q >= $.bottom) && c(!1);
|
|
1048
1059
|
},
|
|
1049
1060
|
[i, h]
|
|
1050
|
-
),
|
|
1061
|
+
), te = d(
|
|
1051
1062
|
(x) => {
|
|
1052
1063
|
!i || !h || (x.preventDefault(), x.stopPropagation(), x.dataTransfer.types.includes("Files") && (x.dataTransfer.dropEffect = "copy"));
|
|
1053
1064
|
},
|
|
1054
1065
|
[i, h]
|
|
1055
|
-
),
|
|
1056
|
-
async (x,
|
|
1066
|
+
), me = d(
|
|
1067
|
+
async (x, $, U) => {
|
|
1057
1068
|
if (!i || !h || (x.preventDefault(), x.stopPropagation(), c(!1), !x.dataTransfer.types.includes("Files")))
|
|
1058
1069
|
return;
|
|
1059
|
-
const
|
|
1060
|
-
let
|
|
1061
|
-
if (
|
|
1062
|
-
if (
|
|
1063
|
-
if (
|
|
1064
|
-
|
|
1070
|
+
const q = Array.from(x.dataTransfer.items || []), J = [];
|
|
1071
|
+
let Ce = !1;
|
|
1072
|
+
if (q.length > 0 && q.forEach((ye) => {
|
|
1073
|
+
if (ye.kind === "file") {
|
|
1074
|
+
if (ye.webkitGetAsEntry?.()?.isDirectory) {
|
|
1075
|
+
Ce = !0;
|
|
1065
1076
|
return;
|
|
1066
1077
|
}
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1078
|
+
const Ee = ye.getAsFile?.();
|
|
1079
|
+
Ee && J.push(Ee);
|
|
1069
1080
|
}
|
|
1070
|
-
}),
|
|
1071
|
-
|
|
1081
|
+
}), J.length === 0 && x.dataTransfer.files?.length && J.push(...Array.from(x.dataTransfer.files)), J.length === 0) {
|
|
1082
|
+
Ce && g(
|
|
1072
1083
|
n.foldersNotSupported || "Folder upload is not supported"
|
|
1073
1084
|
);
|
|
1074
1085
|
return;
|
|
1075
1086
|
}
|
|
1076
|
-
const
|
|
1077
|
-
fileContent:
|
|
1078
|
-
name:
|
|
1079
|
-
})),
|
|
1080
|
-
if (
|
|
1087
|
+
const Ie = J.map((ye) => ({
|
|
1088
|
+
fileContent: ye,
|
|
1089
|
+
name: ye.name
|
|
1090
|
+
})), Te = R(Ie);
|
|
1091
|
+
if (Te.length === 0) {
|
|
1081
1092
|
g(
|
|
1082
1093
|
n.unsupportedFiles || "Selected files are not supported"
|
|
1083
1094
|
);
|
|
1084
1095
|
return;
|
|
1085
1096
|
}
|
|
1086
|
-
await
|
|
1097
|
+
await he(Te, $, U);
|
|
1087
1098
|
},
|
|
1088
1099
|
[
|
|
1089
1100
|
i,
|
|
1090
1101
|
R,
|
|
1091
|
-
|
|
1102
|
+
he,
|
|
1092
1103
|
n,
|
|
1093
1104
|
h
|
|
1094
1105
|
]
|
|
1095
|
-
),
|
|
1106
|
+
), Le = de(() => {
|
|
1096
1107
|
});
|
|
1097
1108
|
fe(() => {
|
|
1098
|
-
|
|
1109
|
+
Le.current = async () => {
|
|
1099
1110
|
const x = m.current;
|
|
1100
1111
|
if (!x) return;
|
|
1101
1112
|
if (!i || !h) {
|
|
@@ -1103,19 +1114,19 @@ const hr = (e) => {
|
|
|
1103
1114
|
return;
|
|
1104
1115
|
}
|
|
1105
1116
|
if (!x.files?.length) return;
|
|
1106
|
-
const
|
|
1107
|
-
fileContent:
|
|
1108
|
-
name:
|
|
1109
|
-
})),
|
|
1110
|
-
if (
|
|
1117
|
+
const U = Array.from(x.files).map((J) => ({
|
|
1118
|
+
fileContent: J,
|
|
1119
|
+
name: J.name
|
|
1120
|
+
})), q = R(U);
|
|
1121
|
+
if (q.length === 0) {
|
|
1111
1122
|
g(
|
|
1112
1123
|
n.unsupportedFiles || "Selected files are not supported"
|
|
1113
1124
|
), x.value = "";
|
|
1114
1125
|
return;
|
|
1115
1126
|
}
|
|
1116
1127
|
try {
|
|
1117
|
-
await
|
|
1118
|
-
|
|
1128
|
+
await he(
|
|
1129
|
+
q,
|
|
1119
1130
|
T.current,
|
|
1120
1131
|
D.current
|
|
1121
1132
|
);
|
|
@@ -1129,93 +1140,93 @@ const hr = (e) => {
|
|
|
1129
1140
|
i,
|
|
1130
1141
|
h,
|
|
1131
1142
|
R,
|
|
1132
|
-
|
|
1143
|
+
he,
|
|
1133
1144
|
n
|
|
1134
1145
|
]), fe(() => {
|
|
1135
1146
|
const x = document.createElement("input");
|
|
1136
1147
|
x.type = "file", x.multiple = !0, x.style.display = "none", document.body.appendChild(x), m.current = x;
|
|
1137
|
-
const
|
|
1138
|
-
return x.addEventListener("change",
|
|
1139
|
-
x.removeEventListener("change",
|
|
1148
|
+
const $ = () => Le.current?.();
|
|
1149
|
+
return x.addEventListener("change", $), () => {
|
|
1150
|
+
x.removeEventListener("change", $), m.current === x && (document.body.removeChild(x), m.current = null);
|
|
1140
1151
|
};
|
|
1141
1152
|
}, []), fe(() => {
|
|
1142
1153
|
const x = m.current;
|
|
1143
1154
|
x && (o && o.length > 0 ? x.accept = o.join(",") : x.removeAttribute("accept"));
|
|
1144
1155
|
}, [o]);
|
|
1145
|
-
const
|
|
1146
|
-
(x,
|
|
1147
|
-
!i || !h || (T.current = x, D.current =
|
|
1156
|
+
const _e = d(
|
|
1157
|
+
(x, $) => {
|
|
1158
|
+
!i || !h || (T.current = x, D.current = $, m.current && m.current.click());
|
|
1148
1159
|
},
|
|
1149
1160
|
[i, h]
|
|
1150
1161
|
), Me = d(
|
|
1151
|
-
(x,
|
|
1162
|
+
(x, $) => {
|
|
1152
1163
|
if (!s || !i || !h) return;
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
const
|
|
1156
|
-
const
|
|
1157
|
-
if (!
|
|
1158
|
-
document.body.removeChild(
|
|
1164
|
+
const U = document.createElement("input");
|
|
1165
|
+
U.type = "file", U.accept = ".zip,application/zip", U.multiple = !1, U.style.display = "none";
|
|
1166
|
+
const q = () => {
|
|
1167
|
+
const J = U.files?.[0];
|
|
1168
|
+
if (!J) {
|
|
1169
|
+
document.body.removeChild(U);
|
|
1159
1170
|
return;
|
|
1160
1171
|
}
|
|
1161
|
-
const
|
|
1162
|
-
id:
|
|
1163
|
-
name:
|
|
1172
|
+
const Ce = J.name.replace(/\.zip$/i, ""), Ie = l ? l(Ce) : Ce, Te = {
|
|
1173
|
+
id: Ie,
|
|
1174
|
+
name: Ie,
|
|
1164
1175
|
folderId: x,
|
|
1165
|
-
path: `${x}/${
|
|
1176
|
+
path: `${x}/${Ie}`,
|
|
1166
1177
|
nodeType: k.FOLDER,
|
|
1167
1178
|
parentPath: x,
|
|
1168
|
-
contentLength:
|
|
1169
|
-
contentType:
|
|
1179
|
+
contentLength: J.size,
|
|
1180
|
+
contentType: J.type
|
|
1170
1181
|
};
|
|
1171
|
-
if (D.current =
|
|
1172
|
-
/* @__PURE__ */ new Map([[
|
|
1173
|
-
),
|
|
1182
|
+
if (D.current = $, I({ destinationFolder: x, isArchive: !0 }), F(
|
|
1183
|
+
/* @__PURE__ */ new Map([[Te.path, { fileContent: J, name: Ie }]])
|
|
1184
|
+
), z(x, [Te], {
|
|
1174
1185
|
destinationFolder: x
|
|
1175
1186
|
}).hasConflicts) {
|
|
1176
|
-
document.body.removeChild(
|
|
1187
|
+
document.body.removeChild(U);
|
|
1177
1188
|
return;
|
|
1178
1189
|
}
|
|
1179
1190
|
try {
|
|
1180
|
-
s(
|
|
1191
|
+
s(J, Ie, x);
|
|
1181
1192
|
} finally {
|
|
1182
|
-
document.body.removeChild(
|
|
1193
|
+
document.body.removeChild(U);
|
|
1183
1194
|
}
|
|
1184
1195
|
};
|
|
1185
|
-
|
|
1196
|
+
U.addEventListener("change", q), document.body.appendChild(U), U.click();
|
|
1186
1197
|
},
|
|
1187
1198
|
[
|
|
1188
1199
|
s,
|
|
1189
1200
|
i,
|
|
1190
1201
|
h,
|
|
1191
|
-
|
|
1202
|
+
z,
|
|
1192
1203
|
l
|
|
1193
1204
|
]
|
|
1194
|
-
),
|
|
1205
|
+
), Ye = d(() => {
|
|
1195
1206
|
g(void 0);
|
|
1196
1207
|
}, []);
|
|
1197
1208
|
return {
|
|
1198
1209
|
isDragging: C,
|
|
1199
|
-
isDraggingOverWindow:
|
|
1200
|
-
uploadError:
|
|
1201
|
-
handleDragEnter:
|
|
1202
|
-
handleDragLeave:
|
|
1203
|
-
handleDragOver:
|
|
1204
|
-
handleDrop:
|
|
1205
|
-
clearError:
|
|
1206
|
-
handleUpload:
|
|
1207
|
-
openFileDialog:
|
|
1210
|
+
isDraggingOverWindow: y,
|
|
1211
|
+
uploadError: w,
|
|
1212
|
+
handleDragEnter: De,
|
|
1213
|
+
handleDragLeave: B,
|
|
1214
|
+
handleDragOver: te,
|
|
1215
|
+
handleDrop: me,
|
|
1216
|
+
clearError: Ye,
|
|
1217
|
+
handleUpload: he,
|
|
1218
|
+
openFileDialog: _e,
|
|
1208
1219
|
openArchiveDialog: Me,
|
|
1209
1220
|
fileInputRef: m,
|
|
1210
1221
|
uploadConflictingFiles: L,
|
|
1211
1222
|
uploadConflictResolutionOpen: W,
|
|
1212
1223
|
hasActiveUploadConflictRef: M,
|
|
1213
|
-
openUploadConflictResolution:
|
|
1214
|
-
closeUploadConflictResolution:
|
|
1215
|
-
handleUploadConflictReplace:
|
|
1216
|
-
handleUploadConflictDuplicate:
|
|
1217
|
-
handleUploadConflictCancel:
|
|
1218
|
-
handleUploadConflictDecideForEach:
|
|
1224
|
+
openUploadConflictResolution: O,
|
|
1225
|
+
closeUploadConflictResolution: xe,
|
|
1226
|
+
handleUploadConflictReplace: pe,
|
|
1227
|
+
handleUploadConflictDuplicate: Fe,
|
|
1228
|
+
handleUploadConflictCancel: be,
|
|
1229
|
+
handleUploadConflictDecideForEach: H
|
|
1219
1230
|
};
|
|
1220
1231
|
}, Ra = hs(void 0), Fa = {
|
|
1221
1232
|
hiddenItemWarning: `${So.Warning}__A dot at the start of the name will make the item hidden`
|
|
@@ -1250,28 +1261,28 @@ const Sr = ({
|
|
|
1250
1261
|
validationMessages: r,
|
|
1251
1262
|
onMoveToFiles: o
|
|
1252
1263
|
}) => {
|
|
1253
|
-
const [n, s] = _(), l =
|
|
1264
|
+
const [n, s] = _(), l = j(
|
|
1254
1265
|
() => ({
|
|
1255
1266
|
...Ir,
|
|
1256
1267
|
...r
|
|
1257
1268
|
}),
|
|
1258
1269
|
[r]
|
|
1259
|
-
), i =
|
|
1260
|
-
(
|
|
1261
|
-
const g =
|
|
1270
|
+
), i = j(() => n?.path, [n]), p = d(
|
|
1271
|
+
(w) => {
|
|
1272
|
+
const g = qe(e, w);
|
|
1262
1273
|
g && s(g);
|
|
1263
1274
|
},
|
|
1264
1275
|
[e]
|
|
1265
1276
|
), C = d(() => {
|
|
1266
1277
|
s(void 0);
|
|
1267
1278
|
}, []), c = d(
|
|
1268
|
-
(
|
|
1279
|
+
(w) => {
|
|
1269
1280
|
if (!n || !o) {
|
|
1270
1281
|
s(void 0);
|
|
1271
1282
|
return;
|
|
1272
1283
|
}
|
|
1273
1284
|
const g = n.nodeType === k.ITEM;
|
|
1274
|
-
let m =
|
|
1285
|
+
let m = w.trim();
|
|
1275
1286
|
if (g) {
|
|
1276
1287
|
const f = da(n.name);
|
|
1277
1288
|
f && !m.endsWith(f) && (m = m + f);
|
|
@@ -1296,9 +1307,9 @@ const Sr = ({
|
|
|
1296
1307
|
o([h], D, D), s(void 0);
|
|
1297
1308
|
},
|
|
1298
1309
|
[n, o]
|
|
1299
|
-
),
|
|
1300
|
-
(
|
|
1301
|
-
const m =
|
|
1310
|
+
), y = d(
|
|
1311
|
+
(w, g) => {
|
|
1312
|
+
const m = w.trim();
|
|
1302
1313
|
if (!m)
|
|
1303
1314
|
return l.emptyName;
|
|
1304
1315
|
if (m.includes(".."))
|
|
@@ -1313,9 +1324,9 @@ const Sr = ({
|
|
|
1313
1324
|
}
|
|
1314
1325
|
const h = g.parentPath;
|
|
1315
1326
|
if (h) {
|
|
1316
|
-
const f =
|
|
1327
|
+
const f = qe(e, h);
|
|
1317
1328
|
if (f && new Set(
|
|
1318
|
-
(f.items ?? []).filter((
|
|
1329
|
+
(f.items ?? []).filter((v) => v.path !== g.path).map((v) => v.name.toLowerCase())
|
|
1319
1330
|
).has(D.toLowerCase()))
|
|
1320
1331
|
return l.duplicateName;
|
|
1321
1332
|
}
|
|
@@ -1327,21 +1338,21 @@ const Sr = ({
|
|
|
1327
1338
|
return null;
|
|
1328
1339
|
},
|
|
1329
1340
|
[t, l, e]
|
|
1330
|
-
), u = d((
|
|
1341
|
+
), u = d((w) => w.nodeType === k.ITEM ? Er(w.name) : w.name, []);
|
|
1331
1342
|
return {
|
|
1332
1343
|
renamedPath: i,
|
|
1333
1344
|
renamedItem: n,
|
|
1334
1345
|
renameHandler: p,
|
|
1335
1346
|
renameSaveHandler: c,
|
|
1336
1347
|
renameCancelHandler: C,
|
|
1337
|
-
renameValidateHandler:
|
|
1348
|
+
renameValidateHandler: y,
|
|
1338
1349
|
getDisplayName: u
|
|
1339
1350
|
};
|
|
1340
1351
|
}, Sa = (e) => {
|
|
1341
|
-
const [t, r] = _(e?.expandedPaths ?? /* @__PURE__ */ new Set()), o =
|
|
1352
|
+
const [t, r] = _(e?.expandedPaths ?? /* @__PURE__ */ new Set()), o = j(
|
|
1342
1353
|
() => !!e?.onExpandedPathsChange,
|
|
1343
1354
|
[e?.onExpandedPathsChange]
|
|
1344
|
-
), n =
|
|
1355
|
+
), n = j(
|
|
1345
1356
|
() => o ? e?.expandedPaths ?? /* @__PURE__ */ new Set() : t,
|
|
1346
1357
|
[o, e?.expandedPaths, t]
|
|
1347
1358
|
);
|
|
@@ -1355,22 +1366,22 @@ const Sr = ({
|
|
|
1355
1366
|
[o, e]
|
|
1356
1367
|
), l = d(
|
|
1357
1368
|
(c) => {
|
|
1358
|
-
const
|
|
1359
|
-
|
|
1369
|
+
const y = new Set(n);
|
|
1370
|
+
y.has(c) ? y.delete(c) : y.add(c), s(y);
|
|
1360
1371
|
},
|
|
1361
1372
|
[n, s]
|
|
1362
1373
|
), i = d(() => {
|
|
1363
1374
|
s(/* @__PURE__ */ new Set());
|
|
1364
1375
|
}, [s]), p = d(
|
|
1365
1376
|
(c) => {
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1377
|
+
const y = new Set(n);
|
|
1378
|
+
y.add(c), s(y);
|
|
1368
1379
|
},
|
|
1369
1380
|
[n, s]
|
|
1370
1381
|
), C = d(
|
|
1371
1382
|
(c) => {
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1383
|
+
const y = new Set(n);
|
|
1384
|
+
y.delete(c), s(y);
|
|
1374
1385
|
},
|
|
1375
1386
|
[n, s]
|
|
1376
1387
|
);
|
|
@@ -1392,7 +1403,7 @@ const Sr = ({
|
|
|
1392
1403
|
onCreateNewItem: s,
|
|
1393
1404
|
isNewButtonDisabled: l
|
|
1394
1405
|
}) => {
|
|
1395
|
-
const i =
|
|
1406
|
+
const i = j(() => {
|
|
1396
1407
|
const c = [];
|
|
1397
1408
|
return e && (e.newFolder && c.push({
|
|
1398
1409
|
key: "new-folder",
|
|
@@ -1441,10 +1452,10 @@ const Sr = ({
|
|
|
1441
1452
|
r,
|
|
1442
1453
|
n,
|
|
1443
1454
|
s
|
|
1444
|
-
]), p =
|
|
1455
|
+
]), p = j(
|
|
1445
1456
|
() => i?.length > 0,
|
|
1446
1457
|
[i]
|
|
1447
|
-
), C =
|
|
1458
|
+
), C = j(
|
|
1448
1459
|
() => !t?.permissions?.includes(St.WRITE) || !!l,
|
|
1449
1460
|
[t, l]
|
|
1450
1461
|
);
|
|
@@ -1466,30 +1477,30 @@ const Sr = ({
|
|
|
1466
1477
|
items: n = []
|
|
1467
1478
|
}) => {
|
|
1468
1479
|
const [s, l] = _(!1), [i, p] = _(null), [C, c] = _(
|
|
1469
|
-
|
|
1470
|
-
), [
|
|
1480
|
+
Be.Folder
|
|
1481
|
+
), [y, u] = _(null), [w, g] = _(
|
|
1471
1482
|
null
|
|
1472
|
-
), [m, T] = _(""), D = de(e?.path), h =
|
|
1483
|
+
), [m, T] = _(""), D = de(e?.path), h = j(
|
|
1473
1484
|
() => ({
|
|
1474
1485
|
...Pr,
|
|
1475
1486
|
...o
|
|
1476
1487
|
}),
|
|
1477
1488
|
[o]
|
|
1478
|
-
), f =
|
|
1479
|
-
if (C ===
|
|
1489
|
+
), f = j(() => {
|
|
1490
|
+
if (C === Be.Folder)
|
|
1480
1491
|
return e;
|
|
1481
|
-
if (C ===
|
|
1482
|
-
const P = Ft(n,
|
|
1492
|
+
if (C === Be.Sibling && y) {
|
|
1493
|
+
const P = Ft(n, y.parentPath || "");
|
|
1483
1494
|
return {
|
|
1484
|
-
path:
|
|
1495
|
+
path: y.parentPath,
|
|
1485
1496
|
items: P?.items || [],
|
|
1486
1497
|
nodeType: k.FOLDER,
|
|
1487
|
-
name:
|
|
1498
|
+
name: y?.parentPath?.split("/")?.pop() || "",
|
|
1488
1499
|
folderId: ""
|
|
1489
1500
|
};
|
|
1490
1501
|
}
|
|
1491
|
-
return C ===
|
|
1492
|
-
}, [C,
|
|
1502
|
+
return C === Be.Child ? y : e;
|
|
1503
|
+
}, [C, y, e, n]);
|
|
1493
1504
|
fe(() => {
|
|
1494
1505
|
const P = f?.path;
|
|
1495
1506
|
D.current !== P && s && (l(!1), p(null), T("")), D.current = P;
|
|
@@ -1499,36 +1510,36 @@ const Sr = ({
|
|
|
1499
1510
|
D.current = e?.path || "/";
|
|
1500
1511
|
const P = `__new_folder_${Date.now()}`, z = (e?.items ?? []).filter(
|
|
1501
1512
|
(O) => O.nodeType === k.FOLDER
|
|
1502
|
-
),
|
|
1503
|
-
p(P), T(
|
|
1504
|
-
}, [s, e]),
|
|
1513
|
+
), G = Yt(z);
|
|
1514
|
+
p(P), T(G), l(!0), c(Be.Folder), u(e || null);
|
|
1515
|
+
}, [s, e]), v = d(
|
|
1505
1516
|
(P) => {
|
|
1506
1517
|
if (s) return;
|
|
1507
1518
|
D.current = P?.parentPath || "/";
|
|
1508
1519
|
const z = `__new_folder_${Date.now()}`, O = (Ft(n, P?.parentPath || "/")?.items ?? []).filter(
|
|
1509
1520
|
(oe) => oe.nodeType === k.FOLDER
|
|
1510
|
-
),
|
|
1511
|
-
T(
|
|
1521
|
+
), K = Yt(O);
|
|
1522
|
+
T(K), p(z), l(!0), c(Be.Sibling), u(P), g(P?.parentPath || "/");
|
|
1512
1523
|
},
|
|
1513
1524
|
[s, n]
|
|
1514
1525
|
), I = d(
|
|
1515
1526
|
(P) => {
|
|
1516
1527
|
if (s) return;
|
|
1517
1528
|
D.current = P.path;
|
|
1518
|
-
const z = `__new_folder_${Date.now()}`,
|
|
1519
|
-
(
|
|
1520
|
-
), O = Yt(
|
|
1521
|
-
T(O), p(z), l(!0), c(
|
|
1529
|
+
const z = `__new_folder_${Date.now()}`, G = (P?.items ?? []).filter(
|
|
1530
|
+
(K) => K.nodeType === k.FOLDER
|
|
1531
|
+
), O = Yt(G);
|
|
1532
|
+
T(O), p(z), l(!0), c(Be.Child), u(P), g(P?.path || "/");
|
|
1522
1533
|
},
|
|
1523
1534
|
[s]
|
|
1524
1535
|
), R = d(
|
|
1525
1536
|
(P) => {
|
|
1526
1537
|
if (s) return;
|
|
1527
1538
|
D.current = P?.parentPath || "/";
|
|
1528
|
-
const
|
|
1529
|
-
(
|
|
1530
|
-
), O = Yt(
|
|
1531
|
-
T(O), c(
|
|
1539
|
+
const G = (Ft(n, P?.parentPath || "/")?.items ?? []).filter(
|
|
1540
|
+
(K) => K.nodeType === k.FOLDER
|
|
1541
|
+
), O = Yt(G);
|
|
1542
|
+
T(O), c(Be.Sibling), u(P), g(P?.parentPath || "/"), l(!0);
|
|
1532
1543
|
},
|
|
1533
1544
|
[s, n]
|
|
1534
1545
|
), S = d(
|
|
@@ -1537,12 +1548,12 @@ const Sr = ({
|
|
|
1537
1548
|
D.current = P.path;
|
|
1538
1549
|
const z = (P?.items ?? []).filter(
|
|
1539
1550
|
(O) => O.nodeType === k.FOLDER
|
|
1540
|
-
),
|
|
1541
|
-
T(
|
|
1551
|
+
), G = Yt(z);
|
|
1552
|
+
T(G), c(Be.Child), u(P), g(P?.path || "/"), l(!0);
|
|
1542
1553
|
},
|
|
1543
1554
|
[s]
|
|
1544
1555
|
), L = d(() => {
|
|
1545
|
-
l(!1), p(null), c(
|
|
1556
|
+
l(!1), p(null), c(Be.Folder), u(null), g(null), D.current = void 0, T("");
|
|
1546
1557
|
}, []), W = d(
|
|
1547
1558
|
(P) => {
|
|
1548
1559
|
const z = P.trim();
|
|
@@ -1557,9 +1568,9 @@ const Sr = ({
|
|
|
1557
1568
|
).has(z.toLowerCase()))
|
|
1558
1569
|
return h.duplicateName;
|
|
1559
1570
|
if (r && f) {
|
|
1560
|
-
const
|
|
1561
|
-
if (
|
|
1562
|
-
return
|
|
1571
|
+
const G = r(z, f);
|
|
1572
|
+
if (G)
|
|
1573
|
+
return G;
|
|
1563
1574
|
}
|
|
1564
1575
|
return null;
|
|
1565
1576
|
},
|
|
@@ -1570,23 +1581,23 @@ const Sr = ({
|
|
|
1570
1581
|
if (!z)
|
|
1571
1582
|
return;
|
|
1572
1583
|
L();
|
|
1573
|
-
const O = `${f?.path ?? "/"}/${z}`,
|
|
1584
|
+
const O = `${f?.path ?? "/"}/${z}`, K = `${O}/${Ro}`, V = {
|
|
1574
1585
|
fileContent: new File([], Ro, {
|
|
1575
1586
|
type: "text/plain"
|
|
1576
1587
|
}),
|
|
1577
1588
|
name: Ro
|
|
1578
1589
|
};
|
|
1579
|
-
t && await t(
|
|
1590
|
+
t && await t(V, O, K);
|
|
1580
1591
|
},
|
|
1581
1592
|
[f, t, L]
|
|
1582
1593
|
);
|
|
1583
1594
|
return {
|
|
1584
1595
|
isCreatingFolder: s,
|
|
1585
|
-
createdFolderPath:
|
|
1596
|
+
createdFolderPath: w,
|
|
1586
1597
|
newFolderTempId: i,
|
|
1587
1598
|
newFolderDefaultName: m,
|
|
1588
1599
|
startFolderCreation: F,
|
|
1589
|
-
startGridSiblingFolderCreation:
|
|
1600
|
+
startGridSiblingFolderCreation: v,
|
|
1590
1601
|
startTreeSiblingFolderCreation: R,
|
|
1591
1602
|
startGridChildFolderCreation: I,
|
|
1592
1603
|
startTreeChildFolderCreation: S,
|
|
@@ -1601,7 +1612,7 @@ const Sr = ({
|
|
|
1601
1612
|
}) => {
|
|
1602
1613
|
const o = t === 0;
|
|
1603
1614
|
return {
|
|
1604
|
-
additionalButtons:
|
|
1615
|
+
additionalButtons: j(() => /* @__PURE__ */ X(Ae, { children: [
|
|
1605
1616
|
e,
|
|
1606
1617
|
/* @__PURE__ */ a(
|
|
1607
1618
|
pt,
|
|
@@ -1660,7 +1671,7 @@ function _r({
|
|
|
1660
1671
|
allItems: i = [],
|
|
1661
1672
|
activeTab: p
|
|
1662
1673
|
}) {
|
|
1663
|
-
const [C, c] = _(""),
|
|
1674
|
+
const [C, c] = _(""), y = de(!1), u = de(!1), w = de([]), g = de(r), m = de(p);
|
|
1664
1675
|
fe(() => {
|
|
1665
1676
|
s != null && c(String(s));
|
|
1666
1677
|
}, [s]);
|
|
@@ -1670,14 +1681,14 @@ function _r({
|
|
|
1670
1681
|
(I) => {
|
|
1671
1682
|
const R = I.trim();
|
|
1672
1683
|
if (!R) {
|
|
1673
|
-
u.current = !1,
|
|
1684
|
+
u.current = !1, y.current = !1;
|
|
1674
1685
|
return;
|
|
1675
1686
|
}
|
|
1676
|
-
u.current = !0, e && r && !
|
|
1687
|
+
u.current = !0, e && r && !y.current && (y.current = !0, e(r, R));
|
|
1677
1688
|
},
|
|
1678
1689
|
[e, r]
|
|
1679
1690
|
), f = d(() => {
|
|
1680
|
-
|
|
1691
|
+
y.current = !1, u.current = !1, w.current = [], c(""), l?.(""), t?.();
|
|
1681
1692
|
}, [t, l]), F = d(
|
|
1682
1693
|
(I) => {
|
|
1683
1694
|
const R = String(I ?? "");
|
|
@@ -1686,18 +1697,18 @@ function _r({
|
|
|
1686
1697
|
[l, h, f]
|
|
1687
1698
|
);
|
|
1688
1699
|
fe(() => {
|
|
1689
|
-
(g.current !== r || m.current !== p) && (g.current = r, m.current = p,
|
|
1700
|
+
(g.current !== r || m.current !== p) && (g.current = r, m.current = p, y.current = !1, u.current = !1, w.current = [], c(""), l?.(""), t?.());
|
|
1690
1701
|
}, [
|
|
1691
1702
|
r,
|
|
1692
1703
|
p,
|
|
1693
1704
|
l,
|
|
1694
1705
|
t
|
|
1695
1706
|
]), fe(() => {
|
|
1696
|
-
n || (
|
|
1707
|
+
n || (w.current = o);
|
|
1697
1708
|
}, [o, n]);
|
|
1698
|
-
const
|
|
1709
|
+
const v = j(() => {
|
|
1699
1710
|
if (e) {
|
|
1700
|
-
const R = n ?
|
|
1711
|
+
const R = n ? w.current : o;
|
|
1701
1712
|
return !T || R.length === 0 ? R : ua(R, T);
|
|
1702
1713
|
}
|
|
1703
1714
|
if (!T || !i.length)
|
|
@@ -1719,7 +1730,7 @@ function _r({
|
|
|
1719
1730
|
handleSearchChange: F,
|
|
1720
1731
|
handleSearchActivate: h,
|
|
1721
1732
|
handleSearchClear: f,
|
|
1722
|
-
searchResultsRows:
|
|
1733
|
+
searchResultsRows: v
|
|
1723
1734
|
};
|
|
1724
1735
|
}
|
|
1725
1736
|
function zr({
|
|
@@ -1727,7 +1738,7 @@ function zr({
|
|
|
1727
1738
|
defaultSelectedPaths: t,
|
|
1728
1739
|
onSelectedPathsChange: r
|
|
1729
1740
|
}) {
|
|
1730
|
-
const o = e !== void 0, [n, s] = _(() => t ?? /* @__PURE__ */ new Set()), l =
|
|
1741
|
+
const o = e !== void 0, [n, s] = _(() => t ?? /* @__PURE__ */ new Set()), l = j(
|
|
1731
1742
|
() => o ? e : n,
|
|
1732
1743
|
[o, e, n]
|
|
1733
1744
|
), i = d(
|
|
@@ -1758,9 +1769,9 @@ const Wr = ({
|
|
|
1758
1769
|
selectedPaths: p,
|
|
1759
1770
|
defaultSelectedPaths: C,
|
|
1760
1771
|
onSelectedPathsChange: c,
|
|
1761
|
-
showHiddenFiles:
|
|
1772
|
+
showHiddenFiles: y,
|
|
1762
1773
|
onShowHiddenFilesChange: u,
|
|
1763
|
-
treeOptions:
|
|
1774
|
+
treeOptions: w,
|
|
1764
1775
|
showNavigationPanel: g = !0,
|
|
1765
1776
|
navigationPanelOptions: m,
|
|
1766
1777
|
deleteConfirmationOptions: T,
|
|
@@ -1768,7 +1779,7 @@ const Wr = ({
|
|
|
1768
1779
|
toolbarOptions: h,
|
|
1769
1780
|
bulkActionsToolbarOptions: f,
|
|
1770
1781
|
destinationFolderPopupOptions: F,
|
|
1771
|
-
conflictResolutionPopupOptions:
|
|
1782
|
+
conflictResolutionPopupOptions: v,
|
|
1772
1783
|
onPathChange: I,
|
|
1773
1784
|
onTableFileClick: R,
|
|
1774
1785
|
handleSelectionClick: S,
|
|
@@ -1777,39 +1788,39 @@ const Wr = ({
|
|
|
1777
1788
|
onMoveToFiles: M,
|
|
1778
1789
|
onDeleteFiles: P,
|
|
1779
1790
|
onDownloadFiles: z,
|
|
1780
|
-
onRenameValidate:
|
|
1791
|
+
onRenameValidate: G,
|
|
1781
1792
|
renameValidationMessages: O,
|
|
1782
|
-
forbiddenSymbolsRegExp:
|
|
1793
|
+
forbiddenSymbolsRegExp: K = gs,
|
|
1783
1794
|
forbiddenSymbolsTooltip: oe,
|
|
1784
|
-
onUploadFiles:
|
|
1795
|
+
onUploadFiles: V,
|
|
1785
1796
|
onValidateUpload: Z,
|
|
1786
1797
|
uploadEnabled: ie,
|
|
1787
|
-
uploadValidationMessages:
|
|
1788
|
-
maxFileSize:
|
|
1789
|
-
onUploadArchive:
|
|
1790
|
-
prepareUploadFileName:
|
|
1791
|
-
onCreateFolder:
|
|
1798
|
+
uploadValidationMessages: Re,
|
|
1799
|
+
maxFileSize: he,
|
|
1800
|
+
onUploadArchive: pe,
|
|
1801
|
+
prepareUploadFileName: Fe,
|
|
1802
|
+
onCreateFolder: be,
|
|
1792
1803
|
onCreateFolderValidate: H,
|
|
1793
|
-
folderCreationValidationMessages:
|
|
1794
|
-
fileMetadataPopupOptions:
|
|
1795
|
-
onGetInfo:
|
|
1804
|
+
folderCreationValidationMessages: xe,
|
|
1805
|
+
fileMetadataPopupOptions: De,
|
|
1806
|
+
onGetInfo: B,
|
|
1796
1807
|
onUnshareFiles: te,
|
|
1797
|
-
onRemoveFilesAccess:
|
|
1798
|
-
actionsRef:
|
|
1799
|
-
sharedByMePaths:
|
|
1800
|
-
onSearchFiles:
|
|
1801
|
-
searchResults:
|
|
1802
|
-
searchInProgress:
|
|
1803
|
-
clearSearchResults:
|
|
1804
|
-
allowedFileTypes:
|
|
1805
|
-
maxSelectableFileSize:
|
|
1806
|
-
getDisabledTooltip:
|
|
1807
|
-
fileTooLargeTooltip:
|
|
1808
|
-
unsupportedFileTypeTooltip:
|
|
1809
|
-
emptyStateIcon:
|
|
1810
|
-
emptyStateTitle:
|
|
1811
|
-
emptyStateDescription:
|
|
1812
|
-
sharedWithMeIds:
|
|
1808
|
+
onRemoveFilesAccess: me,
|
|
1809
|
+
actionsRef: Le,
|
|
1810
|
+
sharedByMePaths: _e,
|
|
1811
|
+
onSearchFiles: Me,
|
|
1812
|
+
searchResults: Ye,
|
|
1813
|
+
searchInProgress: x,
|
|
1814
|
+
clearSearchResults: $,
|
|
1815
|
+
allowedFileTypes: U,
|
|
1816
|
+
maxSelectableFileSize: q,
|
|
1817
|
+
getDisabledTooltip: J,
|
|
1818
|
+
fileTooLargeTooltip: Ce,
|
|
1819
|
+
unsupportedFileTypeTooltip: Ie,
|
|
1820
|
+
emptyStateIcon: Te,
|
|
1821
|
+
emptyStateTitle: ye,
|
|
1822
|
+
emptyStateDescription: ae,
|
|
1823
|
+
sharedWithMeIds: Ee,
|
|
1813
1824
|
onFolderPopupPathChange: ft,
|
|
1814
1825
|
onManagePermissions: cn,
|
|
1815
1826
|
onPreview: rt,
|
|
@@ -1828,14 +1839,14 @@ const Wr = ({
|
|
|
1828
1839
|
hideSearchPathItemName: Qe,
|
|
1829
1840
|
showHiddenFileSwitcherInDestinationPopup: gt,
|
|
1830
1841
|
showCreateFolderButtonInDestinationPopup: mn,
|
|
1831
|
-
autoSelectUploadedItems:
|
|
1832
|
-
maxNewFolderDepth:
|
|
1842
|
+
autoSelectUploadedItems: $e = !1,
|
|
1843
|
+
maxNewFolderDepth: we,
|
|
1833
1844
|
onNewFolderDepthExceeded: Pt,
|
|
1834
1845
|
initialUploadFilesOpen: Cn
|
|
1835
1846
|
}) => {
|
|
1836
1847
|
const {
|
|
1837
|
-
selectedPaths:
|
|
1838
|
-
clearSelection:
|
|
1848
|
+
selectedPaths: je,
|
|
1849
|
+
clearSelection: Ze,
|
|
1839
1850
|
setSelectedPaths: it
|
|
1840
1851
|
} = zr({
|
|
1841
1852
|
selectedPaths: p,
|
|
@@ -1843,60 +1854,60 @@ const Wr = ({
|
|
|
1843
1854
|
onSelectedPathsChange: c
|
|
1844
1855
|
}), gn = de(!1), Je = de(null), Jn = d(
|
|
1845
1856
|
(E, Q, ne) => {
|
|
1846
|
-
if (
|
|
1847
|
-
const { parent:
|
|
1857
|
+
if ($e) {
|
|
1858
|
+
const { parent: Ke, name: Io } = hr(Q);
|
|
1848
1859
|
Je.current = {
|
|
1849
1860
|
fileNames: /* @__PURE__ */ new Set([Io]),
|
|
1850
|
-
destinationFolder:
|
|
1861
|
+
destinationFolder: Ke
|
|
1851
1862
|
};
|
|
1852
1863
|
}
|
|
1853
|
-
|
|
1864
|
+
be?.(E, Q, ne);
|
|
1854
1865
|
},
|
|
1855
|
-
[
|
|
1866
|
+
[be, $e]
|
|
1856
1867
|
), eo = d(
|
|
1857
1868
|
(E, Q) => {
|
|
1858
|
-
|
|
1869
|
+
$e && (Je.current = {
|
|
1859
1870
|
fileNames: new Set(E.map((ne) => ne.name)),
|
|
1860
1871
|
destinationFolder: Q
|
|
1861
|
-
}),
|
|
1872
|
+
}), V?.(E, Q);
|
|
1862
1873
|
},
|
|
1863
|
-
[
|
|
1874
|
+
[V, $e]
|
|
1864
1875
|
), to = d(
|
|
1865
1876
|
(E, Q, ne) => {
|
|
1866
|
-
|
|
1877
|
+
$e && (Je.current = {
|
|
1867
1878
|
fileNames: /* @__PURE__ */ new Set([Q]),
|
|
1868
1879
|
destinationFolder: ne
|
|
1869
|
-
}),
|
|
1880
|
+
}), pe?.(E, Q, ne);
|
|
1870
1881
|
},
|
|
1871
|
-
[
|
|
1872
|
-
), no =
|
|
1882
|
+
[pe, $e]
|
|
1883
|
+
), no = j(() => {
|
|
1873
1884
|
const E = /* @__PURE__ */ new Map();
|
|
1874
|
-
return
|
|
1875
|
-
const ne =
|
|
1885
|
+
return je.forEach((Q) => {
|
|
1886
|
+
const ne = qe(o, Q);
|
|
1876
1887
|
ne && E.set(Q, ne);
|
|
1877
1888
|
}), E;
|
|
1878
|
-
}, [
|
|
1889
|
+
}, [je, o]);
|
|
1879
1890
|
fe(() => {
|
|
1880
|
-
if (
|
|
1891
|
+
if (je.size === 0) return;
|
|
1881
1892
|
let E = !1;
|
|
1882
|
-
for (const Q of
|
|
1883
|
-
if (!
|
|
1893
|
+
for (const Q of je)
|
|
1894
|
+
if (!qe(o, Q)) {
|
|
1884
1895
|
E = !0;
|
|
1885
1896
|
break;
|
|
1886
1897
|
}
|
|
1887
1898
|
if (E) {
|
|
1888
1899
|
const Q = /* @__PURE__ */ new Set();
|
|
1889
|
-
for (const ne of
|
|
1890
|
-
|
|
1900
|
+
for (const ne of je)
|
|
1901
|
+
qe(o, ne) && Q.add(ne);
|
|
1891
1902
|
it(Q);
|
|
1892
1903
|
}
|
|
1893
|
-
}, [o,
|
|
1894
|
-
const { currentPath: ue, setCurrentPath:
|
|
1904
|
+
}, [o, je, it]);
|
|
1905
|
+
const { currentPath: ue, setCurrentPath: Pe, handlePathChange: Xe } = Nr({
|
|
1895
1906
|
path: s,
|
|
1896
1907
|
defaultPath: l,
|
|
1897
1908
|
onPathChange: I,
|
|
1898
|
-
onSelectionClear:
|
|
1899
|
-
}), Ot =
|
|
1909
|
+
onSelectionClear: Ze
|
|
1910
|
+
}), Ot = j(() => {
|
|
1900
1911
|
const {
|
|
1901
1912
|
showFiles: E = !0,
|
|
1902
1913
|
showFolders: Q = !0,
|
|
@@ -1909,11 +1920,11 @@ const Wr = ({
|
|
|
1909
1920
|
},
|
|
1910
1921
|
[F]
|
|
1911
1922
|
), { areHiddenFilesVisible: lt, toggleHiddenFilesVisibility: yn } = vr({
|
|
1912
|
-
showHiddenFiles:
|
|
1923
|
+
showHiddenFiles: y,
|
|
1913
1924
|
onShowHiddenFilesChange: u
|
|
1914
1925
|
}), { isTreeCollapsed: wn, toggleTreeCollapse: yt, setIsTreeCollapsed: ao } = yr({
|
|
1915
|
-
collapsed:
|
|
1916
|
-
onCollapseChange:
|
|
1926
|
+
collapsed: w?.collapsed,
|
|
1927
|
+
onCollapseChange: w?.onCollapseChange
|
|
1917
1928
|
}), {
|
|
1918
1929
|
renamedPath: wt,
|
|
1919
1930
|
renamedItem: so,
|
|
@@ -1924,7 +1935,7 @@ const Wr = ({
|
|
|
1924
1935
|
getDisplayName: kt
|
|
1925
1936
|
} = Sr({
|
|
1926
1937
|
items: o,
|
|
1927
|
-
onRenameValidate:
|
|
1938
|
+
onRenameValidate: G,
|
|
1928
1939
|
validationMessages: O,
|
|
1929
1940
|
onMoveToFiles: M
|
|
1930
1941
|
}), {
|
|
@@ -1936,22 +1947,22 @@ const Wr = ({
|
|
|
1936
1947
|
handleSearchClear: ce,
|
|
1937
1948
|
searchResultsRows: bn
|
|
1938
1949
|
} = _r({
|
|
1939
|
-
onSearchFiles:
|
|
1940
|
-
clearSearchResults:
|
|
1950
|
+
onSearchFiles: Me,
|
|
1951
|
+
clearSearchResults: $,
|
|
1941
1952
|
currentPath: ue,
|
|
1942
|
-
searchResults:
|
|
1943
|
-
searchInProgress:
|
|
1953
|
+
searchResults: Ye,
|
|
1954
|
+
searchInProgress: x,
|
|
1944
1955
|
navigationPanelValue: m?.value,
|
|
1945
1956
|
onNavigationPanelSearchChange: m?.onSearchChange,
|
|
1946
1957
|
allItems: o,
|
|
1947
1958
|
activeTab: h?.activeTab
|
|
1948
|
-
}), se =
|
|
1959
|
+
}), se = j(
|
|
1949
1960
|
() => Ft(o, ue) ?? o[0],
|
|
1950
1961
|
[o, ue]
|
|
1951
|
-
),
|
|
1962
|
+
), ze = d(
|
|
1952
1963
|
(E, Q) => !Q || !E ? !1 : gr(E.path) > Q,
|
|
1953
1964
|
[]
|
|
1954
|
-
),
|
|
1965
|
+
), ke = d(() => {
|
|
1955
1966
|
Pt?.();
|
|
1956
1967
|
}, [Pt]), {
|
|
1957
1968
|
handleCopyTo: Dn,
|
|
@@ -1976,9 +1987,9 @@ const Wr = ({
|
|
|
1976
1987
|
getDestinationFiles: (E) => Ft(o, E)?.items ?? [],
|
|
1977
1988
|
onCopyFiles: W,
|
|
1978
1989
|
onMoveToFiles: M,
|
|
1979
|
-
onCopySuccess:
|
|
1980
|
-
onMoveSuccess:
|
|
1981
|
-
onDuplicateSuccess:
|
|
1990
|
+
onCopySuccess: Ze,
|
|
1991
|
+
onMoveSuccess: Ze,
|
|
1992
|
+
onDuplicateSuccess: Ze,
|
|
1982
1993
|
getCopyHeader: F?.getCopyHeader,
|
|
1983
1994
|
getMoveHeader: F?.getMoveHeader
|
|
1984
1995
|
});
|
|
@@ -1993,14 +2004,14 @@ const Wr = ({
|
|
|
1993
2004
|
confirmDelete: Dt
|
|
1994
2005
|
} = br({
|
|
1995
2006
|
onDeleteFiles: P,
|
|
1996
|
-
onDeleteSuccess:
|
|
2007
|
+
onDeleteSuccess: Ze
|
|
1997
2008
|
}), { handleDownloadFiles: ot } = Dr({
|
|
1998
2009
|
onDownloadFiles: z,
|
|
1999
2010
|
customDownloadItemsAction: un,
|
|
2000
|
-
onDownloadSuccess:
|
|
2011
|
+
onDownloadSuccess: Ze
|
|
2001
2012
|
}), {
|
|
2002
2013
|
isDragging: yo,
|
|
2003
|
-
isDraggingOverWindow:
|
|
2014
|
+
isDraggingOverWindow: We,
|
|
2004
2015
|
uploadError: wo,
|
|
2005
2016
|
handleDragEnter: Ht,
|
|
2006
2017
|
handleDragLeave: Tt,
|
|
@@ -2020,11 +2031,11 @@ const Wr = ({
|
|
|
2020
2031
|
} = xr({
|
|
2021
2032
|
onUploadFiles: eo,
|
|
2022
2033
|
onValidateUpload: Z,
|
|
2023
|
-
maxFileSize:
|
|
2034
|
+
maxFileSize: he,
|
|
2024
2035
|
onUploadArchive: to,
|
|
2025
|
-
prepareUploadFileName:
|
|
2026
|
-
allowedFileTypes:
|
|
2027
|
-
validationMessages:
|
|
2036
|
+
prepareUploadFileName: Fe,
|
|
2037
|
+
allowedFileTypes: U,
|
|
2038
|
+
validationMessages: Re,
|
|
2028
2039
|
uploadEnabled: ie,
|
|
2029
2040
|
currentFolder: se
|
|
2030
2041
|
}), _n = d(
|
|
@@ -2060,7 +2071,7 @@ const Wr = ({
|
|
|
2060
2071
|
isCreatingFolder: b,
|
|
2061
2072
|
newFolderTempId: ee,
|
|
2062
2073
|
createdFolderPath: le,
|
|
2063
|
-
newFolderDefaultName:
|
|
2074
|
+
newFolderDefaultName: Se,
|
|
2064
2075
|
startFolderCreation: at,
|
|
2065
2076
|
startGridSiblingFolderCreation: Zo,
|
|
2066
2077
|
startTreeSiblingFolderCreation: Xo,
|
|
@@ -2073,11 +2084,11 @@ const Wr = ({
|
|
|
2073
2084
|
currentFolder: se,
|
|
2074
2085
|
onCreateFolder: Jn,
|
|
2075
2086
|
onValidateFolderName: H,
|
|
2076
|
-
validationMessages:
|
|
2087
|
+
validationMessages: xe,
|
|
2077
2088
|
items: o
|
|
2078
2089
|
}), Yo = d(() => {
|
|
2079
|
-
if (
|
|
2080
|
-
|
|
2090
|
+
if (we && ze(se, we - 1)) {
|
|
2091
|
+
ke();
|
|
2081
2092
|
return;
|
|
2082
2093
|
}
|
|
2083
2094
|
ce(), at();
|
|
@@ -2085,9 +2096,9 @@ const Wr = ({
|
|
|
2085
2096
|
ce,
|
|
2086
2097
|
at,
|
|
2087
2098
|
se,
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2099
|
+
we,
|
|
2100
|
+
ze,
|
|
2101
|
+
ke
|
|
2091
2102
|
]), { newActions: Ma, isNewButtonVisible: ka, isNewButtonDisabled: La } = Ar(
|
|
2092
2103
|
{
|
|
2093
2104
|
newActions: h?.newActions,
|
|
@@ -2098,7 +2109,7 @@ const Wr = ({
|
|
|
2098
2109
|
onCreateNewItem: Hn,
|
|
2099
2110
|
isNewButtonDisabled: h?.isNewButtonDisabled
|
|
2100
2111
|
}
|
|
2101
|
-
), _a =
|
|
2112
|
+
), _a = j(() => {
|
|
2102
2113
|
if (Nt) {
|
|
2103
2114
|
let Y = bn;
|
|
2104
2115
|
Mt || (Y = Y.filter(
|
|
@@ -2123,7 +2134,7 @@ const Wr = ({
|
|
|
2123
2134
|
}));
|
|
2124
2135
|
return b && ee && Zt.unshift({
|
|
2125
2136
|
id: ee,
|
|
2126
|
-
name:
|
|
2137
|
+
name: Se,
|
|
2127
2138
|
updatedAt: void 0,
|
|
2128
2139
|
author: void 0,
|
|
2129
2140
|
path: ue ?? "/",
|
|
@@ -2138,7 +2149,7 @@ const Wr = ({
|
|
|
2138
2149
|
Mt || (ne = ne.filter((Y) => Y.nodeType !== k.ITEM)), et || (ne = ne.filter(
|
|
2139
2150
|
(Y) => Y.nodeType !== k.FOLDER
|
|
2140
2151
|
)), lt || (ne = ne.filter((Y) => E ? !Y.path.split("/").filter(Boolean).some((re) => re.startsWith(".")) : !xa(Y)));
|
|
2141
|
-
const
|
|
2152
|
+
const Ke = ne.map((Y) => ({
|
|
2142
2153
|
...Y,
|
|
2143
2154
|
id: Y.id ?? Y.path,
|
|
2144
2155
|
name: Y.name ?? Y.path.split("/").pop() ?? "",
|
|
@@ -2154,9 +2165,9 @@ const Wr = ({
|
|
|
2154
2165
|
contentLength: Y.contentLength,
|
|
2155
2166
|
folderId: Y.folderId
|
|
2156
2167
|
}));
|
|
2157
|
-
if (b && ee && !E &&
|
|
2168
|
+
if (b && ee && !E && Ke.unshift({
|
|
2158
2169
|
id: ee,
|
|
2159
|
-
name:
|
|
2170
|
+
name: Se,
|
|
2160
2171
|
updatedAt: void 0,
|
|
2161
2172
|
author: void 0,
|
|
2162
2173
|
path: ue ?? "/",
|
|
@@ -2164,9 +2175,9 @@ const Wr = ({
|
|
|
2164
2175
|
extension: void 0,
|
|
2165
2176
|
isTemporary: !0,
|
|
2166
2177
|
owner: void 0
|
|
2167
|
-
}), !E) return
|
|
2178
|
+
}), !E) return Ke;
|
|
2168
2179
|
const Io = E.split(/\s+/).filter(Boolean);
|
|
2169
|
-
return
|
|
2180
|
+
return Ke.filter((Y) => {
|
|
2170
2181
|
if (Y.isTemporary) return !0;
|
|
2171
2182
|
const Zt = Et(Y.name), re = Et(Y.author), Jo = ir(Y.extension);
|
|
2172
2183
|
return Io.every(
|
|
@@ -2181,7 +2192,7 @@ const Wr = ({
|
|
|
2181
2192
|
lt,
|
|
2182
2193
|
b,
|
|
2183
2194
|
ee,
|
|
2184
|
-
|
|
2195
|
+
Se,
|
|
2185
2196
|
Mt,
|
|
2186
2197
|
et,
|
|
2187
2198
|
ue
|
|
@@ -2196,45 +2207,45 @@ const Wr = ({
|
|
|
2196
2207
|
const Q = Ft(o, E.destinationFolder);
|
|
2197
2208
|
if (!Q?.items) return;
|
|
2198
2209
|
const ne = /* @__PURE__ */ new Set();
|
|
2199
|
-
for (const
|
|
2200
|
-
E.fileNames.has(
|
|
2210
|
+
for (const Ke of Q.items)
|
|
2211
|
+
E.fileNames.has(Ke.name) && pr(Ke, U, q) && ne.add(Ke.path);
|
|
2201
2212
|
ne.size > 0 && (it(ne), Je.current = null);
|
|
2202
2213
|
}, [
|
|
2203
2214
|
o,
|
|
2204
2215
|
ue,
|
|
2205
2216
|
it,
|
|
2206
|
-
|
|
2207
|
-
|
|
2217
|
+
U,
|
|
2218
|
+
q
|
|
2208
2219
|
]), fe(() => {
|
|
2209
2220
|
!gn.current && Cn && (dt(), gn.current = !0);
|
|
2210
2221
|
}, [Cn, dt]);
|
|
2211
2222
|
const za = d(
|
|
2212
2223
|
(E) => {
|
|
2213
|
-
|
|
2224
|
+
Xe(E.path);
|
|
2214
2225
|
},
|
|
2215
|
-
[
|
|
2226
|
+
[Xe]
|
|
2216
2227
|
), Wa = d(
|
|
2217
2228
|
(E) => {
|
|
2218
|
-
|
|
2229
|
+
Xe(E);
|
|
2219
2230
|
},
|
|
2220
|
-
[
|
|
2231
|
+
[Xe]
|
|
2221
2232
|
), Ha = d(
|
|
2222
2233
|
(E) => {
|
|
2223
|
-
E.nodeType === k.FOLDER ?
|
|
2234
|
+
E.nodeType === k.FOLDER ? Xe(E.path) : R?.(E);
|
|
2224
2235
|
},
|
|
2225
|
-
[
|
|
2236
|
+
[Xe, R]
|
|
2226
2237
|
), { expandedPaths: xt, setExpandedPaths: jt, collapseAll: Ba } = Sa({
|
|
2227
|
-
expandedPaths:
|
|
2228
|
-
onExpandedPathsChange:
|
|
2238
|
+
expandedPaths: w?.expandedPaths,
|
|
2239
|
+
onExpandedPathsChange: w?.onExpandedPathsChange
|
|
2229
2240
|
}), { additionalButtons: Ua } = Mr({
|
|
2230
2241
|
collapseAll: Ba,
|
|
2231
2242
|
expandedPathsLength: xt.size,
|
|
2232
|
-
additionalButtons:
|
|
2243
|
+
additionalButtons: w?.additionalButtons
|
|
2233
2244
|
}), Ga = d(
|
|
2234
2245
|
(E) => {
|
|
2235
2246
|
if (E.length > 0) {
|
|
2236
|
-
if (
|
|
2237
|
-
|
|
2247
|
+
if (we && ze(E[0], we)) {
|
|
2248
|
+
ke();
|
|
2238
2249
|
return;
|
|
2239
2250
|
}
|
|
2240
2251
|
ce(), Zo(E[0]);
|
|
@@ -2243,18 +2254,18 @@ const Wr = ({
|
|
|
2243
2254
|
[
|
|
2244
2255
|
ce,
|
|
2245
2256
|
Zo,
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2257
|
+
we,
|
|
2258
|
+
ze,
|
|
2259
|
+
ke
|
|
2249
2260
|
]
|
|
2250
2261
|
), Va = d(
|
|
2251
2262
|
(E) => {
|
|
2252
2263
|
if (E.length > 0) {
|
|
2253
|
-
if (
|
|
2254
|
-
|
|
2264
|
+
if (we && ze(E[0], we - 1)) {
|
|
2265
|
+
ke();
|
|
2255
2266
|
return;
|
|
2256
2267
|
}
|
|
2257
|
-
ce(),
|
|
2268
|
+
ce(), Pe(E[0].path), jt(new Set(xt).add(E[0].path || "/")), Ko(E[0]);
|
|
2258
2269
|
}
|
|
2259
2270
|
},
|
|
2260
2271
|
[
|
|
@@ -2262,16 +2273,16 @@ const Wr = ({
|
|
|
2262
2273
|
Ko,
|
|
2263
2274
|
xt,
|
|
2264
2275
|
jt,
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2276
|
+
Pe,
|
|
2277
|
+
ke,
|
|
2278
|
+
we,
|
|
2279
|
+
ze
|
|
2269
2280
|
]
|
|
2270
2281
|
), $a = d(
|
|
2271
2282
|
(E) => {
|
|
2272
2283
|
if (E.length > 0) {
|
|
2273
|
-
if (
|
|
2274
|
-
|
|
2284
|
+
if (we && ze(E[0], we)) {
|
|
2285
|
+
ke();
|
|
2275
2286
|
return;
|
|
2276
2287
|
}
|
|
2277
2288
|
ce(), Xo(E[0]);
|
|
@@ -2280,50 +2291,50 @@ const Wr = ({
|
|
|
2280
2291
|
[
|
|
2281
2292
|
ce,
|
|
2282
2293
|
Xo,
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2294
|
+
we,
|
|
2295
|
+
ze,
|
|
2296
|
+
ke
|
|
2286
2297
|
]
|
|
2287
2298
|
), ja = d(
|
|
2288
2299
|
(E) => {
|
|
2289
2300
|
if (E.length > 0) {
|
|
2290
|
-
if (
|
|
2291
|
-
|
|
2301
|
+
if (we && ze(E[0], we - 1)) {
|
|
2302
|
+
ke();
|
|
2292
2303
|
return;
|
|
2293
2304
|
}
|
|
2294
|
-
ce(),
|
|
2305
|
+
ce(), Pe(E[0].path), jt(new Set(xt).add(E[0].path || "/")), qo(E[0]);
|
|
2295
2306
|
}
|
|
2296
2307
|
},
|
|
2297
2308
|
[
|
|
2298
2309
|
ce,
|
|
2299
2310
|
qo,
|
|
2300
|
-
|
|
2311
|
+
Pe,
|
|
2301
2312
|
xt,
|
|
2302
2313
|
jt,
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2314
|
+
we,
|
|
2315
|
+
ze,
|
|
2316
|
+
ke
|
|
2306
2317
|
]
|
|
2307
2318
|
), {
|
|
2308
2319
|
isMetadataPopupOpen: Za,
|
|
2309
2320
|
selectedFileForMetadata: Xa,
|
|
2310
2321
|
openMetadataPopup: Ka,
|
|
2311
2322
|
closeMetadataPopup: Qo
|
|
2312
|
-
} = kr({ onGetInfo:
|
|
2313
|
-
Qo(),
|
|
2314
|
-
}, [Qo,
|
|
2315
|
-
if (
|
|
2316
|
-
return Xn(
|
|
2317
|
-
}, [
|
|
2323
|
+
} = kr({ onGetInfo: B }), qa = d(() => {
|
|
2324
|
+
Qo(), De?.clearMetadata?.();
|
|
2325
|
+
}, [Qo, De]), Ya = j(() => {
|
|
2326
|
+
if (K)
|
|
2327
|
+
return Xn(K);
|
|
2328
|
+
}, [K]), Qa = {
|
|
2318
2329
|
managerLabel: e,
|
|
2319
2330
|
className: r,
|
|
2320
2331
|
items: o,
|
|
2321
|
-
allowedFileTypes:
|
|
2322
|
-
maxSelectableFileSize:
|
|
2332
|
+
allowedFileTypes: U,
|
|
2333
|
+
maxSelectableFileSize: q,
|
|
2323
2334
|
rootItem: n,
|
|
2324
2335
|
filesLoading: i,
|
|
2325
2336
|
treeOptions: {
|
|
2326
|
-
...
|
|
2337
|
+
...w,
|
|
2327
2338
|
expandedPaths: xt,
|
|
2328
2339
|
onExpandedPathsChange: jt,
|
|
2329
2340
|
additionalButtons: Ua
|
|
@@ -2339,13 +2350,13 @@ const Wr = ({
|
|
|
2339
2350
|
destinationFolderPath: vn,
|
|
2340
2351
|
setDestinationFolderPath: tt,
|
|
2341
2352
|
header: ho,
|
|
2342
|
-
onCreateFolder:
|
|
2353
|
+
onCreateFolder: be,
|
|
2343
2354
|
onCreateFolderValidate: H,
|
|
2344
|
-
folderCreationValidationMessages:
|
|
2355
|
+
folderCreationValidationMessages: xe,
|
|
2345
2356
|
sourceFolder: go
|
|
2346
2357
|
},
|
|
2347
2358
|
currentPath: ue,
|
|
2348
|
-
setCurrentPath:
|
|
2359
|
+
setCurrentPath: Pe,
|
|
2349
2360
|
searchValue: Nn,
|
|
2350
2361
|
effectiveSearchValue: Lt,
|
|
2351
2362
|
setSearchValue: _t,
|
|
@@ -2354,10 +2365,10 @@ const Wr = ({
|
|
|
2354
2365
|
isTreeCollapsed: wn,
|
|
2355
2366
|
toggleTreeCollapse: yt,
|
|
2356
2367
|
setIsTreeCollapsed: ao,
|
|
2357
|
-
selectedPaths:
|
|
2368
|
+
selectedPaths: je,
|
|
2358
2369
|
selectedFiles: no,
|
|
2359
2370
|
setSelectedPaths: it,
|
|
2360
|
-
clearSelection:
|
|
2371
|
+
clearSelection: Ze,
|
|
2361
2372
|
currentFolder: se,
|
|
2362
2373
|
gridRows: _a,
|
|
2363
2374
|
handleCopyTo: Dn,
|
|
@@ -2388,7 +2399,7 @@ const Wr = ({
|
|
|
2388
2399
|
confirmDelete: Dt,
|
|
2389
2400
|
deleteConfirmationOpen: vo,
|
|
2390
2401
|
itemsToDelete: An,
|
|
2391
|
-
handlePathChange:
|
|
2402
|
+
handlePathChange: Xe,
|
|
2392
2403
|
handleTreeItemClick: za,
|
|
2393
2404
|
handleBreadcrumbItemClick: Wa,
|
|
2394
2405
|
handleSearchChange: zt,
|
|
@@ -2403,10 +2414,10 @@ const Wr = ({
|
|
|
2403
2414
|
handleDragOver: ct,
|
|
2404
2415
|
handleDrop: _n,
|
|
2405
2416
|
clearUploadError: Mn,
|
|
2406
|
-
onUploadFiles:
|
|
2417
|
+
onUploadFiles: V,
|
|
2407
2418
|
onValidateUpload: Z,
|
|
2408
|
-
maxFileSize:
|
|
2409
|
-
isDraggingOverWindow:
|
|
2419
|
+
maxFileSize: he,
|
|
2420
|
+
isDraggingOverWindow: We,
|
|
2410
2421
|
openFileDialog: dt,
|
|
2411
2422
|
fileInputRef: kn,
|
|
2412
2423
|
newActions: Ma,
|
|
@@ -2415,12 +2426,12 @@ const Wr = ({
|
|
|
2415
2426
|
isCreatingFolder: b,
|
|
2416
2427
|
newFolderTempId: ee,
|
|
2417
2428
|
createdFolderPath: le,
|
|
2418
|
-
newFolderDefaultName:
|
|
2429
|
+
newFolderDefaultName: Se,
|
|
2419
2430
|
startFolderCreation: Yo,
|
|
2420
2431
|
cancelFolderCreation: Aa,
|
|
2421
2432
|
saveFolderCreation: Pa,
|
|
2422
2433
|
validateFolderName: Oa,
|
|
2423
|
-
conflictResolutionPopupOptions:
|
|
2434
|
+
conflictResolutionPopupOptions: v,
|
|
2424
2435
|
conflictingFiles: En,
|
|
2425
2436
|
conflictResolutionOpen: po,
|
|
2426
2437
|
closeConflictResolution: Sn,
|
|
@@ -2435,26 +2446,26 @@ const Wr = ({
|
|
|
2435
2446
|
handleUploadConflictDuplicate: Do,
|
|
2436
2447
|
handleUploadConflictCancel: To,
|
|
2437
2448
|
handleUploadConflictDecideForEach: $t,
|
|
2438
|
-
fileMetadataPopupOptions:
|
|
2449
|
+
fileMetadataPopupOptions: De,
|
|
2439
2450
|
isMetadataPopupOpen: Za,
|
|
2440
2451
|
selectedFileForMetadata: Xa,
|
|
2441
2452
|
openMetadataPopup: Ka,
|
|
2442
2453
|
closeMetadataPopup: qa,
|
|
2443
|
-
onGetInfo:
|
|
2454
|
+
onGetInfo: B,
|
|
2444
2455
|
onUnshareFiles: te,
|
|
2445
|
-
onRemoveFilesAccess:
|
|
2446
|
-
actionsRef:
|
|
2447
|
-
sharedByMePaths:
|
|
2448
|
-
onSearchFiles:
|
|
2449
|
-
searchInProgress:
|
|
2450
|
-
searchResults:
|
|
2451
|
-
clearSearchResults:
|
|
2456
|
+
onRemoveFilesAccess: me,
|
|
2457
|
+
actionsRef: Le,
|
|
2458
|
+
sharedByMePaths: _e,
|
|
2459
|
+
onSearchFiles: Me,
|
|
2460
|
+
searchInProgress: x,
|
|
2461
|
+
searchResults: Ye,
|
|
2462
|
+
clearSearchResults: $,
|
|
2452
2463
|
isSearchMode: Nt,
|
|
2453
|
-
emptyStateIcon:
|
|
2454
|
-
emptyStateTitle:
|
|
2455
|
-
emptyStateDescription:
|
|
2464
|
+
emptyStateIcon: Te,
|
|
2465
|
+
emptyStateTitle: ye,
|
|
2466
|
+
emptyStateDescription: ae,
|
|
2456
2467
|
gridClassName: pn,
|
|
2457
|
-
sharedWithMeIds:
|
|
2468
|
+
sharedWithMeIds: Ee,
|
|
2458
2469
|
onFolderPopupPathChange: ft,
|
|
2459
2470
|
onManagePermissions: cn,
|
|
2460
2471
|
onPreview: rt,
|
|
@@ -2466,12 +2477,12 @@ const Wr = ({
|
|
|
2466
2477
|
customBreakpointRef: hn,
|
|
2467
2478
|
nonClickableTableColumns: fn,
|
|
2468
2479
|
hideSearchPathItemName: Qe,
|
|
2469
|
-
getDisabledTooltip:
|
|
2470
|
-
fileTooLargeTooltip:
|
|
2471
|
-
unsupportedFileTypeTooltip:
|
|
2480
|
+
getDisabledTooltip: J,
|
|
2481
|
+
fileTooLargeTooltip: Ce,
|
|
2482
|
+
unsupportedFileTypeTooltip: Ie,
|
|
2472
2483
|
showHiddenFileSwitcherInDestinationPopup: gt,
|
|
2473
2484
|
showCreateFolderButtonInDestinationPopup: mn,
|
|
2474
|
-
maxNewFolderDepth:
|
|
2485
|
+
maxNewFolderDepth: we,
|
|
2475
2486
|
onNewFolderDepthExceeded: Pt
|
|
2476
2487
|
};
|
|
2477
2488
|
return /* @__PURE__ */ a(Ra.Provider, { value: Qa, children: t });
|
|
@@ -2503,20 +2514,20 @@ const Wr = ({
|
|
|
2503
2514
|
"text/html"
|
|
2504
2515
|
).documentElement.textContent;
|
|
2505
2516
|
h && e.has(h) ? i((f) => f !== h ? (C(D.getBoundingClientRect()), h) : f) : i((f) => f && null);
|
|
2506
|
-
},
|
|
2517
|
+
}, w = () => {
|
|
2507
2518
|
i(null), C(null);
|
|
2508
2519
|
}, g = document.querySelector(
|
|
2509
2520
|
'[aria-label="File Manager Grid View"]'
|
|
2510
2521
|
);
|
|
2511
2522
|
if (g)
|
|
2512
|
-
return g.addEventListener("mousemove", u), g.addEventListener("mouseleave",
|
|
2513
|
-
g.removeEventListener("mousemove", u), g.removeEventListener("mouseleave",
|
|
2523
|
+
return g.addEventListener("mousemove", u), g.addEventListener("mouseleave", w), () => {
|
|
2524
|
+
g.removeEventListener("mousemove", u), g.removeEventListener("mouseleave", w);
|
|
2514
2525
|
};
|
|
2515
2526
|
}, [e]);
|
|
2516
|
-
const c =
|
|
2527
|
+
const c = j(() => {
|
|
2517
2528
|
if (l)
|
|
2518
2529
|
return t.find((u) => u.path === l);
|
|
2519
|
-
}, [l, t]),
|
|
2530
|
+
}, [l, t]), y = j(() => {
|
|
2520
2531
|
if (c) {
|
|
2521
2532
|
if (r) {
|
|
2522
2533
|
const u = r(c);
|
|
@@ -2535,14 +2546,14 @@ const Wr = ({
|
|
|
2535
2546
|
n,
|
|
2536
2547
|
s
|
|
2537
2548
|
]);
|
|
2538
|
-
return /* @__PURE__ */ a(
|
|
2539
|
-
/* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ a(Ae, { children: y && p && Bs(
|
|
2550
|
+
/* @__PURE__ */ X(vs, { open: !0, placement: ys.Top, children: [
|
|
2540
2551
|
/* @__PURE__ */ a(ws, { asChild: !0, children: /* @__PURE__ */ a(
|
|
2541
2552
|
"div",
|
|
2542
2553
|
{
|
|
2543
2554
|
className: an(
|
|
2544
2555
|
"fixed z-[-1]",
|
|
2545
|
-
|
|
2556
|
+
y && "pointer-events-none"
|
|
2546
2557
|
),
|
|
2547
2558
|
style: {
|
|
2548
2559
|
top: p.top,
|
|
@@ -2552,7 +2563,7 @@ const Wr = ({
|
|
|
2552
2563
|
}
|
|
2553
2564
|
}
|
|
2554
2565
|
) }),
|
|
2555
|
-
/* @__PURE__ */ a(Ns, { className: "text-center", children:
|
|
2566
|
+
/* @__PURE__ */ a(Ns, { className: "text-center", children: y })
|
|
2556
2567
|
] }),
|
|
2557
2568
|
document.body
|
|
2558
2569
|
) });
|
|
@@ -2571,12 +2582,12 @@ const Wr = ({
|
|
|
2571
2582
|
copyLabel: s = "Copy",
|
|
2572
2583
|
moveLabel: l = "Move",
|
|
2573
2584
|
addFolderLabel: i = "Add folder",
|
|
2574
|
-
mode: p =
|
|
2585
|
+
mode: p = ve.Copy,
|
|
2575
2586
|
hiddenFilesSwitcherLabel: C = "Show hidden files",
|
|
2576
2587
|
showHiddenFileSwitcher: c = !0,
|
|
2577
|
-
showCreateFolderButton:
|
|
2588
|
+
showCreateFolderButton: y = !0,
|
|
2578
2589
|
onUploadFiles: u,
|
|
2579
|
-
onValidateUpload:
|
|
2590
|
+
onValidateUpload: w,
|
|
2580
2591
|
maxFileSize: g,
|
|
2581
2592
|
header: m,
|
|
2582
2593
|
sourceFolder: T,
|
|
@@ -2584,14 +2595,14 @@ const Wr = ({
|
|
|
2584
2595
|
path: h,
|
|
2585
2596
|
collapsedFileTree: f = !1,
|
|
2586
2597
|
alertProps: F,
|
|
2587
|
-
processDestinationFolderPath:
|
|
2598
|
+
processDestinationFolderPath: v,
|
|
2588
2599
|
...I
|
|
2589
2600
|
}) => {
|
|
2590
|
-
const [R, S] = _(!1), [L, W] = _(!1), M = de(null), P = jo(), z = d((
|
|
2591
|
-
S(
|
|
2592
|
-
}, []),
|
|
2593
|
-
const
|
|
2594
|
-
return
|
|
2601
|
+
const [R, S] = _(!1), [L, W] = _(!1), M = de(null), P = jo(), z = d((V) => {
|
|
2602
|
+
S(V);
|
|
2603
|
+
}, []), G = j(() => {
|
|
2604
|
+
const V = [];
|
|
2605
|
+
return y && V.push({
|
|
2595
2606
|
key: "add-folder",
|
|
2596
2607
|
label: i,
|
|
2597
2608
|
icon: /* @__PURE__ */ a(
|
|
@@ -2604,32 +2615,32 @@ const Wr = ({
|
|
|
2604
2615
|
onClick: () => {
|
|
2605
2616
|
M.current?.createFolder(), W(!1);
|
|
2606
2617
|
}
|
|
2607
|
-
}), c &&
|
|
2618
|
+
}), c && V.push({
|
|
2608
2619
|
key: "show-hidden-files",
|
|
2609
2620
|
label: C,
|
|
2610
2621
|
icon: /* @__PURE__ */ a(Ao, { ...A, className: "text-secondary" }),
|
|
2611
2622
|
onClick: () => {
|
|
2612
2623
|
S((Z) => !Z), W(!1);
|
|
2613
2624
|
}
|
|
2614
|
-
}),
|
|
2625
|
+
}), V;
|
|
2615
2626
|
}, [
|
|
2616
2627
|
i,
|
|
2617
2628
|
C,
|
|
2618
2629
|
c,
|
|
2619
|
-
|
|
2630
|
+
y
|
|
2620
2631
|
]), O = d(
|
|
2621
|
-
(
|
|
2622
|
-
if (
|
|
2623
|
-
let Z =
|
|
2632
|
+
(V) => {
|
|
2633
|
+
if (V) {
|
|
2634
|
+
let Z = v ? v(V) : V;
|
|
2624
2635
|
r?.(Z), o?.(Z);
|
|
2625
2636
|
}
|
|
2626
2637
|
},
|
|
2627
2638
|
[
|
|
2628
2639
|
r,
|
|
2629
2640
|
o,
|
|
2630
|
-
|
|
2641
|
+
v
|
|
2631
2642
|
]
|
|
2632
|
-
),
|
|
2643
|
+
), K = p === ve.Copy ? "Copy to" : "Move to", oe = j(() => !h || !T ? !1 : T === h, [h, T]);
|
|
2633
2644
|
return /* @__PURE__ */ a(
|
|
2634
2645
|
Ho,
|
|
2635
2646
|
{
|
|
@@ -2639,11 +2650,11 @@ const Wr = ({
|
|
|
2639
2650
|
},
|
|
2640
2651
|
size: Gn.Lg,
|
|
2641
2652
|
className: "md:!h-[800px] !bg-layer-sunken",
|
|
2642
|
-
footer: /* @__PURE__ */
|
|
2653
|
+
footer: /* @__PURE__ */ X("div", { className: "flex justify-between items-center gap-2 p-4 md:px-6", children: [
|
|
2643
2654
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-4 min-w-0", children: P ? /* @__PURE__ */ a(
|
|
2644
2655
|
ht,
|
|
2645
2656
|
{
|
|
2646
|
-
items:
|
|
2657
|
+
items: G,
|
|
2647
2658
|
open: L,
|
|
2648
2659
|
onOpenChange: W,
|
|
2649
2660
|
children: /* @__PURE__ */ a(
|
|
@@ -2655,8 +2666,8 @@ const Wr = ({
|
|
|
2655
2666
|
}
|
|
2656
2667
|
)
|
|
2657
2668
|
}
|
|
2658
|
-
) : /* @__PURE__ */
|
|
2659
|
-
|
|
2669
|
+
) : /* @__PURE__ */ X(Ae, { children: [
|
|
2670
|
+
y && /* @__PURE__ */ a(
|
|
2660
2671
|
on,
|
|
2661
2672
|
{
|
|
2662
2673
|
label: i,
|
|
@@ -2667,8 +2678,8 @@ const Wr = ({
|
|
|
2667
2678
|
}
|
|
2668
2679
|
}
|
|
2669
2680
|
),
|
|
2670
|
-
|
|
2671
|
-
c && /* @__PURE__ */ a(
|
|
2681
|
+
y && c && /* @__PURE__ */ a("div", { className: "w-px h-[26px] bg-control-disable-primary my-2" }),
|
|
2682
|
+
c && /* @__PURE__ */ a(Ae, { children: /* @__PURE__ */ a("div", { className: "inline-flex items-center cursor-pointer", children: /* @__PURE__ */ a(
|
|
2672
2683
|
ya,
|
|
2673
2684
|
{
|
|
2674
2685
|
labelProps: { label: C },
|
|
@@ -2678,7 +2689,7 @@ const Wr = ({
|
|
|
2678
2689
|
}
|
|
2679
2690
|
) }) })
|
|
2680
2691
|
] }) }),
|
|
2681
|
-
/* @__PURE__ */
|
|
2692
|
+
/* @__PURE__ */ X("div", { className: "flex space-x-4 items-center", children: [
|
|
2682
2693
|
/* @__PURE__ */ a(Vn, { onClick: e, label: "Cancel" }),
|
|
2683
2694
|
oe ? /* @__PURE__ */ a($n, { tooltip: D, children: /* @__PURE__ */ a(
|
|
2684
2695
|
on,
|
|
@@ -2697,16 +2708,16 @@ const Wr = ({
|
|
|
2697
2708
|
)
|
|
2698
2709
|
] })
|
|
2699
2710
|
] }),
|
|
2700
|
-
header: m ??
|
|
2701
|
-
ariaLabel:
|
|
2702
|
-
children: /* @__PURE__ */
|
|
2711
|
+
header: m ?? K,
|
|
2712
|
+
ariaLabel: K,
|
|
2713
|
+
children: /* @__PURE__ */ X("div", { className: "bg-layer-sunken h-full flex flex-col", children: [
|
|
2703
2714
|
F && /* @__PURE__ */ a("div", { className: "px-6 mb-4 pt-4", children: /* @__PURE__ */ a(bs, { ...F }) }),
|
|
2704
2715
|
/* @__PURE__ */ a("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ a(
|
|
2705
2716
|
Ci,
|
|
2706
2717
|
{
|
|
2707
2718
|
...I,
|
|
2708
2719
|
gridClassName: "size-full",
|
|
2709
|
-
className:
|
|
2720
|
+
className: Oe(
|
|
2710
2721
|
I.className,
|
|
2711
2722
|
"bg-layer-sunken h-full flex pt-0"
|
|
2712
2723
|
),
|
|
@@ -2726,7 +2737,7 @@ const Wr = ({
|
|
|
2726
2737
|
...I.navigationPanelOptions
|
|
2727
2738
|
},
|
|
2728
2739
|
onUploadFiles: u,
|
|
2729
|
-
onValidateUpload:
|
|
2740
|
+
onValidateUpload: w,
|
|
2730
2741
|
onPathChange: O,
|
|
2731
2742
|
maxFileSize: g
|
|
2732
2743
|
}
|
|
@@ -2743,7 +2754,7 @@ function Ur({
|
|
|
2743
2754
|
containerPadding: n = 8,
|
|
2744
2755
|
dependencies: s = []
|
|
2745
2756
|
}) {
|
|
2746
|
-
const l = de(null), i = de(null), p = de(null), C = de(null), c = de([]), [
|
|
2757
|
+
const l = de(null), i = de(null), p = de(null), C = de(null), c = de([]), [y, u] = _(0), w = d(
|
|
2747
2758
|
(T, D) => {
|
|
2748
2759
|
const h = p.current?.offsetWidth ?? 0, f = C.current?.offsetWidth ?? 0, F = h + f, I = D.getBoundingClientRect().width - F - r - o * 2 - n * 2;
|
|
2749
2760
|
let R = 0, S = 0;
|
|
@@ -2765,11 +2776,11 @@ function Ur({
|
|
|
2765
2776
|
const D = Array.from(i.current.children).map(
|
|
2766
2777
|
(h) => Math.ceil(h.getBoundingClientRect().width)
|
|
2767
2778
|
);
|
|
2768
|
-
c.current = D, D.length !== 0 &&
|
|
2779
|
+
c.current = D, D.length !== 0 && w(D, l.current);
|
|
2769
2780
|
},
|
|
2770
2781
|
// Re-measure when the action list or layout-affecting deps (e.g. isMobile) change
|
|
2771
2782
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2772
|
-
[e,
|
|
2783
|
+
[e, w, ...s]
|
|
2773
2784
|
), fe(() => {
|
|
2774
2785
|
if (!l.current) return;
|
|
2775
2786
|
let T = null;
|
|
@@ -2777,7 +2788,7 @@ function Ur({
|
|
|
2777
2788
|
T && cancelAnimationFrame(T), T = requestAnimationFrame(() => {
|
|
2778
2789
|
if (!l.current) return;
|
|
2779
2790
|
const f = l.current, F = c.current;
|
|
2780
|
-
F.length !== 0 &&
|
|
2791
|
+
F.length !== 0 && w(F, f);
|
|
2781
2792
|
});
|
|
2782
2793
|
}, h = new ResizeObserver(D);
|
|
2783
2794
|
return h.observe(l.current), D(), () => {
|
|
@@ -2785,13 +2796,13 @@ function Ur({
|
|
|
2785
2796
|
};
|
|
2786
2797
|
}, [
|
|
2787
2798
|
e.length,
|
|
2788
|
-
|
|
2799
|
+
w,
|
|
2789
2800
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2790
2801
|
...s
|
|
2791
2802
|
]);
|
|
2792
|
-
const g = t === tn.Reverse ? e.slice(0, e.length -
|
|
2803
|
+
const g = t === tn.Reverse ? e.slice(0, e.length - y) : e.slice(y);
|
|
2793
2804
|
return {
|
|
2794
|
-
visibleActions: t === tn.Reverse ? e.slice(e.length -
|
|
2805
|
+
visibleActions: t === tn.Reverse ? e.slice(e.length - y) : e.slice(0, y),
|
|
2795
2806
|
hiddenActions: g,
|
|
2796
2807
|
refs: {
|
|
2797
2808
|
containerRef: l,
|
|
@@ -2813,16 +2824,16 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2813
2824
|
actionsGap: Gr,
|
|
2814
2825
|
containerPadding: Vr
|
|
2815
2826
|
}), c = e(o);
|
|
2816
|
-
return /* @__PURE__ */
|
|
2827
|
+
return /* @__PURE__ */ X(Ae, { children: [
|
|
2817
2828
|
/* @__PURE__ */ a(
|
|
2818
2829
|
"div",
|
|
2819
2830
|
{
|
|
2820
2831
|
ref: i,
|
|
2821
2832
|
className: "absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",
|
|
2822
|
-
children: r.map(({ key:
|
|
2833
|
+
children: r.map(({ key: y, icon: u, title: w }) => /* @__PURE__ */ a(Vn, { iconBefore: u, label: w }, y))
|
|
2823
2834
|
}
|
|
2824
2835
|
),
|
|
2825
|
-
/* @__PURE__ */
|
|
2836
|
+
/* @__PURE__ */ X(
|
|
2826
2837
|
"div",
|
|
2827
2838
|
{
|
|
2828
2839
|
ref: s,
|
|
@@ -2840,7 +2851,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2840
2851
|
iconBefore: /* @__PURE__ */ a(as, { ...A })
|
|
2841
2852
|
}
|
|
2842
2853
|
) }),
|
|
2843
|
-
/* @__PURE__ */
|
|
2854
|
+
/* @__PURE__ */ X("div", { className: "flex flex-1 w-full gap-3 items-center justify-end", children: [
|
|
2844
2855
|
C.length > 0 && /* @__PURE__ */ a(
|
|
2845
2856
|
ht,
|
|
2846
2857
|
{
|
|
@@ -2856,17 +2867,17 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2856
2867
|
}
|
|
2857
2868
|
),
|
|
2858
2869
|
p.map(
|
|
2859
|
-
({ key:
|
|
2870
|
+
({ key: y, icon: u, tooltip: w, title: g, onClick: m, disabled: T }) => /* @__PURE__ */ a(
|
|
2860
2871
|
Vn,
|
|
2861
2872
|
{
|
|
2862
2873
|
className: "!p-[9px]",
|
|
2863
2874
|
iconBefore: u,
|
|
2864
2875
|
label: g,
|
|
2865
2876
|
disabled: T,
|
|
2866
|
-
tooltipProps: { tooltip:
|
|
2867
|
-
onClick: (D) => m?.({ key:
|
|
2877
|
+
tooltipProps: { tooltip: w },
|
|
2878
|
+
onClick: (D) => m?.({ key: y, domEvent: D })
|
|
2868
2879
|
},
|
|
2869
|
-
|
|
2880
|
+
y
|
|
2870
2881
|
)
|
|
2871
2882
|
)
|
|
2872
2883
|
] })
|
|
@@ -2884,31 +2895,31 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2884
2895
|
titleRenderer: l,
|
|
2885
2896
|
contentRenderer: i
|
|
2886
2897
|
}) => {
|
|
2887
|
-
const p = t.map((
|
|
2888
|
-
/* @__PURE__ */ a("p", { className: "text-secondary mb-3", children: t.length === 1 ? /* @__PURE__ */
|
|
2898
|
+
const p = t.map((w) => w.name), C = "Confirm Deleting Items", c = l?.(p) || C, y = /* @__PURE__ */ X("div", { className: "px-6 py-3 dial-small-text", children: [
|
|
2899
|
+
/* @__PURE__ */ a("p", { className: "text-secondary mb-3", children: t.length === 1 ? /* @__PURE__ */ X(Ae, { children: [
|
|
2889
2900
|
"Do you want to delete file or folder",
|
|
2890
2901
|
" ",
|
|
2891
|
-
/* @__PURE__ */
|
|
2902
|
+
/* @__PURE__ */ X("span", { className: "text-primary break-all", children: [
|
|
2892
2903
|
'"',
|
|
2893
2904
|
t[0].name,
|
|
2894
2905
|
'"'
|
|
2895
2906
|
] }),
|
|
2896
2907
|
"?"
|
|
2897
|
-
] }) : /* @__PURE__ */
|
|
2908
|
+
] }) : /* @__PURE__ */ X(Ae, { children: [
|
|
2898
2909
|
"Do you want to delete the following",
|
|
2899
2910
|
" ",
|
|
2900
2911
|
/* @__PURE__ */ a("span", { className: "text-primary", children: t.length }),
|
|
2901
2912
|
" items?"
|
|
2902
2913
|
] }) }),
|
|
2903
|
-
t.length > 1 && /* @__PURE__ */ a(
|
|
2904
|
-
/* @__PURE__ */ a("ul", { className: "space-y-1 text-primary list-none mb-2", children: t.slice(0, 10).map((
|
|
2905
|
-
/* @__PURE__ */
|
|
2914
|
+
t.length > 1 && /* @__PURE__ */ a(Ae, { children: t.length <= 10 ? /* @__PURE__ */ a("ul", { className: "space-y-1 text-primary list-none", children: t.map((w) => /* @__PURE__ */ a("li", { className: "truncate", children: w.name }, w.path)) }) : /* @__PURE__ */ X(Ae, { children: [
|
|
2915
|
+
/* @__PURE__ */ a("ul", { className: "space-y-1 text-primary list-none mb-2", children: t.slice(0, 10).map((w) => /* @__PURE__ */ a("li", { className: "truncate", children: w.name }, w.path)) }),
|
|
2916
|
+
/* @__PURE__ */ X("p", { className: "text-secondary italic", children: [
|
|
2906
2917
|
"... and ",
|
|
2907
2918
|
t.length - 10,
|
|
2908
2919
|
" more"
|
|
2909
2920
|
] })
|
|
2910
2921
|
] }) })
|
|
2911
|
-
] }), u = i?.(p) ||
|
|
2922
|
+
] }), u = i?.(p) || y;
|
|
2912
2923
|
return /* @__PURE__ */ a(
|
|
2913
2924
|
Ds,
|
|
2914
2925
|
{
|
|
@@ -2935,9 +2946,9 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2935
2946
|
className: p,
|
|
2936
2947
|
breadcrumbClassName: C,
|
|
2937
2948
|
searchable: c = !0,
|
|
2938
|
-
value:
|
|
2949
|
+
value: y,
|
|
2939
2950
|
elementId: u = "file-manager-search",
|
|
2940
|
-
disabled:
|
|
2951
|
+
disabled: w,
|
|
2941
2952
|
invalid: g,
|
|
2942
2953
|
onSearchChange: m,
|
|
2943
2954
|
searchClassName: T,
|
|
@@ -2945,7 +2956,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2945
2956
|
isCompactView: h = !1,
|
|
2946
2957
|
backButtonLabel: f = "Back"
|
|
2947
2958
|
}) => {
|
|
2948
|
-
const F =
|
|
2959
|
+
const F = j(() => {
|
|
2949
2960
|
if (!o) return;
|
|
2950
2961
|
let M = pa(o);
|
|
2951
2962
|
const P = [...M];
|
|
@@ -2953,18 +2964,18 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2953
2964
|
if (i) {
|
|
2954
2965
|
const O = pa(i);
|
|
2955
2966
|
if (O.length) {
|
|
2956
|
-
const
|
|
2957
|
-
(oe,
|
|
2967
|
+
const K = M.findIndex(
|
|
2968
|
+
(oe, V) => O.every((Z, ie) => M[V + ie] === Z)
|
|
2958
2969
|
);
|
|
2959
|
-
|
|
2960
|
-
...M.slice(0,
|
|
2961
|
-
...M.slice(
|
|
2970
|
+
K !== -1 && (z = O.length, M = [
|
|
2971
|
+
...M.slice(0, K),
|
|
2972
|
+
...M.slice(K + O.length)
|
|
2962
2973
|
]);
|
|
2963
2974
|
}
|
|
2964
2975
|
}
|
|
2965
2976
|
if (!M.length) return [{ label: "/" }];
|
|
2966
|
-
const
|
|
2967
|
-
const oe =
|
|
2977
|
+
const G = M.map((O, K) => {
|
|
2978
|
+
const oe = K < M.length - z ? K : K + z, V = P.slice(0, oe + 1), Z = typeof n == "function" ? n(V, oe) : void 0;
|
|
2968
2979
|
return {
|
|
2969
2980
|
label: O,
|
|
2970
2981
|
href: Z,
|
|
@@ -2974,11 +2985,11 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2974
2985
|
};
|
|
2975
2986
|
});
|
|
2976
2987
|
if (s && l) {
|
|
2977
|
-
const O = s.split("/").filter(Boolean),
|
|
2988
|
+
const O = s.split("/").filter(Boolean), K = o.split("/").filter(Boolean);
|
|
2978
2989
|
if (O.every(
|
|
2979
|
-
(
|
|
2980
|
-
) &&
|
|
2981
|
-
const
|
|
2990
|
+
(V, Z) => K[Z] === V
|
|
2991
|
+
) && G.length > 0) {
|
|
2992
|
+
const V = G.slice(O.length);
|
|
2982
2993
|
return [
|
|
2983
2994
|
{
|
|
2984
2995
|
label: l,
|
|
@@ -2987,11 +2998,11 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2987
2998
|
Z.preventDefault(), r(s);
|
|
2988
2999
|
} : void 0
|
|
2989
3000
|
},
|
|
2990
|
-
...
|
|
3001
|
+
...V
|
|
2991
3002
|
];
|
|
2992
3003
|
}
|
|
2993
3004
|
}
|
|
2994
|
-
return
|
|
3005
|
+
return G;
|
|
2995
3006
|
}, [
|
|
2996
3007
|
o,
|
|
2997
3008
|
i,
|
|
@@ -2999,17 +3010,17 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
2999
3010
|
l,
|
|
3000
3011
|
n,
|
|
3001
3012
|
r
|
|
3002
|
-
]), [
|
|
3013
|
+
]), [v, I] = _(!1), R = (M) => {
|
|
3003
3014
|
m?.(M ?? "");
|
|
3004
3015
|
}, S = d(() => {
|
|
3005
|
-
if (h && !
|
|
3016
|
+
if (h && !v) {
|
|
3006
3017
|
I(!0);
|
|
3007
3018
|
const M = document.getElementById(u);
|
|
3008
3019
|
M && M.focus();
|
|
3009
3020
|
}
|
|
3010
|
-
}, [u,
|
|
3011
|
-
(!
|
|
3012
|
-
}, [
|
|
3021
|
+
}, [u, v, h]), L = d(() => {
|
|
3022
|
+
(!y || String(y).trim() === "") && m?.("");
|
|
3023
|
+
}, [y, m]), W = d(() => h && v ? /* @__PURE__ */ a(
|
|
3013
3024
|
pt,
|
|
3014
3025
|
{
|
|
3015
3026
|
size: ln.Standard,
|
|
@@ -3032,15 +3043,15 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3032
3043
|
f,
|
|
3033
3044
|
C,
|
|
3034
3045
|
F,
|
|
3035
|
-
|
|
3046
|
+
v,
|
|
3036
3047
|
h,
|
|
3037
3048
|
t,
|
|
3038
3049
|
m
|
|
3039
3050
|
]);
|
|
3040
|
-
return /* @__PURE__ */
|
|
3051
|
+
return /* @__PURE__ */ X(
|
|
3041
3052
|
"div",
|
|
3042
3053
|
{
|
|
3043
|
-
className:
|
|
3054
|
+
className: Oe(
|
|
3044
3055
|
Zr,
|
|
3045
3056
|
{
|
|
3046
3057
|
"gap-3": h
|
|
@@ -3053,9 +3064,9 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3053
3064
|
c && /* @__PURE__ */ a(
|
|
3054
3065
|
"div",
|
|
3055
3066
|
{
|
|
3056
|
-
className:
|
|
3057
|
-
"w-[40px]": h && !
|
|
3058
|
-
"w-full": h &&
|
|
3067
|
+
className: Oe(Kr, {
|
|
3068
|
+
"w-[40px]": h && !v,
|
|
3069
|
+
"w-full": h && v
|
|
3059
3070
|
}),
|
|
3060
3071
|
role: "search",
|
|
3061
3072
|
"aria-label": "Search",
|
|
@@ -3064,13 +3075,13 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3064
3075
|
Is,
|
|
3065
3076
|
{
|
|
3066
3077
|
id: u,
|
|
3067
|
-
value:
|
|
3078
|
+
value: y ?? "",
|
|
3068
3079
|
onChange: R,
|
|
3069
|
-
disabled:
|
|
3080
|
+
disabled: w,
|
|
3070
3081
|
onBlur: L,
|
|
3071
3082
|
invalid: g,
|
|
3072
3083
|
className: T,
|
|
3073
|
-
wrapperClassName: h && !
|
|
3084
|
+
wrapperClassName: h && !v ? "pl-2.5" : "",
|
|
3074
3085
|
containerClassName: D
|
|
3075
3086
|
}
|
|
3076
3087
|
)
|
|
@@ -3091,22 +3102,22 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3091
3102
|
newButtonDropdownItems: p = [],
|
|
3092
3103
|
newButtonLabel: C = "New",
|
|
3093
3104
|
hiddenFilesSwitcherLabel: c = "Hidden files",
|
|
3094
|
-
showHiddenFilesLabel:
|
|
3105
|
+
showHiddenFilesLabel: y = "Show hidden files",
|
|
3095
3106
|
hideHiddenFilesLabel: u = "Hide hidden files",
|
|
3096
|
-
showHiddenFilesToggle:
|
|
3107
|
+
showHiddenFilesToggle: w = !0,
|
|
3097
3108
|
disabledNewButtonTooltip: g
|
|
3098
3109
|
}) => {
|
|
3099
|
-
const m = jo(), T =
|
|
3110
|
+
const m = jo(), T = j(() => [
|
|
3100
3111
|
{
|
|
3101
3112
|
key: "hidden-files-switch",
|
|
3102
|
-
label: o ? u :
|
|
3113
|
+
label: o ? u : y,
|
|
3103
3114
|
icon: o ? /* @__PURE__ */ a(rs, { ...A, className: "text-secondary" }) : /* @__PURE__ */ a(Ao, { ...A, className: "text-secondary" }),
|
|
3104
3115
|
onClick: () => n?.(!o)
|
|
3105
3116
|
}
|
|
3106
3117
|
], [
|
|
3107
3118
|
o,
|
|
3108
3119
|
u,
|
|
3109
|
-
|
|
3120
|
+
y,
|
|
3110
3121
|
n
|
|
3111
3122
|
]), D = () => e && t && r ? /* @__PURE__ */ a(
|
|
3112
3123
|
Fs,
|
|
@@ -3115,8 +3126,8 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3115
3126
|
activeTabId: t,
|
|
3116
3127
|
onTabChange: (F) => r(F)
|
|
3117
3128
|
}
|
|
3118
|
-
) : null, h = () => /* @__PURE__ */
|
|
3119
|
-
|
|
3129
|
+
) : null, h = () => /* @__PURE__ */ X(Ae, { children: [
|
|
3130
|
+
w && /* @__PURE__ */ a(
|
|
3120
3131
|
ya,
|
|
3121
3132
|
{
|
|
3122
3133
|
id: "hidden-files-switch",
|
|
@@ -3140,7 +3151,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3140
3151
|
)
|
|
3141
3152
|
}
|
|
3142
3153
|
)
|
|
3143
|
-
] }), f = () => /* @__PURE__ */
|
|
3154
|
+
] }), f = () => /* @__PURE__ */ X(Ae, { children: [
|
|
3144
3155
|
/* @__PURE__ */ a(
|
|
3145
3156
|
ht,
|
|
3146
3157
|
{
|
|
@@ -3177,11 +3188,11 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3177
3188
|
}
|
|
3178
3189
|
) : null
|
|
3179
3190
|
] });
|
|
3180
|
-
return /* @__PURE__ */
|
|
3191
|
+
return /* @__PURE__ */ X("div", { className: "flex w-full justify-between gap-4 items-center overflow-x-auto py-[2px] my-[-2px]", children: [
|
|
3181
3192
|
/* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: D() }),
|
|
3182
3193
|
/* @__PURE__ */ a("div", { className: "flex gap-2 shrink-0 items-center", children: m ? f() : h() })
|
|
3183
3194
|
] });
|
|
3184
|
-
}, Qr = 100, Qt = 16,
|
|
3195
|
+
}, Qr = 100, Qt = 16, Ge = "text-secondary", Bn = "text-primary min-w-0", Jr = "text-primary break-words min-w-0", Jt = "bg-layer-sunken", ei = ({
|
|
3185
3196
|
open: e,
|
|
3186
3197
|
onClose: t,
|
|
3187
3198
|
fileMetadata: r,
|
|
@@ -3193,7 +3204,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3193
3204
|
sizeLabel: p = "Size:",
|
|
3194
3205
|
authorLabel: C = "Author:",
|
|
3195
3206
|
dateLocale: c = "en-US",
|
|
3196
|
-
dateOptions:
|
|
3207
|
+
dateOptions: y
|
|
3197
3208
|
}) => /* @__PURE__ */ a(
|
|
3198
3209
|
Ho,
|
|
3199
3210
|
{
|
|
@@ -3207,8 +3218,8 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3207
3218
|
{
|
|
3208
3219
|
className: "grid gap-4 items-center dial-small-text",
|
|
3209
3220
|
style: { gridTemplateColumns: `${Qr}px 1fr` },
|
|
3210
|
-
children: o ? /* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */ a("div", { className:
|
|
3221
|
+
children: o ? /* @__PURE__ */ X(Ae, { children: [
|
|
3222
|
+
/* @__PURE__ */ a("div", { className: Ge, children: s }),
|
|
3212
3223
|
/* @__PURE__ */ a(
|
|
3213
3224
|
Kt,
|
|
3214
3225
|
{
|
|
@@ -3218,7 +3229,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3218
3229
|
className: Jt
|
|
3219
3230
|
}
|
|
3220
3231
|
),
|
|
3221
|
-
/* @__PURE__ */ a("div", { className:
|
|
3232
|
+
/* @__PURE__ */ a("div", { className: Ge, children: i }),
|
|
3222
3233
|
/* @__PURE__ */ a(
|
|
3223
3234
|
Kt,
|
|
3224
3235
|
{
|
|
@@ -3228,7 +3239,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3228
3239
|
className: Jt
|
|
3229
3240
|
}
|
|
3230
3241
|
),
|
|
3231
|
-
/* @__PURE__ */ a("div", { className:
|
|
3242
|
+
/* @__PURE__ */ a("div", { className: Ge, children: p }),
|
|
3232
3243
|
/* @__PURE__ */ a(
|
|
3233
3244
|
Kt,
|
|
3234
3245
|
{
|
|
@@ -3238,7 +3249,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3238
3249
|
className: Jt
|
|
3239
3250
|
}
|
|
3240
3251
|
),
|
|
3241
|
-
/* @__PURE__ */ a("div", { className:
|
|
3252
|
+
/* @__PURE__ */ a("div", { className: Ge, children: C }),
|
|
3242
3253
|
/* @__PURE__ */ a(
|
|
3243
3254
|
Kt,
|
|
3244
3255
|
{
|
|
@@ -3248,7 +3259,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3248
3259
|
className: Jt
|
|
3249
3260
|
}
|
|
3250
3261
|
),
|
|
3251
|
-
/* @__PURE__ */ a("div", { className:
|
|
3262
|
+
/* @__PURE__ */ a("div", { className: Ge, children: l }),
|
|
3252
3263
|
/* @__PURE__ */ a(
|
|
3253
3264
|
Kt,
|
|
3254
3265
|
{
|
|
@@ -3258,30 +3269,30 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3258
3269
|
className: Jt
|
|
3259
3270
|
}
|
|
3260
3271
|
)
|
|
3261
|
-
] }) : r ? /* @__PURE__ */
|
|
3262
|
-
/* @__PURE__ */ a("div", { className:
|
|
3272
|
+
] }) : r ? /* @__PURE__ */ X(Ae, { children: [
|
|
3273
|
+
/* @__PURE__ */ a("div", { className: Ge, children: s }),
|
|
3263
3274
|
/* @__PURE__ */ a("div", { className: Bn, children: /* @__PURE__ */ a(It, { text: r.name }) }),
|
|
3264
|
-
/* @__PURE__ */ a("div", { className:
|
|
3275
|
+
/* @__PURE__ */ a("div", { className: Ge, children: i }),
|
|
3265
3276
|
/* @__PURE__ */ a("div", { className: Bn, children: /* @__PURE__ */ a(
|
|
3266
3277
|
It,
|
|
3267
3278
|
{
|
|
3268
3279
|
text: cr(
|
|
3269
3280
|
r.updatedAt,
|
|
3270
3281
|
c,
|
|
3271
|
-
|
|
3282
|
+
y
|
|
3272
3283
|
)
|
|
3273
3284
|
}
|
|
3274
3285
|
) }),
|
|
3275
|
-
/* @__PURE__ */ a("div", { className:
|
|
3286
|
+
/* @__PURE__ */ a("div", { className: Ge, children: p }),
|
|
3276
3287
|
/* @__PURE__ */ a("div", { className: Bn, children: /* @__PURE__ */ a(
|
|
3277
3288
|
It,
|
|
3278
3289
|
{
|
|
3279
3290
|
text: sn(r.contentLength)
|
|
3280
3291
|
}
|
|
3281
3292
|
) }),
|
|
3282
|
-
/* @__PURE__ */ a("div", { className:
|
|
3293
|
+
/* @__PURE__ */ a("div", { className: Ge, children: C }),
|
|
3283
3294
|
/* @__PURE__ */ a("div", { className: Bn, children: /* @__PURE__ */ a(It, { text: r.author || "—" }) }),
|
|
3284
|
-
/* @__PURE__ */ a("div", { className:
|
|
3295
|
+
/* @__PURE__ */ a("div", { className: Ge, children: l }),
|
|
3285
3296
|
/* @__PURE__ */ a("div", { className: Jr, children: decodeURIComponent(r.path) })
|
|
3286
3297
|
] }) : null
|
|
3287
3298
|
}
|
|
@@ -3300,7 +3311,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3300
3311
|
fileExtension: l,
|
|
3301
3312
|
...i
|
|
3302
3313
|
}) => {
|
|
3303
|
-
const p = (C) => /* @__PURE__ */
|
|
3314
|
+
const p = (C) => /* @__PURE__ */ X("span", { className: "inline-flex relative text-secondary", role: "img", children: [
|
|
3304
3315
|
C,
|
|
3305
3316
|
r && /* @__PURE__ */ a("span", { className: "absolute -bottom-0.5 -left-0.5", children: /* @__PURE__ */ a(
|
|
3306
3317
|
oa,
|
|
@@ -3312,7 +3323,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3312
3323
|
] });
|
|
3313
3324
|
if (o)
|
|
3314
3325
|
return p(/* @__PURE__ */ a(As, {}));
|
|
3315
|
-
if (t ===
|
|
3326
|
+
if (t === Ue.File) {
|
|
3316
3327
|
const C = l || (e.includes(".") ? e.split(".").pop() : void 0);
|
|
3317
3328
|
return /* @__PURE__ */ a(
|
|
3318
3329
|
Es,
|
|
@@ -3331,7 +3342,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3331
3342
|
}
|
|
3332
3343
|
);
|
|
3333
3344
|
}
|
|
3334
|
-
return t ===
|
|
3345
|
+
return t === Ue.Folder ? p(
|
|
3335
3346
|
/* @__PURE__ */ a(
|
|
3336
3347
|
Ss,
|
|
3337
3348
|
{
|
|
@@ -3359,9 +3370,9 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3359
3370
|
iconSize: p,
|
|
3360
3371
|
iconStroke: C,
|
|
3361
3372
|
inputInvalid: c,
|
|
3362
|
-
inputInvalidMessage:
|
|
3373
|
+
inputInvalidMessage: y,
|
|
3363
3374
|
inputContainerClassName: u,
|
|
3364
|
-
inputIconAfter:
|
|
3375
|
+
inputIconAfter: w,
|
|
3365
3376
|
inputRef: g,
|
|
3366
3377
|
onChange: m,
|
|
3367
3378
|
sharedIndicatorClassName: T,
|
|
@@ -3369,15 +3380,15 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3369
3380
|
fileExtension: h
|
|
3370
3381
|
}) => {
|
|
3371
3382
|
const f = () => {
|
|
3372
|
-
const F =
|
|
3383
|
+
const F = y?.startsWith(
|
|
3373
3384
|
`${So.Warning}__`
|
|
3374
3385
|
);
|
|
3375
3386
|
if (!c && !F) return null;
|
|
3376
|
-
const
|
|
3387
|
+
const v = y?.replace(
|
|
3377
3388
|
`${So.Warning}__`,
|
|
3378
3389
|
""
|
|
3379
3390
|
);
|
|
3380
|
-
return /* @__PURE__ */ a($n, { tooltip:
|
|
3391
|
+
return /* @__PURE__ */ a($n, { tooltip: v, children: w || (F ? /* @__PURE__ */ a(
|
|
3381
3392
|
ls,
|
|
3382
3393
|
{
|
|
3383
3394
|
...A,
|
|
@@ -3393,7 +3404,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3393
3404
|
}
|
|
3394
3405
|
)) });
|
|
3395
3406
|
};
|
|
3396
|
-
return /* @__PURE__ */
|
|
3407
|
+
return /* @__PURE__ */ X("div", { className: "flex gap-2 items-center", ...Ps, children: [
|
|
3397
3408
|
/* @__PURE__ */ a(
|
|
3398
3409
|
oi,
|
|
3399
3410
|
{
|
|
@@ -3414,7 +3425,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3414
3425
|
/* @__PURE__ */ a(
|
|
3415
3426
|
Os,
|
|
3416
3427
|
{
|
|
3417
|
-
containerClassName:
|
|
3428
|
+
containerClassName: Oe(
|
|
3418
3429
|
"!h-5 !py-[1px] !pl-[7px] pr-[7px]",
|
|
3419
3430
|
u
|
|
3420
3431
|
),
|
|
@@ -3439,9 +3450,9 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3439
3450
|
validate: p,
|
|
3440
3451
|
onSave: C,
|
|
3441
3452
|
fileExtension: c,
|
|
3442
|
-
onCancel:
|
|
3453
|
+
onCancel: y,
|
|
3443
3454
|
onCreateFolderCancel: u,
|
|
3444
|
-
onCreateFolderSave:
|
|
3455
|
+
onCreateFolderSave: w,
|
|
3445
3456
|
inputContainerClassName: g,
|
|
3446
3457
|
sharedIndicatorClassName: m,
|
|
3447
3458
|
sharedIndicatorTooltip: T,
|
|
@@ -3450,27 +3461,27 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3450
3461
|
forbiddenSymbolsTooltip: f,
|
|
3451
3462
|
...F
|
|
3452
3463
|
}) => {
|
|
3453
|
-
const { value:
|
|
3464
|
+
const { value: v, invalid: I, invalidMessage: R, onChange: S, inputRef: L } = Ms({
|
|
3454
3465
|
value: e,
|
|
3455
3466
|
isEditing: o,
|
|
3456
3467
|
isCreating: s,
|
|
3457
3468
|
isLoading: n,
|
|
3458
3469
|
onValidate: p,
|
|
3459
|
-
onCancel:
|
|
3470
|
+
onCancel: y,
|
|
3460
3471
|
onSave: C,
|
|
3461
3472
|
onCreateFolderCancel: u,
|
|
3462
|
-
onCreateFolderSave:
|
|
3473
|
+
onCreateFolderSave: w
|
|
3463
3474
|
});
|
|
3464
3475
|
if (!o && !s) {
|
|
3465
3476
|
const W = $o(
|
|
3466
3477
|
{
|
|
3467
3478
|
name: e,
|
|
3468
|
-
isFolder: t ===
|
|
3479
|
+
isFolder: t === Ue.Folder
|
|
3469
3480
|
},
|
|
3470
3481
|
h,
|
|
3471
3482
|
f
|
|
3472
3483
|
), M = !!W;
|
|
3473
|
-
return t ===
|
|
3484
|
+
return t === Ue.Folder ? /* @__PURE__ */ a(
|
|
3474
3485
|
_o,
|
|
3475
3486
|
{
|
|
3476
3487
|
name: e,
|
|
@@ -3502,7 +3513,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3502
3513
|
ai,
|
|
3503
3514
|
{
|
|
3504
3515
|
type: t,
|
|
3505
|
-
name:
|
|
3516
|
+
name: v,
|
|
3506
3517
|
elementId: r,
|
|
3507
3518
|
inputInvalid: I,
|
|
3508
3519
|
inputInvalidMessage: R,
|
|
@@ -3527,9 +3538,9 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3527
3538
|
emptyStateDescription: p,
|
|
3528
3539
|
emptyStateIcon: C,
|
|
3529
3540
|
areHiddenFilesVisible: c = !1,
|
|
3530
|
-
renamedPath:
|
|
3541
|
+
renamedPath: y,
|
|
3531
3542
|
createdFolderPath: u,
|
|
3532
|
-
rootItemLabel:
|
|
3543
|
+
rootItemLabel: w,
|
|
3533
3544
|
rootItemPath: g,
|
|
3534
3545
|
onItemClick: m,
|
|
3535
3546
|
getContextMenuItems: T,
|
|
@@ -3537,7 +3548,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3537
3548
|
onRenameCancel: h,
|
|
3538
3549
|
onRenameValidate: f,
|
|
3539
3550
|
onExpandedPathsChange: F,
|
|
3540
|
-
onCreateFolderSave:
|
|
3551
|
+
onCreateFolderSave: v,
|
|
3541
3552
|
onCreateFolderCancel: I,
|
|
3542
3553
|
forbiddenSymbolsRegExp: R,
|
|
3543
3554
|
forbiddenSymbolsTooltip: S,
|
|
@@ -3546,11 +3557,11 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3546
3557
|
const { expandedPaths: W, togglePath: M } = Sa({
|
|
3547
3558
|
expandedPaths: r ?? /* @__PURE__ */ new Set(),
|
|
3548
3559
|
onExpandedPathsChange: F
|
|
3549
|
-
}), P = (
|
|
3550
|
-
m?.(
|
|
3551
|
-
}, z = (
|
|
3552
|
-
let oe =
|
|
3553
|
-
return
|
|
3560
|
+
}), P = (G) => {
|
|
3561
|
+
m?.(G), M(G.path);
|
|
3562
|
+
}, z = (G, O, K) => {
|
|
3563
|
+
let oe = G;
|
|
3564
|
+
return K && K.path === u && (oe = [
|
|
3554
3565
|
{
|
|
3555
3566
|
folderId: en,
|
|
3556
3567
|
id: en,
|
|
@@ -3560,55 +3571,55 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3560
3571
|
parentPath: u,
|
|
3561
3572
|
path: `${u}/${en}`
|
|
3562
3573
|
},
|
|
3563
|
-
...
|
|
3564
|
-
]), oe.map((
|
|
3565
|
-
const { path: Z, nodeType: ie, name:
|
|
3566
|
-
if (!c && xa(
|
|
3567
|
-
if (!
|
|
3568
|
-
const
|
|
3569
|
-
{ name:
|
|
3574
|
+
...G
|
|
3575
|
+
]), oe.map((V) => {
|
|
3576
|
+
const { path: Z, nodeType: ie, name: Re, items: he } = V, pe = ie === k.FOLDER;
|
|
3577
|
+
if (!c && xa(V)) return null;
|
|
3578
|
+
if (!pe && !t) return;
|
|
3579
|
+
const Fe = Array.isArray(he) && he.length > 0 && he.some((x) => x.nodeType === k.FOLDER || t), be = W.has(Z), H = l === Z, xe = o.has(Z), De = y === Z || Z === `${u}/${en}`, B = n.has(Z), te = s.has(Z), me = g && w && Z === g && pe, Le = f && ((x) => f(x, V)), _e = H ? "bg-control-accent-alpha rounded" : "", Me = me ? [] : T?.(V) ?? [], Ye = R ? $o(
|
|
3580
|
+
{ name: V.name, isFolder: pe },
|
|
3570
3581
|
R,
|
|
3571
3582
|
S
|
|
3572
3583
|
) : void 0;
|
|
3573
|
-
return /* @__PURE__ */ a("div", { className: "cursor-pointer text-secondary", children: /* @__PURE__ */
|
|
3584
|
+
return /* @__PURE__ */ a("div", { className: "cursor-pointer text-secondary", children: /* @__PURE__ */ X("div", { className: "flex flex-col w-full gap-1", "aria-label": "folder", children: [
|
|
3574
3585
|
/* @__PURE__ */ a(
|
|
3575
3586
|
ht,
|
|
3576
3587
|
{
|
|
3577
3588
|
trigger: [Ca.ContextMenu],
|
|
3578
3589
|
className: "w-full h-[32px]",
|
|
3579
3590
|
anchorToMouse: !0,
|
|
3580
|
-
items:
|
|
3581
|
-
children: /* @__PURE__ */
|
|
3591
|
+
items: Me,
|
|
3592
|
+
children: /* @__PURE__ */ X(
|
|
3582
3593
|
"div",
|
|
3583
3594
|
{
|
|
3584
3595
|
style: { paddingLeft: `${O * ni}px` },
|
|
3585
|
-
className:
|
|
3596
|
+
className: Oe(
|
|
3586
3597
|
"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",
|
|
3587
|
-
|
|
3598
|
+
_e
|
|
3588
3599
|
),
|
|
3589
3600
|
"aria-selected": H,
|
|
3590
3601
|
children: [
|
|
3591
|
-
!
|
|
3602
|
+
!De && /* @__PURE__ */ a(
|
|
3592
3603
|
"div",
|
|
3593
3604
|
{
|
|
3594
3605
|
className: "absolute size-full left-0 top-0 z-0",
|
|
3595
|
-
onClick: () => P(
|
|
3606
|
+
onClick: () => P(V)
|
|
3596
3607
|
}
|
|
3597
3608
|
),
|
|
3598
3609
|
/* @__PURE__ */ a(
|
|
3599
3610
|
"div",
|
|
3600
3611
|
{
|
|
3601
3612
|
className: "relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",
|
|
3602
|
-
onClick: () => !
|
|
3603
|
-
children: /* @__PURE__ */
|
|
3604
|
-
|
|
3613
|
+
onClick: () => !De && P(V),
|
|
3614
|
+
children: /* @__PURE__ */ X(Ae, { children: [
|
|
3615
|
+
pe && /* @__PURE__ */ a(
|
|
3605
3616
|
cs,
|
|
3606
3617
|
{
|
|
3607
3618
|
...ti,
|
|
3608
3619
|
className: an(
|
|
3609
3620
|
"flex-shrink-0",
|
|
3610
|
-
|
|
3611
|
-
|
|
3621
|
+
be && "rotate-90 transition-all",
|
|
3622
|
+
B && !Fe && "text-transparent"
|
|
3612
3623
|
)
|
|
3613
3624
|
}
|
|
3614
3625
|
),
|
|
@@ -3616,24 +3627,24 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3616
3627
|
jn,
|
|
3617
3628
|
{
|
|
3618
3629
|
elementId: `${Z}-tree-item`,
|
|
3619
|
-
name:
|
|
3620
|
-
type:
|
|
3621
|
-
loading:
|
|
3630
|
+
name: me ? w : Re,
|
|
3631
|
+
type: pe ? Ue.Folder : Ue.File,
|
|
3632
|
+
loading: xe,
|
|
3622
3633
|
shared: te,
|
|
3623
|
-
sharedIndicatorClassName:
|
|
3634
|
+
sharedIndicatorClassName: Oe(
|
|
3624
3635
|
"group-hover/item:bg-control-accent-alpha-hover",
|
|
3625
3636
|
H && "bg-control-accent-alpha"
|
|
3626
3637
|
),
|
|
3627
3638
|
iconSize: st,
|
|
3628
3639
|
forbiddenSymbolsRegExp: R,
|
|
3629
|
-
forbiddenSymbolsTooltip:
|
|
3630
|
-
...!
|
|
3631
|
-
editing:
|
|
3640
|
+
forbiddenSymbolsTooltip: Ye,
|
|
3641
|
+
...!me && {
|
|
3642
|
+
editing: De,
|
|
3632
3643
|
creating: Z === `${u}/${en}`,
|
|
3633
3644
|
onSave: D,
|
|
3634
3645
|
onCancel: h,
|
|
3635
|
-
validate:
|
|
3636
|
-
onCreateFolderSave:
|
|
3646
|
+
validate: Le,
|
|
3647
|
+
onCreateFolderSave: v,
|
|
3637
3648
|
onCreateFolderCancel: I
|
|
3638
3649
|
}
|
|
3639
3650
|
}
|
|
@@ -3641,12 +3652,12 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3641
3652
|
] })
|
|
3642
3653
|
}
|
|
3643
3654
|
),
|
|
3644
|
-
|
|
3655
|
+
Me.length > 0 && !De && !me && /* @__PURE__ */ a("div", { className: "flex-1 flex justify-end", children: /* @__PURE__ */ a(
|
|
3645
3656
|
ht,
|
|
3646
3657
|
{
|
|
3647
3658
|
placement: "bottom-start",
|
|
3648
3659
|
allowedPlacements: ["top-start", "top-end"],
|
|
3649
|
-
items:
|
|
3660
|
+
items: Me,
|
|
3650
3661
|
className: "sticky right-0",
|
|
3651
3662
|
children: /* @__PURE__ */ a(
|
|
3652
3663
|
pt,
|
|
@@ -3663,7 +3674,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3663
3674
|
)
|
|
3664
3675
|
}
|
|
3665
3676
|
),
|
|
3666
|
-
|
|
3677
|
+
be && (he || V?.path === u) && z(he || [], O + 1, V)
|
|
3667
3678
|
] }) }, `${Z}-children`);
|
|
3668
3679
|
});
|
|
3669
3680
|
};
|
|
@@ -3687,17 +3698,17 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3687
3698
|
onDelete: p,
|
|
3688
3699
|
getCurrentFolderPath: C,
|
|
3689
3700
|
sharedWithMeIds: c,
|
|
3690
|
-
sharedByMePaths:
|
|
3701
|
+
sharedByMePaths: y,
|
|
3691
3702
|
onClearSelection: u,
|
|
3692
|
-
forbiddenSymbolsRegExp:
|
|
3693
|
-
}) =>
|
|
3703
|
+
forbiddenSymbolsRegExp: w
|
|
3704
|
+
}) => j(() => {
|
|
3694
3705
|
const g = [], m = Array.from(e.values());
|
|
3695
3706
|
if (!m.length || !t)
|
|
3696
3707
|
return g;
|
|
3697
|
-
const T = Xn(
|
|
3708
|
+
const T = Xn(w), D = T ? m.some((h) => T.test(h.name)) : !1;
|
|
3698
3709
|
if (t[N.RemoveAccess] && i) {
|
|
3699
3710
|
const h = m.some(
|
|
3700
|
-
(f) => !
|
|
3711
|
+
(f) => !y?.has(f.path)
|
|
3701
3712
|
);
|
|
3702
3713
|
g.push({
|
|
3703
3714
|
key: N.RemoveAccess,
|
|
@@ -3799,8 +3810,8 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3799
3810
|
s,
|
|
3800
3811
|
c,
|
|
3801
3812
|
u,
|
|
3802
|
-
|
|
3803
|
-
|
|
3813
|
+
y,
|
|
3814
|
+
w
|
|
3804
3815
|
]), ii = ({
|
|
3805
3816
|
id: e,
|
|
3806
3817
|
name: t,
|
|
@@ -3813,11 +3824,11 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3813
3824
|
sharedIndicatorClassName: p,
|
|
3814
3825
|
hideTooltip: C = !1,
|
|
3815
3826
|
forbiddenSymbolsRegExp: c,
|
|
3816
|
-
forbiddenSymbolsTooltip:
|
|
3827
|
+
forbiddenSymbolsTooltip: y
|
|
3817
3828
|
}) => /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ a("div", { className: "flex flex-1 min-w-0", children: /* @__PURE__ */ a(
|
|
3818
3829
|
jn,
|
|
3819
3830
|
{
|
|
3820
|
-
type: r === k.FOLDER ?
|
|
3831
|
+
type: r === k.FOLDER ? Ue.Folder : Ue.File,
|
|
3821
3832
|
name: t,
|
|
3822
3833
|
elementId: e,
|
|
3823
3834
|
shared: i,
|
|
@@ -3825,8 +3836,8 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3825
3836
|
sharedIndicatorClassName: p,
|
|
3826
3837
|
hideTooltip: C,
|
|
3827
3838
|
forbiddenSymbolsRegExp: c,
|
|
3828
|
-
forbiddenSymbolsTooltip:
|
|
3829
|
-
details: /* @__PURE__ */
|
|
3839
|
+
forbiddenSymbolsTooltip: y,
|
|
3840
|
+
details: /* @__PURE__ */ X("div", { className: "flex items-center gap-1 dial-tiny-text text-secondary", children: [
|
|
3830
3841
|
/* @__PURE__ */ a("span", { children: r === k.ITEM ? sn(o) : "" }),
|
|
3831
3842
|
n && o && /* @__PURE__ */ a(Un, { size: 2, className: "text-secondary" }),
|
|
3832
3843
|
n ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(
|
|
@@ -3842,7 +3853,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3842
3853
|
] })
|
|
3843
3854
|
}
|
|
3844
3855
|
) }) }), li = (e) => (t, r, o) => ({
|
|
3845
|
-
colId:
|
|
3856
|
+
colId: Ne.Name,
|
|
3846
3857
|
field: "name",
|
|
3847
3858
|
headerName: e,
|
|
3848
3859
|
flex: 1,
|
|
@@ -3854,10 +3865,10 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3854
3865
|
cancelFolderCreation: p,
|
|
3855
3866
|
newFolderTempId: C,
|
|
3856
3867
|
sharedByMePaths: c,
|
|
3857
|
-
selectedPaths:
|
|
3868
|
+
selectedPaths: y,
|
|
3858
3869
|
disabledRowIds: u,
|
|
3859
|
-
filesLoading:
|
|
3860
|
-
} = n.context, g = c?.has(n.data.path), m =
|
|
3870
|
+
filesLoading: w
|
|
3871
|
+
} = n.context, g = c?.has(n.data.path), m = y?.has(n.data.path), T = u?.has(n.data.path) ?? !1, D = Oe([
|
|
3861
3872
|
"group-hover/grid-row:bg-control-accent-alpha-hover",
|
|
3862
3873
|
m && "bg-control-accent-alpha"
|
|
3863
3874
|
]);
|
|
@@ -3866,11 +3877,11 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3866
3877
|
jn,
|
|
3867
3878
|
{
|
|
3868
3879
|
name: n.data.name,
|
|
3869
|
-
type:
|
|
3880
|
+
type: Ue.Folder,
|
|
3870
3881
|
elementId: `new-folder-${n.data.id}`,
|
|
3871
3882
|
editing: !0,
|
|
3872
3883
|
creating: !0,
|
|
3873
|
-
loading:
|
|
3884
|
+
loading: w,
|
|
3874
3885
|
shared: g,
|
|
3875
3886
|
sharedIndicatorClassName: D,
|
|
3876
3887
|
iconSize: st,
|
|
@@ -3879,7 +3890,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3879
3890
|
onCancel: p,
|
|
3880
3891
|
onCreateFolderSave: l,
|
|
3881
3892
|
onCreateFolderCancel: p,
|
|
3882
|
-
inputContainerClassName:
|
|
3893
|
+
inputContainerClassName: Oe([
|
|
3883
3894
|
"!h-9",
|
|
3884
3895
|
o && s === k.ITEM && "!h-10"
|
|
3885
3896
|
])
|
|
@@ -3889,18 +3900,18 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3889
3900
|
renameTriggerView: h,
|
|
3890
3901
|
renamedPath: f,
|
|
3891
3902
|
renamedItem: F,
|
|
3892
|
-
getDisplayName:
|
|
3903
|
+
getDisplayName: v,
|
|
3893
3904
|
onRenameValidate: I,
|
|
3894
3905
|
onRenameSave: R,
|
|
3895
3906
|
onRenameCancel: S
|
|
3896
3907
|
} = n.context;
|
|
3897
3908
|
if (h === Rt.Grid && f === n.data?.path && F && n.data) {
|
|
3898
|
-
const M =
|
|
3909
|
+
const M = v(F);
|
|
3899
3910
|
return /* @__PURE__ */ a(
|
|
3900
3911
|
jn,
|
|
3901
3912
|
{
|
|
3902
3913
|
name: M,
|
|
3903
|
-
type: s === k.FOLDER ?
|
|
3914
|
+
type: s === k.FOLDER ? Ue.Folder : Ue.File,
|
|
3904
3915
|
fileExtension: F.name.split(".").pop(),
|
|
3905
3916
|
elementId: `rename-${n.data.id}`,
|
|
3906
3917
|
editing: !0,
|
|
@@ -3910,7 +3921,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3910
3921
|
validate: (P) => I(P, F),
|
|
3911
3922
|
onSave: R,
|
|
3912
3923
|
onCancel: S,
|
|
3913
|
-
inputContainerClassName:
|
|
3924
|
+
inputContainerClassName: Oe([
|
|
3914
3925
|
"!h-9",
|
|
3915
3926
|
o && s === k.ITEM && "!h-10"
|
|
3916
3927
|
]),
|
|
@@ -3969,7 +3980,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3969
3980
|
);
|
|
3970
3981
|
}
|
|
3971
3982
|
}), ci = (e) => (t, r) => ({
|
|
3972
|
-
colId:
|
|
3983
|
+
colId: Ne.UpdatedAt,
|
|
3973
3984
|
field: "updatedAt",
|
|
3974
3985
|
headerName: e,
|
|
3975
3986
|
width: 168,
|
|
@@ -3990,7 +4001,7 @@ const Gr = 12, Vr = 8, $r = ({ getSelectionLabel: e, onClearSelection: t, action
|
|
|
3990
4001
|
).format(s) : "";
|
|
3991
4002
|
}
|
|
3992
4003
|
}), di = (e) => ({
|
|
3993
|
-
colId:
|
|
4004
|
+
colId: Ne.Size,
|
|
3994
4005
|
field: "size",
|
|
3995
4006
|
headerName: e,
|
|
3996
4007
|
width: 120,
|
|
@@ -4024,27 +4035,27 @@ function hi({
|
|
|
4024
4035
|
rootItemLabel: p,
|
|
4025
4036
|
rootItemPath: C
|
|
4026
4037
|
}) {
|
|
4027
|
-
const c =
|
|
4038
|
+
const c = j(() => [
|
|
4028
4039
|
li("Name")(r, o, s),
|
|
4029
4040
|
{
|
|
4030
|
-
colId:
|
|
4041
|
+
colId: Ne.Path,
|
|
4031
4042
|
field: "path",
|
|
4032
4043
|
headerName: "Path",
|
|
4033
4044
|
flex: 1,
|
|
4034
4045
|
minWidth: 200,
|
|
4035
4046
|
cellRenderer: (u) => {
|
|
4036
|
-
const
|
|
4047
|
+
const w = u.context?.disabledRowIds?.has(u.data.path) ?? !1;
|
|
4037
4048
|
let g = u.data.path;
|
|
4038
4049
|
if (u.context?.hideSearchPathItemName && (u.data.parentPath ? g = u.data.parentPath : g = g.replace(/\/[^/]+\/?$/, "") || "/"), !C || !p)
|
|
4039
|
-
return /* @__PURE__ */ a(It, { text: g, hideTooltip:
|
|
4050
|
+
return /* @__PURE__ */ a(It, { text: g, hideTooltip: w });
|
|
4040
4051
|
const m = g.replace(C, p);
|
|
4041
|
-
return /* @__PURE__ */ a(It, { text: m, hideTooltip:
|
|
4052
|
+
return /* @__PURE__ */ a(It, { text: m, hideTooltip: w });
|
|
4042
4053
|
}
|
|
4043
4054
|
},
|
|
4044
4055
|
ci("Modified Date")(r, o),
|
|
4045
4056
|
di("Size"),
|
|
4046
4057
|
{
|
|
4047
|
-
colId:
|
|
4058
|
+
colId: Ne.Author,
|
|
4048
4059
|
field: "author",
|
|
4049
4060
|
headerName: "Author",
|
|
4050
4061
|
width: 200,
|
|
@@ -4052,7 +4063,7 @@ function hi({
|
|
|
4052
4063
|
cellRenderer: (u) => u.data.author
|
|
4053
4064
|
},
|
|
4054
4065
|
{
|
|
4055
|
-
colId:
|
|
4066
|
+
colId: Ne.Owner,
|
|
4056
4067
|
field: "owner",
|
|
4057
4068
|
headerName: "Owner",
|
|
4058
4069
|
width: 200,
|
|
@@ -4060,16 +4071,16 @@ function hi({
|
|
|
4060
4071
|
cellRenderer: (u) => u.data.owner
|
|
4061
4072
|
}
|
|
4062
4073
|
], [r, o, s, p, C]);
|
|
4063
|
-
return { columnDefs:
|
|
4074
|
+
return { columnDefs: j(() => {
|
|
4064
4075
|
const u = e?.map(
|
|
4065
4076
|
(m) => typeof m == "function" ? m(r, o, s) : m
|
|
4066
4077
|
);
|
|
4067
|
-
let
|
|
4068
|
-
u || (
|
|
4078
|
+
let w = u ?? c;
|
|
4079
|
+
u || (w = w.filter(
|
|
4069
4080
|
(m) => m.colId && n.includes(m.colId)
|
|
4070
|
-
)), l && (s && (
|
|
4071
|
-
const g = (m) => m.colId ===
|
|
4072
|
-
return
|
|
4081
|
+
)), l && (s && (w = w.slice(0, 1)), w.push(i));
|
|
4082
|
+
const g = (m) => m.colId === Ne.Name;
|
|
4083
|
+
return w.map((m) => {
|
|
4073
4084
|
const T = {
|
|
4074
4085
|
...m,
|
|
4075
4086
|
filter: t ? m.filter : !1,
|
|
@@ -4108,9 +4119,9 @@ const pi = () => {
|
|
|
4108
4119
|
onUnshare: p,
|
|
4109
4120
|
onRemoveAccess: C,
|
|
4110
4121
|
sharedWithMeIds: c,
|
|
4111
|
-
sharedByMePaths:
|
|
4122
|
+
sharedByMePaths: y,
|
|
4112
4123
|
onManagePermissions: u,
|
|
4113
|
-
onPreview:
|
|
4124
|
+
onPreview: w,
|
|
4114
4125
|
onOpenInNewTab: g,
|
|
4115
4126
|
previewExtensions: m,
|
|
4116
4127
|
isRenameFileAvailable: T = !0,
|
|
@@ -4118,14 +4129,14 @@ const pi = () => {
|
|
|
4118
4129
|
forbiddenSymbolsRegExp: h,
|
|
4119
4130
|
onGridCreateSiblingFolder: f,
|
|
4120
4131
|
onGridCreateChildFolder: F
|
|
4121
|
-
}) =>
|
|
4132
|
+
}) => j(() => (v) => {
|
|
4122
4133
|
const I = [];
|
|
4123
4134
|
if (!e)
|
|
4124
4135
|
return I;
|
|
4125
4136
|
const R = Xn(
|
|
4126
4137
|
h
|
|
4127
|
-
)?.test(
|
|
4128
|
-
e[N.AddSibling] &&
|
|
4138
|
+
)?.test(v.name);
|
|
4139
|
+
e[N.AddSibling] && v.nodeType === k.FOLDER && I.push({
|
|
4129
4140
|
key: "addSibling",
|
|
4130
4141
|
label: e[N.AddSibling],
|
|
4131
4142
|
icon: /* @__PURE__ */ a(
|
|
@@ -4136,8 +4147,8 @@ const pi = () => {
|
|
|
4136
4147
|
className: "text-secondary"
|
|
4137
4148
|
}
|
|
4138
4149
|
),
|
|
4139
|
-
onClick: () => f([
|
|
4140
|
-
}), e[N.AddChild] &&
|
|
4150
|
+
onClick: () => f([v])
|
|
4151
|
+
}), e[N.AddChild] && v.nodeType === k.FOLDER && !R && I.push(
|
|
4141
4152
|
{
|
|
4142
4153
|
key: "addChild",
|
|
4143
4154
|
label: e[N.AddChild],
|
|
@@ -4149,13 +4160,13 @@ const pi = () => {
|
|
|
4149
4160
|
className: "text-secondary"
|
|
4150
4161
|
}
|
|
4151
4162
|
),
|
|
4152
|
-
onClick: () => F([
|
|
4163
|
+
onClick: () => F([v])
|
|
4153
4164
|
},
|
|
4154
4165
|
{
|
|
4155
4166
|
key: "divider",
|
|
4156
4167
|
type: ba.Divider
|
|
4157
4168
|
}
|
|
4158
|
-
), e[N.OpenInNewTab] && typeof g == "function" &&
|
|
4169
|
+
), e[N.OpenInNewTab] && typeof g == "function" && v.nodeType === k.ITEM && !R && I.push({
|
|
4159
4170
|
key: N.OpenInNewTab,
|
|
4160
4171
|
label: e[N.OpenInNewTab],
|
|
4161
4172
|
icon: /* @__PURE__ */ a(
|
|
@@ -4165,14 +4176,14 @@ const pi = () => {
|
|
|
4165
4176
|
className: "text-secondary"
|
|
4166
4177
|
}
|
|
4167
4178
|
),
|
|
4168
|
-
onClick: () => g?.(
|
|
4179
|
+
onClick: () => g?.(v)
|
|
4169
4180
|
});
|
|
4170
|
-
const S =
|
|
4181
|
+
const S = v.nodeType === k.ITEM || v.nodeType === k.FOLDER && D;
|
|
4171
4182
|
e[N.Duplicate] && S && !R && I.push({
|
|
4172
4183
|
key: N.Duplicate,
|
|
4173
4184
|
label: e[N.Duplicate],
|
|
4174
4185
|
icon: /* @__PURE__ */ a(Oo, { ...A, className: "text-secondary" }),
|
|
4175
|
-
onClick: () => t(
|
|
4186
|
+
onClick: () => t(v)
|
|
4176
4187
|
}), e[N.Copy] && !R && I.push({
|
|
4177
4188
|
key: N.Copy,
|
|
4178
4189
|
label: e[N.Copy],
|
|
@@ -4184,7 +4195,7 @@ const pi = () => {
|
|
|
4184
4195
|
className: "text-secondary"
|
|
4185
4196
|
}
|
|
4186
4197
|
),
|
|
4187
|
-
onClick: () => r(
|
|
4198
|
+
onClick: () => r(v)
|
|
4188
4199
|
}), e[N.Move] && !R && I.push({
|
|
4189
4200
|
key: N.Move,
|
|
4190
4201
|
label: e[N.Move],
|
|
@@ -4196,7 +4207,7 @@ const pi = () => {
|
|
|
4196
4207
|
className: "text-secondary"
|
|
4197
4208
|
}
|
|
4198
4209
|
),
|
|
4199
|
-
onClick: () => o(
|
|
4210
|
+
onClick: () => o(v)
|
|
4200
4211
|
}), e[N.Download] && !R && I.push({
|
|
4201
4212
|
key: N.Download,
|
|
4202
4213
|
label: e[N.Download],
|
|
@@ -4207,8 +4218,8 @@ const pi = () => {
|
|
|
4207
4218
|
className: "text-secondary"
|
|
4208
4219
|
}
|
|
4209
4220
|
),
|
|
4210
|
-
onClick: () => n(
|
|
4211
|
-
}), e[N.ManagePermissions] && typeof u == "function" &&
|
|
4221
|
+
onClick: () => n(v)
|
|
4222
|
+
}), e[N.ManagePermissions] && typeof u == "function" && v.nodeType === k.FOLDER && !R && I.push({
|
|
4212
4223
|
key: N.ManagePermissions,
|
|
4213
4224
|
label: e[N.ManagePermissions],
|
|
4214
4225
|
icon: /* @__PURE__ */ a(
|
|
@@ -4218,16 +4229,16 @@ const pi = () => {
|
|
|
4218
4229
|
className: "text-secondary"
|
|
4219
4230
|
}
|
|
4220
4231
|
),
|
|
4221
|
-
onClick: () => u?.(
|
|
4232
|
+
onClick: () => u?.(v.path)
|
|
4222
4233
|
});
|
|
4223
|
-
const L =
|
|
4224
|
-
e[N.Preview] && typeof
|
|
4234
|
+
const L = v.name.split("."), W = L.length > 1 ? L[L.length - 1] : "", M = W && m?.includes(`.${W}`);
|
|
4235
|
+
e[N.Preview] && typeof w == "function" && v.nodeType === k.ITEM && M && !R && I.push({
|
|
4225
4236
|
key: N.Preview,
|
|
4226
4237
|
label: e[N.Preview],
|
|
4227
4238
|
icon: /* @__PURE__ */ a(Ao, { ...A, className: "text-secondary" }),
|
|
4228
|
-
onClick: () =>
|
|
4239
|
+
onClick: () => w?.(v.path)
|
|
4229
4240
|
});
|
|
4230
|
-
const P = !
|
|
4241
|
+
const P = !v.permissions || v.permissions.includes(St.WRITE);
|
|
4231
4242
|
e[N.Delete] && P && I.push({
|
|
4232
4243
|
key: N.Delete,
|
|
4233
4244
|
label: e[N.Delete],
|
|
@@ -4238,9 +4249,9 @@ const pi = () => {
|
|
|
4238
4249
|
className: "text-secondary"
|
|
4239
4250
|
}
|
|
4240
4251
|
),
|
|
4241
|
-
onClick: () => l(
|
|
4252
|
+
onClick: () => l(v, v.parentPath ?? "")
|
|
4242
4253
|
});
|
|
4243
|
-
const z =
|
|
4254
|
+
const z = v.nodeType === k.FOLDER || v.nodeType === k.ITEM && T;
|
|
4244
4255
|
return e[N.Rename] && z && P && I.push({
|
|
4245
4256
|
key: N.Rename,
|
|
4246
4257
|
label: e[N.Rename],
|
|
@@ -4251,8 +4262,8 @@ const pi = () => {
|
|
|
4251
4262
|
className: "text-secondary"
|
|
4252
4263
|
}
|
|
4253
4264
|
),
|
|
4254
|
-
onClick: () => s(
|
|
4255
|
-
}), e[N.Info] &&
|
|
4265
|
+
onClick: () => s(v.path)
|
|
4266
|
+
}), e[N.Info] && v.nodeType === k.ITEM && !R && I.push({
|
|
4256
4267
|
key: N.Info,
|
|
4257
4268
|
label: e[N.Info],
|
|
4258
4269
|
icon: /* @__PURE__ */ a(
|
|
@@ -4262,8 +4273,8 @@ const pi = () => {
|
|
|
4262
4273
|
className: "text-secondary"
|
|
4263
4274
|
}
|
|
4264
4275
|
),
|
|
4265
|
-
onClick: () => i(
|
|
4266
|
-
}), e[N.Unshare] && c?.includes(
|
|
4276
|
+
onClick: () => i(v)
|
|
4277
|
+
}), e[N.Unshare] && c?.includes(v.path) && I.push({
|
|
4267
4278
|
key: N.Unshare,
|
|
4268
4279
|
label: e[N.Unshare],
|
|
4269
4280
|
icon: /* @__PURE__ */ a(
|
|
@@ -4274,8 +4285,8 @@ const pi = () => {
|
|
|
4274
4285
|
className: "text-secondary"
|
|
4275
4286
|
}
|
|
4276
4287
|
),
|
|
4277
|
-
onClick: () => p(
|
|
4278
|
-
}), e[N.RemoveAccess] &&
|
|
4288
|
+
onClick: () => p(v)
|
|
4289
|
+
}), e[N.RemoveAccess] && y?.has(v.path) && C && I.push({
|
|
4279
4290
|
key: N.RemoveAccess,
|
|
4280
4291
|
label: e[N.RemoveAccess],
|
|
4281
4292
|
icon: /* @__PURE__ */ a(
|
|
@@ -4285,7 +4296,7 @@ const pi = () => {
|
|
|
4285
4296
|
className: "text-secondary"
|
|
4286
4297
|
}
|
|
4287
4298
|
),
|
|
4288
|
-
onClick: () => C(
|
|
4299
|
+
onClick: () => C(v)
|
|
4289
4300
|
}), I;
|
|
4290
4301
|
}, [
|
|
4291
4302
|
e,
|
|
@@ -4299,9 +4310,9 @@ const pi = () => {
|
|
|
4299
4310
|
p,
|
|
4300
4311
|
C,
|
|
4301
4312
|
c,
|
|
4302
|
-
v,
|
|
4303
|
-
u,
|
|
4304
4313
|
y,
|
|
4314
|
+
u,
|
|
4315
|
+
w,
|
|
4305
4316
|
g,
|
|
4306
4317
|
m,
|
|
4307
4318
|
T,
|
|
@@ -4358,9 +4369,9 @@ const pi = () => {
|
|
|
4358
4369
|
gridOptions: p,
|
|
4359
4370
|
toolbarOptions: C,
|
|
4360
4371
|
bulkActionsToolbarOptions: c,
|
|
4361
|
-
deleteConfirmationOptions:
|
|
4372
|
+
deleteConfirmationOptions: y,
|
|
4362
4373
|
destinationFolderPopupOptions: u,
|
|
4363
|
-
conflictResolutionPopupOptions:
|
|
4374
|
+
conflictResolutionPopupOptions: w,
|
|
4364
4375
|
compactViewWidthBreakpoint: g = er,
|
|
4365
4376
|
customBreakpointRef: m,
|
|
4366
4377
|
sharedByMePaths: T,
|
|
@@ -4368,7 +4379,7 @@ const pi = () => {
|
|
|
4368
4379
|
maxSelectableFileSize: h,
|
|
4369
4380
|
areHiddenFilesVisible: f,
|
|
4370
4381
|
toggleHiddenFilesVisibility: F,
|
|
4371
|
-
isTreeCollapsed:
|
|
4382
|
+
isTreeCollapsed: v,
|
|
4372
4383
|
toggleTreeCollapse: I,
|
|
4373
4384
|
currentPath: R,
|
|
4374
4385
|
gridRows: S,
|
|
@@ -4377,39 +4388,39 @@ const pi = () => {
|
|
|
4377
4388
|
clearSelection: M,
|
|
4378
4389
|
setSelectedPaths: P,
|
|
4379
4390
|
effectiveSearchValue: z,
|
|
4380
|
-
handleBreadcrumbItemClick:
|
|
4391
|
+
handleBreadcrumbItemClick: G,
|
|
4381
4392
|
handleSearchChange: O,
|
|
4382
|
-
handleTreeItemClick:
|
|
4393
|
+
handleTreeItemClick: K,
|
|
4383
4394
|
handleTableRowClick: oe,
|
|
4384
|
-
handleSelectionClick:
|
|
4395
|
+
handleSelectionClick: V,
|
|
4385
4396
|
onGridApiChange: Z,
|
|
4386
4397
|
handleOpenDestinationFolderPopup: ie,
|
|
4387
|
-
handleCloseDestinationFolderPopup:
|
|
4388
|
-
openDestinationFolderPopup:
|
|
4389
|
-
destinationFolderMode:
|
|
4390
|
-
handleSetCopiedFiles:
|
|
4391
|
-
handleSetMovedFiles:
|
|
4398
|
+
handleCloseDestinationFolderPopup: Re,
|
|
4399
|
+
openDestinationFolderPopup: he,
|
|
4400
|
+
destinationFolderMode: pe,
|
|
4401
|
+
handleSetCopiedFiles: Fe,
|
|
4402
|
+
handleSetMovedFiles: be,
|
|
4392
4403
|
handleDuplicate: H,
|
|
4393
|
-
handleCopyTo:
|
|
4394
|
-
handleMoveTo:
|
|
4395
|
-
handleGridAddSibling:
|
|
4404
|
+
handleCopyTo: xe,
|
|
4405
|
+
handleMoveTo: De,
|
|
4406
|
+
handleGridAddSibling: B,
|
|
4396
4407
|
handleGridAddChild: te,
|
|
4397
|
-
handleTreeAddSibling:
|
|
4398
|
-
handleTreeAddChild:
|
|
4399
|
-
handleDownloadFiles:
|
|
4400
|
-
openDeleteConfirmation:
|
|
4401
|
-
closeDeleteConfirmation:
|
|
4402
|
-
confirmDelete:
|
|
4403
|
-
deleteConfirmationOpen:
|
|
4404
|
-
itemsToDelete:
|
|
4405
|
-
renamedPath:
|
|
4406
|
-
renamedItem:
|
|
4407
|
-
onRename:
|
|
4408
|
-
onRenameSave:
|
|
4409
|
-
onRenameCancel:
|
|
4410
|
-
onRenameValidate:
|
|
4411
|
-
createdFolderPath:
|
|
4412
|
-
forbiddenSymbolsRegExp:
|
|
4408
|
+
handleTreeAddSibling: me,
|
|
4409
|
+
handleTreeAddChild: Le,
|
|
4410
|
+
handleDownloadFiles: _e,
|
|
4411
|
+
openDeleteConfirmation: Me,
|
|
4412
|
+
closeDeleteConfirmation: Ye,
|
|
4413
|
+
confirmDelete: x,
|
|
4414
|
+
deleteConfirmationOpen: $,
|
|
4415
|
+
itemsToDelete: U,
|
|
4416
|
+
renamedPath: q,
|
|
4417
|
+
renamedItem: J,
|
|
4418
|
+
onRename: Ce,
|
|
4419
|
+
onRenameSave: Ie,
|
|
4420
|
+
onRenameCancel: Te,
|
|
4421
|
+
onRenameValidate: ye,
|
|
4422
|
+
createdFolderPath: ae,
|
|
4423
|
+
forbiddenSymbolsRegExp: Ee,
|
|
4413
4424
|
forbiddenSymbolsTooltip: ft,
|
|
4414
4425
|
getDisplayName: cn,
|
|
4415
4426
|
isDragging: rt,
|
|
@@ -4428,12 +4439,12 @@ const pi = () => {
|
|
|
4428
4439
|
cancelFolderCreation: Qe,
|
|
4429
4440
|
saveFolderCreation: gt,
|
|
4430
4441
|
validateFolderName: mn,
|
|
4431
|
-
startFolderCreation:
|
|
4432
|
-
conflictingFiles:
|
|
4442
|
+
startFolderCreation: $e,
|
|
4443
|
+
conflictingFiles: we,
|
|
4433
4444
|
conflictResolutionOpen: Pt,
|
|
4434
4445
|
handleConflictReplace: Cn,
|
|
4435
|
-
handleConflictDuplicate:
|
|
4436
|
-
handleConflictCancel:
|
|
4446
|
+
handleConflictDuplicate: je,
|
|
4447
|
+
handleConflictCancel: Ze,
|
|
4437
4448
|
handleConflictDecideForEach: it,
|
|
4438
4449
|
uploadConflictingFiles: gn,
|
|
4439
4450
|
uploadConflictResolutionOpen: Je,
|
|
@@ -4442,8 +4453,8 @@ const pi = () => {
|
|
|
4442
4453
|
handleUploadConflictCancel: to,
|
|
4443
4454
|
handleUploadConflictDecideForEach: no,
|
|
4444
4455
|
openMetadataPopup: ue,
|
|
4445
|
-
fileMetadataPopupOptions:
|
|
4446
|
-
isMetadataPopupOpen:
|
|
4456
|
+
fileMetadataPopupOptions: Pe,
|
|
4457
|
+
isMetadataPopupOpen: Xe,
|
|
4447
4458
|
selectedFileForMetadata: Ot,
|
|
4448
4459
|
closeMetadataPopup: Mt,
|
|
4449
4460
|
onUnshareFiles: et,
|
|
@@ -4472,22 +4483,22 @@ const pi = () => {
|
|
|
4472
4483
|
showCreateFolderButtonInDestinationPopup: bn,
|
|
4473
4484
|
newFolderDefaultName: se
|
|
4474
4485
|
} = pi(), {
|
|
4475
|
-
width:
|
|
4476
|
-
header:
|
|
4486
|
+
width: ze = Xs,
|
|
4487
|
+
header: ke = Ks,
|
|
4477
4488
|
containerClassName: Dn = $s,
|
|
4478
4489
|
additionalButtons: Tn,
|
|
4479
4490
|
...xn
|
|
4480
|
-
} = s ?? {}, [bt, In] = _(
|
|
4491
|
+
} = s ?? {}, [bt, In] = _(ze), { renameTriggerView: nt, onGridRename: uo, onTreeRename: Rn } = ar({ onRename: Ce }), {
|
|
4481
4492
|
createFolderTriggerView: Fn,
|
|
4482
4493
|
onGridCreateSiblingFolder: ho,
|
|
4483
4494
|
onTreeCreateSiblingFolder: En,
|
|
4484
4495
|
onGridCreateChildFolder: po,
|
|
4485
4496
|
onTreeCreateChildFolder: Sn
|
|
4486
4497
|
} = mi({
|
|
4487
|
-
onGridAddSibling:
|
|
4498
|
+
onGridAddSibling: B,
|
|
4488
4499
|
onGridAddChild: te,
|
|
4489
|
-
onTreeAddSibling:
|
|
4490
|
-
onTreeAddChild:
|
|
4500
|
+
onTreeAddSibling: me,
|
|
4501
|
+
onTreeAddChild: Le
|
|
4491
4502
|
}), Wt = de(null), fo = (b) => {
|
|
4492
4503
|
Wt.current === null && (Wt.current = requestAnimationFrame(() => {
|
|
4493
4504
|
In(b), Wt.current = null;
|
|
@@ -4502,13 +4513,13 @@ const pi = () => {
|
|
|
4502
4513
|
visibleColumns: On = tr,
|
|
4503
4514
|
allowDisabledContextMenu: Dt = !1,
|
|
4504
4515
|
...ot
|
|
4505
|
-
} = p ?? {}, { containerRef: yo, isBelowBreakpoint:
|
|
4516
|
+
} = p ?? {}, { containerRef: yo, isBelowBreakpoint: We } = sr(
|
|
4506
4517
|
g,
|
|
4507
4518
|
m
|
|
4508
|
-
), wo =
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4519
|
+
), wo = j(() => tt ? [
|
|
4520
|
+
Ne.Name,
|
|
4521
|
+
Ne.Path,
|
|
4522
|
+
Ne.Actions
|
|
4512
4523
|
] : On, [tt, On]), Ht = d(
|
|
4513
4524
|
(b, ee, le) => fr(
|
|
4514
4525
|
b,
|
|
@@ -4521,17 +4532,17 @@ const pi = () => {
|
|
|
4521
4532
|
), Tt = d(
|
|
4522
4533
|
(b, ee, le) => !!kt?.(b) || !!Ht(b, ee, le),
|
|
4523
4534
|
[Ht, kt]
|
|
4524
|
-
), ct =
|
|
4535
|
+
), ct = j(() => {
|
|
4525
4536
|
const b = /* @__PURE__ */ new Set();
|
|
4526
4537
|
for (const ee of S)
|
|
4527
4538
|
Tt(ee, D, h) && b.add(ee.path);
|
|
4528
4539
|
return b;
|
|
4529
4540
|
}, [D, h, S, Tt]), Bt = d(
|
|
4530
4541
|
(b) => {
|
|
4531
|
-
const ee = [], le = [],
|
|
4542
|
+
const ee = [], le = [], Se = !b.parentPath, at = Ee?.test(
|
|
4532
4543
|
b.name
|
|
4533
4544
|
);
|
|
4534
|
-
return s?.actionLabels && (s.actionLabels[N.AddSibling] && b.nodeType === k.FOLDER && !
|
|
4545
|
+
return s?.actionLabels && (s.actionLabels[N.AddSibling] && b.nodeType === k.FOLDER && !Se && ee.push({
|
|
4535
4546
|
key: "addSibling",
|
|
4536
4547
|
label: s.actionLabels[N.AddSibling],
|
|
4537
4548
|
icon: /* @__PURE__ */ a(
|
|
@@ -4555,7 +4566,7 @@ const pi = () => {
|
|
|
4555
4566
|
}
|
|
4556
4567
|
),
|
|
4557
4568
|
onClick: () => Sn([b])
|
|
4558
|
-
}), s.actionLabels[N.Duplicate] && !
|
|
4569
|
+
}), s.actionLabels[N.Duplicate] && !Se && !at && le.push({
|
|
4559
4570
|
key: "duplicate",
|
|
4560
4571
|
label: s.actionLabels[N.Duplicate],
|
|
4561
4572
|
icon: /* @__PURE__ */ a(
|
|
@@ -4566,8 +4577,8 @@ const pi = () => {
|
|
|
4566
4577
|
}
|
|
4567
4578
|
),
|
|
4568
4579
|
onClick: () => H([b])
|
|
4569
|
-
}), s.actionLabels[N.Copy] && !
|
|
4570
|
-
key:
|
|
4580
|
+
}), s.actionLabels[N.Copy] && !Se && !at && le.push({
|
|
4581
|
+
key: ve.Copy,
|
|
4571
4582
|
label: s.actionLabels[N.Copy],
|
|
4572
4583
|
icon: /* @__PURE__ */ a(
|
|
4573
4584
|
Bo,
|
|
@@ -4578,10 +4589,10 @@ const pi = () => {
|
|
|
4578
4589
|
}
|
|
4579
4590
|
),
|
|
4580
4591
|
onClick: () => {
|
|
4581
|
-
|
|
4592
|
+
Fe([b]), ie(ve.Copy);
|
|
4582
4593
|
}
|
|
4583
|
-
}), s.actionLabels[N.Move] && !
|
|
4584
|
-
key:
|
|
4594
|
+
}), s.actionLabels[N.Move] && !Se && !at && le.push({
|
|
4595
|
+
key: ve.Move,
|
|
4585
4596
|
label: s.actionLabels[N.Move],
|
|
4586
4597
|
icon: /* @__PURE__ */ a(
|
|
4587
4598
|
Uo,
|
|
@@ -4592,9 +4603,9 @@ const pi = () => {
|
|
|
4592
4603
|
}
|
|
4593
4604
|
),
|
|
4594
4605
|
onClick: () => {
|
|
4595
|
-
|
|
4606
|
+
be([b]), ie(ve.Move);
|
|
4596
4607
|
}
|
|
4597
|
-
}), s.actionLabels[N.Download] && !
|
|
4608
|
+
}), s.actionLabels[N.Download] && !Se && !at && le.push({
|
|
4598
4609
|
key: "download",
|
|
4599
4610
|
label: s.actionLabels[N.Download],
|
|
4600
4611
|
icon: /* @__PURE__ */ a(
|
|
@@ -4604,8 +4615,8 @@ const pi = () => {
|
|
|
4604
4615
|
className: "text-secondary"
|
|
4605
4616
|
}
|
|
4606
4617
|
),
|
|
4607
|
-
onClick: () =>
|
|
4608
|
-
}), s.actionLabels[N.ManagePermissions] && typeof wt == "function" && b.nodeType === k.FOLDER && !
|
|
4618
|
+
onClick: () => _e([b])
|
|
4619
|
+
}), s.actionLabels[N.ManagePermissions] && typeof wt == "function" && b.nodeType === k.FOLDER && !Se && le.push({
|
|
4609
4620
|
key: N.ManagePermissions,
|
|
4610
4621
|
label: s.actionLabels[N.ManagePermissions],
|
|
4611
4622
|
icon: /* @__PURE__ */ a(
|
|
@@ -4616,7 +4627,7 @@ const pi = () => {
|
|
|
4616
4627
|
}
|
|
4617
4628
|
),
|
|
4618
4629
|
onClick: () => wt?.(b.path)
|
|
4619
|
-
}), s.actionLabels[N.Delete] && b.permissions?.includes(St.WRITE) && !
|
|
4630
|
+
}), s.actionLabels[N.Delete] && b.permissions?.includes(St.WRITE) && !Se && le.push({
|
|
4620
4631
|
key: "delete",
|
|
4621
4632
|
label: s.actionLabels[N.Delete],
|
|
4622
4633
|
icon: /* @__PURE__ */ a(
|
|
@@ -4626,8 +4637,8 @@ const pi = () => {
|
|
|
4626
4637
|
className: "text-secondary"
|
|
4627
4638
|
}
|
|
4628
4639
|
),
|
|
4629
|
-
onClick: () =>
|
|
4630
|
-
}), s.actionLabels[N.Rename] && !
|
|
4640
|
+
onClick: () => Me([b], b.parentPath ?? "")
|
|
4641
|
+
}), s.actionLabels[N.Rename] && !Se && le.push({
|
|
4631
4642
|
key: "rename",
|
|
4632
4643
|
label: s.actionLabels[N.Rename],
|
|
4633
4644
|
icon: /* @__PURE__ */ a(
|
|
@@ -4638,7 +4649,7 @@ const pi = () => {
|
|
|
4638
4649
|
}
|
|
4639
4650
|
),
|
|
4640
4651
|
onClick: () => Rn(b.path)
|
|
4641
|
-
}), s.actionLabels[N.Unshare] && yt?.includes(b.path) && !
|
|
4652
|
+
}), s.actionLabels[N.Unshare] && yt?.includes(b.path) && !Se && le.push({
|
|
4642
4653
|
key: "unshare",
|
|
4643
4654
|
label: s.actionLabels[N.Unshare],
|
|
4644
4655
|
icon: /* @__PURE__ */ a(
|
|
@@ -4650,7 +4661,7 @@ const pi = () => {
|
|
|
4650
4661
|
}
|
|
4651
4662
|
),
|
|
4652
4663
|
onClick: () => et?.([b])
|
|
4653
|
-
}), s.actionLabels[N.RemoveAccess] && T?.has(b.path) && !
|
|
4664
|
+
}), s.actionLabels[N.RemoveAccess] && T?.has(b.path) && !Se && le.push({
|
|
4654
4665
|
key: N.RemoveAccess,
|
|
4655
4666
|
label: s.actionLabels[N.RemoveAccess],
|
|
4656
4667
|
icon: /* @__PURE__ */ a(
|
|
@@ -4669,55 +4680,55 @@ const pi = () => {
|
|
|
4669
4680
|
},
|
|
4670
4681
|
[
|
|
4671
4682
|
s?.actionLabels,
|
|
4672
|
-
|
|
4683
|
+
Ee,
|
|
4673
4684
|
wt,
|
|
4674
4685
|
H,
|
|
4675
|
-
|
|
4686
|
+
Fe,
|
|
4676
4687
|
ie,
|
|
4677
|
-
|
|
4678
|
-
|
|
4688
|
+
be,
|
|
4689
|
+
_e,
|
|
4679
4690
|
Rn,
|
|
4680
4691
|
et,
|
|
4681
4692
|
vt,
|
|
4682
4693
|
yt,
|
|
4683
4694
|
T,
|
|
4684
|
-
|
|
4695
|
+
Me,
|
|
4685
4696
|
Sn,
|
|
4686
4697
|
En
|
|
4687
4698
|
]
|
|
4688
|
-
), Mn =
|
|
4699
|
+
), Mn = j(() => {
|
|
4689
4700
|
const b = /* @__PURE__ */ new Set();
|
|
4690
4701
|
return W.forEach((ee, le) => b.add(le)), b;
|
|
4691
4702
|
}, [W]), Ut = d(
|
|
4692
4703
|
(b, ee) => {
|
|
4693
|
-
P(b),
|
|
4704
|
+
P(b), V?.(ee);
|
|
4694
4705
|
},
|
|
4695
|
-
[
|
|
4706
|
+
[V, P]
|
|
4696
4707
|
), kn = ri({
|
|
4697
4708
|
selectedFiles: W,
|
|
4698
4709
|
actionLabels: c?.actionLabels,
|
|
4699
4710
|
onDuplicate: H,
|
|
4700
4711
|
onCopy: (b) => {
|
|
4701
|
-
|
|
4712
|
+
Fe(b), ie(ve.Copy);
|
|
4702
4713
|
},
|
|
4703
4714
|
onMove: (b) => {
|
|
4704
|
-
|
|
4715
|
+
be(b), ie(ve.Move);
|
|
4705
4716
|
},
|
|
4706
|
-
onDownload:
|
|
4707
|
-
onDelete:
|
|
4717
|
+
onDownload: _e,
|
|
4718
|
+
onDelete: Me,
|
|
4708
4719
|
onUnshare: et,
|
|
4709
4720
|
onRemoveAccess: vt,
|
|
4710
4721
|
getCurrentFolderPath: () => R ?? "/",
|
|
4711
4722
|
sharedWithMeIds: yt,
|
|
4712
4723
|
sharedByMePaths: T,
|
|
4713
4724
|
onClearSelection: M,
|
|
4714
|
-
forbiddenSymbolsRegExp:
|
|
4725
|
+
forbiddenSymbolsRegExp: Ee
|
|
4715
4726
|
}), Gt = d(
|
|
4716
4727
|
(b) => {
|
|
4717
4728
|
C?.onTabChange?.(b), Qe();
|
|
4718
4729
|
},
|
|
4719
4730
|
[C, Qe]
|
|
4720
|
-
), No = d(() => C && L.size === 0 ? /* @__PURE__ */
|
|
4731
|
+
), No = d(() => C && L.size === 0 ? /* @__PURE__ */ X(
|
|
4721
4732
|
"div",
|
|
4722
4733
|
{
|
|
4723
4734
|
className: sa,
|
|
@@ -4772,11 +4783,11 @@ const pi = () => {
|
|
|
4772
4783
|
ms(
|
|
4773
4784
|
oo,
|
|
4774
4785
|
() => ({
|
|
4775
|
-
createFolder:
|
|
4786
|
+
createFolder: $e
|
|
4776
4787
|
}),
|
|
4777
|
-
[
|
|
4788
|
+
[$e]
|
|
4778
4789
|
);
|
|
4779
|
-
const bo = d(() =>
|
|
4790
|
+
const bo = d(() => We ? null : /* @__PURE__ */ a("div", { className: "min-h-0 min-w-0 h-full flex-none", children: /* @__PURE__ */ a(
|
|
4780
4791
|
zs,
|
|
4781
4792
|
{
|
|
4782
4793
|
defaultWidth: bt,
|
|
@@ -4785,17 +4796,17 @@ const pi = () => {
|
|
|
4785
4796
|
onResize: fo,
|
|
4786
4797
|
minWidth: Ys,
|
|
4787
4798
|
maxWidth: Qs,
|
|
4788
|
-
enabled: !
|
|
4799
|
+
enabled: !v,
|
|
4789
4800
|
children: /* @__PURE__ */ a(
|
|
4790
4801
|
Ws,
|
|
4791
4802
|
{
|
|
4792
4803
|
width: bt,
|
|
4793
|
-
title:
|
|
4804
|
+
title: ke,
|
|
4794
4805
|
ariaLabel: "File Manager Tree Navigation",
|
|
4795
4806
|
className: Dn,
|
|
4796
4807
|
titleClassName: "dial-body-text text-primary",
|
|
4797
4808
|
additionalButtons: Tn,
|
|
4798
|
-
isOpened: !
|
|
4809
|
+
isOpened: !v,
|
|
4799
4810
|
onToggle: I,
|
|
4800
4811
|
children: /* @__PURE__ */ a(
|
|
4801
4812
|
si,
|
|
@@ -4806,16 +4817,16 @@ const pi = () => {
|
|
|
4806
4817
|
rootItemLabel: o?.label,
|
|
4807
4818
|
selectedPath: R,
|
|
4808
4819
|
sharedByMePaths: T,
|
|
4809
|
-
forbiddenSymbolsRegExp:
|
|
4820
|
+
forbiddenSymbolsRegExp: Ee,
|
|
4810
4821
|
forbiddenSymbolsTooltip: ft,
|
|
4811
|
-
onItemClick:
|
|
4822
|
+
onItemClick: K,
|
|
4812
4823
|
areHiddenFilesVisible: f,
|
|
4813
4824
|
getContextMenuItems: Bt,
|
|
4814
|
-
renamedPath: nt === Rt.Tree ?
|
|
4815
|
-
onRenameSave:
|
|
4816
|
-
onRenameCancel:
|
|
4817
|
-
onRenameValidate:
|
|
4818
|
-
createdFolderPath: Fn === ut.Tree ?
|
|
4825
|
+
renamedPath: nt === Rt.Tree ? q : void 0,
|
|
4826
|
+
onRenameSave: Ie,
|
|
4827
|
+
onRenameCancel: Te,
|
|
4828
|
+
onRenameValidate: ye,
|
|
4829
|
+
createdFolderPath: Fn === ut.Tree ? ae : null,
|
|
4819
4830
|
onCreateFolderCancel: Qe,
|
|
4820
4831
|
onCreateFolderSave: gt,
|
|
4821
4832
|
newFolderDefaultName: se
|
|
@@ -4825,10 +4836,10 @@ const pi = () => {
|
|
|
4825
4836
|
)
|
|
4826
4837
|
}
|
|
4827
4838
|
) }), [
|
|
4828
|
-
|
|
4839
|
+
We,
|
|
4829
4840
|
bt,
|
|
4830
|
-
|
|
4831
|
-
|
|
4841
|
+
v,
|
|
4842
|
+
ke,
|
|
4832
4843
|
Dn,
|
|
4833
4844
|
Tn,
|
|
4834
4845
|
I,
|
|
@@ -4838,18 +4849,18 @@ const pi = () => {
|
|
|
4838
4849
|
o?.label,
|
|
4839
4850
|
R,
|
|
4840
4851
|
T,
|
|
4841
|
-
|
|
4852
|
+
Ee,
|
|
4842
4853
|
ft,
|
|
4843
|
-
|
|
4854
|
+
K,
|
|
4844
4855
|
f,
|
|
4845
4856
|
Bt,
|
|
4846
4857
|
nt,
|
|
4847
4858
|
Fn,
|
|
4848
|
-
|
|
4849
|
-
|
|
4859
|
+
q,
|
|
4860
|
+
Ie,
|
|
4861
|
+
Te,
|
|
4862
|
+
ye,
|
|
4850
4863
|
ae,
|
|
4851
|
-
Ve,
|
|
4852
|
-
$e,
|
|
4853
4864
|
Qe,
|
|
4854
4865
|
gt,
|
|
4855
4866
|
se
|
|
@@ -4857,14 +4868,14 @@ const pi = () => {
|
|
|
4857
4868
|
actionLabels: p?.actionLabels,
|
|
4858
4869
|
onDuplicate: (b) => H([b]),
|
|
4859
4870
|
onCopy: (b) => {
|
|
4860
|
-
|
|
4871
|
+
Fe([b]), ie(ve.Copy);
|
|
4861
4872
|
},
|
|
4862
4873
|
onMove: (b) => {
|
|
4863
|
-
|
|
4874
|
+
be([b]), ie(ve.Move);
|
|
4864
4875
|
},
|
|
4865
|
-
onDownload: (b) =>
|
|
4876
|
+
onDownload: (b) => _e([b]),
|
|
4866
4877
|
onRename: uo,
|
|
4867
|
-
onDelete: (b, ee) =>
|
|
4878
|
+
onDelete: (b, ee) => Me([b], ee),
|
|
4868
4879
|
onInfo: (b) => ue(b),
|
|
4869
4880
|
onUnshare: (b) => et?.([b]),
|
|
4870
4881
|
onRemoveAccess: (b) => vt?.([b]),
|
|
@@ -4876,12 +4887,12 @@ const pi = () => {
|
|
|
4876
4887
|
previewExtensions: io,
|
|
4877
4888
|
isRenameFileAvailable: lo,
|
|
4878
4889
|
isDuplicateFolderAvailable: co,
|
|
4879
|
-
forbiddenSymbolsRegExp:
|
|
4890
|
+
forbiddenSymbolsRegExp: Ee,
|
|
4880
4891
|
onGridCreateSiblingFolder: ho,
|
|
4881
4892
|
onGridCreateChildFolder: po
|
|
4882
4893
|
}), Vt = d(
|
|
4883
4894
|
(b) => {
|
|
4884
|
-
const ee =
|
|
4895
|
+
const ee = qe(r, b.path);
|
|
4885
4896
|
return ee ? Ln(ee) : [];
|
|
4886
4897
|
},
|
|
4887
4898
|
[r, Ln]
|
|
@@ -4892,25 +4903,25 @@ const pi = () => {
|
|
|
4892
4903
|
getContextMenuItems: Vt,
|
|
4893
4904
|
isRowDisabled: Do,
|
|
4894
4905
|
allowedFileTypes: D,
|
|
4895
|
-
buttonClassName:
|
|
4906
|
+
buttonClassName: We ? "" : Zs
|
|
4896
4907
|
}), { columnDefs: $t } = hi({
|
|
4897
4908
|
userColumnDefs: mo,
|
|
4898
4909
|
filterable: Co,
|
|
4899
4910
|
dateLocale: go,
|
|
4900
4911
|
dateOptions: vo,
|
|
4901
4912
|
effectiveVisibleColumns: wo,
|
|
4902
|
-
isCompactView:
|
|
4913
|
+
isCompactView: We,
|
|
4903
4914
|
hasActions: !!p?.actionLabels,
|
|
4904
4915
|
actionsColumnDef: To,
|
|
4905
4916
|
rootItemLabel: o?.label,
|
|
4906
4917
|
rootItemPath: o?.path
|
|
4907
4918
|
}), _n = d(
|
|
4908
4919
|
(b) => {
|
|
4909
|
-
b.colDef.colId === Hs || b.colDef.colId === Js || b.colDef.colId ===
|
|
4920
|
+
b.colDef.colId === Hs || b.colDef.colId === Js || b.colDef.colId === Ne.Actions || q && b.data?.path === q || b.data?.isTemporary || _t && _t.includes(
|
|
4910
4921
|
b.colDef.colId
|
|
4911
4922
|
) || b.data && oe(b.data);
|
|
4912
4923
|
},
|
|
4913
|
-
[
|
|
4924
|
+
[q, oe, _t]
|
|
4914
4925
|
), dt = d(
|
|
4915
4926
|
() => /* @__PURE__ */ a(
|
|
4916
4927
|
wa,
|
|
@@ -4931,14 +4942,14 @@ const pi = () => {
|
|
|
4931
4942
|
}
|
|
4932
4943
|
),
|
|
4933
4944
|
[wn, lt, yn]
|
|
4934
|
-
), zn =
|
|
4945
|
+
), zn = j(() => (b) => b.path, []), Wn = j(
|
|
4935
4946
|
() => an(
|
|
4936
4947
|
"min-h-[248px] overflow-auto md:min-h-[266px]",
|
|
4937
4948
|
rt ? "border border-dashed border-info" : "",
|
|
4938
4949
|
mt && !rt ? "border border-dashed border-primary" : ""
|
|
4939
4950
|
),
|
|
4940
4951
|
[rt, mt]
|
|
4941
|
-
), Hn =
|
|
4952
|
+
), Hn = j(
|
|
4942
4953
|
() => ({
|
|
4943
4954
|
...ot.additionalGridOptions,
|
|
4944
4955
|
onCellClicked: _n,
|
|
@@ -4954,19 +4965,19 @@ const pi = () => {
|
|
|
4954
4965
|
cancelFolderCreation: Qe,
|
|
4955
4966
|
saveFolderCreation: gt,
|
|
4956
4967
|
getDisplayName: cn,
|
|
4957
|
-
onRenameCancel:
|
|
4958
|
-
onRenameSave:
|
|
4959
|
-
onRenameValidate:
|
|
4968
|
+
onRenameCancel: Te,
|
|
4969
|
+
onRenameSave: Ie,
|
|
4970
|
+
onRenameValidate: ye,
|
|
4960
4971
|
renameTriggerView: nt,
|
|
4961
4972
|
validateFolderName: mn,
|
|
4962
|
-
renamedItem:
|
|
4963
|
-
renamedPath:
|
|
4964
|
-
createdFolderPath:
|
|
4973
|
+
renamedItem: J,
|
|
4974
|
+
renamedPath: q,
|
|
4975
|
+
createdFolderPath: ae,
|
|
4965
4976
|
newFolderTempId: fn,
|
|
4966
4977
|
sharedByMePaths: T,
|
|
4967
4978
|
selectedPaths: L,
|
|
4968
4979
|
disabledRowIds: ct,
|
|
4969
|
-
forbiddenSymbolsRegExp:
|
|
4980
|
+
forbiddenSymbolsRegExp: Ee,
|
|
4970
4981
|
forbiddenSymbolsTooltip: ft,
|
|
4971
4982
|
hideSearchPathItemName: zt,
|
|
4972
4983
|
newFolderDefaultName: se,
|
|
@@ -4980,25 +4991,25 @@ const pi = () => {
|
|
|
4980
4991
|
Qe,
|
|
4981
4992
|
gt,
|
|
4982
4993
|
cn,
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4994
|
+
Te,
|
|
4995
|
+
Ie,
|
|
4996
|
+
ye,
|
|
4986
4997
|
nt,
|
|
4987
4998
|
mn,
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4999
|
+
J,
|
|
5000
|
+
q,
|
|
5001
|
+
ae,
|
|
4991
5002
|
fn,
|
|
4992
5003
|
T,
|
|
4993
5004
|
L,
|
|
4994
5005
|
ct,
|
|
4995
|
-
|
|
5006
|
+
Ee,
|
|
4996
5007
|
ft,
|
|
4997
5008
|
zt,
|
|
4998
5009
|
se,
|
|
4999
5010
|
n
|
|
5000
5011
|
]
|
|
5001
|
-
), xo =
|
|
5012
|
+
), xo = j(
|
|
5002
5013
|
() => S.length === 0 && !tt && !n ? dt() : /* @__PURE__ */ a(
|
|
5003
5014
|
ga,
|
|
5004
5015
|
{
|
|
@@ -5007,7 +5018,7 @@ const pi = () => {
|
|
|
5007
5018
|
getRowId: zn,
|
|
5008
5019
|
loading: n || vn,
|
|
5009
5020
|
getContextMenuItems: Vt,
|
|
5010
|
-
withoutHeaderBorders:
|
|
5021
|
+
withoutHeaderBorders: We,
|
|
5011
5022
|
onGridApiChange: Z,
|
|
5012
5023
|
className: Wn,
|
|
5013
5024
|
...ot,
|
|
@@ -5030,7 +5041,7 @@ const pi = () => {
|
|
|
5030
5041
|
zn,
|
|
5031
5042
|
vn,
|
|
5032
5043
|
Vt,
|
|
5033
|
-
|
|
5044
|
+
We,
|
|
5034
5045
|
Z,
|
|
5035
5046
|
Wn,
|
|
5036
5047
|
ot,
|
|
@@ -5045,27 +5056,27 @@ const pi = () => {
|
|
|
5045
5056
|
Dt
|
|
5046
5057
|
]
|
|
5047
5058
|
);
|
|
5048
|
-
return /* @__PURE__ */ a("section", { ref: yo, className: "size-full", children: /* @__PURE__ */
|
|
5059
|
+
return /* @__PURE__ */ a("section", { ref: yo, className: "size-full", children: /* @__PURE__ */ X(
|
|
5049
5060
|
"div",
|
|
5050
5061
|
{
|
|
5051
|
-
className:
|
|
5062
|
+
className: Oe(
|
|
5052
5063
|
Us,
|
|
5053
5064
|
{
|
|
5054
5065
|
"gap-3 pt-4": c && L.size > 0,
|
|
5055
|
-
"gap-4 p-3 pt-4":
|
|
5056
|
-
"gap-2 pt-2":
|
|
5066
|
+
"gap-4 p-3 pt-4": We,
|
|
5067
|
+
"gap-2 pt-2": We && c && L.size > 0
|
|
5057
5068
|
},
|
|
5058
5069
|
t
|
|
5059
5070
|
),
|
|
5060
5071
|
children: [
|
|
5061
5072
|
No(),
|
|
5062
|
-
/* @__PURE__ */
|
|
5073
|
+
/* @__PURE__ */ X("div", { className: Oe(Gs, Lt), children: [
|
|
5063
5074
|
bo(),
|
|
5064
|
-
/* @__PURE__ */
|
|
5075
|
+
/* @__PURE__ */ X(
|
|
5065
5076
|
"div",
|
|
5066
5077
|
{
|
|
5067
|
-
className:
|
|
5068
|
-
"gap-3":
|
|
5078
|
+
className: Oe(Vs, {
|
|
5079
|
+
"gap-3": We
|
|
5069
5080
|
}),
|
|
5070
5081
|
children: [
|
|
5071
5082
|
l && /* @__PURE__ */ a(
|
|
@@ -5074,21 +5085,21 @@ const pi = () => {
|
|
|
5074
5085
|
...i ?? {},
|
|
5075
5086
|
makeHref: (b) => b.join("/"),
|
|
5076
5087
|
path: R,
|
|
5077
|
-
onItemClick:
|
|
5088
|
+
onItemClick: G,
|
|
5078
5089
|
rootItemPath: o?.path,
|
|
5079
5090
|
rootItemLabel: o?.label,
|
|
5080
5091
|
value: z,
|
|
5081
5092
|
onSearchChange: O,
|
|
5082
|
-
isCompactView:
|
|
5093
|
+
isCompactView: We,
|
|
5083
5094
|
labelClassName: "dial-tiny-text"
|
|
5084
5095
|
}
|
|
5085
5096
|
),
|
|
5086
|
-
/* @__PURE__ */
|
|
5097
|
+
/* @__PURE__ */ X(
|
|
5087
5098
|
"section",
|
|
5088
5099
|
{
|
|
5089
5100
|
role: "region",
|
|
5090
5101
|
"aria-label": "File Manager Grid View",
|
|
5091
|
-
className:
|
|
5102
|
+
className: Oe(js, "relative"),
|
|
5092
5103
|
onDragEnter: Kn,
|
|
5093
5104
|
onDragLeave: qn,
|
|
5094
5105
|
onDragOver: Yn,
|
|
@@ -5116,29 +5127,29 @@ const pi = () => {
|
|
|
5116
5127
|
/* @__PURE__ */ a(
|
|
5117
5128
|
jr,
|
|
5118
5129
|
{
|
|
5119
|
-
...
|
|
5120
|
-
open:
|
|
5121
|
-
itemsToDelete:
|
|
5122
|
-
onClose:
|
|
5123
|
-
onConfirm:
|
|
5130
|
+
...y,
|
|
5131
|
+
open: $,
|
|
5132
|
+
itemsToDelete: U,
|
|
5133
|
+
onClose: Ye,
|
|
5134
|
+
onConfirm: x
|
|
5124
5135
|
}
|
|
5125
5136
|
),
|
|
5126
5137
|
/* @__PURE__ */ a(
|
|
5127
5138
|
Br,
|
|
5128
5139
|
{
|
|
5129
5140
|
...u,
|
|
5130
|
-
open:
|
|
5131
|
-
onClose:
|
|
5141
|
+
open: he,
|
|
5142
|
+
onClose: Re,
|
|
5132
5143
|
onConfirm: () => {
|
|
5133
5144
|
const b = u?.destinationFolderPath ?? "/";
|
|
5134
|
-
|
|
5145
|
+
pe === ve.Copy ? xe(b) : De(b), Re();
|
|
5135
5146
|
},
|
|
5136
|
-
mode:
|
|
5147
|
+
mode: pe,
|
|
5137
5148
|
items: r,
|
|
5138
5149
|
rootItem: o,
|
|
5139
5150
|
gridOptions: {
|
|
5140
5151
|
columnDefs: $t.filter(
|
|
5141
|
-
(b) => b.colId !==
|
|
5152
|
+
(b) => b.colId !== Ne.Actions
|
|
5142
5153
|
),
|
|
5143
5154
|
loading: n
|
|
5144
5155
|
},
|
|
@@ -5164,19 +5175,19 @@ const pi = () => {
|
|
|
5164
5175
|
/* @__PURE__ */ a(
|
|
5165
5176
|
la,
|
|
5166
5177
|
{
|
|
5167
|
-
...
|
|
5178
|
+
...w,
|
|
5168
5179
|
open: Pt,
|
|
5169
|
-
onClose:
|
|
5180
|
+
onClose: Ze,
|
|
5170
5181
|
onReplace: Cn,
|
|
5171
|
-
onDuplicate:
|
|
5182
|
+
onDuplicate: je,
|
|
5172
5183
|
onDecideForEach: it,
|
|
5173
|
-
conflictingFiles:
|
|
5184
|
+
conflictingFiles: we
|
|
5174
5185
|
}
|
|
5175
5186
|
),
|
|
5176
5187
|
/* @__PURE__ */ a(
|
|
5177
5188
|
la,
|
|
5178
5189
|
{
|
|
5179
|
-
...
|
|
5190
|
+
...w,
|
|
5180
5191
|
open: Je,
|
|
5181
5192
|
onClose: to,
|
|
5182
5193
|
onReplace: Jn,
|
|
@@ -5188,16 +5199,16 @@ const pi = () => {
|
|
|
5188
5199
|
/* @__PURE__ */ a(
|
|
5189
5200
|
ei,
|
|
5190
5201
|
{
|
|
5191
|
-
open:
|
|
5202
|
+
open: Xe,
|
|
5192
5203
|
onClose: Mt,
|
|
5193
|
-
fileMetadata:
|
|
5194
|
-
loading:
|
|
5195
|
-
header:
|
|
5196
|
-
nameLabel:
|
|
5197
|
-
pathLabel:
|
|
5198
|
-
modifiedDateLabel:
|
|
5199
|
-
sizeLabel:
|
|
5200
|
-
authorLabel:
|
|
5204
|
+
fileMetadata: Pe?.fileMetadata ?? Ot,
|
|
5205
|
+
loading: Pe?.loading,
|
|
5206
|
+
header: Pe?.header,
|
|
5207
|
+
nameLabel: Pe?.nameLabel,
|
|
5208
|
+
pathLabel: Pe?.pathLabel,
|
|
5209
|
+
modifiedDateLabel: Pe?.modifiedDateLabel,
|
|
5210
|
+
sizeLabel: Pe?.sizeLabel,
|
|
5211
|
+
authorLabel: Pe?.authorLabel,
|
|
5201
5212
|
dateLocale: p?.dateLocale,
|
|
5202
5213
|
dateOptions: p?.dateOptions
|
|
5203
5214
|
}
|
|
@@ -5210,7 +5221,7 @@ const pi = () => {
|
|
|
5210
5221
|
t
|
|
5211
5222
|
) ? t : nn.MyFiles, [o, n] = _(r), s = (i) => {
|
|
5212
5223
|
n(i);
|
|
5213
|
-
}, l =
|
|
5224
|
+
}, l = j(() => {
|
|
5214
5225
|
if (e)
|
|
5215
5226
|
return Object.values(nn).map((i) => ({
|
|
5216
5227
|
id: i,
|
|
@@ -5224,12 +5235,12 @@ const pi = () => {
|
|
|
5224
5235
|
};
|
|
5225
5236
|
};
|
|
5226
5237
|
export {
|
|
5227
|
-
|
|
5238
|
+
ve as DestinationFolderMode,
|
|
5228
5239
|
Br as DialDestinationFolderPopup,
|
|
5229
5240
|
Ci as DialFileManager,
|
|
5230
5241
|
N as DialFileManagerActions,
|
|
5231
|
-
|
|
5232
|
-
|
|
5242
|
+
ge as DialFileManagerConflictActions,
|
|
5243
|
+
He as DialFileManagerConflictStrategies,
|
|
5233
5244
|
nn as DialFileManagerTabs,
|
|
5234
5245
|
k as DialFileNodeType,
|
|
5235
5246
|
St as DialFilePermission,
|
|
@@ -5237,9 +5248,9 @@ export {
|
|
|
5237
5248
|
si as DialFoldersTree,
|
|
5238
5249
|
A as FILE_MANAGER_ICON_PROPS,
|
|
5239
5250
|
Zn as FILE_MANAGER_ICON_STROKE,
|
|
5240
|
-
|
|
5251
|
+
Ne as FileManagerColumnKey,
|
|
5241
5252
|
ut as FileManagerCreateFolderTriggerView,
|
|
5242
|
-
|
|
5253
|
+
Be as FileManagerCreateFolderType,
|
|
5243
5254
|
Wr as FileManagerProvider,
|
|
5244
5255
|
Rt as FileManagerRenameTriggerView,
|
|
5245
5256
|
rr as GridSelectionMode,
|