@chaibuilder/sdk 0.1.17 → 0.1.19
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-6fc9d7de.cjs +3 -0
- package/dist/{AddBlocks-7b723045.js → AddBlocks-d5a8235d.js} +49 -45
- package/dist/BrandingOptions-e44ef105.cjs +1 -0
- package/dist/{BrandingOptions-b0624d8f.js → BrandingOptions-e77f91bc.js} +11 -7
- package/dist/CanvasArea-50356121.js +1311 -0
- package/dist/CanvasArea-a09ed911.cjs +46 -0
- package/dist/{CurrentPage-e0c8b063.js → CurrentPage-0dd3a1fe.js} +18 -14
- package/dist/CurrentPage-19086054.cjs +1 -0
- package/dist/{ImagesPanel-68a11293.cjs → ImagesPanel-0db5c72f.cjs} +1 -1
- package/dist/{ImagesPanel-996761b1.js → ImagesPanel-38c44785.js} +1 -1
- package/dist/Layers-2dd7336a.cjs +1 -0
- package/dist/{Layers-20ce5cb3.js → Layers-e17bbf6a.js} +144 -142
- package/dist/{MarkAsGlobalBlock-96dd248c.js → MarkAsGlobalBlock-3a58a10b.js} +15 -11
- package/dist/MarkAsGlobalBlock-d4fe0af6.cjs +1 -0
- package/dist/{PagesPanel-6f5393e8.js → PagesPanel-68bb4554.js} +12 -8
- package/dist/PagesPanel-fa54f8c4.cjs +1 -0
- package/dist/ProjectPanel-750e4a4f.cjs +1 -0
- package/dist/{ProjectPanel-b027fc0d.js → ProjectPanel-decfe6bb.js} +12 -8
- package/dist/{Settings-5bae2bdf.js → Settings-27bb6012.js} +909 -640
- package/dist/Settings-c18e276b.cjs +1 -0
- package/dist/SidePanels-839ecfae.js +243 -0
- package/dist/SidePanels-90ac74bf.cjs +1 -0
- package/dist/Topbar-57cd1611.cjs +1 -0
- package/dist/{Topbar-ba10ddd1.js → Topbar-d3dc4a34.js} +23 -19
- package/dist/{UnsplashImages-f761ad96.cjs → UnsplashImages-0d091e33.cjs} +1 -1
- package/dist/{UnsplashImages-47374e0c.js → UnsplashImages-10c95b63.js} +1 -1
- package/dist/{UploadImages-33c1507a.cjs → UploadImages-10439fde.cjs} +1 -1
- package/dist/{UploadImages-f0ba3215.js → UploadImages-b14bd152.js} +1 -1
- package/dist/_commonjsHelpers-10dfc225.js +8 -0
- package/dist/_commonjsHelpers-87b0abe8.cjs +1 -0
- package/dist/{add-page-modal-b5f3aeab.js → add-page-modal-da3e0ad5.js} +14 -11
- package/dist/add-page-modal-f49ebaf3.cjs +1 -0
- package/dist/card-14e1d020.cjs +1 -0
- package/dist/card-f8f4f985.js +33 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +6 -4
- package/dist/core.js +63 -59
- package/dist/{delete-page-modal-b1d253ae.js → delete-page-modal-3aa66051.js} +10 -6
- package/dist/delete-page-modal-6667ee2b.cjs +1 -0
- package/dist/{form-bf09d392.js → form-725e3191.js} +3 -3
- package/dist/{form-5d04c9b3.cjs → form-99b51245.cjs} +1 -1
- package/dist/index-976ec896.cjs +164 -0
- package/dist/index-ca7c3430.js +31068 -0
- package/dist/{link-6467eda6.js → link-2af5de8b.js} +1 -1
- package/dist/{link-4585b2d6.cjs → link-86ac8848.cjs} +1 -1
- package/dist/{page-viewer-11b81948.js → page-viewer-3e7a6d70.js} +19 -15
- package/dist/page-viewer-5f00c933.cjs +1 -0
- package/dist/project-general-setting-a23cc2c4.cjs +1 -0
- package/dist/{project-general-setting-9f37b1ac.js → project-general-setting-c8aa9370.js} +9 -7
- package/dist/{project-seo-setting-3f645a02.cjs → project-seo-setting-a9403f1d.cjs} +1 -1
- package/dist/{project-seo-setting-e9587467.js → project-seo-setting-c1980ec3.js} +3 -3
- package/dist/render.cjs +1 -1
- package/dist/render.js +1 -1
- package/dist/{scroll-area-9f64a082.js → scroll-area-83bd9e8f.js} +7 -7
- package/dist/{scroll-area-088530b9.cjs → scroll-area-bb343b86.cjs} +1 -1
- package/dist/{single-page-detail-085b82ca.js → single-page-detail-55638cb1.js} +32 -30
- package/dist/single-page-detail-a4b59a16.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/textarea-20b2f6b2.cjs +1 -0
- package/dist/textarea-9dfb6a32.js +45 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +74 -73
- package/dist/useChaiExternalData-192c7896.js +5 -0
- package/dist/useChaiExternalData-a90e8aac.cjs +1 -0
- package/package.json +5 -3
- package/dist/AddBlocks-3d30d446.cjs +0 -3
- package/dist/BrandingOptions-daafdabf.cjs +0 -1
- package/dist/CanvasArea-93be7e7b.cjs +0 -60
- package/dist/CanvasArea-d301c4ef.js +0 -1459
- package/dist/CurrentPage-478eb8a0.cjs +0 -1
- package/dist/Layers-85854772.cjs +0 -1
- package/dist/MarkAsGlobalBlock-5a36e8ad.cjs +0 -1
- package/dist/PagesPanel-39cc0156.cjs +0 -1
- package/dist/ProjectPanel-027fb151.cjs +0 -1
- package/dist/Settings-d9dc47d7.cjs +0 -1
- package/dist/SidePanels-9ac03c5d.js +0 -149
- package/dist/SidePanels-fe464a57.cjs +0 -1
- package/dist/Topbar-e00f11e0.cjs +0 -1
- package/dist/_commonjsHelpers-5a53b418.cjs +0 -1
- package/dist/_commonjsHelpers-d4512b9c.js +0 -6
- package/dist/add-page-modal-b267650f.cjs +0 -1
- package/dist/delete-page-modal-04b3677b.cjs +0 -1
- package/dist/index-1e878777.cjs +0 -2
- package/dist/index-95757b80.js +0 -5028
- package/dist/page-viewer-f41c53e3.cjs +0 -1
- package/dist/project-general-setting-51da3f18.cjs +0 -1
- package/dist/single-page-detail-a251b327.cjs +0 -1
- package/dist/textarea-0750bcd2.js +0 -73
- package/dist/textarea-a338ede6.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),t=require("react"),a=require("lodash"),m=require("@radix-ui/react-icons"),E=require("jotai"),q=require("./scroll-area-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),t=require("react"),a=require("lodash"),m=require("@radix-ui/react-icons"),E=require("jotai"),q=require("./scroll-area-bb343b86.cjs");require("react-i18next");const b=require("./useBuilderProp-5e57d0c8.cjs");require("@radix-ui/react-scroll-area");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");const I=E.atom([]),w=({isModalView:r,onSelect:u})=>{const R=b.useBuilderProp("uploadMediaCallback",()=>""),c=b.useBuilderProp("fetchMediaCallback",()=>[]),[n,o]=E.useAtom(I),[l,p]=t.useState(!1),[j,h]=t.useState(!1),[x,d]=t.useState(),[f,v]=t.useState("");t.useEffect(()=>{(async()=>{h(!0);const s=await c();o(s||[]),h(!1)})()},[c,o]);const y=s=>{var i,g;s&&((g=(i=s==null?void 0:s.target)==null?void 0:i.files)==null?void 0:g.length)>0&&d(s.target.files[0])},N=async()=>{p(!0);try{const{url:s}=await R(x);u(s),d(void 0);const i=await c();o(i)}catch(s){o([]),v((s==null?void 0:s.message)||"Something went wrong.")}p(!1)};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[x?e.jsxRuntimeExports.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center rounded-md border bg-slate-50 p-2 px-1",children:[e.jsxRuntimeExports.jsx("img",{src:URL.createObjectURL(x),alt:"",className:"h-auto w-full max-w-sm rounded-md max-h-96 object-contain"}),f&&e.jsxRuntimeExports.jsx("div",{className:"w-full pt-2 text-center text-sm text-red-500",children:f}),e.jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center justify-center gap-2 pt-2",children:[e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:N,disabled:l,className:"flex items-center rounded-full bg-blue-500 px-3 py-1 text-sm text-white hover:bg-blue-600 hover:text-white",children:[l?e.jsxRuntimeExports.jsx(m.GearIcon,{className:"animate-spin"}):e.jsxRuntimeExports.jsx(m.UploadIcon,{className:"animate-bounce"})," ",l?"Uploading...":"Upload"]}),!l&&e.jsxRuntimeExports.jsxs("button",{type:"button",className:"flex items-center rounded-full border border-gray-300 px-3 py-1 text-sm hover:bg-gray-200",onClick:()=>d(void 0),children:[e.jsxRuntimeExports.jsx(m.Cross1Icon,{})," Cancel"]})]})]}):e.jsxRuntimeExports.jsxs("label",{htmlFor:r?"upload-in-modal":"upload-in-panel",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-md border border-dashed border-blue-900 bg-gray-200 py-8 hover:bg-blue-50",children:[e.jsxRuntimeExports.jsx("div",{className:"text-3xl",children:"+"}),e.jsxRuntimeExports.jsx("div",{children:"Click to choose file"})]}),e.jsxRuntimeExports.jsx("input",{type:"file",id:r?"upload-in-modal":"upload-in-panel",hidden:!0,onChange:y})]}),e.jsxRuntimeExports.jsxs(q.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${r?"px-2":""} pt-2`,children:[a.isEmpty(n)&&j&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"animate-pulse font-medium",children:"Fetching..."})}),a.isEmpty(n)&&!j&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Images"})}),r?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:a.map(n,s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>u(s.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.thumbUrl})})},s.id))}):a.map(n,s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>u(s.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.url})})},s.id))]})]})};exports.default=w;
|
|
@@ -3,7 +3,7 @@ import { useState as i, useEffect as w } from "react";
|
|
|
3
3
|
import { isEmpty as g, map as b } from "lodash";
|
|
4
4
|
import { GearIcon as C, UploadIcon as U, Cross1Icon as k } from "@radix-ui/react-icons";
|
|
5
5
|
import { atom as F, useAtom as E } from "jotai";
|
|
6
|
-
import { S as A } from "./scroll-area-
|
|
6
|
+
import { S as A } from "./scroll-area-83bd9e8f.js";
|
|
7
7
|
import "react-i18next";
|
|
8
8
|
import { u as j } from "./useBuilderProp-81a14920.js";
|
|
9
9
|
import "@radix-ui/react-scroll-area";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
o as c,
|
|
7
|
+
l as g
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=l;
|
|
@@ -4,8 +4,8 @@ import { kebabCase as j } from "lodash";
|
|
|
4
4
|
import { B as c } from "./useBuilderProp-81a14920.js";
|
|
5
5
|
import { D as b, b as C, a as A } from "./dialog-3d4e82ed.js";
|
|
6
6
|
import { SingleLineText as d } from "@chaibuilder/blocks";
|
|
7
|
-
import { F as D } from "./form-
|
|
8
|
-
import {
|
|
7
|
+
import { F as D } from "./form-725e3191.js";
|
|
8
|
+
import { a0 as N } from "./index-ca7c3430.js";
|
|
9
9
|
import "@radix-ui/react-slot";
|
|
10
10
|
import "class-variance-authority";
|
|
11
11
|
import "./utils-ac68b2c8.js";
|
|
@@ -18,14 +18,17 @@ import "jotai";
|
|
|
18
18
|
import "@radix-ui/react-dialog";
|
|
19
19
|
import "@rjsf/core";
|
|
20
20
|
import "@rjsf/validator-ajv8";
|
|
21
|
-
import "./link-
|
|
21
|
+
import "./link-2af5de8b.js";
|
|
22
22
|
import "react-icons-picker";
|
|
23
23
|
import "react-dom";
|
|
24
|
-
import "./ImagesPanel-
|
|
24
|
+
import "./ImagesPanel-38c44785.js";
|
|
25
25
|
import "./tabs-85caa1e8.js";
|
|
26
26
|
import "@radix-ui/react-tabs";
|
|
27
27
|
import "react-quill";
|
|
28
28
|
import "react-i18next";
|
|
29
|
+
import "./_commonjsHelpers-10dfc225.js";
|
|
30
|
+
import "@radix-ui/react-scroll-area";
|
|
31
|
+
import "@floating-ui/react-dom";
|
|
29
32
|
import "i18next";
|
|
30
33
|
import "flagged";
|
|
31
34
|
import "react-dnd";
|
|
@@ -40,7 +43,7 @@ import "@react-hookz/web";
|
|
|
40
43
|
import "lucide-react";
|
|
41
44
|
import "sonner";
|
|
42
45
|
const S = ({ closeModal: o }) => {
|
|
43
|
-
var
|
|
46
|
+
var s, p;
|
|
44
47
|
const i = N(), [e, u] = g({
|
|
45
48
|
name: "",
|
|
46
49
|
slug: "",
|
|
@@ -54,10 +57,10 @@ const S = ({ closeModal: o }) => {
|
|
|
54
57
|
}, x = ({ formData: a }, r) => {
|
|
55
58
|
u((h) => {
|
|
56
59
|
var n, l;
|
|
57
|
-
const
|
|
58
|
-
return r === "name" ?
|
|
60
|
+
const m = { [r]: a[r] };
|
|
61
|
+
return r === "name" ? m.slug = j((n = a[r]) == null ? void 0 : n.replace(/\d/g, "")) : r === "slug" && (m.slug = (l = a[r]) == null ? void 0 : l.replace(/\d/g, "").replace(/\s+/g, "").replace("--", "-").replace("__", "_")), {
|
|
59
62
|
...h,
|
|
60
|
-
...
|
|
63
|
+
...m
|
|
61
64
|
};
|
|
62
65
|
});
|
|
63
66
|
}, P = {
|
|
@@ -74,13 +77,13 @@ const S = ({ closeModal: o }) => {
|
|
|
74
77
|
c,
|
|
75
78
|
{
|
|
76
79
|
type: "submit",
|
|
77
|
-
disabled: !e.name || !e.slug || ((
|
|
80
|
+
disabled: !e.name || !e.slug || ((s = e.name) == null ? void 0 : s.length) < 2 || ((p = e.slug) == null ? void 0 : p.length) < 2 || i.isPending,
|
|
78
81
|
onClick: f,
|
|
79
82
|
children: "Add Page"
|
|
80
83
|
}
|
|
81
84
|
) })
|
|
82
85
|
] });
|
|
83
|
-
},
|
|
86
|
+
}, xt = () => {
|
|
84
87
|
const [o, i] = g(!1);
|
|
85
88
|
return /* @__PURE__ */ t.jsxs(b, { open: o, onOpenChange: () => i(!o), children: [
|
|
86
89
|
/* @__PURE__ */ t.jsx(C, { children: /* @__PURE__ */ t.jsx(c, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => i(!o), children: "+ New Page" }) }),
|
|
@@ -88,5 +91,5 @@ const S = ({ closeModal: o }) => {
|
|
|
88
91
|
] });
|
|
89
92
|
};
|
|
90
93
|
export {
|
|
91
|
-
|
|
94
|
+
xt as default
|
|
92
95
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),g=require("react"),R=require("lodash"),x=require("./useBuilderProp-5e57d0c8.cjs"),a=require("./dialog-170eaad9.cjs"),q=require("@chaibuilder/blocks"),b=require("./form-99b51245.cjs"),f=require("./index-976ec896.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");require("jotai");require("@radix-ui/react-dialog");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./link-86ac8848.cjs");require("react-icons-picker");require("react-dom");require("./ImagesPanel-0db5c72f.cjs");require("./tabs-860e37aa.cjs");require("@radix-ui/react-tabs");require("react-quill");require("react-i18next");require("./_commonjsHelpers-87b0abe8.cjs");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-78bfa1f3.cjs");require("./MODIFIERS-70fef873.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("lucide-react");require("sonner");const E=({closeModal:i})=>{var l,o;const s=f.useAddPage(),[r,m]=g.useState({name:"",slug:"",blocks:[],type:"STATIC",seoData:{}}),p=()=>{s.mutate(r,{onSuccess:()=>i()})},j=({formData:u},t)=>{m(h=>{var d,c;const n={[t]:u[t]};return t==="name"?n.slug=R.kebabCase((d=u[t])==null?void 0:d.replace(/\d/g,"")):t==="slug"&&(n.slug=(c=u[t])==null?void 0:c.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_")),{...h,...n}})},P={name:q.SingleLineText({title:"Page Name",default:r.name}),slug:q.SingleLineText({title:"Page Slug",default:r.slug})};return e.jsxRuntimeExports.jsxs(a.DialogContent,{children:[e.jsxRuntimeExports.jsx("div",{className:"px-1 font-bold",children:"Add Page"}),e.jsxRuntimeExports.jsx(b.Form,{formData:r,properties:P,onChange:j,disabled:s.isPending}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-end",children:e.jsxRuntimeExports.jsx(x.Button,{type:"submit",disabled:!r.name||!r.slug||((l=r.name)==null?void 0:l.length)<2||((o=r.slug)==null?void 0:o.length)<2||s.isPending,onClick:p,children:"Add Page"})})]})},S=()=>{const[i,s]=g.useState(!1);return e.jsxRuntimeExports.jsxs(a.Dialog,{open:i,onOpenChange:()=>s(!i),children:[e.jsxRuntimeExports.jsx(a.DialogTrigger,{children:e.jsxRuntimeExports.jsx(x.Button,{size:"sm",variant:"link",className:"text-blue-500",onClick:()=>s(!i),children:"+ New Page"})}),i&&e.jsxRuntimeExports.jsx(E,{closeModal:()=>s(!i)})]})};exports.default=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./jsx-runtime-5c3ac4f7.cjs"),m=require("react"),s=require("./utils-3c452dd0.cjs");function u(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=u(m),d=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:s.cn("rounded-xl border bg-card text-card-foreground shadow",e),...r}));d.displayName="Card";const c=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:s.cn("flex flex-col space-y-1.5 p-6",e),...r}));c.displayName="CardHeader";const i=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("h3",{ref:t,className:s.cn("font-semibold leading-none tracking-tight",e),...r}));i.displayName="CardTitle";const l=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("p",{ref:t,className:s.cn("text-sm text-muted-foreground",e),...r}));l.displayName="CardDescription";const p=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:s.cn("p-6 pt-0",e),...r}));p.displayName="CardContent";const f=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:s.cn(" flex items-center p-6 pt-0",e),...r}));f.displayName="CardFooter";exports.Card=d;exports.CardContent=p;exports.CardDescription=l;exports.CardFooter=f;exports.CardHeader=c;exports.CardTitle=i;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { j as s } from "./jsx-runtime-944c88e2.js";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { c as o } from "./utils-ac68b2c8.js";
|
|
4
|
+
const t = d.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("div", { ref: r, className: o("rounded-xl border bg-card text-card-foreground shadow", a), ...e }));
|
|
5
|
+
t.displayName = "Card";
|
|
6
|
+
const i = d.forwardRef(
|
|
7
|
+
({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("div", { ref: r, className: o("flex flex-col space-y-1.5 p-6", a), ...e })
|
|
8
|
+
);
|
|
9
|
+
i.displayName = "CardHeader";
|
|
10
|
+
const c = d.forwardRef(
|
|
11
|
+
({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("h3", { ref: r, className: o("font-semibold leading-none tracking-tight", a), ...e })
|
|
12
|
+
);
|
|
13
|
+
c.displayName = "CardTitle";
|
|
14
|
+
const m = d.forwardRef(
|
|
15
|
+
({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("p", { ref: r, className: o("text-sm text-muted-foreground", a), ...e })
|
|
16
|
+
);
|
|
17
|
+
m.displayName = "CardDescription";
|
|
18
|
+
const n = d.forwardRef(
|
|
19
|
+
({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("div", { ref: r, className: o("p-6 pt-0", a), ...e })
|
|
20
|
+
);
|
|
21
|
+
n.displayName = "CardContent";
|
|
22
|
+
const f = d.forwardRef(
|
|
23
|
+
({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("div", { ref: r, className: o(" flex items-center p-6 pt-0", a), ...e })
|
|
24
|
+
);
|
|
25
|
+
f.displayName = "CardFooter";
|
|
26
|
+
export {
|
|
27
|
+
t as C,
|
|
28
|
+
i as a,
|
|
29
|
+
f as b,
|
|
30
|
+
c,
|
|
31
|
+
m as d,
|
|
32
|
+
n as e
|
|
33
|
+
};
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-976ec896.cjs"),s=require("./useBuilderProp-5e57d0c8.cjs"),u=require("react-i18next");require("./jsx-runtime-5c3ac4f7.cjs");require("react");require("./_commonjsHelpers-87b0abe8.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("react-dnd");require("lodash");require("@minoru/react-dnd-treeview");require("./utils-3c452dd0.cjs");require("tailwind-merge");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-78bfa1f3.cjs");require("./MODIFIERS-70fef873.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("@radix-ui/react-icons");require("lucide-react");require("sonner");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.ChaiBuilderStudio=e.ChaiBuilderStudio;exports.useActiveLanguage=e.useActiveLanguage;exports.useActiveModal=e.useActiveModal;exports.useActivePanel=e.useActivePanel;exports.useAddBlock=e.useAddBlock;exports.useAddBlockParent=e.useAddBlockParent;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useAllBlocks=e.useAllBlocks;exports.useBlockContentByLanguage=e.useBlockContentByLanguage;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderReset=e.useBuilderReset;exports.useBuildingBlocks=e.useBuildingBlocks;exports.useCanvasHistory=e.useCanvasHistory;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCurrentPage=e.useCurrentPage$1;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDeveloperPreviewMode=e.useDeveloperPreviewMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useFeatureSupport=e.useFeatureSupport;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.useLanguages=e.useLanguages;exports.useMarkAsGlobalBlock=e.useMarkAsGlobalBlock;exports.useMoveBlocks=e.useMoveBlocks;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.usePrimaryLanguage=e.usePrimaryLanguage;exports.useProject=e.useProject$1;exports.useReadOnlyMode=e.useReadOnlyMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useSetAllBlocks=e.useSetAllBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useTranslations=e.useTranslations;exports.useTreeData=e.useTreeData;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;exports.useBuilderProp=s.useBuilderProp;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>u.useTranslation});
|
package/dist/core.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export declare interface ChaiBuilderEditorProps {
|
|
|
53
53
|
canvasTopBarComponents?: {
|
|
54
54
|
right?: React_2.LazyExoticComponent<any>[];
|
|
55
55
|
};
|
|
56
|
+
dataProviders?: any[];
|
|
56
57
|
darkMode?: boolean;
|
|
57
58
|
dndOptions?: any;
|
|
58
59
|
fetchMediaCallback?: (limit?: number, offset?: number) => Promise<any[]>;
|
|
@@ -61,12 +62,13 @@ export declare interface ChaiBuilderEditorProps {
|
|
|
61
62
|
html: string;
|
|
62
63
|
}>;
|
|
63
64
|
getUILibraryBlocks?: (libraryUuid: string) => Promise<PredefinedBlock[]>;
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
subPages?: Block[];
|
|
66
|
+
subPagesSupport?: boolean;
|
|
66
67
|
importHTML?: boolean;
|
|
67
68
|
loading?: boolean;
|
|
68
|
-
onSaveBlocks
|
|
69
|
-
|
|
69
|
+
onSaveBlocks?: ({ blocks, providers }: any) => Promise<any>;
|
|
70
|
+
onSavePage: ({ blocks, providers }: any) => Promise<boolean>;
|
|
71
|
+
onSaveBrandingOptions: (brandingOptions: any) => Promise<boolean>;
|
|
70
72
|
onSyncStatusChange?: (syncStatus: "UNSAVED" | "SAVED") => void;
|
|
71
73
|
previewComponent?: LazyExoticComponent<any>;
|
|
72
74
|
sideBarComponents?: {
|
package/dist/core.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as
|
|
3
|
-
import { useTranslation as
|
|
1
|
+
import { a5 as b, ap as j, H as x, a8 as G, ak as O, W as U, al as w, K as F, B as W, ao as Z, z as q, a6 as z, a9 as E, d as K, f as N, l as V, o as J, aa as Q, n as X, e as Y, ab as _, m as $, k as ss, ac as es, V as as, A as os, an as ts, a1 as rs, ad as us, q as is, s as ls, am as ps, ae as ms, a7 as cs, t as ds, L as Bs, c as ks, D as ns, ag as gs, N as Cs, i as Ss, O as vs, g as Ps, j as As, h as ys, ah as hs, M as Ms, af as Ds, ai as Is, Z as Ls, aj as fs, G as Rs } from "./index-ca7c3430.js";
|
|
2
|
+
import { u as Ts } from "./useBuilderProp-81a14920.js";
|
|
3
|
+
import { useTranslation as js } from "react-i18next";
|
|
4
4
|
import "./jsx-runtime-944c88e2.js";
|
|
5
5
|
import "react";
|
|
6
|
+
import "./_commonjsHelpers-10dfc225.js";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "@radix-ui/react-scroll-area";
|
|
9
|
+
import "react-dom";
|
|
10
|
+
import "@floating-ui/react-dom";
|
|
11
|
+
import "jotai";
|
|
6
12
|
import "i18next";
|
|
7
13
|
import "flagged";
|
|
8
14
|
import "react-dnd";
|
|
9
15
|
import "lodash";
|
|
10
16
|
import "@minoru/react-dnd-treeview";
|
|
11
|
-
import "jotai";
|
|
12
17
|
import "./utils-ac68b2c8.js";
|
|
13
|
-
import "clsx";
|
|
14
18
|
import "tailwind-merge";
|
|
15
19
|
import "react-hotkeys-hook";
|
|
16
20
|
import "flat-to-nested";
|
|
@@ -28,58 +32,58 @@ import "class-variance-authority";
|
|
|
28
32
|
import "@radix-ui/react-tooltip";
|
|
29
33
|
import "@radix-ui/react-toast";
|
|
30
34
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
35
|
+
b as ChaiBuilderEditor,
|
|
36
|
+
j as ChaiBuilderStudio,
|
|
37
|
+
x as useActiveLanguage,
|
|
38
|
+
G as useActiveModal,
|
|
39
|
+
O as useActivePanel,
|
|
40
|
+
U as useAddBlock,
|
|
41
|
+
w as useAddBlockParent,
|
|
42
|
+
F as useAddClassesToBlocks,
|
|
43
|
+
W as useAllBlocks,
|
|
44
|
+
Z as useBlockContentByLanguage,
|
|
45
|
+
q as useBrandingOptions,
|
|
46
|
+
Ts as useBuilderProp,
|
|
47
|
+
z as useBuilderReset,
|
|
48
|
+
E as useBuildingBlocks,
|
|
49
|
+
K as useCanvasHistory,
|
|
50
|
+
N as useCanvasWidth,
|
|
51
|
+
V as useCanvasZoom,
|
|
52
|
+
J as useCopyBlockIds,
|
|
53
|
+
Q as useCurrentPage,
|
|
54
|
+
X as useCutBlockIds,
|
|
55
|
+
Y as useDarkMode,
|
|
56
|
+
_ as useDeveloperPreviewMode,
|
|
57
|
+
$ as useDuplicateBlocks,
|
|
58
|
+
ss as useFeatureSupport,
|
|
59
|
+
es as useGetPageData,
|
|
60
|
+
as as useHiddenBlockIds,
|
|
61
|
+
os as useHighlightBlockId,
|
|
62
|
+
ts as useLanguages,
|
|
63
|
+
rs as useMarkAsGlobalBlock,
|
|
64
|
+
us as useMoveBlocks,
|
|
65
|
+
is as usePasteBlocks,
|
|
66
|
+
ls as usePreviewMode,
|
|
67
|
+
ps as usePrimaryLanguage,
|
|
68
|
+
ms as useProject,
|
|
69
|
+
cs as useReadOnlyMode,
|
|
70
|
+
ds as useRemoveBlocks,
|
|
71
|
+
Bs as useRemoveClassesFromBlocks,
|
|
72
|
+
ks as useSavePage,
|
|
73
|
+
ns as useSelectedBlock,
|
|
74
|
+
gs as useSelectedBlockAllClasses,
|
|
75
|
+
Cs as useSelectedBlockCurrentClasses,
|
|
76
|
+
Ss as useSelectedBlockIds,
|
|
77
|
+
vs as useSelectedBlocksDisplayChild,
|
|
78
|
+
Ps as useSelectedBreakpoints,
|
|
79
|
+
As as useSelectedStylingBlocks,
|
|
80
|
+
ys as useSetAllBlocks,
|
|
81
|
+
hs as useStylingBreakpoint,
|
|
82
|
+
Ms as useStylingState,
|
|
83
|
+
js as useTranslation,
|
|
84
|
+
Ds as useTranslations,
|
|
85
|
+
Is as useTreeData,
|
|
86
|
+
Ls as useUILibraryBlocks,
|
|
87
|
+
fs as useUpdateBlocksProps,
|
|
88
|
+
Rs as useUpdateBlocksPropsRealtime
|
|
85
89
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-944c88e2.js";
|
|
2
2
|
import { B as l } from "./useBuilderProp-81a14920.js";
|
|
3
|
-
import { A as n, a as d, b as
|
|
4
|
-
import {
|
|
3
|
+
import { A as n, a as d, b as p, e as a, f as c, h as u } from "./alert-dialog-ee98f47e.js";
|
|
4
|
+
import { a4 as h } from "./index-ca7c3430.js";
|
|
5
5
|
import { TrashIcon as x } from "@radix-ui/react-icons";
|
|
6
6
|
import "react";
|
|
7
7
|
import "@radix-ui/react-slot";
|
|
@@ -14,6 +14,10 @@ import "@radix-ui/react-toast";
|
|
|
14
14
|
import "jotai";
|
|
15
15
|
import "lodash";
|
|
16
16
|
import "@radix-ui/react-alert-dialog";
|
|
17
|
+
import "./_commonjsHelpers-10dfc225.js";
|
|
18
|
+
import "@radix-ui/react-scroll-area";
|
|
19
|
+
import "react-dom";
|
|
20
|
+
import "@floating-ui/react-dom";
|
|
17
21
|
import "i18next";
|
|
18
22
|
import "react-i18next";
|
|
19
23
|
import "flagged";
|
|
@@ -29,7 +33,7 @@ import "@react-hookz/web";
|
|
|
29
33
|
import "@chaibuilder/blocks";
|
|
30
34
|
import "lucide-react";
|
|
31
35
|
import "sonner";
|
|
32
|
-
const
|
|
36
|
+
const X = ({ pageData: r, projectData: i }) => {
|
|
33
37
|
const s = {}, t = h(), o = r.uuid === i.homepage, m = () => {
|
|
34
38
|
t.mutate(r, {
|
|
35
39
|
onSuccess: () => {
|
|
@@ -45,8 +49,8 @@ const Q = ({ pageData: r, projectData: i }) => {
|
|
|
45
49
|
children: /* @__PURE__ */ e.jsx(x, {})
|
|
46
50
|
}
|
|
47
51
|
) }),
|
|
48
|
-
/* @__PURE__ */ e.jsxs(
|
|
49
|
-
/* @__PURE__ */ e.jsxs(
|
|
52
|
+
/* @__PURE__ */ e.jsxs(p, { children: [
|
|
53
|
+
/* @__PURE__ */ e.jsxs(a, { children: [
|
|
50
54
|
"Are you sure you want to delete ",
|
|
51
55
|
/* @__PURE__ */ e.jsx("i", { className: "text-red-500", children: r.name }),
|
|
52
56
|
" page?"
|
|
@@ -60,5 +64,5 @@ const Q = ({ pageData: r, projectData: i }) => {
|
|
|
60
64
|
] });
|
|
61
65
|
};
|
|
62
66
|
export {
|
|
63
|
-
|
|
67
|
+
X as default
|
|
64
68
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),l=require("./useBuilderProp-5e57d0c8.cjs"),r=require("./alert-dialog-4ce6ed22.cjs"),d=require("./index-976ec896.cjs"),c=require("@radix-ui/react-icons");require("react");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("jotai");require("lodash");require("@radix-ui/react-alert-dialog");require("./_commonjsHelpers-87b0abe8.cjs");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("i18next");require("react-i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-78bfa1f3.cjs");require("./MODIFIERS-70fef873.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");const x=({pageData:i,projectData:s})=>{const n={},t=d.useDeletePage(),u=i.uuid===s.homepage,o=()=>{t.mutate(i,{onSuccess:()=>{n({uuid:s.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:u,children:e.jsxRuntimeExports.jsx("div",{className:`flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${u?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(c.TrashIcon,{})})}),e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(r.AlertDialogTitle,{children:["Are you sure you want to delete ",e.jsxRuntimeExports.jsx("i",{className:"text-red-500",children:i.name})," page?"]}),e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your page."}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:t.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(l.Button,{variant:"destructive",onClick:o,disabled:t.isPending,children:"Yes, Delete"})]})]})]})};exports.default=x;
|
|
@@ -2,7 +2,7 @@ import { j as u } from "./jsx-runtime-944c88e2.js";
|
|
|
2
2
|
import x from "@rjsf/core";
|
|
3
3
|
import $ from "@rjsf/validator-ajv8";
|
|
4
4
|
import { includes as h, get as a, set as F, first as P } from "lodash";
|
|
5
|
-
import { R as b, I as E, a as O, L as S } from "./link-
|
|
5
|
+
import { R as b, I as E, a as O, L as S } from "./link-2af5de8b.js";
|
|
6
6
|
const d = (i, l = "") => {
|
|
7
7
|
switch (i.type) {
|
|
8
8
|
case "singular":
|
|
@@ -66,7 +66,7 @@ const d = (i, l = "") => {
|
|
|
66
66
|
default:
|
|
67
67
|
return {};
|
|
68
68
|
}
|
|
69
|
-
},
|
|
69
|
+
}, g = ({
|
|
70
70
|
title: i,
|
|
71
71
|
properties: l = {},
|
|
72
72
|
formData: c,
|
|
@@ -121,5 +121,5 @@ const d = (i, l = "") => {
|
|
|
121
121
|
] });
|
|
122
122
|
};
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
g as F
|
|
125
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("./jsx-runtime-5c3ac4f7.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash"),d=require("./link-
|
|
1
|
+
"use strict";const f=require("./jsx-runtime-5c3ac4f7.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash"),d=require("./link-86ac8848.cjs"),h=(n,c="")=>{switch(n.type){case"singular":return n.uiSchema;case"model":const{properties:p}=n,u={};return Object.keys(p).forEach(r=>{const e=p[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${c}`:r;u[o]=h(e,c)}),u;case"list":const{itemProperties:m}=n,l={items:{}};return Object.keys(m).forEach(r=>{const e=m[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${c}`:r;l.items[o]=h(e,c)}),l;default:return{}}},x=(n,c="")=>{switch(n.type){case"singular":return n.schema;case"model":const{properties:p,title:u}=n,m={title:u,type:"object",properties:{}};return Object.keys(p).forEach(o=>{const t=p[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${c}`:o;m.properties[s]=x(t,c)}),m;case"list":const{itemProperties:l,title:r}=n,e={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(o=>{const t=l[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${c}`:o;e.items.properties[s]=x(t,c),i.set(e.items,"title",i.get(t,"itemTitle",`${r} item`))}),e;default:return{}}},$=({title:n,properties:c={},formData:p,onChange:u,disabled:m=!1,activeLang:l=""})=>{const r={type:"object",properties:{}},e={};Object.keys(c).forEach(t=>{const s=c[t];if(i.includes(["slot","styles"],s.type))return;const a=i.get(s,"i18n",!1)?`${t}-${l}`:t;r.properties[a]=x(s,l),e[a]=h(s,l)});const o=({...t},s)=>{const a=s==null?void 0:s.replace("root.","").split("/").pop();if(!s||!a)return;const j=i.first(a.split("."));s&&j&&u({...t},j)};return f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[n&&f.jsxRuntimeExports.jsx("h1",{className:"px-1 text-sm font-semibold underline",children:n}),f.jsxRuntimeExports.jsx("div",{className:"-mx-3",children:f.jsxRuntimeExports.jsx(y,{widgets:{richtext:d.RichTextEditorField,icon:d.IconPickerField,image:d.ImagePickerField},fields:{link:d.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:e,schema:r,formData:p,validator:E,onChange:o,disabled:m})})]})};exports.Form=$;
|