ode-explorer 2.1.2 → 2.1.3-develop.202502261417

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.
@@ -4,7 +4,7 @@ import { odeServices as D, ACTION as c, isActionAvailable as he } from "@edifice
4
4
  import { useUser as fe, Button as W, useEdificeClient as Re, ActionBar as me, BlogPublic as Se, ShareModal as Ee, ShareBlog as Oe, LoadingScreen as Ce } from "@edifice.io/react";
5
5
  import { useTransition as be, animated as ye } from "@react-spring/web";
6
6
  import { useTranslation as ee } from "react-i18next";
7
- import { f as J, u as Ie, c as ge, h as Ae, i as se, j as ve, k as Me, l as Pe, m as we, e as Fe, n as xe, o as Te, a as te, b as Be, p as De, q as Le, r as _e } from "./index2.js";
7
+ import { f as J, u as Ie, c as ge, h as ve, i as se, j as Ae, k as Me, l as Pe, m as we, e as Fe, n as xe, o as Te, a as te, b as Be, p as De, q as Le, r as _e } from "./index2.js";
8
8
  function Ne({
9
9
  roles: r,
10
10
  rights: s,
@@ -62,7 +62,7 @@ function Ne({
62
62
  };
63
63
  }
64
64
  function oe() {
65
- const [r, s] = L(!1), [t, p] = L("void"), [o, E] = L(), i = Ie((e) => e.config), m = ge(), h = Ae(), f = se(), l = ve(), n = Me(), R = J(), y = Pe(), I = we(), M = Fe(), _ = xe(), N = Te(), {
65
+ const [r, s] = L(!1), [t, p] = L("void"), [o, E] = L(), i = Ie((e) => e.config), m = ge(), h = ve(), f = se(), l = Ae(), n = Me(), R = J(), y = Pe(), I = we(), M = Fe(), _ = xe(), N = Te(), {
66
66
  openResource: P,
67
67
  printSelectedResource: k,
68
68
  openFolder: H,
@@ -160,7 +160,7 @@ function oe() {
160
160
  }
161
161
  const u = (e) => () => {
162
162
  t === e && (g(), w(), F());
163
- }, S = u("move"), V = u("move"), T = u("delete"), $ = u("delete"), A = u("publish"), v = u("publish"), d = u("edit_folder"), q = u("edit_folder"), G = u("edit_resource"), re = u("edit_resource"), ne = u("share"), ce = u("share"), ae = u("export"), ie = u("export");
163
+ }, S = u("move"), V = u("move"), T = u("delete"), $ = u("delete"), v = u("publish"), A = u("publish"), d = u("edit_folder"), q = u("edit_folder"), G = u("edit_resource"), re = u("edit_resource"), ne = u("share"), ce = u("share"), ae = u("export"), ie = u("export");
164
164
  async function le() {
165
165
  if (f && f.length > 0) {
166
166
  const e = f[0];
@@ -196,8 +196,8 @@ function oe() {
196
196
  onDeleteCancel: $,
197
197
  onDeleteSuccess: T,
198
198
  isPublishModalOpen: t === "publish",
199
- onPublishCancel: v,
200
- onPublishSuccess: A,
199
+ onPublishCancel: A,
200
+ onPublishSuccess: v,
201
201
  isEditFolderOpen: t === "edit_folder",
202
202
  onEditFolderCancel: q,
203
203
  onEditFolderSuccess: d,
@@ -286,8 +286,8 @@ function Ze() {
286
286
  }
287
287
  });
288
288
  return /* @__PURE__ */ Q(X, { children: [
289
- $((A, v) => v && /* @__PURE__ */ a(ye.div, { className: "position-fixed bottom-0 start-0 end-0", style: {
290
- ...A,
289
+ $((v, A) => A && /* @__PURE__ */ a(ye.div, { className: "position-fixed bottom-0 start-0 end-0", style: {
290
+ ...v,
291
291
  zIndex: 4
292
292
  }, children: /* @__PURE__ */ a(me, { children: t == null ? void 0 : t.filter((d) => d.available && d.target === "actionbar").map((d) => x(d) && /* @__PURE__ */ a(ke, { resourceRights: p, roleExpected: d.right, action: d, children: /* @__PURE__ */ a(W, { id: d.id, type: "button", color: "primary", variant: "filled", onClick: () => {
293
293
  g(d);
@@ -297,7 +297,7 @@ function Ze() {
297
297
  E && /* @__PURE__ */ a(Ye, { isOpen: E, onCancel: U, onSuccess: Y }),
298
298
  i && S && /* @__PURE__ */ a(He, { isOpen: i, resourceId: S.assetId, onCancel: j, onSuccess: z }),
299
299
  h && /* @__PURE__ */ a(ze, { edit: !0, isOpen: h, onCancel: l, onSuccess: n }),
300
- R && S && /* @__PURE__ */ a(Ue, { mode: "update", isOpen: R, resourceId: S.assetId, updateResource: T, onCancel: y, onSuccess: I, children: (A, v, d, q, G) => r === "blog" && he("createPublic", t) && /* @__PURE__ */ a(Se, { appCode: r, isUpdating: v, resource: A, watch: d, setValue: q, register: G }) }),
300
+ R && S && /* @__PURE__ */ a(Ue, { mode: "update", isOpen: R, resourceId: S.assetId, updateResource: T, onCancel: y, onSuccess: I, children: (v, A, d, q, G) => r === "blog" && he("createPublic", t) && /* @__PURE__ */ a(Se, { appCode: r, isUpdating: A, resource: v, watch: d, setValue: q, register: G }) }),
301
301
  M && S && /* @__PURE__ */ a(Ee, { isOpen: M, shareResource: V, shareOptions: {
302
302
  resourceCreatorId: S.creatorId,
303
303
  resourceId: S.assetId,
@@ -12,10 +12,10 @@ function P({
12
12
  onClose: s
13
13
  }) {
14
14
  var b;
15
- const n = k(), r = z(), c = A(), f = H(), u = t ? (b = n[0]) == null ? void 0 : b.name : void 0, {
15
+ const l = k(), r = z(), c = A(), f = H(), u = t ? (b = l[0]) == null ? void 0 : b.name : void 0, {
16
16
  reset: o,
17
17
  register: p,
18
- handleSubmit: l,
18
+ handleSubmit: n,
19
19
  setFocus: h,
20
20
  formState: {
21
21
  errors: F,
@@ -34,7 +34,7 @@ function P({
34
34
  var g;
35
35
  try {
36
36
  if (t) {
37
- const d = (g = n[0]) == null ? void 0 : g.parentId, E = n[0].id;
37
+ const d = (g = l[0]) == null ? void 0 : g.parentId, E = l[0].id;
38
38
  await f.mutate({
39
39
  folderId: E,
40
40
  parentId: d,
@@ -62,7 +62,7 @@ function P({
62
62
  isValid: v,
63
63
  register: p,
64
64
  setFocus: h,
65
- handleSubmit: l,
65
+ handleSubmit: n,
66
66
  onCancel: D,
67
67
  onSubmit: L
68
68
  };
@@ -71,7 +71,7 @@ function Z({
71
71
  isOpen: t,
72
72
  edit: e,
73
73
  onSuccess: s,
74
- onCancel: n
74
+ onCancel: l
75
75
  }) {
76
76
  const {
77
77
  t: r
@@ -81,19 +81,19 @@ function Z({
81
81
  isSubmitting: u,
82
82
  formId: o,
83
83
  onSubmit: p,
84
- onCancel: l,
84
+ onCancel: n,
85
85
  handleSubmit: h,
86
86
  register: F,
87
87
  setFocus: i
88
88
  } = P({
89
89
  edit: e,
90
90
  onSuccess: s,
91
- onClose: n
91
+ onClose: l
92
92
  });
93
93
  return q(() => {
94
94
  t && i("name");
95
- }, [t, i]), t ? /* @__PURE__ */ T(/* @__PURE__ */ x(m, { isOpen: t, onModalClose: l, id: "modal_" + o, children: [
96
- /* @__PURE__ */ a(m.Header, { onModalClose: l, children: r(e ? "explorer.rename.folder" : "explorer.create.folder") }),
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
97
  /* @__PURE__ */ a(m.Body, { children: /* @__PURE__ */ a("form", { id: o, onSubmit: h(p), children: /* @__PURE__ */ x(B, { id: "nameFolder", isRequired: !0, children: [
98
98
  /* @__PURE__ */ a(w, { children: r("explorer.create.folder.name") }),
99
99
  /* @__PURE__ */ a(R, { type: "text", ...F("name", {
@@ -106,7 +106,7 @@ function Z({
106
106
  }), placeholder: r("explorer.create.folder.name"), size: "md", "aria-required": !0, maxLength: 60 })
107
107
  ] }) }) }),
108
108
  /* @__PURE__ */ x(m.Footer, { children: [
109
- /* @__PURE__ */ a(C, { color: "tertiary", onClick: l, type: "button", variant: "ghost", children: r("explorer.cancel") }),
109
+ /* @__PURE__ */ a(C, { color: "tertiary", onClick: n, type: "button", variant: "ghost", children: r("explorer.cancel") }),
110
110
  /* @__PURE__ */ a(C, { form: o, type: "submit", color: "primary", variant: "filled", disabled: !c || !f || u, children: r(e ? "explorer.rename" : "explorer.create") })
111
111
  ] })
112
112
  ] }), document.getElementById("portal")) : null;
package/lib/MoveModal.js CHANGED
@@ -8,20 +8,20 @@ import { y as D, j as E, i as j, z as k, a as U } from "./index2.js";
8
8
  function O({
9
9
  onSuccess: a
10
10
  }) {
11
- const [d, n] = B(), u = A(), o = D(), h = E(), p = j(), i = k(), {
11
+ const [i, n] = B(), u = A(), o = D(), h = E(), p = j(), d = k(), {
12
12
  fetchTreeData: v
13
13
  } = U();
14
14
  async function y() {
15
15
  try {
16
- if (!d) throw new Error("explorer.move.selection.empty");
17
- await o.mutate(d), await (a == null ? void 0 : a());
16
+ if (!i) throw new Error("explorer.move.selection.empty");
17
+ await o.mutate(i), await (a == null ? void 0 : a());
18
18
  } catch (r) {
19
19
  console.error(r);
20
20
  }
21
21
  }
22
22
  const I = (r) => {
23
23
  var f, c;
24
- const t = C(i, r);
24
+ const t = C(d, r);
25
25
  for (const e of h)
26
26
  if (r === e.id || r === e.parentId || (f = e.childrenIds) != null && f.includes(r) || t.includes(e.id))
27
27
  return !1;
@@ -31,14 +31,14 @@ function O({
31
31
  return !0;
32
32
  };
33
33
  return {
34
- treeData: i,
35
- disableSubmit: !d,
34
+ treeData: d,
35
+ disableSubmit: !i,
36
36
  handleTreeItemSelect: (r) => {
37
37
  I(r) ? n(r) : n(void 0);
38
38
  },
39
39
  handleOnTreeItemUnfold: (r) => {
40
40
  var c, e;
41
- const t = x(i, r), f = (c = t == null ? void 0 : t.children) == null ? void 0 : c.some((l) => {
41
+ const t = x(d, r), f = (c = t == null ? void 0 : t.children) == null ? void 0 : c.some((l) => {
42
42
  var M;
43
43
  return Array.isArray(l == null ? void 0 : l.children) && ((M = l.children) == null ? void 0 : M.length) > 0;
44
44
  });
@@ -51,7 +51,7 @@ function O({
51
51
  }
52
52
  function W({
53
53
  isOpen: a,
54
- onSuccess: d,
54
+ onSuccess: i,
55
55
  onCancel: n
56
56
  }) {
57
57
  const {
@@ -61,11 +61,11 @@ function W({
61
61
  } = w(), {
62
62
  treeData: h,
63
63
  handleTreeItemSelect: p,
64
- handleOnTreeItemUnfold: i,
64
+ handleOnTreeItemUnfold: d,
65
65
  onMove: v,
66
66
  disableSubmit: y
67
67
  } = O({
68
- onSuccess: d
68
+ onSuccess: i
69
69
  }), I = {
70
70
  ...h,
71
71
  name: o("explorer.filters.mine", {
@@ -75,7 +75,7 @@ function W({
75
75
  return /* @__PURE__ */ g(/* @__PURE__ */ T(m, { isOpen: a, onModalClose: n, id: "moveModal", children: [
76
76
  /* @__PURE__ */ s(m.Header, { onModalClose: n, children: o("explorer.move.title") }),
77
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 }) }),
78
+ /* @__PURE__ */ s(m.Body, { children: /* @__PURE__ */ s(F, { data: I, onTreeItemClick: p, onTreeItemUnfold: d }) }),
79
79
  /* @__PURE__ */ T(m.Footer, { children: [
80
80
  /* @__PURE__ */ s(b, { color: "tertiary", onClick: n, type: "button", variant: "ghost", children: o("explorer.cancel") }),
81
81
  /* @__PURE__ */ s(b, { color: "primary", onClick: v, type: "button", variant: "filled", disabled: y, children: o("explorer.move") })
@@ -1,158 +1,160 @@
1
- import { jsxs as n, jsx as i, Fragment as k } from "react/jsx-runtime";
2
- import D, { useState as O, useEffect as H, useCallback as $ } from "react";
3
- import { useBreakpoint as j, Card as m, IconButton as V, Image as E, AppIcon as G, Avatar as L, Tooltip as F, useEdificeClient as U, useDate as q, Button as J } from "@edifice.io/react";
4
- import { useSpring as K, animated as P } from "@react-spring/web";
5
- import Q from "clsx";
6
- import { useTranslation as T } from "react-i18next";
7
- import { f as z, o as W, e as X, h as Y, i as Z, a as ee } from "./index2.js";
8
- import { useDraggable as ie } from "@dnd-kit/core";
9
- import { S as te, D as ae } from "./DraggableCard.js";
10
- const le = ({
1
+ import { jsxs as l, jsx as i, Fragment as H } from "react/jsx-runtime";
2
+ import D, { useState as $, useEffect as j, useCallback as V } from "react";
3
+ import { useBreakpoint as E, useEdificeClient as T, Card as m, IconButton as G, Image as L, AppIcon as U, Avatar as q, Tooltip as F, useDate as J, Button as K } from "@edifice.io/react";
4
+ import { useSpring as Q, animated as P } from "@react-spring/web";
5
+ import W from "clsx";
6
+ import { useTranslation as z } from "react-i18next";
7
+ import { f as B, o as X, e as Y, h as Z, i as ee, a as ie } from "./index2.js";
8
+ import { useDraggable as te } from "@dnd-kit/core";
9
+ import { S as ae, D as le } from "./DraggableCard.js";
10
+ const ne = ({
11
11
  title: t,
12
12
  titleId: e,
13
- ...s
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: [
13
+ ...n
14
+ }) => /* @__PURE__ */ l("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, ...n, 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
- ] }), ne = ({
17
+ ] }), se = ({
18
18
  title: t,
19
19
  titleId: e,
20
- ...s
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: [
20
+ ...n
21
+ }) => /* @__PURE__ */ l("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, ...n, 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
- ] }), se = ({
25
+ ] }), de = ({
26
26
  title: t,
27
27
  titleId: e,
28
- ...s
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: [
28
+ ...n
29
+ }) => /* @__PURE__ */ l("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, ...n, 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
- ] }), B = ({
33
+ ] }), k = ({
34
34
  app: t,
35
35
  resource: e,
36
- time: s,
37
- isSelected: x = !1,
38
- isSelectable: b = !0,
36
+ time: n,
37
+ isSelected: b = !1,
38
+ isSelectable: w = !0,
39
39
  onClick: g,
40
40
  onSelect: r
41
41
  }) => {
42
- const [d, p] = O(!1), h = z(), {
43
- lg: f
44
- } = j(), v = `/userbook/avatar/${e == null ? void 0 : e.creatorId}`;
45
- function w(l) {
42
+ const [s, p] = $(!1), h = B(), {
43
+ lg: v
44
+ } = E(), u = `/userbook/avatar/${e == null ? void 0 : e.creatorId}`;
45
+ function R(f) {
46
46
  const {
47
- rights: N,
48
- creatorId: M
49
- } = l || {};
50
- return N.filter((C) => !C.includes(M)).length >= 1;
47
+ rights: M,
48
+ creatorId: C
49
+ } = f || {};
50
+ return M.filter((O) => !O.includes(C)).length >= 1;
51
51
  }
52
52
  const {
53
- attributes: R,
53
+ attributes: S,
54
54
  listeners: _,
55
- setNodeRef: S,
56
- transform: c
57
- } = ie({
55
+ setNodeRef: y,
56
+ transform: d
57
+ } = te({
58
58
  id: e.id,
59
59
  data: {
60
60
  id: e.id,
61
61
  type: "resource"
62
62
  },
63
- disabled: !!h || !f
64
- }), y = w(e), I = e == null ? void 0 : e.public, u = W(), {
65
- t: a
66
- } = T(), o = {
67
- position: d ? "absolute" : "relative",
68
- zIndex: d ? 2e3 : 1,
69
- transform: `translate3d(${((c == null ? void 0 : c.x) ?? 0) / 1}px, ${((c == null ? void 0 : c.y) ?? 0) / 1}px, 0)`
63
+ disabled: !!h || !v
64
+ }), I = R(e), N = e == null ? void 0 : e.public, x = X(), {
65
+ appCode: a
66
+ } = T(), {
67
+ t: c
68
+ } = z(), o = {
69
+ position: s ? "absolute" : "relative",
70
+ zIndex: s ? 2e3 : 1,
71
+ transform: `translate3d(${((d == null ? void 0 : d.x) ?? 0) / 1}px, ${((d == null ? void 0 : d.y) ?? 0) / 1}px, 0)`
70
72
  };
71
- return H(() => {
72
- const l = u.elementDrag === e.id;
73
- p(l);
74
- }, [u]), /* @__PURE__ */ i("div", { ref: S, style: {
73
+ return j(() => {
74
+ const f = x.elementDrag === e.id;
75
+ p(f);
76
+ }, [x]), /* @__PURE__ */ i("div", { ref: y, style: {
75
77
  ...o
76
- }, children: d ? /* @__PURE__ */ i(ae, { app: t, type: "resource", name: e == null ? void 0 : e.name }) : /* @__PURE__ */ i(m, { app: t, isSelected: !d && x, isSelectable: !d && b, onClick: g, onSelect: r, children: (l) => /* @__PURE__ */ n(k, { children: [
77
- !d && f && !h && /* @__PURE__ */ i("div", { className: "card-header z-3", style: {
78
+ }, children: s ? /* @__PURE__ */ i(le, { app: t, type: "resource", name: e == null ? void 0 : e.name }) : /* @__PURE__ */ i(m, { app: t, isSelected: !s && b, isSelectable: !s && w, onClick: g, onSelect: r, children: () => /* @__PURE__ */ l(H, { children: [
79
+ !s && v && !h && /* @__PURE__ */ i("div", { className: "card-header z-3", style: {
78
80
  position: "fixed",
79
81
  left: "37px"
80
- }, children: /* @__PURE__ */ i(V, { ..._, ...R, className: "bg-white z-3", color: "secondary", icon: /* @__PURE__ */ i(te, {}), variant: "ghost" }) }),
81
- /* @__PURE__ */ n(m.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: t, iconFit: "ratio", size: "80", variant: "rounded" }) }),
83
- /* @__PURE__ */ n("div", { className: "text-truncate", children: [
82
+ }, children: /* @__PURE__ */ i(G, { ..._, ...S, className: "bg-white z-3", color: "secondary", icon: /* @__PURE__ */ i(ae, {}), variant: "ghost" }) }),
83
+ /* @__PURE__ */ l(m.Body, { children: [
84
+ /* @__PURE__ */ i("div", { className: "card-image medium", children: e != null && e.thumbnail ? /* @__PURE__ */ i(L, { alt: "", src: `${e == null ? void 0 : e.thumbnail}?thumbnail=80x80`, objectFit: "cover", className: "h-full w-100" }) : /* @__PURE__ */ i(U, { app: t, iconFit: "ratio", size: "80", variant: "rounded" }) }),
85
+ /* @__PURE__ */ l("div", { className: "text-truncate", children: [
84
86
  /* @__PURE__ */ i(m.Title, { children: e == null ? void 0 : e.name }),
85
- /* @__PURE__ */ i(m.Text, { children: /* @__PURE__ */ i("em", { children: s }) })
87
+ /* @__PURE__ */ i(m.Text, { children: /* @__PURE__ */ i("em", { children: n }) })
86
88
  ] })
87
89
  ] }),
88
- /* @__PURE__ */ n(m.Footer, { children: [
89
- /* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8 text-truncate", children: [
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, {}),
90
+ /* @__PURE__ */ l(m.Footer, { children: [
91
+ /* @__PURE__ */ l("div", { className: "d-inline-flex align-items-center gap-8 text-truncate", children: [
92
+ u ? /* @__PURE__ */ i(q, { alt: (e == null ? void 0 : e.creatorName) || "", size: "xs", src: u, variant: "circle", width: "24", height: "24" }) : /* @__PURE__ */ i(de, {}),
91
93
  /* @__PURE__ */ i(m.Text, { children: e == null ? void 0 : e.creatorName })
92
94
  ] }),
93
- /* @__PURE__ */ n("div", { className: "d-inline-flex align-items-center gap-8", children: [
94
- y && /* @__PURE__ */ i(F, { message: a("tooltip.shared", {
95
- ns: l
96
- }), placement: "top", children: /* @__PURE__ */ i(ne, { width: 16, height: 16 }) }),
97
- I && /* @__PURE__ */ i(F, { message: a("tooltip.public", {
98
- ns: l
99
- }), placement: "top", children: /* @__PURE__ */ i(le, { width: 16, height: 16 }) })
95
+ /* @__PURE__ */ l("div", { className: "d-inline-flex align-items-center gap-8", children: [
96
+ I && /* @__PURE__ */ i(F, { message: c("tooltip.shared", {
97
+ ns: a
98
+ }), placement: "top", children: /* @__PURE__ */ i(se, { width: 16, height: 16 }) }),
99
+ N && /* @__PURE__ */ i(F, { message: c("tooltip.public", {
100
+ ns: a
101
+ }), placement: "top", children: /* @__PURE__ */ i(ne, { width: 16, height: 16 }) })
100
102
  ] })
101
103
  ] })
102
104
  ] }) }) });
103
105
  };
104
- B.displayName = "ResourceCard";
105
- const ve = ({
106
+ k.displayName = "ResourceCard";
107
+ const ue = ({
106
108
  data: t,
107
109
  fetchNextPage: e
108
110
  }) => {
109
111
  const {
110
- currentApp: s
111
- } = U(), {
112
- t: x
112
+ currentApp: n
113
113
  } = T(), {
114
- fromNow: b
115
- } = q(), g = X(), r = Y(), d = Z(), {
114
+ t: b
115
+ } = z(), {
116
+ fromNow: w
117
+ } = J(), g = Y(), r = Z(), s = ee(), {
116
118
  setSelectedResources: p,
117
119
  setResourceIds: h,
118
- openResource: f,
119
- setResourceIsTrash: v
120
- } = ee(), w = z(), R = K({
120
+ openResource: v,
121
+ setResourceIsTrash: u
122
+ } = ie(), R = B(), S = Q({
121
123
  from: {
122
124
  opacity: 0
123
125
  },
124
126
  to: {
125
127
  opacity: 1
126
128
  }
127
- }), S = g.pagination.startIdx + g.pagination.pageSize < (g.pagination.maxIdx || 0), c = $(() => {
129
+ }), y = g.pagination.startIdx + g.pagination.pageSize < (g.pagination.maxIdx || 0), d = V(() => {
128
130
  e();
129
- }, []), y = (a) => {
130
- w ? (v(!0), h([a.id]), p([a])) : f(a);
131
+ }, []), I = (a) => {
132
+ R ? (u(!0), h([a.id]), p([a])) : v(a);
131
133
  };
132
- async function I(a) {
134
+ async function N(a) {
133
135
  if (r.includes(a.id)) {
134
- h(r.filter((o) => o !== a.id)), p(d.filter((o) => o.id !== a.id));
136
+ h(r.filter((c) => c !== a.id)), p(s.filter((c) => c.id !== a.id));
135
137
  return;
136
138
  }
137
- h([...r, a.id]), p([...d, a]);
139
+ h([...r, a.id]), p([...s, a]);
138
140
  }
139
- const u = Q("grid ps-0 list-unstyled");
140
- return /* @__PURE__ */ n(D.Fragment, { children: [
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) => {
141
+ const x = W("grid ps-0 list-unstyled");
142
+ return /* @__PURE__ */ l(D.Fragment, { children: [
143
+ /* @__PURE__ */ i(P.ul, { className: x, children: t == null ? void 0 : t.pages.map((a, c) => /* @__PURE__ */ i(D.Fragment, { children: a.resources.map((o) => {
142
144
  const {
143
- id: N,
145
+ id: f,
144
146
  updatedAt: M
145
- } = l, A = b(M);
147
+ } = o, C = w(M);
146
148
  return /* @__PURE__ */ i(P.li, { className: "g-col-4", style: {
147
149
  position: "relative",
148
- ...R
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") }) })
150
+ ...S
151
+ }, children: /* @__PURE__ */ i(k, { app: n, resource: o, time: C, isSelectable: !0, isSelected: r.includes(o.id), onClick: (A) => {
152
+ A.stopPropagation(), I(o);
153
+ }, onSelect: () => N(o) }) }, f);
154
+ }) }, c)) }),
155
+ y && /* @__PURE__ */ i("div", { className: "d-grid gap-2 col-4 mx-auto my-24", children: /* @__PURE__ */ i(K, { type: "button", color: "secondary", variant: "filled", onClick: d, children: b("explorer.see.more") }) })
154
156
  ] });
155
157
  };
156
158
  export {
157
- ve as default
159
+ ue as default
158
160
  };