ode-explorer 1.4.3 → 1.4.8
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/index.js +2542 -4797
- package/dist/version.txt +1 -1
- package/lib/ActionBarContainer.js +199 -198
- package/lib/DeleteModal.js +3 -3
- package/lib/ExportModal.js +53 -0
- package/lib/FolderModal.js +23 -22
- package/lib/Library.js +1 -1
- package/lib/MoveModal.js +6 -6
- package/lib/ResourcesList.js +71 -207
- package/lib/features/ActionBar/Export/ExportModal.d.ts +11 -0
- package/lib/features/ActionBar/Export/useExportModal.d.ts +3 -0
- package/lib/features/ActionBar/useActionBar.d.ts +4 -1
- package/lib/index2.js +250 -249
- package/package.json +8 -22
package/lib/FolderModal.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { Modal as m, FormControl as
|
|
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
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 { j as k, b as z,
|
|
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";
|
|
@@ -15,8 +15,8 @@ function P({
|
|
|
15
15
|
onSuccess: e,
|
|
16
16
|
onClose: s
|
|
17
17
|
}) {
|
|
18
|
-
var
|
|
19
|
-
const l = k(), r = z(), c = A(), f = H(), u = t ? (
|
|
18
|
+
var b;
|
|
19
|
+
const l = k(), r = z(), c = A(), f = H(), u = t ? (b = l[0]) == null ? void 0 : b.name : void 0, {
|
|
20
20
|
reset: o,
|
|
21
21
|
register: p,
|
|
22
22
|
handleSubmit: n,
|
|
@@ -24,7 +24,7 @@ function P({
|
|
|
24
24
|
formState: {
|
|
25
25
|
errors: F,
|
|
26
26
|
isSubmitting: d,
|
|
27
|
-
isDirty:
|
|
27
|
+
isDirty: I,
|
|
28
28
|
isValid: v
|
|
29
29
|
}
|
|
30
30
|
} = _({
|
|
@@ -32,15 +32,15 @@ function P({
|
|
|
32
32
|
values: {
|
|
33
33
|
name: u || ""
|
|
34
34
|
}
|
|
35
|
-
}), M =
|
|
35
|
+
}), M = j(), L = async function({
|
|
36
36
|
name: y
|
|
37
37
|
}) {
|
|
38
|
-
var
|
|
38
|
+
var g;
|
|
39
39
|
try {
|
|
40
40
|
if (t) {
|
|
41
|
-
const i = (
|
|
41
|
+
const i = (g = l[0]) == null ? void 0 : g.parentId, E = l[0].id;
|
|
42
42
|
await f.mutate({
|
|
43
|
-
folderId:
|
|
43
|
+
folderId: E,
|
|
44
44
|
parentId: i,
|
|
45
45
|
name: y
|
|
46
46
|
}), o(), e == null || e();
|
|
@@ -55,20 +55,20 @@ function P({
|
|
|
55
55
|
console.error(i);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function D() {
|
|
59
59
|
o(), s();
|
|
60
60
|
}
|
|
61
61
|
return {
|
|
62
62
|
formId: `createModal_${M}`,
|
|
63
63
|
errors: F,
|
|
64
64
|
isSubmitting: d,
|
|
65
|
-
isDirty:
|
|
65
|
+
isDirty: I,
|
|
66
66
|
isValid: v,
|
|
67
67
|
register: p,
|
|
68
68
|
setFocus: h,
|
|
69
69
|
handleSubmit: n,
|
|
70
|
-
onCancel:
|
|
71
|
-
onSubmit:
|
|
70
|
+
onCancel: D,
|
|
71
|
+
onSubmit: L
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
function te({
|
|
@@ -94,23 +94,24 @@ function te({
|
|
|
94
94
|
onSuccess: s,
|
|
95
95
|
onClose: l
|
|
96
96
|
});
|
|
97
|
-
return
|
|
97
|
+
return q(() => {
|
|
98
98
|
t && d("name");
|
|
99
|
-
}, [t, d]), t ? /* @__PURE__ */ T(/* @__PURE__ */
|
|
99
|
+
}, [t, d]), t ? /* @__PURE__ */ T(/* @__PURE__ */ x(m, { isOpen: t, onModalClose: n, id: "modal_" + o, 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: o, onSubmit: h(p), children: /* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ a(m.Body, { children: /* @__PURE__ */ a("form", { id: o, onSubmit: h(p), children: /* @__PURE__ */ x(B, { 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,
|
|
105
|
+
maxLength: 60,
|
|
105
106
|
pattern: {
|
|
106
107
|
value: /[^ ]/,
|
|
107
108
|
message: "invalid title"
|
|
108
109
|
}
|
|
109
|
-
}), placeholder: r("explorer.create.folder.name"), size: "md", "aria-required": !0 })
|
|
110
|
+
}), placeholder: r("explorer.create.folder.name"), size: "md", "aria-required": !0, maxLength: 60 })
|
|
110
111
|
] }) }) }),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */ a(
|
|
113
|
-
/* @__PURE__ */ a(
|
|
112
|
+
/* @__PURE__ */ x(m.Footer, { children: [
|
|
113
|
+
/* @__PURE__ */ a(C, { color: "tertiary", onClick: n, type: "button", variant: "ghost", children: r("explorer.cancel") }),
|
|
114
|
+
/* @__PURE__ */ a(C, { form: o, type: "submit", color: "primary", variant: "filled", disabled: !c || !f || u, children: r(e ? "explorer.rename" : "explorer.create") })
|
|
114
115
|
] })
|
|
115
116
|
] }), document.getElementById("portal")) : null;
|
|
116
117
|
}
|
package/lib/Library.js
CHANGED
|
@@ -11,7 +11,7 @@ const y = () => {
|
|
|
11
11
|
return t && /* @__PURE__ */ i("div", { className: "p-16", children: [
|
|
12
12
|
/* @__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") }),
|
|
13
13
|
/* @__PURE__ */ r("p", { className: "m-8", children: e("explorer.libray.title") }),
|
|
14
|
-
/* @__PURE__ */ i("a", { href: t, target: "_blank", rel: "noreferrer", className: "d-inline-flex gap-4 btn btn-ghost-primary py-0 p-0 pe-8", children: [
|
|
14
|
+
/* @__PURE__ */ i("a", { href: t, target: "_blank", rel: "noreferrer", className: "d-inline-flex align-items-center gap-4 btn btn-ghost-primary py-0 p-0 pe-8", children: [
|
|
15
15
|
/* @__PURE__ */ r("span", { children: e("explorer.libray.btn") }),
|
|
16
16
|
/* @__PURE__ */ r(s, {})
|
|
17
17
|
] })
|
package/lib/MoveModal.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as h, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { Modal as a, TreeView as T, Button as I } from "@edifice-ui/react";
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { useTranslation as
|
|
3
|
+
import { createPortal as M } from "react-dom";
|
|
4
|
+
import { useTranslation as y } from "react-i18next";
|
|
5
5
|
import { useState as b } from "react";
|
|
6
6
|
import { useQueryClient as x } from "@tanstack/react-query";
|
|
7
|
-
import {
|
|
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";
|
|
@@ -12,7 +12,7 @@ import "zustand";
|
|
|
12
12
|
function B({
|
|
13
13
|
onSuccess: n
|
|
14
14
|
}) {
|
|
15
|
-
const [d, t] = b(), r = F(), i =
|
|
15
|
+
const [d, t] = b(), r = F(), i = w(), m = S(), {
|
|
16
16
|
foldTreeItem: s,
|
|
17
17
|
unfoldTreeItem: c
|
|
18
18
|
} = g(), f = x();
|
|
@@ -54,7 +54,7 @@ function z({
|
|
|
54
54
|
}) {
|
|
55
55
|
const {
|
|
56
56
|
t: r
|
|
57
|
-
} =
|
|
57
|
+
} = y(), {
|
|
58
58
|
handleTreeItemFold: i,
|
|
59
59
|
handleTreeItemSelect: m,
|
|
60
60
|
handleTreeItemUnfold: s,
|
|
@@ -63,7 +63,7 @@ function z({
|
|
|
63
63
|
} = B({
|
|
64
64
|
onSuccess: d
|
|
65
65
|
}), u = j();
|
|
66
|
-
return /* @__PURE__ */
|
|
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 }) }),
|
package/lib/ResourcesList.js
CHANGED
|
@@ -1,249 +1,113 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { Card as
|
|
4
|
-
import { useSpring as
|
|
5
|
-
import
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { Users as
|
|
8
|
-
import { OneProfile as
|
|
9
|
-
import
|
|
10
|
-
import { d as ee, h as te, i as ne, u as oe, e as ae } from "./index2.js";
|
|
1
|
+
import { jsx as i, jsxs as n, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import S, { useCallback as O } from "react";
|
|
3
|
+
import { Card as c, Image as B, AppIcon as $, Avatar as D, Tooltip as y, useOdeClient as G, useDate as L, Button as U } from "@edifice-ui/react";
|
|
4
|
+
import { useSpring as q, animated as T } from "@react-spring/web";
|
|
5
|
+
import E from "clsx";
|
|
6
|
+
import { useTranslation as F } from "react-i18next";
|
|
7
|
+
import { Users as H, Globe as J } from "@edifice-ui/icons";
|
|
8
|
+
import { OneProfile as K } from "@edifice-ui/icons/nav";
|
|
9
|
+
import { d as Q, h as V, i as W, u as X, e as Y } from "./index2.js";
|
|
11
10
|
import "edifice-ts-client";
|
|
12
11
|
import "i18next";
|
|
13
12
|
import "zustand";
|
|
14
13
|
import "@tanstack/react-query";
|
|
15
|
-
const
|
|
14
|
+
const C = ({
|
|
16
15
|
app: a,
|
|
17
16
|
resource: t,
|
|
18
|
-
time:
|
|
19
|
-
isSelected:
|
|
20
|
-
isSelectable:
|
|
21
|
-
onClick:
|
|
22
|
-
onSelect:
|
|
17
|
+
time: f,
|
|
18
|
+
isSelected: x = !1,
|
|
19
|
+
isSelectable: u = !0,
|
|
20
|
+
onClick: d,
|
|
21
|
+
onSelect: s
|
|
23
22
|
}) => {
|
|
24
|
-
const
|
|
25
|
-
function l
|
|
23
|
+
const o = `/userbook/avatar/${t == null ? void 0 : t.creatorId}`;
|
|
24
|
+
function m(l) {
|
|
26
25
|
const {
|
|
27
26
|
rights: v,
|
|
28
|
-
creatorId:
|
|
29
|
-
} =
|
|
30
|
-
return v.filter((
|
|
27
|
+
creatorId: N
|
|
28
|
+
} = l || {};
|
|
29
|
+
return v.filter((I) => !I.includes(N)).length >= 1;
|
|
31
30
|
}
|
|
32
|
-
const r =
|
|
33
|
-
t:
|
|
34
|
-
} =
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
31
|
+
const r = m(t), R = t == null ? void 0 : t.public, {
|
|
32
|
+
t: g
|
|
33
|
+
} = F();
|
|
34
|
+
return /* @__PURE__ */ i(c, { app: a, isSelected: x, isSelectable: u, onClick: d, onSelect: s, children: (l) => /* @__PURE__ */ n(M, { children: [
|
|
35
|
+
/* @__PURE__ */ n(c.Body, { children: [
|
|
36
|
+
/* @__PURE__ */ i("div", { className: "card-image medium", children: t != null && t.thumbnail ? /* @__PURE__ */ i(B, { alt: "", src: `${t == null ? void 0 : t.thumbnail}?thumbnail=80x80`, objectFit: "cover", className: "h-full w-100" }) : /* @__PURE__ */ i($, { app: a, iconFit: "ratio", size: "80", variant: "rounded" }) }),
|
|
37
|
+
/* @__PURE__ */ n("div", { className: "text-truncate", children: [
|
|
38
|
+
/* @__PURE__ */ i(c.Title, { children: t == null ? void 0 : t.name }),
|
|
39
|
+
/* @__PURE__ */ i(c.Text, { children: /* @__PURE__ */ i("em", { children: f }) })
|
|
41
40
|
] })
|
|
42
41
|
] }),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ n(c.Footer, { children: [
|
|
43
|
+
/* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8 text-truncate", children: [
|
|
44
|
+
o ? /* @__PURE__ */ i(D, { alt: (t == null ? void 0 : t.creatorName) || "", size: "xs", src: o, variant: "circle", width: "24", height: "24" }) : /* @__PURE__ */ i(K, {}),
|
|
45
|
+
/* @__PURE__ */ i(c.Text, { children: t == null ? void 0 : t.creatorName })
|
|
47
46
|
] }),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
r && /* @__PURE__ */
|
|
50
|
-
ns:
|
|
51
|
-
}), placement: "top", children: /* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
ns:
|
|
54
|
-
}), placement: "top", children: /* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8", children: [
|
|
48
|
+
r && /* @__PURE__ */ i(y, { message: g("tooltip.shared", {
|
|
49
|
+
ns: l
|
|
50
|
+
}), placement: "top", children: /* @__PURE__ */ i(H, { width: 16, height: 16 }) }),
|
|
51
|
+
R && /* @__PURE__ */ i(y, { message: g("tooltip.public", {
|
|
52
|
+
ns: l
|
|
53
|
+
}), placement: "top", children: /* @__PURE__ */ i(J, { width: 16, height: 16 }) })
|
|
55
54
|
] })
|
|
56
55
|
] })
|
|
57
56
|
] }) });
|
|
58
57
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
function ie(a) {
|
|
62
|
-
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
63
|
-
}
|
|
64
|
-
var w = { exports: {} }, Ye = w.exports;
|
|
65
|
-
(function(a, t) {
|
|
66
|
-
(function(i, n) {
|
|
67
|
-
a.exports = n();
|
|
68
|
-
})(x, function() {
|
|
69
|
-
"use strict";
|
|
70
|
-
return function(i, n, d) {
|
|
71
|
-
i = i || {};
|
|
72
|
-
var o = n.prototype, e = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
73
|
-
function p(r, _, m, h) {
|
|
74
|
-
return o.fromToBase(r, _, m, h);
|
|
75
|
-
}
|
|
76
|
-
d.en.relativeTime = e, o.fromToBase = function(r, _, m, h, v) {
|
|
77
|
-
for (var Y, M, y, L = m.$locale().relativeTime || e, T = i.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], $ = T.length, u = 0; u < $; u += 1) {
|
|
78
|
-
var f = T[u];
|
|
79
|
-
f.d && (Y = h ? d(r).diff(m, f.d, !0) : m.diff(r, f.d, !0));
|
|
80
|
-
var c = (i.rounding || Math.round)(Math.abs(Y));
|
|
81
|
-
if (y = Y > 0, c <= f.r || !f.r) {
|
|
82
|
-
c <= 1 && u > 0 && (f = T[u - 1]);
|
|
83
|
-
var S = L[f.l];
|
|
84
|
-
v && (c = v("" + c)), M = typeof S == "string" ? S.replace("%d", c) : S(c, _, f.l, y);
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (_)
|
|
89
|
-
return M;
|
|
90
|
-
var D = y ? L.future : L.past;
|
|
91
|
-
return typeof D == "function" ? D(M) : D.replace("%s", M);
|
|
92
|
-
}, o.to = function(r, _) {
|
|
93
|
-
return p(r, _, this, !0);
|
|
94
|
-
}, o.from = function(r, _) {
|
|
95
|
-
return p(r, _, this);
|
|
96
|
-
};
|
|
97
|
-
var l = function(r) {
|
|
98
|
-
return r.$u ? d.utc() : d();
|
|
99
|
-
};
|
|
100
|
-
o.toNow = function(r) {
|
|
101
|
-
return this.to(l(this), r);
|
|
102
|
-
}, o.fromNow = function(r) {
|
|
103
|
-
return this.from(l(this), r);
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
});
|
|
107
|
-
})(w, w.exports);
|
|
108
|
-
var re = w.exports;
|
|
109
|
-
const se = /* @__PURE__ */ ie(re);
|
|
110
|
-
var H = { exports: {} }, je = H.exports;
|
|
111
|
-
(function(a, t) {
|
|
112
|
-
(function(i, n) {
|
|
113
|
-
a.exports = n(b);
|
|
114
|
-
})(x, function(i) {
|
|
115
|
-
"use strict";
|
|
116
|
-
function n(l) {
|
|
117
|
-
return l && typeof l == "object" && "default" in l ? l : { default: l };
|
|
118
|
-
}
|
|
119
|
-
var d = n(i), o = { s: "ein paar Sekunden", m: ["eine Minute", "einer Minute"], mm: "%d Minuten", h: ["eine Stunde", "einer Stunde"], hh: "%d Stunden", d: ["ein Tag", "einem Tag"], dd: ["%d Tage", "%d Tagen"], M: ["ein Monat", "einem Monat"], MM: ["%d Monate", "%d Monaten"], y: ["ein Jahr", "einem Jahr"], yy: ["%d Jahre", "%d Jahren"] };
|
|
120
|
-
function e(l, r, _) {
|
|
121
|
-
var m = o[_];
|
|
122
|
-
return Array.isArray(m) && (m = m[r ? 0 : 1]), m.replace("%d", l);
|
|
123
|
-
}
|
|
124
|
-
var p = { name: "de", weekdays: "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"), weekdaysShort: "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"), weekdaysMin: "So_Mo_Di_Mi_Do_Fr_Sa".split("_"), months: "Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"), monthsShort: "Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"), ordinal: function(l) {
|
|
125
|
-
return l + ".";
|
|
126
|
-
}, weekStart: 1, yearStart: 4, formats: { LTS: "HH:mm:ss", LT: "HH:mm", L: "DD.MM.YYYY", LL: "D. MMMM YYYY", LLL: "D. MMMM YYYY HH:mm", LLLL: "dddd, D. MMMM YYYY HH:mm" }, relativeTime: { future: "in %s", past: "vor %s", s: e, m: e, mm: e, h: e, hh: e, d: e, dd: e, M: e, MM: e, y: e, yy: e } };
|
|
127
|
-
return d.default.locale(p, null, !0), p;
|
|
128
|
-
});
|
|
129
|
-
})(H, H.exports);
|
|
130
|
-
var xe = H.exports;
|
|
131
|
-
var k = { exports: {} }, Le = k.exports;
|
|
132
|
-
(function(a, t) {
|
|
133
|
-
(function(i, n) {
|
|
134
|
-
a.exports = n(b);
|
|
135
|
-
})(x, function(i) {
|
|
136
|
-
"use strict";
|
|
137
|
-
function n(e) {
|
|
138
|
-
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
139
|
-
}
|
|
140
|
-
var d = n(i), o = { name: "es", monthsShort: "ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"), weekdays: "domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"), weekdaysShort: "dom._lun._mar._mié._jue._vie._sáb.".split("_"), weekdaysMin: "do_lu_ma_mi_ju_vi_sá".split("_"), months: "enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"), weekStart: 1, formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY H:mm", LLLL: "dddd, D [de] MMMM [de] YYYY H:mm" }, relativeTime: { future: "en %s", past: "hace %s", s: "unos segundos", m: "un minuto", mm: "%d minutos", h: "una hora", hh: "%d horas", d: "un día", dd: "%d días", M: "un mes", MM: "%d meses", y: "un año", yy: "%d años" }, ordinal: function(e) {
|
|
141
|
-
return e + "º";
|
|
142
|
-
} };
|
|
143
|
-
return d.default.locale(o, null, !0), o;
|
|
144
|
-
});
|
|
145
|
-
})(k, k.exports);
|
|
146
|
-
var Te = k.exports;
|
|
147
|
-
var N = { exports: {} }, Se = N.exports;
|
|
148
|
-
(function(a, t) {
|
|
149
|
-
(function(i, n) {
|
|
150
|
-
a.exports = n(b);
|
|
151
|
-
})(x, function(i) {
|
|
152
|
-
"use strict";
|
|
153
|
-
function n(e) {
|
|
154
|
-
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
155
|
-
}
|
|
156
|
-
var d = n(i), o = { name: "pt", weekdays: "domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"), weekdaysShort: "dom_seg_ter_qua_qui_sex_sab".split("_"), weekdaysMin: "Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"), months: "janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"), monthsShort: "jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"), ordinal: function(e) {
|
|
157
|
-
return e + "º";
|
|
158
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY [às] HH:mm", LLLL: "dddd, D [de] MMMM [de] YYYY [às] HH:mm" }, relativeTime: { future: "em %s", past: "há %s", s: "alguns segundos", m: "um minuto", mm: "%d minutos", h: "uma hora", hh: "%d horas", d: "um dia", dd: "%d dias", M: "um mês", MM: "%d meses", y: "um ano", yy: "%d anos" } };
|
|
159
|
-
return d.default.locale(o, null, !0), o;
|
|
160
|
-
});
|
|
161
|
-
})(N, N.exports);
|
|
162
|
-
var De = N.exports;
|
|
163
|
-
var O = { exports: {} }, we = O.exports;
|
|
164
|
-
(function(a, t) {
|
|
165
|
-
(function(i, n) {
|
|
166
|
-
a.exports = n(b);
|
|
167
|
-
})(x, function(i) {
|
|
168
|
-
"use strict";
|
|
169
|
-
function n(e) {
|
|
170
|
-
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
171
|
-
}
|
|
172
|
-
var d = n(i), o = { name: "fr", weekdays: "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"), weekdaysShort: "dim._lun._mar._mer._jeu._ven._sam.".split("_"), weekdaysMin: "di_lu_ma_me_je_ve_sa".split("_"), months: "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"), monthsShort: "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"), weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm" }, relativeTime: { future: "dans %s", past: "il y a %s", s: "quelques secondes", m: "une minute", mm: "%d minutes", h: "une heure", hh: "%d heures", d: "un jour", dd: "%d jours", M: "un mois", MM: "%d mois", y: "un an", yy: "%d ans" }, ordinal: function(e) {
|
|
173
|
-
return "" + e + (e === 1 ? "er" : "");
|
|
174
|
-
} };
|
|
175
|
-
return d.default.locale(o, null, !0), o;
|
|
176
|
-
});
|
|
177
|
-
})(O, O.exports);
|
|
178
|
-
var He = O.exports;
|
|
179
|
-
var R = { exports: {} }, ke = R.exports;
|
|
180
|
-
(function(a, t) {
|
|
181
|
-
(function(i, n) {
|
|
182
|
-
a.exports = n(b);
|
|
183
|
-
})(x, function(i) {
|
|
184
|
-
"use strict";
|
|
185
|
-
function n(e) {
|
|
186
|
-
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
187
|
-
}
|
|
188
|
-
var d = n(i), o = { name: "it", weekdays: "domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"), weekdaysShort: "dom_lun_mar_mer_gio_ven_sab".split("_"), weekdaysMin: "do_lu_ma_me_gi_ve_sa".split("_"), months: "gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"), weekStart: 1, monthsShort: "gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"), formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm" }, relativeTime: { future: "tra %s", past: "%s fa", s: "qualche secondo", m: "un minuto", mm: "%d minuti", h: "un' ora", hh: "%d ore", d: "un giorno", dd: "%d giorni", M: "un mese", MM: "%d mesi", y: "un anno", yy: "%d anni" }, ordinal: function(e) {
|
|
189
|
-
return e + "º";
|
|
190
|
-
} };
|
|
191
|
-
return d.default.locale(o, null, !0), o;
|
|
192
|
-
});
|
|
193
|
-
})(R, R.exports);
|
|
194
|
-
var Ne = R.exports;
|
|
195
|
-
b.extend(se);
|
|
196
|
-
const Oe = ({
|
|
58
|
+
C.displayName = "ResourceCard";
|
|
59
|
+
const rt = ({
|
|
197
60
|
data: a,
|
|
198
61
|
fetchNextPage: t
|
|
199
62
|
}) => {
|
|
200
63
|
const {
|
|
201
|
-
currentApp:
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
64
|
+
currentApp: f
|
|
65
|
+
} = G(), {
|
|
66
|
+
t: x
|
|
67
|
+
} = F(), {
|
|
68
|
+
fromNow: u
|
|
69
|
+
} = L(), d = Q(), s = V(), o = W(), {
|
|
70
|
+
setSelectedResources: m,
|
|
207
71
|
setResourceIds: r,
|
|
208
|
-
openResource:
|
|
209
|
-
setResourceIsTrash:
|
|
210
|
-
} =
|
|
72
|
+
openResource: R,
|
|
73
|
+
setResourceIsTrash: g
|
|
74
|
+
} = X(), l = Y(), v = q({
|
|
211
75
|
from: {
|
|
212
76
|
opacity: 0
|
|
213
77
|
},
|
|
214
78
|
to: {
|
|
215
79
|
opacity: 1
|
|
216
80
|
}
|
|
217
|
-
}),
|
|
81
|
+
}), b = d.pagination.startIdx + d.pagination.pageSize < (d.pagination.maxIdx || 0), I = O(() => {
|
|
218
82
|
t();
|
|
219
|
-
}, []),
|
|
220
|
-
|
|
83
|
+
}, []), k = (e) => {
|
|
84
|
+
l ? (g(!0), r([e.id]), m([e])) : R(e);
|
|
221
85
|
};
|
|
222
|
-
async function
|
|
223
|
-
if (
|
|
224
|
-
r(
|
|
86
|
+
async function w(e) {
|
|
87
|
+
if (s.includes(e.id)) {
|
|
88
|
+
r(s.filter((h) => h !== e.id)), m(o.filter((h) => h.id !== e.id));
|
|
225
89
|
return;
|
|
226
90
|
}
|
|
227
|
-
r([...
|
|
91
|
+
r([...s, e.id]), m([...o, e]);
|
|
228
92
|
}
|
|
229
|
-
const
|
|
230
|
-
return /* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
93
|
+
const A = E("grid ps-0 list-unstyled");
|
|
94
|
+
return /* @__PURE__ */ n(S.Fragment, { children: [
|
|
95
|
+
/* @__PURE__ */ i(T.ul, { className: A, children: a == null ? void 0 : a.pages.map((e, h) => (
|
|
232
96
|
// eslint-disable-next-line react/no-array-index-key
|
|
233
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ i(S.Fragment, { children: e.resources.map((p) => {
|
|
234
98
|
const {
|
|
235
|
-
id:
|
|
236
|
-
updatedAt:
|
|
237
|
-
} =
|
|
238
|
-
return /* @__PURE__ */
|
|
99
|
+
id: P,
|
|
100
|
+
updatedAt: z
|
|
101
|
+
} = p, j = u(z);
|
|
102
|
+
return /* @__PURE__ */ i(T.li, { className: "g-col-4 z-1", style: {
|
|
239
103
|
position: "relative",
|
|
240
104
|
...v
|
|
241
|
-
}, children: /* @__PURE__ */
|
|
242
|
-
}) },
|
|
105
|
+
}, children: /* @__PURE__ */ i(C, { app: f, resource: p, time: j, isSelectable: !0, isSelected: s.includes(p.id), onClick: () => k(p), onSelect: () => w(p) }) }, P);
|
|
106
|
+
}) }, h)
|
|
243
107
|
)) }),
|
|
244
|
-
|
|
108
|
+
b && /* @__PURE__ */ i("div", { className: "d-grid gap-2 col-4 mx-auto my-24", children: /* @__PURE__ */ i(U, { type: "button", color: "secondary", variant: "filled", onClick: I, children: x("explorer.see.more") }) })
|
|
245
109
|
] });
|
|
246
110
|
};
|
|
247
111
|
export {
|
|
248
|
-
|
|
112
|
+
rt as default
|
|
249
113
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ExportModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onSuccess: () => void;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* HTML Export Modal (for Scrapbook)
|
|
9
|
+
*/
|
|
10
|
+
export default function ExportModal({ isOpen, onSuccess, onCancel, }: ExportModalProps): import("react").ReactPortal;
|
|
11
|
+
export {};
|
|
@@ -5,7 +5,7 @@ export default function useActionBar(): {
|
|
|
5
5
|
selectedElement: (import("edifice-ts-client").IFolder | import("edifice-ts-client").IResource)[];
|
|
6
6
|
currentFolderId: string | undefined;
|
|
7
7
|
overrideLabel: (action: IAction) => string;
|
|
8
|
-
handleClick: (action: IAction) => Promise<void
|
|
8
|
+
handleClick: (action: IAction) => Promise<void>;
|
|
9
9
|
isActivable: (action: IAction) => boolean;
|
|
10
10
|
isActionBarOpen: boolean;
|
|
11
11
|
isMoveModalOpen: boolean;
|
|
@@ -26,5 +26,8 @@ export default function useActionBar(): {
|
|
|
26
26
|
isShareResourceOpen: boolean;
|
|
27
27
|
onShareResourceCancel: () => void;
|
|
28
28
|
onShareResourceSuccess: () => void;
|
|
29
|
+
isExportModalOpen: boolean;
|
|
30
|
+
onExportCancel: () => void;
|
|
31
|
+
onExportSuccess: () => void;
|
|
29
32
|
onClearActionBar: () => void;
|
|
30
33
|
};
|