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