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