ode-explorer 1.4.9 → 1.4.11-develop.202406111044
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 +12 -18
- package/dist/index.js +547 -2833
- 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 +1 -1
- package/lib/MoveModal.js +6 -6
- package/lib/ResourcesList.js +70 -206
- 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/index2.js +250 -249
- package/package.json +7 -21
- package/lib/config/index.d.ts +0 -3
package/dist/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ode-explorer=1.0-b2school-SNAPSHOT
|
|
1
|
+
ode-explorer=1.0-b2school-SNAPSHOT 11/06/2024 10:44:36
|
|
@@ -1,280 +1,277 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useUser as
|
|
4
|
-
import { useTransition as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { odeServices as
|
|
7
|
-
import { e as
|
|
1
|
+
import { jsx as a, Fragment as G, jsxs as Q } from "react/jsx-runtime";
|
|
2
|
+
import { useState as L, useEffect as Z, Suspense as de, lazy as y } from "react";
|
|
3
|
+
import { useUser as pe, Button as W, useOdeClient as he, ActionBar as fe, LoadingScreen as me, isActionAvailable as Re, BlogPublic as Se, ShareModal as Ee, ShareBlog as Ce } from "@edifice-ui/react";
|
|
4
|
+
import { useTransition as Oe, animated as ye } from "@react-spring/web";
|
|
5
|
+
import { useTranslation as ee } from "react-i18next";
|
|
6
|
+
import { odeServices as D, ACTION as c } from "edifice-ts-client";
|
|
7
|
+
import { e as X, f as be, b as ve, h as Ae, i as se, j as Ie, k as Me, l as ge, m as Pe, d as we, n as xe, u as te, a as Fe, o as Te, p as Be, q as De } from "./index2.js";
|
|
8
8
|
import "@edifice-ui/icons";
|
|
9
9
|
import "i18next";
|
|
10
10
|
import "zustand";
|
|
11
11
|
import "@tanstack/react-query";
|
|
12
12
|
function Le({
|
|
13
13
|
roles: n,
|
|
14
|
-
rights:
|
|
15
|
-
action:
|
|
14
|
+
rights: o,
|
|
15
|
+
action: s
|
|
16
16
|
}) {
|
|
17
|
-
const [
|
|
18
|
-
user:
|
|
19
|
-
} =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, [n,
|
|
17
|
+
const [d, t] = L(!1), {
|
|
18
|
+
user: S
|
|
19
|
+
} = pe(), h = X();
|
|
20
|
+
Z(() => {
|
|
21
|
+
f();
|
|
22
|
+
}, [n, o]);
|
|
23
23
|
const R = async function(l) {
|
|
24
24
|
const r = l instanceof Array ? l : [l];
|
|
25
25
|
if (n instanceof Array) {
|
|
26
|
-
const m = await
|
|
27
|
-
|
|
26
|
+
const m = await D.rights().sessionHasAtLeastOneResourceRight(n, r);
|
|
27
|
+
t(m);
|
|
28
28
|
} else {
|
|
29
|
-
const m = await
|
|
30
|
-
|
|
29
|
+
const m = await D.rights().sessionHasResourceRight(n, r);
|
|
30
|
+
t(m);
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, p = async function(l) {
|
|
33
33
|
if (n instanceof Array) {
|
|
34
|
-
const r = await
|
|
35
|
-
|
|
34
|
+
const r = await D.rights().sessionHasAtLeastOneResourceRightForEachList(n, l);
|
|
35
|
+
t(r);
|
|
36
36
|
} else {
|
|
37
|
-
const r = await
|
|
38
|
-
|
|
37
|
+
const r = await D.rights().sessionHasResourceRightForEachList(n, l);
|
|
38
|
+
t(r);
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, f = async function() {
|
|
41
41
|
var l, r, m;
|
|
42
42
|
if (n === void 0) {
|
|
43
|
-
|
|
43
|
+
t(!0);
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
if (
|
|
47
|
-
|
|
46
|
+
if (h && ((r = (l = o[0]) == null ? void 0 : l.trashedBy) != null && r.includes(S == null ? void 0 : S.userId)) && s === "restore" && !((m = o[0]) != null && m.trashed)) {
|
|
47
|
+
t(!0);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
if (
|
|
51
|
-
if (
|
|
52
|
-
if (typeof
|
|
53
|
-
await R(
|
|
50
|
+
if (o instanceof Array)
|
|
51
|
+
if (o.length > 0)
|
|
52
|
+
if (typeof o[0] == "string")
|
|
53
|
+
await R(o);
|
|
54
54
|
else {
|
|
55
|
-
const b =
|
|
56
|
-
await
|
|
55
|
+
const b = o.map((v) => v.rights);
|
|
56
|
+
await p(b);
|
|
57
57
|
}
|
|
58
58
|
else
|
|
59
|
-
|
|
59
|
+
t(!1);
|
|
60
60
|
else
|
|
61
|
-
typeof
|
|
61
|
+
typeof o == "string" ? await R(o) : await R(o.rights);
|
|
62
62
|
};
|
|
63
63
|
return {
|
|
64
|
-
visible:
|
|
65
|
-
refreshState:
|
|
64
|
+
visible: d,
|
|
65
|
+
refreshState: f
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
const [n,
|
|
70
|
-
openResource:
|
|
71
|
-
printSelectedResource:
|
|
72
|
-
openFolder:
|
|
73
|
-
clearSelectedItems:
|
|
74
|
-
clearSelectedIds:
|
|
75
|
-
} =
|
|
76
|
-
data:
|
|
68
|
+
function oe() {
|
|
69
|
+
const [n, o] = L(!1), [s, d] = L("void"), [t, S] = L(), h = be((e) => e.config), R = ve(), p = Ae(), f = se(), l = Ie(), r = Me(), m = X(), b = ge(), v = Pe(), g = we(), _ = xe(), {
|
|
70
|
+
openResource: N,
|
|
71
|
+
printSelectedResource: P,
|
|
72
|
+
openFolder: k,
|
|
73
|
+
clearSelectedItems: w,
|
|
74
|
+
clearSelectedIds: x
|
|
75
|
+
} = te(), {
|
|
76
|
+
data: H
|
|
77
77
|
} = Fe();
|
|
78
|
-
|
|
79
|
-
if (
|
|
80
|
-
|
|
78
|
+
Z(() => {
|
|
79
|
+
if (p.length === 0 && r.length === 0) {
|
|
80
|
+
o(!1);
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
83
|
+
if (v) {
|
|
84
|
+
o(!1);
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
async function
|
|
90
|
-
var
|
|
91
|
-
switch ((
|
|
92
|
-
case
|
|
93
|
-
return
|
|
87
|
+
o(!0);
|
|
88
|
+
}, [p, r]);
|
|
89
|
+
async function U(e) {
|
|
90
|
+
var B;
|
|
91
|
+
switch ((B = document.getElementById("root")) == null || B.setAttribute("aria-hidden", "true"), S(e), e.id) {
|
|
92
|
+
case c.OPEN:
|
|
93
|
+
return p.length > 0 ? N(f[0]) : k({
|
|
94
94
|
folder: l[0],
|
|
95
95
|
folderId: l[0].id
|
|
96
96
|
});
|
|
97
|
-
case
|
|
98
|
-
return
|
|
99
|
-
case
|
|
100
|
-
return
|
|
101
|
-
case
|
|
102
|
-
return
|
|
103
|
-
case
|
|
104
|
-
return
|
|
105
|
-
case
|
|
106
|
-
return await
|
|
107
|
-
case
|
|
108
|
-
return
|
|
109
|
-
case
|
|
97
|
+
case c.COPY:
|
|
98
|
+
return ie();
|
|
99
|
+
case c.MOVE:
|
|
100
|
+
return d("move");
|
|
101
|
+
case c.PRINT:
|
|
102
|
+
return P();
|
|
103
|
+
case c.DELETE:
|
|
104
|
+
return d("delete");
|
|
105
|
+
case c.RESTORE:
|
|
106
|
+
return await F();
|
|
107
|
+
case c.PUBLISH:
|
|
108
|
+
return d("publish");
|
|
109
|
+
case c.UPD_PROPS:
|
|
110
110
|
case "edit":
|
|
111
|
-
return
|
|
112
|
-
case
|
|
113
|
-
return
|
|
114
|
-
case
|
|
115
|
-
return
|
|
111
|
+
return le();
|
|
112
|
+
case c.SHARE:
|
|
113
|
+
return d("share");
|
|
114
|
+
case c.EXPORT:
|
|
115
|
+
return d("export");
|
|
116
116
|
default:
|
|
117
117
|
throw Error(`Unknown action: ${e.id}`);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
const
|
|
120
|
+
function Y(e) {
|
|
121
|
+
const B = p.length + r.length, C = p.length === 1 || r.length === 1, K = B === 1, O = r.length === 0;
|
|
122
122
|
switch (e.id) {
|
|
123
|
-
case
|
|
124
|
-
return
|
|
125
|
-
case
|
|
126
|
-
return
|
|
127
|
-
case
|
|
128
|
-
return
|
|
129
|
-
case
|
|
130
|
-
return
|
|
131
|
-
case
|
|
132
|
-
return
|
|
133
|
-
case
|
|
134
|
-
return O &&
|
|
123
|
+
case c.OPEN:
|
|
124
|
+
return K;
|
|
125
|
+
case c.MANAGE:
|
|
126
|
+
return C;
|
|
127
|
+
case c.COPY:
|
|
128
|
+
return C && O;
|
|
129
|
+
case c.PUBLISH:
|
|
130
|
+
return C && O;
|
|
131
|
+
case c.UPD_PROPS:
|
|
132
|
+
return C && O;
|
|
133
|
+
case c.SHARE:
|
|
134
|
+
return O && C;
|
|
135
135
|
case "export":
|
|
136
|
-
return
|
|
137
|
-
case
|
|
138
|
-
return
|
|
136
|
+
return C && O;
|
|
137
|
+
case c.PRINT:
|
|
138
|
+
return C && O;
|
|
139
139
|
case "edit":
|
|
140
|
-
return
|
|
140
|
+
return K;
|
|
141
141
|
default:
|
|
142
142
|
return !0;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
const
|
|
146
|
-
async function
|
|
145
|
+
const j = () => !0;
|
|
146
|
+
async function F() {
|
|
147
147
|
try {
|
|
148
148
|
if (m)
|
|
149
149
|
await b.mutate();
|
|
150
150
|
else
|
|
151
151
|
throw new Error("Cannot restore untrashed resources");
|
|
152
|
-
|
|
152
|
+
A();
|
|
153
153
|
} catch (e) {
|
|
154
154
|
console.error(e);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function A() {
|
|
158
158
|
var e;
|
|
159
|
-
|
|
159
|
+
d("void"), t != null && t.id && ((e = document.getElementById(t == null ? void 0 : t.id)) == null || e.focus());
|
|
160
160
|
}
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
async function
|
|
165
|
-
if (
|
|
166
|
-
const e =
|
|
167
|
-
await
|
|
161
|
+
const i = (e) => () => {
|
|
162
|
+
s === e && (A(), w(), x());
|
|
163
|
+
}, J = i("move"), E = i("move"), z = i("delete"), T = i("delete"), V = i("publish"), I = i("publish"), M = i("edit_folder"), u = i("edit_folder"), $ = i("edit_resource"), q = i("edit_resource"), ne = i("share"), re = i("share"), ce = i("export"), ae = i("export");
|
|
164
|
+
async function ie() {
|
|
165
|
+
if (f && f.length > 0) {
|
|
166
|
+
const e = f[0];
|
|
167
|
+
await _.mutate(e), w(), x();
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
if (
|
|
172
|
-
const e =
|
|
173
|
-
(
|
|
174
|
-
searchParams:
|
|
170
|
+
function le() {
|
|
171
|
+
if (p && p.length > 0) {
|
|
172
|
+
const e = f[0].assetId;
|
|
173
|
+
(h == null ? void 0 : h.app) == "scrapbook" ? Te({
|
|
174
|
+
searchParams: g,
|
|
175
175
|
assetId: e
|
|
176
|
-
}) :
|
|
176
|
+
}) : d("edit_resource");
|
|
177
177
|
} else
|
|
178
|
-
|
|
178
|
+
d("edit_folder");
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
if (c && c.length > 0) {
|
|
182
|
-
const e = d[0].assetId;
|
|
183
|
-
Be({
|
|
184
|
-
searchParams: I,
|
|
185
|
-
assetId: e
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
function le(e) {
|
|
180
|
+
function ue(e) {
|
|
190
181
|
return e.id === "edit" && r.length > 0 ? "explorer.rename" : `explorer.actions.${e.id}`;
|
|
191
182
|
}
|
|
192
183
|
return {
|
|
193
|
-
onRestore:
|
|
194
|
-
actions: m ?
|
|
195
|
-
selectedElement: [...
|
|
184
|
+
onRestore: F,
|
|
185
|
+
actions: m ? h == null ? void 0 : h.trashActions : H,
|
|
186
|
+
selectedElement: [...f, ...l],
|
|
196
187
|
currentFolderId: R == null ? void 0 : R.id,
|
|
197
|
-
overrideLabel:
|
|
198
|
-
handleClick:
|
|
199
|
-
isActivable: m ?
|
|
188
|
+
overrideLabel: ue,
|
|
189
|
+
handleClick: U,
|
|
190
|
+
isActivable: m ? j : Y,
|
|
200
191
|
isActionBarOpen: n,
|
|
201
|
-
isMoveModalOpen:
|
|
202
|
-
onMoveCancel:
|
|
203
|
-
onMoveSuccess:
|
|
204
|
-
isDeleteModalOpen:
|
|
205
|
-
onDeleteCancel:
|
|
206
|
-
onDeleteSuccess:
|
|
207
|
-
isPublishModalOpen:
|
|
208
|
-
onPublishCancel:
|
|
209
|
-
onPublishSuccess:
|
|
210
|
-
isEditFolderOpen:
|
|
211
|
-
onEditFolderCancel:
|
|
212
|
-
onEditFolderSuccess:
|
|
213
|
-
isEditResourceOpen:
|
|
214
|
-
onEditResourceCancel:
|
|
215
|
-
onEditResourceSuccess:
|
|
216
|
-
isShareResourceOpen:
|
|
192
|
+
isMoveModalOpen: s === "move",
|
|
193
|
+
onMoveCancel: J,
|
|
194
|
+
onMoveSuccess: E,
|
|
195
|
+
isDeleteModalOpen: s === "delete",
|
|
196
|
+
onDeleteCancel: T,
|
|
197
|
+
onDeleteSuccess: z,
|
|
198
|
+
isPublishModalOpen: s === "publish",
|
|
199
|
+
onPublishCancel: I,
|
|
200
|
+
onPublishSuccess: V,
|
|
201
|
+
isEditFolderOpen: s === "edit_folder",
|
|
202
|
+
onEditFolderCancel: u,
|
|
203
|
+
onEditFolderSuccess: M,
|
|
204
|
+
isEditResourceOpen: s === "edit_resource",
|
|
205
|
+
onEditResourceCancel: q,
|
|
206
|
+
onEditResourceSuccess: $,
|
|
207
|
+
isShareResourceOpen: s === "share",
|
|
217
208
|
onShareResourceCancel: re,
|
|
218
209
|
onShareResourceSuccess: ne,
|
|
219
|
-
|
|
210
|
+
isExportModalOpen: s === "export",
|
|
211
|
+
onExportCancel: ce,
|
|
212
|
+
onExportSuccess: ae,
|
|
213
|
+
onClearActionBar: A
|
|
220
214
|
};
|
|
221
215
|
}
|
|
222
216
|
function _e({
|
|
223
217
|
resourceRights: n,
|
|
224
|
-
roleExpected:
|
|
225
|
-
action:
|
|
226
|
-
children:
|
|
227
|
-
renderWhenForbidden:
|
|
218
|
+
roleExpected: o,
|
|
219
|
+
action: s,
|
|
220
|
+
children: d,
|
|
221
|
+
renderWhenForbidden: t
|
|
228
222
|
}) {
|
|
229
223
|
const {
|
|
230
|
-
t:
|
|
231
|
-
} = X(), {
|
|
232
|
-
overrideLabel: f
|
|
224
|
+
t: S
|
|
233
225
|
} = ee(), {
|
|
226
|
+
overrideLabel: h
|
|
227
|
+
} = oe(), {
|
|
234
228
|
visible: R
|
|
235
229
|
} = Le({
|
|
236
|
-
roles:
|
|
230
|
+
roles: o,
|
|
237
231
|
rights: n,
|
|
238
|
-
action:
|
|
232
|
+
action: s == null ? void 0 : s.id
|
|
239
233
|
}), {
|
|
240
|
-
setResourceActionDisable:
|
|
241
|
-
} =
|
|
242
|
-
return R ? /* @__PURE__ */
|
|
243
|
-
|
|
244
|
-
}, children:
|
|
234
|
+
setResourceActionDisable: p
|
|
235
|
+
} = te(), f = X();
|
|
236
|
+
return R ? /* @__PURE__ */ a(G, { children: d }) : t ? t() : f && !R ? /* @__PURE__ */ a(W, { type: "button", color: "primary", variant: "filled", onClick: () => {
|
|
237
|
+
p(!0);
|
|
238
|
+
}, children: S(h(s)) }) : /* @__PURE__ */ a(G, {});
|
|
245
239
|
}
|
|
246
|
-
const Ne = /* @__PURE__ */
|
|
247
|
-
function
|
|
240
|
+
const Ne = /* @__PURE__ */ y(async () => await import("./PublishModal.js")), ke = /* @__PURE__ */ y(async () => await import("./ResourceModal.js")), He = /* @__PURE__ */ y(async () => await import("./DeleteModal.js")), Ue = /* @__PURE__ */ y(async () => await import("./MoveModal.js")), Ye = /* @__PURE__ */ y(async () => await import("./FolderModal.js")), je = /* @__PURE__ */ y(async () => await import("./ExportModal.js"));
|
|
241
|
+
function es() {
|
|
248
242
|
const {
|
|
249
243
|
appCode: n
|
|
250
|
-
} =
|
|
251
|
-
t
|
|
252
|
-
} =
|
|
253
|
-
actions:
|
|
254
|
-
selectedElement:
|
|
255
|
-
isMoveModalOpen:
|
|
256
|
-
isDeleteModalOpen:
|
|
257
|
-
isPublishModalOpen:
|
|
244
|
+
} = he(), {
|
|
245
|
+
t: o
|
|
246
|
+
} = ee(), {
|
|
247
|
+
actions: s,
|
|
248
|
+
selectedElement: d,
|
|
249
|
+
isMoveModalOpen: t,
|
|
250
|
+
isDeleteModalOpen: S,
|
|
251
|
+
isPublishModalOpen: h,
|
|
258
252
|
isActionBarOpen: R,
|
|
259
|
-
isEditFolderOpen:
|
|
260
|
-
overrideLabel:
|
|
253
|
+
isEditFolderOpen: p,
|
|
254
|
+
overrideLabel: f,
|
|
261
255
|
onEditFolderCancel: l,
|
|
262
256
|
onEditFolderSuccess: r,
|
|
263
257
|
isEditResourceOpen: m,
|
|
264
258
|
onEditResourceCancel: b,
|
|
265
|
-
onEditResourceSuccess:
|
|
266
|
-
isShareResourceOpen:
|
|
267
|
-
onShareResourceCancel:
|
|
268
|
-
onShareResourceSuccess:
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
259
|
+
onEditResourceSuccess: v,
|
|
260
|
+
isShareResourceOpen: g,
|
|
261
|
+
onShareResourceCancel: _,
|
|
262
|
+
onShareResourceSuccess: N,
|
|
263
|
+
isExportModalOpen: P,
|
|
264
|
+
onExportCancel: k,
|
|
265
|
+
onExportSuccess: w,
|
|
266
|
+
onMoveCancel: x,
|
|
267
|
+
onMoveSuccess: H,
|
|
268
|
+
onDeleteCancel: U,
|
|
269
|
+
onDeleteSuccess: Y,
|
|
270
|
+
onPublishCancel: j,
|
|
271
|
+
onPublishSuccess: F,
|
|
272
|
+
isActivable: A,
|
|
273
|
+
handleClick: i
|
|
274
|
+
} = oe(), E = se()[0], z = Be(n), T = De(n), V = Oe(R, {
|
|
278
275
|
from: {
|
|
279
276
|
opacity: 0,
|
|
280
277
|
transform: "translateY(100%)"
|
|
@@ -288,20 +285,24 @@ function We() {
|
|
|
288
285
|
transform: "translateY(100%)"
|
|
289
286
|
}
|
|
290
287
|
});
|
|
291
|
-
return /* @__PURE__ */
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
288
|
+
return /* @__PURE__ */ Q(G, { children: [
|
|
289
|
+
V((I, M) => M && /* @__PURE__ */ a(ye.div, { className: "position-fixed bottom-0 start-0 end-0", style: {
|
|
290
|
+
...I,
|
|
291
|
+
zIndex: 4
|
|
292
|
+
}, children: /* @__PURE__ */ a(fe, { children: s == null ? void 0 : s.filter((u) => u.available && u.target === "actionbar").map((u) => A(u) && /* @__PURE__ */ a(_e, { resourceRights: d, roleExpected: u.right, action: u, children: /* @__PURE__ */ a(W, { id: u.id, type: "button", color: "primary", variant: "filled", onClick: () => {
|
|
293
|
+
i(u);
|
|
294
|
+
}, children: o(f(u)) }, u.id) }, u.id)) }) })),
|
|
295
|
+
/* @__PURE__ */ Q(de, { fallback: /* @__PURE__ */ a(me, {}), children: [
|
|
296
|
+
t && /* @__PURE__ */ a(Ue, { isOpen: t, onCancel: x, onSuccess: H }),
|
|
297
|
+
S && /* @__PURE__ */ a(He, { isOpen: S, onCancel: U, onSuccess: Y }),
|
|
298
|
+
h && E && /* @__PURE__ */ a(Ne, { isOpen: h, resourceId: E.assetId, onCancel: j, onSuccess: F }),
|
|
299
|
+
p && /* @__PURE__ */ a(Ye, { edit: !0, isOpen: p, onCancel: l, onSuccess: r }),
|
|
300
|
+
m && E && /* @__PURE__ */ a(ke, { mode: "update", isOpen: m, resourceId: E.assetId, updateResource: T, onCancel: b, onSuccess: v, children: (I, M, u, $, q) => n === "blog" && Re("createPublic", s) && /* @__PURE__ */ a(Se, { appCode: n, isUpdating: M, resource: I, watch: u, setValue: $, register: q }) }),
|
|
301
|
+
g && E && /* @__PURE__ */ a(Ee, { isOpen: g, resourceId: E.assetId, shareResource: z, onCancel: _, onSuccess: N, children: n === "blog" ? /* @__PURE__ */ a(Ce, { resource: E, updateResource: T }) : null }),
|
|
302
|
+
P && E && /* @__PURE__ */ a(je, { isOpen: P, onCancel: k, onSuccess: w })
|
|
302
303
|
] })
|
|
303
304
|
] });
|
|
304
305
|
}
|
|
305
306
|
export {
|
|
306
|
-
|
|
307
|
+
es as default
|
|
307
308
|
};
|
package/lib/DeleteModal.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { Modal as a, Button as d } from "@edifice-ui/react";
|
|
3
3
|
import { createPortal as m } from "react-dom";
|
|
4
4
|
import { useTranslation as p } from "react-i18next";
|
|
5
|
-
import {
|
|
5
|
+
import { t as c, v as h, e as u } from "./index2.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "@edifice-ui/icons";
|
|
8
8
|
import "edifice-ts-client";
|
|
@@ -25,7 +25,7 @@ function f({
|
|
|
25
25
|
onDelete: o
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function j({
|
|
29
29
|
isOpen: t,
|
|
30
30
|
onSuccess: i = () => ({}),
|
|
31
31
|
onCancel: r = () => ({})
|
|
@@ -48,5 +48,5 @@ function F({
|
|
|
48
48
|
] }), document.getElementById("portal"));
|
|
49
49
|
}
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
j as default
|
|
52
52
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useToast as p, Modal as i, Alert as d, Button as a } from "@edifice-ui/react";
|
|
3
|
+
import { createPortal as x } from "react-dom";
|
|
4
|
+
import { useTranslation as c } from "react-i18next";
|
|
5
|
+
import { i as m, d as h, y as u } from "./index2.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "@edifice-ui/icons";
|
|
8
|
+
import "edifice-ts-client";
|
|
9
|
+
import "i18next";
|
|
10
|
+
import "zustand";
|
|
11
|
+
import "@tanstack/react-query";
|
|
12
|
+
const f = (n) => {
|
|
13
|
+
const t = m(), e = h(), s = p(), {
|
|
14
|
+
t: r
|
|
15
|
+
} = c();
|
|
16
|
+
return {
|
|
17
|
+
handleExportClick: () => {
|
|
18
|
+
t.length ? (u({
|
|
19
|
+
searchParams: e,
|
|
20
|
+
assetId: t[0].assetId
|
|
21
|
+
}), n()) : s.error(r("explorer.error.noResourceSelected"));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
function T({
|
|
26
|
+
isOpen: n,
|
|
27
|
+
onSuccess: t,
|
|
28
|
+
onCancel: e
|
|
29
|
+
}) {
|
|
30
|
+
const {
|
|
31
|
+
handleExportClick: s
|
|
32
|
+
} = f(t), {
|
|
33
|
+
t: r
|
|
34
|
+
} = c();
|
|
35
|
+
return /* @__PURE__ */ x(/* @__PURE__ */ l(i, { isOpen: n, onModalClose: e, id: "exportModal", children: [
|
|
36
|
+
/* @__PURE__ */ o(i.Header, { onModalClose: e, children: r("explorer.export.title") }),
|
|
37
|
+
/* @__PURE__ */ l(i.Body, { children: [
|
|
38
|
+
/* @__PURE__ */ l("ul", { children: [
|
|
39
|
+
/* @__PURE__ */ o("li", { children: r("explorer.export.body.info.1") }),
|
|
40
|
+
/* @__PURE__ */ o("li", { children: r("explorer.export.body.info.2") }),
|
|
41
|
+
/* @__PURE__ */ o("li", { children: r("explorer.export.body.info.3") })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ o(d, { type: "warning", children: r("explorer.export.body.warning") })
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ l(i.Footer, { children: [
|
|
46
|
+
/* @__PURE__ */ o(a, { color: "tertiary", onClick: e, type: "button", variant: "ghost", children: r("explorer.cancel") }),
|
|
47
|
+
/* @__PURE__ */ o(a, { color: "primary", onClick: s, type: "button", variant: "filled", children: r("explorer.actions.export") })
|
|
48
|
+
] })
|
|
49
|
+
] }), document.getElementById("portal"));
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
T as default
|
|
53
|
+
};
|