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