@chaibuilder/sdk 3.0.9 → 3.0.11
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-B0CX8mDS.js +641 -0
- package/dist/apply-binding-DSgP62np.cjs +1 -0
- package/dist/core.cjs +3 -3
- package/dist/core.js +797 -697
- package/dist/render.cjs +2 -2
- package/dist/render.js +72 -69
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +369 -300
- package/package.json +2 -3
- package/dist/apply-binding-HQ9gBNJP.cjs +0 -1
- package/dist/apply-binding-tfi-KyyV.js +0 -573
package/dist/web-blocks.js
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as
|
|
2
|
-
import { jsx as a, jsxs as b, Fragment 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
|
-
backgroundImage: {
|
|
24
|
-
type: "string",
|
|
25
|
-
default: "",
|
|
26
|
-
title: "Background Image",
|
|
27
|
-
ui: { "ui:widget": "image" }
|
|
28
|
-
},
|
|
29
23
|
tag: {
|
|
30
24
|
type: "string",
|
|
31
25
|
default: "div",
|
|
@@ -49,22 +43,28 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
49
43
|
{ const: "figcaption", title: "figcaption" },
|
|
50
44
|
{ const: "mark", title: "mark" }
|
|
51
45
|
]
|
|
46
|
+
},
|
|
47
|
+
backgroundImage: {
|
|
48
|
+
type: "string",
|
|
49
|
+
default: "",
|
|
50
|
+
title: "Background Image",
|
|
51
|
+
ui: { "ui:widget": "image" }
|
|
52
52
|
}
|
|
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: {
|
|
@@ -125,34 +125,34 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
125
125
|
},
|
|
126
126
|
prefetchLink: {
|
|
127
127
|
type: "boolean",
|
|
128
|
-
default: !
|
|
128
|
+
default: !0,
|
|
129
129
|
title: "Prefetch Link"
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}),
|
|
133
|
-
i18nProps: ["content"],
|
|
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
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,7 +221,7 @@ 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
226
|
return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
|
|
227
227
|
/* @__PURE__ */ a("input", { ...n, name: t, type: "checkbox", required: i, defaultChecked: s }),
|
|
@@ -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,7 +343,7 @@ 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
348
|
return /* @__PURE__ */ b("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
|
|
349
349
|
l,
|
|
@@ -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:
|
|
477
|
+
defaultValue: h
|
|
478
|
+
} = e, { type: y, autocomplete: k } = Ae(m);
|
|
479
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,7 +643,7 @@ 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
648
|
return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
|
|
649
649
|
/* @__PURE__ */ a("input", { ...n, name: t, type: "radio", required: i, defaultChecked: s }),
|
|
@@ -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,9 +710,9 @@ 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,
|
|
713
|
+
options: h,
|
|
714
|
+
defaultValue: y
|
|
715
|
+
} = e, k = m && y ? y.split(",").map((f) => f.trim()) : y || "";
|
|
716
716
|
return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
|
|
717
717
|
c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
718
718
|
/* @__PURE__ */ b(
|
|
@@ -722,10 +722,10 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
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
|
)
|
|
@@ -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
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,8 +813,8 @@ 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:
|
|
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
818
|
return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
|
|
819
819
|
c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
820
820
|
/* @__PURE__ */ a(
|
|
@@ -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,7 +892,7 @@ 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
897
|
return t && !r ? /* @__PURE__ */ b(
|
|
898
898
|
"div",
|
|
@@ -907,16 +907,16 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
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
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 } = e;
|
|
1168
|
-
return
|
|
1169
|
-
l && /* @__PURE__ */ a("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
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,41 +1180,30 @@ 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
|
-
alt: {
|
|
1200
|
-
type: "string",
|
|
1201
|
-
title: "Alt text",
|
|
1202
|
-
default: "",
|
|
1203
|
-
ui: { "ui:placeholder": "Enter alt text" }
|
|
1204
|
-
},
|
|
1205
|
-
lazyLoading: {
|
|
1206
|
-
type: "boolean",
|
|
1207
|
-
title: "Lazy Load",
|
|
1208
|
-
default: !0
|
|
1209
|
-
},
|
|
1210
1199
|
width: {
|
|
1211
|
-
type: "
|
|
1200
|
+
type: "string",
|
|
1212
1201
|
title: "Width",
|
|
1213
1202
|
default: "",
|
|
1214
1203
|
ui: { "ui:placeholder": "Enter width" }
|
|
1215
1204
|
},
|
|
1216
1205
|
height: {
|
|
1217
|
-
type: "
|
|
1206
|
+
type: "string",
|
|
1218
1207
|
title: "Height",
|
|
1219
1208
|
default: "",
|
|
1220
1209
|
ui: { "ui:placeholder": "Enter height" }
|
|
@@ -1224,15 +1213,38 @@ const D = (e, ...o) => ({
|
|
|
1224
1213
|
title: "Mobile Image",
|
|
1225
1214
|
default: "",
|
|
1226
1215
|
ui: { "ui:widget": "image" }
|
|
1216
|
+
},
|
|
1217
|
+
mobileWidth: {
|
|
1218
|
+
type: "string",
|
|
1219
|
+
title: "Mobile Width",
|
|
1220
|
+
default: "",
|
|
1221
|
+
ui: { "ui:placeholder": "Enter width" }
|
|
1222
|
+
},
|
|
1223
|
+
mobileHeight: {
|
|
1224
|
+
type: "string",
|
|
1225
|
+
title: "Mobile Height",
|
|
1226
|
+
default: "",
|
|
1227
|
+
ui: { "ui:placeholder": "Enter height" }
|
|
1228
|
+
},
|
|
1229
|
+
alt: {
|
|
1230
|
+
type: "string",
|
|
1231
|
+
title: "Alt text",
|
|
1232
|
+
default: "",
|
|
1233
|
+
ui: { "ui:placeholder": "Enter alt text" }
|
|
1234
|
+
},
|
|
1235
|
+
lazyLoading: {
|
|
1236
|
+
type: "boolean",
|
|
1237
|
+
title: "Lazy Load",
|
|
1238
|
+
default: !0
|
|
1227
1239
|
}
|
|
1228
1240
|
}
|
|
1229
1241
|
}),
|
|
1230
1242
|
aiProps: ["alt"],
|
|
1231
1243
|
i18nProps: ["alt", "image", "_imageId", "mobileImage", "_mobileImageId"]
|
|
1232
|
-
},
|
|
1244
|
+
}, at = (e) => {
|
|
1233
1245
|
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1234
1246
|
let s = {};
|
|
1235
|
-
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(
|
|
1236
1248
|
"span",
|
|
1237
1249
|
{
|
|
1238
1250
|
...o,
|
|
@@ -1252,14 +1264,14 @@ const D = (e, ...o) => ({
|
|
|
1252
1264
|
},
|
|
1253
1265
|
i
|
|
1254
1266
|
);
|
|
1255
|
-
},
|
|
1267
|
+
}, it = {
|
|
1256
1268
|
type: "Link",
|
|
1257
1269
|
description: "A link component",
|
|
1258
1270
|
label: "Link",
|
|
1259
1271
|
category: "core",
|
|
1260
|
-
icon:
|
|
1272
|
+
icon: le,
|
|
1261
1273
|
group: "basic",
|
|
1262
|
-
...
|
|
1274
|
+
...p({
|
|
1263
1275
|
properties: {
|
|
1264
1276
|
styles: u(""),
|
|
1265
1277
|
content: {
|
|
@@ -1291,19 +1303,19 @@ const D = (e, ...o) => ({
|
|
|
1291
1303
|
}
|
|
1292
1304
|
}),
|
|
1293
1305
|
aiProps: ["content"],
|
|
1294
|
-
i18nProps: ["content"],
|
|
1306
|
+
i18nProps: ["content", "link"],
|
|
1295
1307
|
canAcceptBlock: (e) => e !== "Link"
|
|
1296
|
-
},
|
|
1308
|
+
}, st = (e) => {
|
|
1297
1309
|
const { blockProps: o, children: t, styles: l, tag: r, inBuilder: n } = e;
|
|
1298
|
-
return !t &&
|
|
1299
|
-
},
|
|
1310
|
+
return !t && v(l == null ? void 0 : l.className) ? /* @__PURE__ */ a(C, { inBuilder: n }) : g.createElement(r || "ul", { ...o, ...l }, t);
|
|
1311
|
+
}, ct = {
|
|
1300
1312
|
type: "List",
|
|
1301
1313
|
description: "A list component",
|
|
1302
1314
|
label: "List",
|
|
1303
|
-
icon:
|
|
1315
|
+
icon: z,
|
|
1304
1316
|
category: "core",
|
|
1305
1317
|
group: "basic",
|
|
1306
|
-
...
|
|
1318
|
+
...p({
|
|
1307
1319
|
properties: {
|
|
1308
1320
|
styles: u("")
|
|
1309
1321
|
}
|
|
@@ -1333,21 +1345,21 @@ const D = (e, ...o) => ({
|
|
|
1333
1345
|
content: "Item 3"
|
|
1334
1346
|
}
|
|
1335
1347
|
]
|
|
1336
|
-
},
|
|
1348
|
+
}, dt = (e) => {
|
|
1337
1349
|
const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
|
|
1338
|
-
return r ?
|
|
1350
|
+
return r ? g.createElement(n || "li", { ...l, ...o }, r) : g.createElement(n || "li", {
|
|
1339
1351
|
...l,
|
|
1340
1352
|
...o,
|
|
1341
1353
|
dangerouslySetInnerHTML: { __html: t }
|
|
1342
1354
|
});
|
|
1343
|
-
},
|
|
1355
|
+
}, pt = {
|
|
1344
1356
|
type: "ListItem",
|
|
1345
1357
|
description: "A list item component",
|
|
1346
1358
|
label: "List Item",
|
|
1347
|
-
icon:
|
|
1359
|
+
icon: re,
|
|
1348
1360
|
category: "core",
|
|
1349
1361
|
group: "basic",
|
|
1350
|
-
...
|
|
1362
|
+
...p({
|
|
1351
1363
|
properties: {
|
|
1352
1364
|
styles: u(""),
|
|
1353
1365
|
content: {
|
|
@@ -1364,21 +1376,21 @@ const D = (e, ...o) => ({
|
|
|
1364
1376
|
aiProps: ["content"],
|
|
1365
1377
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1366
1378
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1367
|
-
},
|
|
1379
|
+
}, ut = (e) => {
|
|
1368
1380
|
const { blockProps: o, styles: t, content: l } = e;
|
|
1369
|
-
return
|
|
1381
|
+
return ue(e.children) ? g.createElement("p", {
|
|
1370
1382
|
...t,
|
|
1371
1383
|
...o,
|
|
1372
1384
|
dangerouslySetInnerHTML: { __html: l }
|
|
1373
|
-
}) :
|
|
1374
|
-
},
|
|
1385
|
+
}) : g.createElement("p", { ...t, ...o }, e.children);
|
|
1386
|
+
}, mt = {
|
|
1375
1387
|
type: "Paragraph",
|
|
1376
1388
|
description: "A paragraph component",
|
|
1377
1389
|
label: "Paragraph",
|
|
1378
1390
|
category: "core",
|
|
1379
|
-
icon:
|
|
1391
|
+
icon: ne,
|
|
1380
1392
|
group: "typography",
|
|
1381
|
-
...
|
|
1393
|
+
...p({
|
|
1382
1394
|
properties: {
|
|
1383
1395
|
styles: u(""),
|
|
1384
1396
|
content: {
|
|
@@ -1392,7 +1404,7 @@ const D = (e, ...o) => ({
|
|
|
1392
1404
|
i18nProps: ["content"],
|
|
1393
1405
|
aiProps: ["content"],
|
|
1394
1406
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1395
|
-
},
|
|
1407
|
+
}, yt = (e) => {
|
|
1396
1408
|
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
1397
1409
|
return t && !r ? /* @__PURE__ */ b(
|
|
1398
1410
|
"div",
|
|
@@ -1407,16 +1419,16 @@ const D = (e, ...o) => ({
|
|
|
1407
1419
|
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1408
1420
|
]
|
|
1409
1421
|
}
|
|
1410
|
-
) :
|
|
1411
|
-
},
|
|
1422
|
+
) : g.createElement("span", { ...o }, l);
|
|
1423
|
+
}, gt = {
|
|
1412
1424
|
type: "PartialBlock",
|
|
1413
1425
|
description: "A partial block component",
|
|
1414
1426
|
label: "Partial Block",
|
|
1415
|
-
icon:
|
|
1427
|
+
icon: $,
|
|
1416
1428
|
category: "core",
|
|
1417
1429
|
group: "basic",
|
|
1418
1430
|
hidden: !0,
|
|
1419
|
-
...
|
|
1431
|
+
...p({
|
|
1420
1432
|
properties: {
|
|
1421
1433
|
partialBlockId: {
|
|
1422
1434
|
type: "string",
|
|
@@ -1426,7 +1438,7 @@ const D = (e, ...o) => ({
|
|
|
1426
1438
|
}
|
|
1427
1439
|
}
|
|
1428
1440
|
})
|
|
1429
|
-
},
|
|
1441
|
+
}, B = {
|
|
1430
1442
|
SMALL: {
|
|
1431
1443
|
1: "col-span-1",
|
|
1432
1444
|
2: "col-span-2",
|
|
@@ -1469,26 +1481,26 @@ const D = (e, ...o) => ({
|
|
|
1469
1481
|
11: "lg:col-span-11",
|
|
1470
1482
|
12: "lg:col-span-12"
|
|
1471
1483
|
}
|
|
1472
|
-
},
|
|
1484
|
+
}, bt = (e) => {
|
|
1473
1485
|
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
n ?
|
|
1477
|
-
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], "") : ""
|
|
1478
1490
|
].join(" ") };
|
|
1479
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" }) });
|
|
1480
|
-
},
|
|
1492
|
+
}, ft = {
|
|
1481
1493
|
type: "Column",
|
|
1482
1494
|
description: "A column component",
|
|
1483
1495
|
label: "Column",
|
|
1484
1496
|
group: "basic",
|
|
1485
1497
|
category: "core",
|
|
1486
|
-
icon:
|
|
1498
|
+
icon: ae,
|
|
1487
1499
|
wrapper: !0,
|
|
1488
1500
|
canDelete: () => !0,
|
|
1489
1501
|
canAcceptBlock: () => !0,
|
|
1490
1502
|
canBeNested: (e) => e === "Row",
|
|
1491
|
-
...
|
|
1503
|
+
...p({
|
|
1492
1504
|
properties: {
|
|
1493
1505
|
styles: u(""),
|
|
1494
1506
|
colSpan: {
|
|
@@ -1513,15 +1525,15 @@ const D = (e, ...o) => ({
|
|
|
1513
1525
|
}
|
|
1514
1526
|
}
|
|
1515
1527
|
})
|
|
1516
|
-
},
|
|
1517
|
-
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() };
|
|
1518
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 });
|
|
1519
|
-
},
|
|
1531
|
+
}, xt = {
|
|
1520
1532
|
type: "Row",
|
|
1521
1533
|
description: "A row component",
|
|
1522
1534
|
label: "Row",
|
|
1523
1535
|
group: "basic",
|
|
1524
|
-
icon:
|
|
1536
|
+
icon: z,
|
|
1525
1537
|
blocks: () => [
|
|
1526
1538
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1527
1539
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1530,7 +1542,7 @@ const D = (e, ...o) => ({
|
|
|
1530
1542
|
category: "core",
|
|
1531
1543
|
wrapper: !0,
|
|
1532
1544
|
canAcceptBlock: (e) => e === "Column",
|
|
1533
|
-
...
|
|
1545
|
+
...p({
|
|
1534
1546
|
properties: {
|
|
1535
1547
|
styles: u(""),
|
|
1536
1548
|
colCount: {
|
|
@@ -1547,21 +1559,21 @@ const D = (e, ...o) => ({
|
|
|
1547
1559
|
}
|
|
1548
1560
|
}
|
|
1549
1561
|
})
|
|
1550
|
-
},
|
|
1562
|
+
}, kt = (e) => {
|
|
1551
1563
|
const { blockProps: o, content: t, styles: l } = e, r = D(
|
|
1552
1564
|
l,
|
|
1553
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",
|
|
1554
1566
|
"max-w-full"
|
|
1555
1567
|
);
|
|
1556
1568
|
return /* @__PURE__ */ a("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
|
|
1557
|
-
},
|
|
1569
|
+
}, wt = {
|
|
1558
1570
|
type: "RichText",
|
|
1559
1571
|
description: "A rich text block",
|
|
1560
1572
|
label: "Rich Text",
|
|
1561
1573
|
category: "core",
|
|
1562
|
-
icon:
|
|
1574
|
+
icon: ie,
|
|
1563
1575
|
group: "typography",
|
|
1564
|
-
...
|
|
1576
|
+
...p({
|
|
1565
1577
|
properties: {
|
|
1566
1578
|
styles: u(""),
|
|
1567
1579
|
content: {
|
|
@@ -1574,20 +1586,20 @@ const D = (e, ...o) => ({
|
|
|
1574
1586
|
}),
|
|
1575
1587
|
aiProps: ["content"],
|
|
1576
1588
|
i18nProps: ["content"]
|
|
1577
|
-
},
|
|
1589
|
+
}, vt = (e) => {
|
|
1578
1590
|
const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
|
|
1579
|
-
return r ?
|
|
1591
|
+
return r ? g.createElement("span", { ...t, ...o }, r) : g.createElement(n || "span", {
|
|
1580
1592
|
...t,
|
|
1581
1593
|
...o,
|
|
1582
1594
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1583
1595
|
});
|
|
1584
|
-
},
|
|
1596
|
+
}, Ct = {
|
|
1585
1597
|
type: "Span",
|
|
1586
1598
|
description: "A span component",
|
|
1587
1599
|
label: "Span",
|
|
1588
1600
|
category: "core",
|
|
1589
1601
|
group: "typography",
|
|
1590
|
-
...
|
|
1602
|
+
...p({
|
|
1591
1603
|
properties: {
|
|
1592
1604
|
styles: u(""),
|
|
1593
1605
|
content: {
|
|
@@ -1601,15 +1613,15 @@ const D = (e, ...o) => ({
|
|
|
1601
1613
|
aiProps: ["content"],
|
|
1602
1614
|
i18nProps: ["content"],
|
|
1603
1615
|
canAcceptBlock: () => !0
|
|
1604
|
-
},
|
|
1616
|
+
}, It = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ a("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Pt = {
|
|
1605
1617
|
type: "Text",
|
|
1606
1618
|
description: "A text component with no styling",
|
|
1607
1619
|
label: "Text",
|
|
1608
1620
|
hidden: !0,
|
|
1609
1621
|
category: "core",
|
|
1610
1622
|
group: "typography",
|
|
1611
|
-
icon:
|
|
1612
|
-
...
|
|
1623
|
+
icon: se,
|
|
1624
|
+
...p({
|
|
1613
1625
|
properties: {
|
|
1614
1626
|
styles: u("text-black"),
|
|
1615
1627
|
content: {
|
|
@@ -1621,7 +1633,7 @@ const D = (e, ...o) => ({
|
|
|
1621
1633
|
}),
|
|
1622
1634
|
aiProps: ["content"],
|
|
1623
1635
|
i18nProps: ["content"]
|
|
1624
|
-
},
|
|
1636
|
+
}, S = {
|
|
1625
1637
|
type: "object",
|
|
1626
1638
|
title: "Controls",
|
|
1627
1639
|
default: {
|
|
@@ -1652,18 +1664,18 @@ const D = (e, ...o) => ({
|
|
|
1652
1664
|
default: !1
|
|
1653
1665
|
}
|
|
1654
1666
|
}
|
|
1655
|
-
},
|
|
1656
|
-
const t =
|
|
1657
|
-
if (
|
|
1658
|
-
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);
|
|
1659
1671
|
if (i) {
|
|
1660
1672
|
const s = i[4];
|
|
1661
1673
|
let c = `https://www.youtube.com/embed/${s}`, m = t ? "autoplay=1" : "";
|
|
1662
1674
|
return m += r ? `&loop=1&playlist=${s}` : "", m += n ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
|
|
1663
1675
|
}
|
|
1664
1676
|
}
|
|
1665
|
-
if (
|
|
1666
|
-
const i = e.match(
|
|
1677
|
+
if (A.test(e)) {
|
|
1678
|
+
const i = e.match(A);
|
|
1667
1679
|
if (i) {
|
|
1668
1680
|
const s = i[1];
|
|
1669
1681
|
let c = "";
|
|
@@ -1671,52 +1683,52 @@ const D = (e, ...o) => ({
|
|
|
1671
1683
|
}
|
|
1672
1684
|
}
|
|
1673
1685
|
return null;
|
|
1674
|
-
},
|
|
1675
|
-
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, s =
|
|
1676
|
-
return /* @__PURE__ */ b("div", { ...
|
|
1677
|
-
!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") }),
|
|
1678
1690
|
i && /* @__PURE__ */ a("div", { ...t, className: "absolute top-0 h-full w-full" })
|
|
1679
1691
|
] });
|
|
1680
|
-
},
|
|
1692
|
+
}, St = (e) => {
|
|
1681
1693
|
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: i } = e;
|
|
1682
1694
|
let s = n;
|
|
1683
|
-
const c = [...
|
|
1695
|
+
const c = [...x(r, "srcsets", []) || []];
|
|
1684
1696
|
o && typeof o == "string" && c.push({ url: o, width: "9999" });
|
|
1685
|
-
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));
|
|
1686
1698
|
m.length === 0 && !s && (s = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1687
|
-
const
|
|
1688
|
-
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(
|
|
1689
1701
|
"video",
|
|
1690
1702
|
{
|
|
1691
1703
|
...t,
|
|
1692
1704
|
...i,
|
|
1693
1705
|
key: JSON.stringify(m),
|
|
1694
|
-
controls:
|
|
1695
|
-
autoPlay:
|
|
1696
|
-
loop:
|
|
1706
|
+
controls: x(l, "controls", !1),
|
|
1707
|
+
autoPlay: x(l, "autoplay", !1),
|
|
1708
|
+
loop: x(l, "loop", !1),
|
|
1697
1709
|
poster: s,
|
|
1698
|
-
...
|
|
1710
|
+
...h ? { muted: !0 } : {}
|
|
1699
1711
|
},
|
|
1700
|
-
m.map((
|
|
1701
|
-
if (!
|
|
1702
|
-
const
|
|
1703
|
-
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);
|
|
1704
1716
|
}),
|
|
1705
1717
|
"Your browser does not support the video tag."
|
|
1706
1718
|
) });
|
|
1707
|
-
},
|
|
1719
|
+
}, Nt = (e) => {
|
|
1708
1720
|
const { videoSource: o } = e;
|
|
1709
|
-
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: [
|
|
1710
1722
|
"Invalid video source : ",
|
|
1711
1723
|
o
|
|
1712
1724
|
] });
|
|
1713
|
-
},
|
|
1725
|
+
}, _t = {
|
|
1714
1726
|
type: "Video",
|
|
1715
1727
|
label: "Video",
|
|
1716
1728
|
category: "core",
|
|
1717
|
-
icon:
|
|
1729
|
+
icon: ce,
|
|
1718
1730
|
group: "media",
|
|
1719
|
-
...
|
|
1731
|
+
...p({
|
|
1720
1732
|
properties: {
|
|
1721
1733
|
styles: u("absolute h-full w-full object-cover"),
|
|
1722
1734
|
videoSource: {
|
|
@@ -1749,7 +1761,7 @@ const D = (e, ...o) => ({
|
|
|
1749
1761
|
type: "object",
|
|
1750
1762
|
default: { srcsets: [] }
|
|
1751
1763
|
},
|
|
1752
|
-
controls: { ...
|
|
1764
|
+
controls: { ...S }
|
|
1753
1765
|
}
|
|
1754
1766
|
}
|
|
1755
1767
|
},
|
|
@@ -1766,7 +1778,7 @@ const D = (e, ...o) => ({
|
|
|
1766
1778
|
title: "Youtube Video URL",
|
|
1767
1779
|
default: ""
|
|
1768
1780
|
},
|
|
1769
|
-
controls: { ...
|
|
1781
|
+
controls: { ...S }
|
|
1770
1782
|
}
|
|
1771
1783
|
}
|
|
1772
1784
|
},
|
|
@@ -1783,7 +1795,7 @@ const D = (e, ...o) => ({
|
|
|
1783
1795
|
title: "Vimeo Video URL",
|
|
1784
1796
|
default: ""
|
|
1785
1797
|
},
|
|
1786
|
-
controls: { ...
|
|
1798
|
+
controls: { ...S }
|
|
1787
1799
|
}
|
|
1788
1800
|
}
|
|
1789
1801
|
}
|
|
@@ -1795,43 +1807,56 @@ const D = (e, ...o) => ({
|
|
|
1795
1807
|
}
|
|
1796
1808
|
}),
|
|
1797
1809
|
i18nProps: ["url"]
|
|
1798
|
-
},
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1801
|
-
|
|
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: [
|
|
1802
1832
|
/* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1803
1833
|
/* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1804
|
-
] },
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
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 && c && /* @__PURE__ */ a(Tt, { styles: i })
|
|
1844
|
+
] });
|
|
1845
|
+
}, At = {
|
|
1813
1846
|
type: "Repeater",
|
|
1814
1847
|
label: "Repeater",
|
|
1815
|
-
icon:
|
|
1848
|
+
icon: j,
|
|
1816
1849
|
group: "basic",
|
|
1817
1850
|
dataProviderMode: "live",
|
|
1818
1851
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
1819
1852
|
blocks: () => [
|
|
1820
1853
|
{ _id: "A", _type: "Repeater", tag: "ul" },
|
|
1821
1854
|
{ _id: "B", _name: "Repeater Item", _type: "RepeaterItem", parentTag: "ul", _parent: "A" }
|
|
1822
|
-
// { _id: "C", _name: "Empty State", _type: "RepeaterEmptyState", _parent: "A" },
|
|
1823
|
-
// {
|
|
1824
|
-
// _id: "D",
|
|
1825
|
-
// _name: "Empty State Heading",
|
|
1826
|
-
// _type: "Heading",
|
|
1827
|
-
// _parent: "C",
|
|
1828
|
-
// styles: "#styles:,text-2xl text-center",
|
|
1829
|
-
// content: "No items",
|
|
1830
|
-
// },
|
|
1831
1855
|
],
|
|
1832
|
-
...
|
|
1856
|
+
...p({
|
|
1833
1857
|
properties: {
|
|
1834
|
-
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"),
|
|
1835
1860
|
repeaterItems: {
|
|
1836
1861
|
title: "Collection",
|
|
1837
1862
|
type: "string",
|
|
@@ -1848,11 +1873,6 @@ const D = (e, ...o) => ({
|
|
|
1848
1873
|
default: "ul",
|
|
1849
1874
|
enum: ["none", "div", "ul", "ol"]
|
|
1850
1875
|
},
|
|
1851
|
-
limit: {
|
|
1852
|
-
title: "Limit",
|
|
1853
|
-
type: "number",
|
|
1854
|
-
default: 3
|
|
1855
|
-
},
|
|
1856
1876
|
filter: {
|
|
1857
1877
|
title: "Filter by",
|
|
1858
1878
|
type: "string",
|
|
@@ -1864,10 +1884,59 @@ const D = (e, ...o) => ({
|
|
|
1864
1884
|
type: "string",
|
|
1865
1885
|
default: "",
|
|
1866
1886
|
ui: { "ui:widget": "collectionSelect" }
|
|
1887
|
+
},
|
|
1888
|
+
pagination: {
|
|
1889
|
+
title: "Pagination",
|
|
1890
|
+
type: "boolean",
|
|
1891
|
+
default: !1
|
|
1867
1892
|
}
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
|
|
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 = ({
|
|
1871
1940
|
children: e,
|
|
1872
1941
|
blockProps: o,
|
|
1873
1942
|
styles: t,
|
|
@@ -1885,46 +1954,46 @@ const D = (e, ...o) => ({
|
|
|
1885
1954
|
default:
|
|
1886
1955
|
n = "div";
|
|
1887
1956
|
}
|
|
1888
|
-
return !e && r ?
|
|
1957
|
+
return !e && r ? g.createElement(
|
|
1889
1958
|
n,
|
|
1890
1959
|
{ ...o, ...t },
|
|
1891
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" })
|
|
1892
|
-
) :
|
|
1893
|
-
},
|
|
1961
|
+
) : g.createElement(n, { ...o, ...t }, e);
|
|
1962
|
+
}, Et = {
|
|
1894
1963
|
type: "RepeaterItem",
|
|
1895
1964
|
label: "Repeater Item",
|
|
1896
|
-
icon:
|
|
1965
|
+
icon: j,
|
|
1897
1966
|
hidden: !0,
|
|
1898
1967
|
group: "basic",
|
|
1899
|
-
...
|
|
1968
|
+
...p({
|
|
1900
1969
|
properties: {
|
|
1901
|
-
styles:
|
|
1902
|
-
parentTag:
|
|
1970
|
+
styles: L(""),
|
|
1971
|
+
parentTag: F("Repeater", "tag")
|
|
1903
1972
|
}
|
|
1904
1973
|
}),
|
|
1905
1974
|
canAcceptBlock: (e) => e !== "RepeaterItem",
|
|
1906
1975
|
canDelete: () => !1,
|
|
1907
1976
|
canMove: () => !1,
|
|
1908
1977
|
canDuplicate: () => !1
|
|
1909
|
-
},
|
|
1978
|
+
}, Ht = ({
|
|
1910
1979
|
children: e,
|
|
1911
1980
|
blockProps: o,
|
|
1912
1981
|
styles: t
|
|
1913
|
-
}) =>
|
|
1982
|
+
}) => g.createElement("div", { ...o, ...t }, e), $t = {
|
|
1914
1983
|
type: "RepeaterEmptyState",
|
|
1915
1984
|
label: "Empty State",
|
|
1916
1985
|
hidden: !0,
|
|
1917
1986
|
group: "basic",
|
|
1918
|
-
...
|
|
1919
|
-
properties: { styles:
|
|
1987
|
+
...p({
|
|
1988
|
+
properties: { styles: L("p-5 flex items-center justify-center") }
|
|
1920
1989
|
}),
|
|
1921
1990
|
canAcceptBlock: () => !0,
|
|
1922
1991
|
canDelete: () => !1,
|
|
1923
1992
|
canMove: () => !1,
|
|
1924
1993
|
canDuplicate: () => !1
|
|
1925
|
-
},
|
|
1926
|
-
|
|
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);
|
|
1927
1996
|
};
|
|
1928
1997
|
export {
|
|
1929
|
-
|
|
1998
|
+
qt as loadWebBlocks
|
|
1930
1999
|
};
|