ode-explorer 1.3.3-develop-pedago.202402131510 → 1.3.3-develop-pedago.202402141229

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 CHANGED
@@ -15,16 +15,20 @@
15
15
  <div id="portal"></div>
16
16
  <!-- SET INITIALISATION CONFIG -->
17
17
  <script>
18
- var WORFLOW_ACCESS = "org.entcore.blog.controllers.BlogController|blog";
18
+ var WORFLOW_ACCESS =
19
+ "fr.wseduc.scrapbook.controllers.ScrapbookController|view";
19
20
  var WORKFLOW_CREATE =
20
- "org.entcore.blog.controllers.BlogController|create";
21
+ "fr.wseduc.scrapbook.controllers.ScrapbookController|createScrapbook";
21
22
  var WORKFLOW_PUBLISH =
22
- "org.entcore.blog.controllers.BlogController|publish";
23
- var WORKFLOW_PRINT = "org.entcore.blog.controllers.BlogController|print";
23
+ "fr.wseduc.scrapbook.controllers.ScrapbookController|publish";
24
+ var WORKFLOW_PRINT =
25
+ "fr.wseduc.scrapbook.controllers.ScrapbookController|print";
26
+ var WORKFLOW_EXPORT_HTML =
27
+ "fr.wseduc.scrapbook.controllers.ScrapbookController|exportHtml";
24
28
  ///////////
25
29
  var explorerConfig = {
26
- app: "blog",
27
- types: ["blog"],
30
+ app: "scrapbook",
31
+ types: ["scrapbook"],
28
32
  filters: [
29
33
  { id: "owner", defaultValue: true },
30
34
  { id: "public", defaultValue: false },
@@ -58,12 +62,12 @@
58
62
  workflow: WORKFLOW_CREATE,
59
63
  target: "tree",
60
64
  },
61
- {
62
- id: "createPublic",
63
- workflow:
64
- "org.entcore.blog.controllers.BlogController|createPublicBlog",
65
- target: "tree",
66
- },
65
+ /*{
66
+ id: "duplicate",
67
+ workflow: WORFLOW_ACCESS,
68
+ target: "actionbar",
69
+ right: "tree",
70
+ },*/
67
71
  {
68
72
  id: "move",
69
73
  workflow: WORFLOW_ACCESS,
@@ -76,6 +80,12 @@
76
80
  target: "actionbar",
77
81
  right: "creator",
78
82
  },
83
+ {
84
+ id: "export",
85
+ workflow: WORKFLOW_EXPORT_HTML,
86
+ target: "actionbar",
87
+ right: "read",
88
+ },
79
89
  {
80
90
  id: "print",
81
91
  workflow: WORKFLOW_PRINT,
package/dist/index.js CHANGED
@@ -38574,23 +38574,8 @@ function requireEsDefineProperty() {
38574
38574
  esDefineProperty = $defineProperty2;
38575
38575
  return esDefineProperty;
38576
38576
  }
38577
- var $defineProperty$1 = requireEsDefineProperty();
38578
- var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
38579
- return !!$defineProperty$1;
38580
- };
38581
- hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
38582
- if (!$defineProperty$1) {
38583
- return null;
38584
- }
38585
- try {
38586
- return $defineProperty$1([], "length", { value: 1 }).length !== 1;
38587
- } catch (e2) {
38588
- return true;
38589
- }
38590
- };
38591
- var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
38592
- var GetIntrinsic$4 = getIntrinsic;
38593
- var $gOPD = GetIntrinsic$4("%Object.getOwnPropertyDescriptor%", true);
38577
+ var GetIntrinsic$3 = getIntrinsic;
38578
+ var $gOPD = GetIntrinsic$3("%Object.getOwnPropertyDescriptor%", true);
38594
38579
  if ($gOPD) {
38595
38580
  try {
38596
38581
  $gOPD([], "length");
@@ -38599,16 +38584,7 @@ if ($gOPD) {
38599
38584
  }
38600
38585
  }
38601
38586
  var gopd$1 = $gOPD;
38602
- var hasPropertyDescriptors2 = hasPropertyDescriptors_1();
38603
- var GetIntrinsic$3 = getIntrinsic;
38604
- var $defineProperty = hasPropertyDescriptors2 && GetIntrinsic$3("%Object.defineProperty%", true);
38605
- if ($defineProperty) {
38606
- try {
38607
- $defineProperty({}, "a", { value: 1 });
38608
- } catch (e2) {
38609
- $defineProperty = false;
38610
- }
38611
- }
38587
+ var $defineProperty$1 = requireEsDefineProperty();
38612
38588
  var $SyntaxError = syntax;
38613
38589
  var $TypeError$2 = type;
38614
38590
  var gopd = gopd$1;
@@ -38636,8 +38612,8 @@ var defineDataProperty = function defineDataProperty2(obj, property, value) {
38636
38612
  var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
38637
38613
  var loose = arguments.length > 6 ? arguments[6] : false;
38638
38614
  var desc = !!gopd && gopd(obj, property);
38639
- if ($defineProperty) {
38640
- $defineProperty(obj, property, {
38615
+ if ($defineProperty$1) {
38616
+ $defineProperty$1(obj, property, {
38641
38617
  configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
38642
38618
  enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
38643
38619
  value,
@@ -38649,6 +38625,21 @@ var defineDataProperty = function defineDataProperty2(obj, property, value) {
38649
38625
  throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
38650
38626
  }
38651
38627
  };
38628
+ var $defineProperty = requireEsDefineProperty();
38629
+ var hasPropertyDescriptors = function hasPropertyDescriptors2() {
38630
+ return !!$defineProperty;
38631
+ };
38632
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
38633
+ if (!$defineProperty) {
38634
+ return null;
38635
+ }
38636
+ try {
38637
+ return $defineProperty([], "length", { value: 1 }).length !== 1;
38638
+ } catch (e2) {
38639
+ return true;
38640
+ }
38641
+ };
38642
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors;
38652
38643
  var GetIntrinsic$2 = getIntrinsic;
38653
38644
  var define = defineDataProperty;
38654
38645
  var hasDescriptors = hasPropertyDescriptors_1();
@@ -62568,7 +62559,7 @@ const useDropdown = (placement, extraTriggerKeyDownHandler) => {
62568
62559
  rects,
62569
62560
  elements
62570
62561
  }) {
62571
- elements.floating.style, `${rects.reference.width}`;
62562
+ elements.floating.style.minWidth = `${rects.reference.width}px`;
62572
62563
  }
62573
62564
  }), flip$2({
62574
62565
  padding: 0
@@ -63884,12 +63875,12 @@ const ImagePicker = /* @__PURE__ */ reactExports.forwardRef(({
63884
63875
  onValueChange == null || onValueChange(value);
63885
63876
  }
63886
63877
  }, [localValue]);
63887
- const label = typeof localValue == "object" ? localValue.label : localValue;
63878
+ const label = typeof localValue == "object" ? localValue.label : localValue, iconChange = typeof localValue == "object" ? localValue.icon : void 0;
63888
63879
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown$1, { overflow, block, children: [
63889
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger$1, { icon, label: t2(label || placeholderOption), variant, size: size2, disabled }),
63880
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger$1, { icon: iconChange || icon, label: t2(label || placeholderOption), variant, size: size2, disabled }),
63890
63881
  /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Menu, { role: "listbox", children: options == null ? void 0 : options.map((option) => {
63891
- const value = typeof option == "object" ? option.value : option, label2 = typeof option == "object" ? option.label : option;
63892
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Item, { type: "action", onClick: () => setLocalValue(option), children: label2 }, value);
63882
+ const value = typeof option == "object" ? option.value : option, label2 = typeof option == "object" ? option.label : option, icon2 = typeof option == "object" ? option.icon : void 0;
63883
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Item, { type: "action", onClick: () => setLocalValue(option), icon: icon2, children: label2 }, value);
63893
63884
  }) })
63894
63885
  ] });
63895
63886
  }, Select$1 = Select;
@@ -64554,11 +64545,29 @@ function PublishModal$2({
64554
64545
  /* @__PURE__ */ jsxRuntimeExports.jsx(SubjectsDropdown, { control, selectedSubjectAreas, selectSubjects }),
64555
64546
  /* @__PURE__ */ jsxRuntimeExports.jsx(LangSelect, { control })
64556
64547
  ] }),
64548
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown$1, { children: [
64549
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Trigger, { label: "Dropdown" }),
64550
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown$1.Menu, { children: [
64551
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Item, { onClick: () => alert("click"), children: "Dropdown Item" }),
64552
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Separator, {}),
64553
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown$1.MenuGroup, { label: "Title label", children: [
64554
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Item, { children: "Dropdown Item" }),
64555
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Item, { children: "Dropdown Item" })
64556
+ ] }),
64557
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Separator, {}),
64558
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown$1.MenuGroup, { label: "Title label", children: [
64559
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Item, { children: "Dropdown Item" }),
64560
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Item, { children: "Dropdown Item" })
64561
+ ] }),
64562
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Separator, {}),
64563
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown$1.Item, { children: "Dropdown Item" })
64564
+ ] })
64565
+ ] }),
64557
64566
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-24", children: [
64558
64567
  /* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: "", className: "form-label", children: t2("bpr.form.publication.age") }),
64559
64568
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "d-flex gap-8", children: [
64560
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col col-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AgeSelect, { control, name: "ageMin", placeholderOption: defaultSelectAgeMinOption, validate: (value, formValues) => parseInt(value) <= parseInt(formValues.ageMax) }) }),
64561
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col col-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AgeSelect, { control, name: "ageMax", placeholderOption: defaultSelectAgeMaxOption, validate: (value, formValues) => parseInt(value) >= parseInt(formValues.ageMin) }) })
64569
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col col-md-2 d-flex", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AgeSelect, { control, name: "ageMin", placeholderOption: defaultSelectAgeMinOption, validate: (value, formValues) => parseInt(value) <= parseInt(formValues.ageMax) }) }),
64570
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col col-md-2 d-flex", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AgeSelect, { control, name: "ageMax", placeholderOption: defaultSelectAgeMaxOption, validate: (value, formValues) => parseInt(value) >= parseInt(formValues.ageMin) }) })
64562
64571
  ] })
64563
64572
  ] }),
64564
64573
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-24", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { id: "keywords", isOptional: true, children: [
@@ -68229,20 +68238,21 @@ const queryClient = new QueryClient({
68229
68238
  });
68230
68239
  const getHTMLConfig = getExplorerConfig();
68231
68240
  createRoot(root).render(
68232
- // <StrictMode>
68233
- /* @__PURE__ */ jsxRuntimeExports.jsxs(QueryClientProvider, { client: queryClient, children: [
68234
- /* @__PURE__ */ jsxRuntimeExports.jsx(
68235
- OdeClientProvider,
68236
- {
68237
- params: {
68238
- app: getHTMLConfig.app
68239
- },
68240
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root, {}) })
68241
- }
68242
- ),
68243
- /* @__PURE__ */ jsxRuntimeExports.jsx(ReactQueryDevtools2, { initialIsOpen: false })
68241
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.StrictMode, { children: [
68242
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(QueryClientProvider, { client: queryClient, children: [
68243
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
68244
+ OdeClientProvider,
68245
+ {
68246
+ params: {
68247
+ app: getHTMLConfig.app
68248
+ },
68249
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root, {}) })
68250
+ }
68251
+ ),
68252
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ReactQueryDevtools2, { initialIsOpen: false })
68253
+ ] }),
68254
+ ","
68244
68255
  ] })
68245
- // </StrictMode>,
68246
68256
  );
68247
68257
  function EmptyScreenApp() {
68248
68258
  const { appCode } = useOdeClient();
@@ -68997,7 +69007,11 @@ function useActionBar() {
68997
69007
  case "edit":
68998
69008
  return onEdit();
68999
69009
  case "export":
69000
- return onExport();
69010
+ if (resourceIds.length > 0) {
69011
+ return onExport();
69012
+ } else {
69013
+ return null;
69014
+ }
69001
69015
  case ACTION.SHARE:
69002
69016
  return setOpenedModalName("share");
69003
69017
  default:
@@ -69020,6 +69034,8 @@ function useActionBar() {
69020
69034
  return onlyOneItemSelected && noFolderSelected;
69021
69035
  case ACTION.SHARE:
69022
69036
  return noFolderSelected && onlyOneItemSelected;
69037
+ case "export":
69038
+ return onlyOneItemSelected && noFolderSelected;
69023
69039
  case ACTION.PRINT:
69024
69040
  return onlyOneItemSelected && noFolderSelected;
69025
69041
  case "edit":
package/dist/version.txt CHANGED
@@ -1 +1 @@
1
- ode-explorer=1.0-b2school-SNAPSHOT 13/02/2024 15:11:30
1
+ ode-explorer=1.0-b2school-SNAPSHOT 14/02/2024 12:30:12
@@ -1,5 +1,5 @@
1
1
  import { jsx as i, Fragment as $, jsxs as J } from "react/jsx-runtime";
2
- import { useState as T, useEffect as K, Suspense as ie, lazy as v } from "react";
2
+ import { useState as T, useEffect as K, Suspense as ie, lazy as A } from "react";
3
3
  import { useUser as le, Button as Q, useOdeClient as ue, ActionBar as de, LoadingScreen as he, isActionAvailable as pe, BlogPublic as fe, ShareModal as me, ShareBlog as Re } from "@edifice-ui/react";
4
4
  import { useTransition as Se, animated as Ee } from "@react-spring/web";
5
5
  import { useTranslation as X } from "react-i18next";
@@ -52,8 +52,8 @@ function Be({
52
52
  if (typeof o[0] == "string")
53
53
  await m(o);
54
54
  else {
55
- const E = o.map((b) => b.rights);
56
- await a(E);
55
+ const b = o.map((O) => O.rights);
56
+ await a(b);
57
57
  }
58
58
  else
59
59
  s(!1);
@@ -66,7 +66,7 @@ function Be({
66
66
  };
67
67
  }
68
68
  function ee() {
69
- const [r, o] = T(!1), [n, h] = T("void"), [s, S] = T(), p = be((e) => e.config), m = Oe(), a = Ce(), R = Z(), l = ye(), c = Ie(), f = q(), E = ve(), b = Ae(), O = ge(), {
69
+ const [r, o] = T(!1), [n, h] = T("void"), [s, S] = T(), p = be((e) => e.config), m = Oe(), a = Ce(), R = Z(), l = ye(), c = Ie(), f = q(), b = ve(), O = Ae(), C = ge(), {
70
70
  openResource: B,
71
71
  printSelectedResource: x,
72
72
  openFolder: D,
@@ -80,15 +80,15 @@ function ee() {
80
80
  o(!1);
81
81
  return;
82
82
  }
83
- if (b) {
83
+ if (O) {
84
84
  o(!1);
85
85
  return;
86
86
  }
87
87
  o(!0);
88
88
  }, [a, c]);
89
89
  async function k(e) {
90
- var P;
91
- switch ((P = document.getElementById("root")) == null || P.setAttribute("aria-hidden", "true"), S(e), e.id) {
90
+ var w;
91
+ switch ((w = document.getElementById("root")) == null || w.setAttribute("aria-hidden", "true"), S(e), e.id) {
92
92
  case d.OPEN:
93
93
  return a.length > 0 ? B(R[0]) : D({
94
94
  folder: l[0],
@@ -101,14 +101,14 @@ function ee() {
101
101
  case d.DELETE:
102
102
  return h("delete");
103
103
  case d.RESTORE:
104
- return await A();
104
+ return await g();
105
105
  case d.PUBLISH:
106
106
  return h("publish");
107
107
  case d.UPD_PROPS:
108
108
  case "edit":
109
109
  return re();
110
110
  case "export":
111
- return ce();
111
+ return a.length > 0 ? ce() : null;
112
112
  case d.SHARE:
113
113
  return h("share");
114
114
  default:
@@ -116,20 +116,22 @@ function ee() {
116
116
  }
117
117
  }
118
118
  function H(e) {
119
- const P = a.length + c.length, I = a.length === 1 || c.length === 1, G = P === 1, w = c.length === 0;
119
+ const w = a.length + c.length, E = a.length === 1 || c.length === 1, G = w === 1, v = c.length === 0;
120
120
  switch (e.id) {
121
121
  case d.OPEN:
122
122
  return G;
123
123
  case d.MANAGE:
124
- return I;
124
+ return E;
125
125
  case d.PUBLISH:
126
- return I && w;
126
+ return E && v;
127
127
  case d.UPD_PROPS:
128
- return I && w;
128
+ return E && v;
129
129
  case d.SHARE:
130
- return w && I;
130
+ return v && E;
131
+ case "export":
132
+ return E && v;
131
133
  case d.PRINT:
132
- return I && w;
134
+ return E && v;
133
135
  case "edit":
134
136
  return G;
135
137
  default:
@@ -137,29 +139,29 @@ function ee() {
137
139
  }
138
140
  }
139
141
  const U = () => !0;
140
- async function A() {
142
+ async function g() {
141
143
  try {
142
144
  if (f)
143
- await E.mutate();
145
+ await b.mutate();
144
146
  else
145
147
  throw new Error("Cannot restore untrashed resources");
146
- g();
148
+ M();
147
149
  } catch (e) {
148
150
  console.error(e);
149
151
  }
150
152
  }
151
- function g() {
153
+ function M() {
152
154
  var e;
153
155
  h("void"), s != null && s.id && ((e = document.getElementById(s == null ? void 0 : s.id)) == null || e.focus());
154
156
  }
155
157
  const t = (e) => () => {
156
- n === e && (g(), L(), _());
157
- }, j = t("move"), M = t("move"), Y = t("delete"), C = t("delete"), y = t("publish"), u = t("publish"), z = t("edit_folder"), V = t("edit_folder"), se = t("edit_resource"), te = t("edit_resource"), oe = t("share"), ne = t("share");
158
+ n === e && (M(), L(), _());
159
+ }, j = t("move"), P = t("move"), Y = t("delete"), y = t("delete"), I = t("publish"), u = t("publish"), z = t("edit_folder"), V = t("edit_folder"), se = t("edit_resource"), te = t("edit_resource"), oe = t("share"), ne = t("share");
158
160
  function re() {
159
161
  if (a && a.length > 0) {
160
162
  const e = R[0].assetId;
161
163
  (p == null ? void 0 : p.app) == "scrapbook" ? Pe({
162
- searchParams: O,
164
+ searchParams: C,
163
165
  assetId: e
164
166
  }) : h("edit_resource");
165
167
  } else
@@ -169,7 +171,7 @@ function ee() {
169
171
  if (a && a.length > 0) {
170
172
  const e = R[0].assetId;
171
173
  we({
172
- searchParams: O,
174
+ searchParams: C,
173
175
  assetId: e
174
176
  });
175
177
  }
@@ -178,7 +180,7 @@ function ee() {
178
180
  return e.id === "edit" && c.length > 0 ? "explorer.rename" : `explorer.actions.${e.id}`;
179
181
  }
180
182
  return {
181
- onRestore: A,
183
+ onRestore: g,
182
184
  actions: f ? p == null ? void 0 : p.trashActions : N,
183
185
  selectedElement: [...R, ...l],
184
186
  currentFolderId: m == null ? void 0 : m.id,
@@ -188,13 +190,13 @@ function ee() {
188
190
  isActionBarOpen: r,
189
191
  isMoveModalOpen: n === "move",
190
192
  onMoveCancel: j,
191
- onMoveSuccess: M,
193
+ onMoveSuccess: P,
192
194
  isDeleteModalOpen: n === "delete",
193
- onDeleteCancel: C,
195
+ onDeleteCancel: y,
194
196
  onDeleteSuccess: Y,
195
197
  isPublishModalOpen: n === "publish",
196
198
  onPublishCancel: u,
197
- onPublishSuccess: y,
199
+ onPublishSuccess: I,
198
200
  isEditFolderOpen: n === "edit_folder",
199
201
  onEditFolderCancel: V,
200
202
  onEditFolderSuccess: z,
@@ -204,7 +206,7 @@ function ee() {
204
206
  isShareResourceOpen: n === "share",
205
207
  onShareResourceCancel: ne,
206
208
  onShareResourceSuccess: oe,
207
- onClearActionBar: g
209
+ onClearActionBar: M
208
210
  };
209
211
  }
210
212
  function xe({
@@ -231,7 +233,7 @@ function xe({
231
233
  a(!0);
232
234
  }, children: S(p(n)) }) : /* @__PURE__ */ i($, {});
233
235
  }
234
- const De = /* @__PURE__ */ v(async () => await import("./PublishModal.js")), Le = /* @__PURE__ */ v(async () => await import("./ResourceModal.js")), _e = /* @__PURE__ */ v(async () => await import("./DeleteModal.js")), Ne = /* @__PURE__ */ v(async () => await import("./MoveModal.js")), ke = /* @__PURE__ */ v(async () => await import("./FolderModal.js"));
236
+ const De = /* @__PURE__ */ A(async () => await import("./PublishModal.js")), Le = /* @__PURE__ */ A(async () => await import("./ResourceModal.js")), _e = /* @__PURE__ */ A(async () => await import("./DeleteModal.js")), Ne = /* @__PURE__ */ A(async () => await import("./MoveModal.js")), ke = /* @__PURE__ */ A(async () => await import("./FolderModal.js"));
235
237
  function Qe() {
236
238
  const {
237
239
  appCode: r
@@ -249,9 +251,9 @@ function Qe() {
249
251
  onEditFolderCancel: l,
250
252
  onEditFolderSuccess: c,
251
253
  isEditResourceOpen: f,
252
- onEditResourceCancel: E,
253
- onEditResourceSuccess: b,
254
- isShareResourceOpen: O,
254
+ onEditResourceCancel: b,
255
+ onEditResourceSuccess: O,
256
+ isShareResourceOpen: C,
255
257
  onShareResourceCancel: B,
256
258
  onShareResourceSuccess: x,
257
259
  onMoveCancel: D,
@@ -261,8 +263,8 @@ function Qe() {
261
263
  onPublishCancel: k,
262
264
  onPublishSuccess: H,
263
265
  isActivable: U,
264
- handleClick: A
265
- } = ee(), t = Z()[0], j = Fe(r), M = Te(r), Y = Se(m, {
266
+ handleClick: g
267
+ } = ee(), t = Z()[0], j = Fe(r), P = Te(r), Y = Se(m, {
266
268
  from: {
267
269
  opacity: 0,
268
270
  transform: "translateY(100%)"
@@ -277,16 +279,16 @@ function Qe() {
277
279
  }
278
280
  });
279
281
  return /* @__PURE__ */ J($, { children: [
280
- Y((C, y) => y && /* @__PURE__ */ i(Ee.div, { className: "position-fixed bottom-0 start-0 end-0 z-3", style: C, children: /* @__PURE__ */ i(de, { children: n == null ? void 0 : n.filter((u) => u.available && u.target === "actionbar").map((u) => U(u) && /* @__PURE__ */ i(xe, { resourceRights: h, roleExpected: u.right, action: u, children: /* @__PURE__ */ i(Q, { id: u.id, type: "button", color: "primary", variant: "filled", onClick: () => {
281
- A(u);
282
+ Y((y, I) => I && /* @__PURE__ */ i(Ee.div, { className: "position-fixed bottom-0 start-0 end-0 z-3", style: y, children: /* @__PURE__ */ i(de, { children: n == null ? void 0 : n.filter((u) => u.available && u.target === "actionbar").map((u) => U(u) && /* @__PURE__ */ i(xe, { resourceRights: h, roleExpected: u.right, action: u, children: /* @__PURE__ */ i(Q, { id: u.id, type: "button", color: "primary", variant: "filled", onClick: () => {
283
+ g(u);
282
284
  }, children: o(R(u)) }, u.id) }, u.id)) }) })),
283
285
  /* @__PURE__ */ J(ie, { fallback: /* @__PURE__ */ i(he, {}), children: [
284
286
  s && /* @__PURE__ */ i(Ne, { isOpen: s, onCancel: D, onSuccess: L }),
285
287
  S && /* @__PURE__ */ i(_e, { isOpen: S, onCancel: _, onSuccess: N }),
286
288
  p && t && /* @__PURE__ */ i(De, { isOpen: p, resourceId: t.assetId, onCancel: k, onSuccess: H }),
287
289
  a && /* @__PURE__ */ i(ke, { edit: !0, isOpen: a, onCancel: l, onSuccess: c }),
288
- f && t && /* @__PURE__ */ i(Le, { mode: "update", isOpen: f, resourceId: t.assetId, updateResource: M, onCancel: E, onSuccess: b, children: (C, y, u, z, V) => r === "blog" && pe("createPublic", n) && /* @__PURE__ */ i(fe, { appCode: r, isUpdating: y, resource: C, watch: u, setValue: z, register: V }) }),
289
- O && t && /* @__PURE__ */ i(me, { isOpen: O, resourceId: t.assetId, shareResource: j, onCancel: B, onSuccess: x, children: r === "blog" ? /* @__PURE__ */ i(Re, { resource: t, updateResource: M }) : null })
290
+ f && t && /* @__PURE__ */ i(Le, { mode: "update", isOpen: f, resourceId: t.assetId, updateResource: P, onCancel: b, onSuccess: O, children: (y, I, u, z, V) => r === "blog" && pe("createPublic", n) && /* @__PURE__ */ i(fe, { appCode: r, isUpdating: I, resource: y, watch: u, setValue: z, register: V }) }),
291
+ C && t && /* @__PURE__ */ i(me, { isOpen: C, resourceId: t.assetId, shareResource: j, onCancel: B, onSuccess: x, children: r === "blog" ? /* @__PURE__ */ i(Re, { resource: t, updateResource: P }) : null })
290
292
  ] })
291
293
  ] });
292
294
  }
@@ -5,7 +5,7 @@ export default function useActionBar(): {
5
5
  selectedElement: (import("edifice-ts-client").IFolder | import("edifice-ts-client").IResource)[];
6
6
  currentFolderId: string | undefined;
7
7
  overrideLabel: (action: IAction) => string;
8
- handleClick: (action: IAction) => Promise<void>;
8
+ handleClick: (action: IAction) => Promise<void | null>;
9
9
  isActivable: (action: IAction) => boolean;
10
10
  isActionBarOpen: boolean;
11
11
  isMoveModalOpen: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ode-explorer",
3
- "version": "1.3.3-develop-pedago.202402131510",
3
+ "version": "1.3.3-develop-pedago.202402141229",
4
4
  "description": "Open Digital Education Explorer",
5
5
  "homepage": "https://github.com/opendigitaleducation/explorer#readme",
6
6
  "bugs": {