ode-explorer 1.6.0 → 2.0.0-develop-integration.202501091206

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 (49) hide show
  1. package/dist/index.js +91 -91
  2. package/lib/ActionBarContainer.js +8 -8
  3. package/lib/FolderModal.js +10 -10
  4. package/lib/MoveModal.js +11 -11
  5. package/lib/ResourcesList.js +56 -56
  6. package/lib/index2.js +296 -296
  7. package/package.json +5 -5
  8. package/dist/assets/js/ode-explorer/EcritureA-Romain-Orne.woff2 +0 -0
  9. package/dist/assets/js/ode-explorer/KGJuneBug.ttf +0 -0
  10. package/dist/assets/js/ode-explorer/OpenDyslexic.woff +0 -0
  11. package/dist/assets/js/ode-explorer/christmas.png +0 -0
  12. package/dist/assets/js/ode-explorer/circus.jpg +0 -0
  13. package/dist/assets/js/ode-explorer/desert.jpg +0 -0
  14. package/dist/assets/js/ode-explorer/hills.svg +0 -360
  15. package/dist/assets/js/ode-explorer/illu-blog.svg +0 -1
  16. package/dist/assets/js/ode-explorer/illu-collaborativewall.svg +0 -1
  17. package/dist/assets/js/ode-explorer/illu-empty-search-blog.svg +0 -25
  18. package/dist/assets/js/ode-explorer/illu-empty-search-blog2.svg +0 -25
  19. package/dist/assets/js/ode-explorer/illu-empty-search-collaborativewall.svg +0 -25
  20. package/dist/assets/js/ode-explorer/illu-empty-search-collaborativewall2.svg +0 -25
  21. package/dist/assets/js/ode-explorer/illu-empty-search-formulaire.svg +0 -27
  22. package/dist/assets/js/ode-explorer/illu-empty-search-formulaire2.svg +0 -27
  23. package/dist/assets/js/ode-explorer/illu-empty-search-forum.svg +0 -25
  24. package/dist/assets/js/ode-explorer/illu-empty-search-forum2.svg +0 -25
  25. package/dist/assets/js/ode-explorer/illu-empty-search-homeworks.svg +0 -25
  26. package/dist/assets/js/ode-explorer/illu-empty-search-homeworks2.svg +0 -25
  27. package/dist/assets/js/ode-explorer/illu-empty-search-wiki.svg +0 -26
  28. package/dist/assets/js/ode-explorer/illu-empty-search-wiki2.svg +0 -26
  29. package/dist/assets/js/ode-explorer/illu-empty-search.svg +0 -62
  30. package/dist/assets/js/ode-explorer/illu-empty-search2.svg +0 -62
  31. package/dist/assets/js/ode-explorer/illu-error.svg +0 -60
  32. package/dist/assets/js/ode-explorer/illu-exercizer.svg +0 -1
  33. package/dist/assets/js/ode-explorer/illu-mindmap.svg +0 -1
  34. package/dist/assets/js/ode-explorer/illu-no-content-in-folder.svg +0 -31
  35. package/dist/assets/js/ode-explorer/illu-pad.svg +0 -1
  36. package/dist/assets/js/ode-explorer/illu-scrapbook.svg +0 -1
  37. package/dist/assets/js/ode-explorer/illu-search.svg +0 -1
  38. package/dist/assets/js/ode-explorer/illu-timeline.svg +0 -1
  39. package/dist/assets/js/ode-explorer/illu-timelinegenerator.svg +0 -1
  40. package/dist/assets/js/ode-explorer/illu-trash-delete.svg +0 -22
  41. package/dist/assets/js/ode-explorer/illu-trash.svg +0 -1
  42. package/dist/assets/js/ode-explorer/illu-wiki.svg +0 -15
  43. package/dist/assets/js/ode-explorer/image-library.svg +0 -188
  44. package/dist/assets/js/ode-explorer/image-library2.svg +0 -188
  45. package/dist/assets/js/ode-explorer/image-placeholder.png +0 -0
  46. package/dist/assets/js/ode-explorer/ocean.jpg +0 -0
  47. package/dist/assets/js/ode-explorer/panda.jpg +0 -0
  48. package/dist/assets/js/ode-explorer/screen-loading.gif +0 -0
  49. package/dist/assets/js/ode-explorer/sparkly.jpg +0 -0
@@ -4,7 +4,7 @@ import { odeServices as D, ACTION as c, isActionAvailable as he } from "@edifice
4
4
  import { useUser as fe, Button as W, useEdificeClient as Re, ActionBar as me, LoadingScreen as Se, BlogPublic as Ee, ShareModal as Oe, ShareBlog as Ce } from "@edifice.io/react";
5
5
  import { useTransition as be, animated as ye } from "@react-spring/web";
6
6
  import { useTranslation as ee } from "react-i18next";
7
- import { f as J, u as Ie, c as ge, h as ve, i as se, j as Ae, k as Me, l as Pe, m as we, e as Fe, n as xe, o as Te, a as te, b as Be, p as De, q as Le, r as _e } from "./index2.js";
7
+ import { f as J, u as Ie, c as ge, h as Ae, i as se, j as ve, k as Me, l as Pe, m as we, e as Fe, n as xe, o as Te, a as te, b as Be, p as De, q as Le, r as _e } from "./index2.js";
8
8
  function Ne({
9
9
  roles: r,
10
10
  rights: s,
@@ -62,7 +62,7 @@ function Ne({
62
62
  };
63
63
  }
64
64
  function oe() {
65
- const [r, s] = L(!1), [t, p] = L("void"), [o, E] = L(), i = Ie((e) => e.config), m = ge(), h = ve(), f = se(), l = Ae(), n = Me(), R = J(), y = Pe(), I = we(), M = Fe(), _ = xe(), N = Te(), {
65
+ const [r, s] = L(!1), [t, p] = L("void"), [o, E] = L(), i = Ie((e) => e.config), m = ge(), h = Ae(), f = se(), l = ve(), n = Me(), R = J(), y = Pe(), I = we(), M = Fe(), _ = xe(), N = Te(), {
66
66
  openResource: P,
67
67
  printSelectedResource: k,
68
68
  openFolder: H,
@@ -160,7 +160,7 @@ function oe() {
160
160
  }
161
161
  const u = (e) => () => {
162
162
  t === e && (g(), w(), F());
163
- }, S = u("move"), V = u("move"), T = u("delete"), $ = u("delete"), v = u("publish"), A = u("publish"), d = u("edit_folder"), q = u("edit_folder"), G = u("edit_resource"), re = u("edit_resource"), ne = u("share"), ce = u("share"), ae = u("export"), ie = u("export");
163
+ }, S = u("move"), V = u("move"), T = u("delete"), $ = u("delete"), A = u("publish"), v = u("publish"), d = u("edit_folder"), q = u("edit_folder"), G = u("edit_resource"), re = u("edit_resource"), ne = u("share"), ce = u("share"), ae = u("export"), ie = u("export");
164
164
  async function le() {
165
165
  if (f && f.length > 0) {
166
166
  const e = f[0];
@@ -196,8 +196,8 @@ function oe() {
196
196
  onDeleteCancel: $,
197
197
  onDeleteSuccess: T,
198
198
  isPublishModalOpen: t === "publish",
199
- onPublishCancel: A,
200
- onPublishSuccess: v,
199
+ onPublishCancel: v,
200
+ onPublishSuccess: A,
201
201
  isEditFolderOpen: t === "edit_folder",
202
202
  onEditFolderCancel: q,
203
203
  onEditFolderSuccess: d,
@@ -286,8 +286,8 @@ function Ze() {
286
286
  }
287
287
  });
288
288
  return /* @__PURE__ */ Q(X, { children: [
289
- $((v, A) => A && /* @__PURE__ */ a(ye.div, { className: "position-fixed bottom-0 start-0 end-0", style: {
290
- ...v,
289
+ $((A, v) => v && /* @__PURE__ */ a(ye.div, { className: "position-fixed bottom-0 start-0 end-0", style: {
290
+ ...A,
291
291
  zIndex: 4
292
292
  }, children: /* @__PURE__ */ a(me, { children: t == null ? void 0 : t.filter((d) => d.available && d.target === "actionbar").map((d) => x(d) && /* @__PURE__ */ a(ke, { resourceRights: p, roleExpected: d.right, action: d, children: /* @__PURE__ */ a(W, { id: d.id, type: "button", color: "primary", variant: "filled", onClick: () => {
293
293
  g(d);
@@ -297,7 +297,7 @@ function Ze() {
297
297
  E && /* @__PURE__ */ a(Ye, { isOpen: E, onCancel: U, onSuccess: Y }),
298
298
  i && S && /* @__PURE__ */ a(He, { isOpen: i, resourceId: S.assetId, onCancel: j, onSuccess: z }),
299
299
  h && /* @__PURE__ */ a(ze, { edit: !0, isOpen: h, onCancel: l, onSuccess: n }),
300
- R && S && /* @__PURE__ */ a(Ue, { mode: "update", isOpen: R, resourceId: S.assetId, updateResource: T, onCancel: y, onSuccess: I, children: (v, A, d, q, G) => r === "blog" && he("createPublic", t) && /* @__PURE__ */ a(Ee, { appCode: r, isUpdating: A, resource: v, watch: d, setValue: q, register: G }) }),
300
+ R && S && /* @__PURE__ */ a(Ue, { mode: "update", isOpen: R, resourceId: S.assetId, updateResource: T, onCancel: y, onSuccess: I, children: (A, v, d, q, G) => r === "blog" && he("createPublic", t) && /* @__PURE__ */ a(Ee, { appCode: r, isUpdating: v, resource: A, watch: d, setValue: q, register: G }) }),
301
301
  M && S && /* @__PURE__ */ a(Oe, { isOpen: M, shareResource: V, shareOptions: {
302
302
  resourceCreatorId: S.creatorId,
303
303
  resourceId: S.assetId,
@@ -12,10 +12,10 @@ function P({
12
12
  onClose: s
13
13
  }) {
14
14
  var b;
15
- const l = k(), r = z(), c = A(), f = H(), u = t ? (b = l[0]) == null ? void 0 : b.name : void 0, {
15
+ const n = k(), r = z(), c = A(), f = H(), u = t ? (b = n[0]) == null ? void 0 : b.name : void 0, {
16
16
  reset: o,
17
17
  register: p,
18
- handleSubmit: n,
18
+ handleSubmit: l,
19
19
  setFocus: h,
20
20
  formState: {
21
21
  errors: F,
@@ -34,7 +34,7 @@ function P({
34
34
  var g;
35
35
  try {
36
36
  if (t) {
37
- const d = (g = l[0]) == null ? void 0 : g.parentId, E = l[0].id;
37
+ const d = (g = n[0]) == null ? void 0 : g.parentId, E = n[0].id;
38
38
  await f.mutate({
39
39
  folderId: E,
40
40
  parentId: d,
@@ -62,7 +62,7 @@ function P({
62
62
  isValid: v,
63
63
  register: p,
64
64
  setFocus: h,
65
- handleSubmit: n,
65
+ handleSubmit: l,
66
66
  onCancel: D,
67
67
  onSubmit: L
68
68
  };
@@ -71,7 +71,7 @@ function Z({
71
71
  isOpen: t,
72
72
  edit: e,
73
73
  onSuccess: s,
74
- onCancel: l
74
+ onCancel: n
75
75
  }) {
76
76
  const {
77
77
  t: r
@@ -81,19 +81,19 @@ function Z({
81
81
  isSubmitting: u,
82
82
  formId: o,
83
83
  onSubmit: p,
84
- onCancel: n,
84
+ onCancel: l,
85
85
  handleSubmit: h,
86
86
  register: F,
87
87
  setFocus: i
88
88
  } = P({
89
89
  edit: e,
90
90
  onSuccess: s,
91
- onClose: l
91
+ onClose: n
92
92
  });
93
93
  return q(() => {
94
94
  t && i("name");
95
- }, [t, i]), t ? /* @__PURE__ */ T(/* @__PURE__ */ x(m, { isOpen: t, onModalClose: n, id: "modal_" + o, children: [
96
- /* @__PURE__ */ a(m.Header, { onModalClose: n, children: r(e ? "explorer.rename.folder" : "explorer.create.folder") }),
95
+ }, [t, i]), t ? /* @__PURE__ */ T(/* @__PURE__ */ x(m, { isOpen: t, onModalClose: l, id: "modal_" + o, children: [
96
+ /* @__PURE__ */ a(m.Header, { onModalClose: l, children: r(e ? "explorer.rename.folder" : "explorer.create.folder") }),
97
97
  /* @__PURE__ */ a(m.Body, { children: /* @__PURE__ */ a("form", { id: o, onSubmit: h(p), children: /* @__PURE__ */ x(B, { id: "nameFolder", isRequired: !0, children: [
98
98
  /* @__PURE__ */ a(w, { children: r("explorer.create.folder.name") }),
99
99
  /* @__PURE__ */ a(R, { type: "text", ...F("name", {
@@ -106,7 +106,7 @@ function Z({
106
106
  }), placeholder: r("explorer.create.folder.name"), size: "md", "aria-required": !0, maxLength: 60 })
107
107
  ] }) }) }),
108
108
  /* @__PURE__ */ x(m.Footer, { children: [
109
- /* @__PURE__ */ a(C, { color: "tertiary", onClick: n, type: "button", variant: "ghost", children: r("explorer.cancel") }),
109
+ /* @__PURE__ */ a(C, { color: "tertiary", onClick: l, type: "button", variant: "ghost", children: r("explorer.cancel") }),
110
110
  /* @__PURE__ */ a(C, { form: o, type: "submit", color: "primary", variant: "filled", disabled: !c || !f || u, children: r(e ? "explorer.rename" : "explorer.create") })
111
111
  ] })
112
112
  ] }), document.getElementById("portal")) : null;
package/lib/MoveModal.js CHANGED
@@ -8,20 +8,20 @@ import { y as D, j as E, i as j, z as k, a as U } from "./index2.js";
8
8
  function O({
9
9
  onSuccess: a
10
10
  }) {
11
- const [i, n] = B(), u = A(), o = D(), h = E(), p = j(), d = k(), {
11
+ const [d, n] = B(), u = A(), o = D(), h = E(), p = j(), i = k(), {
12
12
  fetchTreeData: v
13
13
  } = U();
14
14
  async function y() {
15
15
  try {
16
- if (!i) throw new Error("explorer.move.selection.empty");
17
- await o.mutate(i), await (a == null ? void 0 : a());
16
+ if (!d) throw new Error("explorer.move.selection.empty");
17
+ await o.mutate(d), await (a == null ? void 0 : a());
18
18
  } catch (r) {
19
19
  console.error(r);
20
20
  }
21
21
  }
22
22
  const I = (r) => {
23
23
  var f, c;
24
- const t = C(d, r);
24
+ const t = C(i, r);
25
25
  for (const e of h)
26
26
  if (r === e.id || r === e.parentId || (f = e.childrenIds) != null && f.includes(r) || t.includes(e.id))
27
27
  return !1;
@@ -31,14 +31,14 @@ function O({
31
31
  return !0;
32
32
  };
33
33
  return {
34
- treeData: d,
35
- disableSubmit: !i,
34
+ treeData: i,
35
+ disableSubmit: !d,
36
36
  handleTreeItemSelect: (r) => {
37
37
  I(r) ? n(r) : n(void 0);
38
38
  },
39
39
  handleOnTreeItemUnfold: (r) => {
40
40
  var c, e;
41
- const t = x(d, r), f = (c = t == null ? void 0 : t.children) == null ? void 0 : c.some((l) => {
41
+ const t = x(i, r), f = (c = t == null ? void 0 : t.children) == null ? void 0 : c.some((l) => {
42
42
  var M;
43
43
  return Array.isArray(l == null ? void 0 : l.children) && ((M = l.children) == null ? void 0 : M.length) > 0;
44
44
  });
@@ -51,7 +51,7 @@ function O({
51
51
  }
52
52
  function W({
53
53
  isOpen: a,
54
- onSuccess: i,
54
+ onSuccess: d,
55
55
  onCancel: n
56
56
  }) {
57
57
  const {
@@ -61,11 +61,11 @@ function W({
61
61
  } = w(), {
62
62
  treeData: h,
63
63
  handleTreeItemSelect: p,
64
- handleOnTreeItemUnfold: d,
64
+ handleOnTreeItemUnfold: i,
65
65
  onMove: v,
66
66
  disableSubmit: y
67
67
  } = O({
68
- onSuccess: i
68
+ onSuccess: d
69
69
  }), I = {
70
70
  ...h,
71
71
  name: o("explorer.filters.mine", {
@@ -75,7 +75,7 @@ function W({
75
75
  return /* @__PURE__ */ g(/* @__PURE__ */ T(m, { isOpen: a, onModalClose: n, id: "moveModal", children: [
76
76
  /* @__PURE__ */ s(m.Header, { onModalClose: n, children: o("explorer.move.title") }),
77
77
  /* @__PURE__ */ s(m.Subtitle, { children: o("explorer.move.subtitle") }),
78
- /* @__PURE__ */ s(m.Body, { children: /* @__PURE__ */ s(F, { data: I, onTreeItemClick: p, onTreeItemUnfold: d }) }),
78
+ /* @__PURE__ */ s(m.Body, { children: /* @__PURE__ */ s(F, { data: I, onTreeItemClick: p, onTreeItemUnfold: i }) }),
79
79
  /* @__PURE__ */ T(m.Footer, { children: [
80
80
  /* @__PURE__ */ s(b, { color: "tertiary", onClick: n, type: "button", variant: "ghost", children: o("explorer.cancel") }),
81
81
  /* @__PURE__ */ s(b, { color: "primary", onClick: v, type: "button", variant: "filled", disabled: y, children: o("explorer.move") })
@@ -8,78 +8,78 @@ import { f as z, o as W, e as X, h as Y, i as Z, a as ee } from "./index2.js";
8
8
  import { useDraggable as ie } from "@dnd-kit/core";
9
9
  import { S as te, D as ae } from "./DraggableCard.js";
10
10
  const le = ({
11
- title: t,
11
+ title: a,
12
12
  titleId: e,
13
13
  ...s
14
14
  }) => /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": e, ...s, children: [
15
- t ? /* @__PURE__ */ i("title", { id: e, children: t }) : null,
15
+ a ? /* @__PURE__ */ i("title", { id: e, children: a }) : null,
16
16
  /* @__PURE__ */ i("path", { fill: "currentColor", fillRule: "evenodd", d: "M9.726 3.29A9.01 9.01 0 0 0 3.055 11H7.05a16.3 16.3 0 0 1 2.676-7.71m4.548 0A16.3 16.3 0 0 1 16.95 11h3.995a9.01 9.01 0 0 0-6.67-7.71m.668 7.71A14.3 14.3 0 0 0 12 3.55 14.3 14.3 0 0 0 9.058 11zm-5.884 2h5.884A14.3 14.3 0 0 1 12 20.45 14.3 14.3 0 0 1 9.058 13M7.05 13H3.055a9.01 9.01 0 0 0 6.67 7.71A16.3 16.3 0 0 1 7.05 13m7.224 7.71A16.3 16.3 0 0 0 16.95 13h3.995a9.01 9.01 0 0 1-6.67 7.71M12 23c6.075 0 11-4.925 11-11S18.075 1 12 1 1 5.925 1 12s4.925 11 11 11", clipRule: "evenodd" })
17
17
  ] }), ne = ({
18
- title: t,
18
+ title: a,
19
19
  titleId: e,
20
20
  ...s
21
21
  }) => /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": e, ...s, children: [
22
- t ? /* @__PURE__ */ i("title", { id: e, children: t }) : null,
22
+ a ? /* @__PURE__ */ i("title", { id: e, children: a }) : null,
23
23
  /* @__PURE__ */ i("g", { fill: "currentColor", fillRule: "evenodd", clipPath: "url(#icon-users_svg__a)", clipRule: "evenodd", children: /* @__PURE__ */ i("path", { d: "M19.055 12.803a1 1 0 0 1 1.272-.618c1.128.39 2.061 1.247 2.7 2.351.64 1.106.972 2.435.973 3.782V21a1 1 0 1 1-2 0v-2.681c0-1.03-.258-2.009-.704-2.782-.448-.773-1.034-1.258-1.623-1.462a1 1 0 0 1-.618-1.272M15.187 1.384a1 1 0 0 1 1.036-.962 5.129 5.129 0 0 1 2.11 9.71 1 1 0 1 1-.896-1.788 3.129 3.129 0 0 0-1.288-5.924 1 1 0 0 1-.962-1.036M1.505 15.694C2.481 14.622 3.825 14 5.25 14h8.5c1.424 0 2.769.622 3.744 1.694.974 1.068 1.506 2.498 1.506 3.973V22a1 1 0 1 1-2 0v-2.333c0-1.001-.363-1.945-.984-2.627-.618-.679-1.436-1.04-2.266-1.04h-8.5c-.83 0-1.648.361-2.266 1.04-.621.682-.984 1.626-.984 2.627V22a1 1 0 1 1-2 0v-2.333c0-1.475.533-2.905 1.505-3.974M9.5 3a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7M4 6.5a5.5 5.5 0 1 1 11 0 5.5 5.5 0 0 1-11 0" }) }),
24
24
  /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "icon-users_svg__a", children: /* @__PURE__ */ i("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
25
25
  ] }), se = ({
26
- title: t,
26
+ title: a,
27
27
  titleId: e,
28
28
  ...s
29
29
  }) => /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: "24", height: "24", "aria-hidden": "true", "aria-labelledby": e, ...s, children: [
30
- t ? /* @__PURE__ */ i("title", { id: e, children: t }) : null,
30
+ a ? /* @__PURE__ */ i("title", { id: e, children: a }) : null,
31
31
  /* @__PURE__ */ i("g", { clipPath: "url(#icon-one-profile_svg__a)", children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24m0 4.65a4.26 4.26 0 1 1 0 8.51 4.26 4.26 0 0 1 0-8.51m0 16.64a9.27 9.27 0 0 1-7.09-3.3 5.4 5.4 0 0 1 4.77-2.9c.11 0 .23.03.34.06.63.2 1.29.33 1.98.33.7 0 1.35-.13 1.98-.33.11-.03.23-.05.34-.05a5.4 5.4 0 0 1 4.77 2.89 9.27 9.27 0 0 1-7.09 3.3" }) }),
32
32
  /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "icon-one-profile_svg__a", children: /* @__PURE__ */ i("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
33
33
  ] }), B = ({
34
- app: t,
34
+ app: a,
35
35
  resource: e,
36
36
  time: s,
37
- isSelected: x = !1,
38
- isSelectable: b = !0,
37
+ isSelected: u = !1,
38
+ isSelectable: x = !0,
39
39
  onClick: m,
40
- onSelect: r
40
+ onSelect: o
41
41
  }) => {
42
- const [d, g] = O(!1), p = z(), {
43
- lg: f
44
- } = j(), v = `/userbook/avatar/${e == null ? void 0 : e.creatorId}`;
45
- function w(l) {
42
+ const [d, g] = O(!1), {
43
+ lg: r
44
+ } = j(), p = `/userbook/avatar/${e == null ? void 0 : e.creatorId}`;
45
+ function b(l) {
46
46
  const {
47
47
  rights: N,
48
48
  creatorId: M
49
49
  } = l || {};
50
50
  return N.filter((C) => !C.includes(M)).length >= 1;
51
51
  }
52
- const {
53
- attributes: R,
54
- listeners: _,
55
- setNodeRef: S,
56
- transform: c
52
+ const w = z(), R = b(e), _ = e == null ? void 0 : e.public, f = W(), {
53
+ t: v
54
+ } = T(), {
55
+ attributes: S,
56
+ listeners: y,
57
+ setNodeRef: I,
58
+ transform: t
57
59
  } = ie({
58
60
  id: e.id,
59
61
  data: {
60
62
  id: e.id,
61
63
  type: "resource"
62
64
  },
63
- disabled: !!p || !f
64
- }), y = w(e), I = e == null ? void 0 : e.public, u = W(), {
65
- t: a
66
- } = T(), o = {
65
+ disabled: !!w || !r
66
+ }), c = {
67
67
  position: d ? "absolute" : "relative",
68
68
  zIndex: d ? 2e3 : 1,
69
- transform: `translate3d(${((c == null ? void 0 : c.x) ?? 0) / 1}px, ${((c == null ? void 0 : c.y) ?? 0) / 1}px, 0)`
69
+ transform: `translate3d(${((t == null ? void 0 : t.x) ?? 0) / 1}px, ${((t == null ? void 0 : t.y) ?? 0) / 1}px, 0)`
70
70
  };
71
71
  return H(() => {
72
- const l = u.elementDrag === e.id;
72
+ const l = f.elementDrag === e.id;
73
73
  g(l);
74
- }, [u]), /* @__PURE__ */ i("div", { ref: S, style: {
75
- ...o
76
- }, children: d ? /* @__PURE__ */ i(ae, { app: t, type: "resource", name: e == null ? void 0 : e.name }) : /* @__PURE__ */ i(h, { app: t, isSelected: !d && x, isSelectable: !d && b, onClick: m, onSelect: r, children: (l) => /* @__PURE__ */ n(k, { children: [
77
- !d && f && /* @__PURE__ */ i("div", { className: "card-header z-3", style: {
74
+ }, [f]), /* @__PURE__ */ i("div", { ref: I, style: {
75
+ ...c
76
+ }, children: d ? /* @__PURE__ */ i(ae, { app: a, type: "resource", name: e == null ? void 0 : e.name }) : /* @__PURE__ */ i(h, { app: a, isSelected: !d && u, isSelectable: !d && x, onClick: m, onSelect: o, children: (l) => /* @__PURE__ */ n(k, { children: [
77
+ !d && r && /* @__PURE__ */ i("div", { className: "card-header z-3", style: {
78
78
  position: "fixed",
79
79
  left: "37px"
80
- }, children: /* @__PURE__ */ i(V, { ..._, ...R, className: "bg-white z-3", color: "secondary", icon: /* @__PURE__ */ i(te, {}), variant: "ghost" }) }),
80
+ }, children: /* @__PURE__ */ i(V, { ...y, ...S, className: "bg-white z-3", color: "secondary", icon: /* @__PURE__ */ i(te, {}), variant: "ghost" }) }),
81
81
  /* @__PURE__ */ n(h.Body, { children: [
82
- /* @__PURE__ */ i("div", { className: "card-image medium", children: e != null && e.thumbnail ? /* @__PURE__ */ i(E, { alt: "", src: `${e == null ? void 0 : e.thumbnail}?thumbnail=80x80`, objectFit: "cover", className: "h-full w-100" }) : /* @__PURE__ */ i(G, { app: t, iconFit: "ratio", size: "80", variant: "rounded" }) }),
82
+ /* @__PURE__ */ i("div", { className: "card-image medium", children: e != null && e.thumbnail ? /* @__PURE__ */ i(E, { alt: "", src: `${e == null ? void 0 : e.thumbnail}?thumbnail=80x80`, objectFit: "cover", className: "h-full w-100" }) : /* @__PURE__ */ i(G, { app: a, iconFit: "ratio", size: "80", variant: "rounded" }) }),
83
83
  /* @__PURE__ */ n("div", { className: "text-truncate", children: [
84
84
  /* @__PURE__ */ i(h.Title, { children: e == null ? void 0 : e.name }),
85
85
  /* @__PURE__ */ i(h.Text, { children: /* @__PURE__ */ i("em", { children: s }) })
@@ -87,14 +87,14 @@ const le = ({
87
87
  ] }),
88
88
  /* @__PURE__ */ n(h.Footer, { children: [
89
89
  /* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8 text-truncate", children: [
90
- v ? /* @__PURE__ */ i(L, { alt: (e == null ? void 0 : e.creatorName) || "", size: "xs", src: v, variant: "circle", width: "24", height: "24" }) : /* @__PURE__ */ i(se, {}),
90
+ p ? /* @__PURE__ */ i(L, { alt: (e == null ? void 0 : e.creatorName) || "", size: "xs", src: p, variant: "circle", width: "24", height: "24" }) : /* @__PURE__ */ i(se, {}),
91
91
  /* @__PURE__ */ i(h.Text, { children: e == null ? void 0 : e.creatorName })
92
92
  ] }),
93
93
  /* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8", children: [
94
- y && /* @__PURE__ */ i(F, { message: a("tooltip.shared", {
94
+ R && /* @__PURE__ */ i(F, { message: v("tooltip.shared", {
95
95
  ns: l
96
96
  }), placement: "top", children: /* @__PURE__ */ i(ne, { width: 16, height: 16 }) }),
97
- I && /* @__PURE__ */ i(F, { message: a("tooltip.public", {
97
+ _ && /* @__PURE__ */ i(F, { message: v("tooltip.public", {
98
98
  ns: l
99
99
  }), placement: "top", children: /* @__PURE__ */ i(le, { width: 16, height: 16 }) })
100
100
  ] })
@@ -103,20 +103,20 @@ const le = ({
103
103
  };
104
104
  B.displayName = "ResourceCard";
105
105
  const ve = ({
106
- data: t,
106
+ data: a,
107
107
  fetchNextPage: e
108
108
  }) => {
109
109
  const {
110
110
  currentApp: s
111
111
  } = U(), {
112
- t: x
112
+ t: u
113
113
  } = T(), {
114
- fromNow: b
115
- } = q(), m = X(), r = Y(), d = Z(), {
114
+ fromNow: x
115
+ } = q(), m = X(), o = Y(), d = Z(), {
116
116
  setSelectedResources: g,
117
- setResourceIds: p,
118
- openResource: f,
119
- setResourceIsTrash: v
117
+ setResourceIds: r,
118
+ openResource: p,
119
+ setResourceIsTrash: b
120
120
  } = ee(), w = z(), R = K({
121
121
  from: {
122
122
  opacity: 0
@@ -124,33 +124,33 @@ const ve = ({
124
124
  to: {
125
125
  opacity: 1
126
126
  }
127
- }), S = m.pagination.startIdx + m.pagination.pageSize < (m.pagination.maxIdx || 0), c = $(() => {
127
+ }), f = m.pagination.startIdx + m.pagination.pageSize < (m.pagination.maxIdx || 0), v = $(() => {
128
128
  e();
129
- }, []), y = (a) => {
130
- w ? (v(!0), p([a.id]), g([a])) : f(a);
129
+ }, []), S = (t) => {
130
+ w ? (b(!0), r([t.id]), g([t])) : p(t);
131
131
  };
132
- async function I(a) {
133
- if (r.includes(a.id)) {
134
- p(r.filter((o) => o !== a.id)), g(d.filter((o) => o.id !== a.id));
132
+ async function y(t) {
133
+ if (o.includes(t.id)) {
134
+ r(o.filter((c) => c !== t.id)), g(d.filter((c) => c.id !== t.id));
135
135
  return;
136
136
  }
137
- p([...r, a.id]), g([...d, a]);
137
+ r([...o, t.id]), g([...d, t]);
138
138
  }
139
- const u = Q("grid ps-0 list-unstyled");
139
+ const I = Q("grid ps-0 list-unstyled");
140
140
  return /* @__PURE__ */ n(D.Fragment, { children: [
141
- /* @__PURE__ */ i(P.ul, { className: u, children: t == null ? void 0 : t.pages.map((a, o) => /* @__PURE__ */ i(D.Fragment, { children: a.resources.map((l) => {
141
+ /* @__PURE__ */ i(P.ul, { className: I, children: a == null ? void 0 : a.pages.map((t, c) => /* @__PURE__ */ i(D.Fragment, { children: t.resources.map((l) => {
142
142
  const {
143
143
  id: N,
144
144
  updatedAt: M
145
- } = l, A = b(M);
145
+ } = l, A = x(M);
146
146
  return /* @__PURE__ */ i(P.li, { className: "g-col-4", style: {
147
147
  position: "relative",
148
148
  ...R
149
- }, children: /* @__PURE__ */ i(B, { app: s, resource: l, time: A, isSelectable: !0, isSelected: r.includes(l.id), onClick: (C) => {
150
- C.stopPropagation(), y(l);
151
- }, onSelect: () => I(l) }) }, N);
152
- }) }, o)) }),
153
- S && /* @__PURE__ */ i("div", { className: "d-grid gap-2 col-4 mx-auto my-24", children: /* @__PURE__ */ i(J, { type: "button", color: "secondary", variant: "filled", onClick: c, children: x("explorer.see.more") }) })
149
+ }, children: /* @__PURE__ */ i(B, { app: s, resource: l, time: A, isSelectable: !0, isSelected: o.includes(l.id), onClick: (C) => {
150
+ C.stopPropagation(), S(l);
151
+ }, onSelect: () => y(l) }) }, N);
152
+ }) }, c)) }),
153
+ f && /* @__PURE__ */ i("div", { className: "d-grid gap-2 col-4 mx-auto my-24", children: /* @__PURE__ */ i(J, { type: "button", color: "secondary", variant: "filled", onClick: v, children: u("explorer.see.more") }) })
154
154
  ] });
155
155
  };
156
156
  export {