ode-explorer 1.5.2 → 1.5.3-develop-rc.202412091521
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.svg +1 -0
- package/dist/illu-wiki.svg +15 -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 +2 -1
- package/dist/index.js +236 -231
- 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/dist/version.txt +1 -1
- package/lib/components/OnboardingModal.d.ts +1 -1
- package/lib/config/explorer.d.ts +1 -1
- 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/index.js +58529 -3
- package/lib/services/api/index.d.ts +14 -14
- package/lib/services/queries/actions.d.ts +1 -1
- 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 +4 -5
- package/lib/ActionBarContainer.js +0 -312
- package/lib/AppAction.js +0 -35
- package/lib/DeleteModal.js +0 -46
- package/lib/DisableModal.js +0 -20
- package/lib/DraggableCard.js +0 -25
- package/lib/EmptyScreenApp.js +0 -40
- package/lib/EmptyScreenError.js +0 -12
- package/lib/EmptyScreenNoContentInFolder.js +0 -18
- package/lib/EmptyScreenSearch.js +0 -18
- package/lib/EmptyScreenTrash.js +0 -16
- package/lib/ExportModal.js +0 -47
- package/lib/FolderModal.js +0 -116
- package/lib/FoldersList.js +0 -104
- package/lib/Library.js +0 -36
- package/lib/MoveModal.js +0 -87
- package/lib/OnboardingModal.js +0 -5
- package/lib/PublishModal.js +0 -5
- package/lib/ResourceModal.js +0 -5
- package/lib/ResourcesList.js +0 -133
- package/lib/TrashModal.js +0 -20
- package/lib/index2.js +0 -1531
package/lib/EmptyScreenApp.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { usePaths as u, useOdeClient as d, useOdeTheme as m, EmptyScreen as x } from "@edifice-ui/react";
|
|
3
|
-
import { useTranslation as S } from "react-i18next";
|
|
4
|
-
import "@tanstack/react-query";
|
|
5
|
-
import "edifice-ts-client";
|
|
6
|
-
import "i18next";
|
|
7
|
-
import { u as y, b as f } from "./index2.js";
|
|
8
|
-
function P() {
|
|
9
|
-
const [o] = u(), {
|
|
10
|
-
appCode: r
|
|
11
|
-
} = d(), {
|
|
12
|
-
theme: e
|
|
13
|
-
} = m(), {
|
|
14
|
-
t: s
|
|
15
|
-
} = S(), l = y((i) => i.config), {
|
|
16
|
-
data: n
|
|
17
|
-
} = f(l == null ? void 0 : l.actions), t = n == null ? void 0 : n.find((i) => i.id === "create"), p = () => t != null && t.available && (e != null && e.is1d) ? s("explorer.emptyScreen.txt1d.create", {
|
|
18
|
-
ns: r
|
|
19
|
-
}) : t != null && t.available && !(e != null && e.is1d) ? s("explorer.emptyScreen.txt2d.create", {
|
|
20
|
-
ns: r
|
|
21
|
-
}) : !(t != null && t.available) && (e != null && e.is1d) ? s("explorer.emptyScreen.txt1d.consultation", {
|
|
22
|
-
ns: r
|
|
23
|
-
}) : s("explorer.emptyScreen.txt2d.consultation", {
|
|
24
|
-
ns: r
|
|
25
|
-
}), c = () => t != null && t.available && (e != null && e.is1d) ? s("explorer.emptyScreen.title1d.create", {
|
|
26
|
-
ns: r
|
|
27
|
-
}) : t != null && t.available && !(e != null && e.is1d) ? s("explorer.emptyScreen.title2d.create", {
|
|
28
|
-
ns: r
|
|
29
|
-
}) : !(t != null && t.available) && (e != null && e.is1d) ? s("explorer.emptyScreen.title1d.consultation", {
|
|
30
|
-
ns: r
|
|
31
|
-
}) : s("explorer.emptyScreen.title2d.consultation", {
|
|
32
|
-
ns: r
|
|
33
|
-
});
|
|
34
|
-
return /* @__PURE__ */ a(x, { imageSrc: `${o}/emptyscreen/illu-${r}.svg`, imageAlt: s("explorer.emptyScreen.app.alt", {
|
|
35
|
-
ns: r
|
|
36
|
-
}), title: c(), text: p() });
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
P as default
|
|
40
|
-
};
|
package/lib/EmptyScreenError.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { usePaths as o, EmptyScreen as m } from "@edifice-ui/react";
|
|
3
|
-
import { useTranslation as n } from "react-i18next";
|
|
4
|
-
function c() {
|
|
5
|
-
const [r] = o(), {
|
|
6
|
-
t: e
|
|
7
|
-
} = n();
|
|
8
|
-
return /* @__PURE__ */ t(m, { imageSrc: `${r}/emptyscreen/illu-error.svg`, imageAlt: e("explorer.emptyScreen.error.alt"), text: "explorer.emptyScreen.error.text" });
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
c as default
|
|
12
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { usePaths as o, useOdeClient as m, EmptyScreen as l } from "@edifice-ui/react";
|
|
3
|
-
import { useTranslation as p } from "react-i18next";
|
|
4
|
-
function i() {
|
|
5
|
-
const [n] = o(), {
|
|
6
|
-
appCode: e
|
|
7
|
-
} = m(), {
|
|
8
|
-
t
|
|
9
|
-
} = p();
|
|
10
|
-
return /* @__PURE__ */ r(l, { imageSrc: `${n}/emptyscreen/illu-no-content-in-folder.svg`, imageAlt: t("explorer.emptyScreen.folder.empty.alt", {
|
|
11
|
-
ns: e
|
|
12
|
-
}), text: t("explorer.emptyScreen.label", {
|
|
13
|
-
ns: e
|
|
14
|
-
}) });
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
i as default
|
|
18
|
-
};
|
package/lib/EmptyScreenSearch.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useOdeClient as n, usePaths as a, EmptyScreen as o } from "@edifice-ui/react";
|
|
3
|
-
import { useTranslation as c } from "react-i18next";
|
|
4
|
-
function l() {
|
|
5
|
-
const {
|
|
6
|
-
appCode: e
|
|
7
|
-
} = n(), [r] = a(), {
|
|
8
|
-
t
|
|
9
|
-
} = c();
|
|
10
|
-
return /* @__PURE__ */ s(o, { imageSrc: `${r}/emptyscreen/illu-search.svg`, imageAlt: t("explorer.emptyScreen.search.alt", {
|
|
11
|
-
ns: e
|
|
12
|
-
}), text: t("explorer.emptyScreen.search.text", {
|
|
13
|
-
ns: e
|
|
14
|
-
}) });
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
l as default
|
|
18
|
-
};
|
package/lib/EmptyScreenTrash.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useOdeClient as a, usePaths as m, EmptyScreen as n } from "@edifice-ui/react";
|
|
3
|
-
import { useTranslation as o } from "react-i18next";
|
|
4
|
-
function c() {
|
|
5
|
-
const {
|
|
6
|
-
appCode: t
|
|
7
|
-
} = a(), [r] = m(), {
|
|
8
|
-
t: e
|
|
9
|
-
} = o();
|
|
10
|
-
return /* @__PURE__ */ s(n, { imageSrc: `${r}/emptyscreen/illu-trash.svg`, imageAlt: e("explorer.emptyScreen.trash.alt"), title: e("explorer.emptyScreen.trash.title"), text: e("explorer.emptyScreen.trash.empty", {
|
|
11
|
-
ns: t
|
|
12
|
-
}) });
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
c as default
|
|
16
|
-
};
|
package/lib/ExportModal.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useToast as d, Modal as n, Alert as p, Button as a } from "@edifice-ui/react";
|
|
3
|
-
import { createPortal as x } from "react-dom";
|
|
4
|
-
import { useTranslation as c } from "react-i18next";
|
|
5
|
-
import { i as h, e as u, A as m } from "./index2.js";
|
|
6
|
-
const f = (i) => {
|
|
7
|
-
const t = h(), o = u(), s = d(), {
|
|
8
|
-
t: e
|
|
9
|
-
} = c();
|
|
10
|
-
return {
|
|
11
|
-
handleExportClick: () => {
|
|
12
|
-
t.length ? (m({
|
|
13
|
-
searchParams: o,
|
|
14
|
-
assetId: t[0].assetId
|
|
15
|
-
}), i()) : s.error(e("explorer.error.noResourceSelected"));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
function C({
|
|
20
|
-
isOpen: i,
|
|
21
|
-
onSuccess: t,
|
|
22
|
-
onCancel: o
|
|
23
|
-
}) {
|
|
24
|
-
const {
|
|
25
|
-
handleExportClick: s
|
|
26
|
-
} = f(t), {
|
|
27
|
-
t: e
|
|
28
|
-
} = c();
|
|
29
|
-
return /* @__PURE__ */ x(/* @__PURE__ */ l(n, { isOpen: i, onModalClose: o, id: "exportModal", children: [
|
|
30
|
-
/* @__PURE__ */ r(n.Header, { onModalClose: o, children: e("explorer.export.title") }),
|
|
31
|
-
/* @__PURE__ */ l(n.Body, { children: [
|
|
32
|
-
/* @__PURE__ */ l("ul", { children: [
|
|
33
|
-
/* @__PURE__ */ r("li", { children: e("explorer.export.body.info.1") }),
|
|
34
|
-
/* @__PURE__ */ r("li", { children: e("explorer.export.body.info.2") }),
|
|
35
|
-
/* @__PURE__ */ r("li", { children: e("explorer.export.body.info.3") })
|
|
36
|
-
] }),
|
|
37
|
-
/* @__PURE__ */ r(p, { type: "warning", children: e("explorer.export.body.warning") })
|
|
38
|
-
] }),
|
|
39
|
-
/* @__PURE__ */ l(n.Footer, { children: [
|
|
40
|
-
/* @__PURE__ */ r(a, { color: "tertiary", onClick: o, type: "button", variant: "ghost", children: e("explorer.cancel") }),
|
|
41
|
-
/* @__PURE__ */ r(a, { color: "primary", onClick: s, type: "button", variant: "filled", children: e("explorer.actions.export") })
|
|
42
|
-
] })
|
|
43
|
-
] }), document.getElementById("portal"));
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
C as default
|
|
47
|
-
};
|
package/lib/FolderModal.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { jsxs as x, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useId as j, useEffect as q } from "react";
|
|
3
|
-
import { Modal as m, FormControl as B, Label as w, Input as R, Button as C } from "@edifice-ui/react";
|
|
4
|
-
import { createPortal as T } from "react-dom";
|
|
5
|
-
import { useTranslation as U } from "react-i18next";
|
|
6
|
-
import { FOLDER as V } from "edifice-ts-client";
|
|
7
|
-
import { useForm as _ } from "react-hook-form";
|
|
8
|
-
import { j as k, c as z, t as A, v as H } from "./index2.js";
|
|
9
|
-
function P({
|
|
10
|
-
edit: t,
|
|
11
|
-
onSuccess: e,
|
|
12
|
-
onClose: s
|
|
13
|
-
}) {
|
|
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, {
|
|
16
|
-
reset: o,
|
|
17
|
-
register: p,
|
|
18
|
-
handleSubmit: n,
|
|
19
|
-
setFocus: h,
|
|
20
|
-
formState: {
|
|
21
|
-
errors: F,
|
|
22
|
-
isSubmitting: i,
|
|
23
|
-
isDirty: I,
|
|
24
|
-
isValid: v
|
|
25
|
-
}
|
|
26
|
-
} = _({
|
|
27
|
-
mode: "onChange",
|
|
28
|
-
values: {
|
|
29
|
-
name: u || ""
|
|
30
|
-
}
|
|
31
|
-
}), M = j(), L = async function({
|
|
32
|
-
name: y
|
|
33
|
-
}) {
|
|
34
|
-
var g;
|
|
35
|
-
try {
|
|
36
|
-
if (t) {
|
|
37
|
-
const d = (g = l[0]) == null ? void 0 : g.parentId, E = l[0].id;
|
|
38
|
-
await f.mutate({
|
|
39
|
-
folderId: E,
|
|
40
|
-
parentId: d,
|
|
41
|
-
name: y
|
|
42
|
-
}), o(), e == null || e();
|
|
43
|
-
} else {
|
|
44
|
-
const d = (r == null ? void 0 : r.id) || V.DEFAULT;
|
|
45
|
-
await c.mutate({
|
|
46
|
-
name: y,
|
|
47
|
-
parentId: d
|
|
48
|
-
}), o(), e == null || e();
|
|
49
|
-
}
|
|
50
|
-
} catch (d) {
|
|
51
|
-
console.error(d);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
function D() {
|
|
55
|
-
o(), s();
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
formId: `createModal_${M}`,
|
|
59
|
-
errors: F,
|
|
60
|
-
isSubmitting: i,
|
|
61
|
-
isDirty: I,
|
|
62
|
-
isValid: v,
|
|
63
|
-
register: p,
|
|
64
|
-
setFocus: h,
|
|
65
|
-
handleSubmit: n,
|
|
66
|
-
onCancel: D,
|
|
67
|
-
onSubmit: L
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function Z({
|
|
71
|
-
isOpen: t,
|
|
72
|
-
edit: e,
|
|
73
|
-
onSuccess: s,
|
|
74
|
-
onCancel: l
|
|
75
|
-
}) {
|
|
76
|
-
const {
|
|
77
|
-
t: r
|
|
78
|
-
} = U(), {
|
|
79
|
-
isDirty: c,
|
|
80
|
-
isValid: f,
|
|
81
|
-
isSubmitting: u,
|
|
82
|
-
formId: o,
|
|
83
|
-
onSubmit: p,
|
|
84
|
-
onCancel: n,
|
|
85
|
-
handleSubmit: h,
|
|
86
|
-
register: F,
|
|
87
|
-
setFocus: i
|
|
88
|
-
} = P({
|
|
89
|
-
edit: e,
|
|
90
|
-
onSuccess: s,
|
|
91
|
-
onClose: l
|
|
92
|
-
});
|
|
93
|
-
return q(() => {
|
|
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") }),
|
|
97
|
-
/* @__PURE__ */ a(m.Body, { children: /* @__PURE__ */ a("form", { id: o, onSubmit: h(p), children: /* @__PURE__ */ x(B, { id: "nameFolder", isRequired: !0, children: [
|
|
98
|
-
/* @__PURE__ */ a(w, { children: r("explorer.create.folder.name") }),
|
|
99
|
-
/* @__PURE__ */ a(R, { type: "text", ...F("name", {
|
|
100
|
-
required: !0,
|
|
101
|
-
maxLength: 60,
|
|
102
|
-
pattern: {
|
|
103
|
-
value: /[^ ]/,
|
|
104
|
-
message: "invalid title"
|
|
105
|
-
}
|
|
106
|
-
}), placeholder: r("explorer.create.folder.name"), size: "md", "aria-required": !0, maxLength: 60 })
|
|
107
|
-
] }) }) }),
|
|
108
|
-
/* @__PURE__ */ x(m.Footer, { children: [
|
|
109
|
-
/* @__PURE__ */ a(C, { color: "tertiary", onClick: n, type: "button", variant: "ghost", children: r("explorer.cancel") }),
|
|
110
|
-
/* @__PURE__ */ a(C, { form: o, type: "submit", color: "primary", variant: "filled", disabled: !c || !f || u, children: r(e ? "explorer.rename" : "explorer.create") })
|
|
111
|
-
] })
|
|
112
|
-
] }), document.getElementById("portal")) : null;
|
|
113
|
-
}
|
|
114
|
-
export {
|
|
115
|
-
Z as default
|
|
116
|
-
};
|
package/lib/FoldersList.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
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 = ({
|
|
11
|
-
app: r,
|
|
12
|
-
name: c,
|
|
13
|
-
idFolder: l,
|
|
14
|
-
isSelected: i = !1,
|
|
15
|
-
isSelectable: m = !0,
|
|
16
|
-
onClick: D,
|
|
17
|
-
onSelect: b
|
|
18
|
-
}) => {
|
|
19
|
-
const [o, a] = q(!1), p = L(), {
|
|
20
|
-
lg: F
|
|
21
|
-
} = R(), {
|
|
22
|
-
setNodeRef: y
|
|
23
|
-
} = P({
|
|
24
|
-
id: p,
|
|
25
|
-
data: {
|
|
26
|
-
id: l,
|
|
27
|
-
name: c,
|
|
28
|
-
isTreeview: !1,
|
|
29
|
-
accepts: ["folder", "resource"]
|
|
30
|
-
}
|
|
31
|
-
}), {
|
|
32
|
-
attributes: I,
|
|
33
|
-
listeners: u,
|
|
34
|
-
setNodeRef: g,
|
|
35
|
-
transform: e
|
|
36
|
-
} = Q({
|
|
37
|
-
id: p,
|
|
38
|
-
data: {
|
|
39
|
-
id: l,
|
|
40
|
-
type: "folder"
|
|
41
|
-
},
|
|
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 = {
|
|
46
|
-
transform: `translate3d(${((e == null ? void 0 : e.x) ?? 0) / 1}px, ${((e == null ? void 0 : e.y) ?? 0) / 1}px, 0)`,
|
|
47
|
-
cursor: T
|
|
48
|
-
};
|
|
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 })
|
|
57
|
-
] }) }) });
|
|
58
|
-
};
|
|
59
|
-
O.displayName = "FolderCard";
|
|
60
|
-
const ee = ({
|
|
61
|
-
data: r
|
|
62
|
-
}) => {
|
|
63
|
-
var u, g;
|
|
64
|
-
const c = j(), l = A(), i = B(), m = C(), D = k(), {
|
|
65
|
-
currentApp: b
|
|
66
|
-
} = w(), {
|
|
67
|
-
setSelectedFolders: o,
|
|
68
|
-
setFolderIds: a,
|
|
69
|
-
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]));
|
|
73
|
-
}
|
|
74
|
-
function y(e) {
|
|
75
|
-
D(), p({
|
|
76
|
-
folder: e,
|
|
77
|
-
folderId: e.id,
|
|
78
|
-
queryClient: c
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
const I = $({
|
|
82
|
-
from: {
|
|
83
|
-
opacity: 0
|
|
84
|
-
},
|
|
85
|
-
to: {
|
|
86
|
-
opacity: 1
|
|
87
|
-
}
|
|
88
|
-
});
|
|
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) => {
|
|
90
|
-
const {
|
|
91
|
-
id: s,
|
|
92
|
-
name: d
|
|
93
|
-
} = e, h = m.elementDrag === s;
|
|
94
|
-
return /* @__PURE__ */ t(v.li, { className: `g-col-4 ${h ? "z-2000" : "z-1"}`, style: {
|
|
95
|
-
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);
|
|
100
|
-
}) }) : null;
|
|
101
|
-
};
|
|
102
|
-
export {
|
|
103
|
-
ee as default
|
|
104
|
-
};
|
package/lib/Library.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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,
|
|
12
|
-
imageFullURL: a,
|
|
13
|
-
handleClick: () => {
|
|
14
|
-
e && (window.open(e, "_blank"), d.data().trackAccessLibraryFromExplorer());
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
}, k = () => {
|
|
18
|
-
const {
|
|
19
|
-
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, {})
|
|
31
|
-
] })
|
|
32
|
-
] });
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
k as default
|
|
36
|
-
};
|
package/lib/MoveModal.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
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";
|
|
3
|
-
import { createPortal as g } from "react-dom";
|
|
4
|
-
import { useTranslation as w } from "react-i18next";
|
|
5
|
-
import { useQueryClient as A } from "@tanstack/react-query";
|
|
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({
|
|
9
|
-
onSuccess: a
|
|
10
|
-
}) {
|
|
11
|
-
const [d, n] = B(), u = A(), o = D(), h = j(), p = k(), i = E(), {
|
|
12
|
-
fetchTreeData: v
|
|
13
|
-
} = O();
|
|
14
|
-
async function y() {
|
|
15
|
-
try {
|
|
16
|
-
if (!d) throw new Error("explorer.move.selection.empty");
|
|
17
|
-
await o.mutate(d), await (a == null ? void 0 : a());
|
|
18
|
-
} catch (r) {
|
|
19
|
-
console.error(r);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const I = (r) => {
|
|
23
|
-
var f, c;
|
|
24
|
-
const t = C(i, r);
|
|
25
|
-
for (const e of h)
|
|
26
|
-
if (r === e.id || r === e.parentId || (f = e.childrenIds) != null && f.includes(r) || t.includes(e.id))
|
|
27
|
-
return !1;
|
|
28
|
-
for (const e of p)
|
|
29
|
-
if (r === ((e == null ? void 0 : e.folderIds) && e.folderIds[0]) || ((c = e == null ? void 0 : e.folderIds) == null ? void 0 : c.length) === 0 && r === "default")
|
|
30
|
-
return !1;
|
|
31
|
-
return !0;
|
|
32
|
-
};
|
|
33
|
-
return {
|
|
34
|
-
treeData: i,
|
|
35
|
-
disableSubmit: !d,
|
|
36
|
-
handleTreeItemSelect: (r) => {
|
|
37
|
-
I(r) ? n(r) : n(void 0);
|
|
38
|
-
},
|
|
39
|
-
handleOnTreeItemUnfold: (r) => {
|
|
40
|
-
var c, e;
|
|
41
|
-
const t = x(i, r), f = (c = t == null ? void 0 : t.children) == null ? void 0 : c.some((l) => {
|
|
42
|
-
var M;
|
|
43
|
-
return Array.isArray(l == null ? void 0 : l.children) && ((M = l.children) == null ? void 0 : M.length) > 0;
|
|
44
|
-
});
|
|
45
|
-
(e = t == null ? void 0 : t.children) == null || e.forEach((l) => {
|
|
46
|
-
f || v(l.id, u);
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
onMove: () => y()
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function W({
|
|
53
|
-
isOpen: a,
|
|
54
|
-
onSuccess: d,
|
|
55
|
-
onCancel: n
|
|
56
|
-
}) {
|
|
57
|
-
const {
|
|
58
|
-
appCode: u
|
|
59
|
-
} = S(), {
|
|
60
|
-
t: o
|
|
61
|
-
} = w(), {
|
|
62
|
-
treeData: h,
|
|
63
|
-
handleTreeItemSelect: p,
|
|
64
|
-
handleOnTreeItemUnfold: i,
|
|
65
|
-
onMove: v,
|
|
66
|
-
disableSubmit: y
|
|
67
|
-
} = U({
|
|
68
|
-
onSuccess: d
|
|
69
|
-
}), I = {
|
|
70
|
-
...h,
|
|
71
|
-
name: o("explorer.filters.mine", {
|
|
72
|
-
ns: u
|
|
73
|
-
})
|
|
74
|
-
};
|
|
75
|
-
return /* @__PURE__ */ g(/* @__PURE__ */ T(m, { isOpen: a, onModalClose: n, id: "moveModal", children: [
|
|
76
|
-
/* @__PURE__ */ s(m.Header, { onModalClose: n, children: o("explorer.move.title") }),
|
|
77
|
-
/* @__PURE__ */ s(m.Subtitle, { children: o("explorer.move.subtitle") }),
|
|
78
|
-
/* @__PURE__ */ s(m.Body, { children: /* @__PURE__ */ s(F, { data: I, onTreeItemClick: p, onTreeItemUnfold: i }) }),
|
|
79
|
-
/* @__PURE__ */ T(m.Footer, { children: [
|
|
80
|
-
/* @__PURE__ */ s(b, { color: "tertiary", onClick: n, type: "button", variant: "ghost", children: o("explorer.cancel") }),
|
|
81
|
-
/* @__PURE__ */ s(b, { color: "primary", onClick: v, type: "button", variant: "filled", disabled: y, children: o("explorer.move") })
|
|
82
|
-
] })
|
|
83
|
-
] }), document.getElementById("portal"));
|
|
84
|
-
}
|
|
85
|
-
export {
|
|
86
|
-
W as default
|
|
87
|
-
};
|
package/lib/OnboardingModal.js
DELETED
package/lib/PublishModal.js
DELETED
package/lib/ResourceModal.js
DELETED
package/lib/ResourcesList.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
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
|
|
20
|
-
}) => {
|
|
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) {
|
|
25
|
-
const {
|
|
26
|
-
rights: D,
|
|
27
|
-
creatorId: F
|
|
28
|
-
} = a || {};
|
|
29
|
-
return D.filter((T) => !T.includes(F)).length >= 1;
|
|
30
|
-
}
|
|
31
|
-
const {
|
|
32
|
-
attributes: v,
|
|
33
|
-
listeners: C,
|
|
34
|
-
setNodeRef: y,
|
|
35
|
-
transform: n
|
|
36
|
-
} = tt({
|
|
37
|
-
id: t.id,
|
|
38
|
-
data: {
|
|
39
|
-
id: t.id,
|
|
40
|
-
type: "resource"
|
|
41
|
-
},
|
|
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)`
|
|
49
|
-
};
|
|
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 }) })
|
|
61
|
-
] })
|
|
62
|
-
] }),
|
|
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 })
|
|
67
|
-
] }),
|
|
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 }) })
|
|
75
|
-
] })
|
|
76
|
-
] })
|
|
77
|
-
] }) }) });
|
|
78
|
-
};
|
|
79
|
-
$.displayName = "ResourceCard";
|
|
80
|
-
const xt = ({
|
|
81
|
-
data: l,
|
|
82
|
-
fetchNextPage: t
|
|
83
|
-
}) => {
|
|
84
|
-
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({
|
|
96
|
-
from: {
|
|
97
|
-
opacity: 0
|
|
98
|
-
},
|
|
99
|
-
to: {
|
|
100
|
-
opacity: 1
|
|
101
|
-
}
|
|
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);
|
|
106
|
-
};
|
|
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));
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
p([...c, i.id]), h([...s, i]);
|
|
113
|
-
}
|
|
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) => {
|
|
117
|
-
const {
|
|
118
|
-
id: D,
|
|
119
|
-
updatedAt: F
|
|
120
|
-
} = a, k = u(F);
|
|
121
|
-
return /* @__PURE__ */ e(w.li, { className: "g-col-4", style: {
|
|
122
|
-
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") }) })
|
|
129
|
-
] });
|
|
130
|
-
};
|
|
131
|
-
export {
|
|
132
|
-
xt as default
|
|
133
|
-
};
|
package/lib/TrashModal.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Modal as r, Button as d } from "@edifice-ui/react";
|
|
3
|
-
import { createPortal as i } from "react-dom";
|
|
4
|
-
import { useTranslation as n } from "react-i18next";
|
|
5
|
-
function h({
|
|
6
|
-
isOpen: l,
|
|
7
|
-
onCancel: t = () => ({})
|
|
8
|
-
}) {
|
|
9
|
-
const {
|
|
10
|
-
t: e
|
|
11
|
-
} = n();
|
|
12
|
-
return /* @__PURE__ */ i(/* @__PURE__ */ a(r, { isOpen: l, onModalClose: t, id: "trash_resource", children: [
|
|
13
|
-
/* @__PURE__ */ o(r.Header, { onModalClose: () => t(), children: e("explorer.trash.modal.title") }),
|
|
14
|
-
/* @__PURE__ */ o(r.Body, { children: /* @__PURE__ */ o("p", { className: "body", children: e("explorer.trash.modal.text") }) }),
|
|
15
|
-
/* @__PURE__ */ o(r.Footer, { children: /* @__PURE__ */ o(d, { color: "primary", onClick: t, type: "button", variant: "outline", children: e("close") }) })
|
|
16
|
-
] }), document.getElementById("portal"));
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
h as default
|
|
20
|
-
};
|