@chaibuilder/sdk 1.1.12 → 1.1.13
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-Rd2EpNMr.js → AddBlocks-A7WofxHV.js} +29 -37
- package/dist/AddBlocks-Yuc4t0Z_.cjs +1 -0
- package/dist/{BrandingOptions-rTaSfm0M.cjs → BrandingOptions-KkPF1OGn.cjs} +1 -1
- package/dist/{BrandingOptions-OVjd8R6I.js → BrandingOptions-wkFrLFI_.js} +2 -2
- package/dist/{CanvasArea-RGTkdcs7.js → CanvasArea-chEYQhH8.js} +10 -17
- package/dist/{CanvasArea-OXK5ZBHd.cjs → CanvasArea-kF46NWZK.cjs} +2 -2
- package/dist/{CurrentPage-8mHwqtUF.js → CurrentPage-Wd7F9Egg.js} +15 -23
- package/dist/CurrentPage-p9MaXTOB.cjs +1 -0
- package/dist/{Layers-BjP8kxlY.js → Layers-qMOMP2Mi.js} +9 -17
- package/dist/Layers-wQ0Fv9Xc.cjs +1 -0
- package/dist/{MarkAsGlobalBlock--GjBOKA4.js → MarkAsGlobalBlock-Czq45Amf.js} +2 -2
- package/dist/{MarkAsGlobalBlock-GV1kflbN.cjs → MarkAsGlobalBlock-sb3hMXLq.cjs} +1 -1
- package/dist/PagesPanel--maZxwX5.cjs +1 -0
- package/dist/{PagesPanel-gwiGbDKn.js → PagesPanel-ay4uk4mg.js} +7 -15
- package/dist/ProjectPanel-KhIpO7m3.cjs +1 -0
- package/dist/{ProjectPanel-ruWizkTT.js → ProjectPanel-eLlbfAtj.js} +19 -27
- package/dist/{Settings-WtHFLTVf.js → Settings-lpoxaMDu.js} +8 -16
- package/dist/Settings-n2DpS5Ta.cjs +1 -0
- package/dist/SidePanels-Dud5Xh9L.cjs +1 -0
- package/dist/{SidePanels-Hxu9nfmz.js → SidePanels-iRXV69vh.js} +10 -18
- package/dist/{Topbar-qloDpVn7.js → Topbar-dQYhW4iv.js} +2 -2
- package/dist/{Topbar-P3sqe-wG.cjs → Topbar-vqzjB75a.cjs} +1 -1
- package/dist/{UnsplashImages-8p0Vu9j_.cjs → UnsplashImages-3Sh4UZ-7.cjs} +1 -1
- package/dist/{UnsplashImages-aVlfl8Rj.js → UnsplashImages-AL1ASAoD.js} +2 -2
- package/dist/{UploadImages-7xgCWSqx.js → UploadImages-09wuhk2O.js} +2 -2
- package/dist/{UploadImages-PjW68B7L.cjs → UploadImages-mPzLhMiH.cjs} +1 -1
- package/dist/add-page-modal-FPnIWwqA.cjs +1 -0
- package/dist/{add-page-modal-God3usfm.js → add-page-modal-TXREEFPZ.js} +20 -28
- package/dist/{confirm-alert-OQrR9mLj.js → confirm-alert-GkfW9chS.js} +2 -2
- package/dist/{confirm-alert-Wvv7pPyF.cjs → confirm-alert-YNyc3WEo.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +55 -63
- package/dist/{delete-page-modal-Whkna9tP.js → delete-page-modal-LNME2FwD.js} +20 -28
- package/dist/delete-page-modal-sTbqZPvk.cjs +1 -0
- package/dist/{form-W_17vJvn.js → form-Fk4CaX1A.js} +1 -1
- package/dist/{form-1HQKf4Lc.cjs → form-OhgCJlVA.cjs} +1 -1
- package/dist/functions-ZWGlwlQY.cjs +1 -0
- package/dist/functions-slns6ONz.js +23 -0
- package/dist/html-to-json-kGgp07Hv.js +177 -0
- package/dist/html-to-json-po8on2ju.cjs +1 -0
- package/dist/{index-OgEmBQj6.cjs → index-61c5wSJn.cjs} +2 -2
- package/dist/{index-D15K4BZT.js → index-89A3jPHh.js} +2 -2
- package/dist/{index-MIe2pKhn.cjs → index-GNmGzavZ.cjs} +1 -1
- package/dist/{index-TP8jhZbU.js → index-Q5q5Y_8a.js} +16 -16
- package/dist/lib.cjs +2 -1
- package/dist/lib.d.ts +2 -65
- package/dist/lib.js +1140 -230
- package/dist/page-viewer-LPx-OTCC.js +110 -0
- package/dist/page-viewer-wQO9oV9h.cjs +1 -0
- package/dist/project-general-setting-8EwuN5lN.cjs +1 -0
- package/dist/{project-general-setting-AIICdB3T.js → project-general-setting-sSpFUD_Y.js} +8 -16
- package/dist/{project-seo-setting-bW4cNODi.js → project-seo-setting-CGVegBtM.js} +3 -3
- package/dist/{project-seo-setting-uEYqfVt6.cjs → project-seo-setting-R77SKM1I.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.js +44 -50
- package/dist/{single-page-detail-D2NIiDP6.js → single-page-detail-32H1_IG4.js} +54 -62
- package/dist/single-page-detail-nyBEHLtT.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +6 -14
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +65 -7
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/dist/{useAddBlockByDrop-8i3iNtPF.cjs → useAddBlockByDrop-4VH-SMj7.cjs} +1 -1
- package/dist/{useAddBlockByDrop-wiagwec5.js → useAddBlockByDrop-_kyR0iI4.js} +1 -1
- package/dist/utils-tx6hqsHY.cjs +1 -0
- package/dist/{utils-PPBbw5bk.js → utils-zWMk4dB2.js} +18 -17
- package/package.json +1 -1
- package/dist/AddBlocks-YS5XlqpG.cjs +0 -1
- package/dist/CurrentPage-PrMEc3YN.cjs +0 -1
- package/dist/Layers-zYr-uaHA.cjs +0 -1
- package/dist/PagesPanel-23_rqlAI.cjs +0 -1
- package/dist/ProjectPanel-faZxtDbA.cjs +0 -1
- package/dist/Settings-RjUeZe8o.cjs +0 -1
- package/dist/SidePanels-7GPjyIEE.cjs +0 -1
- package/dist/add-page-modal-HyQBukId.cjs +0 -1
- package/dist/delete-page-modal-L2P69sjk.cjs +0 -1
- package/dist/functions-JFP-oMsY.js +0 -1109
- package/dist/functions-KMQYiBHf.cjs +0 -2
- package/dist/page-viewer-3X3bD4I6.cjs +0 -1
- package/dist/page-viewer-xv8TBR-B.js +0 -118
- package/dist/project-general-setting-IJFP4L0Q.cjs +0 -1
- package/dist/single-page-detail-7-lC8BG1.cjs +0 -1
- package/dist/tailwind-config-OxLD7oFU.cjs +0 -1
- package/dist/tailwind-config-d1VL1lzE.js +0 -62
- package/dist/utils-It2K33fU.cjs +0 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
|
+
import s, { useState as p, Suspense as l } from "react";
|
|
3
|
+
import { ChevronRightIcon as c, GearIcon as u, HomeIcon as d, FileTextIcon as x } from "@radix-ui/react-icons";
|
|
4
|
+
import { b0 as g, b1 as h, b2 as f } from "./index-89A3jPHh.js";
|
|
5
|
+
import { e as j, b, d as N } from "./index-Q5q5Y_8a.js";
|
|
6
|
+
import "./MODIFIERS-MLfpKQY1.js";
|
|
7
|
+
import "@radix-ui/react-toggle";
|
|
8
|
+
import "class-variance-authority";
|
|
9
|
+
import "./utils-zWMk4dB2.js";
|
|
10
|
+
import "lodash";
|
|
11
|
+
import "clsx";
|
|
12
|
+
import "tailwind-merge";
|
|
13
|
+
import "@radix-ui/react-switch";
|
|
14
|
+
import "@radix-ui/react-slot";
|
|
15
|
+
import "@radix-ui/react-accordion";
|
|
16
|
+
import "@radix-ui/react-alert-dialog";
|
|
17
|
+
import "@radix-ui/react-dialog";
|
|
18
|
+
import "@radix-ui/react-label";
|
|
19
|
+
import "@radix-ui/react-scroll-area";
|
|
20
|
+
import "@radix-ui/react-tabs";
|
|
21
|
+
import "@radix-ui/react-tooltip";
|
|
22
|
+
import "@radix-ui/react-popover";
|
|
23
|
+
import "@radix-ui/react-menubar";
|
|
24
|
+
import "@radix-ui/react-hover-card";
|
|
25
|
+
import "@radix-ui/react-select";
|
|
26
|
+
import "@radix-ui/react-dropdown-menu";
|
|
27
|
+
import "@radix-ui/react-separator";
|
|
28
|
+
import "@radix-ui/react-toast";
|
|
29
|
+
import "cmdk";
|
|
30
|
+
import "@radix-ui/react-context-menu";
|
|
31
|
+
import "react-icons-picker";
|
|
32
|
+
import "react-dom";
|
|
33
|
+
import "react-quill";
|
|
34
|
+
import "jotai";
|
|
35
|
+
import "flat-to-nested";
|
|
36
|
+
import "redux-undo";
|
|
37
|
+
import "@chaibuilder/runtime";
|
|
38
|
+
import "@react-hookz/web";
|
|
39
|
+
import "react-i18next";
|
|
40
|
+
import "i18next";
|
|
41
|
+
import "@floating-ui/react-dom";
|
|
42
|
+
import "react-textarea-autosize";
|
|
43
|
+
import "flagged";
|
|
44
|
+
import "react-dnd";
|
|
45
|
+
import "@minoru/react-dnd-treeview";
|
|
46
|
+
import "react-hotkeys-hook";
|
|
47
|
+
import "sonner";
|
|
48
|
+
import "./html-to-json-kGgp07Hv.js";
|
|
49
|
+
import "himalaya";
|
|
50
|
+
import "lucide-react";
|
|
51
|
+
const v = s.lazy(() => import("./single-page-detail-32H1_IG4.js")), P = ({ pageData: r }) => {
|
|
52
|
+
const [t, i] = p("CLOSE");
|
|
53
|
+
return /* @__PURE__ */ e.jsxs(
|
|
54
|
+
g,
|
|
55
|
+
{
|
|
56
|
+
open: t === "OPEN" || t === "ALERT" || t === "PENDING",
|
|
57
|
+
onOpenChange: (o) => {
|
|
58
|
+
i(t === "PENDING" ? "ALERT" : o ? "OPEN" : "CLOSE");
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ e.jsx(
|
|
62
|
+
h,
|
|
63
|
+
{
|
|
64
|
+
asChild: !0,
|
|
65
|
+
onClick: (o) => {
|
|
66
|
+
o.stopPropagation(), i("OPEN");
|
|
67
|
+
},
|
|
68
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between", children: t === "OPEN" || t === "ALERT" || t === "PENDING" ? /* @__PURE__ */ e.jsx(c, {}) : /* @__PURE__ */ e.jsx("div", { className: "hidden hover:text-blue-600 group-hover:flex", children: /* @__PURE__ */ e.jsx(u, {}) }) })
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ e.jsx(f, { side: "right", align: "start", alignOffset: -35, className: "h-screen w-96", children: /* @__PURE__ */ e.jsx(
|
|
72
|
+
l,
|
|
73
|
+
{
|
|
74
|
+
fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full animate-pulse flex-col gap-y-3", children: [
|
|
75
|
+
/* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-6 w-1/2" }),
|
|
76
|
+
/* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-20 w-full" }),
|
|
77
|
+
/* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-20 w-full" })
|
|
78
|
+
] }),
|
|
79
|
+
children: /* @__PURE__ */ e.jsx(v, { pageData: r, open: t, setOpen: i })
|
|
80
|
+
}
|
|
81
|
+
) })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}, E = (r) => {
|
|
86
|
+
const [t] = j(), { data: i } = b(), o = N(), m = (i == null ? void 0 : i.homepage) === r.uuid, a = t === r.uuid, n = () => o(r);
|
|
87
|
+
return i ? /* @__PURE__ */ e.jsxs(
|
|
88
|
+
"button",
|
|
89
|
+
{
|
|
90
|
+
className: `group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${a ? "bg-blue-200 " : ""}`,
|
|
91
|
+
onClick: n,
|
|
92
|
+
type: "button",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex text-sm items-center gap-x-1.5", children: [
|
|
95
|
+
m ? /* @__PURE__ */ e.jsx(d, {}) : /* @__PURE__ */ e.jsx(x, {}),
|
|
96
|
+
" ",
|
|
97
|
+
r.name
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ e.jsx(P, { pageData: r })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
) : null;
|
|
103
|
+
}, Ne = ({ pages: r, isLoading: t }) => t ? /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-1 px-2.5 pt-2", children: [
|
|
104
|
+
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
|
|
105
|
+
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
|
|
106
|
+
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" })
|
|
107
|
+
] }) : r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-2.5 pb-2 pt-4", children: "No pages" }) : /* @__PURE__ */ e.jsx("div", { className: "-mb-2", children: s.Children.toArray(r.map((i) => /* @__PURE__ */ e.jsx(E, { ...i }))) });
|
|
108
|
+
export {
|
|
109
|
+
Ne as default
|
|
110
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),u=require("react"),n=require("@radix-ui/react-icons"),o=require("./index-GNmGzavZ.cjs"),x=require("./index-61c5wSJn.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-tx6hqsHY.cjs");require("lodash");require("clsx");require("tailwind-merge");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-scroll-area");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-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-po8on2ju.cjs");require("himalaya");require("lucide-react");const m=u.lazy(()=>Promise.resolve().then(()=>require("./single-page-detail-nyBEHLtT.cjs"))),j=({pageData:s})=>{const[r,i]=u.useState("CLOSE");return e.jsxRuntimeExports.jsxs(o.Popover,{open:r==="OPEN"||r==="ALERT"||r==="PENDING",onOpenChange:t=>{i(r==="PENDING"?"ALERT":t?"OPEN":"CLOSE")},children:[e.jsxRuntimeExports.jsx(o.PopoverTrigger,{asChild:!0,onClick:t=>{t.stopPropagation(),i("OPEN")},children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:r==="OPEN"||r==="ALERT"||r==="PENDING"?e.jsxRuntimeExports.jsx(n.ChevronRightIcon,{}):e.jsxRuntimeExports.jsx("div",{className:"hidden hover:text-blue-600 group-hover:flex",children:e.jsxRuntimeExports.jsx(n.GearIcon,{})})})}),e.jsxRuntimeExports.jsx(o.PopoverContent,{side:"right",align:"start",alignOffset:-35,className:"h-screen w-96",children:e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex w-full animate-pulse flex-col gap-y-3",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-6 w-1/2"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"})]}),children:e.jsxRuntimeExports.jsx(m,{pageData:s,open:r,setOpen:i})})})]})},p=s=>{const[r]=x.useCurrentPage(),{data:i}=x.useProject(),t=x.useChangePage(),l=(i==null?void 0:i.homepage)===s.uuid,a=r===s.uuid,c=()=>t(s);return i?e.jsxRuntimeExports.jsxs("button",{className:`group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${a?"bg-blue-200 ":""}`,onClick:c,type:"button",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex text-sm items-center gap-x-1.5",children:[l?e.jsxRuntimeExports.jsx(n.HomeIcon,{}):e.jsxRuntimeExports.jsx(n.FileTextIcon,{})," ",s.name]}),e.jsxRuntimeExports.jsx(j,{pageData:s})]}):null},q=({pages:s,isLoading:r})=>r?e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-1 px-2.5 pt-2",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"})]}):s.length===0?e.jsxRuntimeExports.jsx("div",{className:"px-2.5 pb-2 pt-4",children:"No pages"}):e.jsxRuntimeExports.jsx("div",{className:"-mb-2",children:u.Children.toArray(s.map(i=>e.jsxRuntimeExports.jsx(p,{...i})))});exports.default=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./jsx-runtime-WUGKV8jN.cjs"),a=require("react"),f=require("./index-GNmGzavZ.cjs"),o=require("./controls-aHZq-q4b.cjs"),d=require("./form-OhgCJlVA.cjs"),m=require("./index-61c5wSJn.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-tx6hqsHY.cjs");require("lodash");require("clsx");require("tailwind-merge");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-scroll-area");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-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-po8on2ju.cjs");require("himalaya");require("lucide-react");function j(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,u.get?u:{enumerable:!0,get:()=>r[e]})}}return i.default=r,Object.freeze(i)}const g=j(a),b=({_projectData:r,seany:i})=>{const{data:e,isLoading:u}=m.useProject();g.useEffect(()=>{e&&i(e)},[e,i]);const n=({formData:s},t)=>{i(l=>({...l,[t]:s[t]}))},c={name:o.u({title:"Project Name",default:e==null?void 0:e.name}),favicon:o.o({title:"Favicon",default:e==null?void 0:e.favicon})};return q.jsxRuntimeExports.jsx(f.ScrollArea,{className:"flex h-full select-none flex-col",children:q.jsxRuntimeExports.jsx(d.Form,{properties:c,disabled:u,formData:r,onChange:n})})};exports.default=b;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import { bo as n } from "./index-
|
|
3
|
+
import { bo as n } from "./index-89A3jPHh.js";
|
|
4
4
|
import { u as c, o as u } from "./controls-G0puEH71.js";
|
|
5
|
-
import { F as d } from "./form-
|
|
6
|
-
import { b as x } from "./index-
|
|
5
|
+
import { F as d } from "./form-Fk4CaX1A.js";
|
|
6
|
+
import { b as x } from "./index-Q5q5Y_8a.js";
|
|
7
7
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
8
8
|
import "@radix-ui/react-toggle";
|
|
9
9
|
import "class-variance-authority";
|
|
10
|
-
import "./utils-
|
|
10
|
+
import "./utils-zWMk4dB2.js";
|
|
11
11
|
import "lodash";
|
|
12
12
|
import "clsx";
|
|
13
13
|
import "tailwind-merge";
|
|
@@ -47,20 +47,12 @@ import "react-textarea-autosize";
|
|
|
47
47
|
import "flagged";
|
|
48
48
|
import "react-dnd";
|
|
49
49
|
import "@minoru/react-dnd-treeview";
|
|
50
|
-
import "./lib.js";
|
|
51
|
-
import "himalaya";
|
|
52
|
-
import "./functions-JFP-oMsY.js";
|
|
53
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
54
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
55
|
-
import "@tailwindcss/forms";
|
|
56
|
-
import "@tailwindcss/typography";
|
|
57
|
-
import "@tailwindcss/aspect-ratio";
|
|
58
|
-
import "@tailwindcss/line-clamp";
|
|
59
|
-
import "./tailwind-config-d1VL1lzE.js";
|
|
60
50
|
import "react-hotkeys-hook";
|
|
61
51
|
import "sonner";
|
|
52
|
+
import "./html-to-json-kGgp07Hv.js";
|
|
53
|
+
import "himalaya";
|
|
62
54
|
import "lucide-react";
|
|
63
|
-
const
|
|
55
|
+
const jo = ({
|
|
64
56
|
_projectData: m,
|
|
65
57
|
seany: t
|
|
66
58
|
}) => {
|
|
@@ -83,5 +75,5 @@ const Eo = ({
|
|
|
83
75
|
return /* @__PURE__ */ i.jsx(n, { className: "flex h-full select-none flex-col", children: /* @__PURE__ */ i.jsx(d, { properties: a, disabled: p, formData: m, onChange: e }) });
|
|
84
76
|
};
|
|
85
77
|
export {
|
|
86
|
-
|
|
78
|
+
jo as default
|
|
87
79
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import { b as D, u as c, g, o as x } from "./controls-G0puEH71.js";
|
|
3
|
-
import { F as v } from "./form-
|
|
3
|
+
import { F as v } from "./form-Fk4CaX1A.js";
|
|
4
4
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "lodash";
|
|
7
7
|
import "@rjsf/core";
|
|
8
8
|
import "@rjsf/validator-ajv8";
|
|
9
|
-
import "./index-
|
|
9
|
+
import "./index-89A3jPHh.js";
|
|
10
10
|
import "@radix-ui/react-toggle";
|
|
11
11
|
import "class-variance-authority";
|
|
12
|
-
import "./utils-
|
|
12
|
+
import "./utils-zWMk4dB2.js";
|
|
13
13
|
import "clsx";
|
|
14
14
|
import "tailwind-merge";
|
|
15
15
|
import "@radix-ui/react-switch";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-WUGKV8jN.cjs"),i=require("./controls-aHZq-q4b.cjs"),g=require("./form-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-WUGKV8jN.cjs"),i=require("./controls-aHZq-q4b.cjs"),g=require("./form-OhgCJlVA.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("react");require("lodash");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-GNmGzavZ.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-tx6hqsHY.cjs");require("clsx");require("tailwind-merge");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-scroll-area");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-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");const D=({_projectData:e,seany:n})=>{var t,u,o,s,q,a;const d=({formData:f})=>{const r={...f};r.seoData.title===void 0&&(r.seoData.title=""),r.seoData.description===void 0&&(r.seoData.description=""),r.seoData.image===void 0&&(r.seoData.image=""),n(m=>({...m,...r}))},c={seoData:i.b({title:"",default:{title:((t=e.seoData)==null?void 0:t.title)||"",description:((u=e.seoData)==null?void 0:u.description)||"",image:((o=e.seoData)==null?void 0:o.image)||""},properties:{title:i.u({title:"Default Title",default:((s=e.seoData)==null?void 0:s.title)||""}),description:i.g({title:"Default Description",default:((q=e.seoData)==null?void 0:q.description)||""}),image:i.o({title:"Social Media Image",default:((a=e.seoData)==null?void 0:a.image)||""})}})};return l.jsxRuntimeExports.jsx("div",{className:"flex h-full select-none flex-col",children:l.jsxRuntimeExports.jsx(g.Form,{properties:c,formData:e,onChange:d})})};exports.default=D;
|
package/dist/render.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-WUGKV8jN.cjs"),j=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-WUGKV8jN.cjs"),j=require("react"),s=require("lodash"),R=require("tailwind-merge"),u=require("./MODIFIERS-WFzDQfiT.cjs"),_=require("@chaibuilder/runtime"),x=require("./functions-ZWGlwlQY.cjs"),y=require("react-wrap-balancer"),B=t=>{const r={};return Object.keys(t).forEach(e=>{s.isString(t[e])&&t[e].startsWith(u.SLOT_KEY)&&(r[e]=t[e].replace(u.SLOT_KEY,"").split(","))}),r},C=s.memoize((t,r)=>{const e=t.replace(u.STYLES_KEY,"").split(","),n=R.twMerge(e[0],e[1]);return x.addPrefixToClasses(n,r).replace(u.STYLES_KEY,"").trim()});function O(t,r){return s.get(t,`${r}_attrs`,{})}function T(t,r){const e={};return Object.keys(t).forEach(n=>{if(s.isString(t[n])&&t[n].startsWith(u.STYLES_KEY)){const o=C(t[n],r);e[n]={className:o,...O(t,n)}}}),e}function q(t,r){const e=s.get(t,"_bindings",{});return s.isEmpty(e)?{...t}:(s.each(e,(n,o)=>{s.isString(n)&&s.get(r,n,null)&&(t[o]=s.get(r,n,null))}),t)}function a({blocks:t,parent:r,classPrefix:e="c-",externalData:n={}}){const o=t,p=i=>T(i,e),f=r?s.filter(t,{_parent:r}):s.filter(t,i=>s.isEmpty(i._parent));return c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:j.Children.toArray(f.map((i,h)=>{const d=B(i),m={};s.isEmpty(d)||Object.keys(d).forEach(l=>{m[l]=j.Children.toArray(d[l].map(E=>c.jsxRuntimeExports.jsx(a,{externalData:n,classPrefix:e,blocks:o,parent:E})))});const S=s.filter(o,{_parent:i._id});m.children=S.length>0?c.jsxRuntimeExports.jsx(a,{externalData:n,classPrefix:e,parent:i._id,blocks:o}):null;const g=_.getBlockComponent(i._type);if(g!==null){let l=i;const E=g.component;return l={...g.defaults,...i},j.createElement(E,s.omit({blockProps:{},inBuilder:!1,...l,index:h,...q(i,n),...p(l),...m},["_parent"]))}return c.jsxRuntimeExports.jsxs("noscript",{children:[i._type," not found"]})}))})}const Y=({pageData:t,externalData:r={},before:e=null,after:n=null,classPrefix:o="c-"})=>{const p=s.get(t.project,"brandingOptions",u.BRANDING_OPTIONS_DEFAULTS);return c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[e,c.jsxRuntimeExports.jsx("div",{className:o.replace("-","")+" "+x.getBrandingClasses(p,o)+" min-h-screen",children:c.jsxRuntimeExports.jsx(y.Provider,{children:c.jsxRuntimeExports.jsx(a,{externalData:r,blocks:t.page.blocks||[],classPrefix:o})})}),n]})};exports.RenderChaiBlocks=a;exports.RenderChaiPage=Y;
|
package/dist/render.js
CHANGED
|
@@ -1,63 +1,57 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import u from "react";
|
|
3
|
-
import { isString as E, memoize as y, get as
|
|
3
|
+
import { isString as E, memoize as y, get as c, isEmpty as h, each as A, filter as g, omit as x } from "lodash";
|
|
4
4
|
import { twMerge as N } from "tailwind-merge";
|
|
5
5
|
import { S as B, a as _, B as R } from "./MODIFIERS-MLfpKQY1.js";
|
|
6
6
|
import { getBlockComponent as T } from "@chaibuilder/runtime";
|
|
7
|
-
import { a as F, g as L } from "./functions-
|
|
7
|
+
import { a as F, g as L } from "./functions-slns6ONz.js";
|
|
8
8
|
import { Provider as Y } from "react-wrap-balancer";
|
|
9
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
10
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
11
|
-
import "@tailwindcss/forms";
|
|
12
|
-
import "@tailwindcss/typography";
|
|
13
|
-
import "@tailwindcss/aspect-ratio";
|
|
14
|
-
import "@tailwindcss/line-clamp";
|
|
15
9
|
const I = (t) => {
|
|
16
|
-
const
|
|
10
|
+
const r = {};
|
|
17
11
|
return Object.keys(t).forEach((n) => {
|
|
18
|
-
E(t[n]) && t[n].startsWith(B) && (
|
|
19
|
-
}),
|
|
20
|
-
}, K = y((t,
|
|
21
|
-
const n = t.replace(_, "").split(","),
|
|
22
|
-
return F(
|
|
12
|
+
E(t[n]) && t[n].startsWith(B) && (r[n] = t[n].replace(B, "").split(","));
|
|
13
|
+
}), r;
|
|
14
|
+
}, K = y((t, r) => {
|
|
15
|
+
const n = t.replace(_, "").split(","), s = N(n[0], n[1]);
|
|
16
|
+
return F(s, r).replace(_, "").trim();
|
|
23
17
|
});
|
|
24
|
-
function W(t,
|
|
25
|
-
return
|
|
18
|
+
function W(t, r) {
|
|
19
|
+
return c(t, `${r}_attrs`, {});
|
|
26
20
|
}
|
|
27
|
-
function w(t,
|
|
21
|
+
function w(t, r) {
|
|
28
22
|
const n = {};
|
|
29
|
-
return Object.keys(t).forEach((
|
|
30
|
-
if (E(t[
|
|
31
|
-
const i = K(t[
|
|
32
|
-
n[
|
|
23
|
+
return Object.keys(t).forEach((s) => {
|
|
24
|
+
if (E(t[s]) && t[s].startsWith(_)) {
|
|
25
|
+
const i = K(t[s], r);
|
|
26
|
+
n[s] = {
|
|
33
27
|
className: i,
|
|
34
|
-
...W(t,
|
|
28
|
+
...W(t, s)
|
|
35
29
|
};
|
|
36
30
|
}
|
|
37
31
|
}), n;
|
|
38
32
|
}
|
|
39
|
-
function z(t,
|
|
40
|
-
const n =
|
|
41
|
-
return h(n) ? { ...t } : (A(n, (
|
|
42
|
-
E(
|
|
33
|
+
function z(t, r) {
|
|
34
|
+
const n = c(t, "_bindings", {});
|
|
35
|
+
return h(n) ? { ...t } : (A(n, (s, i) => {
|
|
36
|
+
E(s) && c(r, s, null) && (t[i] = c(r, s, null));
|
|
43
37
|
}), t);
|
|
44
38
|
}
|
|
45
39
|
function j({
|
|
46
40
|
blocks: t,
|
|
47
|
-
parent:
|
|
41
|
+
parent: r,
|
|
48
42
|
classPrefix: n = "c-",
|
|
49
|
-
externalData:
|
|
43
|
+
externalData: s = {}
|
|
50
44
|
}) {
|
|
51
|
-
const i = t,
|
|
45
|
+
const i = t, l = (e) => w(e, n), S = r ? g(t, { _parent: r }) : g(t, (e) => h(e._parent));
|
|
52
46
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: u.Children.toArray(
|
|
53
47
|
S.map((e, C) => {
|
|
54
|
-
const
|
|
55
|
-
h(
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
const p = I(e), m = {};
|
|
49
|
+
h(p) || Object.keys(p).forEach((a) => {
|
|
50
|
+
m[a] = u.Children.toArray(
|
|
51
|
+
p[a].map((f) => /* @__PURE__ */ o.jsx(
|
|
58
52
|
j,
|
|
59
53
|
{
|
|
60
|
-
externalData:
|
|
54
|
+
externalData: s,
|
|
61
55
|
classPrefix: n,
|
|
62
56
|
blocks: i,
|
|
63
57
|
parent: f
|
|
@@ -66,10 +60,10 @@ function j({
|
|
|
66
60
|
);
|
|
67
61
|
});
|
|
68
62
|
const O = g(i, { _parent: e._id });
|
|
69
|
-
|
|
63
|
+
m.children = O.length > 0 ? /* @__PURE__ */ o.jsx(
|
|
70
64
|
j,
|
|
71
65
|
{
|
|
72
|
-
externalData:
|
|
66
|
+
externalData: s,
|
|
73
67
|
classPrefix: n,
|
|
74
68
|
parent: e._id,
|
|
75
69
|
blocks: i
|
|
@@ -77,19 +71,19 @@ function j({
|
|
|
77
71
|
) : null;
|
|
78
72
|
const d = T(e._type);
|
|
79
73
|
if (d !== null) {
|
|
80
|
-
let
|
|
74
|
+
let a = e;
|
|
81
75
|
const f = d.component;
|
|
82
|
-
return
|
|
76
|
+
return a = { ...d.defaults, ...e }, u.createElement(
|
|
83
77
|
f,
|
|
84
78
|
x(
|
|
85
79
|
{
|
|
86
80
|
blockProps: {},
|
|
87
81
|
inBuilder: !1,
|
|
88
|
-
...
|
|
82
|
+
...a,
|
|
89
83
|
index: C,
|
|
90
|
-
...z(e,
|
|
91
|
-
...a
|
|
92
|
-
...
|
|
84
|
+
...z(e, s),
|
|
85
|
+
...l(a),
|
|
86
|
+
...m
|
|
93
87
|
},
|
|
94
88
|
["_parent"]
|
|
95
89
|
)
|
|
@@ -102,27 +96,27 @@ function j({
|
|
|
102
96
|
})
|
|
103
97
|
) });
|
|
104
98
|
}
|
|
105
|
-
const
|
|
99
|
+
const J = ({
|
|
106
100
|
pageData: t,
|
|
107
|
-
externalData:
|
|
101
|
+
externalData: r = {},
|
|
108
102
|
before: n = null,
|
|
109
|
-
after:
|
|
103
|
+
after: s = null,
|
|
110
104
|
classPrefix: i = "c-"
|
|
111
105
|
}) => {
|
|
112
|
-
const
|
|
106
|
+
const l = c(t.project, "brandingOptions", R);
|
|
113
107
|
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
114
108
|
n,
|
|
115
109
|
/* @__PURE__ */ o.jsx(
|
|
116
110
|
"div",
|
|
117
111
|
{
|
|
118
|
-
className: i.replace("-", "") + " " + L(
|
|
119
|
-
children: /* @__PURE__ */ o.jsx(Y, { children: /* @__PURE__ */ o.jsx(j, { externalData:
|
|
112
|
+
className: i.replace("-", "") + " " + L(l, i) + " min-h-screen",
|
|
113
|
+
children: /* @__PURE__ */ o.jsx(Y, { children: /* @__PURE__ */ o.jsx(j, { externalData: r, blocks: t.page.blocks || [], classPrefix: i }) })
|
|
120
114
|
}
|
|
121
115
|
),
|
|
122
|
-
|
|
116
|
+
s
|
|
123
117
|
] });
|
|
124
118
|
};
|
|
125
119
|
export {
|
|
126
120
|
j as RenderChaiBlocks,
|
|
127
|
-
|
|
121
|
+
J as RenderChaiPage
|
|
128
122
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as t } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import I, { useState as j, useEffect as z } from "react";
|
|
3
3
|
import { isString as L, isEmpty as x, isEqual as C, omit as y, kebabCase as B } from "lodash";
|
|
4
4
|
import { HomeIcon as G } from "@radix-ui/react-icons";
|
|
5
|
-
import { bo as Y, B as q } from "./index-
|
|
5
|
+
import { bo as Y, B as q } from "./index-89A3jPHh.js";
|
|
6
6
|
import { u as g, b as Z, g as $, o as F, r as Q } from "./controls-G0puEH71.js";
|
|
7
7
|
import { toast as U } from "sonner";
|
|
8
|
-
import { F as h } from "./form-
|
|
9
|
-
import { h as V, b as X, i as _, c as K } from "./index-
|
|
8
|
+
import { F as h } from "./form-Fk4CaX1A.js";
|
|
9
|
+
import { h as V, b as X, i as _, c as K } from "./index-Q5q5Y_8a.js";
|
|
10
10
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
11
11
|
import "@radix-ui/react-toggle";
|
|
12
12
|
import "class-variance-authority";
|
|
13
|
-
import "./utils-
|
|
13
|
+
import "./utils-zWMk4dB2.js";
|
|
14
14
|
import "clsx";
|
|
15
15
|
import "tailwind-merge";
|
|
16
16
|
import "@radix-ui/react-switch";
|
|
@@ -48,76 +48,68 @@ import "react-textarea-autosize";
|
|
|
48
48
|
import "flagged";
|
|
49
49
|
import "react-dnd";
|
|
50
50
|
import "@minoru/react-dnd-treeview";
|
|
51
|
-
import "./lib.js";
|
|
52
|
-
import "himalaya";
|
|
53
|
-
import "./functions-JFP-oMsY.js";
|
|
54
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
55
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
56
|
-
import "@tailwindcss/forms";
|
|
57
|
-
import "@tailwindcss/typography";
|
|
58
|
-
import "@tailwindcss/aspect-ratio";
|
|
59
|
-
import "@tailwindcss/line-clamp";
|
|
60
|
-
import "./tailwind-config-d1VL1lzE.js";
|
|
61
51
|
import "react-hotkeys-hook";
|
|
52
|
+
import "./html-to-json-kGgp07Hv.js";
|
|
53
|
+
import "himalaya";
|
|
62
54
|
import "lucide-react";
|
|
63
|
-
const O = I.lazy(() => import("./delete-page-modal-
|
|
55
|
+
const O = I.lazy(() => import("./delete-page-modal-LNME2FwD.js")), J = I.lazy(() => import("./confirm-alert-GkfW9chS.js")), P = (r) => {
|
|
64
56
|
if (!L(r) || !(r.includes("/[") && r.includes("]")))
|
|
65
57
|
return !1;
|
|
66
|
-
const
|
|
58
|
+
const s = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/, u = /^[a-zA-Z0-9_-]+$/;
|
|
67
59
|
let e = !0;
|
|
68
|
-
return r.split("/").forEach((
|
|
69
|
-
e && (
|
|
60
|
+
return r.split("/").forEach((n) => {
|
|
61
|
+
e && (n.includes("[[") && n.includes("]]") ? e = /^\[\[\.{3}[a-zA-Z0-9_-]+\]\]$/.test(n) : n.includes("[") && n.includes("]") ? e = s.test(n) : e = u.test(n));
|
|
70
62
|
}), e;
|
|
71
63
|
}, f = (r) => r && x(r.seoData) ? {
|
|
72
64
|
...r,
|
|
73
65
|
seoData: { title: "", description: "", image: "" }
|
|
74
|
-
} : r, W = (r,
|
|
75
|
-
const
|
|
76
|
-
return
|
|
77
|
-
},
|
|
78
|
-
const
|
|
79
|
-
isHomePage: (e == null ? void 0 : e.homepage) ===
|
|
80
|
-
}), N = W(i,
|
|
66
|
+
} : r, W = (r, m) => {
|
|
67
|
+
const s = !C(y(r, ["seoData"]), y(m, ["seoData"])), u = !C(f(m).seoData, f(r).seoData);
|
|
68
|
+
return s || u;
|
|
69
|
+
}, ke = ({ open: r, setOpen: m, pageData: s }) => {
|
|
70
|
+
const u = V(), { data: e } = X(), n = _(), c = K("Homepage updated successfully."), [i, T] = j(f(s)), [d, v] = j({
|
|
71
|
+
isHomePage: (e == null ? void 0 : e.homepage) === s.uuid
|
|
72
|
+
}), N = W(i, s);
|
|
81
73
|
z(() => {
|
|
82
|
-
const l = !C(f(
|
|
83
|
-
|
|
84
|
-
}, [e,
|
|
74
|
+
const l = !C(f(s), i), o = (e == null ? void 0 : e.homepage) !== s.uuid && d.isHomePage;
|
|
75
|
+
m(l || o ? "PENDING" : "OPEN");
|
|
76
|
+
}, [e, s, i, d, m]);
|
|
85
77
|
const S = () => {
|
|
86
78
|
if (N) {
|
|
87
|
-
if (
|
|
88
|
-
r === "ALERT" &&
|
|
79
|
+
if (s.type === "DYNAMIC" && !P((i == null ? void 0 : i.slug) || "")) {
|
|
80
|
+
r === "ALERT" && m("PENDING");
|
|
89
81
|
return;
|
|
90
82
|
}
|
|
91
|
-
|
|
83
|
+
n.mutate(i, {
|
|
92
84
|
onSuccess: () => {
|
|
93
|
-
|
|
85
|
+
u.invalidateQueries({
|
|
94
86
|
refetchType: "active",
|
|
95
87
|
queryKey: ["pages", e == null ? void 0 : e.uuid]
|
|
96
|
-
}),
|
|
88
|
+
}), m("CLOSE"), U.success("Page updated successfully.");
|
|
97
89
|
}
|
|
98
90
|
});
|
|
99
91
|
}
|
|
100
|
-
d.isHomePage && (e == null ? void 0 : e.homepage) !==
|
|
92
|
+
d.isHomePage && (e == null ? void 0 : e.homepage) !== s.uuid && c.mutate({ ...e, homepage: s == null ? void 0 : s.uuid }, { onSuccess: () => m("CLOSE") });
|
|
101
93
|
}, b = ({ formData: l }, o) => {
|
|
102
|
-
T((
|
|
94
|
+
T((p) => {
|
|
103
95
|
var E, A;
|
|
104
96
|
if (!o)
|
|
105
|
-
return
|
|
97
|
+
return p;
|
|
106
98
|
const a = { [o]: l[o] };
|
|
107
99
|
return o === "name" ? a.slug = B((E = l[o]) == null ? void 0 : E.replace(/\d/g, "")) : o === "slug" ? a.slug = (A = l[o]) == null ? void 0 : A.replace(/\d/g, "").replace(/\s+/g, "").replace("--", "-").replace("__", "_") : o === "seoData" && (a.seoData = {
|
|
108
100
|
title: l[o].title || "",
|
|
109
101
|
description: l[o].description || "",
|
|
110
102
|
image: l[o].image || ""
|
|
111
103
|
}), {
|
|
112
|
-
...
|
|
104
|
+
...p,
|
|
113
105
|
...a
|
|
114
106
|
};
|
|
115
107
|
});
|
|
116
108
|
}, H = ({ formData: l }, o) => {
|
|
117
|
-
v((
|
|
109
|
+
v((p) => {
|
|
118
110
|
const a = { [o]: l[o] };
|
|
119
111
|
return {
|
|
120
|
-
...
|
|
112
|
+
...p,
|
|
121
113
|
...a
|
|
122
114
|
};
|
|
123
115
|
});
|
|
@@ -154,73 +146,73 @@ const O = I.lazy(() => import("./delete-page-modal-Whkna9tP.js")), J = I.lazy(()
|
|
|
154
146
|
default: d.isHomePage
|
|
155
147
|
})
|
|
156
148
|
};
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ t.jsxs(Y, { className: "flex h-full select-none flex-col", children: [
|
|
150
|
+
/* @__PURE__ */ t.jsx(
|
|
159
151
|
J,
|
|
160
152
|
{
|
|
161
153
|
open: r === "ALERT",
|
|
162
154
|
title: "Do yo want to save changes?",
|
|
163
|
-
onCancel: () =>
|
|
155
|
+
onCancel: () => m("CLOSE"),
|
|
164
156
|
onConfirm: S,
|
|
165
|
-
disabled: c.isPending ||
|
|
157
|
+
disabled: c.isPending || n.isPending
|
|
166
158
|
}
|
|
167
159
|
),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ t.jsx("div", { className: "rounded-md bg-background/30 px-2.5 py-1", children: /* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Page Details" }) }),
|
|
161
|
+
/* @__PURE__ */ t.jsx("div", { className: "px-2.5 pt-2", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col space-y-2", children: [
|
|
162
|
+
/* @__PURE__ */ t.jsx(
|
|
171
163
|
h,
|
|
172
164
|
{
|
|
173
165
|
title: "Basic Details",
|
|
174
166
|
formData: i,
|
|
175
167
|
properties: M,
|
|
176
168
|
onChange: b,
|
|
177
|
-
disabled:
|
|
169
|
+
disabled: n.isPending || c.isPending
|
|
178
170
|
}
|
|
179
171
|
),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ t.jsx("div", { className: "h-2 w-full" }),
|
|
173
|
+
/* @__PURE__ */ t.jsx(
|
|
182
174
|
h,
|
|
183
175
|
{
|
|
184
176
|
title: "SEO Details",
|
|
185
177
|
formData: i,
|
|
186
178
|
properties: w,
|
|
187
179
|
onChange: b,
|
|
188
|
-
disabled:
|
|
180
|
+
disabled: n.isPending || c.isPending
|
|
189
181
|
}
|
|
190
182
|
),
|
|
191
|
-
(e == null ? void 0 : e.homepage) !==
|
|
183
|
+
(e == null ? void 0 : e.homepage) !== s.uuid && s.type === "STATIC" ? /* @__PURE__ */ t.jsx(
|
|
192
184
|
h,
|
|
193
185
|
{
|
|
194
186
|
formData: d,
|
|
195
187
|
properties: R,
|
|
196
188
|
onChange: H,
|
|
197
|
-
disabled:
|
|
189
|
+
disabled: n.isPending || c.isPending
|
|
198
190
|
}
|
|
199
|
-
) :
|
|
200
|
-
/* @__PURE__ */
|
|
191
|
+
) : s.type === "STATIC" && /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-x-1 px-1 pt-2 text-xs font-medium text-gray-500", children: [
|
|
192
|
+
/* @__PURE__ */ t.jsx(G, {}),
|
|
201
193
|
" This is homepage",
|
|
202
194
|
" "
|
|
203
195
|
] }),
|
|
204
|
-
i.type === "DYNAMIC" && !P((i == null ? void 0 : i.slug) || "") && /* @__PURE__ */
|
|
196
|
+
i.type === "DYNAMIC" && !P((i == null ? void 0 : i.slug) || "") && /* @__PURE__ */ t.jsxs("small", { className: "px-1 text-red-400", children: [
|
|
205
197
|
"Add dynamic ID in page slug Eg: ",
|
|
206
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ t.jsx("i", { className: "underline", children: "some-url/[some-id]" })
|
|
207
199
|
] }),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ t.jsxs("div", { className: "my-2 flex w-full items-center justify-between gap-x-2 px-1", children: [
|
|
201
|
+
/* @__PURE__ */ t.jsx(
|
|
210
202
|
q,
|
|
211
203
|
{
|
|
212
204
|
className: "w-full",
|
|
213
205
|
type: "submit",
|
|
214
206
|
onClick: S,
|
|
215
|
-
disabled: (e == null ? void 0 : e.homepage) !==
|
|
207
|
+
disabled: (e == null ? void 0 : e.homepage) !== s.uuid && d.isHomePage ? !1 : x(i.name) || x(i.slug) || !N || n.isPending || c.isPending || i.type === "DYNAMIC" && !P((i == null ? void 0 : i.slug) || ""),
|
|
216
208
|
children: "Save"
|
|
217
209
|
}
|
|
218
210
|
),
|
|
219
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ t.jsx(O, { pageData: s, projectData: e })
|
|
220
212
|
] })
|
|
221
213
|
] }) })
|
|
222
214
|
] });
|
|
223
215
|
};
|
|
224
216
|
export {
|
|
225
|
-
|
|
217
|
+
ke as default
|
|
226
218
|
};
|