@chaibuilder/sdk 2.0.0-beta.63 → 2.0.0-beta.65
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/CodeEditor-B2x4yruH.cjs +1 -0
- package/dist/CodeEditor-VcQsGvTM.js +65 -0
- package/dist/Topbar-BQsjWb-A.js +16 -0
- package/dist/Topbar-DEw_kBMz.cjs +1 -0
- package/dist/context-menu-C4lLV8gP.cjs +1 -0
- package/dist/{context-menu-FCyNTUkl.js → context-menu-D5ViOi6K.js} +236 -239
- package/dist/core.cjs +5 -5
- package/dist/core.js +1632 -1656
- package/dist/render.cjs +2 -2
- package/dist/render.js +83 -83
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +198 -198
- package/dist/web-blocks.cjs +6 -6
- package/dist/web-blocks.js +350 -346
- package/package.json +1 -1
- package/dist/CodeEditor-BLTQpTTM.js +0 -67
- package/dist/CodeEditor-CJhjQonw.cjs +0 -1
- package/dist/Topbar-CEyGOl06.js +0 -16
- package/dist/Topbar-pFV2NO8v.cjs +0 -1
- package/dist/context-menu-C_ITMOD1.cjs +0 -1
- package/dist/jsx-runtime-Drh4NO5G.js +0 -633
- package/dist/jsx-runtime-qcKc-DpB.cjs +0 -30
package/dist/web-blocks.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as p, StylesProp as d, registerChaiBlock as u, closestBlockProp as
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { createElement as
|
|
5
|
-
import { c as
|
|
6
|
-
import { ButtonIcon as
|
|
7
|
-
import { isEmpty as
|
|
8
|
-
import { GlobeIcon as
|
|
9
|
-
const
|
|
10
|
-
const { blockProps: t, inBuilder: l, backgroundImage: n, children: r, tag:
|
|
1
|
+
import { registerChaiBlockSchema as p, StylesProp as d, registerChaiBlock as u, closestBlockProp as _, stylesProp as $, runtimeProp as q } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as i, jsxs as k, Fragment as W } from "react/jsx-runtime";
|
|
3
|
+
import * as w from "react";
|
|
4
|
+
import { createElement as I } from "react";
|
|
5
|
+
import { c as P, G as X, g as C } from "./iconBase-DHfFLkem.js";
|
|
6
|
+
import { ButtonIcon as F, CodeIcon as Y, HeadingIcon as Z, TextIcon as J, CursorTextIcon as K, MoonIcon as G, SunIcon as Q, DividerHorizontalIcon as ee, SketchLogoIcon as te, ImageIcon as U, Link1Icon as le, RowsIcon as re, ColumnsIcon as ne, SpaceBetweenVerticallyIcon as oe, VideoIcon as ie, DropdownMenuIcon as O, CheckboxIcon as ae, InputIcon as V, LetterCaseToggleIcon as se, RadiobuttonIcon as ce } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as S, get as v, isNull as de, pick as ue, omit as pe, map as R } from "lodash-es";
|
|
8
|
+
import { GlobeIcon as ye, GroupIcon as ge, Columns as me, Rows as he, PanelRightOpen as D, PanelRightClose as fe, AlignHorizontalJustifyStart as be, AppWindowIcon as we, UnfoldHorizontal as ke } from "lucide-react";
|
|
9
|
+
const B = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div", { className: P("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, ve = (e) => {
|
|
10
|
+
const { blockProps: t, inBuilder: l, backgroundImage: n, children: r, tag: o = "div", styles: a } = e;
|
|
11
11
|
let c = r;
|
|
12
|
-
r || (c = /* @__PURE__ */
|
|
13
|
-
let
|
|
14
|
-
return n && (
|
|
15
|
-
},
|
|
12
|
+
r || (c = /* @__PURE__ */ i(B, { inBuilder: l }));
|
|
13
|
+
let s = {};
|
|
14
|
+
return n && (s = { backgroundImage: `url(${n})` }), w.createElement(o, { ...t, ...a, style: s }, c);
|
|
15
|
+
}, xe = {
|
|
16
16
|
type: "Box",
|
|
17
17
|
label: "Box",
|
|
18
18
|
category: "core",
|
|
@@ -53,10 +53,10 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
53
53
|
}
|
|
54
54
|
}),
|
|
55
55
|
canAcceptBlock: () => !0
|
|
56
|
-
},
|
|
57
|
-
const { blockProps: t, iconSize: l, icon: n, content: r, styles:
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
m && /* @__PURE__ */
|
|
56
|
+
}, Se = (e) => {
|
|
57
|
+
const { blockProps: t, iconSize: l, icon: n, content: r, styles: o, children: a, iconPos: c, link: s, inBuilder: g } = e, m = n, h = a || /* @__PURE__ */ k(W, { children: [
|
|
58
|
+
/* @__PURE__ */ i("span", { "data-ai-key": "content", children: r }),
|
|
59
|
+
m && /* @__PURE__ */ i(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
62
|
style: { width: l + "px" },
|
|
@@ -64,22 +64,22 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
64
64
|
dangerouslySetInnerHTML: { __html: m }
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
|
-
] }), y =
|
|
67
|
+
] }), y = I(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
70
|
...t,
|
|
71
|
-
...
|
|
71
|
+
...o,
|
|
72
72
|
type: "button",
|
|
73
73
|
"aria-label": r
|
|
74
74
|
},
|
|
75
75
|
h
|
|
76
76
|
);
|
|
77
|
-
return v(
|
|
78
|
-
},
|
|
77
|
+
return S(v(s, "href")) ? y : g ? /* @__PURE__ */ i("span", { children: y }) : /* @__PURE__ */ i("a", { "aria-label": r, href: v(s, "href") || "/", target: v(s, "target", "_self"), children: y });
|
|
78
|
+
}, _e = {
|
|
79
79
|
type: "Button",
|
|
80
80
|
label: "Button",
|
|
81
81
|
category: "core",
|
|
82
|
-
icon:
|
|
82
|
+
icon: F,
|
|
83
83
|
group: "basic",
|
|
84
84
|
...p({
|
|
85
85
|
properties: {
|
|
@@ -126,24 +126,24 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
126
126
|
}),
|
|
127
127
|
i18nProps: ["content"],
|
|
128
128
|
aiProps: ["content"]
|
|
129
|
-
},
|
|
129
|
+
}, Be = (e) => {
|
|
130
130
|
const { blockProps: t, styles: l, htmlCode: n, inBuilder: r } = e;
|
|
131
|
-
return r ? /* @__PURE__ */
|
|
132
|
-
r ? /* @__PURE__ */
|
|
133
|
-
|
|
131
|
+
return r ? /* @__PURE__ */ k("div", { className: "relative", children: [
|
|
132
|
+
r ? /* @__PURE__ */ i("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
|
|
133
|
+
w.createElement("div", {
|
|
134
134
|
...l,
|
|
135
135
|
dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
136
136
|
})
|
|
137
|
-
] }) :
|
|
137
|
+
] }) : w.createElement("div", {
|
|
138
138
|
...t,
|
|
139
139
|
...l,
|
|
140
140
|
dangerouslySetInnerHTML: { __html: n }
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, Ie = {
|
|
143
143
|
type: "CustomHTML",
|
|
144
144
|
label: "web_blocks.custom_html",
|
|
145
145
|
category: "core",
|
|
146
|
-
icon:
|
|
146
|
+
icon: Y,
|
|
147
147
|
group: "advanced",
|
|
148
148
|
...p({
|
|
149
149
|
properties: {
|
|
@@ -155,11 +155,11 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
|
-
},
|
|
158
|
+
}, Ce = (e) => {
|
|
159
159
|
const { blockProps: t, styles: l, backgroundImage: n } = e;
|
|
160
160
|
let r = {};
|
|
161
|
-
return n && (r = { backgroundImage: `url(${n})` }),
|
|
162
|
-
},
|
|
161
|
+
return n && (r = { backgroundImage: `url(${n})` }), w.createElement("div", { ...t, ...l, style: r });
|
|
162
|
+
}, Le = {
|
|
163
163
|
type: "EmptyBox",
|
|
164
164
|
label: "Empty Box",
|
|
165
165
|
category: "core",
|
|
@@ -175,18 +175,18 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
})
|
|
178
|
-
},
|
|
179
|
-
const { blockProps: t, styles: l, content: n, tag: r = "h1", children:
|
|
180
|
-
return
|
|
178
|
+
}, Pe = (e) => {
|
|
179
|
+
const { blockProps: t, styles: l, content: n, tag: r = "h1", children: o = null } = e;
|
|
180
|
+
return o ? w.createElement(r, { ...l, ...t }, o) : w.createElement(r, {
|
|
181
181
|
...l,
|
|
182
182
|
...t,
|
|
183
183
|
dangerouslySetInnerHTML: { __html: n }
|
|
184
184
|
});
|
|
185
|
-
},
|
|
185
|
+
}, Ne = {
|
|
186
186
|
type: "Heading",
|
|
187
187
|
label: "web_blocks.heading",
|
|
188
188
|
category: "core",
|
|
189
|
-
icon:
|
|
189
|
+
icon: Z,
|
|
190
190
|
group: "typography",
|
|
191
191
|
...p({
|
|
192
192
|
properties: {
|
|
@@ -208,18 +208,18 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
208
208
|
aiProps: ["content"],
|
|
209
209
|
i18nProps: ["content"],
|
|
210
210
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
211
|
-
},
|
|
211
|
+
}, Me = (e) => {
|
|
212
212
|
const { blockProps: t, styles: l, content: n } = e;
|
|
213
|
-
return
|
|
213
|
+
return de(e.children) ? w.createElement("p", {
|
|
214
214
|
...l,
|
|
215
215
|
...t,
|
|
216
216
|
dangerouslySetInnerHTML: { __html: n }
|
|
217
|
-
}) :
|
|
218
|
-
},
|
|
217
|
+
}) : w.createElement("p", { ...l, ...t }, e.children);
|
|
218
|
+
}, $e = {
|
|
219
219
|
type: "Paragraph",
|
|
220
220
|
label: "Paragraph",
|
|
221
221
|
category: "core",
|
|
222
|
-
icon:
|
|
222
|
+
icon: J,
|
|
223
223
|
group: "typography",
|
|
224
224
|
...p({
|
|
225
225
|
properties: {
|
|
@@ -237,14 +237,17 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
237
237
|
i18nProps: ["content"],
|
|
238
238
|
aiProps: ["content"],
|
|
239
239
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
},
|
|
240
|
+
}, T = (e, ...t) => ({
|
|
241
|
+
...e,
|
|
242
|
+
className: P(e.className, ...t)
|
|
243
|
+
}), De = (e) => {
|
|
244
|
+
const { blockProps: t, content: l, styles: n } = e, r = T(n, "prose", "max-w-full");
|
|
245
|
+
return /* @__PURE__ */ i("div", { ...t, ...r, dangerouslySetInnerHTML: { __html: l } });
|
|
246
|
+
}, Te = {
|
|
244
247
|
type: "RichText",
|
|
245
248
|
label: "Rich Text",
|
|
246
249
|
category: "core",
|
|
247
|
-
icon:
|
|
250
|
+
icon: K,
|
|
248
251
|
group: "typography",
|
|
249
252
|
...p({
|
|
250
253
|
properties: {
|
|
@@ -259,14 +262,14 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
259
262
|
}),
|
|
260
263
|
aiProps: ["content"],
|
|
261
264
|
i18nProps: ["content"]
|
|
262
|
-
},
|
|
263
|
-
const { blockProps: t, styles: l, content: n, children: r = null, tag:
|
|
264
|
-
return r ?
|
|
265
|
+
}, Ae = (e) => {
|
|
266
|
+
const { blockProps: t, styles: l, content: n, children: r = null, tag: o } = e;
|
|
267
|
+
return r ? w.createElement("span", { ...l, ...t }, r) : w.createElement(o || "span", {
|
|
265
268
|
...l,
|
|
266
269
|
...t,
|
|
267
270
|
dangerouslySetInnerHTML: { __html: n || "" }
|
|
268
271
|
});
|
|
269
|
-
},
|
|
272
|
+
}, Ee = {
|
|
270
273
|
type: "Span",
|
|
271
274
|
label: "Span",
|
|
272
275
|
category: "core",
|
|
@@ -286,17 +289,17 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
286
289
|
i18nProps: ["content"],
|
|
287
290
|
canAcceptBlock: () => !0
|
|
288
291
|
};
|
|
289
|
-
function
|
|
290
|
-
return
|
|
292
|
+
function Re(e) {
|
|
293
|
+
return X({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z" }, child: [] }] })(e);
|
|
291
294
|
}
|
|
292
|
-
const
|
|
295
|
+
const ze = (e) => {
|
|
293
296
|
const { scripts: t, inBuilder: l, blockProps: n } = e;
|
|
294
|
-
return l ? /* @__PURE__ */
|
|
295
|
-
},
|
|
297
|
+
return l ? /* @__PURE__ */ i("div", { ...n, children: /* @__PURE__ */ i("div", { className: P("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: t } });
|
|
298
|
+
}, He = {
|
|
296
299
|
type: "CustomScript",
|
|
297
300
|
label: "web_blocks.custom_script",
|
|
298
301
|
category: "core",
|
|
299
|
-
icon:
|
|
302
|
+
icon: Re,
|
|
300
303
|
group: "advanced",
|
|
301
304
|
...p({
|
|
302
305
|
properties: {
|
|
@@ -309,36 +312,36 @@ const Ee = (e) => {
|
|
|
309
312
|
}
|
|
310
313
|
}
|
|
311
314
|
})
|
|
312
|
-
},
|
|
315
|
+
}, je = (e) => /* @__PURE__ */ k("div", { ...e.blockProps, ...e.styles, children: [
|
|
313
316
|
e.mode,
|
|
314
317
|
e.children
|
|
315
|
-
] }),
|
|
316
|
-
u(
|
|
318
|
+
] }), qe = (e) => e.mode === "dark" ? null : /* @__PURE__ */ i("button", { "aria-label": "dark mode button", ...e.blockProps, ...e.styles, children: e.children });
|
|
319
|
+
u(qe, {
|
|
317
320
|
type: "DarkModeButton",
|
|
318
321
|
label: "Dark Mode Button",
|
|
319
322
|
category: "core",
|
|
320
|
-
icon:
|
|
323
|
+
icon: G,
|
|
321
324
|
group: "advanced",
|
|
322
325
|
hidden: !0,
|
|
323
326
|
...p({
|
|
324
327
|
properties: {
|
|
325
|
-
mode:
|
|
326
|
-
styles:
|
|
328
|
+
mode: _("DarkModeSwitcher", "mode"),
|
|
329
|
+
styles: $("")
|
|
327
330
|
}
|
|
328
331
|
})
|
|
329
332
|
});
|
|
330
|
-
const
|
|
331
|
-
u(
|
|
333
|
+
const Fe = (e) => e.mode === "light" ? null : /* @__PURE__ */ i("button", { "aria-label": "light mode button", ...e.blockProps, ...e.styles, children: e.children });
|
|
334
|
+
u(Fe, {
|
|
332
335
|
type: "LightModeButton",
|
|
333
336
|
label: "Light Mode Button",
|
|
334
337
|
category: "core",
|
|
335
|
-
icon:
|
|
338
|
+
icon: Q,
|
|
336
339
|
group: "advanced",
|
|
337
340
|
hidden: !0,
|
|
338
341
|
...p({
|
|
339
342
|
properties: {
|
|
340
|
-
mode:
|
|
341
|
-
styles:
|
|
343
|
+
mode: _("DarkModeSwitcher", "mode"),
|
|
344
|
+
styles: $(""),
|
|
342
345
|
fake: {
|
|
343
346
|
type: "string",
|
|
344
347
|
default: ""
|
|
@@ -346,11 +349,11 @@ u(He, {
|
|
|
346
349
|
}
|
|
347
350
|
})
|
|
348
351
|
});
|
|
349
|
-
const
|
|
352
|
+
const Ge = {
|
|
350
353
|
type: "DarkModeSwitcher",
|
|
351
354
|
label: "web_blocks.dark_mode",
|
|
352
355
|
category: "core",
|
|
353
|
-
icon:
|
|
356
|
+
icon: G,
|
|
354
357
|
group: "advanced",
|
|
355
358
|
wrapper: !0,
|
|
356
359
|
...p({
|
|
@@ -361,7 +364,7 @@ const qe = {
|
|
|
361
364
|
enum: ["dark", "light"],
|
|
362
365
|
default: "light"
|
|
363
366
|
},
|
|
364
|
-
styles:
|
|
367
|
+
styles: $("")
|
|
365
368
|
}
|
|
366
369
|
}),
|
|
367
370
|
blocks: () => [
|
|
@@ -399,40 +402,40 @@ const qe = {
|
|
|
399
402
|
icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"
|
|
400
403
|
}
|
|
401
404
|
]
|
|
402
|
-
},
|
|
405
|
+
}, Ue = (e) => {
|
|
403
406
|
const { blockProps: t, styles: l } = e;
|
|
404
|
-
return
|
|
405
|
-
},
|
|
407
|
+
return I("hr", { ...l, ...t });
|
|
408
|
+
}, Oe = {
|
|
406
409
|
type: "Divider",
|
|
407
410
|
label: "web_blocks.divider",
|
|
408
411
|
category: "core",
|
|
409
|
-
icon:
|
|
412
|
+
icon: ee,
|
|
410
413
|
group: "basic",
|
|
411
414
|
...p({
|
|
412
415
|
properties: {
|
|
413
416
|
styles: d("bg-gray-900 h-0.5 py-2 my-1")
|
|
414
417
|
}
|
|
415
418
|
})
|
|
416
|
-
},
|
|
419
|
+
}, Ve = (e) => {
|
|
417
420
|
const { blockProps: t, inBuilder: l, children: n, globalBlock: r } = e;
|
|
418
|
-
return l && !r ? /* @__PURE__ */
|
|
421
|
+
return l && !r ? /* @__PURE__ */ k(
|
|
419
422
|
"div",
|
|
420
423
|
{
|
|
421
424
|
className: "flex flex-col items-center justify-center py-4 bg-gray-100 rounded-lg gap-y-1 dark:bg-gray-800",
|
|
422
425
|
...t,
|
|
423
426
|
children: [
|
|
424
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ k("h1", { children: [
|
|
425
428
|
"Global Block - ",
|
|
426
429
|
r
|
|
427
430
|
] }),
|
|
428
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
429
432
|
]
|
|
430
433
|
}
|
|
431
|
-
) :
|
|
432
|
-
},
|
|
434
|
+
) : w.createElement("span", { ...t }, n);
|
|
435
|
+
}, We = {
|
|
433
436
|
type: "GlobalBlock",
|
|
434
437
|
label: "Global Block",
|
|
435
|
-
icon:
|
|
438
|
+
icon: ye,
|
|
436
439
|
category: "core",
|
|
437
440
|
group: "advanced",
|
|
438
441
|
...p({
|
|
@@ -447,28 +450,25 @@ const qe = {
|
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
452
|
})
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
return /* @__PURE__ */ o.jsx(_, { inBuilder: s, className: "h-8 w-14" });
|
|
457
|
-
const a = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
458
|
-
return x.createElement("span", {
|
|
453
|
+
}, Xe = (e) => {
|
|
454
|
+
const { blockProps: t, icon: l, styles: n, width: r, inBuilder: o, height: a } = e, c = T(n, "");
|
|
455
|
+
if (S(l))
|
|
456
|
+
return /* @__PURE__ */ i(B, { inBuilder: o, className: "h-8 w-14" });
|
|
457
|
+
const s = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
458
|
+
return w.createElement("span", {
|
|
459
459
|
...t,
|
|
460
460
|
...c,
|
|
461
461
|
style: {
|
|
462
462
|
width: r ? `${r}px` : "auto",
|
|
463
|
-
height:
|
|
463
|
+
height: a ? `${a}px` : "auto"
|
|
464
464
|
},
|
|
465
|
-
dangerouslySetInnerHTML: { __html:
|
|
465
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
466
466
|
});
|
|
467
|
-
},
|
|
467
|
+
}, Ye = {
|
|
468
468
|
type: "Icon",
|
|
469
469
|
label: "web_blocks.icon",
|
|
470
470
|
category: "core",
|
|
471
|
-
icon:
|
|
471
|
+
icon: te,
|
|
472
472
|
group: "media",
|
|
473
473
|
...p({
|
|
474
474
|
properties: {
|
|
@@ -491,28 +491,28 @@ const qe = {
|
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
})
|
|
494
|
-
},
|
|
495
|
-
const { blockProps: t, image: l, mobileImage: n, styles: r, alt:
|
|
496
|
-
return
|
|
497
|
-
n && /* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
494
|
+
}, Ze = (e) => {
|
|
495
|
+
const { blockProps: t, image: l, mobileImage: n, styles: r, alt: o, height: a, width: c, lazyLoading: s } = e;
|
|
496
|
+
return S(l) ? /* @__PURE__ */ i(B, { className: "h-36" }) : /* @__PURE__ */ k("picture", { children: [
|
|
497
|
+
n && /* @__PURE__ */ i("source", { srcSet: n, media: "(max-width: 480px)" }),
|
|
498
|
+
/* @__PURE__ */ i(
|
|
499
499
|
"img",
|
|
500
500
|
{
|
|
501
501
|
...t,
|
|
502
502
|
...r,
|
|
503
503
|
src: l,
|
|
504
|
-
alt:
|
|
505
|
-
loading:
|
|
504
|
+
alt: o,
|
|
505
|
+
loading: s ? "lazy" : "eager",
|
|
506
506
|
width: c,
|
|
507
|
-
height:
|
|
507
|
+
height: a
|
|
508
508
|
}
|
|
509
509
|
)
|
|
510
510
|
] });
|
|
511
|
-
},
|
|
511
|
+
}, Je = {
|
|
512
512
|
type: "Image",
|
|
513
513
|
label: "Image",
|
|
514
514
|
category: "core",
|
|
515
|
-
icon:
|
|
515
|
+
icon: U,
|
|
516
516
|
group: "media",
|
|
517
517
|
...p({
|
|
518
518
|
properties: {
|
|
@@ -556,30 +556,30 @@ const qe = {
|
|
|
556
556
|
}),
|
|
557
557
|
aiProps: ["alt"],
|
|
558
558
|
i18nProps: ["alt"]
|
|
559
|
-
},
|
|
560
|
-
const { blockProps: t, children: l, styles: n, inBuilder: r, content:
|
|
561
|
-
if (!l &&
|
|
562
|
-
return /* @__PURE__ */
|
|
559
|
+
}, Ke = (e) => {
|
|
560
|
+
const { blockProps: t, children: l, styles: n, inBuilder: r, content: o, href: a } = e, { hrefType: c, autoplay: s, maxWidth: g, backdropColor: m, galleryName: h } = e, y = T(n, "cb-lightbox");
|
|
561
|
+
if (!l && S(n == null ? void 0 : n.className) && S(o))
|
|
562
|
+
return /* @__PURE__ */ i(B, { inBuilder: r });
|
|
563
563
|
if (r)
|
|
564
|
-
return l ? /* @__PURE__ */
|
|
564
|
+
return l ? /* @__PURE__ */ i("span", { ...t, ...y, children: l }) : w.createElement("span", {
|
|
565
565
|
...t,
|
|
566
566
|
...y,
|
|
567
|
-
dangerouslySetInnerHTML: { __html:
|
|
567
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
568
568
|
});
|
|
569
569
|
const f = {};
|
|
570
|
-
return c !== "image" && (f["data-vbtype"] = c),
|
|
570
|
+
return c !== "image" && (f["data-vbtype"] = c), s && (f["data-autoplay"] = "true"), g && (f["data-maxwidth"] = g + "px"), m && (f["data-overlay"] = m), h && (f["data-gall"] = h), l ? /* @__PURE__ */ i("a", { "aria-label": o, ...f, href: a || "#/", ...t, ...y, children: l }) : w.createElement("a", {
|
|
571
571
|
...t,
|
|
572
572
|
...y,
|
|
573
573
|
...f,
|
|
574
|
-
href:
|
|
575
|
-
dangerouslySetInnerHTML: { __html:
|
|
576
|
-
"aria-label":
|
|
574
|
+
href: a || "#",
|
|
575
|
+
dangerouslySetInnerHTML: { __html: o },
|
|
576
|
+
"aria-label": o
|
|
577
577
|
});
|
|
578
|
-
},
|
|
578
|
+
}, Qe = {
|
|
579
579
|
type: "LightBoxLink",
|
|
580
580
|
label: "Lightbox Link",
|
|
581
581
|
category: "core",
|
|
582
|
-
icon:
|
|
582
|
+
icon: U,
|
|
583
583
|
group: "basic",
|
|
584
584
|
...p({
|
|
585
585
|
properties: {
|
|
@@ -629,33 +629,33 @@ const qe = {
|
|
|
629
629
|
i18nProps: ["content"],
|
|
630
630
|
aiProps: ["content"],
|
|
631
631
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
632
|
-
},
|
|
633
|
-
const { blockProps: t, link: l, children: n, styles: r, inBuilder:
|
|
632
|
+
}, et = (e) => {
|
|
633
|
+
const { blockProps: t, link: l, children: n, styles: r, inBuilder: o, content: a } = e;
|
|
634
634
|
let c = {};
|
|
635
|
-
return !n &&
|
|
635
|
+
return !n && S(a) && (c = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), o ? n ? /* @__PURE__ */ i("span", { ...t, style: c, ...r, children: n }) : I(
|
|
636
636
|
"span",
|
|
637
637
|
{
|
|
638
638
|
...t,
|
|
639
639
|
...r,
|
|
640
640
|
style: c
|
|
641
641
|
},
|
|
642
|
-
|
|
643
|
-
) : n ? /* @__PURE__ */
|
|
642
|
+
a
|
|
643
|
+
) : n ? /* @__PURE__ */ i("a", { "aria-label": a, href: (l == null ? void 0 : l.href) || "#/", target: l == null ? void 0 : l.target, ...t, ...r, children: n }) : I(
|
|
644
644
|
"a",
|
|
645
645
|
{
|
|
646
646
|
...t,
|
|
647
647
|
...r,
|
|
648
648
|
href: (l == null ? void 0 : l.href) || "#",
|
|
649
649
|
target: (l == null ? void 0 : l.target) || "_self",
|
|
650
|
-
"aria-label":
|
|
650
|
+
"aria-label": a
|
|
651
651
|
},
|
|
652
|
-
|
|
652
|
+
a
|
|
653
653
|
);
|
|
654
|
-
},
|
|
654
|
+
}, tt = {
|
|
655
655
|
type: "Link",
|
|
656
656
|
label: "Link",
|
|
657
657
|
category: "core",
|
|
658
|
-
icon:
|
|
658
|
+
icon: le,
|
|
659
659
|
group: "basic",
|
|
660
660
|
...p({
|
|
661
661
|
properties: {
|
|
@@ -686,17 +686,17 @@ const qe = {
|
|
|
686
686
|
aiProps: ["content"],
|
|
687
687
|
i18nProps: ["content"],
|
|
688
688
|
canAcceptBlock: (e) => e !== "Link"
|
|
689
|
-
},
|
|
690
|
-
const { blockProps: t, children: l, listType: n, styles: r, tag:
|
|
691
|
-
return !l &&
|
|
692
|
-
|
|
689
|
+
}, lt = (e) => {
|
|
690
|
+
const { blockProps: t, children: l, listType: n, styles: r, tag: o, inBuilder: a } = e, c = P(v(r, "className", ""), n);
|
|
691
|
+
return !l && S(r == null ? void 0 : r.className) ? /* @__PURE__ */ i(B, { inBuilder: a }) : w.createElement(
|
|
692
|
+
o || (n === "list-decimal" ? "ol" : "ul"),
|
|
693
693
|
{ ...t, ...r, className: c },
|
|
694
694
|
l
|
|
695
695
|
);
|
|
696
|
-
},
|
|
696
|
+
}, rt = {
|
|
697
697
|
type: "List",
|
|
698
698
|
label: "web_blocks.list",
|
|
699
|
-
icon:
|
|
699
|
+
icon: re,
|
|
700
700
|
category: "core",
|
|
701
701
|
group: "basic",
|
|
702
702
|
...p({
|
|
@@ -739,17 +739,17 @@ const qe = {
|
|
|
739
739
|
content: "Item 3"
|
|
740
740
|
}
|
|
741
741
|
]
|
|
742
|
-
},
|
|
743
|
-
const { blockProps: t, content: l, styles: n, children: r, tag:
|
|
744
|
-
return r ?
|
|
742
|
+
}, nt = (e) => {
|
|
743
|
+
const { blockProps: t, content: l, styles: n, children: r, tag: o } = e;
|
|
744
|
+
return r ? w.createElement(o || "li", { ...n, ...t }, r) : w.createElement(o || "li", {
|
|
745
745
|
...n,
|
|
746
746
|
...t,
|
|
747
747
|
dangerouslySetInnerHTML: { __html: l }
|
|
748
748
|
});
|
|
749
|
-
},
|
|
749
|
+
}, ot = {
|
|
750
750
|
type: "ListItem",
|
|
751
751
|
label: "List Item",
|
|
752
|
-
icon:
|
|
752
|
+
icon: ne,
|
|
753
753
|
category: "core",
|
|
754
754
|
group: "basic",
|
|
755
755
|
...p({
|
|
@@ -769,13 +769,13 @@ const qe = {
|
|
|
769
769
|
aiProps: ["content"],
|
|
770
770
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
771
771
|
canBeNested: (e) => e === "List"
|
|
772
|
-
},
|
|
772
|
+
}, it = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, at = {
|
|
773
773
|
type: "Text",
|
|
774
774
|
label: "Text",
|
|
775
775
|
hidden: !0,
|
|
776
776
|
category: "core",
|
|
777
777
|
group: "typography",
|
|
778
|
-
icon:
|
|
778
|
+
icon: oe,
|
|
779
779
|
...p({
|
|
780
780
|
properties: {
|
|
781
781
|
styles: d("text-black"),
|
|
@@ -787,30 +787,30 @@ const qe = {
|
|
|
787
787
|
}),
|
|
788
788
|
aiProps: ["content"],
|
|
789
789
|
i18nProps: ["content"]
|
|
790
|
-
},
|
|
791
|
-
if (
|
|
792
|
-
const t = e.match(
|
|
790
|
+
}, z = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, H = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, j = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, st = (e) => {
|
|
791
|
+
if (z.test(e)) {
|
|
792
|
+
const t = e.match(z);
|
|
793
793
|
return t ? `https://www.youtube.com/embed/${t[4]}` : e;
|
|
794
794
|
}
|
|
795
|
-
if (
|
|
796
|
-
const t = e.match(
|
|
795
|
+
if (H.test(e)) {
|
|
796
|
+
const t = e.match(H);
|
|
797
797
|
return t ? `https://player.vimeo.com/video/${t[3]}` : e;
|
|
798
798
|
}
|
|
799
|
-
if (
|
|
800
|
-
const t = e.match(
|
|
799
|
+
if (j.test(e)) {
|
|
800
|
+
const t = e.match(j);
|
|
801
801
|
return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
|
|
802
802
|
}
|
|
803
803
|
return null;
|
|
804
|
-
},
|
|
805
|
-
const { blockProps: t, inBuilder: l, styles: n, url: r, controls:
|
|
806
|
-
if (
|
|
804
|
+
}, ct = w.memo((e) => {
|
|
805
|
+
const { blockProps: t, inBuilder: l, styles: n, url: r, controls: o } = e, a = v(o, "autoPlay", !1), c = v(o, "controls", !1), s = a || v(o, "muted", !0), g = v(o, "loop", !1);
|
|
806
|
+
if (S(r)) return /* @__PURE__ */ i(B, { inBuilder: l, className: "h-36" });
|
|
807
807
|
let m = st(r), h = null;
|
|
808
808
|
if (m) {
|
|
809
|
-
if (!
|
|
809
|
+
if (!S(m)) {
|
|
810
810
|
const y = [];
|
|
811
|
-
y.push(`autoplay=${
|
|
811
|
+
y.push(`autoplay=${a ? 1 : 0}`), y.push(`controls=${o ? 1 : 0}`), y.push(`mute=${s ? 1 : 0}&muted=${s ? 1 : 0}`), y.push(`loop=${g ? 1 : 0}`), m = `${m}?${y.join("&")}`;
|
|
812
812
|
}
|
|
813
|
-
h =
|
|
813
|
+
h = w.createElement("iframe", {
|
|
814
814
|
...t,
|
|
815
815
|
className: "absolute inset-0 w-full h-full",
|
|
816
816
|
src: m,
|
|
@@ -819,24 +819,24 @@ const qe = {
|
|
|
819
819
|
frameBorder: 0
|
|
820
820
|
});
|
|
821
821
|
} else
|
|
822
|
-
h =
|
|
822
|
+
h = w.createElement("video", {
|
|
823
823
|
...t,
|
|
824
824
|
className: "absolute inset-0 w-full h-full",
|
|
825
825
|
src: r,
|
|
826
826
|
controls: c,
|
|
827
|
-
muted:
|
|
828
|
-
autoPlay: l ? !1 :
|
|
827
|
+
muted: s,
|
|
828
|
+
autoPlay: l ? !1 : a,
|
|
829
829
|
loop: g
|
|
830
830
|
});
|
|
831
|
-
return /* @__PURE__ */
|
|
832
|
-
l ? /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ i("div", { ...ue(n, ["className"]), children: /* @__PURE__ */ k("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
832
|
+
l ? /* @__PURE__ */ i("div", { ...t, ...pe(n, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
833
833
|
h
|
|
834
834
|
] }) });
|
|
835
|
-
}),
|
|
835
|
+
}), dt = {
|
|
836
836
|
type: "Video",
|
|
837
837
|
label: "Video",
|
|
838
838
|
category: "core",
|
|
839
|
-
icon:
|
|
839
|
+
icon: ie,
|
|
840
840
|
group: "media",
|
|
841
841
|
...p({
|
|
842
842
|
properties: {
|
|
@@ -881,25 +881,31 @@ const qe = {
|
|
|
881
881
|
}
|
|
882
882
|
}),
|
|
883
883
|
i18nProps: ["url"]
|
|
884
|
-
},
|
|
884
|
+
}, A = {
|
|
885
885
|
wrapper: { "x-data": "{ open: false }" },
|
|
886
886
|
button: { "x-on:click": "open = !open" },
|
|
887
|
-
menu: {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
887
|
+
menu: {
|
|
888
|
+
"x-show": "open",
|
|
889
|
+
"x-on:click": "open = false",
|
|
890
|
+
"x-on:click.away": "open = false",
|
|
891
|
+
"x-cloak": "",
|
|
892
|
+
"x-transition": ""
|
|
893
|
+
}
|
|
894
|
+
}, ut = (e) => {
|
|
895
|
+
const { blockProps: t, content: l, icon: n, iconWidth: r, iconHeight: o, styles: a, show: c } = e;
|
|
896
|
+
return /* @__PURE__ */ k("button", { "aria-label": l, ...t, ...a, ...A.button, children: [
|
|
891
897
|
l,
|
|
892
|
-
/* @__PURE__ */
|
|
898
|
+
/* @__PURE__ */ i(
|
|
893
899
|
"span",
|
|
894
900
|
{
|
|
895
901
|
className: c ? "rotate-180" : "",
|
|
896
902
|
dangerouslySetInnerHTML: { __html: n },
|
|
897
|
-
style: { width: r, height:
|
|
903
|
+
style: { width: r, height: o }
|
|
898
904
|
}
|
|
899
905
|
)
|
|
900
906
|
] });
|
|
901
907
|
};
|
|
902
|
-
u(
|
|
908
|
+
u(ut, {
|
|
903
909
|
type: "DropdownButton",
|
|
904
910
|
label: "Dropdown Button",
|
|
905
911
|
group: "advanced",
|
|
@@ -909,7 +915,7 @@ u(ct, {
|
|
|
909
915
|
canDelete: () => !1,
|
|
910
916
|
...p({
|
|
911
917
|
properties: {
|
|
912
|
-
show:
|
|
918
|
+
show: _("Dropdown", "showDropdown"),
|
|
913
919
|
content: { type: "string", title: "Title", default: "Menu Item" },
|
|
914
920
|
icon: { type: "string", title: "Icon", default: "", ui: { "ui:widget": "icon" } },
|
|
915
921
|
iconWidth: { type: "string", title: "Icon Width", default: "16px" },
|
|
@@ -920,11 +926,11 @@ u(ct, {
|
|
|
920
926
|
i18nProps: ["content"],
|
|
921
927
|
aiProps: ["content"]
|
|
922
928
|
});
|
|
923
|
-
const
|
|
924
|
-
const { blockProps: t, children: l, styles: n, show: r, inBuilder:
|
|
925
|
-
return
|
|
929
|
+
const pt = (e) => {
|
|
930
|
+
const { blockProps: t, children: l, styles: n, show: r, inBuilder: o } = e;
|
|
931
|
+
return o && !r ? null : /* @__PURE__ */ i("div", { ...t, ...A.menu, ...n, children: l });
|
|
926
932
|
};
|
|
927
|
-
u(
|
|
933
|
+
u(pt, {
|
|
928
934
|
type: "DropdownContent",
|
|
929
935
|
label: "Dropdown Content",
|
|
930
936
|
group: "basic",
|
|
@@ -934,19 +940,19 @@ u(dt, {
|
|
|
934
940
|
canAcceptBlock: () => !0,
|
|
935
941
|
...p({
|
|
936
942
|
properties: {
|
|
937
|
-
show:
|
|
943
|
+
show: _("Dropdown", "showDropdown"),
|
|
938
944
|
styles: d("absolute left-0 p-2 w-80 mt-2 bg-white rounded-lg shadow-lg z-50")
|
|
939
945
|
}
|
|
940
946
|
})
|
|
941
947
|
});
|
|
942
|
-
const
|
|
948
|
+
const yt = (e) => {
|
|
943
949
|
const { blockProps: t, children: l, styles: n } = e;
|
|
944
|
-
return /* @__PURE__ */
|
|
945
|
-
},
|
|
950
|
+
return /* @__PURE__ */ i("div", { ...t, ...n, ...A.wrapper, children: l });
|
|
951
|
+
}, gt = {
|
|
946
952
|
type: "Dropdown",
|
|
947
953
|
label: "Dropdown",
|
|
948
954
|
group: "basic",
|
|
949
|
-
icon:
|
|
955
|
+
icon: O,
|
|
950
956
|
blocks: () => [
|
|
951
957
|
{ _type: "Dropdown", _id: "dropdown" },
|
|
952
958
|
{
|
|
@@ -976,7 +982,7 @@ const ut = (e) => {
|
|
|
976
982
|
wrapper: !0,
|
|
977
983
|
...p({
|
|
978
984
|
properties: {
|
|
979
|
-
showDropdown:
|
|
985
|
+
showDropdown: q({
|
|
980
986
|
type: "boolean",
|
|
981
987
|
title: "Show Dropdown",
|
|
982
988
|
default: !1
|
|
@@ -984,38 +990,38 @@ const ut = (e) => {
|
|
|
984
990
|
styles: d("relative w-max")
|
|
985
991
|
}
|
|
986
992
|
})
|
|
987
|
-
},
|
|
988
|
-
const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles:
|
|
989
|
-
return
|
|
990
|
-
/* @__PURE__ */
|
|
993
|
+
}, mt = (e) => {
|
|
994
|
+
const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles: o, required: a, checked: c, showLabel: s = !0 } = e, g = C();
|
|
995
|
+
return s ? /* @__PURE__ */ k("div", { ...r, ...t, children: [
|
|
996
|
+
/* @__PURE__ */ i(
|
|
991
997
|
"input",
|
|
992
998
|
{
|
|
993
|
-
...
|
|
999
|
+
...o,
|
|
994
1000
|
name: l,
|
|
995
1001
|
id: g,
|
|
996
1002
|
type: "checkbox",
|
|
997
|
-
required:
|
|
1003
|
+
required: a,
|
|
998
1004
|
defaultChecked: c
|
|
999
1005
|
}
|
|
1000
1006
|
),
|
|
1001
|
-
n && /* @__PURE__ */
|
|
1002
|
-
] }) : /* @__PURE__ */
|
|
1007
|
+
n && /* @__PURE__ */ i("label", { htmlFor: g, children: n })
|
|
1008
|
+
] }) : /* @__PURE__ */ i(
|
|
1003
1009
|
"input",
|
|
1004
1010
|
{
|
|
1005
1011
|
id: g,
|
|
1006
1012
|
...t,
|
|
1007
|
-
...
|
|
1013
|
+
...o,
|
|
1008
1014
|
...r,
|
|
1009
1015
|
type: "checkbox",
|
|
1010
|
-
required:
|
|
1016
|
+
required: a,
|
|
1011
1017
|
name: l
|
|
1012
1018
|
}
|
|
1013
1019
|
);
|
|
1014
|
-
},
|
|
1020
|
+
}, ht = {
|
|
1015
1021
|
type: "Checkbox",
|
|
1016
1022
|
label: "web_blocks.checkbox",
|
|
1017
1023
|
category: "core",
|
|
1018
|
-
icon:
|
|
1024
|
+
icon: ae,
|
|
1019
1025
|
group: "form",
|
|
1020
1026
|
...p({
|
|
1021
1027
|
properties: {
|
|
@@ -1045,38 +1051,36 @@ const ut = (e) => {
|
|
|
1045
1051
|
}),
|
|
1046
1052
|
aiProps: ["label"],
|
|
1047
1053
|
i18nProps: ["label"]
|
|
1048
|
-
},
|
|
1049
|
-
const { children: t, blockProps: l, errorMessage: n, successMessage: r, action:
|
|
1050
|
-
let
|
|
1051
|
-
t || (
|
|
1052
|
-
const g = {
|
|
1053
|
-
"x-data": "{}",
|
|
1054
|
-
"x-on:submit.prevent": "post"
|
|
1055
|
-
}, m = {
|
|
1056
|
-
"x-html": "",
|
|
1057
|
-
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
1058
|
-
};
|
|
1059
|
-
return /* @__PURE__ */ o.jsxs(
|
|
1054
|
+
}, ft = (e) => {
|
|
1055
|
+
const { children: t, blockProps: l, errorMessage: n, successMessage: r, action: o, styles: a, inBuilder: c } = e;
|
|
1056
|
+
let s = t;
|
|
1057
|
+
return t || (s = /* @__PURE__ */ i(B, { inBuilder: c })), /* @__PURE__ */ k(
|
|
1060
1058
|
"form",
|
|
1061
1059
|
{
|
|
1062
|
-
...
|
|
1060
|
+
...{
|
|
1061
|
+
"x-data": "{}",
|
|
1062
|
+
"x-on:submit.prevent": "post"
|
|
1063
|
+
},
|
|
1063
1064
|
"data-error": n,
|
|
1064
1065
|
"data-success": r,
|
|
1065
1066
|
method: "post",
|
|
1066
|
-
action:
|
|
1067
|
+
action: o,
|
|
1067
1068
|
...l,
|
|
1068
|
-
...
|
|
1069
|
+
...a,
|
|
1069
1070
|
children: [
|
|
1070
|
-
/* @__PURE__ */
|
|
1071
|
-
|
|
1071
|
+
/* @__PURE__ */ i("div", { ...{
|
|
1072
|
+
"x-html": "",
|
|
1073
|
+
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
1074
|
+
} }),
|
|
1075
|
+
s
|
|
1072
1076
|
]
|
|
1073
1077
|
}
|
|
1074
1078
|
);
|
|
1075
|
-
},
|
|
1079
|
+
}, bt = {
|
|
1076
1080
|
type: "Form",
|
|
1077
1081
|
label: "Form",
|
|
1078
1082
|
category: "core",
|
|
1079
|
-
icon:
|
|
1083
|
+
icon: ge,
|
|
1080
1084
|
group: "form",
|
|
1081
1085
|
blocks: () => [
|
|
1082
1086
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -1113,38 +1117,38 @@ const ut = (e) => {
|
|
|
1113
1117
|
i18nProps: ["errorMessage", "successMessage"],
|
|
1114
1118
|
aiProps: ["errorMessage", "successMessage"],
|
|
1115
1119
|
canAcceptBlock: () => !0
|
|
1116
|
-
},
|
|
1117
|
-
const { blockProps: t, inBuilder: l, label: n, styles: r, inputStyles:
|
|
1118
|
-
|
|
1119
|
-
};
|
|
1120
|
-
return /* @__PURE__ */ o.jsxs(
|
|
1120
|
+
}, wt = (e) => {
|
|
1121
|
+
const { blockProps: t, inBuilder: l, label: n, styles: r, inputStyles: o, icon: a, iconSize: c, iconPos: s } = e, g = C();
|
|
1122
|
+
return /* @__PURE__ */ k(
|
|
1121
1123
|
"button",
|
|
1122
1124
|
{
|
|
1123
1125
|
id: g,
|
|
1124
|
-
...
|
|
1125
|
-
|
|
1126
|
+
...{
|
|
1127
|
+
"x-bind:disabled": "formLoading"
|
|
1128
|
+
},
|
|
1129
|
+
...o,
|
|
1126
1130
|
...r,
|
|
1127
1131
|
...t || {},
|
|
1128
1132
|
type: l ? "button" : "submit",
|
|
1129
1133
|
"aria-label": n,
|
|
1130
1134
|
children: [
|
|
1131
1135
|
n,
|
|
1132
|
-
|
|
1136
|
+
a && /* @__PURE__ */ i(
|
|
1133
1137
|
"div",
|
|
1134
1138
|
{
|
|
1135
1139
|
style: { width: c + "px" },
|
|
1136
|
-
className:
|
|
1137
|
-
dangerouslySetInnerHTML: { __html:
|
|
1140
|
+
className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
|
|
1141
|
+
dangerouslySetInnerHTML: { __html: a }
|
|
1138
1142
|
}
|
|
1139
1143
|
)
|
|
1140
1144
|
]
|
|
1141
1145
|
}
|
|
1142
1146
|
);
|
|
1143
|
-
},
|
|
1147
|
+
}, kt = {
|
|
1144
1148
|
type: "FormButton",
|
|
1145
1149
|
label: "Submit Button",
|
|
1146
1150
|
category: "core",
|
|
1147
|
-
icon:
|
|
1151
|
+
icon: F,
|
|
1148
1152
|
group: "form",
|
|
1149
1153
|
...p({
|
|
1150
1154
|
properties: {
|
|
@@ -1180,39 +1184,39 @@ const ut = (e) => {
|
|
|
1180
1184
|
}),
|
|
1181
1185
|
i18nProps: ["label"],
|
|
1182
1186
|
aiProps: ["label"]
|
|
1183
|
-
},
|
|
1184
|
-
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles:
|
|
1185
|
-
return c ? /* @__PURE__ */
|
|
1186
|
-
c && /* @__PURE__ */
|
|
1187
|
-
/* @__PURE__ */
|
|
1187
|
+
}, vt = (e) => {
|
|
1188
|
+
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, showLabel: c, required: s, inputType: g } = e, m = C();
|
|
1189
|
+
return c ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
|
|
1190
|
+
c && /* @__PURE__ */ i("label", { htmlFor: m, children: n }),
|
|
1191
|
+
/* @__PURE__ */ i(
|
|
1188
1192
|
"input",
|
|
1189
1193
|
{
|
|
1190
1194
|
name: l,
|
|
1191
|
-
...
|
|
1195
|
+
...a,
|
|
1192
1196
|
id: m,
|
|
1193
1197
|
type: g,
|
|
1194
1198
|
placeholder: r,
|
|
1195
|
-
required:
|
|
1199
|
+
required: s
|
|
1196
1200
|
}
|
|
1197
1201
|
)
|
|
1198
|
-
] }) : /* @__PURE__ */
|
|
1202
|
+
] }) : /* @__PURE__ */ i(
|
|
1199
1203
|
"input",
|
|
1200
1204
|
{
|
|
1201
1205
|
id: m,
|
|
1202
1206
|
name: l,
|
|
1203
1207
|
...t,
|
|
1204
|
-
...
|
|
1205
|
-
...
|
|
1208
|
+
...a,
|
|
1209
|
+
...o,
|
|
1206
1210
|
type: g,
|
|
1207
1211
|
placeholder: r,
|
|
1208
|
-
required:
|
|
1212
|
+
required: s
|
|
1209
1213
|
}
|
|
1210
1214
|
);
|
|
1211
|
-
},
|
|
1215
|
+
}, xt = {
|
|
1212
1216
|
type: "Input",
|
|
1213
1217
|
label: "web_blocks.input",
|
|
1214
1218
|
category: "core",
|
|
1215
|
-
icon:
|
|
1219
|
+
icon: V,
|
|
1216
1220
|
group: "form",
|
|
1217
1221
|
...p({
|
|
1218
1222
|
properties: {
|
|
@@ -1263,13 +1267,13 @@ const ut = (e) => {
|
|
|
1263
1267
|
}),
|
|
1264
1268
|
aiProps: ["label", "placeholder"],
|
|
1265
1269
|
i18nProps: ["label", "placeholder"]
|
|
1266
|
-
},
|
|
1267
|
-
const { blockProps: t, content: l, styles: n, children: r } = e,
|
|
1268
|
-
return r ?
|
|
1269
|
-
...
|
|
1270
|
+
}, St = (e) => {
|
|
1271
|
+
const { blockProps: t, content: l, styles: n, children: r } = e, o = { ...n, ...t };
|
|
1272
|
+
return r ? w.createElement("label", o, r) : w.createElement("label", {
|
|
1273
|
+
...o,
|
|
1270
1274
|
dangerouslySetInnerHTML: { __html: l }
|
|
1271
1275
|
});
|
|
1272
|
-
},
|
|
1276
|
+
}, _t = {
|
|
1273
1277
|
type: "Label",
|
|
1274
1278
|
label: "Label",
|
|
1275
1279
|
category: "core",
|
|
@@ -1287,29 +1291,29 @@ const ut = (e) => {
|
|
|
1287
1291
|
}),
|
|
1288
1292
|
aiProps: ["content"],
|
|
1289
1293
|
i18nProps: ["content"]
|
|
1290
|
-
},
|
|
1291
|
-
const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles:
|
|
1292
|
-
return
|
|
1293
|
-
/* @__PURE__ */
|
|
1294
|
-
n && /* @__PURE__ */
|
|
1295
|
-
] }) : /* @__PURE__ */
|
|
1294
|
+
}, Bt = (e) => {
|
|
1295
|
+
const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles: o, required: a, checked: c, showLabel: s = !0 } = e, g = C();
|
|
1296
|
+
return s ? /* @__PURE__ */ k("div", { ...r, ...t, children: [
|
|
1297
|
+
/* @__PURE__ */ i("input", { ...o, name: l, id: g, type: "radio", required: a, defaultChecked: c }),
|
|
1298
|
+
n && /* @__PURE__ */ i("label", { htmlFor: g, children: n })
|
|
1299
|
+
] }) : /* @__PURE__ */ i(
|
|
1296
1300
|
"input",
|
|
1297
1301
|
{
|
|
1298
1302
|
id: g,
|
|
1299
1303
|
...t,
|
|
1300
|
-
...
|
|
1304
|
+
...o,
|
|
1301
1305
|
...r,
|
|
1302
1306
|
type: "radio",
|
|
1303
|
-
required:
|
|
1307
|
+
required: a,
|
|
1304
1308
|
checked: c,
|
|
1305
1309
|
name: l
|
|
1306
1310
|
}
|
|
1307
1311
|
);
|
|
1308
|
-
},
|
|
1312
|
+
}, It = {
|
|
1309
1313
|
type: "Radio",
|
|
1310
1314
|
label: "web_blocks.radio",
|
|
1311
1315
|
category: "core",
|
|
1312
|
-
icon:
|
|
1316
|
+
icon: ce,
|
|
1313
1317
|
group: "form",
|
|
1314
1318
|
...p({
|
|
1315
1319
|
properties: {
|
|
@@ -1339,23 +1343,23 @@ const ut = (e) => {
|
|
|
1339
1343
|
}),
|
|
1340
1344
|
aiProps: ["label"],
|
|
1341
1345
|
i18nProps: ["label"]
|
|
1342
|
-
},
|
|
1343
|
-
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles:
|
|
1344
|
-
return
|
|
1345
|
-
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
|
|
1346
|
+
}, Ct = (e) => {
|
|
1347
|
+
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, required: c, showLabel: s, _multiple: g, options: m } = e, h = C();
|
|
1348
|
+
return s ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
|
|
1349
|
+
s && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
|
|
1350
|
+
/* @__PURE__ */ k("select", { ...a, id: h, required: c, multiple: g, name: l, children: [
|
|
1351
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
1352
|
+
R(m, (y) => /* @__PURE__ */ i("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
1349
1353
|
] })
|
|
1350
|
-
] }) : /* @__PURE__ */
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
|
|
1354
|
+
] }) : /* @__PURE__ */ k("select", { id: h, ...o, ...t, required: c, multiple: g, name: l, children: [
|
|
1355
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
1356
|
+
R(m, (y) => /* @__PURE__ */ i("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
1353
1357
|
] });
|
|
1354
|
-
},
|
|
1358
|
+
}, Lt = {
|
|
1355
1359
|
type: "Select",
|
|
1356
1360
|
label: "web_blocks.select",
|
|
1357
1361
|
category: "core",
|
|
1358
|
-
icon:
|
|
1362
|
+
icon: O,
|
|
1359
1363
|
group: "form",
|
|
1360
1364
|
...p({
|
|
1361
1365
|
properties: {
|
|
@@ -1410,28 +1414,28 @@ const ut = (e) => {
|
|
|
1410
1414
|
}),
|
|
1411
1415
|
aiProps: ["label", "placeholder"],
|
|
1412
1416
|
i18nProps: ["label", "placeholder"]
|
|
1413
|
-
},
|
|
1414
|
-
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles:
|
|
1415
|
-
return
|
|
1416
|
-
|
|
1417
|
-
/* @__PURE__ */
|
|
1418
|
-
] }) : /* @__PURE__ */
|
|
1417
|
+
}, Pt = (e) => {
|
|
1418
|
+
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, _rows: c, showLabel: s } = e, g = C();
|
|
1419
|
+
return s ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
|
|
1420
|
+
s && /* @__PURE__ */ i("label", { htmlFor: g, children: n }),
|
|
1421
|
+
/* @__PURE__ */ i("textarea", { name: l, ...a, id: g, placeholder: r, rows: c })
|
|
1422
|
+
] }) : /* @__PURE__ */ i(
|
|
1419
1423
|
"textarea",
|
|
1420
1424
|
{
|
|
1421
1425
|
id: g,
|
|
1422
1426
|
name: l,
|
|
1423
1427
|
...t,
|
|
1424
|
-
...
|
|
1425
|
-
...
|
|
1428
|
+
...a,
|
|
1429
|
+
...o,
|
|
1426
1430
|
placeholder: r,
|
|
1427
1431
|
rows: c
|
|
1428
1432
|
}
|
|
1429
1433
|
);
|
|
1430
|
-
},
|
|
1434
|
+
}, Nt = {
|
|
1431
1435
|
type: "TextArea",
|
|
1432
1436
|
label: "web_blocks.textarea",
|
|
1433
1437
|
category: "core",
|
|
1434
|
-
icon:
|
|
1438
|
+
icon: V,
|
|
1435
1439
|
group: "form",
|
|
1436
1440
|
...p({
|
|
1437
1441
|
properties: {
|
|
@@ -1462,11 +1466,11 @@ const ut = (e) => {
|
|
|
1462
1466
|
}),
|
|
1463
1467
|
aiProps: ["label", "placeholder"],
|
|
1464
1468
|
i18nProps: ["label", "placeholder"]
|
|
1465
|
-
},
|
|
1466
|
-
const { blockProps: t, backgroundImage: l, children: n, styles: r, tag:
|
|
1467
|
-
let
|
|
1468
|
-
return l && (
|
|
1469
|
-
},
|
|
1469
|
+
}, Mt = (e) => {
|
|
1470
|
+
const { blockProps: t, backgroundImage: l, children: n, styles: r, tag: o } = e;
|
|
1471
|
+
let a = {};
|
|
1472
|
+
return l && (a = { backgroundImage: `url(${l})` }), I(o || "div", { ...t, ...r, style: a }, n);
|
|
1473
|
+
}, $t = {
|
|
1470
1474
|
type: "Body",
|
|
1471
1475
|
label: "Body",
|
|
1472
1476
|
category: "core",
|
|
@@ -1511,10 +1515,10 @@ const ut = (e) => {
|
|
|
1511
1515
|
canDelete: () => !1,
|
|
1512
1516
|
canMove: () => !1,
|
|
1513
1517
|
canDuplicate: () => !1
|
|
1514
|
-
},
|
|
1518
|
+
}, Dt = (e) => {
|
|
1515
1519
|
const { blockProps: t, styles: l } = e;
|
|
1516
|
-
return
|
|
1517
|
-
},
|
|
1520
|
+
return I("br", { ...t, ...l });
|
|
1521
|
+
}, Tt = {
|
|
1518
1522
|
type: "LineBreak",
|
|
1519
1523
|
label: "Line Break",
|
|
1520
1524
|
category: "core",
|
|
@@ -1529,7 +1533,7 @@ const ut = (e) => {
|
|
|
1529
1533
|
canDelete: () => !1,
|
|
1530
1534
|
canMove: () => !1,
|
|
1531
1535
|
canDuplicate: () => !1
|
|
1532
|
-
},
|
|
1536
|
+
}, M = {
|
|
1533
1537
|
SMALL: {
|
|
1534
1538
|
1: "col-span-1",
|
|
1535
1539
|
2: "col-span-2",
|
|
@@ -1572,20 +1576,20 @@ const ut = (e) => {
|
|
|
1572
1576
|
11: "lg:col-span-11",
|
|
1573
1577
|
12: "lg:col-span-12"
|
|
1574
1578
|
}
|
|
1575
|
-
},
|
|
1576
|
-
const { blockProps: t, children: l, styles: n, colSpan: r, tabletColSpan:
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1579
|
+
}, At = (e) => {
|
|
1580
|
+
const { blockProps: t, children: l, styles: n, colSpan: r, tabletColSpan: o, desktopColSpan: a } = e, s = { className: [
|
|
1581
|
+
v(n, "className", ""),
|
|
1582
|
+
v(M, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1583
|
+
o ? v(M, ["MEDIUM", o || r], "") : "",
|
|
1584
|
+
a ? v(M, ["LARGE", o || r], "") : ""
|
|
1581
1585
|
].join(" ") };
|
|
1582
|
-
return /* @__PURE__ */
|
|
1583
|
-
},
|
|
1586
|
+
return /* @__PURE__ */ i("div", { ...t, ...n, ...s, children: l || /* @__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" }) });
|
|
1587
|
+
}, Et = {
|
|
1584
1588
|
type: "Column",
|
|
1585
1589
|
label: "Column",
|
|
1586
1590
|
group: "basic",
|
|
1587
1591
|
category: "core",
|
|
1588
|
-
icon:
|
|
1592
|
+
icon: me,
|
|
1589
1593
|
wrapper: !0,
|
|
1590
1594
|
canDelete: () => !0,
|
|
1591
1595
|
canAcceptBlock: () => !0,
|
|
@@ -1615,14 +1619,14 @@ const ut = (e) => {
|
|
|
1615
1619
|
}
|
|
1616
1620
|
}
|
|
1617
1621
|
})
|
|
1618
|
-
},
|
|
1619
|
-
const { blockProps: t, children: l, styles: n, gutter: r } = e,
|
|
1620
|
-
return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${r}px` :
|
|
1621
|
-
},
|
|
1622
|
+
}, Rt = (e) => {
|
|
1623
|
+
const { blockProps: t, children: l, styles: n, gutter: r } = e, a = { className: [v(n, "className", ""), " grid grid-cols-12"].join() };
|
|
1624
|
+
return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${r}px` : a.style = { gap: `${r}px` }, /* @__PURE__ */ i("div", { ...t, ...n, ...a, children: l });
|
|
1625
|
+
}, zt = {
|
|
1622
1626
|
type: "Row",
|
|
1623
1627
|
label: "Row",
|
|
1624
1628
|
group: "basic",
|
|
1625
|
-
icon:
|
|
1629
|
+
icon: he,
|
|
1626
1630
|
blocks: () => [
|
|
1627
1631
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1628
1632
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1648,7 +1652,7 @@ const ut = (e) => {
|
|
|
1648
1652
|
}
|
|
1649
1653
|
}
|
|
1650
1654
|
})
|
|
1651
|
-
},
|
|
1655
|
+
}, L = (e, t) => ({
|
|
1652
1656
|
slider: {
|
|
1653
1657
|
"x-data": `{
|
|
1654
1658
|
currentSlide: 0,
|
|
@@ -1692,16 +1696,16 @@ const ut = (e) => {
|
|
|
1692
1696
|
":class": `currentSlide === ${t == null ? void 0 : t.slide} ? '${t == null ? void 0 : t.activeDotClassName}' : '${t == null ? void 0 : t.className}'`,
|
|
1693
1697
|
"x-on:click": `stopAutoplay(); updateCurrentSlide(${t == null ? void 0 : t.slide});`
|
|
1694
1698
|
}
|
|
1695
|
-
})[e] || {},
|
|
1699
|
+
})[e] || {}, Ht = (e) => {
|
|
1696
1700
|
const { blockProps: t, styles: l, children: n, slider: r } = e;
|
|
1697
|
-
return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */
|
|
1701
|
+
return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */ i("div", { ...t, ...l, ...L("prevButton"), children: n });
|
|
1698
1702
|
};
|
|
1699
|
-
u(
|
|
1703
|
+
u(Ht, {
|
|
1700
1704
|
type: "SlidePreviousButton",
|
|
1701
1705
|
label: "Slide Previous",
|
|
1702
1706
|
group: "basic",
|
|
1703
1707
|
category: "core",
|
|
1704
|
-
icon:
|
|
1708
|
+
icon: D,
|
|
1705
1709
|
canDelete: () => !1,
|
|
1706
1710
|
canAcceptBlock: () => !0,
|
|
1707
1711
|
canBeNested: (e) => e === "Slider",
|
|
@@ -1710,20 +1714,20 @@ u(At, {
|
|
|
1710
1714
|
styles: d(
|
|
1711
1715
|
"h-max w-max absolute left-0 top-1/2 -translate-y-1/2 flex items-center justify-center p-2 cursor-pointer"
|
|
1712
1716
|
),
|
|
1713
|
-
slider:
|
|
1717
|
+
slider: _("Slider", "slider")
|
|
1714
1718
|
}
|
|
1715
1719
|
})
|
|
1716
1720
|
});
|
|
1717
|
-
const
|
|
1721
|
+
const jt = (e) => {
|
|
1718
1722
|
const { blockProps: t, styles: l, children: n, slider: r } = e;
|
|
1719
|
-
return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */
|
|
1723
|
+
return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */ i("div", { ...t, ...l, ...L("nextButton"), children: n });
|
|
1720
1724
|
};
|
|
1721
|
-
u(
|
|
1725
|
+
u(jt, {
|
|
1722
1726
|
type: "SlideNextButton",
|
|
1723
1727
|
label: "Slide Next",
|
|
1724
1728
|
group: "basic",
|
|
1725
1729
|
category: "core",
|
|
1726
|
-
icon:
|
|
1730
|
+
icon: fe,
|
|
1727
1731
|
canDelete: () => !1,
|
|
1728
1732
|
canAcceptBlock: () => !0,
|
|
1729
1733
|
canBeNested: (e) => e === "Slider",
|
|
@@ -1732,48 +1736,48 @@ u(Rt, {
|
|
|
1732
1736
|
styles: d(
|
|
1733
1737
|
"h-max w-max absolute right-0 top-1/2 -translate-y-1/2 flex items-center justify-center p-2 cursor-pointer"
|
|
1734
1738
|
),
|
|
1735
|
-
slider:
|
|
1739
|
+
slider: _("Slider", "slider")
|
|
1736
1740
|
}
|
|
1737
1741
|
})
|
|
1738
1742
|
});
|
|
1739
|
-
const
|
|
1740
|
-
var
|
|
1741
|
-
const { blockProps: t, styles: l, children: n = null, inBuilder: r, slider:
|
|
1743
|
+
const qt = (e) => {
|
|
1744
|
+
var a, c, s, g, m;
|
|
1745
|
+
const { blockProps: t, styles: l, children: n = null, inBuilder: r, slider: o } = e;
|
|
1742
1746
|
if (r) {
|
|
1743
|
-
const h = ((c = (
|
|
1744
|
-
return /* @__PURE__ */
|
|
1747
|
+
const h = ((c = (a = e == null ? void 0 : e.children) == null ? void 0 : a.props) == null ? void 0 : c.allBlocks) || ((g = (s = e == null ? void 0 : e.children) == null ? void 0 : s.props) == null ? void 0 : g.blocks) || [], y = o == null ? void 0 : o.currentSlide, f = (m = h == null ? void 0 : h.filter((x) => (x == null ? void 0 : x._parent) === (e == null ? void 0 : e._id))) == null ? void 0 : m.findIndex((x) => (x == null ? void 0 : x._id) === y);
|
|
1748
|
+
return /* @__PURE__ */ i("div", { ...t, ...l, style: { transform: `translateX(-${Math.max(0, f) * 100}%)` }, children: n || /* @__PURE__ */ i("div", { className: "h-full p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
|
|
1745
1749
|
}
|
|
1746
|
-
return /* @__PURE__ */
|
|
1750
|
+
return /* @__PURE__ */ i("div", { ...t, ...l, ...L("slides"), children: n || /* @__PURE__ */ i("div", { className: "h-full p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
|
|
1747
1751
|
};
|
|
1748
|
-
u(
|
|
1752
|
+
u(qt, {
|
|
1749
1753
|
type: "Slides",
|
|
1750
1754
|
label: "Slides",
|
|
1751
1755
|
group: "basic",
|
|
1752
1756
|
category: "core",
|
|
1753
|
-
icon:
|
|
1757
|
+
icon: be,
|
|
1754
1758
|
canDelete: () => !1,
|
|
1755
1759
|
canAcceptBlock: (e) => e === "Slide",
|
|
1756
1760
|
canBeNested: (e) => e === "Slider",
|
|
1757
1761
|
...p({
|
|
1758
1762
|
properties: {
|
|
1759
|
-
slider:
|
|
1763
|
+
slider: _("Slider", "slider"),
|
|
1760
1764
|
styles: d("h-full flex transition-transform duration-500 ease-in-out")
|
|
1761
1765
|
}
|
|
1762
1766
|
})
|
|
1763
1767
|
});
|
|
1764
|
-
const
|
|
1768
|
+
const Ft = (e) => {
|
|
1765
1769
|
const { blockProps: t, styles: l, children: n = null } = e;
|
|
1766
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ i("div", { ...t, ...l, children: n || /* @__PURE__ */ k("div", { className: "flex h-full min-w-full items-center justify-center", children: [
|
|
1767
1771
|
"Slide ",
|
|
1768
1772
|
(e == null ? void 0 : e.index) + 1
|
|
1769
1773
|
] }) });
|
|
1770
1774
|
};
|
|
1771
|
-
u(
|
|
1775
|
+
u(Ft, {
|
|
1772
1776
|
type: "Slide",
|
|
1773
1777
|
label: "Slide",
|
|
1774
1778
|
group: "basic",
|
|
1775
1779
|
category: "core",
|
|
1776
|
-
icon:
|
|
1780
|
+
icon: we,
|
|
1777
1781
|
canDelete: () => !0,
|
|
1778
1782
|
canAcceptBlock: () => !0,
|
|
1779
1783
|
canBeNested: (e) => e === "Slides",
|
|
@@ -1783,23 +1787,23 @@ u(Ht, {
|
|
|
1783
1787
|
}
|
|
1784
1788
|
})
|
|
1785
1789
|
});
|
|
1786
|
-
const
|
|
1787
|
-
var y, f,
|
|
1788
|
-
const { blockProps: t, styles: l, dotStyles: n, activeDotStyles: r, slider:
|
|
1789
|
-
if (!(
|
|
1790
|
-
const
|
|
1791
|
-
return
|
|
1790
|
+
const Gt = (e) => {
|
|
1791
|
+
var y, f, x, E;
|
|
1792
|
+
const { blockProps: t, styles: l, dotStyles: n, activeDotStyles: r, slider: o, inBuilder: a, children: c } = e;
|
|
1793
|
+
if (!(o != null && o.showSlideNavbar) && typeof (o == null ? void 0 : o.showSlideNavbar) == "boolean") return null;
|
|
1794
|
+
const s = ((f = (y = e == null ? void 0 : e.children) == null ? void 0 : y.props) == null ? void 0 : f.allBlocks) || ((E = (x = e == null ? void 0 : e.children) == null ? void 0 : x.props) == null ? void 0 : E.blocks) || [], g = s == null ? void 0 : s.find((b) => (b == null ? void 0 : b._id) === (e == null ? void 0 : e._id)), m = s == null ? void 0 : s.find((b) => (b == null ? void 0 : b._parent) === (g == null ? void 0 : g._parent) && (b == null ? void 0 : b._type) === "Slides"), h = s == null ? void 0 : s.filter((b) => (b == null ? void 0 : b._parent) === (m == null ? void 0 : m._id));
|
|
1795
|
+
return a ? /* @__PURE__ */ i("div", { ...t, ...l, children: h == null ? void 0 : h.map((b, N) => /* @__PURE__ */ i(
|
|
1792
1796
|
"div",
|
|
1793
1797
|
{
|
|
1794
1798
|
...n,
|
|
1795
|
-
...
|
|
1799
|
+
...o != null && o.currentSlide ? (b == null ? void 0 : b._id) === (o == null ? void 0 : o.currentSlide) ? r : {} : N === 0 ? r : {},
|
|
1796
1800
|
children: c
|
|
1797
1801
|
}
|
|
1798
|
-
)) }) : /* @__PURE__ */
|
|
1802
|
+
)) }) : /* @__PURE__ */ i("div", { ...t, ...l, children: h == null ? void 0 : h.map((b, N) => /* @__PURE__ */ i(
|
|
1799
1803
|
"div",
|
|
1800
1804
|
{
|
|
1801
|
-
...
|
|
1802
|
-
slide:
|
|
1805
|
+
...L("sliderNav", {
|
|
1806
|
+
slide: N,
|
|
1803
1807
|
className: n == null ? void 0 : n.className,
|
|
1804
1808
|
activeDotClassName: (r == null ? void 0 : r.className) ?? ""
|
|
1805
1809
|
})
|
|
@@ -1807,12 +1811,12 @@ const qt = (e) => {
|
|
|
1807
1811
|
b == null ? void 0 : b._id
|
|
1808
1812
|
)) });
|
|
1809
1813
|
};
|
|
1810
|
-
u(
|
|
1814
|
+
u(Gt, {
|
|
1811
1815
|
type: "SliderNav",
|
|
1812
1816
|
label: "Slider Navigation",
|
|
1813
1817
|
group: "basic",
|
|
1814
1818
|
category: "core",
|
|
1815
|
-
icon:
|
|
1819
|
+
icon: D,
|
|
1816
1820
|
canDelete: () => !1,
|
|
1817
1821
|
canAcceptBlock: () => !1,
|
|
1818
1822
|
canBeNested: (e) => e === "Slider",
|
|
@@ -1821,18 +1825,18 @@ u(qt, {
|
|
|
1821
1825
|
styles: d("w-full absolute left-0 bottom-0 flex items-center justify-center gap-x-2 p-2"),
|
|
1822
1826
|
dotStyles: d("w-4 h-4 border border-gray-500 rounded-full cursor-pointer"),
|
|
1823
1827
|
activeDotStyles: d("w-4 h-4 rounded-full bg-blue-500"),
|
|
1824
|
-
slider:
|
|
1828
|
+
slider: _("Slider", "slider")
|
|
1825
1829
|
}
|
|
1826
1830
|
})
|
|
1827
1831
|
});
|
|
1828
|
-
const
|
|
1829
|
-
u(
|
|
1832
|
+
const Ut = () => null;
|
|
1833
|
+
u(Ut, {
|
|
1830
1834
|
type: "SliderNavItem",
|
|
1831
1835
|
label: "Slider Nav Item",
|
|
1832
1836
|
group: "basic",
|
|
1833
1837
|
category: "core",
|
|
1834
1838
|
hidden: !0,
|
|
1835
|
-
icon:
|
|
1839
|
+
icon: D,
|
|
1836
1840
|
canDelete: () => !1,
|
|
1837
1841
|
canDuplicate: () => !1,
|
|
1838
1842
|
canAcceptBlock: () => !1,
|
|
@@ -1841,18 +1845,18 @@ u(Ft, {
|
|
|
1841
1845
|
properties: {}
|
|
1842
1846
|
})
|
|
1843
1847
|
});
|
|
1844
|
-
const
|
|
1845
|
-
var
|
|
1846
|
-
const { blockProps: t, styles: l, children: n = null } = e, r = ((g = (
|
|
1847
|
-
totalSlides: ((y = r == null ? void 0 : r.filter((f) => (f == null ? void 0 : f._parent) === (
|
|
1848
|
+
const Ot = (e) => {
|
|
1849
|
+
var s, g, m, h, y;
|
|
1850
|
+
const { blockProps: t, styles: l, children: n = null } = e, r = ((g = (s = e == null ? void 0 : e.children) == null ? void 0 : s.props) == null ? void 0 : g.allBlocks) || ((h = (m = e == null ? void 0 : e.children) == null ? void 0 : m.props) == null ? void 0 : h.blocks) || [], o = r == null ? void 0 : r.find((f) => (f == null ? void 0 : f._parent) === (e == null ? void 0 : e._id) && (f == null ? void 0 : f._type) === "Slides"), c = {
|
|
1851
|
+
totalSlides: ((y = r == null ? void 0 : r.filter((f) => (f == null ? void 0 : f._parent) === (o == null ? void 0 : o._id))) == null ? void 0 : y.length) || 0,
|
|
1848
1852
|
...typeof e.slider == "object" ? e.slider : {}
|
|
1849
1853
|
};
|
|
1850
|
-
return /* @__PURE__ */
|
|
1851
|
-
},
|
|
1854
|
+
return /* @__PURE__ */ i("div", { ...t, ...l, ...L("slider", c), children: n || /* @__PURE__ */ i("div", { className: "h-[60vh] p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
|
|
1855
|
+
}, Vt = {
|
|
1852
1856
|
type: "Slider",
|
|
1853
1857
|
label: "Slider",
|
|
1854
1858
|
category: "core",
|
|
1855
|
-
icon:
|
|
1859
|
+
icon: ke,
|
|
1856
1860
|
group: "basic",
|
|
1857
1861
|
wrapper: !0,
|
|
1858
1862
|
blocks: () => [
|
|
@@ -1916,7 +1920,7 @@ const Gt = (e) => {
|
|
|
1916
1920
|
...p({
|
|
1917
1921
|
properties: {
|
|
1918
1922
|
styles: d("w-full h-[60vh] relative overflow-x-hidden"),
|
|
1919
|
-
slider:
|
|
1923
|
+
slider: q({
|
|
1920
1924
|
type: "object",
|
|
1921
1925
|
properties: {},
|
|
1922
1926
|
default: {
|
|
@@ -1932,9 +1936,9 @@ const Gt = (e) => {
|
|
|
1932
1936
|
})
|
|
1933
1937
|
}
|
|
1934
1938
|
})
|
|
1935
|
-
},
|
|
1936
|
-
u(
|
|
1939
|
+
}, el = () => {
|
|
1940
|
+
u(ve, xe), u(Ce, Le), u(Se, _e), u(Pe, Ne), u(Me, $e), u(Ae, Ee), u(De, Te), u(et, tt), u(Ke, Qe), u(lt, rt), u(nt, ot), u(Xe, Ye), u(Ze, Je), u(ct, dt), u(Be, Ie), u(ze, He), u(it, at), u(ft, bt), u(wt, kt), u(vt, xt), u(mt, ht), u(Bt, It), u(Ct, Lt), u(Pt, Nt), u(St, _t), u(Dt, Tt), u(Mt, $t), u(Ue, Oe), u(je, Ge), u(Ve, We), u(yt, gt), u(Rt, zt), u(At, Et), u(Ot, Vt);
|
|
1937
1941
|
};
|
|
1938
1942
|
export {
|
|
1939
|
-
|
|
1943
|
+
el as loadWebBlocks
|
|
1940
1944
|
};
|