ode-explorer 1.4.2-develop-pedago.202403201825 → 1.4.2-develop.202403201822
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.js +2 -2
- package/dist/version.txt +1 -1
- package/lib/index2.js +102 -102
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -62538,7 +62538,7 @@ const useConversation = () => {
|
|
|
62538
62538
|
return reactExports.useEffect(() => {
|
|
62539
62539
|
refreshMails();
|
|
62540
62540
|
}, []), reactExports.useEffect(() => {
|
|
62541
|
-
|
|
62541
|
+
goToMessagerie();
|
|
62542
62542
|
}, []), {
|
|
62543
62543
|
messages: messages2,
|
|
62544
62544
|
msgLink,
|
|
@@ -67486,7 +67486,7 @@ const useCopyResource = () => {
|
|
|
67486
67486
|
}
|
|
67487
67487
|
);
|
|
67488
67488
|
}
|
|
67489
|
-
if (currentFolder.id && currentFolder.id !==
|
|
67489
|
+
if (currentFolder.id && currentFolder.id !== "default") {
|
|
67490
67490
|
moveToFolder({
|
|
67491
67491
|
searchParams,
|
|
67492
67492
|
resourceIds: [data.duplicateId],
|
package/dist/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ode-explorer=1.0-b2school-SNAPSHOT 20/03/2024 18:
|
|
1
|
+
ode-explorer=1.0-b2school-SNAPSHOT 20/03/2024 18:23:09
|
package/lib/index2.js
CHANGED
|
@@ -4,14 +4,14 @@ var $ = (e, s, t) => (ye(e, typeof s != "symbol" ? s + "" : s, t), t);
|
|
|
4
4
|
import { jsx as c, jsxs as N, Fragment as ce } from "react/jsx-runtime";
|
|
5
5
|
import { useState as ie, useRef as Ie, useEffect as M, lazy as F, Suspense as q, Fragment as we } from "react";
|
|
6
6
|
import { useScrollToTop as Se, useOdeClient as K, IconButton as xe, useToast as U, useUser as le, useShareMutation as De, useUpdateMutation as be, LoadingScreen as A, FormControl as Te, Input as Fe, SearchButton as Ce, Dropdown as z, useToggle as Ne, TreeView as Re, Button as Pe, useXitiTrackPageLoad as Ae, isActionAvailable as oe, AppHeader as Ee, Breadcrumb as Qe, Grid as te } from "@edifice-ui/react";
|
|
7
|
-
import { ArrowLeft as Oe, Filter as qe, Delete as Ue, Plus as
|
|
7
|
+
import { ArrowLeft as Oe, Filter as qe, Delete as Ue, Plus as ke } 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 Me, useInfiniteQuery as Ke, useQueryClient as E, useMutation as
|
|
9
|
+
import { odeServices as x, FOLDER as T, SORT_ORDER as ve } from "edifice-ts-client";
|
|
10
|
+
import { t as S } from "i18next";
|
|
11
|
+
import { create as Le } from "zustand";
|
|
12
|
+
import { useQuery as Me, useInfiniteQuery as Ke, useQueryClient as E, useMutation as v } from "@tanstack/react-query";
|
|
13
13
|
const de = async (e) => {
|
|
14
|
-
const s = await
|
|
14
|
+
const s = await x.resource(e.application).searchContext(e);
|
|
15
15
|
return {
|
|
16
16
|
...s,
|
|
17
17
|
folders: s.folders.filter((t) => !t.trashed)
|
|
@@ -27,7 +27,7 @@ const de = async (e) => {
|
|
|
27
27
|
application: e.application,
|
|
28
28
|
type: e.types[0]
|
|
29
29
|
};
|
|
30
|
-
return await
|
|
30
|
+
return await x.resource(e.application).createFolder(r);
|
|
31
31
|
}, _e = async ({
|
|
32
32
|
folderId: e,
|
|
33
33
|
searchParams: s,
|
|
@@ -41,7 +41,7 @@ const de = async (e) => {
|
|
|
41
41
|
application: s.application,
|
|
42
42
|
type: s.types[0]
|
|
43
43
|
};
|
|
44
|
-
return await
|
|
44
|
+
return await x.resource(s.application).updateFolder(n);
|
|
45
45
|
}, $e = async ({
|
|
46
46
|
searchParams: e,
|
|
47
47
|
resourceIds: s,
|
|
@@ -54,7 +54,7 @@ const de = async (e) => {
|
|
|
54
54
|
resourceIds: s,
|
|
55
55
|
folderIds: r
|
|
56
56
|
};
|
|
57
|
-
return await
|
|
57
|
+
return await x.resource(e.application).trashAll(n, t);
|
|
58
58
|
}, ze = async ({
|
|
59
59
|
searchParams: e,
|
|
60
60
|
resourceIds: s,
|
|
@@ -67,7 +67,7 @@ const de = async (e) => {
|
|
|
67
67
|
resourceIds: s,
|
|
68
68
|
folderIds: r
|
|
69
69
|
};
|
|
70
|
-
return await
|
|
70
|
+
return await x.resource(e.application).deleteAll(n, t);
|
|
71
71
|
}, je = async ({
|
|
72
72
|
searchParams: e,
|
|
73
73
|
resourceIds: s,
|
|
@@ -80,8 +80,8 @@ const de = async (e) => {
|
|
|
80
80
|
resourceIds: s,
|
|
81
81
|
folderIds: t
|
|
82
82
|
};
|
|
83
|
-
return await
|
|
84
|
-
}, Ve = async (e, s) => await
|
|
83
|
+
return await x.resource(e.application).restoreAll(n, r);
|
|
84
|
+
}, Ve = async (e, s) => await x.resource(e.application).copy({
|
|
85
85
|
application: e.application,
|
|
86
86
|
resourceId: s
|
|
87
87
|
}), ue = async ({
|
|
@@ -97,40 +97,40 @@ const de = async (e) => {
|
|
|
97
97
|
resourceIds: s,
|
|
98
98
|
folderIds: r
|
|
99
99
|
};
|
|
100
|
-
return await
|
|
100
|
+
return await x.resource(e.application).moveToFolder(a, n);
|
|
101
101
|
};
|
|
102
|
-
const He = async (e) => await
|
|
102
|
+
const He = async (e) => await x.rights().sessionHasWorkflowRights(e), We = ({
|
|
103
103
|
searchParams: e,
|
|
104
104
|
assetId: s
|
|
105
105
|
}) => {
|
|
106
|
-
const t =
|
|
106
|
+
const t = x.resource(e.application).getViewUrl(s);
|
|
107
107
|
window.open(t, "_self");
|
|
108
108
|
}, Je = ({
|
|
109
109
|
searchParams: e,
|
|
110
110
|
params: s
|
|
111
|
-
}) =>
|
|
111
|
+
}) => x.resource(e.application).create(s), Ge = ({
|
|
112
112
|
searchParams: e,
|
|
113
113
|
assetId: s
|
|
114
114
|
}) => {
|
|
115
|
-
const t =
|
|
115
|
+
const t = x.resource(e.application).getPrintUrl(s);
|
|
116
116
|
return window.open(t, "_blank");
|
|
117
117
|
}, $t = ({
|
|
118
118
|
searchParams: e,
|
|
119
119
|
folderId: s
|
|
120
120
|
}) => {
|
|
121
|
-
const t =
|
|
121
|
+
const t = x.resource(e.application).getFormUrl(s);
|
|
122
122
|
return window.open(t, "_self");
|
|
123
123
|
}, zt = ({
|
|
124
124
|
searchParams: e,
|
|
125
125
|
assetId: s
|
|
126
126
|
}) => {
|
|
127
|
-
const t =
|
|
127
|
+
const t = x.resource(e.application).getEditUrl(s);
|
|
128
128
|
return window.open(t, "_self");
|
|
129
129
|
}, jt = ({
|
|
130
130
|
searchParams: e,
|
|
131
131
|
assetId: s
|
|
132
132
|
}) => {
|
|
133
|
-
const t =
|
|
133
|
+
const t = x.resource(e.application).getExportUrl(s);
|
|
134
134
|
return window.open(t, "_self");
|
|
135
135
|
};
|
|
136
136
|
function se(e) {
|
|
@@ -144,7 +144,7 @@ function W(e, s) {
|
|
|
144
144
|
function Xe(e, s) {
|
|
145
145
|
var r;
|
|
146
146
|
const t = W(e, s);
|
|
147
|
-
return (r = t == null ? void 0 : t.folder) != null && r.ancestors ? [...(t == null ? void 0 : t.folder.ancestors) || [], e] : e ===
|
|
147
|
+
return (r = t == null ? void 0 : t.folder) != null && r.ancestors ? [...(t == null ? void 0 : t.folder.ancestors) || [], e] : e === T.BIN ? [T.BIN] : [T.DEFAULT];
|
|
148
148
|
}
|
|
149
149
|
function fe(e, s) {
|
|
150
150
|
return s.id === e && s.children ? s.children.length > 0 : s.children ? s.children.some((t) => fe(s.id, t)) : !1;
|
|
@@ -185,13 +185,13 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
|
|
|
185
185
|
},
|
|
186
186
|
searchParams: {
|
|
187
187
|
filters: {
|
|
188
|
-
folder:
|
|
188
|
+
folder: T.DEFAULT,
|
|
189
189
|
owner: void 0,
|
|
190
190
|
shared: void 0,
|
|
191
191
|
public: void 0
|
|
192
192
|
},
|
|
193
193
|
orders: {
|
|
194
|
-
updatedAt:
|
|
194
|
+
updatedAt: ve.DESC
|
|
195
195
|
},
|
|
196
196
|
application: "",
|
|
197
197
|
types: [],
|
|
@@ -203,8 +203,8 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
|
|
|
203
203
|
trashed: !1
|
|
204
204
|
},
|
|
205
205
|
treeData: {
|
|
206
|
-
id:
|
|
207
|
-
name:
|
|
206
|
+
id: T.DEFAULT,
|
|
207
|
+
name: S("explorer.filters.mine"),
|
|
208
208
|
section: !0,
|
|
209
209
|
children: []
|
|
210
210
|
},
|
|
@@ -219,7 +219,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
|
|
|
219
219
|
resourceIsTrash: !1,
|
|
220
220
|
resourceActionDisable: !1,
|
|
221
221
|
status: void 0
|
|
222
|
-
}, w =
|
|
222
|
+
}, w = Le()((e, s) => ({
|
|
223
223
|
...Ye,
|
|
224
224
|
updaters: {
|
|
225
225
|
setConfig: (t) => e({
|
|
@@ -362,7 +362,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
|
|
|
362
362
|
...n.filters,
|
|
363
363
|
folder: t
|
|
364
364
|
},
|
|
365
|
-
trashed: t ===
|
|
365
|
+
trashed: t === T.BIN
|
|
366
366
|
}
|
|
367
367
|
}));
|
|
368
368
|
},
|
|
@@ -401,7 +401,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
|
|
|
401
401
|
var f;
|
|
402
402
|
return {
|
|
403
403
|
...l,
|
|
404
|
-
treeData: pe(n, (f = o == null ? void 0 : o.pages[0]) == null ? void 0 : f.folders, t ||
|
|
404
|
+
treeData: pe(n, (f = o == null ? void 0 : o.pages[0]) == null ? void 0 : f.folders, t || T.DEFAULT)
|
|
405
405
|
};
|
|
406
406
|
});
|
|
407
407
|
}
|
|
@@ -437,7 +437,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
|
|
|
437
437
|
const o = W(t[a - 2], r);
|
|
438
438
|
n({
|
|
439
439
|
folder: o,
|
|
440
|
-
folderId: (o == null ? void 0 : o.id) ||
|
|
440
|
+
folderId: (o == null ? void 0 : o.id) || T.DEFAULT
|
|
441
441
|
});
|
|
442
442
|
},
|
|
443
443
|
goToTrash: () => e((t) => ({
|
|
@@ -451,25 +451,25 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
|
|
|
451
451
|
...t.searchParams,
|
|
452
452
|
search: void 0,
|
|
453
453
|
filters: {
|
|
454
|
-
folder:
|
|
454
|
+
folder: T.BIN
|
|
455
455
|
},
|
|
456
456
|
trashed: !0
|
|
457
457
|
},
|
|
458
458
|
currentFolder: {
|
|
459
|
-
id:
|
|
459
|
+
id: T.BIN
|
|
460
460
|
}
|
|
461
461
|
}))
|
|
462
462
|
}
|
|
463
|
-
})),
|
|
463
|
+
})), D = () => w((e) => e.searchParams), re = () => w((e) => e.selectedNodesIds), V = () => w((e) => e.treeData), Vt = () => w((e) => e.selectedFolders), Ht = () => w((e) => e.selectedResources), Ze = () => w((e) => e.searchConfig), X = () => w((e) => e.folderIds), Y = () => w((e) => e.resourceIds), Z = () => w((e) => e.selectedResources.map((s) => s.assetId)), ee = () => w((e) => e.selectedResources.filter((s) => s.assetId === s.id)), H = () => w((e) => e.currentFolder), b = () => w((e) => e.updaters), ne = () => {
|
|
464
464
|
const e = H();
|
|
465
|
-
return (e == null ? void 0 : e.id) ===
|
|
465
|
+
return (e == null ? void 0 : e.id) === T.BIN;
|
|
466
466
|
}, et = () => w((e) => e.resourceIsTrash), tt = () => w((e) => e.resourceActionDisable), st = () => {
|
|
467
467
|
const e = H();
|
|
468
468
|
return (e == null ? void 0 : e.id) === "default";
|
|
469
469
|
}, rt = () => re().length > 1, nt = () => w((e) => e.status), me = () => {
|
|
470
|
-
const e =
|
|
470
|
+
const e = D(), [s, t] = ie(""), r = Ze(), n = nt(), a = Ie(null), {
|
|
471
471
|
setSearchParams: o
|
|
472
|
-
} =
|
|
472
|
+
} = b(), l = (u) => {
|
|
473
473
|
const h = u.target.value;
|
|
474
474
|
t(h.toString());
|
|
475
475
|
}, f = (u) => {
|
|
@@ -509,7 +509,7 @@ function ot() {
|
|
|
509
509
|
appCode: e
|
|
510
510
|
} = K(), {
|
|
511
511
|
gotoPreviousFolder: s
|
|
512
|
-
} =
|
|
512
|
+
} = b(), {
|
|
513
513
|
t
|
|
514
514
|
} = j(), {
|
|
515
515
|
inputSearch: r
|
|
@@ -526,7 +526,7 @@ const at = () => {
|
|
|
526
526
|
clearSelectedIds: s,
|
|
527
527
|
setResourceActionDisable: t,
|
|
528
528
|
clearSelectedItems: r
|
|
529
|
-
} =
|
|
529
|
+
} = b();
|
|
530
530
|
return {
|
|
531
531
|
isActionDisableModalOpen: e,
|
|
532
532
|
onActionDisableCancel: () => {
|
|
@@ -538,7 +538,7 @@ const at = () => {
|
|
|
538
538
|
clearSelectedIds: s,
|
|
539
539
|
setResourceIsTrash: t,
|
|
540
540
|
clearSelectedItems: r
|
|
541
|
-
} =
|
|
541
|
+
} = b();
|
|
542
542
|
return {
|
|
543
543
|
isTrashedModalOpen: e,
|
|
544
544
|
onTrashedCancel: () => {
|
|
@@ -622,7 +622,7 @@ const ft = () => {
|
|
|
622
622
|
enabled: !!e
|
|
623
623
|
});
|
|
624
624
|
}, ht = () => {
|
|
625
|
-
const e = w((o) => o.config), s =
|
|
625
|
+
const e = w((o) => o.config), s = D(), {
|
|
626
626
|
filters: t,
|
|
627
627
|
trashed: r,
|
|
628
628
|
search: n
|
|
@@ -652,12 +652,12 @@ const ft = () => {
|
|
|
652
652
|
getNextPageParam: (o) => o.pagination.startIdx + o.pagination.pageSize
|
|
653
653
|
});
|
|
654
654
|
}, Wt = () => {
|
|
655
|
-
const e = U(), s = E(), t =
|
|
655
|
+
const e = U(), s = E(), t = D(), r = V(), n = X(), a = Z(), o = Y(), l = ee().length > 0, f = l ? a : o, {
|
|
656
656
|
clearSelectedItems: d,
|
|
657
657
|
clearSelectedIds: u,
|
|
658
658
|
setTreeData: h,
|
|
659
659
|
setSearchParams: i
|
|
660
|
-
} =
|
|
660
|
+
} = b(), {
|
|
661
661
|
filters: p,
|
|
662
662
|
trashed: m
|
|
663
663
|
} = t, y = ["context", {
|
|
@@ -665,7 +665,7 @@ const ft = () => {
|
|
|
665
665
|
filters: p,
|
|
666
666
|
trashed: m
|
|
667
667
|
}];
|
|
668
|
-
return
|
|
668
|
+
return v({
|
|
669
669
|
mutationFn: async () => await $e({
|
|
670
670
|
searchParams: t,
|
|
671
671
|
folderIds: n,
|
|
@@ -673,16 +673,16 @@ const ft = () => {
|
|
|
673
673
|
useAssetIds: l
|
|
674
674
|
}),
|
|
675
675
|
onError(g) {
|
|
676
|
-
typeof g == "string" && e.error(
|
|
676
|
+
typeof g == "string" && e.error(S(g));
|
|
677
677
|
},
|
|
678
678
|
onSuccess: async (g) => {
|
|
679
679
|
if (await s.cancelQueries({
|
|
680
680
|
queryKey: y
|
|
681
681
|
}), s.getQueryData(y))
|
|
682
|
-
return e.success(
|
|
682
|
+
return e.success(S("explorer.trash.title")), s.setQueryData(y, (C) => {
|
|
683
683
|
var Q;
|
|
684
684
|
if (C) {
|
|
685
|
-
const
|
|
685
|
+
const k = {
|
|
686
686
|
...C,
|
|
687
687
|
pages: C == null ? void 0 : C.pages.map((R) => {
|
|
688
688
|
var P;
|
|
@@ -707,7 +707,7 @@ const ft = () => {
|
|
|
707
707
|
// @ts-ignore
|
|
708
708
|
maxIdx: ((Q = t.pagination) == null ? void 0 : Q.maxIdx) - g.resources.length
|
|
709
709
|
}
|
|
710
|
-
}),
|
|
710
|
+
}), k;
|
|
711
711
|
}
|
|
712
712
|
});
|
|
713
713
|
},
|
|
@@ -716,12 +716,12 @@ const ft = () => {
|
|
|
716
716
|
}
|
|
717
717
|
});
|
|
718
718
|
}, Jt = () => {
|
|
719
|
-
const e = U(), s = E(), t =
|
|
719
|
+
const e = U(), s = E(), t = D(), r = X(), n = Z(), a = Y(), o = ee().length > 0, l = o ? n : a, {
|
|
720
720
|
setFolderIds: f,
|
|
721
721
|
setResourceIds: d,
|
|
722
722
|
setSelectedResources: u,
|
|
723
723
|
setSelectedFolders: h
|
|
724
|
-
} =
|
|
724
|
+
} = b(), {
|
|
725
725
|
filters: i,
|
|
726
726
|
trashed: p
|
|
727
727
|
} = t, m = ["context", {
|
|
@@ -729,7 +729,7 @@ const ft = () => {
|
|
|
729
729
|
filters: i,
|
|
730
730
|
trashed: p
|
|
731
731
|
}];
|
|
732
|
-
return
|
|
732
|
+
return v({
|
|
733
733
|
mutationFn: async () => await je({
|
|
734
734
|
searchParams: t,
|
|
735
735
|
folderIds: r,
|
|
@@ -737,13 +737,13 @@ const ft = () => {
|
|
|
737
737
|
useAssetIds: o
|
|
738
738
|
}),
|
|
739
739
|
onError(y) {
|
|
740
|
-
typeof y == "string" && e.error(
|
|
740
|
+
typeof y == "string" && e.error(S(y));
|
|
741
741
|
},
|
|
742
742
|
onSuccess: async () => {
|
|
743
743
|
if (await s.cancelQueries({
|
|
744
744
|
queryKey: m
|
|
745
745
|
}), s.getQueryData(m))
|
|
746
|
-
return e.success(
|
|
746
|
+
return e.success(S("explorer.trash.toast")), s.setQueryData(m, (g) => {
|
|
747
747
|
if (g)
|
|
748
748
|
return {
|
|
749
749
|
...g,
|
|
@@ -760,10 +760,10 @@ const ft = () => {
|
|
|
760
760
|
}
|
|
761
761
|
});
|
|
762
762
|
}, Gt = () => {
|
|
763
|
-
const e = U(), s = E(), t =
|
|
763
|
+
const e = U(), s = E(), t = D(), r = X(), n = Z(), a = Y(), o = ee().length > 0, l = o ? n : a, {
|
|
764
764
|
clearSelectedItems: f,
|
|
765
765
|
clearSelectedIds: d
|
|
766
|
-
} =
|
|
766
|
+
} = b(), {
|
|
767
767
|
filters: u,
|
|
768
768
|
trashed: h
|
|
769
769
|
} = t, i = ["context", {
|
|
@@ -771,7 +771,7 @@ const ft = () => {
|
|
|
771
771
|
filters: u,
|
|
772
772
|
trashed: h
|
|
773
773
|
}];
|
|
774
|
-
return
|
|
774
|
+
return v({
|
|
775
775
|
mutationFn: async () => await ze({
|
|
776
776
|
searchParams: t,
|
|
777
777
|
folderIds: r,
|
|
@@ -779,13 +779,13 @@ const ft = () => {
|
|
|
779
779
|
useAssetIds: o
|
|
780
780
|
}),
|
|
781
781
|
onError(p) {
|
|
782
|
-
typeof p == "string" && e.error(
|
|
782
|
+
typeof p == "string" && e.error(S(p));
|
|
783
783
|
},
|
|
784
784
|
onSuccess: async () => {
|
|
785
785
|
if (await s.cancelQueries({
|
|
786
786
|
queryKey: i
|
|
787
787
|
}), s.getQueryData(i))
|
|
788
|
-
return e.success(
|
|
788
|
+
return e.success(S("explorer.removed.from.trash")), s.setQueryData(i, (m) => {
|
|
789
789
|
if (m)
|
|
790
790
|
return {
|
|
791
791
|
...m,
|
|
@@ -802,7 +802,7 @@ const ft = () => {
|
|
|
802
802
|
}
|
|
803
803
|
});
|
|
804
804
|
}, Xt = () => {
|
|
805
|
-
const e = U(), s =
|
|
805
|
+
const e = U(), s = D(), t = E(), {
|
|
806
806
|
user: r
|
|
807
807
|
} = le(), n = H(), {
|
|
808
808
|
filters: a,
|
|
@@ -812,17 +812,17 @@ const ft = () => {
|
|
|
812
812
|
filters: a,
|
|
813
813
|
trashed: o
|
|
814
814
|
}];
|
|
815
|
-
return
|
|
816
|
-
mutationFn: async (d) => (e.info(
|
|
815
|
+
return v({
|
|
816
|
+
mutationFn: async (d) => (e.info(S("duplicate.start"), {
|
|
817
817
|
id: l
|
|
818
818
|
}), await Ve(s, d.assetId)),
|
|
819
819
|
onSuccess: async (d, u) => {
|
|
820
|
-
e.remove(l), e.success(
|
|
820
|
+
e.remove(l), e.success(S("duplicate.done")), await t.cancelQueries({
|
|
821
821
|
queryKey: f
|
|
822
822
|
});
|
|
823
823
|
const h = t.getQueryData(f), i = {
|
|
824
824
|
...u,
|
|
825
|
-
name: `${u.name}${
|
|
825
|
+
name: `${u.name}${S("duplicate.suffix")}`,
|
|
826
826
|
assetId: d.duplicateId,
|
|
827
827
|
id: d.duplicateId,
|
|
828
828
|
creatorId: r == null ? void 0 : r.userId,
|
|
@@ -845,7 +845,7 @@ const ft = () => {
|
|
|
845
845
|
resources: [i, ...m.resources]
|
|
846
846
|
}))
|
|
847
847
|
};
|
|
848
|
-
}), n.id && n.id !==
|
|
848
|
+
}), n.id && n.id !== "default" && ue({
|
|
849
849
|
searchParams: s,
|
|
850
850
|
resourceIds: [d.duplicateId],
|
|
851
851
|
folderId: n.id,
|
|
@@ -854,16 +854,16 @@ const ft = () => {
|
|
|
854
854
|
});
|
|
855
855
|
},
|
|
856
856
|
onError: (d) => {
|
|
857
|
-
e.remove(l), typeof d == "string" && e.error(`${
|
|
857
|
+
e.remove(l), typeof d == "string" && e.error(`${S("duplicate.error")}: ${d}`);
|
|
858
858
|
}
|
|
859
859
|
});
|
|
860
860
|
}, Yt = () => {
|
|
861
|
-
const e = U(), s = E(), t =
|
|
861
|
+
const e = U(), s = E(), t = D(), r = V(), n = X(), a = Z(), o = Y(), l = ee().length > 0, f = l ? a : o, {
|
|
862
862
|
clearSelectedIds: d,
|
|
863
863
|
clearSelectedItems: u,
|
|
864
864
|
setTreeData: h,
|
|
865
865
|
setSearchParams: i
|
|
866
|
-
} =
|
|
866
|
+
} = b(), {
|
|
867
867
|
filters: p,
|
|
868
868
|
trashed: m
|
|
869
869
|
} = t, y = ["context", {
|
|
@@ -871,7 +871,7 @@ const ft = () => {
|
|
|
871
871
|
filters: p,
|
|
872
872
|
trashed: m
|
|
873
873
|
}];
|
|
874
|
-
return
|
|
874
|
+
return v({
|
|
875
875
|
mutationFn: async (g) => await ue({
|
|
876
876
|
searchParams: t,
|
|
877
877
|
folderId: g,
|
|
@@ -880,12 +880,12 @@ const ft = () => {
|
|
|
880
880
|
useAssetIds: l
|
|
881
881
|
}),
|
|
882
882
|
onError(g) {
|
|
883
|
-
typeof g == "string" && e.error(
|
|
883
|
+
typeof g == "string" && e.error(S(g));
|
|
884
884
|
},
|
|
885
885
|
onSuccess: async (g, I) => {
|
|
886
886
|
if (s.getQueryData(y))
|
|
887
887
|
return s.setQueryData(y, (Q) => {
|
|
888
|
-
var
|
|
888
|
+
var k;
|
|
889
889
|
if (Q) {
|
|
890
890
|
const B = dt(r, {
|
|
891
891
|
destinationId: I,
|
|
@@ -911,7 +911,7 @@ const ft = () => {
|
|
|
911
911
|
pagination: {
|
|
912
912
|
...t.pagination,
|
|
913
913
|
// @ts-ignore
|
|
914
|
-
maxIdx: ((
|
|
914
|
+
maxIdx: ((k = t.pagination) == null ? void 0 : k.maxIdx) - g.resources.length
|
|
915
915
|
}
|
|
916
916
|
}), R;
|
|
917
917
|
}
|
|
@@ -922,9 +922,9 @@ const ft = () => {
|
|
|
922
922
|
}
|
|
923
923
|
});
|
|
924
924
|
}, Zt = () => {
|
|
925
|
-
const e = U(), s = E(), t =
|
|
925
|
+
const e = U(), s = E(), t = D(), r = V(), {
|
|
926
926
|
setTreeData: n
|
|
927
|
-
} =
|
|
927
|
+
} = b(), {
|
|
928
928
|
filters: a,
|
|
929
929
|
trashed: o
|
|
930
930
|
} = t, l = ["context", {
|
|
@@ -932,7 +932,7 @@ const ft = () => {
|
|
|
932
932
|
filters: a,
|
|
933
933
|
trashed: o
|
|
934
934
|
}];
|
|
935
|
-
return
|
|
935
|
+
return v({
|
|
936
936
|
mutationFn: async ({
|
|
937
937
|
name: f,
|
|
938
938
|
parentId: d
|
|
@@ -942,7 +942,7 @@ const ft = () => {
|
|
|
942
942
|
parentId: d
|
|
943
943
|
}),
|
|
944
944
|
onError(f) {
|
|
945
|
-
typeof f == "string" && e.error(
|
|
945
|
+
typeof f == "string" && e.error(S(f));
|
|
946
946
|
},
|
|
947
947
|
onSuccess: async (f, d) => {
|
|
948
948
|
await s.cancelQueries({
|
|
@@ -973,11 +973,11 @@ const ft = () => {
|
|
|
973
973
|
}
|
|
974
974
|
});
|
|
975
975
|
}, es = () => {
|
|
976
|
-
const e = U(), s = E(), t =
|
|
976
|
+
const e = U(), s = E(), t = D(), r = V(), {
|
|
977
977
|
setFolderIds: n,
|
|
978
978
|
setSelectedFolders: a,
|
|
979
979
|
setTreeData: o
|
|
980
|
-
} =
|
|
980
|
+
} = b(), {
|
|
981
981
|
filters: l,
|
|
982
982
|
trashed: f
|
|
983
983
|
} = t, d = ["context", {
|
|
@@ -985,7 +985,7 @@ const ft = () => {
|
|
|
985
985
|
filters: l,
|
|
986
986
|
trashed: f
|
|
987
987
|
}];
|
|
988
|
-
return
|
|
988
|
+
return v({
|
|
989
989
|
mutationFn: async ({
|
|
990
990
|
folderId: u,
|
|
991
991
|
name: h,
|
|
@@ -997,7 +997,7 @@ const ft = () => {
|
|
|
997
997
|
name: h
|
|
998
998
|
}),
|
|
999
999
|
onError(u) {
|
|
1000
|
-
typeof u == "string" && e.error(
|
|
1000
|
+
typeof u == "string" && e.error(S(u));
|
|
1001
1001
|
},
|
|
1002
1002
|
onSuccess: async (u, h) => {
|
|
1003
1003
|
if (await s.cancelQueries({
|
|
@@ -1028,10 +1028,10 @@ const ft = () => {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
});
|
|
1030
1030
|
}, ts = (e) => {
|
|
1031
|
-
const s = E(), t =
|
|
1031
|
+
const s = E(), t = D(), {
|
|
1032
1032
|
setResourceIds: r,
|
|
1033
1033
|
setSelectedResources: n
|
|
1034
|
-
} =
|
|
1034
|
+
} = b(), {
|
|
1035
1035
|
filters: a,
|
|
1036
1036
|
trashed: o
|
|
1037
1037
|
} = t, l = ["context", {
|
|
@@ -1072,7 +1072,7 @@ const ft = () => {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
});
|
|
1074
1074
|
}, ss = (e) => {
|
|
1075
|
-
const s = E(), t =
|
|
1075
|
+
const s = E(), t = D(), {
|
|
1076
1076
|
filters: r,
|
|
1077
1077
|
trashed: n
|
|
1078
1078
|
} = t, a = ["context", {
|
|
@@ -1124,7 +1124,7 @@ const ft = () => {
|
|
|
1124
1124
|
});
|
|
1125
1125
|
};
|
|
1126
1126
|
const rs = () => {
|
|
1127
|
-
const e = U(), s = E(), t =
|
|
1127
|
+
const e = U(), s = E(), t = D(), {
|
|
1128
1128
|
user: r
|
|
1129
1129
|
} = le(), {
|
|
1130
1130
|
appCode: n
|
|
@@ -1133,13 +1133,13 @@ const rs = () => {
|
|
|
1133
1133
|
filters: t.filters,
|
|
1134
1134
|
trashed: t.trashed
|
|
1135
1135
|
}];
|
|
1136
|
-
return
|
|
1136
|
+
return v({
|
|
1137
1137
|
mutationFn: async (o) => await Je({
|
|
1138
1138
|
searchParams: t,
|
|
1139
1139
|
params: o
|
|
1140
1140
|
}),
|
|
1141
1141
|
onError(o) {
|
|
1142
|
-
typeof o == "string" && e.error(
|
|
1142
|
+
typeof o == "string" && e.error(S(o));
|
|
1143
1143
|
},
|
|
1144
1144
|
onSuccess: async (o, l) => {
|
|
1145
1145
|
var h, i, p;
|
|
@@ -1179,7 +1179,7 @@ const rs = () => {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
});
|
|
1181
1181
|
}, pt = /* @__PURE__ */ F(async () => await import("./EmptyScreenApp.js")), mt = /* @__PURE__ */ F(async () => await import("./EmptyScreenSearch.js")), gt = /* @__PURE__ */ F(async () => await import("./EmptyScreenError.js")), yt = /* @__PURE__ */ F(async () => await import("./EmptyScreenNoContentInFolder.js")), It = /* @__PURE__ */ F(async () => await import("./EmptyScreenTrash.js")), wt = /* @__PURE__ */ F(async () => await import("./FoldersList.js")), St = /* @__PURE__ */ F(async () => await import("./ResourcesList.js")), xt = () => {
|
|
1182
|
-
const e = st(), s = ne(), t = rt(), r =
|
|
1182
|
+
const e = st(), s = ne(), t = rt(), r = D(), n = H(), a = V(), o = U(), {
|
|
1183
1183
|
appCode: l
|
|
1184
1184
|
} = K(), {
|
|
1185
1185
|
t: f
|
|
@@ -1187,33 +1187,33 @@ const rs = () => {
|
|
|
1187
1187
|
setSearchParams: d,
|
|
1188
1188
|
setSearchConfig: u,
|
|
1189
1189
|
setTreeData: h
|
|
1190
|
-
} =
|
|
1190
|
+
} = b(), {
|
|
1191
1191
|
data: i,
|
|
1192
1192
|
isError: p,
|
|
1193
1193
|
error: m,
|
|
1194
1194
|
isLoading: y,
|
|
1195
1195
|
isFetching: g,
|
|
1196
1196
|
fetchNextPage: I
|
|
1197
|
-
} = ht(), C = (i == null ? void 0 : i.pages[0].folders.length) === 0, Q = (i == null ? void 0 : i.pages[0].resources.length) === 0,
|
|
1197
|
+
} = ht(), C = (i == null ? void 0 : i.pages[0].folders.length) === 0, Q = (i == null ? void 0 : i.pages[0].resources.length) === 0, k = C && Q;
|
|
1198
1198
|
return M(() => {
|
|
1199
1199
|
var B, R, P;
|
|
1200
1200
|
if (i) {
|
|
1201
1201
|
const O = [...((B = i == null ? void 0 : i.pages[0]) == null ? void 0 : B.folders) ?? []];
|
|
1202
1202
|
(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" ? h({
|
|
1203
|
-
id:
|
|
1203
|
+
id: T.DEFAULT,
|
|
1204
1204
|
section: !0,
|
|
1205
1205
|
children: O.map((_) => new G(_)),
|
|
1206
1206
|
name: f("explorer.filters.mine", {
|
|
1207
1207
|
ns: l
|
|
1208
1208
|
})
|
|
1209
|
-
}) : h(pe(a, O, r.filters.folder ||
|
|
1209
|
+
}) : h(pe(a, O, r.filters.folder || T.DEFAULT))), d({
|
|
1210
1210
|
...r,
|
|
1211
1211
|
pagination: (P = i == null ? void 0 : i.pages[(i == null ? void 0 : i.pages.length) - 1]) == null ? void 0 : P.pagination
|
|
1212
1212
|
});
|
|
1213
1213
|
}
|
|
1214
1214
|
}, [i]), M(() => {
|
|
1215
1215
|
m && typeof m == "string" && o.error(f(m));
|
|
1216
|
-
}, [m]), y ? /* @__PURE__ */ c(A, {}) : p ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(gt, {}) }) : r.search &&
|
|
1216
|
+
}, [m]), y ? /* @__PURE__ */ c(A, {}) : p ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(gt, {}) }) : r.search && k ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(mt, {}) }) : e && k ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(pt, {}) }) : t && k && !s ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(yt, {}) }) : s && (i == null ? void 0 : i.pages[0].resources.length) === 0 ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(It, {}) }) : /* @__PURE__ */ N(q, { fallback: /* @__PURE__ */ c(A, {}), children: [
|
|
1217
1217
|
/* @__PURE__ */ c(wt, { data: i, isFetching: g }),
|
|
1218
1218
|
/* @__PURE__ */ c(St, { data: i, isFetching: g, fetchNextPage: I })
|
|
1219
1219
|
] });
|
|
@@ -1229,9 +1229,9 @@ const rs = () => {
|
|
|
1229
1229
|
return;
|
|
1230
1230
|
}
|
|
1231
1231
|
n(u);
|
|
1232
|
-
}, o = H(), l =
|
|
1232
|
+
}, o = H(), l = D(), {
|
|
1233
1233
|
setSearchParams: f
|
|
1234
|
-
} =
|
|
1234
|
+
} = b();
|
|
1235
1235
|
M(() => {
|
|
1236
1236
|
const u = () => r.includes("1") ? !0 : void 0, h = () => r.includes("2") ? !0 : void 0, i = () => r.includes("7") ? !0 : void 0;
|
|
1237
1237
|
f({
|
|
@@ -1339,24 +1339,24 @@ const rs = () => {
|
|
|
1339
1339
|
foldTreeItem: h,
|
|
1340
1340
|
clearSelectedItems: i,
|
|
1341
1341
|
clearSelectedIds: p
|
|
1342
|
-
} =
|
|
1342
|
+
} = b(), m = async (g) => {
|
|
1343
1343
|
await u(g, e);
|
|
1344
1344
|
}, y = () => {
|
|
1345
1345
|
i(), p(), t();
|
|
1346
1346
|
};
|
|
1347
1347
|
return /* @__PURE__ */ N(ce, { children: [
|
|
1348
1348
|
/* @__PURE__ */ c(Re, { data: r, selectedNodesIds: a, onTreeItemSelect: d, onTreeItemFold: h, onTreeItemUnfold: m }),
|
|
1349
|
-
/* @__PURE__ */ c(Tt, { id:
|
|
1350
|
-
/* @__PURE__ */ c("div", { className: "d-grid my-16", children: /* @__PURE__ */ c(Pe, { disabled: n, type: "button", color: "primary", variant: "outline", leftIcon: /* @__PURE__ */ c(
|
|
1349
|
+
/* @__PURE__ */ c(Tt, { id: T.BIN, selected: n, onSelect: f }),
|
|
1350
|
+
/* @__PURE__ */ c("div", { className: "d-grid my-16", children: /* @__PURE__ */ c(Pe, { disabled: n, type: "button", color: "primary", variant: "outline", leftIcon: /* @__PURE__ */ c(ke, {}), onClick: y, children: l("explorer.folder.new") }) }),
|
|
1351
1351
|
/* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: s && /* @__PURE__ */ c(Ft, { edit: !1, isOpen: s, onSuccess: t, onCancel: t }) })
|
|
1352
1352
|
] });
|
|
1353
1353
|
}, Nt = /* @__PURE__ */ F(async () => await import("./AppAction.js")), Rt = /* @__PURE__ */ F(async () => await import("./Library.js")), Pt = /* @__PURE__ */ F(async () => await import("./ActionBarContainer.js")), At = /* @__PURE__ */ F(async () => await import("./DisableModal.js")), Et = /* @__PURE__ */ F(async () => await import("./TrashModal.js")), Qt = /* @__PURE__ */ F(async () => await import("./OnboardingModal.js")), ns = ({
|
|
1354
1354
|
config: e
|
|
1355
1355
|
}) => {
|
|
1356
|
-
const s =
|
|
1356
|
+
const s = D(), {
|
|
1357
1357
|
setConfig: t,
|
|
1358
1358
|
setSearchParams: r
|
|
1359
|
-
} =
|
|
1359
|
+
} = b();
|
|
1360
1360
|
M(() => {
|
|
1361
1361
|
t(e || {}), r({
|
|
1362
1362
|
...s,
|
|
@@ -1414,14 +1414,14 @@ const rs = () => {
|
|
|
1414
1414
|
] })
|
|
1415
1415
|
] })
|
|
1416
1416
|
] });
|
|
1417
|
-
},
|
|
1417
|
+
}, L = document.querySelector("[data-explorer-config]");
|
|
1418
1418
|
let ae;
|
|
1419
1419
|
function os() {
|
|
1420
1420
|
var e;
|
|
1421
|
-
if ((e =
|
|
1421
|
+
if ((e = L == null ? void 0 : L.dataset) != null && e.explorerConfig) {
|
|
1422
1422
|
const {
|
|
1423
1423
|
explorerConfig: s
|
|
1424
|
-
} =
|
|
1424
|
+
} = L.dataset;
|
|
1425
1425
|
try {
|
|
1426
1426
|
const t = JSON.parse(s);
|
|
1427
1427
|
ae = {
|
|
@@ -1429,7 +1429,7 @@ function os() {
|
|
|
1429
1429
|
enableOnboarding: t.enableOnboarding !== void 0 ? t.enableOnboarding : !0
|
|
1430
1430
|
};
|
|
1431
1431
|
} catch (t) {
|
|
1432
|
-
console.error("[Explorer Config] could not parse app params from root data attributes:",
|
|
1432
|
+
console.error("[Explorer Config] could not parse app params from root data attributes:", L == null ? void 0 : L.dataset, t);
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
1435
|
return ae;
|
|
@@ -1439,7 +1439,7 @@ export {
|
|
|
1439
1439
|
ft as a,
|
|
1440
1440
|
H as b,
|
|
1441
1441
|
rs as c,
|
|
1442
|
-
|
|
1442
|
+
D as d,
|
|
1443
1443
|
ne as e,
|
|
1444
1444
|
w as f,
|
|
1445
1445
|
$t as g,
|
|
@@ -1456,7 +1456,7 @@ export {
|
|
|
1456
1456
|
ss as r,
|
|
1457
1457
|
Zt as s,
|
|
1458
1458
|
es as t,
|
|
1459
|
-
|
|
1459
|
+
b as u,
|
|
1460
1460
|
Gt as v,
|
|
1461
1461
|
Wt as w,
|
|
1462
1462
|
Yt as x,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ode-explorer",
|
|
3
|
-
"version": "1.4.2-develop
|
|
3
|
+
"version": "1.4.2-develop.202403201822",
|
|
4
4
|
"description": "Edifice Explorer",
|
|
5
5
|
"homepage": "https://github.com/edificeio/explorer#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@edifice-ui/icons": "develop
|
|
40
|
-
"@edifice-ui/react": "develop
|
|
39
|
+
"@edifice-ui/icons": "develop",
|
|
40
|
+
"@edifice-ui/react": "develop",
|
|
41
41
|
"@react-spring/web": "9.7.3",
|
|
42
42
|
"@tanstack/react-query": "5.8.4",
|
|
43
43
|
"clsx": "2.1.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@vitejs/plugin-react-swc": "3.5.0",
|
|
66
66
|
"concurrently": "8.2.2",
|
|
67
67
|
"csstype": "3.1.3",
|
|
68
|
-
"edifice-bootstrap": "develop
|
|
69
|
-
"edifice-ts-client": "develop
|
|
68
|
+
"edifice-bootstrap": "develop",
|
|
69
|
+
"edifice-ts-client": "develop",
|
|
70
70
|
"eslint": "8.56.0",
|
|
71
71
|
"eslint-config-prettier": "9.1.0",
|
|
72
72
|
"eslint-plugin-import": "2.29.1",
|