@chaibuilder/sdk 1.2.8 → 1.2.9
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/{CanvasArea-EfZgx-gN.js → CanvasArea-mlNKmCOh.js} +1 -1
- package/dist/{CanvasArea-rIDwPHl5.cjs → CanvasArea-xs4wM64L.cjs} +1 -1
- package/dist/{CurrentPage-QNFPD078.cjs → CurrentPage-aaU4F7wi.cjs} +1 -1
- package/dist/{CurrentPage-ulHTz4MD.js → CurrentPage-lBy25sZn.js} +1 -1
- package/dist/{Layers-rehZkz78.js → Layers-3Xs4A5i8.js} +1 -1
- package/dist/{Layers-v-7k3W2I.cjs → Layers-eaHy5PK9.cjs} +1 -1
- package/dist/{PagesPanel-acGVGJf-.js → PagesPanel--BZhafnt.js} +2 -2
- package/dist/{PagesPanel-x5ms_LOD.cjs → PagesPanel-gGKCV394.cjs} +1 -1
- package/dist/{ProjectPanel-aLFJq49M.js → ProjectPanel-YcLkM-DW.js} +2 -2
- package/dist/{ProjectPanel-5BHQ5ANP.cjs → ProjectPanel-yFJRy0_E.cjs} +1 -1
- package/dist/Settings-7wlLcvoh.cjs +1 -0
- package/dist/{Settings-v-txwlII.js → Settings-TAgX4hov.js} +8 -15
- package/dist/{SidePanels-t0g9ZQFT.cjs → SidePanels-5H4j0mIs.cjs} +1 -1
- package/dist/{SidePanels-Vdc-J5wK.js → SidePanels-btVQQkVK.js} +2 -2
- package/dist/{add-page-modal-0YAI9dXr.cjs → add-page-modal-MwS7iXn_.cjs} +1 -1
- package/dist/{add-page-modal-6DlGzdA4.js → add-page-modal-cm8damU2.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-qXpi_2xR.cjs → delete-page-modal-5o4jXu-z.cjs} +1 -1
- package/dist/{delete-page-modal-T_rlQfNd.js → delete-page-modal-YrIBvfFA.js} +1 -1
- package/dist/{index-jw8RxsTv.cjs → index-N50dZnlC.cjs} +1 -1
- package/dist/{index-EGUphg4R.js → index-pZhGT8uT.js} +2 -2
- package/dist/{page-viewer-Ou8vDXGV.cjs → page-viewer-SLt8XgYv.cjs} +1 -1
- package/dist/{page-viewer-EoYYnA56.js → page-viewer-feqJr1QI.js} +2 -2
- package/dist/{project-general-setting-DC_nADG-.js → project-general-setting-SgagORzW.js} +1 -1
- package/dist/{project-general-setting-92q4oEYv.cjs → project-general-setting-ym0yCdOq.cjs} +1 -1
- package/dist/{single-page-detail-QmmhR_h2.cjs → single-page-detail-IPod1o5P.cjs} +1 -1
- package/dist/{single-page-detail-xtNZ9YxX.js → single-page-detail-dnWMyg6P.js} +2 -2
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +250 -243
- package/package.json +1 -1
- package/dist/Settings-iOjfw5NQ.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { omit as
|
|
1
|
+
import { omit as F, isEmpty as k, isNull as z, get as v, map as _, noop as D } from "lodash-es";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import { S as c, o as j, f as I, g as L, m as
|
|
3
|
+
import { S as c, o as j, f as I, g as L, m as T, u as f, T as E, c as M, q, b as $, r as h, h as O } from "./controls-XPXGHKht.js";
|
|
4
4
|
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
5
|
-
import { j as
|
|
6
|
-
import { c as
|
|
7
|
-
import { HeadingIcon as V, TextIcon as U, CursorTextIcon as W, ButtonIcon as
|
|
5
|
+
import { j as s } from "./jsx-runtime-WbnYoNE9.js";
|
|
6
|
+
import { c as w, g as x } from "./Functions-7jnEwJyw.js";
|
|
7
|
+
import { HeadingIcon as V, TextIcon as U, CursorTextIcon as W, ButtonIcon as H, 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 R, TableIcon as te, BorderTopIcon as le, BorderAllIcon as oe, ViewHorizontalIcon as re, DragHandleHorizontalIcon as ae, GroupIcon as se, LetterCaseToggleIcon as ne, InputIcon as A, DropdownMenuIcon as ie, CheckboxIcon as ce, RadiobuttonIcon as de } from "@radix-ui/react-icons";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
9
|
import "clsx";
|
|
10
10
|
import "tailwind-merge";
|
|
11
|
-
const ue = (
|
|
12
|
-
const { blockProps: e, backgroundImage:
|
|
11
|
+
const ue = (t) => {
|
|
12
|
+
const { blockProps: e, backgroundImage: l, children: o, styles: a } = t;
|
|
13
13
|
let r = {};
|
|
14
|
-
return
|
|
14
|
+
return l && (r = { backgroundImage: `url(${l})` }), d.createElement("div", { ...e, ...a, style: r }, o);
|
|
15
15
|
};
|
|
16
16
|
u(ue, {
|
|
17
17
|
type: "Body",
|
|
@@ -24,21 +24,21 @@ u(ue, {
|
|
|
24
24
|
backgroundImage: j({ title: "Background Image" })
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
const g = ({ blockProps:
|
|
27
|
+
const g = ({ blockProps: t, className: e = "", styles: l = {} }) => /* @__PURE__ */ s.jsx(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
|
-
...
|
|
31
|
-
className:
|
|
32
|
-
...
|
|
33
|
-
children: /* @__PURE__ */
|
|
30
|
+
...t,
|
|
31
|
+
className: w("flex h-20 flex-col items-center justify-center", e),
|
|
32
|
+
...F(l, ["className"]),
|
|
33
|
+
children: /* @__PURE__ */ s.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__ */ s.jsx("span", { className: "opacit flex items-center gap-x-1.5 text-xs font-semibold text-gray-400" }) })
|
|
34
34
|
}
|
|
35
35
|
), pe = d.memo(
|
|
36
|
-
(
|
|
37
|
-
const { blockProps: e, backgroundImage:
|
|
36
|
+
(t) => {
|
|
37
|
+
const { blockProps: e, backgroundImage: l, children: o, tag: a = "div", styles: r } = t;
|
|
38
38
|
if (!o && k(r == null ? void 0 : r.className))
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ s.jsx(g, { blockProps: e, styles: r });
|
|
40
40
|
let n = {};
|
|
41
|
-
return
|
|
41
|
+
return l && (n = { backgroundImage: `url(${l})` }), d.createElement(a, { ...e, ...r, style: n }, o);
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
44
|
u(pe, {
|
|
@@ -72,12 +72,13 @@ u(pe, {
|
|
|
72
72
|
]
|
|
73
73
|
}),
|
|
74
74
|
backgroundImage: j({ title: "Background Image" })
|
|
75
|
-
}
|
|
75
|
+
},
|
|
76
|
+
canAcceptBlock: () => !0
|
|
76
77
|
});
|
|
77
|
-
const me = (
|
|
78
|
-
const { blockProps: e, styles:
|
|
79
|
-
return r ? d.createElement(
|
|
80
|
-
...
|
|
78
|
+
const me = (t) => {
|
|
79
|
+
const { blockProps: e, styles: l, content: o, level: a = "h1", children: r = null } = t;
|
|
80
|
+
return r ? d.createElement(a, { ...l, ...e }, r) : d.createElement(a, {
|
|
81
|
+
...l,
|
|
81
82
|
...e,
|
|
82
83
|
dangerouslySetInnerHTML: { __html: o }
|
|
83
84
|
});
|
|
@@ -104,15 +105,16 @@ u(me, {
|
|
|
104
105
|
}),
|
|
105
106
|
styles: c({ default: "text-3xl" }),
|
|
106
107
|
content: L({ title: "Content", default: "Heading goes here" })
|
|
107
|
-
}
|
|
108
|
+
},
|
|
109
|
+
canAcceptBlock: (t) => t === "Span" || t === "Text"
|
|
108
110
|
});
|
|
109
|
-
const fe = (
|
|
110
|
-
const { blockProps: e, styles:
|
|
111
|
-
return
|
|
112
|
-
...
|
|
111
|
+
const fe = (t) => {
|
|
112
|
+
const { blockProps: e, styles: l, content: o } = t;
|
|
113
|
+
return z(t.children) ? d.createElement("div", {
|
|
114
|
+
...l,
|
|
113
115
|
...e,
|
|
114
116
|
dangerouslySetInnerHTML: { __html: o }
|
|
115
|
-
}) : d.createElement("p", { ...
|
|
117
|
+
}) : d.createElement("p", { ...l, ...e }, t.children);
|
|
116
118
|
};
|
|
117
119
|
u(fe, {
|
|
118
120
|
type: "Paragraph",
|
|
@@ -126,12 +128,13 @@ u(fe, {
|
|
|
126
128
|
title: "Content",
|
|
127
129
|
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
130
|
})
|
|
129
|
-
}
|
|
131
|
+
},
|
|
132
|
+
canAcceptBlock: (t) => t === "Span" || t === "Link"
|
|
130
133
|
});
|
|
131
|
-
const be = (
|
|
132
|
-
const { blockProps: e, styles:
|
|
133
|
-
return
|
|
134
|
-
...
|
|
134
|
+
const be = (t) => {
|
|
135
|
+
const { blockProps: e, styles: l, content: o, children: a = null, tag: r } = t;
|
|
136
|
+
return a ? d.createElement("span", { ...l, ...e }, a) : d.createElement(r || "span", {
|
|
137
|
+
...l,
|
|
135
138
|
...e,
|
|
136
139
|
dangerouslySetInnerHTML: { __html: o }
|
|
137
140
|
});
|
|
@@ -146,9 +149,9 @@ u(be, {
|
|
|
146
149
|
content: L({ title: "Content", default: "Enter your content" })
|
|
147
150
|
}
|
|
148
151
|
});
|
|
149
|
-
const ye = (
|
|
150
|
-
const { blockProps: e, content:
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
+
const ye = (t) => {
|
|
153
|
+
const { blockProps: e, content: l, styles: o } = t;
|
|
154
|
+
return /* @__PURE__ */ s.jsx("div", { className: "prose max-w-full", children: /* @__PURE__ */ s.jsx("div", { ...e, ...o, dangerouslySetInnerHTML: { __html: l } }) });
|
|
152
155
|
};
|
|
153
156
|
u(ye, {
|
|
154
157
|
type: "RichText",
|
|
@@ -158,7 +161,7 @@ u(ye, {
|
|
|
158
161
|
group: "basic",
|
|
159
162
|
props: {
|
|
160
163
|
styles: c({ default: "" }),
|
|
161
|
-
content:
|
|
164
|
+
content: T({
|
|
162
165
|
title: "Content",
|
|
163
166
|
default: `Lorem Ipsum Rich Text Editor Demo
|
|
164
167
|
|
|
@@ -172,14 +175,14 @@ Utilize nested lists for organization.`
|
|
|
172
175
|
})
|
|
173
176
|
}
|
|
174
177
|
});
|
|
175
|
-
const he = (
|
|
176
|
-
const { blockProps: e, iconSize:
|
|
177
|
-
|
|
178
|
-
p && /* @__PURE__ */
|
|
178
|
+
const he = (t) => {
|
|
179
|
+
const { blockProps: e, iconSize: l, icon: o, content: a, iconPos: r, styles: n, children: i } = t, p = o, m = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
180
|
+
a,
|
|
181
|
+
p && /* @__PURE__ */ s.jsx(
|
|
179
182
|
"div",
|
|
180
183
|
{
|
|
181
|
-
style: { width:
|
|
182
|
-
className: r + (r === "order-first" ? "
|
|
184
|
+
style: { width: l + "px" },
|
|
185
|
+
className: r + (r === "order-first" ? "mr-2" : "ml-2") || "",
|
|
183
186
|
dangerouslySetInnerHTML: { __html: p }
|
|
184
187
|
}
|
|
185
188
|
)
|
|
@@ -190,14 +193,13 @@ u(he, {
|
|
|
190
193
|
type: "Button",
|
|
191
194
|
label: "Button",
|
|
192
195
|
category: "core",
|
|
193
|
-
icon:
|
|
196
|
+
icon: H,
|
|
194
197
|
group: "basic",
|
|
195
198
|
props: {
|
|
196
199
|
content: f({ title: "Label", default: "Button", multiLingual: !0 }),
|
|
197
200
|
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
201
|
icon: E({ title: "Icon", default: "" }),
|
|
200
|
-
iconSize:
|
|
202
|
+
iconSize: M({ title: "Icon Size", default: 24 }),
|
|
201
203
|
iconPos: I({
|
|
202
204
|
title: "Icon Position",
|
|
203
205
|
default: "order-last",
|
|
@@ -208,20 +210,20 @@ u(he, {
|
|
|
208
210
|
})
|
|
209
211
|
}
|
|
210
212
|
});
|
|
211
|
-
const ge = (
|
|
212
|
-
const { blockProps: e, link:
|
|
213
|
-
return !o && k(
|
|
213
|
+
const ge = (t) => {
|
|
214
|
+
const { blockProps: e, link: l, children: o, styles: a, inBuilder: r, content: n } = t;
|
|
215
|
+
return !o && k(a == null ? void 0 : a.className) && k(n) ? /* @__PURE__ */ s.jsx(g, { blockProps: e }) : r ? o ? /* @__PURE__ */ s.jsx("span", { "data-simulate": "a", ...e, ...a, children: o }) : d.createElement("span", {
|
|
214
216
|
...e,
|
|
215
|
-
...
|
|
216
|
-
href:
|
|
217
|
-
target:
|
|
217
|
+
...a,
|
|
218
|
+
href: l.href || "#",
|
|
219
|
+
target: l.target || "_self",
|
|
218
220
|
dangerouslySetInnerHTML: { __html: n },
|
|
219
221
|
"data-simulate": "a"
|
|
220
|
-
}) : o ? /* @__PURE__ */
|
|
222
|
+
}) : o ? /* @__PURE__ */ s.jsx("a", { href: l.href || "#/", target: l.target, ...e, ...a, children: o }) : d.createElement("a", {
|
|
221
223
|
...e,
|
|
222
|
-
...
|
|
223
|
-
href:
|
|
224
|
-
target:
|
|
224
|
+
...a,
|
|
225
|
+
href: l.href || "#",
|
|
226
|
+
target: l.target || "_self",
|
|
225
227
|
dangerouslySetInnerHTML: { __html: n }
|
|
226
228
|
});
|
|
227
229
|
};
|
|
@@ -234,18 +236,19 @@ u(ge, {
|
|
|
234
236
|
props: {
|
|
235
237
|
styles: c({ default: "" }),
|
|
236
238
|
content: f({ title: "Content", default: "" }),
|
|
237
|
-
link:
|
|
239
|
+
link: q({
|
|
238
240
|
title: "Link",
|
|
239
241
|
default: { type: "page", target: "_self", href: "" }
|
|
240
242
|
})
|
|
241
|
-
}
|
|
243
|
+
},
|
|
244
|
+
canAcceptBlock: () => !0
|
|
242
245
|
});
|
|
243
|
-
const xe = (
|
|
244
|
-
const { blockProps: e, children:
|
|
245
|
-
return !
|
|
246
|
+
const xe = (t) => {
|
|
247
|
+
const { blockProps: e, children: l, listType: o, styles: a, tag: r } = t, n = w(v(a, "className", ""), o);
|
|
248
|
+
return !l && k(a == null ? void 0 : a.className) ? /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "LIST ITEM" }) : d.createElement(
|
|
246
249
|
r || (o === "list-decimal" ? "ol" : "ul"),
|
|
247
|
-
{ ...e, ...
|
|
248
|
-
|
|
250
|
+
{ ...e, ...a, className: n },
|
|
251
|
+
l
|
|
249
252
|
);
|
|
250
253
|
};
|
|
251
254
|
u(xe, {
|
|
@@ -266,6 +269,7 @@ u(xe, {
|
|
|
266
269
|
]
|
|
267
270
|
})
|
|
268
271
|
},
|
|
272
|
+
canAcceptBlock: (t) => t === "ListItem",
|
|
269
273
|
blocks: [
|
|
270
274
|
{ _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
|
|
271
275
|
{
|
|
@@ -291,12 +295,12 @@ u(xe, {
|
|
|
291
295
|
}
|
|
292
296
|
]
|
|
293
297
|
});
|
|
294
|
-
const ke = (
|
|
295
|
-
const { blockProps: e, content:
|
|
296
|
-
return
|
|
298
|
+
const ke = (t) => {
|
|
299
|
+
const { blockProps: e, content: l, styles: o, children: a, tag: r } = t;
|
|
300
|
+
return a ? d.createElement(r || "li", { ...o, ...e }, a) : d.createElement(r || "li", {
|
|
297
301
|
...o,
|
|
298
302
|
...e,
|
|
299
|
-
dangerouslySetInnerHTML: { __html:
|
|
303
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
300
304
|
});
|
|
301
305
|
};
|
|
302
306
|
u(ke, {
|
|
@@ -308,17 +312,18 @@ u(ke, {
|
|
|
308
312
|
props: {
|
|
309
313
|
styles: c({ default: "" }),
|
|
310
314
|
content: L({ title: "Content", default: "List item" })
|
|
311
|
-
}
|
|
315
|
+
},
|
|
316
|
+
canAcceptBlock: () => !0
|
|
312
317
|
});
|
|
313
|
-
const ve = (
|
|
314
|
-
const { blockProps: e, icon:
|
|
318
|
+
const ve = (t) => {
|
|
319
|
+
const { blockProps: e, icon: l, styles: o } = t, a = {
|
|
315
320
|
...o,
|
|
316
|
-
className:
|
|
321
|
+
className: w(o.className, "inline-block c-inline-block")
|
|
317
322
|
};
|
|
318
|
-
return k(
|
|
323
|
+
return k(l) ? /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "", className: "h-8 w-14" }) : d.createElement("span", {
|
|
319
324
|
...e,
|
|
320
|
-
...
|
|
321
|
-
dangerouslySetInnerHTML: { __html:
|
|
325
|
+
...a,
|
|
326
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
322
327
|
});
|
|
323
328
|
};
|
|
324
329
|
u(ve, {
|
|
@@ -335,13 +340,13 @@ u(ve, {
|
|
|
335
340
|
})
|
|
336
341
|
}
|
|
337
342
|
});
|
|
338
|
-
const Ie = (
|
|
339
|
-
const { blockProps: e, image:
|
|
340
|
-
return k(
|
|
343
|
+
const Ie = (t) => {
|
|
344
|
+
const { blockProps: e, image: l, styles: o, alt: a, height: r = 200, width: n = 200 } = t;
|
|
345
|
+
return k(l) ? /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "IMAGE URL", className: "h-36" }) : d.createElement("img", {
|
|
341
346
|
...e,
|
|
342
347
|
...o,
|
|
343
|
-
src:
|
|
344
|
-
alt:
|
|
348
|
+
src: l,
|
|
349
|
+
alt: a,
|
|
345
350
|
height: r,
|
|
346
351
|
width: n
|
|
347
352
|
});
|
|
@@ -363,15 +368,15 @@ u(Ie, {
|
|
|
363
368
|
height: f({ title: "Height", default: "" })
|
|
364
369
|
}
|
|
365
370
|
});
|
|
366
|
-
const Le = (
|
|
371
|
+
const Le = (t) => {
|
|
367
372
|
var r;
|
|
368
|
-
const { blockProps: e, styles:
|
|
369
|
-
let
|
|
370
|
-
return o || (
|
|
371
|
-
/* @__PURE__ */
|
|
373
|
+
const { blockProps: e, styles: l, children: o } = t;
|
|
374
|
+
let a = null;
|
|
375
|
+
return o || (a = // @ts-ignore
|
|
376
|
+
/* @__PURE__ */ s.jsx("div", { className: w("flex flex-col items-center justify-center", (r = t.emptyStyles) == null ? void 0 : r.className), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded-md border-4 border-dashed", children: /* @__PURE__ */ s.jsxs("p", { className: "truncate p-1 text-left text-xs text-gray-400", children: [
|
|
372
377
|
"Slot: ",
|
|
373
|
-
|
|
374
|
-
] }) }) })), d.createElement("div", { ...
|
|
378
|
+
t.name
|
|
379
|
+
] }) }) })), d.createElement("div", { ...l, ...e, droppable: "yes" }, o || a);
|
|
375
380
|
};
|
|
376
381
|
u(Le, {
|
|
377
382
|
type: "Slot",
|
|
@@ -382,38 +387,39 @@ u(Le, {
|
|
|
382
387
|
props: {
|
|
383
388
|
styles: c({ default: "" }),
|
|
384
389
|
emptyStyles: c({ default: "" })
|
|
385
|
-
}
|
|
390
|
+
},
|
|
391
|
+
canAcceptBlock: () => !0
|
|
386
392
|
});
|
|
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_-]+)/,
|
|
388
|
-
if (P.test(
|
|
389
|
-
const e =
|
|
390
|
-
return e ? `https://www.youtube.com/embed/${e[4]}` :
|
|
393
|
+
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_-]+)/, Be = (t) => {
|
|
394
|
+
if (P.test(t)) {
|
|
395
|
+
const e = t.match(P);
|
|
396
|
+
return e ? `https://www.youtube.com/embed/${e[4]}` : t;
|
|
391
397
|
}
|
|
392
|
-
if (N.test(
|
|
393
|
-
const e =
|
|
394
|
-
return e ? `https://player.vimeo.com/video/${e[3]}` :
|
|
398
|
+
if (N.test(t)) {
|
|
399
|
+
const e = t.match(N);
|
|
400
|
+
return e ? `https://player.vimeo.com/video/${e[3]}` : t;
|
|
395
401
|
}
|
|
396
|
-
if (C.test(
|
|
397
|
-
const e =
|
|
398
|
-
return e ? `https://www.dailymotion.com/embed/video/${e[4]}` :
|
|
402
|
+
if (C.test(t)) {
|
|
403
|
+
const e = t.match(C);
|
|
404
|
+
return e ? `https://www.dailymotion.com/embed/video/${e[4]}` : t;
|
|
399
405
|
}
|
|
400
406
|
return null;
|
|
401
|
-
},
|
|
402
|
-
(
|
|
403
|
-
const { blockProps: e, inBuilder:
|
|
404
|
-
if (k(
|
|
405
|
-
return /* @__PURE__ */
|
|
406
|
-
let y =
|
|
407
|
+
}, Te = d.memo(
|
|
408
|
+
(t) => {
|
|
409
|
+
const { blockProps: e, inBuilder: l, styles: o, url: a, controls: r } = t, n = v(r, "autoPlay", !1), i = v(r, "controls", !1), p = n || v(r, "muted", !0), m = v(r, "loop", !1);
|
|
410
|
+
if (k(a))
|
|
411
|
+
return /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "VIDEO URL", className: "h-36" });
|
|
412
|
+
let y = Be(a), b = null;
|
|
407
413
|
if (y) {
|
|
408
414
|
if (!k(y)) {
|
|
409
|
-
const
|
|
410
|
-
|
|
415
|
+
const B = [];
|
|
416
|
+
B.push(`autoplay=${n ? 1 : 0}`), B.push(`controls=${r ? 1 : 0}`), B.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), B.push(`loop=${m ? 1 : 0}`), y = `${y}?${B.join("&")}`;
|
|
411
417
|
}
|
|
412
418
|
b = d.createElement("iframe", {
|
|
413
419
|
...e,
|
|
414
420
|
...o,
|
|
415
421
|
src: y,
|
|
416
|
-
allow:
|
|
422
|
+
allow: l ? "" : "autoplay *; fullscreen *",
|
|
417
423
|
allowFullScreen: !0,
|
|
418
424
|
frameBorder: 0
|
|
419
425
|
});
|
|
@@ -421,19 +427,19 @@ const P = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-
|
|
|
421
427
|
b = d.createElement("video", {
|
|
422
428
|
...e,
|
|
423
429
|
...o,
|
|
424
|
-
src:
|
|
430
|
+
src: a,
|
|
425
431
|
controls: i,
|
|
426
432
|
muted: p,
|
|
427
|
-
autoPlay:
|
|
433
|
+
autoPlay: l ? !1 : n,
|
|
428
434
|
loop: m
|
|
429
435
|
});
|
|
430
|
-
return /* @__PURE__ */
|
|
431
|
-
|
|
436
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "relative h-full w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
437
|
+
l ? /* @__PURE__ */ s.jsx("div", { ...e, ...o, className: "absolute z-20 h-full w-full" }) : null,
|
|
432
438
|
b
|
|
433
439
|
] });
|
|
434
440
|
}
|
|
435
441
|
);
|
|
436
|
-
u(
|
|
442
|
+
u(Te, {
|
|
437
443
|
type: "Video",
|
|
438
444
|
label: "Video",
|
|
439
445
|
category: "core",
|
|
@@ -456,19 +462,19 @@ u(we, {
|
|
|
456
462
|
})
|
|
457
463
|
}
|
|
458
464
|
});
|
|
459
|
-
const
|
|
460
|
-
(
|
|
461
|
-
const { blockProps: e, styles:
|
|
462
|
-
return /* @__PURE__ */
|
|
463
|
-
|
|
465
|
+
const we = d.memo(
|
|
466
|
+
(t) => {
|
|
467
|
+
const { blockProps: e, styles: l, content: o, inBuilder: a } = t;
|
|
468
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
|
|
469
|
+
a ? /* @__PURE__ */ s.jsx("div", { ...e, ...l, className: "absolute h-full w-full z-20" }) : null,
|
|
464
470
|
d.createElement("div", {
|
|
465
|
-
...
|
|
471
|
+
...l,
|
|
466
472
|
dangerouslySetInnerHTML: { __html: o }
|
|
467
473
|
})
|
|
468
474
|
] });
|
|
469
475
|
}
|
|
470
476
|
);
|
|
471
|
-
u(
|
|
477
|
+
u(we, {
|
|
472
478
|
type: "CustomHTML",
|
|
473
479
|
label: "CustomHTML",
|
|
474
480
|
category: "core",
|
|
@@ -483,11 +489,11 @@ u(Be, {
|
|
|
483
489
|
})
|
|
484
490
|
}
|
|
485
491
|
});
|
|
486
|
-
const
|
|
487
|
-
const { blockProps: e, styles:
|
|
488
|
-
return d.createElement("hr", { ...
|
|
492
|
+
const Se = (t) => {
|
|
493
|
+
const { blockProps: e, styles: l } = t;
|
|
494
|
+
return d.createElement("hr", { ...l, ...e });
|
|
489
495
|
};
|
|
490
|
-
u(
|
|
496
|
+
u(Se, {
|
|
491
497
|
type: "Divider",
|
|
492
498
|
label: "Divider",
|
|
493
499
|
category: "core",
|
|
@@ -497,41 +503,41 @@ u(_e, {
|
|
|
497
503
|
styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
498
504
|
}
|
|
499
505
|
});
|
|
500
|
-
const
|
|
501
|
-
const { blockProps: e, styles:
|
|
502
|
-
return d.createElement("br", { ...e, ...
|
|
506
|
+
const _e = (t) => {
|
|
507
|
+
const { blockProps: e, styles: l } = t;
|
|
508
|
+
return d.createElement("br", { ...e, ...l });
|
|
503
509
|
};
|
|
504
|
-
u(
|
|
510
|
+
u(_e, {
|
|
505
511
|
type: "LineBreak",
|
|
506
512
|
label: "Line Break",
|
|
507
513
|
category: "core",
|
|
508
514
|
group: "basic",
|
|
509
515
|
hidden: !0,
|
|
510
|
-
icon:
|
|
516
|
+
icon: R,
|
|
511
517
|
props: {
|
|
512
518
|
styles: c({ default: "" })
|
|
513
519
|
}
|
|
514
520
|
});
|
|
515
|
-
const je = (
|
|
521
|
+
const je = (t) => t.inBuilder ? /* @__PURE__ */ s.jsx("span", { className: "inline", ...t.blockProps, children: t.content }) : `${t.content}`;
|
|
516
522
|
u(je, {
|
|
517
523
|
type: "Text",
|
|
518
524
|
label: "Text",
|
|
519
525
|
hidden: !0,
|
|
520
526
|
category: "core",
|
|
521
527
|
group: "basic",
|
|
522
|
-
icon:
|
|
528
|
+
icon: R,
|
|
523
529
|
props: {
|
|
524
530
|
content: L({ title: "Content", defaultValue: "" })
|
|
525
531
|
}
|
|
526
532
|
});
|
|
527
|
-
const
|
|
533
|
+
const S = (t) => {
|
|
528
534
|
const e = (r, n) => ({
|
|
529
535
|
_id: x(),
|
|
530
536
|
_parent: r,
|
|
531
537
|
_type: "TableCell",
|
|
532
538
|
styles: "#styles:,",
|
|
533
|
-
content: `${
|
|
534
|
-
}),
|
|
539
|
+
content: `${t === "TableHead" ? "Table Head" : "Table Cell " + n}`
|
|
540
|
+
}), l = (r) => {
|
|
535
541
|
const n = x(), i = {
|
|
536
542
|
_type: "TableRow",
|
|
537
543
|
_id: n,
|
|
@@ -544,16 +550,16 @@ const _ = (l) => {
|
|
|
544
550
|
_type: "TableHead",
|
|
545
551
|
styles: "#styles:,font-medium"
|
|
546
552
|
};
|
|
547
|
-
return r && (i._parent = r), [i, ...
|
|
548
|
-
},
|
|
553
|
+
return r && (i._parent = r), [i, ...l(n)];
|
|
554
|
+
}, a = (r) => {
|
|
549
555
|
const n = x(), i = {
|
|
550
556
|
_id: n,
|
|
551
557
|
_type: "TableBody",
|
|
552
558
|
styles: "#styles:,"
|
|
553
559
|
};
|
|
554
|
-
return r && (i._parent = r), [i, ...
|
|
560
|
+
return r && (i._parent = r), [i, ...l(n), ...l(n)];
|
|
555
561
|
};
|
|
556
|
-
if (
|
|
562
|
+
if (t === "Table") {
|
|
557
563
|
const r = x();
|
|
558
564
|
return [
|
|
559
565
|
{
|
|
@@ -562,13 +568,13 @@ const _ = (l) => {
|
|
|
562
568
|
styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
|
|
563
569
|
},
|
|
564
570
|
...o(r),
|
|
565
|
-
...
|
|
571
|
+
...a(r)
|
|
566
572
|
];
|
|
567
573
|
}
|
|
568
|
-
return
|
|
569
|
-
}, Ee = (
|
|
570
|
-
const { blockProps: e, children:
|
|
571
|
-
return
|
|
574
|
+
return t === "TableRow" ? l() : t === "TableHead" ? o() : t === "TableBody" ? a() : [];
|
|
575
|
+
}, Ee = (t) => {
|
|
576
|
+
const { blockProps: e, children: l, styles: o } = t;
|
|
577
|
+
return l ? d.createElement("table", { ...e, ...o }, l) : /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "TABLE HEAD / BODY" });
|
|
572
578
|
};
|
|
573
579
|
u(Ee, {
|
|
574
580
|
type: "Table",
|
|
@@ -580,11 +586,11 @@ u(Ee, {
|
|
|
580
586
|
props: {
|
|
581
587
|
styles: c({ default: "" })
|
|
582
588
|
},
|
|
583
|
-
blocks:
|
|
589
|
+
blocks: S("Table")
|
|
584
590
|
});
|
|
585
|
-
const Pe = (
|
|
586
|
-
const { blockProps: e, children:
|
|
587
|
-
return
|
|
591
|
+
const Pe = (t) => {
|
|
592
|
+
const { blockProps: e, children: l, styles: o } = t;
|
|
593
|
+
return l ? d.createElement("thead", { ...e, ...o }, l) : /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "TABLE ROW" });
|
|
588
594
|
};
|
|
589
595
|
u(Pe, {
|
|
590
596
|
type: "TableHead",
|
|
@@ -596,11 +602,11 @@ u(Pe, {
|
|
|
596
602
|
props: {
|
|
597
603
|
styles: c({ default: "" })
|
|
598
604
|
},
|
|
599
|
-
blocks:
|
|
605
|
+
blocks: S("TableHead")
|
|
600
606
|
});
|
|
601
|
-
const Ne = (
|
|
602
|
-
const { blockProps: e, children:
|
|
603
|
-
return
|
|
607
|
+
const Ne = (t) => {
|
|
608
|
+
const { blockProps: e, children: l, styles: o } = t;
|
|
609
|
+
return l ? d.createElement("tbody", { ...e, ...o }, l) : /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "TABLE ROW" });
|
|
604
610
|
};
|
|
605
611
|
u(Ne, {
|
|
606
612
|
type: "TableBody",
|
|
@@ -612,11 +618,11 @@ u(Ne, {
|
|
|
612
618
|
props: {
|
|
613
619
|
styles: c({ default: "" })
|
|
614
620
|
},
|
|
615
|
-
blocks:
|
|
621
|
+
blocks: S("TableBody")
|
|
616
622
|
});
|
|
617
|
-
const Ce = (
|
|
618
|
-
const { blockProps: e, children:
|
|
619
|
-
return
|
|
623
|
+
const Ce = (t) => {
|
|
624
|
+
const { blockProps: e, children: l, styles: o } = t;
|
|
625
|
+
return l ? d.createElement("tr", { ...e, ...o }, l) : /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "TABLE CELL" });
|
|
620
626
|
};
|
|
621
627
|
u(Ce, {
|
|
622
628
|
type: "TableRow",
|
|
@@ -628,13 +634,13 @@ u(Ce, {
|
|
|
628
634
|
props: {
|
|
629
635
|
styles: c({ default: "w-full" })
|
|
630
636
|
},
|
|
631
|
-
blocks:
|
|
637
|
+
blocks: S("TableRow")
|
|
632
638
|
});
|
|
633
|
-
const Me = (
|
|
634
|
-
const { blockProps: e, children:
|
|
635
|
-
return !
|
|
639
|
+
const Me = (t) => {
|
|
640
|
+
const { blockProps: e, children: l, content: o, styles: a } = t;
|
|
641
|
+
return !l && k(o) ? /* @__PURE__ */ s.jsx(g, { blockProps: e }) : l ? d.createElement("td", { ...e, ...a }, l) : d.createElement("td", {
|
|
636
642
|
...e,
|
|
637
|
-
...
|
|
643
|
+
...a,
|
|
638
644
|
dangerouslySetInnerHTML: { __html: o }
|
|
639
645
|
});
|
|
640
646
|
};
|
|
@@ -644,16 +650,16 @@ u(Me, {
|
|
|
644
650
|
category: "core",
|
|
645
651
|
group: "table",
|
|
646
652
|
hidden: !0,
|
|
647
|
-
icon:
|
|
653
|
+
icon: ae,
|
|
648
654
|
props: {
|
|
649
655
|
styles: c({ default: "" }),
|
|
650
|
-
content:
|
|
656
|
+
content: T({ title: "Content", default: "Table cell item" })
|
|
651
657
|
}
|
|
652
658
|
});
|
|
653
|
-
const He = (
|
|
654
|
-
const { blockProps: e, errorMessage:
|
|
659
|
+
const He = (t) => {
|
|
660
|
+
const { blockProps: e, errorMessage: l, name: o, _type: a, successMessage: r, action: n, styles: i, children: p } = t;
|
|
655
661
|
if (!p && k(i == null ? void 0 : i.className))
|
|
656
|
-
return /* @__PURE__ */
|
|
662
|
+
return /* @__PURE__ */ s.jsx(g, { blockProps: e, text: "FORM FIELDS" });
|
|
657
663
|
const m = {
|
|
658
664
|
"x-data": "useForm",
|
|
659
665
|
"x-on:submit.prevent": "post"
|
|
@@ -661,19 +667,19 @@ const He = (l) => {
|
|
|
661
667
|
"x-html": "formResponse",
|
|
662
668
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
663
669
|
};
|
|
664
|
-
return /* @__PURE__ */
|
|
670
|
+
return /* @__PURE__ */ s.jsxs(
|
|
665
671
|
"form",
|
|
666
672
|
{
|
|
667
673
|
...m,
|
|
668
|
-
"data-error":
|
|
674
|
+
"data-error": l,
|
|
669
675
|
"data-success": r,
|
|
670
676
|
method: "post",
|
|
671
677
|
action: n,
|
|
672
678
|
...e,
|
|
673
679
|
...i,
|
|
674
680
|
children: [
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ s.jsx("div", { ...y }),
|
|
682
|
+
/* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: o || a }),
|
|
677
683
|
p
|
|
678
684
|
]
|
|
679
685
|
}
|
|
@@ -683,7 +689,7 @@ u(He, {
|
|
|
683
689
|
type: "Form",
|
|
684
690
|
label: "Form",
|
|
685
691
|
category: "core",
|
|
686
|
-
icon:
|
|
692
|
+
icon: se,
|
|
687
693
|
group: "form",
|
|
688
694
|
hidden: !0,
|
|
689
695
|
props: {
|
|
@@ -692,21 +698,22 @@ u(He, {
|
|
|
692
698
|
title: "Submit URL",
|
|
693
699
|
default: "/api/form/submit"
|
|
694
700
|
}),
|
|
695
|
-
errorMessage:
|
|
701
|
+
errorMessage: T({
|
|
696
702
|
title: "Error Message",
|
|
697
703
|
default: "Something went wrong. Please try again"
|
|
698
704
|
}),
|
|
699
|
-
successMessage:
|
|
705
|
+
successMessage: T({
|
|
700
706
|
title: "Success Message",
|
|
701
707
|
default: "Thank you for your submission."
|
|
702
708
|
})
|
|
703
|
-
}
|
|
709
|
+
},
|
|
710
|
+
canAcceptBlock: () => !0
|
|
704
711
|
});
|
|
705
|
-
const Re = (
|
|
706
|
-
const { blockProps: e, content:
|
|
707
|
-
return
|
|
712
|
+
const Re = (t) => {
|
|
713
|
+
const { blockProps: e, content: l, styles: o, children: a } = t, r = { ...o, ...e };
|
|
714
|
+
return a ? d.createElement("label", r, a) : d.createElement("label", {
|
|
708
715
|
...r,
|
|
709
|
-
dangerouslySetInnerHTML: { __html:
|
|
716
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
710
717
|
});
|
|
711
718
|
};
|
|
712
719
|
u(Re, {
|
|
@@ -721,20 +728,20 @@ u(Re, {
|
|
|
721
728
|
content: f({ title: "Content", default: "Label" })
|
|
722
729
|
}
|
|
723
730
|
});
|
|
724
|
-
const
|
|
731
|
+
const Ae = (t) => {
|
|
725
732
|
const {
|
|
726
733
|
blockProps: e,
|
|
727
|
-
label:
|
|
734
|
+
label: l,
|
|
728
735
|
placeholder: o,
|
|
729
|
-
styles:
|
|
736
|
+
styles: a,
|
|
730
737
|
inputStyles: r,
|
|
731
738
|
showLabel: n,
|
|
732
739
|
required: i,
|
|
733
740
|
inputType: p = "text",
|
|
734
741
|
inBuilder: m,
|
|
735
742
|
fieldName: y
|
|
736
|
-
} =
|
|
737
|
-
return !n || p === "submit" ? (p === "submit" && (e.value =
|
|
743
|
+
} = t, b = x();
|
|
744
|
+
return !n || p === "submit" ? (p === "submit" && (e.value = l), /* @__PURE__ */ s.jsx(
|
|
738
745
|
"input",
|
|
739
746
|
{
|
|
740
747
|
id: b,
|
|
@@ -742,14 +749,14 @@ const Fe = (l) => {
|
|
|
742
749
|
readOnly: m,
|
|
743
750
|
...e,
|
|
744
751
|
...r,
|
|
745
|
-
...
|
|
752
|
+
...a,
|
|
746
753
|
type: p,
|
|
747
754
|
placeholder: o,
|
|
748
755
|
required: i
|
|
749
756
|
}
|
|
750
|
-
)) : /* @__PURE__ */
|
|
751
|
-
n && /* @__PURE__ */
|
|
752
|
-
/* @__PURE__ */
|
|
757
|
+
)) : /* @__PURE__ */ s.jsxs("div", { ...a, ...e, children: [
|
|
758
|
+
n && /* @__PURE__ */ s.jsx("label", { htmlFor: b, children: l }),
|
|
759
|
+
/* @__PURE__ */ s.jsx(
|
|
753
760
|
"input",
|
|
754
761
|
{
|
|
755
762
|
name: y,
|
|
@@ -763,11 +770,11 @@ const Fe = (l) => {
|
|
|
763
770
|
)
|
|
764
771
|
] });
|
|
765
772
|
};
|
|
766
|
-
u(
|
|
773
|
+
u(Ae, {
|
|
767
774
|
type: "Input",
|
|
768
775
|
label: "Input",
|
|
769
776
|
category: "core",
|
|
770
|
-
icon:
|
|
777
|
+
icon: A,
|
|
771
778
|
group: "form",
|
|
772
779
|
hidden: !0,
|
|
773
780
|
props: {
|
|
@@ -775,11 +782,11 @@ u(Fe, {
|
|
|
775
782
|
fieldName: f({ title: "Field Name", default: "input" }),
|
|
776
783
|
inputType: I({
|
|
777
784
|
title: "Type",
|
|
778
|
-
options:
|
|
785
|
+
options: _(
|
|
779
786
|
["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
|
|
780
|
-
(
|
|
781
|
-
value:
|
|
782
|
-
title:
|
|
787
|
+
(t) => ({
|
|
788
|
+
value: t,
|
|
789
|
+
title: t
|
|
783
790
|
})
|
|
784
791
|
),
|
|
785
792
|
default: "text"
|
|
@@ -795,29 +802,29 @@ u(Fe, {
|
|
|
795
802
|
required: h({ title: "Required", default: !1 })
|
|
796
803
|
}
|
|
797
804
|
});
|
|
798
|
-
const
|
|
799
|
-
const { blockProps: e, fieldName:
|
|
800
|
-
return p ? /* @__PURE__ */
|
|
801
|
-
p && /* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
] }) : /* @__PURE__ */
|
|
805
|
+
const Fe = (t) => {
|
|
806
|
+
const { blockProps: e, fieldName: l, label: o, placeholder: a, styles: r, inputStyles: n, _rows: i, showLabel: p } = t, m = x();
|
|
807
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...e, children: [
|
|
808
|
+
p && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o }),
|
|
809
|
+
/* @__PURE__ */ s.jsx("textarea", { name: l, ...n, id: m, placeholder: a, rows: i })
|
|
810
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
804
811
|
"textarea",
|
|
805
812
|
{
|
|
806
813
|
id: m,
|
|
807
|
-
name:
|
|
814
|
+
name: l,
|
|
808
815
|
...e,
|
|
809
816
|
...n,
|
|
810
817
|
...r,
|
|
811
|
-
placeholder:
|
|
818
|
+
placeholder: a,
|
|
812
819
|
rows: i
|
|
813
820
|
}
|
|
814
821
|
);
|
|
815
822
|
};
|
|
816
|
-
u(
|
|
823
|
+
u(Fe, {
|
|
817
824
|
type: "TextArea",
|
|
818
825
|
label: "TextArea",
|
|
819
826
|
category: "core",
|
|
820
|
-
icon:
|
|
827
|
+
icon: A,
|
|
821
828
|
group: "form",
|
|
822
829
|
hidden: !0,
|
|
823
830
|
props: {
|
|
@@ -830,35 +837,35 @@ u(ze, {
|
|
|
830
837
|
title: "Placeholder",
|
|
831
838
|
default: "Placeholder"
|
|
832
839
|
}),
|
|
833
|
-
_rows:
|
|
840
|
+
_rows: M({ title: "Rows", default: 3 })
|
|
834
841
|
}
|
|
835
842
|
});
|
|
836
|
-
const
|
|
843
|
+
const ze = (t) => {
|
|
837
844
|
const {
|
|
838
845
|
blockProps: e,
|
|
839
|
-
fieldName:
|
|
846
|
+
fieldName: l,
|
|
840
847
|
label: o,
|
|
841
|
-
placeholder:
|
|
848
|
+
placeholder: a,
|
|
842
849
|
styles: r,
|
|
843
850
|
inputStyles: n,
|
|
844
851
|
required: i,
|
|
845
852
|
showLabel: p,
|
|
846
853
|
_multiple: m = !1
|
|
847
|
-
} =
|
|
848
|
-
return p ? /* @__PURE__ */
|
|
849
|
-
p && /* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
854
|
+
} = t, y = x();
|
|
855
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...r, children: [
|
|
856
|
+
p && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: o }),
|
|
857
|
+
/* @__PURE__ */ s.jsxs(
|
|
851
858
|
"select",
|
|
852
859
|
{
|
|
853
860
|
...n,
|
|
854
861
|
id: y,
|
|
855
|
-
placeholder:
|
|
862
|
+
placeholder: a,
|
|
856
863
|
required: i,
|
|
857
864
|
multiple: m,
|
|
858
|
-
name:
|
|
865
|
+
name: l,
|
|
859
866
|
children: [
|
|
860
|
-
/* @__PURE__ */
|
|
861
|
-
|
|
867
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
|
|
868
|
+
_(t.options, (b) => /* @__PURE__ */ s.jsx(
|
|
862
869
|
"option",
|
|
863
870
|
{
|
|
864
871
|
selected: v(b, "selected", !1),
|
|
@@ -870,19 +877,19 @@ const Ae = (l) => {
|
|
|
870
877
|
]
|
|
871
878
|
}
|
|
872
879
|
)
|
|
873
|
-
] }) : /* @__PURE__ */
|
|
880
|
+
] }) : /* @__PURE__ */ s.jsxs(
|
|
874
881
|
"select",
|
|
875
882
|
{
|
|
876
883
|
id: y,
|
|
877
884
|
...r,
|
|
878
885
|
...e,
|
|
879
|
-
placeholder:
|
|
886
|
+
placeholder: a,
|
|
880
887
|
required: i,
|
|
881
888
|
multiple: m,
|
|
882
|
-
name:
|
|
889
|
+
name: l,
|
|
883
890
|
children: [
|
|
884
|
-
/* @__PURE__ */
|
|
885
|
-
|
|
891
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
|
|
892
|
+
_(t.options, (b) => /* @__PURE__ */ s.jsx(
|
|
886
893
|
"option",
|
|
887
894
|
{
|
|
888
895
|
selected: v(b, "selected", !1),
|
|
@@ -895,7 +902,7 @@ const Ae = (l) => {
|
|
|
895
902
|
}
|
|
896
903
|
);
|
|
897
904
|
};
|
|
898
|
-
u(
|
|
905
|
+
u(ze, {
|
|
899
906
|
type: "Select",
|
|
900
907
|
label: "Select",
|
|
901
908
|
category: "core",
|
|
@@ -923,31 +930,31 @@ u(Ae, {
|
|
|
923
930
|
})
|
|
924
931
|
}
|
|
925
932
|
});
|
|
926
|
-
const De = (
|
|
927
|
-
const { blockProps: e, fieldName:
|
|
928
|
-
return p ? /* @__PURE__ */
|
|
929
|
-
/* @__PURE__ */
|
|
933
|
+
const De = (t) => {
|
|
934
|
+
const { blockProps: e, fieldName: l, label: o, styles: a, inputStyles: r, required: n, checked: i, showLabel: p = !0 } = t, m = x();
|
|
935
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...a, ...e, children: [
|
|
936
|
+
/* @__PURE__ */ s.jsx(
|
|
930
937
|
"input",
|
|
931
938
|
{
|
|
932
939
|
...r,
|
|
933
|
-
name:
|
|
940
|
+
name: l,
|
|
934
941
|
id: m,
|
|
935
942
|
type: "checkbox",
|
|
936
943
|
required: n,
|
|
937
944
|
defaultChecked: i
|
|
938
945
|
}
|
|
939
946
|
),
|
|
940
|
-
o && o !== "Label" && /* @__PURE__ */
|
|
941
|
-
] }) : /* @__PURE__ */
|
|
947
|
+
o && o !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o })
|
|
948
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
942
949
|
"input",
|
|
943
950
|
{
|
|
944
951
|
id: m,
|
|
945
952
|
...e,
|
|
946
953
|
...r,
|
|
947
|
-
...
|
|
954
|
+
...a,
|
|
948
955
|
type: "checkbox",
|
|
949
956
|
required: n,
|
|
950
|
-
name:
|
|
957
|
+
name: l
|
|
951
958
|
}
|
|
952
959
|
);
|
|
953
960
|
};
|
|
@@ -966,22 +973,22 @@ u(De, {
|
|
|
966
973
|
required: h({ title: "Required", default: !1 })
|
|
967
974
|
}
|
|
968
975
|
});
|
|
969
|
-
const qe = (
|
|
970
|
-
const { blockProps: e, fieldName:
|
|
971
|
-
return p ? /* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
973
|
-
o && /* @__PURE__ */
|
|
974
|
-
] }) : /* @__PURE__ */
|
|
976
|
+
const qe = (t) => {
|
|
977
|
+
const { blockProps: e, fieldName: l, label: o, styles: a, inputStyles: r, checked: n, required: i, showLabel: p = !0 } = t, m = x();
|
|
978
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...a, ...e, children: [
|
|
979
|
+
/* @__PURE__ */ s.jsx("input", { ...r, name: l, id: m, type: "radio", required: i, defaultChecked: n }),
|
|
980
|
+
o && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o })
|
|
981
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
975
982
|
"input",
|
|
976
983
|
{
|
|
977
984
|
id: m,
|
|
978
985
|
...e,
|
|
979
986
|
...r,
|
|
980
|
-
...
|
|
987
|
+
...a,
|
|
981
988
|
type: "radio",
|
|
982
989
|
required: i,
|
|
983
990
|
checked: n,
|
|
984
|
-
name:
|
|
991
|
+
name: l
|
|
985
992
|
}
|
|
986
993
|
);
|
|
987
994
|
};
|
|
@@ -1000,11 +1007,11 @@ u(qe, {
|
|
|
1000
1007
|
required: h({ title: "Required", default: !1 })
|
|
1001
1008
|
}
|
|
1002
1009
|
});
|
|
1003
|
-
const $e = (
|
|
1004
|
-
const { blockProps: e, inBuilder:
|
|
1010
|
+
const $e = (t) => {
|
|
1011
|
+
const { blockProps: e, inBuilder: l, label: o, placeholder: a, styles: r, inputStyles: n, icon: i, iconPos: p } = t, m = x(), y = {
|
|
1005
1012
|
"x-bind:disabled": "formLoading"
|
|
1006
1013
|
};
|
|
1007
|
-
return /* @__PURE__ */
|
|
1014
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1008
1015
|
"button",
|
|
1009
1016
|
{
|
|
1010
1017
|
id: m,
|
|
@@ -1012,11 +1019,11 @@ const $e = (l) => {
|
|
|
1012
1019
|
...n,
|
|
1013
1020
|
...r,
|
|
1014
1021
|
...e || {},
|
|
1015
|
-
type:
|
|
1016
|
-
placeholder:
|
|
1022
|
+
type: l ? "button" : "submit",
|
|
1023
|
+
placeholder: a,
|
|
1017
1024
|
children: [
|
|
1018
1025
|
o,
|
|
1019
|
-
i && /* @__PURE__ */
|
|
1026
|
+
i && /* @__PURE__ */ s.jsx("span", { className: p, dangerouslySetInnerHTML: { __html: i } })
|
|
1020
1027
|
]
|
|
1021
1028
|
}
|
|
1022
1029
|
);
|
|
@@ -1025,7 +1032,7 @@ u($e, {
|
|
|
1025
1032
|
type: "FormButton",
|
|
1026
1033
|
label: "Submit Button",
|
|
1027
1034
|
category: "core",
|
|
1028
|
-
icon:
|
|
1035
|
+
icon: H,
|
|
1029
1036
|
group: "form",
|
|
1030
1037
|
hidden: !0,
|
|
1031
1038
|
props: {
|
|
@@ -1044,7 +1051,7 @@ u($e, {
|
|
|
1044
1051
|
})
|
|
1045
1052
|
}
|
|
1046
1053
|
});
|
|
1047
|
-
const Ke =
|
|
1054
|
+
const Ke = D;
|
|
1048
1055
|
export {
|
|
1049
1056
|
Ke as loadWebBlocks
|
|
1050
1057
|
};
|