ode-explorer 2.0.0 → 2.1.0-develop.202501271724

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 (106) hide show
  1. package/dist/EcritureA-Romain-Orne.woff2 +0 -0
  2. package/dist/KGJuneBug.ttf +0 -0
  3. package/dist/OpenDyslexic.woff +0 -0
  4. package/dist/christmas.png +0 -0
  5. package/dist/circus.jpg +0 -0
  6. package/dist/desert.jpg +0 -0
  7. package/dist/hills.svg +360 -0
  8. package/dist/illu-blog.svg +1 -0
  9. package/dist/illu-collaborativewall.svg +1 -0
  10. package/dist/illu-empty-search-blog.svg +25 -0
  11. package/dist/illu-empty-search-blog2.svg +25 -0
  12. package/dist/illu-empty-search-collaborativewall.svg +25 -0
  13. package/dist/illu-empty-search-collaborativewall2.svg +25 -0
  14. package/dist/illu-empty-search-formulaire.svg +27 -0
  15. package/dist/illu-empty-search-formulaire2.svg +27 -0
  16. package/dist/illu-empty-search-forum.svg +25 -0
  17. package/dist/illu-empty-search-forum2.svg +25 -0
  18. package/dist/illu-empty-search-homeworks.svg +25 -0
  19. package/dist/illu-empty-search-homeworks2.svg +25 -0
  20. package/dist/illu-empty-search-wiki.svg +26 -0
  21. package/dist/illu-empty-search-wiki2.svg +26 -0
  22. package/dist/illu-empty-search.svg +62 -0
  23. package/dist/illu-empty-search2.svg +62 -0
  24. package/dist/illu-error.svg +60 -0
  25. package/dist/illu-exercizer.svg +1 -0
  26. package/dist/illu-mindmap.svg +1 -0
  27. package/dist/illu-no-content-in-folder.svg +31 -0
  28. package/dist/illu-pad.svg +1 -0
  29. package/dist/illu-scrapbook.svg +1 -0
  30. package/dist/illu-search.svg +1 -0
  31. package/dist/illu-timeline.svg +1 -0
  32. package/dist/illu-timelinegenerator.svg +1 -0
  33. package/dist/illu-trash-delete.svg +22 -0
  34. package/dist/illu-trash.svg +1 -0
  35. package/dist/illu-wiki.svg +104 -0
  36. package/dist/image-library.svg +188 -0
  37. package/dist/image-library2.svg +188 -0
  38. package/dist/image-placeholder.png +0 -0
  39. package/dist/index.html +1 -1
  40. package/dist/index.js +226 -221
  41. package/dist/ocean.jpg +0 -0
  42. package/dist/panda.jpg +0 -0
  43. package/dist/screen-loading.gif +0 -0
  44. package/dist/sparkly.jpg +0 -0
  45. package/dist/style.css +1 -0
  46. package/lib/ActionBarContainer.js +14 -14
  47. package/lib/AppAction.js +16 -16
  48. package/lib/DeleteModal.js +1 -1
  49. package/lib/DisableModal.js +1 -1
  50. package/lib/DraggableCard.js +33 -15
  51. package/lib/EmptyScreenApp.js +42 -33
  52. package/lib/EmptyScreenError.js +10 -9
  53. package/lib/EmptyScreenNoContentInFolder.js +9 -8
  54. package/lib/EmptyScreenSearch.js +7 -6
  55. package/lib/EmptyScreenTrash.js +7 -6
  56. package/lib/ExportModal.js +1 -1
  57. package/lib/FolderModal.js +12 -12
  58. package/lib/FoldersList.js +60 -55
  59. package/lib/Library.js +37 -23
  60. package/lib/MoveModal.js +6 -6
  61. package/lib/OnboardingModal.js +2 -2
  62. package/lib/PublishModal.js +2 -2
  63. package/lib/ResourceModal.js +2 -2
  64. package/lib/ResourcesList.js +125 -100
  65. package/lib/TrashModal.js +1 -1
  66. package/lib/components/OnboardingModal.d.ts +1 -1
  67. package/lib/config/explorer.d.ts +1 -1
  68. package/lib/dynamic-import-helper.js +16 -0
  69. package/lib/features/AccessControl/AccessControl.d.ts +1 -1
  70. package/lib/features/AccessControl/useAccessControl.d.ts +1 -1
  71. package/lib/features/ActionBar/Move/useMoveModal.d.ts +1 -1
  72. package/lib/features/ActionBar/Publish/PublishModal.d.ts +1 -1
  73. package/lib/features/ActionBar/Resource/ResourceModal.d.ts +1 -1
  74. package/lib/features/ActionBar/Share/ShareModal.d.ts +1 -1
  75. package/lib/features/ActionBar/useActionBar.d.ts +2 -2
  76. package/lib/features/List/DraggableCard.d.ts +1 -1
  77. package/lib/features/List/FolderCard.d.ts +2 -2
  78. package/lib/features/List/FoldersList.d.ts +1 -1
  79. package/lib/features/List/ResourceCard.d.ts +2 -2
  80. package/lib/features/List/ResourcesList.d.ts +1 -1
  81. package/lib/illu-blog.js +4 -0
  82. package/lib/illu-collaborativeeditor.js +4 -0
  83. package/lib/illu-collaborativewall.js +4 -0
  84. package/lib/illu-error.js +4 -0
  85. package/lib/illu-exercizer.js +4 -0
  86. package/lib/illu-mindmap.js +4 -0
  87. package/lib/illu-no-content-in-folder.js +4 -0
  88. package/lib/illu-pad.js +4 -0
  89. package/lib/illu-scrapbook.js +4 -0
  90. package/lib/illu-search.js +4 -0
  91. package/lib/illu-timeline.js +4 -0
  92. package/lib/illu-timelinegenerator.js +4 -0
  93. package/lib/illu-trash.js +4 -0
  94. package/lib/illu-wiki.js +4 -0
  95. package/lib/image-library.js +4 -0
  96. package/lib/image-library2.js +4 -0
  97. package/lib/index2.js +586 -557
  98. package/lib/services/api/index.d.ts +14 -14
  99. package/lib/services/queries/actions.d.ts +4 -7
  100. package/lib/services/queries/index.d.ts +9 -9
  101. package/lib/services/resource/service.d.ts +1 -1
  102. package/lib/store/index.d.ts +2 -2
  103. package/lib/utils/getChildrenIds.d.ts +1 -1
  104. package/lib/utils/isResourceShared.d.ts +1 -1
  105. package/package.json +6 -7
  106. package/dist/version.txt +0 -1
@@ -1,84 +1,89 @@
1
- import { jsx as t, jsxs as N } from "react/jsx-runtime";
2
- import { useBreakpoint as R, Card as S, useScrollToTop as k, useOdeClient as w } from "@edifice-ui/react";
3
- import { useSpring as $, animated as v } from "@react-spring/web";
4
- import { useQueryClient as j } from "@tanstack/react-query";
5
- import { o as C, s as z, j as A, k as B, a as E } from "./index2.js";
6
- import { useState as q, useId as L, useEffect as M } from "react";
7
- import { useDroppable as P, useDraggable as Q } from "@dnd-kit/core";
8
- import { Files as G } from "@edifice-ui/icons";
9
- import { D as H } from "./DraggableCard.js";
10
- const O = ({
1
+ import { jsx as s, jsxs as S, Fragment as R } from "react/jsx-runtime";
2
+ import { useBreakpoint as w, Card as v, IconButton as k, useScrollToTop as z, useEdificeClient as $ } from "@edifice.io/react";
3
+ import { useSpring as j, animated as C } from "@react-spring/web";
4
+ import { useQueryClient as B } from "@tanstack/react-query";
5
+ import { o as x, s as E, j as A, k as M, a as q } from "./index2.js";
6
+ import { useState as L, useId as P, useEffect as Q } from "react";
7
+ import { useDroppable as G, useDraggable as H } from "@dnd-kit/core";
8
+ import { S as J, a as K, D as U } from "./DraggableCard.js";
9
+ const N = ({
11
10
  app: r,
12
- name: c,
11
+ name: n,
13
12
  idFolder: l,
14
13
  isSelected: i = !1,
15
- isSelectable: m = !0,
14
+ isSelectable: h = !0,
16
15
  onClick: D,
17
16
  onSelect: b
18
17
  }) => {
19
- const [o, a] = q(!1), p = L(), {
20
- lg: F
21
- } = R(), {
22
- setNodeRef: y
23
- } = P({
18
+ const [t, a] = L(!1), p = P(), {
19
+ lg: g
20
+ } = w(), {
21
+ setNodeRef: I
22
+ } = G({
24
23
  id: p,
25
24
  data: {
26
25
  id: l,
27
- name: c,
26
+ name: n,
28
27
  isTreeview: !1,
29
28
  accepts: ["folder", "resource"]
30
29
  }
31
30
  }), {
32
- attributes: I,
31
+ attributes: y,
33
32
  listeners: u,
34
- setNodeRef: g,
33
+ setNodeRef: f,
35
34
  transform: e
36
- } = Q({
35
+ } = H({
37
36
  id: p,
38
37
  data: {
39
38
  id: l,
40
39
  type: "folder"
41
40
  },
42
- disabled: !F
43
- }), s = C(), d = z(), h = (n) => {
44
- g(n), y(n);
45
- }, f = d.overId === l, T = !d.canMove && d.isTreeview ? "no-drop" : o ? "grabbing" : "default", x = {
41
+ disabled: !g
42
+ }), o = x(), d = E(), F = (c) => {
43
+ f(c), I(c);
44
+ }, m = d.overId === l, O = !d.canMove && d.isTreeview ? "no-drop" : t ? "grabbing" : "default", T = {
46
45
  transform: `translate3d(${((e == null ? void 0 : e.x) ?? 0) / 1}px, ${((e == null ? void 0 : e.y) ?? 0) / 1}px, 0)`,
47
- cursor: T
46
+ cursor: O
48
47
  };
49
- return M(() => {
50
- const n = s.elementDrag === l;
51
- a(n);
52
- }, [s]), /* @__PURE__ */ t("div", { ref: h, ...u, ...I, style: {
53
- ...x
54
- }, children: o ? /* @__PURE__ */ t(H, { name: c, app: r, type: "folder" }) : /* @__PURE__ */ t(S, { app: r, isSelectable: !o && m, isSelected: !o && i || f && o, isFocused: f, onClick: D, onSelect: b, children: (n) => /* @__PURE__ */ N(S.Body, { children: [
55
- /* @__PURE__ */ t(G, { width: "48", height: "48", className: `color-app-${n}` }),
56
- /* @__PURE__ */ t(S.Title, { children: c })
48
+ return Q(() => {
49
+ const c = o.elementDrag === l;
50
+ a(c);
51
+ }, [o]), /* @__PURE__ */ s("div", { ref: F, style: {
52
+ ...T
53
+ }, children: t ? /* @__PURE__ */ s(U, { name: n, app: r, type: "folder" }) : /* @__PURE__ */ s(v, { app: r, isSelectable: !t && h, isSelected: !t && i || m && t, isFocused: m, onClick: D, onSelect: b, children: (c) => /* @__PURE__ */ S(R, { children: [
54
+ !t && g && /* @__PURE__ */ s("div", { className: "card-header z-3", style: {
55
+ position: "fixed",
56
+ left: "37px"
57
+ }, children: /* @__PURE__ */ s(k, { ...u, ...y, className: "bg-white z-3", color: "secondary", icon: /* @__PURE__ */ s(J, {}), variant: "ghost" }) }),
58
+ /* @__PURE__ */ S(v.Body, { children: [
59
+ /* @__PURE__ */ s(K, { width: "48", height: "48", className: `color-app-${c}` }),
60
+ /* @__PURE__ */ s(v.Title, { children: n })
61
+ ] })
57
62
  ] }) }) });
58
63
  };
59
- O.displayName = "FolderCard";
60
- const ee = ({
64
+ N.displayName = "FolderCard";
65
+ const oe = ({
61
66
  data: r
62
67
  }) => {
63
- var u, g;
64
- const c = j(), l = A(), i = B(), m = C(), D = k(), {
68
+ var u, f;
69
+ const n = B(), l = A(), i = M(), h = x(), D = z(), {
65
70
  currentApp: b
66
- } = w(), {
67
- setSelectedFolders: o,
71
+ } = $(), {
72
+ setSelectedFolders: t,
68
73
  setFolderIds: a,
69
74
  openFolder: p
70
- } = E();
71
- function F(e) {
72
- i.includes(e.id) ? (a(i.filter((s) => s !== e.id)), o(l.filter((s) => s.id !== e.id))) : (a([e.id, ...i]), o([e, ...l]));
75
+ } = q();
76
+ function g(e) {
77
+ i.includes(e.id) ? (a(i.filter((o) => o !== e.id)), t(l.filter((o) => o.id !== e.id))) : (a([e.id, ...i]), t([e, ...l]));
73
78
  }
74
- function y(e) {
79
+ function I(e) {
75
80
  D(), p({
76
81
  folder: e,
77
82
  folderId: e.id,
78
- queryClient: c
83
+ queryClient: n
79
84
  });
80
85
  }
81
- const I = $({
86
+ const y = j({
82
87
  from: {
83
88
  opacity: 0
84
89
  },
@@ -86,19 +91,19 @@ const ee = ({
86
91
  opacity: 1
87
92
  }
88
93
  });
89
- return (u = r == null ? void 0 : r.pages[0]) != null && u.folders.length ? /* @__PURE__ */ t(v.ul, { className: "grid ps-0 list-unstyled mb-24", children: (g = r == null ? void 0 : r.pages[0]) == null ? void 0 : g.folders.map((e) => {
94
+ return (u = r == null ? void 0 : r.pages[0]) != null && u.folders.length ? /* @__PURE__ */ s(C.ul, { className: "grid ps-0 list-unstyled mb-24", children: (f = r == null ? void 0 : r.pages[0]) == null ? void 0 : f.folders.map((e) => {
90
95
  const {
91
- id: s,
96
+ id: o,
92
97
  name: d
93
- } = e, h = m.elementDrag === s;
94
- return /* @__PURE__ */ t(v.li, { className: `g-col-4 ${h ? "z-2000" : "z-1"}`, style: {
98
+ } = e, F = h.elementDrag === o;
99
+ return /* @__PURE__ */ s(C.li, { className: `g-col-4 ${F ? "z-2000" : "z-1"}`, style: {
95
100
  position: "relative",
96
- ...I
97
- }, children: /* @__PURE__ */ t(O, { name: d, idFolder: s, app: b, isSelected: i.includes(e.id), onClick: (f) => {
98
- f.stopPropagation(), y(e);
99
- }, onSelect: () => F(e) }) }, s);
101
+ ...y
102
+ }, children: /* @__PURE__ */ s(N, { name: d, idFolder: o, app: b, isSelected: i.includes(e.id), onClick: (m) => {
103
+ m.stopPropagation(), I(e);
104
+ }, onSelect: () => g(e) }) }, o);
100
105
  }) }) : null;
101
106
  };
102
107
  export {
103
- ee as default
108
+ oe as default
104
109
  };
package/lib/Library.js CHANGED
@@ -1,33 +1,47 @@
1
- import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
- import { ArrowRight as o } from "@edifice-ui/icons";
3
- import { useOdeTheme as n, usePaths as s, useLibraryUrl as c, Image as m } from "@edifice-ui/react";
4
- import { useTranslation as p } from "react-i18next";
5
- import { odeServices as d } from "edifice-ts-client";
6
- const b = () => {
7
- const {
8
- theme: r
9
- } = n(), [l] = s(), e = c(), a = `${l}/${r == null ? void 0 : r.bootstrapVersion}/image-library.svg`;
10
- return {
11
- libraryUrl: e,
1
+ import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
+ import { useLibraryUrl as n, useEdificeTheme as s, Image as d } from "@edifice.io/react";
3
+ import { useTranslation as c } from "react-i18next";
4
+ import { _ as m } from "./dynamic-import-helper.js";
5
+ import { odeServices as p } from "@edifice.io/client";
6
+ import { useState as g, useEffect as b } from "react";
7
+ const u = ({
8
+ title: r,
9
+ titleId: e,
10
+ ...a
11
+ }) => /* @__PURE__ */ o("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, ...a, children: [
12
+ r ? /* @__PURE__ */ i("title", { id: e, children: r }) : null,
13
+ /* @__PURE__ */ i("path", { fill: "currentColor", fillRule: "evenodd", d: "M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1", clipRule: "evenodd" }),
14
+ /* @__PURE__ */ i("path", { fill: "currentColor", fillRule: "evenodd", d: "M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L17.586 12l-6.293-6.293a1 1 0 0 1 0-1.414", clipRule: "evenodd" })
15
+ ] }), f = () => {
16
+ const r = n(), {
17
+ theme: e
18
+ } = s(), [a, l] = g("");
19
+ return b(() => {
20
+ (async () => {
21
+ const t = await m(/* @__PURE__ */ Object.assign({ "../../../../node_modules/@edifice.io/bootstrap/dist/images/neo/image-library.svg": () => import("./image-library.js"), "../../../../node_modules/@edifice.io/bootstrap/dist/images/one/image-library.svg": () => import("./image-library2.js") }), `../../../../node_modules/@edifice.io/bootstrap/dist/images/${e == null ? void 0 : e.bootstrapVersion}/image-library.svg`, 11);
22
+ l(t.default);
23
+ })();
24
+ }, [e]), {
25
+ libraryUrl: r,
12
26
  imageFullURL: a,
13
27
  handleClick: () => {
14
- e && (window.open(e, "_blank"), d.data().trackAccessLibraryFromExplorer());
28
+ r && (window.open(r, "_blank"), p.data().trackAccessLibraryFromExplorer());
15
29
  }
16
30
  };
17
31
  }, k = () => {
18
32
  const {
19
33
  libraryUrl: r,
20
- imageFullURL: l,
21
- handleClick: e
22
- } = b(), {
23
- t: a
24
- } = p();
25
- return r && /* @__PURE__ */ t("div", { className: "p-16", children: [
26
- /* @__PURE__ */ i(m, { width: "270", height: "140", loading: "lazy", className: "rounded", src: l, alt: a("explorer.libray.img.alt") }),
27
- /* @__PURE__ */ i("p", { className: "m-8", children: a("explorer.libray.title") }),
28
- /* @__PURE__ */ t("button", { type: "button", onClick: e, rel: "noreferrer", className: "btn btn-ghost-primary d-inline-flex align-items-center gap-4 p-8", children: [
29
- /* @__PURE__ */ i("span", { children: a("explorer.libray.btn") }),
30
- /* @__PURE__ */ i(o, {})
34
+ imageFullURL: e,
35
+ handleClick: a
36
+ } = f(), {
37
+ t: l
38
+ } = c();
39
+ return r && /* @__PURE__ */ o("div", { className: "p-16", children: [
40
+ /* @__PURE__ */ i(d, { width: "270", height: "140", loading: "lazy", className: "rounded", src: e, alt: l("explorer.libray.img.alt") }),
41
+ /* @__PURE__ */ i("p", { className: "m-8", children: l("explorer.libray.title") }),
42
+ /* @__PURE__ */ o("button", { type: "button", onClick: a, rel: "noreferrer", className: "btn btn-ghost-primary d-inline-flex align-items-center gap-4 p-8", children: [
43
+ /* @__PURE__ */ i("span", { children: l("explorer.libray.btn") }),
44
+ /* @__PURE__ */ i(u, {})
31
45
  ] })
32
46
  ] });
33
47
  };
package/lib/MoveModal.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { jsxs as T, jsx as s } from "react/jsx-runtime";
2
- import { findNodeById as x, getAncestors as C, useOdeClient as S, Modal as m, TreeView as F, Button as b } from "@edifice-ui/react";
2
+ import { findNodeById as x, getAncestors as C, useEdificeClient as S, Modal as m, TreeView as F, Button as b } from "@edifice.io/react";
3
3
  import { createPortal as g } from "react-dom";
4
4
  import { useTranslation as w } from "react-i18next";
5
5
  import { useQueryClient as A } from "@tanstack/react-query";
6
6
  import { useState as B } from "react";
7
- import { y as D, j, i as k, z as E, a as O } from "./index2.js";
8
- function U({
7
+ import { y as D, j as E, i as j, z as k, a as U } from "./index2.js";
8
+ function O({
9
9
  onSuccess: a
10
10
  }) {
11
- const [d, n] = B(), u = A(), o = D(), h = j(), p = k(), i = E(), {
11
+ const [d, n] = B(), u = A(), o = D(), h = E(), p = j(), i = k(), {
12
12
  fetchTreeData: v
13
- } = O();
13
+ } = U();
14
14
  async function y() {
15
15
  try {
16
16
  if (!d) throw new Error("explorer.move.selection.empty");
@@ -64,7 +64,7 @@ function W({
64
64
  handleOnTreeItemUnfold: i,
65
65
  onMove: v,
66
66
  disableSubmit: y
67
- } = U({
67
+ } = O({
68
68
  onSuccess: d
69
69
  }), I = {
70
70
  ...h,
@@ -1,5 +1,5 @@
1
- import "@edifice-ui/react";
2
- import { OnboardingModal as n } from "@edifice-ui/react";
1
+ import "@edifice.io/react";
2
+ import { OnboardingModal as n } from "@edifice.io/react";
3
3
  export {
4
4
  n as default
5
5
  };
@@ -1,5 +1,5 @@
1
- import "@edifice-ui/react";
2
- import { PublishModal as d } from "@edifice-ui/react";
1
+ import "@edifice.io/react";
2
+ import { PublishModal as d } from "@edifice.io/react";
3
3
  export {
4
4
  d as default
5
5
  };
@@ -1,5 +1,5 @@
1
- import "@edifice-ui/react";
2
- import { ResourceModal as d } from "@edifice-ui/react";
1
+ import "@edifice.io/react";
2
+ import { ResourceModal as d } from "@edifice.io/react";
3
3
  export {
4
4
  d as default
5
5
  };
@@ -1,133 +1,158 @@
1
- import { jsx as e, jsxs as o, Fragment as j } from "react/jsx-runtime";
2
- import O, { useState as B, useEffect as M, useCallback as E } from "react";
3
- import { useBreakpoint as G, Card as r, Image as L, AppIcon as U, Avatar as q, Tooltip as P, useOdeClient as H, useDate as J, Button as K } from "@edifice-ui/react";
4
- import { useSpring as Q, animated as w } from "@react-spring/web";
5
- import V from "clsx";
6
- import { useTranslation as A } from "react-i18next";
7
- import { f as z, o as W, e as X, h as Y, i as Z, a as _ } from "./index2.js";
8
- import { useDraggable as tt } from "@dnd-kit/core";
9
- import { Users as et, Globe as it } from "@edifice-ui/icons";
10
- import { OneProfile as at } from "@edifice-ui/icons/nav";
11
- import { D as st } from "./DraggableCard.js";
12
- const $ = ({
13
- app: l,
14
- resource: t,
15
- time: x,
16
- isSelected: b = !1,
17
- isSelectable: u = !0,
18
- onClick: m,
19
- onSelect: c
1
+ import { jsxs as n, jsx as i, Fragment as k } from "react/jsx-runtime";
2
+ import D, { useState as O, useEffect as H, useCallback as $ } from "react";
3
+ import { useBreakpoint as j, Card as m, IconButton as V, Image as E, AppIcon as G, Avatar as L, Tooltip as F, useEdificeClient as U, useDate as q, Button as J } from "@edifice.io/react";
4
+ import { useSpring as K, animated as P } from "@react-spring/web";
5
+ import Q from "clsx";
6
+ import { useTranslation as T } from "react-i18next";
7
+ import { f as z, o as W, e as X, h as Y, i as Z, a as ee } from "./index2.js";
8
+ import { useDraggable as ie } from "@dnd-kit/core";
9
+ import { S as te, D as ae } from "./DraggableCard.js";
10
+ const le = ({
11
+ title: t,
12
+ titleId: e,
13
+ ...s
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,
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
+ ] }), ne = ({
18
+ title: t,
19
+ titleId: e,
20
+ ...s
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,
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
+ /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "icon-users_svg__a", children: /* @__PURE__ */ i("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
25
+ ] }), se = ({
26
+ title: t,
27
+ titleId: e,
28
+ ...s
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,
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
+ /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "icon-one-profile_svg__a", children: /* @__PURE__ */ i("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
33
+ ] }), B = ({
34
+ app: t,
35
+ resource: e,
36
+ time: s,
37
+ isSelected: x = !1,
38
+ isSelectable: b = !0,
39
+ onClick: g,
40
+ onSelect: r
20
41
  }) => {
21
- const [s, h] = B(!1), p = z(), {
22
- lg: R
23
- } = G(), g = `/userbook/avatar/${t == null ? void 0 : t.creatorId}`;
24
- function I(a) {
42
+ const [d, p] = O(!1), h = z(), {
43
+ lg: f
44
+ } = j(), v = `/userbook/avatar/${e == null ? void 0 : e.creatorId}`;
45
+ function w(l) {
25
46
  const {
26
- rights: D,
27
- creatorId: F
28
- } = a || {};
29
- return D.filter((T) => !T.includes(F)).length >= 1;
47
+ rights: N,
48
+ creatorId: M
49
+ } = l || {};
50
+ return N.filter((C) => !C.includes(M)).length >= 1;
30
51
  }
31
52
  const {
32
- attributes: v,
33
- listeners: C,
34
- setNodeRef: y,
35
- transform: n
36
- } = tt({
37
- id: t.id,
53
+ attributes: R,
54
+ listeners: _,
55
+ setNodeRef: S,
56
+ transform: c
57
+ } = ie({
58
+ id: e.id,
38
59
  data: {
39
- id: t.id,
60
+ id: e.id,
40
61
  type: "resource"
41
62
  },
42
- disabled: !!p || !R
43
- }), S = I(t), N = t == null ? void 0 : t.public, f = W(), {
44
- t: i
45
- } = A(), d = {
46
- position: s ? "absolute" : "relative",
47
- zIndex: s ? 2e3 : 1,
48
- transform: `translate3d(${((n == null ? void 0 : n.x) ?? 0) / 1}px, ${((n == null ? void 0 : n.y) ?? 0) / 1}px, 0)`
63
+ disabled: !!h || !f
64
+ }), y = w(e), I = e == null ? void 0 : e.public, u = W(), {
65
+ t: a
66
+ } = T(), o = {
67
+ position: d ? "absolute" : "relative",
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)`
49
70
  };
50
- return M(() => {
51
- const a = f.elementDrag === t.id;
52
- h(a);
53
- }, [f]), /* @__PURE__ */ e("div", { ref: y, ...C, ...v, style: {
54
- ...d
55
- }, children: s ? /* @__PURE__ */ e(st, { app: l, type: "resource", name: t == null ? void 0 : t.name }) : /* @__PURE__ */ e(r, { app: l, isSelected: !s && b, isSelectable: !s && u, onClick: m, onSelect: c, children: (a) => /* @__PURE__ */ o(j, { children: [
56
- /* @__PURE__ */ o(r.Body, { children: [
57
- /* @__PURE__ */ e("div", { className: "card-image medium", children: t != null && t.thumbnail ? /* @__PURE__ */ e(L, { alt: "", src: `${t == null ? void 0 : t.thumbnail}?thumbnail=80x80`, objectFit: "cover", className: "h-full w-100" }) : /* @__PURE__ */ e(U, { app: l, iconFit: "ratio", size: "80", variant: "rounded" }) }),
58
- /* @__PURE__ */ o("div", { className: "text-truncate", children: [
59
- /* @__PURE__ */ e(r.Title, { children: t == null ? void 0 : t.name }),
60
- /* @__PURE__ */ e(r.Text, { children: /* @__PURE__ */ e("em", { children: x }) })
71
+ return H(() => {
72
+ const l = u.elementDrag === e.id;
73
+ p(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(m, { app: t, isSelected: !d && x, isSelectable: !d && b, onClick: g, onSelect: r, children: (l) => /* @__PURE__ */ n(k, { children: [
77
+ !d && f && !h && /* @__PURE__ */ i("div", { className: "card-header z-3", style: {
78
+ position: "fixed",
79
+ left: "37px"
80
+ }, children: /* @__PURE__ */ i(V, { ..._, ...R, className: "bg-white z-3", color: "secondary", icon: /* @__PURE__ */ i(te, {}), variant: "ghost" }) }),
81
+ /* @__PURE__ */ n(m.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" }) }),
83
+ /* @__PURE__ */ n("div", { className: "text-truncate", children: [
84
+ /* @__PURE__ */ i(m.Title, { children: e == null ? void 0 : e.name }),
85
+ /* @__PURE__ */ i(m.Text, { children: /* @__PURE__ */ i("em", { children: s }) })
61
86
  ] })
62
87
  ] }),
63
- /* @__PURE__ */ o(r.Footer, { children: [
64
- /* @__PURE__ */ o("div", { className: "d-inline-flex align-items-center gap-8 text-truncate", children: [
65
- g ? /* @__PURE__ */ e(q, { alt: (t == null ? void 0 : t.creatorName) || "", size: "xs", src: g, variant: "circle", width: "24", height: "24" }) : /* @__PURE__ */ e(at, {}),
66
- /* @__PURE__ */ e(r.Text, { children: t == null ? void 0 : t.creatorName })
88
+ /* @__PURE__ */ n(m.Footer, { children: [
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, {}),
91
+ /* @__PURE__ */ i(m.Text, { children: e == null ? void 0 : e.creatorName })
67
92
  ] }),
68
- /* @__PURE__ */ o("div", { className: "d-inline-flex align-items-center gap-8", children: [
69
- S && /* @__PURE__ */ e(P, { message: i("tooltip.shared", {
70
- ns: a
71
- }), placement: "top", children: /* @__PURE__ */ e(et, { width: 16, height: 16 }) }),
72
- N && /* @__PURE__ */ e(P, { message: i("tooltip.public", {
73
- ns: a
74
- }), placement: "top", children: /* @__PURE__ */ e(it, { width: 16, height: 16 }) })
93
+ /* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8", children: [
94
+ y && /* @__PURE__ */ i(F, { message: a("tooltip.shared", {
95
+ ns: l
96
+ }), placement: "top", children: /* @__PURE__ */ i(ne, { width: 16, height: 16 }) }),
97
+ I && /* @__PURE__ */ i(F, { message: a("tooltip.public", {
98
+ ns: l
99
+ }), placement: "top", children: /* @__PURE__ */ i(le, { width: 16, height: 16 }) })
75
100
  ] })
76
101
  ] })
77
102
  ] }) }) });
78
103
  };
79
- $.displayName = "ResourceCard";
80
- const xt = ({
81
- data: l,
82
- fetchNextPage: t
104
+ B.displayName = "ResourceCard";
105
+ const ve = ({
106
+ data: t,
107
+ fetchNextPage: e
83
108
  }) => {
84
109
  const {
85
- currentApp: x
86
- } = H(), {
87
- t: b
88
- } = A(), {
89
- fromNow: u
90
- } = J(), m = X(), c = Y(), s = Z(), {
91
- setSelectedResources: h,
92
- setResourceIds: p,
93
- openResource: R,
94
- setResourceIsTrash: g
95
- } = _(), I = z(), v = Q({
110
+ currentApp: s
111
+ } = U(), {
112
+ t: x
113
+ } = T(), {
114
+ fromNow: b
115
+ } = q(), g = X(), r = Y(), d = Z(), {
116
+ setSelectedResources: p,
117
+ setResourceIds: h,
118
+ openResource: f,
119
+ setResourceIsTrash: v
120
+ } = ee(), w = z(), R = K({
96
121
  from: {
97
122
  opacity: 0
98
123
  },
99
124
  to: {
100
125
  opacity: 1
101
126
  }
102
- }), y = m.pagination.startIdx + m.pagination.pageSize < (m.pagination.maxIdx || 0), n = E(() => {
103
- t();
104
- }, []), S = (i) => {
105
- I ? (g(!0), p([i.id]), h([i])) : R(i);
127
+ }), S = g.pagination.startIdx + g.pagination.pageSize < (g.pagination.maxIdx || 0), c = $(() => {
128
+ e();
129
+ }, []), y = (a) => {
130
+ w ? (v(!0), h([a.id]), p([a])) : f(a);
106
131
  };
107
- async function N(i) {
108
- if (c.includes(i.id)) {
109
- p(c.filter((d) => d !== i.id)), h(s.filter((d) => d.id !== i.id));
132
+ async function I(a) {
133
+ if (r.includes(a.id)) {
134
+ h(r.filter((o) => o !== a.id)), p(d.filter((o) => o.id !== a.id));
110
135
  return;
111
136
  }
112
- p([...c, i.id]), h([...s, i]);
137
+ h([...r, a.id]), p([...d, a]);
113
138
  }
114
- const f = V("grid ps-0 list-unstyled");
115
- return /* @__PURE__ */ o(O.Fragment, { children: [
116
- /* @__PURE__ */ e(w.ul, { className: f, children: l == null ? void 0 : l.pages.map((i, d) => /* @__PURE__ */ e(O.Fragment, { children: i.resources.map((a) => {
139
+ const u = Q("grid ps-0 list-unstyled");
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) => {
117
142
  const {
118
- id: D,
119
- updatedAt: F
120
- } = a, k = u(F);
121
- return /* @__PURE__ */ e(w.li, { className: "g-col-4", style: {
143
+ id: N,
144
+ updatedAt: M
145
+ } = l, A = b(M);
146
+ return /* @__PURE__ */ i(P.li, { className: "g-col-4", style: {
122
147
  position: "relative",
123
- ...v
124
- }, children: /* @__PURE__ */ e($, { app: x, resource: a, time: k, isSelectable: !0, isSelected: c.includes(a.id), onClick: (T) => {
125
- T.stopPropagation(), S(a);
126
- }, onSelect: () => N(a) }) }, D);
127
- }) }, d)) }),
128
- y && /* @__PURE__ */ e("div", { className: "d-grid gap-2 col-4 mx-auto my-24", children: /* @__PURE__ */ e(K, { type: "button", color: "secondary", variant: "filled", onClick: n, children: b("explorer.see.more") }) })
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") }) })
129
154
  ] });
130
155
  };
131
156
  export {
132
- xt as default
157
+ ve as default
133
158
  };
package/lib/TrashModal.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
- import { Modal as r, Button as d } from "@edifice-ui/react";
2
+ import { Modal as r, Button as d } from "@edifice.io/react";
3
3
  import { createPortal as i } from "react-dom";
4
4
  import { useTranslation as n } from "react-i18next";
5
5
  function h({
@@ -1,2 +1,2 @@
1
- import { OnboardingModal } from '@edifice-ui/react';
1
+ import { OnboardingModal } from '@edifice.io/react';
2
2
  export default OnboardingModal;
@@ -1,4 +1,4 @@
1
- import { ResourceService, App, IAction, IFilter, IOrder, ResourceType } from 'edifice-ts-client';
1
+ import { ResourceService, App, IAction, IFilter, IOrder, ResourceType } from '@edifice.io/client';
2
2
  export interface AppParams {
3
3
  /** Application code */
4
4
  app: App;
@@ -0,0 +1,16 @@
1
+ const l = (r, n, o) => {
2
+ const e = r[n];
3
+ return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((i, t) => {
4
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
5
+ t.bind(
6
+ null,
7
+ new Error(
8
+ "Unknown variable dynamic import: " + n + (n.split("/").length !== o ? ". Note that variables only represent file names one level deep." : "")
9
+ )
10
+ )
11
+ );
12
+ });
13
+ };
14
+ export {
15
+ l as _
16
+ };
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import { IAction, RightRole } from 'edifice-ts-client';
2
+ import { IAction, RightRole } from '@edifice.io/client';
3
3
  import { IObjectWithRights } from './useAccessControl';
4
4
  interface AccessControlProps {
5
5
  roleExpected: RightRole | RightRole[];
@@ -1,4 +1,4 @@
1
- import { RightRole } from 'edifice-ts-client';
1
+ import { RightRole } from '@edifice.io/client';
2
2
  export interface IObjectWithRights {
3
3
  rights: string[];
4
4
  }
@@ -2,7 +2,7 @@ interface ModalProps {
2
2
  onSuccess?: () => void;
3
3
  }
4
4
  export declare function useMoveModal({ onSuccess }: ModalProps): {
5
- treeData: import('@edifice-ui/react').TreeData;
5
+ treeData: import('@edifice.io/react').TreeData;
6
6
  disableSubmit: boolean;
7
7
  handleTreeItemSelect: (folderId: string) => void;
8
8
  handleOnTreeItemUnfold: (nodeId: string) => void;