ode-explorer 1.5.0-develop.202411181358 → 1.5.0-develop.202411221912

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/version.txt CHANGED
@@ -1 +1 @@
1
- ode-explorer= 18/11/2024 13:59:33
1
+ ode-explorer= 22/11/2024 19:12:56
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, Fragment as X, jsxs as Q } from "react/jsx-runtime";
2
2
  import { useState as L, useEffect as Z, Suspense as pe, lazy as b } from "react";
3
- import { useUser as he, Button as W, useOdeClient as fe, ActionBar as Re, isActionAvailable as me, BlogPublic as Se, ShareModal as Ee, ShareBlog as Oe, LoadingScreen as Ce } from "@edifice-ui/react";
3
+ import { useUser as he, Button as W, useOdeClient as fe, ActionBar as Re, LoadingScreen as me, isActionAvailable as Se, BlogPublic as Ee, ShareModal as Oe, ShareBlog as Ce } from "@edifice-ui/react";
4
4
  import { useTransition as be, animated as ye } from "@react-spring/web";
5
5
  import { useTranslation as ee } from "react-i18next";
6
6
  import { odeServices as D, ACTION as c } from "edifice-ts-client";
@@ -292,17 +292,17 @@ function Ze() {
292
292
  }, children: /* @__PURE__ */ a(Re, { 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);
294
294
  }, children: s(f(d)) }, d.id) }, d.id)) }) })),
295
- /* @__PURE__ */ Q(pe, { fallback: /* @__PURE__ */ a(Ce, {}), children: [
295
+ /* @__PURE__ */ Q(pe, { fallback: /* @__PURE__ */ a(me, {}), children: [
296
296
  o && /* @__PURE__ */ a(je, { isOpen: o, onCancel: w, onSuccess: F }),
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: (v, A, d, q, G) => r === "blog" && me("createPublic", t) && /* @__PURE__ */ a(Se, { appCode: r, isUpdating: A, resource: v, watch: d, setValue: q, register: G }) }),
301
- M && S && /* @__PURE__ */ a(Ee, { isOpen: M, shareResource: V, shareOptions: {
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" && Se("createPublic", t) && /* @__PURE__ */ a(Ee, { appCode: r, isUpdating: A, resource: v, watch: d, setValue: q, register: G }) }),
301
+ M && S && /* @__PURE__ */ a(Oe, { isOpen: M, shareResource: V, shareOptions: {
302
302
  resourceCreatorId: S.creatorId,
303
303
  resourceId: S.assetId,
304
304
  resourceRights: S.rights
305
- }, onCancel: _, onSuccess: N, children: r === "blog" ? /* @__PURE__ */ a(Oe, { resourceId: S.assetId, updateResource: T }) : null }),
305
+ }, onCancel: _, onSuccess: N, children: r === "blog" ? /* @__PURE__ */ a(Ce, { resourceId: S.assetId, updateResource: T }) : null }),
306
306
  P && S && /* @__PURE__ */ a(Ve, { isOpen: P, onCancel: k, onSuccess: H })
307
307
  ] })
308
308
  ] });
package/lib/AppAction.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as h, Fragment as S, jsx as e } from "react/jsx-runtime";
2
2
  import { Suspense as A, lazy as x } from "react";
3
3
  import { Plus as O } from "@edifice-ui/icons";
4
- import { useToggle as P, useOdeClient as R, Button as y, isActionAvailable as I, BlogPublic as k, LoadingScreen as F } from "@edifice-ui/react";
4
+ import { useToggle as P, useOdeClient as R, Button as y, LoadingScreen as I, isActionAvailable as k, BlogPublic as F } from "@edifice-ui/react";
5
5
  import { useTranslation as T } from "react-i18next";
6
6
  import { u as j, a as v, b as B, c as w, d as z, e as L, g as M } from "./index2.js";
7
7
  const N = /* @__PURE__ */ x(async () => await import("./ResourceModal.js"));
@@ -27,7 +27,7 @@ function Q() {
27
27
  }
28
28
  i(), u(), s();
29
29
  }, children: l("explorer.create.title") }),
30
- /* @__PURE__ */ e(A, { fallback: /* @__PURE__ */ e(F, {}), children: c && /* @__PURE__ */ e(N, { mode: "create", currentFolder: n, createResource: m, isOpen: c, onSuccess: s, onCancel: s, children: (t, f, C, g, b) => o === "blog" && I("createPublic", r) && /* @__PURE__ */ e(k, { appCode: o, isUpdating: f, resource: t, watch: C, setValue: g, register: b }) }) })
30
+ /* @__PURE__ */ e(A, { fallback: /* @__PURE__ */ e(I, {}), children: c && /* @__PURE__ */ e(N, { mode: "create", currentFolder: n, createResource: m, isOpen: c, onSuccess: s, onCancel: s, children: (t, f, C, g, b) => o === "blog" && k("createPublic", r) && /* @__PURE__ */ e(F, { appCode: o, isUpdating: f, resource: t, watch: C, setValue: g, register: b }) }) })
31
31
  ] }) : null;
32
32
  }
33
33
  export {
package/lib/index2.js CHANGED
@@ -2,7 +2,7 @@ import { jsxs as E, Fragment as G, jsx as c } from "react/jsx-runtime";
2
2
  import { useEffect as $, Suspense as M, lazy as q, useState as le, useRef as Se, Fragment as be } from "react";
3
3
  import { useSensor as oe, PointerSensor as we, KeyboardSensor as xe, useSensors as Te, DndContext as Ce } from "@dnd-kit/core";
4
4
  import { snapCenterToCursor as Fe } from "@dnd-kit/modifiers";
5
- import { findParentNode as Re, findNodeById as J, wrapTreeNode as Ne, useToast as L, moveNode as Ee, useUser as de, useOdeClient as v, addNode as Pe, updateNode as Ae, useShareMutation as Qe, useUpdateMutation as qe, deleteNode as Oe, getAncestors as ne, LoadingScreen as U, FormControl as ke, Input as Ue, SearchButton as Me, Dropdown as j, useToggle as Le, useScrollToTop as ve, TreeView as Be, Button as Ke, IconButton as $e, useXitiTrackPageLoad as _e, isActionAvailable as ae, AppHeader as ze, Breadcrumb as je, Grid as te } from "@edifice-ui/react";
5
+ import { findNodeById as J, wrapTreeNode as Re, findParentNode as Ne, useToast as L, moveNode as Ee, deleteNode as Pe, useUser as de, useShareMutation as Ae, useUpdateMutation as Qe, useOdeClient as v, addNode as qe, updateNode as Oe, getAncestors as ne, LoadingScreen as U, FormControl as ke, Input as Ue, SearchButton as Me, Dropdown as j, useToggle as Le, useScrollToTop as ve, TreeView as Be, Button as Ke, IconButton as $e, useXitiTrackPageLoad as _e, isActionAvailable as ae, AppHeader as ze, Breadcrumb as je, Grid as te } from "@edifice-ui/react";
6
6
  import { odeServices as A, FOLDER as N, SORT_ORDER as Ve, ResourceService as ue } from "edifice-ts-client";
7
7
  import { t as P } from "i18next";
8
8
  import { createStore as We, useStore as He } from "zustand";
@@ -351,7 +351,7 @@ const he = async (e) => {
351
351
  }
352
352
  })
353
353
  });
354
- t().actions.setTreeData(Ne(t().treeData, n == null ? void 0 : n.folders, a || N.DEFAULT));
354
+ t().actions.setTreeData(Re(t().treeData, n == null ? void 0 : n.folders, a || N.DEFAULT));
355
355
  },
356
356
  selectTreeItem: (s, r) => {
357
357
  const {
@@ -385,7 +385,7 @@ const he = async (e) => {
385
385
  folder: fe,
386
386
  folderId: N.DEFAULT
387
387
  }), !s) return;
388
- const n = Re(r, s);
388
+ const n = Ne(r, s);
389
389
  a({
390
390
  folder: n,
391
391
  folderId: (n == null ? void 0 : n.id) || N.DEFAULT
@@ -615,7 +615,7 @@ const Ft = (e, t) => {
615
615
  resources: y.resources.filter((S) => u ? !a.includes(S.assetId) : !p.includes(S.id))
616
616
  };
617
617
  })
618
- }, b = Oe(r, {
618
+ }, b = Pe(r, {
619
619
  folders: o
620
620
  });
621
621
  return h(b), d({
@@ -882,7 +882,7 @@ const Ft = (e, t) => {
882
882
  ...D,
883
883
  folders: [...D.folders, h]
884
884
  }))
885
- }, m = Pe(r, {
885
+ }, m = qe(r, {
886
886
  parentId: i.parentId,
887
887
  newFolder: h
888
888
  });
@@ -934,7 +934,7 @@ const Ft = (e, t) => {
934
934
  rights: w.rights
935
935
  } : w)
936
936
  }))
937
- }, D = Ae(r, {
937
+ }, D = Oe(r, {
938
938
  folderId: h.folderId,
939
939
  newFolder: l
940
940
  });
@@ -958,7 +958,7 @@ const Ft = (e, t) => {
958
958
  filters: a,
959
959
  trashed: n
960
960
  }];
961
- return Qe({
961
+ return Ae({
962
962
  application: e,
963
963
  options: {
964
964
  onSuccess: async (p, i) => {
@@ -999,7 +999,7 @@ const Ft = (e, t) => {
999
999
  filters: r,
1000
1000
  trashed: o
1001
1001
  }];
1002
- return qe({
1002
+ return Qe({
1003
1003
  application: e,
1004
1004
  options: {
1005
1005
  onSuccess: async (n, u) => {
@@ -5,10 +5,10 @@ import { AppParams } from '../../config';
5
5
  * @param actions (expects an array of actions)
6
6
  * @returns queryOptions with key, fn, and selected data
7
7
  */
8
- export declare const actionsQueryOptions: (actions: IAction[], config: AppParams | undefined) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<Record<string, boolean>, Error, IAction[], string[]>, "queryFn"> & {
9
- queryFn?: import('@tanstack/react-query').QueryFunction<Record<string, boolean>, string[], never> | undefined;
8
+ export declare const actionsQueryOptions: (actions: IAction[], config: AppParams | undefined) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<Record<string, boolean>, Error, IAction[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
9
+ queryFn?: import('@tanstack/react-query').QueryFunction<Record<string, boolean>, import('@tanstack/react-query').QueryKey, never> | undefined;
10
10
  } & {
11
- queryKey: import('@tanstack/react-query').DataTag<string[], Record<string, boolean>>;
11
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, Record<string, boolean>>;
12
12
  };
13
13
  /**
14
14
  * useActions query
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ode-explorer",
3
- "version": "1.5.0-develop.202411181358",
3
+ "version": "1.5.0-develop.202411221912",
4
4
  "description": "Edifice Explorer",
5
5
  "homepage": "https://github.com/edificeio/explorer#readme",
6
6
  "bugs": {