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/index.html +1 -1
- package/dist/index.js +108 -108
- package/dist/version.txt +1 -1
- package/lib/ActionBarContainer.js +5 -5
- package/lib/AppAction.js +2 -2
- package/lib/index2.js +8 -8
- package/lib/services/queries/actions.d.ts +3 -3
- package/package.json +1 -1
package/dist/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ode-explorer=
|
|
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,
|
|
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(
|
|
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" &&
|
|
301
|
-
M && S && /* @__PURE__ */ a(
|
|
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(
|
|
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,
|
|
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(
|
|
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 {
|
|
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(
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
|
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[],
|
|
9
|
-
queryFn?: import('@tanstack/react-query').QueryFunction<Record<string, boolean>,
|
|
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<
|
|
11
|
+
queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, Record<string, boolean>>;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* useActions query
|