@chaibuilder/sdk 3.0.28 → 3.1.0
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/{IconPicker-CluS-5Mv.js → IconPicker-DB-dcym6.js} +1 -1
- package/dist/{IconPicker-BWE43eMO.cjs → IconPicker-OPOFkNZu.cjs} +1 -1
- package/dist/apply-binding-BEdnEDe4.cjs +1 -0
- package/dist/apply-binding-FoDMumPo.js +704 -0
- package/dist/{code-editor-D9Lla5Lr.cjs → code-editor-BF_Dj7wT.cjs} +1 -1
- package/dist/{code-editor-DmN41-qr.js → code-editor-DHjchara.js} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +15 -2
- package/dist/core.js +82 -78
- package/dist/{css-import-modal-DaH4zyxk.js → css-import-modal-DK2j6oGY.js} +1 -1
- package/dist/{css-import-modal-BQLoUINw.cjs → css-import-modal-P7f5SEKA.cjs} +1 -1
- package/dist/{index-Ct0lOt4c.js → index-0I-fi22L.js} +1010 -1135
- package/dist/index-kJFsIwFo.cjs +128 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +2 -2
- package/dist/{rte-widget-modal-DzEtNny0.cjs → rte-widget-modal-BZJ8UA08.cjs} +1 -1
- package/dist/{rte-widget-modal-jYxk5Q4W.js → rte-widget-modal-DxyV3u6C.js} +2 -2
- package/dist/{tooltip-Bz2MxMHf.js → tooltip-4-b9QGDK.js} +0 -1
- package/dist/{tooltip-CzZ7Fvt7.cjs → tooltip-C2BCZ8Al.cjs} +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +326 -322
- package/package.json +2 -2
- package/dist/apply-binding-BIYK6lOq.cjs +0 -1
- package/dist/apply-binding-YbVf4970.js +0 -685
- package/dist/index-BtVNiUIw.cjs +0 -128
package/dist/web-blocks.js
CHANGED
|
@@ -3,8 +3,8 @@ import { jsx as a, jsxs as g, Fragment as N } from "react/jsx-runtime";
|
|
|
3
3
|
import { c as _, g as I } from "./common-functions-BGzDsf1z.js";
|
|
4
4
|
import * as y from "react";
|
|
5
5
|
import { createElement as w } from "react";
|
|
6
|
-
import { ButtonIcon as E, CodeIcon as H,
|
|
7
|
-
import { isEmpty as v, get as
|
|
6
|
+
import { ButtonIcon as E, CodeIcon as H, FrameIcon as $, SketchLogoIcon as Z, LayoutIcon as G, RowsIcon as z, DividerHorizontalIcon as W, CheckboxIcon as O, FileTextIcon as Y, InputIcon as j, LetterCaseToggleIcon as Q, RadiobuttonIcon as J, DropdownMenuIcon as X, HeadingIcon as K, TableIcon as ee, BorderTopIcon as te, BorderAllIcon as oe, ViewHorizontalIcon as le, DragHandleHorizontalIcon as re, ImageIcon as ne, Link1Icon as ae, ColumnsIcon as ie, TextIcon as se, CursorTextIcon as ce, SpaceBetweenVerticallyIcon as de, VideoIcon as pe, ChevronLeftIcon as ue, ChevronRightIcon as me, LoopIcon as D } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as v, get as k, map as R, isNull as ye, omit as V, pick as F } from "lodash-es";
|
|
8
8
|
const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div", { className: _("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ a("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ a("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, ge = (e) => {
|
|
9
9
|
const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
|
|
10
10
|
let s = r;
|
|
@@ -64,7 +64,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
64
64
|
dangerouslySetInnerHTML: { __html: h }
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
|
-
] }),
|
|
67
|
+
] }), x = w(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
70
|
...o,
|
|
@@ -74,7 +74,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
74
74
|
},
|
|
75
75
|
b
|
|
76
76
|
);
|
|
77
|
-
return v(
|
|
77
|
+
return v(k(c, "href")) ? x : m ? /* @__PURE__ */ a("span", { children: x }) : /* @__PURE__ */ a("a", { "aria-label": r, href: k(c, "href") || "/", target: k(c, "target", "_self"), children: x });
|
|
78
78
|
}, he = {
|
|
79
79
|
type: "Button",
|
|
80
80
|
description: "similar to a button element in HTML",
|
|
@@ -131,10 +131,10 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
131
131
|
}),
|
|
132
132
|
i18nProps: ["content", "link"],
|
|
133
133
|
aiProps: ["content"]
|
|
134
|
-
},
|
|
134
|
+
}, ke = (e) => {
|
|
135
135
|
const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
|
|
136
|
-
return r ? /* @__PURE__ */ g("div", { className: "relative", children: [
|
|
137
|
-
r ? /* @__PURE__ */ a("div", { ...
|
|
136
|
+
return r ? /* @__PURE__ */ g("div", { className: "relative", ...o, children: [
|
|
137
|
+
r ? /* @__PURE__ */ a("div", { ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
138
138
|
y.createElement("div", {
|
|
139
139
|
...t,
|
|
140
140
|
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
@@ -144,7 +144,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
144
144
|
...t,
|
|
145
145
|
dangerouslySetInnerHTML: { __html: l }
|
|
146
146
|
});
|
|
147
|
-
},
|
|
147
|
+
}, xe = {
|
|
148
148
|
type: "CustomHTML",
|
|
149
149
|
description: "similar to a div or section elements in HTML",
|
|
150
150
|
label: "Custom HTML",
|
|
@@ -185,25 +185,261 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
185
185
|
}
|
|
186
186
|
})
|
|
187
187
|
}, Ce = (e) => {
|
|
188
|
+
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
189
|
+
return t && !r ? /* @__PURE__ */ g(
|
|
190
|
+
"div",
|
|
191
|
+
{
|
|
192
|
+
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
193
|
+
...o,
|
|
194
|
+
children: [
|
|
195
|
+
/* @__PURE__ */ g("h1", { children: [
|
|
196
|
+
"Global Block - ",
|
|
197
|
+
r
|
|
198
|
+
] }),
|
|
199
|
+
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
) : y.createElement("span", { ...o }, l);
|
|
203
|
+
}, Ie = {
|
|
204
|
+
type: "GlobalBlock",
|
|
205
|
+
description: "A global block component",
|
|
206
|
+
label: "Global Block",
|
|
207
|
+
icon: $,
|
|
208
|
+
category: "core",
|
|
209
|
+
group: "basic",
|
|
210
|
+
hidden: !0,
|
|
211
|
+
...p({
|
|
212
|
+
properties: {
|
|
213
|
+
globalBlock: {
|
|
214
|
+
type: "string",
|
|
215
|
+
title: "Global Block",
|
|
216
|
+
default: "",
|
|
217
|
+
ui: { "ui:widget": "hidden" }
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
})
|
|
221
|
+
}, T = (e, ...o) => ({
|
|
222
|
+
...e,
|
|
223
|
+
className: _(e.className, ...o)
|
|
224
|
+
}), Pe = (e) => {
|
|
225
|
+
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s = T(l, "");
|
|
226
|
+
if (v(t))
|
|
227
|
+
return /* @__PURE__ */ a(C, { inBuilder: n, className: "h-8 w-14" });
|
|
228
|
+
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
229
|
+
return y.createElement("span", {
|
|
230
|
+
...o,
|
|
231
|
+
...s,
|
|
232
|
+
style: {
|
|
233
|
+
width: r ? `${r}px` : "auto",
|
|
234
|
+
height: i ? `${i}px` : "auto"
|
|
235
|
+
},
|
|
236
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
237
|
+
});
|
|
238
|
+
}, Le = {
|
|
239
|
+
type: "Icon",
|
|
240
|
+
label: "web_blocks.icon",
|
|
241
|
+
category: "core",
|
|
242
|
+
description: "Icon block is used to display an icon/svg.",
|
|
243
|
+
icon: Z,
|
|
244
|
+
group: "media",
|
|
245
|
+
...p({
|
|
246
|
+
properties: {
|
|
247
|
+
styles: u(""),
|
|
248
|
+
icon: {
|
|
249
|
+
type: "string",
|
|
250
|
+
title: "Icon",
|
|
251
|
+
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>',
|
|
252
|
+
ui: { "ui:widget": "icon" }
|
|
253
|
+
},
|
|
254
|
+
width: {
|
|
255
|
+
type: "number",
|
|
256
|
+
default: 16,
|
|
257
|
+
title: "Width"
|
|
258
|
+
},
|
|
259
|
+
height: {
|
|
260
|
+
type: "number",
|
|
261
|
+
default: 16,
|
|
262
|
+
title: "Height"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
})
|
|
266
|
+
}, Be = (e) => {
|
|
267
|
+
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
268
|
+
return t && !r ? /* @__PURE__ */ g(
|
|
269
|
+
"div",
|
|
270
|
+
{
|
|
271
|
+
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
272
|
+
...o,
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ g("h1", { children: [
|
|
275
|
+
"Partial Block - ",
|
|
276
|
+
r
|
|
277
|
+
] }),
|
|
278
|
+
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
) : y.createElement("span", { ...o }, l);
|
|
282
|
+
}, Se = {
|
|
283
|
+
type: "PartialBlock",
|
|
284
|
+
description: "A partial block component. Partial blocks are global blocks that can be used in multiple pages.",
|
|
285
|
+
label: "Partial Block",
|
|
286
|
+
icon: $,
|
|
287
|
+
category: "core",
|
|
288
|
+
group: "basic",
|
|
289
|
+
hidden: !0,
|
|
290
|
+
...p({
|
|
291
|
+
properties: {
|
|
292
|
+
partialBlockId: {
|
|
293
|
+
type: "string",
|
|
294
|
+
title: "Partial Block",
|
|
295
|
+
default: "",
|
|
296
|
+
ui: { "ui:widget": "hidden" }
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
})
|
|
300
|
+
}, B = {
|
|
301
|
+
SMALL: {
|
|
302
|
+
1: "col-span-1",
|
|
303
|
+
2: "col-span-2",
|
|
304
|
+
3: "col-span-3",
|
|
305
|
+
4: "col-span-4",
|
|
306
|
+
5: "col-span-5",
|
|
307
|
+
6: "col-span-6",
|
|
308
|
+
7: "col-span-7",
|
|
309
|
+
8: "col-span-8",
|
|
310
|
+
9: "col-span-9",
|
|
311
|
+
10: "col-span-10",
|
|
312
|
+
11: "col-span-11",
|
|
313
|
+
12: "col-span-12"
|
|
314
|
+
},
|
|
315
|
+
MEDIUM: {
|
|
316
|
+
1: "md:col-span-1",
|
|
317
|
+
2: "md:col-span-2",
|
|
318
|
+
3: "md:col-span-3",
|
|
319
|
+
4: "md:col-span-4",
|
|
320
|
+
5: "md:col-span-5",
|
|
321
|
+
6: "md:col-span-6",
|
|
322
|
+
7: "md:col-span-7",
|
|
323
|
+
8: "md:col-span-8",
|
|
324
|
+
9: "md:col-span-9",
|
|
325
|
+
10: "md:col-span-10",
|
|
326
|
+
11: "md:col-span-11",
|
|
327
|
+
12: "md:col-span-12"
|
|
328
|
+
},
|
|
329
|
+
LARGE: {
|
|
330
|
+
1: "lg:col-span-1",
|
|
331
|
+
2: "lg:col-span-2",
|
|
332
|
+
3: "lg:col-span-3",
|
|
333
|
+
4: "lg:col-span-4",
|
|
334
|
+
5: "lg:col-span-5",
|
|
335
|
+
6: "lg:col-span-6",
|
|
336
|
+
7: "lg:col-span-7",
|
|
337
|
+
8: "lg:col-span-8",
|
|
338
|
+
9: "lg:col-span-9",
|
|
339
|
+
10: "lg:col-span-10",
|
|
340
|
+
11: "lg:col-span-11",
|
|
341
|
+
12: "lg:col-span-12"
|
|
342
|
+
}
|
|
343
|
+
}, Ne = (e) => {
|
|
344
|
+
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
345
|
+
k(l, "className", ""),
|
|
346
|
+
k(B, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
347
|
+
n ? k(B, ["MEDIUM", n || r], "") : "",
|
|
348
|
+
i ? k(B, ["LARGE", n || r], "") : ""
|
|
349
|
+
].join(" ") };
|
|
350
|
+
return /* @__PURE__ */ a("div", { ...o, ...l, ...c, children: t || /* @__PURE__ */ a("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
351
|
+
}, _e = {
|
|
352
|
+
type: "Column",
|
|
353
|
+
description: "A column component",
|
|
354
|
+
label: "Column",
|
|
355
|
+
group: "basic",
|
|
356
|
+
category: "core",
|
|
357
|
+
icon: G,
|
|
358
|
+
wrapper: !0,
|
|
359
|
+
hidden: !0,
|
|
360
|
+
canDelete: () => !0,
|
|
361
|
+
canAcceptBlock: () => !0,
|
|
362
|
+
canBeNested: (e) => e === "Row",
|
|
363
|
+
...p({
|
|
364
|
+
properties: {
|
|
365
|
+
styles: u(""),
|
|
366
|
+
colSpan: {
|
|
367
|
+
type: "number",
|
|
368
|
+
title: "Column Span",
|
|
369
|
+
default: 6,
|
|
370
|
+
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
371
|
+
},
|
|
372
|
+
tabletColSpan: {
|
|
373
|
+
type: "number",
|
|
374
|
+
title: "Column Span (Tablet)",
|
|
375
|
+
default: null,
|
|
376
|
+
enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
377
|
+
enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
378
|
+
},
|
|
379
|
+
desktopColSpan: {
|
|
380
|
+
type: "number",
|
|
381
|
+
title: "Column Span (Desktop)",
|
|
382
|
+
default: null,
|
|
383
|
+
enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
384
|
+
enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
})
|
|
388
|
+
}, Te = (e) => {
|
|
389
|
+
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [k(l, "className", ""), " grid grid-cols-12"].join() };
|
|
390
|
+
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ a("div", { ...o, ...l, ...i, children: t });
|
|
391
|
+
}, Re = {
|
|
392
|
+
type: "Row",
|
|
393
|
+
description: "A row component",
|
|
394
|
+
label: "Row",
|
|
395
|
+
group: "basic",
|
|
396
|
+
icon: z,
|
|
397
|
+
hidden: !0,
|
|
398
|
+
blocks: () => [
|
|
399
|
+
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
400
|
+
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
401
|
+
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," }
|
|
402
|
+
],
|
|
403
|
+
category: "core",
|
|
404
|
+
wrapper: !0,
|
|
405
|
+
canAcceptBlock: (e) => e === "Column",
|
|
406
|
+
...p({
|
|
407
|
+
properties: {
|
|
408
|
+
styles: u(""),
|
|
409
|
+
colCount: {
|
|
410
|
+
type: "number",
|
|
411
|
+
default: 2,
|
|
412
|
+
minimum: 0,
|
|
413
|
+
ui: { "ui:widget": "colCount" }
|
|
414
|
+
},
|
|
415
|
+
gutter: {
|
|
416
|
+
type: "number",
|
|
417
|
+
title: "Gutter (in px)",
|
|
418
|
+
default: 16,
|
|
419
|
+
minimum: 0
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
})
|
|
423
|
+
}, Ae = (e) => {
|
|
188
424
|
const { blockProps: o, styles: t } = e;
|
|
189
425
|
return w("hr", { ...t, ...o });
|
|
190
|
-
},
|
|
426
|
+
}, Me = {
|
|
191
427
|
type: "Divider",
|
|
192
428
|
description: "A horizontal line component",
|
|
193
429
|
label: "Divider",
|
|
194
430
|
category: "core",
|
|
195
|
-
icon:
|
|
431
|
+
icon: W,
|
|
196
432
|
group: "basic",
|
|
197
433
|
...p({
|
|
198
434
|
properties: {
|
|
199
435
|
styles: u("bg-gray-900 h-0.5 py-2 my-1")
|
|
200
436
|
}
|
|
201
437
|
})
|
|
202
|
-
},
|
|
438
|
+
}, Ee = (e) => {
|
|
203
439
|
const { blockProps: o, styles: t, backgroundImage: l } = e;
|
|
204
440
|
let r = {};
|
|
205
441
|
return l && (r = { backgroundImage: `url(${l})` }), y.createElement("div", { ...o, ...t, style: r });
|
|
206
|
-
},
|
|
442
|
+
}, He = {
|
|
207
443
|
type: "EmptyBox",
|
|
208
444
|
description: "A box component with no children",
|
|
209
445
|
label: "Empty Box",
|
|
@@ -220,7 +456,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
220
456
|
}
|
|
221
457
|
}
|
|
222
458
|
})
|
|
223
|
-
},
|
|
459
|
+
}, $e = (e) => {
|
|
224
460
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
|
|
225
461
|
return c ? /* @__PURE__ */ g("div", { ...r, ...o, children: [
|
|
226
462
|
/* @__PURE__ */ a("input", { ...n, name: t, type: "checkbox", required: i, defaultChecked: s }),
|
|
@@ -237,11 +473,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
237
473
|
defaultChecked: s
|
|
238
474
|
}
|
|
239
475
|
);
|
|
240
|
-
},
|
|
476
|
+
}, ze = {
|
|
241
477
|
type: "Checkbox",
|
|
242
478
|
label: "web_blocks.checkbox",
|
|
243
479
|
category: "core",
|
|
244
|
-
icon:
|
|
480
|
+
icon: O,
|
|
245
481
|
group: "form",
|
|
246
482
|
...p({
|
|
247
483
|
properties: {
|
|
@@ -276,7 +512,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
276
512
|
}),
|
|
277
513
|
aiProps: ["label"],
|
|
278
514
|
i18nProps: ["label"]
|
|
279
|
-
},
|
|
515
|
+
}, je = (e) => {
|
|
280
516
|
const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: s } = e;
|
|
281
517
|
let c = o;
|
|
282
518
|
return o || (c = /* @__PURE__ */ a(C, { inBuilder: s })), /* @__PURE__ */ g(
|
|
@@ -301,11 +537,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
301
537
|
]
|
|
302
538
|
}
|
|
303
539
|
);
|
|
304
|
-
},
|
|
540
|
+
}, De = {
|
|
305
541
|
type: "Form",
|
|
306
542
|
label: "Form",
|
|
307
543
|
category: "core",
|
|
308
|
-
icon:
|
|
544
|
+
icon: Y,
|
|
309
545
|
group: "form",
|
|
310
546
|
blocks: () => [
|
|
311
547
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -342,7 +578,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
342
578
|
i18nProps: ["errorMessage", "successMessage"],
|
|
343
579
|
aiProps: ["errorMessage", "successMessage"],
|
|
344
580
|
canAcceptBlock: () => !0
|
|
345
|
-
},
|
|
581
|
+
}, Ve = (e) => {
|
|
346
582
|
const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: i, iconPos: s } = e;
|
|
347
583
|
return /* @__PURE__ */ g("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
|
|
348
584
|
l,
|
|
@@ -355,7 +591,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
355
591
|
}
|
|
356
592
|
)
|
|
357
593
|
] });
|
|
358
|
-
},
|
|
594
|
+
}, Fe = {
|
|
359
595
|
type: "FormButton",
|
|
360
596
|
label: "Submit Button",
|
|
361
597
|
category: "core",
|
|
@@ -394,7 +630,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
394
630
|
}),
|
|
395
631
|
i18nProps: ["label"],
|
|
396
632
|
aiProps: ["label"]
|
|
397
|
-
},
|
|
633
|
+
}, Ue = (e) => {
|
|
398
634
|
const o = { type: "text", autocomplete: "on" };
|
|
399
635
|
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" } : {
|
|
400
636
|
// Special cases
|
|
@@ -462,7 +698,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
462
698
|
organization: { type: "text", autocomplete: "organization" },
|
|
463
699
|
language: { type: "text", autocomplete: "language" }
|
|
464
700
|
}[e] || o : o;
|
|
465
|
-
},
|
|
701
|
+
}, qe = (e) => {
|
|
466
702
|
const {
|
|
467
703
|
blockProps: o,
|
|
468
704
|
fieldName: t,
|
|
@@ -474,7 +710,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
474
710
|
required: c,
|
|
475
711
|
inputType: m,
|
|
476
712
|
defaultValue: h
|
|
477
|
-
} = e, { type: b, autocomplete:
|
|
713
|
+
} = e, { type: b, autocomplete: x } = Ue(m);
|
|
478
714
|
return s ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
|
|
479
715
|
s && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
480
716
|
/* @__PURE__ */ a(
|
|
@@ -486,7 +722,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
486
722
|
type: b,
|
|
487
723
|
placeholder: r,
|
|
488
724
|
required: c,
|
|
489
|
-
autoComplete:
|
|
725
|
+
autoComplete: x
|
|
490
726
|
}
|
|
491
727
|
)
|
|
492
728
|
] }) : /* @__PURE__ */ a(
|
|
@@ -499,15 +735,15 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
499
735
|
type: b,
|
|
500
736
|
placeholder: r,
|
|
501
737
|
required: c,
|
|
502
|
-
autoComplete:
|
|
738
|
+
autoComplete: x,
|
|
503
739
|
defaultValue: h
|
|
504
740
|
}
|
|
505
741
|
);
|
|
506
|
-
},
|
|
742
|
+
}, Ze = {
|
|
507
743
|
type: "Input",
|
|
508
744
|
label: "web_blocks.input",
|
|
509
745
|
category: "core",
|
|
510
|
-
icon:
|
|
746
|
+
icon: j,
|
|
511
747
|
group: "form",
|
|
512
748
|
...p({
|
|
513
749
|
properties: {
|
|
@@ -618,17 +854,17 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
618
854
|
}),
|
|
619
855
|
aiProps: ["label", "placeholder"],
|
|
620
856
|
i18nProps: ["label", "placeholder"]
|
|
621
|
-
},
|
|
857
|
+
}, Ge = (e) => {
|
|
622
858
|
const { blockProps: o, content: t, styles: l, children: r } = e, n = { ...l, ...o };
|
|
623
859
|
return r ? y.createElement("label", n, r) : y.createElement("label", {
|
|
624
860
|
...n,
|
|
625
861
|
dangerouslySetInnerHTML: { __html: t }
|
|
626
862
|
});
|
|
627
|
-
},
|
|
863
|
+
}, We = {
|
|
628
864
|
type: "Label",
|
|
629
865
|
label: "Label",
|
|
630
866
|
category: "core",
|
|
631
|
-
icon:
|
|
867
|
+
icon: Q,
|
|
632
868
|
group: "form",
|
|
633
869
|
...p({
|
|
634
870
|
properties: {
|
|
@@ -642,7 +878,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
642
878
|
}),
|
|
643
879
|
aiProps: ["content"],
|
|
644
880
|
i18nProps: ["content"]
|
|
645
|
-
},
|
|
881
|
+
}, Oe = (e) => {
|
|
646
882
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
|
|
647
883
|
return c ? /* @__PURE__ */ g("div", { ...r, ...o, children: [
|
|
648
884
|
/* @__PURE__ */ a("input", { ...n, name: t, type: "radio", required: i, defaultChecked: s }),
|
|
@@ -659,11 +895,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
659
895
|
checked: s
|
|
660
896
|
}
|
|
661
897
|
);
|
|
662
|
-
},
|
|
898
|
+
}, Ye = {
|
|
663
899
|
type: "Radio",
|
|
664
900
|
label: "web_blocks.radio",
|
|
665
901
|
category: "core",
|
|
666
|
-
icon:
|
|
902
|
+
icon: J,
|
|
667
903
|
group: "form",
|
|
668
904
|
...p({
|
|
669
905
|
properties: {
|
|
@@ -698,7 +934,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
698
934
|
}),
|
|
699
935
|
aiProps: ["label"],
|
|
700
936
|
i18nProps: ["label"]
|
|
701
|
-
},
|
|
937
|
+
}, Qe = (e) => {
|
|
702
938
|
const {
|
|
703
939
|
blockProps: o,
|
|
704
940
|
fieldName: t,
|
|
@@ -711,7 +947,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
711
947
|
_multiple: m,
|
|
712
948
|
options: h,
|
|
713
949
|
defaultValue: b
|
|
714
|
-
} = e,
|
|
950
|
+
} = e, x = m && b ? b.split(",").map((f) => f.trim()) : b || "";
|
|
715
951
|
return c ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
|
|
716
952
|
c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
717
953
|
/* @__PURE__ */ g(
|
|
@@ -721,7 +957,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
721
957
|
required: s,
|
|
722
958
|
multiple: m,
|
|
723
959
|
name: t,
|
|
724
|
-
defaultValue:
|
|
960
|
+
defaultValue: x,
|
|
725
961
|
children: [
|
|
726
962
|
/* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
727
963
|
R(h, (f) => /* @__PURE__ */ a("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
|
|
@@ -736,18 +972,18 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
736
972
|
required: s,
|
|
737
973
|
multiple: m,
|
|
738
974
|
name: t,
|
|
739
|
-
defaultValue:
|
|
975
|
+
defaultValue: x,
|
|
740
976
|
children: [
|
|
741
977
|
/* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
742
978
|
R(h, (f) => /* @__PURE__ */ a("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
|
|
743
979
|
]
|
|
744
980
|
}
|
|
745
981
|
);
|
|
746
|
-
},
|
|
982
|
+
}, Je = {
|
|
747
983
|
type: "Select",
|
|
748
984
|
label: "web_blocks.select",
|
|
749
985
|
category: "core",
|
|
750
|
-
icon:
|
|
986
|
+
icon: X,
|
|
751
987
|
group: "form",
|
|
752
988
|
...p({
|
|
753
989
|
properties: {
|
|
@@ -812,7 +1048,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
812
1048
|
}),
|
|
813
1049
|
aiProps: ["label", "placeholder"],
|
|
814
1050
|
i18nProps: ["label", "placeholder"]
|
|
815
|
-
},
|
|
1051
|
+
}, Xe = (e) => {
|
|
816
1052
|
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: s, showLabel: c, required: m, defaultValue: h } = e;
|
|
817
1053
|
return c ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
|
|
818
1054
|
c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
@@ -840,11 +1076,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
840
1076
|
defaultValue: h
|
|
841
1077
|
}
|
|
842
1078
|
);
|
|
843
|
-
},
|
|
1079
|
+
}, Ke = {
|
|
844
1080
|
type: "TextArea",
|
|
845
1081
|
label: "web_blocks.textarea",
|
|
846
1082
|
category: "core",
|
|
847
|
-
icon:
|
|
1083
|
+
icon: j,
|
|
848
1084
|
group: "form",
|
|
849
1085
|
...p({
|
|
850
1086
|
properties: {
|
|
@@ -891,53 +1127,19 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
891
1127
|
}),
|
|
892
1128
|
aiProps: ["label", "placeholder"],
|
|
893
1129
|
i18nProps: ["label", "placeholder"]
|
|
894
|
-
},
|
|
895
|
-
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
896
|
-
return t && !r ? /* @__PURE__ */ g(
|
|
897
|
-
"div",
|
|
898
|
-
{
|
|
899
|
-
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
900
|
-
...o,
|
|
901
|
-
children: [
|
|
902
|
-
/* @__PURE__ */ g("h1", { children: [
|
|
903
|
-
"Global Block - ",
|
|
904
|
-
r
|
|
905
|
-
] }),
|
|
906
|
-
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
907
|
-
]
|
|
908
|
-
}
|
|
909
|
-
) : y.createElement("span", { ...o }, l);
|
|
910
|
-
}, Ze = {
|
|
911
|
-
type: "GlobalBlock",
|
|
912
|
-
description: "A global block component",
|
|
913
|
-
label: "Global Block",
|
|
914
|
-
icon: z,
|
|
915
|
-
category: "core",
|
|
916
|
-
group: "basic",
|
|
917
|
-
hidden: !0,
|
|
918
|
-
...p({
|
|
919
|
-
properties: {
|
|
920
|
-
globalBlock: {
|
|
921
|
-
type: "string",
|
|
922
|
-
title: "Global Block",
|
|
923
|
-
default: "",
|
|
924
|
-
ui: { "ui:widget": "hidden" }
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
})
|
|
928
|
-
}, Ge = (e) => {
|
|
1130
|
+
}, et = (e) => {
|
|
929
1131
|
const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
|
|
930
1132
|
return n ? y.createElement(r, { ...t, ...o }, n) : y.createElement(r, {
|
|
931
1133
|
...t,
|
|
932
1134
|
...o,
|
|
933
1135
|
dangerouslySetInnerHTML: { __html: l }
|
|
934
1136
|
});
|
|
935
|
-
},
|
|
1137
|
+
}, tt = {
|
|
936
1138
|
type: "Heading",
|
|
937
1139
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
938
1140
|
label: "Heading",
|
|
939
1141
|
category: "core",
|
|
940
|
-
icon:
|
|
1142
|
+
icon: K,
|
|
941
1143
|
group: "typography",
|
|
942
1144
|
...p({
|
|
943
1145
|
properties: {
|
|
@@ -959,10 +1161,10 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
959
1161
|
aiProps: ["content"],
|
|
960
1162
|
i18nProps: ["content"],
|
|
961
1163
|
canAcceptBlock: () => !0
|
|
962
|
-
},
|
|
1164
|
+
}, ot = (e) => {
|
|
963
1165
|
const { blockProps: o, styles: t } = e;
|
|
964
1166
|
return w("br", { ...o, ...t });
|
|
965
|
-
},
|
|
1167
|
+
}, lt = {
|
|
966
1168
|
type: "LineBreak",
|
|
967
1169
|
label: "Line Break",
|
|
968
1170
|
category: "core",
|
|
@@ -977,19 +1179,19 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
977
1179
|
canDelete: () => !1,
|
|
978
1180
|
canMove: () => !1,
|
|
979
1181
|
canDuplicate: () => !1
|
|
980
|
-
},
|
|
1182
|
+
}, rt = (e) => {
|
|
981
1183
|
const { blockProps: o, children: t, styles: l } = e;
|
|
982
1184
|
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ a(C, {});
|
|
983
|
-
},
|
|
1185
|
+
}, nt = (e) => {
|
|
984
1186
|
const { blockProps: o, children: t, styles: l } = e;
|
|
985
1187
|
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ a(C, {});
|
|
986
|
-
},
|
|
1188
|
+
}, at = (e) => {
|
|
987
1189
|
const { blockProps: o, children: t, styles: l } = e;
|
|
988
1190
|
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ a(C, {});
|
|
989
|
-
},
|
|
1191
|
+
}, it = (e) => {
|
|
990
1192
|
const { blockProps: o, children: t, styles: l } = e;
|
|
991
1193
|
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ a(C, {});
|
|
992
|
-
},
|
|
1194
|
+
}, st = (e) => {
|
|
993
1195
|
const { blockProps: o, children: t, content: l, styles: r } = e;
|
|
994
1196
|
return !t && v(l) ? /* @__PURE__ */ a(C, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
|
|
995
1197
|
...o,
|
|
@@ -997,13 +1199,13 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
997
1199
|
dangerouslySetInnerHTML: { __html: l }
|
|
998
1200
|
});
|
|
999
1201
|
};
|
|
1000
|
-
d(
|
|
1202
|
+
d(rt, {
|
|
1001
1203
|
type: "Table",
|
|
1002
1204
|
label: "Table",
|
|
1003
1205
|
category: "core",
|
|
1004
1206
|
group: "table",
|
|
1005
1207
|
hidden: !0,
|
|
1006
|
-
icon:
|
|
1208
|
+
icon: ee,
|
|
1007
1209
|
...p({
|
|
1008
1210
|
properties: {
|
|
1009
1211
|
styles: u("")
|
|
@@ -1011,13 +1213,13 @@ d(Qe, {
|
|
|
1011
1213
|
}),
|
|
1012
1214
|
blocks: P("Table")
|
|
1013
1215
|
});
|
|
1014
|
-
d(
|
|
1216
|
+
d(nt, {
|
|
1015
1217
|
type: "TableHead",
|
|
1016
1218
|
label: "Table Head",
|
|
1017
1219
|
category: "core",
|
|
1018
1220
|
group: "table",
|
|
1019
1221
|
hidden: !0,
|
|
1020
|
-
icon:
|
|
1222
|
+
icon: te,
|
|
1021
1223
|
...p({
|
|
1022
1224
|
properties: {
|
|
1023
1225
|
styles: u("")
|
|
@@ -1025,13 +1227,13 @@ d(Je, {
|
|
|
1025
1227
|
}),
|
|
1026
1228
|
blocks: P("TableHead")
|
|
1027
1229
|
});
|
|
1028
|
-
d(
|
|
1230
|
+
d(at, {
|
|
1029
1231
|
type: "TableBody",
|
|
1030
1232
|
label: "Table Body",
|
|
1031
1233
|
category: "core",
|
|
1032
1234
|
group: "table",
|
|
1033
1235
|
hidden: !0,
|
|
1034
|
-
icon:
|
|
1236
|
+
icon: oe,
|
|
1035
1237
|
...p({
|
|
1036
1238
|
properties: {
|
|
1037
1239
|
styles: u("")
|
|
@@ -1039,13 +1241,13 @@ d(Xe, {
|
|
|
1039
1241
|
}),
|
|
1040
1242
|
blocks: P("TableBody")
|
|
1041
1243
|
});
|
|
1042
|
-
d(
|
|
1244
|
+
d(it, {
|
|
1043
1245
|
type: "TableRow",
|
|
1044
1246
|
label: "Table Row",
|
|
1045
1247
|
category: "core",
|
|
1046
1248
|
group: "table",
|
|
1047
1249
|
hidden: !0,
|
|
1048
|
-
icon:
|
|
1250
|
+
icon: le,
|
|
1049
1251
|
...p({
|
|
1050
1252
|
properties: {
|
|
1051
1253
|
styles: u("")
|
|
@@ -1053,13 +1255,13 @@ d(Ke, {
|
|
|
1053
1255
|
}),
|
|
1054
1256
|
blocks: P("TableRow")
|
|
1055
1257
|
});
|
|
1056
|
-
d(
|
|
1258
|
+
d(st, {
|
|
1057
1259
|
type: "TableCell",
|
|
1058
1260
|
label: "Table Cell",
|
|
1059
1261
|
category: "core",
|
|
1060
1262
|
group: "table",
|
|
1061
1263
|
hidden: !0,
|
|
1062
|
-
icon:
|
|
1264
|
+
icon: re,
|
|
1063
1265
|
...p({
|
|
1064
1266
|
properties: {
|
|
1065
1267
|
styles: u(""),
|
|
@@ -1118,51 +1320,7 @@ function P(e) {
|
|
|
1118
1320
|
}
|
|
1119
1321
|
return e === "TableRow" ? t() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1120
1322
|
}
|
|
1121
|
-
const
|
|
1122
|
-
...e,
|
|
1123
|
-
className: _(e.className, ...o)
|
|
1124
|
-
}), tt = (e) => {
|
|
1125
|
-
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s = T(l, "");
|
|
1126
|
-
if (v(t))
|
|
1127
|
-
return /* @__PURE__ */ a(C, { inBuilder: n, className: "h-8 w-14" });
|
|
1128
|
-
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
1129
|
-
return y.createElement("span", {
|
|
1130
|
-
...o,
|
|
1131
|
-
...s,
|
|
1132
|
-
style: {
|
|
1133
|
-
width: r ? `${r}px` : "auto",
|
|
1134
|
-
height: i ? `${i}px` : "auto"
|
|
1135
|
-
},
|
|
1136
|
-
dangerouslySetInnerHTML: { __html: c }
|
|
1137
|
-
});
|
|
1138
|
-
}, ot = {
|
|
1139
|
-
type: "Icon",
|
|
1140
|
-
label: "web_blocks.icon",
|
|
1141
|
-
category: "core",
|
|
1142
|
-
icon: le,
|
|
1143
|
-
group: "media",
|
|
1144
|
-
...p({
|
|
1145
|
-
properties: {
|
|
1146
|
-
styles: u(""),
|
|
1147
|
-
icon: {
|
|
1148
|
-
type: "string",
|
|
1149
|
-
title: "Icon",
|
|
1150
|
-
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>',
|
|
1151
|
-
ui: { "ui:widget": "icon" }
|
|
1152
|
-
},
|
|
1153
|
-
width: {
|
|
1154
|
-
type: "number",
|
|
1155
|
-
default: 16,
|
|
1156
|
-
title: "Width"
|
|
1157
|
-
},
|
|
1158
|
-
height: {
|
|
1159
|
-
type: "number",
|
|
1160
|
-
default: 16,
|
|
1161
|
-
title: "Height"
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
})
|
|
1165
|
-
}, lt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", rt = (e) => {
|
|
1323
|
+
const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", dt = (e) => {
|
|
1166
1324
|
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: i, width: s, lazyLoading: c, mobileWidth: m, mobileHeight: h } = e;
|
|
1167
1325
|
return v(t) ? /* @__PURE__ */ a(C, { className: "h-36" }) : /* @__PURE__ */ g("picture", { children: [
|
|
1168
1326
|
l && /* @__PURE__ */ a("source", { srcSet: l, media: "(max-width: 480px)", width: m, height: h }),
|
|
@@ -1179,12 +1337,12 @@ const T = (e, ...o) => ({
|
|
|
1179
1337
|
}
|
|
1180
1338
|
)
|
|
1181
1339
|
] });
|
|
1182
|
-
},
|
|
1340
|
+
}, pt = {
|
|
1183
1341
|
type: "Image",
|
|
1184
1342
|
description: "A image component",
|
|
1185
1343
|
label: "Image",
|
|
1186
1344
|
category: "core",
|
|
1187
|
-
icon:
|
|
1345
|
+
icon: ne,
|
|
1188
1346
|
group: "media",
|
|
1189
1347
|
...p({
|
|
1190
1348
|
properties: {
|
|
@@ -1192,7 +1350,7 @@ const T = (e, ...o) => ({
|
|
|
1192
1350
|
image: {
|
|
1193
1351
|
type: "string",
|
|
1194
1352
|
title: "Image",
|
|
1195
|
-
default:
|
|
1353
|
+
default: ct,
|
|
1196
1354
|
ui: { "ui:widget": "image" }
|
|
1197
1355
|
},
|
|
1198
1356
|
width: {
|
|
@@ -1240,7 +1398,7 @@ const T = (e, ...o) => ({
|
|
|
1240
1398
|
}),
|
|
1241
1399
|
aiProps: ["alt"],
|
|
1242
1400
|
i18nProps: ["alt", "image", "_imageId", "mobileImage", "_mobileImageId"]
|
|
1243
|
-
},
|
|
1401
|
+
}, ut = (e) => {
|
|
1244
1402
|
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1245
1403
|
let s = {};
|
|
1246
1404
|
return !l && v(i) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ a("span", { role: "link", ...o, style: s, ...r, children: l }) : w(
|
|
@@ -1263,12 +1421,12 @@ const T = (e, ...o) => ({
|
|
|
1263
1421
|
},
|
|
1264
1422
|
i
|
|
1265
1423
|
);
|
|
1266
|
-
},
|
|
1424
|
+
}, mt = {
|
|
1267
1425
|
type: "Link",
|
|
1268
1426
|
description: "A link component",
|
|
1269
1427
|
label: "Link",
|
|
1270
1428
|
category: "core",
|
|
1271
|
-
icon:
|
|
1429
|
+
icon: ae,
|
|
1272
1430
|
group: "basic",
|
|
1273
1431
|
...p({
|
|
1274
1432
|
properties: {
|
|
@@ -1304,14 +1462,14 @@ const T = (e, ...o) => ({
|
|
|
1304
1462
|
aiProps: ["content"],
|
|
1305
1463
|
i18nProps: ["content", "link"],
|
|
1306
1464
|
canAcceptBlock: (e) => e !== "Link"
|
|
1307
|
-
},
|
|
1465
|
+
}, yt = (e) => {
|
|
1308
1466
|
const { blockProps: o, children: t, styles: l, tag: r, inBuilder: n } = e;
|
|
1309
1467
|
return !t && v(l == null ? void 0 : l.className) ? /* @__PURE__ */ a(C, { inBuilder: n }) : y.createElement(r || "ul", { ...o, ...l }, t);
|
|
1310
|
-
},
|
|
1468
|
+
}, gt = {
|
|
1311
1469
|
type: "List",
|
|
1312
1470
|
description: "A list component",
|
|
1313
1471
|
label: "List",
|
|
1314
|
-
icon:
|
|
1472
|
+
icon: z,
|
|
1315
1473
|
category: "core",
|
|
1316
1474
|
group: "basic",
|
|
1317
1475
|
...p({
|
|
@@ -1344,18 +1502,18 @@ const T = (e, ...o) => ({
|
|
|
1344
1502
|
content: "Item 3"
|
|
1345
1503
|
}
|
|
1346
1504
|
]
|
|
1347
|
-
},
|
|
1505
|
+
}, bt = (e) => {
|
|
1348
1506
|
const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
|
|
1349
1507
|
return r ? y.createElement(n || "li", { ...l, ...o }, r) : y.createElement(n || "li", {
|
|
1350
1508
|
...l,
|
|
1351
1509
|
...o,
|
|
1352
1510
|
dangerouslySetInnerHTML: { __html: t }
|
|
1353
1511
|
});
|
|
1354
|
-
},
|
|
1512
|
+
}, ft = {
|
|
1355
1513
|
type: "ListItem",
|
|
1356
1514
|
description: "A list item component",
|
|
1357
1515
|
label: "List Item",
|
|
1358
|
-
icon:
|
|
1516
|
+
icon: ie,
|
|
1359
1517
|
category: "core",
|
|
1360
1518
|
group: "basic",
|
|
1361
1519
|
...p({
|
|
@@ -1375,7 +1533,7 @@ const T = (e, ...o) => ({
|
|
|
1375
1533
|
aiProps: ["content"],
|
|
1376
1534
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1377
1535
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1378
|
-
},
|
|
1536
|
+
}, ht = (e) => {
|
|
1379
1537
|
const { blockProps: o, styles: t, content: l } = e;
|
|
1380
1538
|
if (!ye(e.children)) return y.createElement("p", { ...t, ...o }, e.children);
|
|
1381
1539
|
const r = T(t, "rte");
|
|
@@ -1384,12 +1542,12 @@ const T = (e, ...o) => ({
|
|
|
1384
1542
|
...o,
|
|
1385
1543
|
dangerouslySetInnerHTML: { __html: l }
|
|
1386
1544
|
});
|
|
1387
|
-
},
|
|
1545
|
+
}, kt = {
|
|
1388
1546
|
type: "Paragraph",
|
|
1389
1547
|
description: "A paragraph component",
|
|
1390
1548
|
label: "Paragraph",
|
|
1391
1549
|
category: "core",
|
|
1392
|
-
icon:
|
|
1550
|
+
icon: se,
|
|
1393
1551
|
group: "typography",
|
|
1394
1552
|
...p({
|
|
1395
1553
|
properties: {
|
|
@@ -1405,162 +1563,7 @@ const T = (e, ...o) => ({
|
|
|
1405
1563
|
i18nProps: ["content"],
|
|
1406
1564
|
aiProps: ["content"],
|
|
1407
1565
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1408
|
-
},
|
|
1409
|
-
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
1410
|
-
return t && !r ? /* @__PURE__ */ g(
|
|
1411
|
-
"div",
|
|
1412
|
-
{
|
|
1413
|
-
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1414
|
-
...o,
|
|
1415
|
-
children: [
|
|
1416
|
-
/* @__PURE__ */ g("h1", { children: [
|
|
1417
|
-
"Partial Block - ",
|
|
1418
|
-
r
|
|
1419
|
-
] }),
|
|
1420
|
-
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1421
|
-
]
|
|
1422
|
-
}
|
|
1423
|
-
) : y.createElement("span", { ...o }, l);
|
|
1424
|
-
}, gt = {
|
|
1425
|
-
type: "PartialBlock",
|
|
1426
|
-
description: "A partial block component",
|
|
1427
|
-
label: "Partial Block",
|
|
1428
|
-
icon: z,
|
|
1429
|
-
category: "core",
|
|
1430
|
-
group: "basic",
|
|
1431
|
-
hidden: !0,
|
|
1432
|
-
...p({
|
|
1433
|
-
properties: {
|
|
1434
|
-
partialBlockId: {
|
|
1435
|
-
type: "string",
|
|
1436
|
-
title: "Partial Block",
|
|
1437
|
-
default: "",
|
|
1438
|
-
ui: { "ui:widget": "hidden" }
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
})
|
|
1442
|
-
}, B = {
|
|
1443
|
-
SMALL: {
|
|
1444
|
-
1: "col-span-1",
|
|
1445
|
-
2: "col-span-2",
|
|
1446
|
-
3: "col-span-3",
|
|
1447
|
-
4: "col-span-4",
|
|
1448
|
-
5: "col-span-5",
|
|
1449
|
-
6: "col-span-6",
|
|
1450
|
-
7: "col-span-7",
|
|
1451
|
-
8: "col-span-8",
|
|
1452
|
-
9: "col-span-9",
|
|
1453
|
-
10: "col-span-10",
|
|
1454
|
-
11: "col-span-11",
|
|
1455
|
-
12: "col-span-12"
|
|
1456
|
-
},
|
|
1457
|
-
MEDIUM: {
|
|
1458
|
-
1: "md:col-span-1",
|
|
1459
|
-
2: "md:col-span-2",
|
|
1460
|
-
3: "md:col-span-3",
|
|
1461
|
-
4: "md:col-span-4",
|
|
1462
|
-
5: "md:col-span-5",
|
|
1463
|
-
6: "md:col-span-6",
|
|
1464
|
-
7: "md:col-span-7",
|
|
1465
|
-
8: "md:col-span-8",
|
|
1466
|
-
9: "md:col-span-9",
|
|
1467
|
-
10: "md:col-span-10",
|
|
1468
|
-
11: "md:col-span-11",
|
|
1469
|
-
12: "md:col-span-12"
|
|
1470
|
-
},
|
|
1471
|
-
LARGE: {
|
|
1472
|
-
1: "lg:col-span-1",
|
|
1473
|
-
2: "lg:col-span-2",
|
|
1474
|
-
3: "lg:col-span-3",
|
|
1475
|
-
4: "lg:col-span-4",
|
|
1476
|
-
5: "lg:col-span-5",
|
|
1477
|
-
6: "lg:col-span-6",
|
|
1478
|
-
7: "lg:col-span-7",
|
|
1479
|
-
8: "lg:col-span-8",
|
|
1480
|
-
9: "lg:col-span-9",
|
|
1481
|
-
10: "lg:col-span-10",
|
|
1482
|
-
11: "lg:col-span-11",
|
|
1483
|
-
12: "lg:col-span-12"
|
|
1484
|
-
}
|
|
1485
|
-
}, bt = (e) => {
|
|
1486
|
-
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1487
|
-
x(l, "className", ""),
|
|
1488
|
-
x(B, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1489
|
-
n ? x(B, ["MEDIUM", n || r], "") : "",
|
|
1490
|
-
i ? x(B, ["LARGE", n || r], "") : ""
|
|
1491
|
-
].join(" ") };
|
|
1492
|
-
return /* @__PURE__ */ a("div", { ...o, ...l, ...c, children: t || /* @__PURE__ */ a("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1493
|
-
}, ft = {
|
|
1494
|
-
type: "Column",
|
|
1495
|
-
description: "A column component",
|
|
1496
|
-
label: "Column",
|
|
1497
|
-
group: "basic",
|
|
1498
|
-
category: "core",
|
|
1499
|
-
icon: se,
|
|
1500
|
-
wrapper: !0,
|
|
1501
|
-
canDelete: () => !0,
|
|
1502
|
-
canAcceptBlock: () => !0,
|
|
1503
|
-
canBeNested: (e) => e === "Row",
|
|
1504
|
-
...p({
|
|
1505
|
-
properties: {
|
|
1506
|
-
styles: u(""),
|
|
1507
|
-
colSpan: {
|
|
1508
|
-
type: "number",
|
|
1509
|
-
title: "Column Span",
|
|
1510
|
-
default: 6,
|
|
1511
|
-
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
1512
|
-
},
|
|
1513
|
-
tabletColSpan: {
|
|
1514
|
-
type: "number",
|
|
1515
|
-
title: "Column Span (Tablet)",
|
|
1516
|
-
default: null,
|
|
1517
|
-
enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
1518
|
-
enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
1519
|
-
},
|
|
1520
|
-
desktopColSpan: {
|
|
1521
|
-
type: "number",
|
|
1522
|
-
title: "Column Span (Desktop)",
|
|
1523
|
-
default: null,
|
|
1524
|
-
enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
1525
|
-
enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
})
|
|
1529
|
-
}, ht = (e) => {
|
|
1530
|
-
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [x(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1531
|
-
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ a("div", { ...o, ...l, ...i, children: t });
|
|
1532
|
-
}, xt = {
|
|
1533
|
-
type: "Row",
|
|
1534
|
-
description: "A row component",
|
|
1535
|
-
label: "Row",
|
|
1536
|
-
group: "basic",
|
|
1537
|
-
icon: j,
|
|
1538
|
-
blocks: () => [
|
|
1539
|
-
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1540
|
-
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
1541
|
-
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," }
|
|
1542
|
-
],
|
|
1543
|
-
category: "core",
|
|
1544
|
-
wrapper: !0,
|
|
1545
|
-
canAcceptBlock: (e) => e === "Column",
|
|
1546
|
-
...p({
|
|
1547
|
-
properties: {
|
|
1548
|
-
styles: u(""),
|
|
1549
|
-
colCount: {
|
|
1550
|
-
type: "number",
|
|
1551
|
-
default: 2,
|
|
1552
|
-
minimum: 0,
|
|
1553
|
-
ui: { "ui:widget": "colCount" }
|
|
1554
|
-
},
|
|
1555
|
-
gutter: {
|
|
1556
|
-
type: "number",
|
|
1557
|
-
title: "Gutter (in px)",
|
|
1558
|
-
default: 16,
|
|
1559
|
-
minimum: 0
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
})
|
|
1563
|
-
}, kt = (e) => {
|
|
1566
|
+
}, xt = (e) => {
|
|
1564
1567
|
const { blockProps: o, content: t, styles: l } = e, r = T(l, "rte");
|
|
1565
1568
|
return /* @__PURE__ */ a("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
|
|
1566
1569
|
}, wt = {
|
|
@@ -1663,7 +1666,7 @@ const T = (e, ...o) => ({
|
|
|
1663
1666
|
}
|
|
1664
1667
|
}
|
|
1665
1668
|
}, A = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, M = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, Lt = (e, o) => {
|
|
1666
|
-
const t =
|
|
1669
|
+
const t = k(o, "autoplay", !1), l = k(o, "controls", !1), r = k(o, "loop", !1), n = t || k(o, "muted", !0);
|
|
1667
1670
|
if (A.test(e)) {
|
|
1668
1671
|
const i = e.match(A);
|
|
1669
1672
|
if (i) {
|
|
@@ -1690,27 +1693,27 @@ const T = (e, ...o) => ({
|
|
|
1690
1693
|
}, St = (e) => {
|
|
1691
1694
|
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: i } = e;
|
|
1692
1695
|
let s = n;
|
|
1693
|
-
const c = [...
|
|
1696
|
+
const c = [...k(r, "srcsets", []) || []];
|
|
1694
1697
|
o && typeof o == "string" && c.push({ url: o, width: "9999" });
|
|
1695
|
-
const m = c.sort((b,
|
|
1698
|
+
const m = c.sort((b, x) => parseInt(b.width) - parseInt(x.width)).filter((b) => !v(b.url) && !v(b.width));
|
|
1696
1699
|
m.length === 0 && !s && (s = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1697
|
-
const h =
|
|
1700
|
+
const h = k(l, "autoplay", !1) || k(l, "muted", !0);
|
|
1698
1701
|
return (s || !v(m)) && /* @__PURE__ */ a("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
|
|
1699
1702
|
"video",
|
|
1700
1703
|
{
|
|
1701
1704
|
...t,
|
|
1702
1705
|
...i,
|
|
1703
1706
|
key: JSON.stringify(m),
|
|
1704
|
-
controls:
|
|
1705
|
-
autoPlay:
|
|
1706
|
-
loop:
|
|
1707
|
+
controls: k(l, "controls", !1),
|
|
1708
|
+
autoPlay: k(l, "autoplay", !1),
|
|
1709
|
+
loop: k(l, "loop", !1),
|
|
1707
1710
|
poster: s,
|
|
1708
1711
|
...h ? { muted: !0 } : {}
|
|
1709
1712
|
},
|
|
1710
1713
|
m.map((b) => {
|
|
1711
1714
|
if (!b.url || b.url.length < 4 || isNaN(b.width)) return null;
|
|
1712
|
-
const
|
|
1713
|
-
return /* @__PURE__ */ a("source", { src: b.url, media:
|
|
1715
|
+
const x = `(max-width: ${b.width}px)`;
|
|
1716
|
+
return /* @__PURE__ */ a("source", { src: b.url, media: x, type: b.type }, b.url);
|
|
1714
1717
|
}),
|
|
1715
1718
|
"Your browser does not support the video tag."
|
|
1716
1719
|
) });
|
|
@@ -1858,6 +1861,7 @@ const T = (e, ...o) => ({
|
|
|
1858
1861
|
label: "Repeater",
|
|
1859
1862
|
icon: D,
|
|
1860
1863
|
group: "basic",
|
|
1864
|
+
description: "Repeater block is used to display a list of items based on data binding in repeaterItems",
|
|
1861
1865
|
dataProviderMode: "live",
|
|
1862
1866
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
1863
1867
|
blocks: () => [
|
|
@@ -2003,7 +2007,7 @@ const T = (e, ...o) => ({
|
|
|
2003
2007
|
canMove: () => !1,
|
|
2004
2008
|
canDuplicate: () => !1
|
|
2005
2009
|
}, qt = () => {
|
|
2006
|
-
d(ge, be), d(
|
|
2010
|
+
d(ge, be), d(Ee, He), d(fe, he), d(et, tt), d(ht, kt), d(vt, Ct), d(xt, wt), d(ut, mt), d(yt, gt), d(bt, ft), d(Pe, Le), d(dt, pt), d(Nt, _t), d(ke, xe), d(we, ve), d(It, Pt), d(je, De), d(Ve, Fe), d(qe, Ze), d($e, ze), d(Oe, Ye), d(Qe, Je), d(Xe, Ke), d(Ge, We), d(ot, lt), d(Ae, Me), d(Ce, Ie), d(Be, Se), d(Te, Re), d(Ne, _e), d(Rt, At), d(Mt, Et), d(Ht, $t);
|
|
2007
2011
|
};
|
|
2008
2012
|
export {
|
|
2009
2013
|
qt as loadWebBlocks
|