@epam/ai-dial-publish-panel 1.2.0-dev.6 → 1.2.0-dev.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/PublishHistoryList/PublishHistoryList.d.ts +8 -0
- package/components/PublishHistoryList/PublishHistoryList.d.ts.map +1 -1
- package/components/PublishPanel/PublishPanel.d.ts +19 -0
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +5 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1244 -1220
- package/models/publish.d.ts +7 -0
- package/models/publish.d.ts.map +1 -1
- package/package.json +4 -4
- package/utils/use-publish-flow.d.ts +20 -3
- package/utils/use-publish-flow.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
import { createContext as t, useCallback as n, useContext as r, useEffect as i, useId as a, useImperativeHandle as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
3
|
-
import { BASE_ICON_SIZE as d, ButtonAppearance as f, ButtonDropdown as p, ButtonVariant as m,
|
|
4
|
-
import { ResourceSummary as
|
|
3
|
+
import { BASE_ICON_SIZE as d, ButtonAppearance as f, ButtonDropdown as p, ButtonVariant as m, Checkbox as h, CloseButton as g, CollapsibleSidebar as _, ConditionalResizableContainer as v, ConfirmationPopup as y, ConfirmationPopupVariant as b, DEFAULT_DATE_FORMAT_OPTIONS as x, DEFAULT_DATE_LOCALE as S, DIAL_ICON_SIZE as C, DIAL_KIT_ICON_STROKE as w, DateCellRenderer as T, DialBreadcrumb as E, DialFileIcon as D, DialFileName as O, DialFileNodeType as k, DialFolderName as A, DialIcon as j, DialItemType as M, DialSharedEntityIndicator as N, Dropdown as P, DropdownItemType as F, DropdownTrigger as I, ElementSize as L, EllipsisTooltip as R, FlexibleActionsDirection as z, GRID_SELECTION_COLUMN_ID as B, GhostButton as ee, GhostIconButton as V, Grid as H, Input as te, NOT_ALLOWED_SYMBOLS_REGEXP as ne, NeutralButton as re, NoDataContent as ie, Notification as ae, NotificationType as oe, NotificationVariant as se, Popup as U, PopupSize as ce, PrimaryButton as le, RadioGroup as ue, Search as de, Select as fe, Skeleton as pe, SkeletonVariant as me, Spinner as he, Switch as ge, Tabs as _e, Tag as ve, TagInput as ye, Tooltip as be, TooltipContainer as xe, TooltipContent as Se, TooltipPlacement as Ce, TooltipTrigger as we, convertToDate as Te, editableContainerProps as Ee, mergeClasses as De, useEditableItem as Oe } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { ResourceSummary as ke, TAG_INPUT_TAG_CLASS_NAME as Ae, buildCssVars as je, mergeClasses as W } from "@epam/ai-dial-chat-shared";
|
|
5
5
|
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
6
|
-
import { IconAlertCircleFilled as
|
|
6
|
+
import { IconAlertCircleFilled as Me, IconAlertTriangleFilled as Ne, IconArrowLeft as Pe, IconCaretRightFilled as Fe, IconChevronDown as Ie, IconCircleFilled as Le, IconCopy as Re, IconCopyMinus as ze, IconDotsVertical as Be, IconDownload as Ve, IconExternalLink as He, IconEye as Ue, IconEyeOff as We, IconFile as Ge, IconFileDescription as Ke, IconFileZip as qe, IconFolder as Je, IconFolderPlus as Ye, IconInfoCircle as Xe, IconPencilMinus as Ze, IconPlus as Qe, IconTrashX as J, IconUserX as $e, IconX as et } from "@tabler/icons-react";
|
|
7
7
|
import { createPortal as tt } from "react-dom";
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
9
|
var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDescriptor, at = Object.getOwnPropertyNames, ot = Object.getPrototypeOf, st = Object.prototype.hasOwnProperty, ct = (e, t) => () => (e && (t = e(e = 0)), t), lt = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ut = (e, t) => {
|
|
@@ -83,12 +83,12 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
83
83
|
i(() => {
|
|
84
84
|
h(r);
|
|
85
85
|
}, [r]);
|
|
86
|
-
let [g, _] = u(), [v, y] = u(!1), [b, x] = u(!1), [S, C] = u([]), [w, T] = u(!1), [E, D] = u(!1), [O, k] = u(o), [A, j] = u(!1);
|
|
86
|
+
let [g, _] = u(), [v, y] = u(!1), [b, x] = u(!1), [S, C] = u([]), [w, T] = u(!1), [E, D] = u(!1), [O, k] = u(o), [A, j] = u(!1), [M, N] = u(!1);
|
|
87
87
|
i(() => {
|
|
88
|
-
|
|
89
|
-
}, [o,
|
|
90
|
-
let
|
|
91
|
-
|
|
88
|
+
M || k(o);
|
|
89
|
+
}, [o, M]);
|
|
90
|
+
let P = n((e) => {
|
|
91
|
+
N(!0), k(e);
|
|
92
92
|
}, []);
|
|
93
93
|
i(() => {
|
|
94
94
|
if (g == null) {
|
|
@@ -107,7 +107,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
107
107
|
e = !0;
|
|
108
108
|
};
|
|
109
109
|
}, [g]);
|
|
110
|
-
let
|
|
110
|
+
let F = c(() => {
|
|
111
111
|
if (!g) return !1;
|
|
112
112
|
let n = g.join("/");
|
|
113
113
|
return t.some((t) => t.folderPath.join("/") === n ? e.version == null ? !0 : t.version === e.version : !1);
|
|
@@ -115,18 +115,18 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
115
115
|
t,
|
|
116
116
|
e.version,
|
|
117
117
|
g
|
|
118
|
-
]),
|
|
118
|
+
]), I = n(async (e, t) => {
|
|
119
119
|
h((n) => yt(n, e, t));
|
|
120
120
|
try {
|
|
121
121
|
await s?.(e, t);
|
|
122
122
|
} catch {
|
|
123
123
|
h((n) => bt(n, e, t)), x(!0);
|
|
124
124
|
}
|
|
125
|
-
}, [s]),
|
|
125
|
+
}, [s]), L = n(async () => {
|
|
126
126
|
if (!g) return !1;
|
|
127
127
|
y(!0), x(!1);
|
|
128
128
|
try {
|
|
129
|
-
return await l(e, g, S, O.trim()), d?.(e, g), !0;
|
|
129
|
+
return await l(e, g, S, O.trim(), A), d?.(e, g), !0;
|
|
130
130
|
} catch (t) {
|
|
131
131
|
return x(!0), f?.(e, g, t), !1;
|
|
132
132
|
} finally {
|
|
@@ -138,26 +138,29 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
138
138
|
l,
|
|
139
139
|
f,
|
|
140
140
|
d,
|
|
141
|
+
A,
|
|
141
142
|
S,
|
|
142
143
|
g
|
|
143
|
-
]),
|
|
144
|
-
h(r), _(void 0), x(!1), C([]), D(!1), k(o), j(!1);
|
|
144
|
+
]), R = n(() => {
|
|
145
|
+
h(r), _(void 0), x(!1), C([]), D(!1), k(o), N(!1), j(!1);
|
|
145
146
|
}, [o, r]);
|
|
146
147
|
return {
|
|
147
148
|
folderItems: m,
|
|
148
149
|
selectedFolderPath: g,
|
|
149
150
|
setSelectedFolderPath: _,
|
|
150
|
-
handleCreateFolder:
|
|
151
|
-
hasExistingPublicationInFolder:
|
|
151
|
+
handleCreateFolder: I,
|
|
152
|
+
hasExistingPublicationInFolder: F,
|
|
152
153
|
hasWriteAccess: g ? a(g) : !0,
|
|
153
154
|
isSubmitting: v,
|
|
154
155
|
hasSubmitError: b,
|
|
155
|
-
handleSubmit:
|
|
156
|
-
reset:
|
|
156
|
+
handleSubmit: L,
|
|
157
|
+
reset: R,
|
|
157
158
|
rules: S,
|
|
158
159
|
setRules: C,
|
|
159
160
|
author: O,
|
|
160
|
-
setAuthor:
|
|
161
|
+
setAuthor: P,
|
|
162
|
+
publishCredentials: A,
|
|
163
|
+
setPublishCredentials: j,
|
|
161
164
|
isRulesLoading: w,
|
|
162
165
|
hasRulesLoadError: E
|
|
163
166
|
};
|
|
@@ -176,25 +179,25 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
176
179
|
}), wt = (e) => [...e].sort((e, t) => Ct(e.name, t.name)).map((e) => e.children ? {
|
|
177
180
|
...e,
|
|
178
181
|
children: wt(e.children)
|
|
179
|
-
} : e),
|
|
182
|
+
} : e), Y = (e, t, n) => {
|
|
180
183
|
let [r, ...i] = t;
|
|
181
184
|
if (r == null) return e;
|
|
182
185
|
let a = [...n, r], o = e.find((e) => e.name === r);
|
|
183
186
|
return o ? i.length ? e.map((e) => e === o ? {
|
|
184
187
|
...e,
|
|
185
|
-
children:
|
|
188
|
+
children: Y(e.children ?? [], i, a)
|
|
186
189
|
} : e) : e : [...e, {
|
|
187
190
|
path: a,
|
|
188
191
|
name: r,
|
|
189
|
-
children: i.length ?
|
|
192
|
+
children: i.length ? Y([], i, a) : void 0
|
|
190
193
|
}];
|
|
191
|
-
},
|
|
192
|
-
let t =
|
|
194
|
+
}, Tt = (e, t) => t.reduce((e, t) => t.length ? Y(e, t, []) : e, e), X = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? X(e.children) : []]), Et = (e) => e.join("/"), Dt = (e) => e.split("/").filter(Boolean), Ot = (e) => e.map((e) => {
|
|
195
|
+
let t = Et(e.path);
|
|
193
196
|
return {
|
|
194
197
|
path: t,
|
|
195
198
|
name: e.name,
|
|
196
199
|
folderId: t,
|
|
197
|
-
nodeType:
|
|
200
|
+
nodeType: k.FOLDER,
|
|
198
201
|
items: e.children ? Ot(e.children) : void 0
|
|
199
202
|
};
|
|
200
203
|
}), kt = /[/\\:;,={}&"]/, At = (e, t, n) => {
|
|
@@ -208,9 +211,9 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
208
211
|
return `${e} ${r}`;
|
|
209
212
|
}, Mt = (e, t) => {
|
|
210
213
|
if (t.length === 0) return e.map((e) => e.name);
|
|
211
|
-
let n =
|
|
214
|
+
let n = Et(t), r = (e) => {
|
|
212
215
|
for (let t of e) {
|
|
213
|
-
if (
|
|
216
|
+
if (Et(t.path) === n) return t;
|
|
214
217
|
let e = t.children ? r(t.children) : void 0;
|
|
215
218
|
if (e) return e;
|
|
216
219
|
}
|
|
@@ -231,7 +234,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
231
234
|
}
|
|
232
235
|
}, Rt = ({ sourceOptions: e, onSave: t, onCancel: n, disabled: r = !1, maxTargets: o = Pt, labels: s = {}, errorClassName: d = "dial-small-text", styles: f = {} }) => {
|
|
233
236
|
let p = {
|
|
234
|
-
...
|
|
237
|
+
...je({
|
|
235
238
|
"--pare-mobile-bg": f.colors?.mobileBackground,
|
|
236
239
|
"--pare-bg": f.colors?.background,
|
|
237
240
|
"--pare-error-text": f.colors?.errorText,
|
|
@@ -245,7 +248,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
245
248
|
i(() => {
|
|
246
249
|
F.current?.focus();
|
|
247
250
|
}, []);
|
|
248
|
-
let [I, L] = u(), [R, z] = u(), [B,
|
|
251
|
+
let [I, L] = u(), [R, z] = u(), [B, V] = u([]), [H, ne] = u(""), [ie, ae] = u(!1), [oe, se] = u(!1), [U, ce] = u(!1), le = W(Nt.selectField, ie && Nt.selectFieldOpen), ue = W(Nt.selectField, oe && Nt.selectFieldOpen), de = c(() => e.map((e) => ({
|
|
249
252
|
value: e,
|
|
250
253
|
label: e
|
|
251
254
|
})), [e]), pe = c(() => [
|
|
@@ -278,10 +281,10 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
278
281
|
style: p,
|
|
279
282
|
className: W("fixed inset-0 z-[60] flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3", Nt.dialog),
|
|
280
283
|
children: [
|
|
281
|
-
/* @__PURE__ */ K(
|
|
284
|
+
/* @__PURE__ */ K(fe, {
|
|
282
285
|
id: M,
|
|
283
286
|
labelProps: { label: m },
|
|
284
|
-
options:
|
|
287
|
+
options: de,
|
|
285
288
|
value: I,
|
|
286
289
|
onChange: (e) => {
|
|
287
290
|
L(Array.isArray(e) ? e[0] : e), ae(!1);
|
|
@@ -296,14 +299,14 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
296
299
|
invalid: U && I == null,
|
|
297
300
|
error: U && I == null ? E : void 0
|
|
298
301
|
}),
|
|
299
|
-
/* @__PURE__ */ K(
|
|
302
|
+
/* @__PURE__ */ K(fe, {
|
|
300
303
|
labelProps: { label: g },
|
|
301
304
|
id: N,
|
|
302
305
|
options: pe,
|
|
303
306
|
value: R,
|
|
304
307
|
onChange: (e) => {
|
|
305
308
|
let t = Array.isArray(e) ? e[0] : e;
|
|
306
|
-
R === mt.Regex != (t === mt.Regex) && (
|
|
309
|
+
R === mt.Regex != (t === mt.Regex) && (V([]), ne("")), z(t), se(!1);
|
|
307
310
|
},
|
|
308
311
|
placeholder: g,
|
|
309
312
|
disabled: r,
|
|
@@ -313,12 +316,12 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
313
316
|
invalid: U && R == null,
|
|
314
317
|
error: U && R == null ? E : void 0
|
|
315
318
|
}),
|
|
316
|
-
me ? /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(
|
|
319
|
+
me ? /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(te, {
|
|
317
320
|
id: `${j}-input`,
|
|
318
321
|
labelProps: { label: C },
|
|
319
322
|
placeholder: w,
|
|
320
323
|
value: H,
|
|
321
|
-
onChange: (e) =>
|
|
324
|
+
onChange: (e) => ne(e ?? ""),
|
|
322
325
|
invalid: (H.length > 0 || U) && !he,
|
|
323
326
|
"aria-describedby": (H.length > 0 || U) && !he ? j : void 0,
|
|
324
327
|
disabled: r
|
|
@@ -327,7 +330,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
327
330
|
role: "alert",
|
|
328
331
|
className: W("mt-1 block", d, Nt.error),
|
|
329
332
|
children: T
|
|
330
|
-
})] }) : /* @__PURE__ */ K(
|
|
333
|
+
})] }) : /* @__PURE__ */ K(ye, {
|
|
331
334
|
id: P,
|
|
332
335
|
labelProps: { label: b },
|
|
333
336
|
placeholder: x,
|
|
@@ -341,10 +344,10 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
341
344
|
let e = n.trim();
|
|
342
345
|
if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= o)) break;
|
|
343
346
|
}
|
|
344
|
-
|
|
347
|
+
V(t);
|
|
345
348
|
},
|
|
346
349
|
disabled: r,
|
|
347
|
-
tagClassName:
|
|
350
|
+
tagClassName: Ae
|
|
348
351
|
}),
|
|
349
352
|
/* @__PURE__ */ q("div", {
|
|
350
353
|
className: "mt-auto flex justify-end gap-2 desktop:mt-2",
|
|
@@ -352,7 +355,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
352
355
|
label: k,
|
|
353
356
|
onClick: n,
|
|
354
357
|
disabled: r
|
|
355
|
-
}), /* @__PURE__ */ K(
|
|
358
|
+
}), /* @__PURE__ */ K(re, {
|
|
356
359
|
label: O,
|
|
357
360
|
onClick: () => {
|
|
358
361
|
if (!ge || I == null || R == null) {
|
|
@@ -378,7 +381,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
378
381
|
ruleText: "_ruleText_nx0en_17"
|
|
379
382
|
}, Bt = 20, Vt = (e, t) => e === mt.Equal ? t.equal : e === mt.Contain ? t.contain : t.regex, Ht = ({ rules: e, onRulesChange: t, sourceOptions: n, folderName: r, disabled: o = !1, isLoading: s = !1, hasLoadError: c = !1, maxRules: d = Bt, maxTargetsPerRule: f, labels: p = {}, headingClassName: h = "dial-body-semi-text", hintClassName: g = "dial-small-text", loadingClassName: _ = "dial-small-text", ruleTextClassName: v = "dial-small-text", ruleSourceClassName: y = "dial-small-semi-text", styles: b = {} }) => {
|
|
380
383
|
let x = {
|
|
381
|
-
...
|
|
384
|
+
...je({
|
|
382
385
|
"--par-rule-bg": b.colors?.ruleBackground,
|
|
383
386
|
"--par-heading-text": b.colors?.headingText,
|
|
384
387
|
"--par-hint-text": b.colors?.hintText,
|
|
@@ -386,24 +389,24 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
386
389
|
"--par-rule-text": b.colors?.ruleText
|
|
387
390
|
}),
|
|
388
391
|
...b.cssVars
|
|
389
|
-
}, { heading:
|
|
392
|
+
}, { heading: S = "Allow access if all match", folderScopeHint: T = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: E = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: D = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: O = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: k = "Add rule", clearAllLabel: A = "Clear all", orSeparatorLabel: j = "Or", removeRuleAriaLabelTemplate: M = "Remove rule for {source}: {targets}", equalFunctionLabel: N = "Equal", containFunctionLabel: P = "Contain", regexFunctionLabel: F = "Regex", loadingLabel: I = "Loading existing rules…", loadErrorLabel: L = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: R = "Rule added.", ruleRemovedAnnouncement: z = "Rule removed.", rulesClearedAnnouncement: B = "All rules cleared.", rulesLoadedAnnouncement: H = "Existing rules loaded for the selected folder.", editorLabels: te } = p, ne = a(), [re, ie] = u(!1), [U, ce] = u(""), le = l(null), ue = l(s);
|
|
390
393
|
i(() => {
|
|
391
|
-
ue.current && !s && e.length > 0 && ce(
|
|
394
|
+
ue.current && !s && e.length > 0 && ce(H), ue.current = s;
|
|
392
395
|
}, [
|
|
393
396
|
s,
|
|
394
397
|
e,
|
|
395
|
-
|
|
398
|
+
H
|
|
396
399
|
]);
|
|
397
400
|
let de = () => {
|
|
398
|
-
le.current = document.activeElement,
|
|
401
|
+
le.current = document.activeElement, ie(!0);
|
|
399
402
|
}, fe = () => {
|
|
400
|
-
|
|
403
|
+
ie(!1), le.current?.focus?.();
|
|
401
404
|
}, pe = (n) => {
|
|
402
405
|
t([...e, n]), ce(R), fe();
|
|
403
|
-
},
|
|
406
|
+
}, me = (n) => {
|
|
404
407
|
t(e.filter((e, t) => t !== n)), ce(z);
|
|
405
408
|
}, ge = () => {
|
|
406
|
-
t([]), ce(
|
|
409
|
+
t([]), ce(B);
|
|
407
410
|
}, _e = {
|
|
408
411
|
equal: N,
|
|
409
412
|
contain: P,
|
|
@@ -426,7 +429,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
426
429
|
children: [/* @__PURE__ */ K("div", {
|
|
427
430
|
id: ne,
|
|
428
431
|
className: W(h, zt.heading),
|
|
429
|
-
children:
|
|
432
|
+
children: S
|
|
430
433
|
}), e.length > 0 && /* @__PURE__ */ K(ee, {
|
|
431
434
|
variant: m.Primary,
|
|
432
435
|
label: A,
|
|
@@ -440,24 +443,24 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
440
443
|
}),
|
|
441
444
|
e.length > 0 && !be && /* @__PURE__ */ K("div", {
|
|
442
445
|
className: "mb-2",
|
|
443
|
-
children: /* @__PURE__ */ K(
|
|
444
|
-
type:
|
|
445
|
-
variant:
|
|
446
|
+
children: /* @__PURE__ */ K(ae, {
|
|
447
|
+
type: oe.SectionMessage,
|
|
448
|
+
variant: se.Warning,
|
|
446
449
|
message: D
|
|
447
450
|
})
|
|
448
451
|
}),
|
|
449
452
|
s && /* @__PURE__ */ q("div", {
|
|
450
453
|
className: W("mb-2 flex items-center gap-2", _, zt.loading),
|
|
451
|
-
children: [/* @__PURE__ */ K(
|
|
454
|
+
children: [/* @__PURE__ */ K(he, {
|
|
452
455
|
size: 16,
|
|
453
456
|
ariaLabel: I
|
|
454
457
|
}), /* @__PURE__ */ K("span", { children: I })]
|
|
455
458
|
}),
|
|
456
459
|
c && /* @__PURE__ */ K("div", {
|
|
457
460
|
className: "mb-2",
|
|
458
|
-
children: /* @__PURE__ */ K(
|
|
459
|
-
type:
|
|
460
|
-
variant:
|
|
461
|
+
children: /* @__PURE__ */ K(ae, {
|
|
462
|
+
type: oe.SectionMessage,
|
|
463
|
+
variant: se.Warning,
|
|
461
464
|
message: L
|
|
462
465
|
})
|
|
463
466
|
}),
|
|
@@ -479,14 +482,14 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
479
482
|
": ",
|
|
480
483
|
n
|
|
481
484
|
]
|
|
482
|
-
}), /* @__PURE__ */ K(
|
|
483
|
-
icon: /* @__PURE__ */ K(
|
|
484
|
-
size:
|
|
485
|
+
}), /* @__PURE__ */ K(V, {
|
|
486
|
+
icon: /* @__PURE__ */ K(J, {
|
|
487
|
+
size: C.SM,
|
|
485
488
|
"aria-hidden": !0,
|
|
486
|
-
stroke:
|
|
489
|
+
stroke: w
|
|
487
490
|
}),
|
|
488
491
|
"aria-label": r,
|
|
489
|
-
onClick: () =>
|
|
492
|
+
onClick: () => me(t),
|
|
490
493
|
disabled: o
|
|
491
494
|
})]
|
|
492
495
|
}, t);
|
|
@@ -498,17 +501,17 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
498
501
|
onCancel: fe,
|
|
499
502
|
disabled: o,
|
|
500
503
|
maxTargets: f,
|
|
501
|
-
labels:
|
|
504
|
+
labels: te,
|
|
502
505
|
styles: b.editor
|
|
503
506
|
}),
|
|
504
507
|
/* @__PURE__ */ K("div", {
|
|
505
508
|
className: "flex flex-wrap items-center gap-2",
|
|
506
509
|
children: /* @__PURE__ */ K(ee, {
|
|
507
510
|
label: k,
|
|
508
|
-
iconBefore: /* @__PURE__ */ K(
|
|
509
|
-
size:
|
|
511
|
+
iconBefore: /* @__PURE__ */ K(Qe, {
|
|
512
|
+
size: C.SM,
|
|
510
513
|
"aria-hidden": !0,
|
|
511
|
-
stroke:
|
|
514
|
+
stroke: w
|
|
512
515
|
}),
|
|
513
516
|
onClick: de,
|
|
514
517
|
disabled: ye
|
|
@@ -521,54 +524,65 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
521
524
|
]
|
|
522
525
|
});
|
|
523
526
|
}, Ut = {
|
|
524
|
-
currentBadge: "
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
"--phl-badge-
|
|
533
|
-
"--phl-badge-
|
|
534
|
-
"--phl-
|
|
535
|
-
"--phl-
|
|
536
|
-
"--phl-
|
|
537
|
-
"--phl-
|
|
538
|
-
|
|
527
|
+
currentBadge: "_currentBadge_d0adf_1",
|
|
528
|
+
sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
|
|
529
|
+
version: "_version_d0adf_13",
|
|
530
|
+
date: "_date_d0adf_17",
|
|
531
|
+
emptyState: "_emptyState_d0adf_21",
|
|
532
|
+
stripedRow: "_stripedRow_d0adf_25"
|
|
533
|
+
}, Wt = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
|
|
534
|
+
let m = je({
|
|
535
|
+
"--phl-badge-border": p?.currentBadgeBorder,
|
|
536
|
+
"--phl-badge-bg": p?.currentBadgeBackground,
|
|
537
|
+
"--phl-badge-text": p?.currentBadgeText,
|
|
538
|
+
"--phl-shared-creds-border": p?.sharedCredentialsBadgeBorder,
|
|
539
|
+
"--phl-shared-creds-bg": p?.sharedCredentialsBadgeBackground,
|
|
540
|
+
"--phl-shared-creds-text": p?.sharedCredentialsBadgeText,
|
|
541
|
+
"--phl-version-text": p?.versionText,
|
|
542
|
+
"--phl-date-text": p?.dateText,
|
|
543
|
+
"--phl-empty-text": p?.emptyStateText,
|
|
544
|
+
"--phl-striped-bg": p?.stripedBackground
|
|
545
|
+
}), h = W(f, Ut.emptyState);
|
|
539
546
|
return n ? /* @__PURE__ */ K("p", {
|
|
540
|
-
style:
|
|
541
|
-
className:
|
|
542
|
-
children:
|
|
547
|
+
style: m,
|
|
548
|
+
className: h,
|
|
549
|
+
children: c
|
|
543
550
|
}) : r ? /* @__PURE__ */ K("p", {
|
|
544
|
-
style:
|
|
545
|
-
className:
|
|
551
|
+
style: m,
|
|
552
|
+
className: h,
|
|
546
553
|
role: "alert",
|
|
547
|
-
children:
|
|
554
|
+
children: l
|
|
548
555
|
}) : e.length === 0 ? /* @__PURE__ */ K("p", {
|
|
549
|
-
style:
|
|
550
|
-
className:
|
|
551
|
-
children:
|
|
556
|
+
style: m,
|
|
557
|
+
className: h,
|
|
558
|
+
children: s
|
|
552
559
|
}) : /* @__PURE__ */ K("ul", {
|
|
553
|
-
style:
|
|
560
|
+
style: m,
|
|
554
561
|
children: e.map((e, n) => /* @__PURE__ */ q("li", {
|
|
555
562
|
className: W("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Ut.stripedRow),
|
|
556
563
|
children: [/* @__PURE__ */ q("span", {
|
|
557
564
|
className: "flex min-w-0 items-center gap-2",
|
|
558
|
-
style:
|
|
559
|
-
children: [
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
565
|
+
style: m,
|
|
566
|
+
children: [
|
|
567
|
+
/* @__PURE__ */ q("span", {
|
|
568
|
+
className: W(u, Ut.version),
|
|
569
|
+
children: [
|
|
570
|
+
i,
|
|
571
|
+
" ",
|
|
572
|
+
e.version
|
|
573
|
+
]
|
|
574
|
+
}),
|
|
575
|
+
e.version === t && /* @__PURE__ */ K(ve, {
|
|
576
|
+
label: a,
|
|
577
|
+
className: W("shrink-0 whitespace-nowrap", Ut.currentBadge)
|
|
578
|
+
}),
|
|
579
|
+
e.publishCredentials === !0 && /* @__PURE__ */ K(ve, {
|
|
580
|
+
label: o,
|
|
581
|
+
className: W("shrink-0 whitespace-nowrap", Ut.sharedCredentialsBadge)
|
|
582
|
+
})
|
|
583
|
+
]
|
|
570
584
|
}), /* @__PURE__ */ K("span", {
|
|
571
|
-
className: W(
|
|
585
|
+
className: W(d, Ut.date),
|
|
572
586
|
children: vt(e.publishedAt)
|
|
573
587
|
})]
|
|
574
588
|
}, `${e.version}-${n}`))
|
|
@@ -8366,17 +8380,17 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8366
8380
|
strokeWidth: 1.5,
|
|
8367
8381
|
strokeLinecap: "round",
|
|
8368
8382
|
strokeLinejoin: "round"
|
|
8369
|
-
})), sn =
|
|
8383
|
+
})), sn = w, Z = {
|
|
8370
8384
|
size: d,
|
|
8371
8385
|
stroke: sn
|
|
8372
|
-
}, cn = /* @__PURE__ */ ((e) => (e.MyFiles = "my_files", e.Shared = "shared", e.Organization = "organization", e.Review = "review", e))(cn || {}),
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
], $ = /* @__PURE__ */ ((e) => (e.ITEM = "item", e.FOLDER = "folder", e))($ || {}),
|
|
8379
|
-
let v = o.length === 1, y = v ? o[0]?.name : "", b = f?.[
|
|
8386
|
+
}, cn = /* @__PURE__ */ ((e) => (e.MyFiles = "my_files", e.Shared = "shared", e.Organization = "organization", e.Review = "review", e))(cn || {}), Q = /* @__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))(Q || {}), ln = /* @__PURE__ */ ((e) => (e.Replace = "replace", e.Duplicate = "duplicate", e.Cancel = "cancel", e))(ln || {}), un = /* @__PURE__ */ ((e) => (e.ReplaceAll = "replaceAll", e.DuplicateAll = "duplicateAll", e.DecideForEach = "decideForEach", e))(un || {}), dn = /* @__PURE__ */ ((e) => (e.Copy = "copy", e.Move = "move", e))(dn || {}), fn = /* @__PURE__ */ ((e) => (e.Tree = "tree", e.Grid = "grid", e))(fn || {}), pn = /* @__PURE__ */ ((e) => (e.Tree = "tree", e.Grid = "grid", e))(pn || {}), mn = /* @__PURE__ */ ((e) => (e.Folder = "folder", e.Child = "child", e.Sibling = "sibling", e))(mn || {}), hn = /* @__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))(hn || {}), gn = "w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-base", _n = "w-full text-secondary flex items-center gap-2", vn = "flex min-h-0 min-w-0 h-full gap-4 overflow-hidden", yn = "flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4", bn = "h-full rounded bg-layer-raised text-secondary min-w-0", xn = "flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0", Sn = "opacity-0 pointer-events-none group-hover/grid-row:opacity-100 group-hover/grid-row:pointer-events-auto", Cn = 280, wn = "Files", Tn = 20, En = "Files", Dn = ".dial_folder", On = "New folder", kn = 280, An = 460, jn = "ag-Grid-SelectionColumn", Mn = 44, Nn = 800, Pn = [
|
|
8387
|
+
hn.Name,
|
|
8388
|
+
hn.UpdatedAt,
|
|
8389
|
+
hn.Size,
|
|
8390
|
+
hn.Author,
|
|
8391
|
+
hn.Actions
|
|
8392
|
+
], $ = /* @__PURE__ */ ((e) => (e.ITEM = "item", e.FOLDER = "folder", e))($ || {}), Fn = /* @__PURE__ */ ((e) => (e.FILE = "FILE", e.PROMPT = "PROMPT", e.CONVERSATION = "CONVERSATION", e.APPLICATION = "APPLICATION", e.TOOLSET = "TOOL_SET", e))(Fn || {}), In = /* @__PURE__ */ ((e) => (e.READ = "READ", e.WRITE = "WRITE", e.SHARE = "SHARE", e))(In || {}), Ln = ({ open: e, onClose: t, onReplace: r, onDuplicate: i, onDecideForEach: a, conflictingFiles: o, singleFileTitle: s = "Replace Or Duplicate Item", multipleFilesTitle: l = "Replace Or Duplicate Items", message: d, actionLabels: f, strategyLabels: p, confirmLabel: m = "Confirm", cancelLabel: h = "Cancel", nameColumnLabel: g = "Name", actionColumnLabel: _ = "Action" }) => {
|
|
8393
|
+
let v = o.length === 1, y = v ? o[0]?.name : "", b = f?.[ln.Replace] ?? "Replace", x = f?.[ln.Duplicate] ?? "Duplicate", S = f?.[ln.Cancel] ?? "Cancel", w = p?.[un.ReplaceAll] ?? "Replace all", T = p?.[un.DuplicateAll] ?? "Duplicate all", E = p?.[un.DecideForEach] ?? "Decide for each", [D, k] = u(ln.Replace), [j, M] = u(un.ReplaceAll), [N, F] = u(new Map(o.map((e) => [e.path, ln.Replace]))), [L, R] = u(void 0), z = v ? s : l, B = /* @__PURE__ */ q(G, { children: [
|
|
8380
8394
|
"Item with the name ",
|
|
8381
8395
|
/* @__PURE__ */ q("span", {
|
|
8382
8396
|
className: "text-primary",
|
|
@@ -8388,19 +8402,19 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8388
8402
|
}),
|
|
8389
8403
|
" ",
|
|
8390
8404
|
"already exists in this destination."
|
|
8391
|
-
] }),
|
|
8392
|
-
value:
|
|
8405
|
+
] }), ee = `${o.length} items with the same names already exist in this destination.`, V = d ?? (v ? B : ee), te = c(() => [{
|
|
8406
|
+
value: ln.Replace,
|
|
8393
8407
|
label: b
|
|
8394
8408
|
}, {
|
|
8395
|
-
value:
|
|
8409
|
+
value: ln.Duplicate,
|
|
8396
8410
|
label: x
|
|
8397
|
-
}], [b, x]),
|
|
8411
|
+
}], [b, x]), ne = c(() => o.map((e) => ({
|
|
8398
8412
|
id: e.path,
|
|
8399
8413
|
name: e.name,
|
|
8400
8414
|
path: e.path,
|
|
8401
8415
|
nodeType: e.nodeType ?? $.ITEM,
|
|
8402
|
-
action:
|
|
8403
|
-
})), [o,
|
|
8416
|
+
action: N.get(e.path) || ln.Replace
|
|
8417
|
+
})), [o, N]), ie = c(() => [{
|
|
8404
8418
|
field: "name",
|
|
8405
8419
|
headerName: g,
|
|
8406
8420
|
flex: 1,
|
|
@@ -8408,12 +8422,12 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8408
8422
|
floatingFilter: !1,
|
|
8409
8423
|
filter: !1,
|
|
8410
8424
|
resizable: !1,
|
|
8411
|
-
cellRenderer: (e) => e.data?.nodeType === $.FOLDER ? /* @__PURE__ */ K(
|
|
8425
|
+
cellRenderer: (e) => e.data?.nodeType === $.FOLDER ? /* @__PURE__ */ K(A, {
|
|
8412
8426
|
name: e.data.name,
|
|
8413
|
-
iconSize:
|
|
8414
|
-
}) : /* @__PURE__ */ K(
|
|
8427
|
+
iconSize: Tn
|
|
8428
|
+
}) : /* @__PURE__ */ K(O, {
|
|
8415
8429
|
name: e.data.name,
|
|
8416
|
-
iconSize:
|
|
8430
|
+
iconSize: Tn
|
|
8417
8431
|
})
|
|
8418
8432
|
}, {
|
|
8419
8433
|
field: "action",
|
|
@@ -8428,25 +8442,25 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8428
8442
|
if (!e.data) return null;
|
|
8429
8443
|
let t = [
|
|
8430
8444
|
{
|
|
8431
|
-
key:
|
|
8445
|
+
key: ln.Replace,
|
|
8432
8446
|
label: b,
|
|
8433
|
-
icon: /* @__PURE__ */ K(
|
|
8447
|
+
icon: /* @__PURE__ */ K(Le, {
|
|
8434
8448
|
size: 10,
|
|
8435
8449
|
className: "text-violet-1"
|
|
8436
8450
|
})
|
|
8437
8451
|
},
|
|
8438
8452
|
{
|
|
8439
|
-
key:
|
|
8453
|
+
key: ln.Duplicate,
|
|
8440
8454
|
label: x,
|
|
8441
|
-
icon: /* @__PURE__ */ K(
|
|
8455
|
+
icon: /* @__PURE__ */ K(Le, {
|
|
8442
8456
|
size: 10,
|
|
8443
8457
|
className: "text-success"
|
|
8444
8458
|
})
|
|
8445
8459
|
},
|
|
8446
8460
|
{
|
|
8447
|
-
key:
|
|
8448
|
-
label:
|
|
8449
|
-
icon: /* @__PURE__ */ K(
|
|
8461
|
+
key: ln.Cancel,
|
|
8462
|
+
label: S,
|
|
8463
|
+
icon: /* @__PURE__ */ K(Le, {
|
|
8450
8464
|
size: 10,
|
|
8451
8465
|
className: "text-error"
|
|
8452
8466
|
})
|
|
@@ -8454,12 +8468,12 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8454
8468
|
], n = t.find((t) => t.key === e.data.action), r = L === e.data.path;
|
|
8455
8469
|
return /* @__PURE__ */ K("div", {
|
|
8456
8470
|
className: "flex items-center h-full",
|
|
8457
|
-
children: /* @__PURE__ */ K(
|
|
8458
|
-
trigger: [
|
|
8471
|
+
children: /* @__PURE__ */ K(P, {
|
|
8472
|
+
trigger: [I.Click],
|
|
8459
8473
|
open: r,
|
|
8460
8474
|
items: t,
|
|
8461
8475
|
onItemClick: ({ key: t }) => {
|
|
8462
|
-
|
|
8476
|
+
F((n) => {
|
|
8463
8477
|
let r = new Map(n);
|
|
8464
8478
|
return r.set(e.data.path, t), r;
|
|
8465
8479
|
}), R(void 0);
|
|
@@ -8476,8 +8490,8 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8476
8490
|
children: [/* @__PURE__ */ q("span", {
|
|
8477
8491
|
className: "flex items-center gap-2",
|
|
8478
8492
|
children: [n?.icon, n?.label ?? b]
|
|
8479
|
-
}), /* @__PURE__ */ K(
|
|
8480
|
-
size:
|
|
8493
|
+
}), /* @__PURE__ */ K(Ie, {
|
|
8494
|
+
size: C.SM,
|
|
8481
8495
|
stroke: sn,
|
|
8482
8496
|
className: (0, $t.default)("text-secondary transition-transform", r && "rotate-180")
|
|
8483
8497
|
})]
|
|
@@ -8490,23 +8504,23 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8490
8504
|
_,
|
|
8491
8505
|
b,
|
|
8492
8506
|
x,
|
|
8493
|
-
|
|
8507
|
+
S,
|
|
8494
8508
|
L
|
|
8495
8509
|
]), ae = c(() => [
|
|
8496
8510
|
{
|
|
8497
|
-
value:
|
|
8511
|
+
value: un.ReplaceAll,
|
|
8498
8512
|
label: w
|
|
8499
8513
|
},
|
|
8500
8514
|
{
|
|
8501
|
-
value:
|
|
8515
|
+
value: un.DuplicateAll,
|
|
8502
8516
|
label: T
|
|
8503
8517
|
},
|
|
8504
8518
|
{
|
|
8505
|
-
value:
|
|
8519
|
+
value: un.DecideForEach,
|
|
8506
8520
|
label: E,
|
|
8507
|
-
content: /* @__PURE__ */ K(
|
|
8521
|
+
content: /* @__PURE__ */ K(H, {
|
|
8508
8522
|
columnDefs: ie,
|
|
8509
|
-
rowData:
|
|
8523
|
+
rowData: ne,
|
|
8510
8524
|
getRowId: (e) => e.id,
|
|
8511
8525
|
wrapCustomCellRenderers: !1,
|
|
8512
8526
|
alternateOddRowColors: !1,
|
|
@@ -8518,40 +8532,40 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8518
8532
|
T,
|
|
8519
8533
|
E,
|
|
8520
8534
|
ie,
|
|
8521
|
-
|
|
8535
|
+
ne
|
|
8522
8536
|
]), oe = n(() => {
|
|
8523
|
-
|
|
8524
|
-
}, [o]),
|
|
8537
|
+
k(ln.Replace), M(un.ReplaceAll), F(new Map(o.map((e) => [e.path, ln.Replace])));
|
|
8538
|
+
}, [o]), se = n(() => {
|
|
8525
8539
|
oe(), t();
|
|
8526
8540
|
}, [oe, t]), de = n(() => {
|
|
8527
|
-
oe(), v ?
|
|
8541
|
+
oe(), v ? D === ln.Replace ? r() : i() : j === un.ReplaceAll ? r() : j === un.DuplicateAll ? i() : j === un.DecideForEach && a && a(o.map((e) => ({
|
|
8528
8542
|
file: e,
|
|
8529
|
-
action:
|
|
8543
|
+
action: N.get(e.path) || ln.Replace
|
|
8530
8544
|
})));
|
|
8531
8545
|
}, [
|
|
8532
8546
|
oe,
|
|
8533
8547
|
v,
|
|
8534
|
-
|
|
8548
|
+
D,
|
|
8535
8549
|
r,
|
|
8536
8550
|
i,
|
|
8537
8551
|
j,
|
|
8538
8552
|
a,
|
|
8539
8553
|
o,
|
|
8540
|
-
|
|
8554
|
+
N
|
|
8541
8555
|
]);
|
|
8542
|
-
return /* @__PURE__ */ K(
|
|
8556
|
+
return /* @__PURE__ */ K(U, {
|
|
8543
8557
|
open: e,
|
|
8544
|
-
onClose:
|
|
8545
|
-
size: v ?
|
|
8558
|
+
onClose: se,
|
|
8559
|
+
size: v ? ce.Sm : ce.Md,
|
|
8546
8560
|
className: (0, $t.default)([!v && "w-[600px]"]),
|
|
8547
8561
|
header: z,
|
|
8548
8562
|
preventKeyboardOnOpen: !0,
|
|
8549
8563
|
footer: /* @__PURE__ */ q("div", {
|
|
8550
8564
|
className: "flex justify-end gap-3 py-4 px-6 border-t border-tertiary",
|
|
8551
|
-
children: [/* @__PURE__ */ K(
|
|
8552
|
-
onClick:
|
|
8565
|
+
children: [/* @__PURE__ */ K(re, {
|
|
8566
|
+
onClick: se,
|
|
8553
8567
|
label: h
|
|
8554
|
-
}), /* @__PURE__ */ K(
|
|
8568
|
+
}), /* @__PURE__ */ K(le, {
|
|
8555
8569
|
onClick: de,
|
|
8556
8570
|
label: m
|
|
8557
8571
|
})]
|
|
@@ -8561,13 +8575,13 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8561
8575
|
children: [/* @__PURE__ */ K("p", {
|
|
8562
8576
|
className: "text-secondary mb-4 break-words",
|
|
8563
8577
|
children: V
|
|
8564
|
-
}), v ? /* @__PURE__ */ K(
|
|
8578
|
+
}), v ? /* @__PURE__ */ K(ue, {
|
|
8565
8579
|
id: "single-file-conflict",
|
|
8566
8580
|
ariaLabel: z,
|
|
8567
|
-
items:
|
|
8568
|
-
value:
|
|
8569
|
-
onChange: (e) =>
|
|
8570
|
-
}) : /* @__PURE__ */ K(
|
|
8581
|
+
items: te,
|
|
8582
|
+
value: D,
|
|
8583
|
+
onChange: (e) => k(e)
|
|
8584
|
+
}) : /* @__PURE__ */ K(ue, {
|
|
8571
8585
|
id: "multiple-files-conflict",
|
|
8572
8586
|
ariaLabel: z,
|
|
8573
8587
|
items: ae,
|
|
@@ -8577,7 +8591,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8577
8591
|
})]
|
|
8578
8592
|
})
|
|
8579
8593
|
});
|
|
8580
|
-
},
|
|
8594
|
+
}, Rn = ({ getContextMenuItems: e, isRowDisabled: t, allowedFileTypes: r, maxSelectableFileSize: a, buttonClassName: o }) => {
|
|
8581
8595
|
let s = l(e);
|
|
8582
8596
|
i(() => {
|
|
8583
8597
|
s.current = e;
|
|
@@ -8585,7 +8599,7 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8585
8599
|
let u = n((e) => {
|
|
8586
8600
|
if (!e.data || t(e.data, r, a)) return null;
|
|
8587
8601
|
let n = e.data ? s.current?.(e.data) ?? [] : [];
|
|
8588
|
-
return n.length ? /* @__PURE__ */ K(
|
|
8602
|
+
return n.length ? /* @__PURE__ */ K(P, {
|
|
8589
8603
|
placement: "bottom-start",
|
|
8590
8604
|
allowedPlacements: [
|
|
8591
8605
|
"top-start",
|
|
@@ -8593,8 +8607,8 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8593
8607
|
"bottom-start"
|
|
8594
8608
|
],
|
|
8595
8609
|
items: n,
|
|
8596
|
-
className:
|
|
8597
|
-
children: /* @__PURE__ */ K(
|
|
8610
|
+
className: De("sticky right-0", o),
|
|
8611
|
+
children: /* @__PURE__ */ K(V, { icon: /* @__PURE__ */ K(Be, { ...Z }) })
|
|
8598
8612
|
}) : null;
|
|
8599
8613
|
}, [
|
|
8600
8614
|
r,
|
|
@@ -8615,19 +8629,19 @@ var nt = Object.create, rt = Object.defineProperty, it = Object.getOwnPropertyDe
|
|
|
8615
8629
|
floatingFilter: !1,
|
|
8616
8630
|
cellRenderer: u
|
|
8617
8631
|
}), [u]) };
|
|
8618
|
-
},
|
|
8619
|
-
let [t, r] = u(
|
|
8632
|
+
}, zn = ({ onRename: e }) => {
|
|
8633
|
+
let [t, r] = u(fn.Grid);
|
|
8620
8634
|
return {
|
|
8621
8635
|
renameTriggerView: t,
|
|
8622
8636
|
onGridRename: n((t) => {
|
|
8623
|
-
e(t), r(
|
|
8637
|
+
e(t), r(fn.Grid);
|
|
8624
8638
|
}, [e]),
|
|
8625
8639
|
onTreeRename: n((t) => {
|
|
8626
|
-
e(t), r(
|
|
8640
|
+
e(t), r(fn.Tree);
|
|
8627
8641
|
}, [e])
|
|
8628
8642
|
};
|
|
8629
8643
|
};
|
|
8630
|
-
function
|
|
8644
|
+
function Bn(e, t) {
|
|
8631
8645
|
let n = l(null), [r, a] = u(!1);
|
|
8632
8646
|
return i(() => {
|
|
8633
8647
|
if (!n.current) return;
|
|
@@ -8641,27 +8655,27 @@ function zn(e, t) {
|
|
|
8641
8655
|
isBelowBreakpoint: r
|
|
8642
8656
|
};
|
|
8643
8657
|
}
|
|
8644
|
-
var
|
|
8658
|
+
var Vn = (e, t) => {
|
|
8645
8659
|
if (!(!e || !e.length || !t)) for (let n of e) {
|
|
8646
8660
|
if (n.path === t) return n;
|
|
8647
|
-
let e =
|
|
8661
|
+
let e = Vn(n.items, t);
|
|
8648
8662
|
if (e) return e;
|
|
8649
8663
|
}
|
|
8650
|
-
},
|
|
8664
|
+
}, Hn = (e, t) => {
|
|
8651
8665
|
if (!e?.length) return;
|
|
8652
8666
|
if (!t) return e[0];
|
|
8653
|
-
let n =
|
|
8667
|
+
let n = Vn(e, t);
|
|
8654
8668
|
if (n && n.nodeType === $.FOLDER) return n;
|
|
8655
8669
|
let r = t.split("/").filter(Boolean);
|
|
8656
|
-
return r.length <= 1 ? e[0] :
|
|
8657
|
-
},
|
|
8670
|
+
return r.length <= 1 ? e[0] : Vn(e, "/" + r.slice(0, r.length - 1).join("/")) ?? e[0];
|
|
8671
|
+
}, Un = (e) => (e ?? "").toLowerCase(), Wn = (e) => Un(e).replace(/^\./, ""), Gn = (e) => {
|
|
8658
8672
|
if (!e) return [];
|
|
8659
8673
|
let t = [], n = (e) => {
|
|
8660
8674
|
let r = e.items ?? [];
|
|
8661
8675
|
for (let e of r) t.push(e), e.nodeType === $.FOLDER && n(e);
|
|
8662
8676
|
};
|
|
8663
8677
|
return n(e), t;
|
|
8664
|
-
},
|
|
8678
|
+
}, Kn = (e, t) => {
|
|
8665
8679
|
if (!e?.length) return [];
|
|
8666
8680
|
if (!t?.length) return e;
|
|
8667
8681
|
let n = new Set(t), r = (e) => e.filter((e) => !n.has(e.path)).map((e) => e.items?.length ? {
|
|
@@ -8669,11 +8683,11 @@ var Bn = (e, t) => {
|
|
|
8669
8683
|
items: r(e.items)
|
|
8670
8684
|
} : e);
|
|
8671
8685
|
return r(e);
|
|
8672
|
-
},
|
|
8686
|
+
}, qn = (e) => (e.name ?? e.path.split("/").pop() ?? "").startsWith("."), Jn = (e) => {
|
|
8673
8687
|
if (!e) return "0 bytes";
|
|
8674
8688
|
let t = 1024, n = t * 1024;
|
|
8675
8689
|
return e >= n ? `${(e / n).toFixed(1)} MB` : e >= t ? `${(e / t).toFixed(0)} KB` : `${e} bytes`;
|
|
8676
|
-
},
|
|
8690
|
+
}, Yn = (e, t = "en-US", n = {
|
|
8677
8691
|
year: "numeric",
|
|
8678
8692
|
month: "short",
|
|
8679
8693
|
day: "2-digit"
|
|
@@ -8685,7 +8699,7 @@ var Bn = (e, t) => {
|
|
|
8685
8699
|
return e;
|
|
8686
8700
|
}
|
|
8687
8701
|
};
|
|
8688
|
-
function
|
|
8702
|
+
function Xn(e, t, n) {
|
|
8689
8703
|
if (!e || e.includes("*/*")) return !0;
|
|
8690
8704
|
let r = t.toLowerCase(), i = n && n.includes(".") ? `.${n.split(".").at(-1).toLowerCase()}` : void 0;
|
|
8691
8705
|
return e.some((e) => {
|
|
@@ -8698,21 +8712,21 @@ function Yn(e, t, n) {
|
|
|
8698
8712
|
return r === t;
|
|
8699
8713
|
});
|
|
8700
8714
|
}
|
|
8701
|
-
var
|
|
8715
|
+
var Zn = (e) => e?.map((e) => e.endsWith("/*") ? e.replace("/*", "s") : Qn(e).flat().map((e) => `.${e}`)).flat().join(", ") || "", Qn = (e) => {
|
|
8702
8716
|
let [t, n] = e.split("/");
|
|
8703
8717
|
return t === "*" ? ["all"] : n === "*" ? Object.entries(en.extensions).reduce((e, [n, r]) => {
|
|
8704
8718
|
let [i] = n.split("/");
|
|
8705
8719
|
return i === t && e.push(...r), e;
|
|
8706
8720
|
}, []) : en.extensions[e] || [];
|
|
8707
|
-
},
|
|
8721
|
+
}, $n = (e) => {
|
|
8708
8722
|
if (!e) return;
|
|
8709
8723
|
let t = e.flags.replace(/[gy]/g, "");
|
|
8710
8724
|
return new RegExp(e.source, t);
|
|
8711
8725
|
};
|
|
8712
|
-
function
|
|
8713
|
-
if (t &&
|
|
8726
|
+
function er(e, t, n) {
|
|
8727
|
+
if (t && $n(t)?.test(e.name)) return n ?? `This ${e.isFolder ? "folder" : "file"} contains forbidden characters in its name. Please rename it.`;
|
|
8714
8728
|
}
|
|
8715
|
-
var
|
|
8729
|
+
var tr = (e) => {
|
|
8716
8730
|
let t = e.lastIndexOf("/");
|
|
8717
8731
|
return t >= 0 ? {
|
|
8718
8732
|
parent: e.slice(0, t),
|
|
@@ -8721,31 +8735,31 @@ var er = (e) => {
|
|
|
8721
8735
|
parent: "",
|
|
8722
8736
|
name: e
|
|
8723
8737
|
};
|
|
8724
|
-
},
|
|
8725
|
-
let r = !e.contentLength || n == null || e.contentLength <= n, i = !e.contentType ||
|
|
8738
|
+
}, nr = (e, t, n) => {
|
|
8739
|
+
let r = !e.contentLength || n == null || e.contentLength <= n, i = !e.contentType || Xn(t, e.contentType, e.name);
|
|
8726
8740
|
return r && i;
|
|
8727
|
-
},
|
|
8741
|
+
}, rr = (e, t, n, r, i) => {
|
|
8728
8742
|
if (e.nodeType === $.FOLDER) return;
|
|
8729
8743
|
let a = !e.contentLength || n == null || e.contentLength <= n;
|
|
8730
|
-
if (!(!e.contentType ||
|
|
8731
|
-
if (!a) return i ?? `File is too large. Maximum size: ${
|
|
8732
|
-
},
|
|
8744
|
+
if (!(!e.contentType || Xn(t, e.contentType, e.name))) return r ?? (t?.length ? `Unsupported file type. Supported types: ${Zn(t)}.` : "Unsupported file type.");
|
|
8745
|
+
if (!a) return i ?? `File is too large. Maximum size: ${Jn(n)}.`;
|
|
8746
|
+
}, ir = new Intl.Collator(void 0, {
|
|
8733
8747
|
sensitivity: "base",
|
|
8734
8748
|
numeric: !0
|
|
8735
|
-
}),
|
|
8749
|
+
}), ar = (e, t, n, r, i) => {
|
|
8736
8750
|
if (typeof e == "string" && typeof t == "string" && e && t) {
|
|
8737
|
-
let n =
|
|
8751
|
+
let n = ir.compare(e, t);
|
|
8738
8752
|
return n === 0 ? 0 : n > 0 ? 1 : -1;
|
|
8739
8753
|
}
|
|
8740
8754
|
return e === t ? 0 : e ? t ? e > t ? 1 : -1 : i ? 1 : -1 : i ? -1 : 1;
|
|
8741
|
-
},
|
|
8742
|
-
let t = `${
|
|
8755
|
+
}, or = (e) => e.replace(/\/+$/, "").split("/").filter(Boolean).length, sr = (e) => {
|
|
8756
|
+
let t = `${On} `, n = RegExp(`^${On} (\\d+)$`), r = new Set(e.map((e) => e.name.toLowerCase())), i = e.map((e) => {
|
|
8743
8757
|
let t = e.name.match(n);
|
|
8744
8758
|
return t ? parseInt(t[1], 10) : 0;
|
|
8745
8759
|
}).reduce((e, t) => Math.max(e, t), 0), a = `${t}${i + 1}`, o = i + 1;
|
|
8746
8760
|
for (; r.has(a.toLowerCase());) o++, a = `${t}${o}`;
|
|
8747
8761
|
return a;
|
|
8748
|
-
},
|
|
8762
|
+
}, cr = (e) => {
|
|
8749
8763
|
let [t, r] = u(e?.showHiddenFiles ?? !1), i = !!e?.onShowHiddenFilesChange, a = i ? e.showHiddenFiles ?? !1 : t, o = n((t) => {
|
|
8750
8764
|
i ? e?.onShowHiddenFilesChange?.(t) : r(t);
|
|
8751
8765
|
}, [i, e]);
|
|
@@ -8761,7 +8775,7 @@ var er = (e) => {
|
|
|
8761
8775
|
]),
|
|
8762
8776
|
setAreHiddenFilesVisible: o
|
|
8763
8777
|
};
|
|
8764
|
-
},
|
|
8778
|
+
}, lr = (e) => {
|
|
8765
8779
|
let [t, r] = u(e?.collapsed ?? !1), i = !!e?.onCollapseChange, a = i ? e.collapsed ?? !1 : t, o = n((t) => {
|
|
8766
8780
|
i ? e?.onCollapseChange?.(t) : r(t);
|
|
8767
8781
|
}, [i, e]);
|
|
@@ -8777,7 +8791,7 @@ var er = (e) => {
|
|
|
8777
8791
|
]),
|
|
8778
8792
|
setIsTreeCollapsed: o
|
|
8779
8793
|
};
|
|
8780
|
-
},
|
|
8794
|
+
}, ur = (e, t, n) => {
|
|
8781
8795
|
if (!t.has(e)) return e;
|
|
8782
8796
|
let r = n === $.FOLDER ? (e, t) => `${e} (${t})` : (e, t) => {
|
|
8783
8797
|
let n = e.lastIndexOf("."), r = n > 0;
|
|
@@ -8787,21 +8801,21 @@ var er = (e) => {
|
|
|
8787
8801
|
let i = r(e, n);
|
|
8788
8802
|
if (!t.has(i)) return i;
|
|
8789
8803
|
}
|
|
8790
|
-
},
|
|
8804
|
+
}, dr = (e) => e.name, fr = ({ getDestinationFiles: e, onResolve: t }) => {
|
|
8791
8805
|
let [r, i] = u([]), [a, o] = u(!1), [s, c] = u(null), d = l(!1), f = n((e) => {
|
|
8792
8806
|
d.current = !0, i(e), o(!0);
|
|
8793
8807
|
}, []), p = n(() => {
|
|
8794
8808
|
d.current = !1, o(!1), i([]), c(null);
|
|
8795
8809
|
}, []), m = n((t, n) => {
|
|
8796
|
-
let r = e(t), i = new Set(r.map(
|
|
8810
|
+
let r = e(t), i = new Set(r.map(dr)), a = n.filter((e) => i.has(e.name));
|
|
8797
8811
|
return {
|
|
8798
8812
|
hasConflicts: a.length > 0,
|
|
8799
8813
|
conflicts: a
|
|
8800
8814
|
};
|
|
8801
8815
|
}, [e]), h = n((t, n, r, i) => {
|
|
8802
|
-
let a = e(t), o = new Set(a.map(
|
|
8816
|
+
let a = e(t), o = new Set(a.map(dr));
|
|
8803
8817
|
return n.map((e) => {
|
|
8804
|
-
let n = e.name, a = o.has(n), s = r && a ? n :
|
|
8818
|
+
let n = e.name, a = o.has(n), s = r && a ? n : ur(n, o, e.nodeType);
|
|
8805
8819
|
return (!r || !a) && o.add(s), {
|
|
8806
8820
|
sourceUrl: e.path,
|
|
8807
8821
|
destinationUrl: `${t}/${s}`,
|
|
@@ -8811,9 +8825,9 @@ var er = (e) => {
|
|
|
8811
8825
|
};
|
|
8812
8826
|
});
|
|
8813
8827
|
}, [e]), g = n((t, n, r, i) => {
|
|
8814
|
-
let a = e(t), o = new Set(a.map(
|
|
8815
|
-
return n.filter((e) => r.get(e.path) !==
|
|
8816
|
-
let n = r.get(e.path), a = o.has(e.name), s = n ===
|
|
8828
|
+
let a = e(t), o = new Set(a.map(dr));
|
|
8829
|
+
return n.filter((e) => r.get(e.path) !== ln.Cancel).map((e) => {
|
|
8830
|
+
let n = r.get(e.path), a = o.has(e.name), s = n === ln.Replace && a, c = s ? e.name : ur(e.name, o, e.nodeType);
|
|
8817
8831
|
return s || o.add(c), {
|
|
8818
8832
|
sourceUrl: e.path,
|
|
8819
8833
|
destinationUrl: `${t}/${c}`,
|
|
@@ -8862,7 +8876,7 @@ var er = (e) => {
|
|
|
8862
8876
|
]),
|
|
8863
8877
|
handleCancelAll: n(() => {
|
|
8864
8878
|
if (!s) return;
|
|
8865
|
-
let { files: e, destinationFolder: n, metadata: i } = s, a = g(n, e, new Map(r.map((e) => [e.path,
|
|
8879
|
+
let { files: e, destinationFolder: n, metadata: i } = s, a = g(n, e, new Map(r.map((e) => [e.path, ln.Cancel])), i);
|
|
8866
8880
|
t?.(a, n), p();
|
|
8867
8881
|
}, [
|
|
8868
8882
|
p,
|
|
@@ -8882,17 +8896,17 @@ var er = (e) => {
|
|
|
8882
8896
|
p
|
|
8883
8897
|
])
|
|
8884
8898
|
};
|
|
8885
|
-
},
|
|
8886
|
-
let [l, d] = u(!1), [f, p] = u([]), [m, h] = u([]), [g, _] = u(
|
|
8899
|
+
}, pr = ({ getDestinationFiles: e, onCopyFiles: t, onMoveToFiles: r, onCopySuccess: i, onMoveSuccess: a, onDuplicateSuccess: o, getCopyHeader: s, getMoveHeader: c }) => {
|
|
8900
|
+
let [l, d] = u(!1), [f, p] = u([]), [m, h] = u([]), [g, _] = u(dn.Copy), [v, y] = u(), [b, x] = u(null), { conflictingFiles: S, conflictResolutionOpen: C, hasActiveConflictRef: w, startConflictResolution: T, resolveConflictsWithStrategy: E, closeConflictResolution: D, openConflictResolution: O, handleReplaceAll: k, handleDuplicateAll: A, handleCancelAll: j, handleDecideForEach: M } = fr({
|
|
8887
8901
|
getDestinationFiles: e,
|
|
8888
8902
|
onResolve: (e, n) => {
|
|
8889
|
-
e?.length && (b?.type ===
|
|
8903
|
+
e?.length && (b?.type === dn.Copy ? (t?.(e, n), i?.()) : b?.type === dn.Move && b.sourceFolder && (r?.(e, b.sourceFolder, n), a?.()));
|
|
8890
8904
|
}
|
|
8891
8905
|
}), N = n(() => {
|
|
8892
8906
|
p([]), h([]), x(null), y(void 0);
|
|
8893
8907
|
}, []), P = n((e) => {
|
|
8894
|
-
let n = T(e, f, { type:
|
|
8895
|
-
if (x({ type:
|
|
8908
|
+
let n = T(e, f, { type: dn.Copy });
|
|
8909
|
+
if (x({ type: dn.Copy }), !n.hasConflicts) {
|
|
8896
8910
|
let n = E(e, f, !1);
|
|
8897
8911
|
t?.(n, e), i?.(), N();
|
|
8898
8912
|
}
|
|
@@ -8906,7 +8920,7 @@ var er = (e) => {
|
|
|
8906
8920
|
]), F = n((e, t) => {
|
|
8907
8921
|
let n = t || (b?.sourceFolder ?? "/");
|
|
8908
8922
|
if (!T(e, m, {
|
|
8909
|
-
type:
|
|
8923
|
+
type: dn.Move,
|
|
8910
8924
|
sourceFolderPath: n
|
|
8911
8925
|
}).hasConflicts) {
|
|
8912
8926
|
let t = E(e, m, !0);
|
|
@@ -8928,37 +8942,37 @@ var er = (e) => {
|
|
|
8928
8942
|
j(), N();
|
|
8929
8943
|
}, [j, N]), z = n((e) => {
|
|
8930
8944
|
M(e), N();
|
|
8931
|
-
}, [M, N]),
|
|
8945
|
+
}, [M, N]), B = n((e) => {
|
|
8932
8946
|
let n = e.at(0)?.parentPath ?? "/", r = E(n, e, !1);
|
|
8933
8947
|
t?.(r, n), o?.();
|
|
8934
8948
|
}, [
|
|
8935
8949
|
t,
|
|
8936
8950
|
o,
|
|
8937
8951
|
E
|
|
8938
|
-
]),
|
|
8952
|
+
]), ee = n((e) => {
|
|
8939
8953
|
_(e), d(!0);
|
|
8940
|
-
}, []),
|
|
8954
|
+
}, []), V = n(() => {
|
|
8941
8955
|
d(!1), w.current || N();
|
|
8942
|
-
}, [N, w]), [
|
|
8956
|
+
}, [N, w]), [H, te] = u();
|
|
8943
8957
|
return {
|
|
8944
|
-
handleDuplicate:
|
|
8945
|
-
handleCloseDestinationFolderPopup:
|
|
8946
|
-
handleOpenDestinationFolderPopup:
|
|
8958
|
+
handleDuplicate: B,
|
|
8959
|
+
handleCloseDestinationFolderPopup: V,
|
|
8960
|
+
handleOpenDestinationFolderPopup: ee,
|
|
8947
8961
|
handleCopyTo: P,
|
|
8948
8962
|
handleMoveTo: F,
|
|
8949
8963
|
openDestinationFolderPopup: l,
|
|
8950
8964
|
destinationFolderMode: g,
|
|
8951
|
-
destinationFolderTitle:
|
|
8965
|
+
destinationFolderTitle: H,
|
|
8952
8966
|
handleSetCopiedFiles: n((e) => {
|
|
8953
|
-
p(e), y(e[0]?.parentPath ?? e[0]?.folderId), s && e.length > 0 ?
|
|
8967
|
+
p(e), y(e[0]?.parentPath ?? e[0]?.folderId), s && e.length > 0 ? te(s(e.length, e[0]?.name)) : te(void 0);
|
|
8954
8968
|
}, [s]),
|
|
8955
8969
|
handleSetMovedFiles: n((e) => {
|
|
8956
8970
|
h(e);
|
|
8957
8971
|
let t = e[0]?.parentPath ?? e[0]?.folderId;
|
|
8958
8972
|
y(t), x({
|
|
8959
|
-
type:
|
|
8973
|
+
type: dn.Move,
|
|
8960
8974
|
sourceFolder: t
|
|
8961
|
-
}), c && e.length > 0 ?
|
|
8975
|
+
}), c && e.length > 0 ? te(c(e.length, e[0]?.name)) : te(void 0);
|
|
8962
8976
|
}, [c]),
|
|
8963
8977
|
clearState: N,
|
|
8964
8978
|
conflictingFiles: S,
|
|
@@ -8971,7 +8985,7 @@ var er = (e) => {
|
|
|
8971
8985
|
handleConflictDecideForEach: z,
|
|
8972
8986
|
sourceFolder: v
|
|
8973
8987
|
};
|
|
8974
|
-
},
|
|
8988
|
+
}, mr = ({ path: e, defaultPath: t, onPathChange: r, onSelectionClear: i }) => {
|
|
8975
8989
|
let a = e !== void 0, [o, s] = u(t), c = a ? e : o, l = n((e) => {
|
|
8976
8990
|
a || s(e), r?.(e);
|
|
8977
8991
|
}, [a, r]);
|
|
@@ -8982,7 +8996,7 @@ var er = (e) => {
|
|
|
8982
8996
|
l(e), i?.();
|
|
8983
8997
|
}, [l, i])
|
|
8984
8998
|
};
|
|
8985
|
-
},
|
|
8999
|
+
}, hr = ({ onDeleteFiles: e, onDeleteSuccess: t }) => {
|
|
8986
9000
|
let [r, i] = u(!1), [a, o] = u([]), [s, c] = u(""), l = n((e, t) => {
|
|
8987
9001
|
o(e), c(t), i(!0);
|
|
8988
9002
|
}, []), d = n(() => {
|
|
@@ -9006,16 +9020,16 @@ var er = (e) => {
|
|
|
9006
9020
|
s
|
|
9007
9021
|
])
|
|
9008
9022
|
};
|
|
9009
|
-
},
|
|
9023
|
+
}, gr = ({ onDownloadFiles: e, customDownloadItemsAction: t, onDownloadSuccess: r }) => ({ handleDownloadFiles: n((n) => {
|
|
9010
9024
|
t && n.length > 0 ? t(n) : e && n.length > 0 && (e(n), r?.());
|
|
9011
9025
|
}, [
|
|
9012
9026
|
e,
|
|
9013
9027
|
r,
|
|
9014
9028
|
t
|
|
9015
|
-
]) }),
|
|
9016
|
-
let [m, h] = u(!1), [g, _] = u(!1), [v, y] = u(), b = l(null), x = l(""), S = l([]), C = c(() => !!p?.permissions?.includes(
|
|
9029
|
+
]) }), _r = (e) => "dataTransfer" in e && e.dataTransfer !== null, vr = ({ onUploadFiles: e, onValidateUpload: t, maxFileSize: r, allowedFileTypes: a, validationMessages: o = {}, onUploadArchive: s, prepareUploadFileName: d, uploadEnabled: f = !0, currentFolder: p } = {}) => {
|
|
9030
|
+
let [m, h] = u(!1), [g, _] = u(!1), [v, y] = u(), b = l(null), x = l(""), S = l([]), C = c(() => !!p?.permissions?.includes(In.WRITE), [p]), [w, T] = u(/* @__PURE__ */ new Map()), [E, D] = u(null), O = n((e) => !a || a.includes("*/*") ? e : e.filter(({ fileContent: e, name: t }) => Xn(a, e.type, t)), [a]), k = n(() => {
|
|
9017
9031
|
T(/* @__PURE__ */ new Map()), D(null);
|
|
9018
|
-
}, []), { conflictingFiles: A, conflictResolutionOpen: j, hasActiveConflictRef: M, checkForConflicts: N, startConflictResolution: P, closeConflictResolution: F, openConflictResolution: I, handleReplaceAll: L, handleDuplicateAll: R, handleCancelAll: z, handleDecideForEach:
|
|
9032
|
+
}, []), { conflictingFiles: A, conflictResolutionOpen: j, hasActiveConflictRef: M, checkForConflicts: N, startConflictResolution: P, closeConflictResolution: F, openConflictResolution: I, handleReplaceAll: L, handleDuplicateAll: R, handleCancelAll: z, handleDecideForEach: B } = fr({
|
|
9019
9033
|
getDestinationFiles: () => S.current,
|
|
9020
9034
|
onResolve: (t, n) => {
|
|
9021
9035
|
if (!f || !C) {
|
|
@@ -9049,7 +9063,7 @@ var er = (e) => {
|
|
|
9049
9063
|
]), i(() => {
|
|
9050
9064
|
if (!f || !C) return;
|
|
9051
9065
|
let e = 0, t = (t) => {
|
|
9052
|
-
|
|
9066
|
+
_r(t) && t.dataTransfer.types.includes(En) && (e++, _(!0));
|
|
9053
9067
|
}, n = () => {
|
|
9054
9068
|
e--, e === 0 && _(!1);
|
|
9055
9069
|
}, r = () => {
|
|
@@ -9061,7 +9075,7 @@ var er = (e) => {
|
|
|
9061
9075
|
window.removeEventListener("dragenter", t), window.removeEventListener("dragleave", n), window.removeEventListener("drop", r), window.removeEventListener("dragover", i);
|
|
9062
9076
|
};
|
|
9063
9077
|
}, [f, C]);
|
|
9064
|
-
let
|
|
9078
|
+
let ee = n((e) => r ? e.filter((e) => e.fileContent.size > r).map((e) => e.name) : [], [r]), V = n((e, t) => e.map((e) => ({
|
|
9065
9079
|
id: e.name,
|
|
9066
9080
|
name: e.name,
|
|
9067
9081
|
folderId: t,
|
|
@@ -9069,13 +9083,13 @@ var er = (e) => {
|
|
|
9069
9083
|
nodeType: $.ITEM,
|
|
9070
9084
|
parentPath: t,
|
|
9071
9085
|
contentLength: e.fileContent.size
|
|
9072
|
-
})), []),
|
|
9086
|
+
})), []), H = n(async (n, i, a) => {
|
|
9073
9087
|
if (!f || !C) return !1;
|
|
9074
9088
|
y(void 0), S.current = a;
|
|
9075
9089
|
let s = d ? n.map((e) => ({
|
|
9076
9090
|
...e,
|
|
9077
9091
|
name: d(e.name)
|
|
9078
|
-
})) : n, c =
|
|
9092
|
+
})) : n, c = ee(s);
|
|
9079
9093
|
if (c.length > 0) {
|
|
9080
9094
|
let e = r ? (r / 1048576).toFixed(2) : 0;
|
|
9081
9095
|
return y(o.oversizedFiles || `Files exceed maximum size (${e}MB): ${c.join(", ")}`), !1;
|
|
@@ -9086,30 +9100,30 @@ var er = (e) => {
|
|
|
9086
9100
|
} catch {
|
|
9087
9101
|
return y(o.validationError || "Validation error occurred"), !1;
|
|
9088
9102
|
}
|
|
9089
|
-
let l =
|
|
9090
|
-
return m.length > 0 && e?.(m, i), p.size === 0 ? (k(), !0) : (S.current = [...a, ...
|
|
9103
|
+
let l = V(s, i), { conflicts: u } = N(i, l), p = new Set(u.map((e) => e.name)), m = s.filter((e) => !p.has(e.name));
|
|
9104
|
+
return m.length > 0 && e?.(m, i), p.size === 0 ? (k(), !0) : (S.current = [...a, ...V(m, i)], T(new Map(s.filter((e) => p.has(e.name)).map((e) => [e.name, e]))), D({ destinationFolder: i }), P(i, l.filter((e) => p.has(e.name)), { destinationFolder: i }), !1);
|
|
9091
9105
|
}, [
|
|
9092
9106
|
f,
|
|
9093
9107
|
e,
|
|
9094
9108
|
t,
|
|
9095
9109
|
d,
|
|
9096
|
-
|
|
9110
|
+
ee,
|
|
9097
9111
|
r,
|
|
9098
9112
|
o,
|
|
9099
|
-
|
|
9113
|
+
V,
|
|
9100
9114
|
N,
|
|
9101
9115
|
P,
|
|
9102
9116
|
k,
|
|
9103
9117
|
C
|
|
9104
|
-
]),
|
|
9118
|
+
]), te = n(() => {
|
|
9105
9119
|
L(), k();
|
|
9106
9120
|
}, [L, k]), ne = n(() => {
|
|
9107
9121
|
R(), k();
|
|
9108
9122
|
}, [R, k]), re = n(() => {
|
|
9109
9123
|
z(), k();
|
|
9110
9124
|
}, [z, k]), ie = n((e) => {
|
|
9111
|
-
|
|
9112
|
-
}, [
|
|
9125
|
+
B(e), k();
|
|
9126
|
+
}, [B, k]), ae = n(() => {
|
|
9113
9127
|
F(), M.current || k();
|
|
9114
9128
|
}, [
|
|
9115
9129
|
F,
|
|
@@ -9148,11 +9162,11 @@ var er = (e) => {
|
|
|
9148
9162
|
y(o.unsupportedFiles || "Selected files are not supported");
|
|
9149
9163
|
return;
|
|
9150
9164
|
}
|
|
9151
|
-
await
|
|
9165
|
+
await H(s, t, n);
|
|
9152
9166
|
}, [
|
|
9153
9167
|
f,
|
|
9154
9168
|
O,
|
|
9155
|
-
|
|
9169
|
+
H,
|
|
9156
9170
|
o,
|
|
9157
9171
|
C
|
|
9158
9172
|
]), le = l(() => {});
|
|
@@ -9174,7 +9188,7 @@ var er = (e) => {
|
|
|
9174
9188
|
return;
|
|
9175
9189
|
}
|
|
9176
9190
|
try {
|
|
9177
|
-
await
|
|
9191
|
+
await H(t, x.current, S.current);
|
|
9178
9192
|
} catch {
|
|
9179
9193
|
y(o.validationError || "Upload failed");
|
|
9180
9194
|
} finally {
|
|
@@ -9185,7 +9199,7 @@ var er = (e) => {
|
|
|
9185
9199
|
f,
|
|
9186
9200
|
C,
|
|
9187
9201
|
O,
|
|
9188
|
-
|
|
9202
|
+
H,
|
|
9189
9203
|
o
|
|
9190
9204
|
]), i(() => {
|
|
9191
9205
|
let e = document.createElement("input");
|
|
@@ -9253,7 +9267,7 @@ var er = (e) => {
|
|
|
9253
9267
|
clearError: n(() => {
|
|
9254
9268
|
y(void 0);
|
|
9255
9269
|
}, []),
|
|
9256
|
-
handleUpload:
|
|
9270
|
+
handleUpload: H,
|
|
9257
9271
|
openFileDialog: ue,
|
|
9258
9272
|
openArchiveDialog: de,
|
|
9259
9273
|
fileInputRef: b,
|
|
@@ -9262,40 +9276,40 @@ var er = (e) => {
|
|
|
9262
9276
|
hasActiveUploadConflictRef: M,
|
|
9263
9277
|
openUploadConflictResolution: I,
|
|
9264
9278
|
closeUploadConflictResolution: ae,
|
|
9265
|
-
handleUploadConflictReplace:
|
|
9279
|
+
handleUploadConflictReplace: te,
|
|
9266
9280
|
handleUploadConflictDuplicate: ne,
|
|
9267
9281
|
handleUploadConflictCancel: re,
|
|
9268
9282
|
handleUploadConflictDecideForEach: ie
|
|
9269
9283
|
};
|
|
9270
|
-
},
|
|
9284
|
+
}, yr = t(void 0), br = { hiddenItemWarning: `${se.Warning}__A dot at the start of the name will make the item hidden` }, xr = { consecutiveDotsError: "Name cannot contain consecutive dots" }, Sr = {
|
|
9271
9285
|
emptyName: "Name cannot be empty",
|
|
9272
9286
|
duplicateName: "An item with this name already exists",
|
|
9273
|
-
hiddenItemWarning:
|
|
9274
|
-
consecutiveDotsError:
|
|
9287
|
+
hiddenItemWarning: br.hiddenItemWarning,
|
|
9288
|
+
consecutiveDotsError: xr.consecutiveDotsError
|
|
9275
9289
|
};
|
|
9276
|
-
function
|
|
9290
|
+
function Cr(e) {
|
|
9277
9291
|
let t = e.length;
|
|
9278
9292
|
for (; t > 0 && e[t - 1] === "/";) t--;
|
|
9279
9293
|
return e.slice(0, t);
|
|
9280
9294
|
}
|
|
9281
|
-
function
|
|
9282
|
-
let n =
|
|
9295
|
+
function wr(e, t) {
|
|
9296
|
+
let n = Cr(e), r = n.lastIndexOf("/");
|
|
9283
9297
|
return r === -1 ? t : n.slice(0, r + 1) + t;
|
|
9284
9298
|
}
|
|
9285
|
-
function
|
|
9299
|
+
function Tr(e) {
|
|
9286
9300
|
let t = e.lastIndexOf(".");
|
|
9287
9301
|
return t === -1 || t === 0 ? e : e.substring(0, t);
|
|
9288
9302
|
}
|
|
9289
|
-
function
|
|
9303
|
+
function Er(e) {
|
|
9290
9304
|
let t = e.lastIndexOf(".");
|
|
9291
9305
|
return t === -1 || t === 0 ? "" : e.substring(t);
|
|
9292
9306
|
}
|
|
9293
|
-
var
|
|
9307
|
+
var Dr = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles: i }) => {
|
|
9294
9308
|
let [a, o] = u(), s = c(() => ({
|
|
9295
|
-
...
|
|
9309
|
+
...Sr,
|
|
9296
9310
|
...r
|
|
9297
9311
|
}), [r]), l = c(() => a?.path, [a]), d = n((t) => {
|
|
9298
|
-
let n =
|
|
9312
|
+
let n = Vn(e, t);
|
|
9299
9313
|
n && o(n);
|
|
9300
9314
|
}, [e]), f = n(() => {
|
|
9301
9315
|
o(void 0);
|
|
@@ -9311,14 +9325,14 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9311
9325
|
}
|
|
9312
9326
|
let t = a.nodeType === $.ITEM, n = e.trim();
|
|
9313
9327
|
if (t) {
|
|
9314
|
-
let e =
|
|
9328
|
+
let e = Er(a.name);
|
|
9315
9329
|
e && !n.endsWith(e) && (n += e);
|
|
9316
9330
|
}
|
|
9317
9331
|
if (n === a.name) {
|
|
9318
9332
|
o(void 0);
|
|
9319
9333
|
return;
|
|
9320
9334
|
}
|
|
9321
|
-
let r =
|
|
9335
|
+
let r = wr(a.path, n), s = a.parentPath;
|
|
9322
9336
|
if (!s) {
|
|
9323
9337
|
o(void 0);
|
|
9324
9338
|
return;
|
|
@@ -9337,12 +9351,12 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9337
9351
|
if (i.startsWith(".")) return s.hiddenItemWarning;
|
|
9338
9352
|
let a = r.nodeType === $.ITEM, o = i;
|
|
9339
9353
|
if (a) {
|
|
9340
|
-
let e =
|
|
9354
|
+
let e = Er(r.name);
|
|
9341
9355
|
e && !o.endsWith(e) && (o += e);
|
|
9342
9356
|
}
|
|
9343
9357
|
let c = r.parentPath;
|
|
9344
9358
|
if (c) {
|
|
9345
|
-
let t =
|
|
9359
|
+
let t = Vn(e, c);
|
|
9346
9360
|
if (t && new Set((t.items ?? []).filter((e) => e.path !== r.path).map((e) => e.name.toLowerCase())).has(o.toLowerCase())) return s.duplicateName;
|
|
9347
9361
|
}
|
|
9348
9362
|
if (t) {
|
|
@@ -9355,9 +9369,9 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9355
9369
|
s,
|
|
9356
9370
|
e
|
|
9357
9371
|
]),
|
|
9358
|
-
getDisplayName: n((e) => e.nodeType === $.ITEM ?
|
|
9372
|
+
getDisplayName: n((e) => e.nodeType === $.ITEM ? Tr(e.name) : e.name, [])
|
|
9359
9373
|
};
|
|
9360
|
-
},
|
|
9374
|
+
}, Or = (e) => {
|
|
9361
9375
|
let [t, r] = u(e?.expandedPaths ?? /* @__PURE__ */ new Set()), a = c(() => !!e?.onExpandedPathsChange, [e?.onExpandedPathsChange]), o = c(() => a ? e?.expandedPaths ?? /* @__PURE__ */ new Set() : t, [
|
|
9362
9376
|
a,
|
|
9363
9377
|
e?.expandedPaths,
|
|
@@ -9389,14 +9403,14 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9389
9403
|
}, [o, s]),
|
|
9390
9404
|
isControlled: a
|
|
9391
9405
|
};
|
|
9392
|
-
},
|
|
9406
|
+
}, kr = ({ newActions: e, currentFolder: t, onUploadFiles: n, onCreateFolder: r, onUploadArchive: i, onCreateNewItem: a, isNewButtonDisabled: o }) => {
|
|
9393
9407
|
let s = c(() => {
|
|
9394
9408
|
let t = [];
|
|
9395
9409
|
return e && (e.newFolder && t.push({
|
|
9396
9410
|
key: "new-folder",
|
|
9397
9411
|
label: e.newFolder.label,
|
|
9398
|
-
icon: e?.newFolder?.icon === void 0 ? /* @__PURE__ */ K(
|
|
9399
|
-
...
|
|
9412
|
+
icon: e?.newFolder?.icon === void 0 ? /* @__PURE__ */ K(Je, {
|
|
9413
|
+
...Z,
|
|
9400
9414
|
className: "text-secondary"
|
|
9401
9415
|
}) : e?.newFolder?.icon,
|
|
9402
9416
|
onClick: () => {
|
|
@@ -9405,8 +9419,8 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9405
9419
|
}), e.newItem && t.push({
|
|
9406
9420
|
key: "new-item",
|
|
9407
9421
|
label: e.newItem.label,
|
|
9408
|
-
icon: e?.newItem?.icon === void 0 ? /* @__PURE__ */ K(
|
|
9409
|
-
...
|
|
9422
|
+
icon: e?.newItem?.icon === void 0 ? /* @__PURE__ */ K(Qe, {
|
|
9423
|
+
...Z,
|
|
9410
9424
|
className: "text-secondary"
|
|
9411
9425
|
}) : e?.newItem?.icon,
|
|
9412
9426
|
onClick: () => {
|
|
@@ -9415,8 +9429,8 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9415
9429
|
}), e.uploadFiles && t.push({
|
|
9416
9430
|
key: "upload-file",
|
|
9417
9431
|
label: e.uploadFiles.label,
|
|
9418
|
-
icon: e?.uploadFiles?.icon === void 0 ? /* @__PURE__ */ K(
|
|
9419
|
-
...
|
|
9432
|
+
icon: e?.uploadFiles?.icon === void 0 ? /* @__PURE__ */ K(Ge, {
|
|
9433
|
+
...Z,
|
|
9420
9434
|
className: "text-secondary"
|
|
9421
9435
|
}) : e?.uploadFiles?.icon,
|
|
9422
9436
|
onClick: () => {
|
|
@@ -9425,8 +9439,8 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9425
9439
|
}), e.uploadArchive && t.push({
|
|
9426
9440
|
key: "upload-archive",
|
|
9427
9441
|
label: e.uploadArchive.label,
|
|
9428
|
-
icon: e?.uploadArchive?.icon === void 0 ? /* @__PURE__ */ K(
|
|
9429
|
-
...
|
|
9442
|
+
icon: e?.uploadArchive?.icon === void 0 ? /* @__PURE__ */ K(qe, {
|
|
9443
|
+
...Z,
|
|
9430
9444
|
className: "text-secondary"
|
|
9431
9445
|
}) : e?.uploadArchive?.icon,
|
|
9432
9446
|
onClick: () => {
|
|
@@ -9443,21 +9457,21 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9443
9457
|
return {
|
|
9444
9458
|
newActions: s,
|
|
9445
9459
|
isNewButtonVisible: c(() => s?.length > 0, [s]),
|
|
9446
|
-
isNewButtonDisabled: c(() => !t?.permissions?.includes(
|
|
9460
|
+
isNewButtonDisabled: c(() => !t?.permissions?.includes(In.WRITE) || !!o, [t, o])
|
|
9447
9461
|
};
|
|
9448
|
-
},
|
|
9462
|
+
}, Ar = {
|
|
9449
9463
|
emptyName: "Folder name cannot be empty",
|
|
9450
9464
|
duplicateName: "A folder with this name already exists",
|
|
9451
|
-
hiddenItemWarning:
|
|
9452
|
-
consecutiveDotsError:
|
|
9453
|
-
},
|
|
9454
|
-
let [s, d] = u(!1), [f, p] = u(null), [m, h] = u(
|
|
9455
|
-
...
|
|
9465
|
+
hiddenItemWarning: br.hiddenItemWarning,
|
|
9466
|
+
consecutiveDotsError: xr.consecutiveDotsError
|
|
9467
|
+
}, jr = ({ currentFolder: e, onCreateFolder: t, onValidateFolderName: r, validationMessages: a, items: o = [] }) => {
|
|
9468
|
+
let [s, d] = u(!1), [f, p] = u(null), [m, h] = u(mn.Folder), [g, _] = u(null), [v, y] = u(null), [b, x] = u(""), S = l(e?.path), C = c(() => ({
|
|
9469
|
+
...Ar,
|
|
9456
9470
|
...a
|
|
9457
9471
|
}), [a]), w = c(() => {
|
|
9458
|
-
if (m ===
|
|
9459
|
-
if (m ===
|
|
9460
|
-
let e =
|
|
9472
|
+
if (m === mn.Folder) return e;
|
|
9473
|
+
if (m === mn.Sibling && g) {
|
|
9474
|
+
let e = Hn(o, g.parentPath || "");
|
|
9461
9475
|
return {
|
|
9462
9476
|
path: g.parentPath,
|
|
9463
9477
|
items: e?.items || [],
|
|
@@ -9466,7 +9480,7 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9466
9480
|
folderId: ""
|
|
9467
9481
|
};
|
|
9468
9482
|
}
|
|
9469
|
-
return m ===
|
|
9483
|
+
return m === mn.Child ? g : e;
|
|
9470
9484
|
}, [
|
|
9471
9485
|
m,
|
|
9472
9486
|
g,
|
|
@@ -9480,24 +9494,24 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9480
9494
|
let T = n(() => {
|
|
9481
9495
|
if (s) return;
|
|
9482
9496
|
S.current = e?.path || "/";
|
|
9483
|
-
let t = `__new_folder_${Date.now()}`, n =
|
|
9484
|
-
p(t), x(n), d(!0), h(
|
|
9497
|
+
let t = `__new_folder_${Date.now()}`, n = sr((e?.items ?? []).filter((e) => e.nodeType === $.FOLDER));
|
|
9498
|
+
p(t), x(n), d(!0), h(mn.Folder), _(e || null);
|
|
9485
9499
|
}, [s, e]), E = n((e) => {
|
|
9486
9500
|
if (s) return;
|
|
9487
9501
|
S.current = e?.parentPath || "/";
|
|
9488
9502
|
let t = `__new_folder_${Date.now()}`;
|
|
9489
|
-
x(
|
|
9503
|
+
x(sr((Hn(o, e?.parentPath || "/")?.items ?? []).filter((e) => e.nodeType === $.FOLDER))), p(t), d(!0), h(mn.Sibling), _(e), y(e?.parentPath || "/");
|
|
9490
9504
|
}, [s, o]), D = n((e) => {
|
|
9491
9505
|
if (s) return;
|
|
9492
9506
|
S.current = e.path;
|
|
9493
9507
|
let t = `__new_folder_${Date.now()}`;
|
|
9494
|
-
x(
|
|
9508
|
+
x(sr((e?.items ?? []).filter((e) => e.nodeType === $.FOLDER))), p(t), d(!0), h(mn.Child), _(e), y(e?.path || "/");
|
|
9495
9509
|
}, [s]), O = n((e) => {
|
|
9496
|
-
s || (S.current = e?.parentPath || "/", x(
|
|
9510
|
+
s || (S.current = e?.parentPath || "/", x(sr((Hn(o, e?.parentPath || "/")?.items ?? []).filter((e) => e.nodeType === $.FOLDER))), h(mn.Sibling), _(e), y(e?.parentPath || "/"), d(!0));
|
|
9497
9511
|
}, [s, o]), k = n((e) => {
|
|
9498
|
-
s || (S.current = e.path, x(
|
|
9512
|
+
s || (S.current = e.path, x(sr((e?.items ?? []).filter((e) => e.nodeType === $.FOLDER))), h(mn.Child), _(e), y(e?.path || "/"), d(!0));
|
|
9499
9513
|
}, [s]), A = n(() => {
|
|
9500
|
-
d(!1), p(null), h(
|
|
9514
|
+
d(!1), p(null), h(mn.Folder), _(null), y(null), S.current = void 0, x("");
|
|
9501
9515
|
}, []), j = n((e) => {
|
|
9502
9516
|
let t = e.trim();
|
|
9503
9517
|
if (!t) return C.emptyName;
|
|
@@ -9529,9 +9543,9 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9529
9543
|
let n = e.trim();
|
|
9530
9544
|
if (!n) return;
|
|
9531
9545
|
A();
|
|
9532
|
-
let r = `${w?.path ?? "/"}/${n}`, i = `${r}/${
|
|
9533
|
-
fileContent: new File([],
|
|
9534
|
-
name:
|
|
9546
|
+
let r = `${w?.path ?? "/"}/${n}`, i = `${r}/${Dn}`, a = {
|
|
9547
|
+
fileContent: new File([], Dn, { type: "text/plain" }),
|
|
9548
|
+
name: Dn
|
|
9535
9549
|
};
|
|
9536
9550
|
t && await t(a, r, i);
|
|
9537
9551
|
}, [
|
|
@@ -9541,14 +9555,14 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9541
9555
|
]),
|
|
9542
9556
|
validateFolderName: j
|
|
9543
9557
|
};
|
|
9544
|
-
},
|
|
9558
|
+
}, Mr = ({ additionalButtons: e, expandedPathsLength: t, collapseAll: n }) => {
|
|
9545
9559
|
let r = t === 0;
|
|
9546
|
-
return { additionalButtons: c(() => /* @__PURE__ */ q(G, { children: [e, /* @__PURE__ */ K(
|
|
9560
|
+
return { additionalButtons: c(() => /* @__PURE__ */ q(G, { children: [e, /* @__PURE__ */ K(V, {
|
|
9547
9561
|
disabled: r,
|
|
9548
|
-
size:
|
|
9562
|
+
size: L.Small,
|
|
9549
9563
|
onClick: n,
|
|
9550
|
-
icon: /* @__PURE__ */ K(
|
|
9551
|
-
size:
|
|
9564
|
+
icon: /* @__PURE__ */ K(ze, {
|
|
9565
|
+
size: C.LG,
|
|
9552
9566
|
stroke: sn
|
|
9553
9567
|
}),
|
|
9554
9568
|
"aria-label": "collapse-all"
|
|
@@ -9557,7 +9571,7 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9557
9571
|
r,
|
|
9558
9572
|
n
|
|
9559
9573
|
]) };
|
|
9560
|
-
},
|
|
9574
|
+
}, Nr = ({ onGetInfo: e }) => {
|
|
9561
9575
|
let [t, r] = u(!1), [i, a] = u(void 0);
|
|
9562
9576
|
return {
|
|
9563
9577
|
isMetadataPopupOpen: t,
|
|
@@ -9570,18 +9584,18 @@ var Er = ({ items: e, onRenameValidate: t, validationMessages: r, onMoveToFiles:
|
|
|
9570
9584
|
}, [])
|
|
9571
9585
|
};
|
|
9572
9586
|
};
|
|
9573
|
-
function
|
|
9587
|
+
function Pr(e) {
|
|
9574
9588
|
let t = [];
|
|
9575
9589
|
function n(e) {
|
|
9576
9590
|
for (let r of e) t.push(r), r.items && n(r.items);
|
|
9577
9591
|
}
|
|
9578
9592
|
return n(e), t;
|
|
9579
9593
|
}
|
|
9580
|
-
function
|
|
9581
|
-
let n =
|
|
9582
|
-
return e.filter((e) =>
|
|
9594
|
+
function Fr(e, t) {
|
|
9595
|
+
let n = Un(t);
|
|
9596
|
+
return e.filter((e) => Un(e.name).includes(n));
|
|
9583
9597
|
}
|
|
9584
|
-
function
|
|
9598
|
+
function Ir({ onSearchFiles: e, clearSearchResults: t, currentPath: r, searchResults: a = [], searchInProgress: o = !1, navigationPanelValue: s, onNavigationPanelSearchChange: d, allItems: f = [], activeTab: p }) {
|
|
9585
9599
|
let [m, h] = u(""), g = l(!1), _ = l(!1), v = l([]), y = l(r), b = l(p);
|
|
9586
9600
|
i(() => {
|
|
9587
9601
|
s != null && h(String(s));
|
|
@@ -9623,9 +9637,9 @@ function Fr({ onSearchFiles: e, clearSearchResults: t, currentPath: r, searchRes
|
|
|
9623
9637
|
searchResultsRows: c(() => {
|
|
9624
9638
|
if (e) {
|
|
9625
9639
|
let e = o ? v.current : a;
|
|
9626
|
-
return !x || e.length === 0 ? e :
|
|
9640
|
+
return !x || e.length === 0 ? e : Fr(e, x);
|
|
9627
9641
|
}
|
|
9628
|
-
return !x || !f.length ? [] : Pr(
|
|
9642
|
+
return !x || !f.length ? [] : Fr(Pr(f), x);
|
|
9629
9643
|
}, [
|
|
9630
9644
|
e,
|
|
9631
9645
|
a,
|
|
@@ -9635,7 +9649,7 @@ function Fr({ onSearchFiles: e, clearSearchResults: t, currentPath: r, searchRes
|
|
|
9635
9649
|
])
|
|
9636
9650
|
};
|
|
9637
9651
|
}
|
|
9638
|
-
function
|
|
9652
|
+
function Lr({ selectedPaths: e, defaultSelectedPaths: t, onSelectedPathsChange: r }) {
|
|
9639
9653
|
let i = e !== void 0, [a, o] = u(() => t ?? /* @__PURE__ */ new Set()), s = c(() => i ? e : a, [
|
|
9640
9654
|
i,
|
|
9641
9655
|
e,
|
|
@@ -9653,14 +9667,14 @@ function Ir({ selectedPaths: e, defaultSelectedPaths: t, onSelectedPathsChange:
|
|
|
9653
9667
|
isControlled: i
|
|
9654
9668
|
};
|
|
9655
9669
|
}
|
|
9656
|
-
var
|
|
9657
|
-
let { selectedPaths: We, clearSelection: Ge, setSelectedPaths: Ke } =
|
|
9670
|
+
var Rr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem: o, path: s, defaultPath: d, filesLoading: f, selectedPaths: p, defaultSelectedPaths: m, onSelectedPathsChange: h, showHiddenFiles: g, onShowHiddenFilesChange: _, treeOptions: v, showNavigationPanel: y = !0, navigationPanelOptions: b, deleteConfirmationOptions: x, gridOptions: S, toolbarOptions: C, bulkActionsToolbarOptions: w, destinationFolderPopupOptions: T, conflictResolutionPopupOptions: E, onPathChange: D, onTableFileClick: O, handleSelectionClick: k, onGridApiChange: A, onCopyFiles: j, onMoveToFiles: M, onDeleteFiles: N, onDownloadFiles: P, onRenameValidate: F, renameValidationMessages: I, forbiddenSymbolsRegExp: L = ne, forbiddenSymbolsTooltip: R, onUploadFiles: z, onValidateUpload: B, uploadEnabled: ee, uploadValidationMessages: V, maxFileSize: H, onUploadArchive: te, prepareUploadFileName: re, onCreateFolder: ie, onCreateFolderValidate: ae, folderCreationValidationMessages: oe, fileMetadataPopupOptions: se, onGetInfo: U, onUnshareFiles: ce, onRemoveFilesAccess: le, actionsRef: ue, sharedByMePaths: de, onSearchFiles: fe, searchResults: pe, searchInProgress: me, clearSearchResults: he, allowedFileTypes: ge, maxSelectableFileSize: _e, getDisabledTooltip: ve, fileTooLargeTooltip: ye, unsupportedFileTypeTooltip: be, emptyStateIcon: xe, emptyStateTitle: Se, emptyStateDescription: Ce, sharedWithMeIds: we, onFolderPopupPathChange: Te, onManagePermissions: Ee, onPreview: De, onOpenInNewTab: Oe, previewExtensions: ke, isRenameFileAvailable: Ae, isDuplicateFolderAvailable: je, customUploadFileAction: W, customCreateNewItemAction: G, customDuplicateAction: q, customDeleteItemsAction: Me, customDownloadItemsAction: Ne, customBreakpointRef: Pe, gridClassName: Fe, nonClickableTableColumns: Ie, hideSearchPathItemName: Le, showHiddenFileSwitcherInDestinationPopup: Re, showCreateFolderButtonInDestinationPopup: ze, autoSelectUploadedItems: Be = !1, maxNewFolderDepth: Ve, onNewFolderDepthExceeded: He, initialUploadFilesOpen: Ue }) => {
|
|
9671
|
+
let { selectedPaths: We, clearSelection: Ge, setSelectedPaths: Ke } = Lr({
|
|
9658
9672
|
selectedPaths: p,
|
|
9659
9673
|
defaultSelectedPaths: m,
|
|
9660
9674
|
onSelectedPathsChange: h
|
|
9661
9675
|
}), qe = l(!1), Je = l(null), Ye = n((e, t, n) => {
|
|
9662
9676
|
if (Be) {
|
|
9663
|
-
let { parent: e, name: n } =
|
|
9677
|
+
let { parent: e, name: n } = tr(t);
|
|
9664
9678
|
Je.current = {
|
|
9665
9679
|
fileNames: /* @__PURE__ */ new Set([n]),
|
|
9666
9680
|
destinationFolder: e
|
|
@@ -9676,24 +9690,24 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
9676
9690
|
Be && (Je.current = {
|
|
9677
9691
|
fileNames: /* @__PURE__ */ new Set([t]),
|
|
9678
9692
|
destinationFolder: n
|
|
9679
|
-
}),
|
|
9680
|
-
}, [
|
|
9693
|
+
}), te?.(e, t, n);
|
|
9694
|
+
}, [te, Be]), Qe = c(() => {
|
|
9681
9695
|
let e = /* @__PURE__ */ new Map();
|
|
9682
9696
|
return We.forEach((t) => {
|
|
9683
|
-
let n =
|
|
9697
|
+
let n = Vn(a, t);
|
|
9684
9698
|
n && e.set(t, n);
|
|
9685
9699
|
}), e;
|
|
9686
9700
|
}, [We, a]);
|
|
9687
9701
|
i(() => {
|
|
9688
9702
|
if (We.size === 0) return;
|
|
9689
9703
|
let e = !1;
|
|
9690
|
-
for (let t of We) if (!
|
|
9704
|
+
for (let t of We) if (!Vn(a, t)) {
|
|
9691
9705
|
e = !0;
|
|
9692
9706
|
break;
|
|
9693
9707
|
}
|
|
9694
9708
|
if (e) {
|
|
9695
9709
|
let e = /* @__PURE__ */ new Set();
|
|
9696
|
-
for (let t of We)
|
|
9710
|
+
for (let t of We) Vn(a, t) && e.add(t);
|
|
9697
9711
|
Ke(e);
|
|
9698
9712
|
}
|
|
9699
9713
|
}, [
|
|
@@ -9701,45 +9715,45 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
9701
9715
|
We,
|
|
9702
9716
|
Ke
|
|
9703
9717
|
]);
|
|
9704
|
-
let { currentPath:
|
|
9718
|
+
let { currentPath: J, setCurrentPath: $e, handlePathChange: et } = mr({
|
|
9705
9719
|
path: s,
|
|
9706
9720
|
defaultPath: d,
|
|
9707
9721
|
onPathChange: D,
|
|
9708
9722
|
onSelectionClear: Ge
|
|
9709
|
-
}),
|
|
9723
|
+
}), tt = c(() => {
|
|
9710
9724
|
let { showFiles: e = !0, showFolders: t = !0, ...n } = S || {};
|
|
9711
9725
|
return {
|
|
9712
9726
|
showFiles: e,
|
|
9713
9727
|
showFolders: t,
|
|
9714
9728
|
...n
|
|
9715
9729
|
};
|
|
9716
|
-
}, [S]),
|
|
9717
|
-
T?.setDestinationFolderPath ? T.setDestinationFolderPath(e) :
|
|
9718
|
-
}, [T]), { areHiddenFilesVisible:
|
|
9730
|
+
}, [S]), nt = tt.showFiles, rt = tt.showFolders, [it, at] = u(), ot = T?.destinationFolderPath ?? it, st = n((e) => {
|
|
9731
|
+
T?.setDestinationFolderPath ? T.setDestinationFolderPath(e) : at(e);
|
|
9732
|
+
}, [T]), { areHiddenFilesVisible: ct, toggleHiddenFilesVisibility: lt } = cr({
|
|
9719
9733
|
showHiddenFiles: g,
|
|
9720
9734
|
onShowHiddenFilesChange: _
|
|
9721
|
-
}), { isTreeCollapsed:
|
|
9735
|
+
}), { isTreeCollapsed: ut, toggleTreeCollapse: dt, setIsTreeCollapsed: ft } = lr({
|
|
9722
9736
|
collapsed: v?.collapsed,
|
|
9723
9737
|
onCollapseChange: v?.onCollapseChange
|
|
9724
|
-
}), { renamedPath:
|
|
9738
|
+
}), { renamedPath: pt, renamedItem: mt, renameHandler: ht, renameSaveHandler: gt, renameCancelHandler: _t, renameValidateHandler: vt, getDisplayName: yt } = Dr({
|
|
9725
9739
|
items: a,
|
|
9726
9740
|
onRenameValidate: F,
|
|
9727
9741
|
validationMessages: I,
|
|
9728
9742
|
onMoveToFiles: M
|
|
9729
|
-
}), { isSearchMode:
|
|
9743
|
+
}), { isSearchMode: bt, searchValue: xt, effectiveSearchValue: St, setSearchValue: Ct, handleSearchChange: wt, handleSearchClear: Y, searchResultsRows: Tt } = Ir({
|
|
9730
9744
|
onSearchFiles: fe,
|
|
9731
9745
|
clearSearchResults: he,
|
|
9732
|
-
currentPath:
|
|
9746
|
+
currentPath: J,
|
|
9733
9747
|
searchResults: pe,
|
|
9734
9748
|
searchInProgress: me,
|
|
9735
9749
|
navigationPanelValue: b?.value,
|
|
9736
9750
|
onNavigationPanelSearchChange: b?.onSearchChange,
|
|
9737
9751
|
allItems: a,
|
|
9738
9752
|
activeTab: C?.activeTab
|
|
9739
|
-
}),
|
|
9753
|
+
}), X = c(() => Hn(a, J) ?? a[0], [a, J]), Et = n((e, t) => !t || !e ? !1 : or(e.path) > t, []), Dt = n(() => {
|
|
9740
9754
|
He?.();
|
|
9741
|
-
}, [He]), { handleCopyTo:
|
|
9742
|
-
getDestinationFiles: (e) =>
|
|
9755
|
+
}, [He]), { handleCopyTo: Ot, handleMoveTo: kt, handleDuplicate: At, handleOpenDestinationFolderPopup: jt, handleCloseDestinationFolderPopup: Mt, openDestinationFolderPopup: Nt, handleSetCopiedFiles: Pt, handleSetMovedFiles: Ft, destinationFolderMode: It, destinationFolderTitle: Lt, conflictingFiles: Rt, conflictResolutionOpen: zt, closeConflictResolution: Bt, handleConflictReplace: Vt, handleConflictDuplicate: Ht, handleConflictCancel: Ut, handleConflictDecideForEach: Wt, sourceFolder: Gt } = pr({
|
|
9756
|
+
getDestinationFiles: (e) => Hn(a, e)?.items ?? [],
|
|
9743
9757
|
onCopyFiles: j,
|
|
9744
9758
|
onMoveToFiles: M,
|
|
9745
9759
|
onCopySuccess: Ge,
|
|
@@ -9749,93 +9763,93 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
9749
9763
|
getMoveHeader: T?.getMoveHeader
|
|
9750
9764
|
});
|
|
9751
9765
|
i(() => {
|
|
9752
|
-
|
|
9753
|
-
}, [
|
|
9754
|
-
let { deleteConfirmationOpen:
|
|
9766
|
+
Nt || st(void 0);
|
|
9767
|
+
}, [Nt, st]);
|
|
9768
|
+
let { deleteConfirmationOpen: Kt, itemsToDelete: qt, openDeleteConfirmation: Jt, closeDeleteConfirmation: Yt, confirmDelete: Xt } = hr({
|
|
9755
9769
|
onDeleteFiles: N,
|
|
9756
9770
|
onDeleteSuccess: Ge
|
|
9757
|
-
}), { handleDownloadFiles:
|
|
9771
|
+
}), { handleDownloadFiles: Zt } = gr({
|
|
9758
9772
|
onDownloadFiles: P,
|
|
9759
9773
|
customDownloadItemsAction: Ne,
|
|
9760
9774
|
onDownloadSuccess: Ge
|
|
9761
|
-
}), { isDragging:
|
|
9775
|
+
}), { isDragging: Qt, isDraggingOverWindow: $t, uploadError: en, handleDragEnter: tn, handleDragLeave: nn, handleDragOver: rn, handleDrop: an, clearError: on, openFileDialog: sn, fileInputRef: Z, openArchiveDialog: cn, uploadConflictingFiles: Q, uploadConflictResolutionOpen: ln, closeUploadConflictResolution: un, handleUploadConflictReplace: dn, handleUploadConflictDuplicate: fn, handleUploadConflictCancel: pn, handleUploadConflictDecideForEach: mn } = vr({
|
|
9762
9776
|
onUploadFiles: Xe,
|
|
9763
|
-
onValidateUpload:
|
|
9764
|
-
maxFileSize:
|
|
9777
|
+
onValidateUpload: B,
|
|
9778
|
+
maxFileSize: H,
|
|
9765
9779
|
onUploadArchive: Ze,
|
|
9766
9780
|
prepareUploadFileName: re,
|
|
9767
9781
|
allowedFileTypes: ge,
|
|
9768
|
-
validationMessages:
|
|
9769
|
-
uploadEnabled:
|
|
9770
|
-
currentFolder:
|
|
9782
|
+
validationMessages: V,
|
|
9783
|
+
uploadEnabled: ee,
|
|
9784
|
+
currentFolder: X
|
|
9771
9785
|
}), hn = n((e) => {
|
|
9772
|
-
|
|
9786
|
+
Y(), an(e, J ?? "", X?.items ?? []);
|
|
9773
9787
|
}, [
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9788
|
+
J,
|
|
9789
|
+
X,
|
|
9790
|
+
an,
|
|
9791
|
+
Y
|
|
9778
9792
|
]), gn = n(() => {
|
|
9779
|
-
|
|
9793
|
+
Y(), sn(J ?? "", X?.items ?? []);
|
|
9780
9794
|
}, [
|
|
9781
|
-
|
|
9782
|
-
Y,
|
|
9795
|
+
J,
|
|
9783
9796
|
X,
|
|
9784
|
-
|
|
9797
|
+
sn,
|
|
9798
|
+
Y
|
|
9785
9799
|
]), _n = n(() => {
|
|
9786
|
-
|
|
9800
|
+
Y(), cn(J ?? "", X?.items ?? []);
|
|
9787
9801
|
}, [
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9802
|
+
J,
|
|
9803
|
+
X,
|
|
9804
|
+
cn,
|
|
9805
|
+
Y
|
|
9792
9806
|
]), vn = n(() => {
|
|
9793
|
-
|
|
9807
|
+
Y(), W?.(J, X);
|
|
9794
9808
|
}, [
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9809
|
+
W,
|
|
9810
|
+
J,
|
|
9811
|
+
X,
|
|
9812
|
+
Y
|
|
9799
9813
|
]), yn = n(() => {
|
|
9800
|
-
|
|
9814
|
+
Y(), G?.(J, X);
|
|
9801
9815
|
}, [
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9816
|
+
G,
|
|
9817
|
+
J,
|
|
9818
|
+
X,
|
|
9819
|
+
Y
|
|
9806
9820
|
]), bn = n((e) => {
|
|
9807
|
-
|
|
9808
|
-
}, [
|
|
9809
|
-
currentFolder:
|
|
9821
|
+
q?.(e);
|
|
9822
|
+
}, [q]), { isCreatingFolder: xn, newFolderTempId: Sn, createdFolderPath: Cn, newFolderDefaultName: wn, startFolderCreation: Tn, startGridSiblingFolderCreation: En, startTreeSiblingFolderCreation: Dn, startGridChildFolderCreation: On, startTreeChildFolderCreation: kn, cancelFolderCreation: An, saveFolderCreation: jn, validateFolderName: Mn } = jr({
|
|
9823
|
+
currentFolder: X,
|
|
9810
9824
|
onCreateFolder: Ye,
|
|
9811
9825
|
onValidateFolderName: ae,
|
|
9812
9826
|
validationMessages: oe,
|
|
9813
9827
|
items: a
|
|
9814
9828
|
}), Nn = n(() => {
|
|
9815
|
-
if (Ve &&
|
|
9816
|
-
|
|
9829
|
+
if (Ve && Et(X, Ve - 1)) {
|
|
9830
|
+
Dt();
|
|
9817
9831
|
return;
|
|
9818
9832
|
}
|
|
9819
|
-
|
|
9833
|
+
Y(), Tn();
|
|
9820
9834
|
}, [
|
|
9821
|
-
J,
|
|
9822
|
-
Tn,
|
|
9823
9835
|
Y,
|
|
9836
|
+
Tn,
|
|
9837
|
+
X,
|
|
9824
9838
|
Ve,
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
]), { newActions: Pn, isNewButtonVisible: Fn, isNewButtonDisabled: In } =
|
|
9839
|
+
Et,
|
|
9840
|
+
Dt
|
|
9841
|
+
]), { newActions: Pn, isNewButtonVisible: Fn, isNewButtonDisabled: In } = kr({
|
|
9828
9842
|
newActions: C?.newActions,
|
|
9829
|
-
currentFolder:
|
|
9830
|
-
onUploadFiles:
|
|
9843
|
+
currentFolder: X,
|
|
9844
|
+
onUploadFiles: W ? vn : gn,
|
|
9831
9845
|
onUploadArchive: _n,
|
|
9832
9846
|
onCreateFolder: Nn,
|
|
9833
9847
|
onCreateNewItem: yn,
|
|
9834
9848
|
isNewButtonDisabled: C?.isNewButtonDisabled
|
|
9835
9849
|
}), Ln = c(() => {
|
|
9836
|
-
if (
|
|
9837
|
-
let e =
|
|
9838
|
-
|
|
9850
|
+
if (bt) {
|
|
9851
|
+
let e = Tt;
|
|
9852
|
+
nt || (e = e.filter((e) => e.nodeType !== $.ITEM)), rt || (e = e.filter((e) => e.nodeType !== $.FOLDER)), ct || (e = e.filter((e) => !e.path.split("/").filter(Boolean).some((e) => e.startsWith("."))));
|
|
9839
9853
|
let t = e.map((e) => ({
|
|
9840
9854
|
...e,
|
|
9841
9855
|
id: e.id ?? e.path,
|
|
@@ -9856,15 +9870,15 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
9856
9870
|
name: wn,
|
|
9857
9871
|
updatedAt: void 0,
|
|
9858
9872
|
author: void 0,
|
|
9859
|
-
path:
|
|
9873
|
+
path: J ?? "/",
|
|
9860
9874
|
nodeType: $.FOLDER,
|
|
9861
9875
|
extension: void 0,
|
|
9862
9876
|
isTemporary: !0,
|
|
9863
9877
|
owner: void 0
|
|
9864
9878
|
}), t;
|
|
9865
9879
|
}
|
|
9866
|
-
let e =
|
|
9867
|
-
|
|
9880
|
+
let e = Un(St).trim(), t = X?.items ?? [], n = e ? Gn(X) : t;
|
|
9881
|
+
nt || (n = n.filter((e) => e.nodeType !== $.ITEM)), rt || (n = n.filter((e) => e.nodeType !== $.FOLDER)), ct || (n = n.filter((t) => e ? !t.path.split("/").filter(Boolean).some((e) => e.startsWith(".")) : !qn(t)));
|
|
9868
9882
|
let r = n.map((e) => ({
|
|
9869
9883
|
...e,
|
|
9870
9884
|
id: e.id ?? e.path,
|
|
@@ -9886,7 +9900,7 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
9886
9900
|
name: wn,
|
|
9887
9901
|
updatedAt: void 0,
|
|
9888
9902
|
author: void 0,
|
|
9889
|
-
path:
|
|
9903
|
+
path: J ?? "/",
|
|
9890
9904
|
nodeType: $.FOLDER,
|
|
9891
9905
|
extension: void 0,
|
|
9892
9906
|
isTemporary: !0,
|
|
@@ -9895,37 +9909,37 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
9895
9909
|
let i = e.split(/\s+/).filter(Boolean);
|
|
9896
9910
|
return r.filter((e) => {
|
|
9897
9911
|
if (e.isTemporary) return !0;
|
|
9898
|
-
let t =
|
|
9912
|
+
let t = Un(e.name), n = Un(e.author), r = Wn(e.extension);
|
|
9899
9913
|
return i.every((e) => t.includes(e) || n.includes(e) || r.includes(e));
|
|
9900
9914
|
});
|
|
9901
9915
|
}, [
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9916
|
+
bt,
|
|
9917
|
+
Tt,
|
|
9918
|
+
X,
|
|
9919
|
+
St,
|
|
9920
|
+
ct,
|
|
9907
9921
|
xn,
|
|
9908
9922
|
Sn,
|
|
9909
9923
|
wn,
|
|
9924
|
+
nt,
|
|
9910
9925
|
rt,
|
|
9911
|
-
|
|
9912
|
-
$e
|
|
9926
|
+
J
|
|
9913
9927
|
]);
|
|
9914
9928
|
i(() => {
|
|
9915
9929
|
let e = Je.current;
|
|
9916
9930
|
if (!e) return;
|
|
9917
|
-
if ((
|
|
9931
|
+
if ((J ?? "") !== e.destinationFolder) {
|
|
9918
9932
|
Je.current = null;
|
|
9919
9933
|
return;
|
|
9920
9934
|
}
|
|
9921
|
-
let t =
|
|
9935
|
+
let t = Hn(a, e.destinationFolder);
|
|
9922
9936
|
if (!t?.items) return;
|
|
9923
9937
|
let n = /* @__PURE__ */ new Set();
|
|
9924
|
-
for (let r of t.items) e.fileNames.has(r.name) &&
|
|
9938
|
+
for (let r of t.items) e.fileNames.has(r.name) && nr(r, ge, _e) && n.add(r.path);
|
|
9925
9939
|
n.size > 0 && (Ke(n), Je.current = null);
|
|
9926
9940
|
}, [
|
|
9927
9941
|
a,
|
|
9928
|
-
|
|
9942
|
+
J,
|
|
9929
9943
|
Ke,
|
|
9930
9944
|
ge,
|
|
9931
9945
|
_e
|
|
@@ -9933,85 +9947,85 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
9933
9947
|
!qe.current && Ue && (gn(), qe.current = !0);
|
|
9934
9948
|
}, [Ue, gn]);
|
|
9935
9949
|
let Rn = n((e) => {
|
|
9936
|
-
|
|
9937
|
-
}, [
|
|
9938
|
-
|
|
9939
|
-
}, [
|
|
9940
|
-
e.nodeType === $.FOLDER ?
|
|
9941
|
-
}, [
|
|
9950
|
+
et(e.path);
|
|
9951
|
+
}, [et]), zn = n((e) => {
|
|
9952
|
+
et(e);
|
|
9953
|
+
}, [et]), Bn = n((e) => {
|
|
9954
|
+
e.nodeType === $.FOLDER ? et(e.path) : O?.(e);
|
|
9955
|
+
}, [et, O]), { expandedPaths: Kn, setExpandedPaths: Jn, collapseAll: Yn } = Or({
|
|
9942
9956
|
expandedPaths: v?.expandedPaths,
|
|
9943
9957
|
onExpandedPathsChange: v?.onExpandedPathsChange
|
|
9944
|
-
}), { additionalButtons: Xn } =
|
|
9958
|
+
}), { additionalButtons: Xn } = Mr({
|
|
9945
9959
|
collapseAll: Yn,
|
|
9946
|
-
expandedPathsLength:
|
|
9960
|
+
expandedPathsLength: Kn.size,
|
|
9947
9961
|
additionalButtons: v?.additionalButtons
|
|
9948
9962
|
}), Zn = n((e) => {
|
|
9949
9963
|
if (e.length > 0) {
|
|
9950
|
-
if (Ve &&
|
|
9951
|
-
|
|
9964
|
+
if (Ve && Et(e[0], Ve)) {
|
|
9965
|
+
Dt();
|
|
9952
9966
|
return;
|
|
9953
9967
|
}
|
|
9954
|
-
|
|
9968
|
+
Y(), En(e[0]);
|
|
9955
9969
|
}
|
|
9956
9970
|
}, [
|
|
9957
|
-
|
|
9971
|
+
Y,
|
|
9958
9972
|
En,
|
|
9959
9973
|
Ve,
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
]),
|
|
9974
|
+
Et,
|
|
9975
|
+
Dt
|
|
9976
|
+
]), Qn = n((e) => {
|
|
9963
9977
|
if (e.length > 0) {
|
|
9964
|
-
if (Ve &&
|
|
9965
|
-
|
|
9978
|
+
if (Ve && Et(e[0], Ve - 1)) {
|
|
9979
|
+
Dt();
|
|
9966
9980
|
return;
|
|
9967
9981
|
}
|
|
9968
|
-
|
|
9982
|
+
Y(), $e(e[0].path), Jn(new Set(Kn).add(e[0].path || "/")), On(e[0]);
|
|
9969
9983
|
}
|
|
9970
9984
|
}, [
|
|
9971
|
-
|
|
9985
|
+
Y,
|
|
9972
9986
|
On,
|
|
9973
|
-
|
|
9987
|
+
Kn,
|
|
9974
9988
|
Jn,
|
|
9975
|
-
|
|
9976
|
-
|
|
9989
|
+
$e,
|
|
9990
|
+
Dt,
|
|
9977
9991
|
Ve,
|
|
9978
|
-
|
|
9979
|
-
]),
|
|
9992
|
+
Et
|
|
9993
|
+
]), er = n((e) => {
|
|
9980
9994
|
if (e.length > 0) {
|
|
9981
|
-
if (Ve &&
|
|
9982
|
-
|
|
9995
|
+
if (Ve && Et(e[0], Ve)) {
|
|
9996
|
+
Dt();
|
|
9983
9997
|
return;
|
|
9984
9998
|
}
|
|
9985
|
-
|
|
9999
|
+
Y(), Dn(e[0]);
|
|
9986
10000
|
}
|
|
9987
10001
|
}, [
|
|
9988
|
-
|
|
10002
|
+
Y,
|
|
9989
10003
|
Dn,
|
|
9990
10004
|
Ve,
|
|
9991
|
-
|
|
9992
|
-
|
|
10005
|
+
Et,
|
|
10006
|
+
Dt
|
|
9993
10007
|
]), rr = n((e) => {
|
|
9994
10008
|
if (e.length > 0) {
|
|
9995
|
-
if (Ve &&
|
|
9996
|
-
|
|
10009
|
+
if (Ve && Et(e[0], Ve - 1)) {
|
|
10010
|
+
Dt();
|
|
9997
10011
|
return;
|
|
9998
10012
|
}
|
|
9999
|
-
|
|
10013
|
+
Y(), $e(e[0].path), Jn(new Set(Kn).add(e[0].path || "/")), kn(e[0]);
|
|
10000
10014
|
}
|
|
10001
10015
|
}, [
|
|
10002
|
-
|
|
10016
|
+
Y,
|
|
10003
10017
|
kn,
|
|
10004
|
-
|
|
10005
|
-
|
|
10018
|
+
$e,
|
|
10019
|
+
Kn,
|
|
10006
10020
|
Jn,
|
|
10007
10021
|
Ve,
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
]), { isMetadataPopupOpen: ir, selectedFileForMetadata:
|
|
10022
|
+
Et,
|
|
10023
|
+
Dt
|
|
10024
|
+
]), { isMetadataPopupOpen: ir, selectedFileForMetadata: ar, openMetadataPopup: sr, closeMetadataPopup: ur } = Nr({ onGetInfo: U }), dr = n(() => {
|
|
10011
10025
|
ur(), se?.clearMetadata?.();
|
|
10012
|
-
}, [ur, se]),
|
|
10013
|
-
if (L) return
|
|
10014
|
-
}, [L]),
|
|
10026
|
+
}, [ur, se]), fr = c(() => {
|
|
10027
|
+
if (L) return $n(L);
|
|
10028
|
+
}, [L]), _r = {
|
|
10015
10029
|
managerLabel: e,
|
|
10016
10030
|
className: r,
|
|
10017
10031
|
items: a,
|
|
@@ -10021,91 +10035,91 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10021
10035
|
filesLoading: f,
|
|
10022
10036
|
treeOptions: {
|
|
10023
10037
|
...v,
|
|
10024
|
-
expandedPaths:
|
|
10038
|
+
expandedPaths: Kn,
|
|
10025
10039
|
onExpandedPathsChange: Jn,
|
|
10026
10040
|
additionalButtons: Xn
|
|
10027
10041
|
},
|
|
10028
10042
|
showNavigationPanel: y,
|
|
10029
10043
|
navigationPanelOptions: b,
|
|
10030
|
-
gridOptions:
|
|
10044
|
+
gridOptions: tt,
|
|
10031
10045
|
toolbarOptions: C,
|
|
10032
10046
|
bulkActionsToolbarOptions: w,
|
|
10033
10047
|
deleteConfirmationOptions: x,
|
|
10034
10048
|
destinationFolderPopupOptions: {
|
|
10035
10049
|
...T,
|
|
10036
|
-
destinationFolderPath:
|
|
10037
|
-
setDestinationFolderPath:
|
|
10038
|
-
header:
|
|
10050
|
+
destinationFolderPath: ot,
|
|
10051
|
+
setDestinationFolderPath: st,
|
|
10052
|
+
header: Lt,
|
|
10039
10053
|
onCreateFolder: ie,
|
|
10040
10054
|
onCreateFolderValidate: ae,
|
|
10041
10055
|
folderCreationValidationMessages: oe,
|
|
10042
|
-
sourceFolder:
|
|
10043
|
-
},
|
|
10044
|
-
currentPath:
|
|
10045
|
-
setCurrentPath:
|
|
10046
|
-
searchValue:
|
|
10047
|
-
effectiveSearchValue:
|
|
10048
|
-
setSearchValue:
|
|
10049
|
-
areHiddenFilesVisible:
|
|
10050
|
-
toggleHiddenFilesVisibility:
|
|
10051
|
-
isTreeCollapsed:
|
|
10052
|
-
toggleTreeCollapse:
|
|
10053
|
-
setIsTreeCollapsed:
|
|
10056
|
+
sourceFolder: Gt
|
|
10057
|
+
},
|
|
10058
|
+
currentPath: J,
|
|
10059
|
+
setCurrentPath: $e,
|
|
10060
|
+
searchValue: xt,
|
|
10061
|
+
effectiveSearchValue: St,
|
|
10062
|
+
setSearchValue: Ct,
|
|
10063
|
+
areHiddenFilesVisible: ct,
|
|
10064
|
+
toggleHiddenFilesVisibility: lt,
|
|
10065
|
+
isTreeCollapsed: ut,
|
|
10066
|
+
toggleTreeCollapse: dt,
|
|
10067
|
+
setIsTreeCollapsed: ft,
|
|
10054
10068
|
selectedPaths: We,
|
|
10055
10069
|
selectedFiles: Qe,
|
|
10056
10070
|
setSelectedPaths: Ke,
|
|
10057
10071
|
clearSelection: Ge,
|
|
10058
|
-
currentFolder:
|
|
10072
|
+
currentFolder: X,
|
|
10059
10073
|
gridRows: Ln,
|
|
10060
|
-
handleCopyTo:
|
|
10061
|
-
handleMoveTo:
|
|
10062
|
-
handleDuplicate:
|
|
10063
|
-
handleSetCopiedFiles:
|
|
10064
|
-
handleSetMovedFiles:
|
|
10065
|
-
openDestinationFolderPopup:
|
|
10066
|
-
handleCloseDestinationFolderPopup:
|
|
10067
|
-
handleOpenDestinationFolderPopup:
|
|
10068
|
-
destinationFolderMode:
|
|
10074
|
+
handleCopyTo: Ot,
|
|
10075
|
+
handleMoveTo: kt,
|
|
10076
|
+
handleDuplicate: q ? bn : At,
|
|
10077
|
+
handleSetCopiedFiles: Pt,
|
|
10078
|
+
handleSetMovedFiles: Ft,
|
|
10079
|
+
openDestinationFolderPopup: Nt,
|
|
10080
|
+
handleCloseDestinationFolderPopup: Mt,
|
|
10081
|
+
handleOpenDestinationFolderPopup: jt,
|
|
10082
|
+
destinationFolderMode: It,
|
|
10069
10083
|
handleGridAddSibling: Zn,
|
|
10070
|
-
handleGridAddChild:
|
|
10071
|
-
handleTreeAddSibling:
|
|
10084
|
+
handleGridAddChild: Qn,
|
|
10085
|
+
handleTreeAddSibling: er,
|
|
10072
10086
|
handleTreeAddChild: rr,
|
|
10073
|
-
handleDownloadFiles:
|
|
10074
|
-
renamedPath:
|
|
10075
|
-
renamedItem:
|
|
10076
|
-
forbiddenSymbolsRegExp:
|
|
10087
|
+
handleDownloadFiles: Zt,
|
|
10088
|
+
renamedPath: pt,
|
|
10089
|
+
renamedItem: mt,
|
|
10090
|
+
forbiddenSymbolsRegExp: fr,
|
|
10077
10091
|
forbiddenSymbolsTooltip: R,
|
|
10078
|
-
onRename:
|
|
10079
|
-
onRenameSave:
|
|
10080
|
-
onRenameCancel:
|
|
10081
|
-
onRenameValidate:
|
|
10082
|
-
getDisplayName:
|
|
10083
|
-
openDeleteConfirmation: Me ||
|
|
10084
|
-
closeDeleteConfirmation:
|
|
10085
|
-
confirmDelete:
|
|
10086
|
-
deleteConfirmationOpen:
|
|
10087
|
-
itemsToDelete:
|
|
10088
|
-
handlePathChange:
|
|
10092
|
+
onRename: ht,
|
|
10093
|
+
onRenameSave: gt,
|
|
10094
|
+
onRenameCancel: _t,
|
|
10095
|
+
onRenameValidate: vt,
|
|
10096
|
+
getDisplayName: yt,
|
|
10097
|
+
openDeleteConfirmation: Me || Jt,
|
|
10098
|
+
closeDeleteConfirmation: Yt,
|
|
10099
|
+
confirmDelete: Xt,
|
|
10100
|
+
deleteConfirmationOpen: Kt,
|
|
10101
|
+
itemsToDelete: qt,
|
|
10102
|
+
handlePathChange: et,
|
|
10089
10103
|
handleTreeItemClick: Rn,
|
|
10090
10104
|
handleBreadcrumbItemClick: zn,
|
|
10091
|
-
handleSearchChange:
|
|
10092
|
-
handleTableRowClick:
|
|
10105
|
+
handleSearchChange: wt,
|
|
10106
|
+
handleTableRowClick: Bn,
|
|
10093
10107
|
onTableFileClick: O,
|
|
10094
10108
|
handleSelectionClick: k,
|
|
10095
10109
|
onGridApiChange: A,
|
|
10096
|
-
isDragging:
|
|
10097
|
-
uploadError:
|
|
10098
|
-
handleDragEnter:
|
|
10099
|
-
handleDragLeave:
|
|
10100
|
-
handleDragOver:
|
|
10110
|
+
isDragging: Qt,
|
|
10111
|
+
uploadError: en,
|
|
10112
|
+
handleDragEnter: tn,
|
|
10113
|
+
handleDragLeave: nn,
|
|
10114
|
+
handleDragOver: rn,
|
|
10101
10115
|
handleDrop: hn,
|
|
10102
|
-
clearUploadError:
|
|
10116
|
+
clearUploadError: on,
|
|
10103
10117
|
onUploadFiles: z,
|
|
10104
|
-
onValidateUpload:
|
|
10105
|
-
maxFileSize:
|
|
10106
|
-
isDraggingOverWindow:
|
|
10118
|
+
onValidateUpload: B,
|
|
10119
|
+
maxFileSize: H,
|
|
10120
|
+
isDraggingOverWindow: $t,
|
|
10107
10121
|
openFileDialog: gn,
|
|
10108
|
-
fileInputRef:
|
|
10122
|
+
fileInputRef: Z,
|
|
10109
10123
|
newActions: Pn,
|
|
10110
10124
|
isNewButtonVisible: Fn,
|
|
10111
10125
|
isNewButtonDisabled: In,
|
|
@@ -10118,13 +10132,13 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10118
10132
|
saveFolderCreation: jn,
|
|
10119
10133
|
validateFolderName: Mn,
|
|
10120
10134
|
conflictResolutionPopupOptions: E,
|
|
10121
|
-
conflictingFiles:
|
|
10122
|
-
conflictResolutionOpen:
|
|
10123
|
-
closeConflictResolution:
|
|
10124
|
-
handleConflictReplace:
|
|
10125
|
-
handleConflictDuplicate:
|
|
10126
|
-
handleConflictCancel:
|
|
10127
|
-
handleConflictDecideForEach:
|
|
10135
|
+
conflictingFiles: Rt,
|
|
10136
|
+
conflictResolutionOpen: zt,
|
|
10137
|
+
closeConflictResolution: Bt,
|
|
10138
|
+
handleConflictReplace: Vt,
|
|
10139
|
+
handleConflictDuplicate: Ht,
|
|
10140
|
+
handleConflictCancel: Ut,
|
|
10141
|
+
handleConflictDecideForEach: Wt,
|
|
10128
10142
|
uploadConflictingFiles: Q,
|
|
10129
10143
|
uploadConflictResolutionOpen: ln,
|
|
10130
10144
|
closeUploadConflictResolution: un,
|
|
@@ -10134,8 +10148,8 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10134
10148
|
handleUploadConflictDecideForEach: mn,
|
|
10135
10149
|
fileMetadataPopupOptions: se,
|
|
10136
10150
|
isMetadataPopupOpen: ir,
|
|
10137
|
-
selectedFileForMetadata:
|
|
10138
|
-
openMetadataPopup:
|
|
10151
|
+
selectedFileForMetadata: ar,
|
|
10152
|
+
openMetadataPopup: sr,
|
|
10139
10153
|
closeMetadataPopup: dr,
|
|
10140
10154
|
onGetInfo: U,
|
|
10141
10155
|
onUnshareFiles: ce,
|
|
@@ -10146,7 +10160,7 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10146
10160
|
searchInProgress: me,
|
|
10147
10161
|
searchResults: pe,
|
|
10148
10162
|
clearSearchResults: he,
|
|
10149
|
-
isSearchMode:
|
|
10163
|
+
isSearchMode: bt,
|
|
10150
10164
|
emptyStateIcon: xe,
|
|
10151
10165
|
emptyStateTitle: Se,
|
|
10152
10166
|
emptyStateDescription: Ce,
|
|
@@ -10158,8 +10172,8 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10158
10172
|
onOpenInNewTab: Oe,
|
|
10159
10173
|
previewExtensions: ke,
|
|
10160
10174
|
isRenameFileAvailable: Ae,
|
|
10161
|
-
isDuplicateFolderAvailable:
|
|
10162
|
-
customUploadFileAction:
|
|
10175
|
+
isDuplicateFolderAvailable: je,
|
|
10176
|
+
customUploadFileAction: W,
|
|
10163
10177
|
customBreakpointRef: Pe,
|
|
10164
10178
|
nonClickableTableColumns: Ie,
|
|
10165
10179
|
hideSearchPathItemName: Le,
|
|
@@ -10171,11 +10185,11 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10171
10185
|
maxNewFolderDepth: Ve,
|
|
10172
10186
|
onNewFolderDepthExceeded: He
|
|
10173
10187
|
};
|
|
10174
|
-
return /* @__PURE__ */ K(
|
|
10175
|
-
value:
|
|
10188
|
+
return /* @__PURE__ */ K(yr.Provider, {
|
|
10189
|
+
value: _r,
|
|
10176
10190
|
children: t
|
|
10177
10191
|
});
|
|
10178
|
-
},
|
|
10192
|
+
}, zr = ({ disabledGridRowIds: e, gridRows: t, getDisabledTooltip: n, getRowDisabledTooltip: r, allowedFileTypes: a, maxSelectableFileSize: o }) => {
|
|
10179
10193
|
let [s, l] = u(null), [d, f] = u(null);
|
|
10180
10194
|
i(() => {
|
|
10181
10195
|
let e = () => {
|
|
@@ -10215,10 +10229,10 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10215
10229
|
a,
|
|
10216
10230
|
o
|
|
10217
10231
|
]);
|
|
10218
|
-
return /* @__PURE__ */ K(G, { children: m && d && tt(/* @__PURE__ */ q(
|
|
10232
|
+
return /* @__PURE__ */ K(G, { children: m && d && tt(/* @__PURE__ */ q(xe, {
|
|
10219
10233
|
open: !0,
|
|
10220
|
-
placement:
|
|
10221
|
-
children: [/* @__PURE__ */ K(
|
|
10234
|
+
placement: Ce.Top,
|
|
10235
|
+
children: [/* @__PURE__ */ K(we, {
|
|
10222
10236
|
asChild: !0,
|
|
10223
10237
|
children: /* @__PURE__ */ K("div", {
|
|
10224
10238
|
className: (0, $t.default)("fixed z-[-1]", m && "pointer-events-none"),
|
|
@@ -10229,41 +10243,41 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10229
10243
|
height: d.height
|
|
10230
10244
|
}
|
|
10231
10245
|
})
|
|
10232
|
-
}), /* @__PURE__ */ K(
|
|
10246
|
+
}), /* @__PURE__ */ K(Se, {
|
|
10233
10247
|
className: "text-center",
|
|
10234
10248
|
children: m
|
|
10235
10249
|
})]
|
|
10236
10250
|
}), document.body) });
|
|
10237
|
-
},
|
|
10238
|
-
let [e, t] = u(
|
|
10251
|
+
}, Br = () => typeof window < "u" && window.innerWidth < 640, Vr = () => {
|
|
10252
|
+
let [e, t] = u(Br());
|
|
10239
10253
|
return i(() => {
|
|
10240
|
-
let e = () => t(
|
|
10254
|
+
let e = () => t(Br());
|
|
10241
10255
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
10242
10256
|
}, []), e;
|
|
10243
|
-
},
|
|
10244
|
-
let [A, j] = u(!1), [M,
|
|
10257
|
+
}, Hr = ({ onClose: e, onConfirm: t, onFolderPopupPathChange: r, setDestinationFolderPath: i, open: a, copyLabel: o = "Copy", moveLabel: s = "Move", addFolderLabel: d = "Add folder", mode: p = dn.Copy, hiddenFilesSwitcherLabel: m = "Show hidden files", showHiddenFileSwitcher: h = !0, showCreateFolderButton: g = !0, onUploadFiles: _, onValidateUpload: v, maxFileSize: y, header: b, sourceFolder: x, disabledPathTooltip: S = "Unavailable for the original path. Please select another folder", path: C, collapsedFileTree: w = !1, alertProps: T, processDestinationFolderPath: E, excludedPaths: D, items: O, ...k }) => {
|
|
10258
|
+
let [A, j] = u(!1), [M, N] = u(!1), F = l(null), I = Vr(), R = c(() => Kn(O, D), [O, D]), z = n((e) => {
|
|
10245
10259
|
j(e);
|
|
10246
|
-
}, []),
|
|
10260
|
+
}, []), B = c(() => {
|
|
10247
10261
|
let e = [];
|
|
10248
10262
|
return g && e.push({
|
|
10249
10263
|
key: "add-folder",
|
|
10250
10264
|
label: d,
|
|
10251
|
-
icon: /* @__PURE__ */ K(
|
|
10252
|
-
...
|
|
10265
|
+
icon: /* @__PURE__ */ K(Ye, {
|
|
10266
|
+
...Z,
|
|
10253
10267
|
className: "text-secondary"
|
|
10254
10268
|
}),
|
|
10255
10269
|
onClick: () => {
|
|
10256
|
-
F.current?.createFolder(),
|
|
10270
|
+
F.current?.createFolder(), N(!1);
|
|
10257
10271
|
}
|
|
10258
10272
|
}), h && e.push({
|
|
10259
10273
|
key: "show-hidden-files",
|
|
10260
10274
|
label: m,
|
|
10261
|
-
icon: /* @__PURE__ */ K(
|
|
10262
|
-
...
|
|
10275
|
+
icon: /* @__PURE__ */ K(Ue, {
|
|
10276
|
+
...Z,
|
|
10263
10277
|
className: "text-secondary"
|
|
10264
10278
|
}),
|
|
10265
10279
|
onClick: () => {
|
|
10266
|
-
j((e) => !e),
|
|
10280
|
+
j((e) => !e), N(!1);
|
|
10267
10281
|
}
|
|
10268
10282
|
}), e;
|
|
10269
10283
|
}, [
|
|
@@ -10271,7 +10285,7 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10271
10285
|
m,
|
|
10272
10286
|
h,
|
|
10273
10287
|
g
|
|
10274
|
-
]),
|
|
10288
|
+
]), ee = n((e) => {
|
|
10275
10289
|
if (e) {
|
|
10276
10290
|
let t = E ? E(e) : e;
|
|
10277
10291
|
r?.(t), i?.(t);
|
|
@@ -10280,32 +10294,32 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10280
10294
|
r,
|
|
10281
10295
|
i,
|
|
10282
10296
|
E
|
|
10283
|
-
]),
|
|
10284
|
-
return /* @__PURE__ */ K(
|
|
10297
|
+
]), H = p === dn.Copy ? "Copy to" : "Move to", te = c(() => !C || !x ? !1 : x === C, [C, x]);
|
|
10298
|
+
return /* @__PURE__ */ K(U, {
|
|
10285
10299
|
open: a,
|
|
10286
10300
|
onClose: () => {
|
|
10287
10301
|
e();
|
|
10288
10302
|
},
|
|
10289
|
-
size:
|
|
10303
|
+
size: ce.Lg,
|
|
10290
10304
|
className: "md:!h-[800px] !bg-layer-sunken",
|
|
10291
10305
|
footer: /* @__PURE__ */ q("div", {
|
|
10292
10306
|
className: "flex justify-between items-center gap-2 p-4 md:px-6",
|
|
10293
10307
|
children: [/* @__PURE__ */ K("div", {
|
|
10294
10308
|
className: "flex items-center gap-4 min-w-0",
|
|
10295
|
-
children:
|
|
10296
|
-
items:
|
|
10309
|
+
children: I ? /* @__PURE__ */ K(P, {
|
|
10310
|
+
items: B,
|
|
10297
10311
|
open: M,
|
|
10298
|
-
onOpenChange:
|
|
10299
|
-
children: /* @__PURE__ */ K(
|
|
10300
|
-
size:
|
|
10312
|
+
onOpenChange: N,
|
|
10313
|
+
children: /* @__PURE__ */ K(V, {
|
|
10314
|
+
size: L.Large,
|
|
10301
10315
|
"aria-label": "More options",
|
|
10302
|
-
icon: /* @__PURE__ */ K(
|
|
10316
|
+
icon: /* @__PURE__ */ K(Be, { ...Z })
|
|
10303
10317
|
})
|
|
10304
10318
|
}) : /* @__PURE__ */ q(G, { children: [
|
|
10305
|
-
g && /* @__PURE__ */ K(
|
|
10319
|
+
g && /* @__PURE__ */ K(le, {
|
|
10306
10320
|
label: d,
|
|
10307
10321
|
appearance: f.Ghost,
|
|
10308
|
-
iconBefore: /* @__PURE__ */ K(
|
|
10322
|
+
iconBefore: /* @__PURE__ */ K(Ye, { ...Z }),
|
|
10309
10323
|
onClick: () => {
|
|
10310
10324
|
F.current?.createFolder();
|
|
10311
10325
|
}
|
|
@@ -10313,7 +10327,7 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10313
10327
|
g && h && /* @__PURE__ */ K("div", { className: "w-px h-[26px] bg-control-disable-primary my-2" }),
|
|
10314
10328
|
h && /* @__PURE__ */ K(G, { children: /* @__PURE__ */ K("div", {
|
|
10315
10329
|
className: "inline-flex items-center cursor-pointer",
|
|
10316
|
-
children: /* @__PURE__ */ K(
|
|
10330
|
+
children: /* @__PURE__ */ K(ge, {
|
|
10317
10331
|
labelProps: { label: m },
|
|
10318
10332
|
isOn: A,
|
|
10319
10333
|
onChange: z,
|
|
@@ -10323,37 +10337,37 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10323
10337
|
] })
|
|
10324
10338
|
}), /* @__PURE__ */ q("div", {
|
|
10325
10339
|
className: "flex space-x-4 items-center",
|
|
10326
|
-
children: [/* @__PURE__ */ K(
|
|
10340
|
+
children: [/* @__PURE__ */ K(re, {
|
|
10327
10341
|
onClick: e,
|
|
10328
10342
|
label: "Cancel"
|
|
10329
|
-
}),
|
|
10343
|
+
}), te ? /* @__PURE__ */ K(be, {
|
|
10330
10344
|
tooltip: S,
|
|
10331
|
-
children: /* @__PURE__ */ K(
|
|
10345
|
+
children: /* @__PURE__ */ K(le, {
|
|
10332
10346
|
onClick: t,
|
|
10333
10347
|
label: p === "copy" ? o : s,
|
|
10334
|
-
disabled:
|
|
10335
|
-
"aria-disabled":
|
|
10348
|
+
disabled: te,
|
|
10349
|
+
"aria-disabled": te
|
|
10336
10350
|
})
|
|
10337
|
-
}) : /* @__PURE__ */ K(
|
|
10351
|
+
}) : /* @__PURE__ */ K(le, {
|
|
10338
10352
|
onClick: t,
|
|
10339
10353
|
label: p === "copy" ? o : s
|
|
10340
10354
|
})]
|
|
10341
10355
|
})]
|
|
10342
10356
|
}),
|
|
10343
|
-
header: b ??
|
|
10344
|
-
ariaLabel:
|
|
10357
|
+
header: b ?? H,
|
|
10358
|
+
ariaLabel: H,
|
|
10345
10359
|
children: /* @__PURE__ */ q("div", {
|
|
10346
10360
|
className: "bg-layer-sunken h-full flex flex-col",
|
|
10347
10361
|
children: [T && /* @__PURE__ */ K("div", {
|
|
10348
10362
|
className: "px-6 mb-4 pt-4",
|
|
10349
|
-
children: /* @__PURE__ */ K(
|
|
10363
|
+
children: /* @__PURE__ */ K(ae, { ...T })
|
|
10350
10364
|
}), /* @__PURE__ */ K("div", {
|
|
10351
10365
|
className: "flex-1 min-h-0",
|
|
10352
|
-
children: /* @__PURE__ */ K(
|
|
10366
|
+
children: /* @__PURE__ */ K(wi, {
|
|
10353
10367
|
...k,
|
|
10354
10368
|
items: R,
|
|
10355
10369
|
gridClassName: "size-full",
|
|
10356
|
-
className:
|
|
10370
|
+
className: De(k.className, "bg-layer-sunken h-full flex pt-0"),
|
|
10357
10371
|
actionsRef: F,
|
|
10358
10372
|
path: C,
|
|
10359
10373
|
showHiddenFiles: A,
|
|
@@ -10374,17 +10388,17 @@ var Lr = ({ managerLabel: e, children: t, className: r, items: a = [], rootItem:
|
|
|
10374
10388
|
},
|
|
10375
10389
|
onUploadFiles: _,
|
|
10376
10390
|
onValidateUpload: v,
|
|
10377
|
-
onPathChange:
|
|
10391
|
+
onPathChange: ee,
|
|
10378
10392
|
maxFileSize: y
|
|
10379
10393
|
})
|
|
10380
10394
|
})]
|
|
10381
10395
|
})
|
|
10382
10396
|
});
|
|
10383
10397
|
};
|
|
10384
|
-
function
|
|
10398
|
+
function Ur({ actions: e, direction: t = z.Normal, moreButtonWidth: r = d, actionsGap: a = 8, containerPadding: o = 8, dependencies: c = [] }) {
|
|
10385
10399
|
let f = l(null), p = l(null), m = l(null), h = l(null), g = l([]), [_, v] = u(0), y = n((e, n) => {
|
|
10386
10400
|
let i = (m.current?.offsetWidth ?? 0) + (h.current?.offsetWidth ?? 0), s = n.getBoundingClientRect().width - i - r - a * 2 - o * 2, c = 0, l = 0;
|
|
10387
|
-
if (t ===
|
|
10401
|
+
if (t === z.Reverse) for (let t = e.length - 1; t >= 0 && (c += e[t] + a, !(c > s)); t--) l++;
|
|
10388
10402
|
else for (let t of e) {
|
|
10389
10403
|
if (c += t + a, c > s) break;
|
|
10390
10404
|
l++;
|
|
@@ -10421,9 +10435,9 @@ function Hr({ actions: e, direction: t = R.Normal, moreButtonWidth: r = d, actio
|
|
|
10421
10435
|
y,
|
|
10422
10436
|
...c
|
|
10423
10437
|
]);
|
|
10424
|
-
let b = t ===
|
|
10438
|
+
let b = t === z.Reverse ? e.slice(0, e.length - _) : e.slice(_);
|
|
10425
10439
|
return {
|
|
10426
|
-
visibleActions: t ===
|
|
10440
|
+
visibleActions: t === z.Reverse ? e.slice(e.length - _) : e.slice(0, _),
|
|
10427
10441
|
hiddenActions: b,
|
|
10428
10442
|
refs: {
|
|
10429
10443
|
containerRef: f,
|
|
@@ -10433,18 +10447,18 @@ function Hr({ actions: e, direction: t = R.Normal, moreButtonWidth: r = d, actio
|
|
|
10433
10447
|
}
|
|
10434
10448
|
};
|
|
10435
10449
|
}
|
|
10436
|
-
var
|
|
10437
|
-
let i =
|
|
10450
|
+
var Wr = 12, Gr = 8, Kr = ({ getSelectionLabel: e, onClearSelection: t, actions: n, selectedCount: r }) => {
|
|
10451
|
+
let i = Vr(), { refs: { containerRef: a, leftSectionRef: o, measureRef: s }, visibleActions: c, hiddenActions: l } = Ur({
|
|
10438
10452
|
actions: n,
|
|
10439
|
-
direction:
|
|
10453
|
+
direction: z.Reverse,
|
|
10440
10454
|
dependencies: [i],
|
|
10441
|
-
actionsGap:
|
|
10442
|
-
containerPadding:
|
|
10455
|
+
actionsGap: Wr,
|
|
10456
|
+
containerPadding: Gr
|
|
10443
10457
|
}), u = e(r);
|
|
10444
10458
|
return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("div", {
|
|
10445
10459
|
ref: s,
|
|
10446
10460
|
className: "absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",
|
|
10447
|
-
children: n.map(({ key: e, icon: t, title: n }) => /* @__PURE__ */ K(
|
|
10461
|
+
children: n.map(({ key: e, icon: t, title: n }) => /* @__PURE__ */ K(re, {
|
|
10448
10462
|
iconBefore: t,
|
|
10449
10463
|
label: n
|
|
10450
10464
|
}, e))
|
|
@@ -10455,23 +10469,23 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10455
10469
|
"aria-label": "File bulk actions",
|
|
10456
10470
|
children: [/* @__PURE__ */ K("div", {
|
|
10457
10471
|
ref: o,
|
|
10458
|
-
children: /* @__PURE__ */ K(
|
|
10472
|
+
children: /* @__PURE__ */ K(le, {
|
|
10459
10473
|
label: u,
|
|
10460
10474
|
onClick: t,
|
|
10461
10475
|
textClassName: "text-accent whitespace-nowrap",
|
|
10462
10476
|
appearance: f.Ghost,
|
|
10463
|
-
iconBefore: /* @__PURE__ */ K(et, { ...
|
|
10477
|
+
iconBefore: /* @__PURE__ */ K(et, { ...Z })
|
|
10464
10478
|
})
|
|
10465
10479
|
}), /* @__PURE__ */ q("div", {
|
|
10466
10480
|
className: "flex flex-1 w-full gap-3 items-center justify-end",
|
|
10467
|
-
children: [l.length > 0 && /* @__PURE__ */ K(
|
|
10481
|
+
children: [l.length > 0 && /* @__PURE__ */ K(P, {
|
|
10468
10482
|
items: l,
|
|
10469
10483
|
allowedPlacements: ["bottom", "bottom-start"],
|
|
10470
|
-
children: /* @__PURE__ */ K(
|
|
10484
|
+
children: /* @__PURE__ */ K(V, {
|
|
10471
10485
|
className: "h-[38px]",
|
|
10472
|
-
icon: /* @__PURE__ */ K(
|
|
10486
|
+
icon: /* @__PURE__ */ K(Be, { ...Z })
|
|
10473
10487
|
})
|
|
10474
|
-
}), c.map(({ key: e, icon: t, tooltip: n, title: r, onClick: i, disabled: a }) => /* @__PURE__ */ K(
|
|
10488
|
+
}), c.map(({ key: e, icon: t, tooltip: n, title: r, onClick: i, disabled: a }) => /* @__PURE__ */ K(re, {
|
|
10475
10489
|
className: "!p-[9px]",
|
|
10476
10490
|
iconBefore: t,
|
|
10477
10491
|
label: r,
|
|
@@ -10484,7 +10498,7 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10484
10498
|
}, e))]
|
|
10485
10499
|
})]
|
|
10486
10500
|
})] });
|
|
10487
|
-
},
|
|
10501
|
+
}, qr = ({ open: e, itemsToDelete: t, onClose: n, onConfirm: r, cancelLabel: i = "Cancel", confirmLabel: a = "Delete", titleRenderer: o, contentRenderer: s }) => {
|
|
10488
10502
|
let c = t.map((e) => e.name), l = "Confirm Deleting Items", u = o?.(c) || l, d = /* @__PURE__ */ q("div", {
|
|
10489
10503
|
className: "px-6 py-3 dial-small-text",
|
|
10490
10504
|
children: [/* @__PURE__ */ K("p", {
|
|
@@ -10531,23 +10545,23 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10531
10545
|
]
|
|
10532
10546
|
})] }) })]
|
|
10533
10547
|
}), f = s?.(c) || d;
|
|
10534
|
-
return /* @__PURE__ */ K(
|
|
10548
|
+
return /* @__PURE__ */ K(y, {
|
|
10535
10549
|
open: e,
|
|
10536
10550
|
header: u,
|
|
10537
10551
|
ariaLabel: l,
|
|
10538
10552
|
confirmLabel: a,
|
|
10539
10553
|
cancelLabel: i,
|
|
10540
|
-
variant:
|
|
10554
|
+
variant: b.Danger,
|
|
10541
10555
|
onClose: n,
|
|
10542
10556
|
onConfirm: r,
|
|
10543
10557
|
children: f
|
|
10544
10558
|
});
|
|
10545
|
-
},
|
|
10559
|
+
}, Jr = (e) => e.split("/").map((e) => e.trim()).filter(Boolean), Yr = "w-full flex items-center justify-between gap-4 p-px", Xr = "min-w-0 h-[40px] flex-1 overflow-hidden bg-layer-raised px-3 flex items-center rounded", Zr = "w-[260px]", Qr = ({ ariaLabel: e = "Breadcrumb", labelClassName: t, onItemClick: r, path: i, makeHref: a, rootItemPath: o, rootItemLabel: s, breadcrumbsHiddenPathPart: l, className: d, breadcrumbClassName: f, searchable: p = !0, value: m, elementId: h = "file-manager-search", disabled: g, invalid: _, onSearchChange: v, searchClassName: y, searchContainerClassName: b, isCompactView: x = !1, backButtonLabel: S = "Back" }) => {
|
|
10546
10560
|
let C = c(() => {
|
|
10547
10561
|
if (!i) return;
|
|
10548
|
-
let e =
|
|
10562
|
+
let e = Jr(i), t = [...e], n = 0;
|
|
10549
10563
|
if (l) {
|
|
10550
|
-
let t =
|
|
10564
|
+
let t = Jr(l);
|
|
10551
10565
|
if (t.length) {
|
|
10552
10566
|
let r = e.findIndex((n, r) => t.every((t, n) => e[r + n] === t));
|
|
10553
10567
|
r !== -1 && (n = t.length, e = [...e.slice(0, r), ...e.slice(r + t.length)]);
|
|
@@ -10585,11 +10599,11 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10585
10599
|
s,
|
|
10586
10600
|
a,
|
|
10587
10601
|
r
|
|
10588
|
-
]), [w,
|
|
10602
|
+
]), [w, T] = u(!1), D = (e) => {
|
|
10589
10603
|
v?.(e ?? "");
|
|
10590
10604
|
}, O = n(() => {
|
|
10591
10605
|
if (x && !w) {
|
|
10592
|
-
|
|
10606
|
+
T(!0);
|
|
10593
10607
|
let e = document.getElementById(h);
|
|
10594
10608
|
e && e.focus();
|
|
10595
10609
|
}
|
|
@@ -10599,16 +10613,16 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10599
10613
|
x
|
|
10600
10614
|
]), k = n(() => {
|
|
10601
10615
|
(!m || String(m).trim() === "") && v?.("");
|
|
10602
|
-
}, [m, v]), A = n(() => x && w ? /* @__PURE__ */ K(
|
|
10603
|
-
size:
|
|
10616
|
+
}, [m, v]), A = n(() => x && w ? /* @__PURE__ */ K(V, {
|
|
10617
|
+
size: L.Standard,
|
|
10604
10618
|
"aria-label": S,
|
|
10605
|
-
icon: /* @__PURE__ */ K(
|
|
10619
|
+
icon: /* @__PURE__ */ K(Pe, { ...Z }),
|
|
10606
10620
|
onClick: () => {
|
|
10607
|
-
|
|
10621
|
+
T(!1), v?.("");
|
|
10608
10622
|
}
|
|
10609
10623
|
}) : /* @__PURE__ */ K("div", {
|
|
10610
|
-
className:
|
|
10611
|
-
children: /* @__PURE__ */ K(
|
|
10624
|
+
className: Xr,
|
|
10625
|
+
children: /* @__PURE__ */ K(E, {
|
|
10612
10626
|
pathItems: C,
|
|
10613
10627
|
ariaLabel: e,
|
|
10614
10628
|
labelClassName: t,
|
|
@@ -10625,17 +10639,17 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10625
10639
|
v
|
|
10626
10640
|
]);
|
|
10627
10641
|
return /* @__PURE__ */ q("div", {
|
|
10628
|
-
className:
|
|
10642
|
+
className: De(Yr, { "gap-3": x }, d),
|
|
10629
10643
|
"aria-label": "navigation-panel",
|
|
10630
10644
|
children: [A(), p && /* @__PURE__ */ K("div", {
|
|
10631
|
-
className:
|
|
10645
|
+
className: De(Zr, {
|
|
10632
10646
|
"w-[40px]": x && !w,
|
|
10633
10647
|
"w-full": x && w
|
|
10634
10648
|
}),
|
|
10635
10649
|
role: "search",
|
|
10636
10650
|
"aria-label": "Search",
|
|
10637
10651
|
onClick: O,
|
|
10638
|
-
children: /* @__PURE__ */ K(
|
|
10652
|
+
children: /* @__PURE__ */ K(de, {
|
|
10639
10653
|
id: h,
|
|
10640
10654
|
value: m ?? "",
|
|
10641
10655
|
onChange: D,
|
|
@@ -10648,12 +10662,12 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10648
10662
|
})
|
|
10649
10663
|
})]
|
|
10650
10664
|
});
|
|
10651
|
-
},
|
|
10652
|
-
let v =
|
|
10665
|
+
}, $r = ({ tabs: e, activeTab: t, onTabChange: n, areHiddenFilesVisible: r, onToggleHiddenFiles: i, isNewButtonVisible: a, isNewButtonDisabled: o, newButtonVariant: s = m.Primary, newButtonDropdownItems: l = [], newButtonLabel: u = "New", hiddenFilesSwitcherLabel: d = "Hidden files", showHiddenFilesLabel: f = "Show hidden files", hideHiddenFilesLabel: h = "Hide hidden files", showHiddenFilesToggle: g = !0, disabledNewButtonTooltip: _ }) => {
|
|
10666
|
+
let v = Vr(), y = c(() => [{
|
|
10653
10667
|
key: "hidden-files-switch",
|
|
10654
10668
|
label: r ? h : f,
|
|
10655
|
-
icon: K(r ?
|
|
10656
|
-
...
|
|
10669
|
+
icon: K(r ? We : Ue, {
|
|
10670
|
+
...Z,
|
|
10657
10671
|
className: "text-secondary"
|
|
10658
10672
|
}),
|
|
10659
10673
|
onClick: () => i?.(!r)
|
|
@@ -10667,24 +10681,24 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10667
10681
|
className: "flex w-full justify-between gap-4 items-center overflow-x-auto py-[2px] my-[-2px]",
|
|
10668
10682
|
children: [/* @__PURE__ */ K("div", {
|
|
10669
10683
|
className: "flex-1 min-w-0",
|
|
10670
|
-
children: e && t && n ? /* @__PURE__ */ K(
|
|
10684
|
+
children: e && t && n ? /* @__PURE__ */ K(_e, {
|
|
10671
10685
|
tabs: e,
|
|
10672
10686
|
activeTabId: t,
|
|
10673
10687
|
onTabChange: (e) => n(e)
|
|
10674
10688
|
}) : null
|
|
10675
10689
|
}), /* @__PURE__ */ K("div", {
|
|
10676
10690
|
className: "flex gap-2 shrink-0 items-center",
|
|
10677
|
-
children: v ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
10691
|
+
children: v ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(P, {
|
|
10678
10692
|
items: y,
|
|
10679
10693
|
allowedPlacements: ["bottom", "bottom-start"],
|
|
10680
|
-
children: /* @__PURE__ */ K(
|
|
10681
|
-
size:
|
|
10682
|
-
icon: /* @__PURE__ */ K(
|
|
10694
|
+
children: /* @__PURE__ */ K(V, {
|
|
10695
|
+
size: L.Small,
|
|
10696
|
+
icon: /* @__PURE__ */ K(Be, {
|
|
10683
10697
|
stroke: sn,
|
|
10684
|
-
size:
|
|
10698
|
+
size: C.SM
|
|
10685
10699
|
})
|
|
10686
10700
|
})
|
|
10687
|
-
}), a ? /* @__PURE__ */ K(
|
|
10701
|
+
}), a ? /* @__PURE__ */ K(be, {
|
|
10688
10702
|
tooltip: o && _ ? _ : void 0,
|
|
10689
10703
|
children: /* @__PURE__ */ K(p, {
|
|
10690
10704
|
label: u,
|
|
@@ -10692,12 +10706,12 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10692
10706
|
items: l,
|
|
10693
10707
|
disabled: o
|
|
10694
10708
|
})
|
|
10695
|
-
}) : null] }) : /* @__PURE__ */ q(G, { children: [g && /* @__PURE__ */ K(
|
|
10709
|
+
}) : null] }) : /* @__PURE__ */ q(G, { children: [g && /* @__PURE__ */ K(ge, {
|
|
10696
10710
|
id: "hidden-files-switch",
|
|
10697
10711
|
labelProps: { label: d },
|
|
10698
10712
|
isOn: r,
|
|
10699
10713
|
onChange: i
|
|
10700
|
-
}), a && /* @__PURE__ */ K(
|
|
10714
|
+
}), a && /* @__PURE__ */ K(be, {
|
|
10701
10715
|
tooltip: o && _ ? _ : void 0,
|
|
10702
10716
|
children: /* @__PURE__ */ K(p, {
|
|
10703
10717
|
label: u,
|
|
@@ -10708,162 +10722,162 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10708
10722
|
})] })
|
|
10709
10723
|
})]
|
|
10710
10724
|
});
|
|
10711
|
-
},
|
|
10725
|
+
}, ei = 100, ti = 16, ni = "text-secondary", ri = "text-primary min-w-0", ii = "text-primary break-words min-w-0", ai = "bg-layer-sunken", oi = ({ open: e, onClose: t, fileMetadata: n, loading: r = !1, header: i = "Information", nameLabel: a = "Name:", pathLabel: o = "Path:", modifiedDateLabel: s = "Modified Date:", sizeLabel: c = "Size:", authorLabel: l = "Author:", dateLocale: u = "en-US", dateOptions: d }) => /* @__PURE__ */ K(U, {
|
|
10712
10726
|
open: e,
|
|
10713
10727
|
onClose: t,
|
|
10714
|
-
size:
|
|
10728
|
+
size: ce.Sm,
|
|
10715
10729
|
header: i,
|
|
10716
10730
|
ariaLabel: "File information",
|
|
10717
10731
|
children: /* @__PURE__ */ K("div", {
|
|
10718
10732
|
className: "px-6 py-4",
|
|
10719
10733
|
children: /* @__PURE__ */ K("div", {
|
|
10720
10734
|
className: "grid gap-4 items-center dial-small-text",
|
|
10721
|
-
style: { gridTemplateColumns: `${
|
|
10735
|
+
style: { gridTemplateColumns: `${ei}px 1fr` },
|
|
10722
10736
|
children: r ? /* @__PURE__ */ q(G, { children: [
|
|
10723
10737
|
/* @__PURE__ */ K("div", {
|
|
10724
|
-
className:
|
|
10738
|
+
className: ni,
|
|
10725
10739
|
children: a
|
|
10726
10740
|
}),
|
|
10727
|
-
/* @__PURE__ */ K(
|
|
10728
|
-
variant:
|
|
10741
|
+
/* @__PURE__ */ K(pe, {
|
|
10742
|
+
variant: me.Text,
|
|
10729
10743
|
width: "100%",
|
|
10730
|
-
height:
|
|
10731
|
-
className:
|
|
10744
|
+
height: ti,
|
|
10745
|
+
className: ai
|
|
10732
10746
|
}),
|
|
10733
10747
|
/* @__PURE__ */ K("div", {
|
|
10734
|
-
className:
|
|
10748
|
+
className: ni,
|
|
10735
10749
|
children: s
|
|
10736
10750
|
}),
|
|
10737
|
-
/* @__PURE__ */ K(
|
|
10738
|
-
variant:
|
|
10751
|
+
/* @__PURE__ */ K(pe, {
|
|
10752
|
+
variant: me.Text,
|
|
10739
10753
|
width: "90%",
|
|
10740
|
-
height:
|
|
10741
|
-
className:
|
|
10754
|
+
height: ti,
|
|
10755
|
+
className: ai
|
|
10742
10756
|
}),
|
|
10743
10757
|
/* @__PURE__ */ K("div", {
|
|
10744
|
-
className:
|
|
10758
|
+
className: ni,
|
|
10745
10759
|
children: c
|
|
10746
10760
|
}),
|
|
10747
|
-
/* @__PURE__ */ K(
|
|
10748
|
-
variant:
|
|
10761
|
+
/* @__PURE__ */ K(pe, {
|
|
10762
|
+
variant: me.Text,
|
|
10749
10763
|
width: "60%",
|
|
10750
|
-
height:
|
|
10751
|
-
className:
|
|
10764
|
+
height: ti,
|
|
10765
|
+
className: ai
|
|
10752
10766
|
}),
|
|
10753
10767
|
/* @__PURE__ */ K("div", {
|
|
10754
|
-
className:
|
|
10768
|
+
className: ni,
|
|
10755
10769
|
children: l
|
|
10756
10770
|
}),
|
|
10757
|
-
/* @__PURE__ */ K(
|
|
10758
|
-
variant:
|
|
10771
|
+
/* @__PURE__ */ K(pe, {
|
|
10772
|
+
variant: me.Text,
|
|
10759
10773
|
width: "80%",
|
|
10760
|
-
height:
|
|
10761
|
-
className:
|
|
10774
|
+
height: ti,
|
|
10775
|
+
className: ai
|
|
10762
10776
|
}),
|
|
10763
10777
|
/* @__PURE__ */ K("div", {
|
|
10764
|
-
className:
|
|
10778
|
+
className: ni,
|
|
10765
10779
|
children: o
|
|
10766
10780
|
}),
|
|
10767
|
-
/* @__PURE__ */ K(
|
|
10768
|
-
variant:
|
|
10781
|
+
/* @__PURE__ */ K(pe, {
|
|
10782
|
+
variant: me.Text,
|
|
10769
10783
|
width: "70%",
|
|
10770
|
-
height:
|
|
10771
|
-
className:
|
|
10784
|
+
height: ti,
|
|
10785
|
+
className: ai
|
|
10772
10786
|
})
|
|
10773
10787
|
] }) : n ? /* @__PURE__ */ q(G, { children: [
|
|
10774
10788
|
/* @__PURE__ */ K("div", {
|
|
10775
|
-
className:
|
|
10789
|
+
className: ni,
|
|
10776
10790
|
children: a
|
|
10777
10791
|
}),
|
|
10778
10792
|
/* @__PURE__ */ K("div", {
|
|
10779
|
-
className:
|
|
10780
|
-
children: /* @__PURE__ */ K(
|
|
10793
|
+
className: ri,
|
|
10794
|
+
children: /* @__PURE__ */ K(R, { text: n.name })
|
|
10781
10795
|
}),
|
|
10782
10796
|
/* @__PURE__ */ K("div", {
|
|
10783
|
-
className:
|
|
10797
|
+
className: ni,
|
|
10784
10798
|
children: s
|
|
10785
10799
|
}),
|
|
10786
10800
|
/* @__PURE__ */ K("div", {
|
|
10787
|
-
className:
|
|
10788
|
-
children: /* @__PURE__ */ K(
|
|
10801
|
+
className: ri,
|
|
10802
|
+
children: /* @__PURE__ */ K(R, { text: Yn(n.updatedAt, u, d) })
|
|
10789
10803
|
}),
|
|
10790
10804
|
/* @__PURE__ */ K("div", {
|
|
10791
|
-
className:
|
|
10805
|
+
className: ni,
|
|
10792
10806
|
children: c
|
|
10793
10807
|
}),
|
|
10794
10808
|
/* @__PURE__ */ K("div", {
|
|
10795
|
-
className:
|
|
10796
|
-
children: /* @__PURE__ */ K(
|
|
10809
|
+
className: ri,
|
|
10810
|
+
children: /* @__PURE__ */ K(R, { text: Jn(n.contentLength) })
|
|
10797
10811
|
}),
|
|
10798
10812
|
/* @__PURE__ */ K("div", {
|
|
10799
|
-
className:
|
|
10813
|
+
className: ni,
|
|
10800
10814
|
children: l
|
|
10801
10815
|
}),
|
|
10802
10816
|
/* @__PURE__ */ K("div", {
|
|
10803
|
-
className:
|
|
10804
|
-
children: /* @__PURE__ */ K(
|
|
10817
|
+
className: ri,
|
|
10818
|
+
children: /* @__PURE__ */ K(R, { text: n.author || "—" })
|
|
10805
10819
|
}),
|
|
10806
10820
|
/* @__PURE__ */ K("div", {
|
|
10807
|
-
className:
|
|
10821
|
+
className: ni,
|
|
10808
10822
|
children: o
|
|
10809
10823
|
}),
|
|
10810
10824
|
/* @__PURE__ */ K("div", {
|
|
10811
|
-
className:
|
|
10825
|
+
className: ii,
|
|
10812
10826
|
children: decodeURIComponent(n.path)
|
|
10813
10827
|
})
|
|
10814
10828
|
] }) : null
|
|
10815
10829
|
})
|
|
10816
10830
|
})
|
|
10817
|
-
}),
|
|
10831
|
+
}), si = {
|
|
10818
10832
|
size: 10,
|
|
10819
10833
|
stroke: 2
|
|
10820
|
-
},
|
|
10834
|
+
}, ci = 26, li = "__new_folder", ui = ({ name: e, type: t, shared: n = !1, loading: r = !1, sharedIndicatorClassName: i, sharedIndicatorTooltip: a, fileExtension: o, ...s }) => {
|
|
10821
10835
|
let c = (e) => /* @__PURE__ */ q("span", {
|
|
10822
10836
|
className: "inline-flex relative text-secondary",
|
|
10823
10837
|
role: "img",
|
|
10824
10838
|
children: [e, n && /* @__PURE__ */ K("span", {
|
|
10825
10839
|
className: "absolute -bottom-0.5 -left-0.5",
|
|
10826
|
-
children: /* @__PURE__ */ K(
|
|
10840
|
+
children: /* @__PURE__ */ K(N, {
|
|
10827
10841
|
className: i,
|
|
10828
10842
|
sharedIndicatorTooltip: a
|
|
10829
10843
|
})
|
|
10830
10844
|
})]
|
|
10831
10845
|
});
|
|
10832
|
-
if (r) return c(/* @__PURE__ */ K(
|
|
10833
|
-
if (t ===
|
|
10846
|
+
if (r) return c(/* @__PURE__ */ K(he, {}));
|
|
10847
|
+
if (t === M.File) {
|
|
10834
10848
|
let t = o || (e.includes(".") ? e.split(".").pop() : void 0);
|
|
10835
|
-
return /* @__PURE__ */ K(
|
|
10849
|
+
return /* @__PURE__ */ K(D, {
|
|
10836
10850
|
...s,
|
|
10837
10851
|
extension: t ?? "",
|
|
10838
10852
|
className: "text-secondary",
|
|
10839
|
-
indicator: n ? /* @__PURE__ */ K(
|
|
10853
|
+
indicator: n ? /* @__PURE__ */ K(N, {
|
|
10840
10854
|
className: i,
|
|
10841
10855
|
sharedIndicatorTooltip: a
|
|
10842
10856
|
}) : null,
|
|
10843
10857
|
label: "File type icon"
|
|
10844
10858
|
});
|
|
10845
10859
|
}
|
|
10846
|
-
return t ===
|
|
10847
|
-
icon: /* @__PURE__ */ K(
|
|
10860
|
+
return t === M.Folder ? c(/* @__PURE__ */ K(j, {
|
|
10861
|
+
icon: /* @__PURE__ */ K(Je, {
|
|
10848
10862
|
className: s.className,
|
|
10849
|
-
size: s.size ??
|
|
10850
|
-
stroke: s.stroke ??
|
|
10863
|
+
size: s.size ?? Z.size,
|
|
10864
|
+
stroke: s.stroke ?? Z.stroke
|
|
10851
10865
|
}),
|
|
10852
10866
|
className: "inline-block align-middle"
|
|
10853
10867
|
})) : null;
|
|
10854
|
-
},
|
|
10868
|
+
}, di = ({ name: e, type: t, elementId: n, loading: r = !1, shared: i = !1, iconClassName: a, iconIndicator: o, iconLabel: s, iconSize: c, iconStroke: l, inputInvalid: u, inputInvalidMessage: d, inputContainerClassName: f, inputIconAfter: p, inputRef: m, onChange: h, sharedIndicatorClassName: g, sharedIndicatorTooltip: _, fileExtension: v }) => {
|
|
10855
10869
|
let y = () => {
|
|
10856
|
-
let e = d?.startsWith(`${
|
|
10870
|
+
let e = d?.startsWith(`${se.Warning}__`);
|
|
10857
10871
|
if (!u && !e) return null;
|
|
10858
|
-
let t = d?.replace(`${
|
|
10859
|
-
return /* @__PURE__ */ K(
|
|
10872
|
+
let t = d?.replace(`${se.Warning}__`, "");
|
|
10873
|
+
return /* @__PURE__ */ K(be, {
|
|
10860
10874
|
tooltip: t,
|
|
10861
|
-
children: p || (e ? /* @__PURE__ */ K(
|
|
10862
|
-
...
|
|
10875
|
+
children: p || (e ? /* @__PURE__ */ K(Ne, {
|
|
10876
|
+
...Z,
|
|
10863
10877
|
className: "text-warning-icon",
|
|
10864
10878
|
"aria-label": "warning"
|
|
10865
|
-
}) : /* @__PURE__ */ K(
|
|
10866
|
-
...
|
|
10879
|
+
}) : /* @__PURE__ */ K(Me, {
|
|
10880
|
+
...Z,
|
|
10867
10881
|
className: "text-error",
|
|
10868
10882
|
"aria-label": "alert"
|
|
10869
10883
|
}))
|
|
@@ -10871,8 +10885,8 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10871
10885
|
};
|
|
10872
10886
|
return /* @__PURE__ */ q("div", {
|
|
10873
10887
|
className: "flex gap-2 items-center",
|
|
10874
|
-
...
|
|
10875
|
-
children: [/* @__PURE__ */ K(
|
|
10888
|
+
...Ee,
|
|
10889
|
+
children: [/* @__PURE__ */ K(ui, {
|
|
10876
10890
|
name: e,
|
|
10877
10891
|
type: t,
|
|
10878
10892
|
label: s,
|
|
@@ -10885,8 +10899,8 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10885
10899
|
fileExtension: v,
|
|
10886
10900
|
sharedIndicatorClassName: g,
|
|
10887
10901
|
sharedIndicatorTooltip: _
|
|
10888
|
-
}), /* @__PURE__ */ K(
|
|
10889
|
-
containerClassName:
|
|
10902
|
+
}), /* @__PURE__ */ K(te, {
|
|
10903
|
+
containerClassName: De("!h-5 !py-[1px] !pl-[7px] pr-[7px]", f),
|
|
10890
10904
|
id: n,
|
|
10891
10905
|
value: e,
|
|
10892
10906
|
onChange: h,
|
|
@@ -10895,8 +10909,8 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10895
10909
|
inputRef: m
|
|
10896
10910
|
})]
|
|
10897
10911
|
});
|
|
10898
|
-
},
|
|
10899
|
-
let { value: S, invalid: C, invalidMessage: w, onChange: T, inputRef: E } =
|
|
10912
|
+
}, fi = ({ name: e, type: t, elementId: n, editing: r = !1, loading: i = !1, creating: a = !1, shared: o = !1, iconSize: s = d, validate: c, onSave: l, fileExtension: u, onCancel: f, onCreateFolderCancel: p, onCreateFolderSave: m, inputContainerClassName: h, sharedIndicatorClassName: g, sharedIndicatorTooltip: _, hideTooltip: v = !1, forbiddenSymbolsRegExp: y, forbiddenSymbolsTooltip: b, ...x }) => {
|
|
10913
|
+
let { value: S, invalid: C, invalidMessage: w, onChange: T, inputRef: E } = Oe({
|
|
10900
10914
|
value: e,
|
|
10901
10915
|
isEditing: r,
|
|
10902
10916
|
isCreating: a,
|
|
@@ -10908,11 +10922,11 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10908
10922
|
onCreateFolderSave: m
|
|
10909
10923
|
});
|
|
10910
10924
|
if (!r && !a) {
|
|
10911
|
-
let n =
|
|
10925
|
+
let n = er({
|
|
10912
10926
|
name: e,
|
|
10913
|
-
isFolder: t ===
|
|
10927
|
+
isFolder: t === M.Folder
|
|
10914
10928
|
}, y, b), r = !!n;
|
|
10915
|
-
return t ===
|
|
10929
|
+
return t === M.Folder ? /* @__PURE__ */ K(A, {
|
|
10916
10930
|
name: e,
|
|
10917
10931
|
loading: i,
|
|
10918
10932
|
shared: o,
|
|
@@ -10922,7 +10936,7 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10922
10936
|
hideTooltip: v,
|
|
10923
10937
|
isInvalidName: r,
|
|
10924
10938
|
tooltipContent: n
|
|
10925
|
-
}) : /* @__PURE__ */ K(
|
|
10939
|
+
}) : /* @__PURE__ */ K(O, {
|
|
10926
10940
|
className: "max-w-[428px]",
|
|
10927
10941
|
...x,
|
|
10928
10942
|
name: e,
|
|
@@ -10934,7 +10948,7 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10934
10948
|
tooltipContent: n
|
|
10935
10949
|
});
|
|
10936
10950
|
}
|
|
10937
|
-
return /* @__PURE__ */ K(
|
|
10951
|
+
return /* @__PURE__ */ K(di, {
|
|
10938
10952
|
type: t,
|
|
10939
10953
|
name: S,
|
|
10940
10954
|
elementId: n,
|
|
@@ -10948,8 +10962,8 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10948
10962
|
sharedIndicatorTooltip: _,
|
|
10949
10963
|
sharedIndicatorClassName: g
|
|
10950
10964
|
});
|
|
10951
|
-
},
|
|
10952
|
-
let { expandedPaths: E, togglePath: D } =
|
|
10965
|
+
}, pi = ({ items: e, showFiles: t = !1, expandedPaths: n, loadingPaths: r = /* @__PURE__ */ new Set(), loadedPaths: i = /* @__PURE__ */ new Set(), sharedByMePaths: a = /* @__PURE__ */ new Set(), selectedPath: o, emptyStateTitle: s = "No Folders", emptyStateDescription: c, emptyStateIcon: l, areHiddenFilesVisible: u = !1, renamedPath: d, createdFolderPath: f, rootItemLabel: p, rootItemPath: m, onItemClick: h, getContextMenuItems: g, onRenameSave: _, onRenameCancel: v, onRenameValidate: y, onExpandedPathsChange: b, onCreateFolderSave: x, onCreateFolderCancel: S, forbiddenSymbolsRegExp: C, forbiddenSymbolsTooltip: w, newFolderDefaultName: T }) => {
|
|
10966
|
+
let { expandedPaths: E, togglePath: D } = Or({
|
|
10953
10967
|
expandedPaths: n ?? /* @__PURE__ */ new Set(),
|
|
10954
10968
|
onExpandedPathsChange: b
|
|
10955
10969
|
}), O = (e) => {
|
|
@@ -10957,18 +10971,18 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10957
10971
|
}, k = (e, n, s) => {
|
|
10958
10972
|
let c = e;
|
|
10959
10973
|
return s && s.path === f && (c = [{
|
|
10960
|
-
folderId:
|
|
10961
|
-
id:
|
|
10974
|
+
folderId: li,
|
|
10975
|
+
id: li,
|
|
10962
10976
|
items: [],
|
|
10963
10977
|
name: T || "",
|
|
10964
10978
|
nodeType: $.FOLDER,
|
|
10965
10979
|
parentPath: f,
|
|
10966
|
-
path: `${f}/${
|
|
10980
|
+
path: `${f}/${li}`
|
|
10967
10981
|
}, ...e]), c.map((e) => {
|
|
10968
10982
|
let { path: s, nodeType: c, name: l, items: h } = e, b = c === $.FOLDER;
|
|
10969
|
-
if (!u &&
|
|
10983
|
+
if (!u && qn(e)) return null;
|
|
10970
10984
|
if (!b && !t) return;
|
|
10971
|
-
let T = Array.isArray(h) && h.length > 0 && h.some((e) => e.nodeType === $.FOLDER || t), D = E.has(s), A = o === s,
|
|
10985
|
+
let T = Array.isArray(h) && h.length > 0 && h.some((e) => e.nodeType === $.FOLDER || t), D = E.has(s), A = o === s, j = r.has(s), N = d === s || s === `${f}/${li}`, F = i.has(s), R = a.has(s), z = m && p && s === m && b, B = y && ((t) => y(t, e)), ee = A ? "bg-control-accent-alpha rounded" : "", H = z ? [] : g?.(e) ?? [], te = C ? er({
|
|
10972
10986
|
name: e.name,
|
|
10973
10987
|
isFolder: b
|
|
10974
10988
|
}, C, w) : void 0;
|
|
@@ -10977,58 +10991,58 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
10977
10991
|
children: /* @__PURE__ */ q("div", {
|
|
10978
10992
|
className: "flex flex-col w-full gap-1",
|
|
10979
10993
|
"aria-label": "folder",
|
|
10980
|
-
children: [/* @__PURE__ */ K(
|
|
10981
|
-
trigger: [
|
|
10994
|
+
children: [/* @__PURE__ */ K(P, {
|
|
10995
|
+
trigger: [I.ContextMenu],
|
|
10982
10996
|
className: "w-full h-[32px]",
|
|
10983
10997
|
anchorToMouse: !0,
|
|
10984
|
-
items:
|
|
10998
|
+
items: H,
|
|
10985
10999
|
children: /* @__PURE__ */ q("div", {
|
|
10986
|
-
style: { paddingLeft: `${n *
|
|
10987
|
-
className:
|
|
11000
|
+
style: { paddingLeft: `${n * ci}px` },
|
|
11001
|
+
className: De("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", ee),
|
|
10988
11002
|
"aria-selected": A,
|
|
10989
11003
|
children: [
|
|
10990
|
-
!
|
|
11004
|
+
!N && /* @__PURE__ */ K("div", {
|
|
10991
11005
|
className: "absolute size-full left-0 top-0 z-0",
|
|
10992
11006
|
onClick: () => O(e)
|
|
10993
11007
|
}),
|
|
10994
11008
|
/* @__PURE__ */ K("div", {
|
|
10995
11009
|
className: "relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",
|
|
10996
|
-
onClick: () => !
|
|
10997
|
-
children: /* @__PURE__ */ q(G, { children: [b && /* @__PURE__ */ K(
|
|
10998
|
-
...
|
|
10999
|
-
className: (0, $t.default)("flex-shrink-0", D && "rotate-90 transition-all",
|
|
11000
|
-
}), /* @__PURE__ */ K(
|
|
11010
|
+
onClick: () => !N && O(e),
|
|
11011
|
+
children: /* @__PURE__ */ q(G, { children: [b && /* @__PURE__ */ K(Fe, {
|
|
11012
|
+
...si,
|
|
11013
|
+
className: (0, $t.default)("flex-shrink-0", D && "rotate-90 transition-all", F && !T && "text-transparent")
|
|
11014
|
+
}), /* @__PURE__ */ K(fi, {
|
|
11001
11015
|
elementId: `${s}-tree-item`,
|
|
11002
11016
|
name: z ? p : l,
|
|
11003
|
-
type: b ?
|
|
11004
|
-
loading:
|
|
11017
|
+
type: b ? M.Folder : M.File,
|
|
11018
|
+
loading: j,
|
|
11005
11019
|
shared: R,
|
|
11006
|
-
sharedIndicatorClassName:
|
|
11007
|
-
iconSize:
|
|
11020
|
+
sharedIndicatorClassName: De("group-hover/item:bg-control-accent-alpha-hover", A && "bg-control-accent-alpha"),
|
|
11021
|
+
iconSize: Tn,
|
|
11008
11022
|
forbiddenSymbolsRegExp: C,
|
|
11009
|
-
forbiddenSymbolsTooltip:
|
|
11023
|
+
forbiddenSymbolsTooltip: te,
|
|
11010
11024
|
...!z && {
|
|
11011
|
-
editing:
|
|
11012
|
-
creating: s === `${f}/${
|
|
11025
|
+
editing: N,
|
|
11026
|
+
creating: s === `${f}/${li}`,
|
|
11013
11027
|
onSave: _,
|
|
11014
11028
|
onCancel: v,
|
|
11015
|
-
validate:
|
|
11029
|
+
validate: B,
|
|
11016
11030
|
onCreateFolderSave: x,
|
|
11017
11031
|
onCreateFolderCancel: S
|
|
11018
11032
|
}
|
|
11019
11033
|
})] })
|
|
11020
11034
|
}),
|
|
11021
|
-
|
|
11035
|
+
H.length > 0 && !N && !z && /* @__PURE__ */ K("div", {
|
|
11022
11036
|
className: "flex-1 flex justify-end",
|
|
11023
|
-
children: /* @__PURE__ */ K(
|
|
11037
|
+
children: /* @__PURE__ */ K(P, {
|
|
11024
11038
|
placement: "bottom-start",
|
|
11025
11039
|
allowedPlacements: ["top-start", "top-end"],
|
|
11026
|
-
items:
|
|
11040
|
+
items: H,
|
|
11027
11041
|
className: "sticky right-0",
|
|
11028
|
-
children: /* @__PURE__ */ K(
|
|
11029
|
-
size:
|
|
11042
|
+
children: /* @__PURE__ */ K(V, {
|
|
11043
|
+
size: L.Small,
|
|
11030
11044
|
className: "invisible group-hover/item:visible",
|
|
11031
|
-
icon: /* @__PURE__ */ K(
|
|
11045
|
+
icon: /* @__PURE__ */ K(Be, { ...Z })
|
|
11032
11046
|
})
|
|
11033
11047
|
})
|
|
11034
11048
|
})
|
|
@@ -11042,60 +11056,60 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
11042
11056
|
return /* @__PURE__ */ K("div", {
|
|
11043
11057
|
className: "flex-1 size-full overflow-y-auto",
|
|
11044
11058
|
"aria-label": "folders-tree",
|
|
11045
|
-
children: e.length > 0 ? k(e, 0) : /* @__PURE__ */ K(
|
|
11059
|
+
children: e.length > 0 ? k(e, 0) : /* @__PURE__ */ K(ie, {
|
|
11046
11060
|
title: s,
|
|
11047
11061
|
description: c,
|
|
11048
11062
|
icon: l
|
|
11049
11063
|
})
|
|
11050
11064
|
});
|
|
11051
|
-
},
|
|
11065
|
+
}, mi = ({ selectedFiles: e, actionLabels: t, onDuplicate: n, onCopy: r, onMove: i, onDownload: a, onUnshare: o, onRemoveAccess: s, onDelete: l, getCurrentFolderPath: u, sharedWithMeIds: d, sharedByMePaths: f, onClearSelection: p, forbiddenSymbolsRegExp: m }) => c(() => {
|
|
11052
11066
|
let c = [], h = Array.from(e.values());
|
|
11053
11067
|
if (!h.length || !t) return c;
|
|
11054
|
-
let g =
|
|
11055
|
-
if (t[
|
|
11068
|
+
let g = $n(m), _ = g ? h.some((e) => g.test(e.name)) : !1;
|
|
11069
|
+
if (t[Q.RemoveAccess] && s) {
|
|
11056
11070
|
let e = h.some((e) => !f?.has(e.path));
|
|
11057
11071
|
c.push({
|
|
11058
|
-
key:
|
|
11059
|
-
label: t[
|
|
11060
|
-
title: t[
|
|
11072
|
+
key: Q.RemoveAccess,
|
|
11073
|
+
label: t[Q.RemoveAccess],
|
|
11074
|
+
title: t[Q.RemoveAccess],
|
|
11061
11075
|
disabled: e,
|
|
11062
|
-
icon: /* @__PURE__ */ K($e, { ...
|
|
11076
|
+
icon: /* @__PURE__ */ K($e, { ...Z }),
|
|
11063
11077
|
onClick: () => {
|
|
11064
11078
|
s(h), p();
|
|
11065
11079
|
}
|
|
11066
11080
|
});
|
|
11067
11081
|
}
|
|
11068
|
-
if (t[
|
|
11069
|
-
key:
|
|
11070
|
-
label: t[
|
|
11071
|
-
title: t[
|
|
11082
|
+
if (t[Q.Move] && !_ && c.push({
|
|
11083
|
+
key: Q.Move,
|
|
11084
|
+
label: t[Q.Move],
|
|
11085
|
+
title: t[Q.Move],
|
|
11072
11086
|
icon: /* @__PURE__ */ K(an, {
|
|
11073
|
-
width:
|
|
11074
|
-
height:
|
|
11087
|
+
width: Z.size,
|
|
11088
|
+
height: Z.size
|
|
11075
11089
|
}),
|
|
11076
11090
|
onClick: () => i(h)
|
|
11077
|
-
}), t[
|
|
11078
|
-
key:
|
|
11079
|
-
label: t[
|
|
11080
|
-
title: t[
|
|
11091
|
+
}), t[Q.Copy] && !_ && c.push({
|
|
11092
|
+
key: Q.Copy,
|
|
11093
|
+
label: t[Q.Copy],
|
|
11094
|
+
title: t[Q.Copy],
|
|
11081
11095
|
icon: /* @__PURE__ */ K(rn, {
|
|
11082
|
-
width:
|
|
11083
|
-
height:
|
|
11096
|
+
width: Z.size,
|
|
11097
|
+
height: Z.size
|
|
11084
11098
|
}),
|
|
11085
11099
|
onClick: () => r(h)
|
|
11086
|
-
}), t[
|
|
11087
|
-
key:
|
|
11088
|
-
label: t[
|
|
11089
|
-
title: t[
|
|
11090
|
-
icon: /* @__PURE__ */ K(
|
|
11100
|
+
}), t[Q.Duplicate] && !_ && c.push({
|
|
11101
|
+
key: Q.Duplicate,
|
|
11102
|
+
label: t[Q.Duplicate],
|
|
11103
|
+
title: t[Q.Duplicate],
|
|
11104
|
+
icon: /* @__PURE__ */ K(Re, { ...Z }),
|
|
11091
11105
|
onClick: () => n(h)
|
|
11092
|
-
}), t[
|
|
11093
|
-
let e = h.some((e) => e.permissions && !e.permissions.includes(
|
|
11106
|
+
}), t[Q.Delete]) {
|
|
11107
|
+
let e = h.some((e) => e.permissions && !e.permissions.includes(In.WRITE));
|
|
11094
11108
|
c.push({
|
|
11095
|
-
key:
|
|
11096
|
-
label: t[
|
|
11097
|
-
title: t[
|
|
11098
|
-
icon: /* @__PURE__ */ K(
|
|
11109
|
+
key: Q.Delete,
|
|
11110
|
+
label: t[Q.Delete],
|
|
11111
|
+
title: t[Q.Delete],
|
|
11112
|
+
icon: /* @__PURE__ */ K(J, { ...Z }),
|
|
11099
11113
|
disabled: e,
|
|
11100
11114
|
tooltip: e ? "Selected items contain item which can not be deleted" : void 0,
|
|
11101
11115
|
onClick: () => {
|
|
@@ -11103,23 +11117,23 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
11103
11117
|
}
|
|
11104
11118
|
});
|
|
11105
11119
|
}
|
|
11106
|
-
if (t[
|
|
11107
|
-
key:
|
|
11108
|
-
label: t[
|
|
11109
|
-
title: t[
|
|
11110
|
-
icon: /* @__PURE__ */ K(
|
|
11120
|
+
if (t[Q.Download] && !_ && c.push({
|
|
11121
|
+
key: Q.Download,
|
|
11122
|
+
label: t[Q.Download],
|
|
11123
|
+
title: t[Q.Download],
|
|
11124
|
+
icon: /* @__PURE__ */ K(Ve, { ...Z }),
|
|
11111
11125
|
onClick: () => a(h)
|
|
11112
|
-
}), t[
|
|
11126
|
+
}), t[Q.Unshare] && o) {
|
|
11113
11127
|
let e = h.some((e) => !d?.includes(e.path));
|
|
11114
11128
|
c.push({
|
|
11115
|
-
key:
|
|
11116
|
-
label: t[
|
|
11117
|
-
title: t[
|
|
11129
|
+
key: Q.Unshare,
|
|
11130
|
+
label: t[Q.Unshare],
|
|
11131
|
+
title: t[Q.Unshare],
|
|
11118
11132
|
disabled: e,
|
|
11119
11133
|
tooltip: e ? "Selected items contain item which can not be unshared" : void 0,
|
|
11120
11134
|
icon: /* @__PURE__ */ K(on, {
|
|
11121
|
-
width:
|
|
11122
|
-
height:
|
|
11135
|
+
width: Z.size,
|
|
11136
|
+
height: Z.size
|
|
11123
11137
|
}),
|
|
11124
11138
|
onClick: () => {
|
|
11125
11139
|
o(h), p();
|
|
@@ -11142,16 +11156,16 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
11142
11156
|
p,
|
|
11143
11157
|
f,
|
|
11144
11158
|
m
|
|
11145
|
-
]),
|
|
11159
|
+
]), hi = ({ id: e, name: t, nodeType: n, size: r, updatedAt: i, dateLocale: a, dateOptions: o, shared: s, sharedIndicatorClassName: c, hideTooltip: l = !1, forbiddenSymbolsRegExp: u, forbiddenSymbolsTooltip: d }) => /* @__PURE__ */ K("div", {
|
|
11146
11160
|
className: "flex",
|
|
11147
11161
|
children: /* @__PURE__ */ K("div", {
|
|
11148
11162
|
className: "flex flex-1 min-w-0",
|
|
11149
|
-
children: /* @__PURE__ */ K(
|
|
11150
|
-
type: n === $.FOLDER ?
|
|
11163
|
+
children: /* @__PURE__ */ K(fi, {
|
|
11164
|
+
type: n === $.FOLDER ? M.Folder : M.File,
|
|
11151
11165
|
name: t,
|
|
11152
11166
|
elementId: e,
|
|
11153
11167
|
shared: s,
|
|
11154
|
-
iconSize:
|
|
11168
|
+
iconSize: Tn,
|
|
11155
11169
|
sharedIndicatorClassName: c,
|
|
11156
11170
|
hideTooltip: l,
|
|
11157
11171
|
forbiddenSymbolsRegExp: u,
|
|
@@ -11159,12 +11173,12 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
11159
11173
|
details: /* @__PURE__ */ q("div", {
|
|
11160
11174
|
className: "flex items-center gap-1 dial-tiny-text text-secondary",
|
|
11161
11175
|
children: [
|
|
11162
|
-
/* @__PURE__ */ K("span", { children: n === $.ITEM ?
|
|
11163
|
-
i && r && /* @__PURE__ */ K(
|
|
11176
|
+
/* @__PURE__ */ K("span", { children: n === $.ITEM ? Jn(r) : "" }),
|
|
11177
|
+
i && r && /* @__PURE__ */ K(Le, {
|
|
11164
11178
|
size: 2,
|
|
11165
11179
|
className: "text-secondary"
|
|
11166
11180
|
}),
|
|
11167
|
-
i ? /* @__PURE__ */ K("span", { children: /* @__PURE__ */ K(
|
|
11181
|
+
i ? /* @__PURE__ */ K("span", { children: /* @__PURE__ */ K(T, {
|
|
11168
11182
|
value: i,
|
|
11169
11183
|
locale: a?.toString(),
|
|
11170
11184
|
options: o,
|
|
@@ -11175,48 +11189,48 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
11175
11189
|
})
|
|
11176
11190
|
})
|
|
11177
11191
|
})
|
|
11178
|
-
}),
|
|
11179
|
-
colId:
|
|
11192
|
+
}), gi = (e) => (t, n, r) => ({
|
|
11193
|
+
colId: hn.Name,
|
|
11180
11194
|
field: "name",
|
|
11181
11195
|
headerName: e,
|
|
11182
11196
|
flex: 1,
|
|
11183
11197
|
minWidth: 200,
|
|
11184
11198
|
cellRenderer: (e) => {
|
|
11185
|
-
let i = e.data.nodeType, { saveFolderCreation: a, validateFolderName: o, cancelFolderCreation: s, newFolderTempId: c, sharedByMePaths: l, selectedPaths: u, disabledRowIds: d, filesLoading: f } = e.context, p = l?.has(e.data.path), m = u?.has(e.data.path), h = d?.has(e.data.path) ?? !1, g =
|
|
11186
|
-
if (e.data?.isTemporary && e.data.id === c) return /* @__PURE__ */ K(
|
|
11199
|
+
let i = e.data.nodeType, { saveFolderCreation: a, validateFolderName: o, cancelFolderCreation: s, newFolderTempId: c, sharedByMePaths: l, selectedPaths: u, disabledRowIds: d, filesLoading: f } = e.context, p = l?.has(e.data.path), m = u?.has(e.data.path), h = d?.has(e.data.path) ?? !1, g = De(["group-hover/grid-row:bg-control-accent-alpha-hover", m && "bg-control-accent-alpha"]);
|
|
11200
|
+
if (e.data?.isTemporary && e.data.id === c) return /* @__PURE__ */ K(fi, {
|
|
11187
11201
|
name: e.data.name,
|
|
11188
|
-
type:
|
|
11202
|
+
type: M.Folder,
|
|
11189
11203
|
elementId: `new-folder-${e.data.id}`,
|
|
11190
11204
|
editing: !0,
|
|
11191
11205
|
creating: !0,
|
|
11192
11206
|
loading: f,
|
|
11193
11207
|
shared: p,
|
|
11194
11208
|
sharedIndicatorClassName: g,
|
|
11195
|
-
iconSize:
|
|
11209
|
+
iconSize: Tn,
|
|
11196
11210
|
validate: o,
|
|
11197
11211
|
onSave: a,
|
|
11198
11212
|
onCancel: s,
|
|
11199
11213
|
onCreateFolderSave: a,
|
|
11200
11214
|
onCreateFolderCancel: s,
|
|
11201
|
-
inputContainerClassName:
|
|
11215
|
+
inputContainerClassName: De(["!h-9", r && i === $.ITEM && "!h-10"])
|
|
11202
11216
|
});
|
|
11203
11217
|
let { renameTriggerView: _, renamedPath: v, renamedItem: y, getDisplayName: b, onRenameValidate: x, onRenameSave: S, onRenameCancel: C } = e.context;
|
|
11204
|
-
if (_ ===
|
|
11218
|
+
if (_ === fn.Grid && v === e.data?.path && y && e.data) return /* @__PURE__ */ K(fi, {
|
|
11205
11219
|
name: b(y),
|
|
11206
|
-
type: i === $.FOLDER ?
|
|
11220
|
+
type: i === $.FOLDER ? M.Folder : M.File,
|
|
11207
11221
|
fileExtension: y.name.split(".").pop(),
|
|
11208
11222
|
elementId: `rename-${e.data.id}`,
|
|
11209
11223
|
editing: !0,
|
|
11210
11224
|
shared: p,
|
|
11211
11225
|
sharedIndicatorClassName: g,
|
|
11212
|
-
iconSize:
|
|
11226
|
+
iconSize: Tn,
|
|
11213
11227
|
validate: (e) => x(e, y),
|
|
11214
11228
|
onSave: S,
|
|
11215
11229
|
onCancel: C,
|
|
11216
|
-
inputContainerClassName:
|
|
11230
|
+
inputContainerClassName: De(["!h-9", r && i === $.ITEM && "!h-10"]),
|
|
11217
11231
|
forbiddenSymbolsRegExp: e.context.forbiddenSymbolsRegExp
|
|
11218
11232
|
});
|
|
11219
|
-
if (r) return /* @__PURE__ */ K(
|
|
11233
|
+
if (r) return /* @__PURE__ */ K(hi, {
|
|
11220
11234
|
id: e.data.id,
|
|
11221
11235
|
name: e.data.name,
|
|
11222
11236
|
nodeType: i,
|
|
@@ -11230,37 +11244,37 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
11230
11244
|
forbiddenSymbolsRegExp: e.context.forbiddenSymbolsRegExp,
|
|
11231
11245
|
forbiddenSymbolsTooltip: e.context.forbiddenSymbolsTooltip
|
|
11232
11246
|
});
|
|
11233
|
-
let w =
|
|
11247
|
+
let w = er({
|
|
11234
11248
|
name: e.data.name,
|
|
11235
11249
|
isFolder: i === $.FOLDER
|
|
11236
11250
|
}, e.context.forbiddenSymbolsRegExp, e.context.forbiddenSymbolsTooltip);
|
|
11237
|
-
return i === $.FOLDER ? /* @__PURE__ */ K(
|
|
11251
|
+
return i === $.FOLDER ? /* @__PURE__ */ K(A, {
|
|
11238
11252
|
name: e.data.name,
|
|
11239
11253
|
shared: p,
|
|
11240
11254
|
sharedIndicatorClassName: g,
|
|
11241
|
-
iconSize:
|
|
11255
|
+
iconSize: Tn,
|
|
11242
11256
|
hideTooltip: h,
|
|
11243
11257
|
isInvalidName: !!w,
|
|
11244
11258
|
tooltipContent: w
|
|
11245
|
-
}) : /* @__PURE__ */ K(
|
|
11259
|
+
}) : /* @__PURE__ */ K(O, {
|
|
11246
11260
|
name: e.data.name,
|
|
11247
11261
|
shared: p,
|
|
11248
11262
|
sharedIndicatorClassName: g,
|
|
11249
|
-
iconSize:
|
|
11263
|
+
iconSize: Tn,
|
|
11250
11264
|
hideTooltip: h,
|
|
11251
11265
|
isInvalidName: !!w,
|
|
11252
11266
|
tooltipContent: w
|
|
11253
11267
|
});
|
|
11254
11268
|
}
|
|
11255
|
-
}),
|
|
11256
|
-
colId:
|
|
11269
|
+
}), _i = (e) => (t, n) => ({
|
|
11270
|
+
colId: hn.UpdatedAt,
|
|
11257
11271
|
field: "updatedAt",
|
|
11258
11272
|
headerName: e,
|
|
11259
11273
|
width: 168,
|
|
11260
11274
|
suppressSizeToFit: !0,
|
|
11261
11275
|
cellRenderer: (e) => {
|
|
11262
11276
|
let t = e.context?.disabledRowIds?.has(e.data?.path) ?? !1;
|
|
11263
|
-
return /* @__PURE__ */ K(
|
|
11277
|
+
return /* @__PURE__ */ K(T, {
|
|
11264
11278
|
...e,
|
|
11265
11279
|
hideTooltip: t
|
|
11266
11280
|
});
|
|
@@ -11270,18 +11284,18 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
11270
11284
|
options: n
|
|
11271
11285
|
},
|
|
11272
11286
|
filterValueGetter: (e) => {
|
|
11273
|
-
let r = e.data[e.colDef.field || ""], i =
|
|
11274
|
-
return i ? new Intl.DateTimeFormat(t ||
|
|
11287
|
+
let r = e.data[e.colDef.field || ""], i = Te(r);
|
|
11288
|
+
return i ? new Intl.DateTimeFormat(t || S, n || x).format(i) : "";
|
|
11275
11289
|
}
|
|
11276
|
-
}),
|
|
11277
|
-
colId:
|
|
11290
|
+
}), vi = (e) => ({
|
|
11291
|
+
colId: hn.Size,
|
|
11278
11292
|
field: "size",
|
|
11279
11293
|
headerName: e,
|
|
11280
11294
|
width: 120,
|
|
11281
11295
|
suppressSizeToFit: !0,
|
|
11282
|
-
cellRenderer: (e) => e.data.nodeType === $.ITEM ?
|
|
11283
|
-
filterValueGetter: (e) => e.data.nodeType === $.ITEM ?
|
|
11284
|
-
}),
|
|
11296
|
+
cellRenderer: (e) => e.data.nodeType === $.ITEM ? Jn(e.data.contentLength) : "",
|
|
11297
|
+
filterValueGetter: (e) => e.data.nodeType === $.ITEM ? Jn(e.data.contentLength) : ""
|
|
11298
|
+
}), yi = (e) => {
|
|
11285
11299
|
let t = e.event;
|
|
11286
11300
|
if (!(t?.target ?? null)?.closest("input") || !t) return !1;
|
|
11287
11301
|
switch (t.key) {
|
|
@@ -11294,30 +11308,30 @@ var Ur = 12, Wr = 8, Gr = ({ getSelectionLabel: e, onClearSelection: t, actions:
|
|
|
11294
11308
|
default: return !1;
|
|
11295
11309
|
}
|
|
11296
11310
|
};
|
|
11297
|
-
function
|
|
11311
|
+
function bi({ userColumnDefs: e, filterable: t, dateLocale: n, dateOptions: r, effectiveVisibleColumns: i, isCompactView: a, hasActions: o, actionsColumnDef: s, rootItemLabel: l, rootItemPath: u }) {
|
|
11298
11312
|
let d = c(() => [
|
|
11299
|
-
|
|
11313
|
+
gi("Name")(n, r, a),
|
|
11300
11314
|
{
|
|
11301
|
-
colId:
|
|
11315
|
+
colId: hn.Path,
|
|
11302
11316
|
field: "path",
|
|
11303
11317
|
headerName: "Path",
|
|
11304
11318
|
flex: 1,
|
|
11305
11319
|
minWidth: 200,
|
|
11306
11320
|
cellRenderer: (e) => {
|
|
11307
11321
|
let t = e.context?.disabledRowIds?.has(e.data.path) ?? !1, n = e.data.path;
|
|
11308
|
-
return e.context?.hideSearchPathItemName && (n = e.data.parentPath ? e.data.parentPath : n.replace(/\/[^/]+\/?$/, "") || "/"), !u || !l ? /* @__PURE__ */ K(
|
|
11322
|
+
return e.context?.hideSearchPathItemName && (n = e.data.parentPath ? e.data.parentPath : n.replace(/\/[^/]+\/?$/, "") || "/"), !u || !l ? /* @__PURE__ */ K(R, {
|
|
11309
11323
|
text: n,
|
|
11310
11324
|
hideTooltip: t
|
|
11311
|
-
}) : /* @__PURE__ */ K(
|
|
11325
|
+
}) : /* @__PURE__ */ K(R, {
|
|
11312
11326
|
text: n.replace(u, l),
|
|
11313
11327
|
hideTooltip: t
|
|
11314
11328
|
});
|
|
11315
11329
|
}
|
|
11316
11330
|
},
|
|
11317
|
-
|
|
11318
|
-
|
|
11331
|
+
_i("Modified Date")(n, r),
|
|
11332
|
+
vi("Size"),
|
|
11319
11333
|
{
|
|
11320
|
-
colId:
|
|
11334
|
+
colId: hn.Author,
|
|
11321
11335
|
field: "author",
|
|
11322
11336
|
headerName: "Author",
|
|
11323
11337
|
width: 200,
|
|
@@ -11325,7 +11339,7 @@ function yi({ userColumnDefs: e, filterable: t, dateLocale: n, dateOptions: r, e
|
|
|
11325
11339
|
cellRenderer: (e) => e.data.author
|
|
11326
11340
|
},
|
|
11327
11341
|
{
|
|
11328
|
-
colId:
|
|
11342
|
+
colId: hn.Owner,
|
|
11329
11343
|
field: "owner",
|
|
11330
11344
|
headerName: "Owner",
|
|
11331
11345
|
width: 200,
|
|
@@ -11342,14 +11356,14 @@ function yi({ userColumnDefs: e, filterable: t, dateLocale: n, dateOptions: r, e
|
|
|
11342
11356
|
return { columnDefs: c(() => {
|
|
11343
11357
|
let c = e?.map((e) => typeof e == "function" ? e(n, r, a) : e), l = c ?? d;
|
|
11344
11358
|
c || (l = l.filter((e) => e.colId && i.includes(e.colId))), o && (a && (l = l.slice(0, 1)), l.push(s));
|
|
11345
|
-
let u = (e) => e.colId ===
|
|
11359
|
+
let u = (e) => e.colId === hn.Name;
|
|
11346
11360
|
return l.map((e) => {
|
|
11347
11361
|
let n = {
|
|
11348
11362
|
...e,
|
|
11349
11363
|
filter: t ? e.filter : !1,
|
|
11350
11364
|
floatingFilter: t ? e.floatingFilter : !1
|
|
11351
11365
|
};
|
|
11352
|
-
return u(e) && !e.suppressKeyboardEvent && (n.suppressKeyboardEvent =
|
|
11366
|
+
return u(e) && !e.suppressKeyboardEvent && (n.suppressKeyboardEvent = yi), n;
|
|
11353
11367
|
});
|
|
11354
11368
|
}, [
|
|
11355
11369
|
s,
|
|
@@ -11363,139 +11377,139 @@ function yi({ userColumnDefs: e, filterable: t, dateLocale: n, dateOptions: r, e
|
|
|
11363
11377
|
e
|
|
11364
11378
|
]) };
|
|
11365
11379
|
}
|
|
11366
|
-
var
|
|
11367
|
-
let e = r(
|
|
11380
|
+
var xi = () => {
|
|
11381
|
+
let e = r(yr);
|
|
11368
11382
|
if (!e) throw Error("useFileManagerContext must be used within <FileManagerProvider>");
|
|
11369
11383
|
return e;
|
|
11370
|
-
},
|
|
11384
|
+
}, Si = ({ actionLabels: e, onDuplicate: t, onCopy: n, onMove: r, onDownload: i, onRename: a, onDelete: o, onInfo: s, onUnshare: l, onRemoveAccess: u, sharedWithMeIds: d, sharedByMePaths: f, onManagePermissions: p, onPreview: m, onOpenInNewTab: h, previewExtensions: g, isRenameFileAvailable: _ = !0, isDuplicateFolderAvailable: v = !0, forbiddenSymbolsRegExp: y, onGridCreateSiblingFolder: b, onGridCreateChildFolder: x }) => c(() => (c) => {
|
|
11371
11385
|
let S = [];
|
|
11372
11386
|
if (!e) return S;
|
|
11373
|
-
let C =
|
|
11374
|
-
e[
|
|
11387
|
+
let C = $n(y)?.test(c.name);
|
|
11388
|
+
e[Q.AddSibling] && c.nodeType === $.FOLDER && S.push({
|
|
11375
11389
|
key: "addSibling",
|
|
11376
|
-
label: e[
|
|
11390
|
+
label: e[Q.AddSibling],
|
|
11377
11391
|
icon: /* @__PURE__ */ K(nn, {
|
|
11378
|
-
width:
|
|
11379
|
-
height:
|
|
11392
|
+
width: Z.size,
|
|
11393
|
+
height: Z.size,
|
|
11380
11394
|
className: "text-secondary"
|
|
11381
11395
|
}),
|
|
11382
11396
|
onClick: () => b([c])
|
|
11383
|
-
}), e[
|
|
11397
|
+
}), e[Q.AddChild] && c.nodeType === $.FOLDER && !C && S.push({
|
|
11384
11398
|
key: "addChild",
|
|
11385
|
-
label: e[
|
|
11399
|
+
label: e[Q.AddChild],
|
|
11386
11400
|
icon: /* @__PURE__ */ K(tn, {
|
|
11387
|
-
width:
|
|
11388
|
-
height:
|
|
11401
|
+
width: Z.size,
|
|
11402
|
+
height: Z.size,
|
|
11389
11403
|
className: "text-secondary"
|
|
11390
11404
|
}),
|
|
11391
11405
|
onClick: () => x([c])
|
|
11392
11406
|
}, {
|
|
11393
11407
|
key: "divider",
|
|
11394
|
-
type:
|
|
11395
|
-
}), e[
|
|
11396
|
-
key:
|
|
11397
|
-
label: e[
|
|
11398
|
-
icon: /* @__PURE__ */ K(
|
|
11399
|
-
...
|
|
11408
|
+
type: F.Divider
|
|
11409
|
+
}), e[Q.OpenInNewTab] && typeof h == "function" && c.nodeType === $.ITEM && !C && S.push({
|
|
11410
|
+
key: Q.OpenInNewTab,
|
|
11411
|
+
label: e[Q.OpenInNewTab],
|
|
11412
|
+
icon: /* @__PURE__ */ K(He, {
|
|
11413
|
+
...Z,
|
|
11400
11414
|
className: "text-secondary"
|
|
11401
11415
|
}),
|
|
11402
11416
|
onClick: () => h?.(c)
|
|
11403
11417
|
});
|
|
11404
11418
|
let w = c.nodeType === $.ITEM || c.nodeType === $.FOLDER && v;
|
|
11405
|
-
e[
|
|
11406
|
-
key:
|
|
11407
|
-
label: e[
|
|
11408
|
-
icon: /* @__PURE__ */ K(
|
|
11409
|
-
...
|
|
11419
|
+
e[Q.Duplicate] && w && !C && S.push({
|
|
11420
|
+
key: Q.Duplicate,
|
|
11421
|
+
label: e[Q.Duplicate],
|
|
11422
|
+
icon: /* @__PURE__ */ K(Re, {
|
|
11423
|
+
...Z,
|
|
11410
11424
|
className: "text-secondary"
|
|
11411
11425
|
}),
|
|
11412
11426
|
onClick: () => t(c)
|
|
11413
|
-
}), e[
|
|
11414
|
-
key:
|
|
11415
|
-
label: e[
|
|
11427
|
+
}), e[Q.Copy] && !C && S.push({
|
|
11428
|
+
key: Q.Copy,
|
|
11429
|
+
label: e[Q.Copy],
|
|
11416
11430
|
icon: /* @__PURE__ */ K(rn, {
|
|
11417
|
-
width:
|
|
11418
|
-
height:
|
|
11431
|
+
width: Z.size,
|
|
11432
|
+
height: Z.size,
|
|
11419
11433
|
className: "text-secondary"
|
|
11420
11434
|
}),
|
|
11421
11435
|
onClick: () => n(c)
|
|
11422
|
-
}), e[
|
|
11423
|
-
key:
|
|
11424
|
-
label: e[
|
|
11436
|
+
}), e[Q.Move] && !C && S.push({
|
|
11437
|
+
key: Q.Move,
|
|
11438
|
+
label: e[Q.Move],
|
|
11425
11439
|
icon: /* @__PURE__ */ K(an, {
|
|
11426
|
-
width:
|
|
11427
|
-
height:
|
|
11440
|
+
width: Z.size,
|
|
11441
|
+
height: Z.size,
|
|
11428
11442
|
className: "text-secondary"
|
|
11429
11443
|
}),
|
|
11430
11444
|
onClick: () => r(c)
|
|
11431
|
-
}), e[
|
|
11432
|
-
key:
|
|
11433
|
-
label: e[
|
|
11434
|
-
icon: /* @__PURE__ */ K(
|
|
11435
|
-
...
|
|
11445
|
+
}), e[Q.Download] && !C && S.push({
|
|
11446
|
+
key: Q.Download,
|
|
11447
|
+
label: e[Q.Download],
|
|
11448
|
+
icon: /* @__PURE__ */ K(Ve, {
|
|
11449
|
+
...Z,
|
|
11436
11450
|
className: "text-secondary"
|
|
11437
11451
|
}),
|
|
11438
11452
|
onClick: () => i(c)
|
|
11439
|
-
}), e[
|
|
11440
|
-
key:
|
|
11441
|
-
label: e[
|
|
11442
|
-
icon: /* @__PURE__ */ K(
|
|
11443
|
-
...
|
|
11453
|
+
}), e[Q.ManagePermissions] && typeof p == "function" && c.nodeType === $.FOLDER && !C && S.push({
|
|
11454
|
+
key: Q.ManagePermissions,
|
|
11455
|
+
label: e[Q.ManagePermissions],
|
|
11456
|
+
icon: /* @__PURE__ */ K(He, {
|
|
11457
|
+
...Z,
|
|
11444
11458
|
className: "text-secondary"
|
|
11445
11459
|
}),
|
|
11446
11460
|
onClick: () => p?.(c.path)
|
|
11447
11461
|
});
|
|
11448
11462
|
let T = c.name.split("."), E = T.length > 1 ? T[T.length - 1] : "", D = E && g?.includes(`.${E}`);
|
|
11449
|
-
e[
|
|
11450
|
-
key:
|
|
11451
|
-
label: e[
|
|
11452
|
-
icon: /* @__PURE__ */ K(
|
|
11453
|
-
...
|
|
11463
|
+
e[Q.Preview] && typeof m == "function" && c.nodeType === $.ITEM && D && !C && S.push({
|
|
11464
|
+
key: Q.Preview,
|
|
11465
|
+
label: e[Q.Preview],
|
|
11466
|
+
icon: /* @__PURE__ */ K(Ue, {
|
|
11467
|
+
...Z,
|
|
11454
11468
|
className: "text-secondary"
|
|
11455
11469
|
}),
|
|
11456
11470
|
onClick: () => m?.(c.path)
|
|
11457
11471
|
});
|
|
11458
|
-
let O = !c.permissions || c.permissions.includes(
|
|
11459
|
-
e[
|
|
11460
|
-
key:
|
|
11461
|
-
label: e[
|
|
11462
|
-
icon: /* @__PURE__ */ K(
|
|
11463
|
-
...
|
|
11472
|
+
let O = !c.permissions || c.permissions.includes(In.WRITE);
|
|
11473
|
+
e[Q.Delete] && O && S.push({
|
|
11474
|
+
key: Q.Delete,
|
|
11475
|
+
label: e[Q.Delete],
|
|
11476
|
+
icon: /* @__PURE__ */ K(J, {
|
|
11477
|
+
...Z,
|
|
11464
11478
|
className: "text-secondary"
|
|
11465
11479
|
}),
|
|
11466
11480
|
onClick: () => o(c, c.parentPath ?? "")
|
|
11467
11481
|
});
|
|
11468
11482
|
let k = c.nodeType === $.FOLDER || c.nodeType === $.ITEM && _;
|
|
11469
|
-
return e[
|
|
11470
|
-
key:
|
|
11471
|
-
label: e[
|
|
11472
|
-
icon: /* @__PURE__ */ K(
|
|
11473
|
-
...
|
|
11483
|
+
return e[Q.Rename] && k && O && S.push({
|
|
11484
|
+
key: Q.Rename,
|
|
11485
|
+
label: e[Q.Rename],
|
|
11486
|
+
icon: /* @__PURE__ */ K(Ze, {
|
|
11487
|
+
...Z,
|
|
11474
11488
|
className: "text-secondary"
|
|
11475
11489
|
}),
|
|
11476
11490
|
onClick: () => a(c.path)
|
|
11477
|
-
}), e[
|
|
11478
|
-
key:
|
|
11479
|
-
label: e[
|
|
11480
|
-
icon: /* @__PURE__ */ K(
|
|
11481
|
-
...
|
|
11491
|
+
}), e[Q.Info] && c.nodeType === $.ITEM && !C && S.push({
|
|
11492
|
+
key: Q.Info,
|
|
11493
|
+
label: e[Q.Info],
|
|
11494
|
+
icon: /* @__PURE__ */ K(Xe, {
|
|
11495
|
+
...Z,
|
|
11482
11496
|
className: "text-secondary"
|
|
11483
11497
|
}),
|
|
11484
11498
|
onClick: () => s(c)
|
|
11485
|
-
}), e[
|
|
11486
|
-
key:
|
|
11487
|
-
label: e[
|
|
11499
|
+
}), e[Q.Unshare] && d?.includes(c.path) && S.push({
|
|
11500
|
+
key: Q.Unshare,
|
|
11501
|
+
label: e[Q.Unshare],
|
|
11488
11502
|
icon: /* @__PURE__ */ K(on, {
|
|
11489
|
-
width:
|
|
11490
|
-
height:
|
|
11503
|
+
width: Z.size,
|
|
11504
|
+
height: Z.size,
|
|
11491
11505
|
className: "text-secondary"
|
|
11492
11506
|
}),
|
|
11493
11507
|
onClick: () => l(c)
|
|
11494
|
-
}), e[
|
|
11495
|
-
key:
|
|
11496
|
-
label: e[
|
|
11508
|
+
}), e[Q.RemoveAccess] && f?.has(c.path) && u && S.push({
|
|
11509
|
+
key: Q.RemoveAccess,
|
|
11510
|
+
label: e[Q.RemoveAccess],
|
|
11497
11511
|
icon: /* @__PURE__ */ K($e, {
|
|
11498
|
-
...
|
|
11512
|
+
...Z,
|
|
11499
11513
|
className: "text-secondary"
|
|
11500
11514
|
}),
|
|
11501
11515
|
onClick: () => u(c)
|
|
@@ -11522,41 +11536,41 @@ var bi = () => {
|
|
|
11522
11536
|
y,
|
|
11523
11537
|
x,
|
|
11524
11538
|
b
|
|
11525
|
-
]),
|
|
11526
|
-
let [a, o] = u(
|
|
11539
|
+
]), Ci = ({ onGridAddSibling: e, onGridAddChild: t, onTreeAddSibling: r, onTreeAddChild: i }) => {
|
|
11540
|
+
let [a, o] = u(pn.Grid);
|
|
11527
11541
|
return {
|
|
11528
11542
|
createFolderTriggerView: a,
|
|
11529
11543
|
onGridCreateSiblingFolder: n((t) => {
|
|
11530
|
-
e?.(t), o(
|
|
11544
|
+
e?.(t), o(pn.Grid);
|
|
11531
11545
|
}, [e]),
|
|
11532
11546
|
onTreeCreateSiblingFolder: n((e) => {
|
|
11533
|
-
r?.(e), o(
|
|
11547
|
+
r?.(e), o(pn.Tree);
|
|
11534
11548
|
}, [r]),
|
|
11535
11549
|
onGridCreateChildFolder: n((e) => {
|
|
11536
|
-
t?.(e), o(
|
|
11550
|
+
t?.(e), o(pn.Grid);
|
|
11537
11551
|
}, [t]),
|
|
11538
11552
|
onTreeCreateChildFolder: n((e) => {
|
|
11539
|
-
i?.(e), o(
|
|
11553
|
+
i?.(e), o(pn.Tree);
|
|
11540
11554
|
}, [i])
|
|
11541
11555
|
};
|
|
11542
|
-
},
|
|
11556
|
+
}, wi = (e) => /* @__PURE__ */ K(Rr, {
|
|
11543
11557
|
...e,
|
|
11544
|
-
children: /* @__PURE__ */ K(
|
|
11545
|
-
}),
|
|
11546
|
-
let { managerLabel: e, className: t, items: r, rootItem: i, filesLoading: a, treeOptions: s, showNavigationPanel: d, navigationPanelOptions: f, gridOptions: p, toolbarOptions: m, bulkActionsToolbarOptions: h, deleteConfirmationOptions:
|
|
11558
|
+
children: /* @__PURE__ */ K(Ti, {})
|
|
11559
|
+
}), Ti = () => {
|
|
11560
|
+
let { managerLabel: e, className: t, items: r, rootItem: i, filesLoading: a, treeOptions: s, showNavigationPanel: d, navigationPanelOptions: f, gridOptions: p, toolbarOptions: m, bulkActionsToolbarOptions: h, deleteConfirmationOptions: g, destinationFolderPopupOptions: y, conflictResolutionPopupOptions: b, compactViewWidthBreakpoint: x = Nn, customBreakpointRef: S, sharedByMePaths: C, allowedFileTypes: w, maxSelectableFileSize: T, areHiddenFilesVisible: E, toggleHiddenFilesVisibility: D, isTreeCollapsed: O, toggleTreeCollapse: k, currentPath: A, gridRows: j, selectedPaths: M, selectedFiles: N, clearSelection: P, setSelectedPaths: I, effectiveSearchValue: L, handleBreadcrumbItemClick: R, handleSearchChange: z, handleTreeItemClick: ee, handleTableRowClick: V, handleSelectionClick: te, onGridApiChange: ne, handleOpenDestinationFolderPopup: re, handleCloseDestinationFolderPopup: ae, openDestinationFolderPopup: oe, destinationFolderMode: se, handleSetCopiedFiles: U, handleSetMovedFiles: ce, handleDuplicate: le, handleCopyTo: ue, handleMoveTo: de, handleGridAddSibling: fe, handleGridAddChild: pe, handleTreeAddSibling: me, handleTreeAddChild: he, handleDownloadFiles: ge, openDeleteConfirmation: _e, closeDeleteConfirmation: ve, confirmDelete: ye, deleteConfirmationOpen: be, itemsToDelete: xe, renamedPath: Se, renamedItem: Ce, onRename: we, onRenameSave: Te, onRenameCancel: Ee, onRenameValidate: Oe, createdFolderPath: ke, forbiddenSymbolsRegExp: Ae, forbiddenSymbolsTooltip: je, getDisplayName: W, isDragging: G, isDraggingOverWindow: Me, handleDragEnter: Ne, handleDragLeave: Pe, handleDragOver: Fe, handleDrop: Ie, onUploadFiles: Le, onValidateUpload: ze, maxFileSize: Be, newActions: Ue, isNewButtonVisible: We, isNewButtonDisabled: Ge, newFolderTempId: qe, cancelFolderCreation: Je, saveFolderCreation: Ye, validateFolderName: Xe, startFolderCreation: Qe, conflictingFiles: et, conflictResolutionOpen: tt, handleConflictReplace: nt, handleConflictDuplicate: rt, handleConflictCancel: it, handleConflictDecideForEach: at, uploadConflictingFiles: ot, uploadConflictResolutionOpen: st, handleUploadConflictReplace: ct, handleUploadConflictDuplicate: lt, handleUploadConflictCancel: ut, handleUploadConflictDecideForEach: dt, openMetadataPopup: ft, fileMetadataPopupOptions: pt, isMetadataPopupOpen: mt, selectedFileForMetadata: ht, closeMetadataPopup: gt, onUnshareFiles: _t, onRemoveFilesAccess: vt, actionsRef: yt, searchInProgress: bt, isSearchMode: xt, emptyStateIcon: St, emptyStateTitle: Ct = "You don't have any files", emptyStateDescription: wt = "Upload or drag and drop files", sharedWithMeIds: Y, onFolderPopupPathChange: Tt, onManagePermissions: X, onPreview: Et, onOpenInNewTab: Dt, previewExtensions: Ot, isRenameFileAvailable: kt, isDuplicateFolderAvailable: At, getDisabledTooltip: jt, fileTooLargeTooltip: Mt, unsupportedFileTypeTooltip: Nt, gridClassName: Pt, nonClickableTableColumns: Ft, hideSearchPathItemName: It, showHiddenFileSwitcherInDestinationPopup: Lt, showCreateFolderButtonInDestinationPopup: Rt, newFolderDefaultName: zt } = xi(), { width: Bt = Cn, header: Vt = wn, containerClassName: Ht = bn, additionalButtons: Ut, ...Wt } = s ?? {}, [Gt, Kt] = u(Bt), { renameTriggerView: qt, onGridRename: Jt, onTreeRename: Yt } = zn({ onRename: we }), { createFolderTriggerView: Xt, onGridCreateSiblingFolder: Zt, onTreeCreateSiblingFolder: Qt, onGridCreateChildFolder: en, onTreeCreateChildFolder: sn } = Ci({
|
|
11547
11561
|
onGridAddSibling: fe,
|
|
11548
11562
|
onGridAddChild: pe,
|
|
11549
11563
|
onTreeAddSibling: me,
|
|
11550
11564
|
onTreeAddChild: he
|
|
11551
|
-
}),
|
|
11552
|
-
|
|
11553
|
-
|
|
11565
|
+
}), cn = l(null), ln = (e) => {
|
|
11566
|
+
cn.current === null && (cn.current = requestAnimationFrame(() => {
|
|
11567
|
+
Kt(e), cn.current = null;
|
|
11554
11568
|
}));
|
|
11555
|
-
}, { columnDefs:
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
] :
|
|
11569
|
+
}, { columnDefs: un, filterable: mn = !0, dateLocale: Tn, dateOptions: En, selectionMode: Dn, wrapCustomCellRenderers: On, visibleColumns: Fn = Pn, allowDisabledContextMenu: Hn = !1, ...Un } = p ?? {}, { containerRef: Wn, isBelowBreakpoint: Gn } = Bn(x, S), Kn = c(() => xt ? [
|
|
11570
|
+
hn.Name,
|
|
11571
|
+
hn.Path,
|
|
11572
|
+
hn.Actions
|
|
11573
|
+
] : Fn, [xt, Fn]), qn = n((e, t, n) => rr(e, t, n, Nt, Mt), [Mt, Nt]), Jn = n((e, t, n) => !!jt?.(e) || !!qn(e, t, n), [qn, jt]), Yn = c(() => {
|
|
11560
11574
|
let e = /* @__PURE__ */ new Set();
|
|
11561
11575
|
for (let t of j) Jn(t, w, T) && e.add(t.path);
|
|
11562
11576
|
return e;
|
|
@@ -11567,300 +11581,300 @@ var bi = () => {
|
|
|
11567
11581
|
Jn
|
|
11568
11582
|
]), Xn = n((e) => {
|
|
11569
11583
|
let t = [], n = [], r = !e.parentPath, i = Ae?.test(e.name);
|
|
11570
|
-
return s?.actionLabels && (s.actionLabels[
|
|
11584
|
+
return s?.actionLabels && (s.actionLabels[Q.AddSibling] && e.nodeType === $.FOLDER && !r && t.push({
|
|
11571
11585
|
key: "addSibling",
|
|
11572
|
-
label: s.actionLabels[
|
|
11586
|
+
label: s.actionLabels[Q.AddSibling],
|
|
11573
11587
|
icon: /* @__PURE__ */ K(nn, {
|
|
11574
|
-
width:
|
|
11575
|
-
height:
|
|
11588
|
+
width: Z.size,
|
|
11589
|
+
height: Z.size,
|
|
11576
11590
|
className: "text-secondary"
|
|
11577
11591
|
}),
|
|
11578
|
-
onClick: () =>
|
|
11579
|
-
}), s.actionLabels[
|
|
11592
|
+
onClick: () => Qt([e])
|
|
11593
|
+
}), s.actionLabels[Q.AddChild] && e.nodeType === $.FOLDER && !i && t.push({
|
|
11580
11594
|
key: "addChild",
|
|
11581
|
-
label: s.actionLabels[
|
|
11595
|
+
label: s.actionLabels[Q.AddChild],
|
|
11582
11596
|
icon: /* @__PURE__ */ K(tn, {
|
|
11583
|
-
width:
|
|
11584
|
-
height:
|
|
11597
|
+
width: Z.size,
|
|
11598
|
+
height: Z.size,
|
|
11585
11599
|
className: "text-secondary"
|
|
11586
11600
|
}),
|
|
11587
|
-
onClick: () =>
|
|
11588
|
-
}), s.actionLabels[
|
|
11601
|
+
onClick: () => sn([e])
|
|
11602
|
+
}), s.actionLabels[Q.Duplicate] && !r && !i && n.push({
|
|
11589
11603
|
key: "duplicate",
|
|
11590
|
-
label: s.actionLabels[
|
|
11591
|
-
icon: /* @__PURE__ */ K(
|
|
11592
|
-
...
|
|
11604
|
+
label: s.actionLabels[Q.Duplicate],
|
|
11605
|
+
icon: /* @__PURE__ */ K(Re, {
|
|
11606
|
+
...Z,
|
|
11593
11607
|
className: "text-secondary"
|
|
11594
11608
|
}),
|
|
11595
11609
|
onClick: () => le([e])
|
|
11596
|
-
}), s.actionLabels[
|
|
11597
|
-
key:
|
|
11598
|
-
label: s.actionLabels[
|
|
11610
|
+
}), s.actionLabels[Q.Copy] && !r && !i && n.push({
|
|
11611
|
+
key: dn.Copy,
|
|
11612
|
+
label: s.actionLabels[Q.Copy],
|
|
11599
11613
|
icon: /* @__PURE__ */ K(rn, {
|
|
11600
|
-
width:
|
|
11601
|
-
height:
|
|
11614
|
+
width: Z.size,
|
|
11615
|
+
height: Z.size,
|
|
11602
11616
|
className: "text-secondary"
|
|
11603
11617
|
}),
|
|
11604
11618
|
onClick: () => {
|
|
11605
|
-
U([e]),
|
|
11619
|
+
U([e]), re(dn.Copy);
|
|
11606
11620
|
}
|
|
11607
|
-
}), s.actionLabels[
|
|
11608
|
-
key:
|
|
11609
|
-
label: s.actionLabels[
|
|
11621
|
+
}), s.actionLabels[Q.Move] && !r && !i && n.push({
|
|
11622
|
+
key: dn.Move,
|
|
11623
|
+
label: s.actionLabels[Q.Move],
|
|
11610
11624
|
icon: /* @__PURE__ */ K(an, {
|
|
11611
|
-
width:
|
|
11612
|
-
height:
|
|
11625
|
+
width: Z.size,
|
|
11626
|
+
height: Z.size,
|
|
11613
11627
|
className: "text-secondary"
|
|
11614
11628
|
}),
|
|
11615
11629
|
onClick: () => {
|
|
11616
|
-
ce([e]),
|
|
11630
|
+
ce([e]), re(dn.Move);
|
|
11617
11631
|
}
|
|
11618
|
-
}), s.actionLabels[
|
|
11632
|
+
}), s.actionLabels[Q.Download] && !r && !i && n.push({
|
|
11619
11633
|
key: "download",
|
|
11620
|
-
label: s.actionLabels[
|
|
11621
|
-
icon: /* @__PURE__ */ K(
|
|
11622
|
-
...
|
|
11634
|
+
label: s.actionLabels[Q.Download],
|
|
11635
|
+
icon: /* @__PURE__ */ K(Ve, {
|
|
11636
|
+
...Z,
|
|
11623
11637
|
className: "text-secondary"
|
|
11624
11638
|
}),
|
|
11625
11639
|
onClick: () => ge([e])
|
|
11626
|
-
}), s.actionLabels[
|
|
11627
|
-
key:
|
|
11628
|
-
label: s.actionLabels[
|
|
11629
|
-
icon: /* @__PURE__ */ K(
|
|
11630
|
-
...
|
|
11640
|
+
}), s.actionLabels[Q.ManagePermissions] && typeof X == "function" && e.nodeType === $.FOLDER && !r && n.push({
|
|
11641
|
+
key: Q.ManagePermissions,
|
|
11642
|
+
label: s.actionLabels[Q.ManagePermissions],
|
|
11643
|
+
icon: /* @__PURE__ */ K(He, {
|
|
11644
|
+
...Z,
|
|
11631
11645
|
className: "text-secondary"
|
|
11632
11646
|
}),
|
|
11633
|
-
onClick: () =>
|
|
11634
|
-
}), s.actionLabels[
|
|
11647
|
+
onClick: () => X?.(e.path)
|
|
11648
|
+
}), s.actionLabels[Q.Delete] && e.permissions?.includes(In.WRITE) && !r && n.push({
|
|
11635
11649
|
key: "delete",
|
|
11636
|
-
label: s.actionLabels[
|
|
11637
|
-
icon: /* @__PURE__ */ K(
|
|
11638
|
-
...
|
|
11650
|
+
label: s.actionLabels[Q.Delete],
|
|
11651
|
+
icon: /* @__PURE__ */ K(J, {
|
|
11652
|
+
...Z,
|
|
11639
11653
|
className: "text-secondary"
|
|
11640
11654
|
}),
|
|
11641
11655
|
onClick: () => _e([e], e.parentPath ?? "")
|
|
11642
|
-
}), s.actionLabels[
|
|
11656
|
+
}), s.actionLabels[Q.Rename] && !r && n.push({
|
|
11643
11657
|
key: "rename",
|
|
11644
|
-
label: s.actionLabels[
|
|
11645
|
-
icon: /* @__PURE__ */ K(
|
|
11646
|
-
...
|
|
11658
|
+
label: s.actionLabels[Q.Rename],
|
|
11659
|
+
icon: /* @__PURE__ */ K(Ze, {
|
|
11660
|
+
...Z,
|
|
11647
11661
|
className: "text-secondary"
|
|
11648
11662
|
}),
|
|
11649
|
-
onClick: () =>
|
|
11650
|
-
}), s.actionLabels[
|
|
11663
|
+
onClick: () => Yt(e.path)
|
|
11664
|
+
}), s.actionLabels[Q.Unshare] && Y?.includes(e.path) && !r && n.push({
|
|
11651
11665
|
key: "unshare",
|
|
11652
|
-
label: s.actionLabels[
|
|
11666
|
+
label: s.actionLabels[Q.Unshare],
|
|
11653
11667
|
icon: /* @__PURE__ */ K(on, {
|
|
11654
|
-
width:
|
|
11655
|
-
height:
|
|
11668
|
+
width: Z.size,
|
|
11669
|
+
height: Z.size,
|
|
11656
11670
|
className: "text-secondary"
|
|
11657
11671
|
}),
|
|
11658
|
-
onClick: () =>
|
|
11659
|
-
}), s.actionLabels[
|
|
11660
|
-
key:
|
|
11661
|
-
label: s.actionLabels[
|
|
11672
|
+
onClick: () => _t?.([e])
|
|
11673
|
+
}), s.actionLabels[Q.RemoveAccess] && C?.has(e.path) && !r && n.push({
|
|
11674
|
+
key: Q.RemoveAccess,
|
|
11675
|
+
label: s.actionLabels[Q.RemoveAccess],
|
|
11662
11676
|
icon: /* @__PURE__ */ K($e, {
|
|
11663
|
-
...
|
|
11677
|
+
...Z,
|
|
11664
11678
|
className: "text-secondary"
|
|
11665
11679
|
}),
|
|
11666
|
-
onClick: () =>
|
|
11680
|
+
onClick: () => vt?.([e])
|
|
11667
11681
|
})), t.length ? n.length === 0 ? t : t.length === 0 ? n : [
|
|
11668
11682
|
...t,
|
|
11669
11683
|
{
|
|
11670
11684
|
key: "divider",
|
|
11671
|
-
type:
|
|
11685
|
+
type: F.Divider
|
|
11672
11686
|
},
|
|
11673
11687
|
...n
|
|
11674
11688
|
] : n;
|
|
11675
11689
|
}, [
|
|
11676
11690
|
s?.actionLabels,
|
|
11677
11691
|
Ae,
|
|
11678
|
-
|
|
11692
|
+
X,
|
|
11679
11693
|
le,
|
|
11680
11694
|
U,
|
|
11681
|
-
|
|
11695
|
+
re,
|
|
11682
11696
|
ce,
|
|
11683
11697
|
ge,
|
|
11684
|
-
|
|
11698
|
+
Yt,
|
|
11699
|
+
_t,
|
|
11685
11700
|
vt,
|
|
11686
|
-
|
|
11687
|
-
J,
|
|
11701
|
+
Y,
|
|
11688
11702
|
C,
|
|
11689
11703
|
_e,
|
|
11690
|
-
|
|
11691
|
-
|
|
11704
|
+
sn,
|
|
11705
|
+
Qt
|
|
11692
11706
|
]), Zn = c(() => {
|
|
11693
11707
|
let e = /* @__PURE__ */ new Set();
|
|
11694
11708
|
return N.forEach((t, n) => e.add(n)), e;
|
|
11695
11709
|
}, [N]), Qn = n((e, t) => {
|
|
11696
|
-
I(e),
|
|
11697
|
-
}, [
|
|
11710
|
+
I(e), te?.(t);
|
|
11711
|
+
}, [te, I]), $n = mi({
|
|
11698
11712
|
selectedFiles: N,
|
|
11699
11713
|
actionLabels: h?.actionLabels,
|
|
11700
11714
|
onDuplicate: le,
|
|
11701
11715
|
onCopy: (e) => {
|
|
11702
|
-
U(e),
|
|
11716
|
+
U(e), re(dn.Copy);
|
|
11703
11717
|
},
|
|
11704
11718
|
onMove: (e) => {
|
|
11705
|
-
ce(e),
|
|
11719
|
+
ce(e), re(dn.Move);
|
|
11706
11720
|
},
|
|
11707
11721
|
onDownload: ge,
|
|
11708
11722
|
onDelete: _e,
|
|
11709
|
-
onUnshare:
|
|
11710
|
-
onRemoveAccess:
|
|
11723
|
+
onUnshare: _t,
|
|
11724
|
+
onRemoveAccess: vt,
|
|
11711
11725
|
getCurrentFolderPath: () => A ?? "/",
|
|
11712
|
-
sharedWithMeIds:
|
|
11726
|
+
sharedWithMeIds: Y,
|
|
11713
11727
|
sharedByMePaths: C,
|
|
11714
|
-
onClearSelection:
|
|
11728
|
+
onClearSelection: P,
|
|
11715
11729
|
forbiddenSymbolsRegExp: Ae
|
|
11716
11730
|
}), er = n((e) => {
|
|
11717
11731
|
m?.onTabChange?.(e), Je();
|
|
11718
11732
|
}, [m, Je]), tr = n(() => m && M.size === 0 ? /* @__PURE__ */ q("div", {
|
|
11719
|
-
className:
|
|
11733
|
+
className: _n,
|
|
11720
11734
|
role: "toolbar",
|
|
11721
11735
|
"aria-label": "File Manager Toolbar",
|
|
11722
|
-
children: [e, /* @__PURE__ */ K(
|
|
11736
|
+
children: [e, /* @__PURE__ */ K($r, {
|
|
11723
11737
|
...m,
|
|
11724
11738
|
onTabChange: er,
|
|
11725
11739
|
areHiddenFilesVisible: E,
|
|
11726
11740
|
onToggleHiddenFiles: D,
|
|
11727
11741
|
isNewButtonVisible: We,
|
|
11728
|
-
isNewButtonDisabled:
|
|
11742
|
+
isNewButtonDisabled: Ge,
|
|
11729
11743
|
newButtonDropdownItems: Ue
|
|
11730
11744
|
})]
|
|
11731
11745
|
}) : M.size > 0 && h ? /* @__PURE__ */ K("div", {
|
|
11732
|
-
className:
|
|
11746
|
+
className: _n,
|
|
11733
11747
|
role: "toolbar",
|
|
11734
11748
|
"aria-label": "File Manager Toolbar",
|
|
11735
|
-
children: /* @__PURE__ */ K(
|
|
11749
|
+
children: /* @__PURE__ */ K(Kr, {
|
|
11736
11750
|
...h,
|
|
11737
11751
|
selectedCount: M.size,
|
|
11738
|
-
onClearSelection:
|
|
11752
|
+
onClearSelection: P,
|
|
11739
11753
|
actions: $n
|
|
11740
11754
|
})
|
|
11741
11755
|
}) : null, [
|
|
11742
11756
|
er,
|
|
11743
11757
|
h,
|
|
11744
11758
|
M,
|
|
11745
|
-
|
|
11759
|
+
P,
|
|
11746
11760
|
$n,
|
|
11747
11761
|
E,
|
|
11748
11762
|
D,
|
|
11749
11763
|
m,
|
|
11750
11764
|
We,
|
|
11751
|
-
|
|
11765
|
+
Ge,
|
|
11752
11766
|
Ue,
|
|
11753
11767
|
e
|
|
11754
11768
|
]);
|
|
11755
|
-
o(
|
|
11756
|
-
let
|
|
11769
|
+
o(yt, () => ({ createFolder: Qe }), [Qe]);
|
|
11770
|
+
let nr = n(() => Gn ? null : /* @__PURE__ */ K("div", {
|
|
11757
11771
|
className: "min-h-0 min-w-0 h-full flex-none",
|
|
11758
|
-
children: /* @__PURE__ */ K(
|
|
11759
|
-
defaultWidth:
|
|
11760
|
-
width:
|
|
11761
|
-
onResizeStop:
|
|
11772
|
+
children: /* @__PURE__ */ K(v, {
|
|
11773
|
+
defaultWidth: Gt,
|
|
11774
|
+
width: Gt,
|
|
11775
|
+
onResizeStop: Kt,
|
|
11762
11776
|
onResize: ln,
|
|
11763
|
-
minWidth:
|
|
11764
|
-
maxWidth:
|
|
11777
|
+
minWidth: kn,
|
|
11778
|
+
maxWidth: An,
|
|
11765
11779
|
enabled: !O,
|
|
11766
|
-
children: /* @__PURE__ */ K(
|
|
11767
|
-
width:
|
|
11768
|
-
title:
|
|
11780
|
+
children: /* @__PURE__ */ K(_, {
|
|
11781
|
+
width: Gt,
|
|
11782
|
+
title: Vt,
|
|
11769
11783
|
ariaLabel: "File Manager Tree Navigation",
|
|
11770
|
-
className:
|
|
11784
|
+
className: Ht,
|
|
11771
11785
|
titleClassName: "dial-body-text text-primary",
|
|
11772
|
-
additionalButtons:
|
|
11786
|
+
additionalButtons: Ut,
|
|
11773
11787
|
isOpened: !O,
|
|
11774
11788
|
onToggle: k,
|
|
11775
|
-
children: /* @__PURE__ */ K(
|
|
11776
|
-
...
|
|
11789
|
+
children: /* @__PURE__ */ K(pi, {
|
|
11790
|
+
...Wt,
|
|
11777
11791
|
items: r,
|
|
11778
11792
|
rootItemPath: i?.path,
|
|
11779
11793
|
rootItemLabel: i?.label,
|
|
11780
11794
|
selectedPath: A,
|
|
11781
11795
|
sharedByMePaths: C,
|
|
11782
11796
|
forbiddenSymbolsRegExp: Ae,
|
|
11783
|
-
forbiddenSymbolsTooltip:
|
|
11784
|
-
onItemClick:
|
|
11797
|
+
forbiddenSymbolsTooltip: je,
|
|
11798
|
+
onItemClick: ee,
|
|
11785
11799
|
areHiddenFilesVisible: E,
|
|
11786
11800
|
getContextMenuItems: Xn,
|
|
11787
|
-
renamedPath:
|
|
11801
|
+
renamedPath: qt === fn.Tree ? Se : void 0,
|
|
11788
11802
|
onRenameSave: Te,
|
|
11789
|
-
onRenameCancel:
|
|
11803
|
+
onRenameCancel: Ee,
|
|
11790
11804
|
onRenameValidate: Oe,
|
|
11791
|
-
createdFolderPath:
|
|
11805
|
+
createdFolderPath: Xt === pn.Tree ? ke : null,
|
|
11792
11806
|
onCreateFolderCancel: Je,
|
|
11793
11807
|
onCreateFolderSave: Ye,
|
|
11794
|
-
newFolderDefaultName:
|
|
11808
|
+
newFolderDefaultName: zt
|
|
11795
11809
|
})
|
|
11796
11810
|
})
|
|
11797
11811
|
})
|
|
11798
11812
|
}), [
|
|
11799
11813
|
Gn,
|
|
11800
|
-
|
|
11814
|
+
Gt,
|
|
11801
11815
|
O,
|
|
11816
|
+
Vt,
|
|
11802
11817
|
Ht,
|
|
11803
11818
|
Ut,
|
|
11804
|
-
Wt,
|
|
11805
11819
|
k,
|
|
11806
|
-
|
|
11820
|
+
Wt,
|
|
11807
11821
|
r,
|
|
11808
11822
|
i?.path,
|
|
11809
11823
|
i?.label,
|
|
11810
11824
|
A,
|
|
11811
11825
|
C,
|
|
11812
11826
|
Ae,
|
|
11813
|
-
|
|
11814
|
-
|
|
11827
|
+
je,
|
|
11828
|
+
ee,
|
|
11815
11829
|
E,
|
|
11816
11830
|
Xn,
|
|
11817
|
-
|
|
11818
|
-
|
|
11831
|
+
qt,
|
|
11832
|
+
Xt,
|
|
11819
11833
|
Se,
|
|
11820
11834
|
Te,
|
|
11821
|
-
|
|
11835
|
+
Ee,
|
|
11822
11836
|
Oe,
|
|
11823
11837
|
ke,
|
|
11824
11838
|
Je,
|
|
11825
11839
|
Ye,
|
|
11826
|
-
|
|
11827
|
-
]),
|
|
11840
|
+
zt
|
|
11841
|
+
]), ir = Si({
|
|
11828
11842
|
actionLabels: p?.actionLabels,
|
|
11829
11843
|
onDuplicate: (e) => le([e]),
|
|
11830
11844
|
onCopy: (e) => {
|
|
11831
|
-
U([e]),
|
|
11845
|
+
U([e]), re(dn.Copy);
|
|
11832
11846
|
},
|
|
11833
11847
|
onMove: (e) => {
|
|
11834
|
-
ce([e]),
|
|
11848
|
+
ce([e]), re(dn.Move);
|
|
11835
11849
|
},
|
|
11836
11850
|
onDownload: (e) => ge([e]),
|
|
11837
|
-
onRename:
|
|
11851
|
+
onRename: Jt,
|
|
11838
11852
|
onDelete: (e, t) => _e([e], t),
|
|
11839
|
-
onInfo: (e) =>
|
|
11840
|
-
onUnshare: (e) =>
|
|
11841
|
-
onRemoveAccess: (e) =>
|
|
11842
|
-
sharedWithMeIds:
|
|
11853
|
+
onInfo: (e) => ft(e),
|
|
11854
|
+
onUnshare: (e) => _t?.([e]),
|
|
11855
|
+
onRemoveAccess: (e) => vt?.([e]),
|
|
11856
|
+
sharedWithMeIds: Y,
|
|
11843
11857
|
sharedByMePaths: C,
|
|
11844
|
-
onManagePermissions: (e) =>
|
|
11845
|
-
onPreview: (e) =>
|
|
11846
|
-
onOpenInNewTab: (e) =>
|
|
11847
|
-
previewExtensions:
|
|
11848
|
-
isRenameFileAvailable:
|
|
11849
|
-
isDuplicateFolderAvailable:
|
|
11858
|
+
onManagePermissions: (e) => X?.(e),
|
|
11859
|
+
onPreview: (e) => Et?.(e),
|
|
11860
|
+
onOpenInNewTab: (e) => Dt?.(e),
|
|
11861
|
+
previewExtensions: Ot,
|
|
11862
|
+
isRenameFileAvailable: kt,
|
|
11863
|
+
isDuplicateFolderAvailable: At,
|
|
11850
11864
|
forbiddenSymbolsRegExp: Ae,
|
|
11851
|
-
onGridCreateSiblingFolder:
|
|
11852
|
-
onGridCreateChildFolder:
|
|
11865
|
+
onGridCreateSiblingFolder: Zt,
|
|
11866
|
+
onGridCreateChildFolder: en
|
|
11853
11867
|
}), or = n((e) => {
|
|
11854
|
-
let t =
|
|
11855
|
-
return t ?
|
|
11856
|
-
}, [r,
|
|
11868
|
+
let t = Vn(r, e.path);
|
|
11869
|
+
return t ? ir(t) : [];
|
|
11870
|
+
}, [r, ir]), { actionsColumnDef: sr } = Rn({
|
|
11857
11871
|
getContextMenuItems: or,
|
|
11858
11872
|
isRowDisabled: n((e, t, n) => Hn ? !1 : Jn(e, t, n), [Hn, Jn]),
|
|
11859
11873
|
allowedFileTypes: w,
|
|
11860
|
-
buttonClassName: Gn ? "" :
|
|
11861
|
-
}), { columnDefs: cr } =
|
|
11862
|
-
userColumnDefs:
|
|
11863
|
-
filterable:
|
|
11874
|
+
buttonClassName: Gn ? "" : Sn
|
|
11875
|
+
}), { columnDefs: cr } = bi({
|
|
11876
|
+
userColumnDefs: un,
|
|
11877
|
+
filterable: mn,
|
|
11864
11878
|
dateLocale: Tn,
|
|
11865
11879
|
dateOptions: En,
|
|
11866
11880
|
effectiveVisibleColumns: Kn,
|
|
@@ -11870,46 +11884,46 @@ var bi = () => {
|
|
|
11870
11884
|
rootItemLabel: i?.label,
|
|
11871
11885
|
rootItemPath: i?.path
|
|
11872
11886
|
}), lr = n((e) => {
|
|
11873
|
-
e.colDef.colId ===
|
|
11887
|
+
e.colDef.colId === B || e.colDef.colId === jn || e.colDef.colId === hn.Actions || Se && e.data?.path === Se || e.data?.isTemporary || Ft && Ft.includes(e.colDef.colId) || e.data && V(e.data);
|
|
11874
11888
|
}, [
|
|
11875
11889
|
Se,
|
|
11876
11890
|
V,
|
|
11877
|
-
|
|
11878
|
-
]), ur = n(() => /* @__PURE__ */ K(
|
|
11879
|
-
title:
|
|
11880
|
-
description:
|
|
11891
|
+
Ft
|
|
11892
|
+
]), ur = n(() => /* @__PURE__ */ K(ie, {
|
|
11893
|
+
title: Ct,
|
|
11894
|
+
description: wt,
|
|
11881
11895
|
descriptionClassName: "text-sm",
|
|
11882
11896
|
className: "gap-3 size-full bg-layer-sunken border rounded border-primary",
|
|
11883
11897
|
titleClassName: "mt-2 !text-lg",
|
|
11884
|
-
icon:
|
|
11898
|
+
icon: St || /* @__PURE__ */ K(Ke, {
|
|
11885
11899
|
size: 100,
|
|
11886
11900
|
stroke: .5,
|
|
11887
11901
|
className: "text-secondary"
|
|
11888
11902
|
})
|
|
11889
11903
|
}), [
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
]), dr = c(() => (e) => e.path, []), fr = c(() => (0, $t.default)("min-h-[248px] overflow-auto md:min-h-[266px]",
|
|
11904
|
+
wt,
|
|
11905
|
+
St,
|
|
11906
|
+
Ct
|
|
11907
|
+
]), dr = c(() => (e) => e.path, []), fr = c(() => (0, $t.default)("min-h-[248px] overflow-auto md:min-h-[266px]", G ? "border border-dashed border-info" : "", Me && !G ? "border border-dashed border-primary" : ""), [G, Me]), pr = c(() => ({
|
|
11894
11908
|
...Un.additionalGridOptions,
|
|
11895
11909
|
onCellClicked: lr,
|
|
11896
|
-
headerHeight:
|
|
11897
|
-
rowHeight:
|
|
11910
|
+
headerHeight: Mn,
|
|
11911
|
+
rowHeight: Mn,
|
|
11898
11912
|
rowClass: "group/grid-row",
|
|
11899
11913
|
defaultColDef: {
|
|
11900
|
-
comparator:
|
|
11914
|
+
comparator: ar,
|
|
11901
11915
|
...Un.additionalGridOptions?.defaultColDef,
|
|
11902
11916
|
floatingFilter: f?.searchable ? !1 : Un.additionalGridOptions?.defaultColDef?.floatingFilter
|
|
11903
11917
|
},
|
|
11904
11918
|
context: {
|
|
11905
11919
|
cancelFolderCreation: Je,
|
|
11906
11920
|
saveFolderCreation: Ye,
|
|
11907
|
-
getDisplayName:
|
|
11908
|
-
onRenameCancel:
|
|
11921
|
+
getDisplayName: W,
|
|
11922
|
+
onRenameCancel: Ee,
|
|
11909
11923
|
onRenameSave: Te,
|
|
11910
11924
|
onRenameValidate: Oe,
|
|
11911
|
-
renameTriggerView:
|
|
11912
|
-
validateFolderName:
|
|
11925
|
+
renameTriggerView: qt,
|
|
11926
|
+
validateFolderName: Xe,
|
|
11913
11927
|
renamedItem: Ce,
|
|
11914
11928
|
renamedPath: Se,
|
|
11915
11929
|
createdFolderPath: ke,
|
|
@@ -11918,9 +11932,9 @@ var bi = () => {
|
|
|
11918
11932
|
selectedPaths: M,
|
|
11919
11933
|
disabledRowIds: Yn,
|
|
11920
11934
|
forbiddenSymbolsRegExp: Ae,
|
|
11921
|
-
forbiddenSymbolsTooltip:
|
|
11922
|
-
hideSearchPathItemName:
|
|
11923
|
-
newFolderDefaultName:
|
|
11935
|
+
forbiddenSymbolsTooltip: je,
|
|
11936
|
+
hideSearchPathItemName: It,
|
|
11937
|
+
newFolderDefaultName: zt,
|
|
11924
11938
|
filesLoading: a
|
|
11925
11939
|
}
|
|
11926
11940
|
}), [
|
|
@@ -11929,12 +11943,12 @@ var bi = () => {
|
|
|
11929
11943
|
f?.searchable,
|
|
11930
11944
|
Je,
|
|
11931
11945
|
Ye,
|
|
11932
|
-
|
|
11933
|
-
|
|
11946
|
+
W,
|
|
11947
|
+
Ee,
|
|
11934
11948
|
Te,
|
|
11935
11949
|
Oe,
|
|
11936
|
-
|
|
11937
|
-
|
|
11950
|
+
qt,
|
|
11951
|
+
Xe,
|
|
11938
11952
|
Ce,
|
|
11939
11953
|
Se,
|
|
11940
11954
|
ke,
|
|
@@ -11943,47 +11957,47 @@ var bi = () => {
|
|
|
11943
11957
|
M,
|
|
11944
11958
|
Yn,
|
|
11945
11959
|
Ae,
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11960
|
+
je,
|
|
11961
|
+
It,
|
|
11962
|
+
zt,
|
|
11949
11963
|
a
|
|
11950
|
-
]), mr = c(() => j.length === 0 && !
|
|
11964
|
+
]), mr = c(() => j.length === 0 && !xt && !a ? ur() : /* @__PURE__ */ K(H, {
|
|
11951
11965
|
columnDefs: cr,
|
|
11952
11966
|
rowData: j,
|
|
11953
11967
|
getRowId: dr,
|
|
11954
|
-
loading: a ||
|
|
11968
|
+
loading: a || bt,
|
|
11955
11969
|
getContextMenuItems: or,
|
|
11956
11970
|
withoutHeaderBorders: Gn,
|
|
11957
11971
|
onGridApiChange: ne,
|
|
11958
11972
|
className: fr,
|
|
11959
11973
|
...Un,
|
|
11960
11974
|
selectionMode: Dn,
|
|
11961
|
-
wrapCustomCellRenderers:
|
|
11975
|
+
wrapCustomCellRenderers: On,
|
|
11962
11976
|
additionalGridOptions: pr,
|
|
11963
11977
|
selectedRowIds: Zn,
|
|
11964
11978
|
onSelectionChange: Qn,
|
|
11965
|
-
wrapperBorder: !
|
|
11979
|
+
wrapperBorder: !G && !Me,
|
|
11966
11980
|
disabledRowIds: Yn,
|
|
11967
11981
|
allowDisabledContextMenu: Hn
|
|
11968
11982
|
}), [
|
|
11969
11983
|
j,
|
|
11970
|
-
|
|
11984
|
+
xt,
|
|
11971
11985
|
a,
|
|
11972
11986
|
ur,
|
|
11973
11987
|
cr,
|
|
11974
11988
|
dr,
|
|
11975
|
-
|
|
11989
|
+
bt,
|
|
11976
11990
|
or,
|
|
11977
11991
|
Gn,
|
|
11978
11992
|
ne,
|
|
11979
11993
|
fr,
|
|
11980
11994
|
Un,
|
|
11981
11995
|
Dn,
|
|
11982
|
-
|
|
11996
|
+
On,
|
|
11983
11997
|
pr,
|
|
11984
11998
|
Zn,
|
|
11985
11999
|
Qn,
|
|
11986
|
-
|
|
12000
|
+
G,
|
|
11987
12001
|
Me,
|
|
11988
12002
|
Yn,
|
|
11989
12003
|
Hn
|
|
@@ -11992,7 +12006,7 @@ var bi = () => {
|
|
|
11992
12006
|
ref: Wn,
|
|
11993
12007
|
className: "size-full",
|
|
11994
12008
|
children: /* @__PURE__ */ q("div", {
|
|
11995
|
-
className:
|
|
12009
|
+
className: De(gn, {
|
|
11996
12010
|
"gap-3 pt-4": h && M.size > 0,
|
|
11997
12011
|
"gap-4 p-3 pt-4": Gn,
|
|
11998
12012
|
"gap-2 pt-2": Gn && h && M.size > 0
|
|
@@ -12000,10 +12014,10 @@ var bi = () => {
|
|
|
12000
12014
|
children: [
|
|
12001
12015
|
tr(),
|
|
12002
12016
|
/* @__PURE__ */ q("div", {
|
|
12003
|
-
className:
|
|
12004
|
-
children: [
|
|
12005
|
-
className:
|
|
12006
|
-
children: [d && /* @__PURE__ */ K(
|
|
12017
|
+
className: De(vn, Pt),
|
|
12018
|
+
children: [nr(), /* @__PURE__ */ q("div", {
|
|
12019
|
+
className: De(yn, { "gap-3": Gn }),
|
|
12020
|
+
children: [d && /* @__PURE__ */ K(Qr, {
|
|
12007
12021
|
...f ?? {},
|
|
12008
12022
|
makeHref: (e) => e.join("/"),
|
|
12009
12023
|
path: A,
|
|
@@ -12011,21 +12025,21 @@ var bi = () => {
|
|
|
12011
12025
|
rootItemPath: i?.path,
|
|
12012
12026
|
rootItemLabel: i?.label,
|
|
12013
12027
|
value: L,
|
|
12014
|
-
onSearchChange:
|
|
12028
|
+
onSearchChange: z,
|
|
12015
12029
|
isCompactView: Gn,
|
|
12016
12030
|
labelClassName: "dial-tiny-text"
|
|
12017
12031
|
}), /* @__PURE__ */ q("section", {
|
|
12018
12032
|
role: "region",
|
|
12019
12033
|
"aria-label": "File Manager Grid View",
|
|
12020
|
-
className:
|
|
12034
|
+
className: De(xn, "relative"),
|
|
12021
12035
|
onDragEnter: Ne,
|
|
12022
12036
|
onDragLeave: Pe,
|
|
12023
12037
|
onDragOver: Fe,
|
|
12024
12038
|
onDrop: Ie,
|
|
12025
|
-
children: [mr, /* @__PURE__ */ K(
|
|
12039
|
+
children: [mr, /* @__PURE__ */ K(zr, {
|
|
12026
12040
|
disabledGridRowIds: Yn,
|
|
12027
12041
|
gridRows: j,
|
|
12028
|
-
getDisabledTooltip:
|
|
12042
|
+
getDisabledTooltip: jt,
|
|
12029
12043
|
getRowDisabledTooltip: qn,
|
|
12030
12044
|
allowedFileTypes: w,
|
|
12031
12045
|
maxSelectableFileSize: T
|
|
@@ -12033,31 +12047,31 @@ var bi = () => {
|
|
|
12033
12047
|
})]
|
|
12034
12048
|
})]
|
|
12035
12049
|
}),
|
|
12036
|
-
/* @__PURE__ */ K(
|
|
12037
|
-
...
|
|
12050
|
+
/* @__PURE__ */ K(qr, {
|
|
12051
|
+
...g,
|
|
12038
12052
|
open: be,
|
|
12039
12053
|
itemsToDelete: xe,
|
|
12040
12054
|
onClose: ve,
|
|
12041
12055
|
onConfirm: ye
|
|
12042
12056
|
}),
|
|
12043
|
-
/* @__PURE__ */ K(
|
|
12057
|
+
/* @__PURE__ */ K(Hr, {
|
|
12044
12058
|
...y,
|
|
12045
12059
|
open: oe,
|
|
12046
12060
|
onClose: ae,
|
|
12047
12061
|
onConfirm: () => {
|
|
12048
12062
|
let e = y?.destinationFolderPath ?? "/";
|
|
12049
|
-
se ===
|
|
12063
|
+
se === dn.Copy ? ue(e) : de(e), ae();
|
|
12050
12064
|
},
|
|
12051
12065
|
mode: se,
|
|
12052
12066
|
items: r,
|
|
12053
12067
|
rootItem: i,
|
|
12054
12068
|
gridOptions: {
|
|
12055
|
-
columnDefs: cr.filter((e) => e.colId !==
|
|
12069
|
+
columnDefs: cr.filter((e) => e.colId !== hn.Actions),
|
|
12056
12070
|
loading: a
|
|
12057
12071
|
},
|
|
12058
|
-
onUploadFiles:
|
|
12072
|
+
onUploadFiles: Le,
|
|
12059
12073
|
onValidateUpload: ze,
|
|
12060
|
-
maxFileSize:
|
|
12074
|
+
maxFileSize: Be,
|
|
12061
12075
|
path: y?.destinationFolderPath ?? y?.sourceFolder ?? A,
|
|
12062
12076
|
onPathChange: (e) => {
|
|
12063
12077
|
y?.setDestinationFolderPath?.(e);
|
|
@@ -12068,100 +12082,100 @@ var bi = () => {
|
|
|
12068
12082
|
loadedPaths: s?.loadedPaths,
|
|
12069
12083
|
loadingPaths: s?.loadingPaths
|
|
12070
12084
|
},
|
|
12071
|
-
onFolderPopupPathChange:
|
|
12072
|
-
showHiddenFileSwitcher:
|
|
12073
|
-
showCreateFolderButton:
|
|
12074
|
-
hideSearchPathItemName:
|
|
12085
|
+
onFolderPopupPathChange: Tt,
|
|
12086
|
+
showHiddenFileSwitcher: Lt,
|
|
12087
|
+
showCreateFolderButton: Rt,
|
|
12088
|
+
hideSearchPathItemName: It
|
|
12075
12089
|
}),
|
|
12076
|
-
/* @__PURE__ */ K(
|
|
12090
|
+
/* @__PURE__ */ K(Ln, {
|
|
12077
12091
|
...b,
|
|
12078
|
-
open:
|
|
12079
|
-
onClose:
|
|
12080
|
-
onReplace:
|
|
12081
|
-
onDuplicate:
|
|
12082
|
-
onDecideForEach:
|
|
12083
|
-
conflictingFiles:
|
|
12092
|
+
open: tt,
|
|
12093
|
+
onClose: it,
|
|
12094
|
+
onReplace: nt,
|
|
12095
|
+
onDuplicate: rt,
|
|
12096
|
+
onDecideForEach: at,
|
|
12097
|
+
conflictingFiles: et
|
|
12084
12098
|
}),
|
|
12085
|
-
/* @__PURE__ */ K(
|
|
12099
|
+
/* @__PURE__ */ K(Ln, {
|
|
12086
12100
|
...b,
|
|
12087
|
-
open:
|
|
12088
|
-
onClose:
|
|
12089
|
-
onReplace:
|
|
12090
|
-
onDuplicate:
|
|
12091
|
-
onDecideForEach:
|
|
12092
|
-
conflictingFiles:
|
|
12101
|
+
open: st,
|
|
12102
|
+
onClose: ut,
|
|
12103
|
+
onReplace: ct,
|
|
12104
|
+
onDuplicate: lt,
|
|
12105
|
+
onDecideForEach: dt,
|
|
12106
|
+
conflictingFiles: ot
|
|
12093
12107
|
}),
|
|
12094
|
-
/* @__PURE__ */ K(
|
|
12095
|
-
open:
|
|
12096
|
-
onClose:
|
|
12097
|
-
fileMetadata:
|
|
12098
|
-
loading:
|
|
12099
|
-
header:
|
|
12100
|
-
nameLabel:
|
|
12101
|
-
pathLabel:
|
|
12102
|
-
modifiedDateLabel:
|
|
12103
|
-
sizeLabel:
|
|
12104
|
-
authorLabel:
|
|
12108
|
+
/* @__PURE__ */ K(oi, {
|
|
12109
|
+
open: mt,
|
|
12110
|
+
onClose: gt,
|
|
12111
|
+
fileMetadata: pt?.fileMetadata ?? ht,
|
|
12112
|
+
loading: pt?.loading,
|
|
12113
|
+
header: pt?.header,
|
|
12114
|
+
nameLabel: pt?.nameLabel,
|
|
12115
|
+
pathLabel: pt?.pathLabel,
|
|
12116
|
+
modifiedDateLabel: pt?.modifiedDateLabel,
|
|
12117
|
+
sizeLabel: pt?.sizeLabel,
|
|
12118
|
+
authorLabel: pt?.authorLabel,
|
|
12105
12119
|
dateLocale: p?.dateLocale,
|
|
12106
12120
|
dateOptions: p?.dateOptions
|
|
12107
12121
|
})
|
|
12108
12122
|
]
|
|
12109
12123
|
})
|
|
12110
12124
|
});
|
|
12111
|
-
},
|
|
12125
|
+
}, Ei = {
|
|
12112
12126
|
divider: "_divider_1gs31_1",
|
|
12113
12127
|
tree: "_tree_1gs31_17"
|
|
12114
|
-
},
|
|
12128
|
+
}, Di = ({ items: e, selectedPath: t, onSelectedPathChange: n, onCreateFolder: r, searchQuery: i, disabled: a = !1, createFolderLabel: o = "Create new folder", cancelCreatingFolderLabel: s = "Cancel", addSiblingFolderLabel: d = "Add sibling", addChildFolderLabel: f = "Add child", newFolderDefaultName: p = "New folder", noResultsLabel: m = "No folders match \"{query}\".", emptyFolderNameError: h = "Folder name cannot be empty.", invalidFolderNameError: g = "Folder name contains invalid characters.", duplicateFolderNameError: _ = "A folder with this name already exists.", rootLabel: v = "Organization", expandedPaths: y, onExpandedPathsChange: b, loadingPaths: x, styles: S = {} }) => {
|
|
12115
12129
|
let T = {
|
|
12116
|
-
...
|
|
12117
|
-
...
|
|
12118
|
-
}, [E, D] = u(() => new Set(t?.map((e, n) =>
|
|
12130
|
+
...je({ "--pft-divider": S.colors?.divider }),
|
|
12131
|
+
...S.cssVars
|
|
12132
|
+
}, [E, D] = u(() => new Set(t?.map((e, n) => Et(t.slice(0, n + 1))) ?? [])), O = y ?? E, k = (e) => {
|
|
12119
12133
|
let t = new Set(e);
|
|
12120
12134
|
t.delete(""), b ? b(t) : D(t);
|
|
12121
12135
|
}, [A, j] = u(null), [M, N] = u(p), P = l(null), F = i.trim(), I = A != null, L = c(() => St(e, i), [e, i]), R = F.length > 0 && L.length === 0, z = !I && F.length > 0, B = c(() => wt(z ? L : e), [
|
|
12122
12136
|
z,
|
|
12123
12137
|
L,
|
|
12124
12138
|
e
|
|
12125
|
-
]),
|
|
12139
|
+
]), V = c(() => new Set(["", ...X(B)]), [B]), H = c(() => new Set(["", ...z ? V : O]), [
|
|
12126
12140
|
z,
|
|
12127
|
-
|
|
12141
|
+
V,
|
|
12128
12142
|
O
|
|
12129
|
-
]),
|
|
12143
|
+
]), te = c(() => Ot(B), [B]), ne = c(() => z && te.length === 0 ? [] : [{
|
|
12130
12144
|
path: "",
|
|
12131
12145
|
name: v,
|
|
12132
12146
|
folderId: "",
|
|
12133
12147
|
nodeType: $.FOLDER,
|
|
12134
|
-
items:
|
|
12148
|
+
items: te
|
|
12135
12149
|
}], [
|
|
12136
|
-
|
|
12150
|
+
te,
|
|
12137
12151
|
v,
|
|
12138
12152
|
z
|
|
12139
|
-
]), re = A ?
|
|
12153
|
+
]), re = A ? Et(A) : null, ie = {
|
|
12140
12154
|
empty: h,
|
|
12141
12155
|
invalid: g,
|
|
12142
12156
|
duplicate: _
|
|
12143
12157
|
}, ae = (t) => jt(R && At(F, [], ie) == null ? F : p, Mt(e, t)), oe = (e) => {
|
|
12144
12158
|
j(e), N(ae(e)), P.current = null;
|
|
12145
|
-
let t =
|
|
12159
|
+
let t = Et(e);
|
|
12146
12160
|
t && k(new Set(O).add(t));
|
|
12147
12161
|
}, se = () => oe(t ?? []), U = (e) => {
|
|
12148
12162
|
let t = Dt(e.path), n = [{
|
|
12149
12163
|
key: "add-child",
|
|
12150
12164
|
label: f,
|
|
12151
|
-
icon: /* @__PURE__ */ K(
|
|
12152
|
-
size:
|
|
12165
|
+
icon: /* @__PURE__ */ K(Ye, {
|
|
12166
|
+
size: C.SM,
|
|
12153
12167
|
"aria-hidden": !0,
|
|
12154
|
-
stroke:
|
|
12168
|
+
stroke: w
|
|
12155
12169
|
}),
|
|
12156
12170
|
onClick: () => oe(t)
|
|
12157
12171
|
}];
|
|
12158
12172
|
return e.path !== "" && n.push({
|
|
12159
12173
|
key: "add-sibling",
|
|
12160
12174
|
label: d,
|
|
12161
|
-
icon: /* @__PURE__ */ K(
|
|
12162
|
-
size:
|
|
12175
|
+
icon: /* @__PURE__ */ K(Qe, {
|
|
12176
|
+
size: C.SM,
|
|
12163
12177
|
"aria-hidden": !0,
|
|
12164
|
-
stroke:
|
|
12178
|
+
stroke: w
|
|
12165
12179
|
}),
|
|
12166
12180
|
onClick: () => oe(t.slice(0, -1))
|
|
12167
12181
|
}), n;
|
|
@@ -12176,19 +12190,19 @@ var bi = () => {
|
|
|
12176
12190
|
}, ue = () => j(null);
|
|
12177
12191
|
return /* @__PURE__ */ q("div", {
|
|
12178
12192
|
style: T,
|
|
12179
|
-
className: W(a && "pointer-events-none opacity-60",
|
|
12193
|
+
className: W(a && "pointer-events-none opacity-60", S.className),
|
|
12180
12194
|
children: [
|
|
12181
12195
|
/* @__PURE__ */ K("div", {
|
|
12182
|
-
className: W("w-full min-w-0 max-w-full",
|
|
12183
|
-
children: /* @__PURE__ */ K(
|
|
12196
|
+
className: W("w-full min-w-0 max-w-full", Ei.tree),
|
|
12197
|
+
children: /* @__PURE__ */ K(pi, {
|
|
12184
12198
|
items: ne,
|
|
12185
12199
|
showFiles: !1,
|
|
12186
|
-
selectedPath: t == null ? void 0 :
|
|
12187
|
-
expandedPaths:
|
|
12200
|
+
selectedPath: t == null ? void 0 : Et(t),
|
|
12201
|
+
expandedPaths: H,
|
|
12188
12202
|
onExpandedPathsChange: k,
|
|
12189
12203
|
loadingPaths: x,
|
|
12190
12204
|
onItemClick: (e) => {
|
|
12191
|
-
n(t != null &&
|
|
12205
|
+
n(t != null && Et(t) === e.path ? void 0 : Dt(e.path));
|
|
12192
12206
|
},
|
|
12193
12207
|
getContextMenuItems: U,
|
|
12194
12208
|
createdFolderPath: re,
|
|
@@ -12200,7 +12214,7 @@ var bi = () => {
|
|
|
12200
12214
|
})
|
|
12201
12215
|
}),
|
|
12202
12216
|
/* @__PURE__ */ K("div", {
|
|
12203
|
-
className: W("my-2 h-px",
|
|
12217
|
+
className: W("my-2 h-px", Ei.divider),
|
|
12204
12218
|
"aria-hidden": !0
|
|
12205
12219
|
}),
|
|
12206
12220
|
/* @__PURE__ */ q("div", {
|
|
@@ -12208,10 +12222,10 @@ var bi = () => {
|
|
|
12208
12222
|
children: [/* @__PURE__ */ K(ee, {
|
|
12209
12223
|
onClick: se,
|
|
12210
12224
|
label: o,
|
|
12211
|
-
iconBefore: /* @__PURE__ */ K(
|
|
12212
|
-
size:
|
|
12225
|
+
iconBefore: /* @__PURE__ */ K(Qe, {
|
|
12226
|
+
size: C.SM,
|
|
12213
12227
|
"aria-hidden": !0,
|
|
12214
|
-
stroke:
|
|
12228
|
+
stroke: w
|
|
12215
12229
|
}),
|
|
12216
12230
|
disabled: a || I
|
|
12217
12231
|
}), I && /* @__PURE__ */ K(ee, {
|
|
@@ -12222,74 +12236,74 @@ var bi = () => {
|
|
|
12222
12236
|
})
|
|
12223
12237
|
]
|
|
12224
12238
|
});
|
|
12225
|
-
},
|
|
12239
|
+
}, Oi = { panel: "dial-publish-panel-panel" }, ki = {
|
|
12226
12240
|
summaryTitle: "_summaryTitle_tf20a_1",
|
|
12227
12241
|
sectionHeading: "_sectionHeading_tf20a_5"
|
|
12228
|
-
},
|
|
12229
|
-
let { colors:
|
|
12230
|
-
...
|
|
12231
|
-
"--pp-summary-title-text":
|
|
12232
|
-
"--pp-heading-text":
|
|
12242
|
+
}, Ai = 200, ji = ({ resource: e, renderSummary: t, history: n, isHistoryLoading: r = !1, hasHistoryError: i = !1, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: l, onCreateFolder: d, expandedPaths: f, onExpandedPathsChange: p, loadingPaths: m, hasExistingPublicationInFolder: g, hasWriteAccess: _, isSubmitting: v, hasSubmitError: y = !1, allowReplace: b = !0, author: x, onAuthorChange: S, publishCredentials: C = !1, onPublishCredentialsChange: w, rules: T, onRulesChange: E, ruleSourceOptions: D, isRulesLoading: O = !1, hasRulesLoadError: k = !1, labels: A = {}, summaryTitleClassName: j = "dial-body-semi-text", headingClassName: M = "dial-body-semi-text", styles: N = {} }) => {
|
|
12243
|
+
let { colors: P, folderTree: F, accessRules: I } = N, L = {
|
|
12244
|
+
...je({
|
|
12245
|
+
"--pp-summary-title-text": P?.summaryTitleText,
|
|
12246
|
+
"--pp-heading-text": P?.headingText
|
|
12233
12247
|
}),
|
|
12234
|
-
...
|
|
12235
|
-
},
|
|
12236
|
-
border:
|
|
12237
|
-
background:
|
|
12238
|
-
versionTagBorder:
|
|
12239
|
-
versionTagBackground:
|
|
12240
|
-
versionTagText:
|
|
12241
|
-
}, { folderLabel:
|
|
12242
|
-
|
|
12243
|
-
},
|
|
12244
|
-
hasSelectedFolder:
|
|
12245
|
-
hasExistingPublicationInFolder:
|
|
12246
|
-
hasWriteAccess:
|
|
12247
|
-
isSubmitting:
|
|
12248
|
-
hasSubmitError:
|
|
12249
|
-
allowReplace:
|
|
12248
|
+
...N.cssVars
|
|
12249
|
+
}, R = {
|
|
12250
|
+
border: P?.summaryBorder,
|
|
12251
|
+
background: P?.summaryBackground,
|
|
12252
|
+
versionTagBorder: P?.summaryVersionTagBorder,
|
|
12253
|
+
versionTagBackground: P?.summaryVersionTagBackground,
|
|
12254
|
+
versionTagText: P?.summaryVersionTagText
|
|
12255
|
+
}, { folderLabel: z = "Publish to folder", replaceWarning: B = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: ee = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: V = "Publishing failed. Please try again.", folderEmptyStateLabel: H, addSiblingFolderLabel: ne, addChildFolderLabel: re, cancelCreatingFolderLabel: ie, createFolderEmptyNameError: se, createFolderInvalidNameError: U, createFolderDuplicateNameError: ce, rootFolderLabel: le = "Organization", summaryVersionLabel: ue, accessRulesLabels: fe, searchPlaceholder: pe, clearSearchAriaLabel: me, authorLabel: he = "Author", authorPlaceholder: ge = "Author name", authorHint: _e = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: ve = "Publish with my credentials", credentialsHint: ye = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = A, [be, xe] = u(""), Se = a(), Ce = (e) => {
|
|
12256
|
+
xe(e ?? "");
|
|
12257
|
+
}, we = s != null, Te = c(() => gt({
|
|
12258
|
+
hasSelectedFolder: we,
|
|
12259
|
+
hasExistingPublicationInFolder: g,
|
|
12260
|
+
hasWriteAccess: _,
|
|
12261
|
+
isSubmitting: v,
|
|
12262
|
+
hasSubmitError: y,
|
|
12263
|
+
allowReplace: b
|
|
12250
12264
|
}), [
|
|
12251
|
-
|
|
12252
|
-
h,
|
|
12265
|
+
we,
|
|
12253
12266
|
g,
|
|
12254
12267
|
_,
|
|
12255
12268
|
v,
|
|
12256
|
-
y
|
|
12257
|
-
|
|
12258
|
-
|
|
12269
|
+
y,
|
|
12270
|
+
b
|
|
12271
|
+
]), Ee = we ? s[s.length - 1] ?? le : "", De = t ? t() : /* @__PURE__ */ K("span", {
|
|
12272
|
+
className: W("truncate", j, ki.summaryTitle),
|
|
12259
12273
|
children: e?.title
|
|
12260
12274
|
});
|
|
12261
12275
|
return /* @__PURE__ */ q("div", {
|
|
12262
|
-
className: "flex flex-col gap-5",
|
|
12263
|
-
style:
|
|
12264
|
-
children: [e?.type == null ? /* @__PURE__ */ K(
|
|
12265
|
-
colors:
|
|
12266
|
-
children:
|
|
12267
|
-
}) : /* @__PURE__ */ K(
|
|
12276
|
+
className: W("flex flex-col gap-5", Oi.panel),
|
|
12277
|
+
style: L,
|
|
12278
|
+
children: [e?.type == null ? /* @__PURE__ */ K(ke, {
|
|
12279
|
+
colors: R,
|
|
12280
|
+
children: De
|
|
12281
|
+
}) : /* @__PURE__ */ K(ke, {
|
|
12268
12282
|
item: {
|
|
12269
12283
|
type: e.type,
|
|
12270
12284
|
name: e.title,
|
|
12271
12285
|
version: e.version ?? "",
|
|
12272
12286
|
iconUrl: e.iconUrl
|
|
12273
12287
|
},
|
|
12274
|
-
versionLabel:
|
|
12275
|
-
colors:
|
|
12288
|
+
versionLabel: ue,
|
|
12289
|
+
colors: R
|
|
12276
12290
|
}), /* @__PURE__ */ q("div", { children: [
|
|
12277
12291
|
/* @__PURE__ */ K("div", {
|
|
12278
|
-
className: W("mb-2",
|
|
12279
|
-
children:
|
|
12292
|
+
className: W("mb-2", M, ki.sectionHeading),
|
|
12293
|
+
children: z
|
|
12280
12294
|
}),
|
|
12281
12295
|
/* @__PURE__ */ K("div", {
|
|
12282
12296
|
role: "search",
|
|
12283
12297
|
className: "mb-3",
|
|
12284
|
-
children: /* @__PURE__ */ K(
|
|
12285
|
-
value:
|
|
12286
|
-
onChange:
|
|
12287
|
-
placeholder:
|
|
12288
|
-
clearLabel:
|
|
12289
|
-
"aria-label":
|
|
12298
|
+
children: /* @__PURE__ */ K(de, {
|
|
12299
|
+
value: be,
|
|
12300
|
+
onChange: Ce,
|
|
12301
|
+
placeholder: pe,
|
|
12302
|
+
clearLabel: me,
|
|
12303
|
+
"aria-label": pe
|
|
12290
12304
|
})
|
|
12291
12305
|
}),
|
|
12292
|
-
/* @__PURE__ */ K(
|
|
12306
|
+
/* @__PURE__ */ K(Di, {
|
|
12293
12307
|
items: o,
|
|
12294
12308
|
selectedPath: s,
|
|
12295
12309
|
onSelectedPathChange: l,
|
|
@@ -12297,62 +12311,72 @@ var bi = () => {
|
|
|
12297
12311
|
expandedPaths: f,
|
|
12298
12312
|
onExpandedPathsChange: p,
|
|
12299
12313
|
loadingPaths: m,
|
|
12300
|
-
searchQuery:
|
|
12301
|
-
disabled:
|
|
12302
|
-
noResultsLabel:
|
|
12303
|
-
addSiblingFolderLabel:
|
|
12304
|
-
addChildFolderLabel:
|
|
12305
|
-
cancelCreatingFolderLabel:
|
|
12306
|
-
emptyFolderNameError:
|
|
12307
|
-
invalidFolderNameError:
|
|
12308
|
-
duplicateFolderNameError:
|
|
12309
|
-
rootLabel:
|
|
12310
|
-
styles:
|
|
12314
|
+
searchQuery: be,
|
|
12315
|
+
disabled: v,
|
|
12316
|
+
noResultsLabel: H,
|
|
12317
|
+
addSiblingFolderLabel: ne,
|
|
12318
|
+
addChildFolderLabel: re,
|
|
12319
|
+
cancelCreatingFolderLabel: ie,
|
|
12320
|
+
emptyFolderNameError: se,
|
|
12321
|
+
invalidFolderNameError: U,
|
|
12322
|
+
duplicateFolderNameError: ce,
|
|
12323
|
+
rootLabel: le,
|
|
12324
|
+
styles: F
|
|
12311
12325
|
}),
|
|
12312
|
-
|
|
12326
|
+
Te.calloutKind !== ht.None && Te.calloutKind !== ht.Info && /* @__PURE__ */ K("div", {
|
|
12313
12327
|
className: "mt-3",
|
|
12314
|
-
children: /* @__PURE__ */ K(
|
|
12315
|
-
type:
|
|
12316
|
-
variant:
|
|
12317
|
-
message:
|
|
12318
|
-
replaceWarning:
|
|
12319
|
-
noAccessError:
|
|
12320
|
-
submitError:
|
|
12321
|
-
folderName:
|
|
12328
|
+
children: /* @__PURE__ */ K(ae, {
|
|
12329
|
+
type: oe.SectionMessage,
|
|
12330
|
+
variant: Mi(Te.calloutKind),
|
|
12331
|
+
message: Pi(Te.calloutKind, {
|
|
12332
|
+
replaceWarning: B,
|
|
12333
|
+
noAccessError: ee,
|
|
12334
|
+
submitError: V,
|
|
12335
|
+
folderName: Ee,
|
|
12322
12336
|
version: e?.version
|
|
12323
12337
|
})
|
|
12324
12338
|
})
|
|
12325
12339
|
}),
|
|
12326
12340
|
/* @__PURE__ */ K("div", {
|
|
12327
12341
|
className: "mt-4",
|
|
12328
|
-
children: /* @__PURE__ */ K(
|
|
12329
|
-
id:
|
|
12330
|
-
labelProps: { label:
|
|
12331
|
-
placeholder:
|
|
12332
|
-
caption:
|
|
12333
|
-
value:
|
|
12334
|
-
onChange: (e) =>
|
|
12335
|
-
maxLength:
|
|
12336
|
-
disabled:
|
|
12342
|
+
children: /* @__PURE__ */ K(te, {
|
|
12343
|
+
id: Se,
|
|
12344
|
+
labelProps: { label: he },
|
|
12345
|
+
placeholder: ge,
|
|
12346
|
+
caption: _e,
|
|
12347
|
+
value: x,
|
|
12348
|
+
onChange: (e) => S(e ?? ""),
|
|
12349
|
+
maxLength: Ai,
|
|
12350
|
+
disabled: v
|
|
12351
|
+
})
|
|
12352
|
+
}),
|
|
12353
|
+
w != null && /* @__PURE__ */ K("div", {
|
|
12354
|
+
className: "mt-4",
|
|
12355
|
+
children: /* @__PURE__ */ K(h, {
|
|
12356
|
+
labelProps: { label: ve },
|
|
12357
|
+
caption: ye,
|
|
12358
|
+
isSelected: C,
|
|
12359
|
+
onChange: w,
|
|
12360
|
+
disabled: v
|
|
12337
12361
|
})
|
|
12338
12362
|
}),
|
|
12339
12363
|
/* @__PURE__ */ K("div", {
|
|
12340
12364
|
className: "mt-4",
|
|
12341
12365
|
children: /* @__PURE__ */ K(Ht, {
|
|
12342
|
-
rules:
|
|
12343
|
-
onRulesChange:
|
|
12344
|
-
sourceOptions:
|
|
12345
|
-
folderName:
|
|
12346
|
-
disabled:
|
|
12347
|
-
isLoading:
|
|
12348
|
-
hasLoadError:
|
|
12349
|
-
labels:
|
|
12350
|
-
styles:
|
|
12366
|
+
rules: T,
|
|
12367
|
+
onRulesChange: E,
|
|
12368
|
+
sourceOptions: D,
|
|
12369
|
+
folderName: we ? Ee : void 0,
|
|
12370
|
+
disabled: v,
|
|
12371
|
+
isLoading: O,
|
|
12372
|
+
hasLoadError: k,
|
|
12373
|
+
labels: fe,
|
|
12374
|
+
styles: I
|
|
12351
12375
|
})
|
|
12352
12376
|
})
|
|
12353
12377
|
] })]
|
|
12354
12378
|
});
|
|
12355
|
-
},
|
|
12379
|
+
}, Mi = (e) => e === ht.ReplaceWarning ? se.Warning : se.Error, Ni = (e, t) => {
|
|
12356
12380
|
let [n, r, ...i] = e.split("{folder}");
|
|
12357
12381
|
return r === void 0 || i.length > 0 ? e : /* @__PURE__ */ q(G, { children: [
|
|
12358
12382
|
n,
|
|
@@ -12362,23 +12386,23 @@ var bi = () => {
|
|
|
12362
12386
|
}),
|
|
12363
12387
|
r
|
|
12364
12388
|
] });
|
|
12365
|
-
},
|
|
12366
|
-
let c =
|
|
12389
|
+
}, Pi = (e, t) => e === ht.ReplaceWarning ? Ni(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName) : e === ht.NoAccess ? Ni(t.noAccessError, t.folderName) : t.submitError, Fi = { footer: "_footer_dks1v_1" }, Ii = ({ version: e, hasExistingPublicationInFolder: t, isSubmitDisabled: n, isSubmitLoading: r, onCancel: i, onSubmit: a, labels: o = {}, colors: s }) => {
|
|
12390
|
+
let c = je({ "--pf-border": s?.border }), { cancelLabel: l = "Cancel", publishDefaultLabel: u = "Publish", updateLabel: d = "Update version {version}", publishingInProgressLabel: f = "Publishing…" } = o, p = r ? f : t && e != null ? d.replace("{version}", e) : u;
|
|
12367
12391
|
return /* @__PURE__ */ q("div", {
|
|
12368
12392
|
style: c,
|
|
12369
|
-
className: W("flex items-center justify-end gap-2 border-t px-3.5 py-4 rtl:flex-row-reverse rtl:justify-start",
|
|
12393
|
+
className: W("flex items-center justify-end gap-2 border-t px-3.5 py-4 rtl:flex-row-reverse rtl:justify-start", Fi.footer),
|
|
12370
12394
|
children: [/* @__PURE__ */ K(ee, {
|
|
12371
12395
|
label: l,
|
|
12372
12396
|
disabled: r,
|
|
12373
12397
|
onClick: i
|
|
12374
|
-
}), /* @__PURE__ */ K(
|
|
12398
|
+
}), /* @__PURE__ */ K(re, {
|
|
12375
12399
|
label: p,
|
|
12376
12400
|
disabled: n,
|
|
12377
|
-
iconBefore: r ? /* @__PURE__ */ K(
|
|
12401
|
+
iconBefore: r ? /* @__PURE__ */ K(he, { size: C.SM }) : void 0,
|
|
12378
12402
|
onClick: a
|
|
12379
12403
|
})]
|
|
12380
12404
|
});
|
|
12381
|
-
},
|
|
12405
|
+
}, Li = [
|
|
12382
12406
|
"a[href]",
|
|
12383
12407
|
"area[href]",
|
|
12384
12408
|
"button",
|
|
@@ -12388,21 +12412,21 @@ var bi = () => {
|
|
|
12388
12412
|
"summary",
|
|
12389
12413
|
"[contenteditable=\"true\"]",
|
|
12390
12414
|
"[tabindex]"
|
|
12391
|
-
].join(","),
|
|
12415
|
+
].join(","), Ri = (e) => e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true" || e.tabIndex < 0 ? !1 : e.closest("[inert],[hidden],[aria-hidden=\"true\"]") == null, zi = (e) => Array.from(e.querySelectorAll(Li)).filter(Ri), Bi = {
|
|
12392
12416
|
backdrop: "_backdrop_1rdk6_1",
|
|
12393
12417
|
panel: "_panel_1rdk6_5",
|
|
12394
12418
|
divider: "_divider_1rdk6_10",
|
|
12395
12419
|
content: "_content_1rdk6_14",
|
|
12396
12420
|
title: "_title_1rdk6_19"
|
|
12397
|
-
},
|
|
12398
|
-
let R =
|
|
12421
|
+
}, Vi = ({ isOpen: e, resource: t, renderSummary: n, history: r, isHistoryLoading: a = !1, hasHistoryError: o = !1, folderItems: s, selectedFolderPath: u, onSelectedFolderPathChange: d, onCreateFolder: f, expandedPaths: p, onExpandedPathsChange: m, loadingPaths: h, hasExistingPublicationInFolder: _, hasWriteAccess: v, isSubmitting: y, hasSubmitError: b = !1, allowReplace: x = !0, author: S, onAuthorChange: C, rules: w, onRulesChange: T, ruleSourceOptions: E, isRulesLoading: D = !1, hasRulesLoadError: O = !1, onClose: k, returnFocusRef: A, onSubmit: j, panelLabels: M, panelStyles: N, footerLabels: P, labels: F = {}, titleClassName: I = "dial-body-semi-text", colors: L }) => {
|
|
12422
|
+
let R = je({
|
|
12399
12423
|
"--spp-backdrop-bg": L?.backdropBackground,
|
|
12400
12424
|
"--spp-panel-bg": L?.panelBackground,
|
|
12401
12425
|
"--spp-panel-border": L?.panelBorder,
|
|
12402
12426
|
"--spp-divider-border": L?.dividerBorder,
|
|
12403
12427
|
"--spp-scrollbar-thumb": L?.scrollbarThumb,
|
|
12404
12428
|
"--spp-title-text": L?.titleText
|
|
12405
|
-
}), z = l(null), { title:
|
|
12429
|
+
}), z = l(null), { title: B = "Publish", ariaLabel: ee = "Publish", closeAriaLabel: V = "Close" } = F, H = c(() => gt({
|
|
12406
12430
|
hasSelectedFolder: u != null,
|
|
12407
12431
|
hasExistingPublicationInFolder: _,
|
|
12408
12432
|
hasWriteAccess: v,
|
|
@@ -12445,7 +12469,7 @@ var bi = () => {
|
|
|
12445
12469
|
if (!t) return;
|
|
12446
12470
|
let n = document.activeElement;
|
|
12447
12471
|
if (!(n instanceof HTMLElement) || !t.contains(n)) return;
|
|
12448
|
-
let r =
|
|
12472
|
+
let r = zi(t);
|
|
12449
12473
|
if (r.length === 0) {
|
|
12450
12474
|
e.preventDefault(), t.focus({ preventScroll: !0 });
|
|
12451
12475
|
return;
|
|
@@ -12462,44 +12486,44 @@ var bi = () => {
|
|
|
12462
12486
|
};
|
|
12463
12487
|
}, [e, k]), /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("div", {
|
|
12464
12488
|
style: R,
|
|
12465
|
-
className: W("fixed inset-0 z-[51] transition-opacity duration-300",
|
|
12489
|
+
className: W("fixed inset-0 z-[51] transition-opacity duration-300", Bi.backdrop, e ? "opacity-100" : "pointer-events-none opacity-0"),
|
|
12466
12490
|
onClick: k,
|
|
12467
12491
|
"aria-hidden": "true"
|
|
12468
12492
|
}), /* @__PURE__ */ q("div", {
|
|
12469
12493
|
ref: z,
|
|
12470
12494
|
role: "dialog",
|
|
12471
12495
|
"aria-modal": "true",
|
|
12472
|
-
"aria-label":
|
|
12496
|
+
"aria-label": ee,
|
|
12473
12497
|
"aria-hidden": !e,
|
|
12474
12498
|
inert: !e,
|
|
12475
12499
|
tabIndex: -1,
|
|
12476
12500
|
style: R,
|
|
12477
|
-
className: W("fixed inset-y-0 end-0 z-[52] flex w-full flex-col overflow-hidden", "desktop:rounded-ts-xl desktop:rounded-bs-xl desktop:w-[540px] desktop:border-s", "transition-transform duration-300",
|
|
12501
|
+
className: W("fixed inset-y-0 end-0 z-[52] flex w-full flex-col overflow-hidden", "desktop:rounded-ts-xl desktop:rounded-bs-xl desktop:w-[540px] desktop:border-s", "transition-transform duration-300", Bi.panel, e ? "translate-x-0" : "translate-x-full rtl:-translate-x-full"),
|
|
12478
12502
|
children: [
|
|
12479
12503
|
/* @__PURE__ */ q("div", {
|
|
12480
12504
|
className: "flex shrink-0 items-center gap-2 px-[22px] py-3",
|
|
12481
12505
|
children: [
|
|
12482
12506
|
/* @__PURE__ */ K("div", { className: "flex-1" }),
|
|
12483
12507
|
/* @__PURE__ */ K("span", {
|
|
12484
|
-
className: W("flex-1 text-center", I,
|
|
12485
|
-
children:
|
|
12508
|
+
className: W("flex-1 text-center", I, Bi.title),
|
|
12509
|
+
children: B
|
|
12486
12510
|
}),
|
|
12487
12511
|
/* @__PURE__ */ K("div", {
|
|
12488
12512
|
className: "flex flex-1 justify-end",
|
|
12489
|
-
children: /* @__PURE__ */ K(
|
|
12513
|
+
children: /* @__PURE__ */ K(g, {
|
|
12490
12514
|
onClose: k,
|
|
12491
|
-
ariaLabel:
|
|
12515
|
+
ariaLabel: V,
|
|
12492
12516
|
disabled: y
|
|
12493
12517
|
})
|
|
12494
12518
|
})
|
|
12495
12519
|
]
|
|
12496
12520
|
}),
|
|
12497
|
-
/* @__PURE__ */ K("div", { className: W("shrink-0",
|
|
12521
|
+
/* @__PURE__ */ K("div", { className: W("shrink-0", Bi.divider) }),
|
|
12498
12522
|
/* @__PURE__ */ K("div", {
|
|
12499
|
-
className: W("min-h-0 flex-1 overflow-y-auto",
|
|
12523
|
+
className: W("min-h-0 flex-1 overflow-y-auto", Bi.content),
|
|
12500
12524
|
children: /* @__PURE__ */ K("div", {
|
|
12501
12525
|
className: "p-[22px]",
|
|
12502
|
-
children: /* @__PURE__ */ K(
|
|
12526
|
+
children: /* @__PURE__ */ K(ji, {
|
|
12503
12527
|
resource: t,
|
|
12504
12528
|
renderSummary: n,
|
|
12505
12529
|
history: r,
|
|
@@ -12511,7 +12535,7 @@ var bi = () => {
|
|
|
12511
12535
|
onCreateFolder: f,
|
|
12512
12536
|
expandedPaths: p,
|
|
12513
12537
|
onExpandedPathsChange: m,
|
|
12514
|
-
loadingPaths:
|
|
12538
|
+
loadingPaths: h,
|
|
12515
12539
|
hasExistingPublicationInFolder: _,
|
|
12516
12540
|
hasWriteAccess: v,
|
|
12517
12541
|
isSubmitting: y,
|
|
@@ -12529,11 +12553,11 @@ var bi = () => {
|
|
|
12529
12553
|
})
|
|
12530
12554
|
})
|
|
12531
12555
|
}),
|
|
12532
|
-
/* @__PURE__ */ K(
|
|
12556
|
+
/* @__PURE__ */ K(Ii, {
|
|
12533
12557
|
version: t?.version,
|
|
12534
12558
|
hasExistingPublicationInFolder: _,
|
|
12535
|
-
isSubmitDisabled:
|
|
12536
|
-
isSubmitLoading:
|
|
12559
|
+
isSubmitDisabled: H.isSubmitDisabled,
|
|
12560
|
+
isSubmitLoading: H.isSubmitLoading,
|
|
12537
12561
|
onCancel: k,
|
|
12538
12562
|
onSubmit: j,
|
|
12539
12563
|
labels: P
|
|
@@ -12542,4 +12566,4 @@ var bi = () => {
|
|
|
12542
12566
|
})] });
|
|
12543
12567
|
};
|
|
12544
12568
|
//#endregion
|
|
12545
|
-
export { mt as PublicationRuleFunction, Rt as PublishAccessRuleEditor, Ht as PublishAccessRules, ht as PublishCalloutKind,
|
|
12569
|
+
export { Oi as PUBLISH_PANEL_CLASS, mt as PublicationRuleFunction, Rt as PublishAccessRuleEditor, Ht as PublishAccessRules, ht as PublishCalloutKind, Di as PublishFoldersTree, Ii as PublishFooter, Wt as PublishHistoryList, ji as PublishPanel, Vi as StandalonePublishPanel, X as collectFolderKeys, gt as derivePublishState, St as filterFolderTree, vt as formatPublishedDate, Dt as fromFolderPathKey, Mt as getSiblingFolderNames, jt as getUniqueFolderName, Tt as mergeFolderPaths, wt as sortFolderTree, Ot as toDialFileTree, Et as toFolderPathKey, xt as usePublishFlow, At as validateFolderName };
|