@chaibuilder/sdk 3.0.10 → 3.0.12
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/{apply-binding-CSYk-NOA.js → apply-binding-B0CX8mDS.js} +50 -50
- package/dist/{apply-binding-C4AQBX3p.cjs → apply-binding-DSgP62np.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/render.cjs +2 -2
- package/dist/render.js +33 -31
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +350 -293
- package/package.json +1 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as
|
|
2
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { registerChaiBlockSchema as p, StylesProp as u, registerChaiBlock as d, getRegisteredChaiBlock as V, stylesProp as L, closestBlockProp as F } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as a, jsxs as b, Fragment as N } from "react/jsx-runtime";
|
|
3
3
|
import { c as _, g as I } from "./common-functions-BGzDsf1z.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as g from "react";
|
|
5
5
|
import { createElement as w } from "react";
|
|
6
|
-
import { ButtonIcon as
|
|
7
|
-
import { isEmpty as
|
|
8
|
-
const
|
|
6
|
+
import { ButtonIcon as M, CodeIcon as E, DividerHorizontalIcon as U, CheckboxIcon as q, FileTextIcon as Z, InputIcon as H, LetterCaseToggleIcon as G, RadiobuttonIcon as W, DropdownMenuIcon as O, FrameIcon as $, HeadingIcon as Y, TableIcon as Q, BorderTopIcon as J, BorderAllIcon as X, ViewHorizontalIcon as K, DragHandleHorizontalIcon as ee, SketchLogoIcon as te, ImageIcon as oe, Link1Icon as le, RowsIcon as z, ColumnsIcon as re, TextIcon as ne, LayoutIcon as ae, CursorTextIcon as ie, SpaceBetweenVerticallyIcon as se, VideoIcon as ce, ChevronLeftIcon as de, ChevronRightIcon as pe, LoopIcon as j } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as v, get as x, map as T, isNull as ue, omit as me, pick as ye } from "lodash-es";
|
|
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;
|
|
11
|
-
r || (s = /* @__PURE__ */ a(
|
|
11
|
+
r || (s = /* @__PURE__ */ a(C, { inBuilder: t }));
|
|
12
12
|
let c = {};
|
|
13
|
-
return l && (c = { backgroundImage: `url(${l})` }),
|
|
14
|
-
},
|
|
13
|
+
return l && (c = { backgroundImage: `url(${l})` }), g.createElement(n, { ...o, ...i, style: c }, s);
|
|
14
|
+
}, be = {
|
|
15
15
|
type: "Box",
|
|
16
16
|
description: "Similar to a div or section elements in HTML",
|
|
17
17
|
label: "Box",
|
|
18
18
|
category: "core",
|
|
19
19
|
group: "basic",
|
|
20
|
-
...
|
|
20
|
+
...p({
|
|
21
21
|
properties: {
|
|
22
22
|
styles: u(""),
|
|
23
23
|
tag: {
|
|
@@ -53,18 +53,18 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
53
53
|
}
|
|
54
54
|
}),
|
|
55
55
|
canAcceptBlock: () => !0
|
|
56
|
-
},
|
|
57
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: s, link: c, inBuilder: m } = e,
|
|
56
|
+
}, fe = (e) => {
|
|
57
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: s, link: c, inBuilder: m } = e, h = l, y = i || /* @__PURE__ */ b(N, { children: [
|
|
58
58
|
r && /* @__PURE__ */ a("span", { children: r }),
|
|
59
|
-
|
|
59
|
+
h && /* @__PURE__ */ a(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
62
|
style: { width: t + "px" },
|
|
63
63
|
className: s + " " + (r ? s === "order-first" ? "mr-2" : "ml-2" : "") || "",
|
|
64
|
-
dangerouslySetInnerHTML: { __html:
|
|
64
|
+
dangerouslySetInnerHTML: { __html: h }
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
|
-
] }),
|
|
67
|
+
] }), k = w(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
70
|
...o,
|
|
@@ -72,17 +72,17 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
72
72
|
type: "button",
|
|
73
73
|
"aria-label": r
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
y
|
|
76
76
|
);
|
|
77
|
-
return
|
|
78
|
-
},
|
|
77
|
+
return v(x(c, "href")) ? k : m ? /* @__PURE__ */ a("span", { children: k }) : /* @__PURE__ */ a("a", { "aria-label": r, href: x(c, "href") || "/", target: x(c, "target", "_self"), children: k });
|
|
78
|
+
}, he = {
|
|
79
79
|
type: "Button",
|
|
80
80
|
description: "similar to a button element in HTML",
|
|
81
81
|
label: "Button",
|
|
82
82
|
category: "core",
|
|
83
|
-
icon:
|
|
83
|
+
icon: M,
|
|
84
84
|
group: "basic",
|
|
85
|
-
...
|
|
85
|
+
...p({
|
|
86
86
|
properties: {
|
|
87
87
|
styles: u("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
|
|
88
88
|
content: {
|
|
@@ -132,27 +132,27 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
132
132
|
}),
|
|
133
133
|
i18nProps: ["content", "link"],
|
|
134
134
|
aiProps: ["content"]
|
|
135
|
-
},
|
|
135
|
+
}, xe = (e) => {
|
|
136
136
|
const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
|
|
137
|
-
return r ? /* @__PURE__ */
|
|
137
|
+
return r ? /* @__PURE__ */ b("div", { className: "relative", children: [
|
|
138
138
|
r ? /* @__PURE__ */ a("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
139
|
-
|
|
139
|
+
g.createElement("div", {
|
|
140
140
|
...t,
|
|
141
141
|
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
142
142
|
})
|
|
143
|
-
] }) :
|
|
143
|
+
] }) : g.createElement("div", {
|
|
144
144
|
...o,
|
|
145
145
|
...t,
|
|
146
146
|
dangerouslySetInnerHTML: { __html: l }
|
|
147
147
|
});
|
|
148
|
-
},
|
|
148
|
+
}, ke = {
|
|
149
149
|
type: "CustomHTML",
|
|
150
150
|
description: "similar to a div or section elements in HTML",
|
|
151
151
|
label: "Custom HTML",
|
|
152
152
|
category: "core",
|
|
153
|
-
icon:
|
|
153
|
+
icon: E,
|
|
154
154
|
group: "advanced",
|
|
155
|
-
...
|
|
155
|
+
...p({
|
|
156
156
|
properties: {
|
|
157
157
|
styles: u(""),
|
|
158
158
|
htmlCode: {
|
|
@@ -163,17 +163,17 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
163
163
|
}
|
|
164
164
|
}),
|
|
165
165
|
i18nProps: ["htmlCode"]
|
|
166
|
-
},
|
|
166
|
+
}, we = (e) => {
|
|
167
167
|
const { scripts: o, inBuilder: t, blockProps: l } = e;
|
|
168
168
|
return t ? /* @__PURE__ */ a("div", { ...l, children: /* @__PURE__ */ a("div", { className: _("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ a("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ a("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__ */ a("div", { dangerouslySetInnerHTML: { __html: o } });
|
|
169
|
-
},
|
|
169
|
+
}, ve = {
|
|
170
170
|
type: "CustomScript",
|
|
171
171
|
description: "similar to a script element in HTML",
|
|
172
172
|
label: "Custom Script",
|
|
173
173
|
category: "core",
|
|
174
|
-
icon:
|
|
174
|
+
icon: E,
|
|
175
175
|
group: "advanced",
|
|
176
|
-
...
|
|
176
|
+
...p({
|
|
177
177
|
properties: {
|
|
178
178
|
scripts: {
|
|
179
179
|
type: "string",
|
|
@@ -185,32 +185,32 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
185
185
|
}
|
|
186
186
|
}),
|
|
187
187
|
hidden: !0
|
|
188
|
-
},
|
|
188
|
+
}, Ce = (e) => {
|
|
189
189
|
const { blockProps: o, styles: t } = e;
|
|
190
190
|
return w("hr", { ...t, ...o });
|
|
191
|
-
},
|
|
191
|
+
}, Ie = {
|
|
192
192
|
type: "Divider",
|
|
193
193
|
description: "A horizontal line component",
|
|
194
194
|
label: "Divider",
|
|
195
195
|
category: "core",
|
|
196
|
-
icon:
|
|
196
|
+
icon: U,
|
|
197
197
|
group: "basic",
|
|
198
|
-
...
|
|
198
|
+
...p({
|
|
199
199
|
properties: {
|
|
200
200
|
styles: u("bg-gray-900 h-0.5 py-2 my-1")
|
|
201
201
|
}
|
|
202
202
|
})
|
|
203
|
-
},
|
|
203
|
+
}, Pe = (e) => {
|
|
204
204
|
const { blockProps: o, styles: t, backgroundImage: l } = e;
|
|
205
205
|
let r = {};
|
|
206
|
-
return l && (r = { backgroundImage: `url(${l})` }),
|
|
207
|
-
},
|
|
206
|
+
return l && (r = { backgroundImage: `url(${l})` }), g.createElement("div", { ...o, ...t, style: r });
|
|
207
|
+
}, Le = {
|
|
208
208
|
type: "EmptyBox",
|
|
209
209
|
description: "A box component with no children",
|
|
210
210
|
label: "Empty Box",
|
|
211
211
|
category: "core",
|
|
212
212
|
group: "basic",
|
|
213
|
-
...
|
|
213
|
+
...p({
|
|
214
214
|
properties: {
|
|
215
215
|
styles: u(""),
|
|
216
216
|
backgroundImage: {
|
|
@@ -221,9 +221,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
})
|
|
224
|
-
},
|
|
224
|
+
}, Be = (e) => {
|
|
225
225
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
|
|
226
|
-
return c ? /* @__PURE__ */
|
|
226
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
|
|
227
227
|
/* @__PURE__ */ a("input", { ...n, name: t, type: "checkbox", required: i, defaultChecked: s }),
|
|
228
228
|
l && /* @__PURE__ */ a("label", { htmlFor: t, children: l })
|
|
229
229
|
] }) : /* @__PURE__ */ a(
|
|
@@ -238,13 +238,13 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
238
238
|
defaultChecked: s
|
|
239
239
|
}
|
|
240
240
|
);
|
|
241
|
-
},
|
|
241
|
+
}, Se = {
|
|
242
242
|
type: "Checkbox",
|
|
243
243
|
label: "web_blocks.checkbox",
|
|
244
244
|
category: "core",
|
|
245
|
-
icon:
|
|
245
|
+
icon: q,
|
|
246
246
|
group: "form",
|
|
247
|
-
...
|
|
247
|
+
...p({
|
|
248
248
|
properties: {
|
|
249
249
|
styles: u("flex items-center gap-x-2"),
|
|
250
250
|
inputStyles: u(""),
|
|
@@ -277,10 +277,10 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
277
277
|
}),
|
|
278
278
|
aiProps: ["label"],
|
|
279
279
|
i18nProps: ["label"]
|
|
280
|
-
},
|
|
280
|
+
}, Ne = (e) => {
|
|
281
281
|
const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: s } = e;
|
|
282
282
|
let c = o;
|
|
283
|
-
return o || (c = /* @__PURE__ */ a(
|
|
283
|
+
return o || (c = /* @__PURE__ */ a(C, { inBuilder: s })), /* @__PURE__ */ b(
|
|
284
284
|
"form",
|
|
285
285
|
{
|
|
286
286
|
...{
|
|
@@ -302,11 +302,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
302
302
|
]
|
|
303
303
|
}
|
|
304
304
|
);
|
|
305
|
-
},
|
|
305
|
+
}, _e = {
|
|
306
306
|
type: "Form",
|
|
307
307
|
label: "Form",
|
|
308
308
|
category: "core",
|
|
309
|
-
icon:
|
|
309
|
+
icon: Z,
|
|
310
310
|
group: "form",
|
|
311
311
|
blocks: () => [
|
|
312
312
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -318,7 +318,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
318
318
|
styles: "#styles:bg-black text-white rounded px-3 py-1,"
|
|
319
319
|
}
|
|
320
320
|
],
|
|
321
|
-
...
|
|
321
|
+
...p({
|
|
322
322
|
properties: {
|
|
323
323
|
styles: u(""),
|
|
324
324
|
action: {
|
|
@@ -343,9 +343,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
343
343
|
i18nProps: ["errorMessage", "successMessage"],
|
|
344
344
|
aiProps: ["errorMessage", "successMessage"],
|
|
345
345
|
canAcceptBlock: () => !0
|
|
346
|
-
},
|
|
346
|
+
}, Te = (e) => {
|
|
347
347
|
const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: i, iconPos: s } = e;
|
|
348
|
-
return /* @__PURE__ */
|
|
348
|
+
return /* @__PURE__ */ b("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
|
|
349
349
|
l,
|
|
350
350
|
n && /* @__PURE__ */ a(
|
|
351
351
|
"div",
|
|
@@ -356,13 +356,13 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
356
356
|
}
|
|
357
357
|
)
|
|
358
358
|
] });
|
|
359
|
-
},
|
|
359
|
+
}, Re = {
|
|
360
360
|
type: "FormButton",
|
|
361
361
|
label: "Submit Button",
|
|
362
362
|
category: "core",
|
|
363
|
-
icon:
|
|
363
|
+
icon: M,
|
|
364
364
|
group: "form",
|
|
365
|
-
...
|
|
365
|
+
...p({
|
|
366
366
|
properties: {
|
|
367
367
|
styles: u(
|
|
368
368
|
"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
@@ -395,7 +395,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
395
395
|
}),
|
|
396
396
|
i18nProps: ["label"],
|
|
397
397
|
aiProps: ["label"]
|
|
398
|
-
},
|
|
398
|
+
}, Ae = (e) => {
|
|
399
399
|
const o = { type: "text", autocomplete: "on" };
|
|
400
400
|
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" } : {
|
|
401
401
|
// Special cases
|
|
@@ -463,7 +463,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
463
463
|
organization: { type: "text", autocomplete: "organization" },
|
|
464
464
|
language: { type: "text", autocomplete: "language" }
|
|
465
465
|
}[e] || o : o;
|
|
466
|
-
},
|
|
466
|
+
}, Me = (e) => {
|
|
467
467
|
const {
|
|
468
468
|
blockProps: o,
|
|
469
469
|
fieldName: t,
|
|
@@ -474,20 +474,20 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
474
474
|
showLabel: s,
|
|
475
475
|
required: c,
|
|
476
476
|
inputType: m,
|
|
477
|
-
defaultValue:
|
|
478
|
-
} = e, { type:
|
|
479
|
-
return s ? /* @__PURE__ */
|
|
477
|
+
defaultValue: h
|
|
478
|
+
} = e, { type: y, autocomplete: k } = Ae(m);
|
|
479
|
+
return s ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
|
|
480
480
|
s && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
481
481
|
/* @__PURE__ */ a(
|
|
482
482
|
"input",
|
|
483
483
|
{
|
|
484
484
|
name: t,
|
|
485
|
-
defaultValue:
|
|
485
|
+
defaultValue: h,
|
|
486
486
|
...i,
|
|
487
|
-
type:
|
|
487
|
+
type: y,
|
|
488
488
|
placeholder: r,
|
|
489
489
|
required: c,
|
|
490
|
-
autoComplete:
|
|
490
|
+
autoComplete: k
|
|
491
491
|
}
|
|
492
492
|
)
|
|
493
493
|
] }) : /* @__PURE__ */ a(
|
|
@@ -497,20 +497,20 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
497
497
|
...o,
|
|
498
498
|
...i,
|
|
499
499
|
...n,
|
|
500
|
-
type:
|
|
500
|
+
type: y,
|
|
501
501
|
placeholder: r,
|
|
502
502
|
required: c,
|
|
503
|
-
autoComplete:
|
|
504
|
-
defaultValue:
|
|
503
|
+
autoComplete: k,
|
|
504
|
+
defaultValue: h
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
|
-
},
|
|
507
|
+
}, Ee = {
|
|
508
508
|
type: "Input",
|
|
509
509
|
label: "web_blocks.input",
|
|
510
510
|
category: "core",
|
|
511
|
-
icon:
|
|
511
|
+
icon: H,
|
|
512
512
|
group: "form",
|
|
513
|
-
...
|
|
513
|
+
...p({
|
|
514
514
|
properties: {
|
|
515
515
|
styles: u(""),
|
|
516
516
|
inputStyles: u("w-full p-1"),
|
|
@@ -619,19 +619,19 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
619
619
|
}),
|
|
620
620
|
aiProps: ["label", "placeholder"],
|
|
621
621
|
i18nProps: ["label", "placeholder"]
|
|
622
|
-
},
|
|
622
|
+
}, He = (e) => {
|
|
623
623
|
const { blockProps: o, content: t, styles: l, children: r } = e, n = { ...l, ...o };
|
|
624
|
-
return r ?
|
|
624
|
+
return r ? g.createElement("label", n, r) : g.createElement("label", {
|
|
625
625
|
...n,
|
|
626
626
|
dangerouslySetInnerHTML: { __html: t }
|
|
627
627
|
});
|
|
628
|
-
},
|
|
628
|
+
}, $e = {
|
|
629
629
|
type: "Label",
|
|
630
630
|
label: "Label",
|
|
631
631
|
category: "core",
|
|
632
|
-
icon:
|
|
632
|
+
icon: G,
|
|
633
633
|
group: "form",
|
|
634
|
-
...
|
|
634
|
+
...p({
|
|
635
635
|
properties: {
|
|
636
636
|
styles: u(),
|
|
637
637
|
content: {
|
|
@@ -643,9 +643,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
643
643
|
}),
|
|
644
644
|
aiProps: ["content"],
|
|
645
645
|
i18nProps: ["content"]
|
|
646
|
-
},
|
|
646
|
+
}, ze = (e) => {
|
|
647
647
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
|
|
648
|
-
return c ? /* @__PURE__ */
|
|
648
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
|
|
649
649
|
/* @__PURE__ */ a("input", { ...n, name: t, type: "radio", required: i, defaultChecked: s }),
|
|
650
650
|
l && /* @__PURE__ */ a("label", { htmlFor: t, children: l })
|
|
651
651
|
] }) : /* @__PURE__ */ a(
|
|
@@ -660,13 +660,13 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
660
660
|
checked: s
|
|
661
661
|
}
|
|
662
662
|
);
|
|
663
|
-
},
|
|
663
|
+
}, je = {
|
|
664
664
|
type: "Radio",
|
|
665
665
|
label: "web_blocks.radio",
|
|
666
666
|
category: "core",
|
|
667
|
-
icon:
|
|
667
|
+
icon: W,
|
|
668
668
|
group: "form",
|
|
669
|
-
...
|
|
669
|
+
...p({
|
|
670
670
|
properties: {
|
|
671
671
|
styles: u("flex items-center gap-x-2"),
|
|
672
672
|
inputStyles: u(""),
|
|
@@ -699,7 +699,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
699
699
|
}),
|
|
700
700
|
aiProps: ["label"],
|
|
701
701
|
i18nProps: ["label"]
|
|
702
|
-
},
|
|
702
|
+
}, De = (e) => {
|
|
703
703
|
const {
|
|
704
704
|
blockProps: o,
|
|
705
705
|
fieldName: t,
|
|
@@ -710,26 +710,26 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
710
710
|
required: s,
|
|
711
711
|
showLabel: c,
|
|
712
712
|
_multiple: m,
|
|
713
|
-
options:
|
|
714
|
-
defaultValue:
|
|
715
|
-
} = e,
|
|
716
|
-
return c ? /* @__PURE__ */
|
|
713
|
+
options: h,
|
|
714
|
+
defaultValue: y
|
|
715
|
+
} = e, k = m && y ? y.split(",").map((f) => f.trim()) : y || "";
|
|
716
|
+
return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
|
|
717
717
|
c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
718
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ b(
|
|
719
719
|
"select",
|
|
720
720
|
{
|
|
721
721
|
...i,
|
|
722
722
|
required: s,
|
|
723
723
|
multiple: m,
|
|
724
724
|
name: t,
|
|
725
|
-
defaultValue:
|
|
725
|
+
defaultValue: k,
|
|
726
726
|
children: [
|
|
727
727
|
/* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
728
|
-
T(
|
|
728
|
+
T(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))
|
|
729
729
|
]
|
|
730
730
|
}
|
|
731
731
|
)
|
|
732
|
-
] }) : /* @__PURE__ */
|
|
732
|
+
] }) : /* @__PURE__ */ b(
|
|
733
733
|
"select",
|
|
734
734
|
{
|
|
735
735
|
...n,
|
|
@@ -737,20 +737,20 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
737
737
|
required: s,
|
|
738
738
|
multiple: m,
|
|
739
739
|
name: t,
|
|
740
|
-
defaultValue:
|
|
740
|
+
defaultValue: k,
|
|
741
741
|
children: [
|
|
742
742
|
/* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
743
|
-
T(
|
|
743
|
+
T(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))
|
|
744
744
|
]
|
|
745
745
|
}
|
|
746
746
|
);
|
|
747
|
-
},
|
|
747
|
+
}, Ve = {
|
|
748
748
|
type: "Select",
|
|
749
749
|
label: "web_blocks.select",
|
|
750
750
|
category: "core",
|
|
751
|
-
icon:
|
|
751
|
+
icon: O,
|
|
752
752
|
group: "form",
|
|
753
|
-
...
|
|
753
|
+
...p({
|
|
754
754
|
properties: {
|
|
755
755
|
styles: u(""),
|
|
756
756
|
inputStyles: u("w-full p-1"),
|
|
@@ -813,9 +813,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
813
813
|
}),
|
|
814
814
|
aiProps: ["label", "placeholder"],
|
|
815
815
|
i18nProps: ["label", "placeholder"]
|
|
816
|
-
},
|
|
817
|
-
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: s, showLabel: c, required: m, defaultValue:
|
|
818
|
-
return c ? /* @__PURE__ */
|
|
816
|
+
}, Fe = (e) => {
|
|
817
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: s, showLabel: c, required: m, defaultValue: h } = e;
|
|
818
|
+
return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
|
|
819
819
|
c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
820
820
|
/* @__PURE__ */ a(
|
|
821
821
|
"textarea",
|
|
@@ -825,7 +825,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
825
825
|
placeholder: r,
|
|
826
826
|
rows: s,
|
|
827
827
|
required: m,
|
|
828
|
-
defaultValue:
|
|
828
|
+
defaultValue: h
|
|
829
829
|
}
|
|
830
830
|
)
|
|
831
831
|
] }) : /* @__PURE__ */ a(
|
|
@@ -838,16 +838,16 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
838
838
|
placeholder: r,
|
|
839
839
|
rows: s,
|
|
840
840
|
required: m,
|
|
841
|
-
defaultValue:
|
|
841
|
+
defaultValue: h
|
|
842
842
|
}
|
|
843
843
|
);
|
|
844
|
-
},
|
|
844
|
+
}, Ue = {
|
|
845
845
|
type: "TextArea",
|
|
846
846
|
label: "web_blocks.textarea",
|
|
847
847
|
category: "core",
|
|
848
|
-
icon:
|
|
848
|
+
icon: H,
|
|
849
849
|
group: "form",
|
|
850
|
-
...
|
|
850
|
+
...p({
|
|
851
851
|
properties: {
|
|
852
852
|
fieldName: {
|
|
853
853
|
type: "string",
|
|
@@ -892,31 +892,31 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
892
892
|
}),
|
|
893
893
|
aiProps: ["label", "placeholder"],
|
|
894
894
|
i18nProps: ["label", "placeholder"]
|
|
895
|
-
},
|
|
895
|
+
}, qe = (e) => {
|
|
896
896
|
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
897
|
-
return t && !r ? /* @__PURE__ */
|
|
897
|
+
return t && !r ? /* @__PURE__ */ b(
|
|
898
898
|
"div",
|
|
899
899
|
{
|
|
900
900
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
901
901
|
...o,
|
|
902
902
|
children: [
|
|
903
|
-
/* @__PURE__ */
|
|
903
|
+
/* @__PURE__ */ b("h1", { children: [
|
|
904
904
|
"Global Block - ",
|
|
905
905
|
r
|
|
906
906
|
] }),
|
|
907
907
|
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
908
908
|
]
|
|
909
909
|
}
|
|
910
|
-
) :
|
|
911
|
-
},
|
|
910
|
+
) : g.createElement("span", { ...o }, l);
|
|
911
|
+
}, Ze = {
|
|
912
912
|
type: "GlobalBlock",
|
|
913
913
|
description: "A global block component",
|
|
914
914
|
label: "Global Block",
|
|
915
|
-
icon:
|
|
915
|
+
icon: $,
|
|
916
916
|
category: "core",
|
|
917
917
|
group: "basic",
|
|
918
918
|
hidden: !0,
|
|
919
|
-
...
|
|
919
|
+
...p({
|
|
920
920
|
properties: {
|
|
921
921
|
globalBlock: {
|
|
922
922
|
type: "string",
|
|
@@ -926,21 +926,21 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
})
|
|
929
|
-
},
|
|
929
|
+
}, Ge = (e) => {
|
|
930
930
|
const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
|
|
931
|
-
return n ?
|
|
931
|
+
return n ? g.createElement(r, { ...t, ...o }, n) : g.createElement(r, {
|
|
932
932
|
...t,
|
|
933
933
|
...o,
|
|
934
934
|
dangerouslySetInnerHTML: { __html: l }
|
|
935
935
|
});
|
|
936
|
-
},
|
|
936
|
+
}, We = {
|
|
937
937
|
type: "Heading",
|
|
938
938
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
939
939
|
label: "Heading",
|
|
940
940
|
category: "core",
|
|
941
|
-
icon:
|
|
941
|
+
icon: Y,
|
|
942
942
|
group: "typography",
|
|
943
|
-
...
|
|
943
|
+
...p({
|
|
944
944
|
properties: {
|
|
945
945
|
tag: {
|
|
946
946
|
type: "string",
|
|
@@ -960,16 +960,16 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
960
960
|
aiProps: ["content"],
|
|
961
961
|
i18nProps: ["content"],
|
|
962
962
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
963
|
-
},
|
|
963
|
+
}, Oe = (e) => {
|
|
964
964
|
const { blockProps: o, styles: t } = e;
|
|
965
965
|
return w("br", { ...o, ...t });
|
|
966
|
-
},
|
|
966
|
+
}, Ye = {
|
|
967
967
|
type: "LineBreak",
|
|
968
968
|
label: "Line Break",
|
|
969
969
|
category: "core",
|
|
970
970
|
group: "basic",
|
|
971
971
|
hidden: !0,
|
|
972
|
-
...
|
|
972
|
+
...p({
|
|
973
973
|
properties: {
|
|
974
974
|
styles: u("")
|
|
975
975
|
}
|
|
@@ -978,90 +978,90 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
978
978
|
canDelete: () => !1,
|
|
979
979
|
canMove: () => !1,
|
|
980
980
|
canDuplicate: () => !1
|
|
981
|
-
},
|
|
981
|
+
}, Qe = (e) => {
|
|
982
982
|
const { blockProps: o, children: t, styles: l } = e;
|
|
983
|
-
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ a(
|
|
984
|
-
},
|
|
983
|
+
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ a(C, {});
|
|
984
|
+
}, Je = (e) => {
|
|
985
985
|
const { blockProps: o, children: t, styles: l } = e;
|
|
986
|
-
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ a(
|
|
987
|
-
},
|
|
986
|
+
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ a(C, {});
|
|
987
|
+
}, Xe = (e) => {
|
|
988
988
|
const { blockProps: o, children: t, styles: l } = e;
|
|
989
|
-
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ a(
|
|
990
|
-
},
|
|
989
|
+
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ a(C, {});
|
|
990
|
+
}, Ke = (e) => {
|
|
991
991
|
const { blockProps: o, children: t, styles: l } = e;
|
|
992
|
-
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ a(
|
|
993
|
-
},
|
|
992
|
+
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ a(C, {});
|
|
993
|
+
}, et = (e) => {
|
|
994
994
|
const { blockProps: o, children: t, content: l, styles: r } = e;
|
|
995
|
-
return !t &&
|
|
995
|
+
return !t && v(l) ? /* @__PURE__ */ a(C, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
|
|
996
996
|
...o,
|
|
997
997
|
...r,
|
|
998
998
|
dangerouslySetInnerHTML: { __html: l }
|
|
999
999
|
});
|
|
1000
1000
|
};
|
|
1001
|
-
|
|
1001
|
+
d(Qe, {
|
|
1002
1002
|
type: "Table",
|
|
1003
1003
|
label: "Table",
|
|
1004
1004
|
category: "core",
|
|
1005
1005
|
group: "table",
|
|
1006
1006
|
hidden: !0,
|
|
1007
|
-
icon:
|
|
1008
|
-
...
|
|
1007
|
+
icon: Q,
|
|
1008
|
+
...p({
|
|
1009
1009
|
properties: {
|
|
1010
1010
|
styles: u("")
|
|
1011
1011
|
}
|
|
1012
1012
|
}),
|
|
1013
|
-
blocks:
|
|
1013
|
+
blocks: P("Table")
|
|
1014
1014
|
});
|
|
1015
|
-
|
|
1015
|
+
d(Je, {
|
|
1016
1016
|
type: "TableHead",
|
|
1017
1017
|
label: "Table Head",
|
|
1018
1018
|
category: "core",
|
|
1019
1019
|
group: "table",
|
|
1020
1020
|
hidden: !0,
|
|
1021
|
-
icon:
|
|
1022
|
-
...
|
|
1021
|
+
icon: J,
|
|
1022
|
+
...p({
|
|
1023
1023
|
properties: {
|
|
1024
1024
|
styles: u("")
|
|
1025
1025
|
}
|
|
1026
1026
|
}),
|
|
1027
|
-
blocks:
|
|
1027
|
+
blocks: P("TableHead")
|
|
1028
1028
|
});
|
|
1029
|
-
|
|
1029
|
+
d(Xe, {
|
|
1030
1030
|
type: "TableBody",
|
|
1031
1031
|
label: "Table Body",
|
|
1032
1032
|
category: "core",
|
|
1033
1033
|
group: "table",
|
|
1034
1034
|
hidden: !0,
|
|
1035
|
-
icon:
|
|
1036
|
-
...
|
|
1035
|
+
icon: X,
|
|
1036
|
+
...p({
|
|
1037
1037
|
properties: {
|
|
1038
1038
|
styles: u("")
|
|
1039
1039
|
}
|
|
1040
1040
|
}),
|
|
1041
|
-
blocks:
|
|
1041
|
+
blocks: P("TableBody")
|
|
1042
1042
|
});
|
|
1043
|
-
|
|
1043
|
+
d(Ke, {
|
|
1044
1044
|
type: "TableRow",
|
|
1045
1045
|
label: "Table Row",
|
|
1046
1046
|
category: "core",
|
|
1047
1047
|
group: "table",
|
|
1048
1048
|
hidden: !0,
|
|
1049
|
-
icon:
|
|
1050
|
-
...
|
|
1049
|
+
icon: K,
|
|
1050
|
+
...p({
|
|
1051
1051
|
properties: {
|
|
1052
1052
|
styles: u("")
|
|
1053
1053
|
}
|
|
1054
1054
|
}),
|
|
1055
|
-
blocks:
|
|
1055
|
+
blocks: P("TableRow")
|
|
1056
1056
|
});
|
|
1057
|
-
|
|
1057
|
+
d(et, {
|
|
1058
1058
|
type: "TableCell",
|
|
1059
1059
|
label: "Table Cell",
|
|
1060
1060
|
category: "core",
|
|
1061
1061
|
group: "table",
|
|
1062
1062
|
hidden: !0,
|
|
1063
|
-
icon:
|
|
1064
|
-
...
|
|
1063
|
+
icon: ee,
|
|
1064
|
+
...p({
|
|
1065
1065
|
properties: {
|
|
1066
1066
|
styles: u(""),
|
|
1067
1067
|
content: {
|
|
@@ -1072,11 +1072,11 @@ p(Je, {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
1074
|
}),
|
|
1075
|
-
blocks:
|
|
1075
|
+
blocks: P("TableCell"),
|
|
1076
1076
|
i18nProps: ["content"],
|
|
1077
1077
|
aiProps: ["content"]
|
|
1078
1078
|
});
|
|
1079
|
-
function
|
|
1079
|
+
function P(e) {
|
|
1080
1080
|
const o = (n, i) => ({
|
|
1081
1081
|
_id: I(),
|
|
1082
1082
|
_parent: n,
|
|
@@ -1122,12 +1122,12 @@ function L(e) {
|
|
|
1122
1122
|
const D = (e, ...o) => ({
|
|
1123
1123
|
...e,
|
|
1124
1124
|
className: _(e.className, ...o)
|
|
1125
|
-
}),
|
|
1125
|
+
}), tt = (e) => {
|
|
1126
1126
|
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s = D(l, "");
|
|
1127
|
-
if (
|
|
1128
|
-
return /* @__PURE__ */ a(
|
|
1127
|
+
if (v(t))
|
|
1128
|
+
return /* @__PURE__ */ a(C, { inBuilder: n, className: "h-8 w-14" });
|
|
1129
1129
|
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
1130
|
-
return
|
|
1130
|
+
return g.createElement("span", {
|
|
1131
1131
|
...o,
|
|
1132
1132
|
...s,
|
|
1133
1133
|
style: {
|
|
@@ -1136,13 +1136,13 @@ const D = (e, ...o) => ({
|
|
|
1136
1136
|
},
|
|
1137
1137
|
dangerouslySetInnerHTML: { __html: c }
|
|
1138
1138
|
});
|
|
1139
|
-
},
|
|
1139
|
+
}, ot = {
|
|
1140
1140
|
type: "Icon",
|
|
1141
1141
|
label: "web_blocks.icon",
|
|
1142
1142
|
category: "core",
|
|
1143
|
-
icon:
|
|
1143
|
+
icon: te,
|
|
1144
1144
|
group: "media",
|
|
1145
|
-
...
|
|
1145
|
+
...p({
|
|
1146
1146
|
properties: {
|
|
1147
1147
|
styles: u(""),
|
|
1148
1148
|
icon: {
|
|
@@ -1163,10 +1163,10 @@ const D = (e, ...o) => ({
|
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
})
|
|
1166
|
-
},
|
|
1167
|
-
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: i, width: s, lazyLoading: c, mobileWidth: m, mobileHeight:
|
|
1168
|
-
return
|
|
1169
|
-
l && /* @__PURE__ */ a("source", { srcSet: l, media: "(max-width: 480px)", width: m, height:
|
|
1166
|
+
}, lt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", rt = (e) => {
|
|
1167
|
+
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: i, width: s, lazyLoading: c, mobileWidth: m, mobileHeight: h } = e;
|
|
1168
|
+
return v(t) ? /* @__PURE__ */ a(C, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
|
|
1169
|
+
l && /* @__PURE__ */ a("source", { srcSet: l, media: "(max-width: 480px)", width: m, height: h }),
|
|
1170
1170
|
/* @__PURE__ */ a(
|
|
1171
1171
|
"img",
|
|
1172
1172
|
{
|
|
@@ -1180,20 +1180,20 @@ const D = (e, ...o) => ({
|
|
|
1180
1180
|
}
|
|
1181
1181
|
)
|
|
1182
1182
|
] });
|
|
1183
|
-
},
|
|
1183
|
+
}, nt = {
|
|
1184
1184
|
type: "Image",
|
|
1185
1185
|
description: "A image component",
|
|
1186
1186
|
label: "Image",
|
|
1187
1187
|
category: "core",
|
|
1188
|
-
icon:
|
|
1188
|
+
icon: oe,
|
|
1189
1189
|
group: "media",
|
|
1190
|
-
...
|
|
1190
|
+
...p({
|
|
1191
1191
|
properties: {
|
|
1192
1192
|
styles: u(""),
|
|
1193
1193
|
image: {
|
|
1194
1194
|
type: "string",
|
|
1195
1195
|
title: "Image",
|
|
1196
|
-
default:
|
|
1196
|
+
default: lt,
|
|
1197
1197
|
ui: { "ui:widget": "image" }
|
|
1198
1198
|
},
|
|
1199
1199
|
width: {
|
|
@@ -1241,10 +1241,10 @@ const D = (e, ...o) => ({
|
|
|
1241
1241
|
}),
|
|
1242
1242
|
aiProps: ["alt"],
|
|
1243
1243
|
i18nProps: ["alt", "image", "_imageId", "mobileImage", "_mobileImageId"]
|
|
1244
|
-
},
|
|
1244
|
+
}, at = (e) => {
|
|
1245
1245
|
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1246
1246
|
let s = {};
|
|
1247
|
-
return !l &&
|
|
1247
|
+
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(
|
|
1248
1248
|
"span",
|
|
1249
1249
|
{
|
|
1250
1250
|
...o,
|
|
@@ -1264,14 +1264,14 @@ const D = (e, ...o) => ({
|
|
|
1264
1264
|
},
|
|
1265
1265
|
i
|
|
1266
1266
|
);
|
|
1267
|
-
},
|
|
1267
|
+
}, it = {
|
|
1268
1268
|
type: "Link",
|
|
1269
1269
|
description: "A link component",
|
|
1270
1270
|
label: "Link",
|
|
1271
1271
|
category: "core",
|
|
1272
|
-
icon:
|
|
1272
|
+
icon: le,
|
|
1273
1273
|
group: "basic",
|
|
1274
|
-
...
|
|
1274
|
+
...p({
|
|
1275
1275
|
properties: {
|
|
1276
1276
|
styles: u(""),
|
|
1277
1277
|
content: {
|
|
@@ -1305,17 +1305,17 @@ const D = (e, ...o) => ({
|
|
|
1305
1305
|
aiProps: ["content"],
|
|
1306
1306
|
i18nProps: ["content", "link"],
|
|
1307
1307
|
canAcceptBlock: (e) => e !== "Link"
|
|
1308
|
-
},
|
|
1308
|
+
}, st = (e) => {
|
|
1309
1309
|
const { blockProps: o, children: t, styles: l, tag: r, inBuilder: n } = e;
|
|
1310
|
-
return !t &&
|
|
1311
|
-
},
|
|
1310
|
+
return !t && v(l == null ? void 0 : l.className) ? /* @__PURE__ */ a(C, { inBuilder: n }) : g.createElement(r || "ul", { ...o, ...l }, t);
|
|
1311
|
+
}, ct = {
|
|
1312
1312
|
type: "List",
|
|
1313
1313
|
description: "A list component",
|
|
1314
1314
|
label: "List",
|
|
1315
|
-
icon:
|
|
1315
|
+
icon: z,
|
|
1316
1316
|
category: "core",
|
|
1317
1317
|
group: "basic",
|
|
1318
|
-
...
|
|
1318
|
+
...p({
|
|
1319
1319
|
properties: {
|
|
1320
1320
|
styles: u("")
|
|
1321
1321
|
}
|
|
@@ -1345,21 +1345,21 @@ const D = (e, ...o) => ({
|
|
|
1345
1345
|
content: "Item 3"
|
|
1346
1346
|
}
|
|
1347
1347
|
]
|
|
1348
|
-
},
|
|
1348
|
+
}, dt = (e) => {
|
|
1349
1349
|
const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
|
|
1350
|
-
return r ?
|
|
1350
|
+
return r ? g.createElement(n || "li", { ...l, ...o }, r) : g.createElement(n || "li", {
|
|
1351
1351
|
...l,
|
|
1352
1352
|
...o,
|
|
1353
1353
|
dangerouslySetInnerHTML: { __html: t }
|
|
1354
1354
|
});
|
|
1355
|
-
},
|
|
1355
|
+
}, pt = {
|
|
1356
1356
|
type: "ListItem",
|
|
1357
1357
|
description: "A list item component",
|
|
1358
1358
|
label: "List Item",
|
|
1359
|
-
icon:
|
|
1359
|
+
icon: re,
|
|
1360
1360
|
category: "core",
|
|
1361
1361
|
group: "basic",
|
|
1362
|
-
...
|
|
1362
|
+
...p({
|
|
1363
1363
|
properties: {
|
|
1364
1364
|
styles: u(""),
|
|
1365
1365
|
content: {
|
|
@@ -1376,21 +1376,21 @@ const D = (e, ...o) => ({
|
|
|
1376
1376
|
aiProps: ["content"],
|
|
1377
1377
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1378
1378
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1379
|
-
},
|
|
1379
|
+
}, ut = (e) => {
|
|
1380
1380
|
const { blockProps: o, styles: t, content: l } = e;
|
|
1381
|
-
return
|
|
1381
|
+
return ue(e.children) ? g.createElement("p", {
|
|
1382
1382
|
...t,
|
|
1383
1383
|
...o,
|
|
1384
1384
|
dangerouslySetInnerHTML: { __html: l }
|
|
1385
|
-
}) :
|
|
1386
|
-
},
|
|
1385
|
+
}) : g.createElement("p", { ...t, ...o }, e.children);
|
|
1386
|
+
}, mt = {
|
|
1387
1387
|
type: "Paragraph",
|
|
1388
1388
|
description: "A paragraph component",
|
|
1389
1389
|
label: "Paragraph",
|
|
1390
1390
|
category: "core",
|
|
1391
|
-
icon:
|
|
1391
|
+
icon: ne,
|
|
1392
1392
|
group: "typography",
|
|
1393
|
-
...
|
|
1393
|
+
...p({
|
|
1394
1394
|
properties: {
|
|
1395
1395
|
styles: u(""),
|
|
1396
1396
|
content: {
|
|
@@ -1404,31 +1404,31 @@ const D = (e, ...o) => ({
|
|
|
1404
1404
|
i18nProps: ["content"],
|
|
1405
1405
|
aiProps: ["content"],
|
|
1406
1406
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1407
|
-
},
|
|
1407
|
+
}, yt = (e) => {
|
|
1408
1408
|
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
1409
|
-
return t && !r ? /* @__PURE__ */
|
|
1409
|
+
return t && !r ? /* @__PURE__ */ b(
|
|
1410
1410
|
"div",
|
|
1411
1411
|
{
|
|
1412
1412
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1413
1413
|
...o,
|
|
1414
1414
|
children: [
|
|
1415
|
-
/* @__PURE__ */
|
|
1415
|
+
/* @__PURE__ */ b("h1", { children: [
|
|
1416
1416
|
"Partial Block - ",
|
|
1417
1417
|
r
|
|
1418
1418
|
] }),
|
|
1419
1419
|
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1420
1420
|
]
|
|
1421
1421
|
}
|
|
1422
|
-
) :
|
|
1423
|
-
},
|
|
1422
|
+
) : g.createElement("span", { ...o }, l);
|
|
1423
|
+
}, gt = {
|
|
1424
1424
|
type: "PartialBlock",
|
|
1425
1425
|
description: "A partial block component",
|
|
1426
1426
|
label: "Partial Block",
|
|
1427
|
-
icon:
|
|
1427
|
+
icon: $,
|
|
1428
1428
|
category: "core",
|
|
1429
1429
|
group: "basic",
|
|
1430
1430
|
hidden: !0,
|
|
1431
|
-
...
|
|
1431
|
+
...p({
|
|
1432
1432
|
properties: {
|
|
1433
1433
|
partialBlockId: {
|
|
1434
1434
|
type: "string",
|
|
@@ -1438,7 +1438,7 @@ const D = (e, ...o) => ({
|
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
})
|
|
1441
|
-
},
|
|
1441
|
+
}, B = {
|
|
1442
1442
|
SMALL: {
|
|
1443
1443
|
1: "col-span-1",
|
|
1444
1444
|
2: "col-span-2",
|
|
@@ -1481,26 +1481,26 @@ const D = (e, ...o) => ({
|
|
|
1481
1481
|
11: "lg:col-span-11",
|
|
1482
1482
|
12: "lg:col-span-12"
|
|
1483
1483
|
}
|
|
1484
|
-
},
|
|
1484
|
+
}, bt = (e) => {
|
|
1485
1485
|
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
n ?
|
|
1489
|
-
i ?
|
|
1486
|
+
x(l, "className", ""),
|
|
1487
|
+
x(B, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1488
|
+
n ? x(B, ["MEDIUM", n || r], "") : "",
|
|
1489
|
+
i ? x(B, ["LARGE", n || r], "") : ""
|
|
1490
1490
|
].join(" ") };
|
|
1491
1491
|
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" }) });
|
|
1492
|
-
},
|
|
1492
|
+
}, ft = {
|
|
1493
1493
|
type: "Column",
|
|
1494
1494
|
description: "A column component",
|
|
1495
1495
|
label: "Column",
|
|
1496
1496
|
group: "basic",
|
|
1497
1497
|
category: "core",
|
|
1498
|
-
icon:
|
|
1498
|
+
icon: ae,
|
|
1499
1499
|
wrapper: !0,
|
|
1500
1500
|
canDelete: () => !0,
|
|
1501
1501
|
canAcceptBlock: () => !0,
|
|
1502
1502
|
canBeNested: (e) => e === "Row",
|
|
1503
|
-
...
|
|
1503
|
+
...p({
|
|
1504
1504
|
properties: {
|
|
1505
1505
|
styles: u(""),
|
|
1506
1506
|
colSpan: {
|
|
@@ -1525,15 +1525,15 @@ const D = (e, ...o) => ({
|
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
1527
|
})
|
|
1528
|
-
},
|
|
1529
|
-
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [
|
|
1528
|
+
}, ht = (e) => {
|
|
1529
|
+
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [x(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1530
1530
|
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 });
|
|
1531
|
-
},
|
|
1531
|
+
}, xt = {
|
|
1532
1532
|
type: "Row",
|
|
1533
1533
|
description: "A row component",
|
|
1534
1534
|
label: "Row",
|
|
1535
1535
|
group: "basic",
|
|
1536
|
-
icon:
|
|
1536
|
+
icon: z,
|
|
1537
1537
|
blocks: () => [
|
|
1538
1538
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1539
1539
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1542,7 +1542,7 @@ const D = (e, ...o) => ({
|
|
|
1542
1542
|
category: "core",
|
|
1543
1543
|
wrapper: !0,
|
|
1544
1544
|
canAcceptBlock: (e) => e === "Column",
|
|
1545
|
-
...
|
|
1545
|
+
...p({
|
|
1546
1546
|
properties: {
|
|
1547
1547
|
styles: u(""),
|
|
1548
1548
|
colCount: {
|
|
@@ -1559,21 +1559,21 @@ const D = (e, ...o) => ({
|
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
1561
|
})
|
|
1562
|
-
},
|
|
1562
|
+
}, kt = (e) => {
|
|
1563
1563
|
const { blockProps: o, content: t, styles: l } = e, r = D(
|
|
1564
1564
|
l,
|
|
1565
1565
|
"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",
|
|
1566
1566
|
"max-w-full"
|
|
1567
1567
|
);
|
|
1568
1568
|
return /* @__PURE__ */ a("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
|
|
1569
|
-
},
|
|
1569
|
+
}, wt = {
|
|
1570
1570
|
type: "RichText",
|
|
1571
1571
|
description: "A rich text block",
|
|
1572
1572
|
label: "Rich Text",
|
|
1573
1573
|
category: "core",
|
|
1574
|
-
icon:
|
|
1574
|
+
icon: ie,
|
|
1575
1575
|
group: "typography",
|
|
1576
|
-
...
|
|
1576
|
+
...p({
|
|
1577
1577
|
properties: {
|
|
1578
1578
|
styles: u(""),
|
|
1579
1579
|
content: {
|
|
@@ -1586,20 +1586,20 @@ const D = (e, ...o) => ({
|
|
|
1586
1586
|
}),
|
|
1587
1587
|
aiProps: ["content"],
|
|
1588
1588
|
i18nProps: ["content"]
|
|
1589
|
-
},
|
|
1589
|
+
}, vt = (e) => {
|
|
1590
1590
|
const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
|
|
1591
|
-
return r ?
|
|
1591
|
+
return r ? g.createElement("span", { ...t, ...o }, r) : g.createElement(n || "span", {
|
|
1592
1592
|
...t,
|
|
1593
1593
|
...o,
|
|
1594
1594
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1595
1595
|
});
|
|
1596
|
-
},
|
|
1596
|
+
}, Ct = {
|
|
1597
1597
|
type: "Span",
|
|
1598
1598
|
description: "A span component",
|
|
1599
1599
|
label: "Span",
|
|
1600
1600
|
category: "core",
|
|
1601
1601
|
group: "typography",
|
|
1602
|
-
...
|
|
1602
|
+
...p({
|
|
1603
1603
|
properties: {
|
|
1604
1604
|
styles: u(""),
|
|
1605
1605
|
content: {
|
|
@@ -1613,15 +1613,15 @@ const D = (e, ...o) => ({
|
|
|
1613
1613
|
aiProps: ["content"],
|
|
1614
1614
|
i18nProps: ["content"],
|
|
1615
1615
|
canAcceptBlock: () => !0
|
|
1616
|
-
},
|
|
1616
|
+
}, It = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ a("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Pt = {
|
|
1617
1617
|
type: "Text",
|
|
1618
1618
|
description: "A text component with no styling",
|
|
1619
1619
|
label: "Text",
|
|
1620
1620
|
hidden: !0,
|
|
1621
1621
|
category: "core",
|
|
1622
1622
|
group: "typography",
|
|
1623
|
-
icon:
|
|
1624
|
-
...
|
|
1623
|
+
icon: se,
|
|
1624
|
+
...p({
|
|
1625
1625
|
properties: {
|
|
1626
1626
|
styles: u("text-black"),
|
|
1627
1627
|
content: {
|
|
@@ -1633,7 +1633,7 @@ const D = (e, ...o) => ({
|
|
|
1633
1633
|
}),
|
|
1634
1634
|
aiProps: ["content"],
|
|
1635
1635
|
i18nProps: ["content"]
|
|
1636
|
-
},
|
|
1636
|
+
}, S = {
|
|
1637
1637
|
type: "object",
|
|
1638
1638
|
title: "Controls",
|
|
1639
1639
|
default: {
|
|
@@ -1664,18 +1664,18 @@ const D = (e, ...o) => ({
|
|
|
1664
1664
|
default: !1
|
|
1665
1665
|
}
|
|
1666
1666
|
}
|
|
1667
|
-
},
|
|
1668
|
-
const t =
|
|
1669
|
-
if (
|
|
1670
|
-
const i = e.match(
|
|
1667
|
+
}, R = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, A = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, Lt = (e, o) => {
|
|
1668
|
+
const t = x(o, "autoplay", !1), l = x(o, "controls", !1), r = x(o, "loop", !1), n = t || x(o, "muted", !0);
|
|
1669
|
+
if (R.test(e)) {
|
|
1670
|
+
const i = e.match(R);
|
|
1671
1671
|
if (i) {
|
|
1672
1672
|
const s = i[4];
|
|
1673
1673
|
let c = `https://www.youtube.com/embed/${s}`, m = t ? "autoplay=1" : "";
|
|
1674
1674
|
return m += r ? `&loop=1&playlist=${s}` : "", m += n ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
|
-
if (
|
|
1678
|
-
const i = e.match(
|
|
1677
|
+
if (A.test(e)) {
|
|
1678
|
+
const i = e.match(A);
|
|
1679
1679
|
if (i) {
|
|
1680
1680
|
const s = i[1];
|
|
1681
1681
|
let c = "";
|
|
@@ -1683,52 +1683,52 @@ const D = (e, ...o) => ({
|
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
1685
|
return null;
|
|
1686
|
-
},
|
|
1687
|
-
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, s =
|
|
1688
|
-
return /* @__PURE__ */
|
|
1689
|
-
!s && i ? /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children:
|
|
1686
|
+
}, Bt = (e) => {
|
|
1687
|
+
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, s = Lt(o, r);
|
|
1688
|
+
return /* @__PURE__ */ b("div", { ...me(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1689
|
+
!s && i ? /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: v(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ a("iframe", { width: "100%", src: s, ...ye(l, "className") }),
|
|
1690
1690
|
i && /* @__PURE__ */ a("div", { ...t, className: "absolute top-0 h-full w-full" })
|
|
1691
1691
|
] });
|
|
1692
|
-
},
|
|
1692
|
+
}, St = (e) => {
|
|
1693
1693
|
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: i } = e;
|
|
1694
1694
|
let s = n;
|
|
1695
|
-
const c = [...
|
|
1695
|
+
const c = [...x(r, "srcsets", []) || []];
|
|
1696
1696
|
o && typeof o == "string" && c.push({ url: o, width: "9999" });
|
|
1697
|
-
const m = c.sort((
|
|
1697
|
+
const m = c.sort((y, k) => parseInt(y.width) - parseInt(k.width)).filter((y) => !v(y.url) && !v(y.width));
|
|
1698
1698
|
m.length === 0 && !s && (s = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1699
|
-
const
|
|
1700
|
-
return (s || !
|
|
1699
|
+
const h = x(l, "autoplay", !1) || x(l, "muted", !0);
|
|
1700
|
+
return (s || !v(m)) && /* @__PURE__ */ a("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
|
|
1701
1701
|
"video",
|
|
1702
1702
|
{
|
|
1703
1703
|
...t,
|
|
1704
1704
|
...i,
|
|
1705
1705
|
key: JSON.stringify(m),
|
|
1706
|
-
controls:
|
|
1707
|
-
autoPlay:
|
|
1708
|
-
loop:
|
|
1706
|
+
controls: x(l, "controls", !1),
|
|
1707
|
+
autoPlay: x(l, "autoplay", !1),
|
|
1708
|
+
loop: x(l, "loop", !1),
|
|
1709
1709
|
poster: s,
|
|
1710
|
-
...
|
|
1710
|
+
...h ? { muted: !0 } : {}
|
|
1711
1711
|
},
|
|
1712
|
-
m.map((
|
|
1713
|
-
if (!
|
|
1714
|
-
const
|
|
1715
|
-
return /* @__PURE__ */ a("source", { src:
|
|
1712
|
+
m.map((y) => {
|
|
1713
|
+
if (!y.url || y.url.length < 4 || isNaN(y.width)) return null;
|
|
1714
|
+
const k = `(max-width: ${y.width}px)`;
|
|
1715
|
+
return /* @__PURE__ */ a("source", { src: y.url, media: k, type: y.type }, y.url);
|
|
1716
1716
|
}),
|
|
1717
1717
|
"Your browser does not support the video tag."
|
|
1718
1718
|
) });
|
|
1719
|
-
},
|
|
1719
|
+
}, Nt = (e) => {
|
|
1720
1720
|
const { videoSource: o } = e;
|
|
1721
|
-
return o === "Custom" ? /* @__PURE__ */ a(
|
|
1721
|
+
return o === "Custom" ? /* @__PURE__ */ a(St, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ a(Bt, { ...e }) : /* @__PURE__ */ b("div", { children: [
|
|
1722
1722
|
"Invalid video source : ",
|
|
1723
1723
|
o
|
|
1724
1724
|
] });
|
|
1725
|
-
},
|
|
1725
|
+
}, _t = {
|
|
1726
1726
|
type: "Video",
|
|
1727
1727
|
label: "Video",
|
|
1728
1728
|
category: "core",
|
|
1729
|
-
icon:
|
|
1729
|
+
icon: ce,
|
|
1730
1730
|
group: "media",
|
|
1731
|
-
...
|
|
1731
|
+
...p({
|
|
1732
1732
|
properties: {
|
|
1733
1733
|
styles: u("absolute h-full w-full object-cover"),
|
|
1734
1734
|
videoSource: {
|
|
@@ -1761,7 +1761,7 @@ const D = (e, ...o) => ({
|
|
|
1761
1761
|
type: "object",
|
|
1762
1762
|
default: { srcsets: [] }
|
|
1763
1763
|
},
|
|
1764
|
-
controls: { ...
|
|
1764
|
+
controls: { ...S }
|
|
1765
1765
|
}
|
|
1766
1766
|
}
|
|
1767
1767
|
},
|
|
@@ -1778,7 +1778,7 @@ const D = (e, ...o) => ({
|
|
|
1778
1778
|
title: "Youtube Video URL",
|
|
1779
1779
|
default: ""
|
|
1780
1780
|
},
|
|
1781
|
-
controls: { ...
|
|
1781
|
+
controls: { ...S }
|
|
1782
1782
|
}
|
|
1783
1783
|
}
|
|
1784
1784
|
},
|
|
@@ -1795,7 +1795,7 @@ const D = (e, ...o) => ({
|
|
|
1795
1795
|
title: "Vimeo Video URL",
|
|
1796
1796
|
default: ""
|
|
1797
1797
|
},
|
|
1798
|
-
controls: { ...
|
|
1798
|
+
controls: { ...S }
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
@@ -1807,43 +1807,56 @@ const D = (e, ...o) => ({
|
|
|
1807
1807
|
}
|
|
1808
1808
|
}),
|
|
1809
1809
|
i18nProps: ["url"]
|
|
1810
|
-
},
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1813
|
-
|
|
1810
|
+
}, Tt = ({ styles: e }) => {
|
|
1811
|
+
const o = V("Pagination");
|
|
1812
|
+
return /* @__PURE__ */ a("div", { ...e, children: o ? g.createElement(o.component) : /* @__PURE__ */ b(N, { children: [
|
|
1813
|
+
/* @__PURE__ */ a(
|
|
1814
|
+
"button",
|
|
1815
|
+
{
|
|
1816
|
+
className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1817
|
+
disabled: !0,
|
|
1818
|
+
children: /* @__PURE__ */ a(de, { className: "h-4 w-4" })
|
|
1819
|
+
}
|
|
1820
|
+
),
|
|
1821
|
+
/* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-blue-500 bg-blue-500 font-medium text-white", children: "1" }),
|
|
1822
|
+
/* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50", children: "2" }),
|
|
1823
|
+
/* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50", children: "3" }),
|
|
1824
|
+
/* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50", children: "4" }),
|
|
1825
|
+
/* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50", children: "5" }),
|
|
1826
|
+
/* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50", children: /* @__PURE__ */ a(pe, { className: "h-4 w-4" }) })
|
|
1827
|
+
] }) });
|
|
1828
|
+
}, Rt = (e) => {
|
|
1829
|
+
const { children: o, tag: t, styles: l, blockProps: r, $loading: n, paginationStyles: i } = e, { pagination: s, inBuilder: c } = e;
|
|
1830
|
+
let m = o;
|
|
1831
|
+
return v(m) && c && (m = /* @__PURE__ */ a("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" })), t === "none" ? n && c ? Array.from({ length: 2 }).map((h, y) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1814
1832
|
/* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1815
1833
|
/* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1816
|
-
] },
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
/* @__PURE__ */
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1834
|
+
] }, y)) : m : /* @__PURE__ */ b(N, { children: [
|
|
1835
|
+
g.createElement(
|
|
1836
|
+
t,
|
|
1837
|
+
{ ...r, ...l },
|
|
1838
|
+
n && c ? Array.from({ length: 2 }).map((h, y) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1839
|
+
/* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1840
|
+
/* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1841
|
+
] }, y)) : m
|
|
1842
|
+
),
|
|
1843
|
+
s && /* @__PURE__ */ a(Tt, { styles: i })
|
|
1844
|
+
] });
|
|
1845
|
+
}, At = {
|
|
1825
1846
|
type: "Repeater",
|
|
1826
1847
|
label: "Repeater",
|
|
1827
|
-
icon:
|
|
1848
|
+
icon: j,
|
|
1828
1849
|
group: "basic",
|
|
1829
1850
|
dataProviderMode: "live",
|
|
1830
1851
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
1831
1852
|
blocks: () => [
|
|
1832
1853
|
{ _id: "A", _type: "Repeater", tag: "ul" },
|
|
1833
1854
|
{ _id: "B", _name: "Repeater Item", _type: "RepeaterItem", parentTag: "ul", _parent: "A" }
|
|
1834
|
-
// { _id: "C", _name: "Empty State", _type: "RepeaterEmptyState", _parent: "A" },
|
|
1835
|
-
// {
|
|
1836
|
-
// _id: "D",
|
|
1837
|
-
// _name: "Empty State Heading",
|
|
1838
|
-
// _type: "Heading",
|
|
1839
|
-
// _parent: "C",
|
|
1840
|
-
// styles: "#styles:,text-2xl text-center",
|
|
1841
|
-
// content: "No items",
|
|
1842
|
-
// },
|
|
1843
1855
|
],
|
|
1844
|
-
...
|
|
1856
|
+
...p({
|
|
1845
1857
|
properties: {
|
|
1846
|
-
styles:
|
|
1858
|
+
styles: L("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
|
|
1859
|
+
paginationStyles: L("flex items-center justify-center gap-2 p-4"),
|
|
1847
1860
|
repeaterItems: {
|
|
1848
1861
|
title: "Collection",
|
|
1849
1862
|
type: "string",
|
|
@@ -1860,11 +1873,6 @@ const D = (e, ...o) => ({
|
|
|
1860
1873
|
default: "ul",
|
|
1861
1874
|
enum: ["none", "div", "ul", "ol"]
|
|
1862
1875
|
},
|
|
1863
|
-
limit: {
|
|
1864
|
-
title: "Limit",
|
|
1865
|
-
type: "number",
|
|
1866
|
-
default: 3
|
|
1867
|
-
},
|
|
1868
1876
|
filter: {
|
|
1869
1877
|
title: "Filter by",
|
|
1870
1878
|
type: "string",
|
|
@@ -1876,10 +1884,59 @@ const D = (e, ...o) => ({
|
|
|
1876
1884
|
type: "string",
|
|
1877
1885
|
default: "",
|
|
1878
1886
|
ui: { "ui:widget": "collectionSelect" }
|
|
1887
|
+
},
|
|
1888
|
+
pagination: {
|
|
1889
|
+
title: "Pagination",
|
|
1890
|
+
type: "boolean",
|
|
1891
|
+
default: !1
|
|
1879
1892
|
}
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
|
|
1893
|
+
},
|
|
1894
|
+
allOf: [
|
|
1895
|
+
{
|
|
1896
|
+
if: {
|
|
1897
|
+
properties: {
|
|
1898
|
+
pagination: { const: !0 }
|
|
1899
|
+
}
|
|
1900
|
+
},
|
|
1901
|
+
then: {
|
|
1902
|
+
properties: {
|
|
1903
|
+
paginationStrategy: {
|
|
1904
|
+
type: "string",
|
|
1905
|
+
title: "Pagination Strategy",
|
|
1906
|
+
default: "segment",
|
|
1907
|
+
enum: ["query", "segment"],
|
|
1908
|
+
enumNames: ["Query(/items?page=1)", "Segment(/items/1)"]
|
|
1909
|
+
},
|
|
1910
|
+
limit: {
|
|
1911
|
+
type: "number",
|
|
1912
|
+
title: "Items Per Page",
|
|
1913
|
+
default: 10,
|
|
1914
|
+
minimum: 1
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
if: {
|
|
1921
|
+
properties: {
|
|
1922
|
+
pagination: { const: !1 }
|
|
1923
|
+
}
|
|
1924
|
+
},
|
|
1925
|
+
then: {
|
|
1926
|
+
properties: {
|
|
1927
|
+
limit: {
|
|
1928
|
+
type: "number",
|
|
1929
|
+
title: "Max items",
|
|
1930
|
+
default: 10,
|
|
1931
|
+
minimum: 1
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
]
|
|
1937
|
+
}),
|
|
1938
|
+
canAcceptBlock: (e) => e === "Pagination"
|
|
1939
|
+
}, Mt = ({
|
|
1883
1940
|
children: e,
|
|
1884
1941
|
blockProps: o,
|
|
1885
1942
|
styles: t,
|
|
@@ -1897,46 +1954,46 @@ const D = (e, ...o) => ({
|
|
|
1897
1954
|
default:
|
|
1898
1955
|
n = "div";
|
|
1899
1956
|
}
|
|
1900
|
-
return !e && r ?
|
|
1957
|
+
return !e && r ? g.createElement(
|
|
1901
1958
|
n,
|
|
1902
1959
|
{ ...o, ...t },
|
|
1903
1960
|
/* @__PURE__ */ a("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" })
|
|
1904
|
-
) :
|
|
1905
|
-
},
|
|
1961
|
+
) : g.createElement(n, { ...o, ...t }, e);
|
|
1962
|
+
}, Et = {
|
|
1906
1963
|
type: "RepeaterItem",
|
|
1907
1964
|
label: "Repeater Item",
|
|
1908
|
-
icon:
|
|
1965
|
+
icon: j,
|
|
1909
1966
|
hidden: !0,
|
|
1910
1967
|
group: "basic",
|
|
1911
|
-
...
|
|
1968
|
+
...p({
|
|
1912
1969
|
properties: {
|
|
1913
|
-
styles:
|
|
1914
|
-
parentTag:
|
|
1970
|
+
styles: L(""),
|
|
1971
|
+
parentTag: F("Repeater", "tag")
|
|
1915
1972
|
}
|
|
1916
1973
|
}),
|
|
1917
1974
|
canAcceptBlock: (e) => e !== "RepeaterItem",
|
|
1918
1975
|
canDelete: () => !1,
|
|
1919
1976
|
canMove: () => !1,
|
|
1920
1977
|
canDuplicate: () => !1
|
|
1921
|
-
},
|
|
1978
|
+
}, Ht = ({
|
|
1922
1979
|
children: e,
|
|
1923
1980
|
blockProps: o,
|
|
1924
1981
|
styles: t
|
|
1925
|
-
}) =>
|
|
1982
|
+
}) => g.createElement("div", { ...o, ...t }, e), $t = {
|
|
1926
1983
|
type: "RepeaterEmptyState",
|
|
1927
1984
|
label: "Empty State",
|
|
1928
1985
|
hidden: !0,
|
|
1929
1986
|
group: "basic",
|
|
1930
|
-
...
|
|
1931
|
-
properties: { styles:
|
|
1987
|
+
...p({
|
|
1988
|
+
properties: { styles: L("p-5 flex items-center justify-center") }
|
|
1932
1989
|
}),
|
|
1933
1990
|
canAcceptBlock: () => !0,
|
|
1934
1991
|
canDelete: () => !1,
|
|
1935
1992
|
canMove: () => !1,
|
|
1936
1993
|
canDuplicate: () => !1
|
|
1937
|
-
},
|
|
1938
|
-
|
|
1994
|
+
}, qt = () => {
|
|
1995
|
+
d(ge, be), d(Pe, Le), d(fe, he), d(Ge, We), d(ut, mt), d(vt, Ct), d(kt, wt), d(at, it), d(st, ct), d(dt, pt), d(tt, ot), d(rt, nt), d(Nt, _t), d(xe, ke), d(we, ve), d(It, Pt), d(Ne, _e), d(Te, Re), d(Me, Ee), d(Be, Se), d(ze, je), d(De, Ve), d(Fe, Ue), d(He, $e), d(Oe, Ye), d(Ce, Ie), d(qe, Ze), d(yt, gt), d(ht, xt), d(bt, ft), d(Rt, At), d(Mt, Et), d(Ht, $t);
|
|
1939
1996
|
};
|
|
1940
1997
|
export {
|
|
1941
|
-
|
|
1998
|
+
qt as loadWebBlocks
|
|
1942
1999
|
};
|