@builder.io/sdk-vue 1.0.23 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/browser/{block-styles-vJjDjr-p.cjs → block-styles-AqsWBh8n.cjs} +1 -1
- package/lib/browser/{block-styles-dCtjVM33.js → block-styles-JAGMZ6Tc.js} +1 -1
- package/lib/browser/{block-wrapper--ZdEHV8w.cjs → block-wrapper-U9mHXcBx.cjs} +1 -1
- package/lib/browser/{block-wrapper-JRsL0Mr2.js → block-wrapper-vQ6TVx4I.js} +3 -3
- package/lib/browser/blocks/button/button.vue.d.ts +9 -2
- package/lib/browser/blocks/columns/columns.types.d.ts +1 -1
- package/lib/browser/blocks/columns/columns.vue.d.ts +10 -7
- package/lib/browser/blocks/columns/helpers.d.ts +1 -0
- package/lib/browser/blocks/symbol/symbol.vue.d.ts +2 -0
- package/lib/browser/blocks/tabs/component-info.d.ts +2 -0
- package/lib/browser/blocks/tabs/index.d.ts +1 -0
- package/lib/browser/blocks/tabs/tabs.types.d.ts +13 -0
- package/lib/browser/blocks/tabs/tabs.vue.d.ts +37 -0
- package/lib/browser/blocks/text/text.types.d.ts +2 -1
- package/lib/browser/component-ref-PB9FQs0H.cjs +1 -0
- package/lib/browser/component-ref-UxXK_oQ9.js +114 -0
- package/lib/browser/components/block/block.helpers.d.ts +2 -0
- package/lib/browser/components/block/components/interactive-element.vue.d.ts +6 -9
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +11 -3
- package/lib/browser/components/content/components/styles.helpers.d.ts +1 -0
- package/lib/browser/components/content/content.vue.d.ts +3 -3
- package/lib/browser/components/dynamic-div.vue.d.ts +14 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{get-block-properties-U49zKnMK.js → get-block-properties-WomY9Uz3.js} +1 -1
- package/lib/browser/{get-block-properties-qdvSfWjS.cjs → get-block-properties-l_2EFz8K.cjs} +1 -1
- package/lib/browser/{index-T89gD77O.js → index-RKqYbwKX.js} +1109 -864
- package/lib/browser/index-XkfCPmFN.cjs +166 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/browser/{repeated-block-GnmpQPxE.cjs → repeated-block-t7OPnrIf.cjs} +1 -1
- package/lib/browser/{repeated-block-oYGHWwW3.js → repeated-block-zjI4fh5M.js} +2 -2
- package/lib/browser/style.css +1 -1
- package/lib/browser/types/targets.d.ts +1 -1
- package/lib/edge/{block-styles-9nbFFeOH.cjs → block-styles-OkLWCtV5.cjs} +1 -1
- package/lib/edge/{block-styles-nidJqmvF.js → block-styles-bkESH_mn.js} +1 -1
- package/lib/{node/block-wrapper-a_fu1ViB.cjs → edge/block-wrapper-KK35HMeY.cjs} +1 -1
- package/lib/edge/{block-wrapper-7WuameoR.js → block-wrapper-VOm7___d.js} +3 -3
- package/lib/edge/blocks/button/button.vue.d.ts +9 -2
- package/lib/edge/blocks/columns/columns.types.d.ts +1 -1
- package/lib/edge/blocks/columns/columns.vue.d.ts +10 -7
- package/lib/edge/blocks/columns/helpers.d.ts +1 -0
- package/lib/edge/blocks/symbol/symbol.vue.d.ts +2 -0
- package/lib/edge/blocks/tabs/component-info.d.ts +2 -0
- package/lib/edge/blocks/tabs/index.d.ts +1 -0
- package/lib/edge/blocks/tabs/tabs.types.d.ts +13 -0
- package/lib/edge/blocks/tabs/tabs.vue.d.ts +37 -0
- package/lib/edge/blocks/text/text.types.d.ts +2 -1
- package/lib/edge/component-ref-3uf44rnP.cjs +1 -0
- package/lib/edge/component-ref-94hspLkE.js +113 -0
- package/lib/edge/components/block/block.helpers.d.ts +2 -0
- package/lib/edge/components/block/components/interactive-element.vue.d.ts +6 -9
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +11 -3
- package/lib/edge/components/content/components/styles.helpers.d.ts +1 -0
- package/lib/edge/components/content/content.vue.d.ts +3 -3
- package/lib/edge/components/dynamic-div.vue.d.ts +14 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties-hpLeBYvo.cjs → get-block-properties-GT0BtW_S.cjs} +1 -1
- package/lib/edge/{get-block-properties-uUwzuzd6.js → get-block-properties-btaXJ-_5.js} +1 -1
- package/lib/edge/{index-hIX7Gefu.js → index-AKG501T6.js} +1667 -1422
- package/lib/edge/index-s5fwQ-TJ.cjs +186 -0
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +1 -1
- package/lib/edge/{repeated-block-otH5LpjC.js → repeated-block-3s5qqStt.js} +2 -2
- package/lib/edge/{repeated-block-TT5biOEz.cjs → repeated-block-Xk06Gj_k.cjs} +1 -1
- package/lib/edge/style.css +1 -1
- package/lib/edge/types/targets.d.ts +1 -1
- package/lib/node/{block-styles-4KxeWlDy.cjs → block-styles-cN_OBvMe.cjs} +1 -1
- package/lib/node/{block-styles-FYc9WmuJ.js → block-styles-uqse0ofP.js} +1 -1
- package/lib/{edge/block-wrapper-OitVCHV4.cjs → node/block-wrapper-YdLCSjlJ.cjs} +1 -1
- package/lib/node/{block-wrapper-NWQoMvJs.js → block-wrapper-ZmFcs2zF.js} +3 -3
- package/lib/node/blocks/button/button.vue.d.ts +9 -2
- package/lib/node/blocks/columns/columns.types.d.ts +1 -1
- package/lib/node/blocks/columns/columns.vue.d.ts +10 -7
- package/lib/node/blocks/columns/helpers.d.ts +1 -0
- package/lib/node/blocks/symbol/symbol.vue.d.ts +2 -0
- package/lib/node/blocks/tabs/component-info.d.ts +2 -0
- package/lib/node/blocks/tabs/index.d.ts +1 -0
- package/lib/node/blocks/tabs/tabs.types.d.ts +13 -0
- package/lib/node/blocks/tabs/tabs.vue.d.ts +37 -0
- package/lib/node/blocks/text/text.types.d.ts +2 -1
- package/lib/node/component-ref-abcMmzlU.js +113 -0
- package/lib/node/component-ref-yx_8RjfE.cjs +1 -0
- package/lib/node/components/block/block.helpers.d.ts +2 -0
- package/lib/node/components/block/components/interactive-element.vue.d.ts +6 -9
- package/lib/node/components/content/components/enable-editor.vue.d.ts +11 -3
- package/lib/node/components/content/components/styles.helpers.d.ts +1 -0
- package/lib/node/components/content/content.vue.d.ts +3 -3
- package/lib/node/components/dynamic-div.vue.d.ts +14 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties-ddOPipN4.js → get-block-properties-I8BzRJR4.js} +1 -1
- package/lib/node/{get-block-properties-DnPEkmGq.cjs → get-block-properties-RkncyAEy.cjs} +1 -1
- package/lib/node/{index-Bc6eCrlT.js → index-212Z9gZB.js} +587 -342
- package/lib/node/index-7bFP53qm.cjs +213 -0
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +1 -1
- package/lib/node/{repeated-block-sdoj-hCY.js → repeated-block-AjtTJdbQ.js} +2 -2
- package/lib/node/{repeated-block-W2kKB7D3.cjs → repeated-block-EdVrtW_u.cjs} +1 -1
- package/lib/node/style.css +1 -1
- package/lib/node/types/targets.d.ts +1 -1
- package/package.json +1 -1
- package/lib/browser/component-ref-IfYzvEjh.js +0 -114
- package/lib/browser/component-ref-YU4cmBVZ.cjs +0 -1
- package/lib/browser/index-YYfrLt1V.cjs +0 -166
- package/lib/edge/component-ref-Z3GxM6cH.cjs +0 -1
- package/lib/edge/component-ref-fkgFjHYh.js +0 -113
- package/lib/edge/index-CKoC6tWI.cjs +0 -186
- package/lib/node/component-ref-jllHNOll.cjs +0 -1
- package/lib/node/component-ref-jqz9fyL1.js +0 -113
- package/lib/node/index-ixVpFh79.cjs +0 -213
|
@@ -14,7 +14,7 @@ function filterAttrs(e = {}, t, n) {
|
|
|
14
14
|
}
|
|
15
15
|
return o;
|
|
16
16
|
}
|
|
17
|
-
const _sfc_main$
|
|
17
|
+
const _sfc_main$r = defineComponent({
|
|
18
18
|
name: "dynamic-renderer",
|
|
19
19
|
props: ["TagName", "attributes", "actionAttributes"],
|
|
20
20
|
data() {
|
|
@@ -26,7 +26,7 @@ const _sfc_main$p = defineComponent({
|
|
|
26
26
|
n[o] = r;
|
|
27
27
|
return n;
|
|
28
28
|
};
|
|
29
|
-
function _sfc_render$
|
|
29
|
+
function _sfc_render$p(e, t, n, o, r, s) {
|
|
30
30
|
return e.isEmptyElement(e.TagName) ? (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 1 }, e.attributes, toHandlers(e.actionAttributes)), null, 16)) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
31
31
|
typeof e.TagName == "string" ? (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 0 }, e.attributes, toHandlers(e.actionAttributes)), {
|
|
32
32
|
default: withCtx(() => [
|
|
@@ -41,7 +41,7 @@ function _sfc_render$n(e, t, n, o, r, s) {
|
|
|
41
41
|
}, 16))
|
|
42
42
|
], 64));
|
|
43
43
|
}
|
|
44
|
-
const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
44
|
+
const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$p]]), dynamicRenderer = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
45
45
|
__proto__: null,
|
|
46
46
|
default: DynamicRenderer
|
|
47
47
|
}, Symbol.toStringTag, { value: "Module" })), TARGET = "vue", getClassPropName = () => {
|
|
@@ -54,9 +54,10 @@ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sf
|
|
|
54
54
|
case "vue":
|
|
55
55
|
case "solid":
|
|
56
56
|
case "qwik":
|
|
57
|
+
case "angular":
|
|
57
58
|
return "class";
|
|
58
59
|
}
|
|
59
|
-
}, _sfc_main$
|
|
60
|
+
}, _sfc_main$q = defineComponent({
|
|
60
61
|
name: "builder-button",
|
|
61
62
|
components: { DynamicRenderer },
|
|
62
63
|
props: [
|
|
@@ -67,23 +68,28 @@ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sf
|
|
|
67
68
|
"text"
|
|
68
69
|
],
|
|
69
70
|
data() {
|
|
70
|
-
return {
|
|
71
|
+
return { filterAttrs };
|
|
72
|
+
},
|
|
73
|
+
methods: {
|
|
74
|
+
attrs() {
|
|
75
|
+
return {
|
|
76
|
+
...filterAttrs(this.attributes, "v-on:", !1),
|
|
77
|
+
[getClassPropName()]: `${this.link ? "" : "builder-button"} ${this.attributes[getClassPropName()] || ""}`,
|
|
78
|
+
...this.link ? {
|
|
79
|
+
href: this.link,
|
|
80
|
+
target: this.openLinkInNewTab ? "_blank" : void 0,
|
|
81
|
+
role: "link"
|
|
82
|
+
} : {
|
|
83
|
+
role: "button"
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
71
87
|
}
|
|
72
88
|
});
|
|
73
|
-
function _sfc_render$
|
|
89
|
+
function _sfc_render$o(e, t, n, o, r, s) {
|
|
74
90
|
const i = resolveComponent("dynamic-renderer");
|
|
75
91
|
return openBlock(), createBlock(i, {
|
|
76
|
-
attributes:
|
|
77
|
-
...e.filterAttrs(e.attributes, "v-on:", !1),
|
|
78
|
-
[e.getClassPropName()]: `${e.link ? "" : "builder-button"} ${e.attributes[e.getClassPropName()] || ""}`,
|
|
79
|
-
...e.link ? {
|
|
80
|
-
href: e.link,
|
|
81
|
-
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
82
|
-
role: "link"
|
|
83
|
-
} : {
|
|
84
|
-
role: "button"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
92
|
+
attributes: e.attrs(),
|
|
87
93
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
88
94
|
actionAttributes: e.filterAttrs(e.attributes, "v-on:", !0)
|
|
89
95
|
}, {
|
|
@@ -93,7 +99,7 @@ function _sfc_render$m(e, t, n, o, r, s) {
|
|
|
93
99
|
_: 1
|
|
94
100
|
}, 8, ["attributes", "TagName", "actionAttributes"]);
|
|
95
101
|
}
|
|
96
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
102
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$o]]), key$1 = Symbol(), BuilderContext = {
|
|
97
103
|
Builder: {
|
|
98
104
|
content: null,
|
|
99
105
|
context: {},
|
|
@@ -340,17 +346,17 @@ const getIvm = () => {
|
|
|
340
346
|
const a = getIvm(), l = fastClone({
|
|
341
347
|
...i,
|
|
342
348
|
...r
|
|
343
|
-
}),
|
|
349
|
+
}), d = getFunctionArguments({
|
|
344
350
|
builder: t,
|
|
345
351
|
context: n,
|
|
346
352
|
event: o,
|
|
347
353
|
state: l
|
|
348
|
-
}),
|
|
349
|
-
|
|
354
|
+
}), p = getIsolateContext(), c = p.global;
|
|
355
|
+
c.setSync("global", c.derefInto()), c.setSync("log", function(...m) {
|
|
350
356
|
console.log(...m);
|
|
351
|
-
}),
|
|
357
|
+
}), c.setSync(BUILDER_SET_STATE_NAME, function(m, b) {
|
|
352
358
|
set(i, m, b), s == null || s(i);
|
|
353
|
-
}),
|
|
359
|
+
}), d.forEach(([m, b]) => {
|
|
354
360
|
const S = typeof b == "object" ? new a.Reference(
|
|
355
361
|
// workaround: methods with default values for arguments is not being cloned over
|
|
356
362
|
m === "builder" ? {
|
|
@@ -358,12 +364,12 @@ const getIvm = () => {
|
|
|
358
364
|
getUserAttributes: () => b.getUserAttributes()
|
|
359
365
|
} : b
|
|
360
366
|
) : null;
|
|
361
|
-
|
|
362
|
-
}),
|
|
363
|
-
const
|
|
367
|
+
c.setSync(getSyncValName(m), S);
|
|
368
|
+
}), c.setSync(INJECTED_IVM_GLOBAL, a);
|
|
369
|
+
const u = processCode({
|
|
364
370
|
code: e,
|
|
365
|
-
args:
|
|
366
|
-
}), f =
|
|
371
|
+
args: d
|
|
372
|
+
}), f = p.evalSync(u);
|
|
367
373
|
try {
|
|
368
374
|
return JSON.parse(f);
|
|
369
375
|
} catch {
|
|
@@ -424,19 +430,19 @@ function evaluate({
|
|
|
424
430
|
localState: n
|
|
425
431
|
};
|
|
426
432
|
if (a) {
|
|
427
|
-
const
|
|
428
|
-
if (
|
|
429
|
-
return
|
|
433
|
+
const d = EvalCache.getCacheKey(l), p = EvalCache.getCachedValue(d);
|
|
434
|
+
if (p)
|
|
435
|
+
return p.value;
|
|
430
436
|
}
|
|
431
437
|
try {
|
|
432
|
-
const
|
|
438
|
+
const d = chooseBrowserOrServerEval(l);
|
|
433
439
|
if (a) {
|
|
434
|
-
const
|
|
435
|
-
EvalCache.setCachedValue(
|
|
440
|
+
const p = EvalCache.getCacheKey(l);
|
|
441
|
+
EvalCache.setCachedValue(p, d);
|
|
436
442
|
}
|
|
437
|
-
return
|
|
438
|
-
} catch (
|
|
439
|
-
logger.error("Failed code evaluation: " +
|
|
443
|
+
return d;
|
|
444
|
+
} catch (d) {
|
|
445
|
+
logger.error("Failed code evaluation: " + d.message, {
|
|
440
446
|
code: e
|
|
441
447
|
});
|
|
442
448
|
return;
|
|
@@ -464,7 +470,7 @@ const evaluateBindings = ({
|
|
|
464
470
|
}
|
|
465
471
|
};
|
|
466
472
|
for (const a in e.bindings) {
|
|
467
|
-
const l = e.bindings[a],
|
|
473
|
+
const l = e.bindings[a], d = evaluate({
|
|
468
474
|
code: l,
|
|
469
475
|
localState: n,
|
|
470
476
|
rootState: o,
|
|
@@ -472,7 +478,7 @@ const evaluateBindings = ({
|
|
|
472
478
|
context: t,
|
|
473
479
|
enableCache: !0
|
|
474
480
|
});
|
|
475
|
-
set(i, a,
|
|
481
|
+
set(i, a, d);
|
|
476
482
|
}
|
|
477
483
|
return i;
|
|
478
484
|
};
|
|
@@ -499,10 +505,10 @@ function throttle(e, t, n = {}) {
|
|
|
499
505
|
a = n.leading === !1 ? 0 : Date.now(), i = null, s = e.apply(o, r), i || (o = r = null);
|
|
500
506
|
};
|
|
501
507
|
return function() {
|
|
502
|
-
const
|
|
503
|
-
!a && n.leading === !1 && (a =
|
|
504
|
-
const
|
|
505
|
-
return o = this, r = arguments,
|
|
508
|
+
const d = Date.now();
|
|
509
|
+
!a && n.leading === !1 && (a = d);
|
|
510
|
+
const p = t - (d - a);
|
|
511
|
+
return o = this, r = arguments, p <= 0 || p > t ? (i && (clearTimeout(i), i = null), a = d, s = e.apply(o, r), i || (o = r = null)) : !i && n.trailing !== !1 && (i = setTimeout(l, p)), s;
|
|
506
512
|
};
|
|
507
513
|
}
|
|
508
514
|
function assign(e, ...t) {
|
|
@@ -576,15 +582,15 @@ function bindScrollInViewAnimation(e) {
|
|
|
576
582
|
const i = throttle(s, 200, {
|
|
577
583
|
leading: !1
|
|
578
584
|
});
|
|
579
|
-
function a(
|
|
580
|
-
const
|
|
581
|
-
return
|
|
585
|
+
function a(p) {
|
|
586
|
+
const c = p.getBoundingClientRect(), u = window.innerHeight, m = (e.thresholdPercent || 0) / 100 * u;
|
|
587
|
+
return c.bottom > m && c.top < u - m;
|
|
582
588
|
}
|
|
583
589
|
const l = e.steps[0].styles;
|
|
584
|
-
function
|
|
590
|
+
function d() {
|
|
585
591
|
assign(n.style, l);
|
|
586
592
|
}
|
|
587
|
-
|
|
593
|
+
d(), setTimeout(() => {
|
|
588
594
|
n.style.transition = `all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
589
595
|
}), document.addEventListener("scroll", i, {
|
|
590
596
|
capture: !0,
|
|
@@ -626,6 +632,7 @@ function mapStyleObjToStrIfNeeded(e) {
|
|
|
626
632
|
case "svelte":
|
|
627
633
|
case "vue":
|
|
628
634
|
case "solid":
|
|
635
|
+
case "angular":
|
|
629
636
|
return convertStyleMapToCSSArray(e).join(" ");
|
|
630
637
|
case "qwik":
|
|
631
638
|
case "reactNative":
|
|
@@ -677,46 +684,52 @@ const getComponent = ({
|
|
|
677
684
|
if (!Array.isArray(r))
|
|
678
685
|
return;
|
|
679
686
|
const s = n.collection.split(".").pop(), i = n.itemName || (s ? s + "Item" : "item");
|
|
680
|
-
return r.map((l,
|
|
687
|
+
return r.map((l, d) => ({
|
|
681
688
|
context: {
|
|
682
689
|
...t,
|
|
683
690
|
localState: {
|
|
684
691
|
...t.localState,
|
|
685
|
-
$index:
|
|
692
|
+
$index: d,
|
|
686
693
|
$item: l,
|
|
687
694
|
[i]: l,
|
|
688
|
-
[`$${i}Index`]:
|
|
695
|
+
[`$${i}Index`]: d
|
|
689
696
|
}
|
|
690
697
|
},
|
|
691
698
|
block: o
|
|
692
699
|
}));
|
|
693
|
-
}, BlockStyles = () => import("./block-styles-
|
|
700
|
+
}, shouldPassLinkComponent = (e) => e && ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(e), shouldPassRegisteredComponents = (e) => e && ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(e), BlockStyles = () => import("./block-styles-uqse0ofP.js").then((e) => e.default).catch((e) => {
|
|
694
701
|
throw console.error(
|
|
695
702
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
696
703
|
e
|
|
697
704
|
), e;
|
|
698
|
-
}), BlockWrapper = () => import("./block-wrapper-
|
|
705
|
+
}), BlockWrapper = () => import("./block-wrapper-ZmFcs2zF.js").then((e) => e.default).catch((e) => {
|
|
699
706
|
throw console.error(
|
|
700
707
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
701
708
|
e
|
|
702
709
|
), e;
|
|
703
|
-
}), ComponentRef = () => import("./component-ref-
|
|
710
|
+
}), ComponentRef = () => import("./component-ref-abcMmzlU.js").then((e) => e.default).catch((e) => {
|
|
704
711
|
throw console.error(
|
|
705
712
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
706
713
|
e
|
|
707
714
|
), e;
|
|
708
|
-
}), RepeatedBlock = () => import("./repeated-block-
|
|
715
|
+
}), RepeatedBlock = () => import("./repeated-block-AjtTJdbQ.js").then((e) => e.default).catch((e) => {
|
|
709
716
|
throw console.error(
|
|
710
717
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
711
718
|
e
|
|
712
719
|
), e;
|
|
713
|
-
}),
|
|
720
|
+
}), DynamicDiv$1 = () => Promise.resolve().then(() => dynamicDiv).then((e) => e.default).catch((e) => {
|
|
721
|
+
throw console.error(
|
|
722
|
+
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
723
|
+
e
|
|
724
|
+
), e;
|
|
725
|
+
}), _sfc_main$p = defineComponent({
|
|
714
726
|
name: "block",
|
|
715
727
|
components: {
|
|
716
728
|
BlockStyles: defineAsyncComponent(BlockStyles),
|
|
717
729
|
ComponentRef: defineAsyncComponent(ComponentRef),
|
|
718
730
|
RepeatedBlock: defineAsyncComponent(RepeatedBlock),
|
|
719
|
-
BlockWrapper: defineAsyncComponent(BlockWrapper)
|
|
731
|
+
BlockWrapper: defineAsyncComponent(BlockWrapper),
|
|
732
|
+
DynamicDiv: defineAsyncComponent(DynamicDiv$1)
|
|
720
733
|
},
|
|
721
734
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
722
735
|
mounted() {
|
|
@@ -769,17 +782,17 @@ const getComponent = ({
|
|
|
769
782
|
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ? this.processedBlock.children ?? [] : [];
|
|
770
783
|
},
|
|
771
784
|
componentRefProps() {
|
|
772
|
-
var e, t, n, o, r
|
|
785
|
+
var e, t, n, o, r;
|
|
773
786
|
return {
|
|
774
787
|
blockChildren: this.processedBlock.children ?? [],
|
|
775
788
|
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
776
789
|
componentOptions: {
|
|
777
790
|
...getBlockComponentOptions(this.processedBlock),
|
|
778
791
|
builderContext: this.context,
|
|
779
|
-
...((t = this.blockComponent) == null ? void 0 : t.name)
|
|
792
|
+
...shouldPassLinkComponent((t = this.blockComponent) == null ? void 0 : t.name) ? {
|
|
780
793
|
builderLinkComponent: this.linkComponent
|
|
781
794
|
} : {},
|
|
782
|
-
...((
|
|
795
|
+
...shouldPassRegisteredComponents((n = this.blockComponent) == null ? void 0 : n.name) ? {
|
|
783
796
|
builderComponents: this.registeredComponents
|
|
784
797
|
} : {}
|
|
785
798
|
},
|
|
@@ -787,21 +800,21 @@ const getComponent = ({
|
|
|
787
800
|
linkComponent: this.linkComponent,
|
|
788
801
|
registeredComponents: this.registeredComponents,
|
|
789
802
|
builderBlock: this.processedBlock,
|
|
790
|
-
includeBlockProps: ((
|
|
791
|
-
isInteractive: !((
|
|
803
|
+
includeBlockProps: ((o = this.blockComponent) == null ? void 0 : o.noWrap) === !0,
|
|
804
|
+
isInteractive: !((r = this.blockComponent) != null && r.isRSC)
|
|
792
805
|
};
|
|
793
806
|
}
|
|
794
807
|
}
|
|
795
808
|
});
|
|
796
|
-
function _sfc_render$
|
|
797
|
-
var
|
|
798
|
-
const i = resolveComponent("block-styles"), a = resolveComponent("component-ref"), l = resolveComponent("block", !0),
|
|
809
|
+
function _sfc_render$n(e, t, n, o, r, s) {
|
|
810
|
+
var c;
|
|
811
|
+
const i = resolveComponent("block-styles"), a = resolveComponent("component-ref"), l = resolveComponent("block", !0), d = resolveComponent("block-wrapper"), p = resolveComponent("repeated-block");
|
|
799
812
|
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
800
813
|
createVNode(i, {
|
|
801
814
|
block: e.block,
|
|
802
815
|
context: e.context
|
|
803
816
|
}, null, 8, ["block", "context"]),
|
|
804
|
-
(
|
|
817
|
+
(c = e.blockComponent) != null && c.noWrap ? (openBlock(), createBlock(a, {
|
|
805
818
|
key: 1,
|
|
806
819
|
componentRef: e.componentRefProps.componentRef,
|
|
807
820
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -813,13 +826,13 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
813
826
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
814
827
|
isInteractive: e.componentRefProps.isInteractive
|
|
815
828
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"])) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
816
|
-
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (
|
|
829
|
+
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (u, f) => (openBlock(), createBlock(p, {
|
|
817
830
|
key: f,
|
|
818
|
-
repeatContext:
|
|
819
|
-
block:
|
|
831
|
+
repeatContext: u.context,
|
|
832
|
+
block: u.block,
|
|
820
833
|
registeredComponents: e.registeredComponents,
|
|
821
834
|
linkComponent: e.linkComponent
|
|
822
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(
|
|
835
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(d, {
|
|
823
836
|
key: 0,
|
|
824
837
|
Wrapper: e.Tag,
|
|
825
838
|
block: e.processedBlock,
|
|
@@ -838,9 +851,9 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
838
851
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
839
852
|
isInteractive: e.componentRefProps.isInteractive
|
|
840
853
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
841
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (
|
|
842
|
-
key:
|
|
843
|
-
block:
|
|
854
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (u, f) => (openBlock(), createBlock(l, {
|
|
855
|
+
key: u.id,
|
|
856
|
+
block: u,
|
|
844
857
|
registeredComponents: e.registeredComponents,
|
|
845
858
|
linkComponent: e.linkComponent,
|
|
846
859
|
context: e.context
|
|
@@ -851,10 +864,10 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
851
864
|
], 64))
|
|
852
865
|
], 64)) : createCommentVNode("", !0);
|
|
853
866
|
}
|
|
854
|
-
const Block = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
867
|
+
const Block = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$n]]), block = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
855
868
|
__proto__: null,
|
|
856
869
|
default: Block
|
|
857
|
-
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$
|
|
870
|
+
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$o = defineComponent({
|
|
858
871
|
name: "builder-blocks-wrapper",
|
|
859
872
|
props: [
|
|
860
873
|
"blocks",
|
|
@@ -899,9 +912,9 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l
|
|
|
899
912
|
}
|
|
900
913
|
}
|
|
901
914
|
});
|
|
902
|
-
function _sfc_render$
|
|
915
|
+
function _sfc_render$m(e, t, n, o, r, s) {
|
|
903
916
|
return openBlock(), createBlock(resolveDynamicComponent(e.BlocksWrapper), mergeProps({
|
|
904
|
-
class: e.className + " component-
|
|
917
|
+
class: e.className + " component-178o76acnws",
|
|
905
918
|
"builder-path": e.path,
|
|
906
919
|
"builder-parent-id": e.parent,
|
|
907
920
|
style: e.styleProp,
|
|
@@ -915,7 +928,7 @@ function _sfc_render$k(e, t, n, o, r, s) {
|
|
|
915
928
|
_: 3
|
|
916
929
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
917
930
|
}
|
|
918
|
-
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
931
|
+
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$m], ["__scopeId", "data-v-a5b13ef9"]]), _sfc_main$n = defineComponent({
|
|
919
932
|
name: "builder-blocks",
|
|
920
933
|
components: { BlocksWrapper, Block },
|
|
921
934
|
props: [
|
|
@@ -932,8 +945,8 @@ const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_
|
|
|
932
945
|
componentsContext: ComponentsContext.key
|
|
933
946
|
}
|
|
934
947
|
});
|
|
935
|
-
function _sfc_render$
|
|
936
|
-
var l,
|
|
948
|
+
function _sfc_render$l(e, t, n, o, r, s) {
|
|
949
|
+
var l, d;
|
|
937
950
|
const i = resolveComponent("block"), a = resolveComponent("blocks-wrapper");
|
|
938
951
|
return openBlock(), createBlock(a, {
|
|
939
952
|
blocks: e.blocks,
|
|
@@ -941,12 +954,12 @@ function _sfc_render$j(e, t, n, o, r, s) {
|
|
|
941
954
|
path: e.path,
|
|
942
955
|
styleProp: e.styleProp,
|
|
943
956
|
BlocksWrapper: ((l = e.context) == null ? void 0 : l.BlocksWrapper) || e.builderContext.BlocksWrapper,
|
|
944
|
-
BlocksWrapperProps: ((
|
|
957
|
+
BlocksWrapperProps: ((d = e.context) == null ? void 0 : d.BlocksWrapperProps) || e.builderContext.BlocksWrapperProps
|
|
945
958
|
}, {
|
|
946
959
|
default: withCtx(() => [
|
|
947
|
-
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (
|
|
948
|
-
key:
|
|
949
|
-
block:
|
|
960
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (p, c) => (openBlock(), createBlock(i, {
|
|
961
|
+
key: p.id,
|
|
962
|
+
block: p,
|
|
950
963
|
linkComponent: e.linkComponent,
|
|
951
964
|
context: e.context || e.builderContext,
|
|
952
965
|
registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
|
|
@@ -955,7 +968,7 @@ function _sfc_render$j(e, t, n, o, r, s) {
|
|
|
955
968
|
_: 1
|
|
956
969
|
}, 8, ["blocks", "parent", "path", "styleProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
957
970
|
}
|
|
958
|
-
const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
971
|
+
const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]]), _sfc_main$m = defineComponent({
|
|
959
972
|
render() {
|
|
960
973
|
return h("style", {
|
|
961
974
|
innerHTML: this.styles,
|
|
@@ -1006,21 +1019,34 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$
|
|
|
1006
1019
|
min: s,
|
|
1007
1020
|
default: s + 1
|
|
1008
1021
|
}, n;
|
|
1009
|
-
}, _sfc_main$
|
|
1022
|
+
}, getColumnsClass = (e) => `builder-columns ${e}-breakpoints`, _sfc_main$l = defineComponent({
|
|
1023
|
+
name: "dynamic-div",
|
|
1024
|
+
props: []
|
|
1025
|
+
});
|
|
1026
|
+
function _sfc_render$k(e, t, n, o, r, s) {
|
|
1027
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1028
|
+
renderSlot(e.$slots, "default")
|
|
1029
|
+
]);
|
|
1030
|
+
}
|
|
1031
|
+
const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k]]), dynamicDiv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1032
|
+
__proto__: null,
|
|
1033
|
+
default: DynamicDiv
|
|
1034
|
+
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$k = defineComponent({
|
|
1010
1035
|
name: "builder-columns",
|
|
1011
1036
|
components: {
|
|
1012
|
-
InlinedStyles: _sfc_main$
|
|
1037
|
+
InlinedStyles: _sfc_main$m,
|
|
1013
1038
|
DynamicRenderer,
|
|
1014
|
-
Blocks
|
|
1039
|
+
Blocks,
|
|
1040
|
+
DynamicDiv
|
|
1015
1041
|
},
|
|
1016
1042
|
props: [
|
|
1017
1043
|
"space",
|
|
1018
1044
|
"columns",
|
|
1019
1045
|
"stackColumnsAt",
|
|
1046
|
+
"builderLinkComponent",
|
|
1020
1047
|
"reverseColumnsWhenStacked",
|
|
1021
1048
|
"builderContext",
|
|
1022
1049
|
"builderBlock",
|
|
1023
|
-
"builderLinkComponent",
|
|
1024
1050
|
"builderComponents"
|
|
1025
1051
|
],
|
|
1026
1052
|
data() {
|
|
@@ -1030,49 +1056,13 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$
|
|
|
1030
1056
|
stackAt: this.stackColumnsAt || "tablet",
|
|
1031
1057
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
1032
1058
|
TARGET,
|
|
1033
|
-
|
|
1034
|
-
mapStyleObjToStrIfNeeded
|
|
1059
|
+
getColumnsClass
|
|
1035
1060
|
};
|
|
1036
1061
|
},
|
|
1037
|
-
computed: {
|
|
1038
|
-
columnsCssVars() {
|
|
1039
|
-
return {
|
|
1040
|
-
"--flex-dir": this.flexDir,
|
|
1041
|
-
"--flex-dir-tablet": this.getTabletStyle({
|
|
1042
|
-
stackedStyle: this.flexDir,
|
|
1043
|
-
desktopStyle: "row"
|
|
1044
|
-
})
|
|
1045
|
-
};
|
|
1046
|
-
},
|
|
1047
|
-
columnsStyles() {
|
|
1048
|
-
return `
|
|
1049
|
-
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
1050
|
-
.${this.builderBlock.id}-breakpoints {
|
|
1051
|
-
flex-direction: var(--flex-dir-tablet);
|
|
1052
|
-
align-items: stretch;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
1056
|
-
width: var(--column-width-tablet) !important;
|
|
1057
|
-
margin-left: var(--column-margin-left-tablet) !important;
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
1062
|
-
.${this.builderBlock.id}-breakpoints {
|
|
1063
|
-
flex-direction: var(--flex-dir);
|
|
1064
|
-
align-items: stretch;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
1068
|
-
width: var(--column-width-mobile) !important;
|
|
1069
|
-
margin-left: var(--column-margin-left-mobile) !important;
|
|
1070
|
-
}
|
|
1071
|
-
},
|
|
1072
|
-
`;
|
|
1073
|
-
}
|
|
1074
|
-
},
|
|
1075
1062
|
methods: {
|
|
1063
|
+
getTagName(e) {
|
|
1064
|
+
return e.link ? this.builderLinkComponent || "a" : "div";
|
|
1065
|
+
},
|
|
1076
1066
|
getWidth(e) {
|
|
1077
1067
|
var t;
|
|
1078
1068
|
return ((t = this.cols[e]) == null ? void 0 : t.width) || 100 / this.cols.length;
|
|
@@ -1093,6 +1083,15 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$
|
|
|
1093
1083
|
}) {
|
|
1094
1084
|
return this.stackAt === "never" ? t : e;
|
|
1095
1085
|
},
|
|
1086
|
+
columnsCssVars() {
|
|
1087
|
+
return {
|
|
1088
|
+
"--flex-dir": this.flexDir,
|
|
1089
|
+
"--flex-dir-tablet": this.getTabletStyle({
|
|
1090
|
+
stackedStyle: this.flexDir,
|
|
1091
|
+
desktopStyle: "row"
|
|
1092
|
+
})
|
|
1093
|
+
};
|
|
1094
|
+
},
|
|
1096
1095
|
columnCssVars(e) {
|
|
1097
1096
|
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%", s = 0;
|
|
1098
1097
|
return {
|
|
@@ -1126,35 +1125,66 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$
|
|
|
1126
1125
|
return getSizesForBreakpoints(
|
|
1127
1126
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
1128
1127
|
)[e].max;
|
|
1128
|
+
},
|
|
1129
|
+
columnsStyles() {
|
|
1130
|
+
return `
|
|
1131
|
+
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
1132
|
+
.${this.builderBlock.id}-breakpoints {
|
|
1133
|
+
flex-direction: var(--flex-dir-tablet);
|
|
1134
|
+
align-items: stretch;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
1138
|
+
width: var(--column-width-tablet) !important;
|
|
1139
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
1144
|
+
.${this.builderBlock.id}-breakpoints {
|
|
1145
|
+
flex-direction: var(--flex-dir);
|
|
1146
|
+
align-items: stretch;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
1150
|
+
width: var(--column-width-mobile) !important;
|
|
1151
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
1152
|
+
}
|
|
1153
|
+
},
|
|
1154
|
+
`;
|
|
1155
|
+
},
|
|
1156
|
+
getAttributes(e, t) {
|
|
1157
|
+
return {
|
|
1158
|
+
...e.link ? {
|
|
1159
|
+
href: e.link
|
|
1160
|
+
} : {},
|
|
1161
|
+
[getClassPropName()]: "builder-column",
|
|
1162
|
+
style: mapStyleObjToStrIfNeeded(this.columnCssVars(t))
|
|
1163
|
+
};
|
|
1129
1164
|
}
|
|
1130
1165
|
}
|
|
1131
1166
|
});
|
|
1132
|
-
function _sfc_render$
|
|
1167
|
+
function _sfc_render$j(e, t, n, o, r, s) {
|
|
1168
|
+
var d;
|
|
1133
1169
|
const i = resolveComponent("inlined-styles"), a = resolveComponent("blocks"), l = resolveComponent("dynamic-renderer");
|
|
1134
1170
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
1135
|
-
class:
|
|
1136
|
-
style: e.columnsCssVars
|
|
1171
|
+
class: e.getColumnsClass((d = e.builderBlock) == null ? void 0 : d.id) + " div-t9spj7joih",
|
|
1172
|
+
style: e.columnsCssVars()
|
|
1137
1173
|
}, {}), [
|
|
1138
1174
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
1139
1175
|
key: 0,
|
|
1140
1176
|
id: "builderio-columns",
|
|
1141
|
-
styles: e.columnsStyles
|
|
1177
|
+
styles: e.columnsStyles()
|
|
1142
1178
|
}, null, 8, ["styles"])) : createCommentVNode("", !0),
|
|
1143
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (
|
|
1144
|
-
key:
|
|
1145
|
-
TagName:
|
|
1179
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (p, c) => (openBlock(), createBlock(l, {
|
|
1180
|
+
key: c,
|
|
1181
|
+
TagName: e.getTagName(p),
|
|
1146
1182
|
actionAttributes: {},
|
|
1147
|
-
attributes:
|
|
1148
|
-
...c.link ? {
|
|
1149
|
-
href: c.link
|
|
1150
|
-
} : {},
|
|
1151
|
-
[e.getClassPropName()]: "builder-column",
|
|
1152
|
-
style: e.mapStyleObjToStrIfNeeded(e.columnCssVars(u))
|
|
1153
|
-
}
|
|
1183
|
+
attributes: e.getAttributes(p, c)
|
|
1154
1184
|
}, {
|
|
1155
1185
|
default: withCtx(() => [
|
|
1156
1186
|
createVNode(a, {
|
|
1157
|
-
path: `component.options.columns.${
|
|
1187
|
+
path: `component.options.columns.${c}.blocks`,
|
|
1158
1188
|
parent: e.builderBlock.id,
|
|
1159
1189
|
styleProp: {
|
|
1160
1190
|
flexGrow: "1"
|
|
@@ -1162,23 +1192,23 @@ function _sfc_render$i(e, t, n, o, r, s) {
|
|
|
1162
1192
|
context: e.builderContext,
|
|
1163
1193
|
registeredComponents: e.builderComponents,
|
|
1164
1194
|
linkComponent: e.builderLinkComponent,
|
|
1165
|
-
blocks:
|
|
1195
|
+
blocks: p.blocks
|
|
1166
1196
|
}, null, 8, ["path", "parent", "context", "registeredComponents", "linkComponent", "blocks"])
|
|
1167
1197
|
]),
|
|
1168
1198
|
_: 2
|
|
1169
1199
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1170
1200
|
], 16);
|
|
1171
1201
|
}
|
|
1172
|
-
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1202
|
+
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-4878b55f"]]), _sfc_main$j = defineComponent({
|
|
1173
1203
|
name: "builder-fragment-component",
|
|
1174
1204
|
props: []
|
|
1175
1205
|
});
|
|
1176
|
-
function _sfc_render$
|
|
1206
|
+
function _sfc_render$i(e, t, n, o, r, s) {
|
|
1177
1207
|
return openBlock(), createElementBlock("span", null, [
|
|
1178
1208
|
renderSlot(e.$slots, "default")
|
|
1179
1209
|
]);
|
|
1180
1210
|
}
|
|
1181
|
-
const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1211
|
+
const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i]]);
|
|
1182
1212
|
function removeProtocol(e) {
|
|
1183
1213
|
return e.replace(/http(s)?:/, "");
|
|
1184
1214
|
}
|
|
@@ -1209,7 +1239,7 @@ function getSrcSet(e) {
|
|
|
1209
1239
|
}
|
|
1210
1240
|
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [getShopifyImageUrl(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
1211
1241
|
}
|
|
1212
|
-
const _sfc_main$
|
|
1242
|
+
const _sfc_main$i = defineComponent({
|
|
1213
1243
|
name: "builder-image",
|
|
1214
1244
|
props: [
|
|
1215
1245
|
"image",
|
|
@@ -1255,19 +1285,19 @@ const _sfc_main$h = defineComponent({
|
|
|
1255
1285
|
return this.aspectRatio ? e : void 0;
|
|
1256
1286
|
}
|
|
1257
1287
|
}
|
|
1258
|
-
}), _hoisted_1$
|
|
1288
|
+
}), _hoisted_1$9 = ["srcset"], _hoisted_2$4 = ["alt", "role", "src", "srcset", "sizes"], _hoisted_3$1 = {
|
|
1259
1289
|
key: 2,
|
|
1260
|
-
class: "div-
|
|
1290
|
+
class: "div-20351ewpue7-2"
|
|
1261
1291
|
};
|
|
1262
|
-
function _sfc_render$
|
|
1263
|
-
var i, a, l, c;
|
|
1292
|
+
function _sfc_render$h(e, t, n, o, r, s) {
|
|
1293
|
+
var i, a, l, d, p, c;
|
|
1264
1294
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
1265
1295
|
createElementVNode("picture", null, [
|
|
1266
1296
|
e.webpSrcSet ? (openBlock(), createElementBlock("source", {
|
|
1267
1297
|
key: 0,
|
|
1268
1298
|
type: "image/webp",
|
|
1269
1299
|
srcset: e.webpSrcSet
|
|
1270
|
-
}, null, 8, _hoisted_1$
|
|
1300
|
+
}, null, 8, _hoisted_1$9)) : createCommentVNode("", !0),
|
|
1271
1301
|
createElementVNode("img", {
|
|
1272
1302
|
loading: "lazy",
|
|
1273
1303
|
alt: e.altText,
|
|
@@ -1278,34 +1308,34 @@ function _sfc_render$g(e, t, n, o, r, s) {
|
|
|
1278
1308
|
...e.aspectRatioCss
|
|
1279
1309
|
}),
|
|
1280
1310
|
class: normalizeClass(
|
|
1281
|
-
"builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1311
|
+
"builder-image" + (e.className ? " " + e.className : "") + " img-20351ewpue7"
|
|
1282
1312
|
),
|
|
1283
1313
|
src: e.image,
|
|
1284
1314
|
srcset: e.srcSetToUse,
|
|
1285
1315
|
sizes: e.sizes
|
|
1286
|
-
}, null, 14, _hoisted_2$
|
|
1316
|
+
}, null, 14, _hoisted_2$4)
|
|
1287
1317
|
]),
|
|
1288
1318
|
e.aspectRatio && !((a = (i = e.builderBlock) == null ? void 0 : i.children) != null && a.length && e.fitContent) ? (openBlock(), createElementBlock("div", {
|
|
1289
1319
|
key: 0,
|
|
1290
|
-
class: "builder-image-sizer div-
|
|
1320
|
+
class: "builder-image-sizer div-20351ewpue7",
|
|
1291
1321
|
style: normalizeStyle({
|
|
1292
1322
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1293
1323
|
})
|
|
1294
1324
|
}, null, 4)) : createCommentVNode("", !0),
|
|
1295
|
-
(
|
|
1296
|
-
!e.fitContent && e
|
|
1325
|
+
(d = (l = e.builderBlock) == null ? void 0 : l.children) != null && d.length && e.fitContent ? renderSlot(e.$slots, "default", { key: 1 }, void 0, !0) : createCommentVNode("", !0),
|
|
1326
|
+
!e.fitContent && ((c = (p = e.builderBlock) == null ? void 0 : p.children) != null && c.length) ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1297
1327
|
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
1298
1328
|
])) : createCommentVNode("", !0)
|
|
1299
1329
|
], 64);
|
|
1300
1330
|
}
|
|
1301
|
-
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1331
|
+
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-5dee860d"]]), _sfc_main$h = defineComponent({
|
|
1302
1332
|
name: "builder-section-component",
|
|
1303
1333
|
props: ["attributes", "maxWidth"],
|
|
1304
1334
|
data() {
|
|
1305
1335
|
return { filterAttrs };
|
|
1306
1336
|
}
|
|
1307
1337
|
});
|
|
1308
|
-
function _sfc_render$
|
|
1338
|
+
function _sfc_render$g(e, t, n, o, r, s) {
|
|
1309
1339
|
return openBlock(), createElementBlock("section", mergeProps({
|
|
1310
1340
|
style: {
|
|
1311
1341
|
width: "100%",
|
|
@@ -1323,7 +1353,7 @@ function _sfc_render$f(e, t, n, o, r, s) {
|
|
|
1323
1353
|
renderSlot(e.$slots, "default")
|
|
1324
1354
|
], 16);
|
|
1325
1355
|
}
|
|
1326
|
-
const Section = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1356
|
+
const Section = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]]), getTopLevelDomain = (e) => {
|
|
1327
1357
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1328
1358
|
return e;
|
|
1329
1359
|
const t = e.split(".");
|
|
@@ -1458,7 +1488,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1458
1488
|
...e,
|
|
1459
1489
|
...r
|
|
1460
1490
|
};
|
|
1461
|
-
}, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0, componentInfo$
|
|
1491
|
+
}, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0, componentInfo$g = {
|
|
1462
1492
|
name: "Core:Button",
|
|
1463
1493
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1464
1494
|
defaultStyles: {
|
|
@@ -1491,7 +1521,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1491
1521
|
}],
|
|
1492
1522
|
static: !0,
|
|
1493
1523
|
noWrap: !0
|
|
1494
|
-
}, componentInfo$
|
|
1524
|
+
}, componentInfo$f = {
|
|
1495
1525
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1496
1526
|
name: "Columns",
|
|
1497
1527
|
isRSC: !0,
|
|
@@ -1692,13 +1722,13 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1692
1722
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1693
1723
|
advanced: !0
|
|
1694
1724
|
}]
|
|
1695
|
-
}, componentInfo$
|
|
1725
|
+
}, componentInfo$e = {
|
|
1696
1726
|
name: "Fragment",
|
|
1697
1727
|
static: !0,
|
|
1698
1728
|
hidden: !0,
|
|
1699
1729
|
canHaveChildren: !0,
|
|
1700
1730
|
noWrap: !0
|
|
1701
|
-
}, componentInfo$
|
|
1731
|
+
}, componentInfo$d = {
|
|
1702
1732
|
name: "Image",
|
|
1703
1733
|
static: !0,
|
|
1704
1734
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -1719,15 +1749,15 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1719
1749
|
onChange: (e) => {
|
|
1720
1750
|
e.delete("srcset"), e.delete("noWebp");
|
|
1721
1751
|
function n(i, a = 6e4) {
|
|
1722
|
-
return new Promise((l,
|
|
1723
|
-
const
|
|
1724
|
-
let
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
},
|
|
1728
|
-
console.warn("Image load failed",
|
|
1729
|
-
}),
|
|
1730
|
-
|
|
1752
|
+
return new Promise((l, d) => {
|
|
1753
|
+
const p = document.createElement("img");
|
|
1754
|
+
let c = !1;
|
|
1755
|
+
p.onload = () => {
|
|
1756
|
+
c = !0, l(p);
|
|
1757
|
+
}, p.addEventListener("error", (u) => {
|
|
1758
|
+
console.warn("Image load failed", u.error), d(u.error);
|
|
1759
|
+
}), p.src = i, setTimeout(() => {
|
|
1760
|
+
c || d(new Error("Image load timed out"));
|
|
1731
1761
|
}, a);
|
|
1732
1762
|
});
|
|
1733
1763
|
}
|
|
@@ -1798,7 +1828,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1798
1828
|
advanced: !0,
|
|
1799
1829
|
defaultValue: 0.7041
|
|
1800
1830
|
}]
|
|
1801
|
-
}, componentInfo$
|
|
1831
|
+
}, componentInfo$c = {
|
|
1802
1832
|
name: "Core:Section",
|
|
1803
1833
|
static: !0,
|
|
1804
1834
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1837,7 +1867,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1837
1867
|
}
|
|
1838
1868
|
}
|
|
1839
1869
|
}]
|
|
1840
|
-
}, componentInfo$
|
|
1870
|
+
}, componentInfo$b = {
|
|
1841
1871
|
name: "Slot",
|
|
1842
1872
|
isRSC: !0,
|
|
1843
1873
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1850,13 +1880,13 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1850
1880
|
required: !0,
|
|
1851
1881
|
defaultValue: "children"
|
|
1852
1882
|
}]
|
|
1853
|
-
}, _sfc_main$
|
|
1883
|
+
}, _sfc_main$g = defineComponent({
|
|
1854
1884
|
name: "builder-slot",
|
|
1855
1885
|
components: { Blocks },
|
|
1856
1886
|
props: ["builderContext", "name"]
|
|
1857
1887
|
});
|
|
1858
|
-
function _sfc_render$
|
|
1859
|
-
var a, l,
|
|
1888
|
+
function _sfc_render$f(e, t, n, o, r, s) {
|
|
1889
|
+
var a, l, d;
|
|
1860
1890
|
const i = resolveComponent("blocks");
|
|
1861
1891
|
return openBlock(), createElementBlock("div", mergeProps(
|
|
1862
1892
|
{ style: {
|
|
@@ -1870,11 +1900,11 @@ function _sfc_render$e(e, t, n, o, r, s) {
|
|
|
1870
1900
|
parent: (l = e.builderContext.context) == null ? void 0 : l.symbolId,
|
|
1871
1901
|
path: `symbol.data.${e.name}`,
|
|
1872
1902
|
context: e.builderContext,
|
|
1873
|
-
blocks: (
|
|
1903
|
+
blocks: (d = e.builderContext.rootState) == null ? void 0 : d[e.name]
|
|
1874
1904
|
}, null, 8, ["parent", "path", "context", "blocks"])
|
|
1875
1905
|
], 16);
|
|
1876
1906
|
}
|
|
1877
|
-
const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1907
|
+
const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]]), componentInfo$a = {
|
|
1878
1908
|
name: "Symbol",
|
|
1879
1909
|
noWrap: !0,
|
|
1880
1910
|
static: !0,
|
|
@@ -1907,7 +1937,210 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]
|
|
|
1907
1937
|
hideFromUI: !0,
|
|
1908
1938
|
type: "boolean"
|
|
1909
1939
|
}]
|
|
1910
|
-
},
|
|
1940
|
+
}, defaultTab = {
|
|
1941
|
+
"@type": "@builder.io/sdk:Element",
|
|
1942
|
+
responsiveStyles: {
|
|
1943
|
+
large: {
|
|
1944
|
+
paddingLeft: "20px",
|
|
1945
|
+
paddingRight: "20px",
|
|
1946
|
+
paddingTop: "10px",
|
|
1947
|
+
paddingBottom: "10px",
|
|
1948
|
+
minWidth: "100px",
|
|
1949
|
+
textAlign: "center",
|
|
1950
|
+
display: "flex",
|
|
1951
|
+
flexDirection: "column",
|
|
1952
|
+
cursor: "pointer",
|
|
1953
|
+
userSelect: "none"
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
component: {
|
|
1957
|
+
name: "Text",
|
|
1958
|
+
options: {
|
|
1959
|
+
text: "New tab"
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
}, defaultElement = {
|
|
1963
|
+
"@type": "@builder.io/sdk:Element",
|
|
1964
|
+
responsiveStyles: {
|
|
1965
|
+
large: {
|
|
1966
|
+
height: "200px",
|
|
1967
|
+
display: "flex",
|
|
1968
|
+
marginTop: "20px",
|
|
1969
|
+
flexDirection: "column"
|
|
1970
|
+
}
|
|
1971
|
+
},
|
|
1972
|
+
component: {
|
|
1973
|
+
name: "Text",
|
|
1974
|
+
options: {
|
|
1975
|
+
text: "New tab content "
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
}, componentInfo$9 = {
|
|
1979
|
+
name: "Builder: Tabs",
|
|
1980
|
+
inputs: [{
|
|
1981
|
+
name: "tabs",
|
|
1982
|
+
type: "list",
|
|
1983
|
+
broadcast: !0,
|
|
1984
|
+
subFields: [{
|
|
1985
|
+
name: "label",
|
|
1986
|
+
type: "uiBlocks",
|
|
1987
|
+
hideFromUI: !0,
|
|
1988
|
+
defaultValue: [defaultTab]
|
|
1989
|
+
}, {
|
|
1990
|
+
name: "content",
|
|
1991
|
+
type: "uiBlocks",
|
|
1992
|
+
hideFromUI: !0,
|
|
1993
|
+
defaultValue: [defaultElement]
|
|
1994
|
+
}],
|
|
1995
|
+
defaultValue: [{
|
|
1996
|
+
label: [{
|
|
1997
|
+
...defaultTab,
|
|
1998
|
+
component: {
|
|
1999
|
+
name: "Text",
|
|
2000
|
+
options: {
|
|
2001
|
+
text: "Tab 1"
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
}],
|
|
2005
|
+
content: [{
|
|
2006
|
+
...defaultElement,
|
|
2007
|
+
component: {
|
|
2008
|
+
name: "Text",
|
|
2009
|
+
options: {
|
|
2010
|
+
text: "Tab 1 content"
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
}]
|
|
2014
|
+
}, {
|
|
2015
|
+
label: [{
|
|
2016
|
+
...defaultTab,
|
|
2017
|
+
component: {
|
|
2018
|
+
name: "Text",
|
|
2019
|
+
options: {
|
|
2020
|
+
text: "Tab 2"
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
}],
|
|
2024
|
+
content: [{
|
|
2025
|
+
...defaultElement,
|
|
2026
|
+
component: {
|
|
2027
|
+
name: "Text",
|
|
2028
|
+
options: {
|
|
2029
|
+
text: "Tab 2 content"
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
}]
|
|
2033
|
+
}]
|
|
2034
|
+
}, {
|
|
2035
|
+
name: "activeTabStyle",
|
|
2036
|
+
type: "uiStyle",
|
|
2037
|
+
helperText: "CSS styles for the active tab",
|
|
2038
|
+
defaultValue: {
|
|
2039
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
2040
|
+
}
|
|
2041
|
+
}, {
|
|
2042
|
+
name: "defaultActiveTab",
|
|
2043
|
+
type: "number",
|
|
2044
|
+
helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
|
|
2045
|
+
defaultValue: 1,
|
|
2046
|
+
advanced: !0
|
|
2047
|
+
}, {
|
|
2048
|
+
name: "collapsible",
|
|
2049
|
+
type: "boolean",
|
|
2050
|
+
helperText: "If on, clicking an open tab closes it so no tabs are active",
|
|
2051
|
+
defaultValue: !1,
|
|
2052
|
+
advanced: !0
|
|
2053
|
+
}, {
|
|
2054
|
+
name: "tabHeaderLayout",
|
|
2055
|
+
type: "enum",
|
|
2056
|
+
helperText: "Change the layout of the tab headers (uses justify-content)",
|
|
2057
|
+
defaultValue: "flex-start",
|
|
2058
|
+
enum: [{
|
|
2059
|
+
label: "Center",
|
|
2060
|
+
value: "center"
|
|
2061
|
+
}, {
|
|
2062
|
+
label: "Space between",
|
|
2063
|
+
value: "space-between"
|
|
2064
|
+
}, {
|
|
2065
|
+
label: "Space around",
|
|
2066
|
+
value: "space-around"
|
|
2067
|
+
}, {
|
|
2068
|
+
label: "Left",
|
|
2069
|
+
value: "flex-start"
|
|
2070
|
+
}, {
|
|
2071
|
+
label: "Right",
|
|
2072
|
+
value: "flex-end"
|
|
2073
|
+
}]
|
|
2074
|
+
}]
|
|
2075
|
+
}, _sfc_main$f = defineComponent({
|
|
2076
|
+
name: "builder-tabs",
|
|
2077
|
+
components: { Blocks },
|
|
2078
|
+
props: [
|
|
2079
|
+
"defaultActiveTab",
|
|
2080
|
+
"tabs",
|
|
2081
|
+
"activeTabStyle",
|
|
2082
|
+
"tabHeaderLayout",
|
|
2083
|
+
"collapsible",
|
|
2084
|
+
"builderBlock",
|
|
2085
|
+
"builderContext",
|
|
2086
|
+
"builderComponents",
|
|
2087
|
+
"builderLinkComponent"
|
|
2088
|
+
],
|
|
2089
|
+
data() {
|
|
2090
|
+
return { activeTab: this.defaultActiveTab ? this.defaultActiveTab - 1 : 0 };
|
|
2091
|
+
},
|
|
2092
|
+
methods: {
|
|
2093
|
+
activeTabContent(e) {
|
|
2094
|
+
return this.tabs && this.tabs[e].content;
|
|
2095
|
+
},
|
|
2096
|
+
getActiveTabStyle(e) {
|
|
2097
|
+
return this.activeTab === e ? this.activeTabStyle : {};
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
}), _hoisted_1$8 = ["onClick"], _hoisted_2$3 = { key: 0 };
|
|
2101
|
+
function _sfc_render$e(e, t, n, o, r, s) {
|
|
2102
|
+
const i = resolveComponent("blocks");
|
|
2103
|
+
return openBlock(), createElementBlock("div", null, [
|
|
2104
|
+
createElementVNode("div", {
|
|
2105
|
+
class: "builder-tabs-wrap",
|
|
2106
|
+
style: normalizeStyle({
|
|
2107
|
+
display: "flex",
|
|
2108
|
+
flexDirection: "row",
|
|
2109
|
+
justifyContent: e.tabHeaderLayout || "flex-start",
|
|
2110
|
+
overflow: "auto"
|
|
2111
|
+
})
|
|
2112
|
+
}, [
|
|
2113
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.tabs, (a, l) => (openBlock(), createElementBlock("span", {
|
|
2114
|
+
key: l,
|
|
2115
|
+
class: normalizeClass(`builder-tab-wrap ${e.activeTab === l ? "builder-tab-active" : ""}`),
|
|
2116
|
+
style: normalizeStyle(e.getActiveTabStyle(l)),
|
|
2117
|
+
onClick: (d) => {
|
|
2118
|
+
l === e.activeTab && e.collapsible ? e.activeTab = -1 : e.activeTab = l;
|
|
2119
|
+
}
|
|
2120
|
+
}, [
|
|
2121
|
+
createVNode(i, {
|
|
2122
|
+
parent: e.builderBlock.id,
|
|
2123
|
+
path: `component.options.tabs.${l}.label`,
|
|
2124
|
+
blocks: a.label,
|
|
2125
|
+
context: e.builderContext,
|
|
2126
|
+
registeredComponents: e.builderComponents,
|
|
2127
|
+
linkComponent: e.builderLinkComponent
|
|
2128
|
+
}, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
|
|
2129
|
+
], 14, _hoisted_1$8))), 128))
|
|
2130
|
+
], 4),
|
|
2131
|
+
e.activeTabContent(e.activeTab) ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
|
|
2132
|
+
createVNode(i, {
|
|
2133
|
+
parent: e.builderBlock.id,
|
|
2134
|
+
path: `component.options.tabs.${e.activeTab}.content`,
|
|
2135
|
+
blocks: e.activeTabContent(e.activeTab),
|
|
2136
|
+
context: e.builderContext,
|
|
2137
|
+
registeredComponents: e.builderComponents,
|
|
2138
|
+
linkComponent: e.builderLinkComponent
|
|
2139
|
+
}, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
|
|
2140
|
+
])) : createCommentVNode("", !0)
|
|
2141
|
+
]);
|
|
2142
|
+
}
|
|
2143
|
+
const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]]), componentInfo$8 = {
|
|
1911
2144
|
name: "Text",
|
|
1912
2145
|
static: !0,
|
|
1913
2146
|
isRSC: !0,
|
|
@@ -2376,75 +2609,75 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2376
2609
|
let s;
|
|
2377
2610
|
const i = new FormData(o), a = Array.from(
|
|
2378
2611
|
e.currentTarget.querySelectorAll("input,select,textarea")
|
|
2379
|
-
).filter((
|
|
2380
|
-
let
|
|
2381
|
-
const f =
|
|
2382
|
-
if (
|
|
2383
|
-
if (
|
|
2384
|
-
if (
|
|
2385
|
-
return
|
|
2612
|
+
).filter((c) => !!c.name).map((c) => {
|
|
2613
|
+
let u;
|
|
2614
|
+
const f = c.name;
|
|
2615
|
+
if (c instanceof HTMLInputElement)
|
|
2616
|
+
if (c.type === "radio") {
|
|
2617
|
+
if (c.checked)
|
|
2618
|
+
return u = c.name, {
|
|
2386
2619
|
key: f,
|
|
2387
|
-
value:
|
|
2620
|
+
value: u
|
|
2388
2621
|
};
|
|
2389
|
-
} else if (
|
|
2390
|
-
|
|
2391
|
-
else if (
|
|
2392
|
-
const m =
|
|
2393
|
-
isNaN(m) || (
|
|
2622
|
+
} else if (c.type === "checkbox")
|
|
2623
|
+
u = c.checked;
|
|
2624
|
+
else if (c.type === "number" || c.type === "range") {
|
|
2625
|
+
const m = c.valueAsNumber;
|
|
2626
|
+
isNaN(m) || (u = m);
|
|
2394
2627
|
} else
|
|
2395
|
-
|
|
2628
|
+
c.type === "file" ? u = c.files : u = c.value;
|
|
2396
2629
|
else
|
|
2397
|
-
|
|
2630
|
+
u = c.value;
|
|
2398
2631
|
return {
|
|
2399
2632
|
key: f,
|
|
2400
|
-
value:
|
|
2633
|
+
value: u
|
|
2401
2634
|
};
|
|
2402
2635
|
});
|
|
2403
2636
|
let l = this.contentType;
|
|
2404
|
-
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value:
|
|
2405
|
-
(
|
|
2637
|
+
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value: c }) => {
|
|
2638
|
+
(c instanceof File || Array.isArray(c) && c[0] instanceof File || c instanceof FileList) && (l = "multipart/form-data");
|
|
2406
2639
|
}), l !== "application/json")
|
|
2407
2640
|
s = i;
|
|
2408
2641
|
else {
|
|
2409
|
-
const
|
|
2410
|
-
Array.from(a).forEach(({ value:
|
|
2411
|
-
set(
|
|
2412
|
-
}), s = JSON.stringify(
|
|
2642
|
+
const c = {};
|
|
2643
|
+
Array.from(a).forEach(({ value: u, key: f }) => {
|
|
2644
|
+
set(c, f, u);
|
|
2645
|
+
}), s = JSON.stringify(c);
|
|
2413
2646
|
}
|
|
2414
2647
|
l && l !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = l));
|
|
2415
|
-
const
|
|
2648
|
+
const d = new CustomEvent("presubmit", {
|
|
2416
2649
|
detail: {
|
|
2417
2650
|
body: s
|
|
2418
2651
|
}
|
|
2419
2652
|
});
|
|
2420
|
-
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
2653
|
+
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(d), d.defaultPrevented))
|
|
2421
2654
|
return;
|
|
2422
2655
|
this.formState = "sending";
|
|
2423
|
-
const
|
|
2656
|
+
const p = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
2424
2657
|
this.sendSubmissionsToEmail || ""
|
|
2425
2658
|
)}&name=${encodeURIComponent(this.name || "")}`;
|
|
2426
2659
|
fetch(
|
|
2427
|
-
this.sendSubmissionsTo === "email" ?
|
|
2660
|
+
this.sendSubmissionsTo === "email" ? p : this.action,
|
|
2428
2661
|
{
|
|
2429
2662
|
body: s,
|
|
2430
2663
|
headers: r,
|
|
2431
2664
|
method: this.method || "post"
|
|
2432
2665
|
}
|
|
2433
2666
|
).then(
|
|
2434
|
-
async (
|
|
2435
|
-
let
|
|
2436
|
-
const f =
|
|
2437
|
-
if (f && f.indexOf("application/json") !== -1 ?
|
|
2438
|
-
let m = get(
|
|
2667
|
+
async (c) => {
|
|
2668
|
+
let u;
|
|
2669
|
+
const f = c.headers.get("content-type");
|
|
2670
|
+
if (f && f.indexOf("application/json") !== -1 ? u = await c.json() : u = await c.text(), !c.ok && this.errorMessagePath) {
|
|
2671
|
+
let m = get(u, this.errorMessagePath);
|
|
2439
2672
|
m && (typeof m != "string" && (m = JSON.stringify(m)), this.formErrorMessage = m, this.mergeNewRootState({
|
|
2440
2673
|
formErrorMessage: m
|
|
2441
2674
|
}));
|
|
2442
2675
|
}
|
|
2443
|
-
if (this.responseData =
|
|
2676
|
+
if (this.responseData = u, this.formState = c.ok ? "success" : "error", c.ok) {
|
|
2444
2677
|
const m = new CustomEvent("submit:success", {
|
|
2445
2678
|
detail: {
|
|
2446
|
-
res:
|
|
2447
|
-
body:
|
|
2679
|
+
res: c,
|
|
2680
|
+
body: u
|
|
2448
2681
|
}
|
|
2449
2682
|
});
|
|
2450
2683
|
if (this.$refs.formRef) {
|
|
@@ -2464,13 +2697,13 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2464
2697
|
location.href = this.successUrl;
|
|
2465
2698
|
}
|
|
2466
2699
|
},
|
|
2467
|
-
(
|
|
2468
|
-
const
|
|
2700
|
+
(c) => {
|
|
2701
|
+
const u = new CustomEvent("submit:error", {
|
|
2469
2702
|
detail: {
|
|
2470
|
-
error:
|
|
2703
|
+
error: c
|
|
2471
2704
|
}
|
|
2472
2705
|
});
|
|
2473
|
-
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
2706
|
+
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented) || (this.responseData = c, this.formState = "error");
|
|
2474
2707
|
}
|
|
2475
2708
|
);
|
|
2476
2709
|
}
|
|
@@ -2478,7 +2711,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2478
2711
|
}
|
|
2479
2712
|
}), _hoisted_1$4 = ["validate", "action", "method", "name"], _hoisted_2$2 = {
|
|
2480
2713
|
key: 3,
|
|
2481
|
-
class: "builder-form-error-text pre-
|
|
2714
|
+
class: "builder-form-error-text pre-3i4ezorcfhi"
|
|
2482
2715
|
};
|
|
2483
2716
|
function _sfc_render$a(e, t, n, o, r, s) {
|
|
2484
2717
|
var l;
|
|
@@ -2489,11 +2722,11 @@ function _sfc_render$a(e, t, n, o, r, s) {
|
|
|
2489
2722
|
action: !e.sendWithJs && e.action,
|
|
2490
2723
|
method: e.method,
|
|
2491
2724
|
name: e.name,
|
|
2492
|
-
onSubmit: t[0] || (t[0] = (
|
|
2725
|
+
onSubmit: t[0] || (t[0] = (d) => e.onSubmit(d))
|
|
2493
2726
|
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2494
|
-
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((l = e.builderBlock) == null ? void 0 : l.children, (
|
|
2727
|
+
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((l = e.builderBlock) == null ? void 0 : l.children, (d, p) => (openBlock(), createBlock(i, {
|
|
2495
2728
|
key: `form-block-${e.idx}`,
|
|
2496
|
-
block:
|
|
2729
|
+
block: d,
|
|
2497
2730
|
context: e.builderContext,
|
|
2498
2731
|
registeredComponents: e.builderComponents,
|
|
2499
2732
|
linkComponent: e.builderLinkComponent
|
|
@@ -2519,7 +2752,7 @@ function _sfc_render$a(e, t, n, o, r, s) {
|
|
|
2519
2752
|
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0)
|
|
2520
2753
|
], 16, _hoisted_1$4);
|
|
2521
2754
|
}
|
|
2522
|
-
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-
|
|
2755
|
+
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-1573388b"]]), componentInfo$4 = {
|
|
2523
2756
|
name: "Form:Input",
|
|
2524
2757
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2525
2758
|
inputs: [
|
|
@@ -2882,7 +3115,7 @@ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]
|
|
|
2882
3115
|
}
|
|
2883
3116
|
};
|
|
2884
3117
|
function _sfc_render$5(e, t, n, o, r, s) {
|
|
2885
|
-
var i, a, l,
|
|
3118
|
+
var i, a, l, d, p, c, u;
|
|
2886
3119
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2887
3120
|
createElementVNode("video", mergeProps({
|
|
2888
3121
|
class: "builder-video",
|
|
@@ -2919,10 +3152,10 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2919
3152
|
fontSize: "0px"
|
|
2920
3153
|
})
|
|
2921
3154
|
}, null, 4)) : createCommentVNode("", !0),
|
|
2922
|
-
(
|
|
3155
|
+
(p = (d = e.builderBlock) == null ? void 0 : d.children) != null && p.length && e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2923
3156
|
renderSlot(e.$slots, "default")
|
|
2924
3157
|
])) : createCommentVNode("", !0),
|
|
2925
|
-
(
|
|
3158
|
+
(u = (c = e.builderBlock) == null ? void 0 : c.children) != null && u.length && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2926
3159
|
renderSlot(e.$slots, "default")
|
|
2927
3160
|
])) : createCommentVNode("", !0)
|
|
2928
3161
|
]);
|
|
@@ -2953,28 +3186,31 @@ const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5
|
|
|
2953
3186
|
...componentInfo
|
|
2954
3187
|
}], getDefaultRegisteredComponents = () => [{
|
|
2955
3188
|
component: Button,
|
|
2956
|
-
...componentInfo$
|
|
3189
|
+
...componentInfo$g
|
|
2957
3190
|
}, {
|
|
2958
3191
|
component: Columns,
|
|
2959
|
-
...componentInfo$
|
|
3192
|
+
...componentInfo$f
|
|
2960
3193
|
}, {
|
|
2961
3194
|
component: Fragment,
|
|
2962
|
-
...componentInfo$
|
|
3195
|
+
...componentInfo$e
|
|
2963
3196
|
}, {
|
|
2964
3197
|
component: Image,
|
|
2965
|
-
...componentInfo$
|
|
3198
|
+
...componentInfo$d
|
|
2966
3199
|
}, {
|
|
2967
3200
|
component: Section,
|
|
2968
|
-
...componentInfo$
|
|
3201
|
+
...componentInfo$c
|
|
2969
3202
|
}, {
|
|
2970
3203
|
component: Slot,
|
|
2971
|
-
...componentInfo$
|
|
3204
|
+
...componentInfo$b
|
|
2972
3205
|
}, {
|
|
2973
3206
|
component: Symbol$1,
|
|
2974
|
-
...componentInfo$
|
|
3207
|
+
...componentInfo$a
|
|
2975
3208
|
}, {
|
|
2976
3209
|
component: Text,
|
|
2977
3210
|
...componentInfo$8
|
|
3211
|
+
}, {
|
|
3212
|
+
component: Tabs,
|
|
3213
|
+
...componentInfo$9
|
|
2978
3214
|
}, ...getExtraComponents()], createRegisterComponentMessage = (e) => ({
|
|
2979
3215
|
type: "builder.registerComponent",
|
|
2980
3216
|
data: serializeComponentInfo(e)
|
|
@@ -3156,10 +3392,10 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
3156
3392
|
enrich: i,
|
|
3157
3393
|
locale: a,
|
|
3158
3394
|
apiVersion: l = DEFAULT_API_VERSION,
|
|
3159
|
-
fields:
|
|
3160
|
-
omit:
|
|
3161
|
-
offset:
|
|
3162
|
-
cacheSeconds:
|
|
3395
|
+
fields: d,
|
|
3396
|
+
omit: p,
|
|
3397
|
+
offset: c,
|
|
3398
|
+
cacheSeconds: u,
|
|
3163
3399
|
staleCacheSeconds: f,
|
|
3164
3400
|
sort: m,
|
|
3165
3401
|
includeUnpublished: b
|
|
@@ -3169,19 +3405,19 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
3169
3405
|
if (!["v3"].includes(l))
|
|
3170
3406
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${l}'`);
|
|
3171
3407
|
const S = t !== 1, g = new URL(`https://cdn.builder.io/api/${l}/content/${r}`);
|
|
3172
|
-
if (g.searchParams.set("apiKey", s), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(S)), g.searchParams.set("includeRefs", String(!0)), a && g.searchParams.set("locale", a), i && g.searchParams.set("enrich", String(i)), g.searchParams.set("omit",
|
|
3408
|
+
if (g.searchParams.set("apiKey", s), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(S)), g.searchParams.set("includeRefs", String(!0)), a && g.searchParams.set("locale", a), i && g.searchParams.set("enrich", String(i)), g.searchParams.set("omit", p || "meta.componentsUsed"), d && g.searchParams.set("fields", d), Number.isFinite(c) && c > -1 && g.searchParams.set("offset", String(Math.floor(c))), typeof b == "boolean" && g.searchParams.set("includeUnpublished", String(b)), u && isPositiveNumber(u) && g.searchParams.set("cacheSeconds", String(u)), f && isPositiveNumber(f) && g.searchParams.set("staleCacheSeconds", String(f)), m) {
|
|
3173
3409
|
const k = flatten({
|
|
3174
3410
|
sort: m
|
|
3175
3411
|
});
|
|
3176
3412
|
for (const C in k)
|
|
3177
3413
|
g.searchParams.set(C, JSON.stringify(k[C]));
|
|
3178
3414
|
}
|
|
3179
|
-
const
|
|
3415
|
+
const I = {
|
|
3180
3416
|
...getBuilderSearchParamsFromWindow(),
|
|
3181
3417
|
...normalizeSearchParams(e.options || {})
|
|
3182
|
-
},
|
|
3183
|
-
for (const k in
|
|
3184
|
-
g.searchParams.set(k, String(
|
|
3418
|
+
}, T = flatten(I);
|
|
3419
|
+
for (const k in T)
|
|
3420
|
+
g.searchParams.set(k, String(T[k]));
|
|
3185
3421
|
if (n && g.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
3186
3422
|
const k = flatten({
|
|
3187
3423
|
query: o
|
|
@@ -3423,7 +3659,7 @@ function isFromTrustedHost(e, t) {
|
|
|
3423
3659
|
const n = new URL(t.origin), o = n.hostname;
|
|
3424
3660
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
3425
3661
|
}
|
|
3426
|
-
const SDK_VERSION = "1.0.
|
|
3662
|
+
const SDK_VERSION = "1.0.24", registry = {};
|
|
3427
3663
|
function register(e, t) {
|
|
3428
3664
|
let n = registry[e];
|
|
3429
3665
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -3493,33 +3729,33 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3493
3729
|
if (r != null && r.type)
|
|
3494
3730
|
switch (r.type) {
|
|
3495
3731
|
case "builder.evaluate": {
|
|
3496
|
-
const a = r.data.text, l = r.data.arguments || [],
|
|
3497
|
-
let
|
|
3732
|
+
const a = r.data.text, l = r.data.arguments || [], d = r.data.id, p = new Function(a);
|
|
3733
|
+
let c, u = null;
|
|
3498
3734
|
try {
|
|
3499
|
-
|
|
3735
|
+
c = p.apply(null, l);
|
|
3500
3736
|
} catch (f) {
|
|
3501
|
-
|
|
3737
|
+
u = f;
|
|
3502
3738
|
}
|
|
3503
|
-
|
|
3739
|
+
u ? (s = window.parent) == null || s.postMessage({
|
|
3504
3740
|
type: "builder.evaluateError",
|
|
3505
3741
|
data: {
|
|
3506
|
-
id:
|
|
3507
|
-
error:
|
|
3742
|
+
id: d,
|
|
3743
|
+
error: u.message
|
|
3508
3744
|
}
|
|
3509
|
-
}, "*") :
|
|
3745
|
+
}, "*") : c && typeof c.then == "function" ? c.then((f) => {
|
|
3510
3746
|
var m;
|
|
3511
3747
|
(m = window.parent) == null || m.postMessage({
|
|
3512
3748
|
type: "builder.evaluateResult",
|
|
3513
3749
|
data: {
|
|
3514
|
-
id:
|
|
3750
|
+
id: d,
|
|
3515
3751
|
result: f
|
|
3516
3752
|
}
|
|
3517
3753
|
}, "*");
|
|
3518
3754
|
}).catch(console.error) : (i = window.parent) == null || i.postMessage({
|
|
3519
3755
|
type: "builder.evaluateResult",
|
|
3520
3756
|
data: {
|
|
3521
|
-
result:
|
|
3522
|
-
id:
|
|
3757
|
+
result: c,
|
|
3758
|
+
id: d
|
|
3523
3759
|
}
|
|
3524
3760
|
}, "*");
|
|
3525
3761
|
break;
|
|
@@ -3571,8 +3807,60 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3571
3807
|
return window.addEventListener("message", o), () => {
|
|
3572
3808
|
window.removeEventListener("message", o);
|
|
3573
3809
|
};
|
|
3574
|
-
},
|
|
3810
|
+
}, getCssFromFont = (e) => {
|
|
3811
|
+
var s;
|
|
3812
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((s = e == null ? void 0 : e.files) == null ? void 0 : s.regular);
|
|
3813
|
+
let r = "";
|
|
3814
|
+
if (o && t && n && (r += `
|
|
3815
|
+
@font-face {
|
|
3816
|
+
font-family: "${t}";
|
|
3817
|
+
src: local("${n}"), url('${o}') format('woff2');
|
|
3818
|
+
font-display: fallback;
|
|
3819
|
+
font-weight: 400;
|
|
3820
|
+
}
|
|
3821
|
+
`.trim()), e.files)
|
|
3822
|
+
for (const i in e.files) {
|
|
3823
|
+
if (!(String(Number(i)) === i))
|
|
3824
|
+
continue;
|
|
3825
|
+
const l = e.files[i];
|
|
3826
|
+
l && l !== o && (r += `
|
|
3827
|
+
@font-face {
|
|
3828
|
+
font-family: "${t}";
|
|
3829
|
+
src: url('${l}') format('woff2');
|
|
3830
|
+
font-display: fallback;
|
|
3831
|
+
font-weight: ${i};
|
|
3832
|
+
}
|
|
3833
|
+
`.trim());
|
|
3834
|
+
}
|
|
3835
|
+
return r;
|
|
3836
|
+
}, getFontCss = ({
|
|
3837
|
+
customFonts: e
|
|
3838
|
+
}) => {
|
|
3839
|
+
var t;
|
|
3840
|
+
return ((t = e == null ? void 0 : e.map((n) => getCssFromFont(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3841
|
+
}, getCss = ({
|
|
3842
|
+
cssCode: e,
|
|
3843
|
+
contentId: t
|
|
3844
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", DEFAULT_STYLES = `
|
|
3845
|
+
.builder-button {
|
|
3846
|
+
all: unset;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
3850
|
+
margin: 0;
|
|
3851
|
+
}
|
|
3852
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
3853
|
+
color: inherit;
|
|
3854
|
+
line-height: inherit;
|
|
3855
|
+
letter-spacing: inherit;
|
|
3856
|
+
font-weight: inherit;
|
|
3857
|
+
font-size: inherit;
|
|
3858
|
+
text-align: inherit;
|
|
3859
|
+
font-family: inherit;
|
|
3860
|
+
}
|
|
3861
|
+
`, getDefaultStyles = (e) => e ? "" : DEFAULT_STYLES, getWrapperClassName = (e) => `variant-${e}`, _sfc_main$4 = defineComponent({
|
|
3575
3862
|
name: "enable-editor",
|
|
3863
|
+
components: { DynamicDiv },
|
|
3576
3864
|
props: [
|
|
3577
3865
|
"builderContextSignal",
|
|
3578
3866
|
"canTrack",
|
|
@@ -3583,9 +3871,9 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3583
3871
|
"model",
|
|
3584
3872
|
"content",
|
|
3585
3873
|
"data",
|
|
3874
|
+
"showContent",
|
|
3586
3875
|
"contentWrapper",
|
|
3587
3876
|
"context",
|
|
3588
|
-
"showContent",
|
|
3589
3877
|
"contentWrapperProps"
|
|
3590
3878
|
],
|
|
3591
3879
|
data() {
|
|
@@ -3594,7 +3882,8 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3594
3882
|
httpReqsData: {},
|
|
3595
3883
|
httpReqsPending: {},
|
|
3596
3884
|
clicked: !1,
|
|
3597
|
-
builderContext: BuilderContext
|
|
3885
|
+
builderContext: BuilderContext,
|
|
3886
|
+
getWrapperClassName
|
|
3598
3887
|
};
|
|
3599
3888
|
},
|
|
3600
3889
|
provide() {
|
|
@@ -3676,6 +3965,12 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3676
3965
|
));
|
|
3677
3966
|
},
|
|
3678
3967
|
computed: {
|
|
3968
|
+
showContentProps() {
|
|
3969
|
+
return this.showContent ? {} : {
|
|
3970
|
+
hidden: !0,
|
|
3971
|
+
"aria-hidden": !0
|
|
3972
|
+
};
|
|
3973
|
+
},
|
|
3679
3974
|
onUpdateHook0() {
|
|
3680
3975
|
return {
|
|
3681
3976
|
0: this.content
|
|
@@ -3876,79 +4171,22 @@ function _sfc_render$4(e, t, n, o, r, s) {
|
|
|
3876
4171
|
return e.builderContextSignal.content ? (openBlock(), createBlock(resolveDynamicComponent(e.ContentWrapper), mergeProps({
|
|
3877
4172
|
key: 0,
|
|
3878
4173
|
ref: "elementRef",
|
|
3879
|
-
onClick: (
|
|
4174
|
+
onClick: (d) => e.onClick(d),
|
|
3880
4175
|
"builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id,
|
|
3881
4176
|
"builder-model": e.model,
|
|
3882
|
-
class:
|
|
3883
|
-
onIniteditingbldr: (
|
|
3884
|
-
onInitpreviewingbldr: (
|
|
3885
|
-
}, {
|
|
3886
|
-
...e.showContent ? {} : {
|
|
3887
|
-
hidden: !0,
|
|
3888
|
-
"aria-hidden": !0
|
|
3889
|
-
},
|
|
3890
|
-
...e.contentWrapperProps
|
|
3891
|
-
}), {
|
|
4177
|
+
class: e.getWrapperClassName(((a = e.content) == null ? void 0 : a.testVariationId) || ((l = e.content) == null ? void 0 : l.id)),
|
|
4178
|
+
onIniteditingbldr: (d) => e.elementRef_onIniteditingbldr(d),
|
|
4179
|
+
onInitpreviewingbldr: (d) => e.elementRef_onInitpreviewingbldr(d)
|
|
4180
|
+
}, { ...e.showContentProps, ...e.contentWrapperProps }), {
|
|
3892
4181
|
default: withCtx(() => [
|
|
3893
4182
|
renderSlot(e.$slots, "default")
|
|
3894
4183
|
]),
|
|
3895
4184
|
_: 3
|
|
3896
4185
|
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : createCommentVNode("", !0);
|
|
3897
4186
|
}
|
|
3898
|
-
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]),
|
|
3899
|
-
var s;
|
|
3900
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((s = e == null ? void 0 : e.files) == null ? void 0 : s.regular);
|
|
3901
|
-
let r = "";
|
|
3902
|
-
if (o && t && n && (r += `
|
|
3903
|
-
@font-face {
|
|
3904
|
-
font-family: "${t}";
|
|
3905
|
-
src: local("${n}"), url('${o}') format('woff2');
|
|
3906
|
-
font-display: fallback;
|
|
3907
|
-
font-weight: 400;
|
|
3908
|
-
}
|
|
3909
|
-
`.trim()), e.files)
|
|
3910
|
-
for (const i in e.files) {
|
|
3911
|
-
if (!(String(Number(i)) === i))
|
|
3912
|
-
continue;
|
|
3913
|
-
const l = e.files[i];
|
|
3914
|
-
l && l !== o && (r += `
|
|
3915
|
-
@font-face {
|
|
3916
|
-
font-family: "${t}";
|
|
3917
|
-
src: url('${l}') format('woff2');
|
|
3918
|
-
font-display: fallback;
|
|
3919
|
-
font-weight: ${i};
|
|
3920
|
-
}
|
|
3921
|
-
`.trim());
|
|
3922
|
-
}
|
|
3923
|
-
return r;
|
|
3924
|
-
}, getFontCss = ({
|
|
3925
|
-
customFonts: e
|
|
3926
|
-
}) => {
|
|
3927
|
-
var t;
|
|
3928
|
-
return ((t = e == null ? void 0 : e.map((n) => getCssFromFont(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3929
|
-
}, getCss = ({
|
|
3930
|
-
cssCode: e,
|
|
3931
|
-
contentId: t
|
|
3932
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", DEFAULT_STYLES = `
|
|
3933
|
-
.builder-button {
|
|
3934
|
-
all: unset;
|
|
3935
|
-
}
|
|
3936
|
-
|
|
3937
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
3938
|
-
margin: 0;
|
|
3939
|
-
}
|
|
3940
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
3941
|
-
color: inherit;
|
|
3942
|
-
line-height: inherit;
|
|
3943
|
-
letter-spacing: inherit;
|
|
3944
|
-
font-weight: inherit;
|
|
3945
|
-
font-size: inherit;
|
|
3946
|
-
text-align: inherit;
|
|
3947
|
-
font-family: inherit;
|
|
3948
|
-
}
|
|
3949
|
-
`, getDefaultStyles = (e) => e ? "" : DEFAULT_STYLES, _sfc_main$3 = defineComponent({
|
|
4187
|
+
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]), _sfc_main$3 = defineComponent({
|
|
3950
4188
|
name: "content-styles",
|
|
3951
|
-
components: { InlinedStyles: _sfc_main$
|
|
4189
|
+
components: { InlinedStyles: _sfc_main$m },
|
|
3952
4190
|
props: ["cssCode", "contentId", "customFonts", "isNestedRender"],
|
|
3953
4191
|
data() {
|
|
3954
4192
|
return {
|
|
@@ -4005,7 +4243,8 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4005
4243
|
EnableEditor,
|
|
4006
4244
|
InlinedScript: _sfc_main$5,
|
|
4007
4245
|
ContentStyles,
|
|
4008
|
-
Blocks
|
|
4246
|
+
Blocks,
|
|
4247
|
+
DynamicDiv
|
|
4009
4248
|
},
|
|
4010
4249
|
props: [
|
|
4011
4250
|
"content",
|
|
@@ -4097,8 +4336,8 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4097
4336
|
}
|
|
4098
4337
|
});
|
|
4099
4338
|
function _sfc_render$2(e, t, n, o, r, s) {
|
|
4100
|
-
const i = resolveComponent("inlined-script"), a = resolveComponent("content-styles"), l = resolveComponent("blocks"),
|
|
4101
|
-
return openBlock(), createBlock(
|
|
4339
|
+
const i = resolveComponent("inlined-script"), a = resolveComponent("content-styles"), l = resolveComponent("blocks"), d = resolveComponent("enable-editor");
|
|
4340
|
+
return openBlock(), createBlock(d, mergeProps({
|
|
4102
4341
|
content: e.content,
|
|
4103
4342
|
data: e.data,
|
|
4104
4343
|
model: e.model,
|
|
@@ -4115,7 +4354,7 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
4115
4354
|
trustedHosts: e.trustedHosts
|
|
4116
4355
|
}, {}), {
|
|
4117
4356
|
default: withCtx(() => {
|
|
4118
|
-
var
|
|
4357
|
+
var p, c, u, f, m, b, S;
|
|
4119
4358
|
return [
|
|
4120
4359
|
e.isSsrAbTest ? (openBlock(), createBlock(i, {
|
|
4121
4360
|
key: 0,
|
|
@@ -4125,8 +4364,8 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
4125
4364
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(a, {
|
|
4126
4365
|
key: 1,
|
|
4127
4366
|
isNestedRender: e.isNestedRender,
|
|
4128
|
-
contentId: (
|
|
4129
|
-
cssCode: (
|
|
4367
|
+
contentId: (p = e.builderContextSignal.content) == null ? void 0 : p.id,
|
|
4368
|
+
cssCode: (u = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : u.cssCode,
|
|
4130
4369
|
customFonts: (m = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : m.customFonts
|
|
4131
4370
|
}, null, 8, ["isNestedRender", "contentId", "cssCode", "customFonts"])) : createCommentVNode("", !0),
|
|
4132
4371
|
createVNode(l, {
|
|
@@ -4144,7 +4383,7 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
4144
4383
|
name: "content-variants",
|
|
4145
4384
|
components: {
|
|
4146
4385
|
InlinedScript: _sfc_main$5,
|
|
4147
|
-
InlinedStyles: _sfc_main$
|
|
4386
|
+
InlinedStyles: _sfc_main$m,
|
|
4148
4387
|
ContentComponent
|
|
4149
4388
|
},
|
|
4150
4389
|
props: [
|
|
@@ -4222,10 +4461,10 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
4222
4461
|
id: "builderio-variants-visibility",
|
|
4223
4462
|
scriptStr: e.updateCookieAndStylesScriptStr
|
|
4224
4463
|
}, null, 8, ["scriptStr"]),
|
|
4225
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (
|
|
4226
|
-
key:
|
|
4464
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (d, p) => (openBlock(), createBlock(l, {
|
|
4465
|
+
key: d.testVariationId,
|
|
4227
4466
|
isNestedRender: e.isNestedRender,
|
|
4228
|
-
content:
|
|
4467
|
+
content: d,
|
|
4229
4468
|
showContent: !1,
|
|
4230
4469
|
model: e.model,
|
|
4231
4470
|
data: e.data,
|
|
@@ -4290,7 +4529,7 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
4290
4529
|
});
|
|
4291
4530
|
}, _sfc_main = defineComponent({
|
|
4292
4531
|
name: "builder-symbol",
|
|
4293
|
-
components: { ContentVariants },
|
|
4532
|
+
components: { ContentVariants, DynamicDiv },
|
|
4294
4533
|
props: [
|
|
4295
4534
|
"symbol",
|
|
4296
4535
|
"attributes",
|
|
@@ -4316,6 +4555,12 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
4316
4555
|
}
|
|
4317
4556
|
},
|
|
4318
4557
|
computed: {
|
|
4558
|
+
blocksWrapper() {
|
|
4559
|
+
return "div";
|
|
4560
|
+
},
|
|
4561
|
+
contentWrapper() {
|
|
4562
|
+
return "div";
|
|
4563
|
+
},
|
|
4319
4564
|
className() {
|
|
4320
4565
|
var e, t;
|
|
4321
4566
|
return [
|
|
@@ -4343,7 +4588,7 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
4343
4588
|
}
|
|
4344
4589
|
});
|
|
4345
4590
|
function _sfc_render(e, t, n, o, r, s) {
|
|
4346
|
-
var a, l,
|
|
4591
|
+
var a, l, d, p, c;
|
|
4347
4592
|
const i = resolveComponent("content-variants");
|
|
4348
4593
|
return openBlock(), createElementBlock("div", mergeProps({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
4349
4594
|
createVNode(i, {
|
|
@@ -4358,14 +4603,14 @@ function _sfc_render(e, t, n, o, r, s) {
|
|
|
4358
4603
|
data: {
|
|
4359
4604
|
...(l = e.symbol) == null ? void 0 : l.data,
|
|
4360
4605
|
...e.builderContext.localState,
|
|
4361
|
-
...(
|
|
4606
|
+
...(p = (d = e.contentToUse) == null ? void 0 : d.data) == null ? void 0 : p.state
|
|
4362
4607
|
},
|
|
4363
|
-
model: (
|
|
4608
|
+
model: (c = e.symbol) == null ? void 0 : c.model,
|
|
4364
4609
|
content: e.contentToUse,
|
|
4365
4610
|
linkComponent: e.builderLinkComponent,
|
|
4366
|
-
blocksWrapper:
|
|
4367
|
-
contentWrapper:
|
|
4368
|
-
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content", "linkComponent"])
|
|
4611
|
+
blocksWrapper: e.blocksWrapper,
|
|
4612
|
+
contentWrapper: e.contentWrapper
|
|
4613
|
+
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content", "linkComponent", "blocksWrapper", "contentWrapper"])
|
|
4369
4614
|
], 16);
|
|
4370
4615
|
}
|
|
4371
4616
|
const Symbol$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]), settings = {};
|
|
@@ -4412,7 +4657,7 @@ export {
|
|
|
4412
4657
|
Section as S,
|
|
4413
4658
|
TARGET as T,
|
|
4414
4659
|
Video as V,
|
|
4415
|
-
_sfc_main$
|
|
4660
|
+
_sfc_main$m as _,
|
|
4416
4661
|
getSizesForBreakpoints as a,
|
|
4417
4662
|
createCssClass as b,
|
|
4418
4663
|
checkIsDefined as c,
|