ode-explorer 1.3.2 → 1.3.3-develop-b2school.202402081140

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.
@@ -1,37 +1,43 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useOdeClient as m, useOdeTheme as a, usePaths as c, EmptyScreen as u } from "@edifice-ui/react";
3
- import { useTranslation as d } from "react-i18next";
4
- import { a as x } from "./index2.js";
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { useOdeClient as c, useOdeTheme as d, usePaths as m, EmptyScreen as u } from "@edifice-ui/react";
3
+ import { useTranslation as x } from "react-i18next";
4
+ import { a as y } from "./index2.js";
5
5
  import "react";
6
6
  import "@edifice-ui/icons";
7
7
  import "edifice-ts-client";
8
8
  import "i18next";
9
9
  import "zustand";
10
10
  import "@tanstack/react-query";
11
- function P() {
11
+ function $() {
12
12
  const {
13
13
  appCode: r
14
- } = m(), {
15
- theme: t
16
- } = a(), [i] = c(), {
17
- t: o
18
- } = d(), {
19
- data: p
20
- } = x(), e = p == null ? void 0 : p.find((s) => s.id === "create"), n = () => e != null && e.available && (t != null && t.is1d) ? o("explorer.emptyScreen.txt1d.create", {
14
+ } = c(), {
15
+ theme: e
16
+ } = d(), [s] = m(), {
17
+ t: l
18
+ } = x(), {
19
+ data: i
20
+ } = y(), t = i == null ? void 0 : i.find((o) => o.id === "create"), p = () => t != null && t.available && (e != null && e.is1d) ? l("explorer.emptyScreen.txt1d.create", {
21
21
  ns: r
22
- }) : e != null && e.available && !(t != null && t.is1d) ? o("explorer.emptyScreen.txt2d.create", {
22
+ }) : t != null && t.available && !(e != null && e.is1d) ? l("explorer.emptyScreen.txt2d.create", {
23
23
  ns: r
24
- }) : !(e != null && e.available) && (t != null && t.is1d) ? o("explorer.emptyScreen.txt1d.consultation", {
24
+ }) : !(t != null && t.available) && (e != null && e.is1d) ? l("explorer.emptyScreen.txt1d.consultation", {
25
25
  ns: r
26
- }) : o("explorer.emptyScreen.txt2d.consultation", {
26
+ }) : l("explorer.emptyScreen.txt2d.consultation", {
27
27
  ns: r
28
- });
29
- return /* @__PURE__ */ l(u, { imageSrc: `${i}/emptyscreen/illu-${r}.svg`, imageAlt: o("explorer.emptyScreen.app.alt", {
28
+ }), n = () => t != null && t.available && (e != null && e.is1d) ? l("explorer.emptyScreen.title1d.create", {
29
+ ns: r
30
+ }) : t != null && t.available && !(e != null && e.is1d) ? l("explorer.emptyScreen.title2d.create", {
31
+ ns: r
32
+ }) : !(t != null && t.available) && (e != null && e.is1d) ? l("explorer.emptyScreen.title1d.consultation", {
30
33
  ns: r
31
- }), title: `${e != null && e.available ? o("explorer.emptyScreen.title.create", {
34
+ }) : l("explorer.emptyScreen.title2d.consultation", {
35
+ ns: r
36
+ });
37
+ return /* @__PURE__ */ a(u, { imageSrc: `${s}/emptyscreen/illu-${r}.svg`, imageAlt: l("explorer.emptyScreen.app.alt", {
32
38
  ns: r
33
- }) : o("explorer.emptyScreen.title.consultation")}`, text: n() });
39
+ }), title: n(), text: p() });
34
40
  }
35
41
  export {
36
- P as default
42
+ $ as default
37
43
  };
@@ -1,11 +1,11 @@
1
1
  import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
- import { useId as B, useEffect as L } from "react";
3
- import { Modal as m, FormControl as j, Label as w, Input as R, Button as I } from "@edifice-ui/react";
2
+ import { useId as q, useEffect as B } from "react";
3
+ import { Modal as m, FormControl as L, Label as w, Input as R, Button as I } from "@edifice-ui/react";
4
4
  import { createPortal as T } from "react-dom";
5
5
  import { useTranslation as U } from "react-i18next";
6
6
  import { FOLDER as V } from "edifice-ts-client";
7
7
  import { useForm as _ } from "react-hook-form";
8
- import { h as k, b as z, o as A, p as H } from "./index2.js";
8
+ import { j as k, b as z, r as A, s as H } from "./index2.js";
9
9
  import "@edifice-ui/icons";
10
10
  import "i18next";
11
11
  import "zustand";
@@ -32,15 +32,15 @@ function P({
32
32
  values: {
33
33
  name: u || ""
34
34
  }
35
- }), M = B(), D = async function({
35
+ }), M = q(), D = async function({
36
36
  name: y
37
37
  }) {
38
38
  var C;
39
39
  try {
40
40
  if (o) {
41
- const i = (C = l[0]) == null ? void 0 : C.parentId, q = l[0].id;
41
+ const i = (C = l[0]) == null ? void 0 : C.parentId, j = l[0].id;
42
42
  await f.mutate({
43
- folderId: q,
43
+ folderId: j,
44
44
  parentId: i,
45
45
  name: y
46
46
  }), t(), e == null || e();
@@ -94,11 +94,11 @@ function oe({
94
94
  onSuccess: s,
95
95
  onClose: l
96
96
  });
97
- return L(() => {
97
+ return B(() => {
98
98
  o && d("name");
99
99
  }, [o, d]), o ? /* @__PURE__ */ T(/* @__PURE__ */ b(m, { isOpen: o, onModalClose: n, id: "modal_" + t, children: [
100
100
  /* @__PURE__ */ a(m.Header, { onModalClose: n, children: r(e ? "explorer.rename.folder" : "explorer.create.folder") }),
101
- /* @__PURE__ */ a(m.Body, { children: /* @__PURE__ */ a("form", { id: t, onSubmit: h(p), children: /* @__PURE__ */ b(j, { id: "nameFolder", isRequired: !0, children: [
101
+ /* @__PURE__ */ a(m.Body, { children: /* @__PURE__ */ a("form", { id: t, onSubmit: h(p), children: /* @__PURE__ */ b(L, { id: "nameFolder", isRequired: !0, children: [
102
102
  /* @__PURE__ */ a(w, { children: r("explorer.create.folder.name") }),
103
103
  /* @__PURE__ */ a(R, { type: "text", ...F("name", {
104
104
  required: !0,
@@ -2,7 +2,7 @@ import { jsx as i, jsxs as y } from "react/jsx-runtime";
2
2
  import { Card as d, useOdeClient as C, useScrollToTop as T } from "@edifice-ui/react";
3
3
  import { useSpring as I, animated as a } from "@react-spring/web";
4
4
  import { Files as N } from "@edifice-ui/icons";
5
- import { h as x, i as j, u as A } from "./index2.js";
5
+ import { j, k as x, u as k } from "./index2.js";
6
6
  import "react";
7
7
  import "react-i18next";
8
8
  import "edifice-ts-client";
@@ -27,15 +27,15 @@ const E = ({
27
27
  var m, u;
28
28
  const {
29
29
  currentApp: n
30
- } = C(), l = x(), o = j(), {
30
+ } = C(), l = j(), o = x(), {
31
31
  setSelectedFolders: t,
32
32
  setFolderIds: c,
33
33
  openFolder: p
34
- } = A();
35
- function h(e) {
34
+ } = k();
35
+ function F(e) {
36
36
  o.includes(e.id) ? (c(o.filter((r) => r !== e.id)), t(l.filter((r) => r.id !== e.id))) : (c([...o, e.id]), t([...l, e]));
37
37
  }
38
- const F = I({
38
+ const h = I({
39
39
  from: {
40
40
  opacity: 0
41
41
  },
@@ -50,13 +50,13 @@ const E = ({
50
50
  } = e;
51
51
  return /* @__PURE__ */ i(a.li, { className: "g-col-4 z-1", style: {
52
52
  position: "relative",
53
- ...F
53
+ ...h
54
54
  }, children: /* @__PURE__ */ i(g, { name: S, app: n, isSelected: o.includes(e.id), onClick: () => {
55
55
  f(), p({
56
56
  folder: e,
57
57
  folderId: e.id
58
58
  });
59
- }, onSelect: () => h(e) }) }, r);
59
+ }, onSelect: () => F(e) }) }, r);
60
60
  }) }) : null;
61
61
  };
62
62
  export {
package/lib/Library.js CHANGED
@@ -1,21 +1,24 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { ArrowRight as l } from "@edifice-ui/icons";
3
- import { useOdeTheme as s, useLibraryUrl as n, usePaths as m, Image as c, Button as p } from "@edifice-ui/react";
4
- import { useTranslation as h } from "react-i18next";
5
- const u = () => {
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import { ArrowRight as s } from "@edifice-ui/icons";
3
+ import { useOdeTheme as o, useLibraryUrl as n, usePaths as m, Image as p } from "@edifice-ui/react";
4
+ import { useTranslation as c } from "react-i18next";
5
+ const y = () => {
6
6
  const {
7
- t: a
8
- } = h(), {
9
- theme: e
10
- } = s(), {
11
- libraryUrl: t
12
- } = n(), [o] = m();
13
- return /* @__PURE__ */ i("div", { className: "p-16", children: [
14
- /* @__PURE__ */ r(c, { width: "270", height: "140", loading: "lazy", className: "rounded", src: `${o}/${e == null ? void 0 : e.bootstrapVersion}/image-library.svg`, alt: a("explorer.libray.img.alt") }),
15
- /* @__PURE__ */ r("p", { className: "m-8", children: a("explorer.libray.title") }),
16
- /* @__PURE__ */ r("a", { href: t, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ r(p, { rightIcon: /* @__PURE__ */ r(l, {}), className: "py-0 px-8", variant: "ghost", color: "primary", children: a("explorer.libray.btn") }) })
7
+ t: e
8
+ } = c(), {
9
+ theme: a
10
+ } = o(), {
11
+ libraryUrl: i
12
+ } = n(), [l] = m();
13
+ return /* @__PURE__ */ t("div", { className: "p-16", children: [
14
+ /* @__PURE__ */ r(p, { width: "270", height: "140", loading: "lazy", className: "rounded", src: `${l}/${a == null ? void 0 : a.bootstrapVersion}/image-library.svg`, alt: e("explorer.libray.img.alt") }),
15
+ /* @__PURE__ */ r("p", { className: "m-8", children: e("explorer.libray.title") }),
16
+ /* @__PURE__ */ t("a", { href: i, target: "_blank", rel: "noreferrer", className: "d-inline-flex gap-4 btn btn-ghost-primary py-0 p-0 pe-8", children: [
17
+ /* @__PURE__ */ r("span", { children: e("explorer.libray.btn") }),
18
+ /* @__PURE__ */ r(s, {})
19
+ ] })
17
20
  ] });
18
21
  };
19
22
  export {
20
- u as default
23
+ y as default
21
24
  };
package/lib/MoveModal.js CHANGED
@@ -3,19 +3,19 @@ import { Modal as a, TreeView as T, Button as I } from "@edifice-ui/react";
3
3
  import { createPortal as M } from "react-dom";
4
4
  import { useTranslation as y } from "react-i18next";
5
5
  import { useState as b } from "react";
6
- import { useQueryClient as F } from "@tanstack/react-query";
7
- import { s as x, h as S, g as w, u as g, t as B } from "./index2.js";
6
+ import { useQueryClient as x } from "@tanstack/react-query";
7
+ import { w as F, j as w, i as S, u as g, x as j } from "./index2.js";
8
8
  import "@edifice-ui/icons";
9
9
  import "edifice-ts-client";
10
10
  import "i18next";
11
11
  import "zustand";
12
- function C({
12
+ function B({
13
13
  onSuccess: n
14
14
  }) {
15
- const [d, t] = b(), r = x(), i = S(), m = w(), {
15
+ const [d, t] = b(), r = F(), i = w(), m = S(), {
16
16
  foldTreeItem: s,
17
17
  unfoldTreeItem: c
18
- } = g(), f = F();
18
+ } = g(), f = x();
19
19
  async function u() {
20
20
  try {
21
21
  if (!d)
@@ -60,9 +60,9 @@ function z({
60
60
  handleTreeItemUnfold: s,
61
61
  onMove: c,
62
62
  disableSubmit: f
63
- } = C({
63
+ } = B({
64
64
  onSuccess: d
65
- }), u = B();
65
+ }), u = j();
66
66
  return /* @__PURE__ */ M(/* @__PURE__ */ h(a, { isOpen: n, onModalClose: t, id: "moveModal", children: [
67
67
  /* @__PURE__ */ l(a.Header, { onModalClose: t, children: r("explorer.move.title") }),
68
68
  /* @__PURE__ */ l(a.Subtitle, { children: r("explorer.move.subtitle") }),
@@ -7,7 +7,7 @@ import { useTranslation as A } from "react-i18next";
7
7
  import { Users as W, Globe as X } from "@edifice-ui/icons";
8
8
  import { OneProfile as Z } from "@edifice-ui/icons/nav";
9
9
  import b from "dayjs";
10
- import { n as ee, f as te, g as ne, u as oe, d as ae } from "./index2.js";
10
+ import { d as ee, h as te, i as ne, u as oe, e as ae } from "./index2.js";
11
11
  import "edifice-ts-client";
12
12
  import "i18next";
13
13
  import "zustand";