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

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.
Files changed (57) hide show
  1. package/dist/ActionBarContainer.js +1 -1
  2. package/dist/AppAction.js +1 -1
  3. package/dist/DeleteModal.js +1 -1
  4. package/dist/DisableModal.js +1 -1
  5. package/dist/EmptyScreenApp.js +1 -1
  6. package/dist/EmptyScreenError.js +1 -1
  7. package/dist/EmptyScreenNoContentInFolder.js +1 -1
  8. package/dist/EmptyScreenSearch.js +1 -1
  9. package/dist/EmptyScreenTrash.js +1 -1
  10. package/dist/FolderModal.js +1 -1
  11. package/dist/FoldersList.js +1 -1
  12. package/dist/Library.js +1 -1
  13. package/dist/MoveModal.js +1 -1
  14. package/dist/OnboardingModal.js +1 -0
  15. package/dist/PublishModal.js +1 -0
  16. package/dist/ResourceModal.js +1 -0
  17. package/dist/ResourcesList.js +1 -1
  18. package/dist/ShareModal.js +1 -0
  19. package/dist/TrashModal.js +1 -1
  20. package/dist/edifice-icons.js +1 -0
  21. package/dist/edifice-react.js +1347 -0
  22. package/dist/index.html +3 -1
  23. package/dist/index.js +4 -223
  24. package/dist/react.js +32 -0
  25. package/dist/version.txt +1 -1
  26. package/lib/ActionBarContainer.js +213 -313
  27. package/lib/AppAction.js +24 -39
  28. package/lib/DeleteModal.js +31 -39
  29. package/lib/DisableModal.js +14 -14
  30. package/lib/EmptyScreenApp.js +27 -43
  31. package/lib/EmptyScreenError.js +9 -10
  32. package/lib/EmptyScreenNoContentInFolder.js +12 -14
  33. package/lib/EmptyScreenSearch.js +11 -13
  34. package/lib/EmptyScreenTrash.js +11 -13
  35. package/lib/FolderModal.js +86 -105
  36. package/lib/FoldersList.js +42 -55
  37. package/lib/Library.js +17 -15
  38. package/lib/MoveModal.js +53 -69
  39. package/lib/OnboardingModal.js +5 -0
  40. package/lib/PublishModal.js +5 -0
  41. package/lib/ResourceModal.js +5 -0
  42. package/lib/ResourcesList.js +190 -202
  43. package/lib/ShareModal.js +5 -0
  44. package/lib/TrashModal.js +14 -14
  45. package/lib/components/OnboardingModal.d.ts +2 -0
  46. package/lib/features/ActionBar/Disable/DisableModal.d.ts +1 -1
  47. package/lib/features/ActionBar/Publish/PublishModal.d.ts +2 -0
  48. package/lib/features/ActionBar/Resource/ResourceModal.d.ts +2 -0
  49. package/lib/features/ActionBar/Share/ShareModal.d.ts +2 -0
  50. package/lib/features/ActionBar/Trash/TrashModal.d.ts +1 -1
  51. package/lib/index.js +2 -2
  52. package/lib/index2.js +1014 -1503
  53. package/lib/services/api/index.d.ts +21 -17
  54. package/lib/store/index.d.ts +5 -5
  55. package/package.json +3 -7
  56. package/dist/style.css +0 -1
  57. package/lib/style.css +0 -410
@@ -1,344 +1,248 @@
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: c,
14
+ rights: e,
15
+ action: o
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
+ }, [c, e]);
23
+ const d = async function(r) {
24
+ const t = r instanceof Array ? r : [r];
25
+ if (c instanceof Array) {
26
+ const p = await w.rights().sessionHasAtLeastOneResourceRight(c, 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(c, 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(r) {
33
+ if (c instanceof Array) {
34
+ const t = await w.rights().sessionHasAtLeastOneResourceRightForEachList(c, r);
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(c, r);
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 r, t, p;
42
+ if (c === 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 = (r = e[0]) == null ? void 0 : r.trashedBy) != null && t.includes(m == null ? void 0 : m.userId)) && o === "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 [c, e] = F(!1), [o, a] = F("void"), [s, m] = F(), R = fe((n) => n.config), d = he(), f = pe(), S = J(), r = 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: r[0],
95
+ folderId: r[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 oe();
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
+ o === 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"), ne = i("share");
156
+ function oe() {
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, ...r],
166
+ currentFolderId: d == null ? void 0 : d.id,
167
+ overrideLabel: re,
168
+ handleClick: _,
169
+ isActivable: p ? x : N,
170
+ isActionBarOpen: c,
171
+ isMoveModalOpen: o === "move",
172
+ onMoveCancel: A,
173
+ onMoveSuccess: H,
174
+ isDeleteModalOpen: o === "delete",
175
+ onDeleteCancel: k,
176
+ onDeleteSuccess: U,
177
+ isPublishModalOpen: o === "publish",
178
+ onPublishCancel: X,
179
+ onPublishSuccess: h,
180
+ isEditFolderOpen: o === "edit_folder",
181
+ onEditFolderCancel: W,
182
+ onEditFolderSuccess: Z,
183
+ isEditResourceOpen: o === "edit_resource",
184
+ onEditResourceCancel: se,
185
+ onEditResourceSuccess: ee,
186
+ isShareResourceOpen: o === "share",
187
+ onShareResourceCancel: ne,
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: c,
194
+ roleExpected: e,
195
+ action: o,
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: c,
208
+ action: o == null ? void 0 : o.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(o)) }) : /* @__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 () => await import("./ShareModal.js")), Me = /* @__PURE__ */ y(async () => await import("./PublishModal.js")), ge = /* @__PURE__ */ y(async () => await import("./ResourceModal.js")), we = /* @__PURE__ */ y(async () => await import("./DeleteModal.js")), Fe = /* @__PURE__ */ y(async () => await import("./MoveModal.js")), Ie = /* @__PURE__ */ y(async () => await import("./FolderModal.js"));
217
+ function je() {
312
218
  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, {
219
+ t: c
220
+ } = q(), {
221
+ actions: e,
222
+ selectedElement: o,
223
+ isMoveModalOpen: a,
224
+ isDeleteModalOpen: s,
225
+ isPublishModalOpen: m,
226
+ isActionBarOpen: R,
227
+ isEditFolderOpen: d,
228
+ overrideLabel: f,
229
+ onEditFolderCancel: S,
230
+ onEditFolderSuccess: r,
231
+ isEditResourceOpen: t,
232
+ onEditResourceCancel: p,
233
+ onEditResourceSuccess: C,
234
+ isShareResourceOpen: O,
235
+ onShareResourceCancel: I,
236
+ onShareResourceSuccess: P,
237
+ onMoveCancel: T,
238
+ onMoveSuccess: B,
239
+ onDeleteCancel: D,
240
+ onDeleteSuccess: L,
241
+ onPublishCancel: _,
242
+ onPublishSuccess: N,
243
+ isActivable: x,
244
+ handleClick: v
245
+ } = Q(), E = J(), i = ye(), A = Ce(), H = ue(R, {
342
246
  from: {
343
247
  opacity: 0,
344
248
  transform: "translateY(100%)"
@@ -352,24 +256,20 @@ function ActionBarContainer() {
352
256
  transform: "translateY(100%)"
353
257
  }
354
258
  });
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 })
259
+ return /* @__PURE__ */ V(j, { children: [
260
+ 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: o, roleExpected: h.right, action: h, children: /* @__PURE__ */ u(G, { id: h.id, type: "button", color: "primary", variant: "filled", onClick: () => {
261
+ v(h);
262
+ }, children: c(f(h)) }, h.id) }, h.id)) }) })),
263
+ /* @__PURE__ */ V(ce, { fallback: /* @__PURE__ */ u(le, {}), children: [
264
+ a && /* @__PURE__ */ u(Fe, { isOpen: a, onCancel: T, onSuccess: B }),
265
+ s && /* @__PURE__ */ u(we, { isOpen: s, onCancel: D, onSuccess: L }),
266
+ m && /* @__PURE__ */ u(Me, { isOpen: m, resource: E[0], onCancel: _, onSuccess: N }),
267
+ d && /* @__PURE__ */ u(Ie, { edit: !0, isOpen: d, onCancel: S, onSuccess: r }),
268
+ t && /* @__PURE__ */ u(ge, { mode: "update", actions: e, isOpen: t, selectedResource: E[0], updateResource: A, onCancel: p, onSuccess: C }),
269
+ O && /* @__PURE__ */ u(Ae, { isOpen: O, resource: E[0], updateResource: A, shareResource: i, onCancel: I, onSuccess: P })
370
270
  ] })
371
271
  ] });
372
272
  }
373
273
  export {
374
- ActionBarContainer as default
274
+ je as default
375
275
  };