ode-explorer 1.4.19-develop.202411061500 → 1.4.19-develop.202411071619
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 +1 -1
- package/dist/index.js +108 -108
- package/dist/version.txt +1 -1
- package/lib/FoldersList.js +21 -20
- package/lib/ResourcesList.js +61 -59
- package/lib/index2.js +429 -429
- package/lib/services/api/index.d.ts +1 -1
- package/package.json +1 -1
package/lib/index2.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useEffect as $, Suspense as M, lazy as
|
|
3
|
-
import { useSensor as
|
|
4
|
-
import { snapCenterToCursor as
|
|
5
|
-
import { findNodeById as J, wrapTreeNode as
|
|
6
|
-
import { odeServices as
|
|
7
|
-
import { t as
|
|
8
|
-
import { createStore as
|
|
9
|
-
import { useQuery as
|
|
1
|
+
import { jsxs as E, Fragment as G, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as $, Suspense as M, lazy as q, useState as le, useRef as Se, Fragment as be } from "react";
|
|
3
|
+
import { useSensor as oe, PointerSensor as we, KeyboardSensor as xe, useSensors as Te, DndContext as Ce } from "@dnd-kit/core";
|
|
4
|
+
import { snapCenterToCursor as Fe } from "@dnd-kit/modifiers";
|
|
5
|
+
import { findNodeById as J, wrapTreeNode as Re, findParentNode as Ne, useToast as L, moveNode as Ee, deleteNode as Pe, useUser as de, useShareMutation as Ae, useUpdateMutation as Qe, useOdeClient as v, addNode as qe, updateNode as Oe, getAncestors as ne, LoadingScreen as U, FormControl as ke, Input as Ue, SearchButton as Me, Dropdown as j, useToggle as Le, useScrollToTop as ve, TreeView as Be, Button as Ke, IconButton as $e, useXitiTrackPageLoad as _e, isActionAvailable as ae, AppHeader as ze, Breadcrumb as je, Grid as te } from "@edifice-ui/react";
|
|
6
|
+
import { odeServices as A, FOLDER as N, SORT_ORDER as Ve, ResourceService as ue } from "edifice-ts-client";
|
|
7
|
+
import { t as P } from "i18next";
|
|
8
|
+
import { createStore as We, useStore as He } from "zustand";
|
|
9
|
+
import { useQuery as Ge, queryOptions as Je, useQueryClient as k, useMutation as B, useInfiniteQuery as Xe } from "@tanstack/react-query";
|
|
10
10
|
import { useTranslation as _ } from "react-i18next";
|
|
11
|
-
import { Filter as
|
|
12
|
-
const
|
|
13
|
-
const t = await
|
|
11
|
+
import { Filter as Ye, Delete as Ze, Plus as et, ArrowLeft as tt } from "@edifice-ui/icons";
|
|
12
|
+
const he = async (e) => {
|
|
13
|
+
const t = await A.resource(e.application).searchContext(e);
|
|
14
14
|
return {
|
|
15
15
|
...t,
|
|
16
16
|
folders: t.folders.filter((s) => !s.trashed)
|
|
17
17
|
};
|
|
18
|
-
},
|
|
18
|
+
}, st = async ({
|
|
19
19
|
searchParams: e,
|
|
20
20
|
name: t,
|
|
21
21
|
parentId: s
|
|
@@ -26,8 +26,8 @@ const pe = async (e) => {
|
|
|
26
26
|
application: e.application,
|
|
27
27
|
type: e.types[0]
|
|
28
28
|
};
|
|
29
|
-
return await
|
|
30
|
-
},
|
|
29
|
+
return await A.resource(e.application).createFolder(r);
|
|
30
|
+
}, rt = async ({
|
|
31
31
|
folderId: e,
|
|
32
32
|
searchParams: t,
|
|
33
33
|
parentId: s,
|
|
@@ -40,8 +40,8 @@ const pe = async (e) => {
|
|
|
40
40
|
application: t.application,
|
|
41
41
|
type: t.types[0]
|
|
42
42
|
};
|
|
43
|
-
return await
|
|
44
|
-
},
|
|
43
|
+
return await A.resource(t.application).updateFolder(o);
|
|
44
|
+
}, ot = async ({
|
|
45
45
|
searchParams: e,
|
|
46
46
|
resourceIds: t,
|
|
47
47
|
useAssetIds: s,
|
|
@@ -53,8 +53,8 @@ const pe = async (e) => {
|
|
|
53
53
|
resourceIds: t,
|
|
54
54
|
folderIds: r
|
|
55
55
|
};
|
|
56
|
-
return await
|
|
57
|
-
},
|
|
56
|
+
return await A.resource(e.application).trashAll(o, s);
|
|
57
|
+
}, nt = async ({
|
|
58
58
|
searchParams: e,
|
|
59
59
|
resourceIds: t,
|
|
60
60
|
useAssetIds: s,
|
|
@@ -66,8 +66,8 @@ const pe = async (e) => {
|
|
|
66
66
|
resourceIds: t,
|
|
67
67
|
folderIds: r
|
|
68
68
|
};
|
|
69
|
-
return await
|
|
70
|
-
},
|
|
69
|
+
return await A.resource(e.application).deleteAll(o, s);
|
|
70
|
+
}, at = async ({
|
|
71
71
|
searchParams: e,
|
|
72
72
|
resourceIds: t,
|
|
73
73
|
folderIds: s,
|
|
@@ -79,11 +79,11 @@ const pe = async (e) => {
|
|
|
79
79
|
resourceIds: t,
|
|
80
80
|
folderIds: s
|
|
81
81
|
};
|
|
82
|
-
return await
|
|
83
|
-
},
|
|
82
|
+
return await A.resource(e.application).restoreAll(o, r);
|
|
83
|
+
}, ct = async (e, t) => await A.resource(e.application).copy({
|
|
84
84
|
application: e.application,
|
|
85
85
|
resourceId: t
|
|
86
|
-
}),
|
|
86
|
+
}), pe = async ({
|
|
87
87
|
searchParams: e,
|
|
88
88
|
resourceIds: t,
|
|
89
89
|
folderId: s,
|
|
@@ -96,59 +96,59 @@ const pe = async (e) => {
|
|
|
96
96
|
resourceIds: t,
|
|
97
97
|
folderIds: r
|
|
98
98
|
};
|
|
99
|
-
return await
|
|
100
|
-
},
|
|
99
|
+
return await A.resource(e.application).moveToFolder(a, o);
|
|
100
|
+
}, it = async (e) => await A.rights().sessionHasWorkflowRights(e), lt = ({
|
|
101
101
|
searchParams: e,
|
|
102
102
|
assetId: t
|
|
103
103
|
}) => {
|
|
104
|
-
const s =
|
|
104
|
+
const s = A.resource(e.application).getViewUrl(t);
|
|
105
105
|
window.open(s, "_self");
|
|
106
|
-
},
|
|
106
|
+
}, dt = ({
|
|
107
107
|
searchParams: e,
|
|
108
108
|
params: t
|
|
109
|
-
}) =>
|
|
109
|
+
}) => A.resource(e.application).create(t), ut = ({
|
|
110
110
|
searchParams: e,
|
|
111
111
|
assetId: t
|
|
112
112
|
}) => {
|
|
113
|
-
const s =
|
|
113
|
+
const s = A.resource(e.application).getPrintUrl(t);
|
|
114
114
|
return window.open(s, "_blank");
|
|
115
|
-
},
|
|
115
|
+
}, is = ({
|
|
116
116
|
searchParams: e,
|
|
117
117
|
folderId: t
|
|
118
118
|
}) => {
|
|
119
|
-
const s =
|
|
119
|
+
const s = A.resource(e.application).getFormUrl(t);
|
|
120
120
|
return window.open(s, "_self");
|
|
121
|
-
},
|
|
121
|
+
}, ls = ({
|
|
122
122
|
searchParams: e,
|
|
123
123
|
assetId: t
|
|
124
124
|
}) => {
|
|
125
|
-
const s =
|
|
125
|
+
const s = A.resource(e.application).getEditUrl(t);
|
|
126
126
|
return window.open(s, "_self");
|
|
127
|
-
},
|
|
127
|
+
}, ds = ({
|
|
128
128
|
searchParams: e,
|
|
129
129
|
assetId: t
|
|
130
130
|
}) => {
|
|
131
|
-
const s =
|
|
131
|
+
const s = A.resource(e.application).getExportUrl(t);
|
|
132
132
|
return window.open(s, "_self");
|
|
133
|
-
},
|
|
134
|
-
id:
|
|
135
|
-
name:
|
|
133
|
+
}, fe = {
|
|
134
|
+
id: N.DEFAULT,
|
|
135
|
+
name: P("explorer.filters.mine"),
|
|
136
136
|
section: !0,
|
|
137
137
|
children: []
|
|
138
|
-
},
|
|
138
|
+
}, ht = {
|
|
139
139
|
config: void 0,
|
|
140
140
|
searchConfig: {
|
|
141
141
|
minLength: 1
|
|
142
142
|
},
|
|
143
143
|
searchParams: {
|
|
144
144
|
filters: {
|
|
145
|
-
folder:
|
|
145
|
+
folder: N.DEFAULT,
|
|
146
146
|
owner: void 0,
|
|
147
147
|
shared: void 0,
|
|
148
148
|
public: void 0
|
|
149
149
|
},
|
|
150
150
|
orders: {
|
|
151
|
-
updatedAt:
|
|
151
|
+
updatedAt: Ve.DESC
|
|
152
152
|
},
|
|
153
153
|
application: "",
|
|
154
154
|
types: [],
|
|
@@ -159,7 +159,7 @@ const pe = async (e) => {
|
|
|
159
159
|
},
|
|
160
160
|
trashed: !1
|
|
161
161
|
},
|
|
162
|
-
treeData:
|
|
162
|
+
treeData: fe,
|
|
163
163
|
selectedNodeId: "default",
|
|
164
164
|
currentFolder: {
|
|
165
165
|
id: "default"
|
|
@@ -181,8 +181,8 @@ const pe = async (e) => {
|
|
|
181
181
|
},
|
|
182
182
|
resourceActionDisable: !1,
|
|
183
183
|
status: void 0
|
|
184
|
-
},
|
|
185
|
-
...
|
|
184
|
+
}, pt = We()((e, t) => ({
|
|
185
|
+
...ht,
|
|
186
186
|
actions: {
|
|
187
187
|
setConfig: (s) => e({
|
|
188
188
|
config: s
|
|
@@ -277,7 +277,7 @@ const pe = async (e) => {
|
|
|
277
277
|
const {
|
|
278
278
|
searchParams: r
|
|
279
279
|
} = t();
|
|
280
|
-
|
|
280
|
+
lt({
|
|
281
281
|
searchParams: r,
|
|
282
282
|
assetId: s.assetId
|
|
283
283
|
});
|
|
@@ -295,7 +295,7 @@ const pe = async (e) => {
|
|
|
295
295
|
if (r.length !== 1)
|
|
296
296
|
throw new Error("Cannot open more than 1 resource");
|
|
297
297
|
const a = r.find((n) => n.id === o[0]);
|
|
298
|
-
|
|
298
|
+
ut({
|
|
299
299
|
searchParams: s,
|
|
300
300
|
assetId: a.assetId
|
|
301
301
|
});
|
|
@@ -327,7 +327,7 @@ const pe = async (e) => {
|
|
|
327
327
|
...a.filters,
|
|
328
328
|
folder: s
|
|
329
329
|
},
|
|
330
|
-
trashed: s ===
|
|
330
|
+
trashed: s === N.BIN
|
|
331
331
|
}
|
|
332
332
|
})));
|
|
333
333
|
},
|
|
@@ -343,7 +343,7 @@ const pe = async (e) => {
|
|
|
343
343
|
folderId: a,
|
|
344
344
|
trashed: !1
|
|
345
345
|
}],
|
|
346
|
-
queryFn: async () => await
|
|
346
|
+
queryFn: async () => await he({
|
|
347
347
|
...t().searchParams,
|
|
348
348
|
filters: {
|
|
349
349
|
...t().searchParams.filters,
|
|
@@ -351,7 +351,7 @@ const pe = async (e) => {
|
|
|
351
351
|
}
|
|
352
352
|
})
|
|
353
353
|
});
|
|
354
|
-
t().actions.setTreeData(
|
|
354
|
+
t().actions.setTreeData(Re(t().treeData, n == null ? void 0 : n.folders, a || N.DEFAULT));
|
|
355
355
|
},
|
|
356
356
|
selectTreeItem: (s, r) => {
|
|
357
357
|
const {
|
|
@@ -382,13 +382,13 @@ const pe = async (e) => {
|
|
|
382
382
|
openFolder: a
|
|
383
383
|
} = t().actions;
|
|
384
384
|
if (o.search && a({
|
|
385
|
-
folder:
|
|
386
|
-
folderId:
|
|
385
|
+
folder: fe,
|
|
386
|
+
folderId: N.DEFAULT
|
|
387
387
|
}), !s) return;
|
|
388
|
-
const n =
|
|
388
|
+
const n = Ne(r, s);
|
|
389
389
|
a({
|
|
390
390
|
folder: n,
|
|
391
|
-
folderId: (n == null ? void 0 : n.id) ||
|
|
391
|
+
folderId: (n == null ? void 0 : n.id) || N.DEFAULT
|
|
392
392
|
});
|
|
393
393
|
},
|
|
394
394
|
goToTrash: () => {
|
|
@@ -403,28 +403,28 @@ const pe = async (e) => {
|
|
|
403
403
|
...s.searchParams,
|
|
404
404
|
search: void 0,
|
|
405
405
|
filters: {
|
|
406
|
-
folder:
|
|
406
|
+
folder: N.BIN
|
|
407
407
|
},
|
|
408
408
|
trashed: !0
|
|
409
409
|
},
|
|
410
410
|
currentFolder: {
|
|
411
|
-
id:
|
|
411
|
+
id: N.BIN
|
|
412
412
|
}
|
|
413
413
|
}));
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
}));
|
|
417
417
|
function T(e) {
|
|
418
|
-
return
|
|
418
|
+
return He(pt, e);
|
|
419
419
|
}
|
|
420
|
-
const
|
|
420
|
+
const ft = (e) => e.treeData, gt = (e) => e.actions, V = () => T(ft), F = () => T(gt), Q = () => T((e) => e.searchParams), se = () => T((e) => e.selectedNodeId), us = () => T((e) => e.selectedFolders), hs = () => T((e) => e.selectedResources), mt = () => T((e) => e.searchConfig), X = () => T((e) => e.folderIds), Y = () => T((e) => e.resourceIds), Z = () => T((e) => e.selectedResources.map((t) => t.assetId)), ee = () => T((e) => e.selectedResources.filter((t) => t.assetId === t.id)), W = () => T((e) => e.currentFolder), re = () => {
|
|
421
421
|
const e = W();
|
|
422
|
-
return (e == null ? void 0 : e.id) ===
|
|
423
|
-
},
|
|
422
|
+
return (e == null ? void 0 : e.id) === N.BIN;
|
|
423
|
+
}, yt = () => T((e) => e.resourceIsTrash), ps = () => T((e) => e.resourceOrFolderIsDraggable), It = () => T((e) => e.elementDragOver), Dt = () => T((e) => e.resourceActionDisable), St = () => {
|
|
424
424
|
const e = W();
|
|
425
425
|
return (e == null ? void 0 : e.id) === "default";
|
|
426
|
-
},
|
|
427
|
-
const e =
|
|
426
|
+
}, bt = () => T((e) => e.status), wt = () => {
|
|
427
|
+
const e = Dt(), {
|
|
428
428
|
clearSelectedIds: t,
|
|
429
429
|
setResourceActionDisable: s,
|
|
430
430
|
clearSelectedItems: r
|
|
@@ -435,8 +435,8 @@ const mt = (e) => e.treeData, yt = (e) => e.actions, V = () => T(mt), F = () =>
|
|
|
435
435
|
t(), r(), s(!1);
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
|
-
},
|
|
439
|
-
const e =
|
|
438
|
+
}, xt = () => {
|
|
439
|
+
const e = yt(), {
|
|
440
440
|
clearSelectedIds: t,
|
|
441
441
|
setResourceIsTrash: s,
|
|
442
442
|
clearSelectedItems: r
|
|
@@ -447,8 +447,8 @@ const mt = (e) => e.treeData, yt = (e) => e.actions, V = () => T(mt), F = () =>
|
|
|
447
447
|
t(), r(), s(!1);
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
|
-
},
|
|
451
|
-
class
|
|
450
|
+
}, Tt = 175, Ct = 10, ge = "blog", me = "blog";
|
|
451
|
+
class ye extends ue {
|
|
452
452
|
getEditUrl() {
|
|
453
453
|
throw new Error("Method not implemented.");
|
|
454
454
|
}
|
|
@@ -484,10 +484,10 @@ class Ie extends he {
|
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
getResourceType() {
|
|
487
|
-
return
|
|
487
|
+
return me;
|
|
488
488
|
}
|
|
489
489
|
getApplication() {
|
|
490
|
-
return
|
|
490
|
+
return ge;
|
|
491
491
|
}
|
|
492
492
|
getFormUrl(t) {
|
|
493
493
|
return t ? `/blog?folderid=${t}#/edit/new` : "/blog#/edit/new";
|
|
@@ -499,13 +499,13 @@ class Ie extends he {
|
|
|
499
499
|
return `/blog/print/${t}`;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
|
|
503
|
-
application:
|
|
504
|
-
resourceType:
|
|
505
|
-
}, (e) => new
|
|
502
|
+
ue.register({
|
|
503
|
+
application: ge,
|
|
504
|
+
resourceType: me
|
|
505
|
+
}, (e) => new ye(e));
|
|
506
506
|
const K = document.querySelector("[data-explorer-config]");
|
|
507
|
-
let
|
|
508
|
-
function
|
|
507
|
+
let ce;
|
|
508
|
+
function fs() {
|
|
509
509
|
var e;
|
|
510
510
|
if ((e = K == null ? void 0 : K.dataset) != null && e.explorerConfig) {
|
|
511
511
|
const {
|
|
@@ -513,22 +513,22 @@ function ms() {
|
|
|
513
513
|
} = K.dataset;
|
|
514
514
|
try {
|
|
515
515
|
const s = JSON.parse(t);
|
|
516
|
-
|
|
516
|
+
ce = {
|
|
517
517
|
...s,
|
|
518
|
-
service:
|
|
518
|
+
service: ye,
|
|
519
519
|
enableOnboarding: s.enableOnboarding !== void 0 ? s.enableOnboarding : !0
|
|
520
520
|
};
|
|
521
521
|
} catch (s) {
|
|
522
522
|
console.error("[Explorer Config] could not parse app params from root data attributes:", K == null ? void 0 : K.dataset, s);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
return
|
|
525
|
+
return ce;
|
|
526
526
|
}
|
|
527
|
-
const
|
|
527
|
+
const Ft = (e, t) => {
|
|
528
528
|
const s = e.map((o) => o.workflow), r = new Set(s);
|
|
529
|
-
return
|
|
529
|
+
return Je({
|
|
530
530
|
queryKey: [...r],
|
|
531
|
-
queryFn: () =>
|
|
531
|
+
queryFn: () => it([...r]),
|
|
532
532
|
select: (o) => e.filter((a) => o[a.workflow]).map((a) => ({
|
|
533
533
|
...a,
|
|
534
534
|
available: !0
|
|
@@ -536,11 +536,11 @@ const Nt = (e, t) => {
|
|
|
536
536
|
staleTime: 1 / 0,
|
|
537
537
|
enabled: !!t
|
|
538
538
|
});
|
|
539
|
-
},
|
|
539
|
+
}, Rt = (e) => {
|
|
540
540
|
const t = T((s) => s.config);
|
|
541
|
-
return
|
|
542
|
-
},
|
|
543
|
-
const e = T((n) => n.config), t =
|
|
541
|
+
return Ge(Ft(e, t));
|
|
542
|
+
}, Nt = () => {
|
|
543
|
+
const e = T((n) => n.config), t = Q(), {
|
|
544
544
|
filters: s,
|
|
545
545
|
trashed: r,
|
|
546
546
|
search: o
|
|
@@ -550,11 +550,11 @@ const Nt = (e, t) => {
|
|
|
550
550
|
trashed: r,
|
|
551
551
|
search: o
|
|
552
552
|
}];
|
|
553
|
-
return
|
|
553
|
+
return Xe({
|
|
554
554
|
queryKey: a,
|
|
555
555
|
queryFn: async ({
|
|
556
556
|
pageParam: n
|
|
557
|
-
}) => await
|
|
557
|
+
}) => await he({
|
|
558
558
|
...t,
|
|
559
559
|
application: e == null ? void 0 : e.app,
|
|
560
560
|
types: e == null ? void 0 : e.types,
|
|
@@ -569,103 +569,103 @@ const Nt = (e, t) => {
|
|
|
569
569
|
retry: !1,
|
|
570
570
|
getNextPageParam: (n) => n.pagination.startIdx + n.pagination.pageSize
|
|
571
571
|
});
|
|
572
|
-
},
|
|
573
|
-
const e = L(), t = k(), s =
|
|
574
|
-
clearSelectedItems:
|
|
575
|
-
clearSelectedIds:
|
|
572
|
+
}, gs = () => {
|
|
573
|
+
const e = L(), t = k(), s = Q(), r = V(), o = X(), a = Z(), n = Y(), u = ee().length > 0, p = u ? a : n, {
|
|
574
|
+
clearSelectedItems: i,
|
|
575
|
+
clearSelectedIds: l,
|
|
576
576
|
setTreeData: h,
|
|
577
|
-
setSearchParams:
|
|
577
|
+
setSearchParams: d
|
|
578
578
|
} = F(), {
|
|
579
579
|
filters: f,
|
|
580
580
|
trashed: m
|
|
581
|
-
} = s,
|
|
581
|
+
} = s, D = ["context", {
|
|
582
582
|
folderId: f.folder,
|
|
583
583
|
filters: f,
|
|
584
584
|
trashed: m
|
|
585
585
|
}];
|
|
586
586
|
return B({
|
|
587
|
-
mutationFn: async () => await
|
|
587
|
+
mutationFn: async () => await ot({
|
|
588
588
|
searchParams: s,
|
|
589
589
|
folderIds: o,
|
|
590
590
|
resourceIds: p,
|
|
591
591
|
useAssetIds: u
|
|
592
592
|
}),
|
|
593
|
-
onError(
|
|
594
|
-
typeof
|
|
593
|
+
onError(I) {
|
|
594
|
+
typeof I == "string" && e.error(P(I));
|
|
595
595
|
},
|
|
596
|
-
onSuccess: async (
|
|
596
|
+
onSuccess: async (I) => {
|
|
597
597
|
if (await t.cancelQueries({
|
|
598
|
-
queryKey:
|
|
599
|
-
}), t.getQueryData(
|
|
600
|
-
return e.success(
|
|
601
|
-
var
|
|
598
|
+
queryKey: D
|
|
599
|
+
}), t.getQueryData(D))
|
|
600
|
+
return e.success(P("explorer.trash.title")), t.setQueryData(D, (C) => {
|
|
601
|
+
var O;
|
|
602
602
|
if (C) {
|
|
603
|
-
const
|
|
603
|
+
const x = {
|
|
604
604
|
...C,
|
|
605
|
-
pages: C == null ? void 0 : C.pages.map((
|
|
606
|
-
var
|
|
605
|
+
pages: C == null ? void 0 : C.pages.map((y) => {
|
|
606
|
+
var g;
|
|
607
607
|
return {
|
|
608
|
-
...
|
|
609
|
-
folders:
|
|
608
|
+
...y,
|
|
609
|
+
folders: y.folders.filter((S) => !o.includes(S.id)),
|
|
610
610
|
pagination: {
|
|
611
|
-
...
|
|
611
|
+
...y.pagination,
|
|
612
612
|
// @ts-ignore
|
|
613
|
-
maxIdx: ((
|
|
613
|
+
maxIdx: ((g = y == null ? void 0 : y.pagination) == null ? void 0 : g.maxIdx) - I.resources.length
|
|
614
614
|
},
|
|
615
|
-
resources:
|
|
615
|
+
resources: y.resources.filter((S) => u ? !a.includes(S.assetId) : !p.includes(S.id))
|
|
616
616
|
};
|
|
617
617
|
})
|
|
618
|
-
},
|
|
618
|
+
}, b = Pe(r, {
|
|
619
619
|
folders: o
|
|
620
620
|
});
|
|
621
|
-
return h(
|
|
621
|
+
return h(b), d({
|
|
622
622
|
...s,
|
|
623
623
|
pagination: {
|
|
624
624
|
...s.pagination,
|
|
625
625
|
// @ts-ignore
|
|
626
|
-
maxIdx: ((
|
|
626
|
+
maxIdx: ((O = s.pagination) == null ? void 0 : O.maxIdx) - I.resources.length
|
|
627
627
|
}
|
|
628
|
-
}),
|
|
628
|
+
}), x;
|
|
629
629
|
}
|
|
630
630
|
});
|
|
631
631
|
},
|
|
632
632
|
onSettled: () => {
|
|
633
|
-
|
|
633
|
+
i(), l();
|
|
634
634
|
}
|
|
635
635
|
});
|
|
636
|
-
},
|
|
637
|
-
const e = L(), t = k(), s =
|
|
636
|
+
}, ms = () => {
|
|
637
|
+
const e = L(), t = k(), s = Q(), r = X(), o = Z(), a = Y(), n = ee().length > 0, u = n ? o : a, {
|
|
638
638
|
setFolderIds: p,
|
|
639
|
-
setResourceIds:
|
|
640
|
-
setSelectedResources:
|
|
639
|
+
setResourceIds: i,
|
|
640
|
+
setSelectedResources: l,
|
|
641
641
|
setSelectedFolders: h
|
|
642
642
|
} = F(), {
|
|
643
|
-
filters:
|
|
643
|
+
filters: d,
|
|
644
644
|
trashed: f
|
|
645
645
|
} = s, m = ["context", {
|
|
646
|
-
folderId:
|
|
647
|
-
filters:
|
|
646
|
+
folderId: d.folder,
|
|
647
|
+
filters: d,
|
|
648
648
|
trashed: f
|
|
649
649
|
}];
|
|
650
650
|
return B({
|
|
651
|
-
mutationFn: async () => await
|
|
651
|
+
mutationFn: async () => await at({
|
|
652
652
|
searchParams: s,
|
|
653
653
|
folderIds: r,
|
|
654
654
|
resourceIds: u,
|
|
655
655
|
useAssetIds: n
|
|
656
656
|
}),
|
|
657
|
-
onError(
|
|
658
|
-
typeof
|
|
657
|
+
onError(D) {
|
|
658
|
+
typeof D == "string" && e.error(P(D));
|
|
659
659
|
},
|
|
660
660
|
onSuccess: async () => {
|
|
661
661
|
if (await t.cancelQueries({
|
|
662
662
|
queryKey: m
|
|
663
663
|
}), t.getQueryData(m))
|
|
664
|
-
return e.success(
|
|
665
|
-
if (
|
|
664
|
+
return e.success(P("explorer.trash.toast")), t.setQueryData(m, (I) => {
|
|
665
|
+
if (I)
|
|
666
666
|
return {
|
|
667
|
-
...
|
|
668
|
-
pages:
|
|
667
|
+
...I,
|
|
668
|
+
pages: I == null ? void 0 : I.pages.map((w) => ({
|
|
669
669
|
...w,
|
|
670
670
|
folders: w.folders.filter((C) => !r.includes(C.id)),
|
|
671
671
|
resources: w.resources.filter((C) => n ? !o.includes(C.assetId) : !u.includes(C.id))
|
|
@@ -674,55 +674,55 @@ const Nt = (e, t) => {
|
|
|
674
674
|
});
|
|
675
675
|
},
|
|
676
676
|
onSettled: () => {
|
|
677
|
-
|
|
677
|
+
i([]), l([]), p([]), h([]);
|
|
678
678
|
}
|
|
679
679
|
});
|
|
680
|
-
},
|
|
681
|
-
const e = L(), t = k(), s =
|
|
680
|
+
}, ys = () => {
|
|
681
|
+
const e = L(), t = k(), s = Q(), r = X(), o = Z(), a = Y(), n = ee().length > 0, u = n ? o : a, {
|
|
682
682
|
clearSelectedItems: p,
|
|
683
|
-
clearSelectedIds:
|
|
683
|
+
clearSelectedIds: i
|
|
684
684
|
} = F(), {
|
|
685
|
-
filters:
|
|
685
|
+
filters: l,
|
|
686
686
|
trashed: h
|
|
687
|
-
} = s,
|
|
688
|
-
folderId:
|
|
689
|
-
filters:
|
|
687
|
+
} = s, d = ["context", {
|
|
688
|
+
folderId: l.folder,
|
|
689
|
+
filters: l,
|
|
690
690
|
trashed: h
|
|
691
691
|
}];
|
|
692
692
|
return B({
|
|
693
|
-
mutationFn: async () => await
|
|
693
|
+
mutationFn: async () => await nt({
|
|
694
694
|
searchParams: s,
|
|
695
695
|
folderIds: r,
|
|
696
696
|
resourceIds: u,
|
|
697
697
|
useAssetIds: n
|
|
698
698
|
}),
|
|
699
699
|
onError(f) {
|
|
700
|
-
typeof f == "string" && e.error(
|
|
700
|
+
typeof f == "string" && e.error(P(f));
|
|
701
701
|
},
|
|
702
702
|
onSuccess: async () => {
|
|
703
703
|
if (await t.cancelQueries({
|
|
704
|
-
queryKey:
|
|
705
|
-
}), t.getQueryData(
|
|
706
|
-
return e.success(
|
|
704
|
+
queryKey: d
|
|
705
|
+
}), t.getQueryData(d))
|
|
706
|
+
return e.success(P("explorer.removed.from.trash")), t.setQueryData(d, (m) => {
|
|
707
707
|
if (m)
|
|
708
708
|
return {
|
|
709
709
|
...m,
|
|
710
|
-
pages: m == null ? void 0 : m.pages.map((
|
|
711
|
-
...
|
|
712
|
-
folders:
|
|
713
|
-
resources:
|
|
710
|
+
pages: m == null ? void 0 : m.pages.map((I) => ({
|
|
711
|
+
...I,
|
|
712
|
+
folders: I.folders.filter((w) => !r.includes(w.id)),
|
|
713
|
+
resources: I.resources.filter((w) => n ? !o.includes(w.assetId) : !u.includes(w.id))
|
|
714
714
|
}))
|
|
715
715
|
};
|
|
716
716
|
});
|
|
717
717
|
},
|
|
718
718
|
onSettled: () => {
|
|
719
|
-
p(),
|
|
719
|
+
p(), i();
|
|
720
720
|
}
|
|
721
721
|
});
|
|
722
|
-
},
|
|
723
|
-
const e = L(), t =
|
|
722
|
+
}, Is = () => {
|
|
723
|
+
const e = L(), t = Q(), s = k(), {
|
|
724
724
|
user: r
|
|
725
|
-
} =
|
|
725
|
+
} = de(), o = W(), {
|
|
726
726
|
filters: a,
|
|
727
727
|
trashed: n
|
|
728
728
|
} = t, u = "duplicate_start", p = ["context", {
|
|
@@ -731,22 +731,22 @@ const Nt = (e, t) => {
|
|
|
731
731
|
trashed: n
|
|
732
732
|
}];
|
|
733
733
|
return B({
|
|
734
|
-
mutationFn: async (
|
|
734
|
+
mutationFn: async (i) => (e.info(P("duplicate.start"), {
|
|
735
735
|
id: u
|
|
736
|
-
}), await
|
|
737
|
-
onSuccess: async (
|
|
738
|
-
e.remove(u), e.success(
|
|
736
|
+
}), await ct(t, i.assetId)),
|
|
737
|
+
onSuccess: async (i, l) => {
|
|
738
|
+
e.remove(u), e.success(P("duplicate.done")), await s.cancelQueries({
|
|
739
739
|
queryKey: p
|
|
740
740
|
});
|
|
741
|
-
const h = s.getQueryData(p),
|
|
742
|
-
...
|
|
743
|
-
name: `${
|
|
744
|
-
assetId:
|
|
745
|
-
id:
|
|
741
|
+
const h = s.getQueryData(p), d = {
|
|
742
|
+
...l,
|
|
743
|
+
name: `${l.name}${P("duplicate.suffix")}`,
|
|
744
|
+
assetId: i.duplicateId,
|
|
745
|
+
id: i.duplicateId,
|
|
746
746
|
creatorId: r == null ? void 0 : r.userId,
|
|
747
747
|
creatorName: r == null ? void 0 : r.username,
|
|
748
748
|
createdAt: Date.now(),
|
|
749
|
-
slug:
|
|
749
|
+
slug: l.slug || "",
|
|
750
750
|
modifiedAt: Date.now(),
|
|
751
751
|
modifierId: (r == null ? void 0 : r.userId) || "",
|
|
752
752
|
modifierName: (r == null ? void 0 : r.username) || "",
|
|
@@ -760,88 +760,88 @@ const Nt = (e, t) => {
|
|
|
760
760
|
...f,
|
|
761
761
|
pages: f == null ? void 0 : f.pages.map((m) => ({
|
|
762
762
|
...m,
|
|
763
|
-
resources: [
|
|
763
|
+
resources: [d, ...m.resources]
|
|
764
764
|
}))
|
|
765
765
|
};
|
|
766
|
-
}), o.id && o.id !==
|
|
766
|
+
}), o.id && o.id !== N.DEFAULT && pe({
|
|
767
767
|
searchParams: t,
|
|
768
|
-
resourceIds: [
|
|
768
|
+
resourceIds: [i.duplicateId],
|
|
769
769
|
folderId: o.id,
|
|
770
770
|
folderIds: [],
|
|
771
771
|
useAssetIds: !0
|
|
772
772
|
});
|
|
773
773
|
},
|
|
774
|
-
onError: (
|
|
775
|
-
e.remove(u), typeof
|
|
774
|
+
onError: (i) => {
|
|
775
|
+
e.remove(u), typeof i == "string" && e.error(`${P("duplicate.error")}: ${i}`);
|
|
776
776
|
}
|
|
777
777
|
});
|
|
778
|
-
},
|
|
779
|
-
const e = L(), t = k(), s =
|
|
780
|
-
clearSelectedIds:
|
|
781
|
-
clearSelectedItems:
|
|
778
|
+
}, Et = () => {
|
|
779
|
+
const e = L(), t = k(), s = Q(), r = V(), o = X(), a = Z(), n = Y(), u = ee().length > 0, p = u ? a : n, {
|
|
780
|
+
clearSelectedIds: i,
|
|
781
|
+
clearSelectedItems: l,
|
|
782
782
|
setTreeData: h,
|
|
783
|
-
setSearchParams:
|
|
783
|
+
setSearchParams: d
|
|
784
784
|
} = F(), {
|
|
785
785
|
filters: f,
|
|
786
786
|
trashed: m
|
|
787
|
-
} = s,
|
|
787
|
+
} = s, D = ["context", {
|
|
788
788
|
folderId: f.folder,
|
|
789
789
|
filters: f,
|
|
790
790
|
trashed: m
|
|
791
791
|
}];
|
|
792
792
|
return B({
|
|
793
|
-
mutationFn: async (
|
|
793
|
+
mutationFn: async (I) => await pe({
|
|
794
794
|
searchParams: s,
|
|
795
|
-
folderId:
|
|
795
|
+
folderId: I,
|
|
796
796
|
folderIds: o,
|
|
797
797
|
resourceIds: p,
|
|
798
798
|
useAssetIds: u
|
|
799
799
|
}),
|
|
800
|
-
onError(
|
|
801
|
-
typeof
|
|
800
|
+
onError(I) {
|
|
801
|
+
typeof I == "string" && e.error(P(I));
|
|
802
802
|
},
|
|
803
|
-
onSuccess: async (
|
|
804
|
-
if (t.getQueryData(
|
|
805
|
-
return t.setQueryData(
|
|
806
|
-
var
|
|
807
|
-
if (
|
|
808
|
-
const
|
|
803
|
+
onSuccess: async (I, w) => {
|
|
804
|
+
if (t.getQueryData(D))
|
|
805
|
+
return t.setQueryData(D, (O) => {
|
|
806
|
+
var x;
|
|
807
|
+
if (O) {
|
|
808
|
+
const b = Ee(r, {
|
|
809
809
|
destinationId: w,
|
|
810
810
|
folders: o
|
|
811
|
-
}),
|
|
812
|
-
...
|
|
813
|
-
pages:
|
|
814
|
-
var
|
|
811
|
+
}), y = {
|
|
812
|
+
...O,
|
|
813
|
+
pages: O == null ? void 0 : O.pages.map((g) => {
|
|
814
|
+
var S;
|
|
815
815
|
return {
|
|
816
|
-
...
|
|
817
|
-
folders:
|
|
816
|
+
...g,
|
|
817
|
+
folders: g.folders.filter((R) => !o.includes(R.id)),
|
|
818
818
|
pagination: {
|
|
819
|
-
...
|
|
819
|
+
...g.pagination,
|
|
820
820
|
// @ts-ignore
|
|
821
|
-
maxIdx: ((
|
|
821
|
+
maxIdx: ((S = g.pagination) == null ? void 0 : S.maxIdx) - I.resources.length
|
|
822
822
|
},
|
|
823
|
-
resources:
|
|
823
|
+
resources: g.resources.filter((R) => u ? !a.includes(R.assetId) : !p.includes(R.id))
|
|
824
824
|
};
|
|
825
825
|
})
|
|
826
826
|
};
|
|
827
|
-
return h(
|
|
827
|
+
return h(b), d({
|
|
828
828
|
...s,
|
|
829
829
|
pagination: {
|
|
830
830
|
...s.pagination,
|
|
831
831
|
// @ts-ignore
|
|
832
|
-
maxIdx: ((
|
|
832
|
+
maxIdx: ((x = s.pagination) == null ? void 0 : x.maxIdx) - I.resources.length
|
|
833
833
|
}
|
|
834
|
-
}),
|
|
834
|
+
}), y;
|
|
835
835
|
}
|
|
836
836
|
});
|
|
837
837
|
t.invalidateQueries();
|
|
838
838
|
},
|
|
839
839
|
onSettled: () => {
|
|
840
|
-
|
|
840
|
+
l(), i();
|
|
841
841
|
}
|
|
842
842
|
});
|
|
843
|
-
},
|
|
844
|
-
const e = L(), t = k(), s =
|
|
843
|
+
}, Ds = () => {
|
|
844
|
+
const e = L(), t = k(), s = Q(), r = V(), {
|
|
845
845
|
setTreeData: o
|
|
846
846
|
} = F(), {
|
|
847
847
|
filters: a,
|
|
@@ -854,36 +854,36 @@ const Nt = (e, t) => {
|
|
|
854
854
|
return B({
|
|
855
855
|
mutationFn: async ({
|
|
856
856
|
name: p,
|
|
857
|
-
parentId:
|
|
858
|
-
}) => await
|
|
857
|
+
parentId: i
|
|
858
|
+
}) => await st({
|
|
859
859
|
searchParams: s,
|
|
860
860
|
name: p,
|
|
861
|
-
parentId:
|
|
861
|
+
parentId: i
|
|
862
862
|
}),
|
|
863
863
|
onError(p) {
|
|
864
|
-
typeof p == "string" && e.error(
|
|
864
|
+
typeof p == "string" && e.error(P(p));
|
|
865
865
|
},
|
|
866
|
-
onSuccess: async (p,
|
|
866
|
+
onSuccess: async (p, i) => {
|
|
867
867
|
await t.cancelQueries({
|
|
868
868
|
queryKey: u
|
|
869
869
|
});
|
|
870
|
-
const
|
|
870
|
+
const l = t.getQueryData(u), h = {
|
|
871
871
|
...p,
|
|
872
|
-
parentId:
|
|
872
|
+
parentId: i.parentId,
|
|
873
873
|
children: [],
|
|
874
874
|
rights: [`creator:${p == null ? void 0 : p.creator_id}`]
|
|
875
875
|
};
|
|
876
|
-
if (
|
|
877
|
-
return t.setQueryData(u, (
|
|
878
|
-
if (
|
|
876
|
+
if (l)
|
|
877
|
+
return t.setQueryData(u, (d) => {
|
|
878
|
+
if (d) {
|
|
879
879
|
const f = {
|
|
880
|
-
...
|
|
881
|
-
pages:
|
|
882
|
-
...
|
|
883
|
-
folders: [...
|
|
880
|
+
...d,
|
|
881
|
+
pages: d == null ? void 0 : d.pages.map((D) => ({
|
|
882
|
+
...D,
|
|
883
|
+
folders: [...D.folders, h]
|
|
884
884
|
}))
|
|
885
|
-
}, m =
|
|
886
|
-
parentId:
|
|
885
|
+
}, m = qe(r, {
|
|
886
|
+
parentId: i.parentId,
|
|
887
887
|
newFolder: h
|
|
888
888
|
});
|
|
889
889
|
return o(m), f;
|
|
@@ -891,54 +891,54 @@ const Nt = (e, t) => {
|
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
893
|
});
|
|
894
|
-
},
|
|
895
|
-
const e = L(), t = k(), s =
|
|
894
|
+
}, Ss = () => {
|
|
895
|
+
const e = L(), t = k(), s = Q(), r = V(), {
|
|
896
896
|
setFolderIds: o,
|
|
897
897
|
setSelectedFolders: a,
|
|
898
898
|
setTreeData: n
|
|
899
899
|
} = F(), {
|
|
900
900
|
filters: u,
|
|
901
901
|
trashed: p
|
|
902
|
-
} = s,
|
|
902
|
+
} = s, i = ["context", {
|
|
903
903
|
folderId: u.folder,
|
|
904
904
|
filters: u,
|
|
905
905
|
trashed: p
|
|
906
906
|
}];
|
|
907
907
|
return B({
|
|
908
908
|
mutationFn: async ({
|
|
909
|
-
folderId:
|
|
909
|
+
folderId: l,
|
|
910
910
|
name: h,
|
|
911
|
-
parentId:
|
|
912
|
-
}) => await
|
|
911
|
+
parentId: d
|
|
912
|
+
}) => await rt({
|
|
913
913
|
searchParams: s,
|
|
914
|
-
folderId:
|
|
915
|
-
parentId:
|
|
914
|
+
folderId: l,
|
|
915
|
+
parentId: d,
|
|
916
916
|
name: h
|
|
917
917
|
}),
|
|
918
|
-
onError(
|
|
919
|
-
typeof
|
|
918
|
+
onError(l) {
|
|
919
|
+
typeof l == "string" && e.error(P(l));
|
|
920
920
|
},
|
|
921
|
-
onSuccess: async (
|
|
921
|
+
onSuccess: async (l, h) => {
|
|
922
922
|
if (await t.cancelQueries({
|
|
923
|
-
queryKey:
|
|
924
|
-
}), t.getQueryData(
|
|
925
|
-
return t.setQueryData(
|
|
923
|
+
queryKey: i
|
|
924
|
+
}), t.getQueryData(i))
|
|
925
|
+
return t.setQueryData(i, (f) => {
|
|
926
926
|
if (f) {
|
|
927
927
|
const m = {
|
|
928
928
|
...f,
|
|
929
|
-
pages: f == null ? void 0 : f.pages.map((
|
|
930
|
-
...
|
|
931
|
-
folders:
|
|
932
|
-
...
|
|
929
|
+
pages: f == null ? void 0 : f.pages.map((I) => ({
|
|
930
|
+
...I,
|
|
931
|
+
folders: I.folders.map((w) => w.id === l.id ? {
|
|
932
|
+
...l,
|
|
933
933
|
parentId: h.parentId,
|
|
934
934
|
rights: w.rights
|
|
935
935
|
} : w)
|
|
936
936
|
}))
|
|
937
|
-
},
|
|
937
|
+
}, D = Oe(r, {
|
|
938
938
|
folderId: h.folderId,
|
|
939
|
-
newFolder:
|
|
939
|
+
newFolder: l
|
|
940
940
|
});
|
|
941
|
-
return n(
|
|
941
|
+
return n(D), m;
|
|
942
942
|
}
|
|
943
943
|
});
|
|
944
944
|
},
|
|
@@ -946,8 +946,8 @@ const Nt = (e, t) => {
|
|
|
946
946
|
o([]), a([]);
|
|
947
947
|
}
|
|
948
948
|
});
|
|
949
|
-
},
|
|
950
|
-
const t = k(), s =
|
|
949
|
+
}, bs = (e) => {
|
|
950
|
+
const t = k(), s = Q(), {
|
|
951
951
|
setResourceIds: r,
|
|
952
952
|
setSelectedResources: o
|
|
953
953
|
} = F(), {
|
|
@@ -958,10 +958,10 @@ const Nt = (e, t) => {
|
|
|
958
958
|
filters: a,
|
|
959
959
|
trashed: n
|
|
960
960
|
}];
|
|
961
|
-
return
|
|
961
|
+
return Ae({
|
|
962
962
|
application: e,
|
|
963
963
|
options: {
|
|
964
|
-
onSuccess: async (p,
|
|
964
|
+
onSuccess: async (p, i) => {
|
|
965
965
|
if (await t.cancelQueries({
|
|
966
966
|
queryKey: u
|
|
967
967
|
}), t.getQueryData(u))
|
|
@@ -969,12 +969,12 @@ const Nt = (e, t) => {
|
|
|
969
969
|
if (h)
|
|
970
970
|
return {
|
|
971
971
|
...h,
|
|
972
|
-
pages: h == null ? void 0 : h.pages.map((
|
|
973
|
-
...
|
|
974
|
-
resources:
|
|
975
|
-
if (f.assetId === (
|
|
972
|
+
pages: h == null ? void 0 : h.pages.map((d) => ({
|
|
973
|
+
...d,
|
|
974
|
+
resources: d.resources.map((f) => {
|
|
975
|
+
if (f.assetId === (i == null ? void 0 : i.resourceId)) {
|
|
976
976
|
let m = [`creator:${f.creatorId}`];
|
|
977
|
-
return (
|
|
977
|
+
return (i == null ? void 0 : i.rights.length) >= 1 && (m = [...m, ...i.rights.flatMap((D) => D.actions.map((I) => `${D.type}:${D.id}:${I.id}`))]), {
|
|
978
978
|
...f,
|
|
979
979
|
rights: m
|
|
980
980
|
};
|
|
@@ -990,8 +990,8 @@ const Nt = (e, t) => {
|
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
});
|
|
993
|
-
},
|
|
994
|
-
const t = k(), s =
|
|
993
|
+
}, ws = (e) => {
|
|
994
|
+
const t = k(), s = Q(), {
|
|
995
995
|
filters: r,
|
|
996
996
|
trashed: o
|
|
997
997
|
} = s, a = ["context", {
|
|
@@ -999,38 +999,38 @@ const Nt = (e, t) => {
|
|
|
999
999
|
filters: r,
|
|
1000
1000
|
trashed: o
|
|
1001
1001
|
}];
|
|
1002
|
-
return
|
|
1002
|
+
return Qe({
|
|
1003
1003
|
application: e,
|
|
1004
1004
|
options: {
|
|
1005
1005
|
onSuccess: async (n, u) => {
|
|
1006
1006
|
if (await t.cancelQueries({
|
|
1007
1007
|
queryKey: a
|
|
1008
1008
|
}), t.getQueryData(a))
|
|
1009
|
-
return t.setQueryData(a, (
|
|
1010
|
-
if (
|
|
1009
|
+
return t.setQueryData(a, (i) => {
|
|
1010
|
+
if (i)
|
|
1011
1011
|
return {
|
|
1012
|
-
...
|
|
1013
|
-
pages:
|
|
1014
|
-
...
|
|
1015
|
-
resources:
|
|
1012
|
+
...i,
|
|
1013
|
+
pages: i == null ? void 0 : i.pages.map((l) => ({
|
|
1014
|
+
...l,
|
|
1015
|
+
resources: l.resources.map((h) => {
|
|
1016
1016
|
if (h.assetId === (u == null ? void 0 : u.entId)) {
|
|
1017
1017
|
const {
|
|
1018
|
-
name:
|
|
1018
|
+
name: d,
|
|
1019
1019
|
thumbnail: f,
|
|
1020
1020
|
public: m,
|
|
1021
|
-
description:
|
|
1022
|
-
slug:
|
|
1021
|
+
description: D,
|
|
1022
|
+
slug: I,
|
|
1023
1023
|
...w
|
|
1024
1024
|
} = u;
|
|
1025
1025
|
return {
|
|
1026
1026
|
...h,
|
|
1027
1027
|
...w,
|
|
1028
1028
|
// add any custom field
|
|
1029
|
-
name:
|
|
1029
|
+
name: d,
|
|
1030
1030
|
thumbnail: typeof f == "string" ? f : URL.createObjectURL(f),
|
|
1031
1031
|
public: m,
|
|
1032
|
-
description:
|
|
1033
|
-
slug:
|
|
1032
|
+
description: D,
|
|
1033
|
+
slug: I
|
|
1034
1034
|
};
|
|
1035
1035
|
} else
|
|
1036
1036
|
return h;
|
|
@@ -1041,10 +1041,10 @@ const Nt = (e, t) => {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
1043
|
});
|
|
1044
|
-
},
|
|
1045
|
-
const e = L(), t = k(), s =
|
|
1044
|
+
}, xs = () => {
|
|
1045
|
+
const e = L(), t = k(), s = Q(), {
|
|
1046
1046
|
user: r
|
|
1047
|
-
} =
|
|
1047
|
+
} = de(), {
|
|
1048
1048
|
appCode: o
|
|
1049
1049
|
} = v(), a = ["context", {
|
|
1050
1050
|
folderId: s.filters.folder,
|
|
@@ -1052,19 +1052,19 @@ const Nt = (e, t) => {
|
|
|
1052
1052
|
trashed: s.trashed
|
|
1053
1053
|
}];
|
|
1054
1054
|
return B({
|
|
1055
|
-
mutationFn: async (n) => await
|
|
1055
|
+
mutationFn: async (n) => await dt({
|
|
1056
1056
|
searchParams: s,
|
|
1057
1057
|
params: n
|
|
1058
1058
|
}),
|
|
1059
1059
|
onError(n) {
|
|
1060
|
-
typeof n == "string" && e.error(
|
|
1060
|
+
typeof n == "string" && e.error(P(n));
|
|
1061
1061
|
},
|
|
1062
1062
|
onSuccess: async (n, u) => {
|
|
1063
|
-
var
|
|
1063
|
+
var l, h, d;
|
|
1064
1064
|
await t.cancelQueries({
|
|
1065
1065
|
queryKey: a
|
|
1066
1066
|
});
|
|
1067
|
-
const p = t.getQueryData(a),
|
|
1067
|
+
const p = t.getQueryData(a), i = {
|
|
1068
1068
|
...u,
|
|
1069
1069
|
thumbnail: n.thumbnail || "",
|
|
1070
1070
|
application: o,
|
|
@@ -1074,9 +1074,9 @@ const Nt = (e, t) => {
|
|
|
1074
1074
|
creatorName: r == null ? void 0 : r.username,
|
|
1075
1075
|
createdAt: Date.now(),
|
|
1076
1076
|
slug: u.slug || "",
|
|
1077
|
-
modifiedAt: ((
|
|
1077
|
+
modifiedAt: ((l = n.modified) == null ? void 0 : l.$date) || "",
|
|
1078
1078
|
modifierId: ((h = n.author) == null ? void 0 : h.userId) || "",
|
|
1079
|
-
modifierName: ((
|
|
1079
|
+
modifierName: ((d = n.author) == null ? void 0 : d.username) || "",
|
|
1080
1080
|
updatedAt: Date.now(),
|
|
1081
1081
|
trashed: !1,
|
|
1082
1082
|
rights: [`creator:${r == null ? void 0 : r.userId}`]
|
|
@@ -1088,20 +1088,20 @@ const Nt = (e, t) => {
|
|
|
1088
1088
|
...f,
|
|
1089
1089
|
pages: f == null ? void 0 : f.pages.map((m) => ({
|
|
1090
1090
|
...m,
|
|
1091
|
-
resources: [
|
|
1091
|
+
resources: [i, ...m.resources]
|
|
1092
1092
|
}))
|
|
1093
1093
|
};
|
|
1094
1094
|
});
|
|
1095
1095
|
}
|
|
1096
1096
|
});
|
|
1097
1097
|
};
|
|
1098
|
-
function
|
|
1098
|
+
function ie(e, t) {
|
|
1099
1099
|
var r;
|
|
1100
1100
|
const s = J(e, t);
|
|
1101
|
-
return (r = s == null ? void 0 : s.folder) != null && r.childrenIds ? [...(s == null ? void 0 : s.folder.childrenIds) || [], t] : t ===
|
|
1101
|
+
return (r = s == null ? void 0 : s.folder) != null && r.childrenIds ? [...(s == null ? void 0 : s.folder.childrenIds) || [], t] : t === N.BIN ? [N.BIN] : [N.DEFAULT];
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1104
|
-
const e = k(), t =
|
|
1103
|
+
function Pt() {
|
|
1104
|
+
const e = k(), t = Et(), s = L(), {
|
|
1105
1105
|
appCode: r
|
|
1106
1106
|
} = v(), {
|
|
1107
1107
|
t: o
|
|
@@ -1111,22 +1111,20 @@ function Qt() {
|
|
|
1111
1111
|
setResourceOrFolderIsDraggable: n,
|
|
1112
1112
|
setElementDragOver: u,
|
|
1113
1113
|
setResourceIds: p,
|
|
1114
|
-
setFolderIds:
|
|
1115
|
-
fetchTreeData:
|
|
1116
|
-
} = F(), h = V(),
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
}), m =
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
var I;
|
|
1125
|
-
((I = x.data.current) == null ? void 0 : I.type) === "resource" ? s.success(/* @__PURE__ */ N(G, { children: [
|
|
1114
|
+
setFolderIds: i,
|
|
1115
|
+
fetchTreeData: l
|
|
1116
|
+
} = F(), h = V(), f = oe(we, {
|
|
1117
|
+
activationConstraint: {
|
|
1118
|
+
delay: Tt,
|
|
1119
|
+
tolerance: Ct
|
|
1120
|
+
}
|
|
1121
|
+
}), m = oe(xe), D = Te(f, m), I = (x, b) => {
|
|
1122
|
+
var y;
|
|
1123
|
+
((y = x.data.current) == null ? void 0 : y.type) === "resource" ? s.success(/* @__PURE__ */ E(G, { children: [
|
|
1126
1124
|
o("explorer.dragged.resource"),
|
|
1127
1125
|
" ",
|
|
1128
1126
|
/* @__PURE__ */ c("strong", { children: b })
|
|
1129
|
-
] })) : s.success(/* @__PURE__ */
|
|
1127
|
+
] })) : s.success(/* @__PURE__ */ E(G, { children: [
|
|
1130
1128
|
o("explorer.dragged.folder"),
|
|
1131
1129
|
" ",
|
|
1132
1130
|
/* @__PURE__ */ c("strong", { children: b })
|
|
@@ -1136,17 +1134,17 @@ function Qt() {
|
|
|
1136
1134
|
handleDragEnd: async (x) => {
|
|
1137
1135
|
const {
|
|
1138
1136
|
over: b,
|
|
1139
|
-
active:
|
|
1140
|
-
} = x, g = b == null ? void 0 : b.data.current,
|
|
1141
|
-
if ((
|
|
1142
|
-
p([]),
|
|
1137
|
+
active: y
|
|
1138
|
+
} = x, g = b == null ? void 0 : b.data.current, S = y.data.current, R = ne(h, g == null ? void 0 : g.id), z = ie(h, g == null ? void 0 : g.id);
|
|
1139
|
+
if ((S == null ? void 0 : S.id) == (g == null ? void 0 : g.id) || R.includes(S == null ? void 0 : S.id) || z.includes(S == null ? void 0 : S.id))
|
|
1140
|
+
p([]), i([]);
|
|
1143
1141
|
else {
|
|
1144
1142
|
const H = (g == null ? void 0 : g.name) ?? a;
|
|
1145
1143
|
if (b)
|
|
1146
1144
|
try {
|
|
1147
|
-
await t.mutate(g == null ? void 0 : g.id),
|
|
1148
|
-
} catch (
|
|
1149
|
-
console.error(
|
|
1145
|
+
await t.mutate(g == null ? void 0 : g.id), I(y, H);
|
|
1146
|
+
} catch (De) {
|
|
1147
|
+
console.error(De);
|
|
1150
1148
|
} finally {
|
|
1151
1149
|
u({
|
|
1152
1150
|
isOver: !1,
|
|
@@ -1164,17 +1162,17 @@ function Qt() {
|
|
|
1164
1162
|
handleDragStart: (x) => {
|
|
1165
1163
|
const {
|
|
1166
1164
|
active: b
|
|
1167
|
-
} = x,
|
|
1168
|
-
(
|
|
1165
|
+
} = x, y = b.data.current;
|
|
1166
|
+
(y == null ? void 0 : y.type) === "resource" ? p([y == null ? void 0 : y.id]) : (y == null ? void 0 : y.type) === "folder" && i([y == null ? void 0 : y.id]), n({
|
|
1169
1167
|
isDrag: !0,
|
|
1170
|
-
elementDrag:
|
|
1168
|
+
elementDrag: y == null ? void 0 : y.id
|
|
1171
1169
|
});
|
|
1172
1170
|
},
|
|
1173
1171
|
handleDragOver: (x) => {
|
|
1174
1172
|
const {
|
|
1175
1173
|
over: b,
|
|
1176
|
-
active:
|
|
1177
|
-
} = x, g = b == null ? void 0 : b.data.current,
|
|
1174
|
+
active: y
|
|
1175
|
+
} = x, g = b == null ? void 0 : b.data.current, S = y == null ? void 0 : y.data.current, R = ne(h, g == null ? void 0 : g.id), z = ie(h, g == null ? void 0 : g.id);
|
|
1178
1176
|
if (b) {
|
|
1179
1177
|
const H = {
|
|
1180
1178
|
isOver: !0,
|
|
@@ -1182,10 +1180,10 @@ function Qt() {
|
|
|
1182
1180
|
overId: g == null ? void 0 : g.id,
|
|
1183
1181
|
isTreeview: g == null ? void 0 : g.isTreeview
|
|
1184
1182
|
};
|
|
1185
|
-
(
|
|
1183
|
+
(S == null ? void 0 : S.id) === (g == null ? void 0 : g.id) || R.includes(S == null ? void 0 : S.id) || z.includes(S == null ? void 0 : S.id) ? u({
|
|
1186
1184
|
...H,
|
|
1187
1185
|
canMove: !1
|
|
1188
|
-
}) : (
|
|
1186
|
+
}) : (l(g == null ? void 0 : g.id, e), u({
|
|
1189
1187
|
...H,
|
|
1190
1188
|
canMove: !0
|
|
1191
1189
|
}));
|
|
@@ -1197,50 +1195,50 @@ function Qt() {
|
|
|
1197
1195
|
isTreeview: !1
|
|
1198
1196
|
});
|
|
1199
1197
|
},
|
|
1200
|
-
sensors:
|
|
1198
|
+
sensors: D
|
|
1201
1199
|
};
|
|
1202
1200
|
}
|
|
1203
|
-
const
|
|
1204
|
-
const e =
|
|
1201
|
+
const At = /* @__PURE__ */ q(async () => await import("./EmptyScreenApp.js")), Qt = /* @__PURE__ */ q(async () => await import("./EmptyScreenSearch.js")), qt = /* @__PURE__ */ q(async () => await import("./EmptyScreenError.js")), Ot = /* @__PURE__ */ q(async () => await import("./EmptyScreenNoContentInFolder.js")), kt = /* @__PURE__ */ q(async () => await import("./EmptyScreenTrash.js")), Ut = /* @__PURE__ */ q(async () => await import("./FoldersList.js")), Mt = /* @__PURE__ */ q(async () => await import("./ResourcesList.js")), Lt = () => {
|
|
1202
|
+
const e = St(), t = re(), s = se(), r = Q(), o = W(), a = L(), n = k(), {
|
|
1205
1203
|
appCode: u
|
|
1206
1204
|
} = v(), {
|
|
1207
1205
|
t: p
|
|
1208
1206
|
} = _([u]), {
|
|
1209
|
-
setSearchParams:
|
|
1210
|
-
setSearchConfig:
|
|
1207
|
+
setSearchParams: i,
|
|
1208
|
+
setSearchConfig: l,
|
|
1211
1209
|
fetchTreeData: h
|
|
1212
1210
|
} = F(), {
|
|
1213
|
-
data:
|
|
1211
|
+
data: d,
|
|
1214
1212
|
isError: f,
|
|
1215
1213
|
error: m,
|
|
1216
|
-
isLoading:
|
|
1217
|
-
isFetching:
|
|
1214
|
+
isLoading: D,
|
|
1215
|
+
isFetching: I,
|
|
1218
1216
|
fetchNextPage: w
|
|
1219
|
-
} =
|
|
1217
|
+
} = Nt(), C = (d == null ? void 0 : d.pages[0].folders.length) === 0, O = (d == null ? void 0 : d.pages[0].resources.length) === 0, x = C && O;
|
|
1220
1218
|
return $(() => {
|
|
1221
|
-
var
|
|
1222
|
-
|
|
1219
|
+
var b, y;
|
|
1220
|
+
d && ((b = d == null ? void 0 : d.pages[0]) != null && b.searchConfig && l(d.pages[0].searchConfig), !r.search && o.id === "default" && h(o.id, n), i({
|
|
1223
1221
|
...r,
|
|
1224
|
-
pagination: (
|
|
1222
|
+
pagination: (y = d == null ? void 0 : d.pages[(d == null ? void 0 : d.pages.length) - 1]) == null ? void 0 : y.pagination
|
|
1225
1223
|
}));
|
|
1226
|
-
}, [
|
|
1224
|
+
}, [d]), $(() => {
|
|
1227
1225
|
m && typeof m == "string" && a.error(p(m));
|
|
1228
|
-
}, [m]),
|
|
1229
|
-
/* @__PURE__ */ c(
|
|
1230
|
-
/* @__PURE__ */ c(
|
|
1226
|
+
}, [m]), D ? /* @__PURE__ */ c(U, {}) : f ? /* @__PURE__ */ c(M, { fallback: /* @__PURE__ */ c(U, {}), children: /* @__PURE__ */ c(qt, {}) }) : r.search && x ? /* @__PURE__ */ c(M, { fallback: /* @__PURE__ */ c(U, {}), children: /* @__PURE__ */ c(Qt, {}) }) : e && x ? /* @__PURE__ */ c(M, { fallback: /* @__PURE__ */ c(U, {}), children: /* @__PURE__ */ c(At, {}) }) : s && x && !t ? /* @__PURE__ */ c(M, { fallback: /* @__PURE__ */ c(U, {}), children: /* @__PURE__ */ c(Ot, {}) }) : t && (d == null ? void 0 : d.pages[0].resources.length) === 0 ? /* @__PURE__ */ c(M, { fallback: /* @__PURE__ */ c(U, {}), children: /* @__PURE__ */ c(kt, {}) }) : /* @__PURE__ */ E(M, { fallback: /* @__PURE__ */ c(U, {}), children: [
|
|
1227
|
+
/* @__PURE__ */ c(Ut, { data: d, isFetching: I }),
|
|
1228
|
+
/* @__PURE__ */ c(Mt, { data: d, isFetching: I, fetchNextPage: w })
|
|
1231
1229
|
] });
|
|
1232
|
-
},
|
|
1233
|
-
const e =
|
|
1230
|
+
}, Ie = () => {
|
|
1231
|
+
const e = Q(), [t, s] = le(""), r = mt(), o = bt(), a = Se(null), {
|
|
1234
1232
|
setSearchParams: n
|
|
1235
|
-
} = F(), u = (
|
|
1236
|
-
const h =
|
|
1233
|
+
} = F(), u = (l) => {
|
|
1234
|
+
const h = l.target.value;
|
|
1237
1235
|
s(h.toString());
|
|
1238
|
-
}, p = (
|
|
1239
|
-
(
|
|
1236
|
+
}, p = (l) => {
|
|
1237
|
+
(l.key === "Enter" || l.key === "Return") && (l.preventDefault(), n({
|
|
1240
1238
|
search: t || void 0
|
|
1241
1239
|
}));
|
|
1242
|
-
},
|
|
1243
|
-
|
|
1240
|
+
}, i = (l) => {
|
|
1241
|
+
l.preventDefault(), n({
|
|
1244
1242
|
search: t || void 0
|
|
1245
1243
|
});
|
|
1246
1244
|
};
|
|
@@ -1256,44 +1254,44 @@ const qt = /* @__PURE__ */ Q(async () => await import("./EmptyScreenApp.js")), O
|
|
|
1256
1254
|
o === "select" && s("");
|
|
1257
1255
|
}, [o]), $(() => {
|
|
1258
1256
|
s(() => {
|
|
1259
|
-
var
|
|
1260
|
-
return ((
|
|
1257
|
+
var l;
|
|
1258
|
+
return ((l = e.search) == null ? void 0 : l.toString()) ?? "";
|
|
1261
1259
|
});
|
|
1262
1260
|
}, [e]), {
|
|
1263
1261
|
formRef: a,
|
|
1264
1262
|
inputSearch: t,
|
|
1265
1263
|
handleInputSearchChange: u,
|
|
1266
1264
|
handleKeyPress: p,
|
|
1267
|
-
handleSearchSubmit:
|
|
1265
|
+
handleSearchSubmit: i
|
|
1268
1266
|
};
|
|
1269
|
-
},
|
|
1267
|
+
}, vt = () => {
|
|
1270
1268
|
const {
|
|
1271
1269
|
appCode: e,
|
|
1272
1270
|
currentApp: t
|
|
1273
1271
|
} = v(), {
|
|
1274
1272
|
t: s
|
|
1275
|
-
} = _(), [r, o] =
|
|
1276
|
-
if (
|
|
1273
|
+
} = _(), [r, o] = le(""), a = (l) => {
|
|
1274
|
+
if (l === "0") {
|
|
1277
1275
|
o("");
|
|
1278
1276
|
return;
|
|
1279
1277
|
}
|
|
1280
|
-
o(
|
|
1281
|
-
}, n = W(), u =
|
|
1278
|
+
o(l);
|
|
1279
|
+
}, n = W(), u = Q(), {
|
|
1282
1280
|
setSearchParams: p
|
|
1283
1281
|
} = F();
|
|
1284
1282
|
$(() => {
|
|
1285
|
-
const
|
|
1283
|
+
const l = () => r.includes("1") ? !0 : void 0, h = () => r.includes("2") ? !0 : void 0, d = () => r.includes("7") ? !0 : void 0;
|
|
1286
1284
|
p({
|
|
1287
1285
|
...u,
|
|
1288
1286
|
filters: {
|
|
1289
|
-
owner:
|
|
1290
|
-
public:
|
|
1287
|
+
owner: l(),
|
|
1288
|
+
public: d(),
|
|
1291
1289
|
shared: h(),
|
|
1292
1290
|
folder: n ? n.id : "default"
|
|
1293
1291
|
}
|
|
1294
1292
|
});
|
|
1295
1293
|
}, [n, p, r]);
|
|
1296
|
-
const
|
|
1294
|
+
const i = [{
|
|
1297
1295
|
label: s("explorer.filter.all", {
|
|
1298
1296
|
ns: e
|
|
1299
1297
|
}),
|
|
@@ -1328,10 +1326,10 @@ const qt = /* @__PURE__ */ Q(async () => await import("./EmptyScreenApp.js")), O
|
|
|
1328
1326
|
}] : []];
|
|
1329
1327
|
return {
|
|
1330
1328
|
selectedFilters: r,
|
|
1331
|
-
options:
|
|
1329
|
+
options: i,
|
|
1332
1330
|
handleOnSelectFilter: a
|
|
1333
1331
|
};
|
|
1334
|
-
},
|
|
1332
|
+
}, Bt = () => {
|
|
1335
1333
|
const {
|
|
1336
1334
|
appCode: e
|
|
1337
1335
|
} = v(), {
|
|
@@ -1340,31 +1338,31 @@ const qt = /* @__PURE__ */ Q(async () => await import("./EmptyScreenApp.js")), O
|
|
|
1340
1338
|
selectedFilters: s,
|
|
1341
1339
|
options: r,
|
|
1342
1340
|
handleOnSelectFilter: o
|
|
1343
|
-
} =
|
|
1341
|
+
} = vt(), {
|
|
1344
1342
|
formRef: a,
|
|
1345
1343
|
inputSearch: n,
|
|
1346
1344
|
handleInputSearchChange: u,
|
|
1347
1345
|
handleKeyPress: p,
|
|
1348
|
-
handleSearchSubmit:
|
|
1349
|
-
} =
|
|
1350
|
-
return /* @__PURE__ */
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */ c(
|
|
1346
|
+
handleSearchSubmit: i
|
|
1347
|
+
} = Ie(), l = s.length > 0 ? s.length : void 0;
|
|
1348
|
+
return /* @__PURE__ */ E("form", { noValidate: !0, className: "bg-light p-16 ps-24 ms-n16 ms-lg-n24 me-n16 position-relative d-flex gap-8", ref: a, children: [
|
|
1349
|
+
/* @__PURE__ */ E(ke, { id: "search", className: "input-group", children: [
|
|
1350
|
+
/* @__PURE__ */ c(Ue, { type: "search", placeholder: t("explorer.label.search", {
|
|
1353
1351
|
ns: e
|
|
1354
1352
|
}), size: "lg", noValidationIcon: !0, value: n, onChange: u, onKeyDown: p }),
|
|
1355
|
-
/* @__PURE__ */ c(
|
|
1353
|
+
/* @__PURE__ */ c(Me, { type: "submit", "aria-label": t("explorer.label.search", {
|
|
1356
1354
|
ns: e
|
|
1357
|
-
}), onClick:
|
|
1355
|
+
}), onClick: i })
|
|
1358
1356
|
] }),
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */ c(j.Trigger, { label: t("explorer.filters"), icon: /* @__PURE__ */ c(
|
|
1361
|
-
/* @__PURE__ */ c(j.Menu, { children: r.map((h) => h.value === "0" ? /* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ E(j, { placement: "bottom-end", children: [
|
|
1358
|
+
/* @__PURE__ */ c(j.Trigger, { label: t("explorer.filters"), icon: /* @__PURE__ */ c(Ye, { width: 20 }), variant: "ghost", badgeContent: l }),
|
|
1359
|
+
/* @__PURE__ */ c(j.Menu, { children: r.map((h) => h.value === "0" ? /* @__PURE__ */ E(be, { children: [
|
|
1362
1360
|
/* @__PURE__ */ c(j.RadioItem, { value: h.value, model: s, onChange: () => o(h.value), children: h.label }),
|
|
1363
1361
|
/* @__PURE__ */ c(j.Separator, {})
|
|
1364
1362
|
] }, "0") : /* @__PURE__ */ c(j.RadioItem, { value: h.value, model: s, onChange: () => o(h.value), children: h.label }, h.value)) })
|
|
1365
1363
|
] })
|
|
1366
1364
|
] });
|
|
1367
|
-
},
|
|
1365
|
+
}, Kt = ({
|
|
1368
1366
|
id: e,
|
|
1369
1367
|
selected: t,
|
|
1370
1368
|
onSelect: s
|
|
@@ -1372,48 +1370,50 @@ const qt = /* @__PURE__ */ Q(async () => await import("./EmptyScreenApp.js")), O
|
|
|
1372
1370
|
const {
|
|
1373
1371
|
t: r
|
|
1374
1372
|
} = _();
|
|
1375
|
-
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__ */
|
|
1376
|
-
/* @__PURE__ */ c(
|
|
1373
|
+
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__ */ E("div", { className: "d-flex align-items-center gap-8 py-8 ps-24", children: [
|
|
1374
|
+
/* @__PURE__ */ c(Ze, { width: "20", height: "20" }),
|
|
1377
1375
|
/* @__PURE__ */ c("span", { children: r("explorer.tree.trash") })
|
|
1378
1376
|
] }) }) }) }) }) }) });
|
|
1379
|
-
},
|
|
1380
|
-
const [e, t] =
|
|
1381
|
-
appCode:
|
|
1377
|
+
}, $t = /* @__PURE__ */ q(async () => await import("./FolderModal.js")), _t = () => {
|
|
1378
|
+
const [e, t] = Le(), s = k(), r = V(), o = re(), a = se(), n = It(), u = ve(), p = o ? N.BIN : a, {
|
|
1379
|
+
appCode: i
|
|
1382
1380
|
} = v(), {
|
|
1383
|
-
t:
|
|
1384
|
-
} = _(["common",
|
|
1381
|
+
t: l
|
|
1382
|
+
} = _(["common", i]), h = {
|
|
1385
1383
|
...r,
|
|
1386
|
-
name:
|
|
1387
|
-
ns:
|
|
1384
|
+
name: l("explorer.filters.mine", {
|
|
1385
|
+
ns: i
|
|
1388
1386
|
})
|
|
1389
1387
|
}, {
|
|
1390
|
-
goToTrash:
|
|
1388
|
+
goToTrash: d,
|
|
1391
1389
|
selectTreeItem: f,
|
|
1392
1390
|
clearSelectedItems: m,
|
|
1393
|
-
clearSelectedIds:
|
|
1394
|
-
fetchTreeData:
|
|
1395
|
-
} = F(), w = (
|
|
1396
|
-
f(
|
|
1397
|
-
}, C = (
|
|
1398
|
-
var
|
|
1399
|
-
const
|
|
1391
|
+
clearSelectedIds: D,
|
|
1392
|
+
fetchTreeData: I
|
|
1393
|
+
} = F(), w = (x) => {
|
|
1394
|
+
f(x, s), u();
|
|
1395
|
+
}, C = (x) => {
|
|
1396
|
+
var g, S;
|
|
1397
|
+
const b = J(r, x), y = (g = b == null ? void 0 : b.children) == null ? void 0 : g.some((R) => {
|
|
1400
1398
|
var z;
|
|
1401
|
-
return Array.isArray(
|
|
1399
|
+
return Array.isArray(R == null ? void 0 : R.children) && ((z = R.children) == null ? void 0 : z.length) > 0;
|
|
1402
1400
|
});
|
|
1403
|
-
(
|
|
1404
|
-
|
|
1401
|
+
(S = b == null ? void 0 : b.children) == null || S.forEach((R) => {
|
|
1402
|
+
y || I(R.id, s);
|
|
1405
1403
|
});
|
|
1406
|
-
},
|
|
1407
|
-
m(),
|
|
1404
|
+
}, O = () => {
|
|
1405
|
+
m(), D(), t();
|
|
1408
1406
|
};
|
|
1409
|
-
return
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
/* @__PURE__ */ c(
|
|
1413
|
-
/* @__PURE__ */ c(
|
|
1407
|
+
return console.log({
|
|
1408
|
+
elementDragOver: n
|
|
1409
|
+
}), /* @__PURE__ */ E(G, { children: [
|
|
1410
|
+
/* @__PURE__ */ c(Be, { data: h, selectedNodeId: p, draggedNode: n != null && n.isTreeview ? n : void 0, onTreeItemClick: w, onTreeItemUnfold: C }),
|
|
1411
|
+
/* @__PURE__ */ c(Kt, { id: N.BIN, selected: o, onSelect: d }),
|
|
1412
|
+
/* @__PURE__ */ c("div", { className: "d-grid my-16", children: /* @__PURE__ */ c(Ke, { disabled: o, type: "button", color: "primary", variant: "outline", leftIcon: /* @__PURE__ */ c(et, {}), onClick: O, children: l("explorer.folder.new") }) }),
|
|
1413
|
+
/* @__PURE__ */ c(M, { fallback: /* @__PURE__ */ c(U, {}), children: e && /* @__PURE__ */ c($t, { edit: !1, isOpen: e, onSuccess: t, onCancel: t }) })
|
|
1414
1414
|
] });
|
|
1415
1415
|
};
|
|
1416
|
-
function
|
|
1416
|
+
function zt() {
|
|
1417
1417
|
const {
|
|
1418
1418
|
appCode: e
|
|
1419
1419
|
} = v(), {
|
|
@@ -1422,18 +1422,18 @@ function Vt() {
|
|
|
1422
1422
|
t: s
|
|
1423
1423
|
} = _(["common", e]), {
|
|
1424
1424
|
inputSearch: r
|
|
1425
|
-
} =
|
|
1425
|
+
} = Ie(), o = se(), a = re(), n = W(), u = s("explorer.tree.trash"), p = s("explorer.tree.search"), i = s("explorer.filters.mine", {
|
|
1426
1426
|
ns: e
|
|
1427
|
-
}),
|
|
1428
|
-
return /* @__PURE__ */ c("div", { className: "py-16", children: o && o !== "bin" && o !== "default" && !a ? /* @__PURE__ */
|
|
1429
|
-
/* @__PURE__ */ c(
|
|
1430
|
-
/* @__PURE__ */ c("p", { className: "body py-8 text-truncate", children: /* @__PURE__ */ c("strong", { children:
|
|
1431
|
-
] }) : /* @__PURE__ */ c("h2", { className: "body py-8 fw-bold", children: r.length !== 0 ? p : a ? u :
|
|
1427
|
+
}), l = (n == null ? void 0 : n.name) || i;
|
|
1428
|
+
return /* @__PURE__ */ c("div", { className: "py-16", children: o && o !== "bin" && o !== "default" && !a ? /* @__PURE__ */ E("div", { className: "d-flex align-items-center gap-8", children: [
|
|
1429
|
+
/* @__PURE__ */ c($e, { icon: /* @__PURE__ */ c(tt, {}), variant: "ghost", color: "tertiary", "aria-label": s("back"), className: "ms-n16", onClick: t }),
|
|
1430
|
+
/* @__PURE__ */ c("p", { className: "body py-8 text-truncate", children: /* @__PURE__ */ c("strong", { children: l }) })
|
|
1431
|
+
] }) : /* @__PURE__ */ c("h2", { className: "body py-8 fw-bold", children: r.length !== 0 ? p : a ? u : i }) });
|
|
1432
1432
|
}
|
|
1433
|
-
const
|
|
1433
|
+
const jt = /* @__PURE__ */ q(async () => await import("./AppAction.js")), Vt = /* @__PURE__ */ q(async () => await import("./Library.js")), Wt = /* @__PURE__ */ q(async () => await import("./ActionBarContainer.js")), Ht = /* @__PURE__ */ q(async () => await import("./DisableModal.js")), Gt = /* @__PURE__ */ q(async () => await import("./TrashModal.js")), Jt = /* @__PURE__ */ q(async () => await import("./OnboardingModal.js")), Ts = ({
|
|
1434
1434
|
config: e
|
|
1435
1435
|
}) => {
|
|
1436
|
-
const t =
|
|
1436
|
+
const t = Q(), {
|
|
1437
1437
|
setConfig: s,
|
|
1438
1438
|
setSearchParams: r
|
|
1439
1439
|
} = F();
|
|
@@ -1448,35 +1448,35 @@ const Wt = /* @__PURE__ */ Q(async () => await import("./AppAction.js")), Ht = /
|
|
|
1448
1448
|
currentApp: o
|
|
1449
1449
|
} = v(), {
|
|
1450
1450
|
data: a
|
|
1451
|
-
} =
|
|
1451
|
+
} = Rt(e.actions), {
|
|
1452
1452
|
isTrashedModalOpen: n,
|
|
1453
1453
|
onTrashedCancel: u
|
|
1454
|
-
} =
|
|
1454
|
+
} = xt(), {
|
|
1455
1455
|
isActionDisableModalOpen: p,
|
|
1456
|
-
onActionDisableCancel:
|
|
1457
|
-
} =
|
|
1458
|
-
handleDragEnd:
|
|
1456
|
+
onActionDisableCancel: i
|
|
1457
|
+
} = wt(), {
|
|
1458
|
+
handleDragEnd: l,
|
|
1459
1459
|
handleDragOver: h,
|
|
1460
|
-
handleDragStart:
|
|
1460
|
+
handleDragStart: d,
|
|
1461
1461
|
sensors: f
|
|
1462
|
-
} =
|
|
1463
|
-
|
|
1464
|
-
const m =
|
|
1465
|
-
return e && /* @__PURE__ */
|
|
1466
|
-
/* @__PURE__ */ c(
|
|
1467
|
-
/* @__PURE__ */ c(
|
|
1468
|
-
/* @__PURE__ */ c(
|
|
1469
|
-
/* @__PURE__ */ c(
|
|
1470
|
-
m && /* @__PURE__ */ c(
|
|
1462
|
+
} = Pt();
|
|
1463
|
+
_e();
|
|
1464
|
+
const m = ae("publish", a), D = ae("create", a);
|
|
1465
|
+
return e && /* @__PURE__ */ E(G, { children: [
|
|
1466
|
+
/* @__PURE__ */ c(ze, { render: () => D ? /* @__PURE__ */ c(M, { fallback: /* @__PURE__ */ c(U, {}), children: /* @__PURE__ */ c(jt, {}) }) : null, children: /* @__PURE__ */ c(je, { app: o }) }),
|
|
1467
|
+
/* @__PURE__ */ c(te, { className: "flex-grow-1", children: /* @__PURE__ */ E(Ce, { sensors: f, modifiers: [Fe], onDragStart: d, onDragEnd: l, onDragOver: h, children: [
|
|
1468
|
+
/* @__PURE__ */ c(te.Col, { sm: "3", lg: "2", xl: "3", className: "border-end pt-16 pe-16 d-none d-lg-block", as: "aside", children: /* @__PURE__ */ E(M, { fallback: /* @__PURE__ */ c(U, {}), children: [
|
|
1469
|
+
/* @__PURE__ */ c(_t, {}),
|
|
1470
|
+
m && /* @__PURE__ */ c(Vt, {})
|
|
1471
1471
|
] }) }),
|
|
1472
|
-
/* @__PURE__ */
|
|
1473
|
-
/* @__PURE__ */ c(
|
|
1474
|
-
/* @__PURE__ */ c(
|
|
1475
|
-
/* @__PURE__ */ c(
|
|
1472
|
+
/* @__PURE__ */ E(te.Col, { sm: "4", md: "8", lg: "6", xl: "9", children: [
|
|
1473
|
+
/* @__PURE__ */ c(Bt, {}),
|
|
1474
|
+
/* @__PURE__ */ c(zt, {}),
|
|
1475
|
+
/* @__PURE__ */ c(Lt, {})
|
|
1476
1476
|
] }),
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
/* @__PURE__ */ c(
|
|
1479
|
-
e.enableOnboarding && /* @__PURE__ */ c(
|
|
1477
|
+
/* @__PURE__ */ E(M, { fallback: /* @__PURE__ */ c(U, {}), children: [
|
|
1478
|
+
/* @__PURE__ */ c(Wt, {}),
|
|
1479
|
+
e.enableOnboarding && /* @__PURE__ */ c(Jt, { id: "showOnboardingTrash", items: [{
|
|
1480
1480
|
src: "onboarding/illu-trash-menu.svg",
|
|
1481
1481
|
alt: "explorer.modal.onboarding.trash.screen1.alt",
|
|
1482
1482
|
text: "explorer.modal.onboarding.trash.screen1.title"
|
|
@@ -1494,40 +1494,40 @@ const Wt = /* @__PURE__ */ Q(async () => await import("./AppAction.js")), Ht = /
|
|
|
1494
1494
|
nextText: "explorer.modal.onboarding.trash.next",
|
|
1495
1495
|
closeText: "explorer.modal.onboarding.trash.close"
|
|
1496
1496
|
} }),
|
|
1497
|
-
n && /* @__PURE__ */ c(
|
|
1498
|
-
p && /* @__PURE__ */ c(
|
|
1497
|
+
n && /* @__PURE__ */ c(Gt, { isOpen: n, onCancel: u }),
|
|
1498
|
+
p && /* @__PURE__ */ c(Ht, { isOpen: p, onCancel: i })
|
|
1499
1499
|
] })
|
|
1500
1500
|
] }) })
|
|
1501
1501
|
] });
|
|
1502
1502
|
};
|
|
1503
1503
|
export {
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1504
|
+
ds as A,
|
|
1505
|
+
fs as B,
|
|
1506
|
+
Ts as E,
|
|
1507
1507
|
F as a,
|
|
1508
|
-
|
|
1508
|
+
Rt as b,
|
|
1509
1509
|
W as c,
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1510
|
+
xs as d,
|
|
1511
|
+
Q as e,
|
|
1512
|
+
re as f,
|
|
1513
|
+
is as g,
|
|
1514
1514
|
Y as h,
|
|
1515
|
-
|
|
1516
|
-
|
|
1515
|
+
hs as i,
|
|
1516
|
+
us as j,
|
|
1517
1517
|
X as k,
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1518
|
+
ms as l,
|
|
1519
|
+
yt as m,
|
|
1520
|
+
Is as n,
|
|
1521
|
+
ps as o,
|
|
1522
|
+
ls as p,
|
|
1523
|
+
bs as q,
|
|
1524
|
+
ws as r,
|
|
1525
|
+
It as s,
|
|
1526
|
+
Ds as t,
|
|
1527
1527
|
T as u,
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1528
|
+
Ss as v,
|
|
1529
|
+
ys as w,
|
|
1530
|
+
gs as x,
|
|
1531
|
+
Et as y,
|
|
1532
1532
|
V as z
|
|
1533
1533
|
};
|