ode-explorer 1.3.2-dev.202401091744 → 1.3.2-dev.202401101530

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-SNAPSHOT 09/01/2024 17:44:25
1
+ ode-explorer=1.0-SNAPSHOT 10/01/2024 15:31:08
@@ -1,344 +1,254 @@
1
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect, Suspense, lazy } from "react";
3
- import { useUser, Button, ActionBar, LoadingScreen } from "@edifice-ui/react";
4
- import { useTransition, animated } from "@react-spring/web";
5
- import { useTranslation } from "react-i18next";
6
- import { odeServices, ACTION } from "edifice-ts-client";
7
- import { d as useIsTrash, e as useStoreContext, b as useCurrentFolder, f as useResourceIds, g as useSelectedResources, h as useSelectedFolders, i as useFolderIds, j as useRestore, k as useResourceIsTrash, u as useStoreActions, a as useActions, l as useShareResource, m as useUpdateResource } from "./index2.js";
1
+ import { jsx as u, Fragment as j, jsxs as V } from "react/jsx-runtime";
2
+ import { useState as F, useEffect as $, Suspense as ce, lazy as y } from "react";
3
+ import { useUser as ae, Button as G, ActionBar as ie, LoadingScreen as le } from "@edifice-ui/react";
4
+ import { useTransition as ue, animated as de } from "@react-spring/web";
5
+ import { useTranslation as q } from "react-i18next";
6
+ import { odeServices as w, ACTION as l } from "edifice-ts-client";
7
+ import { d as Y, e as fe, b as he, f as pe, g as J, h as me, i as Re, j as Se, k as Ee, u as K, a as Oe, l as ye, m as Ce } from "./index2.js";
8
8
  import "@edifice-ui/icons";
9
9
  import "i18next";
10
10
  import "zustand";
11
11
  import "@tanstack/react-query";
12
- function useAccessControl({
13
- roles,
14
- rights,
15
- action
12
+ function be({
13
+ roles: o,
14
+ rights: e,
15
+ action: r
16
16
  }) {
17
- const [visible, setVisible] = useState(false);
18
- const {
19
- user
20
- } = useUser();
21
- const isTrashFolder = useIsTrash();
22
- useEffect(() => {
23
- refreshState();
24
- }, [roles, rights]);
25
- const checkRights = async function(rights2) {
26
- const safeRight = rights2 instanceof Array ? rights2 : [rights2];
27
- if (roles instanceof Array) {
28
- const can = await odeServices.rights().sessionHasAtLeastOneResourceRight(roles, safeRight);
29
- setVisible(can);
17
+ const [a, s] = F(!1), {
18
+ user: m
19
+ } = ae(), R = Y();
20
+ $(() => {
21
+ S();
22
+ }, [o, e]);
23
+ const d = async function(c) {
24
+ const t = c instanceof Array ? c : [c];
25
+ if (o instanceof Array) {
26
+ const p = await w.rights().sessionHasAtLeastOneResourceRight(o, t);
27
+ s(p);
30
28
  } else {
31
- const can = await odeServices.rights().sessionHasResourceRight(roles, safeRight);
32
- setVisible(can);
29
+ const p = await w.rights().sessionHasResourceRight(o, t);
30
+ s(p);
33
31
  }
34
- };
35
- const checkRightForMultipleResources = async function(rights2) {
36
- if (roles instanceof Array) {
37
- const can = await odeServices.rights().sessionHasAtLeastOneResourceRightForEachList(roles, rights2);
38
- setVisible(can);
32
+ }, f = async function(c) {
33
+ if (o instanceof Array) {
34
+ const t = await w.rights().sessionHasAtLeastOneResourceRightForEachList(o, c);
35
+ s(t);
39
36
  } else {
40
- const can = await odeServices.rights().sessionHasResourceRightForEachList(roles, rights2);
41
- setVisible(can);
37
+ const t = await w.rights().sessionHasResourceRightForEachList(o, c);
38
+ s(t);
42
39
  }
43
- };
44
- const refreshState = async function() {
45
- var _a, _b, _c;
46
- if (roles === void 0) {
47
- setVisible(true);
40
+ }, S = async function() {
41
+ var c, t, p;
42
+ if (o === void 0) {
43
+ s(!0);
48
44
  return;
49
45
  }
50
- if (isTrashFolder && ((_b = (_a = rights[0]) == null ? void 0 : _a.trashedBy) == null ? void 0 : _b.includes(user == null ? void 0 : user.userId)) && action === "restore" && !((_c = rights[0]) == null ? void 0 : _c.trashed)) {
51
- setVisible(true);
46
+ if (R && ((t = (c = e[0]) == null ? void 0 : c.trashedBy) != null && t.includes(m == null ? void 0 : m.userId)) && r === "restore" && !((p = e[0]) != null && p.trashed)) {
47
+ s(!0);
52
48
  return;
53
49
  }
54
- if (rights instanceof Array) {
55
- if (rights.length > 0) {
56
- if (typeof rights[0] === "string") {
57
- await checkRights(rights);
58
- } else {
59
- const rightsArray = rights.map((e) => e.rights);
60
- await checkRightForMultipleResources(rightsArray);
50
+ if (e instanceof Array)
51
+ if (e.length > 0)
52
+ if (typeof e[0] == "string")
53
+ await d(e);
54
+ else {
55
+ const C = e.map((O) => O.rights);
56
+ await f(C);
61
57
  }
62
- } else {
63
- setVisible(false);
64
- }
65
- } else {
66
- if (typeof rights === "string") {
67
- await checkRights(rights);
68
- } else {
69
- await checkRights(rights.rights);
70
- }
71
- }
58
+ else
59
+ s(!1);
60
+ else
61
+ typeof e == "string" ? await d(e) : await d(e.rights);
72
62
  };
73
63
  return {
74
- visible,
75
- refreshState
64
+ visible: a,
65
+ refreshState: S
76
66
  };
77
67
  }
78
- function useActionBar() {
79
- const [isActionBarOpen, setIsActionBarOpen] = useState(false);
80
- const [openedModalName, setOpenedModalName] = useState("void");
81
- const [clickedAction, setClickedAction] = useState();
82
- const config = useStoreContext((state) => state.config);
83
- const currentFolder = useCurrentFolder();
84
- const resourceIds = useResourceIds();
85
- const selectedResources = useSelectedResources();
86
- const selectedFolders = useSelectedFolders();
87
- const folderIds = useFolderIds();
88
- const isTrashFolder = useIsTrash();
89
- const restoreItem = useRestore();
90
- const isTrashResource = useResourceIsTrash();
91
- const {
92
- openResource,
93
- printSelectedResource,
94
- openFolder,
95
- clearSelectedItems,
96
- clearSelectedIds
97
- } = useStoreActions();
98
- const {
99
- data: actions
100
- } = useActions();
101
- useEffect(() => {
102
- if (resourceIds.length === 0 && folderIds.length === 0) {
103
- setIsActionBarOpen(false);
68
+ function Q() {
69
+ const [o, e] = F(!1), [r, a] = F("void"), [s, m] = F(), R = fe((n) => n.config), d = he(), f = pe(), S = J(), c = me(), t = Re(), p = Y(), C = Se(), O = Ee(), {
70
+ openResource: I,
71
+ printSelectedResource: P,
72
+ openFolder: T,
73
+ clearSelectedItems: B,
74
+ clearSelectedIds: D
75
+ } = K(), {
76
+ data: L
77
+ } = Oe();
78
+ $(() => {
79
+ if (f.length === 0 && t.length === 0) {
80
+ e(!1);
104
81
  return;
105
82
  }
106
- if (isTrashResource) {
107
- setIsActionBarOpen(false);
83
+ if (O) {
84
+ e(!1);
108
85
  return;
109
86
  }
110
- setIsActionBarOpen(true);
111
- }, [resourceIds, folderIds]);
112
- async function handleClick(action) {
113
- var _a;
114
- (_a = document.getElementById("root")) == null ? void 0 : _a.setAttribute("aria-hidden", "true");
115
- setClickedAction(action);
116
- switch (action.id) {
117
- case ACTION.OPEN:
118
- if (resourceIds.length > 0) {
119
- return openResource(selectedResources[0]);
120
- } else {
121
- return openFolder({
122
- folder: selectedFolders[0],
123
- folderId: selectedFolders[0].id
124
- });
125
- }
126
- case ACTION.MOVE:
127
- return setOpenedModalName("move");
128
- case ACTION.PRINT:
129
- return printSelectedResource();
130
- case ACTION.DELETE:
131
- return setOpenedModalName("delete");
132
- case ACTION.RESTORE:
133
- return await onRestore();
134
- case ACTION.PUBLISH:
135
- return setOpenedModalName("publish");
136
- case ACTION.UPD_PROPS:
87
+ e(!0);
88
+ }, [f, t]);
89
+ async function _(n) {
90
+ var M;
91
+ switch ((M = document.getElementById("root")) == null || M.setAttribute("aria-hidden", "true"), m(n), n.id) {
92
+ case l.OPEN:
93
+ return f.length > 0 ? I(S[0]) : T({
94
+ folder: c[0],
95
+ folderId: c[0].id
96
+ });
97
+ case l.MOVE:
98
+ return a("move");
99
+ case l.PRINT:
100
+ return P();
101
+ case l.DELETE:
102
+ return a("delete");
103
+ case l.RESTORE:
104
+ return await v();
105
+ case l.PUBLISH:
106
+ return a("publish");
107
+ case l.UPD_PROPS:
137
108
  case "edit":
138
- return onEdit();
139
- case ACTION.SHARE:
140
- return setOpenedModalName("share");
109
+ return ne();
110
+ case l.SHARE:
111
+ return a("share");
141
112
  default:
142
- throw Error(`Unknown action: ${action.id}`);
113
+ throw Error(`Unknown action: ${n.id}`);
143
114
  }
144
115
  }
145
- function isActivable(action) {
146
- const all = resourceIds.length + folderIds.length;
147
- const onlyOneItemSelected = resourceIds.length === 1 || folderIds.length === 1;
148
- const onlyOneSelected = all === 1;
149
- const noFolderSelected = folderIds.length === 0;
150
- switch (action.id) {
151
- case ACTION.OPEN:
152
- return onlyOneSelected;
153
- case ACTION.MANAGE:
154
- return onlyOneItemSelected;
155
- case ACTION.PUBLISH:
156
- return onlyOneItemSelected && noFolderSelected;
157
- case ACTION.UPD_PROPS:
158
- return onlyOneItemSelected && noFolderSelected;
159
- case ACTION.SHARE:
160
- return noFolderSelected && onlyOneItemSelected;
161
- case ACTION.PRINT:
162
- return onlyOneItemSelected && noFolderSelected;
116
+ function N(n) {
117
+ const M = f.length + t.length, b = f.length === 1 || t.length === 1, z = M === 1, g = t.length === 0;
118
+ switch (n.id) {
119
+ case l.OPEN:
120
+ return z;
121
+ case l.MANAGE:
122
+ return b;
123
+ case l.PUBLISH:
124
+ return b && g;
125
+ case l.UPD_PROPS:
126
+ return b && g;
127
+ case l.SHARE:
128
+ return g && b;
129
+ case l.PRINT:
130
+ return b && g;
163
131
  case "edit":
164
- return onlyOneSelected;
132
+ return z;
165
133
  default:
166
- return true;
134
+ return !0;
167
135
  }
168
136
  }
169
- const isActivableForTrash = () => true;
170
- async function onRestore() {
137
+ const x = () => !0;
138
+ async function v() {
171
139
  try {
172
- if (isTrashFolder) {
173
- await restoreItem.mutate();
174
- } else {
140
+ if (p)
141
+ await C.mutate();
142
+ else
175
143
  throw new Error("Cannot restore untrashed resources");
176
- }
177
- onClearActionBar();
178
- } catch (e) {
179
- console.error(e);
144
+ E();
145
+ } catch (n) {
146
+ console.error(n);
180
147
  }
181
148
  }
182
- function onClearActionBar() {
183
- var _a;
184
- setOpenedModalName("void");
185
- if (clickedAction == null ? void 0 : clickedAction.id) {
186
- (_a = document.getElementById(clickedAction == null ? void 0 : clickedAction.id)) == null ? void 0 : _a.focus();
187
- }
149
+ function E() {
150
+ var n;
151
+ a("void"), s != null && s.id && ((n = document.getElementById(s == null ? void 0 : s.id)) == null || n.focus());
188
152
  }
189
- const onFinish = (modalName) => () => {
190
- if (openedModalName === modalName) {
191
- onClearActionBar();
192
- clearSelectedItems();
193
- clearSelectedIds();
194
- }
195
- };
196
- const onMoveCancel = onFinish("move");
197
- const onMoveSuccess = onFinish("move");
198
- const onDeleteSuccess = onFinish("delete");
199
- const onDeleteCancel = onFinish("delete");
200
- const onPublishSuccess = onFinish("publish");
201
- const onPublishCancel = onFinish("publish");
202
- const onEditFolderSuccess = onFinish("edit_folder");
203
- const onEditFolderCancel = onFinish("edit_folder");
204
- const onEditResourceSuccess = onFinish("edit_resource");
205
- const onEditResourceCancel = onFinish("edit_resource");
206
- const onShareResourceSuccess = onFinish("share");
207
- const onShareResourceCancel = onFinish("share");
208
- function onEdit() {
209
- if (resourceIds && resourceIds.length > 0) {
210
- setOpenedModalName("edit_resource");
211
- } else {
212
- setOpenedModalName("edit_folder");
213
- }
153
+ const i = (n) => () => {
154
+ r === n && (E(), B(), D());
155
+ }, A = i("move"), H = i("move"), U = i("delete"), k = i("delete"), h = i("publish"), X = i("publish"), Z = i("edit_folder"), W = i("edit_folder"), ee = i("edit_resource"), se = i("edit_resource"), te = i("share"), oe = i("share");
156
+ function ne() {
157
+ f && f.length > 0 ? a("edit_resource") : a("edit_folder");
214
158
  }
215
- function overrideLabel(action) {
216
- if (action.id === "edit" && folderIds.length > 0) {
217
- return "explorer.rename";
218
- }
219
- return `explorer.actions.${action.id}`;
159
+ function re(n) {
160
+ return n.id === "edit" && t.length > 0 ? "explorer.rename" : `explorer.actions.${n.id}`;
220
161
  }
221
162
  return {
222
- onRestore,
223
- actions: isTrashFolder ? config == null ? void 0 : config.trashActions : actions,
224
- selectedElement: [...selectedResources, ...selectedFolders],
225
- currentFolderId: currentFolder == null ? void 0 : currentFolder.id,
226
- overrideLabel,
227
- handleClick,
228
- isActivable: isTrashFolder ? isActivableForTrash : isActivable,
229
- isActionBarOpen,
230
- isMoveModalOpen: openedModalName === "move",
231
- onMoveCancel,
232
- onMoveSuccess,
233
- isDeleteModalOpen: openedModalName === "delete",
234
- onDeleteCancel,
235
- onDeleteSuccess,
236
- isPublishModalOpen: openedModalName === "publish",
237
- onPublishCancel,
238
- onPublishSuccess,
239
- isEditFolderOpen: openedModalName === "edit_folder",
240
- onEditFolderCancel,
241
- onEditFolderSuccess,
242
- isEditResourceOpen: openedModalName === "edit_resource",
243
- onEditResourceCancel,
244
- onEditResourceSuccess,
245
- isShareResourceOpen: openedModalName === "share",
246
- onShareResourceCancel,
247
- onShareResourceSuccess,
248
- onClearActionBar
163
+ onRestore: v,
164
+ actions: p ? R == null ? void 0 : R.trashActions : L,
165
+ selectedElement: [...S, ...c],
166
+ currentFolderId: d == null ? void 0 : d.id,
167
+ overrideLabel: re,
168
+ handleClick: _,
169
+ isActivable: p ? x : N,
170
+ isActionBarOpen: o,
171
+ isMoveModalOpen: r === "move",
172
+ onMoveCancel: A,
173
+ onMoveSuccess: H,
174
+ isDeleteModalOpen: r === "delete",
175
+ onDeleteCancel: k,
176
+ onDeleteSuccess: U,
177
+ isPublishModalOpen: r === "publish",
178
+ onPublishCancel: X,
179
+ onPublishSuccess: h,
180
+ isEditFolderOpen: r === "edit_folder",
181
+ onEditFolderCancel: W,
182
+ onEditFolderSuccess: Z,
183
+ isEditResourceOpen: r === "edit_resource",
184
+ onEditResourceCancel: se,
185
+ onEditResourceSuccess: ee,
186
+ isShareResourceOpen: r === "share",
187
+ onShareResourceCancel: oe,
188
+ onShareResourceSuccess: te,
189
+ onClearActionBar: E
249
190
  };
250
191
  }
251
- function AccessControl({
252
- resourceRights,
253
- roleExpected,
254
- action,
255
- children,
256
- renderWhenForbidden
192
+ function ve({
193
+ resourceRights: o,
194
+ roleExpected: e,
195
+ action: r,
196
+ children: a,
197
+ renderWhenForbidden: s
257
198
  }) {
258
199
  const {
259
- t
260
- } = useTranslation();
261
- const {
262
- overrideLabel
263
- } = useActionBar();
264
- const {
265
- visible
266
- } = useAccessControl({
267
- roles: roleExpected,
268
- rights: resourceRights,
269
- action: action == null ? void 0 : action.id
270
- });
271
- const {
272
- setResourceActionDisable
273
- } = useStoreActions();
274
- const isTrashFolder = useIsTrash();
275
- if (visible) {
276
- return /* @__PURE__ */ jsx(Fragment, { children });
277
- } else if (renderWhenForbidden) {
278
- return renderWhenForbidden();
279
- } else if (isTrashFolder && !visible) {
280
- return /* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "filled", onClick: () => {
281
- setResourceActionDisable(true);
282
- }, children: t(overrideLabel(action)) });
283
- } else {
284
- return /* @__PURE__ */ jsx(Fragment, {});
285
- }
200
+ t: m
201
+ } = q(), {
202
+ overrideLabel: R
203
+ } = Q(), {
204
+ visible: d
205
+ } = be({
206
+ roles: e,
207
+ rights: o,
208
+ action: r == null ? void 0 : r.id
209
+ }), {
210
+ setResourceActionDisable: f
211
+ } = K(), S = Y();
212
+ return d ? /* @__PURE__ */ u(j, { children: a }) : s ? s() : S && !d ? /* @__PURE__ */ u(G, { type: "button", color: "primary", variant: "filled", onClick: () => {
213
+ f(!0);
214
+ }, children: m(R(r)) }) : /* @__PURE__ */ u(j, {});
286
215
  }
287
- const ShareModal = /* @__PURE__ */ lazy(async () => {
288
- const module = await import("@edifice-ui/react");
289
- return {
290
- default: module.ShareModal
291
- };
292
- });
293
- const PublishModal = /* @__PURE__ */ lazy(async () => {
294
- const module = await import("@edifice-ui/react");
295
- return {
296
- default: module.PublishModal
297
- };
298
- });
299
- const UpdateModal = /* @__PURE__ */ lazy(async () => {
300
- const module = await import("@edifice-ui/react");
301
- return {
302
- default: module.ResourceModal
303
- };
304
- });
305
- const DeleteModal = /* @__PURE__ */ lazy(async () => await import("./DeleteModal.js"));
306
- const MoveModal = /* @__PURE__ */ lazy(async () => await import("./MoveModal.js"));
307
- const FolderModal = /* @__PURE__ */ lazy(async () => await import("./FolderModal.js"));
308
- function ActionBarContainer() {
309
- const {
310
- t
311
- } = useTranslation();
216
+ const Ae = /* @__PURE__ */ y(async () => ({
217
+ default: (await import("@edifice-ui/react")).ShareModal
218
+ })), Me = /* @__PURE__ */ y(async () => ({
219
+ default: (await import("@edifice-ui/react")).PublishModal
220
+ })), ge = /* @__PURE__ */ y(async () => ({
221
+ default: (await import("@edifice-ui/react")).ResourceModal
222
+ })), we = /* @__PURE__ */ y(async () => await import("./DeleteModal.js")), Fe = /* @__PURE__ */ y(async () => await import("./MoveModal.js")), Ie = /* @__PURE__ */ y(async () => await import("./FolderModal.js"));
223
+ function je() {
312
224
  const {
313
- actions,
314
- selectedElement,
315
- isMoveModalOpen,
316
- isDeleteModalOpen,
317
- isPublishModalOpen,
318
- isActionBarOpen,
319
- isEditFolderOpen,
320
- overrideLabel,
321
- onEditFolderCancel,
322
- onEditFolderSuccess,
323
- isEditResourceOpen,
324
- onEditResourceCancel,
325
- onEditResourceSuccess,
326
- isShareResourceOpen,
327
- onShareResourceCancel,
328
- onShareResourceSuccess,
329
- onMoveCancel,
330
- onMoveSuccess,
331
- onDeleteCancel,
332
- onDeleteSuccess,
333
- onPublishCancel,
334
- onPublishSuccess,
335
- isActivable,
336
- handleClick
337
- } = useActionBar();
338
- const selectedResources = useSelectedResources();
339
- const shareResource = useShareResource();
340
- const updateResource = useUpdateResource();
341
- const transition = useTransition(isActionBarOpen, {
225
+ t: o
226
+ } = q(), {
227
+ actions: e,
228
+ selectedElement: r,
229
+ isMoveModalOpen: a,
230
+ isDeleteModalOpen: s,
231
+ isPublishModalOpen: m,
232
+ isActionBarOpen: R,
233
+ isEditFolderOpen: d,
234
+ overrideLabel: f,
235
+ onEditFolderCancel: S,
236
+ onEditFolderSuccess: c,
237
+ isEditResourceOpen: t,
238
+ onEditResourceCancel: p,
239
+ onEditResourceSuccess: C,
240
+ isShareResourceOpen: O,
241
+ onShareResourceCancel: I,
242
+ onShareResourceSuccess: P,
243
+ onMoveCancel: T,
244
+ onMoveSuccess: B,
245
+ onDeleteCancel: D,
246
+ onDeleteSuccess: L,
247
+ onPublishCancel: _,
248
+ onPublishSuccess: N,
249
+ isActivable: x,
250
+ handleClick: v
251
+ } = Q(), E = J(), i = ye(), A = Ce(), H = ue(R, {
342
252
  from: {
343
253
  opacity: 0,
344
254
  transform: "translateY(100%)"
@@ -352,24 +262,20 @@ function ActionBarContainer() {
352
262
  transform: "translateY(100%)"
353
263
  }
354
264
  });
355
- return /* @__PURE__ */ jsxs(Fragment, { children: [
356
- transition((style, isActionBarOpen2) => {
357
- return isActionBarOpen2 && /* @__PURE__ */ jsx(animated.div, { className: "position-fixed bottom-0 start-0 end-0 z-3", style, children: /* @__PURE__ */ jsx(ActionBar, { children: actions == null ? void 0 : actions.filter((action) => action.available && action.target === "actionbar").map((action) => {
358
- return isActivable(action) && /* @__PURE__ */ jsx(AccessControl, { resourceRights: selectedElement, roleExpected: action.right, action, children: /* @__PURE__ */ jsx(Button, { id: action.id, type: "button", color: "primary", variant: "filled", onClick: () => {
359
- handleClick(action);
360
- }, children: t(overrideLabel(action)) }, action.id) }, action.id);
361
- }) }) });
362
- }),
363
- /* @__PURE__ */ jsxs(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, {}), children: [
364
- isMoveModalOpen && /* @__PURE__ */ jsx(MoveModal, { isOpen: isMoveModalOpen, onCancel: onMoveCancel, onSuccess: onMoveSuccess }),
365
- isDeleteModalOpen && /* @__PURE__ */ jsx(DeleteModal, { isOpen: isDeleteModalOpen, onCancel: onDeleteCancel, onSuccess: onDeleteSuccess }),
366
- isPublishModalOpen && /* @__PURE__ */ jsx(PublishModal, { isOpen: isPublishModalOpen, resource: selectedResources[0], onCancel: onPublishCancel, onSuccess: onPublishSuccess }),
367
- isEditFolderOpen && /* @__PURE__ */ jsx(FolderModal, { edit: true, isOpen: isEditFolderOpen, onCancel: onEditFolderCancel, onSuccess: onEditFolderSuccess }),
368
- isEditResourceOpen && /* @__PURE__ */ jsx(UpdateModal, { mode: "update", actions, isOpen: isEditResourceOpen, selectedResource: selectedResources[0], updateResource, onCancel: onEditResourceCancel, onSuccess: onEditResourceSuccess }),
369
- isShareResourceOpen && /* @__PURE__ */ jsx(ShareModal, { isOpen: isShareResourceOpen, resource: selectedResources[0], updateResource, shareResource, onCancel: onShareResourceCancel, onSuccess: onShareResourceSuccess })
265
+ return /* @__PURE__ */ V(j, { children: [
266
+ H((U, k) => k && /* @__PURE__ */ u(de.div, { className: "position-fixed bottom-0 start-0 end-0 z-3", style: U, children: /* @__PURE__ */ u(ie, { children: e == null ? void 0 : e.filter((h) => h.available && h.target === "actionbar").map((h) => x(h) && /* @__PURE__ */ u(ve, { resourceRights: r, roleExpected: h.right, action: h, children: /* @__PURE__ */ u(G, { id: h.id, type: "button", color: "primary", variant: "filled", onClick: () => {
267
+ v(h);
268
+ }, children: o(f(h)) }, h.id) }, h.id)) }) })),
269
+ /* @__PURE__ */ V(ce, { fallback: /* @__PURE__ */ u(le, {}), children: [
270
+ a && /* @__PURE__ */ u(Fe, { isOpen: a, onCancel: T, onSuccess: B }),
271
+ s && /* @__PURE__ */ u(we, { isOpen: s, onCancel: D, onSuccess: L }),
272
+ m && /* @__PURE__ */ u(Me, { isOpen: m, resource: E[0], onCancel: _, onSuccess: N }),
273
+ d && /* @__PURE__ */ u(Ie, { edit: !0, isOpen: d, onCancel: S, onSuccess: c }),
274
+ t && /* @__PURE__ */ u(ge, { mode: "update", actions: e, isOpen: t, selectedResource: E[0], updateResource: A, onCancel: p, onSuccess: C }),
275
+ O && /* @__PURE__ */ u(Ae, { isOpen: O, resource: E[0], updateResource: A, shareResource: i, onCancel: I, onSuccess: P })
370
276
  ] })
371
277
  ] });
372
278
  }
373
279
  export {
374
- ActionBarContainer as default
280
+ je as default
375
281
  };