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