ode-explorer 1.4.0 → 1.4.1-develop-b2school.202403141630
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/index.html +17 -11
- package/dist/index.js +245 -81
- package/dist/version.txt +1 -1
- package/lib/ActionBarContainer.js +191 -179
- package/lib/DeleteModal.js +3 -3
- package/lib/FolderModal.js +16 -16
- package/lib/Library.js +4 -6
- package/lib/MoveModal.js +6 -6
- package/lib/features/ActionBar/useActionBar.d.ts +1 -1
- package/lib/features/SideBar/Library/Library.d.ts +1 -1
- package/lib/index2.js +472 -412
- package/lib/services/api/index.d.ts +7 -0
- package/package.json +5 -5
package/lib/index2.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = (e, t, s) => (
|
|
4
|
-
import { jsx as c, jsxs as
|
|
5
|
-
import { useState as ae, useRef as
|
|
6
|
-
import { useScrollToTop as
|
|
7
|
-
import { ArrowLeft as
|
|
1
|
+
var pe = Object.defineProperty;
|
|
2
|
+
var me = (e, t, s) => t in e ? pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var _ = (e, t, s) => (me(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
|
+
import { jsx as c, jsxs as N, Fragment as oe } from "react/jsx-runtime";
|
|
5
|
+
import { useState as ae, useRef as ge, useEffect as L, lazy as b, Suspense as O, Fragment as ye } from "react";
|
|
6
|
+
import { useScrollToTop as Ie, useOdeClient as M, IconButton as we, useToast as k, useUser as ce, useShareMutation as Se, useUpdateMutation as xe, LoadingScreen as A, FormControl as De, Input as Te, SearchButton as be, Dropdown as $, useToggle as Fe, TreeView as Ce, Button as Ne, useXitiTrackPageLoad as Re, isActionAvailable as ne, AppHeader as Pe, Breadcrumb as Ae, Grid as ee } from "@edifice-ui/react";
|
|
7
|
+
import { ArrowLeft as Ee, Filter as Qe, Delete as qe, Plus as Oe } from "@edifice-ui/icons";
|
|
8
8
|
import { useTranslation as j } from "react-i18next";
|
|
9
|
-
import { odeServices as
|
|
10
|
-
import { t as
|
|
11
|
-
import { create as
|
|
12
|
-
import { useQuery as
|
|
13
|
-
const
|
|
14
|
-
const t = await
|
|
9
|
+
import { odeServices as x, FOLDER as C } from "edifice-ts-client";
|
|
10
|
+
import { t as S } from "i18next";
|
|
11
|
+
import { create as ke } from "zustand";
|
|
12
|
+
import { useQuery as Ue, useInfiniteQuery as ve, useQueryClient as E, useMutation as v } from "@tanstack/react-query";
|
|
13
|
+
const ie = async (e) => {
|
|
14
|
+
const t = await x.resource(e.application).searchContext(e);
|
|
15
15
|
return {
|
|
16
16
|
...t,
|
|
17
17
|
folders: t.folders.filter((s) => !s.trashed)
|
|
18
18
|
};
|
|
19
|
-
},
|
|
19
|
+
}, Le = async ({
|
|
20
20
|
searchParams: e,
|
|
21
21
|
name: t,
|
|
22
22
|
parentId: s
|
|
@@ -27,8 +27,8 @@ const ce = async (e) => {
|
|
|
27
27
|
application: e.application,
|
|
28
28
|
type: e.types[0]
|
|
29
29
|
};
|
|
30
|
-
return await
|
|
31
|
-
},
|
|
30
|
+
return await x.resource(e.application).createFolder(r);
|
|
31
|
+
}, Me = async ({
|
|
32
32
|
folderId: e,
|
|
33
33
|
searchParams: t,
|
|
34
34
|
parentId: s,
|
|
@@ -41,8 +41,8 @@ const ce = async (e) => {
|
|
|
41
41
|
application: t.application,
|
|
42
42
|
type: t.types[0]
|
|
43
43
|
};
|
|
44
|
-
return await
|
|
45
|
-
},
|
|
44
|
+
return await x.resource(t.application).updateFolder(n);
|
|
45
|
+
}, Ke = async ({
|
|
46
46
|
searchParams: e,
|
|
47
47
|
resourceIds: t,
|
|
48
48
|
useAssetIds: s,
|
|
@@ -54,7 +54,7 @@ const ce = async (e) => {
|
|
|
54
54
|
resourceIds: t,
|
|
55
55
|
folderIds: r
|
|
56
56
|
};
|
|
57
|
-
return await
|
|
57
|
+
return await x.resource(e.application).trashAll(n, s);
|
|
58
58
|
}, Be = async ({
|
|
59
59
|
searchParams: e,
|
|
60
60
|
resourceIds: t,
|
|
@@ -67,8 +67,8 @@ const ce = async (e) => {
|
|
|
67
67
|
resourceIds: t,
|
|
68
68
|
folderIds: r
|
|
69
69
|
};
|
|
70
|
-
return await
|
|
71
|
-
},
|
|
70
|
+
return await x.resource(e.application).deleteAll(n, s);
|
|
71
|
+
}, _e = async ({
|
|
72
72
|
searchParams: e,
|
|
73
73
|
resourceIds: t,
|
|
74
74
|
folderIds: s,
|
|
@@ -80,8 +80,11 @@ const ce = async (e) => {
|
|
|
80
80
|
resourceIds: t,
|
|
81
81
|
folderIds: s
|
|
82
82
|
};
|
|
83
|
-
return await
|
|
84
|
-
},
|
|
83
|
+
return await x.resource(e.application).restoreAll(n, r);
|
|
84
|
+
}, $e = async (e, t) => await x.resource(e.application).copy({
|
|
85
|
+
application: e.application,
|
|
86
|
+
resourceId: t
|
|
87
|
+
}), le = async ({
|
|
85
88
|
searchParams: e,
|
|
86
89
|
resourceIds: t,
|
|
87
90
|
folderId: s,
|
|
@@ -94,68 +97,68 @@ const ce = async (e) => {
|
|
|
94
97
|
resourceIds: t,
|
|
95
98
|
folderIds: r
|
|
96
99
|
};
|
|
97
|
-
return await
|
|
100
|
+
return await x.resource(e.application).moveToFolder(a, n);
|
|
98
101
|
};
|
|
99
|
-
const
|
|
102
|
+
const je = async (e) => await x.rights().sessionHasWorkflowRights(e), ze = ({
|
|
100
103
|
searchParams: e,
|
|
101
104
|
assetId: t
|
|
102
105
|
}) => {
|
|
103
|
-
const s =
|
|
106
|
+
const s = x.resource(e.application).getViewUrl(t);
|
|
104
107
|
window.open(s, "_self");
|
|
105
|
-
},
|
|
108
|
+
}, Ve = ({
|
|
106
109
|
searchParams: e,
|
|
107
110
|
params: t
|
|
108
|
-
}) =>
|
|
111
|
+
}) => x.resource(e.application).create(t), He = ({
|
|
109
112
|
searchParams: e,
|
|
110
113
|
assetId: t
|
|
111
114
|
}) => {
|
|
112
|
-
const s =
|
|
115
|
+
const s = x.resource(e.application).getPrintUrl(t);
|
|
113
116
|
return window.open(s, "_blank");
|
|
114
|
-
},
|
|
117
|
+
}, Mt = ({
|
|
115
118
|
searchParams: e,
|
|
116
119
|
folderId: t
|
|
117
120
|
}) => {
|
|
118
|
-
const s =
|
|
121
|
+
const s = x.resource(e.application).getFormUrl(t);
|
|
119
122
|
return window.open(s, "_self");
|
|
120
|
-
},
|
|
123
|
+
}, Kt = ({
|
|
121
124
|
searchParams: e,
|
|
122
125
|
assetId: t
|
|
123
126
|
}) => {
|
|
124
|
-
const s =
|
|
127
|
+
const s = x.resource(e.application).getEditUrl(t);
|
|
125
128
|
return window.open(s, "_self");
|
|
126
|
-
},
|
|
129
|
+
}, Bt = ({
|
|
127
130
|
searchParams: e,
|
|
128
131
|
assetId: t
|
|
129
132
|
}) => {
|
|
130
|
-
const s =
|
|
133
|
+
const s = x.resource(e.application).getExportUrl(t);
|
|
131
134
|
return window.open(s, "_self");
|
|
132
135
|
};
|
|
133
|
-
function
|
|
136
|
+
function te(e) {
|
|
134
137
|
return e.filter((t, s) => e.indexOf(t) === s);
|
|
135
138
|
}
|
|
136
|
-
function
|
|
139
|
+
function H(e, t) {
|
|
137
140
|
var r, n;
|
|
138
141
|
let s;
|
|
139
|
-
return (t == null ? void 0 : t.id) === e ? t : ((r = t == null ? void 0 : t.children) != null && r.length && ((n = t == null ? void 0 : t.children) == null || n.every((a) => (s =
|
|
142
|
+
return (t == null ? void 0 : t.id) === e ? t : ((r = t == null ? void 0 : t.children) != null && r.length && ((n = t == null ? void 0 : t.children) == null || n.every((a) => (s = H(e, a), s === void 0))), s);
|
|
140
143
|
}
|
|
141
|
-
function
|
|
144
|
+
function We(e, t) {
|
|
142
145
|
var r;
|
|
143
|
-
const s =
|
|
144
|
-
return (r = s == null ? void 0 : s.folder) != null && r.ancestors ? [...(s == null ? void 0 : s.folder.ancestors) || [], e] : e ===
|
|
146
|
+
const s = H(e, t);
|
|
147
|
+
return (r = s == null ? void 0 : s.folder) != null && r.ancestors ? [...(s == null ? void 0 : s.folder.ancestors) || [], e] : e === C.BIN ? [C.BIN] : [C.DEFAULT];
|
|
145
148
|
}
|
|
146
|
-
function
|
|
147
|
-
return t.id === e && t.children ? t.children.length > 0 : t.children ? t.children.some((s) =>
|
|
149
|
+
function de(e, t) {
|
|
150
|
+
return t.id === e && t.children ? t.children.length > 0 : t.children ? t.children.some((s) => de(t.id, s)) : !1;
|
|
148
151
|
}
|
|
149
|
-
function
|
|
150
|
-
return
|
|
152
|
+
function W(e, t) {
|
|
153
|
+
return ue(e, t) || e;
|
|
151
154
|
}
|
|
152
|
-
function
|
|
155
|
+
function ue(e, t, s) {
|
|
153
156
|
var n;
|
|
154
157
|
const r = t(e, s);
|
|
155
158
|
if ((n = r == null ? void 0 : r.children) != null && n.length) {
|
|
156
159
|
const a = [];
|
|
157
160
|
for (const o of (r == null ? void 0 : r.children) || []) {
|
|
158
|
-
const l =
|
|
161
|
+
const l = ue(o, t, r);
|
|
159
162
|
l && a.push(l);
|
|
160
163
|
}
|
|
161
164
|
return {
|
|
@@ -175,7 +178,7 @@ class G {
|
|
|
175
178
|
this.folder = t, this.id = t.id, this.name = t.name, this.childNumber = t.childNumber;
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
|
-
const
|
|
181
|
+
const he = (e, t, s) => W(e, (r) => (r.id === s && (r.children = t == null ? void 0 : t.map((n) => new G(n))), r)), w = ke()((e, t) => ({
|
|
179
182
|
config: null,
|
|
180
183
|
searchConfig: {
|
|
181
184
|
minLength: 1
|
|
@@ -200,8 +203,8 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
200
203
|
trashed: !1
|
|
201
204
|
},
|
|
202
205
|
treeData: {
|
|
203
|
-
id:
|
|
204
|
-
name:
|
|
206
|
+
id: C.DEFAULT,
|
|
207
|
+
name: S("explorer.filters.mine"),
|
|
205
208
|
section: !0,
|
|
206
209
|
children: []
|
|
207
210
|
},
|
|
@@ -307,7 +310,7 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
307
310
|
const {
|
|
308
311
|
searchParams: r
|
|
309
312
|
} = t();
|
|
310
|
-
|
|
313
|
+
ze({
|
|
311
314
|
searchParams: r,
|
|
312
315
|
assetId: s.assetId
|
|
313
316
|
});
|
|
@@ -325,7 +328,7 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
325
328
|
if (r.length !== 1)
|
|
326
329
|
throw new Error("Cannot open more than 1 resource");
|
|
327
330
|
const a = r.find((o) => o.id === n[0]);
|
|
328
|
-
|
|
331
|
+
He({
|
|
329
332
|
searchParams: s,
|
|
330
333
|
assetId: a.assetId
|
|
331
334
|
});
|
|
@@ -340,13 +343,13 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
340
343
|
const {
|
|
341
344
|
searchParams: n,
|
|
342
345
|
treeData: a
|
|
343
|
-
} = t(), o = n.filters.folder, l =
|
|
344
|
-
o !== s && e((
|
|
345
|
-
...
|
|
346
|
+
} = t(), o = n.filters.folder, l = We(s, a), h = te([...l, s]);
|
|
347
|
+
o !== s && e((d) => ({
|
|
348
|
+
...d,
|
|
346
349
|
// reset selection when changing folder
|
|
347
350
|
folderIds: [],
|
|
348
351
|
resourceIds: [],
|
|
349
|
-
selectedNodesIds:
|
|
352
|
+
selectedNodesIds: h,
|
|
350
353
|
currentFolder: r || {
|
|
351
354
|
id: s
|
|
352
355
|
},
|
|
@@ -357,7 +360,7 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
357
360
|
...n.filters,
|
|
358
361
|
folder: s
|
|
359
362
|
},
|
|
360
|
-
trashed: s ===
|
|
363
|
+
trashed: s === C.BIN
|
|
361
364
|
}
|
|
362
365
|
}));
|
|
363
366
|
},
|
|
@@ -373,14 +376,14 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
373
376
|
if (e((o) => ({
|
|
374
377
|
...o,
|
|
375
378
|
status: "unfold"
|
|
376
|
-
})), !
|
|
379
|
+
})), !de(s, n)) {
|
|
377
380
|
await r.prefetchInfiniteQuery({
|
|
378
381
|
initialPageParam: 0,
|
|
379
382
|
queryKey: ["prefetchContext", {
|
|
380
383
|
folderId: s,
|
|
381
384
|
trashed: !1
|
|
382
385
|
}],
|
|
383
|
-
queryFn: async () => await
|
|
386
|
+
queryFn: async () => await ie({
|
|
384
387
|
...a,
|
|
385
388
|
filters: {
|
|
386
389
|
...a.filters,
|
|
@@ -393,10 +396,10 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
393
396
|
trashed: !1
|
|
394
397
|
}]);
|
|
395
398
|
e((l) => {
|
|
396
|
-
var
|
|
399
|
+
var h;
|
|
397
400
|
return {
|
|
398
401
|
...l,
|
|
399
|
-
treeData:
|
|
402
|
+
treeData: he(n, (h = o == null ? void 0 : o.pages[0]) == null ? void 0 : h.folders, s || C.DEFAULT)
|
|
400
403
|
};
|
|
401
404
|
});
|
|
402
405
|
}
|
|
@@ -406,8 +409,8 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
406
409
|
treeData: r
|
|
407
410
|
} = t(), {
|
|
408
411
|
openFolder: n
|
|
409
|
-
} = t().updaters, a =
|
|
410
|
-
|
|
412
|
+
} = t().updaters, a = H(s, r);
|
|
413
|
+
Ie()(), e((l) => ({
|
|
411
414
|
...l,
|
|
412
415
|
searchParams: {
|
|
413
416
|
...l.searchParams,
|
|
@@ -429,10 +432,10 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
429
432
|
} = t().updaters, a = s.length;
|
|
430
433
|
if (a < 2)
|
|
431
434
|
return;
|
|
432
|
-
const o =
|
|
435
|
+
const o = H(s[a - 2], r);
|
|
433
436
|
n({
|
|
434
437
|
folder: o,
|
|
435
|
-
folderId: (o == null ? void 0 : o.id) ||
|
|
438
|
+
folderId: (o == null ? void 0 : o.id) || C.DEFAULT
|
|
436
439
|
});
|
|
437
440
|
},
|
|
438
441
|
goToTrash: () => e((s) => ({
|
|
@@ -446,94 +449,94 @@ const de = (e, t, s) => H(e, (r) => (r.id === s && (r.children = t == null ? voi
|
|
|
446
449
|
...s.searchParams,
|
|
447
450
|
search: void 0,
|
|
448
451
|
filters: {
|
|
449
|
-
folder:
|
|
452
|
+
folder: C.BIN
|
|
450
453
|
},
|
|
451
454
|
trashed: !0
|
|
452
455
|
},
|
|
453
456
|
currentFolder: {
|
|
454
|
-
id:
|
|
457
|
+
id: C.BIN
|
|
455
458
|
}
|
|
456
459
|
}))
|
|
457
460
|
}
|
|
458
|
-
})),
|
|
459
|
-
const e =
|
|
460
|
-
return (e == null ? void 0 : e.id) ===
|
|
461
|
-
},
|
|
462
|
-
const e =
|
|
461
|
+
})), D = () => w((e) => e.searchParams), se = () => w((e) => e.selectedNodesIds), z = () => w((e) => e.treeData), _t = () => w((e) => e.selectedFolders), $t = () => w((e) => e.selectedResources), Ge = () => w((e) => e.searchConfig), J = () => w((e) => e.folderIds), X = () => w((e) => e.resourceIds), Y = () => w((e) => e.selectedResources.map((t) => t.assetId)), Z = () => w((e) => e.selectedResources.filter((t) => t.assetId === t.id)), V = () => w((e) => e.currentFolder), T = () => w((e) => e.updaters), re = () => {
|
|
462
|
+
const e = V();
|
|
463
|
+
return (e == null ? void 0 : e.id) === C.BIN;
|
|
464
|
+
}, Je = () => w((e) => e.resourceIsTrash), Xe = () => w((e) => e.resourceActionDisable), Ye = () => {
|
|
465
|
+
const e = V();
|
|
463
466
|
return (e == null ? void 0 : e.id) === "default";
|
|
464
|
-
},
|
|
465
|
-
const e =
|
|
467
|
+
}, Ze = () => se().length > 1, et = () => w((e) => e.status), fe = () => {
|
|
468
|
+
const e = D(), [t, s] = ae(""), r = Ge(), n = et(), a = ge(null), {
|
|
466
469
|
setSearchParams: o
|
|
467
|
-
} =
|
|
468
|
-
const
|
|
469
|
-
s(
|
|
470
|
-
},
|
|
471
|
-
(
|
|
470
|
+
} = T(), l = (u) => {
|
|
471
|
+
const f = u.target.value;
|
|
472
|
+
s(f.toString());
|
|
473
|
+
}, h = (u) => {
|
|
474
|
+
(u.key === "Enter" || u.key === "Return") && (u.preventDefault(), o({
|
|
472
475
|
search: t || void 0
|
|
473
476
|
}));
|
|
474
|
-
},
|
|
475
|
-
|
|
477
|
+
}, d = (u) => {
|
|
478
|
+
u.preventDefault(), o({
|
|
476
479
|
search: t || void 0
|
|
477
480
|
});
|
|
478
481
|
};
|
|
479
|
-
return
|
|
480
|
-
const
|
|
482
|
+
return L(() => {
|
|
483
|
+
const f = t.length == 0 || t.length >= r.minLength ? {
|
|
481
484
|
search: t || void 0
|
|
482
485
|
} : {};
|
|
483
486
|
o({
|
|
484
487
|
...e,
|
|
485
|
-
...
|
|
488
|
+
...f
|
|
486
489
|
});
|
|
487
|
-
}, [t, r.minLength]),
|
|
490
|
+
}, [t, r.minLength]), L(() => {
|
|
488
491
|
n === "select" && s("");
|
|
489
|
-
}, [n]),
|
|
492
|
+
}, [n]), L(() => {
|
|
490
493
|
s(() => {
|
|
491
|
-
var
|
|
492
|
-
return ((
|
|
494
|
+
var u;
|
|
495
|
+
return ((u = e.search) == null ? void 0 : u.toString()) ?? "";
|
|
493
496
|
});
|
|
494
497
|
}, [e]), {
|
|
495
498
|
formRef: a,
|
|
496
499
|
inputSearch: t,
|
|
497
500
|
handleInputSearchChange: l,
|
|
498
|
-
handleKeyPress:
|
|
499
|
-
handleSearchSubmit:
|
|
501
|
+
handleKeyPress: h,
|
|
502
|
+
handleSearchSubmit: d
|
|
500
503
|
};
|
|
501
504
|
};
|
|
502
|
-
function
|
|
505
|
+
function tt() {
|
|
503
506
|
const {
|
|
504
507
|
appCode: e
|
|
505
|
-
} =
|
|
508
|
+
} = M(), {
|
|
506
509
|
gotoPreviousFolder: t
|
|
507
|
-
} =
|
|
510
|
+
} = T(), {
|
|
508
511
|
t: s
|
|
509
512
|
} = j(), {
|
|
510
513
|
inputSearch: r
|
|
511
|
-
} =
|
|
514
|
+
} = fe(), n = se(), a = re(), o = V(), l = s("explorer.tree.trash"), h = s("explorer.tree.search"), d = s("explorer.filters.mine", {
|
|
512
515
|
ns: e
|
|
513
|
-
}),
|
|
514
|
-
return /* @__PURE__ */ c("div", { className: "py-16", children: n.length > 1 && !a ? /* @__PURE__ */
|
|
515
|
-
/* @__PURE__ */ c(
|
|
516
|
-
/* @__PURE__ */ c("p", { className: "body py-8 text-truncate", children: /* @__PURE__ */ c("strong", { children:
|
|
517
|
-
] }) : /* @__PURE__ */ c("h2", { className: "body py-8 fw-bold", children: r.length !== 0 ?
|
|
516
|
+
}), u = (o == null ? void 0 : o.name) || d;
|
|
517
|
+
return /* @__PURE__ */ c("div", { className: "py-16", children: n.length > 1 && !a ? /* @__PURE__ */ N("div", { className: "d-flex align-items-center gap-8", children: [
|
|
518
|
+
/* @__PURE__ */ c(we, { icon: /* @__PURE__ */ c(Ee, {}), variant: "ghost", color: "tertiary", "aria-label": s("back"), className: "ms-n16", onClick: t }),
|
|
519
|
+
/* @__PURE__ */ c("p", { className: "body py-8 text-truncate", children: /* @__PURE__ */ c("strong", { children: u }) })
|
|
520
|
+
] }) : /* @__PURE__ */ c("h2", { className: "body py-8 fw-bold", children: r.length !== 0 ? h : a ? l : d }) });
|
|
518
521
|
}
|
|
519
|
-
const
|
|
520
|
-
const e =
|
|
522
|
+
const st = () => {
|
|
523
|
+
const e = Xe(), {
|
|
521
524
|
clearSelectedIds: t,
|
|
522
525
|
setResourceActionDisable: s,
|
|
523
526
|
clearSelectedItems: r
|
|
524
|
-
} =
|
|
527
|
+
} = T();
|
|
525
528
|
return {
|
|
526
529
|
isActionDisableModalOpen: e,
|
|
527
530
|
onActionDisableCancel: () => {
|
|
528
531
|
t(), r(), s(!1);
|
|
529
532
|
}
|
|
530
533
|
};
|
|
531
|
-
},
|
|
532
|
-
const e =
|
|
534
|
+
}, rt = () => {
|
|
535
|
+
const e = Je(), {
|
|
533
536
|
clearSelectedIds: t,
|
|
534
537
|
setResourceIsTrash: s,
|
|
535
538
|
clearSelectedItems: r
|
|
536
|
-
} =
|
|
539
|
+
} = T();
|
|
537
540
|
return {
|
|
538
541
|
isTrashedModalOpen: e,
|
|
539
542
|
onTrashedCancel: () => {
|
|
@@ -541,14 +544,14 @@ const ss = () => {
|
|
|
541
544
|
}
|
|
542
545
|
};
|
|
543
546
|
};
|
|
544
|
-
function
|
|
547
|
+
function nt(e, {
|
|
545
548
|
parentId: t,
|
|
546
549
|
newFolder: s
|
|
547
550
|
}) {
|
|
548
|
-
return
|
|
551
|
+
return W(e, (r) => {
|
|
549
552
|
var n;
|
|
550
553
|
if (r.id === t) {
|
|
551
|
-
const a = [...((n = r.folder) == null ? void 0 : n.ancestors) || []], o =
|
|
554
|
+
const a = [...((n = r.folder) == null ? void 0 : n.ancestors) || []], o = te([...a, r.id]);
|
|
552
555
|
return {
|
|
553
556
|
...r,
|
|
554
557
|
children: [...r.children || [], new G({
|
|
@@ -560,54 +563,54 @@ function rs(e, {
|
|
|
560
563
|
return r;
|
|
561
564
|
});
|
|
562
565
|
}
|
|
563
|
-
function
|
|
566
|
+
function ot(e, {
|
|
564
567
|
folders: t
|
|
565
568
|
}) {
|
|
566
|
-
return
|
|
569
|
+
return W(e, (s) => {
|
|
567
570
|
if (!t.includes(s.id))
|
|
568
571
|
return s;
|
|
569
572
|
});
|
|
570
573
|
}
|
|
571
|
-
function
|
|
574
|
+
function at(e, {
|
|
572
575
|
destinationId: t,
|
|
573
576
|
folders: s
|
|
574
577
|
}) {
|
|
575
|
-
return
|
|
578
|
+
return W(e, (r, n) => {
|
|
576
579
|
var a, o;
|
|
577
580
|
if (t === r.id) {
|
|
578
|
-
const l = [...((a = r.folder) == null ? void 0 : a.ancestors) || []],
|
|
581
|
+
const l = [...((a = r.folder) == null ? void 0 : a.ancestors) || []], h = te([...l, r.id]), d = [...r.children || []], u = ((o = r.children) == null ? void 0 : o.map((i) => i.id)) || [];
|
|
579
582
|
for (const i of s)
|
|
580
|
-
if (!
|
|
581
|
-
const p =
|
|
582
|
-
p &&
|
|
583
|
+
if (!u.includes(i)) {
|
|
584
|
+
const p = H(i, e);
|
|
585
|
+
p && d.push({
|
|
583
586
|
...p,
|
|
584
587
|
folder: {
|
|
585
588
|
...p == null ? void 0 : p.folder,
|
|
586
|
-
ancestors:
|
|
589
|
+
ancestors: h
|
|
587
590
|
}
|
|
588
591
|
});
|
|
589
592
|
}
|
|
590
593
|
return {
|
|
591
594
|
...r,
|
|
592
|
-
children:
|
|
595
|
+
children: d
|
|
593
596
|
};
|
|
594
597
|
} else
|
|
595
598
|
return s.includes(r.id) && t !== (n == null ? void 0 : n.id) ? void 0 : r;
|
|
596
599
|
});
|
|
597
600
|
}
|
|
598
|
-
function
|
|
601
|
+
function ct(e, {
|
|
599
602
|
folderId: t,
|
|
600
603
|
newFolder: s
|
|
601
604
|
}) {
|
|
602
|
-
return
|
|
605
|
+
return W(e, (r) => r.id === t ? new G(s) : r);
|
|
603
606
|
}
|
|
604
|
-
const
|
|
607
|
+
const it = () => {
|
|
605
608
|
const e = w((t) => t.config);
|
|
606
|
-
return
|
|
609
|
+
return Ue({
|
|
607
610
|
queryKey: ["actions"],
|
|
608
611
|
queryFn: async () => {
|
|
609
612
|
const t = e == null ? void 0 : e.actions.map((r) => r.workflow);
|
|
610
|
-
return await
|
|
613
|
+
return await je(t);
|
|
611
614
|
},
|
|
612
615
|
select: (t) => e == null ? void 0 : e.actions.map((s) => ({
|
|
613
616
|
...s,
|
|
@@ -616,8 +619,8 @@ const cs = () => {
|
|
|
616
619
|
staleTime: 1 / 0,
|
|
617
620
|
enabled: !!e
|
|
618
621
|
});
|
|
619
|
-
},
|
|
620
|
-
const e = w((o) => o.config), t =
|
|
622
|
+
}, lt = () => {
|
|
623
|
+
const e = w((o) => o.config), t = D(), {
|
|
621
624
|
filters: s,
|
|
622
625
|
trashed: r,
|
|
623
626
|
search: n
|
|
@@ -627,11 +630,11 @@ const cs = () => {
|
|
|
627
630
|
trashed: r,
|
|
628
631
|
search: n
|
|
629
632
|
}];
|
|
630
|
-
return
|
|
633
|
+
return ve({
|
|
631
634
|
queryKey: a,
|
|
632
635
|
queryFn: async ({
|
|
633
636
|
pageParam: o
|
|
634
|
-
}) => await
|
|
637
|
+
}) => await ie({
|
|
635
638
|
...t,
|
|
636
639
|
application: e == null ? void 0 : e.app,
|
|
637
640
|
types: e == null ? void 0 : e.types,
|
|
@@ -646,13 +649,13 @@ const cs = () => {
|
|
|
646
649
|
retry: !1,
|
|
647
650
|
getNextPageParam: (o) => o.pagination.startIdx + o.pagination.pageSize
|
|
648
651
|
});
|
|
649
|
-
},
|
|
650
|
-
const e =
|
|
651
|
-
clearSelectedItems:
|
|
652
|
-
clearSelectedIds:
|
|
653
|
-
setTreeData:
|
|
652
|
+
}, jt = () => {
|
|
653
|
+
const e = k(), t = E(), s = D(), r = z(), n = J(), a = Y(), o = X(), l = Z().length > 0, h = l ? a : o, {
|
|
654
|
+
clearSelectedItems: d,
|
|
655
|
+
clearSelectedIds: u,
|
|
656
|
+
setTreeData: f,
|
|
654
657
|
setSearchParams: i
|
|
655
|
-
} =
|
|
658
|
+
} = T(), {
|
|
656
659
|
filters: p,
|
|
657
660
|
trashed: m
|
|
658
661
|
} = s, y = ["context", {
|
|
@@ -660,63 +663,63 @@ const cs = () => {
|
|
|
660
663
|
filters: p,
|
|
661
664
|
trashed: m
|
|
662
665
|
}];
|
|
663
|
-
return
|
|
664
|
-
mutationFn: async () => await
|
|
666
|
+
return v({
|
|
667
|
+
mutationFn: async () => await Ke({
|
|
665
668
|
searchParams: s,
|
|
666
669
|
folderIds: n,
|
|
667
|
-
resourceIds:
|
|
670
|
+
resourceIds: h,
|
|
668
671
|
useAssetIds: l
|
|
669
672
|
}),
|
|
670
673
|
onError(g) {
|
|
671
|
-
typeof g == "string" && e.error(
|
|
674
|
+
typeof g == "string" && e.error(S(g));
|
|
672
675
|
},
|
|
673
676
|
onSuccess: async (g) => {
|
|
674
677
|
if (await t.cancelQueries({
|
|
675
678
|
queryKey: y
|
|
676
679
|
}), t.getQueryData(y))
|
|
677
|
-
return e.success(
|
|
678
|
-
var
|
|
679
|
-
if (
|
|
680
|
-
const
|
|
681
|
-
...
|
|
682
|
-
pages:
|
|
683
|
-
var
|
|
680
|
+
return e.success(S("explorer.trash.title")), t.setQueryData(y, (F) => {
|
|
681
|
+
var Q;
|
|
682
|
+
if (F) {
|
|
683
|
+
const U = {
|
|
684
|
+
...F,
|
|
685
|
+
pages: F == null ? void 0 : F.pages.map((R) => {
|
|
686
|
+
var P;
|
|
684
687
|
return {
|
|
685
|
-
...
|
|
686
|
-
folders:
|
|
688
|
+
...R,
|
|
689
|
+
folders: R.folders.filter((q) => !n.includes(q.id)),
|
|
687
690
|
pagination: {
|
|
688
|
-
...
|
|
691
|
+
...R.pagination,
|
|
689
692
|
// @ts-ignore
|
|
690
|
-
maxIdx: ((
|
|
693
|
+
maxIdx: ((P = R == null ? void 0 : R.pagination) == null ? void 0 : P.maxIdx) - g.resources.length
|
|
691
694
|
},
|
|
692
|
-
resources:
|
|
695
|
+
resources: R.resources.filter((q) => l ? !a.includes(q.assetId) : !h.includes(q.id))
|
|
693
696
|
};
|
|
694
697
|
})
|
|
695
|
-
},
|
|
698
|
+
}, K = ot(r, {
|
|
696
699
|
folders: n
|
|
697
700
|
});
|
|
698
|
-
return
|
|
701
|
+
return f(K), i({
|
|
699
702
|
...s,
|
|
700
703
|
pagination: {
|
|
701
704
|
...s.pagination,
|
|
702
705
|
// @ts-ignore
|
|
703
|
-
maxIdx: ((
|
|
706
|
+
maxIdx: ((Q = s.pagination) == null ? void 0 : Q.maxIdx) - g.resources.length
|
|
704
707
|
}
|
|
705
|
-
}),
|
|
708
|
+
}), U;
|
|
706
709
|
}
|
|
707
710
|
});
|
|
708
711
|
},
|
|
709
712
|
onSettled: () => {
|
|
710
|
-
|
|
713
|
+
d(), u();
|
|
711
714
|
}
|
|
712
715
|
});
|
|
713
|
-
},
|
|
714
|
-
const e =
|
|
715
|
-
setFolderIds:
|
|
716
|
-
setResourceIds:
|
|
717
|
-
setSelectedResources:
|
|
718
|
-
setSelectedFolders:
|
|
719
|
-
} =
|
|
716
|
+
}, zt = () => {
|
|
717
|
+
const e = k(), t = E(), s = D(), r = J(), n = Y(), a = X(), o = Z().length > 0, l = o ? n : a, {
|
|
718
|
+
setFolderIds: h,
|
|
719
|
+
setResourceIds: d,
|
|
720
|
+
setSelectedResources: u,
|
|
721
|
+
setSelectedFolders: f
|
|
722
|
+
} = T(), {
|
|
720
723
|
filters: i,
|
|
721
724
|
trashed: p
|
|
722
725
|
} = s, m = ["context", {
|
|
@@ -724,49 +727,49 @@ const cs = () => {
|
|
|
724
727
|
filters: i,
|
|
725
728
|
trashed: p
|
|
726
729
|
}];
|
|
727
|
-
return
|
|
728
|
-
mutationFn: async () => await
|
|
730
|
+
return v({
|
|
731
|
+
mutationFn: async () => await _e({
|
|
729
732
|
searchParams: s,
|
|
730
733
|
folderIds: r,
|
|
731
734
|
resourceIds: l,
|
|
732
735
|
useAssetIds: o
|
|
733
736
|
}),
|
|
734
737
|
onError(y) {
|
|
735
|
-
typeof y == "string" && e.error(
|
|
738
|
+
typeof y == "string" && e.error(S(y));
|
|
736
739
|
},
|
|
737
740
|
onSuccess: async () => {
|
|
738
741
|
if (await t.cancelQueries({
|
|
739
742
|
queryKey: m
|
|
740
743
|
}), t.getQueryData(m))
|
|
741
|
-
return e.success(
|
|
744
|
+
return e.success(S("explorer.trash.toast")), t.setQueryData(m, (g) => {
|
|
742
745
|
if (g)
|
|
743
746
|
return {
|
|
744
747
|
...g,
|
|
745
748
|
pages: g == null ? void 0 : g.pages.map((I) => ({
|
|
746
749
|
...I,
|
|
747
|
-
folders: I.folders.filter((
|
|
748
|
-
resources: I.resources.filter((
|
|
750
|
+
folders: I.folders.filter((F) => !r.includes(F.id)),
|
|
751
|
+
resources: I.resources.filter((F) => o ? !n.includes(F.assetId) : !l.includes(F.id))
|
|
749
752
|
}))
|
|
750
753
|
};
|
|
751
754
|
});
|
|
752
755
|
},
|
|
753
756
|
onSettled: () => {
|
|
754
|
-
|
|
757
|
+
d([]), u([]), h([]), f([]);
|
|
755
758
|
}
|
|
756
759
|
});
|
|
757
|
-
},
|
|
758
|
-
const e =
|
|
759
|
-
clearSelectedItems:
|
|
760
|
-
clearSelectedIds:
|
|
761
|
-
} =
|
|
762
|
-
filters:
|
|
763
|
-
trashed:
|
|
760
|
+
}, Vt = () => {
|
|
761
|
+
const e = k(), t = E(), s = D(), r = J(), n = Y(), a = X(), o = Z().length > 0, l = o ? n : a, {
|
|
762
|
+
clearSelectedItems: h,
|
|
763
|
+
clearSelectedIds: d
|
|
764
|
+
} = T(), {
|
|
765
|
+
filters: u,
|
|
766
|
+
trashed: f
|
|
764
767
|
} = s, i = ["context", {
|
|
765
|
-
folderId:
|
|
766
|
-
filters:
|
|
767
|
-
trashed:
|
|
768
|
+
folderId: u.folder,
|
|
769
|
+
filters: u,
|
|
770
|
+
trashed: f
|
|
768
771
|
}];
|
|
769
|
-
return
|
|
772
|
+
return v({
|
|
770
773
|
mutationFn: async () => await Be({
|
|
771
774
|
searchParams: s,
|
|
772
775
|
folderIds: r,
|
|
@@ -774,13 +777,13 @@ const cs = () => {
|
|
|
774
777
|
useAssetIds: o
|
|
775
778
|
}),
|
|
776
779
|
onError(p) {
|
|
777
|
-
typeof p == "string" && e.error(
|
|
780
|
+
typeof p == "string" && e.error(S(p));
|
|
778
781
|
},
|
|
779
782
|
onSuccess: async () => {
|
|
780
783
|
if (await t.cancelQueries({
|
|
781
784
|
queryKey: i
|
|
782
785
|
}), t.getQueryData(i))
|
|
783
|
-
return e.success(
|
|
786
|
+
return e.success(S("explorer.removed.from.trash")), t.setQueryData(i, (m) => {
|
|
784
787
|
if (m)
|
|
785
788
|
return {
|
|
786
789
|
...m,
|
|
@@ -793,16 +796,72 @@ const cs = () => {
|
|
|
793
796
|
});
|
|
794
797
|
},
|
|
795
798
|
onSettled: () => {
|
|
796
|
-
|
|
799
|
+
h(), d();
|
|
797
800
|
}
|
|
798
801
|
});
|
|
799
|
-
},
|
|
800
|
-
const e =
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
802
|
+
}, Ht = () => {
|
|
803
|
+
const e = k(), t = D(), s = E(), {
|
|
804
|
+
user: r
|
|
805
|
+
} = ce(), n = V(), {
|
|
806
|
+
filters: a,
|
|
807
|
+
trashed: o
|
|
808
|
+
} = t, l = "duplicate_start", h = ["context", {
|
|
809
|
+
folderId: a.folder,
|
|
810
|
+
filters: a,
|
|
811
|
+
trashed: o
|
|
812
|
+
}];
|
|
813
|
+
return v({
|
|
814
|
+
mutationFn: async (d) => (e.info(S("duplicate.start"), {
|
|
815
|
+
id: l
|
|
816
|
+
}), await $e(t, d.assetId)),
|
|
817
|
+
onSuccess: async (d, u) => {
|
|
818
|
+
e.remove(l), e.success(S("duplicate.done")), await s.cancelQueries({
|
|
819
|
+
queryKey: h
|
|
820
|
+
});
|
|
821
|
+
const f = s.getQueryData(h), i = {
|
|
822
|
+
...u,
|
|
823
|
+
name: `${u.name}${S("duplicate.suffix")}`,
|
|
824
|
+
assetId: d.duplicateId,
|
|
825
|
+
id: d.duplicateId,
|
|
826
|
+
creatorId: r == null ? void 0 : r.userId,
|
|
827
|
+
creatorName: r == null ? void 0 : r.username,
|
|
828
|
+
createdAt: Date.now(),
|
|
829
|
+
slug: u.slug || "",
|
|
830
|
+
modifiedAt: Date.now(),
|
|
831
|
+
modifierId: (r == null ? void 0 : r.userId) || "",
|
|
832
|
+
modifierName: (r == null ? void 0 : r.username) || "",
|
|
833
|
+
updatedAt: Date.now(),
|
|
834
|
+
trashed: !1,
|
|
835
|
+
rights: [`creator:${r == null ? void 0 : r.userId}`]
|
|
836
|
+
};
|
|
837
|
+
f && s.setQueryData(h, (p) => {
|
|
838
|
+
if (p)
|
|
839
|
+
return {
|
|
840
|
+
...p,
|
|
841
|
+
pages: p == null ? void 0 : p.pages.map((m) => ({
|
|
842
|
+
...m,
|
|
843
|
+
resources: [i, ...m.resources]
|
|
844
|
+
}))
|
|
845
|
+
};
|
|
846
|
+
}), n.id && n.id !== "default" && le({
|
|
847
|
+
searchParams: t,
|
|
848
|
+
resourceIds: [d.duplicateId],
|
|
849
|
+
folderId: n.id,
|
|
850
|
+
folderIds: [],
|
|
851
|
+
useAssetIds: !0
|
|
852
|
+
});
|
|
853
|
+
},
|
|
854
|
+
onError: (d) => {
|
|
855
|
+
e.remove(l), typeof d == "string" && e.error(`${S("duplicate.error")}: ${d}`);
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
}, Wt = () => {
|
|
859
|
+
const e = k(), t = E(), s = D(), r = z(), n = J(), a = Y(), o = X(), l = Z().length > 0, h = l ? a : o, {
|
|
860
|
+
clearSelectedIds: d,
|
|
861
|
+
clearSelectedItems: u,
|
|
862
|
+
setTreeData: f,
|
|
804
863
|
setSearchParams: i
|
|
805
|
-
} =
|
|
864
|
+
} = T(), {
|
|
806
865
|
filters: p,
|
|
807
866
|
trashed: m
|
|
808
867
|
} = s, y = ["context", {
|
|
@@ -810,60 +869,60 @@ const cs = () => {
|
|
|
810
869
|
filters: p,
|
|
811
870
|
trashed: m
|
|
812
871
|
}];
|
|
813
|
-
return
|
|
814
|
-
mutationFn: async (g) => await
|
|
872
|
+
return v({
|
|
873
|
+
mutationFn: async (g) => await le({
|
|
815
874
|
searchParams: s,
|
|
816
875
|
folderId: g,
|
|
817
876
|
folderIds: n,
|
|
818
|
-
resourceIds:
|
|
877
|
+
resourceIds: h,
|
|
819
878
|
useAssetIds: l
|
|
820
879
|
}),
|
|
821
880
|
onError(g) {
|
|
822
|
-
typeof g == "string" && e.error(
|
|
881
|
+
typeof g == "string" && e.error(S(g));
|
|
823
882
|
},
|
|
824
883
|
onSuccess: async (g, I) => {
|
|
825
884
|
if (t.getQueryData(y))
|
|
826
|
-
return t.setQueryData(y, (
|
|
827
|
-
var
|
|
828
|
-
if (
|
|
829
|
-
const
|
|
885
|
+
return t.setQueryData(y, (Q) => {
|
|
886
|
+
var U;
|
|
887
|
+
if (Q) {
|
|
888
|
+
const K = at(r, {
|
|
830
889
|
destinationId: I,
|
|
831
890
|
folders: n
|
|
832
|
-
}),
|
|
833
|
-
...
|
|
834
|
-
pages:
|
|
835
|
-
var
|
|
891
|
+
}), R = {
|
|
892
|
+
...Q,
|
|
893
|
+
pages: Q == null ? void 0 : Q.pages.map((P) => {
|
|
894
|
+
var q;
|
|
836
895
|
return {
|
|
837
|
-
...
|
|
838
|
-
folders:
|
|
896
|
+
...P,
|
|
897
|
+
folders: P.folders.filter((B) => !n.includes(B.id)),
|
|
839
898
|
pagination: {
|
|
840
|
-
...
|
|
899
|
+
...P.pagination,
|
|
841
900
|
// @ts-ignore
|
|
842
|
-
maxIdx: ((
|
|
901
|
+
maxIdx: ((q = P.pagination) == null ? void 0 : q.maxIdx) - g.resources.length
|
|
843
902
|
},
|
|
844
|
-
resources:
|
|
903
|
+
resources: P.resources.filter((B) => l ? !a.includes(B.assetId) : !h.includes(B.id))
|
|
845
904
|
};
|
|
846
905
|
})
|
|
847
906
|
};
|
|
848
|
-
return
|
|
907
|
+
return f(K), i({
|
|
849
908
|
...s,
|
|
850
909
|
pagination: {
|
|
851
910
|
...s.pagination,
|
|
852
911
|
// @ts-ignore
|
|
853
|
-
maxIdx: ((
|
|
912
|
+
maxIdx: ((U = s.pagination) == null ? void 0 : U.maxIdx) - g.resources.length
|
|
854
913
|
}
|
|
855
|
-
}),
|
|
914
|
+
}), R;
|
|
856
915
|
}
|
|
857
916
|
});
|
|
858
917
|
},
|
|
859
918
|
onSettled: () => {
|
|
860
|
-
|
|
919
|
+
u(), d();
|
|
861
920
|
}
|
|
862
921
|
});
|
|
863
|
-
},
|
|
864
|
-
const e =
|
|
922
|
+
}, Gt = () => {
|
|
923
|
+
const e = k(), t = E(), s = D(), r = z(), {
|
|
865
924
|
setTreeData: n
|
|
866
|
-
} =
|
|
925
|
+
} = T(), {
|
|
867
926
|
filters: a,
|
|
868
927
|
trashed: o
|
|
869
928
|
} = s, l = ["context", {
|
|
@@ -871,92 +930,92 @@ const cs = () => {
|
|
|
871
930
|
filters: a,
|
|
872
931
|
trashed: o
|
|
873
932
|
}];
|
|
874
|
-
return
|
|
933
|
+
return v({
|
|
875
934
|
mutationFn: async ({
|
|
876
|
-
name:
|
|
877
|
-
parentId:
|
|
878
|
-
}) => await
|
|
935
|
+
name: h,
|
|
936
|
+
parentId: d
|
|
937
|
+
}) => await Le({
|
|
879
938
|
searchParams: s,
|
|
880
|
-
name:
|
|
881
|
-
parentId:
|
|
939
|
+
name: h,
|
|
940
|
+
parentId: d
|
|
882
941
|
}),
|
|
883
|
-
onError(
|
|
884
|
-
typeof
|
|
942
|
+
onError(h) {
|
|
943
|
+
typeof h == "string" && e.error(S(h));
|
|
885
944
|
},
|
|
886
|
-
onSuccess: async (
|
|
945
|
+
onSuccess: async (h, d) => {
|
|
887
946
|
await t.cancelQueries({
|
|
888
947
|
queryKey: l
|
|
889
948
|
});
|
|
890
|
-
const
|
|
891
|
-
...
|
|
892
|
-
parentId:
|
|
949
|
+
const u = t.getQueryData(l), f = {
|
|
950
|
+
...h,
|
|
951
|
+
parentId: d.parentId,
|
|
893
952
|
children: [],
|
|
894
|
-
rights: [`creator:${
|
|
953
|
+
rights: [`creator:${h == null ? void 0 : h.creator_id}`]
|
|
895
954
|
};
|
|
896
|
-
if (
|
|
955
|
+
if (u)
|
|
897
956
|
return t.setQueryData(l, (i) => {
|
|
898
957
|
if (i) {
|
|
899
958
|
const p = {
|
|
900
959
|
...i,
|
|
901
960
|
pages: i == null ? void 0 : i.pages.map((y) => ({
|
|
902
961
|
...y,
|
|
903
|
-
folders: [...y.folders,
|
|
962
|
+
folders: [...y.folders, f]
|
|
904
963
|
}))
|
|
905
|
-
}, m =
|
|
906
|
-
parentId:
|
|
907
|
-
newFolder:
|
|
964
|
+
}, m = nt(r, {
|
|
965
|
+
parentId: d.parentId,
|
|
966
|
+
newFolder: f
|
|
908
967
|
});
|
|
909
968
|
return n(m), p;
|
|
910
969
|
}
|
|
911
970
|
});
|
|
912
971
|
}
|
|
913
972
|
});
|
|
914
|
-
},
|
|
915
|
-
const e =
|
|
973
|
+
}, Jt = () => {
|
|
974
|
+
const e = k(), t = E(), s = D(), r = z(), {
|
|
916
975
|
setFolderIds: n,
|
|
917
976
|
setSelectedFolders: a,
|
|
918
977
|
setTreeData: o
|
|
919
|
-
} =
|
|
978
|
+
} = T(), {
|
|
920
979
|
filters: l,
|
|
921
|
-
trashed:
|
|
922
|
-
} = s,
|
|
980
|
+
trashed: h
|
|
981
|
+
} = s, d = ["context", {
|
|
923
982
|
folderId: l.folder,
|
|
924
983
|
filters: l,
|
|
925
|
-
trashed:
|
|
984
|
+
trashed: h
|
|
926
985
|
}];
|
|
927
|
-
return
|
|
986
|
+
return v({
|
|
928
987
|
mutationFn: async ({
|
|
929
|
-
folderId:
|
|
930
|
-
name:
|
|
988
|
+
folderId: u,
|
|
989
|
+
name: f,
|
|
931
990
|
parentId: i
|
|
932
|
-
}) => await
|
|
991
|
+
}) => await Me({
|
|
933
992
|
searchParams: s,
|
|
934
|
-
folderId:
|
|
993
|
+
folderId: u,
|
|
935
994
|
parentId: i,
|
|
936
|
-
name:
|
|
995
|
+
name: f
|
|
937
996
|
}),
|
|
938
|
-
onError(
|
|
939
|
-
typeof
|
|
997
|
+
onError(u) {
|
|
998
|
+
typeof u == "string" && e.error(S(u));
|
|
940
999
|
},
|
|
941
|
-
onSuccess: async (
|
|
1000
|
+
onSuccess: async (u, f) => {
|
|
942
1001
|
if (await t.cancelQueries({
|
|
943
|
-
queryKey:
|
|
944
|
-
}), t.getQueryData(
|
|
945
|
-
return t.setQueryData(
|
|
1002
|
+
queryKey: d
|
|
1003
|
+
}), t.getQueryData(d))
|
|
1004
|
+
return t.setQueryData(d, (p) => {
|
|
946
1005
|
if (p) {
|
|
947
1006
|
const m = {
|
|
948
1007
|
...p,
|
|
949
1008
|
pages: p == null ? void 0 : p.pages.map((g) => ({
|
|
950
1009
|
...g,
|
|
951
|
-
folders: g.folders.map((I) => I.id ===
|
|
952
|
-
...
|
|
953
|
-
parentId:
|
|
1010
|
+
folders: g.folders.map((I) => I.id === u.id ? {
|
|
1011
|
+
...u,
|
|
1012
|
+
parentId: f.parentId,
|
|
954
1013
|
rights: I.rights
|
|
955
1014
|
} : I)
|
|
956
1015
|
}))
|
|
957
|
-
}, y =
|
|
958
|
-
folderId:
|
|
959
|
-
newFolder:
|
|
1016
|
+
}, y = ct(r, {
|
|
1017
|
+
folderId: f.folderId,
|
|
1018
|
+
newFolder: u
|
|
960
1019
|
});
|
|
961
1020
|
return o(y), m;
|
|
962
1021
|
}
|
|
@@ -966,11 +1025,11 @@ const cs = () => {
|
|
|
966
1025
|
n([]), a([]);
|
|
967
1026
|
}
|
|
968
1027
|
});
|
|
969
|
-
},
|
|
970
|
-
const t =
|
|
1028
|
+
}, Xt = (e) => {
|
|
1029
|
+
const t = E(), s = D(), {
|
|
971
1030
|
setResourceIds: r,
|
|
972
1031
|
setSelectedResources: n
|
|
973
|
-
} =
|
|
1032
|
+
} = T(), {
|
|
974
1033
|
filters: a,
|
|
975
1034
|
trashed: o
|
|
976
1035
|
} = s, l = ["context", {
|
|
@@ -978,23 +1037,23 @@ const cs = () => {
|
|
|
978
1037
|
filters: a,
|
|
979
1038
|
trashed: o
|
|
980
1039
|
}];
|
|
981
|
-
return
|
|
1040
|
+
return Se({
|
|
982
1041
|
application: e,
|
|
983
1042
|
options: {
|
|
984
|
-
onSuccess: async (
|
|
1043
|
+
onSuccess: async (h, d) => {
|
|
985
1044
|
if (await t.cancelQueries({
|
|
986
1045
|
queryKey: l
|
|
987
1046
|
}), t.getQueryData(l))
|
|
988
|
-
return t.setQueryData(l, (
|
|
989
|
-
if (
|
|
1047
|
+
return t.setQueryData(l, (f) => {
|
|
1048
|
+
if (f)
|
|
990
1049
|
return {
|
|
991
|
-
...
|
|
992
|
-
pages:
|
|
1050
|
+
...f,
|
|
1051
|
+
pages: f == null ? void 0 : f.pages.map((i) => ({
|
|
993
1052
|
...i,
|
|
994
1053
|
resources: i.resources.map((p) => {
|
|
995
|
-
if (p.assetId === (
|
|
1054
|
+
if (p.assetId === (d == null ? void 0 : d.resourceId)) {
|
|
996
1055
|
let m = [`creator:${p.creatorId}`];
|
|
997
|
-
return (
|
|
1056
|
+
return (d == null ? void 0 : d.rights.length) >= 1 && (m = [...m, ...d.rights.flatMap((y) => y.actions.map((g) => `${y.type}:${y.id}:${g.id}`))]), {
|
|
998
1057
|
...p,
|
|
999
1058
|
rights: m
|
|
1000
1059
|
};
|
|
@@ -1010,8 +1069,8 @@ const cs = () => {
|
|
|
1010
1069
|
}
|
|
1011
1070
|
}
|
|
1012
1071
|
});
|
|
1013
|
-
},
|
|
1014
|
-
const t =
|
|
1072
|
+
}, Yt = (e) => {
|
|
1073
|
+
const t = E(), s = D(), {
|
|
1015
1074
|
filters: r,
|
|
1016
1075
|
trashed: n
|
|
1017
1076
|
} = s, a = ["context", {
|
|
@@ -1019,21 +1078,21 @@ const cs = () => {
|
|
|
1019
1078
|
filters: r,
|
|
1020
1079
|
trashed: n
|
|
1021
1080
|
}];
|
|
1022
|
-
return
|
|
1081
|
+
return xe({
|
|
1023
1082
|
application: e,
|
|
1024
1083
|
options: {
|
|
1025
1084
|
onSuccess: async (o, l) => {
|
|
1026
1085
|
if (await t.cancelQueries({
|
|
1027
1086
|
queryKey: a
|
|
1028
1087
|
}), t.getQueryData(a))
|
|
1029
|
-
return t.setQueryData(a, (
|
|
1030
|
-
if (
|
|
1088
|
+
return t.setQueryData(a, (d) => {
|
|
1089
|
+
if (d)
|
|
1031
1090
|
return {
|
|
1032
|
-
...
|
|
1033
|
-
pages:
|
|
1034
|
-
...
|
|
1035
|
-
resources:
|
|
1036
|
-
if (
|
|
1091
|
+
...d,
|
|
1092
|
+
pages: d == null ? void 0 : d.pages.map((u) => ({
|
|
1093
|
+
...u,
|
|
1094
|
+
resources: u.resources.map((f) => {
|
|
1095
|
+
if (f.assetId === (l == null ? void 0 : l.entId)) {
|
|
1037
1096
|
const {
|
|
1038
1097
|
name: i,
|
|
1039
1098
|
thumbnail: p,
|
|
@@ -1043,7 +1102,7 @@ const cs = () => {
|
|
|
1043
1102
|
...I
|
|
1044
1103
|
} = l;
|
|
1045
1104
|
return {
|
|
1046
|
-
...
|
|
1105
|
+
...f,
|
|
1047
1106
|
...I,
|
|
1048
1107
|
// add any custom field
|
|
1049
1108
|
name: i,
|
|
@@ -1053,7 +1112,7 @@ const cs = () => {
|
|
|
1053
1112
|
slug: g
|
|
1054
1113
|
};
|
|
1055
1114
|
} else
|
|
1056
|
-
return
|
|
1115
|
+
return f;
|
|
1057
1116
|
})
|
|
1058
1117
|
}))
|
|
1059
1118
|
};
|
|
@@ -1062,34 +1121,34 @@ const cs = () => {
|
|
|
1062
1121
|
}
|
|
1063
1122
|
});
|
|
1064
1123
|
};
|
|
1065
|
-
const
|
|
1066
|
-
const e =
|
|
1124
|
+
const Zt = () => {
|
|
1125
|
+
const e = k(), t = E(), s = D(), {
|
|
1067
1126
|
user: r
|
|
1068
|
-
} =
|
|
1127
|
+
} = ce(), {
|
|
1069
1128
|
appCode: n
|
|
1070
|
-
} =
|
|
1129
|
+
} = M(), a = ["context", {
|
|
1071
1130
|
folderId: s.filters.folder,
|
|
1072
1131
|
filters: s.filters,
|
|
1073
1132
|
trashed: s.trashed
|
|
1074
1133
|
}];
|
|
1075
|
-
return
|
|
1076
|
-
mutationFn: async (o) => await
|
|
1134
|
+
return v({
|
|
1135
|
+
mutationFn: async (o) => await Ve({
|
|
1077
1136
|
searchParams: s,
|
|
1078
1137
|
params: o
|
|
1079
1138
|
}),
|
|
1080
1139
|
onError(o) {
|
|
1081
|
-
typeof o == "string" && e.error(
|
|
1140
|
+
typeof o == "string" && e.error(S(o));
|
|
1082
1141
|
},
|
|
1083
1142
|
onSuccess: async (o, l) => {
|
|
1084
|
-
var
|
|
1143
|
+
var f, i, p;
|
|
1085
1144
|
await t.cancelQueries({
|
|
1086
1145
|
queryKey: a
|
|
1087
1146
|
});
|
|
1088
|
-
const
|
|
1089
|
-
thumbnail:
|
|
1090
|
-
} = l,
|
|
1147
|
+
const h = t.getQueryData(a), {
|
|
1148
|
+
thumbnail: d
|
|
1149
|
+
} = l, u = {
|
|
1091
1150
|
...l,
|
|
1092
|
-
thumbnail:
|
|
1151
|
+
thumbnail: d ? URL.createObjectURL(d) : "",
|
|
1093
1152
|
application: n,
|
|
1094
1153
|
assetId: o._id || o.entId || "",
|
|
1095
1154
|
id: o._id || o.entId || "",
|
|
@@ -1097,93 +1156,93 @@ const Xs = () => {
|
|
|
1097
1156
|
creatorName: r == null ? void 0 : r.username,
|
|
1098
1157
|
createdAt: Date.now(),
|
|
1099
1158
|
slug: l.slug || "",
|
|
1100
|
-
modifiedAt: ((
|
|
1159
|
+
modifiedAt: ((f = o.modified) == null ? void 0 : f.$date) || "",
|
|
1101
1160
|
modifierId: ((i = o.author) == null ? void 0 : i.userId) || "",
|
|
1102
1161
|
modifierName: ((p = o.author) == null ? void 0 : p.username) || "",
|
|
1103
1162
|
updatedAt: Date.now(),
|
|
1104
1163
|
trashed: !1,
|
|
1105
1164
|
rights: [`creator:${r == null ? void 0 : r.userId}`]
|
|
1106
1165
|
};
|
|
1107
|
-
if (
|
|
1166
|
+
if (h)
|
|
1108
1167
|
return t.setQueryData(a, (m) => {
|
|
1109
1168
|
if (m)
|
|
1110
1169
|
return {
|
|
1111
1170
|
...m,
|
|
1112
1171
|
pages: m == null ? void 0 : m.pages.map((y) => ({
|
|
1113
1172
|
...y,
|
|
1114
|
-
resources: [
|
|
1173
|
+
resources: [u, ...y.resources]
|
|
1115
1174
|
}))
|
|
1116
1175
|
};
|
|
1117
1176
|
});
|
|
1118
1177
|
}
|
|
1119
1178
|
});
|
|
1120
|
-
},
|
|
1121
|
-
const e =
|
|
1179
|
+
}, dt = /* @__PURE__ */ b(async () => await import("./EmptyScreenApp.js")), ut = /* @__PURE__ */ b(async () => await import("./EmptyScreenSearch.js")), ht = /* @__PURE__ */ b(async () => await import("./EmptyScreenError.js")), ft = /* @__PURE__ */ b(async () => await import("./EmptyScreenNoContentInFolder.js")), pt = /* @__PURE__ */ b(async () => await import("./EmptyScreenTrash.js")), mt = /* @__PURE__ */ b(async () => await import("./FoldersList.js")), gt = /* @__PURE__ */ b(async () => await import("./ResourcesList.js")), yt = () => {
|
|
1180
|
+
const e = Ye(), t = re(), s = Ze(), r = D(), n = V(), a = z(), o = k(), {
|
|
1122
1181
|
appCode: l
|
|
1123
|
-
} =
|
|
1124
|
-
t:
|
|
1182
|
+
} = M(), {
|
|
1183
|
+
t: h
|
|
1125
1184
|
} = j(), {
|
|
1126
|
-
setSearchParams:
|
|
1127
|
-
setSearchConfig:
|
|
1128
|
-
setTreeData:
|
|
1129
|
-
} =
|
|
1185
|
+
setSearchParams: d,
|
|
1186
|
+
setSearchConfig: u,
|
|
1187
|
+
setTreeData: f
|
|
1188
|
+
} = T(), {
|
|
1130
1189
|
data: i,
|
|
1131
1190
|
isError: p,
|
|
1132
1191
|
error: m,
|
|
1133
1192
|
isLoading: y,
|
|
1134
1193
|
isFetching: g,
|
|
1135
1194
|
fetchNextPage: I
|
|
1136
|
-
} =
|
|
1137
|
-
return
|
|
1138
|
-
var
|
|
1195
|
+
} = lt(), F = (i == null ? void 0 : i.pages[0].folders.length) === 0, Q = (i == null ? void 0 : i.pages[0].resources.length) === 0, U = F && Q;
|
|
1196
|
+
return L(() => {
|
|
1197
|
+
var K, R, P;
|
|
1139
1198
|
if (i) {
|
|
1140
|
-
const
|
|
1141
|
-
(
|
|
1142
|
-
id:
|
|
1199
|
+
const q = [...((K = i == null ? void 0 : i.pages[0]) == null ? void 0 : K.folders) ?? []];
|
|
1200
|
+
(R = i == null ? void 0 : i.pages[0]) != null && R.searchConfig && u(i.pages[0].searchConfig), r.search || ((n == null ? void 0 : n.id) === "default" ? f({
|
|
1201
|
+
id: C.DEFAULT,
|
|
1143
1202
|
section: !0,
|
|
1144
|
-
children:
|
|
1145
|
-
name:
|
|
1203
|
+
children: q.map((B) => new G(B)),
|
|
1204
|
+
name: h("explorer.filters.mine", {
|
|
1146
1205
|
ns: l
|
|
1147
1206
|
})
|
|
1148
|
-
}) :
|
|
1207
|
+
}) : f(he(a, q, r.filters.folder || C.DEFAULT))), d({
|
|
1149
1208
|
...r,
|
|
1150
|
-
pagination: (
|
|
1209
|
+
pagination: (P = i == null ? void 0 : i.pages[(i == null ? void 0 : i.pages.length) - 1]) == null ? void 0 : P.pagination
|
|
1151
1210
|
});
|
|
1152
1211
|
}
|
|
1153
|
-
}, [i]),
|
|
1154
|
-
m && typeof m == "string" && o.error(
|
|
1155
|
-
}, [m]), y ? /* @__PURE__ */ c(
|
|
1156
|
-
/* @__PURE__ */ c(
|
|
1157
|
-
/* @__PURE__ */ c(
|
|
1212
|
+
}, [i]), L(() => {
|
|
1213
|
+
m && typeof m == "string" && o.error(h(m));
|
|
1214
|
+
}, [m]), y ? /* @__PURE__ */ c(A, {}) : p ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(ht, {}) }) : r.search && U ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(ut, {}) }) : e && U ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(dt, {}) }) : s && U && !t ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(ft, {}) }) : t && (i == null ? void 0 : i.pages[0].resources.length) === 0 ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(pt, {}) }) : /* @__PURE__ */ N(O, { fallback: /* @__PURE__ */ c(A, {}), children: [
|
|
1215
|
+
/* @__PURE__ */ c(mt, { data: i, isFetching: g }),
|
|
1216
|
+
/* @__PURE__ */ c(gt, { data: i, isFetching: g, fetchNextPage: I })
|
|
1158
1217
|
] });
|
|
1159
|
-
},
|
|
1218
|
+
}, It = () => {
|
|
1160
1219
|
const {
|
|
1161
1220
|
appCode: e,
|
|
1162
1221
|
currentApp: t
|
|
1163
|
-
} =
|
|
1222
|
+
} = M(), {
|
|
1164
1223
|
t: s
|
|
1165
|
-
} = j(), [r, n] = ae(""), a = (
|
|
1166
|
-
if (
|
|
1224
|
+
} = j(), [r, n] = ae(""), a = (u) => {
|
|
1225
|
+
if (u === "0") {
|
|
1167
1226
|
n("");
|
|
1168
1227
|
return;
|
|
1169
1228
|
}
|
|
1170
|
-
n(
|
|
1171
|
-
}, o =
|
|
1172
|
-
setSearchParams:
|
|
1173
|
-
} =
|
|
1174
|
-
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1229
|
+
n(u);
|
|
1230
|
+
}, o = V(), l = D(), {
|
|
1231
|
+
setSearchParams: h
|
|
1232
|
+
} = T();
|
|
1233
|
+
L(() => {
|
|
1234
|
+
const u = () => r.includes("1") ? !0 : void 0, f = () => r.includes("2") ? !0 : void 0, i = () => r.includes("7") ? !0 : void 0;
|
|
1235
|
+
h({
|
|
1177
1236
|
...l,
|
|
1178
1237
|
filters: {
|
|
1179
|
-
owner:
|
|
1238
|
+
owner: u(),
|
|
1180
1239
|
public: i(),
|
|
1181
|
-
shared:
|
|
1240
|
+
shared: f(),
|
|
1182
1241
|
folder: o ? o.id : "default"
|
|
1183
1242
|
}
|
|
1184
1243
|
});
|
|
1185
|
-
}, [o,
|
|
1186
|
-
const
|
|
1244
|
+
}, [o, h, r]);
|
|
1245
|
+
const d = [{
|
|
1187
1246
|
label: s("explorer.filter.all", {
|
|
1188
1247
|
ns: e
|
|
1189
1248
|
}),
|
|
@@ -1218,43 +1277,43 @@ const Xs = () => {
|
|
|
1218
1277
|
}] : []];
|
|
1219
1278
|
return {
|
|
1220
1279
|
selectedFilters: r,
|
|
1221
|
-
options:
|
|
1280
|
+
options: d,
|
|
1222
1281
|
handleOnSelectFilter: a
|
|
1223
1282
|
};
|
|
1224
|
-
},
|
|
1283
|
+
}, wt = () => {
|
|
1225
1284
|
const {
|
|
1226
1285
|
appCode: e
|
|
1227
|
-
} =
|
|
1286
|
+
} = M(), {
|
|
1228
1287
|
t
|
|
1229
1288
|
} = j(), {
|
|
1230
1289
|
selectedFilters: s,
|
|
1231
1290
|
options: r,
|
|
1232
1291
|
handleOnSelectFilter: n
|
|
1233
|
-
} =
|
|
1292
|
+
} = It(), {
|
|
1234
1293
|
formRef: a,
|
|
1235
1294
|
inputSearch: o,
|
|
1236
1295
|
handleInputSearchChange: l,
|
|
1237
|
-
handleKeyPress:
|
|
1238
|
-
handleSearchSubmit:
|
|
1239
|
-
} =
|
|
1240
|
-
return /* @__PURE__ */
|
|
1241
|
-
/* @__PURE__ */
|
|
1242
|
-
/* @__PURE__ */ c(
|
|
1296
|
+
handleKeyPress: h,
|
|
1297
|
+
handleSearchSubmit: d
|
|
1298
|
+
} = fe(), u = s.length > 0 ? s.length : void 0;
|
|
1299
|
+
return /* @__PURE__ */ N("form", { noValidate: !0, className: "bg-light p-16 ps-24 ms-n16 ms-lg-n24 me-n16 position-relative z-3 d-flex gap-8", ref: a, children: [
|
|
1300
|
+
/* @__PURE__ */ N(De, { id: "search", className: "input-group", children: [
|
|
1301
|
+
/* @__PURE__ */ c(Te, { type: "search", placeholder: t("explorer.label.search", {
|
|
1243
1302
|
ns: e
|
|
1244
|
-
}), size: "lg", noValidationIcon: !0, value: o, onChange: l, onKeyDown:
|
|
1303
|
+
}), size: "lg", noValidationIcon: !0, value: o, onChange: l, onKeyDown: h }),
|
|
1245
1304
|
/* @__PURE__ */ c(be, { type: "submit", "aria-label": t("explorer.label.search", {
|
|
1246
1305
|
ns: e
|
|
1247
|
-
}), onClick:
|
|
1306
|
+
}), onClick: d })
|
|
1248
1307
|
] }),
|
|
1249
|
-
/* @__PURE__ */
|
|
1250
|
-
/* @__PURE__ */ c($.Trigger, { label: t("explorer.filters"), icon: /* @__PURE__ */ c(
|
|
1251
|
-
/* @__PURE__ */ c($.Menu, { children: r.map((
|
|
1252
|
-
/* @__PURE__ */ c($.RadioItem, { value:
|
|
1308
|
+
/* @__PURE__ */ N($, { placement: "bottom-end", children: [
|
|
1309
|
+
/* @__PURE__ */ c($.Trigger, { label: t("explorer.filters"), icon: /* @__PURE__ */ c(Qe, { width: 20 }), variant: "ghost", badgeContent: u }),
|
|
1310
|
+
/* @__PURE__ */ c($.Menu, { children: r.map((f) => f.value === "0" ? /* @__PURE__ */ N(ye, { children: [
|
|
1311
|
+
/* @__PURE__ */ c($.RadioItem, { value: f.value, model: s, onChange: () => n(f.value), children: f.label }),
|
|
1253
1312
|
/* @__PURE__ */ c($.Separator, {})
|
|
1254
|
-
] }, "0") : /* @__PURE__ */ c($.RadioItem, { value:
|
|
1313
|
+
] }, "0") : /* @__PURE__ */ c($.RadioItem, { value: f.value, model: s, onChange: () => n(f.value), children: f.label }, f.value)) })
|
|
1255
1314
|
] })
|
|
1256
1315
|
] });
|
|
1257
|
-
},
|
|
1316
|
+
}, St = ({
|
|
1258
1317
|
id: e,
|
|
1259
1318
|
selected: t,
|
|
1260
1319
|
onSelect: s
|
|
@@ -1262,41 +1321,41 @@ const Xs = () => {
|
|
|
1262
1321
|
const {
|
|
1263
1322
|
t: r
|
|
1264
1323
|
} = j();
|
|
1265
|
-
return /* @__PURE__ */ c("div", { className: "treeview", children: /* @__PURE__ */ c("ul", { role: "tree", className: "m-0 p-0", children: /* @__PURE__ */ c("li", { id: e, role: "treeitem", "aria-selected": t, children: /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("div", { className: "action-container", children: /* @__PURE__ */ c("div", { onClick: s, role: "button", tabIndex: 0, children: /* @__PURE__ */
|
|
1266
|
-
/* @__PURE__ */ c(
|
|
1324
|
+
return /* @__PURE__ */ c("div", { className: "treeview", children: /* @__PURE__ */ c("ul", { role: "tree", className: "m-0 p-0", children: /* @__PURE__ */ c("li", { id: e, role: "treeitem", "aria-selected": t, children: /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("div", { className: "action-container", children: /* @__PURE__ */ c("div", { onClick: s, role: "button", tabIndex: 0, children: /* @__PURE__ */ N("div", { className: "d-flex align-items-center gap-8 py-8 ps-24", children: [
|
|
1325
|
+
/* @__PURE__ */ c(qe, { width: "20", height: "20" }),
|
|
1267
1326
|
/* @__PURE__ */ c("span", { children: r("explorer.tree.trash") })
|
|
1268
1327
|
] }) }) }) }) }) }) });
|
|
1269
|
-
},
|
|
1270
|
-
const e =
|
|
1328
|
+
}, xt = /* @__PURE__ */ b(async () => await import("./FolderModal.js")), Dt = () => {
|
|
1329
|
+
const e = E(), [t, s] = Fe(), r = z(), n = re(), a = se(), {
|
|
1271
1330
|
appCode: o
|
|
1272
|
-
} =
|
|
1331
|
+
} = M(), {
|
|
1273
1332
|
t: l
|
|
1274
1333
|
} = j(["common", o]), {
|
|
1275
|
-
goToTrash:
|
|
1276
|
-
selectTreeItem:
|
|
1277
|
-
unfoldTreeItem:
|
|
1278
|
-
foldTreeItem:
|
|
1334
|
+
goToTrash: h,
|
|
1335
|
+
selectTreeItem: d,
|
|
1336
|
+
unfoldTreeItem: u,
|
|
1337
|
+
foldTreeItem: f,
|
|
1279
1338
|
clearSelectedItems: i,
|
|
1280
1339
|
clearSelectedIds: p
|
|
1281
|
-
} =
|
|
1282
|
-
await
|
|
1340
|
+
} = T(), m = async (g) => {
|
|
1341
|
+
await u(g, e);
|
|
1283
1342
|
}, y = () => {
|
|
1284
1343
|
i(), p(), s();
|
|
1285
1344
|
};
|
|
1286
|
-
return /* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */ c(
|
|
1288
|
-
/* @__PURE__ */ c(
|
|
1289
|
-
/* @__PURE__ */ c("div", { className: "d-grid my-16", children: /* @__PURE__ */ c(
|
|
1290
|
-
/* @__PURE__ */ c(
|
|
1345
|
+
return /* @__PURE__ */ N(oe, { children: [
|
|
1346
|
+
/* @__PURE__ */ c(Ce, { data: r, selectedNodesIds: a, onTreeItemSelect: d, onTreeItemFold: f, onTreeItemUnfold: m }),
|
|
1347
|
+
/* @__PURE__ */ c(St, { id: C.BIN, selected: n, onSelect: h }),
|
|
1348
|
+
/* @__PURE__ */ c("div", { className: "d-grid my-16", children: /* @__PURE__ */ c(Ne, { disabled: n, type: "button", color: "primary", variant: "outline", leftIcon: /* @__PURE__ */ c(Oe, {}), onClick: y, children: l("explorer.folder.new") }) }),
|
|
1349
|
+
/* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: t && /* @__PURE__ */ c(xt, { edit: !1, isOpen: t, onSuccess: s, onCancel: s }) })
|
|
1291
1350
|
] });
|
|
1292
|
-
},
|
|
1351
|
+
}, Tt = /* @__PURE__ */ b(async () => await import("./AppAction.js")), bt = /* @__PURE__ */ b(async () => await import("./Library.js")), Ft = /* @__PURE__ */ b(async () => await import("./ActionBarContainer.js")), Ct = /* @__PURE__ */ b(async () => await import("./DisableModal.js")), Nt = /* @__PURE__ */ b(async () => await import("./TrashModal.js")), Rt = /* @__PURE__ */ b(async () => await import("./OnboardingModal.js")), es = ({
|
|
1293
1352
|
config: e
|
|
1294
1353
|
}) => {
|
|
1295
|
-
const t =
|
|
1354
|
+
const t = D(), {
|
|
1296
1355
|
setConfig: s,
|
|
1297
1356
|
setSearchParams: r
|
|
1298
|
-
} =
|
|
1299
|
-
|
|
1357
|
+
} = T();
|
|
1358
|
+
L(() => {
|
|
1300
1359
|
s(e || {}), r({
|
|
1301
1360
|
...t,
|
|
1302
1361
|
application: e.app,
|
|
@@ -1305,32 +1364,32 @@ const Xs = () => {
|
|
|
1305
1364
|
}, [e]);
|
|
1306
1365
|
const {
|
|
1307
1366
|
currentApp: n
|
|
1308
|
-
} =
|
|
1367
|
+
} = M(), {
|
|
1309
1368
|
data: a
|
|
1310
|
-
} =
|
|
1369
|
+
} = it(), {
|
|
1311
1370
|
isTrashedModalOpen: o,
|
|
1312
1371
|
onTrashedCancel: l
|
|
1313
|
-
} =
|
|
1314
|
-
isActionDisableModalOpen:
|
|
1315
|
-
onActionDisableCancel:
|
|
1316
|
-
} =
|
|
1317
|
-
|
|
1318
|
-
const
|
|
1319
|
-
return e && /* @__PURE__ */
|
|
1320
|
-
/* @__PURE__ */ c(
|
|
1321
|
-
/* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */ c(ee.Col, { sm: "3", lg: "2", xl: "3", className: "border-end pt-16 pe-16 d-none d-lg-block", as: "aside", children: /* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */ c(
|
|
1324
|
-
|
|
1372
|
+
} = rt(), {
|
|
1373
|
+
isActionDisableModalOpen: h,
|
|
1374
|
+
onActionDisableCancel: d
|
|
1375
|
+
} = st();
|
|
1376
|
+
Re();
|
|
1377
|
+
const u = ne("publish", a), f = ne("create", a);
|
|
1378
|
+
return e && /* @__PURE__ */ N(oe, { children: [
|
|
1379
|
+
/* @__PURE__ */ c(Pe, { render: () => f ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(Tt, {}) }) : null, children: /* @__PURE__ */ c(Ae, { app: n }) }),
|
|
1380
|
+
/* @__PURE__ */ N(ee, { className: "flex-grow-1", children: [
|
|
1381
|
+
/* @__PURE__ */ c(ee.Col, { sm: "3", lg: "2", xl: "3", className: "border-end pt-16 pe-16 d-none d-lg-block", as: "aside", children: /* @__PURE__ */ N(O, { fallback: /* @__PURE__ */ c(A, {}), children: [
|
|
1382
|
+
/* @__PURE__ */ c(Dt, {}),
|
|
1383
|
+
u && /* @__PURE__ */ c(bt, {})
|
|
1325
1384
|
] }) }),
|
|
1326
|
-
/* @__PURE__ */
|
|
1327
|
-
/* @__PURE__ */ c(
|
|
1328
|
-
/* @__PURE__ */ c(
|
|
1329
|
-
/* @__PURE__ */ c(
|
|
1385
|
+
/* @__PURE__ */ N(ee.Col, { sm: "4", md: "8", lg: "6", xl: "9", children: [
|
|
1386
|
+
/* @__PURE__ */ c(wt, {}),
|
|
1387
|
+
/* @__PURE__ */ c(tt, {}),
|
|
1388
|
+
/* @__PURE__ */ c(yt, {})
|
|
1330
1389
|
] }),
|
|
1331
|
-
/* @__PURE__ */
|
|
1332
|
-
/* @__PURE__ */ c(
|
|
1333
|
-
/* @__PURE__ */ c(
|
|
1390
|
+
/* @__PURE__ */ N(O, { fallback: /* @__PURE__ */ c(A, {}), children: [
|
|
1391
|
+
/* @__PURE__ */ c(Ft, {}),
|
|
1392
|
+
/* @__PURE__ */ c(Rt, { id: "showOnboardingTrash", items: [{
|
|
1334
1393
|
src: "onboarding/illu-trash-menu.svg",
|
|
1335
1394
|
alt: "explorer.modal.onboarding.trash.screen1.alt",
|
|
1336
1395
|
text: "explorer.modal.onboarding.trash.screen1.title"
|
|
@@ -1348,36 +1407,37 @@ const Xs = () => {
|
|
|
1348
1407
|
nextText: "explorer.modal.onboarding.trash.next",
|
|
1349
1408
|
closeText: "explorer.modal.onboarding.trash.close"
|
|
1350
1409
|
} }),
|
|
1351
|
-
o && /* @__PURE__ */ c(
|
|
1352
|
-
|
|
1410
|
+
o && /* @__PURE__ */ c(Nt, { isOpen: o, onCancel: l }),
|
|
1411
|
+
h && /* @__PURE__ */ c(Ct, { isOpen: h, onCancel: d })
|
|
1353
1412
|
] })
|
|
1354
1413
|
] })
|
|
1355
1414
|
] });
|
|
1356
1415
|
};
|
|
1357
1416
|
export {
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1417
|
+
es as E,
|
|
1418
|
+
it as a,
|
|
1419
|
+
V as b,
|
|
1420
|
+
Zt as c,
|
|
1421
|
+
D as d,
|
|
1363
1422
|
re as e,
|
|
1364
1423
|
w as f,
|
|
1365
|
-
|
|
1424
|
+
Mt as g,
|
|
1366
1425
|
X as h,
|
|
1367
|
-
|
|
1368
|
-
|
|
1426
|
+
$t as i,
|
|
1427
|
+
_t as j,
|
|
1369
1428
|
J as k,
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1429
|
+
zt as l,
|
|
1430
|
+
Je as m,
|
|
1431
|
+
Ht as n,
|
|
1432
|
+
Kt as o,
|
|
1433
|
+
Bt as p,
|
|
1434
|
+
Xt as q,
|
|
1435
|
+
Yt as r,
|
|
1436
|
+
Gt as s,
|
|
1437
|
+
Jt as t,
|
|
1438
|
+
T as u,
|
|
1439
|
+
Vt as v,
|
|
1440
|
+
jt as w,
|
|
1441
|
+
Wt as x,
|
|
1442
|
+
z as y
|
|
1383
1443
|
};
|