@chaibuilder/sdk 3.0.13 → 3.0.14
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/README.md +1 -2
- package/dist/{code-editor-DFvtVxXd.cjs → code-editor-D5uDqrW1.cjs} +1 -1
- package/dist/{code-editor-GydqqBXp.js → code-editor-e5WfREx8.js} +1 -1
- package/dist/core.cjs +66 -48
- package/dist/core.js +2564 -2481
- package/dist/{css-import-modal-BvRHCuHm.js → css-import-modal-CSVrt6lz.js} +1 -1
- package/dist/{css-import-modal-DkVfKE_h.cjs → css-import-modal-Cm49bHmT.cjs} +1 -1
- package/dist/sdk.css +1 -1
- package/dist/{toggle-DrRMNSqS.js → toggle-C5YXnEL9.js} +409 -409
- package/dist/toggle-Ca6BayTf.cjs +1 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +279 -253
- package/package.json +3 -2
- package/dist/toggle-BaUXILMJ.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { c as
|
|
1
|
+
import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, getRegisteredChaiBlock as F, stylesProp as B, closestBlockProp as U } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as i, jsxs as g, Fragment as _ } from "react/jsx-runtime";
|
|
3
|
+
import { c as T, 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
|
|
7
|
-
import { isEmpty as v, get as
|
|
8
|
-
const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */
|
|
9
|
-
const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles:
|
|
6
|
+
import { ButtonIcon as E, CodeIcon as H, DividerHorizontalIcon as Z, CheckboxIcon as G, FileTextIcon as W, InputIcon as $, LetterCaseToggleIcon as O, RadiobuttonIcon as Y, DropdownMenuIcon as Q, FrameIcon as z, HeadingIcon as J, TableIcon as X, BorderTopIcon as K, BorderAllIcon as ee, ViewHorizontalIcon as te, DragHandleHorizontalIcon as oe, SketchLogoIcon as le, ImageIcon as re, Link1Icon as ne, RowsIcon as j, ColumnsIcon as ie, TextIcon as ae, LayoutIcon as se, CursorTextIcon as ce, SpaceBetweenVerticallyIcon as pe, VideoIcon as de, 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 q } from "lodash-es";
|
|
8
|
+
const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div", { className: T("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("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
|
+
const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: a } = e;
|
|
10
10
|
let s = r;
|
|
11
|
-
r || (s = /* @__PURE__ */
|
|
11
|
+
r || (s = /* @__PURE__ */ i(C, { inBuilder: t }));
|
|
12
12
|
let c = {};
|
|
13
|
-
return l && (c = { backgroundImage: `url(${l})` }), y.createElement(n, { ...o, ...
|
|
13
|
+
return l && (c = { backgroundImage: `url(${l})` }), y.createElement(n, { ...o, ...a, style: c }, s);
|
|
14
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
|
+
...d({
|
|
21
21
|
properties: {
|
|
22
22
|
styles: u(""),
|
|
23
23
|
tag: {
|
|
@@ -54,9 +54,9 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
54
54
|
}),
|
|
55
55
|
canAcceptBlock: () => !0
|
|
56
56
|
}, fe = (e) => {
|
|
57
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children:
|
|
58
|
-
r && /* @__PURE__ */
|
|
59
|
-
h && /* @__PURE__ */
|
|
57
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: a, iconPos: s, link: c, inBuilder: m } = e, h = l, b = a || /* @__PURE__ */ g(_, { children: [
|
|
58
|
+
r && /* @__PURE__ */ i("span", { children: r }),
|
|
59
|
+
h && /* @__PURE__ */ i(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
62
|
style: { width: t + "px" },
|
|
@@ -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,15 +74,15 @@ 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__ */ i("span", { children: x }) : /* @__PURE__ */ i("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",
|
|
81
81
|
label: "Button",
|
|
82
82
|
category: "core",
|
|
83
|
-
icon:
|
|
83
|
+
icon: E,
|
|
84
84
|
group: "basic",
|
|
85
|
-
...
|
|
85
|
+
...d({
|
|
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,10 +132,10 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
132
132
|
}),
|
|
133
133
|
i18nProps: ["content", "link"],
|
|
134
134
|
aiProps: ["content"]
|
|
135
|
-
},
|
|
135
|
+
}, ke = (e) => {
|
|
136
136
|
const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
|
|
137
137
|
return r ? /* @__PURE__ */ g("div", { className: "relative", children: [
|
|
138
|
-
r ? /* @__PURE__ */
|
|
138
|
+
r ? /* @__PURE__ */ i("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
139
139
|
y.createElement("div", {
|
|
140
140
|
...t,
|
|
141
141
|
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
@@ -145,14 +145,14 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
145
145
|
...t,
|
|
146
146
|
dangerouslySetInnerHTML: { __html: l }
|
|
147
147
|
});
|
|
148
|
-
},
|
|
148
|
+
}, xe = {
|
|
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: H,
|
|
154
154
|
group: "advanced",
|
|
155
|
-
...
|
|
155
|
+
...d({
|
|
156
156
|
properties: {
|
|
157
157
|
styles: u(""),
|
|
158
158
|
htmlCode: {
|
|
@@ -165,15 +165,15 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
165
165
|
i18nProps: ["htmlCode"]
|
|
166
166
|
}, we = (e) => {
|
|
167
167
|
const { scripts: o, inBuilder: t, blockProps: l } = e;
|
|
168
|
-
return t ? /* @__PURE__ */
|
|
168
|
+
return t ? /* @__PURE__ */ i("div", { ...l, children: /* @__PURE__ */ i("div", { className: T("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("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__ */ i("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: H,
|
|
175
175
|
group: "advanced",
|
|
176
|
-
...
|
|
176
|
+
...d({
|
|
177
177
|
properties: {
|
|
178
178
|
scripts: {
|
|
179
179
|
type: "string",
|
|
@@ -195,7 +195,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
195
195
|
category: "core",
|
|
196
196
|
icon: Z,
|
|
197
197
|
group: "basic",
|
|
198
|
-
...
|
|
198
|
+
...d({
|
|
199
199
|
properties: {
|
|
200
200
|
styles: u("bg-gray-900 h-0.5 py-2 my-1")
|
|
201
201
|
}
|
|
@@ -210,7 +210,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
210
210
|
label: "Empty Box",
|
|
211
211
|
category: "core",
|
|
212
212
|
group: "basic",
|
|
213
|
-
...
|
|
213
|
+
...d({
|
|
214
214
|
properties: {
|
|
215
215
|
styles: u(""),
|
|
216
216
|
backgroundImage: {
|
|
@@ -222,11 +222,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
222
222
|
}
|
|
223
223
|
})
|
|
224
224
|
}, Be = (e) => {
|
|
225
|
-
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required:
|
|
225
|
+
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e;
|
|
226
226
|
return c ? /* @__PURE__ */ g("div", { ...r, ...o, children: [
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
l && /* @__PURE__ */
|
|
229
|
-
] }) : /* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ i("input", { ...n, name: t, type: "checkbox", required: a, defaultChecked: s }),
|
|
228
|
+
l && /* @__PURE__ */ i("label", { htmlFor: t, children: l })
|
|
229
|
+
] }) : /* @__PURE__ */ i(
|
|
230
230
|
"input",
|
|
231
231
|
{
|
|
232
232
|
name: t,
|
|
@@ -234,7 +234,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
234
234
|
...n,
|
|
235
235
|
...r,
|
|
236
236
|
type: "checkbox",
|
|
237
|
-
required:
|
|
237
|
+
required: a,
|
|
238
238
|
defaultChecked: s
|
|
239
239
|
}
|
|
240
240
|
);
|
|
@@ -244,7 +244,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
244
244
|
category: "core",
|
|
245
245
|
icon: G,
|
|
246
246
|
group: "form",
|
|
247
|
-
...
|
|
247
|
+
...d({
|
|
248
248
|
properties: {
|
|
249
249
|
styles: u("flex items-center gap-x-2"),
|
|
250
250
|
inputStyles: u(""),
|
|
@@ -278,9 +278,9 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
278
278
|
aiProps: ["label"],
|
|
279
279
|
i18nProps: ["label"]
|
|
280
280
|
}, Ne = (e) => {
|
|
281
|
-
const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles:
|
|
281
|
+
const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: a, inBuilder: s } = e;
|
|
282
282
|
let c = o;
|
|
283
|
-
return o || (c = /* @__PURE__ */
|
|
283
|
+
return o || (c = /* @__PURE__ */ i(C, { inBuilder: s })), /* @__PURE__ */ g(
|
|
284
284
|
"form",
|
|
285
285
|
{
|
|
286
286
|
...{
|
|
@@ -292,9 +292,9 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
292
292
|
method: "post",
|
|
293
293
|
action: n,
|
|
294
294
|
...t,
|
|
295
|
-
...
|
|
295
|
+
...a,
|
|
296
296
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ i("div", { ...{
|
|
298
298
|
"x-html": "",
|
|
299
299
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
300
300
|
} }),
|
|
@@ -318,7 +318,7 @@ const C = ({ 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
|
+
...d({
|
|
322
322
|
properties: {
|
|
323
323
|
styles: u(""),
|
|
324
324
|
action: {
|
|
@@ -344,13 +344,13 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
344
344
|
aiProps: ["errorMessage", "successMessage"],
|
|
345
345
|
canAcceptBlock: () => !0
|
|
346
346
|
}, Te = (e) => {
|
|
347
|
-
const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize:
|
|
347
|
+
const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: a, iconPos: s } = e;
|
|
348
348
|
return /* @__PURE__ */ g("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
|
|
349
349
|
l,
|
|
350
|
-
n && /* @__PURE__ */
|
|
350
|
+
n && /* @__PURE__ */ i(
|
|
351
351
|
"div",
|
|
352
352
|
{
|
|
353
|
-
style: { width:
|
|
353
|
+
style: { width: a + "px" },
|
|
354
354
|
className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
|
|
355
355
|
dangerouslySetInnerHTML: { __html: n }
|
|
356
356
|
}
|
|
@@ -360,9 +360,9 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
360
360
|
type: "FormButton",
|
|
361
361
|
label: "Submit Button",
|
|
362
362
|
category: "core",
|
|
363
|
-
icon:
|
|
363
|
+
icon: E,
|
|
364
364
|
group: "form",
|
|
365
|
-
...
|
|
365
|
+
...d({
|
|
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"
|
|
@@ -470,37 +470,37 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
470
470
|
label: l,
|
|
471
471
|
placeholder: r,
|
|
472
472
|
styles: n,
|
|
473
|
-
inputStyles:
|
|
473
|
+
inputStyles: a,
|
|
474
474
|
showLabel: s,
|
|
475
475
|
required: c,
|
|
476
476
|
inputType: m,
|
|
477
477
|
defaultValue: h
|
|
478
|
-
} = e, { type: b, autocomplete:
|
|
478
|
+
} = e, { type: b, autocomplete: x } = Ae(m);
|
|
479
479
|
return s ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
|
|
480
|
-
s && /* @__PURE__ */
|
|
481
|
-
/* @__PURE__ */
|
|
480
|
+
s && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
481
|
+
/* @__PURE__ */ i(
|
|
482
482
|
"input",
|
|
483
483
|
{
|
|
484
484
|
name: t,
|
|
485
485
|
defaultValue: h,
|
|
486
|
-
...
|
|
486
|
+
...a,
|
|
487
487
|
type: b,
|
|
488
488
|
placeholder: r,
|
|
489
489
|
required: c,
|
|
490
|
-
autoComplete:
|
|
490
|
+
autoComplete: x
|
|
491
491
|
}
|
|
492
492
|
)
|
|
493
|
-
] }) : /* @__PURE__ */
|
|
493
|
+
] }) : /* @__PURE__ */ i(
|
|
494
494
|
"input",
|
|
495
495
|
{
|
|
496
496
|
name: t,
|
|
497
497
|
...o,
|
|
498
|
-
...
|
|
498
|
+
...a,
|
|
499
499
|
...n,
|
|
500
500
|
type: b,
|
|
501
501
|
placeholder: r,
|
|
502
502
|
required: c,
|
|
503
|
-
autoComplete:
|
|
503
|
+
autoComplete: x,
|
|
504
504
|
defaultValue: h
|
|
505
505
|
}
|
|
506
506
|
);
|
|
@@ -508,9 +508,9 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
508
508
|
type: "Input",
|
|
509
509
|
label: "web_blocks.input",
|
|
510
510
|
category: "core",
|
|
511
|
-
icon:
|
|
511
|
+
icon: $,
|
|
512
512
|
group: "form",
|
|
513
|
-
...
|
|
513
|
+
...d({
|
|
514
514
|
properties: {
|
|
515
515
|
styles: u(""),
|
|
516
516
|
inputStyles: u("w-full p-1"),
|
|
@@ -631,7 +631,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
631
631
|
category: "core",
|
|
632
632
|
icon: O,
|
|
633
633
|
group: "form",
|
|
634
|
-
...
|
|
634
|
+
...d({
|
|
635
635
|
properties: {
|
|
636
636
|
styles: u(),
|
|
637
637
|
content: {
|
|
@@ -644,11 +644,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
644
644
|
aiProps: ["content"],
|
|
645
645
|
i18nProps: ["content"]
|
|
646
646
|
}, ze = (e) => {
|
|
647
|
-
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required:
|
|
647
|
+
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e;
|
|
648
648
|
return c ? /* @__PURE__ */ g("div", { ...r, ...o, children: [
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
l && /* @__PURE__ */
|
|
651
|
-
] }) : /* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ i("input", { ...n, name: t, type: "radio", required: a, defaultChecked: s }),
|
|
650
|
+
l && /* @__PURE__ */ i("label", { htmlFor: t, children: l })
|
|
651
|
+
] }) : /* @__PURE__ */ i(
|
|
652
652
|
"input",
|
|
653
653
|
{
|
|
654
654
|
name: t,
|
|
@@ -656,7 +656,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
656
656
|
...n,
|
|
657
657
|
...r,
|
|
658
658
|
type: "radio",
|
|
659
|
-
required:
|
|
659
|
+
required: a,
|
|
660
660
|
checked: s
|
|
661
661
|
}
|
|
662
662
|
);
|
|
@@ -666,7 +666,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
666
666
|
category: "core",
|
|
667
667
|
icon: Y,
|
|
668
668
|
group: "form",
|
|
669
|
-
...
|
|
669
|
+
...d({
|
|
670
670
|
properties: {
|
|
671
671
|
styles: u("flex items-center gap-x-2"),
|
|
672
672
|
inputStyles: u(""),
|
|
@@ -706,26 +706,26 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
706
706
|
label: l,
|
|
707
707
|
placeholder: r,
|
|
708
708
|
styles: n,
|
|
709
|
-
inputStyles:
|
|
709
|
+
inputStyles: a,
|
|
710
710
|
required: s,
|
|
711
711
|
showLabel: c,
|
|
712
712
|
_multiple: m,
|
|
713
713
|
options: h,
|
|
714
714
|
defaultValue: b
|
|
715
|
-
} = e,
|
|
715
|
+
} = e, x = m && b ? b.split(",").map((f) => f.trim()) : b || "";
|
|
716
716
|
return c ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
|
|
717
|
-
c && /* @__PURE__ */
|
|
717
|
+
c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
718
718
|
/* @__PURE__ */ g(
|
|
719
719
|
"select",
|
|
720
720
|
{
|
|
721
|
-
...
|
|
721
|
+
...a,
|
|
722
722
|
required: s,
|
|
723
723
|
multiple: m,
|
|
724
724
|
name: t,
|
|
725
|
-
defaultValue:
|
|
725
|
+
defaultValue: x,
|
|
726
726
|
children: [
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
|
|
727
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
728
|
+
R(h, (f) => /* @__PURE__ */ i("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
|
)
|
|
@@ -737,10 +737,10 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
737
737
|
required: s,
|
|
738
738
|
multiple: m,
|
|
739
739
|
name: t,
|
|
740
|
-
defaultValue:
|
|
740
|
+
defaultValue: x,
|
|
741
741
|
children: [
|
|
742
|
-
/* @__PURE__ */
|
|
743
|
-
|
|
742
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
743
|
+
R(h, (f) => /* @__PURE__ */ i("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
|
);
|
|
@@ -750,7 +750,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
750
750
|
category: "core",
|
|
751
751
|
icon: Q,
|
|
752
752
|
group: "form",
|
|
753
|
-
...
|
|
753
|
+
...d({
|
|
754
754
|
properties: {
|
|
755
755
|
styles: u(""),
|
|
756
756
|
inputStyles: u("w-full p-1"),
|
|
@@ -813,27 +813,27 @@ const C = ({ 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:
|
|
816
|
+
}, qe = (e) => {
|
|
817
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: a, rows: s, showLabel: c, required: m, defaultValue: h } = e;
|
|
818
818
|
return c ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
|
|
819
|
-
c && /* @__PURE__ */
|
|
820
|
-
/* @__PURE__ */
|
|
819
|
+
c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
820
|
+
/* @__PURE__ */ i(
|
|
821
821
|
"textarea",
|
|
822
822
|
{
|
|
823
823
|
name: t,
|
|
824
|
-
...
|
|
824
|
+
...a,
|
|
825
825
|
placeholder: r,
|
|
826
826
|
rows: s,
|
|
827
827
|
required: m,
|
|
828
828
|
defaultValue: h
|
|
829
829
|
}
|
|
830
830
|
)
|
|
831
|
-
] }) : /* @__PURE__ */
|
|
831
|
+
] }) : /* @__PURE__ */ i(
|
|
832
832
|
"textarea",
|
|
833
833
|
{
|
|
834
834
|
name: t,
|
|
835
835
|
...o,
|
|
836
|
-
...
|
|
836
|
+
...a,
|
|
837
837
|
...n,
|
|
838
838
|
placeholder: r,
|
|
839
839
|
rows: s,
|
|
@@ -841,13 +841,13 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
841
841
|
defaultValue: h
|
|
842
842
|
}
|
|
843
843
|
);
|
|
844
|
-
},
|
|
844
|
+
}, Fe = {
|
|
845
845
|
type: "TextArea",
|
|
846
846
|
label: "web_blocks.textarea",
|
|
847
847
|
category: "core",
|
|
848
|
-
icon:
|
|
848
|
+
icon: $,
|
|
849
849
|
group: "form",
|
|
850
|
-
...
|
|
850
|
+
...d({
|
|
851
851
|
properties: {
|
|
852
852
|
fieldName: {
|
|
853
853
|
type: "string",
|
|
@@ -892,7 +892,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
892
892
|
}),
|
|
893
893
|
aiProps: ["label", "placeholder"],
|
|
894
894
|
i18nProps: ["label", "placeholder"]
|
|
895
|
-
},
|
|
895
|
+
}, Ue = (e) => {
|
|
896
896
|
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
897
897
|
return t && !r ? /* @__PURE__ */ g(
|
|
898
898
|
"div",
|
|
@@ -904,7 +904,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
904
904
|
"Global Block - ",
|
|
905
905
|
r
|
|
906
906
|
] }),
|
|
907
|
-
/* @__PURE__ */
|
|
907
|
+
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
908
908
|
]
|
|
909
909
|
}
|
|
910
910
|
) : y.createElement("span", { ...o }, l);
|
|
@@ -912,11 +912,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
912
912
|
type: "GlobalBlock",
|
|
913
913
|
description: "A global block component",
|
|
914
914
|
label: "Global Block",
|
|
915
|
-
icon:
|
|
915
|
+
icon: z,
|
|
916
916
|
category: "core",
|
|
917
917
|
group: "basic",
|
|
918
918
|
hidden: !0,
|
|
919
|
-
...
|
|
919
|
+
...d({
|
|
920
920
|
properties: {
|
|
921
921
|
globalBlock: {
|
|
922
922
|
type: "string",
|
|
@@ -926,10 +926,19 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
})
|
|
929
|
-
},
|
|
929
|
+
}, P = (e, ...o) => ({
|
|
930
|
+
...e,
|
|
931
|
+
className: T(e.className, ...o)
|
|
932
|
+
}), Ge = (e) => {
|
|
930
933
|
const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
|
|
931
|
-
|
|
932
|
-
|
|
934
|
+
if (n) return y.createElement(r, { ...t, ...o }, n);
|
|
935
|
+
const a = P(
|
|
936
|
+
t,
|
|
937
|
+
"prose 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",
|
|
938
|
+
"max-w-full"
|
|
939
|
+
);
|
|
940
|
+
return y.createElement(r, {
|
|
941
|
+
...a,
|
|
933
942
|
...o,
|
|
934
943
|
dangerouslySetInnerHTML: { __html: l }
|
|
935
944
|
});
|
|
@@ -940,7 +949,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
940
949
|
category: "core",
|
|
941
950
|
icon: J,
|
|
942
951
|
group: "typography",
|
|
943
|
-
...
|
|
952
|
+
...d({
|
|
944
953
|
properties: {
|
|
945
954
|
tag: {
|
|
946
955
|
type: "string",
|
|
@@ -953,7 +962,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
953
962
|
type: "string",
|
|
954
963
|
default: "Heading goes here",
|
|
955
964
|
title: "Content",
|
|
956
|
-
ui: { "ui:widget": "
|
|
965
|
+
ui: { "ui:widget": "richtext" }
|
|
957
966
|
}
|
|
958
967
|
}
|
|
959
968
|
}),
|
|
@@ -969,7 +978,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
969
978
|
category: "core",
|
|
970
979
|
group: "basic",
|
|
971
980
|
hidden: !0,
|
|
972
|
-
...
|
|
981
|
+
...d({
|
|
973
982
|
properties: {
|
|
974
983
|
styles: u("")
|
|
975
984
|
}
|
|
@@ -980,88 +989,88 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
980
989
|
canDuplicate: () => !1
|
|
981
990
|
}, Qe = (e) => {
|
|
982
991
|
const { blockProps: o, children: t, styles: l } = e;
|
|
983
|
-
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */
|
|
992
|
+
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ i(C, {});
|
|
984
993
|
}, Je = (e) => {
|
|
985
994
|
const { blockProps: o, children: t, styles: l } = e;
|
|
986
|
-
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */
|
|
995
|
+
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ i(C, {});
|
|
987
996
|
}, Xe = (e) => {
|
|
988
997
|
const { blockProps: o, children: t, styles: l } = e;
|
|
989
|
-
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */
|
|
998
|
+
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ i(C, {});
|
|
990
999
|
}, Ke = (e) => {
|
|
991
1000
|
const { blockProps: o, children: t, styles: l } = e;
|
|
992
|
-
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */
|
|
1001
|
+
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ i(C, {});
|
|
993
1002
|
}, et = (e) => {
|
|
994
1003
|
const { blockProps: o, children: t, content: l, styles: r } = e;
|
|
995
|
-
return !t && v(l) ? /* @__PURE__ */
|
|
1004
|
+
return !t && v(l) ? /* @__PURE__ */ i(C, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
|
|
996
1005
|
...o,
|
|
997
1006
|
...r,
|
|
998
1007
|
dangerouslySetInnerHTML: { __html: l }
|
|
999
1008
|
});
|
|
1000
1009
|
};
|
|
1001
|
-
|
|
1010
|
+
p(Qe, {
|
|
1002
1011
|
type: "Table",
|
|
1003
1012
|
label: "Table",
|
|
1004
1013
|
category: "core",
|
|
1005
1014
|
group: "table",
|
|
1006
1015
|
hidden: !0,
|
|
1007
1016
|
icon: X,
|
|
1008
|
-
...
|
|
1017
|
+
...d({
|
|
1009
1018
|
properties: {
|
|
1010
1019
|
styles: u("")
|
|
1011
1020
|
}
|
|
1012
1021
|
}),
|
|
1013
|
-
blocks:
|
|
1022
|
+
blocks: L("Table")
|
|
1014
1023
|
});
|
|
1015
|
-
|
|
1024
|
+
p(Je, {
|
|
1016
1025
|
type: "TableHead",
|
|
1017
1026
|
label: "Table Head",
|
|
1018
1027
|
category: "core",
|
|
1019
1028
|
group: "table",
|
|
1020
1029
|
hidden: !0,
|
|
1021
1030
|
icon: K,
|
|
1022
|
-
...
|
|
1031
|
+
...d({
|
|
1023
1032
|
properties: {
|
|
1024
1033
|
styles: u("")
|
|
1025
1034
|
}
|
|
1026
1035
|
}),
|
|
1027
|
-
blocks:
|
|
1036
|
+
blocks: L("TableHead")
|
|
1028
1037
|
});
|
|
1029
|
-
|
|
1038
|
+
p(Xe, {
|
|
1030
1039
|
type: "TableBody",
|
|
1031
1040
|
label: "Table Body",
|
|
1032
1041
|
category: "core",
|
|
1033
1042
|
group: "table",
|
|
1034
1043
|
hidden: !0,
|
|
1035
1044
|
icon: ee,
|
|
1036
|
-
...
|
|
1045
|
+
...d({
|
|
1037
1046
|
properties: {
|
|
1038
1047
|
styles: u("")
|
|
1039
1048
|
}
|
|
1040
1049
|
}),
|
|
1041
|
-
blocks:
|
|
1050
|
+
blocks: L("TableBody")
|
|
1042
1051
|
});
|
|
1043
|
-
|
|
1052
|
+
p(Ke, {
|
|
1044
1053
|
type: "TableRow",
|
|
1045
1054
|
label: "Table Row",
|
|
1046
1055
|
category: "core",
|
|
1047
1056
|
group: "table",
|
|
1048
1057
|
hidden: !0,
|
|
1049
1058
|
icon: te,
|
|
1050
|
-
...
|
|
1059
|
+
...d({
|
|
1051
1060
|
properties: {
|
|
1052
1061
|
styles: u("")
|
|
1053
1062
|
}
|
|
1054
1063
|
}),
|
|
1055
|
-
blocks:
|
|
1064
|
+
blocks: L("TableRow")
|
|
1056
1065
|
});
|
|
1057
|
-
|
|
1066
|
+
p(et, {
|
|
1058
1067
|
type: "TableCell",
|
|
1059
1068
|
label: "Table Cell",
|
|
1060
1069
|
category: "core",
|
|
1061
1070
|
group: "table",
|
|
1062
1071
|
hidden: !0,
|
|
1063
1072
|
icon: oe,
|
|
1064
|
-
...
|
|
1073
|
+
...d({
|
|
1065
1074
|
properties: {
|
|
1066
1075
|
styles: u(""),
|
|
1067
1076
|
content: {
|
|
@@ -1072,38 +1081,38 @@ d(et, {
|
|
|
1072
1081
|
}
|
|
1073
1082
|
}
|
|
1074
1083
|
}),
|
|
1075
|
-
blocks:
|
|
1084
|
+
blocks: L("TableCell"),
|
|
1076
1085
|
i18nProps: ["content"],
|
|
1077
1086
|
aiProps: ["content"]
|
|
1078
1087
|
});
|
|
1079
|
-
function
|
|
1080
|
-
const o = (n,
|
|
1088
|
+
function L(e) {
|
|
1089
|
+
const o = (n, a) => ({
|
|
1081
1090
|
_id: I(),
|
|
1082
1091
|
_parent: n,
|
|
1083
1092
|
_type: "TableCell",
|
|
1084
1093
|
styles: "#styles:,",
|
|
1085
|
-
content: `${e === "TableHead" ? "Table Head" : "Table Cell " +
|
|
1094
|
+
content: `${e === "TableHead" ? "Table Head" : "Table Cell " + a}`
|
|
1086
1095
|
}), t = (n) => {
|
|
1087
|
-
const
|
|
1096
|
+
const a = I(), s = {
|
|
1088
1097
|
_type: "TableRow",
|
|
1089
|
-
_id:
|
|
1098
|
+
_id: a,
|
|
1090
1099
|
styles: "#styles:,border-b"
|
|
1091
1100
|
};
|
|
1092
|
-
return n && (s._parent = n), [s, o(
|
|
1101
|
+
return n && (s._parent = n), [s, o(a, "1"), o(a, "2"), o(a, "3")];
|
|
1093
1102
|
}, l = (n) => {
|
|
1094
|
-
const
|
|
1095
|
-
_id:
|
|
1103
|
+
const a = I(), s = {
|
|
1104
|
+
_id: a,
|
|
1096
1105
|
_type: "TableHead",
|
|
1097
1106
|
styles: "#styles:,font-medium"
|
|
1098
1107
|
};
|
|
1099
|
-
return n && (s._parent = n), [s, ...t(
|
|
1108
|
+
return n && (s._parent = n), [s, ...t(a)];
|
|
1100
1109
|
}, r = (n) => {
|
|
1101
|
-
const
|
|
1102
|
-
_id:
|
|
1110
|
+
const a = I(), s = {
|
|
1111
|
+
_id: a,
|
|
1103
1112
|
_type: "TableBody",
|
|
1104
1113
|
styles: "#styles:,"
|
|
1105
1114
|
};
|
|
1106
|
-
return n && (s._parent = n), [s, ...t(
|
|
1115
|
+
return n && (s._parent = n), [s, ...t(a), ...t(a)];
|
|
1107
1116
|
};
|
|
1108
1117
|
if (e === "Table") {
|
|
1109
1118
|
const n = I();
|
|
@@ -1119,20 +1128,17 @@ function P(e) {
|
|
|
1119
1128
|
}
|
|
1120
1129
|
return e === "TableRow" ? t() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1121
1130
|
}
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1124
|
-
className: _(e.className, ...o)
|
|
1125
|
-
}), tt = (e) => {
|
|
1126
|
-
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s = F(l, "");
|
|
1131
|
+
const tt = (e) => {
|
|
1132
|
+
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: a } = e, s = P(l, "");
|
|
1127
1133
|
if (v(t))
|
|
1128
|
-
return /* @__PURE__ */
|
|
1134
|
+
return /* @__PURE__ */ i(C, { inBuilder: n, className: "h-8 w-14" });
|
|
1129
1135
|
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
1130
1136
|
return y.createElement("span", {
|
|
1131
1137
|
...o,
|
|
1132
1138
|
...s,
|
|
1133
1139
|
style: {
|
|
1134
1140
|
width: r ? `${r}px` : "auto",
|
|
1135
|
-
height:
|
|
1141
|
+
height: a ? `${a}px` : "auto"
|
|
1136
1142
|
},
|
|
1137
1143
|
dangerouslySetInnerHTML: { __html: c }
|
|
1138
1144
|
});
|
|
@@ -1142,7 +1148,7 @@ const F = (e, ...o) => ({
|
|
|
1142
1148
|
category: "core",
|
|
1143
1149
|
icon: le,
|
|
1144
1150
|
group: "media",
|
|
1145
|
-
...
|
|
1151
|
+
...d({
|
|
1146
1152
|
properties: {
|
|
1147
1153
|
styles: u(""),
|
|
1148
1154
|
icon: {
|
|
@@ -1164,10 +1170,10 @@ const F = (e, ...o) => ({
|
|
|
1164
1170
|
}
|
|
1165
1171
|
})
|
|
1166
1172
|
}, lt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", rt = (e) => {
|
|
1167
|
-
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height:
|
|
1168
|
-
return v(t) ? /* @__PURE__ */
|
|
1169
|
-
l && /* @__PURE__ */
|
|
1170
|
-
/* @__PURE__ */
|
|
1173
|
+
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: a, width: s, lazyLoading: c, mobileWidth: m, mobileHeight: h } = e;
|
|
1174
|
+
return v(t) ? /* @__PURE__ */ i(C, { className: "h-36" }) : /* @__PURE__ */ g("picture", { children: [
|
|
1175
|
+
l && /* @__PURE__ */ i("source", { srcSet: l, media: "(max-width: 480px)", width: m, height: h }),
|
|
1176
|
+
/* @__PURE__ */ i(
|
|
1171
1177
|
"img",
|
|
1172
1178
|
{
|
|
1173
1179
|
...o,
|
|
@@ -1176,7 +1182,7 @@ const F = (e, ...o) => ({
|
|
|
1176
1182
|
alt: n,
|
|
1177
1183
|
loading: c ? "lazy" : "eager",
|
|
1178
1184
|
width: s,
|
|
1179
|
-
height:
|
|
1185
|
+
height: a
|
|
1180
1186
|
}
|
|
1181
1187
|
)
|
|
1182
1188
|
] });
|
|
@@ -1187,7 +1193,7 @@ const F = (e, ...o) => ({
|
|
|
1187
1193
|
category: "core",
|
|
1188
1194
|
icon: re,
|
|
1189
1195
|
group: "media",
|
|
1190
|
-
...
|
|
1196
|
+
...d({
|
|
1191
1197
|
properties: {
|
|
1192
1198
|
styles: u(""),
|
|
1193
1199
|
image: {
|
|
@@ -1241,10 +1247,10 @@ const F = (e, ...o) => ({
|
|
|
1241
1247
|
}),
|
|
1242
1248
|
aiProps: ["alt"],
|
|
1243
1249
|
i18nProps: ["alt", "image", "_imageId", "mobileImage", "_mobileImageId"]
|
|
1244
|
-
},
|
|
1245
|
-
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content:
|
|
1250
|
+
}, it = (e) => {
|
|
1251
|
+
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: a } = e;
|
|
1246
1252
|
let s = {};
|
|
1247
|
-
return !l && v(
|
|
1253
|
+
return !l && v(a) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ i("span", { role: "link", ...o, style: s, ...r, children: l }) : w(
|
|
1248
1254
|
"span",
|
|
1249
1255
|
{
|
|
1250
1256
|
...o,
|
|
@@ -1252,26 +1258,26 @@ const F = (e, ...o) => ({
|
|
|
1252
1258
|
style: s,
|
|
1253
1259
|
role: "link"
|
|
1254
1260
|
},
|
|
1255
|
-
|
|
1256
|
-
) : l ? /* @__PURE__ */
|
|
1261
|
+
a
|
|
1262
|
+
) : l ? /* @__PURE__ */ i("a", { "aria-label": a, href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...r, children: l }) : w(
|
|
1257
1263
|
"a",
|
|
1258
1264
|
{
|
|
1259
1265
|
...o,
|
|
1260
1266
|
...r,
|
|
1261
1267
|
href: (t == null ? void 0 : t.href) || "#",
|
|
1262
1268
|
target: (t == null ? void 0 : t.target) || "_self",
|
|
1263
|
-
"aria-label":
|
|
1269
|
+
"aria-label": a
|
|
1264
1270
|
},
|
|
1265
|
-
|
|
1271
|
+
a
|
|
1266
1272
|
);
|
|
1267
|
-
},
|
|
1273
|
+
}, at = {
|
|
1268
1274
|
type: "Link",
|
|
1269
1275
|
description: "A link component",
|
|
1270
1276
|
label: "Link",
|
|
1271
1277
|
category: "core",
|
|
1272
1278
|
icon: ne,
|
|
1273
1279
|
group: "basic",
|
|
1274
|
-
...
|
|
1280
|
+
...d({
|
|
1275
1281
|
properties: {
|
|
1276
1282
|
styles: u(""),
|
|
1277
1283
|
content: {
|
|
@@ -1307,15 +1313,15 @@ const F = (e, ...o) => ({
|
|
|
1307
1313
|
canAcceptBlock: (e) => e !== "Link"
|
|
1308
1314
|
}, st = (e) => {
|
|
1309
1315
|
const { blockProps: o, children: t, styles: l, tag: r, inBuilder: n } = e;
|
|
1310
|
-
return !t && v(l == null ? void 0 : l.className) ? /* @__PURE__ */
|
|
1316
|
+
return !t && v(l == null ? void 0 : l.className) ? /* @__PURE__ */ i(C, { inBuilder: n }) : y.createElement(r || "ul", { ...o, ...l }, t);
|
|
1311
1317
|
}, ct = {
|
|
1312
1318
|
type: "List",
|
|
1313
1319
|
description: "A list component",
|
|
1314
1320
|
label: "List",
|
|
1315
|
-
icon:
|
|
1321
|
+
icon: j,
|
|
1316
1322
|
category: "core",
|
|
1317
1323
|
group: "basic",
|
|
1318
|
-
...
|
|
1324
|
+
...d({
|
|
1319
1325
|
properties: {
|
|
1320
1326
|
styles: u("")
|
|
1321
1327
|
}
|
|
@@ -1345,21 +1351,21 @@ const F = (e, ...o) => ({
|
|
|
1345
1351
|
content: "Item 3"
|
|
1346
1352
|
}
|
|
1347
1353
|
]
|
|
1348
|
-
},
|
|
1354
|
+
}, pt = (e) => {
|
|
1349
1355
|
const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
|
|
1350
1356
|
return r ? y.createElement(n || "li", { ...l, ...o }, r) : y.createElement(n || "li", {
|
|
1351
1357
|
...l,
|
|
1352
1358
|
...o,
|
|
1353
1359
|
dangerouslySetInnerHTML: { __html: t }
|
|
1354
1360
|
});
|
|
1355
|
-
},
|
|
1361
|
+
}, dt = {
|
|
1356
1362
|
type: "ListItem",
|
|
1357
1363
|
description: "A list item component",
|
|
1358
1364
|
label: "List Item",
|
|
1359
|
-
icon:
|
|
1365
|
+
icon: ie,
|
|
1360
1366
|
category: "core",
|
|
1361
1367
|
group: "basic",
|
|
1362
|
-
...
|
|
1368
|
+
...d({
|
|
1363
1369
|
properties: {
|
|
1364
1370
|
styles: u(""),
|
|
1365
1371
|
content: {
|
|
@@ -1378,26 +1384,32 @@ const F = (e, ...o) => ({
|
|
|
1378
1384
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1379
1385
|
}, ut = (e) => {
|
|
1380
1386
|
const { blockProps: o, styles: t, content: l } = e;
|
|
1381
|
-
|
|
1382
|
-
|
|
1387
|
+
if (!ye(e.children)) return y.createElement("p", { ...t, ...o }, e.children);
|
|
1388
|
+
const r = P(
|
|
1389
|
+
t,
|
|
1390
|
+
"prose 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",
|
|
1391
|
+
"max-w-full"
|
|
1392
|
+
);
|
|
1393
|
+
return y.createElement("p", {
|
|
1394
|
+
...r,
|
|
1383
1395
|
...o,
|
|
1384
1396
|
dangerouslySetInnerHTML: { __html: l }
|
|
1385
|
-
})
|
|
1397
|
+
});
|
|
1386
1398
|
}, mt = {
|
|
1387
1399
|
type: "Paragraph",
|
|
1388
1400
|
description: "A paragraph component",
|
|
1389
1401
|
label: "Paragraph",
|
|
1390
1402
|
category: "core",
|
|
1391
|
-
icon:
|
|
1403
|
+
icon: ae,
|
|
1392
1404
|
group: "typography",
|
|
1393
|
-
...
|
|
1405
|
+
...d({
|
|
1394
1406
|
properties: {
|
|
1395
1407
|
styles: u(""),
|
|
1396
1408
|
content: {
|
|
1397
1409
|
type: "string",
|
|
1398
1410
|
title: "Content",
|
|
1399
1411
|
default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.",
|
|
1400
|
-
ui: { "ui:widget": "
|
|
1412
|
+
ui: { "ui:widget": "richtext", "ui:autosize": !0, "ui:rows": 5 }
|
|
1401
1413
|
}
|
|
1402
1414
|
}
|
|
1403
1415
|
}),
|
|
@@ -1416,7 +1428,7 @@ const F = (e, ...o) => ({
|
|
|
1416
1428
|
"Partial Block - ",
|
|
1417
1429
|
r
|
|
1418
1430
|
] }),
|
|
1419
|
-
/* @__PURE__ */
|
|
1431
|
+
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1420
1432
|
]
|
|
1421
1433
|
}
|
|
1422
1434
|
) : y.createElement("span", { ...o }, l);
|
|
@@ -1424,11 +1436,11 @@ const F = (e, ...o) => ({
|
|
|
1424
1436
|
type: "PartialBlock",
|
|
1425
1437
|
description: "A partial block component",
|
|
1426
1438
|
label: "Partial Block",
|
|
1427
|
-
icon:
|
|
1439
|
+
icon: z,
|
|
1428
1440
|
category: "core",
|
|
1429
1441
|
group: "basic",
|
|
1430
1442
|
hidden: !0,
|
|
1431
|
-
...
|
|
1443
|
+
...d({
|
|
1432
1444
|
properties: {
|
|
1433
1445
|
partialBlockId: {
|
|
1434
1446
|
type: "string",
|
|
@@ -1438,7 +1450,7 @@ const F = (e, ...o) => ({
|
|
|
1438
1450
|
}
|
|
1439
1451
|
}
|
|
1440
1452
|
})
|
|
1441
|
-
},
|
|
1453
|
+
}, S = {
|
|
1442
1454
|
SMALL: {
|
|
1443
1455
|
1: "col-span-1",
|
|
1444
1456
|
2: "col-span-2",
|
|
@@ -1482,13 +1494,13 @@ const F = (e, ...o) => ({
|
|
|
1482
1494
|
12: "lg:col-span-12"
|
|
1483
1495
|
}
|
|
1484
1496
|
}, bt = (e) => {
|
|
1485
|
-
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan:
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
n ?
|
|
1489
|
-
|
|
1497
|
+
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: a } = e, c = { className: [
|
|
1498
|
+
k(l, "className", ""),
|
|
1499
|
+
k(S, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1500
|
+
n ? k(S, ["MEDIUM", n || r], "") : "",
|
|
1501
|
+
a ? k(S, ["LARGE", n || r], "") : ""
|
|
1490
1502
|
].join(" ") };
|
|
1491
|
-
return /* @__PURE__ */
|
|
1503
|
+
return /* @__PURE__ */ i("div", { ...o, ...l, ...c, children: t || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1492
1504
|
}, ft = {
|
|
1493
1505
|
type: "Column",
|
|
1494
1506
|
description: "A column component",
|
|
@@ -1500,7 +1512,7 @@ const F = (e, ...o) => ({
|
|
|
1500
1512
|
canDelete: () => !0,
|
|
1501
1513
|
canAcceptBlock: () => !0,
|
|
1502
1514
|
canBeNested: (e) => e === "Row",
|
|
1503
|
-
...
|
|
1515
|
+
...d({
|
|
1504
1516
|
properties: {
|
|
1505
1517
|
styles: u(""),
|
|
1506
1518
|
colSpan: {
|
|
@@ -1526,14 +1538,14 @@ const F = (e, ...o) => ({
|
|
|
1526
1538
|
}
|
|
1527
1539
|
})
|
|
1528
1540
|
}, ht = (e) => {
|
|
1529
|
-
const { blockProps: o, children: t, styles: l, gutter: r } = e,
|
|
1530
|
-
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` :
|
|
1531
|
-
},
|
|
1541
|
+
const { blockProps: o, children: t, styles: l, gutter: r } = e, a = { className: [k(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1542
|
+
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : a.style = { gap: `${r}px` }, /* @__PURE__ */ i("div", { ...o, ...l, ...a, children: t });
|
|
1543
|
+
}, kt = {
|
|
1532
1544
|
type: "Row",
|
|
1533
1545
|
description: "A row component",
|
|
1534
1546
|
label: "Row",
|
|
1535
1547
|
group: "basic",
|
|
1536
|
-
icon:
|
|
1548
|
+
icon: j,
|
|
1537
1549
|
blocks: () => [
|
|
1538
1550
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1539
1551
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1542,7 +1554,7 @@ const F = (e, ...o) => ({
|
|
|
1542
1554
|
category: "core",
|
|
1543
1555
|
wrapper: !0,
|
|
1544
1556
|
canAcceptBlock: (e) => e === "Column",
|
|
1545
|
-
...
|
|
1557
|
+
...d({
|
|
1546
1558
|
properties: {
|
|
1547
1559
|
styles: u(""),
|
|
1548
1560
|
colCount: {
|
|
@@ -1559,13 +1571,13 @@ const F = (e, ...o) => ({
|
|
|
1559
1571
|
}
|
|
1560
1572
|
}
|
|
1561
1573
|
})
|
|
1562
|
-
},
|
|
1563
|
-
const { blockProps: o, content: t, styles: l } = e, r =
|
|
1574
|
+
}, xt = (e) => {
|
|
1575
|
+
const { blockProps: o, content: t, styles: l } = e, r = P(
|
|
1564
1576
|
l,
|
|
1565
|
-
"prose
|
|
1577
|
+
"prose 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
1578
|
"max-w-full"
|
|
1567
1579
|
);
|
|
1568
|
-
return /* @__PURE__ */
|
|
1580
|
+
return /* @__PURE__ */ i("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
|
|
1569
1581
|
}, wt = {
|
|
1570
1582
|
type: "RichText",
|
|
1571
1583
|
description: "A rich text block",
|
|
@@ -1573,7 +1585,7 @@ const F = (e, ...o) => ({
|
|
|
1573
1585
|
category: "core",
|
|
1574
1586
|
icon: ce,
|
|
1575
1587
|
group: "typography",
|
|
1576
|
-
...
|
|
1588
|
+
...d({
|
|
1577
1589
|
properties: {
|
|
1578
1590
|
styles: u(""),
|
|
1579
1591
|
content: {
|
|
@@ -1588,8 +1600,14 @@ const F = (e, ...o) => ({
|
|
|
1588
1600
|
i18nProps: ["content"]
|
|
1589
1601
|
}, vt = (e) => {
|
|
1590
1602
|
const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
|
|
1591
|
-
|
|
1592
|
-
|
|
1603
|
+
if (r) return y.createElement("span", { ...t, ...o }, r);
|
|
1604
|
+
const a = P(
|
|
1605
|
+
t,
|
|
1606
|
+
"prose 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",
|
|
1607
|
+
"max-w-full"
|
|
1608
|
+
);
|
|
1609
|
+
return y.createElement(n || "span", {
|
|
1610
|
+
...a,
|
|
1593
1611
|
...o,
|
|
1594
1612
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1595
1613
|
});
|
|
@@ -1599,29 +1617,29 @@ const F = (e, ...o) => ({
|
|
|
1599
1617
|
label: "Span",
|
|
1600
1618
|
category: "core",
|
|
1601
1619
|
group: "typography",
|
|
1602
|
-
...
|
|
1620
|
+
...d({
|
|
1603
1621
|
properties: {
|
|
1604
1622
|
styles: u(""),
|
|
1605
1623
|
content: {
|
|
1606
1624
|
type: "string",
|
|
1607
1625
|
title: "Content",
|
|
1608
1626
|
default: "",
|
|
1609
|
-
ui: { "ui:widget": "
|
|
1627
|
+
ui: { "ui:widget": "richtext", "ui:autosize": !0, "ui:rows": 3 }
|
|
1610
1628
|
}
|
|
1611
1629
|
}
|
|
1612
1630
|
}),
|
|
1613
1631
|
aiProps: ["content"],
|
|
1614
1632
|
i18nProps: ["content"],
|
|
1615
1633
|
canAcceptBlock: () => !0
|
|
1616
|
-
}, It = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */
|
|
1634
|
+
}, It = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Pt = {
|
|
1617
1635
|
type: "Text",
|
|
1618
1636
|
description: "A text component with no styling",
|
|
1619
1637
|
label: "Text",
|
|
1620
1638
|
hidden: !0,
|
|
1621
1639
|
category: "core",
|
|
1622
1640
|
group: "typography",
|
|
1623
|
-
icon:
|
|
1624
|
-
...
|
|
1641
|
+
icon: pe,
|
|
1642
|
+
...d({
|
|
1625
1643
|
properties: {
|
|
1626
1644
|
styles: u("text-black"),
|
|
1627
1645
|
content: {
|
|
@@ -1633,7 +1651,7 @@ const F = (e, ...o) => ({
|
|
|
1633
1651
|
}),
|
|
1634
1652
|
aiProps: ["content"],
|
|
1635
1653
|
i18nProps: ["content"]
|
|
1636
|
-
},
|
|
1654
|
+
}, N = {
|
|
1637
1655
|
type: "object",
|
|
1638
1656
|
title: "Controls",
|
|
1639
1657
|
default: {
|
|
@@ -1664,61 +1682,61 @@ const F = (e, ...o) => ({
|
|
|
1664
1682
|
default: !1
|
|
1665
1683
|
}
|
|
1666
1684
|
}
|
|
1667
|
-
},
|
|
1668
|
-
const t =
|
|
1669
|
-
if (
|
|
1670
|
-
const
|
|
1671
|
-
if (
|
|
1672
|
-
const s =
|
|
1685
|
+
}, 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) => {
|
|
1686
|
+
const t = k(o, "autoplay", !1), l = k(o, "controls", !1), r = k(o, "loop", !1), n = t || k(o, "muted", !0);
|
|
1687
|
+
if (A.test(e)) {
|
|
1688
|
+
const a = e.match(A);
|
|
1689
|
+
if (a) {
|
|
1690
|
+
const s = a[4];
|
|
1673
1691
|
let c = `https://www.youtube.com/embed/${s}`, m = t ? "autoplay=1" : "";
|
|
1674
1692
|
return m += r ? `&loop=1&playlist=${s}` : "", m += n ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
|
|
1675
1693
|
}
|
|
1676
1694
|
}
|
|
1677
|
-
if (
|
|
1678
|
-
const
|
|
1679
|
-
if (
|
|
1680
|
-
const s =
|
|
1695
|
+
if (M.test(e)) {
|
|
1696
|
+
const a = e.match(M);
|
|
1697
|
+
if (a) {
|
|
1698
|
+
const s = a[1];
|
|
1681
1699
|
let c = "";
|
|
1682
1700
|
return c += t ? "autoplay=1" : "", c += l ? "&controls=1" : "&controls=0", c += n ? "&muted=1" : "", c += r ? "&loop=1" : "", `https://player.vimeo.com/video/${s}?${c}`;
|
|
1683
1701
|
}
|
|
1684
1702
|
}
|
|
1685
1703
|
return null;
|
|
1686
1704
|
}, Bt = (e) => {
|
|
1687
|
-
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder:
|
|
1688
|
-
return /* @__PURE__ */ g("div", { ...
|
|
1689
|
-
!s &&
|
|
1690
|
-
|
|
1705
|
+
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: a } = e, s = Lt(o, r);
|
|
1706
|
+
return /* @__PURE__ */ g("div", { ...V(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1707
|
+
!s && a ? /* @__PURE__ */ i("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__ */ i("iframe", { width: "100%", src: s, ...q(l, "className") }),
|
|
1708
|
+
a && /* @__PURE__ */ i("div", { ...t, className: "absolute top-0 h-full w-full" })
|
|
1691
1709
|
] });
|
|
1692
1710
|
}, St = (e) => {
|
|
1693
|
-
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps:
|
|
1711
|
+
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: a } = e;
|
|
1694
1712
|
let s = n;
|
|
1695
|
-
const c = [...
|
|
1713
|
+
const c = [...k(r, "srcsets", []) || []];
|
|
1696
1714
|
o && typeof o == "string" && c.push({ url: o, width: "9999" });
|
|
1697
|
-
const m = c.sort((b,
|
|
1715
|
+
const m = c.sort((b, x) => parseInt(b.width) - parseInt(x.width)).filter((b) => !v(b.url) && !v(b.width));
|
|
1698
1716
|
m.length === 0 && !s && (s = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1699
|
-
const h =
|
|
1700
|
-
return (s || !v(m)) && /* @__PURE__ */
|
|
1717
|
+
const h = k(l, "autoplay", !1) || k(l, "muted", !0);
|
|
1718
|
+
return (s || !v(m)) && /* @__PURE__ */ i("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
|
|
1701
1719
|
"video",
|
|
1702
1720
|
{
|
|
1703
1721
|
...t,
|
|
1704
|
-
...
|
|
1722
|
+
...a,
|
|
1705
1723
|
key: JSON.stringify(m),
|
|
1706
|
-
controls:
|
|
1707
|
-
autoPlay:
|
|
1708
|
-
loop:
|
|
1724
|
+
controls: k(l, "controls", !1),
|
|
1725
|
+
autoPlay: k(l, "autoplay", !1),
|
|
1726
|
+
loop: k(l, "loop", !1),
|
|
1709
1727
|
poster: s,
|
|
1710
1728
|
...h ? { muted: !0 } : {}
|
|
1711
1729
|
},
|
|
1712
1730
|
m.map((b) => {
|
|
1713
1731
|
if (!b.url || b.url.length < 4 || isNaN(b.width)) return null;
|
|
1714
|
-
const
|
|
1715
|
-
return /* @__PURE__ */
|
|
1732
|
+
const x = `(max-width: ${b.width}px)`;
|
|
1733
|
+
return /* @__PURE__ */ i("source", { src: b.url, media: x, type: b.type }, b.url);
|
|
1716
1734
|
}),
|
|
1717
1735
|
"Your browser does not support the video tag."
|
|
1718
1736
|
) });
|
|
1719
1737
|
}, Nt = (e) => {
|
|
1720
1738
|
const { videoSource: o } = e;
|
|
1721
|
-
return o === "Custom" ? /* @__PURE__ */
|
|
1739
|
+
return o === "Custom" ? /* @__PURE__ */ i(St, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ i(Bt, { ...e }) : /* @__PURE__ */ g("div", { children: [
|
|
1722
1740
|
"Invalid video source : ",
|
|
1723
1741
|
o
|
|
1724
1742
|
] });
|
|
@@ -1726,9 +1744,9 @@ const F = (e, ...o) => ({
|
|
|
1726
1744
|
type: "Video",
|
|
1727
1745
|
label: "Video",
|
|
1728
1746
|
category: "core",
|
|
1729
|
-
icon:
|
|
1747
|
+
icon: de,
|
|
1730
1748
|
group: "media",
|
|
1731
|
-
...
|
|
1749
|
+
...d({
|
|
1732
1750
|
properties: {
|
|
1733
1751
|
styles: u("absolute h-full w-full object-cover"),
|
|
1734
1752
|
videoSource: {
|
|
@@ -1761,7 +1779,7 @@ const F = (e, ...o) => ({
|
|
|
1761
1779
|
type: "object",
|
|
1762
1780
|
default: { srcsets: [] }
|
|
1763
1781
|
},
|
|
1764
|
-
controls: { ...
|
|
1782
|
+
controls: { ...N }
|
|
1765
1783
|
}
|
|
1766
1784
|
}
|
|
1767
1785
|
},
|
|
@@ -1778,7 +1796,7 @@ const F = (e, ...o) => ({
|
|
|
1778
1796
|
title: "Youtube Video URL",
|
|
1779
1797
|
default: ""
|
|
1780
1798
|
},
|
|
1781
|
-
controls: { ...
|
|
1799
|
+
controls: { ...N }
|
|
1782
1800
|
}
|
|
1783
1801
|
}
|
|
1784
1802
|
},
|
|
@@ -1795,7 +1813,7 @@ const F = (e, ...o) => ({
|
|
|
1795
1813
|
title: "Vimeo Video URL",
|
|
1796
1814
|
default: ""
|
|
1797
1815
|
},
|
|
1798
|
-
controls: { ...
|
|
1816
|
+
controls: { ...N }
|
|
1799
1817
|
}
|
|
1800
1818
|
}
|
|
1801
1819
|
}
|
|
@@ -1808,49 +1826,57 @@ const F = (e, ...o) => ({
|
|
|
1808
1826
|
}),
|
|
1809
1827
|
i18nProps: ["url"]
|
|
1810
1828
|
}, Tt = (e) => {
|
|
1811
|
-
const {
|
|
1812
|
-
return /* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */
|
|
1829
|
+
const { paginationStyles: o } = e, t = F("Pagination");
|
|
1830
|
+
return /* @__PURE__ */ i("div", { ...o, children: t ? y.createElement(t.component, { ...V(e, ["paginationStyles"]), blockProps: {} }) : /* @__PURE__ */ g(_, { children: [
|
|
1831
|
+
/* @__PURE__ */ i(
|
|
1814
1832
|
"button",
|
|
1815
1833
|
{
|
|
1816
1834
|
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
1835
|
disabled: !0,
|
|
1818
|
-
children: /* @__PURE__ */
|
|
1836
|
+
children: /* @__PURE__ */ i(ue, { className: "h-4 w-4" })
|
|
1819
1837
|
}
|
|
1820
1838
|
),
|
|
1821
|
-
/* @__PURE__ */
|
|
1822
|
-
/* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
/* @__PURE__ */
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ i("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" }),
|
|
1840
|
+
/* @__PURE__ */ i("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" }),
|
|
1841
|
+
/* @__PURE__ */ i("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" }),
|
|
1842
|
+
/* @__PURE__ */ i("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" }),
|
|
1843
|
+
/* @__PURE__ */ i("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" }),
|
|
1844
|
+
/* @__PURE__ */ i("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__ */ i(me, { className: "h-4 w-4" }) })
|
|
1827
1845
|
] }) });
|
|
1828
1846
|
}, Rt = (e) => {
|
|
1829
|
-
const { children: o, tag: t, styles: l, blockProps: r, $loading: n } = e, { pagination:
|
|
1847
|
+
const { children: o, tag: t, styles: l, blockProps: r, $loading: n } = e, { pagination: a, inBuilder: s } = e;
|
|
1830
1848
|
let c = o;
|
|
1831
|
-
return v(c) && s && (c = /* @__PURE__ */
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
/* @__PURE__ */
|
|
1834
|
-
] }, h)) : c : /* @__PURE__ */ g(
|
|
1849
|
+
return v(c) && s && (c = /* @__PURE__ */ i("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 && s ? Array.from({ length: 2 }).map((m, h) => /* @__PURE__ */ g("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1850
|
+
/* @__PURE__ */ i("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1851
|
+
/* @__PURE__ */ i("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1852
|
+
] }, h)) : c : /* @__PURE__ */ g(_, { children: [
|
|
1835
1853
|
y.createElement(
|
|
1836
1854
|
t,
|
|
1837
1855
|
{ ...r, ...l },
|
|
1838
1856
|
n && s ? Array.from({ length: 2 }).map((m, h) => /* @__PURE__ */ g("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1839
|
-
/* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
1857
|
+
/* @__PURE__ */ i("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1858
|
+
/* @__PURE__ */ i("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1841
1859
|
] }, h)) : c
|
|
1842
1860
|
),
|
|
1843
|
-
|
|
1861
|
+
a && /* @__PURE__ */ i(
|
|
1844
1862
|
Tt,
|
|
1845
1863
|
{
|
|
1846
|
-
...
|
|
1864
|
+
...q(e, [
|
|
1865
|
+
"limit",
|
|
1866
|
+
"totalItems",
|
|
1867
|
+
"paginationStrategy",
|
|
1868
|
+
"inBuilder",
|
|
1869
|
+
"draft",
|
|
1870
|
+
"lang",
|
|
1871
|
+
"paginationStyles"
|
|
1872
|
+
])
|
|
1847
1873
|
}
|
|
1848
1874
|
)
|
|
1849
1875
|
] });
|
|
1850
1876
|
}, At = {
|
|
1851
1877
|
type: "Repeater",
|
|
1852
1878
|
label: "Repeater",
|
|
1853
|
-
icon:
|
|
1879
|
+
icon: D,
|
|
1854
1880
|
group: "basic",
|
|
1855
1881
|
dataProviderMode: "live",
|
|
1856
1882
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
@@ -1858,10 +1884,10 @@ const F = (e, ...o) => ({
|
|
|
1858
1884
|
{ _id: "A", _type: "Repeater", tag: "ul" },
|
|
1859
1885
|
{ _id: "B", _name: "Repeater Item", _type: "RepeaterItem", parentTag: "ul", _parent: "A" }
|
|
1860
1886
|
],
|
|
1861
|
-
...
|
|
1887
|
+
...d({
|
|
1862
1888
|
properties: {
|
|
1863
|
-
styles:
|
|
1864
|
-
paginationStyles:
|
|
1889
|
+
styles: B("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
|
|
1890
|
+
paginationStyles: B("flex items-center justify-center gap-2 p-4"),
|
|
1865
1891
|
repeaterItems: {
|
|
1866
1892
|
title: "Collection",
|
|
1867
1893
|
type: "string",
|
|
@@ -1962,18 +1988,18 @@ const F = (e, ...o) => ({
|
|
|
1962
1988
|
return !e && r ? y.createElement(
|
|
1963
1989
|
n,
|
|
1964
1990
|
{ ...o, ...t },
|
|
1965
|
-
/* @__PURE__ */
|
|
1991
|
+
/* @__PURE__ */ i("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" })
|
|
1966
1992
|
) : y.createElement(n, { ...o, ...t }, e);
|
|
1967
1993
|
}, Et = {
|
|
1968
1994
|
type: "RepeaterItem",
|
|
1969
1995
|
label: "Repeater Item",
|
|
1970
|
-
icon:
|
|
1996
|
+
icon: D,
|
|
1971
1997
|
hidden: !0,
|
|
1972
1998
|
group: "basic",
|
|
1973
|
-
...
|
|
1999
|
+
...d({
|
|
1974
2000
|
properties: {
|
|
1975
|
-
styles:
|
|
1976
|
-
parentTag:
|
|
2001
|
+
styles: B(""),
|
|
2002
|
+
parentTag: U("Repeater", "tag")
|
|
1977
2003
|
}
|
|
1978
2004
|
}),
|
|
1979
2005
|
canAcceptBlock: (e) => e !== "RepeaterItem",
|
|
@@ -1989,16 +2015,16 @@ const F = (e, ...o) => ({
|
|
|
1989
2015
|
label: "Empty State",
|
|
1990
2016
|
hidden: !0,
|
|
1991
2017
|
group: "basic",
|
|
1992
|
-
...
|
|
1993
|
-
properties: { styles:
|
|
2018
|
+
...d({
|
|
2019
|
+
properties: { styles: B("p-5 flex items-center justify-center") }
|
|
1994
2020
|
}),
|
|
1995
2021
|
canAcceptBlock: () => !0,
|
|
1996
2022
|
canDelete: () => !1,
|
|
1997
2023
|
canMove: () => !1,
|
|
1998
2024
|
canDuplicate: () => !1
|
|
1999
|
-
},
|
|
2000
|
-
|
|
2025
|
+
}, Ut = () => {
|
|
2026
|
+
p(ge, be), p(Pe, Le), p(fe, he), p(Ge, We), p(ut, mt), p(vt, Ct), p(xt, wt), p(it, at), p(st, ct), p(pt, dt), p(tt, ot), p(rt, nt), p(Nt, _t), p(ke, xe), p(we, ve), p(It, Pt), p(Ne, _e), p(Te, Re), p(Me, Ee), p(Be, Se), p(ze, je), p(De, Ve), p(qe, Fe), p(He, $e), p(Oe, Ye), p(Ce, Ie), p(Ue, Ze), p(yt, gt), p(ht, kt), p(bt, ft), p(Rt, At), p(Mt, Et), p(Ht, $t);
|
|
2001
2027
|
};
|
|
2002
2028
|
export {
|
|
2003
|
-
|
|
2029
|
+
Ut as loadWebBlocks
|
|
2004
2030
|
};
|