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