@chaibuilder/sdk 2.2.31 → 2.2.33
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/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +454 -345
- 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 ne, VideoIcon as re, 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:
|
|
11
|
-
let a =
|
|
12
|
-
|
|
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: n, tag: r = "div", styles: i } = e;
|
|
11
|
+
let a = n;
|
|
12
|
+
n || (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(r, { ...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,27 +55,27 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
57
|
}, ge = (e) => {
|
|
58
|
-
const { blockProps:
|
|
59
|
-
/* @__PURE__ */ s("span", { "data-ai-key": "content", children:
|
|
58
|
+
const { blockProps: t, iconSize: o, icon: l, content: n, styles: r, children: i, iconPos: a, link: c, inBuilder: m } = e, k = l, b = i || /* @__PURE__ */ f(N, { children: [
|
|
59
|
+
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: n }),
|
|
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
|
-
...
|
|
72
|
-
...
|
|
71
|
+
...t,
|
|
72
|
+
...r,
|
|
73
73
|
type: "button",
|
|
74
|
-
"aria-label":
|
|
74
|
+
"aria-label": n
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
b
|
|
77
77
|
);
|
|
78
|
-
return C(h(c, "href")) ? y : m ? /* @__PURE__ */ s("span", { children: y }) : /* @__PURE__ */ s("a", { "aria-label":
|
|
78
|
+
return C(h(c, "href")) ? y : m ? /* @__PURE__ */ s("span", { children: y }) : /* @__PURE__ */ s("a", { "aria-label": n, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: y });
|
|
79
79
|
}, be = {
|
|
80
80
|
type: "Button",
|
|
81
81
|
description: "similar to a button element in HTML",
|
|
@@ -123,23 +123,28 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
123
123
|
ui: {
|
|
124
124
|
"ui:field": "link"
|
|
125
125
|
}
|
|
126
|
+
},
|
|
127
|
+
prefetchLink: {
|
|
128
|
+
type: "boolean",
|
|
129
|
+
default: !1,
|
|
130
|
+
title: "Prefetch Link"
|
|
126
131
|
}
|
|
127
132
|
}
|
|
128
133
|
}),
|
|
129
134
|
i18nProps: ["content"],
|
|
130
135
|
aiProps: ["content"]
|
|
131
136
|
}, fe = (e) => {
|
|
132
|
-
const { blockProps:
|
|
133
|
-
/* @__PURE__ */ s("span", { "data-ai-key": "content", children:
|
|
134
|
-
i && /* @__PURE__ */ s("div", { style: { width:
|
|
137
|
+
const { blockProps: t, iconSize: o, icon: l, content: n, styles: r } = e, i = l, a = /* @__PURE__ */ f(N, { children: [
|
|
138
|
+
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: n }),
|
|
139
|
+
i && /* @__PURE__ */ s("div", { style: { width: o + "px" }, dangerouslySetInnerHTML: { __html: i } })
|
|
135
140
|
] });
|
|
136
|
-
return
|
|
141
|
+
return x(
|
|
137
142
|
"button",
|
|
138
143
|
{
|
|
139
|
-
...
|
|
140
|
-
...
|
|
144
|
+
...t,
|
|
145
|
+
...r,
|
|
141
146
|
type: "button",
|
|
142
|
-
"aria-label":
|
|
147
|
+
"aria-label": n
|
|
143
148
|
},
|
|
144
149
|
a
|
|
145
150
|
);
|
|
@@ -174,19 +179,19 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
174
179
|
i18nProps: ["content"],
|
|
175
180
|
aiProps: ["content"]
|
|
176
181
|
}, ke = (e) => {
|
|
177
|
-
const { blockProps:
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
...
|
|
182
|
+
const { blockProps: t, styles: o, htmlCode: l, inBuilder: n } = e;
|
|
183
|
+
return n ? /* @__PURE__ */ f("div", { className: "relative", children: [
|
|
184
|
+
n ? /* @__PURE__ */ s("div", { ...t, ...o, className: "absolute z-20 h-full w-full" }) : null,
|
|
185
|
+
g.createElement("div", {
|
|
186
|
+
...o,
|
|
182
187
|
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
183
188
|
})
|
|
184
|
-
] }) :
|
|
185
|
-
...o,
|
|
189
|
+
] }) : g.createElement("div", {
|
|
186
190
|
...t,
|
|
191
|
+
...o,
|
|
187
192
|
dangerouslySetInnerHTML: { __html: l }
|
|
188
193
|
});
|
|
189
|
-
},
|
|
194
|
+
}, xe = {
|
|
190
195
|
type: "CustomHTML",
|
|
191
196
|
description: "similar to a div or section elements in HTML",
|
|
192
197
|
label: "Custom HTML",
|
|
@@ -202,10 +207,11 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
202
207
|
ui: { "ui:widget": "code" }
|
|
203
208
|
}
|
|
204
209
|
}
|
|
205
|
-
})
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
}),
|
|
211
|
+
i18nProps: ["htmlCode"]
|
|
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 } });
|
|
209
215
|
}, Ce = {
|
|
210
216
|
type: "CustomScript",
|
|
211
217
|
description: "similar to a script element in HTML",
|
|
@@ -224,10 +230,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
224
230
|
}
|
|
225
231
|
}
|
|
226
232
|
})
|
|
227
|
-
},
|
|
228
|
-
const { blockProps:
|
|
229
|
-
return
|
|
230
|
-
},
|
|
233
|
+
}, ve = (e) => {
|
|
234
|
+
const { blockProps: t, styles: o } = e;
|
|
235
|
+
return x("hr", { ...o, ...t });
|
|
236
|
+
}, Le = {
|
|
231
237
|
type: "Divider",
|
|
232
238
|
description: "A horizontal line component",
|
|
233
239
|
label: "Divider",
|
|
@@ -240,10 +246,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
240
246
|
}
|
|
241
247
|
})
|
|
242
248
|
}, Be = (e) => {
|
|
243
|
-
const { blockProps:
|
|
244
|
-
let
|
|
245
|
-
return l && (
|
|
246
|
-
},
|
|
249
|
+
const { blockProps: t, styles: o, backgroundImage: l } = e;
|
|
250
|
+
let n = {};
|
|
251
|
+
return l && (n = { backgroundImage: `url(${l})` }), g.createElement("div", { ...t, ...o, style: n });
|
|
252
|
+
}, Ie = {
|
|
247
253
|
type: "EmptyBox",
|
|
248
254
|
description: "A box component with no children",
|
|
249
255
|
label: "Empty Box",
|
|
@@ -261,13 +267,13 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
261
267
|
}
|
|
262
268
|
})
|
|
263
269
|
}, Pe = (e) => {
|
|
264
|
-
const { blockProps:
|
|
265
|
-
return c ? /* @__PURE__ */ f("div", { ...
|
|
270
|
+
const { blockProps: t, fieldName: o, label: l, styles: n, inputStyles: r, required: i, checked: a, showLabel: c = !0 } = e, m = w();
|
|
271
|
+
return c ? /* @__PURE__ */ f("div", { ...n, ...t, children: [
|
|
266
272
|
/* @__PURE__ */ s(
|
|
267
273
|
"input",
|
|
268
274
|
{
|
|
269
|
-
...
|
|
270
|
-
name:
|
|
275
|
+
...r,
|
|
276
|
+
name: o,
|
|
271
277
|
id: m,
|
|
272
278
|
type: "checkbox",
|
|
273
279
|
required: i,
|
|
@@ -279,19 +285,19 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
279
285
|
"input",
|
|
280
286
|
{
|
|
281
287
|
id: m,
|
|
282
|
-
...
|
|
283
|
-
...n,
|
|
288
|
+
...t,
|
|
284
289
|
...r,
|
|
290
|
+
...n,
|
|
285
291
|
type: "checkbox",
|
|
286
292
|
required: i,
|
|
287
|
-
name:
|
|
293
|
+
name: o
|
|
288
294
|
}
|
|
289
295
|
);
|
|
290
296
|
}, Se = {
|
|
291
297
|
type: "Checkbox",
|
|
292
298
|
label: "web_blocks.checkbox",
|
|
293
299
|
category: "core",
|
|
294
|
-
icon:
|
|
300
|
+
icon: U,
|
|
295
301
|
group: "form",
|
|
296
302
|
...u({
|
|
297
303
|
properties: {
|
|
@@ -327,9 +333,9 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
327
333
|
aiProps: ["label"],
|
|
328
334
|
i18nProps: ["label"]
|
|
329
335
|
}, _e = (e) => {
|
|
330
|
-
const { children:
|
|
331
|
-
let c =
|
|
332
|
-
return
|
|
336
|
+
const { children: t, blockProps: o, errorMessage: l, successMessage: n, action: r, styles: i, inBuilder: a } = e;
|
|
337
|
+
let c = t;
|
|
338
|
+
return t || (c = /* @__PURE__ */ s(v, { inBuilder: a })), /* @__PURE__ */ f(
|
|
333
339
|
"form",
|
|
334
340
|
{
|
|
335
341
|
...{
|
|
@@ -337,10 +343,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
337
343
|
"x-on:submit.prevent": "post"
|
|
338
344
|
},
|
|
339
345
|
"data-error": l,
|
|
340
|
-
"data-success":
|
|
346
|
+
"data-success": n,
|
|
341
347
|
method: "post",
|
|
342
|
-
action:
|
|
343
|
-
...
|
|
348
|
+
action: r,
|
|
349
|
+
...o,
|
|
344
350
|
...i,
|
|
345
351
|
children: [
|
|
346
352
|
/* @__PURE__ */ s("div", { ...{
|
|
@@ -393,7 +399,7 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
393
399
|
aiProps: ["errorMessage", "successMessage"],
|
|
394
400
|
canAcceptBlock: () => !0
|
|
395
401
|
}, Ne = (e) => {
|
|
396
|
-
const { blockProps:
|
|
402
|
+
const { blockProps: t, inBuilder: o, label: l, styles: n, inputStyles: r, icon: i, iconSize: a, iconPos: c } = e, m = w();
|
|
397
403
|
return /* @__PURE__ */ f(
|
|
398
404
|
"button",
|
|
399
405
|
{
|
|
@@ -401,10 +407,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
401
407
|
...{
|
|
402
408
|
"x-bind:disabled": "formLoading"
|
|
403
409
|
},
|
|
404
|
-
...n,
|
|
405
410
|
...r,
|
|
406
|
-
...
|
|
407
|
-
|
|
411
|
+
...n,
|
|
412
|
+
...t || {},
|
|
413
|
+
type: o ? "button" : "submit",
|
|
408
414
|
"aria-label": l,
|
|
409
415
|
children: [
|
|
410
416
|
l,
|
|
@@ -459,52 +465,107 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
459
465
|
}),
|
|
460
466
|
i18nProps: ["label"],
|
|
461
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;
|
|
462
534
|
}, Me = (e) => {
|
|
463
|
-
const {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
label: l,
|
|
467
|
-
placeholder: r,
|
|
468
|
-
styles: n,
|
|
469
|
-
inputStyles: i,
|
|
470
|
-
showLabel: a,
|
|
471
|
-
required: c,
|
|
472
|
-
inputType: m,
|
|
473
|
-
autocomplete: k
|
|
474
|
-
} = e, g = v();
|
|
475
|
-
return a ? /* @__PURE__ */ f("div", { ...n, ...o, children: [
|
|
476
|
-
a && /* @__PURE__ */ s("label", { htmlFor: g, children: l }),
|
|
535
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: n, styles: r, inputStyles: i, showLabel: a, required: c, inputType: m } = e, k = w(), { type: b, autocomplete: y } = Ae(m);
|
|
536
|
+
return a ? /* @__PURE__ */ f("div", { ...r, ...t, children: [
|
|
537
|
+
a && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
|
|
477
538
|
/* @__PURE__ */ s(
|
|
478
539
|
"input",
|
|
479
540
|
{
|
|
480
|
-
name:
|
|
541
|
+
name: o,
|
|
481
542
|
...i,
|
|
482
|
-
id:
|
|
483
|
-
type:
|
|
484
|
-
placeholder:
|
|
543
|
+
id: k,
|
|
544
|
+
type: b,
|
|
545
|
+
placeholder: n,
|
|
485
546
|
required: c,
|
|
486
|
-
autoComplete:
|
|
547
|
+
autoComplete: y
|
|
487
548
|
}
|
|
488
549
|
)
|
|
489
550
|
] }) : /* @__PURE__ */ s(
|
|
490
551
|
"input",
|
|
491
552
|
{
|
|
492
|
-
id:
|
|
493
|
-
name:
|
|
494
|
-
...
|
|
553
|
+
id: k,
|
|
554
|
+
name: o,
|
|
555
|
+
...t,
|
|
495
556
|
...i,
|
|
496
|
-
...
|
|
497
|
-
type:
|
|
498
|
-
placeholder:
|
|
557
|
+
...r,
|
|
558
|
+
type: b,
|
|
559
|
+
placeholder: n,
|
|
499
560
|
required: c,
|
|
500
|
-
autoComplete:
|
|
561
|
+
autoComplete: y
|
|
501
562
|
}
|
|
502
563
|
);
|
|
503
564
|
}, Ee = {
|
|
504
565
|
type: "Input",
|
|
505
566
|
label: "web_blocks.input",
|
|
506
567
|
category: "core",
|
|
507
|
-
icon:
|
|
568
|
+
icon: A,
|
|
508
569
|
group: "form",
|
|
509
570
|
...u({
|
|
510
571
|
properties: {
|
|
@@ -515,6 +576,73 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
515
576
|
title: "Field Name",
|
|
516
577
|
default: "fieldName"
|
|
517
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
|
+
},
|
|
518
646
|
showLabel: {
|
|
519
647
|
type: "boolean",
|
|
520
648
|
title: "Show Label",
|
|
@@ -532,46 +660,22 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
532
660
|
title: "Placeholder",
|
|
533
661
|
default: "Placeholder"
|
|
534
662
|
},
|
|
535
|
-
inputType: {
|
|
536
|
-
type: "string",
|
|
537
|
-
title: "Input Type",
|
|
538
|
-
default: "text",
|
|
539
|
-
enum: [
|
|
540
|
-
"text",
|
|
541
|
-
"email",
|
|
542
|
-
"password",
|
|
543
|
-
"number",
|
|
544
|
-
"tel",
|
|
545
|
-
"hidden",
|
|
546
|
-
"range",
|
|
547
|
-
"color",
|
|
548
|
-
"date",
|
|
549
|
-
"time",
|
|
550
|
-
"name",
|
|
551
|
-
"postal-code"
|
|
552
|
-
]
|
|
553
|
-
},
|
|
554
663
|
required: {
|
|
555
664
|
type: "boolean",
|
|
556
665
|
title: "Required",
|
|
557
666
|
default: !1
|
|
558
|
-
},
|
|
559
|
-
autocomplete: {
|
|
560
|
-
type: "boolean",
|
|
561
|
-
title: "Autocomplete",
|
|
562
|
-
default: !0
|
|
563
667
|
}
|
|
564
668
|
}
|
|
565
669
|
}),
|
|
566
670
|
aiProps: ["label", "placeholder"],
|
|
567
671
|
i18nProps: ["label", "placeholder"]
|
|
568
|
-
},
|
|
569
|
-
const { blockProps:
|
|
570
|
-
return
|
|
571
|
-
...
|
|
572
|
-
dangerouslySetInnerHTML: { __html:
|
|
672
|
+
}, $e = (e) => {
|
|
673
|
+
const { blockProps: t, content: o, styles: l, children: n } = e, r = { ...l, ...t };
|
|
674
|
+
return n ? g.createElement("label", r, n) : g.createElement("label", {
|
|
675
|
+
...r,
|
|
676
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
573
677
|
});
|
|
574
|
-
},
|
|
678
|
+
}, He = {
|
|
575
679
|
type: "Label",
|
|
576
680
|
label: "Label",
|
|
577
681
|
category: "core",
|
|
@@ -589,25 +693,25 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
589
693
|
}),
|
|
590
694
|
aiProps: ["content"],
|
|
591
695
|
i18nProps: ["content"]
|
|
592
|
-
},
|
|
593
|
-
const { blockProps:
|
|
594
|
-
return c ? /* @__PURE__ */ f("div", { ...
|
|
595
|
-
/* @__PURE__ */ s("input", { ...
|
|
696
|
+
}, ze = (e) => {
|
|
697
|
+
const { blockProps: t, fieldName: o, label: l, styles: n, inputStyles: r, required: i, checked: a, showLabel: c = !0 } = e, m = w();
|
|
698
|
+
return c ? /* @__PURE__ */ f("div", { ...n, ...t, children: [
|
|
699
|
+
/* @__PURE__ */ s("input", { ...r, name: o, id: m, type: "radio", required: i, defaultChecked: a }),
|
|
596
700
|
l && /* @__PURE__ */ s("label", { htmlFor: m, children: l })
|
|
597
701
|
] }) : /* @__PURE__ */ s(
|
|
598
702
|
"input",
|
|
599
703
|
{
|
|
600
704
|
id: m,
|
|
601
|
-
...
|
|
602
|
-
...n,
|
|
705
|
+
...t,
|
|
603
706
|
...r,
|
|
707
|
+
...n,
|
|
604
708
|
type: "radio",
|
|
605
709
|
required: i,
|
|
606
710
|
checked: a,
|
|
607
|
-
name:
|
|
711
|
+
name: o
|
|
608
712
|
}
|
|
609
713
|
);
|
|
610
|
-
},
|
|
714
|
+
}, De = {
|
|
611
715
|
type: "Radio",
|
|
612
716
|
label: "web_blocks.radio",
|
|
613
717
|
category: "core",
|
|
@@ -646,23 +750,23 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
646
750
|
}),
|
|
647
751
|
aiProps: ["label"],
|
|
648
752
|
i18nProps: ["label"]
|
|
649
|
-
},
|
|
650
|
-
const { blockProps:
|
|
651
|
-
return c ? /* @__PURE__ */ f("div", { ...
|
|
652
|
-
c && /* @__PURE__ */ s("label", { htmlFor:
|
|
653
|
-
/* @__PURE__ */ f("select", { ...i, id:
|
|
654
|
-
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children:
|
|
753
|
+
}, je = (e) => {
|
|
754
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: n, styles: r, inputStyles: i, required: a, showLabel: c, _multiple: m, options: k } = e, b = w();
|
|
755
|
+
return c ? /* @__PURE__ */ f("div", { ...r, ...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: [
|
|
758
|
+
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
|
|
655
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))
|
|
656
760
|
] })
|
|
657
|
-
] }) : /* @__PURE__ */ f("select", { id:
|
|
658
|
-
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children:
|
|
761
|
+
] }) : /* @__PURE__ */ f("select", { id: b, ...r, ...t, required: a, multiple: m, name: o, children: [
|
|
762
|
+
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
|
|
659
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))
|
|
660
764
|
] });
|
|
661
|
-
},
|
|
765
|
+
}, Ue = {
|
|
662
766
|
type: "Select",
|
|
663
767
|
label: "web_blocks.select",
|
|
664
768
|
category: "core",
|
|
665
|
-
icon:
|
|
769
|
+
icon: V,
|
|
666
770
|
group: "form",
|
|
667
771
|
...u({
|
|
668
772
|
properties: {
|
|
@@ -722,17 +826,17 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
722
826
|
}),
|
|
723
827
|
aiProps: ["label", "placeholder"],
|
|
724
828
|
i18nProps: ["label", "placeholder"]
|
|
725
|
-
},
|
|
726
|
-
const { blockProps:
|
|
727
|
-
return c ? /* @__PURE__ */ f("div", { ...
|
|
829
|
+
}, qe = (e) => {
|
|
830
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: n, styles: r, inputStyles: i, rows: a, showLabel: c, required: m } = e, k = w();
|
|
831
|
+
return c ? /* @__PURE__ */ f("div", { ...r, ...t, children: [
|
|
728
832
|
c && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
|
|
729
833
|
/* @__PURE__ */ s(
|
|
730
834
|
"textarea",
|
|
731
835
|
{
|
|
732
|
-
name:
|
|
836
|
+
name: o,
|
|
733
837
|
...i,
|
|
734
838
|
id: k,
|
|
735
|
-
placeholder:
|
|
839
|
+
placeholder: n,
|
|
736
840
|
rows: a,
|
|
737
841
|
required: m
|
|
738
842
|
}
|
|
@@ -741,20 +845,20 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
741
845
|
"textarea",
|
|
742
846
|
{
|
|
743
847
|
id: k,
|
|
744
|
-
name:
|
|
745
|
-
...
|
|
848
|
+
name: o,
|
|
849
|
+
...t,
|
|
746
850
|
...i,
|
|
747
|
-
...
|
|
748
|
-
placeholder:
|
|
851
|
+
...r,
|
|
852
|
+
placeholder: n,
|
|
749
853
|
rows: a,
|
|
750
854
|
required: m
|
|
751
855
|
}
|
|
752
856
|
);
|
|
753
|
-
},
|
|
857
|
+
}, Fe = {
|
|
754
858
|
type: "TextArea",
|
|
755
859
|
label: "web_blocks.textarea",
|
|
756
860
|
category: "core",
|
|
757
|
-
icon:
|
|
861
|
+
icon: A,
|
|
758
862
|
group: "form",
|
|
759
863
|
...u({
|
|
760
864
|
properties: {
|
|
@@ -795,27 +899,27 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
795
899
|
}),
|
|
796
900
|
aiProps: ["label", "placeholder"],
|
|
797
901
|
i18nProps: ["label", "placeholder"]
|
|
798
|
-
},
|
|
799
|
-
const { blockProps:
|
|
800
|
-
return
|
|
902
|
+
}, Ve = (e) => {
|
|
903
|
+
const { blockProps: t, inBuilder: o, children: l, globalBlock: n } = e;
|
|
904
|
+
return o && !n ? /* @__PURE__ */ f(
|
|
801
905
|
"div",
|
|
802
906
|
{
|
|
803
907
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
804
|
-
...
|
|
908
|
+
...t,
|
|
805
909
|
children: [
|
|
806
910
|
/* @__PURE__ */ f("h1", { children: [
|
|
807
911
|
"Global Block - ",
|
|
808
|
-
|
|
912
|
+
n
|
|
809
913
|
] }),
|
|
810
914
|
/* @__PURE__ */ s("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
811
915
|
]
|
|
812
916
|
}
|
|
813
|
-
) :
|
|
814
|
-
},
|
|
917
|
+
) : g.createElement("span", { ...t }, l);
|
|
918
|
+
}, Oe = {
|
|
815
919
|
type: "GlobalBlock",
|
|
816
920
|
description: "A global block component",
|
|
817
921
|
label: "Global Block",
|
|
818
|
-
icon:
|
|
922
|
+
icon: E,
|
|
819
923
|
category: "core",
|
|
820
924
|
group: "basic",
|
|
821
925
|
hidden: !0,
|
|
@@ -830,18 +934,18 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
830
934
|
}
|
|
831
935
|
})
|
|
832
936
|
}, Ge = (e) => {
|
|
833
|
-
const { blockProps:
|
|
834
|
-
return
|
|
835
|
-
...t,
|
|
937
|
+
const { blockProps: t, styles: o, content: l, tag: n = "h1", children: r = null } = e;
|
|
938
|
+
return r ? g.createElement(n, { ...o, ...t }, r) : g.createElement(n, {
|
|
836
939
|
...o,
|
|
940
|
+
...t,
|
|
837
941
|
dangerouslySetInnerHTML: { __html: l }
|
|
838
942
|
});
|
|
839
|
-
},
|
|
943
|
+
}, Ye = {
|
|
840
944
|
type: "Heading",
|
|
841
945
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
842
946
|
label: "Heading",
|
|
843
947
|
category: "core",
|
|
844
|
-
icon:
|
|
948
|
+
icon: O,
|
|
845
949
|
group: "typography",
|
|
846
950
|
...u({
|
|
847
951
|
properties: {
|
|
@@ -863,10 +967,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
863
967
|
aiProps: ["content"],
|
|
864
968
|
i18nProps: ["content"],
|
|
865
969
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
866
|
-
},
|
|
867
|
-
const { blockProps:
|
|
868
|
-
return
|
|
869
|
-
},
|
|
970
|
+
}, We = (e) => {
|
|
971
|
+
const { blockProps: t, styles: o } = e;
|
|
972
|
+
return x("br", { ...t, ...o });
|
|
973
|
+
}, Xe = {
|
|
870
974
|
type: "LineBreak",
|
|
871
975
|
label: "Line Break",
|
|
872
976
|
category: "core",
|
|
@@ -881,41 +985,41 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
881
985
|
canDelete: () => !1,
|
|
882
986
|
canMove: () => !1,
|
|
883
987
|
canDuplicate: () => !1
|
|
884
|
-
}, Xe = (e) => {
|
|
885
|
-
const { blockProps: o, children: t, styles: l } = e;
|
|
886
|
-
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ s(x, {});
|
|
887
988
|
}, Je = (e) => {
|
|
888
|
-
const { blockProps:
|
|
889
|
-
return
|
|
989
|
+
const { blockProps: t, children: o, styles: l } = e;
|
|
990
|
+
return o ? x("table", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
890
991
|
}, Qe = (e) => {
|
|
891
|
-
const { blockProps:
|
|
892
|
-
return
|
|
992
|
+
const { blockProps: t, children: o, styles: l } = e;
|
|
993
|
+
return o ? x("thead", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
893
994
|
}, Ze = (e) => {
|
|
894
|
-
const { blockProps:
|
|
895
|
-
return
|
|
995
|
+
const { blockProps: t, children: o, styles: l } = e;
|
|
996
|
+
return o ? x("tbody", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
896
997
|
}, Ke = (e) => {
|
|
897
|
-
const { blockProps:
|
|
898
|
-
return
|
|
899
|
-
|
|
900
|
-
|
|
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: n } = e;
|
|
1002
|
+
return !o && C(l) ? /* @__PURE__ */ s(v, {}) : o ? x("td", { ...t, ...n }, o) : x("td", {
|
|
1003
|
+
...t,
|
|
1004
|
+
...n,
|
|
901
1005
|
dangerouslySetInnerHTML: { __html: l }
|
|
902
1006
|
});
|
|
903
1007
|
};
|
|
904
|
-
p(
|
|
1008
|
+
p(Je, {
|
|
905
1009
|
type: "Table",
|
|
906
1010
|
label: "Table",
|
|
907
1011
|
category: "core",
|
|
908
1012
|
group: "table",
|
|
909
1013
|
hidden: !0,
|
|
910
|
-
icon:
|
|
1014
|
+
icon: G,
|
|
911
1015
|
...u({
|
|
912
1016
|
properties: {
|
|
913
1017
|
styles: d("")
|
|
914
1018
|
}
|
|
915
1019
|
}),
|
|
916
|
-
blocks:
|
|
1020
|
+
blocks: L("Table")
|
|
917
1021
|
});
|
|
918
|
-
p(
|
|
1022
|
+
p(Qe, {
|
|
919
1023
|
type: "TableHead",
|
|
920
1024
|
label: "Table Head",
|
|
921
1025
|
category: "core",
|
|
@@ -927,9 +1031,9 @@ p(Je, {
|
|
|
927
1031
|
styles: d("")
|
|
928
1032
|
}
|
|
929
1033
|
}),
|
|
930
|
-
blocks:
|
|
1034
|
+
blocks: L("TableHead")
|
|
931
1035
|
});
|
|
932
|
-
p(
|
|
1036
|
+
p(Ze, {
|
|
933
1037
|
type: "TableBody",
|
|
934
1038
|
label: "Table Body",
|
|
935
1039
|
category: "core",
|
|
@@ -941,9 +1045,9 @@ p(Qe, {
|
|
|
941
1045
|
styles: d("")
|
|
942
1046
|
}
|
|
943
1047
|
}),
|
|
944
|
-
blocks:
|
|
1048
|
+
blocks: L("TableBody")
|
|
945
1049
|
});
|
|
946
|
-
p(
|
|
1050
|
+
p(Ke, {
|
|
947
1051
|
type: "TableRow",
|
|
948
1052
|
label: "Table Row",
|
|
949
1053
|
category: "core",
|
|
@@ -955,9 +1059,9 @@ p(Ze, {
|
|
|
955
1059
|
styles: d("")
|
|
956
1060
|
}
|
|
957
1061
|
}),
|
|
958
|
-
blocks:
|
|
1062
|
+
blocks: L("TableRow")
|
|
959
1063
|
});
|
|
960
|
-
p(
|
|
1064
|
+
p(et, {
|
|
961
1065
|
type: "TableCell",
|
|
962
1066
|
label: "Table Cell",
|
|
963
1067
|
category: "core",
|
|
@@ -975,71 +1079,71 @@ p(Ke, {
|
|
|
975
1079
|
}
|
|
976
1080
|
}
|
|
977
1081
|
}),
|
|
978
|
-
blocks:
|
|
1082
|
+
blocks: L("TableCell"),
|
|
979
1083
|
i18nProps: ["content"],
|
|
980
1084
|
aiProps: ["content"]
|
|
981
1085
|
});
|
|
982
|
-
function
|
|
983
|
-
const
|
|
984
|
-
_id:
|
|
985
|
-
_parent:
|
|
1086
|
+
function L(e) {
|
|
1087
|
+
const t = (r, i) => ({
|
|
1088
|
+
_id: w(),
|
|
1089
|
+
_parent: r,
|
|
986
1090
|
_type: "TableCell",
|
|
987
1091
|
styles: "#styles:,",
|
|
988
1092
|
content: `${e === "TableHead" ? "Table Head" : "Table Cell " + i}`
|
|
989
|
-
}),
|
|
990
|
-
const i =
|
|
1093
|
+
}), o = (r) => {
|
|
1094
|
+
const i = w(), a = {
|
|
991
1095
|
_type: "TableRow",
|
|
992
1096
|
_id: i,
|
|
993
1097
|
styles: "#styles:,border-b"
|
|
994
1098
|
};
|
|
995
|
-
return
|
|
996
|
-
}, l = (
|
|
997
|
-
const i =
|
|
1099
|
+
return r && (a._parent = r), [a, t(i, "1"), t(i, "2"), t(i, "3")];
|
|
1100
|
+
}, l = (r) => {
|
|
1101
|
+
const i = w(), a = {
|
|
998
1102
|
_id: i,
|
|
999
1103
|
_type: "TableHead",
|
|
1000
1104
|
styles: "#styles:,font-medium"
|
|
1001
1105
|
};
|
|
1002
|
-
return
|
|
1003
|
-
},
|
|
1004
|
-
const i =
|
|
1106
|
+
return r && (a._parent = r), [a, ...o(i)];
|
|
1107
|
+
}, n = (r) => {
|
|
1108
|
+
const i = w(), a = {
|
|
1005
1109
|
_id: i,
|
|
1006
1110
|
_type: "TableBody",
|
|
1007
1111
|
styles: "#styles:,"
|
|
1008
1112
|
};
|
|
1009
|
-
return
|
|
1113
|
+
return r && (a._parent = r), [a, ...o(i), ...o(i)];
|
|
1010
1114
|
};
|
|
1011
1115
|
if (e === "Table") {
|
|
1012
|
-
const
|
|
1116
|
+
const r = w();
|
|
1013
1117
|
return [
|
|
1014
1118
|
{
|
|
1015
|
-
_id:
|
|
1119
|
+
_id: r,
|
|
1016
1120
|
_type: "Table",
|
|
1017
1121
|
styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
|
|
1018
1122
|
},
|
|
1019
|
-
...l(
|
|
1020
|
-
...r
|
|
1123
|
+
...l(r),
|
|
1124
|
+
...n(r)
|
|
1021
1125
|
];
|
|
1022
1126
|
}
|
|
1023
|
-
return e === "TableRow" ?
|
|
1127
|
+
return e === "TableRow" ? o() : e === "TableHead" ? l() : e === "TableBody" ? n() : [];
|
|
1024
1128
|
}
|
|
1025
|
-
const $ = (e, ...
|
|
1129
|
+
const $ = (e, ...t) => ({
|
|
1026
1130
|
...e,
|
|
1027
|
-
className: B(e.className, ...
|
|
1028
|
-
}),
|
|
1029
|
-
const { blockProps:
|
|
1030
|
-
if (C(
|
|
1031
|
-
return /* @__PURE__ */ s(
|
|
1032
|
-
const c =
|
|
1033
|
-
return
|
|
1034
|
-
...
|
|
1131
|
+
className: B(e.className, ...t)
|
|
1132
|
+
}), tt = (e) => {
|
|
1133
|
+
const { blockProps: t, icon: o, styles: l, width: n, inBuilder: r, height: i } = e, a = $(l, "");
|
|
1134
|
+
if (C(o))
|
|
1135
|
+
return /* @__PURE__ */ s(v, { inBuilder: r, 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,
|
|
1035
1139
|
...a,
|
|
1036
1140
|
style: {
|
|
1037
|
-
width:
|
|
1141
|
+
width: n ? `${n}px` : "auto",
|
|
1038
1142
|
height: i ? `${i}px` : "auto"
|
|
1039
1143
|
},
|
|
1040
1144
|
dangerouslySetInnerHTML: { __html: c }
|
|
1041
1145
|
});
|
|
1042
|
-
},
|
|
1146
|
+
}, ot = {
|
|
1043
1147
|
type: "Icon",
|
|
1044
1148
|
label: "web_blocks.icon",
|
|
1045
1149
|
category: "core",
|
|
@@ -1066,24 +1170,24 @@ const $ = (e, ...o) => ({
|
|
|
1066
1170
|
}
|
|
1067
1171
|
}
|
|
1068
1172
|
})
|
|
1069
|
-
},
|
|
1070
|
-
const { blockProps:
|
|
1071
|
-
return C(
|
|
1173
|
+
}, lt = (e) => {
|
|
1174
|
+
const { blockProps: t, image: o, mobileImage: l, styles: n, alt: r, height: i, width: a, lazyLoading: c } = e;
|
|
1175
|
+
return C(o) ? /* @__PURE__ */ s(v, { className: "h-36" }) : /* @__PURE__ */ f("picture", { children: [
|
|
1072
1176
|
l && /* @__PURE__ */ s("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
1073
1177
|
/* @__PURE__ */ s(
|
|
1074
1178
|
"img",
|
|
1075
1179
|
{
|
|
1076
|
-
...
|
|
1077
|
-
...
|
|
1078
|
-
src:
|
|
1079
|
-
alt:
|
|
1180
|
+
...t,
|
|
1181
|
+
...n,
|
|
1182
|
+
src: o,
|
|
1183
|
+
alt: r,
|
|
1080
1184
|
loading: c ? "lazy" : "eager",
|
|
1081
1185
|
width: a,
|
|
1082
1186
|
height: i
|
|
1083
1187
|
}
|
|
1084
1188
|
)
|
|
1085
1189
|
] });
|
|
1086
|
-
},
|
|
1190
|
+
}, nt = {
|
|
1087
1191
|
type: "Image",
|
|
1088
1192
|
description: "A image component",
|
|
1089
1193
|
label: "Image",
|
|
@@ -1139,28 +1243,28 @@ const $ = (e, ...o) => ({
|
|
|
1139
1243
|
aiProps: ["alt"],
|
|
1140
1244
|
i18nProps: ["alt"]
|
|
1141
1245
|
}, rt = (e) => {
|
|
1142
|
-
const { blockProps:
|
|
1246
|
+
const { blockProps: t, link: o, children: l, styles: n, inBuilder: r, content: i } = e;
|
|
1143
1247
|
let a = {};
|
|
1144
|
-
return !l && C(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }),
|
|
1248
|
+
return !l && C(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? l ? /* @__PURE__ */ s("span", { ...t, style: a, ...n, children: l }) : x(
|
|
1145
1249
|
"span",
|
|
1146
1250
|
{
|
|
1147
|
-
...
|
|
1148
|
-
...
|
|
1251
|
+
...t,
|
|
1252
|
+
...n,
|
|
1149
1253
|
style: a
|
|
1150
1254
|
},
|
|
1151
1255
|
i
|
|
1152
|
-
) : 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, ...n, children: l }) : x(
|
|
1153
1257
|
"a",
|
|
1154
1258
|
{
|
|
1155
|
-
...
|
|
1156
|
-
...
|
|
1157
|
-
href: (
|
|
1158
|
-
target: (
|
|
1259
|
+
...t,
|
|
1260
|
+
...n,
|
|
1261
|
+
href: (o == null ? void 0 : o.href) || "#",
|
|
1262
|
+
target: (o == null ? void 0 : o.target) || "_self",
|
|
1159
1263
|
"aria-label": i
|
|
1160
1264
|
},
|
|
1161
1265
|
i
|
|
1162
1266
|
);
|
|
1163
|
-
},
|
|
1267
|
+
}, it = {
|
|
1164
1268
|
type: "Link",
|
|
1165
1269
|
description: "A link component",
|
|
1166
1270
|
label: "Link",
|
|
@@ -1190,20 +1294,25 @@ const $ = (e, ...o) => ({
|
|
|
1190
1294
|
ui: {
|
|
1191
1295
|
"ui:field": "link"
|
|
1192
1296
|
}
|
|
1297
|
+
},
|
|
1298
|
+
prefetchLink: {
|
|
1299
|
+
type: "boolean",
|
|
1300
|
+
default: !1,
|
|
1301
|
+
title: "Prefetch Link"
|
|
1193
1302
|
}
|
|
1194
1303
|
}
|
|
1195
1304
|
}),
|
|
1196
1305
|
aiProps: ["content"],
|
|
1197
1306
|
i18nProps: ["content"],
|
|
1198
1307
|
canAcceptBlock: (e) => e !== "Link"
|
|
1199
|
-
},
|
|
1200
|
-
const { blockProps:
|
|
1201
|
-
return !
|
|
1202
|
-
|
|
1203
|
-
{ ...
|
|
1204
|
-
|
|
1308
|
+
}, st = (e) => {
|
|
1309
|
+
const { blockProps: t, children: o, listType: l, styles: n, tag: r, inBuilder: i } = e, a = B(h(n, "className", ""), l);
|
|
1310
|
+
return !o && C(n == null ? void 0 : n.className) ? /* @__PURE__ */ s(v, { inBuilder: i }) : g.createElement(
|
|
1311
|
+
r || (l === "list-decimal" ? "ol" : "ul"),
|
|
1312
|
+
{ ...t, ...n, className: a },
|
|
1313
|
+
o
|
|
1205
1314
|
);
|
|
1206
|
-
},
|
|
1315
|
+
}, at = {
|
|
1207
1316
|
type: "List",
|
|
1208
1317
|
description: "A list component",
|
|
1209
1318
|
label: "List",
|
|
@@ -1250,14 +1359,14 @@ const $ = (e, ...o) => ({
|
|
|
1250
1359
|
content: "Item 3"
|
|
1251
1360
|
}
|
|
1252
1361
|
]
|
|
1253
|
-
},
|
|
1254
|
-
const { blockProps:
|
|
1255
|
-
return
|
|
1362
|
+
}, ct = (e) => {
|
|
1363
|
+
const { blockProps: t, content: o, styles: l, children: n, tag: r } = e;
|
|
1364
|
+
return n ? g.createElement(r || "li", { ...l, ...t }, n) : g.createElement(r || "li", {
|
|
1256
1365
|
...l,
|
|
1257
|
-
...
|
|
1258
|
-
dangerouslySetInnerHTML: { __html:
|
|
1366
|
+
...t,
|
|
1367
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
1259
1368
|
});
|
|
1260
|
-
},
|
|
1369
|
+
}, pt = {
|
|
1261
1370
|
type: "ListItem",
|
|
1262
1371
|
description: "A list item component",
|
|
1263
1372
|
label: "List Item",
|
|
@@ -1281,14 +1390,14 @@ const $ = (e, ...o) => ({
|
|
|
1281
1390
|
aiProps: ["content"],
|
|
1282
1391
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1283
1392
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1284
|
-
},
|
|
1285
|
-
const { blockProps:
|
|
1286
|
-
return ie(e.children) ?
|
|
1287
|
-
...t,
|
|
1393
|
+
}, dt = (e) => {
|
|
1394
|
+
const { blockProps: t, styles: o, content: l } = e;
|
|
1395
|
+
return ie(e.children) ? g.createElement("p", {
|
|
1288
1396
|
...o,
|
|
1397
|
+
...t,
|
|
1289
1398
|
dangerouslySetInnerHTML: { __html: l }
|
|
1290
|
-
}) :
|
|
1291
|
-
},
|
|
1399
|
+
}) : g.createElement("p", { ...o, ...t }, e.children);
|
|
1400
|
+
}, ut = {
|
|
1292
1401
|
type: "Paragraph",
|
|
1293
1402
|
description: "A paragraph component",
|
|
1294
1403
|
label: "Paragraph",
|
|
@@ -1309,27 +1418,27 @@ const $ = (e, ...o) => ({
|
|
|
1309
1418
|
i18nProps: ["content"],
|
|
1310
1419
|
aiProps: ["content"],
|
|
1311
1420
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1312
|
-
},
|
|
1313
|
-
const { blockProps:
|
|
1314
|
-
return
|
|
1421
|
+
}, mt = (e) => {
|
|
1422
|
+
const { blockProps: t, inBuilder: o, children: l, partialBlockId: n } = e;
|
|
1423
|
+
return o && !n ? /* @__PURE__ */ f(
|
|
1315
1424
|
"div",
|
|
1316
1425
|
{
|
|
1317
1426
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1318
|
-
...
|
|
1427
|
+
...t,
|
|
1319
1428
|
children: [
|
|
1320
1429
|
/* @__PURE__ */ f("h1", { children: [
|
|
1321
1430
|
"Partial Block - ",
|
|
1322
|
-
|
|
1431
|
+
n
|
|
1323
1432
|
] }),
|
|
1324
1433
|
/* @__PURE__ */ s("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1325
1434
|
]
|
|
1326
1435
|
}
|
|
1327
|
-
) :
|
|
1328
|
-
},
|
|
1436
|
+
) : g.createElement("span", { ...t }, l);
|
|
1437
|
+
}, yt = {
|
|
1329
1438
|
type: "PartialBlock",
|
|
1330
1439
|
description: "A partial block component",
|
|
1331
1440
|
label: "Partial Block",
|
|
1332
|
-
icon:
|
|
1441
|
+
icon: E,
|
|
1333
1442
|
category: "core",
|
|
1334
1443
|
group: "basic",
|
|
1335
1444
|
hidden: !0,
|
|
@@ -1343,7 +1452,7 @@ const $ = (e, ...o) => ({
|
|
|
1343
1452
|
}
|
|
1344
1453
|
}
|
|
1345
1454
|
})
|
|
1346
|
-
},
|
|
1455
|
+
}, I = {
|
|
1347
1456
|
SMALL: {
|
|
1348
1457
|
1: "col-span-1",
|
|
1349
1458
|
2: "col-span-2",
|
|
@@ -1386,15 +1495,15 @@ const $ = (e, ...o) => ({
|
|
|
1386
1495
|
11: "lg:col-span-11",
|
|
1387
1496
|
12: "lg:col-span-12"
|
|
1388
1497
|
}
|
|
1389
|
-
},
|
|
1390
|
-
const { blockProps:
|
|
1498
|
+
}, gt = (e) => {
|
|
1499
|
+
const { blockProps: t, children: o, styles: l, colSpan: n, tabletColSpan: r, desktopColSpan: i } = e, c = { className: [
|
|
1391
1500
|
h(l, "className", ""),
|
|
1392
|
-
h(
|
|
1393
|
-
|
|
1394
|
-
i ? h(
|
|
1501
|
+
h(I, ["SMALL", isNaN(n) || !n ? 6 : n], ""),
|
|
1502
|
+
r ? h(I, ["MEDIUM", r || n], "") : "",
|
|
1503
|
+
i ? h(I, ["LARGE", r || n], "") : ""
|
|
1395
1504
|
].join(" ") };
|
|
1396
|
-
return /* @__PURE__ */ s("div", { ...
|
|
1397
|
-
},
|
|
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 = {
|
|
1398
1507
|
type: "Column",
|
|
1399
1508
|
description: "A column component",
|
|
1400
1509
|
label: "Column",
|
|
@@ -1430,10 +1539,10 @@ const $ = (e, ...o) => ({
|
|
|
1430
1539
|
}
|
|
1431
1540
|
}
|
|
1432
1541
|
})
|
|
1433
|
-
},
|
|
1434
|
-
const { blockProps:
|
|
1435
|
-
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${
|
|
1436
|
-
},
|
|
1542
|
+
}, ft = (e) => {
|
|
1543
|
+
const { blockProps: t, children: o, styles: l, gutter: n } = e, i = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1544
|
+
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${n}px` : i.style = { gap: `${n}px` }, /* @__PURE__ */ s("div", { ...t, ...l, ...i, children: o });
|
|
1545
|
+
}, ht = {
|
|
1437
1546
|
type: "Row",
|
|
1438
1547
|
description: "A row component",
|
|
1439
1548
|
label: "Row",
|
|
@@ -1464,14 +1573,14 @@ const $ = (e, ...o) => ({
|
|
|
1464
1573
|
}
|
|
1465
1574
|
}
|
|
1466
1575
|
})
|
|
1467
|
-
},
|
|
1468
|
-
const { blockProps:
|
|
1576
|
+
}, kt = (e) => {
|
|
1577
|
+
const { blockProps: t, content: o, styles: l } = e, n = $(
|
|
1469
1578
|
l,
|
|
1470
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",
|
|
1471
1580
|
"max-w-full"
|
|
1472
1581
|
);
|
|
1473
|
-
return /* @__PURE__ */ s("div", { ...
|
|
1474
|
-
},
|
|
1582
|
+
return /* @__PURE__ */ s("div", { ...t, ...n, dangerouslySetInnerHTML: { __html: o } });
|
|
1583
|
+
}, xt = {
|
|
1475
1584
|
type: "RichText",
|
|
1476
1585
|
description: "A rich text block",
|
|
1477
1586
|
label: "Rich Text",
|
|
@@ -1492,13 +1601,13 @@ const $ = (e, ...o) => ({
|
|
|
1492
1601
|
aiProps: ["content"],
|
|
1493
1602
|
i18nProps: ["content"]
|
|
1494
1603
|
}, wt = (e) => {
|
|
1495
|
-
const { blockProps:
|
|
1496
|
-
return
|
|
1497
|
-
...t,
|
|
1604
|
+
const { blockProps: t, styles: o, content: l, children: n = null, tag: r } = e;
|
|
1605
|
+
return n ? g.createElement("span", { ...o, ...t }, n) : g.createElement(r || "span", {
|
|
1498
1606
|
...o,
|
|
1607
|
+
...t,
|
|
1499
1608
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1500
1609
|
});
|
|
1501
|
-
},
|
|
1610
|
+
}, Ct = {
|
|
1502
1611
|
type: "Span",
|
|
1503
1612
|
description: "A span component",
|
|
1504
1613
|
label: "Span",
|
|
@@ -1518,14 +1627,14 @@ const $ = (e, ...o) => ({
|
|
|
1518
1627
|
aiProps: ["content"],
|
|
1519
1628
|
i18nProps: ["content"],
|
|
1520
1629
|
canAcceptBlock: () => !0
|
|
1521
|
-
},
|
|
1630
|
+
}, vt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Lt = {
|
|
1522
1631
|
type: "Text",
|
|
1523
1632
|
description: "A text component with no styling",
|
|
1524
1633
|
label: "Text",
|
|
1525
1634
|
hidden: !0,
|
|
1526
1635
|
category: "core",
|
|
1527
1636
|
group: "typography",
|
|
1528
|
-
icon:
|
|
1637
|
+
icon: ne,
|
|
1529
1638
|
...u({
|
|
1530
1639
|
properties: {
|
|
1531
1640
|
styles: d("text-black"),
|
|
@@ -1538,7 +1647,7 @@ const $ = (e, ...o) => ({
|
|
|
1538
1647
|
}),
|
|
1539
1648
|
aiProps: ["content"],
|
|
1540
1649
|
i18nProps: ["content"]
|
|
1541
|
-
},
|
|
1650
|
+
}, Bt = {
|
|
1542
1651
|
type: "object",
|
|
1543
1652
|
title: "Controls",
|
|
1544
1653
|
default: {
|
|
@@ -1569,14 +1678,14 @@ const $ = (e, ...o) => ({
|
|
|
1569
1678
|
default: !1
|
|
1570
1679
|
}
|
|
1571
1680
|
}
|
|
1572
|
-
}, _ = /^(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+)/,
|
|
1573
|
-
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), n = h(t, "loop", !1), r = o || h(t, "muted", !0);
|
|
1574
1683
|
if (_.test(e)) {
|
|
1575
1684
|
const i = e.match(_);
|
|
1576
1685
|
if (i) {
|
|
1577
1686
|
const a = i[4];
|
|
1578
|
-
let c = `https://www.youtube.com/embed/${a}`, m =
|
|
1579
|
-
return m +=
|
|
1687
|
+
let c = `https://www.youtube.com/embed/${a}`, m = o ? "autoplay=1" : "";
|
|
1688
|
+
return m += n ? `&loop=1&playlist=${a}` : "", m += r ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
|
|
1580
1689
|
}
|
|
1581
1690
|
}
|
|
1582
1691
|
if (T.test(e)) {
|
|
@@ -1584,28 +1693,28 @@ const $ = (e, ...o) => ({
|
|
|
1584
1693
|
if (i) {
|
|
1585
1694
|
const a = i[1];
|
|
1586
1695
|
let c = "";
|
|
1587
|
-
return c +=
|
|
1696
|
+
return c += o ? "autoplay=1" : "", c += l ? "&controls=1" : "&controls=0", c += r ? "&muted=1" : "", c += n ? "&loop=1" : "", `https://player.vimeo.com/video/${a}?${c}`;
|
|
1588
1697
|
}
|
|
1589
1698
|
}
|
|
1590
1699
|
return null;
|
|
1591
|
-
},
|
|
1592
|
-
const { url:
|
|
1700
|
+
}, Pt = (e) => {
|
|
1701
|
+
const { url: t, blockProps: o, styles: l, controls: n, videoSource: r, inBuilder: i } = e, a = It(t, n);
|
|
1593
1702
|
return /* @__PURE__ */ f("div", { ...se(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1594
|
-
!a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(
|
|
1595
|
-
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 ${r} video link in settings Video URL.` : `Provided ${r} 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" })
|
|
1596
1705
|
] });
|
|
1597
|
-
},
|
|
1598
|
-
const { url:
|
|
1599
|
-
let a =
|
|
1600
|
-
const c = [...h(
|
|
1601
|
-
|
|
1602
|
-
const m = c.sort((
|
|
1706
|
+
}, St = (e) => {
|
|
1707
|
+
const { url: t, styles: o, controls: l, sources: n, poster: r, blockProps: i } = e;
|
|
1708
|
+
let a = r;
|
|
1709
|
+
const c = [...h(n, "srcsets", []) || []];
|
|
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));
|
|
1603
1712
|
m.length === 0 && !a && (a = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1604
1713
|
const k = h(l, "autoplay", !1) || h(l, "muted", !0);
|
|
1605
|
-
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(
|
|
1606
1715
|
"video",
|
|
1607
1716
|
{
|
|
1608
|
-
...
|
|
1717
|
+
...o,
|
|
1609
1718
|
...i,
|
|
1610
1719
|
key: JSON.stringify(m),
|
|
1611
1720
|
controls: h(l, "controls", !1),
|
|
@@ -1614,24 +1723,24 @@ const $ = (e, ...o) => ({
|
|
|
1614
1723
|
poster: a,
|
|
1615
1724
|
...k ? { muted: !0 } : {}
|
|
1616
1725
|
},
|
|
1617
|
-
m.map((
|
|
1618
|
-
if (!
|
|
1619
|
-
const y = `(max-width: ${
|
|
1620
|
-
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);
|
|
1621
1730
|
}),
|
|
1622
1731
|
"Your browser does not support the video tag."
|
|
1623
1732
|
) });
|
|
1624
|
-
},
|
|
1625
|
-
const { videoSource:
|
|
1626
|
-
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: [
|
|
1627
1736
|
"Invalid video source : ",
|
|
1628
|
-
|
|
1737
|
+
t
|
|
1629
1738
|
] });
|
|
1630
|
-
},
|
|
1739
|
+
}, Tt = {
|
|
1631
1740
|
type: "Video",
|
|
1632
1741
|
label: "Video",
|
|
1633
1742
|
category: "core",
|
|
1634
|
-
icon:
|
|
1743
|
+
icon: re,
|
|
1635
1744
|
group: "media",
|
|
1636
1745
|
...u({
|
|
1637
1746
|
properties: {
|
|
@@ -1666,7 +1775,7 @@ const $ = (e, ...o) => ({
|
|
|
1666
1775
|
type: "object",
|
|
1667
1776
|
default: { srcsets: [] }
|
|
1668
1777
|
},
|
|
1669
|
-
controls: { ...
|
|
1778
|
+
controls: { ...Bt }
|
|
1670
1779
|
}
|
|
1671
1780
|
}
|
|
1672
1781
|
},
|
|
@@ -1710,24 +1819,24 @@ const $ = (e, ...o) => ({
|
|
|
1710
1819
|
}
|
|
1711
1820
|
}),
|
|
1712
1821
|
i18nProps: ["url"]
|
|
1713
|
-
},
|
|
1714
|
-
const { children:
|
|
1715
|
-
let a =
|
|
1716
|
-
return C(a) &&
|
|
1822
|
+
}, Nt = (e) => {
|
|
1823
|
+
const { children: t, tag: o, styles: l, blockProps: n, inBuilder: r, $loading: i } = e;
|
|
1824
|
+
let a = t;
|
|
1825
|
+
return C(a) && r && (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 && r ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ f("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1717
1826
|
/* @__PURE__ */ s("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1718
1827
|
/* @__PURE__ */ s("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1719
|
-
] }, m)) : a :
|
|
1720
|
-
|
|
1721
|
-
{ ...
|
|
1722
|
-
i &&
|
|
1828
|
+
] }, m)) : a : g.createElement(
|
|
1829
|
+
o,
|
|
1830
|
+
{ ...n, ...l },
|
|
1831
|
+
i && r ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ f("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1723
1832
|
/* @__PURE__ */ s("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1724
1833
|
/* @__PURE__ */ s("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1725
1834
|
] }, m)) : a
|
|
1726
1835
|
);
|
|
1727
|
-
},
|
|
1836
|
+
}, Rt = {
|
|
1728
1837
|
type: "Repeater",
|
|
1729
1838
|
label: "Repeater",
|
|
1730
|
-
icon:
|
|
1839
|
+
icon: M,
|
|
1731
1840
|
group: "basic",
|
|
1732
1841
|
dataProviderMode: "live",
|
|
1733
1842
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
@@ -1782,33 +1891,33 @@ const $ = (e, ...o) => ({
|
|
|
1782
1891
|
}
|
|
1783
1892
|
}
|
|
1784
1893
|
})
|
|
1785
|
-
},
|
|
1894
|
+
}, At = ({
|
|
1786
1895
|
children: e,
|
|
1787
|
-
blockProps:
|
|
1788
|
-
styles:
|
|
1896
|
+
blockProps: t,
|
|
1897
|
+
styles: o,
|
|
1789
1898
|
parentTag: l,
|
|
1790
|
-
inBuilder:
|
|
1899
|
+
inBuilder: n
|
|
1791
1900
|
}) => {
|
|
1792
|
-
let
|
|
1901
|
+
let r = "li";
|
|
1793
1902
|
switch (l) {
|
|
1794
1903
|
case "ul":
|
|
1795
|
-
|
|
1904
|
+
r = "li";
|
|
1796
1905
|
break;
|
|
1797
1906
|
case "ol":
|
|
1798
|
-
|
|
1907
|
+
r = "li";
|
|
1799
1908
|
break;
|
|
1800
1909
|
default:
|
|
1801
|
-
|
|
1910
|
+
r = "div";
|
|
1802
1911
|
}
|
|
1803
|
-
return !e &&
|
|
1804
|
-
|
|
1805
|
-
{ ...
|
|
1912
|
+
return !e && n ? g.createElement(
|
|
1913
|
+
r,
|
|
1914
|
+
{ ...t, ...o },
|
|
1806
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" })
|
|
1807
|
-
) :
|
|
1916
|
+
) : g.createElement(r, { ...t, ...o }, e);
|
|
1808
1917
|
}, Mt = {
|
|
1809
1918
|
type: "RepeaterItem",
|
|
1810
1919
|
label: "Repeater Item",
|
|
1811
|
-
icon:
|
|
1920
|
+
icon: M,
|
|
1812
1921
|
hidden: !0,
|
|
1813
1922
|
group: "basic",
|
|
1814
1923
|
...u({
|
|
@@ -1823,9 +1932,9 @@ const $ = (e, ...o) => ({
|
|
|
1823
1932
|
canDuplicate: () => !1
|
|
1824
1933
|
}, Et = ({
|
|
1825
1934
|
children: e,
|
|
1826
|
-
blockProps:
|
|
1827
|
-
styles:
|
|
1828
|
-
}) =>
|
|
1935
|
+
blockProps: t,
|
|
1936
|
+
styles: o
|
|
1937
|
+
}) => g.createElement("div", { ...t, ...o }, e), $t = {
|
|
1829
1938
|
type: "RepeaterEmptyState",
|
|
1830
1939
|
label: "Empty State",
|
|
1831
1940
|
hidden: !0,
|
|
@@ -1837,9 +1946,9 @@ const $ = (e, ...o) => ({
|
|
|
1837
1946
|
canDelete: () => !1,
|
|
1838
1947
|
canMove: () => !1,
|
|
1839
1948
|
canDuplicate: () => !1
|
|
1840
|
-
},
|
|
1841
|
-
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(rt, it), p(st, at), p(ct, pt), p(tt, ot), p(lt, nt), 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);
|
|
1842
1951
|
};
|
|
1843
1952
|
export {
|
|
1844
|
-
|
|
1953
|
+
Vt as loadWebBlocks
|
|
1845
1954
|
};
|