ode-explorer 2.2.12-develop.202508200034 → 2.2.12-develop.202510091718

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/lib/AppAction.js CHANGED
@@ -1,35 +1,39 @@
1
- import { jsxs as b, Fragment as h, jsx as e } from "react/jsx-runtime";
2
- import { Suspense as A, lazy as x } from "react";
3
- import { isActionAvailable as I } from "@edifice.io/client";
4
- import { useToggle as P, useEdificeClient as R, Button as y, BlogPublic as O, LoadingScreen as k } from "@edifice.io/react";
5
- import { u as v, a as F, b as T, c as j, d as B, e as w, S as z, g as E } from "./index2.js";
6
- import { useTranslation as L } from "react-i18next";
7
- const M = /* @__PURE__ */ x(async () => await import("./ResourceModal.js"));
8
- function Q() {
9
- const [c, s] = P(), a = v((o) => o.config), {
1
+ import { jsxs as h, Fragment as A, jsx as e } from "react/jsx-runtime";
2
+ import { Suspense as x, lazy as I } from "react";
3
+ import { isActionAvailable as P } from "@edifice.io/client";
4
+ import { useToggle as R, useEdificeClient as y, Button as O, BlogPublic as k, LoadingScreen as v } from "@edifice.io/react";
5
+ import { u as F, a as T, b as j, c as B, d as w, e as z, S as E, g as L } from "./index2.js";
6
+ import { useTranslation as M } from "react-i18next";
7
+ const N = /* @__PURE__ */ I(async () => await import("./ResourceModal.js"));
8
+ function U({
9
+ onResourceCreated: l
10
+ }) {
11
+ const [c, s] = R(), a = F((o) => o.config), {
10
12
  appCode: t
11
- } = R(), {
12
- t: l
13
- } = L(t), {
14
- clearSelectedItems: i,
15
- clearSelectedIds: u
16
- } = F(), {
13
+ } = y(), {
14
+ t: i
15
+ } = M(t), {
16
+ clearSelectedItems: u,
17
+ clearSelectedIds: d
18
+ } = T(), {
17
19
  data: r
18
- } = T(a == null ? void 0 : a.actions), d = r == null ? void 0 : r.find((o) => o.id === "create"), n = j(), m = B(), p = w();
19
- return d ? /* @__PURE__ */ b(h, { children: [
20
- /* @__PURE__ */ e(y, { type: "button", color: "primary", variant: "filled", leftIcon: /* @__PURE__ */ e(z, {}), className: "ms-auto", onClick: () => {
20
+ } = j(a == null ? void 0 : a.actions), m = r == null ? void 0 : r.find((o) => o.id === "create"), n = B(), p = w({
21
+ onResourceCreated: l
22
+ }), f = z();
23
+ return m ? /* @__PURE__ */ h(A, { children: [
24
+ /* @__PURE__ */ e(O, { type: "button", color: "primary", variant: "filled", leftIcon: /* @__PURE__ */ e(E, {}), className: "ms-auto", onClick: () => {
21
25
  if (t == "scrapbook") {
22
- E({
23
- searchParams: p,
26
+ L({
27
+ searchParams: f,
24
28
  folderId: n.id
25
29
  });
26
30
  return;
27
31
  }
28
- i(), u(), s();
29
- }, children: l("explorer.create.title") }),
30
- /* @__PURE__ */ e(A, { fallback: /* @__PURE__ */ e(k, {}), children: c && /* @__PURE__ */ e(M, { mode: "create", currentFolder: n, createResource: m, isOpen: c, onSuccess: s, onCancel: s, children: (o, f, C, g, S) => t === "blog" && I("createPublic", r) && /* @__PURE__ */ e(O, { appCode: t, isUpdating: f, resource: o, watch: C, setValue: g, register: S }) }) })
32
+ u(), d(), s();
33
+ }, children: i("explorer.create.title") }),
34
+ /* @__PURE__ */ e(x, { fallback: /* @__PURE__ */ e(v, {}), children: c && /* @__PURE__ */ e(N, { mode: "create", currentFolder: n, createResource: p, isOpen: c, onSuccess: s, onCancel: s, children: (o, C, g, S, b) => t === "blog" && P("createPublic", r) && /* @__PURE__ */ e(k, { appCode: t, isUpdating: C, resource: o, watch: g, setValue: S, register: b }) }) })
31
35
  ] }) : null;
32
36
  }
33
37
  export {
34
- Q as default
38
+ U as default
35
39
  };
@@ -1,29 +1,41 @@
1
- import { _ as c } from "./dynamic-import-helper.js";
2
- import { jsx as u } from "react/jsx-runtime";
3
- import { useEdificeClient as g, useEdificeTheme as f, EmptyScreen as b } from "@edifice.io/react";
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { useEdificeClient as u, useEdificeTheme as g, EmptyScreen as f } from "@edifice.io/react";
4
3
  import { useTranslation as y } from "react-i18next";
5
- import { useState as v, useEffect as _ } from "react";
4
+ import { useState as b, useEffect as v } from "react";
6
5
  import "@edifice.io/client";
7
6
  import "@tanstack/react-query";
8
7
  import "i18next";
9
- import { u as x, b as S } from "./index2.js";
10
- function F() {
8
+ import { u as _, b as x } from "./index2.js";
9
+ const S = (t, e, o) => {
10
+ const s = t[e];
11
+ return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((m, r) => {
12
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
13
+ r.bind(
14
+ null,
15
+ new Error(
16
+ "Unknown variable dynamic import: " + e + (e.split("/").length !== o ? ". Note that variables only represent file names one level deep." : "")
17
+ )
18
+ )
19
+ );
20
+ });
21
+ };
22
+ function U() {
11
23
  const {
12
24
  appCode: t
13
- } = g(), {
25
+ } = u(), {
14
26
  theme: e
15
- } = f(), {
27
+ } = g(), {
16
28
  t: o
17
- } = y(), [m, p] = v("");
18
- _(() => {
29
+ } = y(), [s, m] = b("");
30
+ v(() => {
19
31
  (async () => {
20
- const a = await c(/* @__PURE__ */ Object.assign({ "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-blog.svg": () => import("./illu-blog.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-collaborativeeditor.svg": () => import("./illu-collaborativeeditor.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-collaborativewall.svg": () => import("./illu-collaborativewall.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-error.svg": () => import("./illu-error.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-exercizer.svg": () => import("./illu-exercizer.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-homeworks.svg": () => import("./illu-homeworks.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-messagerie.svg": () => import("./illu-messagerie.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-mindmap.svg": () => import("./illu-mindmap.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-no-content-in-folder.svg": () => import("./illu-no-content-in-folder.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-pad.svg": () => import("./illu-pad.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-scrapbook.svg": () => import("./illu-scrapbook.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-search.svg": () => import("./illu-search.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-timeline.svg": () => import("./illu-timeline.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-timelinegenerator.svg": () => import("./illu-timelinegenerator.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-trash.svg": () => import("./illu-trash.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-wiki.svg": () => import("./illu-wiki.js") }), `../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-${t}.svg`, 10);
21
- p(a.default);
32
+ const a = await S(/* @__PURE__ */ Object.assign({ "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-actualites.svg": () => import("./illu-actualites.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-blog.svg": () => import("./illu-blog.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-collaborativeeditor.svg": () => import("./illu-collaborativeeditor.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-collaborativewall.svg": () => import("./illu-collaborativewall.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-error.svg": () => import("./illu-error.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-exercizer.svg": () => import("./illu-exercizer.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-homeworks.svg": () => import("./illu-homeworks.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-messagerie.svg": () => import("./illu-messagerie.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-mindmap.svg": () => import("./illu-mindmap.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-no-content-in-folder.svg": () => import("./illu-no-content-in-folder.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-pad.svg": () => import("./illu-pad.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-scrapbook.svg": () => import("./illu-scrapbook.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-search.svg": () => import("./illu-search.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-timeline.svg": () => import("./illu-timeline.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-timelinegenerator.svg": () => import("./illu-timelinegenerator.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-trash.svg": () => import("./illu-trash.js"), "../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-wiki.svg": () => import("./illu-wiki.js") }), `../../../node_modules/@edifice.io/bootstrap/dist/images/emptyscreen/illu-${t}.svg`, 10);
33
+ m(a.default);
22
34
  })();
23
35
  }, [t]);
24
- const r = x((s) => s.config), {
25
- data: l
26
- } = S(r == null ? void 0 : r.actions), i = l == null ? void 0 : l.find((s) => s.id === "create"), d = () => i != null && i.available && (e != null && e.is1d) ? o("explorer.emptyScreen.txt1d.create", {
36
+ const r = _((l) => l.config), {
37
+ data: n
38
+ } = x(r == null ? void 0 : r.actions), i = n == null ? void 0 : n.find((l) => l.id === "create"), p = () => i != null && i.available && (e != null && e.is1d) ? o("explorer.emptyScreen.txt1d.create", {
27
39
  ns: t
28
40
  }) : i != null && i.available && !(e != null && e.is1d) ? o("explorer.emptyScreen.txt2d.create", {
29
41
  ns: t
@@ -31,7 +43,7 @@ function F() {
31
43
  ns: t
32
44
  }) : o("explorer.emptyScreen.txt2d.consultation", {
33
45
  ns: t
34
- }), n = () => i != null && i.available && (e != null && e.is1d) ? o("explorer.emptyScreen.title1d.create", {
46
+ }), d = () => i != null && i.available && (e != null && e.is1d) ? o("explorer.emptyScreen.title1d.create", {
35
47
  ns: t
36
48
  }) : i != null && i.available && !(e != null && e.is1d) ? o("explorer.emptyScreen.title2d.create", {
37
49
  ns: t
@@ -40,10 +52,10 @@ function F() {
40
52
  }) : o("explorer.emptyScreen.title2d.consultation", {
41
53
  ns: t
42
54
  });
43
- return /* @__PURE__ */ u(b, { imageSrc: m, imageAlt: o("explorer.emptyScreen.app.alt", {
55
+ return /* @__PURE__ */ c(f, { imageSrc: s, imageAlt: o("explorer.emptyScreen.app.alt", {
44
56
  ns: t
45
- }), title: n(), text: d() });
57
+ }), title: d(), text: p() });
46
58
  }
47
59
  export {
48
- F as default
60
+ U as default
49
61
  };
package/lib/Library.js CHANGED
@@ -1,50 +1,51 @@
1
- import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
- import { useLibraryUrl as n, useEdificeTheme as s, Image as d } from "@edifice.io/react";
3
- import { useTranslation as c } from "react-i18next";
4
- import { _ as m } from "./dynamic-import-helper.js";
5
- import { odeServices as p } from "@edifice.io/client";
6
- import { useState as g, useEffect as b } from "react";
7
- const u = ({
1
+ import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
+ import { useTranslation as d } from "react-i18next";
3
+ import { odeServices as m } from "@edifice.io/client";
4
+ import { useLibraryUrl as p, useEdificeTheme as g } from "@edifice.io/react";
5
+ import { useState as u, useEffect as b } from "react";
6
+ const h = ({
8
7
  title: r,
9
8
  titleId: e,
10
- ...a
11
- }) => /* @__PURE__ */ o("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, ...a, children: [
12
- r ? /* @__PURE__ */ i("title", { id: e, children: r }) : null,
13
- /* @__PURE__ */ i("path", { fill: "currentColor", fillRule: "evenodd", d: "M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1", clipRule: "evenodd" }),
14
- /* @__PURE__ */ i("path", { fill: "currentColor", fillRule: "evenodd", d: "M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L17.586 12l-6.293-6.293a1 1 0 0 1 0-1.414", clipRule: "evenodd" })
9
+ ...i
10
+ }) => /* @__PURE__ */ a("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, ...i, children: [
11
+ r ? /* @__PURE__ */ l("title", { id: e, children: r }) : null,
12
+ /* @__PURE__ */ l("path", { fill: "currentColor", fillRule: "evenodd", d: "M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1", clipRule: "evenodd" }),
13
+ /* @__PURE__ */ l("path", { fill: "currentColor", fillRule: "evenodd", d: "M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L17.586 12l-6.293-6.293a1 1 0 0 1 0-1.414", clipRule: "evenodd" })
15
14
  ] }), f = () => {
16
- const r = n(), {
15
+ const r = p(), {
17
16
  theme: e
18
- } = s(), [a, l] = g("");
17
+ } = g(), [i, o] = u("");
19
18
  return b(() => {
20
- (async () => {
21
- const t = await m(/* @__PURE__ */ Object.assign({ "../../../../node_modules/@edifice.io/bootstrap/dist/images/neo/image-library.svg": () => import("./image-library.js"), "../../../../node_modules/@edifice.io/bootstrap/dist/images/one/image-library.svg": () => import("./image-library2.js") }), `../../../../node_modules/@edifice.io/bootstrap/dist/images/${e == null ? void 0 : e.bootstrapVersion}/image-library.svg`, 11);
22
- l(t.default);
23
- })();
19
+ var n, t;
20
+ const s = {
21
+ neo: "/explorer/public/img/image-library-neo.svg",
22
+ one: "/explorer/public/img/image-library-one.svg"
23
+ }, c = ((t = (n = e == null ? void 0 : e.bootstrapVersion) == null ? void 0 : n.toString()) == null ? void 0 : t.toLowerCase()) || "neo";
24
+ o(s[c] || "/explorer/public/img/image-library.svg");
24
25
  }, [e]), {
25
26
  libraryUrl: r,
26
- imageFullURL: a,
27
+ imageFullURL: i,
27
28
  handleClick: () => {
28
- r && (window.open(r, "_blank"), p.data().trackAccessLibraryFromExplorer());
29
+ r && (window.open(r, "_blank"), m.data().trackAccessLibraryFromExplorer());
29
30
  }
30
31
  };
31
- }, k = () => {
32
+ }, C = () => {
32
33
  const {
33
34
  libraryUrl: r,
34
35
  imageFullURL: e,
35
- handleClick: a
36
+ handleClick: i
36
37
  } = f(), {
37
- t: l
38
- } = c();
39
- return r && /* @__PURE__ */ o("div", { className: "p-16", children: [
40
- /* @__PURE__ */ i(d, { width: "270", height: "140", loading: "lazy", className: "rounded", src: e, alt: l("explorer.libray.img.alt") }),
41
- /* @__PURE__ */ i("p", { className: "m-8", children: l("explorer.libray.title") }),
42
- /* @__PURE__ */ o("button", { type: "button", onClick: a, rel: "noreferrer", className: "btn btn-ghost-primary d-inline-flex align-items-center gap-4 p-8", children: [
43
- /* @__PURE__ */ i("span", { children: l("explorer.libray.btn") }),
44
- /* @__PURE__ */ i(u, {})
38
+ t: o
39
+ } = d();
40
+ return r && /* @__PURE__ */ a("div", { className: "p-16", children: [
41
+ /* @__PURE__ */ l("img", { width: "270", height: "140", loading: "lazy", className: "rounded", src: e, alt: o("explorer.libray.img.alt") }),
42
+ /* @__PURE__ */ l("p", { className: "m-8", children: o("explorer.libray.title") }),
43
+ /* @__PURE__ */ a("button", { type: "button", onClick: i, rel: "noreferrer", className: "btn btn-ghost-primary d-inline-flex align-items-center gap-4 p-8", children: [
44
+ /* @__PURE__ */ l("span", { children: o("explorer.libray.btn") }),
45
+ /* @__PURE__ */ l(h, {})
45
46
  ] })
46
47
  ] });
47
48
  };
48
49
  export {
49
- k as default
50
+ C as default
50
51
  };
@@ -1 +1,4 @@
1
- export default function AppAction(): import("react/jsx-runtime").JSX.Element | null;
1
+ import { IResource } from '@edifice.io/client';
2
+ export default function AppAction({ onResourceCreated, }: {
3
+ onResourceCreated?: (resource: IResource) => void;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import { ResourceService, App, IAction, IFilter, IOrder, ResourceType } from '@edifice.io/client';
1
+ import { IResource, ResourceService, App, IAction, IFilter, IOrder, ResourceType } from '@edifice.io/client';
2
2
  export interface AppParams {
3
3
  /** Application code */
4
4
  app: App;
@@ -20,5 +20,7 @@ export interface AppParams {
20
20
  libraryAppFilter?: string;
21
21
  /** Enable or disable Explorer Onboarding Modal */
22
22
  enableOnboarding?: boolean;
23
+ /** Callback function triggered when a resource is created */
24
+ onResourceCreated?: (resource: IResource) => void;
23
25
  }
24
26
  export declare function getExplorerConfig(): AppParams;