@chaibuilder/sdk 2.2.32 → 2.2.34
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/core.cjs +3 -3
- package/dist/core.js +13 -7
- package/dist/render.cjs +2 -2
- package/dist/render.js +68 -66
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +391 -293
- package/package.json +1 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { registerChaiBlockSchema as u, StylesProp as d, registerChaiBlock as p, stylesProp as P, closestBlockProp as H } from "@chaibuilder/runtime";
|
|
2
2
|
import { jsx as s, jsxs as f, Fragment as N } from "react/jsx-runtime";
|
|
3
|
-
import { c as B, g as
|
|
4
|
-
import * as
|
|
5
|
-
import { createElement as
|
|
6
|
-
import { ButtonIcon as R, CopyIcon as z, CodeIcon as D, DividerHorizontalIcon as j, CheckboxIcon as
|
|
3
|
+
import { c as B, g as w } from "./common-functions-BGzDsf1z.js";
|
|
4
|
+
import * as g from "react";
|
|
5
|
+
import { createElement as x } from "react";
|
|
6
|
+
import { ButtonIcon as R, CopyIcon as z, CodeIcon as D, DividerHorizontalIcon as j, CheckboxIcon as U, InputIcon as A, LetterCaseToggleIcon as q, RadiobuttonIcon as F, DropdownMenuIcon as V, HeadingIcon as O, TableIcon as G, BorderTopIcon as Y, BorderAllIcon as W, ViewHorizontalIcon as X, DragHandleHorizontalIcon as J, SketchLogoIcon as Q, ImageIcon as Z, Link1Icon as K, RowsIcon as ee, ColumnsIcon as te, TextIcon as oe, CursorTextIcon as le, SpaceBetweenVerticallyIcon as re, VideoIcon as ne, LoopIcon as M } from "@radix-ui/react-icons";
|
|
7
7
|
import { isEmpty as C, get as h, map as S, isNull as ie, omit as se, pick as ae } from "lodash-es";
|
|
8
|
-
import { FileCode as ce, GroupIcon as pe, GlobeIcon as
|
|
9
|
-
const
|
|
10
|
-
const { blockProps:
|
|
8
|
+
import { FileCode as ce, GroupIcon as pe, GlobeIcon as E, Columns as de, Rows as ue } from "lucide-react";
|
|
9
|
+
const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div", { className: B("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, me = (e) => {
|
|
10
|
+
const { blockProps: t, inBuilder: o, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
|
|
11
11
|
let a = r;
|
|
12
|
-
r || (a = /* @__PURE__ */ s(
|
|
12
|
+
r || (a = /* @__PURE__ */ s(v, { inBuilder: o }));
|
|
13
13
|
let c = {};
|
|
14
|
-
return l && (c = { backgroundImage: `url(${l})` }),
|
|
14
|
+
return l && (c = { backgroundImage: `url(${l})` }), g.createElement(n, { ...t, ...i, style: c }, a);
|
|
15
15
|
}, ye = {
|
|
16
16
|
type: "Box",
|
|
17
17
|
description: "Similar to a div or section elements in HTML",
|
|
@@ -55,25 +55,25 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
57
|
}, ge = (e) => {
|
|
58
|
-
const { blockProps:
|
|
58
|
+
const { blockProps: t, iconSize: o, icon: l, content: r, styles: n, children: i, iconPos: a, link: c, inBuilder: m } = e, k = l, b = i || /* @__PURE__ */ f(N, { children: [
|
|
59
59
|
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: r }),
|
|
60
60
|
k && /* @__PURE__ */ s(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
|
-
style: { width:
|
|
63
|
+
style: { width: o + "px" },
|
|
64
64
|
className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
|
|
65
65
|
dangerouslySetInnerHTML: { __html: k }
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
|
-
] }), y =
|
|
68
|
+
] }), y = x(
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
|
-
...
|
|
71
|
+
...t,
|
|
72
72
|
...n,
|
|
73
73
|
type: "button",
|
|
74
74
|
"aria-label": r
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
b
|
|
77
77
|
);
|
|
78
78
|
return C(h(c, "href")) ? y : m ? /* @__PURE__ */ s("span", { children: y }) : /* @__PURE__ */ s("a", { "aria-label": r, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: y });
|
|
79
79
|
}, be = {
|
|
@@ -134,14 +134,14 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
134
134
|
i18nProps: ["content"],
|
|
135
135
|
aiProps: ["content"]
|
|
136
136
|
}, fe = (e) => {
|
|
137
|
-
const { blockProps:
|
|
137
|
+
const { blockProps: t, iconSize: o, icon: l, content: r, styles: n } = e, i = l, a = /* @__PURE__ */ f(N, { children: [
|
|
138
138
|
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: r }),
|
|
139
|
-
i && /* @__PURE__ */ s("div", { style: { width:
|
|
139
|
+
i && /* @__PURE__ */ s("div", { style: { width: o + "px" }, dangerouslySetInnerHTML: { __html: i } })
|
|
140
140
|
] });
|
|
141
|
-
return
|
|
141
|
+
return x(
|
|
142
142
|
"button",
|
|
143
143
|
{
|
|
144
|
-
...
|
|
144
|
+
...t,
|
|
145
145
|
...n,
|
|
146
146
|
type: "button",
|
|
147
147
|
"aria-label": r
|
|
@@ -179,19 +179,19 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
179
179
|
i18nProps: ["content"],
|
|
180
180
|
aiProps: ["content"]
|
|
181
181
|
}, ke = (e) => {
|
|
182
|
-
const { blockProps:
|
|
182
|
+
const { blockProps: t, styles: o, htmlCode: l, inBuilder: r } = e;
|
|
183
183
|
return r ? /* @__PURE__ */ f("div", { className: "relative", children: [
|
|
184
|
-
r ? /* @__PURE__ */ s("div", { ...
|
|
185
|
-
|
|
186
|
-
...
|
|
184
|
+
r ? /* @__PURE__ */ s("div", { ...t, ...o, className: "absolute z-20 h-full w-full" }) : null,
|
|
185
|
+
g.createElement("div", {
|
|
186
|
+
...o,
|
|
187
187
|
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
188
188
|
})
|
|
189
|
-
] }) :
|
|
190
|
-
...o,
|
|
189
|
+
] }) : g.createElement("div", {
|
|
191
190
|
...t,
|
|
191
|
+
...o,
|
|
192
192
|
dangerouslySetInnerHTML: { __html: l }
|
|
193
193
|
});
|
|
194
|
-
},
|
|
194
|
+
}, xe = {
|
|
195
195
|
type: "CustomHTML",
|
|
196
196
|
description: "similar to a div or section elements in HTML",
|
|
197
197
|
label: "Custom HTML",
|
|
@@ -209,9 +209,9 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
209
209
|
}
|
|
210
210
|
}),
|
|
211
211
|
i18nProps: ["htmlCode"]
|
|
212
|
-
},
|
|
213
|
-
const { scripts:
|
|
214
|
-
return
|
|
212
|
+
}, we = (e) => {
|
|
213
|
+
const { scripts: t, inBuilder: o, blockProps: l } = e;
|
|
214
|
+
return o ? /* @__PURE__ */ s("div", { ...l, children: /* @__PURE__ */ s("div", { className: B("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ s("div", { dangerouslySetInnerHTML: { __html: t } });
|
|
215
215
|
}, Ce = {
|
|
216
216
|
type: "CustomScript",
|
|
217
217
|
description: "similar to a script element in HTML",
|
|
@@ -230,10 +230,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
})
|
|
233
|
-
},
|
|
234
|
-
const { blockProps:
|
|
235
|
-
return
|
|
236
|
-
},
|
|
233
|
+
}, ve = (e) => {
|
|
234
|
+
const { blockProps: t, styles: o } = e;
|
|
235
|
+
return x("hr", { ...o, ...t });
|
|
236
|
+
}, Le = {
|
|
237
237
|
type: "Divider",
|
|
238
238
|
description: "A horizontal line component",
|
|
239
239
|
label: "Divider",
|
|
@@ -246,10 +246,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
246
246
|
}
|
|
247
247
|
})
|
|
248
248
|
}, Be = (e) => {
|
|
249
|
-
const { blockProps:
|
|
249
|
+
const { blockProps: t, styles: o, backgroundImage: l } = e;
|
|
250
250
|
let r = {};
|
|
251
|
-
return l && (r = { backgroundImage: `url(${l})` }),
|
|
252
|
-
},
|
|
251
|
+
return l && (r = { backgroundImage: `url(${l})` }), g.createElement("div", { ...t, ...o, style: r });
|
|
252
|
+
}, Ie = {
|
|
253
253
|
type: "EmptyBox",
|
|
254
254
|
description: "A box component with no children",
|
|
255
255
|
label: "Empty Box",
|
|
@@ -267,13 +267,13 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
267
267
|
}
|
|
268
268
|
})
|
|
269
269
|
}, Pe = (e) => {
|
|
270
|
-
const { blockProps:
|
|
271
|
-
return c ? /* @__PURE__ */ f("div", { ...r, ...
|
|
270
|
+
const { blockProps: t, fieldName: o, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e, m = w();
|
|
271
|
+
return c ? /* @__PURE__ */ f("div", { ...r, ...t, children: [
|
|
272
272
|
/* @__PURE__ */ s(
|
|
273
273
|
"input",
|
|
274
274
|
{
|
|
275
275
|
...n,
|
|
276
|
-
name:
|
|
276
|
+
name: o,
|
|
277
277
|
id: m,
|
|
278
278
|
type: "checkbox",
|
|
279
279
|
required: i,
|
|
@@ -285,19 +285,19 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
285
285
|
"input",
|
|
286
286
|
{
|
|
287
287
|
id: m,
|
|
288
|
-
...
|
|
288
|
+
...t,
|
|
289
289
|
...n,
|
|
290
290
|
...r,
|
|
291
291
|
type: "checkbox",
|
|
292
292
|
required: i,
|
|
293
|
-
name:
|
|
293
|
+
name: o
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
296
|
}, Se = {
|
|
297
297
|
type: "Checkbox",
|
|
298
298
|
label: "web_blocks.checkbox",
|
|
299
299
|
category: "core",
|
|
300
|
-
icon:
|
|
300
|
+
icon: U,
|
|
301
301
|
group: "form",
|
|
302
302
|
...u({
|
|
303
303
|
properties: {
|
|
@@ -333,9 +333,9 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
333
333
|
aiProps: ["label"],
|
|
334
334
|
i18nProps: ["label"]
|
|
335
335
|
}, _e = (e) => {
|
|
336
|
-
const { children:
|
|
337
|
-
let c =
|
|
338
|
-
return
|
|
336
|
+
const { children: t, blockProps: o, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: a } = e;
|
|
337
|
+
let c = t;
|
|
338
|
+
return t || (c = /* @__PURE__ */ s(v, { inBuilder: a })), /* @__PURE__ */ f(
|
|
339
339
|
"form",
|
|
340
340
|
{
|
|
341
341
|
...{
|
|
@@ -346,7 +346,7 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
346
346
|
"data-success": r,
|
|
347
347
|
method: "post",
|
|
348
348
|
action: n,
|
|
349
|
-
...
|
|
349
|
+
...o,
|
|
350
350
|
...i,
|
|
351
351
|
children: [
|
|
352
352
|
/* @__PURE__ */ s("div", { ...{
|
|
@@ -399,7 +399,7 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
399
399
|
aiProps: ["errorMessage", "successMessage"],
|
|
400
400
|
canAcceptBlock: () => !0
|
|
401
401
|
}, Ne = (e) => {
|
|
402
|
-
const { blockProps:
|
|
402
|
+
const { blockProps: t, inBuilder: o, label: l, styles: r, inputStyles: n, icon: i, iconSize: a, iconPos: c } = e, m = w();
|
|
403
403
|
return /* @__PURE__ */ f(
|
|
404
404
|
"button",
|
|
405
405
|
{
|
|
@@ -409,8 +409,8 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
409
409
|
},
|
|
410
410
|
...n,
|
|
411
411
|
...r,
|
|
412
|
-
...
|
|
413
|
-
type:
|
|
412
|
+
...t || {},
|
|
413
|
+
type: o ? "button" : "submit",
|
|
414
414
|
"aria-label": l,
|
|
415
415
|
children: [
|
|
416
416
|
l,
|
|
@@ -465,52 +465,107 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
465
465
|
}),
|
|
466
466
|
i18nProps: ["label"],
|
|
467
467
|
aiProps: ["label"]
|
|
468
|
+
}, Ae = (e) => {
|
|
469
|
+
const t = { type: "text", autocomplete: "on" };
|
|
470
|
+
return e ? ["text", "password", "number", "hidden", "range", "color", "date", "time"].includes(e) ? { type: e, autocomplete: "on" } : e === "email" ? { type: "email", autocomplete: "email" } : e === "tel" ? { type: "tel", autocomplete: "tel" } : e === "url" ? { type: "url", autocomplete: "url" } : {
|
|
471
|
+
// Special cases
|
|
472
|
+
off: { type: "text", autocomplete: "off" },
|
|
473
|
+
on: { type: "text", autocomplete: "on" },
|
|
474
|
+
// Name related
|
|
475
|
+
name: { type: "text", autocomplete: "name" },
|
|
476
|
+
"honorific-prefix": { type: "text", autocomplete: "honorific-prefix" },
|
|
477
|
+
"given-name": { type: "text", autocomplete: "given-name" },
|
|
478
|
+
"additional-name": { type: "text", autocomplete: "additional-name" },
|
|
479
|
+
"family-name": { type: "text", autocomplete: "family-name" },
|
|
480
|
+
"honorific-suffix": { type: "text", autocomplete: "honorific-suffix" },
|
|
481
|
+
nickname: { type: "text", autocomplete: "nickname" },
|
|
482
|
+
// Contact related
|
|
483
|
+
email: { type: "email", autocomplete: "email" },
|
|
484
|
+
tel: { type: "tel", autocomplete: "tel" },
|
|
485
|
+
"tel-country-code": { type: "tel", autocomplete: "tel-country-code" },
|
|
486
|
+
"tel-national": { type: "tel", autocomplete: "tel-national" },
|
|
487
|
+
"tel-area-code": { type: "tel", autocomplete: "tel-area-code" },
|
|
488
|
+
"tel-local": { type: "tel", autocomplete: "tel-local" },
|
|
489
|
+
"tel-extension": { type: "tel", autocomplete: "tel-extension" },
|
|
490
|
+
// Address related
|
|
491
|
+
"street-address": { type: "text", autocomplete: "street-address" },
|
|
492
|
+
"address-line1": { type: "text", autocomplete: "address-line1" },
|
|
493
|
+
"address-line2": { type: "text", autocomplete: "address-line2" },
|
|
494
|
+
"address-line3": { type: "text", autocomplete: "address-line3" },
|
|
495
|
+
"address-level1": { type: "text", autocomplete: "address-level1" },
|
|
496
|
+
"address-level2": { type: "text", autocomplete: "address-level2" },
|
|
497
|
+
"address-level3": { type: "text", autocomplete: "address-level3" },
|
|
498
|
+
"address-level4": { type: "text", autocomplete: "address-level4" },
|
|
499
|
+
country: { type: "text", autocomplete: "country" },
|
|
500
|
+
"country-name": { type: "text", autocomplete: "country-name" },
|
|
501
|
+
"postal-code": { type: "text", autocomplete: "postal-code" },
|
|
502
|
+
// Credit card related
|
|
503
|
+
"cc-name": { type: "text", autocomplete: "cc-name" },
|
|
504
|
+
"cc-given-name": { type: "text", autocomplete: "cc-given-name" },
|
|
505
|
+
"cc-additional-name": { type: "text", autocomplete: "cc-additional-name" },
|
|
506
|
+
"cc-family-name": { type: "text", autocomplete: "cc-family-name" },
|
|
507
|
+
"cc-number": { type: "text", autocomplete: "cc-number" },
|
|
508
|
+
"cc-exp": { type: "text", autocomplete: "cc-exp" },
|
|
509
|
+
"cc-exp-month": { type: "number", autocomplete: "cc-exp-month" },
|
|
510
|
+
"cc-exp-year": { type: "number", autocomplete: "cc-exp-year" },
|
|
511
|
+
"cc-csc": { type: "text", autocomplete: "cc-csc" },
|
|
512
|
+
"cc-type": { type: "text", autocomplete: "cc-type" },
|
|
513
|
+
// Date related
|
|
514
|
+
bday: { type: "date", autocomplete: "bday" },
|
|
515
|
+
"bday-day": { type: "number", autocomplete: "bday-day" },
|
|
516
|
+
"bday-month": { type: "number", autocomplete: "bday-month" },
|
|
517
|
+
"bday-year": { type: "number", autocomplete: "bday-year" },
|
|
518
|
+
// Login related
|
|
519
|
+
username: { type: "text", autocomplete: "username" },
|
|
520
|
+
"new-password": { type: "password", autocomplete: "new-password" },
|
|
521
|
+
"current-password": { type: "password", autocomplete: "current-password" },
|
|
522
|
+
"one-time-code": { type: "text", autocomplete: "one-time-code" },
|
|
523
|
+
// Transaction related
|
|
524
|
+
"transaction-currency": { type: "text", autocomplete: "transaction-currency" },
|
|
525
|
+
"transaction-amount": { type: "number", autocomplete: "transaction-amount" },
|
|
526
|
+
// Other
|
|
527
|
+
url: { type: "url", autocomplete: "url" },
|
|
528
|
+
photo: { type: "url", autocomplete: "photo" },
|
|
529
|
+
sex: { type: "text", autocomplete: "sex" },
|
|
530
|
+
"organization-title": { type: "text", autocomplete: "organization-title" },
|
|
531
|
+
organization: { type: "text", autocomplete: "organization" },
|
|
532
|
+
language: { type: "text", autocomplete: "language" }
|
|
533
|
+
}[e] || t : t;
|
|
468
534
|
}, Me = (e) => {
|
|
469
|
-
const {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
label: l,
|
|
473
|
-
placeholder: r,
|
|
474
|
-
styles: n,
|
|
475
|
-
inputStyles: i,
|
|
476
|
-
showLabel: a,
|
|
477
|
-
required: c,
|
|
478
|
-
inputType: m,
|
|
479
|
-
autocomplete: k
|
|
480
|
-
} = e, g = v();
|
|
481
|
-
return a ? /* @__PURE__ */ f("div", { ...n, ...o, children: [
|
|
482
|
-
a && /* @__PURE__ */ s("label", { htmlFor: g, children: l }),
|
|
535
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, showLabel: a, required: c, inputType: m } = e, k = w(), { type: b, autocomplete: y } = Ae(m);
|
|
536
|
+
return a ? /* @__PURE__ */ f("div", { ...n, ...t, children: [
|
|
537
|
+
a && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
|
|
483
538
|
/* @__PURE__ */ s(
|
|
484
539
|
"input",
|
|
485
540
|
{
|
|
486
|
-
name:
|
|
541
|
+
name: o,
|
|
487
542
|
...i,
|
|
488
|
-
id:
|
|
489
|
-
type:
|
|
543
|
+
id: k,
|
|
544
|
+
type: b,
|
|
490
545
|
placeholder: r,
|
|
491
546
|
required: c,
|
|
492
|
-
autoComplete:
|
|
547
|
+
autoComplete: y
|
|
493
548
|
}
|
|
494
549
|
)
|
|
495
550
|
] }) : /* @__PURE__ */ s(
|
|
496
551
|
"input",
|
|
497
552
|
{
|
|
498
|
-
id:
|
|
499
|
-
name:
|
|
500
|
-
...
|
|
553
|
+
id: k,
|
|
554
|
+
name: o,
|
|
555
|
+
...t,
|
|
501
556
|
...i,
|
|
502
557
|
...n,
|
|
503
|
-
type:
|
|
558
|
+
type: b,
|
|
504
559
|
placeholder: r,
|
|
505
560
|
required: c,
|
|
506
|
-
autoComplete:
|
|
561
|
+
autoComplete: y
|
|
507
562
|
}
|
|
508
563
|
);
|
|
509
564
|
}, Ee = {
|
|
510
565
|
type: "Input",
|
|
511
566
|
label: "web_blocks.input",
|
|
512
567
|
category: "core",
|
|
513
|
-
icon:
|
|
568
|
+
icon: A,
|
|
514
569
|
group: "form",
|
|
515
570
|
...u({
|
|
516
571
|
properties: {
|
|
@@ -521,6 +576,73 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
521
576
|
title: "Field Name",
|
|
522
577
|
default: "fieldName"
|
|
523
578
|
},
|
|
579
|
+
inputType: {
|
|
580
|
+
type: "string",
|
|
581
|
+
title: "Type",
|
|
582
|
+
default: "email",
|
|
583
|
+
oneOf: [
|
|
584
|
+
// Basic HTML input types
|
|
585
|
+
{ const: "text", title: "Text" },
|
|
586
|
+
{ const: "email", title: "Email" },
|
|
587
|
+
{ const: "password", title: "Password" },
|
|
588
|
+
{ const: "number", title: "Number" },
|
|
589
|
+
{ const: "tel", title: "Telephone" },
|
|
590
|
+
{ const: "hidden", title: "Hidden" },
|
|
591
|
+
{ const: "range", title: "Range" },
|
|
592
|
+
{ const: "color", title: "Color" },
|
|
593
|
+
{ const: "date", title: "Date" },
|
|
594
|
+
{ const: "time", title: "Time" },
|
|
595
|
+
{ const: "url", title: "URL" },
|
|
596
|
+
// Name related
|
|
597
|
+
{ const: "name", title: "Name" },
|
|
598
|
+
// Contact related
|
|
599
|
+
{ const: "tel-country-code", title: "Telephone Country Code" },
|
|
600
|
+
{ const: "tel-national", title: "Telephone National" },
|
|
601
|
+
{ const: "tel-area-code", title: "Telephone Area Code" },
|
|
602
|
+
{ const: "tel-local", title: "Telephone Local" },
|
|
603
|
+
{ const: "tel-extension", title: "Telephone Extension" },
|
|
604
|
+
// Address related
|
|
605
|
+
{ const: "street-address", title: "Street Address" },
|
|
606
|
+
{ const: "address-line1", title: "Address Line 1" },
|
|
607
|
+
{ const: "address-line2", title: "Address Line 2" },
|
|
608
|
+
{ const: "address-line3", title: "Address Line 3" },
|
|
609
|
+
{ const: "address-level1", title: "Address Level 1" },
|
|
610
|
+
{ const: "address-level2", title: "Address Level 2" },
|
|
611
|
+
{ const: "address-level3", title: "Address Level 3" },
|
|
612
|
+
{ const: "address-level4", title: "Address Level 4" },
|
|
613
|
+
{ const: "country", title: "Country" },
|
|
614
|
+
{ const: "country-name", title: "Country Name" },
|
|
615
|
+
{ const: "postal-code", title: "Postal Code" },
|
|
616
|
+
// Credit card related
|
|
617
|
+
{ const: "cc-name", title: "Credit Card Name" },
|
|
618
|
+
{ const: "cc-number", title: "Credit Card Number" },
|
|
619
|
+
{ const: "cc-exp", title: "Credit Card Expiry" },
|
|
620
|
+
{ const: "cc-exp-month", title: "Credit Card Expiry Month" },
|
|
621
|
+
{ const: "cc-exp-year", title: "Credit Card Expiry Year" },
|
|
622
|
+
{ const: "cc-csc", title: "Credit Card CSC" },
|
|
623
|
+
{ const: "cc-type", title: "Credit Card Type" },
|
|
624
|
+
// Date related
|
|
625
|
+
{ const: "bday", title: "Birthday" },
|
|
626
|
+
{ const: "bday-day", title: "Birthday Day" },
|
|
627
|
+
{ const: "bday-month", title: "Birthday Month" },
|
|
628
|
+
{ const: "bday-year", title: "Birthday Year" },
|
|
629
|
+
// Login related
|
|
630
|
+
{ const: "username", title: "Username" },
|
|
631
|
+
{ const: "new-password", title: "New Password" },
|
|
632
|
+
{ const: "current-password", title: "Current Password" },
|
|
633
|
+
{ const: "one-time-code", title: "One Time Code" },
|
|
634
|
+
// Transaction related
|
|
635
|
+
{ const: "transaction-currency", title: "Transaction Currency" },
|
|
636
|
+
{ const: "transaction-amount", title: "Transaction Amount" },
|
|
637
|
+
// Other
|
|
638
|
+
{ const: "url", title: "URL" },
|
|
639
|
+
{ const: "photo", title: "Photo" },
|
|
640
|
+
{ const: "sex", title: "Sex" },
|
|
641
|
+
{ const: "organization-title", title: "Organization Title" },
|
|
642
|
+
{ const: "organization", title: "Organization" },
|
|
643
|
+
{ const: "language", title: "Language" }
|
|
644
|
+
]
|
|
645
|
+
},
|
|
524
646
|
showLabel: {
|
|
525
647
|
type: "boolean",
|
|
526
648
|
title: "Show Label",
|
|
@@ -538,46 +660,22 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
538
660
|
title: "Placeholder",
|
|
539
661
|
default: "Placeholder"
|
|
540
662
|
},
|
|
541
|
-
inputType: {
|
|
542
|
-
type: "string",
|
|
543
|
-
title: "Input Type",
|
|
544
|
-
default: "text",
|
|
545
|
-
enum: [
|
|
546
|
-
"text",
|
|
547
|
-
"email",
|
|
548
|
-
"password",
|
|
549
|
-
"number",
|
|
550
|
-
"tel",
|
|
551
|
-
"hidden",
|
|
552
|
-
"range",
|
|
553
|
-
"color",
|
|
554
|
-
"date",
|
|
555
|
-
"time",
|
|
556
|
-
"name",
|
|
557
|
-
"postal-code"
|
|
558
|
-
]
|
|
559
|
-
},
|
|
560
663
|
required: {
|
|
561
664
|
type: "boolean",
|
|
562
665
|
title: "Required",
|
|
563
666
|
default: !1
|
|
564
|
-
},
|
|
565
|
-
autocomplete: {
|
|
566
|
-
type: "boolean",
|
|
567
|
-
title: "Autocomplete",
|
|
568
|
-
default: !0
|
|
569
667
|
}
|
|
570
668
|
}
|
|
571
669
|
}),
|
|
572
670
|
aiProps: ["label", "placeholder"],
|
|
573
671
|
i18nProps: ["label", "placeholder"]
|
|
574
|
-
},
|
|
575
|
-
const { blockProps:
|
|
576
|
-
return r ?
|
|
672
|
+
}, $e = (e) => {
|
|
673
|
+
const { blockProps: t, content: o, styles: l, children: r } = e, n = { ...l, ...t };
|
|
674
|
+
return r ? g.createElement("label", n, r) : g.createElement("label", {
|
|
577
675
|
...n,
|
|
578
|
-
dangerouslySetInnerHTML: { __html:
|
|
676
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
579
677
|
});
|
|
580
|
-
},
|
|
678
|
+
}, He = {
|
|
581
679
|
type: "Label",
|
|
582
680
|
label: "Label",
|
|
583
681
|
category: "core",
|
|
@@ -595,25 +693,25 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
595
693
|
}),
|
|
596
694
|
aiProps: ["content"],
|
|
597
695
|
i18nProps: ["content"]
|
|
598
|
-
},
|
|
599
|
-
const { blockProps:
|
|
600
|
-
return c ? /* @__PURE__ */ f("div", { ...r, ...
|
|
601
|
-
/* @__PURE__ */ s("input", { ...n, name:
|
|
696
|
+
}, ze = (e) => {
|
|
697
|
+
const { blockProps: t, fieldName: o, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e, m = w();
|
|
698
|
+
return c ? /* @__PURE__ */ f("div", { ...r, ...t, children: [
|
|
699
|
+
/* @__PURE__ */ s("input", { ...n, name: o, id: m, type: "radio", required: i, defaultChecked: a }),
|
|
602
700
|
l && /* @__PURE__ */ s("label", { htmlFor: m, children: l })
|
|
603
701
|
] }) : /* @__PURE__ */ s(
|
|
604
702
|
"input",
|
|
605
703
|
{
|
|
606
704
|
id: m,
|
|
607
|
-
...
|
|
705
|
+
...t,
|
|
608
706
|
...n,
|
|
609
707
|
...r,
|
|
610
708
|
type: "radio",
|
|
611
709
|
required: i,
|
|
612
710
|
checked: a,
|
|
613
|
-
name:
|
|
711
|
+
name: o
|
|
614
712
|
}
|
|
615
713
|
);
|
|
616
|
-
},
|
|
714
|
+
}, De = {
|
|
617
715
|
type: "Radio",
|
|
618
716
|
label: "web_blocks.radio",
|
|
619
717
|
category: "core",
|
|
@@ -652,23 +750,23 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
652
750
|
}),
|
|
653
751
|
aiProps: ["label"],
|
|
654
752
|
i18nProps: ["label"]
|
|
655
|
-
},
|
|
656
|
-
const { blockProps:
|
|
657
|
-
return c ? /* @__PURE__ */ f("div", { ...n, ...
|
|
658
|
-
c && /* @__PURE__ */ s("label", { htmlFor:
|
|
659
|
-
/* @__PURE__ */ f("select", { ...i, id:
|
|
753
|
+
}, je = (e) => {
|
|
754
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, required: a, showLabel: c, _multiple: m, options: k } = e, b = w();
|
|
755
|
+
return c ? /* @__PURE__ */ f("div", { ...n, ...t, children: [
|
|
756
|
+
c && /* @__PURE__ */ s("label", { htmlFor: b, children: l }),
|
|
757
|
+
/* @__PURE__ */ f("select", { ...i, id: b, required: a, multiple: m, name: o, children: [
|
|
660
758
|
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
661
759
|
S(k, (y) => /* @__PURE__ */ s("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
662
760
|
] })
|
|
663
|
-
] }) : /* @__PURE__ */ f("select", { id:
|
|
761
|
+
] }) : /* @__PURE__ */ f("select", { id: b, ...n, ...t, required: a, multiple: m, name: o, children: [
|
|
664
762
|
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
665
763
|
S(k, (y) => /* @__PURE__ */ s("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
666
764
|
] });
|
|
667
|
-
},
|
|
765
|
+
}, Ue = {
|
|
668
766
|
type: "Select",
|
|
669
767
|
label: "web_blocks.select",
|
|
670
768
|
category: "core",
|
|
671
|
-
icon:
|
|
769
|
+
icon: V,
|
|
672
770
|
group: "form",
|
|
673
771
|
...u({
|
|
674
772
|
properties: {
|
|
@@ -728,14 +826,14 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
728
826
|
}),
|
|
729
827
|
aiProps: ["label", "placeholder"],
|
|
730
828
|
i18nProps: ["label", "placeholder"]
|
|
731
|
-
},
|
|
732
|
-
const { blockProps:
|
|
733
|
-
return c ? /* @__PURE__ */ f("div", { ...n, ...
|
|
829
|
+
}, qe = (e) => {
|
|
830
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, rows: a, showLabel: c, required: m } = e, k = w();
|
|
831
|
+
return c ? /* @__PURE__ */ f("div", { ...n, ...t, children: [
|
|
734
832
|
c && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
|
|
735
833
|
/* @__PURE__ */ s(
|
|
736
834
|
"textarea",
|
|
737
835
|
{
|
|
738
|
-
name:
|
|
836
|
+
name: o,
|
|
739
837
|
...i,
|
|
740
838
|
id: k,
|
|
741
839
|
placeholder: r,
|
|
@@ -747,8 +845,8 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
747
845
|
"textarea",
|
|
748
846
|
{
|
|
749
847
|
id: k,
|
|
750
|
-
name:
|
|
751
|
-
...
|
|
848
|
+
name: o,
|
|
849
|
+
...t,
|
|
752
850
|
...i,
|
|
753
851
|
...n,
|
|
754
852
|
placeholder: r,
|
|
@@ -756,11 +854,11 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
756
854
|
required: m
|
|
757
855
|
}
|
|
758
856
|
);
|
|
759
|
-
},
|
|
857
|
+
}, Fe = {
|
|
760
858
|
type: "TextArea",
|
|
761
859
|
label: "web_blocks.textarea",
|
|
762
860
|
category: "core",
|
|
763
|
-
icon:
|
|
861
|
+
icon: A,
|
|
764
862
|
group: "form",
|
|
765
863
|
...u({
|
|
766
864
|
properties: {
|
|
@@ -801,13 +899,13 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
801
899
|
}),
|
|
802
900
|
aiProps: ["label", "placeholder"],
|
|
803
901
|
i18nProps: ["label", "placeholder"]
|
|
804
|
-
},
|
|
805
|
-
const { blockProps:
|
|
806
|
-
return
|
|
902
|
+
}, Ve = (e) => {
|
|
903
|
+
const { blockProps: t, inBuilder: o, children: l, globalBlock: r } = e;
|
|
904
|
+
return o && !r ? /* @__PURE__ */ f(
|
|
807
905
|
"div",
|
|
808
906
|
{
|
|
809
907
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
810
|
-
...
|
|
908
|
+
...t,
|
|
811
909
|
children: [
|
|
812
910
|
/* @__PURE__ */ f("h1", { children: [
|
|
813
911
|
"Global Block - ",
|
|
@@ -816,12 +914,12 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
816
914
|
/* @__PURE__ */ s("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
817
915
|
]
|
|
818
916
|
}
|
|
819
|
-
) :
|
|
820
|
-
},
|
|
917
|
+
) : g.createElement("span", { ...t }, l);
|
|
918
|
+
}, Oe = {
|
|
821
919
|
type: "GlobalBlock",
|
|
822
920
|
description: "A global block component",
|
|
823
921
|
label: "Global Block",
|
|
824
|
-
icon:
|
|
922
|
+
icon: E,
|
|
825
923
|
category: "core",
|
|
826
924
|
group: "basic",
|
|
827
925
|
hidden: !0,
|
|
@@ -836,18 +934,18 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
836
934
|
}
|
|
837
935
|
})
|
|
838
936
|
}, Ge = (e) => {
|
|
839
|
-
const { blockProps:
|
|
840
|
-
return n ?
|
|
841
|
-
...t,
|
|
937
|
+
const { blockProps: t, styles: o, content: l, tag: r = "h1", children: n = null } = e;
|
|
938
|
+
return n ? g.createElement(r, { ...o, ...t }, n) : g.createElement(r, {
|
|
842
939
|
...o,
|
|
940
|
+
...t,
|
|
843
941
|
dangerouslySetInnerHTML: { __html: l }
|
|
844
942
|
});
|
|
845
|
-
},
|
|
943
|
+
}, Ye = {
|
|
846
944
|
type: "Heading",
|
|
847
945
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
848
946
|
label: "Heading",
|
|
849
947
|
category: "core",
|
|
850
|
-
icon:
|
|
948
|
+
icon: O,
|
|
851
949
|
group: "typography",
|
|
852
950
|
...u({
|
|
853
951
|
properties: {
|
|
@@ -869,10 +967,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
869
967
|
aiProps: ["content"],
|
|
870
968
|
i18nProps: ["content"],
|
|
871
969
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
872
|
-
},
|
|
873
|
-
const { blockProps:
|
|
874
|
-
return
|
|
875
|
-
},
|
|
970
|
+
}, We = (e) => {
|
|
971
|
+
const { blockProps: t, styles: o } = e;
|
|
972
|
+
return x("br", { ...t, ...o });
|
|
973
|
+
}, Xe = {
|
|
876
974
|
type: "LineBreak",
|
|
877
975
|
label: "Line Break",
|
|
878
976
|
category: "core",
|
|
@@ -887,41 +985,41 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
887
985
|
canDelete: () => !1,
|
|
888
986
|
canMove: () => !1,
|
|
889
987
|
canDuplicate: () => !1
|
|
890
|
-
}, Xe = (e) => {
|
|
891
|
-
const { blockProps: o, children: t, styles: l } = e;
|
|
892
|
-
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ s(x, {});
|
|
893
988
|
}, Je = (e) => {
|
|
894
|
-
const { blockProps:
|
|
895
|
-
return
|
|
989
|
+
const { blockProps: t, children: o, styles: l } = e;
|
|
990
|
+
return o ? x("table", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
896
991
|
}, Qe = (e) => {
|
|
897
|
-
const { blockProps:
|
|
898
|
-
return
|
|
992
|
+
const { blockProps: t, children: o, styles: l } = e;
|
|
993
|
+
return o ? x("thead", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
899
994
|
}, Ze = (e) => {
|
|
900
|
-
const { blockProps:
|
|
901
|
-
return
|
|
995
|
+
const { blockProps: t, children: o, styles: l } = e;
|
|
996
|
+
return o ? x("tbody", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
902
997
|
}, Ke = (e) => {
|
|
903
|
-
const { blockProps:
|
|
904
|
-
return
|
|
905
|
-
|
|
998
|
+
const { blockProps: t, children: o, styles: l } = e;
|
|
999
|
+
return o ? x("tr", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
1000
|
+
}, et = (e) => {
|
|
1001
|
+
const { blockProps: t, children: o, content: l, styles: r } = e;
|
|
1002
|
+
return !o && C(l) ? /* @__PURE__ */ s(v, {}) : o ? x("td", { ...t, ...r }, o) : x("td", {
|
|
1003
|
+
...t,
|
|
906
1004
|
...r,
|
|
907
1005
|
dangerouslySetInnerHTML: { __html: l }
|
|
908
1006
|
});
|
|
909
1007
|
};
|
|
910
|
-
p(
|
|
1008
|
+
p(Je, {
|
|
911
1009
|
type: "Table",
|
|
912
1010
|
label: "Table",
|
|
913
1011
|
category: "core",
|
|
914
1012
|
group: "table",
|
|
915
1013
|
hidden: !0,
|
|
916
|
-
icon:
|
|
1014
|
+
icon: G,
|
|
917
1015
|
...u({
|
|
918
1016
|
properties: {
|
|
919
1017
|
styles: d("")
|
|
920
1018
|
}
|
|
921
1019
|
}),
|
|
922
|
-
blocks:
|
|
1020
|
+
blocks: L("Table")
|
|
923
1021
|
});
|
|
924
|
-
p(
|
|
1022
|
+
p(Qe, {
|
|
925
1023
|
type: "TableHead",
|
|
926
1024
|
label: "Table Head",
|
|
927
1025
|
category: "core",
|
|
@@ -933,9 +1031,9 @@ p(Je, {
|
|
|
933
1031
|
styles: d("")
|
|
934
1032
|
}
|
|
935
1033
|
}),
|
|
936
|
-
blocks:
|
|
1034
|
+
blocks: L("TableHead")
|
|
937
1035
|
});
|
|
938
|
-
p(
|
|
1036
|
+
p(Ze, {
|
|
939
1037
|
type: "TableBody",
|
|
940
1038
|
label: "Table Body",
|
|
941
1039
|
category: "core",
|
|
@@ -947,9 +1045,9 @@ p(Qe, {
|
|
|
947
1045
|
styles: d("")
|
|
948
1046
|
}
|
|
949
1047
|
}),
|
|
950
|
-
blocks:
|
|
1048
|
+
blocks: L("TableBody")
|
|
951
1049
|
});
|
|
952
|
-
p(
|
|
1050
|
+
p(Ke, {
|
|
953
1051
|
type: "TableRow",
|
|
954
1052
|
label: "Table Row",
|
|
955
1053
|
category: "core",
|
|
@@ -961,9 +1059,9 @@ p(Ze, {
|
|
|
961
1059
|
styles: d("")
|
|
962
1060
|
}
|
|
963
1061
|
}),
|
|
964
|
-
blocks:
|
|
1062
|
+
blocks: L("TableRow")
|
|
965
1063
|
});
|
|
966
|
-
p(
|
|
1064
|
+
p(et, {
|
|
967
1065
|
type: "TableCell",
|
|
968
1066
|
label: "Table Cell",
|
|
969
1067
|
category: "core",
|
|
@@ -981,41 +1079,41 @@ p(Ke, {
|
|
|
981
1079
|
}
|
|
982
1080
|
}
|
|
983
1081
|
}),
|
|
984
|
-
blocks:
|
|
1082
|
+
blocks: L("TableCell"),
|
|
985
1083
|
i18nProps: ["content"],
|
|
986
1084
|
aiProps: ["content"]
|
|
987
1085
|
});
|
|
988
|
-
function
|
|
989
|
-
const
|
|
990
|
-
_id:
|
|
1086
|
+
function L(e) {
|
|
1087
|
+
const t = (n, i) => ({
|
|
1088
|
+
_id: w(),
|
|
991
1089
|
_parent: n,
|
|
992
1090
|
_type: "TableCell",
|
|
993
1091
|
styles: "#styles:,",
|
|
994
1092
|
content: `${e === "TableHead" ? "Table Head" : "Table Cell " + i}`
|
|
995
|
-
}),
|
|
996
|
-
const i =
|
|
1093
|
+
}), o = (n) => {
|
|
1094
|
+
const i = w(), a = {
|
|
997
1095
|
_type: "TableRow",
|
|
998
1096
|
_id: i,
|
|
999
1097
|
styles: "#styles:,border-b"
|
|
1000
1098
|
};
|
|
1001
|
-
return n && (a._parent = n), [a,
|
|
1099
|
+
return n && (a._parent = n), [a, t(i, "1"), t(i, "2"), t(i, "3")];
|
|
1002
1100
|
}, l = (n) => {
|
|
1003
|
-
const i =
|
|
1101
|
+
const i = w(), a = {
|
|
1004
1102
|
_id: i,
|
|
1005
1103
|
_type: "TableHead",
|
|
1006
1104
|
styles: "#styles:,font-medium"
|
|
1007
1105
|
};
|
|
1008
|
-
return n && (a._parent = n), [a, ...
|
|
1106
|
+
return n && (a._parent = n), [a, ...o(i)];
|
|
1009
1107
|
}, r = (n) => {
|
|
1010
|
-
const i =
|
|
1108
|
+
const i = w(), a = {
|
|
1011
1109
|
_id: i,
|
|
1012
1110
|
_type: "TableBody",
|
|
1013
1111
|
styles: "#styles:,"
|
|
1014
1112
|
};
|
|
1015
|
-
return n && (a._parent = n), [a, ...
|
|
1113
|
+
return n && (a._parent = n), [a, ...o(i), ...o(i)];
|
|
1016
1114
|
};
|
|
1017
1115
|
if (e === "Table") {
|
|
1018
|
-
const n =
|
|
1116
|
+
const n = w();
|
|
1019
1117
|
return [
|
|
1020
1118
|
{
|
|
1021
1119
|
_id: n,
|
|
@@ -1026,18 +1124,18 @@ function I(e) {
|
|
|
1026
1124
|
...r(n)
|
|
1027
1125
|
];
|
|
1028
1126
|
}
|
|
1029
|
-
return e === "TableRow" ?
|
|
1127
|
+
return e === "TableRow" ? o() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1030
1128
|
}
|
|
1031
|
-
const $ = (e, ...
|
|
1129
|
+
const $ = (e, ...t) => ({
|
|
1032
1130
|
...e,
|
|
1033
|
-
className: B(e.className, ...
|
|
1034
|
-
}),
|
|
1035
|
-
const { blockProps:
|
|
1036
|
-
if (C(
|
|
1037
|
-
return /* @__PURE__ */ s(
|
|
1038
|
-
const c =
|
|
1039
|
-
return
|
|
1040
|
-
...
|
|
1131
|
+
className: B(e.className, ...t)
|
|
1132
|
+
}), tt = (e) => {
|
|
1133
|
+
const { blockProps: t, icon: o, styles: l, width: r, inBuilder: n, height: i } = e, a = $(l, "");
|
|
1134
|
+
if (C(o))
|
|
1135
|
+
return /* @__PURE__ */ s(v, { inBuilder: n, className: "h-8 w-14" });
|
|
1136
|
+
const c = o.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
1137
|
+
return g.createElement("span", {
|
|
1138
|
+
...t,
|
|
1041
1139
|
...a,
|
|
1042
1140
|
style: {
|
|
1043
1141
|
width: r ? `${r}px` : "auto",
|
|
@@ -1045,7 +1143,7 @@ const $ = (e, ...o) => ({
|
|
|
1045
1143
|
},
|
|
1046
1144
|
dangerouslySetInnerHTML: { __html: c }
|
|
1047
1145
|
});
|
|
1048
|
-
},
|
|
1146
|
+
}, ot = {
|
|
1049
1147
|
type: "Icon",
|
|
1050
1148
|
label: "web_blocks.icon",
|
|
1051
1149
|
category: "core",
|
|
@@ -1072,16 +1170,16 @@ const $ = (e, ...o) => ({
|
|
|
1072
1170
|
}
|
|
1073
1171
|
}
|
|
1074
1172
|
})
|
|
1075
|
-
},
|
|
1076
|
-
const { blockProps:
|
|
1077
|
-
return C(
|
|
1173
|
+
}, lt = (e) => {
|
|
1174
|
+
const { blockProps: t, image: o, mobileImage: l, styles: r, alt: n, height: i, width: a, lazyLoading: c } = e;
|
|
1175
|
+
return C(o) ? /* @__PURE__ */ s(v, { className: "h-36" }) : /* @__PURE__ */ f("picture", { children: [
|
|
1078
1176
|
l && /* @__PURE__ */ s("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
1079
1177
|
/* @__PURE__ */ s(
|
|
1080
1178
|
"img",
|
|
1081
1179
|
{
|
|
1082
|
-
...
|
|
1180
|
+
...t,
|
|
1083
1181
|
...r,
|
|
1084
|
-
src:
|
|
1182
|
+
src: o,
|
|
1085
1183
|
alt: n,
|
|
1086
1184
|
loading: c ? "lazy" : "eager",
|
|
1087
1185
|
width: a,
|
|
@@ -1089,7 +1187,7 @@ const $ = (e, ...o) => ({
|
|
|
1089
1187
|
}
|
|
1090
1188
|
)
|
|
1091
1189
|
] });
|
|
1092
|
-
},
|
|
1190
|
+
}, rt = {
|
|
1093
1191
|
type: "Image",
|
|
1094
1192
|
description: "A image component",
|
|
1095
1193
|
label: "Image",
|
|
@@ -1144,29 +1242,29 @@ const $ = (e, ...o) => ({
|
|
|
1144
1242
|
}),
|
|
1145
1243
|
aiProps: ["alt"],
|
|
1146
1244
|
i18nProps: ["alt"]
|
|
1147
|
-
},
|
|
1148
|
-
const { blockProps:
|
|
1245
|
+
}, nt = (e) => {
|
|
1246
|
+
const { blockProps: t, link: o, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1149
1247
|
let a = {};
|
|
1150
|
-
return !l && C(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ s("
|
|
1151
|
-
"
|
|
1248
|
+
return !l && C(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ s("a", { ...t, style: a, ...r, children: l }) : x(
|
|
1249
|
+
"a",
|
|
1152
1250
|
{
|
|
1153
|
-
...
|
|
1251
|
+
...t,
|
|
1154
1252
|
...r,
|
|
1155
1253
|
style: a
|
|
1156
1254
|
},
|
|
1157
1255
|
i
|
|
1158
|
-
) : l ? /* @__PURE__ */ s("a", { "aria-label": i, href: (
|
|
1256
|
+
) : l ? /* @__PURE__ */ s("a", { "aria-label": i, href: (o == null ? void 0 : o.href) || "#/", target: o == null ? void 0 : o.target, ...t, ...r, children: l }) : x(
|
|
1159
1257
|
"a",
|
|
1160
1258
|
{
|
|
1161
|
-
...
|
|
1259
|
+
...t,
|
|
1162
1260
|
...r,
|
|
1163
|
-
href: (
|
|
1164
|
-
target: (
|
|
1261
|
+
href: (o == null ? void 0 : o.href) || "#",
|
|
1262
|
+
target: (o == null ? void 0 : o.target) || "_self",
|
|
1165
1263
|
"aria-label": i
|
|
1166
1264
|
},
|
|
1167
1265
|
i
|
|
1168
1266
|
);
|
|
1169
|
-
},
|
|
1267
|
+
}, it = {
|
|
1170
1268
|
type: "Link",
|
|
1171
1269
|
description: "A link component",
|
|
1172
1270
|
label: "Link",
|
|
@@ -1207,14 +1305,14 @@ const $ = (e, ...o) => ({
|
|
|
1207
1305
|
aiProps: ["content"],
|
|
1208
1306
|
i18nProps: ["content"],
|
|
1209
1307
|
canAcceptBlock: (e) => e !== "Link"
|
|
1210
|
-
},
|
|
1211
|
-
const { blockProps:
|
|
1212
|
-
return !
|
|
1308
|
+
}, st = (e) => {
|
|
1309
|
+
const { blockProps: t, children: o, listType: l, styles: r, tag: n, inBuilder: i } = e, a = B(h(r, "className", ""), l);
|
|
1310
|
+
return !o && C(r == null ? void 0 : r.className) ? /* @__PURE__ */ s(v, { inBuilder: i }) : g.createElement(
|
|
1213
1311
|
n || (l === "list-decimal" ? "ol" : "ul"),
|
|
1214
|
-
{ ...
|
|
1215
|
-
|
|
1312
|
+
{ ...t, ...r, className: a },
|
|
1313
|
+
o
|
|
1216
1314
|
);
|
|
1217
|
-
},
|
|
1315
|
+
}, at = {
|
|
1218
1316
|
type: "List",
|
|
1219
1317
|
description: "A list component",
|
|
1220
1318
|
label: "List",
|
|
@@ -1261,14 +1359,14 @@ const $ = (e, ...o) => ({
|
|
|
1261
1359
|
content: "Item 3"
|
|
1262
1360
|
}
|
|
1263
1361
|
]
|
|
1264
|
-
},
|
|
1265
|
-
const { blockProps:
|
|
1266
|
-
return r ?
|
|
1362
|
+
}, ct = (e) => {
|
|
1363
|
+
const { blockProps: t, content: o, styles: l, children: r, tag: n } = e;
|
|
1364
|
+
return r ? g.createElement(n || "li", { ...l, ...t }, r) : g.createElement(n || "li", {
|
|
1267
1365
|
...l,
|
|
1268
|
-
...
|
|
1269
|
-
dangerouslySetInnerHTML: { __html:
|
|
1366
|
+
...t,
|
|
1367
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
1270
1368
|
});
|
|
1271
|
-
},
|
|
1369
|
+
}, pt = {
|
|
1272
1370
|
type: "ListItem",
|
|
1273
1371
|
description: "A list item component",
|
|
1274
1372
|
label: "List Item",
|
|
@@ -1292,14 +1390,14 @@ const $ = (e, ...o) => ({
|
|
|
1292
1390
|
aiProps: ["content"],
|
|
1293
1391
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1294
1392
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1295
|
-
},
|
|
1296
|
-
const { blockProps:
|
|
1297
|
-
return ie(e.children) ?
|
|
1298
|
-
...t,
|
|
1393
|
+
}, dt = (e) => {
|
|
1394
|
+
const { blockProps: t, styles: o, content: l } = e;
|
|
1395
|
+
return ie(e.children) ? g.createElement("p", {
|
|
1299
1396
|
...o,
|
|
1397
|
+
...t,
|
|
1300
1398
|
dangerouslySetInnerHTML: { __html: l }
|
|
1301
|
-
}) :
|
|
1302
|
-
},
|
|
1399
|
+
}) : g.createElement("p", { ...o, ...t }, e.children);
|
|
1400
|
+
}, ut = {
|
|
1303
1401
|
type: "Paragraph",
|
|
1304
1402
|
description: "A paragraph component",
|
|
1305
1403
|
label: "Paragraph",
|
|
@@ -1320,13 +1418,13 @@ const $ = (e, ...o) => ({
|
|
|
1320
1418
|
i18nProps: ["content"],
|
|
1321
1419
|
aiProps: ["content"],
|
|
1322
1420
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1323
|
-
},
|
|
1324
|
-
const { blockProps:
|
|
1325
|
-
return
|
|
1421
|
+
}, mt = (e) => {
|
|
1422
|
+
const { blockProps: t, inBuilder: o, children: l, partialBlockId: r } = e;
|
|
1423
|
+
return o && !r ? /* @__PURE__ */ f(
|
|
1326
1424
|
"div",
|
|
1327
1425
|
{
|
|
1328
1426
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1329
|
-
...
|
|
1427
|
+
...t,
|
|
1330
1428
|
children: [
|
|
1331
1429
|
/* @__PURE__ */ f("h1", { children: [
|
|
1332
1430
|
"Partial Block - ",
|
|
@@ -1335,12 +1433,12 @@ const $ = (e, ...o) => ({
|
|
|
1335
1433
|
/* @__PURE__ */ s("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1336
1434
|
]
|
|
1337
1435
|
}
|
|
1338
|
-
) :
|
|
1339
|
-
},
|
|
1436
|
+
) : g.createElement("span", { ...t }, l);
|
|
1437
|
+
}, yt = {
|
|
1340
1438
|
type: "PartialBlock",
|
|
1341
1439
|
description: "A partial block component",
|
|
1342
1440
|
label: "Partial Block",
|
|
1343
|
-
icon:
|
|
1441
|
+
icon: E,
|
|
1344
1442
|
category: "core",
|
|
1345
1443
|
group: "basic",
|
|
1346
1444
|
hidden: !0,
|
|
@@ -1354,7 +1452,7 @@ const $ = (e, ...o) => ({
|
|
|
1354
1452
|
}
|
|
1355
1453
|
}
|
|
1356
1454
|
})
|
|
1357
|
-
},
|
|
1455
|
+
}, I = {
|
|
1358
1456
|
SMALL: {
|
|
1359
1457
|
1: "col-span-1",
|
|
1360
1458
|
2: "col-span-2",
|
|
@@ -1397,15 +1495,15 @@ const $ = (e, ...o) => ({
|
|
|
1397
1495
|
11: "lg:col-span-11",
|
|
1398
1496
|
12: "lg:col-span-12"
|
|
1399
1497
|
}
|
|
1400
|
-
},
|
|
1401
|
-
const { blockProps:
|
|
1498
|
+
}, gt = (e) => {
|
|
1499
|
+
const { blockProps: t, children: o, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1402
1500
|
h(l, "className", ""),
|
|
1403
|
-
h(
|
|
1404
|
-
n ? h(
|
|
1405
|
-
i ? h(
|
|
1501
|
+
h(I, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1502
|
+
n ? h(I, ["MEDIUM", n || r], "") : "",
|
|
1503
|
+
i ? h(I, ["LARGE", n || r], "") : ""
|
|
1406
1504
|
].join(" ") };
|
|
1407
|
-
return /* @__PURE__ */ s("div", { ...
|
|
1408
|
-
},
|
|
1505
|
+
return /* @__PURE__ */ s("div", { ...t, ...l, ...c, children: o || /* @__PURE__ */ s("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1506
|
+
}, bt = {
|
|
1409
1507
|
type: "Column",
|
|
1410
1508
|
description: "A column component",
|
|
1411
1509
|
label: "Column",
|
|
@@ -1441,10 +1539,10 @@ const $ = (e, ...o) => ({
|
|
|
1441
1539
|
}
|
|
1442
1540
|
}
|
|
1443
1541
|
})
|
|
1444
|
-
},
|
|
1445
|
-
const { blockProps:
|
|
1446
|
-
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ s("div", { ...
|
|
1447
|
-
},
|
|
1542
|
+
}, ft = (e) => {
|
|
1543
|
+
const { blockProps: t, children: o, styles: l, gutter: r } = e, i = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1544
|
+
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ s("div", { ...t, ...l, ...i, children: o });
|
|
1545
|
+
}, ht = {
|
|
1448
1546
|
type: "Row",
|
|
1449
1547
|
description: "A row component",
|
|
1450
1548
|
label: "Row",
|
|
@@ -1475,14 +1573,14 @@ const $ = (e, ...o) => ({
|
|
|
1475
1573
|
}
|
|
1476
1574
|
}
|
|
1477
1575
|
})
|
|
1478
|
-
},
|
|
1479
|
-
const { blockProps:
|
|
1576
|
+
}, kt = (e) => {
|
|
1577
|
+
const { blockProps: t, content: o, styles: l } = e, r = $(
|
|
1480
1578
|
l,
|
|
1481
1579
|
"prose dark:prose-invert prose-p:m-0 prose-p:min-h-[1rem] prose-blockquote:m-2 prose-blockquote:ml-4 prose-ul:m-0 prose-ol:m-0 prose-li:m-0",
|
|
1482
1580
|
"max-w-full"
|
|
1483
1581
|
);
|
|
1484
|
-
return /* @__PURE__ */ s("div", { ...
|
|
1485
|
-
},
|
|
1582
|
+
return /* @__PURE__ */ s("div", { ...t, ...r, dangerouslySetInnerHTML: { __html: o } });
|
|
1583
|
+
}, xt = {
|
|
1486
1584
|
type: "RichText",
|
|
1487
1585
|
description: "A rich text block",
|
|
1488
1586
|
label: "Rich Text",
|
|
@@ -1503,13 +1601,13 @@ const $ = (e, ...o) => ({
|
|
|
1503
1601
|
aiProps: ["content"],
|
|
1504
1602
|
i18nProps: ["content"]
|
|
1505
1603
|
}, wt = (e) => {
|
|
1506
|
-
const { blockProps:
|
|
1507
|
-
return r ?
|
|
1508
|
-
...t,
|
|
1604
|
+
const { blockProps: t, styles: o, content: l, children: r = null, tag: n } = e;
|
|
1605
|
+
return r ? g.createElement("span", { ...o, ...t }, r) : g.createElement(n || "span", {
|
|
1509
1606
|
...o,
|
|
1607
|
+
...t,
|
|
1510
1608
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1511
1609
|
});
|
|
1512
|
-
},
|
|
1610
|
+
}, Ct = {
|
|
1513
1611
|
type: "Span",
|
|
1514
1612
|
description: "A span component",
|
|
1515
1613
|
label: "Span",
|
|
@@ -1529,7 +1627,7 @@ const $ = (e, ...o) => ({
|
|
|
1529
1627
|
aiProps: ["content"],
|
|
1530
1628
|
i18nProps: ["content"],
|
|
1531
1629
|
canAcceptBlock: () => !0
|
|
1532
|
-
},
|
|
1630
|
+
}, vt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Lt = {
|
|
1533
1631
|
type: "Text",
|
|
1534
1632
|
description: "A text component with no styling",
|
|
1535
1633
|
label: "Text",
|
|
@@ -1549,7 +1647,7 @@ const $ = (e, ...o) => ({
|
|
|
1549
1647
|
}),
|
|
1550
1648
|
aiProps: ["content"],
|
|
1551
1649
|
i18nProps: ["content"]
|
|
1552
|
-
},
|
|
1650
|
+
}, Bt = {
|
|
1553
1651
|
type: "object",
|
|
1554
1652
|
title: "Controls",
|
|
1555
1653
|
default: {
|
|
@@ -1580,13 +1678,13 @@ const $ = (e, ...o) => ({
|
|
|
1580
1678
|
default: !1
|
|
1581
1679
|
}
|
|
1582
1680
|
}
|
|
1583
|
-
}, _ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, T = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/,
|
|
1584
|
-
const
|
|
1681
|
+
}, _ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, T = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, It = (e, t) => {
|
|
1682
|
+
const o = h(t, "autoplay", !1), l = h(t, "controls", !1), r = h(t, "loop", !1), n = o || h(t, "muted", !0);
|
|
1585
1683
|
if (_.test(e)) {
|
|
1586
1684
|
const i = e.match(_);
|
|
1587
1685
|
if (i) {
|
|
1588
1686
|
const a = i[4];
|
|
1589
|
-
let c = `https://www.youtube.com/embed/${a}`, m =
|
|
1687
|
+
let c = `https://www.youtube.com/embed/${a}`, m = o ? "autoplay=1" : "";
|
|
1590
1688
|
return m += r ? `&loop=1&playlist=${a}` : "", m += n ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
|
|
1591
1689
|
}
|
|
1592
1690
|
}
|
|
@@ -1595,28 +1693,28 @@ const $ = (e, ...o) => ({
|
|
|
1595
1693
|
if (i) {
|
|
1596
1694
|
const a = i[1];
|
|
1597
1695
|
let c = "";
|
|
1598
|
-
return c +=
|
|
1696
|
+
return c += o ? "autoplay=1" : "", c += l ? "&controls=1" : "&controls=0", c += n ? "&muted=1" : "", c += r ? "&loop=1" : "", `https://player.vimeo.com/video/${a}?${c}`;
|
|
1599
1697
|
}
|
|
1600
1698
|
}
|
|
1601
1699
|
return null;
|
|
1602
|
-
},
|
|
1603
|
-
const { url:
|
|
1700
|
+
}, Pt = (e) => {
|
|
1701
|
+
const { url: t, blockProps: o, styles: l, controls: r, videoSource: n, inBuilder: i } = e, a = It(t, r);
|
|
1604
1702
|
return /* @__PURE__ */ f("div", { ...se(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1605
|
-
!a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(
|
|
1606
|
-
i && /* @__PURE__ */ s("div", { ...
|
|
1703
|
+
!a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(t) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ s("iframe", { width: "100%", src: a, ...ae(l, "className") }),
|
|
1704
|
+
i && /* @__PURE__ */ s("div", { ...o, className: "absolute top-0 h-full w-full" })
|
|
1607
1705
|
] });
|
|
1608
|
-
},
|
|
1609
|
-
const { url:
|
|
1706
|
+
}, St = (e) => {
|
|
1707
|
+
const { url: t, styles: o, controls: l, sources: r, poster: n, blockProps: i } = e;
|
|
1610
1708
|
let a = n;
|
|
1611
1709
|
const c = [...h(r, "srcsets", []) || []];
|
|
1612
|
-
|
|
1613
|
-
const m = c.sort((
|
|
1710
|
+
t && typeof t == "string" && c.push({ url: t, width: "9999" });
|
|
1711
|
+
const m = c.sort((b, y) => parseInt(b.width) - parseInt(y.width)).filter((b) => !C(b.url) && !C(b.width));
|
|
1614
1712
|
m.length === 0 && !a && (a = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1615
1713
|
const k = h(l, "autoplay", !1) || h(l, "muted", !0);
|
|
1616
|
-
return (a || !C(m)) && /* @__PURE__ */ s("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */
|
|
1714
|
+
return (a || !C(m)) && /* @__PURE__ */ s("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ x(
|
|
1617
1715
|
"video",
|
|
1618
1716
|
{
|
|
1619
|
-
...
|
|
1717
|
+
...o,
|
|
1620
1718
|
...i,
|
|
1621
1719
|
key: JSON.stringify(m),
|
|
1622
1720
|
controls: h(l, "controls", !1),
|
|
@@ -1625,20 +1723,20 @@ const $ = (e, ...o) => ({
|
|
|
1625
1723
|
poster: a,
|
|
1626
1724
|
...k ? { muted: !0 } : {}
|
|
1627
1725
|
},
|
|
1628
|
-
m.map((
|
|
1629
|
-
if (!
|
|
1630
|
-
const y = `(max-width: ${
|
|
1631
|
-
return /* @__PURE__ */ s("source", { src:
|
|
1726
|
+
m.map((b) => {
|
|
1727
|
+
if (!b.url || b.url.length < 4 || isNaN(b.width)) return null;
|
|
1728
|
+
const y = `(max-width: ${b.width}px)`;
|
|
1729
|
+
return /* @__PURE__ */ s("source", { src: b.url, media: y, type: b.type }, b.url);
|
|
1632
1730
|
}),
|
|
1633
1731
|
"Your browser does not support the video tag."
|
|
1634
1732
|
) });
|
|
1635
|
-
},
|
|
1636
|
-
const { videoSource:
|
|
1637
|
-
return
|
|
1733
|
+
}, _t = (e) => {
|
|
1734
|
+
const { videoSource: t } = e;
|
|
1735
|
+
return t === "Custom" ? /* @__PURE__ */ s(St, { ...e }) : t === "Youtube" || t === "Vimeo" ? /* @__PURE__ */ s(Pt, { ...e }) : /* @__PURE__ */ f("div", { children: [
|
|
1638
1736
|
"Invalid video source : ",
|
|
1639
|
-
|
|
1737
|
+
t
|
|
1640
1738
|
] });
|
|
1641
|
-
},
|
|
1739
|
+
}, Tt = {
|
|
1642
1740
|
type: "Video",
|
|
1643
1741
|
label: "Video",
|
|
1644
1742
|
category: "core",
|
|
@@ -1677,7 +1775,7 @@ const $ = (e, ...o) => ({
|
|
|
1677
1775
|
type: "object",
|
|
1678
1776
|
default: { srcsets: [] }
|
|
1679
1777
|
},
|
|
1680
|
-
controls: { ...
|
|
1778
|
+
controls: { ...Bt }
|
|
1681
1779
|
}
|
|
1682
1780
|
}
|
|
1683
1781
|
},
|
|
@@ -1721,24 +1819,24 @@ const $ = (e, ...o) => ({
|
|
|
1721
1819
|
}
|
|
1722
1820
|
}),
|
|
1723
1821
|
i18nProps: ["url"]
|
|
1724
|
-
},
|
|
1725
|
-
const { children:
|
|
1726
|
-
let a =
|
|
1727
|
-
return C(a) && n && (a = /* @__PURE__ */ s("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Choose a collection to display items" })),
|
|
1822
|
+
}, Nt = (e) => {
|
|
1823
|
+
const { children: t, tag: o, styles: l, blockProps: r, inBuilder: n, $loading: i } = e;
|
|
1824
|
+
let a = t;
|
|
1825
|
+
return C(a) && n && (a = /* @__PURE__ */ s("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Choose a collection to display items" })), o === "none" ? i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ f("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1728
1826
|
/* @__PURE__ */ s("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1729
1827
|
/* @__PURE__ */ s("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1730
|
-
] }, m)) : a :
|
|
1731
|
-
|
|
1828
|
+
] }, m)) : a : g.createElement(
|
|
1829
|
+
o,
|
|
1732
1830
|
{ ...r, ...l },
|
|
1733
1831
|
i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ f("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1734
1832
|
/* @__PURE__ */ s("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1735
1833
|
/* @__PURE__ */ s("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1736
1834
|
] }, m)) : a
|
|
1737
1835
|
);
|
|
1738
|
-
},
|
|
1836
|
+
}, Rt = {
|
|
1739
1837
|
type: "Repeater",
|
|
1740
1838
|
label: "Repeater",
|
|
1741
|
-
icon:
|
|
1839
|
+
icon: M,
|
|
1742
1840
|
group: "basic",
|
|
1743
1841
|
dataProviderMode: "live",
|
|
1744
1842
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
@@ -1793,10 +1891,10 @@ const $ = (e, ...o) => ({
|
|
|
1793
1891
|
}
|
|
1794
1892
|
}
|
|
1795
1893
|
})
|
|
1796
|
-
},
|
|
1894
|
+
}, At = ({
|
|
1797
1895
|
children: e,
|
|
1798
|
-
blockProps:
|
|
1799
|
-
styles:
|
|
1896
|
+
blockProps: t,
|
|
1897
|
+
styles: o,
|
|
1800
1898
|
parentTag: l,
|
|
1801
1899
|
inBuilder: r
|
|
1802
1900
|
}) => {
|
|
@@ -1811,15 +1909,15 @@ const $ = (e, ...o) => ({
|
|
|
1811
1909
|
default:
|
|
1812
1910
|
n = "div";
|
|
1813
1911
|
}
|
|
1814
|
-
return !e && r ?
|
|
1912
|
+
return !e && r ? g.createElement(
|
|
1815
1913
|
n,
|
|
1816
|
-
{ ...
|
|
1914
|
+
{ ...t, ...o },
|
|
1817
1915
|
/* @__PURE__ */ s("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Add children to repeater item" })
|
|
1818
|
-
) :
|
|
1916
|
+
) : g.createElement(n, { ...t, ...o }, e);
|
|
1819
1917
|
}, Mt = {
|
|
1820
1918
|
type: "RepeaterItem",
|
|
1821
1919
|
label: "Repeater Item",
|
|
1822
|
-
icon:
|
|
1920
|
+
icon: M,
|
|
1823
1921
|
hidden: !0,
|
|
1824
1922
|
group: "basic",
|
|
1825
1923
|
...u({
|
|
@@ -1834,9 +1932,9 @@ const $ = (e, ...o) => ({
|
|
|
1834
1932
|
canDuplicate: () => !1
|
|
1835
1933
|
}, Et = ({
|
|
1836
1934
|
children: e,
|
|
1837
|
-
blockProps:
|
|
1838
|
-
styles:
|
|
1839
|
-
}) =>
|
|
1935
|
+
blockProps: t,
|
|
1936
|
+
styles: o
|
|
1937
|
+
}) => g.createElement("div", { ...t, ...o }, e), $t = {
|
|
1840
1938
|
type: "RepeaterEmptyState",
|
|
1841
1939
|
label: "Empty State",
|
|
1842
1940
|
hidden: !0,
|
|
@@ -1848,9 +1946,9 @@ const $ = (e, ...o) => ({
|
|
|
1848
1946
|
canDelete: () => !1,
|
|
1849
1947
|
canMove: () => !1,
|
|
1850
1948
|
canDuplicate: () => !1
|
|
1851
|
-
},
|
|
1852
|
-
p(me, ye), p(Be,
|
|
1949
|
+
}, Vt = () => {
|
|
1950
|
+
p(me, ye), p(Be, Ie), p(ge, be), p(Ge, Ye), p(dt, ut), p(wt, Ct), p(kt, xt), p(nt, it), p(st, at), p(ct, pt), p(tt, ot), p(lt, rt), p(_t, Tt), p(ke, xe), p(we, Ce), p(vt, Lt), p(_e, Te), p(Ne, Re), p(Me, Ee), p(Pe, Se), p(ze, De), p(je, Ue), p(qe, Fe), p($e, He), p(We, Xe), p(ve, Le), p(Ve, Oe), p(mt, yt), p(ft, ht), p(gt, bt), p(fe, he), p(Nt, Rt), p(At, Mt), p(Et, $t);
|
|
1853
1951
|
};
|
|
1854
1952
|
export {
|
|
1855
|
-
|
|
1953
|
+
Vt as loadWebBlocks
|
|
1856
1954
|
};
|