ode-explorer 1.3.2 → 1.3.3-develop-b2school.202402081140
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/ActionBarContainer.js +7 -1
- package/dist/AppAction.js +7 -1
- package/dist/DeleteModal.js +1 -1
- package/dist/EmptyScreenApp.js +1 -1
- package/dist/EmptyScreenError.js +1 -1
- package/dist/EmptyScreenNoContentInFolder.js +1 -1
- package/dist/EmptyScreenSearch.js +1 -1
- package/dist/EmptyScreenTrash.js +1 -1
- package/dist/FolderModal.js +1 -1
- package/dist/FoldersList.js +1 -1
- package/dist/Library.js +1 -1
- package/dist/MoveModal.js +1 -1
- package/dist/OnboardingModal.js +1 -1
- package/dist/PublishModal.js +1 -1
- package/dist/ResourceModal.js +1 -1
- package/dist/ResourcesList.js +1 -1
- package/dist/edifice-icons.js +1 -1
- package/dist/edifice-react.js +90 -90
- package/dist/index.html +25 -15
- package/dist/index.js +10 -4
- package/dist/react.js +8 -8
- package/dist/version.txt +1 -1
- package/lib/ActionBarContainer.js +220 -200
- package/lib/AppAction.js +31 -24
- package/lib/DeleteModal.js +3 -3
- package/lib/EmptyScreenApp.js +26 -20
- package/lib/FolderModal.js +8 -8
- package/lib/FoldersList.js +7 -7
- package/lib/Library.js +19 -16
- package/lib/MoveModal.js +7 -7
- package/lib/ResourcesList.js +1 -1
- package/lib/index2.js +427 -422
- package/lib/services/api/index.d.ts +16 -4
- package/package.json +33 -35
- package/dist/ShareModal.js +0 -1
- package/lib/ShareModal.js +0 -5
package/lib/EmptyScreenApp.js
CHANGED
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useOdeClient as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { a as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useOdeClient as c, useOdeTheme as d, usePaths as m, EmptyScreen as u } from "@edifice-ui/react";
|
|
3
|
+
import { useTranslation as x } from "react-i18next";
|
|
4
|
+
import { a as y } from "./index2.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "@edifice-ui/icons";
|
|
7
7
|
import "edifice-ts-client";
|
|
8
8
|
import "i18next";
|
|
9
9
|
import "zustand";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
|
-
function
|
|
11
|
+
function $() {
|
|
12
12
|
const {
|
|
13
13
|
appCode: r
|
|
14
|
-
} =
|
|
15
|
-
theme:
|
|
16
|
-
} =
|
|
17
|
-
t:
|
|
18
|
-
} =
|
|
19
|
-
data:
|
|
20
|
-
} =
|
|
14
|
+
} = c(), {
|
|
15
|
+
theme: e
|
|
16
|
+
} = d(), [s] = m(), {
|
|
17
|
+
t: l
|
|
18
|
+
} = x(), {
|
|
19
|
+
data: i
|
|
20
|
+
} = y(), t = i == null ? void 0 : i.find((o) => o.id === "create"), p = () => t != null && t.available && (e != null && e.is1d) ? l("explorer.emptyScreen.txt1d.create", {
|
|
21
21
|
ns: r
|
|
22
|
-
}) :
|
|
22
|
+
}) : t != null && t.available && !(e != null && e.is1d) ? l("explorer.emptyScreen.txt2d.create", {
|
|
23
23
|
ns: r
|
|
24
|
-
}) : !(
|
|
24
|
+
}) : !(t != null && t.available) && (e != null && e.is1d) ? l("explorer.emptyScreen.txt1d.consultation", {
|
|
25
25
|
ns: r
|
|
26
|
-
}) :
|
|
26
|
+
}) : l("explorer.emptyScreen.txt2d.consultation", {
|
|
27
27
|
ns: r
|
|
28
|
-
})
|
|
29
|
-
|
|
28
|
+
}), n = () => t != null && t.available && (e != null && e.is1d) ? l("explorer.emptyScreen.title1d.create", {
|
|
29
|
+
ns: r
|
|
30
|
+
}) : t != null && t.available && !(e != null && e.is1d) ? l("explorer.emptyScreen.title2d.create", {
|
|
31
|
+
ns: r
|
|
32
|
+
}) : !(t != null && t.available) && (e != null && e.is1d) ? l("explorer.emptyScreen.title1d.consultation", {
|
|
30
33
|
ns: r
|
|
31
|
-
})
|
|
34
|
+
}) : l("explorer.emptyScreen.title2d.consultation", {
|
|
35
|
+
ns: r
|
|
36
|
+
});
|
|
37
|
+
return /* @__PURE__ */ a(u, { imageSrc: `${s}/emptyscreen/illu-${r}.svg`, imageAlt: l("explorer.emptyScreen.app.alt", {
|
|
32
38
|
ns: r
|
|
33
|
-
}) :
|
|
39
|
+
}), title: n(), text: p() });
|
|
34
40
|
}
|
|
35
41
|
export {
|
|
36
|
-
|
|
42
|
+
$ as default
|
|
37
43
|
};
|
package/lib/FolderModal.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useId as
|
|
3
|
-
import { Modal as m, FormControl as
|
|
2
|
+
import { useId as q, useEffect as B } from "react";
|
|
3
|
+
import { Modal as m, FormControl as L, Label as w, Input as R, Button as I } from "@edifice-ui/react";
|
|
4
4
|
import { createPortal as T } from "react-dom";
|
|
5
5
|
import { useTranslation as U } from "react-i18next";
|
|
6
6
|
import { FOLDER as V } from "edifice-ts-client";
|
|
7
7
|
import { useForm as _ } from "react-hook-form";
|
|
8
|
-
import {
|
|
8
|
+
import { j as k, b as z, r as A, s as H } from "./index2.js";
|
|
9
9
|
import "@edifice-ui/icons";
|
|
10
10
|
import "i18next";
|
|
11
11
|
import "zustand";
|
|
@@ -32,15 +32,15 @@ function P({
|
|
|
32
32
|
values: {
|
|
33
33
|
name: u || ""
|
|
34
34
|
}
|
|
35
|
-
}), M =
|
|
35
|
+
}), M = q(), D = async function({
|
|
36
36
|
name: y
|
|
37
37
|
}) {
|
|
38
38
|
var C;
|
|
39
39
|
try {
|
|
40
40
|
if (o) {
|
|
41
|
-
const i = (C = l[0]) == null ? void 0 : C.parentId,
|
|
41
|
+
const i = (C = l[0]) == null ? void 0 : C.parentId, j = l[0].id;
|
|
42
42
|
await f.mutate({
|
|
43
|
-
folderId:
|
|
43
|
+
folderId: j,
|
|
44
44
|
parentId: i,
|
|
45
45
|
name: y
|
|
46
46
|
}), t(), e == null || e();
|
|
@@ -94,11 +94,11 @@ function oe({
|
|
|
94
94
|
onSuccess: s,
|
|
95
95
|
onClose: l
|
|
96
96
|
});
|
|
97
|
-
return
|
|
97
|
+
return B(() => {
|
|
98
98
|
o && d("name");
|
|
99
99
|
}, [o, d]), o ? /* @__PURE__ */ T(/* @__PURE__ */ b(m, { isOpen: o, onModalClose: n, id: "modal_" + t, children: [
|
|
100
100
|
/* @__PURE__ */ a(m.Header, { onModalClose: n, children: r(e ? "explorer.rename.folder" : "explorer.create.folder") }),
|
|
101
|
-
/* @__PURE__ */ a(m.Body, { children: /* @__PURE__ */ a("form", { id: t, onSubmit: h(p), children: /* @__PURE__ */ b(
|
|
101
|
+
/* @__PURE__ */ a(m.Body, { children: /* @__PURE__ */ a("form", { id: t, onSubmit: h(p), children: /* @__PURE__ */ b(L, { id: "nameFolder", isRequired: !0, children: [
|
|
102
102
|
/* @__PURE__ */ a(w, { children: r("explorer.create.folder.name") }),
|
|
103
103
|
/* @__PURE__ */ a(R, { type: "text", ...F("name", {
|
|
104
104
|
required: !0,
|
package/lib/FoldersList.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
|
2
2
|
import { Card as d, useOdeClient as C, useScrollToTop as T } from "@edifice-ui/react";
|
|
3
3
|
import { useSpring as I, animated as a } from "@react-spring/web";
|
|
4
4
|
import { Files as N } from "@edifice-ui/icons";
|
|
5
|
-
import {
|
|
5
|
+
import { j, k as x, u as k } from "./index2.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-i18next";
|
|
8
8
|
import "edifice-ts-client";
|
|
@@ -27,15 +27,15 @@ const E = ({
|
|
|
27
27
|
var m, u;
|
|
28
28
|
const {
|
|
29
29
|
currentApp: n
|
|
30
|
-
} = C(), l =
|
|
30
|
+
} = C(), l = j(), o = x(), {
|
|
31
31
|
setSelectedFolders: t,
|
|
32
32
|
setFolderIds: c,
|
|
33
33
|
openFolder: p
|
|
34
|
-
} =
|
|
35
|
-
function
|
|
34
|
+
} = k();
|
|
35
|
+
function F(e) {
|
|
36
36
|
o.includes(e.id) ? (c(o.filter((r) => r !== e.id)), t(l.filter((r) => r.id !== e.id))) : (c([...o, e.id]), t([...l, e]));
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const h = I({
|
|
39
39
|
from: {
|
|
40
40
|
opacity: 0
|
|
41
41
|
},
|
|
@@ -50,13 +50,13 @@ const E = ({
|
|
|
50
50
|
} = e;
|
|
51
51
|
return /* @__PURE__ */ i(a.li, { className: "g-col-4 z-1", style: {
|
|
52
52
|
position: "relative",
|
|
53
|
-
...
|
|
53
|
+
...h
|
|
54
54
|
}, children: /* @__PURE__ */ i(g, { name: S, app: n, isSelected: o.includes(e.id), onClick: () => {
|
|
55
55
|
f(), p({
|
|
56
56
|
folder: e,
|
|
57
57
|
folderId: e.id
|
|
58
58
|
});
|
|
59
|
-
}, onSelect: () =>
|
|
59
|
+
}, onSelect: () => F(e) }) }, r);
|
|
60
60
|
}) }) : null;
|
|
61
61
|
};
|
|
62
62
|
export {
|
package/lib/Library.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ArrowRight as
|
|
3
|
-
import { useOdeTheme as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowRight as s } from "@edifice-ui/icons";
|
|
3
|
+
import { useOdeTheme as o, useLibraryUrl as n, usePaths as m, Image as p } from "@edifice-ui/react";
|
|
4
|
+
import { useTranslation as c } from "react-i18next";
|
|
5
|
+
const y = () => {
|
|
6
6
|
const {
|
|
7
|
-
t:
|
|
8
|
-
} =
|
|
9
|
-
theme:
|
|
10
|
-
} =
|
|
11
|
-
libraryUrl:
|
|
12
|
-
} = n(), [
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */ r(
|
|
15
|
-
/* @__PURE__ */ r("p", { className: "m-8", children:
|
|
16
|
-
/* @__PURE__ */
|
|
7
|
+
t: e
|
|
8
|
+
} = c(), {
|
|
9
|
+
theme: a
|
|
10
|
+
} = o(), {
|
|
11
|
+
libraryUrl: i
|
|
12
|
+
} = n(), [l] = m();
|
|
13
|
+
return /* @__PURE__ */ t("div", { className: "p-16", children: [
|
|
14
|
+
/* @__PURE__ */ r(p, { width: "270", height: "140", loading: "lazy", className: "rounded", src: `${l}/${a == null ? void 0 : a.bootstrapVersion}/image-library.svg`, alt: e("explorer.libray.img.alt") }),
|
|
15
|
+
/* @__PURE__ */ r("p", { className: "m-8", children: e("explorer.libray.title") }),
|
|
16
|
+
/* @__PURE__ */ t("a", { href: i, target: "_blank", rel: "noreferrer", className: "d-inline-flex gap-4 btn btn-ghost-primary py-0 p-0 pe-8", children: [
|
|
17
|
+
/* @__PURE__ */ r("span", { children: e("explorer.libray.btn") }),
|
|
18
|
+
/* @__PURE__ */ r(s, {})
|
|
19
|
+
] })
|
|
17
20
|
] });
|
|
18
21
|
};
|
|
19
22
|
export {
|
|
20
|
-
|
|
23
|
+
y as default
|
|
21
24
|
};
|
package/lib/MoveModal.js
CHANGED
|
@@ -3,19 +3,19 @@ import { Modal as a, TreeView as T, Button as I } from "@edifice-ui/react";
|
|
|
3
3
|
import { createPortal as M } from "react-dom";
|
|
4
4
|
import { useTranslation as y } from "react-i18next";
|
|
5
5
|
import { useState as b } from "react";
|
|
6
|
-
import { useQueryClient as
|
|
7
|
-
import {
|
|
6
|
+
import { useQueryClient as x } from "@tanstack/react-query";
|
|
7
|
+
import { w as F, j as w, i as S, u as g, x as j } from "./index2.js";
|
|
8
8
|
import "@edifice-ui/icons";
|
|
9
9
|
import "edifice-ts-client";
|
|
10
10
|
import "i18next";
|
|
11
11
|
import "zustand";
|
|
12
|
-
function
|
|
12
|
+
function B({
|
|
13
13
|
onSuccess: n
|
|
14
14
|
}) {
|
|
15
|
-
const [d, t] = b(), r =
|
|
15
|
+
const [d, t] = b(), r = F(), i = w(), m = S(), {
|
|
16
16
|
foldTreeItem: s,
|
|
17
17
|
unfoldTreeItem: c
|
|
18
|
-
} = g(), f =
|
|
18
|
+
} = g(), f = x();
|
|
19
19
|
async function u() {
|
|
20
20
|
try {
|
|
21
21
|
if (!d)
|
|
@@ -60,9 +60,9 @@ function z({
|
|
|
60
60
|
handleTreeItemUnfold: s,
|
|
61
61
|
onMove: c,
|
|
62
62
|
disableSubmit: f
|
|
63
|
-
} =
|
|
63
|
+
} = B({
|
|
64
64
|
onSuccess: d
|
|
65
|
-
}), u =
|
|
65
|
+
}), u = j();
|
|
66
66
|
return /* @__PURE__ */ M(/* @__PURE__ */ h(a, { isOpen: n, onModalClose: t, id: "moveModal", children: [
|
|
67
67
|
/* @__PURE__ */ l(a.Header, { onModalClose: t, children: r("explorer.move.title") }),
|
|
68
68
|
/* @__PURE__ */ l(a.Subtitle, { children: r("explorer.move.subtitle") }),
|
package/lib/ResourcesList.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useTranslation as A } from "react-i18next";
|
|
|
7
7
|
import { Users as W, Globe as X } from "@edifice-ui/icons";
|
|
8
8
|
import { OneProfile as Z } from "@edifice-ui/icons/nav";
|
|
9
9
|
import b from "dayjs";
|
|
10
|
-
import {
|
|
10
|
+
import { d as ee, h as te, i as ne, u as oe, e as ae } from "./index2.js";
|
|
11
11
|
import "edifice-ts-client";
|
|
12
12
|
import "i18next";
|
|
13
13
|
import "zustand";
|