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.
- package/dist/EcritureA-Romain-Orne.woff2 +0 -0
- package/dist/KGJuneBug.ttf +0 -0
- package/dist/OpenDyslexic.woff +0 -0
- package/dist/christmas.png +0 -0
- package/dist/circus.jpg +0 -0
- package/dist/desert.jpg +0 -0
- package/dist/hills.svg +360 -0
- package/dist/illu-blog.svg +1 -0
- package/dist/illu-collaborativewall.svg +1 -0
- package/dist/illu-empty-search-blog.svg +25 -0
- package/dist/illu-empty-search-blog2.svg +25 -0
- package/dist/illu-empty-search-collaborativewall.svg +25 -0
- package/dist/illu-empty-search-collaborativewall2.svg +25 -0
- package/dist/illu-empty-search-formulaire.svg +27 -0
- package/dist/illu-empty-search-formulaire2.svg +27 -0
- package/dist/illu-empty-search-forum.svg +25 -0
- package/dist/illu-empty-search-forum2.svg +25 -0
- package/dist/illu-empty-search-homeworks.svg +25 -0
- package/dist/illu-empty-search-homeworks2.svg +25 -0
- package/dist/illu-empty-search-wiki.svg +26 -0
- package/dist/illu-empty-search-wiki2.svg +26 -0
- package/dist/illu-empty-search.svg +62 -0
- package/dist/illu-empty-search2.svg +62 -0
- package/dist/illu-error.svg +60 -0
- package/dist/illu-exercizer.svg +1 -0
- package/dist/illu-mindmap.svg +1 -0
- package/dist/illu-no-content-in-folder.svg +31 -0
- package/dist/illu-pad.svg +1 -0
- package/dist/illu-scrapbook.svg +1 -0
- package/dist/illu-search.svg +1 -0
- package/dist/illu-timeline.svg +1 -0
- package/dist/illu-timelinegenerator.svg +1 -0
- package/dist/illu-trash-delete.svg +22 -0
- package/dist/illu-trash.svg +1 -0
- package/dist/illu-wiki.svg +104 -0
- package/dist/image-library.svg +188 -0
- package/dist/image-library2.svg +188 -0
- package/dist/image-placeholder.png +0 -0
- package/dist/index.html +1 -1
- package/dist/index.js +226 -221
- package/dist/ocean.jpg +0 -0
- package/dist/panda.jpg +0 -0
- package/dist/screen-loading.gif +0 -0
- package/dist/sparkly.jpg +0 -0
- package/dist/style.css +1 -0
- package/lib/ActionBarContainer.js +14 -14
- package/lib/AppAction.js +16 -16
- package/lib/DeleteModal.js +1 -1
- package/lib/DisableModal.js +1 -1
- package/lib/DraggableCard.js +33 -15
- package/lib/EmptyScreenApp.js +42 -33
- package/lib/EmptyScreenError.js +10 -9
- package/lib/EmptyScreenNoContentInFolder.js +9 -8
- package/lib/EmptyScreenSearch.js +7 -6
- package/lib/EmptyScreenTrash.js +7 -6
- package/lib/ExportModal.js +1 -1
- package/lib/FolderModal.js +12 -12
- package/lib/FoldersList.js +60 -55
- package/lib/Library.js +37 -23
- package/lib/MoveModal.js +6 -6
- package/lib/OnboardingModal.js +2 -2
- package/lib/PublishModal.js +2 -2
- package/lib/ResourceModal.js +2 -2
- package/lib/ResourcesList.js +125 -100
- package/lib/TrashModal.js +1 -1
- package/lib/components/OnboardingModal.d.ts +1 -1
- package/lib/config/explorer.d.ts +1 -1
- package/lib/dynamic-import-helper.js +16 -0
- package/lib/features/AccessControl/AccessControl.d.ts +1 -1
- package/lib/features/AccessControl/useAccessControl.d.ts +1 -1
- package/lib/features/ActionBar/Move/useMoveModal.d.ts +1 -1
- package/lib/features/ActionBar/Publish/PublishModal.d.ts +1 -1
- package/lib/features/ActionBar/Resource/ResourceModal.d.ts +1 -1
- package/lib/features/ActionBar/Share/ShareModal.d.ts +1 -1
- package/lib/features/ActionBar/useActionBar.d.ts +2 -2
- package/lib/features/List/DraggableCard.d.ts +1 -1
- package/lib/features/List/FolderCard.d.ts +2 -2
- package/lib/features/List/FoldersList.d.ts +1 -1
- package/lib/features/List/ResourceCard.d.ts +2 -2
- package/lib/features/List/ResourcesList.d.ts +1 -1
- package/lib/illu-blog.js +4 -0
- package/lib/illu-collaborativeeditor.js +4 -0
- package/lib/illu-collaborativewall.js +4 -0
- package/lib/illu-error.js +4 -0
- package/lib/illu-exercizer.js +4 -0
- package/lib/illu-mindmap.js +4 -0
- package/lib/illu-no-content-in-folder.js +4 -0
- package/lib/illu-pad.js +4 -0
- package/lib/illu-scrapbook.js +4 -0
- package/lib/illu-search.js +4 -0
- package/lib/illu-timeline.js +4 -0
- package/lib/illu-timelinegenerator.js +4 -0
- package/lib/illu-trash.js +4 -0
- package/lib/illu-wiki.js +4 -0
- package/lib/image-library.js +4 -0
- package/lib/image-library2.js +4 -0
- package/lib/index2.js +586 -557
- package/lib/services/api/index.d.ts +14 -14
- package/lib/services/queries/actions.d.ts +4 -7
- package/lib/services/queries/index.d.ts +9 -9
- package/lib/services/resource/service.d.ts +1 -1
- package/lib/store/index.d.ts +2 -2
- package/lib/utils/getChildrenIds.d.ts +1 -1
- package/lib/utils/isResourceShared.d.ts +1 -1
- package/package.json +6 -7
- package/dist/version.txt +0 -1
package/lib/FoldersList.js
CHANGED
|
@@ -1,84 +1,89 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useBreakpoint as
|
|
3
|
-
import { useSpring as
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
import { o as
|
|
6
|
-
import { useState as
|
|
7
|
-
import { useDroppable as
|
|
8
|
-
import {
|
|
9
|
-
|
|
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:
|
|
11
|
+
name: n,
|
|
13
12
|
idFolder: l,
|
|
14
13
|
isSelected: i = !1,
|
|
15
|
-
isSelectable:
|
|
14
|
+
isSelectable: h = !0,
|
|
16
15
|
onClick: D,
|
|
17
16
|
onSelect: b
|
|
18
17
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
lg:
|
|
21
|
-
} =
|
|
22
|
-
setNodeRef:
|
|
23
|
-
} =
|
|
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:
|
|
26
|
+
name: n,
|
|
28
27
|
isTreeview: !1,
|
|
29
28
|
accepts: ["folder", "resource"]
|
|
30
29
|
}
|
|
31
30
|
}), {
|
|
32
|
-
attributes:
|
|
31
|
+
attributes: y,
|
|
33
32
|
listeners: u,
|
|
34
|
-
setNodeRef:
|
|
33
|
+
setNodeRef: f,
|
|
35
34
|
transform: e
|
|
36
|
-
} =
|
|
35
|
+
} = H({
|
|
37
36
|
id: p,
|
|
38
37
|
data: {
|
|
39
38
|
id: l,
|
|
40
39
|
type: "folder"
|
|
41
40
|
},
|
|
42
|
-
disabled: !
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
},
|
|
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:
|
|
46
|
+
cursor: O
|
|
48
47
|
};
|
|
49
|
-
return
|
|
50
|
-
const
|
|
51
|
-
a(
|
|
52
|
-
}, [
|
|
53
|
-
...
|
|
54
|
-
}, children:
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
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
|
-
|
|
60
|
-
const
|
|
64
|
+
N.displayName = "FolderCard";
|
|
65
|
+
const oe = ({
|
|
61
66
|
data: r
|
|
62
67
|
}) => {
|
|
63
|
-
var u,
|
|
64
|
-
const
|
|
68
|
+
var u, f;
|
|
69
|
+
const n = B(), l = A(), i = M(), h = x(), D = z(), {
|
|
65
70
|
currentApp: b
|
|
66
|
-
} =
|
|
67
|
-
setSelectedFolders:
|
|
71
|
+
} = $(), {
|
|
72
|
+
setSelectedFolders: t,
|
|
68
73
|
setFolderIds: a,
|
|
69
74
|
openFolder: p
|
|
70
|
-
} =
|
|
71
|
-
function
|
|
72
|
-
i.includes(e.id) ? (a(i.filter((
|
|
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
|
|
79
|
+
function I(e) {
|
|
75
80
|
D(), p({
|
|
76
81
|
folder: e,
|
|
77
82
|
folderId: e.id,
|
|
78
|
-
queryClient:
|
|
83
|
+
queryClient: n
|
|
79
84
|
});
|
|
80
85
|
}
|
|
81
|
-
const
|
|
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__ */
|
|
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:
|
|
96
|
+
id: o,
|
|
92
97
|
name: d
|
|
93
|
-
} = e,
|
|
94
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
97
|
-
}, children: /* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
}, onSelect: () =>
|
|
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
|
-
|
|
108
|
+
oe as default
|
|
104
109
|
};
|
package/lib/Library.js
CHANGED
|
@@ -1,33 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { odeServices as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
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:
|
|
21
|
-
handleClick:
|
|
22
|
-
} =
|
|
23
|
-
t:
|
|
24
|
-
} =
|
|
25
|
-
return r && /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */ i(
|
|
27
|
-
/* @__PURE__ */ i("p", { className: "m-8", children:
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */ i("span", { children:
|
|
30
|
-
/* @__PURE__ */ i(
|
|
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,
|
|
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
|
|
8
|
-
function
|
|
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 =
|
|
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
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
|
-
} =
|
|
67
|
+
} = O({
|
|
68
68
|
onSuccess: d
|
|
69
69
|
}), I = {
|
|
70
70
|
...h,
|
package/lib/OnboardingModal.js
CHANGED
package/lib/PublishModal.js
CHANGED
package/lib/ResourceModal.js
CHANGED
package/lib/ResourcesList.js
CHANGED
|
@@ -1,133 +1,158 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { useBreakpoint as
|
|
4
|
-
import { useSpring as
|
|
5
|
-
import
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { f as z, o as W, e as X, h as Y, i as Z, a as
|
|
8
|
-
import { useDraggable as
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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 [
|
|
22
|
-
lg:
|
|
23
|
-
} =
|
|
24
|
-
function
|
|
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:
|
|
27
|
-
creatorId:
|
|
28
|
-
} =
|
|
29
|
-
return
|
|
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:
|
|
33
|
-
listeners:
|
|
34
|
-
setNodeRef:
|
|
35
|
-
transform:
|
|
36
|
-
} =
|
|
37
|
-
id:
|
|
53
|
+
attributes: R,
|
|
54
|
+
listeners: _,
|
|
55
|
+
setNodeRef: S,
|
|
56
|
+
transform: c
|
|
57
|
+
} = ie({
|
|
58
|
+
id: e.id,
|
|
38
59
|
data: {
|
|
39
|
-
id:
|
|
60
|
+
id: e.id,
|
|
40
61
|
type: "resource"
|
|
41
62
|
},
|
|
42
|
-
disabled: !!
|
|
43
|
-
}),
|
|
44
|
-
t:
|
|
45
|
-
} =
|
|
46
|
-
position:
|
|
47
|
-
zIndex:
|
|
48
|
-
transform: `translate3d(${((
|
|
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
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
}, [
|
|
54
|
-
...
|
|
55
|
-
}, children:
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
66
|
-
/* @__PURE__ */
|
|
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__ */
|
|
69
|
-
|
|
70
|
-
ns:
|
|
71
|
-
}), placement: "top", children: /* @__PURE__ */
|
|
72
|
-
|
|
73
|
-
ns:
|
|
74
|
-
}), placement: "top", children: /* @__PURE__ */
|
|
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
|
-
|
|
80
|
-
const
|
|
81
|
-
data:
|
|
82
|
-
fetchNextPage:
|
|
104
|
+
B.displayName = "ResourceCard";
|
|
105
|
+
const ve = ({
|
|
106
|
+
data: t,
|
|
107
|
+
fetchNextPage: e
|
|
83
108
|
}) => {
|
|
84
109
|
const {
|
|
85
|
-
currentApp:
|
|
86
|
-
} =
|
|
87
|
-
t:
|
|
88
|
-
} =
|
|
89
|
-
fromNow:
|
|
90
|
-
} =
|
|
91
|
-
setSelectedResources:
|
|
92
|
-
setResourceIds:
|
|
93
|
-
openResource:
|
|
94
|
-
setResourceIsTrash:
|
|
95
|
-
} =
|
|
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
|
-
}),
|
|
103
|
-
|
|
104
|
-
}, []),
|
|
105
|
-
|
|
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
|
|
108
|
-
if (
|
|
109
|
-
|
|
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
|
-
|
|
137
|
+
h([...r, a.id]), p([...d, a]);
|
|
113
138
|
}
|
|
114
|
-
const
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
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:
|
|
119
|
-
updatedAt:
|
|
120
|
-
} =
|
|
121
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
124
|
-
}, children: /* @__PURE__ */
|
|
125
|
-
|
|
126
|
-
}, onSelect: () =>
|
|
127
|
-
}) },
|
|
128
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
1
|
+
import { OnboardingModal } from '@edifice.io/react';
|
|
2
2
|
export default OnboardingModal;
|
package/lib/config/explorer.d.ts
CHANGED
|
@@ -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
|
|
2
|
+
import { IAction, RightRole } from '@edifice.io/client';
|
|
3
3
|
import { IObjectWithRights } from './useAccessControl';
|
|
4
4
|
interface AccessControlProps {
|
|
5
5
|
roleExpected: RightRole | RightRole[];
|
|
@@ -2,7 +2,7 @@ interface ModalProps {
|
|
|
2
2
|
onSuccess?: () => void;
|
|
3
3
|
}
|
|
4
4
|
export declare function useMoveModal({ onSuccess }: ModalProps): {
|
|
5
|
-
treeData: import('@edifice
|
|
5
|
+
treeData: import('@edifice.io/react').TreeData;
|
|
6
6
|
disableSubmit: boolean;
|
|
7
7
|
handleTreeItemSelect: (folderId: string) => void;
|
|
8
8
|
handleOnTreeItemUnfold: (nodeId: string) => void;
|