@chaibuilder/sdk 1.2.50 → 1.2.52
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/{AddBlocks-IX7HKzSe.js → AddBlocks-GxEmM16E.js} +18 -18
- package/dist/{AddBlocks-zwZ63DdP.cjs → AddBlocks-fozauzIV.cjs} +1 -1
- package/dist/CanvasArea-NRtblq5d.cjs +56 -0
- package/dist/{CanvasArea-ehmBje_E.js → CanvasArea-rdY6SFYn.js} +57 -57
- package/dist/{ChaiBuilderEditor-ZRHqW7Gd.cjs → ChaiBuilderEditor-Pga_zJgw.cjs} +55 -55
- package/dist/{ChaiBuilderEditor-3xIN-AP_.js → ChaiBuilderEditor-bNZZWYMh.js} +14537 -14544
- package/dist/CodeEditor-tqtgia3I.js +115 -0
- package/dist/CodeEditor-ye3IXW3i.cjs +1 -0
- package/dist/{CurrentPage-qhBjm7th.js → CurrentPage-7NM90y76.js} +8 -8
- package/dist/{CurrentPage-HOPNdQZ-.cjs → CurrentPage-sx7KVTmt.cjs} +1 -1
- package/dist/ListTree-7Pz6H6eE.cjs +1 -0
- package/dist/ListTree-oRbeDNod.js +25724 -0
- package/dist/{PagesPanel-kdl4A0IN.cjs → PagesPanel-Nr-908vy.cjs} +1 -1
- package/dist/{PagesPanel-5iVsbDP1.js → PagesPanel-XiTUaiq_.js} +5 -5
- package/dist/{ProjectPanel-mXPBI-TU.cjs → ProjectPanel-SuFYN60H.cjs} +1 -1
- package/dist/{ProjectPanel-c8oTzhQd.js → ProjectPanel-XfknsGkz.js} +5 -5
- package/dist/Settings-22Hy7jUT.cjs +1 -0
- package/dist/{Settings-0uSGoECC.js → Settings-dJ72rwnH.js} +408 -401
- package/dist/{SidePanels-kKram02Q.cjs → SidePanels-5dnRAsJh.cjs} +1 -1
- package/dist/{SidePanels-YLWdBer9.js → SidePanels-t9oUA51J.js} +38 -38
- package/dist/{ThemeConfiguration-8W1CM4tW.cjs → ThemeConfiguration-2Sbh29qi.cjs} +1 -1
- package/dist/{ThemeConfiguration-AAGFJieC.js → ThemeConfiguration-pcHbYiIP.js} +9 -9
- package/dist/{Topbar-nX9Muoem.js → Topbar-0DmS6VpB.js} +4 -4
- package/dist/{Topbar-CLNUPx7K.cjs → Topbar-ID6Ipphd.cjs} +1 -1
- package/dist/{UILibrariesPanel-fKn2nlgI.js → UILibrariesPanel-G9J4KUsZ.js} +6 -6
- package/dist/{UILibrariesPanel-cp0Mkaq_.cjs → UILibrariesPanel-sXY6hozJ.cjs} +1 -1
- package/dist/{UnsplashImages-56HoW_ZA.cjs → UnsplashImages-HK4_1VVL.cjs} +1 -1
- package/dist/{UnsplashImages-zTZa3LjG.js → UnsplashImages-MeS5Cu7a.js} +4 -4
- package/dist/{UploadImages-SnfaTrlz.js → UploadImages-AIKATqfP.js} +2 -2
- package/dist/{UploadImages-okNGjkXb.cjs → UploadImages-LSnxByGV.cjs} +1 -1
- package/dist/{add-page-modal-uDoO0zws.js → add-page-modal-JkD45moJ.js} +9 -9
- package/dist/{add-page-modal-Y2RY3x01.cjs → add-page-modal-krxKdX7-.cjs} +1 -1
- package/dist/{confirm-alert-aD7AMK_6.cjs → confirm-alert--QTC21Z2.cjs} +1 -1
- package/dist/{confirm-alert-9XiVxCc0.js → confirm-alert-NHxthdRK.js} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +9 -0
- package/dist/core.js +32 -31
- package/dist/{delete-page-modal-7sfoFf9r.js → delete-page-modal-8rjPEchH.js} +4 -4
- package/dist/{delete-page-modal-ieJ367JA.cjs → delete-page-modal-BIe0kYNH.cjs} +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.js +2 -2
- package/dist/{form-KWYHDVIf.cjs → form-6OLp5uEG.cjs} +1 -1
- package/dist/{form-PQSmqcIl.js → form-PQYPrD_Q.js} +5 -5
- package/dist/functions--tdNWQDW.js +30 -0
- package/dist/functions-EVUeSwX1.cjs +1 -0
- package/dist/html-to-json-9uiQ2Dp2.cjs +1 -0
- package/dist/html-to-json-ofq1N3tB.js +186 -0
- package/dist/index--mLLy7QQ.cjs +1 -0
- package/dist/index-9_b2eou7.js +2201 -0
- package/dist/index-VBXQixVm.js +117 -0
- package/dist/index-seU0_UZX.cjs +1 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.js +11 -11
- package/dist/{page-viewer-aoro5JxT.cjs → page-viewer-WwwMC1Kq.cjs} +1 -1
- package/dist/{page-viewer-qkwZJ6e-.js → page-viewer-sKluQ_e1.js} +10 -10
- package/dist/{project-general-setting-3gkaXq1F.js → project-general-setting-Lc2ByvTt.js} +7 -7
- package/dist/{project-general-setting-arXitV5_.cjs → project-general-setting-pRO1ikDV.cjs} +1 -1
- package/dist/{project-seo-setting-X8pykTmc.js → project-seo-setting-530_6o9S.js} +3 -3
- package/dist/{project-seo-setting-kjtUt-er.cjs → project-seo-setting-BzSrXFVv.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.js +2 -2
- package/dist/{single-page-detail-UsWG0gfh.cjs → single-page-detail-_VP4zaCI.cjs} +1 -1
- package/dist/{single-page-detail-ZXZX6Xmw.js → single-page-detail-qDxxtedN.js} +6 -6
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +4 -4
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +98 -98
- package/dist/useCanvasSettings-5y2fSCpN.js +6 -0
- package/dist/useCanvasSettings-pURFQG4q.cjs +1 -0
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +320 -320
- package/package.json +3 -2
- package/dist/CanvasArea-URgoG1jc.cjs +0 -56
- package/dist/CodeEditor-0F7Dz3AB.js +0 -97
- package/dist/CodeEditor-1vu-qNgT.cjs +0 -1
- package/dist/ListTree-DkbFFDXB.cjs +0 -1
- package/dist/ListTree-sTwXvXST.js +0 -409
- package/dist/Settings-3kBSStO6.cjs +0 -1
- package/dist/functions-JO0EW8GX.js +0 -30
- package/dist/functions-ZZVUnIjD.cjs +0 -1
- package/dist/html-to-json-GJ6RioQf.js +0 -221
- package/dist/html-to-json-O1OpqICe.cjs +0 -1
- package/dist/index-VOrp9ZpX.cjs +0 -1
- package/dist/index-YpnaudSM.js +0 -63
- package/dist/index-ecnGWzh9.cjs +0 -1
- package/dist/index-i2kgLkjC.js +0 -2201
- package/dist/useCodeEditor-CtjbxWLf.cjs +0 -1
- package/dist/useCodeEditor-yl5V3Hte.js +0 -7
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
+
import k from "@monaco-editor/react";
|
|
3
|
+
import { i as C, L as j, Q as v, R as g, B as y } from "./ChaiBuilderEditor-bNZZWYMh.js";
|
|
4
|
+
import { useTranslation as N } from "react-i18next";
|
|
5
|
+
import { useState as n, useCallback as T, useEffect as E } from "react";
|
|
6
|
+
import { Cross2Icon as w } from "@radix-ui/react-icons";
|
|
7
|
+
import { useThrottledCallback as B } from "@react-hookz/web";
|
|
8
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
|
+
import "clsx";
|
|
10
|
+
import "react-dom";
|
|
11
|
+
import "@radix-ui/react-scroll-area";
|
|
12
|
+
import "@floating-ui/react-dom";
|
|
13
|
+
import "jotai";
|
|
14
|
+
import "i18next";
|
|
15
|
+
import "flagged";
|
|
16
|
+
import "lodash-es";
|
|
17
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
18
|
+
import "./Functions-7jnEwJyw.js";
|
|
19
|
+
import "tailwind-merge";
|
|
20
|
+
import "@chaibuilder/runtime";
|
|
21
|
+
import "tree-model";
|
|
22
|
+
import "./utils-VpVqnC9m.js";
|
|
23
|
+
import "@radix-ui/react-toggle";
|
|
24
|
+
import "class-variance-authority";
|
|
25
|
+
import "@radix-ui/react-switch";
|
|
26
|
+
import "@radix-ui/react-slot";
|
|
27
|
+
import "@radix-ui/react-accordion";
|
|
28
|
+
import "@radix-ui/react-alert-dialog";
|
|
29
|
+
import "@radix-ui/react-dialog";
|
|
30
|
+
import "@radix-ui/react-label";
|
|
31
|
+
import "@radix-ui/react-tabs";
|
|
32
|
+
import "@radix-ui/react-tooltip";
|
|
33
|
+
import "@radix-ui/react-popover";
|
|
34
|
+
import "@radix-ui/react-menubar";
|
|
35
|
+
import "@radix-ui/react-hover-card";
|
|
36
|
+
import "@radix-ui/react-select";
|
|
37
|
+
import "@radix-ui/react-dropdown-menu";
|
|
38
|
+
import "@radix-ui/react-separator";
|
|
39
|
+
import "@radix-ui/react-toast";
|
|
40
|
+
import "cmdk";
|
|
41
|
+
import "@radix-ui/react-context-menu";
|
|
42
|
+
import "react-icons-picker";
|
|
43
|
+
import "react-quill";
|
|
44
|
+
import "react-hotkeys-hook";
|
|
45
|
+
import "lucide-react";
|
|
46
|
+
import "./index-VBXQixVm.js";
|
|
47
|
+
const a = (r) => {
|
|
48
|
+
const i = document.createElement("div");
|
|
49
|
+
return i.innerHTML = r, i.innerHTML;
|
|
50
|
+
};
|
|
51
|
+
function vt() {
|
|
52
|
+
const { t: r } = N(), [i, p] = n(!1), [m, c] = n(""), [o, s] = C(), [l] = j(), d = v(), u = g(), f = B(
|
|
53
|
+
(e) => {
|
|
54
|
+
const b = a(e);
|
|
55
|
+
u([o.blockId], { [o.blockProp]: b });
|
|
56
|
+
},
|
|
57
|
+
[],
|
|
58
|
+
300
|
|
59
|
+
), x = T(() => {
|
|
60
|
+
if (i) {
|
|
61
|
+
const e = a(m);
|
|
62
|
+
d([o.blockId], { [o.blockProp]: e });
|
|
63
|
+
}
|
|
64
|
+
}, [i, m]);
|
|
65
|
+
E(() => {
|
|
66
|
+
l.includes(o == null ? void 0 : o.blockId) || (x(), s(null));
|
|
67
|
+
}, [l]);
|
|
68
|
+
const h = () => {
|
|
69
|
+
s(null);
|
|
70
|
+
};
|
|
71
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "h-full rounded-t-lg border-t-4 border-black bg-black text-white", children: [
|
|
72
|
+
/* @__PURE__ */ t.jsx("button", { onClick: h, className: "fixed inset-0 z-[100000] cursor-default bg-gray-400/20" }),
|
|
73
|
+
/* @__PURE__ */ t.jsxs("div", { className: "relative z-[100001] h-full w-full flex-col gap-y-1", children: [
|
|
74
|
+
/* @__PURE__ */ t.jsxs("div", { className: "-mt-1 flex items-center justify-between px-2 py-2", children: [
|
|
75
|
+
/* @__PURE__ */ t.jsxs("h3", { className: "space-x-3 text-sm font-semibold", children: [
|
|
76
|
+
/* @__PURE__ */ t.jsx("span", { children: r("HTML Code Editor |") }),
|
|
77
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-xs text-gray-400", children: r("Scripts will be only executed in preview and live mode.") })
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex gap-x-2", children: /* @__PURE__ */ t.jsx(
|
|
80
|
+
y,
|
|
81
|
+
{
|
|
82
|
+
onClick: () => s(null),
|
|
83
|
+
size: "sm",
|
|
84
|
+
variant: "destructive",
|
|
85
|
+
className: "h-6 w-fit",
|
|
86
|
+
children: /* @__PURE__ */ t.jsx(w, {})
|
|
87
|
+
}
|
|
88
|
+
) })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ t.jsx(
|
|
91
|
+
k,
|
|
92
|
+
{
|
|
93
|
+
onMount: (e) => {
|
|
94
|
+
e.setValue(o.initialCode);
|
|
95
|
+
},
|
|
96
|
+
onChange: (e) => {
|
|
97
|
+
p(!0), c(e), f(e);
|
|
98
|
+
},
|
|
99
|
+
height: "100%",
|
|
100
|
+
defaultLanguage: "html",
|
|
101
|
+
theme: "vs-dark",
|
|
102
|
+
defaultValue: "",
|
|
103
|
+
options: {
|
|
104
|
+
minimap: {
|
|
105
|
+
enabled: !1
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
] })
|
|
111
|
+
] });
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
vt as default
|
|
115
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),b=require("@monaco-editor/react"),i=require("./ChaiBuilderEditor-Pga_zJgw.cjs"),k=require("react-i18next"),n=require("react"),C=require("@radix-ui/react-icons"),E=require("@react-hookz/web");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("lodash-es");require("./MODIFIERS-mVmfEGgo.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("tree-model");require("./utils-D_vtk3zK.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");require("react-hotkeys-hook");require("lucide-react");require("./index--mLLy7QQ.cjs");const a=u=>{const s=document.createElement("div");return s.innerHTML=u,s.innerHTML};function R(){const{t:u}=k.useTranslation(),[s,d]=n.useState(!1),[l,x]=n.useState(""),[r,o]=i.useCodeEditor(),[c]=i.useSelectedBlockIds(),q=i.useUpdateBlocksProps(),m=i.useUpdateBlocksPropsRealtime(),p=E.useThrottledCallback(t=>{const h=a(t);m([r.blockId],{[r.blockProp]:h})},[],300),j=n.useCallback(()=>{if(s){const t=a(l);q([r.blockId],{[r.blockProp]:t})}},[s,l]);n.useEffect(()=>{c.includes(r==null?void 0:r.blockId)||(j(),o(null))},[c]);const f=()=>{o(null)};return e.jsxRuntimeExports.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsxRuntimeExports.jsx("button",{onClick:f,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxRuntimeExports.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxRuntimeExports.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsxRuntimeExports.jsx("span",{children:u("HTML Code Editor |")}),e.jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-400",children:u("Scripts will be only executed in preview and live mode.")})]}),e.jsxRuntimeExports.jsx("div",{className:"flex gap-x-2",children:e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>o(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsxRuntimeExports.jsx(C.Cross2Icon,{})})})]}),e.jsxRuntimeExports.jsx(b,{onMount:t=>{t.setValue(r.initialCode)},onChange:t=>{d(!0),x(t),p(t)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=R;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import {
|
|
2
|
+
import { V as h, a6 as f, a7 as j, a8 as y, a9 as v, aa as P } from "./ChaiBuilderEditor-bNZZWYMh.js";
|
|
3
3
|
import { sortBy as b, filter as w, get as C, isEmpty as m, find as n, capitalize as N, map as S } from "lodash-es";
|
|
4
4
|
import { toast as k } from "sonner";
|
|
5
5
|
import { useEffect as p } from "react";
|
|
6
|
-
import { a as B, u as E, c as T, d as
|
|
7
|
-
import { BriefcaseIcon as
|
|
8
|
-
import { useTranslation as
|
|
6
|
+
import { a as B, u as E, c as T, d as V } from "./index-9_b2eou7.js";
|
|
7
|
+
import { BriefcaseIcon as I } from "lucide-react";
|
|
8
|
+
import { useTranslation as L } from "react-i18next";
|
|
9
9
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
10
|
import "clsx";
|
|
11
11
|
import "react-dom";
|
|
@@ -44,12 +44,12 @@ import "@radix-ui/react-context-menu";
|
|
|
44
44
|
import "react-icons-picker";
|
|
45
45
|
import "react-quill";
|
|
46
46
|
import "react-hotkeys-hook";
|
|
47
|
-
import "./index-
|
|
47
|
+
import "./index-VBXQixVm.js";
|
|
48
48
|
import "./core.js";
|
|
49
|
-
import "./html-to-json-
|
|
49
|
+
import "./html-to-json-ofq1N3tB.js";
|
|
50
50
|
import "himalaya";
|
|
51
51
|
const Te = () => {
|
|
52
|
-
const { data: t } = B(), { data: i, isLoading: l } = E(), { saveState: c } = h(), d = T(), { t: u } =
|
|
52
|
+
const { data: t } = B(), { data: i, isLoading: l } = E(), { saveState: c } = h(), d = T(), { t: u } = L(), [a, o] = V(), s = b(w(i, { type: "STATIC" }), (r) => C(r, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
|
|
53
53
|
p(() => {
|
|
54
54
|
!m(i) && t.homepage && !n(i, { uuid: a }) && o(t.homepage);
|
|
55
55
|
}, [a, i, t, o]), p(() => () => o(null), [o]);
|
|
@@ -68,7 +68,7 @@ const Te = () => {
|
|
|
68
68
|
"aria-label": "Breadcrumb",
|
|
69
69
|
children: /* @__PURE__ */ e.jsxs("ol", { className: "inline-flex items-center space-x-1 md:space-x-3", children: [
|
|
70
70
|
/* @__PURE__ */ e.jsx("li", { className: "inline-flex items-center", children: /* @__PURE__ */ e.jsxs("div", { className: "inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400", children: [
|
|
71
|
-
/* @__PURE__ */ e.jsx(
|
|
71
|
+
/* @__PURE__ */ e.jsx(I, { className: "mr-2 h-4 w-4" }),
|
|
72
72
|
N(t.name)
|
|
73
73
|
] }) }),
|
|
74
74
|
/* @__PURE__ */ e.jsx("li", { "aria-current": "page", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("./ChaiBuilderEditor-Pga_zJgw.cjs"),i=require("lodash-es"),j=require("sonner"),l=require("react"),o=require("./index-seU0_UZX.cjs"),p=require("lucide-react"),f=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("./MODIFIERS-mVmfEGgo.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("tree-model");require("./utils-D_vtk3zK.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");require("react-hotkeys-hook");require("./index--mLLy7QQ.cjs");require("./core.cjs");require("./html-to-json-9uiQ2Dp2.cjs");require("himalaya");const E=()=>{const{data:t}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{saveState:d}=s.useSavePage(),m=o.useChangePage(),{t:q}=f.useTranslation(),[n,a]=o.useCurrentPage(),c=i.sortBy(i.filter(u,{type:"STATIC"}),r=>i.get(r,"uuid")===(t==null?void 0:t.homepage)?0:1);l.useEffect(()=>{!i.isEmpty(u)&&t.homepage&&!i.find(u,{uuid:n})&&a(t.homepage)},[n,u,t,a]),l.useEffect(()=>()=>a(null),[a]);const g=r=>{if(d!=="SAVED")j.toast.error(q("You have unsaved changes. Please save before changing the page."));else{const h=i.find(c,{uuid:r});m(h)}};return x||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 text-gray-700 dark:border-gray-700 dark:bg-gray-800","aria-label":"Breadcrumb",children:e.jsxRuntimeExports.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[e.jsxRuntimeExports.jsx("li",{className:"inline-flex items-center",children:e.jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",children:[e.jsxRuntimeExports.jsx(p.BriefcaseIcon,{className:"mr-2 h-4 w-4"}),i.capitalize(t.name)]})}),e.jsxRuntimeExports.jsx("li",{"aria-current":"page",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("svg",{className:"mx-1 h-3 w-3 text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:e.jsxRuntimeExports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),e.jsxRuntimeExports.jsxs(s.Select,{value:n||"",onValueChange:g,children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Page"})}),e.jsxRuntimeExports.jsx(s.SelectContent,{className:"z-[999]",children:i.map(c,r=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:r.uuid,children:r==null?void 0:r.name},r.uuid))})]})]})})]})})};exports.default=E;
|