@alfadocs/ui-kit 0.75.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{address-fields-COyjgqxA.js → address-fields-7k59FnJ6.js} +2 -2
- package/dist/_chunks/{booking-B1Qkcl3c.js → booking-CLmeXtGv.js} +2 -2
- package/dist/_chunks/{country-select-DYHDLEjG.js → country-select-BN9nedAp.js} +2 -2
- package/dist/_chunks/document-preview-nwfulDEs.js +290 -0
- package/dist/_chunks/{file-manager-UF8dkQF1.js → file-manager-DfTG7bxx.js} +394 -399
- package/dist/_chunks/flag-Cnmivlrl.js +641 -0
- package/dist/_chunks/{header-settings-4cwQzeFc.js → header-settings-DMfdx0Vq.js} +2 -2
- package/dist/_chunks/{locale-picker-GNF3lo8K.js → locale-picker-EyvPrwDc.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-D_1tF4La.js → marketplace-app-shell-Bxq1PYAj.js} +2 -2
- package/dist/_chunks/{patient-details-DP4wKyq4.js → patient-details-zy76MRh7.js} +3 -3
- package/dist/_chunks/periodontal-chart-CYBhr9vc.js +1305 -0
- package/dist/_chunks/{phone-input-dtnrvnZf.js → phone-input-D00ZBAm-.js} +2 -2
- package/dist/agent-catalog.json +149 -1
- package/dist/agent-i18n/en.json +2 -0
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/document-preview/document-preview.d.ts +35 -2
- package/dist/components/document-preview/index.d.ts +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/flag/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/periodontal-chart/index.d.ts +2 -2
- package/dist/components/periodontal-chart/index.js +8 -7
- package/dist/components/periodontal-chart/periodontal-chart-data.d.ts +45 -0
- package/dist/components/periodontal-chart/periodontal-chart.d.ts +3 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +8 -1
- package/dist/i18n/locales/ar.js +8 -1
- package/dist/i18n/locales/de.d.ts +8 -1
- package/dist/i18n/locales/de.js +8 -1
- package/dist/i18n/locales/el.d.ts +8 -1
- package/dist/i18n/locales/el.js +8 -1
- package/dist/i18n/locales/en.d.ts +8 -1
- package/dist/i18n/locales/en.js +8 -1
- package/dist/i18n/locales/es.d.ts +8 -1
- package/dist/i18n/locales/es.js +8 -1
- package/dist/i18n/locales/fr.d.ts +8 -1
- package/dist/i18n/locales/fr.js +8 -1
- package/dist/i18n/locales/hi.d.ts +8 -1
- package/dist/i18n/locales/hi.js +8 -1
- package/dist/i18n/locales/it.d.ts +8 -1
- package/dist/i18n/locales/it.js +8 -1
- package/dist/i18n/locales/ja.d.ts +8 -1
- package/dist/i18n/locales/ja.js +8 -1
- package/dist/i18n/locales/nl.d.ts +8 -1
- package/dist/i18n/locales/nl.js +8 -1
- package/dist/i18n/locales/pl.d.ts +8 -1
- package/dist/i18n/locales/pl.js +8 -1
- package/dist/i18n/locales/pt.d.ts +8 -1
- package/dist/i18n/locales/pt.js +8 -1
- package/dist/i18n/locales/ro.d.ts +8 -1
- package/dist/i18n/locales/ro.js +8 -1
- package/dist/i18n/locales/ru.d.ts +8 -1
- package/dist/i18n/locales/ru.js +8 -1
- package/dist/i18n/locales/sq.d.ts +8 -1
- package/dist/i18n/locales/sq.js +8 -1
- package/dist/i18n/locales/sv.d.ts +8 -1
- package/dist/i18n/locales/sv.js +8 -1
- package/dist/i18n/locales/tr.d.ts +8 -1
- package/dist/i18n/locales/tr.js +8 -1
- package/dist/i18n/locales/zh.d.ts +8 -1
- package/dist/i18n/locales/zh.js +8 -1
- package/dist/index.js +217 -216
- package/dist/locales/ar.json +8 -1
- package/dist/locales/de.json +8 -1
- package/dist/locales/el.json +8 -1
- package/dist/locales/en.json +8 -1
- package/dist/locales/es.json +8 -1
- package/dist/locales/fr.json +8 -1
- package/dist/locales/hi.json +8 -1
- package/dist/locales/it.json +8 -1
- package/dist/locales/ja.json +8 -1
- package/dist/locales/nl.json +8 -1
- package/dist/locales/pl.json +8 -1
- package/dist/locales/pt.json +8 -1
- package/dist/locales/ro.json +8 -1
- package/dist/locales/ru.json +8 -1
- package/dist/locales/sq.json +8 -1
- package/dist/locales/sv.json +8 -1
- package/dist/locales/tr.json +8 -1
- package/dist/locales/zh.json +8 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +2 -1
- package/package.json +1 -1
- package/dist/_chunks/document-preview-CGSM_au9.js +0 -181
- package/dist/_chunks/flag-DZ6V7-hU.js +0 -637
- package/dist/_chunks/periodontal-chart-D8hOFmde.js +0 -1173
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { jsx as n, jsxs as x } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as O, useState as te, useRef as ee, useEffect as ne, useId as
|
|
3
|
-
import { c as
|
|
2
|
+
import { useMemo as O, useState as te, useRef as ee, useEffect as ne, useId as Pe, useCallback as y, forwardRef as yt, useImperativeHandle as bt } from "react";
|
|
3
|
+
import { c as Ve } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as J } from "react-i18next";
|
|
5
|
-
import { B as vt, b as
|
|
6
|
-
import { E as
|
|
5
|
+
import { B as vt, b as He, c as ge } from "./breadcrumb-agut0PwN.js";
|
|
6
|
+
import { E as kt } from "./empty-state-CrLsi0XI.js";
|
|
7
7
|
import { S as he } from "./skeleton-CZbwyJAA.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
8
|
+
import { u as Mt } from "./use-controllable-state-BiY4xTzM.js";
|
|
9
|
+
import { u as Ct } from "./registry-DvAUVLHh.js";
|
|
10
10
|
import { B as X } from "./button-CPGiR_bH.js";
|
|
11
11
|
import { D as m } from "./dialog-UbKJCi1X.js";
|
|
12
|
-
import { a as wt, F as
|
|
13
|
-
import { T as
|
|
12
|
+
import { a as wt, F as xt, C as St } from "./file-upload-DENvuhfs.js";
|
|
13
|
+
import { T as We } from "./text-input-CUvCb6ST.js";
|
|
14
14
|
import { c as ie } from "./createLucideIcon-DhHxpK9K.js";
|
|
15
|
-
import { F as
|
|
16
|
-
import { F as
|
|
17
|
-
import { F as
|
|
18
|
-
import { C as
|
|
19
|
-
import { A as
|
|
20
|
-
import { B as
|
|
21
|
-
import { D as
|
|
22
|
-
import { P as
|
|
23
|
-
import { P as
|
|
24
|
-
import { T as
|
|
15
|
+
import { F as Nt, a as Tt } from "./file-Cwe9VC1A.js";
|
|
16
|
+
import { F as Ft } from "./file-text-5yv6r2ls.js";
|
|
17
|
+
import { F as At } from "./file-spreadsheet-DmwyfV4O.js";
|
|
18
|
+
import { C as Dt } from "./chevron-right-I9AeSxH2.js";
|
|
19
|
+
import { A as Rt, d as It, D as Te } from "./actions-cell-renderer-DLrcSTK_.js";
|
|
20
|
+
import { B as $e } from "./badge-DCOqV9mI.js";
|
|
21
|
+
import { D as Ge } from "./download-CfYKJO_j.js";
|
|
22
|
+
import { P as zt } from "./pen-line-D0De5zdl.js";
|
|
23
|
+
import { P as Ue } from "./pencil-B1sKKyuT.js";
|
|
24
|
+
import { T as Ye } from "./trash-2-uumy3fy1.js";
|
|
25
25
|
import { I as Q } from "./icon-button-C_kbcd7I.js";
|
|
26
|
-
import { I as
|
|
27
|
-
import { U as
|
|
28
|
-
import { P as
|
|
26
|
+
import { I as _t } from "./icon-button-group-C_lqXTAj.js";
|
|
27
|
+
import { U as Lt } from "./upload-BfT2hzMg.js";
|
|
28
|
+
import { P as Kt } from "./plus-DzMQ_c6b.js";
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v1.22.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const Et = [
|
|
36
36
|
[
|
|
37
37
|
"path",
|
|
38
38
|
{
|
|
@@ -48,14 +48,14 @@ const Kt = [
|
|
|
48
48
|
key: "1etmh7"
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
|
-
],
|
|
51
|
+
], Bt = ie("file-headphone", Et);
|
|
52
52
|
/**
|
|
53
53
|
* @license lucide-react v1.22.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
57
|
*/
|
|
58
|
-
const
|
|
58
|
+
const Ht = [
|
|
59
59
|
[
|
|
60
60
|
"path",
|
|
61
61
|
{
|
|
@@ -71,14 +71,14 @@ const Bt = [
|
|
|
71
71
|
key: "1tzo1f"
|
|
72
72
|
}
|
|
73
73
|
]
|
|
74
|
-
],
|
|
74
|
+
], Ot = ie("file-play", Ht);
|
|
75
75
|
/**
|
|
76
76
|
* @license lucide-react v1.22.0 - ISC
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
80
|
*/
|
|
81
|
-
const
|
|
81
|
+
const qt = [
|
|
82
82
|
[
|
|
83
83
|
"path",
|
|
84
84
|
{
|
|
@@ -88,14 +88,14 @@ const Ot = [
|
|
|
88
88
|
],
|
|
89
89
|
["path", { d: "M2 13h10", key: "pgb2dq" }],
|
|
90
90
|
["path", { d: "m9 16 3-3-3-3", key: "6m91ic" }]
|
|
91
|
-
],
|
|
91
|
+
], Ze = ie("folder-input", qt);
|
|
92
92
|
/**
|
|
93
93
|
* @license lucide-react v1.22.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
97
|
*/
|
|
98
|
-
const
|
|
98
|
+
const jt = [
|
|
99
99
|
[
|
|
100
100
|
"path",
|
|
101
101
|
{
|
|
@@ -103,14 +103,14 @@ const qt = [
|
|
|
103
103
|
key: "usdka0"
|
|
104
104
|
}
|
|
105
105
|
]
|
|
106
|
-
],
|
|
106
|
+
], Pt = ie("folder-open", jt);
|
|
107
107
|
/**
|
|
108
108
|
* @license lucide-react v1.22.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
112
|
*/
|
|
113
|
-
const
|
|
113
|
+
const Vt = [
|
|
114
114
|
["path", { d: "M12 10v6", key: "1bos4e" }],
|
|
115
115
|
["path", { d: "M9 13h6", key: "1uhe8q" }],
|
|
116
116
|
[
|
|
@@ -120,14 +120,14 @@ const Pt = [
|
|
|
120
120
|
key: "1kt360"
|
|
121
121
|
}
|
|
122
122
|
]
|
|
123
|
-
],
|
|
123
|
+
], Wt = ie("folder-plus", Vt);
|
|
124
124
|
/**
|
|
125
125
|
* @license lucide-react v1.22.0 - ISC
|
|
126
126
|
*
|
|
127
127
|
* This source code is licensed under the ISC license.
|
|
128
128
|
* See the LICENSE file in the root directory of this source tree.
|
|
129
129
|
*/
|
|
130
|
-
const
|
|
130
|
+
const $t = [
|
|
131
131
|
[
|
|
132
132
|
"path",
|
|
133
133
|
{
|
|
@@ -135,20 +135,20 @@ const Wt = [
|
|
|
135
135
|
key: "1kt360"
|
|
136
136
|
}
|
|
137
137
|
]
|
|
138
|
-
],
|
|
138
|
+
], Xe = ie("folder", $t);
|
|
139
139
|
/**
|
|
140
140
|
* @license lucide-react v1.22.0 - ISC
|
|
141
141
|
*
|
|
142
142
|
* This source code is licensed under the ISC license.
|
|
143
143
|
* See the LICENSE file in the root directory of this source tree.
|
|
144
144
|
*/
|
|
145
|
-
const
|
|
145
|
+
const Gt = [
|
|
146
146
|
["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }],
|
|
147
147
|
["circle", { cx: "6", cy: "12", r: "3", key: "w7nqdw" }],
|
|
148
148
|
["circle", { cx: "18", cy: "19", r: "3", key: "1xt0gg" }],
|
|
149
149
|
["line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49", key: "47mynk" }],
|
|
150
150
|
["line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49", key: "1n3mei" }]
|
|
151
|
-
],
|
|
151
|
+
], Je = ie("share-2", Gt), Ut = {
|
|
152
152
|
type: "array",
|
|
153
153
|
items: {
|
|
154
154
|
type: "object",
|
|
@@ -172,7 +172,7 @@ const $t = [
|
|
|
172
172
|
},
|
|
173
173
|
required: ["id", "kind", "parentId"]
|
|
174
174
|
}
|
|
175
|
-
},
|
|
175
|
+
}, Yt = {
|
|
176
176
|
id: "file-manager",
|
|
177
177
|
// select_multiple → select_items / clear_selection; navigate → navigate;
|
|
178
178
|
// filter → set_type_filter (proxied to the DataTable's documentType column);
|
|
@@ -321,7 +321,7 @@ const $t = [
|
|
|
321
321
|
}
|
|
322
322
|
},
|
|
323
323
|
returns: "Array<{ id, kind, parentId, size, updatedAt }>",
|
|
324
|
-
returnsSchema:
|
|
324
|
+
returnsSchema: Ut,
|
|
325
325
|
idempotent: !0,
|
|
326
326
|
descriptionKey: "ui.agent.fileManager.actions.listItems",
|
|
327
327
|
description: "List structural metadata (ids, kinds, sizes, dates — never names) for a folder or the whole tree.",
|
|
@@ -379,33 +379,33 @@ const $t = [
|
|
|
379
379
|
description: "Grid cards and folder-tree nodes carry the item id as data-item-id (ids only — never names). List-view rows are AG Grid rows inside the composed DataTable and carry its native row-id attribute keyed to the same ids."
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
},
|
|
382
|
+
}, Zt = [
|
|
383
383
|
"fileManager.units.bytes",
|
|
384
384
|
"fileManager.units.kilobytes",
|
|
385
385
|
"fileManager.units.megabytes",
|
|
386
386
|
"fileManager.units.gigabytes"
|
|
387
|
-
],
|
|
388
|
-
function
|
|
387
|
+
], Oe = ["B", "KB", "MB", "GB"];
|
|
388
|
+
function Xt(t, r, l) {
|
|
389
389
|
let i = t, a = 0;
|
|
390
|
-
for (; i >= 1024 && a <
|
|
390
|
+
for (; i >= 1024 && a < Oe.length - 1; )
|
|
391
391
|
i /= 1024, a++;
|
|
392
392
|
return `${new Intl.NumberFormat(r, {
|
|
393
393
|
maximumFractionDigits: a === 0 ? 0 : 1
|
|
394
|
-
}).format(i)} ${l(
|
|
394
|
+
}).format(i)} ${l(Zt[a], Oe[a])}`;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
if (t.kind === "folder") return
|
|
396
|
+
function Jt(t) {
|
|
397
|
+
if (t.kind === "folder") return Xe;
|
|
398
398
|
const r = t.mimeType ?? "";
|
|
399
|
-
return r.startsWith("image/") ?
|
|
399
|
+
return r.startsWith("image/") ? Nt : r.startsWith("audio/") ? Bt : r.startsWith("video/") ? Ot : r === "application/pdf" || r.startsWith("text/") || r.includes("word") || r.includes("rtf") ? Ft : r.includes("zip") || r.includes("compressed") || r.includes("tar") ? wt : r.includes("spreadsheet") || r.includes("excel") || r === "text/csv" ? At : Tt;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function Qe(t, r, l) {
|
|
402
402
|
const i = new Intl.Collator(l, {
|
|
403
403
|
numeric: !0,
|
|
404
404
|
sensitivity: "base"
|
|
405
405
|
});
|
|
406
406
|
return t.filter((a) => a.parentId === r).sort((a, u) => a.kind !== u.kind ? a.kind === "folder" ? -1 : 1 : i.compare(a.name, u.name));
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function Qt(t, r, l) {
|
|
409
409
|
const i = /* @__PURE__ */ new Set();
|
|
410
410
|
for (const c of t)
|
|
411
411
|
c.parentId === r && i.add(c.id);
|
|
@@ -421,7 +421,7 @@ function Jt(t, r, l) {
|
|
|
421
421
|
});
|
|
422
422
|
return t.filter((c) => i.has(c.id)).sort((c, F) => c.kind !== F.kind ? c.kind === "folder" ? -1 : 1 : u.compare(c.name, F.name));
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function en(t, r, l) {
|
|
425
425
|
const i = [];
|
|
426
426
|
let a = t;
|
|
427
427
|
const u = /* @__PURE__ */ new Set();
|
|
@@ -429,7 +429,7 @@ function Qt(t, r, l) {
|
|
|
429
429
|
a = a.parentId === null ? void 0 : r.get(a.parentId);
|
|
430
430
|
return i;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function tn(t, r) {
|
|
433
433
|
const l = new Map(t.map((c) => [c.id, c])), i = [];
|
|
434
434
|
let a = r === null ? void 0 : l.get(r);
|
|
435
435
|
const u = /* @__PURE__ */ new Set();
|
|
@@ -437,7 +437,7 @@ function en(t, r) {
|
|
|
437
437
|
u.add(a.id), i.unshift(a), a = a.parentId === null ? void 0 : l.get(a.parentId);
|
|
438
438
|
return i;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function nn(t, r) {
|
|
441
441
|
const l = new Set(r);
|
|
442
442
|
let i = !0;
|
|
443
443
|
for (; i; ) {
|
|
@@ -447,12 +447,12 @@ function tn(t, r) {
|
|
|
447
447
|
}
|
|
448
448
|
return l;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function et(t, r) {
|
|
451
451
|
if (t.length !== r.length) return !1;
|
|
452
452
|
const l = new Set(t);
|
|
453
453
|
return r.every((i) => l.has(i));
|
|
454
454
|
}
|
|
455
|
-
const pe = "__root__", se = (t) => t ?? pe,
|
|
455
|
+
const pe = "__root__", se = (t) => t ?? pe, rn = Ve(
|
|
456
456
|
[
|
|
457
457
|
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
458
458
|
"ds:min-h-[var(--min-target-size)] ds:w-full",
|
|
@@ -472,8 +472,8 @@ const pe = "__root__", se = (t) => t ?? pe, nn = Pe(
|
|
|
472
472
|
defaultVariants: { selected: !1 }
|
|
473
473
|
}
|
|
474
474
|
);
|
|
475
|
-
function
|
|
476
|
-
const i = (a) =>
|
|
475
|
+
function an(t, r, l) {
|
|
476
|
+
const i = (a) => Qe(t, a, r).filter((u) => u.kind === "folder" && !(l != null && l.has(u.id))).map((u) => ({
|
|
477
477
|
key: se(u.id),
|
|
478
478
|
folderId: u.id,
|
|
479
479
|
item: u,
|
|
@@ -481,17 +481,17 @@ function rn(t, r, l) {
|
|
|
481
481
|
}));
|
|
482
482
|
return { key: pe, folderId: null, children: i(null) };
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function on(t, r) {
|
|
485
485
|
const l = [], i = (a) => {
|
|
486
486
|
l.push(a), r.has(a.key) && a.children.forEach(i);
|
|
487
487
|
};
|
|
488
488
|
return i(t), l;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function ln(t) {
|
|
491
491
|
var r;
|
|
492
492
|
return t.folderId === null ? null : se(((r = t.item) == null ? void 0 : r.parentId) ?? null);
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function tt({
|
|
495
495
|
items: t,
|
|
496
496
|
selectedFolderId: r,
|
|
497
497
|
onSelectFolder: l,
|
|
@@ -499,71 +499,71 @@ function et({
|
|
|
499
499
|
excludeIds: a
|
|
500
500
|
}) {
|
|
501
501
|
const { t: u, i18n: c } = J(), F = c.dir() === "rtl", S = O(
|
|
502
|
-
() =>
|
|
502
|
+
() => an(t, c.language, a),
|
|
503
503
|
[t, c.language, a]
|
|
504
|
-
), [
|
|
504
|
+
), [b, k] = te(
|
|
505
505
|
() => /* @__PURE__ */ new Set([pe])
|
|
506
|
-
), [D,
|
|
506
|
+
), [D, z] = te(se(r)), R = ee(/* @__PURE__ */ new Map());
|
|
507
507
|
ne(() => {
|
|
508
|
-
|
|
509
|
-
const
|
|
510
|
-
|
|
508
|
+
k((o) => {
|
|
509
|
+
const v = new Set(o);
|
|
510
|
+
v.add(pe);
|
|
511
511
|
const A = new Map(t.map((B) => [B.id, B]));
|
|
512
512
|
let g = r ? A.get(r) : void 0;
|
|
513
513
|
const E = /* @__PURE__ */ new Set();
|
|
514
514
|
for (; g && !E.has(g.id); )
|
|
515
|
-
E.add(g.id), g.parentId !== null &&
|
|
516
|
-
return
|
|
517
|
-
}),
|
|
515
|
+
E.add(g.id), g.parentId !== null && v.add(se(g.parentId)), g = g.parentId === null ? void 0 : A.get(g.parentId);
|
|
516
|
+
return v;
|
|
517
|
+
}), z(se(r));
|
|
518
518
|
}, [r, t]);
|
|
519
|
-
const
|
|
520
|
-
() =>
|
|
521
|
-
[S,
|
|
519
|
+
const M = O(
|
|
520
|
+
() => on(S, b),
|
|
521
|
+
[S, b]
|
|
522
522
|
);
|
|
523
523
|
ne(() => {
|
|
524
524
|
var o;
|
|
525
|
-
|
|
526
|
-
}, [
|
|
527
|
-
const
|
|
528
|
-
var
|
|
529
|
-
|
|
530
|
-
}, V = (o,
|
|
531
|
-
|
|
525
|
+
M.some((v) => v.key === D) || z(((o = M[0]) == null ? void 0 : o.key) ?? pe);
|
|
526
|
+
}, [M, D]);
|
|
527
|
+
const _ = (o) => {
|
|
528
|
+
var v;
|
|
529
|
+
z(o), (v = R.current.get(o)) == null || v.focus();
|
|
530
|
+
}, V = (o, v) => {
|
|
531
|
+
k((A) => {
|
|
532
532
|
const g = new Set(A);
|
|
533
|
-
return
|
|
533
|
+
return v ?? !g.has(o) ? g.add(o) : g.delete(o), g;
|
|
534
534
|
});
|
|
535
535
|
}, P = (o) => {
|
|
536
|
-
const
|
|
536
|
+
const v = o.target.closest(
|
|
537
537
|
"[data-tree-key]"
|
|
538
|
-
), A =
|
|
538
|
+
), A = v == null ? void 0 : v.getAttribute("data-tree-key");
|
|
539
539
|
if (!A) return;
|
|
540
|
-
const g =
|
|
540
|
+
const g = M.findIndex((L) => L.key === A);
|
|
541
541
|
if (g < 0) return;
|
|
542
|
-
const E =
|
|
542
|
+
const E = M[g], B = E.children.length > 0, G = b.has(A), re = F ? "ArrowLeft" : "ArrowRight", T = F ? "ArrowRight" : "ArrowLeft";
|
|
543
543
|
switch (o.key) {
|
|
544
544
|
case "ArrowDown":
|
|
545
|
-
g <
|
|
545
|
+
g < M.length - 1 && _(M[g + 1].key);
|
|
546
546
|
break;
|
|
547
547
|
case "ArrowUp":
|
|
548
|
-
g > 0 &&
|
|
548
|
+
g > 0 && _(M[g - 1].key);
|
|
549
549
|
break;
|
|
550
550
|
case re:
|
|
551
|
-
B && !G ? V(A, !0) : B && G &&
|
|
551
|
+
B && !G ? V(A, !0) : B && G && _(E.children[0].key);
|
|
552
552
|
break;
|
|
553
|
-
case
|
|
553
|
+
case T: {
|
|
554
554
|
if (B && G)
|
|
555
555
|
V(A, !1);
|
|
556
556
|
else {
|
|
557
|
-
const
|
|
558
|
-
|
|
557
|
+
const L = ln(E);
|
|
558
|
+
L !== null && _(L);
|
|
559
559
|
}
|
|
560
560
|
break;
|
|
561
561
|
}
|
|
562
562
|
case "Home":
|
|
563
|
-
|
|
563
|
+
_(M[0].key);
|
|
564
564
|
break;
|
|
565
565
|
case "End":
|
|
566
|
-
|
|
566
|
+
_(M[M.length - 1].key);
|
|
567
567
|
break;
|
|
568
568
|
case "Enter":
|
|
569
569
|
case " ":
|
|
@@ -574,35 +574,35 @@ function et({
|
|
|
574
574
|
}
|
|
575
575
|
o.preventDefault(), o.stopPropagation();
|
|
576
576
|
}, W = (o) => {
|
|
577
|
-
var
|
|
578
|
-
const
|
|
579
|
-
|
|
580
|
-
}, re = (
|
|
581
|
-
|
|
577
|
+
var T;
|
|
578
|
+
const v = se(r) === o.key, A = b.has(o.key), g = o.children.length > 0, E = o.folderId === null ? u("fileManager.rootLabel", "All files") : ((T = o.item) == null ? void 0 : T.name) ?? "", B = A && g ? Pt : Xe, G = (L) => {
|
|
579
|
+
L.stopPropagation(), z(o.key), l(o.folderId), g && V(o.key, !0);
|
|
580
|
+
}, re = (L) => {
|
|
581
|
+
L.stopPropagation(), V(o.key);
|
|
582
582
|
};
|
|
583
583
|
return (
|
|
584
584
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events -- treeitem row; keyboard operation is handled at the role="tree" container via roving tabindex + onKeyDown
|
|
585
585
|
/* @__PURE__ */ x(
|
|
586
586
|
"li",
|
|
587
587
|
{
|
|
588
|
-
ref: (
|
|
589
|
-
|
|
588
|
+
ref: (L) => {
|
|
589
|
+
L ? R.current.set(o.key, L) : R.current.delete(o.key);
|
|
590
590
|
},
|
|
591
591
|
role: "treeitem",
|
|
592
592
|
"aria-expanded": g ? A : void 0,
|
|
593
|
-
"aria-selected":
|
|
593
|
+
"aria-selected": v,
|
|
594
594
|
tabIndex: D === o.key ? 0 : -1,
|
|
595
595
|
"data-tree-key": o.key,
|
|
596
596
|
"data-item-id": o.folderId ?? void 0,
|
|
597
597
|
onClick: G,
|
|
598
|
-
onFocus: () =>
|
|
598
|
+
onFocus: () => z(o.key),
|
|
599
599
|
className: [
|
|
600
600
|
"ds:list-none ds:rounded-[var(--radius-md)]",
|
|
601
601
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
602
602
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
603
603
|
].join(" "),
|
|
604
604
|
children: [
|
|
605
|
-
/* @__PURE__ */ x("div", { className:
|
|
605
|
+
/* @__PURE__ */ x("div", { className: rn({ selected: v }), children: [
|
|
606
606
|
g ? /* @__PURE__ */ n(
|
|
607
607
|
"span",
|
|
608
608
|
{
|
|
@@ -610,7 +610,7 @@ function et({
|
|
|
610
610
|
onClick: re,
|
|
611
611
|
className: "ds:inline-flex ds:size-5 ds:shrink-0 ds:items-center ds:justify-center ds:text-muted-foreground",
|
|
612
612
|
children: /* @__PURE__ */ n(
|
|
613
|
-
|
|
613
|
+
Dt,
|
|
614
614
|
{
|
|
615
615
|
className: [
|
|
616
616
|
"ds:size-4",
|
|
@@ -656,23 +656,23 @@ function et({
|
|
|
656
656
|
}
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
|
-
const
|
|
660
|
-
function
|
|
661
|
-
return t.replace(
|
|
659
|
+
const sn = /[\\/:*?"<>|]/g, Ae = 128;
|
|
660
|
+
function nt(t) {
|
|
661
|
+
return t.replace(sn, "").slice(0, Ae);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function dn({
|
|
664
664
|
open: t,
|
|
665
665
|
onOpenChange: r,
|
|
666
666
|
onSubmit: l
|
|
667
667
|
}) {
|
|
668
|
-
const { t: i } = J(), a =
|
|
668
|
+
const { t: i } = J(), a = Pe(), [u, c] = te("");
|
|
669
669
|
ne(() => {
|
|
670
670
|
t && c("");
|
|
671
671
|
}, [t]);
|
|
672
672
|
const F = (S) => {
|
|
673
673
|
S.preventDefault();
|
|
674
|
-
const
|
|
675
|
-
|
|
674
|
+
const b = u.trim();
|
|
675
|
+
b.length !== 0 && l(b);
|
|
676
676
|
};
|
|
677
677
|
return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
|
|
678
678
|
/* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: i("fileManager.dialogs.createFolder.title", "New folder") }) }),
|
|
@@ -687,12 +687,12 @@ function sn({
|
|
|
687
687
|
}
|
|
688
688
|
),
|
|
689
689
|
/* @__PURE__ */ n(
|
|
690
|
-
|
|
690
|
+
We,
|
|
691
691
|
{
|
|
692
692
|
id: a,
|
|
693
693
|
value: u,
|
|
694
694
|
maxLength: Ae,
|
|
695
|
-
onChange: (S) => c(
|
|
695
|
+
onChange: (S) => c(nt(S.target.value)),
|
|
696
696
|
autoFocus: !0
|
|
697
697
|
}
|
|
698
698
|
)
|
|
@@ -712,7 +712,7 @@ function sn({
|
|
|
712
712
|
] })
|
|
713
713
|
] }) });
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function cn({
|
|
716
716
|
open: t,
|
|
717
717
|
onOpenChange: r,
|
|
718
718
|
onUpload: l,
|
|
@@ -725,7 +725,7 @@ function dn({
|
|
|
725
725
|
folder: i
|
|
726
726
|
}) }) }),
|
|
727
727
|
/* @__PURE__ */ n(m.Body, { children: /* @__PURE__ */ n(
|
|
728
|
-
|
|
728
|
+
xt,
|
|
729
729
|
{
|
|
730
730
|
variant: "both",
|
|
731
731
|
multiple: (a == null ? void 0 : a.multiple) ?? !0,
|
|
@@ -737,20 +737,20 @@ function dn({
|
|
|
737
737
|
/* @__PURE__ */ n(m.Footer, { children: /* @__PURE__ */ n(m.Close, { asChild: !0, children: /* @__PURE__ */ n(X, { type: "button", intent: "outline", children: u("fileManager.dialogs.upload.close", "Done") }) }) })
|
|
738
738
|
] }) });
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function un({
|
|
741
741
|
open: t,
|
|
742
742
|
onOpenChange: r,
|
|
743
743
|
initialName: l,
|
|
744
744
|
onSubmit: i
|
|
745
745
|
}) {
|
|
746
|
-
const { t: a } = J(), u =
|
|
746
|
+
const { t: a } = J(), u = Pe(), [c, F] = te(l);
|
|
747
747
|
ne(() => {
|
|
748
748
|
t && F(l);
|
|
749
749
|
}, [t, l]);
|
|
750
|
-
const S = (
|
|
751
|
-
|
|
752
|
-
const
|
|
753
|
-
|
|
750
|
+
const S = (b) => {
|
|
751
|
+
b.preventDefault();
|
|
752
|
+
const k = c.trim();
|
|
753
|
+
k.length !== 0 && i(k);
|
|
754
754
|
};
|
|
755
755
|
return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
|
|
756
756
|
/* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: a("fileManager.dialogs.rename.title", "Rename") }) }),
|
|
@@ -765,12 +765,12 @@ function cn({
|
|
|
765
765
|
}
|
|
766
766
|
),
|
|
767
767
|
/* @__PURE__ */ n(
|
|
768
|
-
|
|
768
|
+
We,
|
|
769
769
|
{
|
|
770
770
|
id: u,
|
|
771
771
|
value: c,
|
|
772
772
|
maxLength: Ae,
|
|
773
|
-
onChange: (
|
|
773
|
+
onChange: (b) => F(nt(b.target.value)),
|
|
774
774
|
autoFocus: !0
|
|
775
775
|
}
|
|
776
776
|
)
|
|
@@ -790,7 +790,7 @@ function cn({
|
|
|
790
790
|
] })
|
|
791
791
|
] }) });
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function fn({
|
|
794
794
|
open: t,
|
|
795
795
|
onOpenChange: r,
|
|
796
796
|
count: l,
|
|
@@ -811,7 +811,7 @@ function un({
|
|
|
811
811
|
] })
|
|
812
812
|
] }) });
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function pn({
|
|
815
815
|
open: t,
|
|
816
816
|
onOpenChange: r,
|
|
817
817
|
items: l,
|
|
@@ -823,13 +823,13 @@ function fn({
|
|
|
823
823
|
ne(() => {
|
|
824
824
|
t && S(a);
|
|
825
825
|
}, [t, a]);
|
|
826
|
-
const
|
|
826
|
+
const b = nn(l, i);
|
|
827
827
|
return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
|
|
828
828
|
/* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: c("fileManager.dialogs.move.title", "Move {{count}} items", {
|
|
829
829
|
count: i.length
|
|
830
830
|
}) }) }),
|
|
831
831
|
/* @__PURE__ */ n(m.Body, { children: /* @__PURE__ */ n("div", { className: "ds:max-h-72 ds:overflow-y-auto ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:p-[var(--spacing-xs)]", children: /* @__PURE__ */ n(
|
|
832
|
-
|
|
832
|
+
tt,
|
|
833
833
|
{
|
|
834
834
|
items: l,
|
|
835
835
|
selectedFolderId: F,
|
|
@@ -838,7 +838,7 @@ function fn({
|
|
|
838
838
|
"fileManager.dialogs.move.treeLabel",
|
|
839
839
|
"Destination folder"
|
|
840
840
|
),
|
|
841
|
-
excludeIds:
|
|
841
|
+
excludeIds: b
|
|
842
842
|
}
|
|
843
843
|
) }) }),
|
|
844
844
|
/* @__PURE__ */ x(m.Footer, { children: [
|
|
@@ -855,19 +855,19 @@ function fn({
|
|
|
855
855
|
] })
|
|
856
856
|
] }) });
|
|
857
857
|
}
|
|
858
|
-
const
|
|
858
|
+
const mn = {
|
|
859
859
|
signed: "success",
|
|
860
860
|
pending: "warning"
|
|
861
861
|
};
|
|
862
|
-
function
|
|
862
|
+
function qe(t) {
|
|
863
863
|
return function(l) {
|
|
864
864
|
const i = l.data;
|
|
865
865
|
if (!i) return null;
|
|
866
|
-
const a =
|
|
866
|
+
const a = Jt(i), u = !!t && i.id === t;
|
|
867
867
|
return /* @__PURE__ */ x(
|
|
868
868
|
"span",
|
|
869
869
|
{
|
|
870
|
-
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:min-
|
|
870
|
+
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:[inline-size:100%] ds:[min-inline-size:0]",
|
|
871
871
|
"aria-current": u ? "true" : void 0,
|
|
872
872
|
children: [
|
|
873
873
|
/* @__PURE__ */ n(
|
|
@@ -876,28 +876,30 @@ function Oe(t) {
|
|
|
876
876
|
"aria-hidden": "true",
|
|
877
877
|
className: [
|
|
878
878
|
"ds:size-4 ds:shrink-0",
|
|
879
|
-
|
|
879
|
+
// Folders keep the brand primary; file glyphs take the accent, so
|
|
880
|
+
// they read as documents and match the DocumentPreview header icon.
|
|
881
|
+
i.kind === "folder" ? "ds:text-primary" : "ds:text-[color:var(--accent)]"
|
|
880
882
|
].join(" ")
|
|
881
883
|
}
|
|
882
884
|
),
|
|
883
|
-
/* @__PURE__ */ n("span", { className: "ds:truncate", children: i.name })
|
|
885
|
+
/* @__PURE__ */ n("span", { className: "ds:truncate ds:[min-inline-size:0]", children: i.name })
|
|
884
886
|
]
|
|
885
887
|
}
|
|
886
888
|
);
|
|
887
889
|
};
|
|
888
890
|
}
|
|
889
|
-
function
|
|
891
|
+
function gn(t) {
|
|
890
892
|
const r = t.data;
|
|
891
|
-
return !r || !r.documentType ? null : /* @__PURE__ */ n(
|
|
893
|
+
return !r || !r.documentType ? null : /* @__PURE__ */ n($e, { variant: "neutral", size: "sm", children: r.documentType });
|
|
892
894
|
}
|
|
893
|
-
function
|
|
895
|
+
function hn(t) {
|
|
894
896
|
return function(l) {
|
|
895
897
|
var a;
|
|
896
898
|
const i = (a = l.data) == null ? void 0 : a.signatureStatus;
|
|
897
|
-
return !i || i === "none" ? null : /* @__PURE__ */ n(
|
|
899
|
+
return !i || i === "none" ? null : /* @__PURE__ */ n($e, { variant: mn[i], size: "sm", withDot: !0, children: t(`fileManager.signature.${i}`, i) });
|
|
898
900
|
};
|
|
899
901
|
}
|
|
900
|
-
function
|
|
902
|
+
function yn({
|
|
901
903
|
items: t,
|
|
902
904
|
selectedIds: r,
|
|
903
905
|
previewedItemId: l,
|
|
@@ -907,18 +909,18 @@ function hn({
|
|
|
907
909
|
can: c,
|
|
908
910
|
onRequestRename: F,
|
|
909
911
|
onRequestMove: S,
|
|
910
|
-
onRequestDelete:
|
|
911
|
-
onDownload:
|
|
912
|
+
onRequestDelete: b,
|
|
913
|
+
onDownload: k,
|
|
912
914
|
onShare: D,
|
|
913
|
-
onRequestSignature:
|
|
914
|
-
itemActions:
|
|
915
|
-
groupByFolder:
|
|
916
|
-
currentFolderId:
|
|
915
|
+
onRequestSignature: z,
|
|
916
|
+
itemActions: R,
|
|
917
|
+
groupByFolder: M = !1,
|
|
918
|
+
currentFolderId: _,
|
|
917
919
|
gridId: V,
|
|
918
920
|
tableRef: P,
|
|
919
921
|
toolbarActions: W
|
|
920
922
|
}) {
|
|
921
|
-
const { t: o, i18n:
|
|
923
|
+
const { t: o, i18n: v } = J(), A = O(
|
|
922
924
|
() => new Map(t.map((f) => [f.id, f])),
|
|
923
925
|
[t]
|
|
924
926
|
), g = O(
|
|
@@ -936,53 +938,53 @@ function hn({
|
|
|
936
938
|
}, [r, t]);
|
|
937
939
|
const B = O(() => {
|
|
938
940
|
const f = [];
|
|
939
|
-
if (
|
|
940
|
-
icon: /* @__PURE__ */ n(
|
|
941
|
+
if (k && f.push({
|
|
942
|
+
icon: /* @__PURE__ */ n(Ge, {}),
|
|
941
943
|
label: o("fileManager.toolbar.download", "Download"),
|
|
942
|
-
onClick: (d) =>
|
|
944
|
+
onClick: (d) => k([d.id]),
|
|
943
945
|
hidden: (d) => d.kind === "folder" || !c(d).download
|
|
944
|
-
}),
|
|
945
|
-
icon: /* @__PURE__ */ n(
|
|
946
|
+
}), z && f.push({
|
|
947
|
+
icon: /* @__PURE__ */ n(zt, {}),
|
|
946
948
|
label: o("fileManager.toolbar.requestSignature", "Request signature"),
|
|
947
|
-
onClick: (d) =>
|
|
949
|
+
onClick: (d) => z(d),
|
|
948
950
|
hidden: (d) => d.signatureStatus !== "pending"
|
|
949
951
|
}), D && f.push({
|
|
950
|
-
icon: /* @__PURE__ */ n(
|
|
952
|
+
icon: /* @__PURE__ */ n(Je, {}),
|
|
951
953
|
label: o("fileManager.toolbar.share", "Share"),
|
|
952
954
|
onClick: (d) => D([d.id]),
|
|
953
955
|
hidden: (d) => !c(d).share
|
|
954
956
|
}), f.push({
|
|
955
|
-
icon: /* @__PURE__ */ n(
|
|
957
|
+
icon: /* @__PURE__ */ n(Ue, {}),
|
|
956
958
|
label: o("fileManager.toolbar.rename", "Rename"),
|
|
957
959
|
onClick: (d) => F(d.id),
|
|
958
960
|
hidden: (d) => !c(d).rename
|
|
959
961
|
}), f.push({
|
|
960
|
-
icon: /* @__PURE__ */ n(
|
|
962
|
+
icon: /* @__PURE__ */ n(Ze, {}),
|
|
961
963
|
label: o("fileManager.toolbar.move", "Move"),
|
|
962
964
|
onClick: (d) => S([d.id]),
|
|
963
965
|
hidden: (d) => !c(d).move
|
|
964
966
|
}), f.push({
|
|
965
|
-
icon: /* @__PURE__ */ n(
|
|
967
|
+
icon: /* @__PURE__ */ n(Ye, {}),
|
|
966
968
|
label: o("fileManager.toolbar.delete", "Delete"),
|
|
967
|
-
onClick: (d) =>
|
|
969
|
+
onClick: (d) => b([d.id]),
|
|
968
970
|
variant: "destructive",
|
|
969
971
|
hidden: (d) => !c(d).delete
|
|
970
|
-
}),
|
|
972
|
+
}), R) {
|
|
971
973
|
const d = /* @__PURE__ */ new Set();
|
|
972
974
|
for (const h of t)
|
|
973
|
-
for (const
|
|
974
|
-
if (d.has(
|
|
975
|
-
d.add(
|
|
976
|
-
const $ =
|
|
975
|
+
for (const I of R(h)) {
|
|
976
|
+
if (d.has(I.id)) continue;
|
|
977
|
+
d.add(I.id);
|
|
978
|
+
const $ = I.id;
|
|
977
979
|
f.push({
|
|
978
|
-
icon:
|
|
979
|
-
label:
|
|
980
|
-
onClick: (
|
|
981
|
-
var
|
|
982
|
-
return (
|
|
980
|
+
icon: I.icon ?? /* @__PURE__ */ n("span", { "aria-hidden": "true" }),
|
|
981
|
+
label: I.label,
|
|
982
|
+
onClick: (w) => {
|
|
983
|
+
var K;
|
|
984
|
+
return (K = R(w).find((de) => de.id === $)) == null ? void 0 : K.onSelect(w);
|
|
983
985
|
},
|
|
984
|
-
variant:
|
|
985
|
-
hidden: (
|
|
986
|
+
variant: I.destructive ? "destructive" : "default",
|
|
987
|
+
hidden: (w) => !R(w).some((K) => K.id === $)
|
|
986
988
|
});
|
|
987
989
|
}
|
|
988
990
|
}
|
|
@@ -990,17 +992,17 @@ function hn({
|
|
|
990
992
|
}, [
|
|
991
993
|
t,
|
|
992
994
|
c,
|
|
993
|
-
|
|
995
|
+
k,
|
|
994
996
|
D,
|
|
995
|
-
|
|
997
|
+
z,
|
|
996
998
|
F,
|
|
997
999
|
S,
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
+
b,
|
|
1001
|
+
R,
|
|
1000
1002
|
o
|
|
1001
1003
|
]), G = O(() => {
|
|
1002
|
-
const f =
|
|
1003
|
-
return
|
|
1004
|
+
const f = hn(o), d = qe(l), h = [];
|
|
1005
|
+
return M || h.push({
|
|
1004
1006
|
colId: "name",
|
|
1005
1007
|
field: "name",
|
|
1006
1008
|
headerName: o("fileManager.columns.name", "Name"),
|
|
@@ -1011,7 +1013,7 @@ function hn({
|
|
|
1011
1013
|
colId: "documentType",
|
|
1012
1014
|
field: "documentType",
|
|
1013
1015
|
headerName: o("fileManager.columns.type", "Type"),
|
|
1014
|
-
cellRenderer:
|
|
1016
|
+
cellRenderer: gn,
|
|
1015
1017
|
flex: 1,
|
|
1016
1018
|
minWidth: 120
|
|
1017
1019
|
}), g && h.push({
|
|
@@ -1025,9 +1027,9 @@ function hn({
|
|
|
1025
1027
|
colId: "size",
|
|
1026
1028
|
field: "size",
|
|
1027
1029
|
headerName: o("fileManager.columns.size", "Size"),
|
|
1028
|
-
valueFormatter: (
|
|
1030
|
+
valueFormatter: (I) => {
|
|
1029
1031
|
var $;
|
|
1030
|
-
return (($ =
|
|
1032
|
+
return (($ = I.data) == null ? void 0 : $.kind) === "file" && I.data.size !== void 0 ? Xt(I.data.size, v.language, o) : o("fileManager.emptyCell", "—");
|
|
1031
1033
|
},
|
|
1032
1034
|
filter: !1,
|
|
1033
1035
|
flex: 1,
|
|
@@ -1036,11 +1038,11 @@ function hn({
|
|
|
1036
1038
|
colId: "updatedAt",
|
|
1037
1039
|
field: "updatedAt",
|
|
1038
1040
|
headerName: o("fileManager.columns.modified", "Modified"),
|
|
1039
|
-
valueFormatter: (
|
|
1041
|
+
valueFormatter: (I) => {
|
|
1040
1042
|
var $;
|
|
1041
|
-
return ($ =
|
|
1043
|
+
return ($ = I.data) != null && $.updatedAt ? new Intl.DateTimeFormat(v.language, {
|
|
1042
1044
|
dateStyle: "medium"
|
|
1043
|
-
}).format(new Date(
|
|
1045
|
+
}).format(new Date(I.data.updatedAt)) : o("fileManager.emptyCell", "—");
|
|
1044
1046
|
},
|
|
1045
1047
|
filter: !1,
|
|
1046
1048
|
flex: 1,
|
|
@@ -1048,7 +1050,7 @@ function hn({
|
|
|
1048
1050
|
}), B.length > 0 && h.push({
|
|
1049
1051
|
colId: "actions",
|
|
1050
1052
|
headerName: o("fileManager.rowActions", "Item actions"),
|
|
1051
|
-
cellRenderer:
|
|
1053
|
+
cellRenderer: Rt,
|
|
1052
1054
|
cellRendererParams: {
|
|
1053
1055
|
actions: B,
|
|
1054
1056
|
group: !0,
|
|
@@ -1064,15 +1066,15 @@ function hn({
|
|
|
1064
1066
|
E,
|
|
1065
1067
|
g,
|
|
1066
1068
|
l,
|
|
1067
|
-
|
|
1069
|
+
M,
|
|
1068
1070
|
o,
|
|
1069
|
-
|
|
1071
|
+
v.language
|
|
1070
1072
|
]), re = O(() => {
|
|
1071
1073
|
const f = {
|
|
1072
1074
|
getRowId: (d) => d.data.id,
|
|
1073
1075
|
onRowClicked: (d) => {
|
|
1074
|
-
const h = d.event,
|
|
1075
|
-
|
|
1076
|
+
const h = d.event, I = h == null ? void 0 : h.target;
|
|
1077
|
+
I != null && I.closest(
|
|
1076
1078
|
'.ag-selection-checkbox, .ag-checkbox-input-wrapper, [col-id="actions"], [data-item-kebab], .ag-group-contracted, .ag-group-expanded'
|
|
1077
1079
|
) || d.data && u(d.data);
|
|
1078
1080
|
},
|
|
@@ -1080,9 +1082,9 @@ function hn({
|
|
|
1080
1082
|
d.data && a(d.data);
|
|
1081
1083
|
}
|
|
1082
1084
|
};
|
|
1083
|
-
if (
|
|
1084
|
-
const d =
|
|
1085
|
-
f.treeData = !0, f.getDataPath = (h) =>
|
|
1085
|
+
if (M) {
|
|
1086
|
+
const d = qe(l);
|
|
1087
|
+
f.treeData = !0, f.getDataPath = (h) => en(h, A, _), f.groupDefaultExpanded = 1, f.autoGroupColumnDef = {
|
|
1086
1088
|
headerName: o("fileManager.columns.name", "Name"),
|
|
1087
1089
|
flex: 2,
|
|
1088
1090
|
minWidth: 200,
|
|
@@ -1096,15 +1098,15 @@ function hn({
|
|
|
1096
1098
|
}, [
|
|
1097
1099
|
a,
|
|
1098
1100
|
u,
|
|
1099
|
-
|
|
1101
|
+
M,
|
|
1100
1102
|
l,
|
|
1101
1103
|
o,
|
|
1102
1104
|
A,
|
|
1103
|
-
|
|
1104
|
-
]),
|
|
1105
|
+
_
|
|
1106
|
+
]), T = (f) => {
|
|
1105
1107
|
const d = f.map((h) => h.id);
|
|
1106
|
-
|
|
1107
|
-
},
|
|
1108
|
+
et(d, r) || i(d);
|
|
1109
|
+
}, L = y(
|
|
1108
1110
|
(f) => {
|
|
1109
1111
|
var d;
|
|
1110
1112
|
return l && ((d = f.data) == null ? void 0 : d.id) === l ? "ag-row-selected" : void 0;
|
|
@@ -1120,14 +1122,14 @@ function hn({
|
|
|
1120
1122
|
rowData: t,
|
|
1121
1123
|
rowSelection: "multiple",
|
|
1122
1124
|
gridOptions: re,
|
|
1123
|
-
getRowClass:
|
|
1124
|
-
onSelectionChanged:
|
|
1125
|
+
getRowClass: L,
|
|
1126
|
+
onSelectionChanged: T,
|
|
1125
1127
|
heightClass: "ds:h-[420px]",
|
|
1126
1128
|
children: /* @__PURE__ */ n(Te.Toolbar, { children: /* @__PURE__ */ n(Te.Toolbar.Actions, { children: W }) })
|
|
1127
1129
|
}
|
|
1128
1130
|
);
|
|
1129
1131
|
}
|
|
1130
|
-
function
|
|
1132
|
+
function bn({
|
|
1131
1133
|
selectedIds: t,
|
|
1132
1134
|
permissions: r,
|
|
1133
1135
|
onRequestCreateFolder: l,
|
|
@@ -1137,77 +1139,77 @@ function yn({
|
|
|
1137
1139
|
onRequestMove: c,
|
|
1138
1140
|
onRequestDelete: F,
|
|
1139
1141
|
onDownload: S,
|
|
1140
|
-
onShare:
|
|
1142
|
+
onShare: b
|
|
1141
1143
|
}) {
|
|
1142
|
-
const { t:
|
|
1143
|
-
return
|
|
1144
|
-
|
|
1144
|
+
const { t: k } = J(), D = t.length > 0, z = t.length === 1, R = r.upload && !!i, M = r.download && !!S, _ = r.share && !!b, V = a ?? [];
|
|
1145
|
+
return R || r.createFolder || V.length > 0 || M || _ || r.rename || r.move || r.delete ? /* @__PURE__ */ x(
|
|
1146
|
+
_t,
|
|
1145
1147
|
{
|
|
1146
1148
|
role: "toolbar",
|
|
1147
1149
|
overflow: "menu",
|
|
1148
1150
|
size: "sm",
|
|
1149
|
-
"aria-label":
|
|
1151
|
+
"aria-label": k("fileManager.toolbarLabel", "File actions"),
|
|
1150
1152
|
"data-testid": "file-manager-toolbar",
|
|
1151
1153
|
children: [
|
|
1152
|
-
|
|
1154
|
+
R && /* @__PURE__ */ n(
|
|
1153
1155
|
Q,
|
|
1154
1156
|
{
|
|
1155
1157
|
intent: "primary",
|
|
1156
1158
|
"data-overflow-pin": !0,
|
|
1157
|
-
icon: /* @__PURE__ */ n(
|
|
1158
|
-
tooltip:
|
|
1159
|
+
icon: /* @__PURE__ */ n(Lt, {}),
|
|
1160
|
+
tooltip: k("fileManager.toolbar.upload", "Upload files"),
|
|
1159
1161
|
onClick: () => i == null ? void 0 : i()
|
|
1160
1162
|
}
|
|
1161
1163
|
),
|
|
1162
1164
|
r.createFolder && /* @__PURE__ */ n(
|
|
1163
1165
|
Q,
|
|
1164
1166
|
{
|
|
1165
|
-
icon: /* @__PURE__ */ n(
|
|
1166
|
-
tooltip:
|
|
1167
|
+
icon: /* @__PURE__ */ n(Wt, {}),
|
|
1168
|
+
tooltip: k("fileManager.toolbar.newFolder", "New folder"),
|
|
1167
1169
|
onClick: l
|
|
1168
1170
|
}
|
|
1169
1171
|
),
|
|
1170
1172
|
V.map((W) => /* @__PURE__ */ n(
|
|
1171
1173
|
Q,
|
|
1172
1174
|
{
|
|
1173
|
-
icon: W.icon ?? /* @__PURE__ */ n(
|
|
1175
|
+
icon: W.icon ?? /* @__PURE__ */ n(Kt, {}),
|
|
1174
1176
|
tooltip: W.label,
|
|
1175
1177
|
onClick: () => W.onSelect()
|
|
1176
1178
|
},
|
|
1177
1179
|
W.id
|
|
1178
1180
|
)),
|
|
1179
|
-
|
|
1181
|
+
M && /* @__PURE__ */ n(
|
|
1180
1182
|
Q,
|
|
1181
1183
|
{
|
|
1182
|
-
icon: /* @__PURE__ */ n(
|
|
1183
|
-
tooltip:
|
|
1184
|
+
icon: /* @__PURE__ */ n(Ge, {}),
|
|
1185
|
+
tooltip: k("fileManager.toolbar.download", "Download"),
|
|
1184
1186
|
disabled: !D,
|
|
1185
1187
|
onClick: () => S == null ? void 0 : S(t)
|
|
1186
1188
|
}
|
|
1187
1189
|
),
|
|
1188
|
-
|
|
1190
|
+
_ && /* @__PURE__ */ n(
|
|
1189
1191
|
Q,
|
|
1190
1192
|
{
|
|
1191
|
-
icon: /* @__PURE__ */ n(
|
|
1192
|
-
tooltip:
|
|
1193
|
+
icon: /* @__PURE__ */ n(Je, {}),
|
|
1194
|
+
tooltip: k("fileManager.toolbar.share", "Share"),
|
|
1193
1195
|
disabled: !D,
|
|
1194
|
-
onClick: () =>
|
|
1196
|
+
onClick: () => b == null ? void 0 : b(t)
|
|
1195
1197
|
}
|
|
1196
1198
|
),
|
|
1197
1199
|
r.rename && /* @__PURE__ */ n(
|
|
1198
1200
|
Q,
|
|
1199
1201
|
{
|
|
1200
|
-
icon: /* @__PURE__ */ n(
|
|
1201
|
-
tooltip:
|
|
1202
|
-
disabled: !
|
|
1202
|
+
icon: /* @__PURE__ */ n(Ue, {}),
|
|
1203
|
+
tooltip: k("fileManager.toolbar.rename", "Rename"),
|
|
1204
|
+
disabled: !z,
|
|
1203
1205
|
onClick: () => u(t[0])
|
|
1204
1206
|
}
|
|
1205
1207
|
),
|
|
1206
1208
|
r.move && /* @__PURE__ */ n(
|
|
1207
1209
|
Q,
|
|
1208
1210
|
{
|
|
1209
|
-
icon: /* @__PURE__ */ n(
|
|
1210
|
-
tooltip:
|
|
1211
|
+
icon: /* @__PURE__ */ n(Ze, {}),
|
|
1212
|
+
tooltip: k("fileManager.toolbar.move", "Move"),
|
|
1211
1213
|
disabled: !D,
|
|
1212
1214
|
onClick: () => c(t)
|
|
1213
1215
|
}
|
|
@@ -1215,8 +1217,8 @@ function yn({
|
|
|
1215
1217
|
r.delete && /* @__PURE__ */ n(
|
|
1216
1218
|
Q,
|
|
1217
1219
|
{
|
|
1218
|
-
icon: /* @__PURE__ */ n(
|
|
1219
|
-
tooltip:
|
|
1220
|
+
icon: /* @__PURE__ */ n(Ye, {}),
|
|
1221
|
+
tooltip: k("fileManager.toolbar.delete", "Delete"),
|
|
1220
1222
|
disabled: !D,
|
|
1221
1223
|
onClick: () => F(t)
|
|
1222
1224
|
}
|
|
@@ -1225,7 +1227,7 @@ function yn({
|
|
|
1225
1227
|
}
|
|
1226
1228
|
) : null;
|
|
1227
1229
|
}
|
|
1228
|
-
const
|
|
1230
|
+
const je = Ve(
|
|
1229
1231
|
"ds:relative ds:flex ds:w-full ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
1230
1232
|
{
|
|
1231
1233
|
variants: {
|
|
@@ -1244,7 +1246,7 @@ const qe = Pe(
|
|
|
1244
1246
|
move: !0,
|
|
1245
1247
|
delete: !0,
|
|
1246
1248
|
share: !0
|
|
1247
|
-
}, vn =
|
|
1249
|
+
}, vn = yt(
|
|
1248
1250
|
({
|
|
1249
1251
|
id: t,
|
|
1250
1252
|
items: r,
|
|
@@ -1255,224 +1257,224 @@ const qe = Pe(
|
|
|
1255
1257
|
onSelectionChange: c,
|
|
1256
1258
|
showTree: F = !1,
|
|
1257
1259
|
isLoading: S = !1,
|
|
1258
|
-
onOpenFile:
|
|
1259
|
-
onCreateFolder:
|
|
1260
|
+
onOpenFile: b,
|
|
1261
|
+
onCreateFolder: k,
|
|
1260
1262
|
onRenameItem: D,
|
|
1261
|
-
onDeleteItems:
|
|
1262
|
-
onMoveItems:
|
|
1263
|
-
onDownloadItems:
|
|
1264
|
-
onShare:
|
|
1263
|
+
onDeleteItems: z,
|
|
1264
|
+
onMoveItems: R,
|
|
1265
|
+
onDownloadItems: M,
|
|
1266
|
+
onShare: _,
|
|
1265
1267
|
onRequestSignature: V,
|
|
1266
1268
|
onUpload: P,
|
|
1267
1269
|
uploadConfig: W,
|
|
1268
1270
|
onPreviewItem: o,
|
|
1269
|
-
previewedItemId:
|
|
1271
|
+
previewedItemId: v,
|
|
1270
1272
|
itemActions: A,
|
|
1271
1273
|
addMenuItems: g,
|
|
1272
1274
|
groupByFolder: E = !1,
|
|
1273
1275
|
bordered: B,
|
|
1274
1276
|
className: G
|
|
1275
1277
|
}, re) => {
|
|
1276
|
-
var
|
|
1277
|
-
const { t:
|
|
1278
|
+
var Be;
|
|
1279
|
+
const { t: T, i18n: L } = J(), f = y(
|
|
1278
1280
|
(e) => typeof l == "function" ? e ? { ...Fe, ...l(e) } : Fe : { ...Fe, ...l ?? {} },
|
|
1279
1281
|
[l]
|
|
1280
1282
|
), d = O(() => f(), [f]), h = y(
|
|
1281
1283
|
(e) => f(e),
|
|
1282
1284
|
[f]
|
|
1283
|
-
), [
|
|
1285
|
+
), [I, $] = Mt({
|
|
1284
1286
|
value: i,
|
|
1285
1287
|
defaultValue: a,
|
|
1286
1288
|
onChange: u
|
|
1287
|
-
}),
|
|
1289
|
+
}), w = I ?? null, [K, de] = te([]), [C, De] = te({
|
|
1288
1290
|
type: "none"
|
|
1289
|
-
}), [
|
|
1290
|
-
|
|
1291
|
-
}, []),
|
|
1291
|
+
}), [rt, ye] = te(!1), ce = ee(0), be = ee(null), ve = ee(null), Re = y((e) => {
|
|
1292
|
+
ve.current && (ve.current.textContent = e);
|
|
1293
|
+
}, []), Ie = ee(null), ke = ee(!1), N = O(
|
|
1292
1294
|
() => new Map(r.map((e) => [e.id, e])),
|
|
1293
1295
|
[r]
|
|
1294
1296
|
), Y = y(
|
|
1295
1297
|
(e) => {
|
|
1296
1298
|
de((s) => {
|
|
1297
|
-
const p = e.filter((H) =>
|
|
1298
|
-
return
|
|
1299
|
+
const p = e.filter((H) => N.has(H));
|
|
1300
|
+
return et(s, p) ? s : (c == null || c(p), p);
|
|
1299
1301
|
});
|
|
1300
1302
|
},
|
|
1301
|
-
[
|
|
1303
|
+
[N, c]
|
|
1302
1304
|
);
|
|
1303
1305
|
ne(() => {
|
|
1304
1306
|
de((e) => {
|
|
1305
|
-
const s = e.filter((p) =>
|
|
1307
|
+
const s = e.filter((p) => N.has(p));
|
|
1306
1308
|
return s.length === e.length ? e : s;
|
|
1307
1309
|
});
|
|
1308
|
-
}, [
|
|
1310
|
+
}, [N]);
|
|
1309
1311
|
const Z = y(
|
|
1310
1312
|
(e) => {
|
|
1311
1313
|
var p;
|
|
1312
1314
|
if (e !== null) {
|
|
1313
|
-
const H =
|
|
1315
|
+
const H = N.get(e);
|
|
1314
1316
|
if (!H || H.kind !== "folder") return;
|
|
1315
1317
|
}
|
|
1316
1318
|
$(e), de([]), ke.current = !0;
|
|
1317
|
-
const s = e === null ?
|
|
1318
|
-
|
|
1319
|
-
|
|
1319
|
+
const s = e === null ? T("fileManager.rootLabel", "All files") : ((p = N.get(e)) == null ? void 0 : p.name) ?? "";
|
|
1320
|
+
Re(
|
|
1321
|
+
T("fileManager.announce.navigated", "Opened {{name}}", { name: s })
|
|
1320
1322
|
);
|
|
1321
1323
|
},
|
|
1322
|
-
[
|
|
1324
|
+
[N, $, Re, T]
|
|
1323
1325
|
);
|
|
1324
1326
|
ne(() => {
|
|
1325
1327
|
var e;
|
|
1326
|
-
ke.current && (ke.current = !1, (e =
|
|
1327
|
-
}, [
|
|
1328
|
-
const Me = O(
|
|
1329
|
-
() =>
|
|
1330
|
-
[r,
|
|
1328
|
+
ke.current && (ke.current = !1, (e = Ie.current) == null || e.focus());
|
|
1329
|
+
}, [w]);
|
|
1330
|
+
const ze = v && N.has(v) ? v : w, Me = O(
|
|
1331
|
+
() => tn(r, ze),
|
|
1332
|
+
[r, ze]
|
|
1331
1333
|
), ue = O(
|
|
1332
|
-
() =>
|
|
1333
|
-
[r,
|
|
1334
|
-
),
|
|
1335
|
-
() => E ?
|
|
1336
|
-
[E, r,
|
|
1337
|
-
),
|
|
1334
|
+
() => Qe(r, w, L.language),
|
|
1335
|
+
[r, w, L.language]
|
|
1336
|
+
), at = O(
|
|
1337
|
+
() => E ? Qt(r, w, L.language) : ue,
|
|
1338
|
+
[E, r, w, L.language, ue]
|
|
1339
|
+
), _e = w === null ? T("fileManager.rootLabel", "All files") : ((Be = N.get(w)) == null ? void 0 : Be.name) ?? "", U = y((e) => {
|
|
1338
1340
|
De((s) => s.type === "none" ? e : s);
|
|
1339
1341
|
}, []), q = y(() => {
|
|
1340
1342
|
De({ type: "none" });
|
|
1341
|
-
}, []),
|
|
1342
|
-
!d.createFolder || !
|
|
1343
|
-
}, [d.createFolder,
|
|
1343
|
+
}, []), it = y(() => {
|
|
1344
|
+
!d.createFolder || !k || U({ type: "create-folder" });
|
|
1345
|
+
}, [d.createFolder, k, U]), Ce = y(() => {
|
|
1344
1346
|
!d.upload || !P || U({ type: "upload" });
|
|
1345
1347
|
}, [d.upload, P, U]), oe = y(
|
|
1346
1348
|
(e) => {
|
|
1347
|
-
const s =
|
|
1349
|
+
const s = N.get(e);
|
|
1348
1350
|
!s || !h(s).rename || !D || U({ type: "rename", itemId: e });
|
|
1349
1351
|
},
|
|
1350
|
-
[h, D,
|
|
1352
|
+
[h, D, N, U]
|
|
1351
1353
|
), me = y(
|
|
1352
1354
|
(e) => {
|
|
1353
|
-
if (!
|
|
1355
|
+
if (!z || e.length === 0) return;
|
|
1354
1356
|
const s = e.filter((p) => {
|
|
1355
|
-
const H =
|
|
1357
|
+
const H = N.get(p);
|
|
1356
1358
|
return H ? h(H).delete : !1;
|
|
1357
1359
|
});
|
|
1358
1360
|
s.length !== 0 && U({ type: "delete", itemIds: s });
|
|
1359
1361
|
},
|
|
1360
|
-
[h,
|
|
1361
|
-
),
|
|
1362
|
+
[h, z, N, U]
|
|
1363
|
+
), Le = y(
|
|
1362
1364
|
(e) => {
|
|
1363
|
-
if (!
|
|
1365
|
+
if (!R || e.length === 0) return;
|
|
1364
1366
|
const s = e.filter((p) => {
|
|
1365
|
-
const H =
|
|
1367
|
+
const H = N.get(p);
|
|
1366
1368
|
return H ? h(H).move : !1;
|
|
1367
1369
|
});
|
|
1368
1370
|
s.length !== 0 && U({ type: "move", itemIds: s });
|
|
1369
1371
|
},
|
|
1370
|
-
[h,
|
|
1371
|
-
),
|
|
1372
|
+
[h, R, N, U]
|
|
1373
|
+
), Ke = y(
|
|
1372
1374
|
(e) => {
|
|
1373
|
-
if (!
|
|
1375
|
+
if (!M || e.length === 0) return;
|
|
1374
1376
|
const s = e.filter((p) => {
|
|
1375
|
-
const H =
|
|
1377
|
+
const H = N.get(p);
|
|
1376
1378
|
return H ? h(H).download : !1;
|
|
1377
1379
|
});
|
|
1378
|
-
s.length > 0 &&
|
|
1380
|
+
s.length > 0 && M(s);
|
|
1379
1381
|
},
|
|
1380
|
-
[h,
|
|
1381
|
-
),
|
|
1382
|
+
[h, M, N]
|
|
1383
|
+
), Ee = y(
|
|
1382
1384
|
(e) => {
|
|
1383
|
-
if (!
|
|
1385
|
+
if (!_ || e.length === 0) return;
|
|
1384
1386
|
const s = e.filter((p) => {
|
|
1385
|
-
const H =
|
|
1387
|
+
const H = N.get(p);
|
|
1386
1388
|
return H ? h(H).share : !1;
|
|
1387
1389
|
});
|
|
1388
|
-
s.length > 0 &&
|
|
1390
|
+
s.length > 0 && _(s);
|
|
1389
1391
|
},
|
|
1390
|
-
[h,
|
|
1392
|
+
[h, _, N]
|
|
1391
1393
|
), fe = y(
|
|
1392
1394
|
(e) => {
|
|
1393
|
-
e.kind === "folder" ? Z(e.id) :
|
|
1395
|
+
e.kind === "folder" ? Z(e.id) : b == null || b(e);
|
|
1394
1396
|
},
|
|
1395
|
-
[Z,
|
|
1396
|
-
),
|
|
1397
|
+
[Z, b]
|
|
1398
|
+
), we = y(
|
|
1397
1399
|
(e) => {
|
|
1398
1400
|
e.kind === "folder" ? Z(e.id) : (Y([e.id]), o == null || o(e));
|
|
1399
1401
|
},
|
|
1400
1402
|
[Z, Y, o]
|
|
1401
|
-
),
|
|
1403
|
+
), ot = y(
|
|
1402
1404
|
(e) => {
|
|
1403
|
-
|
|
1405
|
+
k == null || k(e, w), q();
|
|
1404
1406
|
},
|
|
1405
|
-
[
|
|
1406
|
-
),
|
|
1407
|
+
[k, w, q]
|
|
1408
|
+
), lt = y(
|
|
1407
1409
|
(e) => {
|
|
1408
|
-
|
|
1410
|
+
C.type === "rename" && (D == null || D(C.itemId, e)), q();
|
|
1409
1411
|
},
|
|
1410
|
-
[
|
|
1411
|
-
),
|
|
1412
|
-
|
|
1413
|
-
}, [
|
|
1412
|
+
[C, D, q]
|
|
1413
|
+
), st = y(() => {
|
|
1414
|
+
C.type === "delete" && (z == null || z(C.itemIds), Y([])), q();
|
|
1415
|
+
}, [C, z, Y, q]), dt = y(
|
|
1414
1416
|
(e) => {
|
|
1415
|
-
|
|
1417
|
+
C.type === "move" && (R == null || R(C.itemIds, e)), q();
|
|
1416
1418
|
},
|
|
1417
|
-
[
|
|
1418
|
-
),
|
|
1419
|
-
(e, s) => P ? P(e, s,
|
|
1420
|
-
[P,
|
|
1419
|
+
[C, R, q]
|
|
1420
|
+
), ct = y(
|
|
1421
|
+
(e, s) => P ? P(e, s, w) : Promise.resolve(),
|
|
1422
|
+
[P, w]
|
|
1421
1423
|
), j = d.upload && !!P, xe = (e) => {
|
|
1422
1424
|
var s;
|
|
1423
1425
|
return Array.from(((s = e.dataTransfer) == null ? void 0 : s.types) ?? []).includes("Files");
|
|
1424
|
-
},
|
|
1426
|
+
}, ut = y(
|
|
1425
1427
|
(e) => {
|
|
1426
1428
|
!j || !xe(e) || (e.preventDefault(), ce.current += 1, ye(!0));
|
|
1427
1429
|
},
|
|
1428
1430
|
[j]
|
|
1429
|
-
),
|
|
1431
|
+
), ft = y(
|
|
1430
1432
|
(e) => {
|
|
1431
1433
|
!j || !xe(e) || e.preventDefault();
|
|
1432
1434
|
},
|
|
1433
1435
|
[j]
|
|
1434
|
-
),
|
|
1436
|
+
), pt = y(() => {
|
|
1435
1437
|
j && (ce.current = Math.max(0, ce.current - 1), ce.current === 0 && ye(!1));
|
|
1436
|
-
}, [j]),
|
|
1438
|
+
}, [j]), mt = y(
|
|
1437
1439
|
(e) => {
|
|
1438
|
-
!j || !xe(e) || (e.preventDefault(), ce.current = 0, ye(!1),
|
|
1440
|
+
!j || !xe(e) || (e.preventDefault(), ce.current = 0, ye(!1), Ce());
|
|
1439
1441
|
},
|
|
1440
|
-
[j,
|
|
1441
|
-
),
|
|
1442
|
+
[j, Ce]
|
|
1443
|
+
), gt = y(
|
|
1442
1444
|
(e) => {
|
|
1443
|
-
if (!(
|
|
1444
|
-
if (e.key === "F2" &&
|
|
1445
|
-
e.preventDefault(), oe(
|
|
1446
|
-
else if (e.key === "Delete" &&
|
|
1447
|
-
e.preventDefault(), me(
|
|
1448
|
-
else if (e.key === "Enter" &&
|
|
1449
|
-
const p =
|
|
1450
|
-
p && (e.preventDefault(), p.kind === "file" && o ?
|
|
1445
|
+
if (!(C.type !== "none" || e.target.closest('input, textarea, [contenteditable="true"]')))
|
|
1446
|
+
if (e.key === "F2" && K.length === 1)
|
|
1447
|
+
e.preventDefault(), oe(K[0]);
|
|
1448
|
+
else if (e.key === "Delete" && K.length > 0)
|
|
1449
|
+
e.preventDefault(), me(K);
|
|
1450
|
+
else if (e.key === "Enter" && K.length === 1) {
|
|
1451
|
+
const p = N.get(K[0]);
|
|
1452
|
+
p && (e.preventDefault(), p.kind === "file" && o ? we(p) : fe(p));
|
|
1451
1453
|
} else e.key.toLowerCase() === "a" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), Y(ue.map((p) => p.id)));
|
|
1452
1454
|
},
|
|
1453
1455
|
[
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1456
|
+
C.type,
|
|
1457
|
+
K,
|
|
1458
|
+
N,
|
|
1457
1459
|
oe,
|
|
1458
1460
|
me,
|
|
1459
1461
|
fe,
|
|
1460
|
-
|
|
1462
|
+
we,
|
|
1461
1463
|
o,
|
|
1462
1464
|
Y,
|
|
1463
1465
|
ue
|
|
1464
1466
|
]
|
|
1465
1467
|
), ae = ee({
|
|
1466
|
-
selectedIds:
|
|
1467
|
-
currentFolderId:
|
|
1468
|
+
selectedIds: K,
|
|
1469
|
+
currentFolderId: w,
|
|
1468
1470
|
items: r,
|
|
1469
|
-
activeAction:
|
|
1471
|
+
activeAction: C
|
|
1470
1472
|
});
|
|
1471
1473
|
ae.current = {
|
|
1472
|
-
selectedIds:
|
|
1473
|
-
currentFolderId:
|
|
1474
|
+
selectedIds: K,
|
|
1475
|
+
currentFolderId: w,
|
|
1474
1476
|
items: r,
|
|
1475
|
-
activeAction:
|
|
1477
|
+
activeAction: C
|
|
1476
1478
|
};
|
|
1477
1479
|
const le = ee({
|
|
1478
1480
|
setSelection: Y,
|
|
@@ -1495,12 +1497,12 @@ const qe = Pe(
|
|
|
1495
1497
|
navigateTo: (e) => le.current.navigateTo(e),
|
|
1496
1498
|
getTypeFilter: () => {
|
|
1497
1499
|
var p;
|
|
1498
|
-
const s = (((p =
|
|
1500
|
+
const s = (((p = be.current) == null ? void 0 : p.getFilter()) ?? {}).documentType;
|
|
1499
1501
|
return typeof (s == null ? void 0 : s.filter) == "string" ? [s.filter] : [];
|
|
1500
1502
|
},
|
|
1501
1503
|
setTypeFilter: (e) => {
|
|
1502
1504
|
var p;
|
|
1503
|
-
const s = (p =
|
|
1505
|
+
const s = (p = be.current) == null ? void 0 : p.getRawApi();
|
|
1504
1506
|
if (s) {
|
|
1505
1507
|
if (e.length === 0) {
|
|
1506
1508
|
s.destroyFilter("documentType");
|
|
@@ -1536,8 +1538,8 @@ const qe = Pe(
|
|
|
1536
1538
|
}),
|
|
1537
1539
|
[]
|
|
1538
1540
|
);
|
|
1539
|
-
|
|
1540
|
-
const Ne =
|
|
1541
|
+
bt(re, () => Se, [Se]), Ct(Yt, Se, t);
|
|
1542
|
+
const Ne = C.type === "rename" ? N.get(C.itemId) : void 0;
|
|
1541
1543
|
if (S)
|
|
1542
1544
|
return /* @__PURE__ */ x(
|
|
1543
1545
|
"div",
|
|
@@ -1545,9 +1547,9 @@ const qe = Pe(
|
|
|
1545
1547
|
"data-component": "file-manager",
|
|
1546
1548
|
"data-component-id": t,
|
|
1547
1549
|
role: "region",
|
|
1548
|
-
"aria-label":
|
|
1550
|
+
"aria-label": T("fileManager.regionLabel", "File manager"),
|
|
1549
1551
|
"aria-busy": "true",
|
|
1550
|
-
className:
|
|
1552
|
+
className: je({ bordered: B, className: G }),
|
|
1551
1553
|
children: [
|
|
1552
1554
|
/* @__PURE__ */ x("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
1553
1555
|
/* @__PURE__ */ n(he, { variant: "rectangular", size: "sm", className: "ds:w-24" }),
|
|
@@ -1565,19 +1567,19 @@ const qe = Pe(
|
|
|
1565
1567
|
]
|
|
1566
1568
|
}
|
|
1567
1569
|
);
|
|
1568
|
-
const
|
|
1569
|
-
|
|
1570
|
+
const ht = /* @__PURE__ */ n(
|
|
1571
|
+
bn,
|
|
1570
1572
|
{
|
|
1571
|
-
selectedIds:
|
|
1573
|
+
selectedIds: K,
|
|
1572
1574
|
permissions: d,
|
|
1573
|
-
onRequestCreateFolder:
|
|
1574
|
-
onRequestUpload: j ?
|
|
1575
|
+
onRequestCreateFolder: it,
|
|
1576
|
+
onRequestUpload: j ? Ce : void 0,
|
|
1575
1577
|
addMenuItems: g,
|
|
1576
1578
|
onRequestRename: oe,
|
|
1577
|
-
onRequestMove:
|
|
1579
|
+
onRequestMove: Le,
|
|
1578
1580
|
onRequestDelete: me,
|
|
1579
|
-
onDownload: d.download &&
|
|
1580
|
-
onShare: d.share &&
|
|
1581
|
+
onDownload: d.download && M ? Ke : void 0,
|
|
1582
|
+
onShare: d.share && _ ? Ee : void 0
|
|
1581
1583
|
}
|
|
1582
1584
|
);
|
|
1583
1585
|
return (
|
|
@@ -1588,40 +1590,40 @@ const qe = Pe(
|
|
|
1588
1590
|
"data-component": "file-manager",
|
|
1589
1591
|
"data-component-id": t,
|
|
1590
1592
|
role: "region",
|
|
1591
|
-
"aria-label":
|
|
1592
|
-
onKeyDown:
|
|
1593
|
-
onDragEnter: j ?
|
|
1594
|
-
onDragOver: j ?
|
|
1595
|
-
onDragLeave: j ?
|
|
1596
|
-
onDrop: j ?
|
|
1597
|
-
className:
|
|
1593
|
+
"aria-label": T("fileManager.regionLabel", "File manager"),
|
|
1594
|
+
onKeyDown: gt,
|
|
1595
|
+
onDragEnter: j ? ut : void 0,
|
|
1596
|
+
onDragOver: j ? ft : void 0,
|
|
1597
|
+
onDragLeave: j ? pt : void 0,
|
|
1598
|
+
onDrop: j ? mt : void 0,
|
|
1599
|
+
className: je({ bordered: B, className: G }),
|
|
1598
1600
|
children: [
|
|
1599
1601
|
/* @__PURE__ */ x("div", { className: "ds:flex ds:min-h-0 ds:items-start ds:gap-[var(--spacing-md)]", children: [
|
|
1600
1602
|
F && /* @__PURE__ */ n("div", { className: "ds:hidden ds:w-56 ds:shrink-0 ds:md:block", children: /* @__PURE__ */ n(
|
|
1601
|
-
|
|
1603
|
+
tt,
|
|
1602
1604
|
{
|
|
1603
1605
|
items: r,
|
|
1604
|
-
selectedFolderId:
|
|
1606
|
+
selectedFolderId: w,
|
|
1605
1607
|
onSelectFolder: Z,
|
|
1606
|
-
"aria-label":
|
|
1608
|
+
"aria-label": T("fileManager.treeLabel", "Folders")
|
|
1607
1609
|
}
|
|
1608
1610
|
) }),
|
|
1609
1611
|
/* @__PURE__ */ n(
|
|
1610
1612
|
"div",
|
|
1611
1613
|
{
|
|
1612
|
-
ref:
|
|
1614
|
+
ref: Ie,
|
|
1613
1615
|
tabIndex: -1,
|
|
1614
1616
|
className: "ds:min-w-0 ds:flex-1 ds:outline-none",
|
|
1615
1617
|
children: ue.length === 0 ? /* @__PURE__ */ n(
|
|
1616
|
-
|
|
1618
|
+
kt,
|
|
1617
1619
|
{
|
|
1618
1620
|
variant: "first-use",
|
|
1619
1621
|
size: "sm",
|
|
1620
|
-
title:
|
|
1622
|
+
title: T(
|
|
1621
1623
|
"fileManager.empty.folderTitle",
|
|
1622
1624
|
"This folder is empty"
|
|
1623
1625
|
),
|
|
1624
|
-
description:
|
|
1626
|
+
description: T(
|
|
1625
1627
|
"fileManager.empty.folderDescription",
|
|
1626
1628
|
"Upload files or create a folder to get started."
|
|
1627
1629
|
)
|
|
@@ -1630,29 +1632,29 @@ const qe = Pe(
|
|
|
1630
1632
|
/* Remount on folder change so the DataTable's column filters
|
|
1631
1633
|
reset cleanly for the new folder. */
|
|
1632
1634
|
/* @__PURE__ */ n(
|
|
1633
|
-
|
|
1635
|
+
yn,
|
|
1634
1636
|
{
|
|
1635
|
-
items:
|
|
1636
|
-
currentFolderId:
|
|
1637
|
-
selectedIds:
|
|
1638
|
-
previewedItemId:
|
|
1637
|
+
items: at,
|
|
1638
|
+
currentFolderId: w,
|
|
1639
|
+
selectedIds: K,
|
|
1640
|
+
previewedItemId: v ?? null,
|
|
1639
1641
|
onSelectionChange: Y,
|
|
1640
1642
|
onOpen: fe,
|
|
1641
|
-
onRowActivate:
|
|
1643
|
+
onRowActivate: we,
|
|
1642
1644
|
can: h,
|
|
1643
1645
|
onRequestRename: oe,
|
|
1644
|
-
onRequestMove:
|
|
1646
|
+
onRequestMove: Le,
|
|
1645
1647
|
onRequestDelete: me,
|
|
1646
|
-
onDownload: d.download &&
|
|
1647
|
-
onShare: d.share &&
|
|
1648
|
+
onDownload: d.download && M ? Ke : void 0,
|
|
1649
|
+
onShare: d.share && _ ? Ee : void 0,
|
|
1648
1650
|
onRequestSignature: V,
|
|
1649
1651
|
itemActions: A,
|
|
1650
1652
|
groupByFolder: E,
|
|
1651
1653
|
gridId: t ? `${t}-list` : void 0,
|
|
1652
|
-
tableRef:
|
|
1653
|
-
toolbarActions:
|
|
1654
|
+
tableRef: be,
|
|
1655
|
+
toolbarActions: ht
|
|
1654
1656
|
},
|
|
1655
|
-
|
|
1657
|
+
w ?? "__root__"
|
|
1656
1658
|
)
|
|
1657
1659
|
)
|
|
1658
1660
|
}
|
|
@@ -1661,36 +1663,29 @@ const qe = Pe(
|
|
|
1661
1663
|
/* @__PURE__ */ n("div", { className: "ds:mt-[var(--spacing-sm)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)] ds:text-muted-foreground", children: /* @__PURE__ */ x(
|
|
1662
1664
|
vt,
|
|
1663
1665
|
{
|
|
1664
|
-
"aria-label":
|
|
1666
|
+
"aria-label": T("fileManager.breadcrumbLabel", "Folder path"),
|
|
1667
|
+
disableCollapse: !0,
|
|
1665
1668
|
children: [
|
|
1666
|
-
/* @__PURE__ */ n(
|
|
1667
|
-
Me.map((e, s) => /* @__PURE__ */ n(
|
|
1669
|
+
/* @__PURE__ */ n(He, { children: Me.length === 0 ? /* @__PURE__ */ n(ge, { children: T("fileManager.rootLabel", "All files") }) : /* @__PURE__ */ n(ge, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", onClick: () => Z(null), children: T("fileManager.rootLabel", "All files") }) }) }),
|
|
1670
|
+
Me.map((e, s) => /* @__PURE__ */ n(He, { children: s === Me.length - 1 ? /* @__PURE__ */ n(ge, { children: e.name }) : /* @__PURE__ */ n(ge, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", onClick: () => Z(e.id), children: e.name }) }) }, e.id))
|
|
1668
1671
|
]
|
|
1669
1672
|
}
|
|
1670
1673
|
) }),
|
|
1671
|
-
/* @__PURE__ */ n(
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
"aria-live": "polite",
|
|
1676
|
-
className: z.length > 0 ? "type-meta ds:m-0 ds:text-muted-foreground" : "ds:sr-only",
|
|
1677
|
-
children: z.length > 0 ? N("fileManager.selected", "{{count}} items selected", {
|
|
1678
|
-
count: z.length
|
|
1679
|
-
}) : ""
|
|
1680
|
-
}
|
|
1681
|
-
),
|
|
1682
|
-
nt && /* @__PURE__ */ x(
|
|
1674
|
+
/* @__PURE__ */ n("p", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: K.length > 0 ? T("fileManager.selected", "{{count}} items selected", {
|
|
1675
|
+
count: K.length
|
|
1676
|
+
}) : "" }),
|
|
1677
|
+
rt && /* @__PURE__ */ x(
|
|
1683
1678
|
"div",
|
|
1684
1679
|
{
|
|
1685
1680
|
"aria-hidden": "true",
|
|
1686
1681
|
className: "ds:pointer-events-none ds:absolute ds:inset-0 ds:z-20 ds:flex ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-lg)] ds:border-2 ds:border-dashed ds:border-primary ds:bg-primary/10",
|
|
1687
1682
|
children: [
|
|
1688
|
-
/* @__PURE__ */ n(
|
|
1689
|
-
/* @__PURE__ */ n("span", { className: "type-label ds:text-primary", children:
|
|
1683
|
+
/* @__PURE__ */ n(St, { className: "ds:size-8 ds:text-primary" }),
|
|
1684
|
+
/* @__PURE__ */ n("span", { className: "type-label ds:text-primary", children: T(
|
|
1690
1685
|
"fileManager.dropOverlay",
|
|
1691
1686
|
"Drop files to upload to {{folder}}",
|
|
1692
1687
|
{
|
|
1693
|
-
folder:
|
|
1688
|
+
folder: _e
|
|
1694
1689
|
}
|
|
1695
1690
|
) })
|
|
1696
1691
|
]
|
|
@@ -1699,67 +1694,67 @@ const qe = Pe(
|
|
|
1699
1694
|
/* @__PURE__ */ n(
|
|
1700
1695
|
"span",
|
|
1701
1696
|
{
|
|
1702
|
-
ref:
|
|
1697
|
+
ref: ve,
|
|
1703
1698
|
role: "status",
|
|
1704
1699
|
"aria-live": "polite",
|
|
1705
1700
|
className: "ds:sr-only"
|
|
1706
1701
|
}
|
|
1707
1702
|
),
|
|
1708
1703
|
/* @__PURE__ */ n(
|
|
1709
|
-
|
|
1704
|
+
dn,
|
|
1710
1705
|
{
|
|
1711
|
-
open:
|
|
1706
|
+
open: C.type === "create-folder",
|
|
1712
1707
|
onOpenChange: (e) => {
|
|
1713
1708
|
e || q();
|
|
1714
1709
|
},
|
|
1715
|
-
onSubmit:
|
|
1710
|
+
onSubmit: ot
|
|
1716
1711
|
}
|
|
1717
1712
|
),
|
|
1718
1713
|
/* @__PURE__ */ n(
|
|
1719
|
-
|
|
1714
|
+
cn,
|
|
1720
1715
|
{
|
|
1721
|
-
open:
|
|
1716
|
+
open: C.type === "upload",
|
|
1722
1717
|
onOpenChange: (e) => {
|
|
1723
1718
|
e || q();
|
|
1724
1719
|
},
|
|
1725
|
-
onUpload:
|
|
1726
|
-
destinationLabel:
|
|
1720
|
+
onUpload: ct,
|
|
1721
|
+
destinationLabel: _e,
|
|
1727
1722
|
config: W
|
|
1728
1723
|
}
|
|
1729
1724
|
),
|
|
1730
1725
|
/* @__PURE__ */ n(
|
|
1731
|
-
|
|
1726
|
+
un,
|
|
1732
1727
|
{
|
|
1733
|
-
open:
|
|
1728
|
+
open: C.type === "rename",
|
|
1734
1729
|
onOpenChange: (e) => {
|
|
1735
1730
|
e || q();
|
|
1736
1731
|
},
|
|
1737
1732
|
initialName: (Ne == null ? void 0 : Ne.name) ?? "",
|
|
1738
|
-
onSubmit:
|
|
1733
|
+
onSubmit: lt
|
|
1739
1734
|
}
|
|
1740
1735
|
),
|
|
1741
1736
|
/* @__PURE__ */ n(
|
|
1742
|
-
|
|
1737
|
+
fn,
|
|
1743
1738
|
{
|
|
1744
|
-
open:
|
|
1739
|
+
open: C.type === "delete",
|
|
1745
1740
|
onOpenChange: (e) => {
|
|
1746
1741
|
e || q();
|
|
1747
1742
|
},
|
|
1748
|
-
count:
|
|
1749
|
-
onConfirm:
|
|
1743
|
+
count: C.type === "delete" ? C.itemIds.length : 0,
|
|
1744
|
+
onConfirm: st
|
|
1750
1745
|
}
|
|
1751
1746
|
),
|
|
1752
1747
|
/* @__PURE__ */ n(
|
|
1753
|
-
|
|
1748
|
+
pn,
|
|
1754
1749
|
{
|
|
1755
|
-
open:
|
|
1750
|
+
open: C.type === "move",
|
|
1756
1751
|
onOpenChange: (e) => {
|
|
1757
1752
|
e || q();
|
|
1758
1753
|
},
|
|
1759
1754
|
items: r,
|
|
1760
|
-
movingIds:
|
|
1761
|
-
currentFolderId:
|
|
1762
|
-
onConfirm:
|
|
1755
|
+
movingIds: C.type === "move" ? C.itemIds : [],
|
|
1756
|
+
currentFolderId: w,
|
|
1757
|
+
onConfirm: dt
|
|
1763
1758
|
}
|
|
1764
1759
|
)
|
|
1765
1760
|
]
|
|
@@ -1771,6 +1766,6 @@ const qe = Pe(
|
|
|
1771
1766
|
vn.displayName = "FileManager";
|
|
1772
1767
|
export {
|
|
1773
1768
|
vn as F,
|
|
1774
|
-
|
|
1769
|
+
Yt as f
|
|
1775
1770
|
};
|
|
1776
|
-
//# sourceMappingURL=file-manager-
|
|
1771
|
+
//# sourceMappingURL=file-manager-DfTG7bxx.js.map
|