@chaibuilder/sdk 1.2.5 → 1.2.7
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-MKhgtI8x.cjs +1 -0
- package/dist/{AddBlocks-gbfzju1d.js → AddBlocks-pjLrzkvz.js} +52 -53
- package/dist/{BrandingOptions-mZXO7thQ.js → BrandingOptions-PXCI0z-H.js} +57 -53
- package/dist/BrandingOptions-tZaUILYP.cjs +1 -0
- package/dist/CanvasArea-C2ak1ui1.cjs +60 -0
- package/dist/{CanvasArea-WS9dnLyS.js → CanvasArea-Fhg-6_nZ.js} +407 -407
- package/dist/CurrentPage-4O-iqW3w.cjs +1 -0
- package/dist/{CurrentPage-iaGHiR2B.js → CurrentPage-Zz9LEdez.js} +15 -17
- package/dist/{Layers-V15IDskJ.js → Layers-cgmxKAP9.js} +173 -152
- package/dist/Layers-uo4KpGCs.cjs +1 -0
- package/dist/MarkAsGlobalBlock-1kOwPbPm.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-SPWd6Flk.js → MarkAsGlobalBlock-htrpRVJM.js} +6 -6
- package/dist/{PagesPanel-wfyKhLJ5.js → PagesPanel-TYBKN2Am.js} +8 -10
- package/dist/PagesPanel-z5qHpU24.cjs +1 -0
- package/dist/{ProjectPanel-aiKhpNvr.js → ProjectPanel-PJ1iPaLY.js} +15 -17
- package/dist/ProjectPanel-mEVh8sLb.cjs +1 -0
- package/dist/{Settings-JjYbPJrt.js → Settings-Na0NVS-E.js} +334 -334
- package/dist/Settings-YNxmjfAl.cjs +1 -0
- package/dist/{SidePanels-XABN8kD3.js → SidePanels-bHll6xCt.js} +99 -98
- package/dist/SidePanels-jsHvSEtM.cjs +1 -0
- package/dist/{Topbar-ks1ckGLz.js → Topbar-JKdXHH8P.js} +4 -4
- package/dist/Topbar-jWRuTvxv.cjs +1 -0
- package/dist/UnsplashImages-dBdqJNux.cjs +1 -0
- package/dist/{UnsplashImages-8vJPuqrF.js → UnsplashImages-jiOES16m.js} +7 -7
- package/dist/UploadImages-OD3RPS7j.cjs +1 -0
- package/dist/{UploadImages-6N6UrjLo.js → UploadImages-imersU7l.js} +4 -4
- package/dist/{add-page-modal-Gwhl6J1F.js → add-page-modal-EQWWxbry.js} +10 -11
- package/dist/add-page-modal-nFQ8TUBM.cjs +1 -0
- package/dist/{confirm-alert-biqvaLT-.js → confirm-alert-HOs52FKE.js} +4 -4
- package/dist/confirm-alert-j6hcFSlG.cjs +1 -0
- package/dist/{controls-XPXGHKht.js → controls-QGClapUl.js} +9 -45
- package/dist/{controls-Dy1qa8Dc.cjs → controls-hpe3HxsR.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +56 -58
- package/dist/{delete-page-modal-xGWX8RHn.js → delete-page-modal-DU388lPm.js} +21 -23
- package/dist/delete-page-modal-bkSWhTxz.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +263 -24
- package/dist/{form-Moz_psOw.js → form-7E1GY3U7.js} +1 -1
- package/dist/{form-lJhy9DEC.cjs → form-lF5eSfMe.cjs} +1 -1
- package/dist/html-to-json-JS8zQjYB.cjs +1 -0
- package/dist/{html-to-json-yjzEN9OX.js → html-to-json-lNLC8Y7D.js} +26 -27
- package/dist/{index-7mV_OcXd.js → index-7vwIQQ-T.js} +5402 -5366
- package/dist/index-98CxilGX.cjs +1 -0
- package/dist/{index-mUPP605-.cjs → index-Hf23Fq9m.cjs} +33 -33
- package/dist/{index-_OgCuSUz.js → index-WKIG_VPl.js} +1043 -1036
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +20 -22
- package/dist/mockServiceWorker.js +1 -1
- package/dist/page-viewer-6a4GFMUg.cjs +1 -0
- package/dist/{page-viewer-Xl1i1V3J.js → page-viewer-fohh_Dwv.js} +9 -11
- package/dist/{project-general-setting-8H1Rka2z.js → project-general-setting-Ryf5OhPd.js} +10 -11
- package/dist/project-general-setting-j4lKlLUE.cjs +1 -0
- package/dist/project-seo-setting-CATo4bEL.cjs +1 -0
- package/dist/{project-seo-setting-dXclexQW.js → project-seo-setting-KKOCl416.js} +6 -6
- package/dist/{single-page-detail-1hsqXV8c.js → single-page-detail-mJBo7VRe.js} +11 -12
- package/dist/single-page-detail-zms-5Fa_.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +7 -9
- package/dist/style.css +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +18 -18
- package/dist/{useAddBlockByDrop-uPXvrg4G.js → useAddBlockByDrop-CmSt8dRr.js} +1 -1
- package/dist/{useAddBlockByDrop-_nd8yZBa.cjs → useAddBlockByDrop-pVcDjcgp.cjs} +1 -1
- package/dist/{utils-AvyFzbPC.js → utils-Jw11nj1S.js} +35 -26
- package/dist/utils-j7Kg63NR.cjs +1 -0
- package/dist/web-blocks.cjs +1 -9
- package/dist/web-blocks.js +3 -1049
- package/package.json +5 -5
- package/dist/AddBlocks-wuKI1ieB.cjs +0 -1
- package/dist/BrandingOptions-arKT1zCy.cjs +0 -1
- package/dist/CanvasArea-wpskKN1H.cjs +0 -59
- package/dist/CurrentPage-X9fCVXgY.cjs +0 -1
- package/dist/Functions-7jnEwJyw.js +0 -15
- package/dist/Functions-N3yhPYKY.cjs +0 -1
- package/dist/Layers-EGhZWmvD.cjs +0 -1
- package/dist/MarkAsGlobalBlock-S2BhHTsK.cjs +0 -1
- package/dist/PagesPanel-Vla7HZkm.cjs +0 -1
- package/dist/ProjectPanel-YLS4oOuU.cjs +0 -1
- package/dist/Settings-rnHnjhZ4.cjs +0 -1
- package/dist/SidePanels-vcWHxatg.cjs +0 -1
- package/dist/Topbar-u5XKdWgQ.cjs +0 -1
- package/dist/UnsplashImages-V8oKEHfi.cjs +0 -1
- package/dist/UploadImages-eHYxwWAp.cjs +0 -1
- package/dist/add-page-modal-o5dy8nwt.cjs +0 -1
- package/dist/confirm-alert-f3DYO5Hj.cjs +0 -1
- package/dist/delete-page-modal-IO_9ZCm4.cjs +0 -1
- package/dist/html-to-json-5UoswV2Q.cjs +0 -1
- package/dist/index-IIJ_o44s.cjs +0 -1
- package/dist/page-viewer-pJFW_LaN.cjs +0 -1
- package/dist/project-general-setting-lNEoQK1n.cjs +0 -1
- package/dist/project-seo-setting-9JGBPzcA.cjs +0 -1
- package/dist/single-page-detail-VKqGt-s1.cjs +0 -1
- package/dist/utils-PTxFk6qT.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,1051 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
4
|
-
import { j as a } from "./jsx-runtime-WbnYoNE9.js";
|
|
5
|
-
import { omit as $, isEmpty as k, isNull as O, get as S, map as j, noop as V } from "lodash-es";
|
|
6
|
-
import { c as B, g as x } from "./Functions-7jnEwJyw.js";
|
|
7
|
-
import { HeadingIcon as U, TextIcon as W, CursorTextIcon as G, ButtonIcon as F, Link1Icon as Y, RowsIcon as X, ColumnsIcon as Z, SketchLogoIcon as J, ImageIcon as K, VideoIcon as Q, CodeIcon as ee, DividerHorizontalIcon as te, SpaceBetweenVerticallyIcon as z, TableIcon as le, BorderTopIcon as oe, BorderAllIcon as re, ViewHorizontalIcon as se, DragHandleHorizontalIcon as ae, GroupIcon as ne, LetterCaseToggleIcon as ie, InputIcon as A, DropdownMenuIcon as ce, CheckboxIcon as de, RadiobuttonIcon as ue } from "@radix-ui/react-icons";
|
|
8
|
-
import { get as T } from "lodash";
|
|
9
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
|
-
import "clsx";
|
|
11
|
-
import "tailwind-merge";
|
|
12
|
-
const pe = (l) => {
|
|
13
|
-
const { blockProps: e, backgroundImage: t, children: o, styles: s } = l;
|
|
14
|
-
let r = {};
|
|
15
|
-
return t && (r = { backgroundImage: `url(${t})` }), d.createElement("div", { ...e, ...s, style: r }, o);
|
|
16
|
-
};
|
|
17
|
-
u(pe, {
|
|
18
|
-
type: "Body",
|
|
19
|
-
label: "Body",
|
|
20
|
-
category: "core",
|
|
21
|
-
group: "basic",
|
|
22
|
-
hidden: !0,
|
|
23
|
-
props: {
|
|
24
|
-
styles: c({ default: "font-body antialiased" }),
|
|
25
|
-
backgroundImage: E({ title: "Background Image" })
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
const g = ({ blockProps: l, className: e = "", styles: t = {} }) => /* @__PURE__ */ a.jsx(
|
|
29
|
-
"div",
|
|
30
|
-
{
|
|
31
|
-
...l,
|
|
32
|
-
className: B("flex h-20 flex-col items-center justify-center", e),
|
|
33
|
-
...$(t, ["className"]),
|
|
34
|
-
children: /* @__PURE__ */ a.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300", children: /* @__PURE__ */ a.jsx("span", { className: "opacit flex items-center gap-x-1.5 text-xs font-semibold text-gray-400" }) })
|
|
35
|
-
}
|
|
36
|
-
), me = d.memo(
|
|
37
|
-
(l) => {
|
|
38
|
-
const { blockProps: e, backgroundImage: t, children: o, tag: s = "div", styles: r } = l;
|
|
39
|
-
if (!o && k(r == null ? void 0 : r.className))
|
|
40
|
-
return /* @__PURE__ */ a.jsx(g, { blockProps: e, styles: r });
|
|
41
|
-
let n = {};
|
|
42
|
-
return t && (n = { backgroundImage: `url(${t})` }), d.createElement(s, { ...e, ...r, style: n }, o);
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
u(me, {
|
|
46
|
-
type: "Box",
|
|
47
|
-
label: "Box",
|
|
48
|
-
category: "core",
|
|
49
|
-
group: "basic",
|
|
50
|
-
props: {
|
|
51
|
-
styles: c({ default: "" }),
|
|
52
|
-
tag: v({
|
|
53
|
-
title: "Tag",
|
|
54
|
-
default: "div",
|
|
55
|
-
options: [
|
|
56
|
-
{ value: "div", title: "div" },
|
|
57
|
-
{ value: "header", title: "header" },
|
|
58
|
-
{ value: "footer", title: "footer" },
|
|
59
|
-
{ value: "section", title: "section" },
|
|
60
|
-
{ value: "article", title: "article" },
|
|
61
|
-
{ value: "aside", title: "aside" },
|
|
62
|
-
{ value: "main", title: "main" },
|
|
63
|
-
{ value: "nav", title: "nav" },
|
|
64
|
-
{ value: "figure", title: "figure" },
|
|
65
|
-
{ value: "details", title: "details" },
|
|
66
|
-
{ value: "summary", title: "summary" },
|
|
67
|
-
{ value: "dialog", title: "dialog" },
|
|
68
|
-
{ value: "strike", title: "strike" },
|
|
69
|
-
{ value: "caption", title: "caption" },
|
|
70
|
-
{ value: "legend", title: "legend" },
|
|
71
|
-
{ value: "figcaption", title: "figcaption" },
|
|
72
|
-
{ value: "mark", title: "mark" }
|
|
73
|
-
]
|
|
74
|
-
}),
|
|
75
|
-
backgroundImage: E({ title: "Background Image" })
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
const fe = (l) => {
|
|
79
|
-
const { blockProps: e, styles: t, content: o, level: s = "h1", children: r = null } = l;
|
|
80
|
-
return r ? d.createElement(s, { ...t, ...e }, r) : d.createElement(s, {
|
|
81
|
-
...t,
|
|
82
|
-
...e,
|
|
83
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
u(fe, {
|
|
87
|
-
type: "Heading",
|
|
88
|
-
label: "Heading",
|
|
89
|
-
category: "core",
|
|
90
|
-
icon: U,
|
|
91
|
-
group: "basic",
|
|
92
|
-
props: {
|
|
93
|
-
level: v({
|
|
94
|
-
title: "Level",
|
|
95
|
-
default: "h1",
|
|
96
|
-
binding: !1,
|
|
97
|
-
options: [
|
|
98
|
-
{ value: "h1", title: "h1" },
|
|
99
|
-
{ value: "h2", title: "h2" },
|
|
100
|
-
{ value: "h3", title: "h3" },
|
|
101
|
-
{ value: "h4", title: "h4" },
|
|
102
|
-
{ value: "h5", title: "h5" },
|
|
103
|
-
{ value: "h6", title: "h6" }
|
|
104
|
-
]
|
|
105
|
-
}),
|
|
106
|
-
styles: c({ default: "text-3xl" }),
|
|
107
|
-
content: I({ title: "Content", default: "Heading goes here" })
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
const be = (l) => {
|
|
111
|
-
const { blockProps: e, styles: t, content: o } = l;
|
|
112
|
-
return O(l.children) ? d.createElement("div", {
|
|
113
|
-
...t,
|
|
114
|
-
...e,
|
|
115
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
116
|
-
}) : d.createElement("p", { ...t, ...e }, l.children);
|
|
117
|
-
};
|
|
118
|
-
u(be, {
|
|
119
|
-
type: "Paragraph",
|
|
120
|
-
label: "Paragraph",
|
|
121
|
-
category: "core",
|
|
122
|
-
icon: W,
|
|
123
|
-
group: "basic",
|
|
124
|
-
props: {
|
|
125
|
-
styles: c({ default: "" }),
|
|
126
|
-
content: I({
|
|
127
|
-
title: "Content",
|
|
128
|
-
default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."
|
|
129
|
-
})
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
const ye = (l) => {
|
|
133
|
-
const { blockProps: e, styles: t, content: o, children: s = null, tag: r } = l;
|
|
134
|
-
return s ? d.createElement("span", { ...t, ...e }, s) : d.createElement(r || "span", {
|
|
135
|
-
...t,
|
|
136
|
-
...e,
|
|
137
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
u(ye, {
|
|
141
|
-
type: "Span",
|
|
142
|
-
label: "Span",
|
|
143
|
-
category: "core",
|
|
144
|
-
group: "basic",
|
|
145
|
-
props: {
|
|
146
|
-
styles: c({ default: "" }),
|
|
147
|
-
content: I({ title: "Content", default: "Enter your content" })
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
const he = (l) => {
|
|
151
|
-
const { blockProps: e, content: t, styles: o } = l;
|
|
152
|
-
return /* @__PURE__ */ a.jsx("div", { className: "prose max-w-full", children: /* @__PURE__ */ a.jsx("div", { ...e, ...o, dangerouslySetInnerHTML: { __html: t } }) });
|
|
153
|
-
};
|
|
154
|
-
u(he, {
|
|
155
|
-
type: "RichText",
|
|
156
|
-
label: "Rich Text",
|
|
157
|
-
category: "core",
|
|
158
|
-
icon: G,
|
|
159
|
-
group: "basic",
|
|
160
|
-
props: {
|
|
161
|
-
styles: c({ default: "" }),
|
|
162
|
-
content: w({
|
|
163
|
-
title: "Content",
|
|
164
|
-
default: `Lorem Ipsum Rich Text Editor Demo
|
|
165
|
-
|
|
166
|
-
Welcome to our rich text editor demo! With our powerful editor, you can create stunning documents with ease. Let's explore some of its features:
|
|
167
|
-
|
|
168
|
-
Text Formatting: You can make text bold, italic, or underline it.
|
|
169
|
-
Lists:
|
|
170
|
-
Create ordered lists.
|
|
171
|
-
Craft unordered lists.
|
|
172
|
-
Utilize nested lists for organization.`
|
|
173
|
-
})
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
const ge = (l) => {
|
|
177
|
-
const { blockProps: e, iconSize: t, icon: o, content: s, iconPos: r, styles: n, children: i } = l, p = o, m = i || /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
178
|
-
s,
|
|
179
|
-
p && /* @__PURE__ */ a.jsx(
|
|
180
|
-
"div",
|
|
181
|
-
{
|
|
182
|
-
style: { width: t + "px" },
|
|
183
|
-
className: r + (r === "order-first" ? " mr-2" : "ml-2") || "",
|
|
184
|
-
dangerouslySetInnerHTML: { __html: p }
|
|
185
|
-
}
|
|
186
|
-
)
|
|
187
|
-
] });
|
|
188
|
-
return d.createElement("button", { ...e, ...n, type: "button" }, m);
|
|
189
|
-
};
|
|
190
|
-
u(ge, {
|
|
191
|
-
type: "Button",
|
|
192
|
-
label: "Button",
|
|
193
|
-
category: "core",
|
|
194
|
-
icon: F,
|
|
195
|
-
group: "basic",
|
|
196
|
-
props: {
|
|
197
|
-
content: f({ title: "Label", default: "Button", multiLingual: !0 }),
|
|
198
|
-
styles: c({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
|
|
199
|
-
link: H({ title: "Link", default: { type: "page", href: "", target: "_blank" } }),
|
|
200
|
-
icon: P({ title: "Icon", default: "" }),
|
|
201
|
-
iconSize: R({ title: "Icon Size", default: 24 }),
|
|
202
|
-
iconPos: v({
|
|
203
|
-
title: "Icon Position",
|
|
204
|
-
default: "order-last",
|
|
205
|
-
options: [
|
|
206
|
-
{ title: "Start", value: "order-first" },
|
|
207
|
-
{ title: "End", value: "order-last" }
|
|
208
|
-
]
|
|
209
|
-
})
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
const xe = (l) => {
|
|
213
|
-
const { blockProps: e, link: t, children: o, styles: s, inBuilder: r, content: n } = l;
|
|
214
|
-
return !o && k(s == null ? void 0 : s.className) && k(n) ? /* @__PURE__ */ a.jsx(g, { blockProps: e }) : r ? o ? /* @__PURE__ */ a.jsx("span", { "data-simulate": "a", ...e, ...s, children: o }) : d.createElement("span", {
|
|
215
|
-
...e,
|
|
216
|
-
...s,
|
|
217
|
-
href: t.href || "#",
|
|
218
|
-
target: t.target || "_self",
|
|
219
|
-
dangerouslySetInnerHTML: { __html: n },
|
|
220
|
-
"data-simulate": "a"
|
|
221
|
-
}) : o ? /* @__PURE__ */ a.jsx("a", { href: t.href || "#/", target: t.target, ...e, ...s, children: o }) : d.createElement("a", {
|
|
222
|
-
...e,
|
|
223
|
-
...s,
|
|
224
|
-
href: t.href || "#",
|
|
225
|
-
target: t.target || "_self",
|
|
226
|
-
dangerouslySetInnerHTML: { __html: n }
|
|
227
|
-
});
|
|
228
|
-
};
|
|
229
|
-
u(xe, {
|
|
230
|
-
type: "Link",
|
|
231
|
-
label: "Link",
|
|
232
|
-
category: "core",
|
|
233
|
-
icon: Y,
|
|
234
|
-
group: "basic",
|
|
235
|
-
props: {
|
|
236
|
-
styles: c({ default: "" }),
|
|
237
|
-
content: f({ title: "Content", default: "" }),
|
|
238
|
-
link: H({
|
|
239
|
-
title: "Link",
|
|
240
|
-
default: { type: "page", target: "_self", href: "" }
|
|
241
|
-
})
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
const ke = (l) => {
|
|
245
|
-
const { blockProps: e, children: t, listType: o, styles: s, tag: r } = l, n = B(S(s, "className", ""), o);
|
|
246
|
-
return !t && k(s == null ? void 0 : s.className) ? /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "LIST ITEM" }) : d.createElement(
|
|
247
|
-
r || (o === "list-decimal" ? "ol" : "ul"),
|
|
248
|
-
{ ...e, ...s, className: n },
|
|
249
|
-
t
|
|
250
|
-
);
|
|
251
|
-
};
|
|
252
|
-
u(ke, {
|
|
253
|
-
type: "List",
|
|
254
|
-
label: "List",
|
|
255
|
-
icon: X,
|
|
256
|
-
category: "core",
|
|
257
|
-
group: "basic",
|
|
258
|
-
props: {
|
|
259
|
-
styles: c({ default: "" }),
|
|
260
|
-
listType: v({
|
|
261
|
-
title: "List type",
|
|
262
|
-
default: "list-disc",
|
|
263
|
-
options: [
|
|
264
|
-
{ value: "list-none", title: "None" },
|
|
265
|
-
{ value: "list-disc", title: "Disc" },
|
|
266
|
-
{ value: "list-decimal", title: "Number" }
|
|
267
|
-
]
|
|
268
|
-
})
|
|
269
|
-
},
|
|
270
|
-
blocks: [
|
|
271
|
-
{ _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
|
|
272
|
-
{
|
|
273
|
-
_type: "ListItem",
|
|
274
|
-
_id: "b",
|
|
275
|
-
_parent: "a",
|
|
276
|
-
styles: "#styles:,",
|
|
277
|
-
content: "Item 1"
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
_type: "ListItem",
|
|
281
|
-
_id: "c",
|
|
282
|
-
_parent: "a",
|
|
283
|
-
styles: "#styles:,",
|
|
284
|
-
content: "Item 2"
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
_type: "ListItem",
|
|
288
|
-
_id: "d",
|
|
289
|
-
_parent: "a",
|
|
290
|
-
styles: "#styles:,",
|
|
291
|
-
content: "Item 3"
|
|
292
|
-
}
|
|
293
|
-
]
|
|
294
|
-
});
|
|
295
|
-
const ve = (l) => {
|
|
296
|
-
const { blockProps: e, content: t, styles: o, children: s, tag: r } = l;
|
|
297
|
-
return s ? d.createElement(r || "li", { ...o, ...e }, s) : d.createElement(r || "li", {
|
|
298
|
-
...o,
|
|
299
|
-
...e,
|
|
300
|
-
dangerouslySetInnerHTML: { __html: t }
|
|
301
|
-
});
|
|
302
|
-
};
|
|
303
|
-
u(ve, {
|
|
304
|
-
type: "ListItem",
|
|
305
|
-
label: "List Item",
|
|
306
|
-
icon: Z,
|
|
307
|
-
category: "core",
|
|
308
|
-
group: "basic",
|
|
309
|
-
props: {
|
|
310
|
-
styles: c({ default: "" }),
|
|
311
|
-
content: I({ title: "Content", default: "List item" })
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
const Ie = (l) => {
|
|
315
|
-
const { blockProps: e, icon: t, styles: o } = l, s = {
|
|
316
|
-
...o,
|
|
317
|
-
className: B(o.className, "inline-block c-inline-block")
|
|
318
|
-
};
|
|
319
|
-
return k(t) ? /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "", className: "h-8 w-14" }) : d.createElement("span", {
|
|
320
|
-
...e,
|
|
321
|
-
...s,
|
|
322
|
-
dangerouslySetInnerHTML: { __html: t }
|
|
323
|
-
});
|
|
324
|
-
};
|
|
325
|
-
u(Ie, {
|
|
326
|
-
type: "Icon",
|
|
327
|
-
label: "Icon",
|
|
328
|
-
category: "core",
|
|
329
|
-
icon: J,
|
|
330
|
-
group: "basic",
|
|
331
|
-
props: {
|
|
332
|
-
styles: c({ default: "text-black" }),
|
|
333
|
-
icon: P({
|
|
334
|
-
title: "Icon",
|
|
335
|
-
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
|
|
336
|
-
})
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
const Le = (l) => {
|
|
340
|
-
const { blockProps: e, image: t, styles: o, alt: s, height: r = 200, width: n = 200 } = l;
|
|
341
|
-
return k(t) ? /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "IMAGE URL", className: "h-36" }) : d.createElement("img", {
|
|
342
|
-
...e,
|
|
343
|
-
...o,
|
|
344
|
-
src: t,
|
|
345
|
-
alt: s,
|
|
346
|
-
height: r,
|
|
347
|
-
width: n
|
|
348
|
-
});
|
|
349
|
-
};
|
|
350
|
-
u(Le, {
|
|
351
|
-
type: "Image",
|
|
352
|
-
label: "Image",
|
|
353
|
-
category: "core",
|
|
354
|
-
icon: K,
|
|
355
|
-
group: "basic",
|
|
356
|
-
props: {
|
|
357
|
-
styles: c({ default: "" }),
|
|
358
|
-
image: E({
|
|
359
|
-
title: "Image",
|
|
360
|
-
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
|
|
361
|
-
}),
|
|
362
|
-
alt: f({ title: "Alt", default: "" }),
|
|
363
|
-
width: f({ title: "Width", default: "" }),
|
|
364
|
-
height: f({ title: "Height", default: "" })
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
const Te = (l) => {
|
|
368
|
-
var r;
|
|
369
|
-
const { blockProps: e, styles: t, children: o } = l;
|
|
370
|
-
let s = null;
|
|
371
|
-
return o || (s = // @ts-ignore
|
|
372
|
-
/* @__PURE__ */ a.jsx("div", { className: B("flex flex-col items-center justify-center", (r = l.emptyStyles) == null ? void 0 : r.className), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded-md border-4 border-dashed", children: /* @__PURE__ */ a.jsxs("p", { className: "truncate p-1 text-left text-xs text-gray-400", children: [
|
|
373
|
-
"Slot: ",
|
|
374
|
-
l.name
|
|
375
|
-
] }) }) })), d.createElement("div", { ...t, ...e, droppable: "yes" }, o || s);
|
|
376
|
-
};
|
|
377
|
-
u(Te, {
|
|
378
|
-
type: "Slot",
|
|
379
|
-
label: "Slot",
|
|
380
|
-
group: "basic",
|
|
381
|
-
category: "core",
|
|
382
|
-
hidden: !0,
|
|
383
|
-
props: {
|
|
384
|
-
styles: c({ default: "" }),
|
|
385
|
-
emptyStyles: c({ default: "" })
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, C = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, M = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, we = (l) => {
|
|
389
|
-
if (N.test(l)) {
|
|
390
|
-
const e = l.match(N);
|
|
391
|
-
return e ? `https://www.youtube.com/embed/${e[4]}` : l;
|
|
392
|
-
}
|
|
393
|
-
if (C.test(l)) {
|
|
394
|
-
const e = l.match(C);
|
|
395
|
-
return e ? `https://player.vimeo.com/video/${e[3]}` : l;
|
|
396
|
-
}
|
|
397
|
-
if (M.test(l)) {
|
|
398
|
-
const e = l.match(M);
|
|
399
|
-
return e ? `https://www.dailymotion.com/embed/video/${e[4]}` : l;
|
|
400
|
-
}
|
|
401
|
-
return null;
|
|
402
|
-
}, Be = d.memo(
|
|
403
|
-
(l) => {
|
|
404
|
-
const { blockProps: e, inBuilder: t, styles: o, url: s, controls: r } = l, n = T(r, "autoPlay", !1), i = T(r, "controls", !1), p = n || T(r, "muted", !0), m = T(r, "loop", !1);
|
|
405
|
-
if (k(s))
|
|
406
|
-
return /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "VIDEO URL", className: "h-36" });
|
|
407
|
-
let y = we(s), b = null;
|
|
408
|
-
if (y) {
|
|
409
|
-
if (!k(y)) {
|
|
410
|
-
const L = [];
|
|
411
|
-
L.push(`autoplay=${n ? 1 : 0}`), L.push(`controls=${r ? 1 : 0}`), L.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), L.push(`loop=${m ? 1 : 0}`), y = `${y}?${L.join("&")}`;
|
|
412
|
-
}
|
|
413
|
-
b = d.createElement("iframe", {
|
|
414
|
-
...e,
|
|
415
|
-
...o,
|
|
416
|
-
src: y,
|
|
417
|
-
allow: t ? "" : "autoplay *; fullscreen *",
|
|
418
|
-
allowFullScreen: !0,
|
|
419
|
-
frameBorder: 0
|
|
420
|
-
});
|
|
421
|
-
} else
|
|
422
|
-
b = d.createElement("video", {
|
|
423
|
-
...e,
|
|
424
|
-
...o,
|
|
425
|
-
src: s,
|
|
426
|
-
controls: i,
|
|
427
|
-
muted: p,
|
|
428
|
-
autoPlay: t ? !1 : n,
|
|
429
|
-
loop: m
|
|
430
|
-
});
|
|
431
|
-
return /* @__PURE__ */ a.jsxs("div", { className: "relative overflow-hidden w-full h-full", style: { paddingBottom: "56.25%" }, children: [
|
|
432
|
-
t ? /* @__PURE__ */ a.jsx("div", { ...e, ...o, className: "absolute h-full w-full z-20" }) : null,
|
|
433
|
-
b
|
|
434
|
-
] });
|
|
435
|
-
}
|
|
436
|
-
);
|
|
437
|
-
u(Be, {
|
|
438
|
-
type: "Video",
|
|
439
|
-
label: "Video",
|
|
440
|
-
category: "core",
|
|
441
|
-
icon: Q,
|
|
442
|
-
group: "basic",
|
|
443
|
-
props: {
|
|
444
|
-
styles: c({ default: "absolute top-0 left-0 w-full h-full" }),
|
|
445
|
-
url: f({
|
|
446
|
-
title: "Video URL",
|
|
447
|
-
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
|
|
448
|
-
}),
|
|
449
|
-
controls: D({
|
|
450
|
-
title: "Controls",
|
|
451
|
-
properties: {
|
|
452
|
-
autoPlay: h({ title: "Autoplay", default: !0 }),
|
|
453
|
-
controls: h({ title: "Show widgets", default: !1 }),
|
|
454
|
-
loop: h({ title: "Loop", default: !1 }),
|
|
455
|
-
muted: h({ title: "Muted", default: !0 })
|
|
456
|
-
}
|
|
457
|
-
})
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
const _e = d.memo(
|
|
461
|
-
(l) => {
|
|
462
|
-
const { blockProps: e, styles: t, content: o, inBuilder: s } = l;
|
|
463
|
-
return /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
|
|
464
|
-
s ? /* @__PURE__ */ a.jsx("div", { ...e, ...t, className: "absolute h-full w-full z-20" }) : null,
|
|
465
|
-
d.createElement("div", {
|
|
466
|
-
...t,
|
|
467
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
468
|
-
})
|
|
469
|
-
] });
|
|
470
|
-
}
|
|
471
|
-
);
|
|
472
|
-
u(_e, {
|
|
473
|
-
type: "CustomHTML",
|
|
474
|
-
label: "CustomHTML",
|
|
475
|
-
category: "core",
|
|
476
|
-
icon: ee,
|
|
477
|
-
group: "basic",
|
|
478
|
-
props: {
|
|
479
|
-
styles: c({ default: "" }),
|
|
480
|
-
content: I({
|
|
481
|
-
title: "HTML Content",
|
|
482
|
-
default: "<div><p>HTML Snippet goes here...</p></div>",
|
|
483
|
-
placeholder: "Enter custom HTML code here"
|
|
484
|
-
})
|
|
485
|
-
}
|
|
486
|
-
});
|
|
487
|
-
const Se = (l) => {
|
|
488
|
-
const { blockProps: e, styles: t } = l;
|
|
489
|
-
return d.createElement("hr", { ...t, ...e });
|
|
490
|
-
};
|
|
491
|
-
u(Se, {
|
|
492
|
-
type: "Divider",
|
|
493
|
-
label: "Divider",
|
|
494
|
-
category: "core",
|
|
495
|
-
icon: te,
|
|
496
|
-
group: "basic",
|
|
497
|
-
props: {
|
|
498
|
-
styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
const je = (l) => {
|
|
502
|
-
const { blockProps: e, styles: t } = l;
|
|
503
|
-
return d.createElement("br", { ...e, ...t });
|
|
504
|
-
};
|
|
505
|
-
u(je, {
|
|
506
|
-
type: "LineBreak",
|
|
507
|
-
label: "Line Break",
|
|
508
|
-
category: "core",
|
|
509
|
-
group: "basic",
|
|
510
|
-
hidden: !0,
|
|
511
|
-
icon: z,
|
|
512
|
-
props: {
|
|
513
|
-
styles: c({ default: "" })
|
|
514
|
-
}
|
|
515
|
-
});
|
|
516
|
-
const Ee = (l) => l.inBuilder ? /* @__PURE__ */ a.jsx("span", { className: "inline", ...l.blockProps, children: l.content }) : `${l.content}`;
|
|
517
|
-
u(Ee, {
|
|
518
|
-
type: "Text",
|
|
519
|
-
label: "Text",
|
|
520
|
-
hidden: !0,
|
|
521
|
-
category: "core",
|
|
522
|
-
group: "basic",
|
|
523
|
-
icon: z,
|
|
524
|
-
props: {
|
|
525
|
-
content: I({ title: "Content", defaultValue: "" })
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
const _ = (l) => {
|
|
529
|
-
const e = (r, n) => ({
|
|
530
|
-
_id: x(),
|
|
531
|
-
_parent: r,
|
|
532
|
-
_type: "TableCell",
|
|
533
|
-
styles: "#styles:,",
|
|
534
|
-
content: `${l === "TableHead" ? "Table Head" : "Table Cell " + n}`
|
|
535
|
-
}), t = (r) => {
|
|
536
|
-
const n = x(), i = {
|
|
537
|
-
_type: "TableRow",
|
|
538
|
-
_id: n,
|
|
539
|
-
styles: "#styles:,border-b"
|
|
540
|
-
};
|
|
541
|
-
return r && (i._parent = r), [i, e(n, "1"), e(n, "2"), e(n, "3")];
|
|
542
|
-
}, o = (r) => {
|
|
543
|
-
const n = x(), i = {
|
|
544
|
-
_id: n,
|
|
545
|
-
_type: "TableHead",
|
|
546
|
-
styles: "#styles:,font-medium"
|
|
547
|
-
};
|
|
548
|
-
return r && (i._parent = r), [i, ...t(n)];
|
|
549
|
-
}, s = (r) => {
|
|
550
|
-
const n = x(), i = {
|
|
551
|
-
_id: n,
|
|
552
|
-
_type: "TableBody",
|
|
553
|
-
styles: "#styles:,"
|
|
554
|
-
};
|
|
555
|
-
return r && (i._parent = r), [i, ...t(n), ...t(n)];
|
|
556
|
-
};
|
|
557
|
-
if (l === "Table") {
|
|
558
|
-
const r = x();
|
|
559
|
-
return [
|
|
560
|
-
{
|
|
561
|
-
_id: r,
|
|
562
|
-
_type: "Table",
|
|
563
|
-
styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
|
|
564
|
-
},
|
|
565
|
-
...o(r),
|
|
566
|
-
...s(r)
|
|
567
|
-
];
|
|
568
|
-
}
|
|
569
|
-
return l === "TableRow" ? t() : l === "TableHead" ? o() : l === "TableBody" ? s() : [];
|
|
570
|
-
}, Pe = (l) => {
|
|
571
|
-
const { blockProps: e, children: t, styles: o } = l;
|
|
572
|
-
return t ? d.createElement("table", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE HEAD / BODY" });
|
|
573
|
-
};
|
|
574
|
-
u(Pe, {
|
|
575
|
-
type: "Table",
|
|
576
|
-
label: "Table",
|
|
577
|
-
category: "core",
|
|
578
|
-
group: "table",
|
|
579
|
-
hidden: !0,
|
|
580
|
-
icon: le,
|
|
581
|
-
props: {
|
|
582
|
-
styles: c({ default: "" })
|
|
583
|
-
},
|
|
584
|
-
blocks: _("Table")
|
|
585
|
-
});
|
|
586
|
-
const Ne = (l) => {
|
|
587
|
-
const { blockProps: e, children: t, styles: o } = l;
|
|
588
|
-
return t ? d.createElement("thead", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE ROW" });
|
|
589
|
-
};
|
|
590
|
-
u(Ne, {
|
|
591
|
-
type: "TableHead",
|
|
592
|
-
label: "Table Head",
|
|
593
|
-
category: "core",
|
|
594
|
-
group: "table",
|
|
595
|
-
hidden: !0,
|
|
596
|
-
icon: oe,
|
|
597
|
-
props: {
|
|
598
|
-
styles: c({ default: "" })
|
|
599
|
-
},
|
|
600
|
-
blocks: _("TableHead")
|
|
601
|
-
});
|
|
602
|
-
const Ce = (l) => {
|
|
603
|
-
const { blockProps: e, children: t, styles: o } = l;
|
|
604
|
-
return t ? d.createElement("tbody", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE ROW" });
|
|
605
|
-
};
|
|
606
|
-
u(Ce, {
|
|
607
|
-
type: "TableBody",
|
|
608
|
-
label: "Table Body",
|
|
609
|
-
category: "core",
|
|
610
|
-
group: "table",
|
|
611
|
-
hidden: !0,
|
|
612
|
-
icon: re,
|
|
613
|
-
props: {
|
|
614
|
-
styles: c({ default: "" })
|
|
615
|
-
},
|
|
616
|
-
blocks: _("TableBody")
|
|
617
|
-
});
|
|
618
|
-
const Me = (l) => {
|
|
619
|
-
const { blockProps: e, children: t, styles: o } = l;
|
|
620
|
-
return t ? d.createElement("tr", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE CELL" });
|
|
621
|
-
};
|
|
622
|
-
u(Me, {
|
|
623
|
-
type: "TableRow",
|
|
624
|
-
label: "Table Row",
|
|
625
|
-
category: "core",
|
|
626
|
-
group: "table",
|
|
627
|
-
hidden: !0,
|
|
628
|
-
icon: se,
|
|
629
|
-
props: {
|
|
630
|
-
styles: c({ default: "w-full" })
|
|
631
|
-
},
|
|
632
|
-
blocks: _("TableRow")
|
|
633
|
-
});
|
|
634
|
-
const He = (l) => {
|
|
635
|
-
const { blockProps: e, children: t, content: o, styles: s } = l;
|
|
636
|
-
return !t && k(o) ? /* @__PURE__ */ a.jsx(g, { blockProps: e }) : t ? d.createElement("td", { ...e, ...s }, t) : d.createElement("td", {
|
|
637
|
-
...e,
|
|
638
|
-
...s,
|
|
639
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
640
|
-
});
|
|
641
|
-
};
|
|
642
|
-
u(He, {
|
|
643
|
-
type: "TableCell",
|
|
644
|
-
label: "Table Cell",
|
|
645
|
-
category: "core",
|
|
646
|
-
group: "table",
|
|
647
|
-
hidden: !0,
|
|
648
|
-
icon: ae,
|
|
649
|
-
props: {
|
|
650
|
-
styles: c({ default: "" }),
|
|
651
|
-
content: w({ title: "Content", default: "Table cell item" })
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
const Re = (l) => {
|
|
655
|
-
const { blockProps: e, errorMessage: t, name: o, _type: s, successMessage: r, action: n, styles: i, children: p } = l;
|
|
656
|
-
if (!p && k(i == null ? void 0 : i.className))
|
|
657
|
-
return /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "FORM FIELDS" });
|
|
658
|
-
const m = {
|
|
659
|
-
"x-data": "useForm",
|
|
660
|
-
"x-on:submit.prevent": "post"
|
|
661
|
-
}, y = {
|
|
662
|
-
"x-html": "formResponse",
|
|
663
|
-
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
664
|
-
};
|
|
665
|
-
return /* @__PURE__ */ a.jsxs(
|
|
666
|
-
"form",
|
|
667
|
-
{
|
|
668
|
-
...m,
|
|
669
|
-
"data-error": t,
|
|
670
|
-
"data-success": r,
|
|
671
|
-
method: "post",
|
|
672
|
-
action: n,
|
|
673
|
-
...e,
|
|
674
|
-
...i,
|
|
675
|
-
children: [
|
|
676
|
-
/* @__PURE__ */ a.jsx("div", { ...y }),
|
|
677
|
-
/* @__PURE__ */ a.jsx("input", { name: "formname", type: "hidden", value: o || s }),
|
|
678
|
-
p
|
|
679
|
-
]
|
|
680
|
-
}
|
|
681
|
-
);
|
|
682
|
-
};
|
|
683
|
-
u(Re, {
|
|
684
|
-
type: "Form",
|
|
685
|
-
label: "Form",
|
|
686
|
-
category: "core",
|
|
687
|
-
icon: ne,
|
|
688
|
-
group: "form",
|
|
689
|
-
hidden: !0,
|
|
690
|
-
props: {
|
|
691
|
-
styles: c({ default: "" }),
|
|
692
|
-
action: f({
|
|
693
|
-
title: "Submit URL",
|
|
694
|
-
default: "/api/form/submit"
|
|
695
|
-
}),
|
|
696
|
-
errorMessage: w({
|
|
697
|
-
title: "Error Message",
|
|
698
|
-
default: "Something went wrong. Please try again"
|
|
699
|
-
}),
|
|
700
|
-
successMessage: w({
|
|
701
|
-
title: "Success Message",
|
|
702
|
-
default: "Thank you for your submission."
|
|
703
|
-
})
|
|
704
|
-
}
|
|
705
|
-
});
|
|
706
|
-
const Fe = (l) => {
|
|
707
|
-
const { blockProps: e, content: t, styles: o, children: s } = l, r = { ...o, ...e };
|
|
708
|
-
return s ? d.createElement("label", r, s) : d.createElement("label", {
|
|
709
|
-
...r,
|
|
710
|
-
dangerouslySetInnerHTML: { __html: t }
|
|
711
|
-
});
|
|
712
|
-
};
|
|
713
|
-
u(Fe, {
|
|
714
|
-
type: "Label",
|
|
715
|
-
label: "Label",
|
|
716
|
-
category: "core",
|
|
717
|
-
icon: ie,
|
|
718
|
-
group: "form",
|
|
719
|
-
hidden: !0,
|
|
720
|
-
props: {
|
|
721
|
-
styles: c({ default: "" }),
|
|
722
|
-
content: f({ title: "Content", default: "Label" })
|
|
723
|
-
}
|
|
724
|
-
});
|
|
725
|
-
const ze = (l) => {
|
|
726
|
-
const {
|
|
727
|
-
blockProps: e,
|
|
728
|
-
label: t,
|
|
729
|
-
placeholder: o,
|
|
730
|
-
styles: s,
|
|
731
|
-
inputStyles: r,
|
|
732
|
-
showLabel: n,
|
|
733
|
-
required: i,
|
|
734
|
-
inputType: p = "text",
|
|
735
|
-
inBuilder: m,
|
|
736
|
-
fieldName: y
|
|
737
|
-
} = l, b = x();
|
|
738
|
-
return !n || p === "submit" ? (p === "submit" && (e.value = t), /* @__PURE__ */ a.jsx(
|
|
739
|
-
"input",
|
|
740
|
-
{
|
|
741
|
-
id: b,
|
|
742
|
-
name: y,
|
|
743
|
-
readOnly: m,
|
|
744
|
-
...e,
|
|
745
|
-
...r,
|
|
746
|
-
...s,
|
|
747
|
-
type: p,
|
|
748
|
-
placeholder: o,
|
|
749
|
-
required: i
|
|
750
|
-
}
|
|
751
|
-
)) : /* @__PURE__ */ a.jsxs("div", { ...s, ...e, children: [
|
|
752
|
-
n && /* @__PURE__ */ a.jsx("label", { htmlFor: b, children: t }),
|
|
753
|
-
/* @__PURE__ */ a.jsx(
|
|
754
|
-
"input",
|
|
755
|
-
{
|
|
756
|
-
name: y,
|
|
757
|
-
readOnly: m,
|
|
758
|
-
...r,
|
|
759
|
-
id: b,
|
|
760
|
-
type: p,
|
|
761
|
-
placeholder: o,
|
|
762
|
-
required: i
|
|
763
|
-
}
|
|
764
|
-
)
|
|
765
|
-
] });
|
|
766
|
-
};
|
|
767
|
-
u(ze, {
|
|
768
|
-
type: "Input",
|
|
769
|
-
label: "Input",
|
|
770
|
-
category: "core",
|
|
771
|
-
icon: A,
|
|
772
|
-
group: "form",
|
|
773
|
-
hidden: !0,
|
|
774
|
-
props: {
|
|
775
|
-
styles: c({ default: "" }),
|
|
776
|
-
fieldName: f({ title: "Field Name", default: "input" }),
|
|
777
|
-
inputType: v({
|
|
778
|
-
title: "Type",
|
|
779
|
-
options: j(
|
|
780
|
-
["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
|
|
781
|
-
(l) => ({
|
|
782
|
-
value: l,
|
|
783
|
-
title: l
|
|
784
|
-
})
|
|
785
|
-
),
|
|
786
|
-
default: "text"
|
|
787
|
-
}),
|
|
788
|
-
value: f({ title: "Value", default: "" }),
|
|
789
|
-
showLabel: h({ title: "Show label", default: !0 }),
|
|
790
|
-
inputStyles: c({ default: "w-full p-1" }),
|
|
791
|
-
label: f({ title: "Label", default: "Label" }),
|
|
792
|
-
placeholder: f({
|
|
793
|
-
title: "Placeholder",
|
|
794
|
-
default: "Placeholder"
|
|
795
|
-
}),
|
|
796
|
-
required: h({ title: "Required", default: !1 })
|
|
797
|
-
}
|
|
798
|
-
});
|
|
799
|
-
const Ae = (l) => {
|
|
800
|
-
const { blockProps: e, fieldName: t, label: o, placeholder: s, styles: r, inputStyles: n, _rows: i, showLabel: p } = l, m = x();
|
|
801
|
-
return p ? /* @__PURE__ */ a.jsxs("div", { ...r, ...e, children: [
|
|
802
|
-
p && /* @__PURE__ */ a.jsx("label", { htmlFor: m, children: o }),
|
|
803
|
-
/* @__PURE__ */ a.jsx("textarea", { name: t, ...n, id: m, placeholder: s, rows: i })
|
|
804
|
-
] }) : /* @__PURE__ */ a.jsx(
|
|
805
|
-
"textarea",
|
|
806
|
-
{
|
|
807
|
-
id: m,
|
|
808
|
-
name: t,
|
|
809
|
-
...e,
|
|
810
|
-
...n,
|
|
811
|
-
...r,
|
|
812
|
-
placeholder: s,
|
|
813
|
-
rows: i
|
|
814
|
-
}
|
|
815
|
-
);
|
|
816
|
-
};
|
|
817
|
-
u(Ae, {
|
|
818
|
-
type: "TextArea",
|
|
819
|
-
label: "TextArea",
|
|
820
|
-
category: "core",
|
|
821
|
-
icon: A,
|
|
822
|
-
group: "form",
|
|
823
|
-
hidden: !0,
|
|
824
|
-
props: {
|
|
825
|
-
fieldName: f({ title: "Field Name", default: "textarea" }),
|
|
826
|
-
showLabel: h({ title: "Show label", default: !0 }),
|
|
827
|
-
styles: c({ default: "" }),
|
|
828
|
-
inputStyles: c({ default: "w-full p-1" }),
|
|
829
|
-
label: f({ title: "Label", default: "Label" }),
|
|
830
|
-
placeholder: f({
|
|
831
|
-
title: "Placeholder",
|
|
832
|
-
default: "Placeholder"
|
|
833
|
-
}),
|
|
834
|
-
_rows: R({ title: "Rows", default: 3 })
|
|
835
|
-
}
|
|
836
|
-
});
|
|
837
|
-
const De = (l) => {
|
|
838
|
-
const {
|
|
839
|
-
blockProps: e,
|
|
840
|
-
fieldName: t,
|
|
841
|
-
label: o,
|
|
842
|
-
placeholder: s,
|
|
843
|
-
styles: r,
|
|
844
|
-
inputStyles: n,
|
|
845
|
-
required: i,
|
|
846
|
-
showLabel: p,
|
|
847
|
-
_multiple: m = !1
|
|
848
|
-
} = l, y = x();
|
|
849
|
-
return p ? /* @__PURE__ */ a.jsxs("div", { ...r, children: [
|
|
850
|
-
p && /* @__PURE__ */ a.jsx("label", { htmlFor: y, children: o }),
|
|
851
|
-
/* @__PURE__ */ a.jsxs(
|
|
852
|
-
"select",
|
|
853
|
-
{
|
|
854
|
-
...n,
|
|
855
|
-
id: y,
|
|
856
|
-
placeholder: s,
|
|
857
|
-
required: i,
|
|
858
|
-
multiple: m,
|
|
859
|
-
name: t,
|
|
860
|
-
children: [
|
|
861
|
-
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
|
|
862
|
-
j(l.options, (b) => /* @__PURE__ */ a.jsx(
|
|
863
|
-
"option",
|
|
864
|
-
{
|
|
865
|
-
selected: S(b, "selected", !1),
|
|
866
|
-
value: b.value,
|
|
867
|
-
dangerouslySetInnerHTML: { __html: b.label }
|
|
868
|
-
},
|
|
869
|
-
b.value
|
|
870
|
-
))
|
|
871
|
-
]
|
|
872
|
-
}
|
|
873
|
-
)
|
|
874
|
-
] }) : /* @__PURE__ */ a.jsxs(
|
|
875
|
-
"select",
|
|
876
|
-
{
|
|
877
|
-
id: y,
|
|
878
|
-
...r,
|
|
879
|
-
...e,
|
|
880
|
-
placeholder: s,
|
|
881
|
-
required: i,
|
|
882
|
-
multiple: m,
|
|
883
|
-
name: t,
|
|
884
|
-
children: [
|
|
885
|
-
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
|
|
886
|
-
j(l.options, (b) => /* @__PURE__ */ a.jsx(
|
|
887
|
-
"option",
|
|
888
|
-
{
|
|
889
|
-
selected: S(b, "selected", !1),
|
|
890
|
-
value: b.value,
|
|
891
|
-
dangerouslySetInnerHTML: { __html: b.label }
|
|
892
|
-
},
|
|
893
|
-
b.value
|
|
894
|
-
))
|
|
895
|
-
]
|
|
896
|
-
}
|
|
897
|
-
);
|
|
898
|
-
};
|
|
899
|
-
u(De, {
|
|
900
|
-
type: "Select",
|
|
901
|
-
label: "Select",
|
|
902
|
-
category: "core",
|
|
903
|
-
icon: ce,
|
|
904
|
-
group: "form",
|
|
905
|
-
hidden: !0,
|
|
906
|
-
props: {
|
|
907
|
-
styles: c({ default: "" }),
|
|
908
|
-
fieldName: f({ title: "Field Name", default: "select" }),
|
|
909
|
-
showLabel: h({ title: "Show label", default: !0 }),
|
|
910
|
-
inputStyles: c({ default: "w-full p-1" }),
|
|
911
|
-
label: f({ title: "Label", default: "Label" }),
|
|
912
|
-
placeholder: f({
|
|
913
|
-
title: "Placeholder",
|
|
914
|
-
default: "Placeholder"
|
|
915
|
-
}),
|
|
916
|
-
required: h({ title: "Required", default: !1 }),
|
|
917
|
-
_multiple: h({ title: "Multiple Choice", default: !1 }),
|
|
918
|
-
options: q({
|
|
919
|
-
title: "Options",
|
|
920
|
-
itemProperties: {
|
|
921
|
-
label: f({ title: "Label", default: "" }),
|
|
922
|
-
value: f({ title: "Value", default: "" })
|
|
923
|
-
}
|
|
924
|
-
})
|
|
925
|
-
}
|
|
926
|
-
});
|
|
927
|
-
const qe = (l) => {
|
|
928
|
-
const { blockProps: e, fieldName: t, label: o, styles: s, inputStyles: r, required: n, checked: i, showLabel: p = !0 } = l, m = x();
|
|
929
|
-
return p ? /* @__PURE__ */ a.jsxs("div", { ...s, ...e, children: [
|
|
930
|
-
/* @__PURE__ */ a.jsx(
|
|
931
|
-
"input",
|
|
932
|
-
{
|
|
933
|
-
...r,
|
|
934
|
-
name: t,
|
|
935
|
-
id: m,
|
|
936
|
-
type: "checkbox",
|
|
937
|
-
required: n,
|
|
938
|
-
defaultChecked: i
|
|
939
|
-
}
|
|
940
|
-
),
|
|
941
|
-
o && o !== "Label" && /* @__PURE__ */ a.jsx("label", { htmlFor: m, children: o })
|
|
942
|
-
] }) : /* @__PURE__ */ a.jsx(
|
|
943
|
-
"input",
|
|
944
|
-
{
|
|
945
|
-
id: m,
|
|
946
|
-
...e,
|
|
947
|
-
...r,
|
|
948
|
-
...s,
|
|
949
|
-
type: "checkbox",
|
|
950
|
-
required: n,
|
|
951
|
-
name: t
|
|
952
|
-
}
|
|
953
|
-
);
|
|
954
|
-
};
|
|
955
|
-
u(qe, {
|
|
956
|
-
type: "Checkbox",
|
|
957
|
-
label: "Checkbox",
|
|
958
|
-
category: "core",
|
|
959
|
-
icon: de,
|
|
960
|
-
group: "form",
|
|
961
|
-
hidden: !0,
|
|
962
|
-
props: {
|
|
963
|
-
fieldName: f({ title: "Field Name", default: "checkbox" }),
|
|
964
|
-
styles: c({ default: "flex items-center gap-x-2" }),
|
|
965
|
-
label: f({ title: "Label", default: "Label" }),
|
|
966
|
-
checked: h({ title: "Checked", default: !1 }),
|
|
967
|
-
required: h({ title: "Required", default: !1 })
|
|
968
|
-
}
|
|
969
|
-
});
|
|
970
|
-
const $e = (l) => {
|
|
971
|
-
const { blockProps: e, fieldName: t, label: o, styles: s, inputStyles: r, checked: n, required: i, showLabel: p = !0 } = l, m = x();
|
|
972
|
-
return p ? /* @__PURE__ */ a.jsxs("div", { ...s, ...e, children: [
|
|
973
|
-
/* @__PURE__ */ a.jsx("input", { ...r, name: t, id: m, type: "radio", required: i, defaultChecked: n }),
|
|
974
|
-
o && /* @__PURE__ */ a.jsx("label", { htmlFor: m, children: o })
|
|
975
|
-
] }) : /* @__PURE__ */ a.jsx(
|
|
976
|
-
"input",
|
|
977
|
-
{
|
|
978
|
-
id: m,
|
|
979
|
-
...e,
|
|
980
|
-
...r,
|
|
981
|
-
...s,
|
|
982
|
-
type: "radio",
|
|
983
|
-
required: i,
|
|
984
|
-
checked: n,
|
|
985
|
-
name: t
|
|
986
|
-
}
|
|
987
|
-
);
|
|
988
|
-
};
|
|
989
|
-
u($e, {
|
|
990
|
-
type: "Radio",
|
|
991
|
-
label: "Radio",
|
|
992
|
-
category: "core",
|
|
993
|
-
icon: ue,
|
|
994
|
-
group: "form",
|
|
995
|
-
hidden: !0,
|
|
996
|
-
props: {
|
|
997
|
-
styles: c({ default: "flex items-center w-max gap-x-2" }),
|
|
998
|
-
fieldName: f({ title: "Field Name", default: "radio" }),
|
|
999
|
-
label: f({ title: "Label", default: "Label" }),
|
|
1000
|
-
checked: h({ title: "Checked", default: !1 }),
|
|
1001
|
-
required: h({ title: "Required", default: !1 })
|
|
1002
|
-
}
|
|
1003
|
-
});
|
|
1004
|
-
const Oe = (l) => {
|
|
1005
|
-
const { blockProps: e, inBuilder: t, label: o, placeholder: s, styles: r, inputStyles: n, icon: i, iconPos: p } = l, m = x(), y = {
|
|
1006
|
-
"x-bind:disabled": "formLoading"
|
|
1007
|
-
};
|
|
1008
|
-
return /* @__PURE__ */ a.jsxs(
|
|
1009
|
-
"button",
|
|
1010
|
-
{
|
|
1011
|
-
id: m,
|
|
1012
|
-
...y,
|
|
1013
|
-
...n,
|
|
1014
|
-
...r,
|
|
1015
|
-
...e || {},
|
|
1016
|
-
type: t ? "button" : "submit",
|
|
1017
|
-
placeholder: s,
|
|
1018
|
-
children: [
|
|
1019
|
-
o,
|
|
1020
|
-
i && /* @__PURE__ */ a.jsx("span", { className: p, dangerouslySetInnerHTML: { __html: i } })
|
|
1021
|
-
]
|
|
1022
|
-
}
|
|
1023
|
-
);
|
|
1024
|
-
};
|
|
1025
|
-
u(Oe, {
|
|
1026
|
-
type: "FormButton",
|
|
1027
|
-
label: "Submit Button",
|
|
1028
|
-
category: "core",
|
|
1029
|
-
icon: F,
|
|
1030
|
-
group: "form",
|
|
1031
|
-
hidden: !0,
|
|
1032
|
-
props: {
|
|
1033
|
-
label: f({ title: "Label", default: "Submit" }),
|
|
1034
|
-
styles: c({
|
|
1035
|
-
default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
1036
|
-
}),
|
|
1037
|
-
icon: P({ title: "Icon", default: "" }),
|
|
1038
|
-
iconPos: v({
|
|
1039
|
-
title: "Icon Position",
|
|
1040
|
-
default: "order-last",
|
|
1041
|
-
options: [
|
|
1042
|
-
{ title: "Start", value: "order-first" },
|
|
1043
|
-
{ title: "End", value: "order-last" }
|
|
1044
|
-
]
|
|
1045
|
-
})
|
|
1046
|
-
}
|
|
1047
|
-
});
|
|
1048
|
-
const et = V;
|
|
1
|
+
import { noop as o } from "lodash-es";
|
|
2
|
+
const r = o;
|
|
1049
3
|
export {
|
|
1050
|
-
|
|
4
|
+
r as loadWebBlocks
|
|
1051
5
|
};
|