ode-explorer 1.3.2-dev.202401241302 → 1.3.2-develop-pedago.202401251156
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 +1 -1
- package/dist/AppAction.js +1 -1
- package/dist/DeleteModal.js +1 -1
- package/dist/EmptyScreenApp.js +1 -1
- package/dist/FolderModal.js +1 -1
- package/dist/FoldersList.js +1 -1
- package/dist/MoveModal.js +1 -1
- package/dist/ResourcesList.js +1 -1
- package/dist/edifice-react.js +18 -18
- package/dist/index.js +3 -3
- package/dist/version.txt +1 -1
- package/lib/ActionBarContainer.js +117 -110
- package/lib/AppAction.js +29 -22
- package/lib/DeleteModal.js +8 -8
- package/lib/EmptyScreenApp.js +26 -20
- package/lib/FolderModal.js +11 -11
- package/lib/FoldersList.js +7 -7
- package/lib/MoveModal.js +10 -10
- package/lib/ResourcesList.js +2 -2
- package/lib/index2.js +204 -190
- package/lib/services/api/index.d.ts +8 -0
- package/package.json +5 -5
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/MoveModal.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as h, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { Modal as a, TreeView as T, Button as
|
|
2
|
+
import { Modal as a, TreeView as T, Button as v } 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
6
|
import { useQueryClient as F } from "@tanstack/react-query";
|
|
7
|
-
import {
|
|
7
|
+
import { v as x, j as w, i as S, u as g, w 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 = x(), i =
|
|
15
|
+
const [d, t] = b(), r = x(), i = w(), m = S(), {
|
|
16
16
|
foldTreeItem: s,
|
|
17
17
|
unfoldTreeItem: c
|
|
18
18
|
} = g(), f = F();
|
|
@@ -25,7 +25,7 @@ function C({
|
|
|
25
25
|
console.error(e);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const I = (e) => {
|
|
29
29
|
var p;
|
|
30
30
|
for (const o of i)
|
|
31
31
|
if (e === o.id || e === o.parentId)
|
|
@@ -38,7 +38,7 @@ function C({
|
|
|
38
38
|
return {
|
|
39
39
|
disableSubmit: !d,
|
|
40
40
|
handleTreeItemSelect: (e) => {
|
|
41
|
-
|
|
41
|
+
I(e) ? t(e) : t(void 0);
|
|
42
42
|
},
|
|
43
43
|
handleTreeItemFold: s,
|
|
44
44
|
handleTreeItemUnfold: async (e) => await c(e, f),
|
|
@@ -60,16 +60,16 @@ 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") }),
|
|
69
69
|
/* @__PURE__ */ l(a.Body, { children: /* @__PURE__ */ l(T, { data: u, onTreeItemSelect: m, onTreeItemFold: i, onTreeItemUnfold: s }) }),
|
|
70
70
|
/* @__PURE__ */ h(a.Footer, { children: [
|
|
71
|
-
/* @__PURE__ */ l(
|
|
72
|
-
/* @__PURE__ */ l(
|
|
71
|
+
/* @__PURE__ */ l(v, { color: "tertiary", onClick: t, type: "button", variant: "ghost", children: r("explorer.cancel") }),
|
|
72
|
+
/* @__PURE__ */ l(v, { color: "primary", onClick: c, type: "button", variant: "filled", disabled: f, children: r("explorer.move") })
|
|
73
73
|
] })
|
|
74
74
|
] }), document.getElementById("portal"));
|
|
75
75
|
}
|
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";
|
|
@@ -34,7 +34,7 @@ const P = ({
|
|
|
34
34
|
} = A();
|
|
35
35
|
return /* @__PURE__ */ s(j, { app: a, isSelected: n, isSelectable: d, onClick: o, onSelect: e, children: (h) => /* @__PURE__ */ g(J, { children: [
|
|
36
36
|
/* @__PURE__ */ g(j.Body, { children: [
|
|
37
|
-
/* @__PURE__ */ s("div", { className: "card-image medium", children: t != null && t.thumbnail ? /* @__PURE__ */ s(C, { alt: "", src: t == null ? void 0 : t.thumbnail, objectFit: "cover", className: "h-full" }) : /* @__PURE__ */ s(B, { app: a, iconFit: "ratio", size: "80", variant: "rounded" }) }),
|
|
37
|
+
/* @__PURE__ */ s("div", { className: "card-image medium", children: t != null && t.thumbnail ? /* @__PURE__ */ s(C, { alt: "", src: t == null ? void 0 : t.thumbnail, objectFit: "cover", className: "h-full w-100" }) : /* @__PURE__ */ s(B, { app: a, iconFit: "ratio", size: "80", variant: "rounded" }) }),
|
|
38
38
|
/* @__PURE__ */ g("div", { className: "text-truncate", children: [
|
|
39
39
|
/* @__PURE__ */ s(j.Title, { children: t == null ? void 0 : t.name }),
|
|
40
40
|
/* @__PURE__ */ s(j.Text, { children: /* @__PURE__ */ s("em", { children: i }) })
|