ode-explorer 2.0.0-develop-integration.202501091206 → 2.0.0-develop.202501091533
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 +6 -6
- package/lib/ResourcesList.js +56 -56
- package/package.json +4 -4
package/lib/ResourcesList.js
CHANGED
|
@@ -8,78 +8,78 @@ import { f as z, o as W, e as X, h as Y, i as Z, a as ee } from "./index2.js";
|
|
|
8
8
|
import { useDraggable as ie } from "@dnd-kit/core";
|
|
9
9
|
import { S as te, D as ae } from "./DraggableCard.js";
|
|
10
10
|
const le = ({
|
|
11
|
-
title:
|
|
11
|
+
title: t,
|
|
12
12
|
titleId: e,
|
|
13
13
|
...s
|
|
14
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
|
-
|
|
15
|
+
t ? /* @__PURE__ */ i("title", { id: e, children: t }) : null,
|
|
16
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
17
|
] }), ne = ({
|
|
18
|
-
title:
|
|
18
|
+
title: t,
|
|
19
19
|
titleId: e,
|
|
20
20
|
...s
|
|
21
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
|
-
|
|
22
|
+
t ? /* @__PURE__ */ i("title", { id: e, children: t }) : null,
|
|
23
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
24
|
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "icon-users_svg__a", children: /* @__PURE__ */ i("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
25
25
|
] }), se = ({
|
|
26
|
-
title:
|
|
26
|
+
title: t,
|
|
27
27
|
titleId: e,
|
|
28
28
|
...s
|
|
29
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
|
-
|
|
30
|
+
t ? /* @__PURE__ */ i("title", { id: e, children: t }) : null,
|
|
31
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
32
|
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "icon-one-profile_svg__a", children: /* @__PURE__ */ i("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
33
33
|
] }), B = ({
|
|
34
|
-
app:
|
|
34
|
+
app: t,
|
|
35
35
|
resource: e,
|
|
36
36
|
time: s,
|
|
37
|
-
isSelected:
|
|
38
|
-
isSelectable:
|
|
37
|
+
isSelected: x = !1,
|
|
38
|
+
isSelectable: b = !0,
|
|
39
39
|
onClick: m,
|
|
40
|
-
onSelect:
|
|
40
|
+
onSelect: r
|
|
41
41
|
}) => {
|
|
42
|
-
const [d, g] = O(!1), {
|
|
43
|
-
lg:
|
|
44
|
-
} = j(),
|
|
45
|
-
function
|
|
42
|
+
const [d, g] = O(!1), p = z(), {
|
|
43
|
+
lg: f
|
|
44
|
+
} = j(), v = `/userbook/avatar/${e == null ? void 0 : e.creatorId}`;
|
|
45
|
+
function w(l) {
|
|
46
46
|
const {
|
|
47
47
|
rights: N,
|
|
48
48
|
creatorId: M
|
|
49
49
|
} = l || {};
|
|
50
50
|
return N.filter((C) => !C.includes(M)).length >= 1;
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
setNodeRef: I,
|
|
58
|
-
transform: t
|
|
52
|
+
const {
|
|
53
|
+
attributes: R,
|
|
54
|
+
listeners: _,
|
|
55
|
+
setNodeRef: S,
|
|
56
|
+
transform: c
|
|
59
57
|
} = ie({
|
|
60
58
|
id: e.id,
|
|
61
59
|
data: {
|
|
62
60
|
id: e.id,
|
|
63
61
|
type: "resource"
|
|
64
62
|
},
|
|
65
|
-
disabled: !!
|
|
66
|
-
}),
|
|
63
|
+
disabled: !!p || !f
|
|
64
|
+
}), y = w(e), I = e == null ? void 0 : e.public, u = W(), {
|
|
65
|
+
t: a
|
|
66
|
+
} = T(), o = {
|
|
67
67
|
position: d ? "absolute" : "relative",
|
|
68
68
|
zIndex: d ? 2e3 : 1,
|
|
69
|
-
transform: `translate3d(${((
|
|
69
|
+
transform: `translate3d(${((c == null ? void 0 : c.x) ?? 0) / 1}px, ${((c == null ? void 0 : c.y) ?? 0) / 1}px, 0)`
|
|
70
70
|
};
|
|
71
71
|
return H(() => {
|
|
72
|
-
const l =
|
|
72
|
+
const l = u.elementDrag === e.id;
|
|
73
73
|
g(l);
|
|
74
|
-
}, [
|
|
75
|
-
...
|
|
76
|
-
}, children: d ? /* @__PURE__ */ i(ae, { app:
|
|
77
|
-
!d &&
|
|
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(h, { app: t, isSelected: !d && x, isSelectable: !d && b, onClick: m, onSelect: r, children: (l) => /* @__PURE__ */ n(k, { children: [
|
|
77
|
+
!d && f && /* @__PURE__ */ i("div", { className: "card-header z-3", style: {
|
|
78
78
|
position: "fixed",
|
|
79
79
|
left: "37px"
|
|
80
|
-
}, children: /* @__PURE__ */ i(V, { ...
|
|
80
|
+
}, children: /* @__PURE__ */ i(V, { ..._, ...R, className: "bg-white z-3", color: "secondary", icon: /* @__PURE__ */ i(te, {}), variant: "ghost" }) }),
|
|
81
81
|
/* @__PURE__ */ n(h.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:
|
|
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
83
|
/* @__PURE__ */ n("div", { className: "text-truncate", children: [
|
|
84
84
|
/* @__PURE__ */ i(h.Title, { children: e == null ? void 0 : e.name }),
|
|
85
85
|
/* @__PURE__ */ i(h.Text, { children: /* @__PURE__ */ i("em", { children: s }) })
|
|
@@ -87,14 +87,14 @@ const le = ({
|
|
|
87
87
|
] }),
|
|
88
88
|
/* @__PURE__ */ n(h.Footer, { children: [
|
|
89
89
|
/* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8 text-truncate", children: [
|
|
90
|
-
|
|
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
91
|
/* @__PURE__ */ i(h.Text, { children: e == null ? void 0 : e.creatorName })
|
|
92
92
|
] }),
|
|
93
93
|
/* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8", children: [
|
|
94
|
-
|
|
94
|
+
y && /* @__PURE__ */ i(F, { message: a("tooltip.shared", {
|
|
95
95
|
ns: l
|
|
96
96
|
}), placement: "top", children: /* @__PURE__ */ i(ne, { width: 16, height: 16 }) }),
|
|
97
|
-
|
|
97
|
+
I && /* @__PURE__ */ i(F, { message: a("tooltip.public", {
|
|
98
98
|
ns: l
|
|
99
99
|
}), placement: "top", children: /* @__PURE__ */ i(le, { width: 16, height: 16 }) })
|
|
100
100
|
] })
|
|
@@ -103,20 +103,20 @@ const le = ({
|
|
|
103
103
|
};
|
|
104
104
|
B.displayName = "ResourceCard";
|
|
105
105
|
const ve = ({
|
|
106
|
-
data:
|
|
106
|
+
data: t,
|
|
107
107
|
fetchNextPage: e
|
|
108
108
|
}) => {
|
|
109
109
|
const {
|
|
110
110
|
currentApp: s
|
|
111
111
|
} = U(), {
|
|
112
|
-
t:
|
|
112
|
+
t: x
|
|
113
113
|
} = T(), {
|
|
114
|
-
fromNow:
|
|
115
|
-
} = q(), m = X(),
|
|
114
|
+
fromNow: b
|
|
115
|
+
} = q(), m = X(), r = Y(), d = Z(), {
|
|
116
116
|
setSelectedResources: g,
|
|
117
|
-
setResourceIds:
|
|
118
|
-
openResource:
|
|
119
|
-
setResourceIsTrash:
|
|
117
|
+
setResourceIds: p,
|
|
118
|
+
openResource: f,
|
|
119
|
+
setResourceIsTrash: v
|
|
120
120
|
} = ee(), w = z(), R = K({
|
|
121
121
|
from: {
|
|
122
122
|
opacity: 0
|
|
@@ -124,33 +124,33 @@ const ve = ({
|
|
|
124
124
|
to: {
|
|
125
125
|
opacity: 1
|
|
126
126
|
}
|
|
127
|
-
}),
|
|
127
|
+
}), S = m.pagination.startIdx + m.pagination.pageSize < (m.pagination.maxIdx || 0), c = $(() => {
|
|
128
128
|
e();
|
|
129
|
-
}, []),
|
|
130
|
-
w ? (
|
|
129
|
+
}, []), y = (a) => {
|
|
130
|
+
w ? (v(!0), p([a.id]), g([a])) : f(a);
|
|
131
131
|
};
|
|
132
|
-
async function
|
|
133
|
-
if (
|
|
134
|
-
r
|
|
132
|
+
async function I(a) {
|
|
133
|
+
if (r.includes(a.id)) {
|
|
134
|
+
p(r.filter((o) => o !== a.id)), g(d.filter((o) => o.id !== a.id));
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
p([...r, a.id]), g([...d, a]);
|
|
138
138
|
}
|
|
139
|
-
const
|
|
139
|
+
const u = Q("grid ps-0 list-unstyled");
|
|
140
140
|
return /* @__PURE__ */ n(D.Fragment, { children: [
|
|
141
|
-
/* @__PURE__ */ i(P.ul, { className:
|
|
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) => {
|
|
142
142
|
const {
|
|
143
143
|
id: N,
|
|
144
144
|
updatedAt: M
|
|
145
|
-
} = l, A =
|
|
145
|
+
} = l, A = b(M);
|
|
146
146
|
return /* @__PURE__ */ i(P.li, { className: "g-col-4", style: {
|
|
147
147
|
position: "relative",
|
|
148
148
|
...R
|
|
149
|
-
}, children: /* @__PURE__ */ i(B, { app: s, resource: l, time: A, isSelectable: !0, isSelected:
|
|
150
|
-
C.stopPropagation(),
|
|
151
|
-
}, onSelect: () =>
|
|
152
|
-
}) },
|
|
153
|
-
|
|
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") }) })
|
|
154
154
|
] });
|
|
155
155
|
};
|
|
156
156
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ode-explorer",
|
|
3
|
-
"version": "2.0.0-develop
|
|
3
|
+
"version": "2.0.0-develop.202501091533",
|
|
4
4
|
"description": "Edifice Explorer",
|
|
5
5
|
"homepage": "https://github.com/edificeio/explorer#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@dnd-kit/core": "^6.1.0",
|
|
40
40
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
41
|
-
"@edifice.io/react": "develop
|
|
42
|
-
"@edifice.io/bootstrap": "develop
|
|
43
|
-
"@edifice.io/client": "develop
|
|
41
|
+
"@edifice.io/react": "develop",
|
|
42
|
+
"@edifice.io/bootstrap": "develop",
|
|
43
|
+
"@edifice.io/client": "develop",
|
|
44
44
|
"@react-spring/web": "^9.7.3",
|
|
45
45
|
"@tanstack/react-query": "5.62.7",
|
|
46
46
|
"clsx": "^2.1.1",
|