ode-explorer 1.4.18 → 1.4.19-develop.202410251618

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.
Files changed (69) hide show
  1. package/dist/index.html +48 -48
  2. package/dist/index.js +1387 -76618
  3. package/dist/version.txt +1 -1
  4. package/explorer.d.ts +1 -1
  5. package/lib/ActionBarContainer.js +175 -175
  6. package/lib/AppAction.js +26 -30
  7. package/lib/DeleteModal.js +8 -14
  8. package/lib/DraggableCard.js +25 -0
  9. package/lib/EmptyScreenApp.js +22 -25
  10. package/lib/ExportModal.js +24 -30
  11. package/lib/FolderModal.js +14 -18
  12. package/lib/FoldersList.js +84 -47
  13. package/lib/Library.js +25 -27
  14. package/lib/MoveModal.js +65 -56
  15. package/lib/ResourcesList.js +98 -81
  16. package/lib/components/EmptyScreens/EmptyScreenApp.d.ts +0 -1
  17. package/lib/components/EmptyScreens/EmptyScreenError.d.ts +0 -1
  18. package/lib/components/EmptyScreens/EmptyScreenNoContentInFolder.d.ts +0 -1
  19. package/lib/components/EmptyScreens/EmptyScreenSearch.d.ts +0 -1
  20. package/lib/components/Explorer.d.ts +1 -1
  21. package/lib/components/LoadMore.d.ts +1 -2
  22. package/lib/components/OnboardingModal.d.ts +1 -1
  23. package/lib/config/dndkit.d.ts +2 -0
  24. package/lib/config/{getExplorerConfig.d.ts → explorer.d.ts} +5 -1
  25. package/lib/config/index.d.ts +2 -0
  26. package/lib/features/AccessControl/AccessControl.d.ts +2 -2
  27. package/lib/features/AccessControl/useAccessControl.d.ts +1 -1
  28. package/lib/features/ActionBar/Delete/DeleteModal.d.ts +1 -2
  29. package/lib/features/ActionBar/Disable/DisableModal.d.ts +1 -2
  30. package/lib/features/ActionBar/Export/ExportModal.d.ts +1 -2
  31. package/lib/features/ActionBar/Folder/FolderModal.d.ts +1 -2
  32. package/lib/features/ActionBar/Folder/useFolderModal.d.ts +5 -5
  33. package/lib/features/ActionBar/Move/MoveModal.d.ts +1 -2
  34. package/lib/features/ActionBar/Move/useMoveModal.d.ts +3 -4
  35. package/lib/features/ActionBar/Publish/PublishModal.d.ts +1 -1
  36. package/lib/features/ActionBar/Resource/ResourceModal.d.ts +1 -1
  37. package/lib/features/ActionBar/Share/ShareModal.d.ts +1 -1
  38. package/lib/features/ActionBar/Trash/TrashModal.d.ts +1 -2
  39. package/lib/features/ActionBar/useActionBar.d.ts +2 -2
  40. package/lib/features/DndKit/useDndKit.d.ts +7 -0
  41. package/lib/features/List/DraggableCard.d.ts +6 -0
  42. package/lib/features/List/FolderCard.d.ts +8 -4
  43. package/lib/features/List/FoldersList.d.ts +2 -2
  44. package/lib/features/List/ResourceCard.d.ts +3 -3
  45. package/lib/features/List/ResourcesList.d.ts +2 -2
  46. package/lib/features/SearchForm/useSearchForm.d.ts +1 -2
  47. package/lib/i18n.d.ts +1 -1
  48. package/lib/index.d.ts +2 -2
  49. package/lib/index.js +3 -12
  50. package/lib/index2.js +1018 -951
  51. package/lib/providers/index.d.ts +6 -0
  52. package/lib/services/api/index.d.ts +16 -16
  53. package/lib/services/queries/actions.d.ts +18 -0
  54. package/lib/services/queries/index.d.ts +46 -0
  55. package/lib/services/resource/service.d.ts +11 -0
  56. package/lib/store/index.d.ts +89 -35
  57. package/lib/utils/getChildrenIds.d.ts +2 -0
  58. package/lib/utils/isResourceShared.d.ts +1 -1
  59. package/package.json +52 -53
  60. package/lib/utils/TreeNodeFolderWrapper.d.ts +0 -12
  61. package/lib/utils/addNode.d.ts +0 -6
  62. package/lib/utils/deleteNode.d.ts +0 -4
  63. package/lib/utils/findNodeById.d.ts +0 -2
  64. package/lib/utils/getAncestors.d.ts +0 -2
  65. package/lib/utils/hasChildren.d.ts +0 -2
  66. package/lib/utils/modifyNode.d.ts +0 -2
  67. package/lib/utils/moveNode.d.ts +0 -5
  68. package/lib/utils/updateNode.d.ts +0 -6
  69. package/lib/utils/wrapTreeNode.d.ts +0 -3
@@ -1,113 +1,130 @@
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 { d as H, h as J, i as K, u as Q, e as V } from "./index2.js";
8
- import { Users as W, Globe as X } from "@edifice-ui/icons";
9
- import { OneProfile as Y } from "@edifice-ui/icons/nav";
10
- import "edifice-ts-client";
11
- import "i18next";
12
- import "zustand";
13
- import "@tanstack/react-query";
14
- const C = ({
15
- app: a,
1
+ import { jsx as e, jsxs as o, Fragment as $ } from "react/jsx-runtime";
2
+ import C, { useState as j, useEffect as M, useCallback as B } from "react";
3
+ import { Card as m, Image as E, AppIcon as G, Avatar as L, Tooltip as O, useOdeClient as U, useDate as q, Button as H } from "@edifice-ui/react";
4
+ import { useSpring as J, animated as P } from "@react-spring/web";
5
+ import K from "clsx";
6
+ import { useTranslation as k } from "react-i18next";
7
+ import { o as Q, e as V, h as W, i as X, a as Y, f as Z } from "./index2.js";
8
+ import { useDraggable as _ } from "@dnd-kit/core";
9
+ import { Users as tt, Globe as et } from "@edifice-ui/icons";
10
+ import { OneProfile as it } from "@edifice-ui/icons/nav";
11
+ import { D as at } from "./DraggableCard.js";
12
+ const w = ({
13
+ app: s,
16
14
  resource: t,
17
- time: f,
18
- isSelected: x = !1,
15
+ time: x,
16
+ isSelected: b = !1,
19
17
  isSelectable: u = !0,
20
- onClick: d,
21
- onSelect: s
18
+ onClick: h,
19
+ onSelect: c
22
20
  }) => {
23
- const o = `/userbook/avatar/${t == null ? void 0 : t.creatorId}`;
24
- function m(l) {
21
+ const [a, p] = j(!1), r = `/userbook/avatar/${t == null ? void 0 : t.creatorId}`;
22
+ function R(i) {
25
23
  const {
26
- rights: v,
27
- creatorId: N
28
- } = l || {};
29
- return v.filter((I) => !I.includes(N)).length >= 1;
24
+ rights: l,
25
+ creatorId: d
26
+ } = i || {};
27
+ return l.filter((F) => !F.includes(d)).length >= 1;
30
28
  }
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 }) })
29
+ const {
30
+ attributes: I,
31
+ listeners: v,
32
+ setNodeRef: y,
33
+ transform: n
34
+ } = _({
35
+ id: t.id,
36
+ data: {
37
+ id: t.id,
38
+ type: "resource"
39
+ }
40
+ }), S = R(t), N = t == null ? void 0 : t.public, g = Q(), {
41
+ t: f
42
+ } = k(), D = {
43
+ position: a ? "absolute" : "relative",
44
+ zIndex: a ? 2e3 : 1,
45
+ transform: `translate3d(${((n == null ? void 0 : n.x) ?? 0) / 1}px, ${((n == null ? void 0 : n.y) ?? 0) / 1}px, 0)`
46
+ };
47
+ return M(() => {
48
+ const i = g.elementDrag === t.id;
49
+ p(i);
50
+ }, [g]), /* @__PURE__ */ e("div", { ref: y, ...v, ...I, style: {
51
+ ...D
52
+ }, children: a ? /* @__PURE__ */ e(at, { app: s, type: "resource", name: t == null ? void 0 : t.name }) : /* @__PURE__ */ e(m, { app: s, isSelected: !a && b, isSelectable: !a && u, onClick: h, onSelect: c, children: (i) => /* @__PURE__ */ o($, { children: [
53
+ /* @__PURE__ */ o(m.Body, { children: [
54
+ /* @__PURE__ */ e("div", { className: "card-image medium", children: t != null && t.thumbnail ? /* @__PURE__ */ e(E, { alt: "", src: `${t == null ? void 0 : t.thumbnail}?thumbnail=80x80`, objectFit: "cover", className: "h-full w-100" }) : /* @__PURE__ */ e(G, { app: s, iconFit: "ratio", size: "80", variant: "rounded" }) }),
55
+ /* @__PURE__ */ o("div", { className: "text-truncate", children: [
56
+ /* @__PURE__ */ e(m.Title, { children: t == null ? void 0 : t.name }),
57
+ /* @__PURE__ */ e(m.Text, { children: /* @__PURE__ */ e("em", { children: x }) })
40
58
  ] })
41
59
  ] }),
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(Y, {}),
45
- /* @__PURE__ */ i(c.Text, { children: t == null ? void 0 : t.creatorName })
60
+ /* @__PURE__ */ o(m.Footer, { children: [
61
+ /* @__PURE__ */ o("div", { className: "d-inline-flex align-items-center gap-8 text-truncate", children: [
62
+ r ? /* @__PURE__ */ e(L, { alt: (t == null ? void 0 : t.creatorName) || "", size: "xs", src: r, variant: "circle", width: "24", height: "24" }) : /* @__PURE__ */ e(it, {}),
63
+ /* @__PURE__ */ e(m.Text, { children: t == null ? void 0 : t.creatorName })
46
64
  ] }),
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(W, { width: 16, height: 16 }) }),
51
- R && /* @__PURE__ */ i(y, { message: g("tooltip.public", {
52
- ns: l
53
- }), placement: "top", children: /* @__PURE__ */ i(X, { width: 16, height: 16 }) })
65
+ /* @__PURE__ */ o("div", { className: "d-inline-flex align-items-center gap-8", children: [
66
+ S && /* @__PURE__ */ e(O, { message: f("tooltip.shared", {
67
+ ns: i
68
+ }), placement: "top", children: /* @__PURE__ */ e(tt, { width: 16, height: 16 }) }),
69
+ N && /* @__PURE__ */ e(O, { message: f("tooltip.public", {
70
+ ns: i
71
+ }), placement: "top", children: /* @__PURE__ */ e(et, { width: 16, height: 16 }) })
54
72
  ] })
55
73
  ] })
56
- ] }) });
74
+ ] }) }) });
57
75
  };
58
- C.displayName = "ResourceCard";
59
- const rt = ({
60
- data: a,
76
+ w.displayName = "ResourceCard";
77
+ const ft = ({
78
+ data: s,
61
79
  fetchNextPage: t
62
80
  }) => {
63
81
  const {
64
- currentApp: f
65
- } = G(), {
66
- t: x
67
- } = F(), {
82
+ currentApp: x
83
+ } = U(), {
84
+ t: b
85
+ } = k(), {
68
86
  fromNow: u
69
- } = L(), d = H(), s = J(), o = K(), {
70
- setSelectedResources: m,
87
+ } = q(), h = V(), c = W(), a = X(), {
88
+ setSelectedResources: p,
71
89
  setResourceIds: r,
72
90
  openResource: R,
73
- setResourceIsTrash: g
74
- } = Q(), l = V(), v = q({
91
+ setResourceIsTrash: I
92
+ } = Y(), v = Z(), y = J({
75
93
  from: {
76
94
  opacity: 0
77
95
  },
78
96
  to: {
79
97
  opacity: 1
80
98
  }
81
- }), b = d.pagination.startIdx + d.pagination.pageSize < (d.pagination.maxIdx || 0), I = O(() => {
99
+ }), S = h.pagination.startIdx + h.pagination.pageSize < (h.pagination.maxIdx || 0), N = B(() => {
82
100
  t();
83
- }, []), k = (e) => {
84
- l ? (g(!0), r([e.id]), m([e])) : R(e);
101
+ }, []), g = (i) => {
102
+ v ? (I(!0), r([i.id]), p([i])) : R(i);
85
103
  };
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));
104
+ async function f(i) {
105
+ if (c.includes(i.id)) {
106
+ r(c.filter((l) => l !== i.id)), p(a.filter((l) => l.id !== i.id));
89
107
  return;
90
108
  }
91
- r([...s, e.id]), m([...o, e]);
109
+ r([...c, i.id]), p([...a, i]);
92
110
  }
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) => (
96
- // eslint-disable-next-line react/no-array-index-key
97
- /* @__PURE__ */ i(S.Fragment, { children: e.resources.map((p) => {
98
- const {
99
- id: P,
100
- updatedAt: z
101
- } = p, j = u(z);
102
- return /* @__PURE__ */ i(T.li, { className: "g-col-4 z-1", style: {
103
- position: "relative",
104
- ...v
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)
107
- )) }),
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") }) })
111
+ const D = K("grid ps-0 list-unstyled");
112
+ return /* @__PURE__ */ o(C.Fragment, { children: [
113
+ /* @__PURE__ */ e(P.ul, { className: D, children: s == null ? void 0 : s.pages.map((i, l) => /* @__PURE__ */ e(C.Fragment, { children: i.resources.map((d) => {
114
+ const {
115
+ id: T,
116
+ updatedAt: F
117
+ } = d, A = u(F);
118
+ return /* @__PURE__ */ e(P.li, { className: "g-col-4", style: {
119
+ position: "relative",
120
+ ...y
121
+ }, children: /* @__PURE__ */ e(w, { app: x, resource: d, time: A, isSelectable: !0, isSelected: c.includes(d.id), onClick: (z) => {
122
+ z.stopPropagation(), g(d);
123
+ }, onSelect: () => f(d) }) }, T);
124
+ }) }, l)) }),
125
+ S && /* @__PURE__ */ e("div", { className: "d-grid gap-2 col-4 mx-auto my-24", children: /* @__PURE__ */ e(H, { type: "button", color: "secondary", variant: "filled", onClick: N, children: b("explorer.see.more") }) })
109
126
  ] });
110
127
  };
111
128
  export {
112
- rt as default
129
+ ft as default
113
130
  };
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export default function EmptyScreenApp(): JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export default function EmptyScreenError(): JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export default function EmptyScreenNoContentInFolder(): JSX.Element | null;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export default function EmptyScreenSearch(): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { AppParams } from '../config/getExplorerConfig';
1
+ import { AppParams } from '../config';
2
2
  declare const Explorer: ({ config }: {
3
3
  config: AppParams;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const LoadMore: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLButtonElement>>;
1
+ declare const LoadMore: import('react').ForwardRefExoticComponent<import('react').RefAttributes<HTMLButtonElement>>;
3
2
  export default LoadMore;
@@ -1,2 +1,2 @@
1
- import { OnboardingModal } from "@edifice-ui/react";
1
+ import { OnboardingModal } from '@edifice-ui/react';
2
2
  export default OnboardingModal;
@@ -0,0 +1,2 @@
1
+ export declare const DELAY = 175;
2
+ export declare const TOLERANCE = 10;
@@ -1,7 +1,11 @@
1
- import { type App, type ResourceType, type IAction, type IFilter, type IOrder } from "edifice-ts-client";
1
+ import { ResourceService, App, IAction, IFilter, IOrder, ResourceType } from 'edifice-ts-client';
2
2
  export interface AppParams {
3
3
  /** Application code */
4
4
  app: App;
5
+ /**
6
+ * Initialize App Resource Service
7
+ */
8
+ service: typeof ResourceService;
5
9
  /** Array of ResourceType */
6
10
  types: ResourceType[];
7
11
  /** Array of IFilter */
@@ -0,0 +1,2 @@
1
+ export * from './dndkit';
2
+ export * from './explorer';
@@ -1,5 +1,5 @@
1
- import { type ReactNode, type ReactElement } from "react";
2
- import { IAction, RightRole } from "edifice-ts-client";
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { IAction, RightRole } from 'edifice-ts-client';
3
3
  import { IObjectWithRights } from './useAccessControl';
4
4
  interface AccessControlProps {
5
5
  roleExpected: RightRole | RightRole[];
@@ -1,4 +1,4 @@
1
- import { type RightRole } from "edifice-ts-client";
1
+ import { RightRole } from 'edifice-ts-client';
2
2
  export interface IObjectWithRights {
3
3
  rights: string[];
4
4
  }
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  interface ModalProps {
3
2
  isOpen: boolean;
4
3
  onSuccess?: () => void;
5
4
  onCancel?: () => void;
6
5
  }
7
- export default function DeleteModal({ isOpen, onSuccess, onCancel, }: ModalProps): import("react").ReactPortal;
6
+ export default function DeleteModal({ isOpen, onSuccess, onCancel, }: ModalProps): import('react').ReactPortal;
8
7
  export {};
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export default function DisableModal({ isOpen, onCancel, }: {
3
2
  isOpen: boolean;
4
3
  onCancel?: () => void;
5
- }): import("react").ReactPortal;
4
+ }): import('react').ReactPortal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface ExportModalProps {
3
2
  isOpen: boolean;
4
3
  onSuccess: () => void;
@@ -7,5 +6,5 @@ interface ExportModalProps {
7
6
  /**
8
7
  * HTML Export Modal (for Scrapbook)
9
8
  */
10
- export default function ExportModal({ isOpen, onSuccess, onCancel, }: ExportModalProps): import("react").ReactPortal;
9
+ export default function ExportModal({ isOpen, onSuccess, onCancel, }: ExportModalProps): import('react').ReactPortal;
11
10
  export {};
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  interface FolderModalProps {
3
2
  isOpen: boolean;
4
3
  edit: boolean;
5
4
  onSuccess?: () => void;
6
5
  onCancel: () => void;
7
6
  }
8
- export default function FolderModal({ isOpen, edit, onSuccess, onCancel: onClose, }: FolderModalProps): import("react").ReactPortal | null;
7
+ export default function FolderModal({ isOpen, edit, onSuccess, onCancel: onClose, }: FolderModalProps): import('react').ReactPortal | null;
9
8
  export {};
@@ -1,4 +1,4 @@
1
- import { type SubmitHandler } from "react-hook-form";
1
+ import { SubmitHandler } from 'react-hook-form';
2
2
  interface useFolderModalProps {
3
3
  edit: boolean;
4
4
  onSuccess?: () => void;
@@ -9,13 +9,13 @@ interface HandlerProps {
9
9
  }
10
10
  export declare function useFolderModal({ edit, onSuccess, onClose, }: useFolderModalProps): {
11
11
  formId: string;
12
- errors: import("react-hook-form").FieldErrors<HandlerProps>;
12
+ errors: import('react-hook-form').FieldErrors<HandlerProps>;
13
13
  isSubmitting: boolean;
14
14
  isDirty: boolean;
15
15
  isValid: boolean;
16
- register: import("react-hook-form").UseFormRegister<HandlerProps>;
17
- setFocus: import("react-hook-form").UseFormSetFocus<HandlerProps>;
18
- handleSubmit: import("react-hook-form").UseFormHandleSubmit<HandlerProps, undefined>;
16
+ register: import('react-hook-form').UseFormRegister<HandlerProps>;
17
+ setFocus: import('react-hook-form').UseFormSetFocus<HandlerProps>;
18
+ handleSubmit: import('react-hook-form').UseFormHandleSubmit<HandlerProps, undefined>;
19
19
  onCancel: () => void;
20
20
  onSubmit: SubmitHandler<HandlerProps>;
21
21
  };
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  interface MoveModalProps {
3
2
  isOpen: boolean;
4
3
  onSuccess: () => void;
5
4
  onCancel: () => void;
6
5
  }
7
- export default function MoveModal({ isOpen, onSuccess, onCancel, }: MoveModalProps): import("react").ReactPortal;
6
+ export default function MoveModal({ isOpen, onSuccess, onCancel, }: MoveModalProps): import('react').ReactPortal;
8
7
  export {};
@@ -1,12 +1,11 @@
1
- import { type ID } from "edifice-ts-client";
2
1
  interface ModalProps {
3
2
  onSuccess?: () => void;
4
3
  }
5
4
  export declare function useMoveModal({ onSuccess }: ModalProps): {
5
+ treeData: import('@edifice-ui/react').TreeData;
6
6
  disableSubmit: boolean;
7
7
  handleTreeItemSelect: (folderId: string) => void;
8
- handleTreeItemFold: (folderId: string) => void;
9
- handleTreeItemUnfold: (folderId: ID) => Promise<void>;
10
- onMove: () => void;
8
+ handleOnTreeItemUnfold: (nodeId: string) => void;
9
+ onMove: () => Promise<void>;
11
10
  };
12
11
  export {};
@@ -1,2 +1,2 @@
1
- import { PublishModal } from "@edifice-ui/react";
1
+ import { PublishModal } from '@edifice-ui/react';
2
2
  export default PublishModal;
@@ -1,2 +1,2 @@
1
- import { ResourceModal } from "@edifice-ui/react";
1
+ import { ResourceModal } from '@edifice-ui/react';
2
2
  export default ResourceModal;
@@ -1,2 +1,2 @@
1
- import { ShareModal } from "@edifice-ui/react";
1
+ import { ShareModal } from '@edifice-ui/react';
2
2
  export default ShareModal;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export default function TrashModal({ isOpen, onCancel, }: {
3
2
  isOpen: boolean;
4
3
  onCancel?: () => void;
5
- }): import("react").ReactPortal;
4
+ }): import('react').ReactPortal;
@@ -1,8 +1,8 @@
1
- import { type IAction } from "edifice-ts-client";
1
+ import { IAction } from 'edifice-ts-client';
2
2
  export default function useActionBar(): {
3
3
  onRestore: () => Promise<void>;
4
4
  actions: IAction[] | undefined;
5
- selectedElement: (import("edifice-ts-client").IFolder | import("edifice-ts-client").IResource)[];
5
+ selectedElement: (import('edifice-ts-client').IResource | import('edifice-ts-client').IFolder)[];
6
6
  currentFolderId: string | undefined;
7
7
  overrideLabel: (action: IAction) => string;
8
8
  handleClick: (action: IAction) => Promise<void>;
@@ -0,0 +1,7 @@
1
+ import { DragEndEvent, DragOverEvent, DragStartEvent } from '@dnd-kit/core';
2
+ export default function useDndKit(): {
3
+ handleDragEnd: (event: DragEndEvent) => Promise<void>;
4
+ handleDragStart: (event: DragStartEvent) => void;
5
+ handleDragOver: (event: DragOverEvent) => void;
6
+ sensors: import('@dnd-kit/core').SensorDescriptor<import('@dnd-kit/core').SensorOptions>[];
7
+ };
@@ -0,0 +1,6 @@
1
+ import { IWebApp } from 'edifice-ts-client';
2
+ export declare const DraggableCard: ({ app, type, name, }: {
3
+ app?: IWebApp;
4
+ type: "folder" | "resource";
5
+ name?: string;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { CardProps } from "@edifice-ui/react";
2
- import { IWebApp } from "edifice-ts-client";
3
- export interface FolderCardProps extends Omit<CardProps, "children"> {
1
+ import { CardProps } from '@edifice-ui/react';
2
+ import { ID, IWebApp } from 'edifice-ts-client';
3
+ export interface FolderCardProps extends Omit<CardProps, 'children'> {
4
4
  /**
5
5
  * IWeb App
6
6
  */
@@ -9,9 +9,13 @@ export interface FolderCardProps extends Omit<CardProps, "children"> {
9
9
  * Folder's name
10
10
  */
11
11
  name: string;
12
+ /**
13
+ * Folder's id
14
+ */
15
+ idFolder: ID;
12
16
  }
13
17
  declare const FolderCard: {
14
- ({ app, name, isSelected, isSelectable, onClick, onSelect, }: FolderCardProps): import("react/jsx-runtime").JSX.Element;
18
+ ({ app, name, idFolder, isSelected, isSelectable, onClick, onSelect, }: FolderCardProps): import("react/jsx-runtime").JSX.Element;
15
19
  displayName: string;
16
20
  };
17
21
  export default FolderCard;
@@ -1,5 +1,5 @@
1
- import { InfiniteData } from "@tanstack/react-query";
2
- import { ISearchResults } from "edifice-ts-client";
1
+ import { InfiniteData } from '@tanstack/react-query';
2
+ import { ISearchResults } from 'edifice-ts-client';
3
3
  declare const FoldersList: ({ data, }: {
4
4
  data: InfiniteData<ISearchResults> | undefined;
5
5
  isFetching: boolean;
@@ -1,6 +1,6 @@
1
- import { CardProps } from "@edifice-ui/react";
2
- import { IResource, IWebApp } from "edifice-ts-client";
3
- type OmitChildren = Omit<CardProps, "children">;
1
+ import { CardProps } from '@edifice-ui/react';
2
+ import { IResource, IWebApp } from 'edifice-ts-client';
3
+ type OmitChildren = Omit<CardProps, 'children'>;
4
4
  export interface ResourceCardProps extends OmitChildren {
5
5
  /**
6
6
  * IWeb App
@@ -1,5 +1,5 @@
1
- import { InfiniteData } from "@tanstack/react-query";
2
- import { ISearchResults } from "edifice-ts-client";
1
+ import { InfiniteData } from '@tanstack/react-query';
2
+ import { ISearchResults } from 'edifice-ts-client';
3
3
  declare const ResourcesList: ({ data, fetchNextPage, }: {
4
4
  data: InfiniteData<ISearchResults> | undefined;
5
5
  isFetching: boolean;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  export declare const useSearchForm: () => {
3
- formRef: import("react").MutableRefObject<null>;
2
+ formRef: import('react').MutableRefObject<null>;
4
3
  inputSearch: string;
5
4
  handleInputSearchChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
6
5
  handleKeyPress: (event: React.KeyboardEvent) => void;
package/lib/i18n.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import i18n from "i18next";
1
+ import { default as i18n } from 'i18next';
2
2
  export default i18n;
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { default as Explorer } from "./components/Explorer";
2
- export * from "./config/getExplorerConfig";
1
+ export { default as Explorer } from './components/Explorer';
2
+ export * from './config/explorer';
package/lib/index.js CHANGED
@@ -1,14 +1,5 @@
1
- import { E as g, z as l } from "./index2.js";
2
- import "react/jsx-runtime";
3
- import "react";
4
- import "@edifice-ui/react";
5
- import "@edifice-ui/icons";
6
- import "react-i18next";
7
- import "edifice-ts-client";
8
- import "i18next";
9
- import "zustand";
10
- import "@tanstack/react-query";
1
+ import { E as e, B as p } from "./index2.js";
11
2
  export {
12
- g as Explorer,
13
- l as getExplorerConfig
3
+ e as Explorer,
4
+ p as getExplorerConfig
14
5
  };