@builder.io/sdk-vue 0.13.2 → 0.13.3
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/lib/browser/block-styles-5NGYAhBS.cjs +1 -0
- package/lib/browser/{block-styles.234c76cc.js → block-styles-jDSz7IPu.js} +15 -15
- package/lib/browser/{block-wrapper.632a0344.cjs → block-wrapper-aYMueUMD.cjs} +1 -1
- package/lib/browser/{block-wrapper.87efb259.js → block-wrapper-i3S3k3_c.js} +10 -10
- package/lib/browser/blocks/button/button.vue.d.ts +1 -1
- package/lib/browser/blocks/columns/columns.types.d.ts +2 -2
- package/lib/browser/blocks/columns/columns.vue.d.ts +1 -4
- package/lib/browser/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/lib/browser/blocks/embed/embed.vue.d.ts +1 -1
- package/lib/browser/blocks/form/form/form.vue.d.ts +4 -4
- package/lib/browser/blocks/form/input/input.vue.d.ts +4 -4
- package/lib/browser/blocks/form/select/select.vue.d.ts +1 -1
- package/lib/browser/blocks/form/submit-button/submit-button.vue.d.ts +1 -1
- package/lib/browser/blocks/fragment/fragment.vue.d.ts +1 -1
- package/lib/browser/blocks/image/image.vue.d.ts +1 -1
- package/lib/browser/blocks/img/img.vue.d.ts +1 -1
- package/lib/browser/blocks/section/section.vue.d.ts +1 -1
- package/lib/browser/blocks/slot/slot.vue.d.ts +4 -4
- package/lib/browser/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/browser/blocks/symbol/symbol.vue.d.ts +1 -4
- package/lib/browser/blocks/text/text.vue.d.ts +1 -1
- package/lib/browser/blocks/video/video.vue.d.ts +1 -1
- package/lib/browser/{component-ref.3afd884d.cjs → component-ref-23FBngqj.cjs} +1 -1
- package/lib/browser/{component-ref.3863762f.js → component-ref-YzJX0Oul.js} +21 -17
- package/lib/browser/components/block/block.vue.d.ts +1 -1
- package/lib/browser/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/browser/components/block/components/block-wrapper.vue.d.ts +1 -1
- package/lib/browser/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +1 -1
- package/lib/browser/components/block/components/interactive-element.vue.d.ts +2 -1
- package/lib/browser/components/block/components/repeated-block.vue.d.ts +1 -1
- package/lib/browser/components/blocks/blocks-wrapper.vue.d.ts +2 -1
- package/lib/browser/components/blocks/blocks.vue.d.ts +1 -1
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +1 -1
- package/lib/browser/components/content/components/styles.vue.d.ts +1 -1
- package/lib/browser/components/content/content.types.d.ts +1 -8
- package/lib/browser/components/content/content.vue.d.ts +1 -1
- package/lib/browser/components/content/contentProps.types.d.ts +7 -0
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +1 -1
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.vue.d.ts +7 -1
- package/lib/browser/components/inlined-script.vue.d.ts +1 -1
- package/lib/browser/components/inlined-styles.vue.d.ts +1 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/get-block-properties-KacPzO_o.cjs +1 -0
- package/lib/browser/{get-block-properties.954bd25c.js → get-block-properties-ZirT3ZGB.js} +19 -20
- package/lib/browser/{index.5e2629c5.js → index-6a_qPbnw.js} +637 -597
- package/lib/browser/index-7Z8XjtKs.cjs +166 -0
- package/lib/browser/index-helpers/blocks-exports.d.ts +2 -2
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +26 -27
- package/lib/browser/{repeated-block.ff7c6ac4.cjs → repeated-block-70kCyQ_l.cjs} +1 -1
- package/lib/browser/repeated-block-hRYVKXrX.js +35 -0
- package/lib/browser/style.css +1 -1
- package/lib/browser/types/builder-props.d.ts +1 -1
- package/lib/browser/types/enforced-partials.d.ts +1 -26
- package/lib/browser/types/input.d.ts +1 -0
- package/lib/browser/types/typescript.d.ts +0 -3
- package/lib/edge/block-styles--T_GAm5-.cjs +1 -0
- package/lib/edge/{block-styles.445302ca.js → block-styles-Tjp0oeui.js} +18 -18
- package/lib/edge/{block-wrapper.e5bbd06c.cjs → block-wrapper-K-I0ddom.cjs} +1 -1
- package/lib/{node/block-wrapper.745530a0.js → edge/block-wrapper-MgeL6r_A.js} +9 -10
- package/lib/edge/blocks/button/button.vue.d.ts +1 -1
- package/lib/edge/blocks/columns/columns.types.d.ts +2 -2
- package/lib/edge/blocks/columns/columns.vue.d.ts +1 -4
- package/lib/edge/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/lib/edge/blocks/embed/embed.vue.d.ts +1 -1
- package/lib/edge/blocks/form/form/form.vue.d.ts +4 -4
- package/lib/edge/blocks/form/input/input.vue.d.ts +4 -4
- package/lib/edge/blocks/form/select/select.vue.d.ts +1 -1
- package/lib/edge/blocks/form/submit-button/submit-button.vue.d.ts +1 -1
- package/lib/edge/blocks/fragment/fragment.vue.d.ts +1 -1
- package/lib/edge/blocks/image/image.vue.d.ts +1 -1
- package/lib/edge/blocks/img/img.vue.d.ts +1 -1
- package/lib/edge/blocks/section/section.vue.d.ts +1 -1
- package/lib/edge/blocks/slot/slot.vue.d.ts +4 -4
- package/lib/edge/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/edge/blocks/symbol/symbol.vue.d.ts +1 -4
- package/lib/edge/blocks/text/text.vue.d.ts +1 -1
- package/lib/edge/blocks/video/video.vue.d.ts +1 -1
- package/lib/edge/{component-ref.297cbfe7.js → component-ref-Oo-dR5xV.js} +21 -17
- package/lib/edge/{component-ref.c47dd754.cjs → component-ref-iibFypv7.cjs} +1 -1
- package/lib/edge/components/block/block.vue.d.ts +1 -1
- package/lib/edge/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/edge/components/block/components/block-wrapper.vue.d.ts +1 -1
- package/lib/edge/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +1 -1
- package/lib/edge/components/block/components/interactive-element.vue.d.ts +2 -1
- package/lib/edge/components/block/components/repeated-block.vue.d.ts +1 -1
- package/lib/edge/components/blocks/blocks-wrapper.vue.d.ts +2 -1
- package/lib/edge/components/blocks/blocks.vue.d.ts +1 -1
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +1 -1
- package/lib/edge/components/content/components/styles.vue.d.ts +1 -1
- package/lib/edge/components/content/content.types.d.ts +1 -8
- package/lib/edge/components/content/content.vue.d.ts +1 -1
- package/lib/edge/components/content/contentProps.types.d.ts +7 -0
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +1 -1
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.vue.d.ts +7 -1
- package/lib/edge/components/inlined-script.vue.d.ts +1 -1
- package/lib/edge/components/inlined-styles.vue.d.ts +1 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties.4ea261a1.js → get-block-properties-BKnsvu-2.js} +19 -20
- package/lib/edge/get-block-properties-q52zAZuL.cjs +1 -0
- package/lib/edge/{index.f5711364.js → index-FjGYEtq6.js} +1490 -1450
- package/lib/edge/index-helpers/blocks-exports.d.ts +2 -2
- package/lib/edge/index-oq0qBISZ.cjs +186 -0
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +25 -26
- package/lib/{browser/repeated-block.83b91a53.js → edge/repeated-block-IVuHJhMQ.js} +4 -5
- package/lib/edge/repeated-block-IrS130V6.cjs +1 -0
- package/lib/edge/style.css +1 -1
- package/lib/edge/types/builder-props.d.ts +1 -1
- package/lib/edge/types/enforced-partials.d.ts +1 -26
- package/lib/edge/types/input.d.ts +1 -0
- package/lib/edge/types/typescript.d.ts +0 -3
- package/lib/node/block-styles-1bGjM-mF.cjs +1 -0
- package/lib/node/{block-styles.bc53b639.js → block-styles-WHZ3oh47.js} +18 -19
- package/lib/node/block-wrapper-7G595XQl.cjs +1 -0
- package/lib/{edge/block-wrapper.c973027d.js → node/block-wrapper-Oi21HLL-.js} +10 -10
- package/lib/node/blocks/button/button.vue.d.ts +1 -1
- package/lib/node/blocks/columns/columns.types.d.ts +2 -2
- package/lib/node/blocks/columns/columns.vue.d.ts +1 -4
- package/lib/node/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/lib/node/blocks/embed/embed.vue.d.ts +1 -1
- package/lib/node/blocks/form/form/form.vue.d.ts +4 -4
- package/lib/node/blocks/form/input/input.vue.d.ts +4 -4
- package/lib/node/blocks/form/select/select.vue.d.ts +1 -1
- package/lib/node/blocks/form/submit-button/submit-button.vue.d.ts +1 -1
- package/lib/node/blocks/fragment/fragment.vue.d.ts +1 -1
- package/lib/node/blocks/image/image.vue.d.ts +1 -1
- package/lib/node/blocks/img/img.vue.d.ts +1 -1
- package/lib/node/blocks/section/section.vue.d.ts +1 -1
- package/lib/node/blocks/slot/slot.vue.d.ts +4 -4
- package/lib/node/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/node/blocks/symbol/symbol.vue.d.ts +1 -4
- package/lib/node/blocks/text/text.vue.d.ts +1 -1
- package/lib/node/blocks/video/video.vue.d.ts +1 -1
- package/lib/node/{component-ref.50b4a2f9.js → component-ref-6gNNgUIq.js} +22 -19
- package/lib/node/component-ref-bBOIZLBr.cjs +1 -0
- package/lib/node/components/block/block.vue.d.ts +1 -1
- package/lib/node/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/node/components/block/components/block-wrapper.vue.d.ts +1 -1
- package/lib/node/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +1 -1
- package/lib/node/components/block/components/interactive-element.vue.d.ts +2 -1
- package/lib/node/components/block/components/repeated-block.vue.d.ts +1 -1
- package/lib/node/components/blocks/blocks-wrapper.vue.d.ts +2 -1
- package/lib/node/components/blocks/blocks.vue.d.ts +1 -1
- package/lib/node/components/content/components/enable-editor.vue.d.ts +1 -1
- package/lib/node/components/content/components/styles.vue.d.ts +1 -1
- package/lib/node/components/content/content.types.d.ts +1 -8
- package/lib/node/components/content/content.vue.d.ts +1 -1
- package/lib/node/components/content/contentProps.types.d.ts +7 -0
- package/lib/node/components/content-variants/content-variants.vue.d.ts +1 -1
- package/lib/node/components/dynamic-renderer/dynamic-renderer.vue.d.ts +7 -1
- package/lib/node/components/inlined-script.vue.d.ts +1 -1
- package/lib/node/components/inlined-styles.vue.d.ts +1 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties.9d97d213.js → get-block-properties-LsQPb5mK.js} +19 -20
- package/lib/node/get-block-properties-saGQjgeQ.cjs +1 -0
- package/lib/node/{index.2fe76754.js → index-TgZujUqz.js} +244 -201
- package/lib/node/index-helpers/blocks-exports.d.ts +2 -2
- package/lib/node/index-mB-x2rNA.cjs +206 -0
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +27 -29
- package/lib/node/{repeated-block.17f75fe4.js → repeated-block-4ZvFRl8H.js} +4 -5
- package/lib/node/repeated-block-ghBGljjL.cjs +1 -0
- package/lib/node/style.css +1 -1
- package/lib/node/types/builder-props.d.ts +1 -1
- package/lib/node/types/enforced-partials.d.ts +1 -26
- package/lib/node/types/input.d.ts +1 -0
- package/lib/node/types/typescript.d.ts +0 -3
- package/package.json +5 -5
- package/lib/browser/block-styles.119ae070.cjs +0 -1
- package/lib/browser/get-block-properties.f75a4388.cjs +0 -1
- package/lib/browser/index.30ba40a5.cjs +0 -166
- package/lib/edge/block-styles.8957f0b3.cjs +0 -1
- package/lib/edge/get-block-properties.8ae4a0af.cjs +0 -1
- package/lib/edge/index.8f395d9b.cjs +0 -186
- package/lib/edge/repeated-block.afb8bacc.cjs +0 -1
- package/lib/edge/repeated-block.bb60007b.js +0 -34
- package/lib/node/block-styles.f0d350eb.cjs +0 -1
- package/lib/node/block-wrapper.a0037a74.cjs +0 -1
- package/lib/node/component-ref.3f3377ee.cjs +0 -1
- package/lib/node/get-block-properties.414a1d7e.cjs +0 -1
- package/lib/node/index.9ac19b66.cjs +0 -206
- package/lib/node/repeated-block.e79fb518.cjs +0 -1
|
@@ -38,7 +38,7 @@ function _sfc_render$n(e, t, n, o, r, s) {
|
|
|
38
38
|
}, 16))
|
|
39
39
|
], 64));
|
|
40
40
|
}
|
|
41
|
-
const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$n]
|
|
41
|
+
const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$n]]), dynamicRenderer = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42
42
|
__proto__: null,
|
|
43
43
|
default: DynamicRenderer
|
|
44
44
|
}, Symbol.toStringTag, { value: "Module" })), TARGET = "vue", getClassPropName = () => {
|
|
@@ -90,7 +90,7 @@ function _sfc_render$m(e, t, n, o, r, s) {
|
|
|
90
90
|
_: 1
|
|
91
91
|
}, 8, ["TagName", "attributes", "actionAttributes"]);
|
|
92
92
|
}
|
|
93
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$m]
|
|
93
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$m]]), key$1 = Symbol(), BuilderContext = {
|
|
94
94
|
Builder: {
|
|
95
95
|
content: null,
|
|
96
96
|
context: {},
|
|
@@ -115,6 +115,9 @@ function getBlockComponentOptions(e) {
|
|
|
115
115
|
return {
|
|
116
116
|
...(t = e.component) == null ? void 0 : t.options,
|
|
117
117
|
...e.options,
|
|
118
|
+
/**
|
|
119
|
+
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
120
|
+
*/
|
|
118
121
|
builderBlock: e
|
|
119
122
|
};
|
|
120
123
|
}
|
|
@@ -131,7 +134,7 @@ function isIframe() {
|
|
|
131
134
|
return isBrowser() && window.self !== window.top;
|
|
132
135
|
}
|
|
133
136
|
function isEditing() {
|
|
134
|
-
return isIframe() &&
|
|
137
|
+
return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
135
138
|
}
|
|
136
139
|
const getLocation = () => {
|
|
137
140
|
if (isBrowser()) {
|
|
@@ -173,6 +176,7 @@ const getLocation = () => {
|
|
|
173
176
|
}) => Object.entries({
|
|
174
177
|
state: o,
|
|
175
178
|
Builder: e,
|
|
179
|
+
// legacy
|
|
176
180
|
builder: e,
|
|
177
181
|
context: t,
|
|
178
182
|
event: n
|
|
@@ -183,7 +187,7 @@ const getLocation = () => {
|
|
|
183
187
|
getUserAttributes: () => getUserAttributes()
|
|
184
188
|
}), parseCode = (e, {
|
|
185
189
|
isExpression: t = !0
|
|
186
|
-
}) => t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, runInBrowser = ({
|
|
190
|
+
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, runInBrowser = ({
|
|
187
191
|
code: e,
|
|
188
192
|
builder: t,
|
|
189
193
|
context: n,
|
|
@@ -310,28 +314,29 @@ output;
|
|
|
310
314
|
context: n,
|
|
311
315
|
event: o,
|
|
312
316
|
state: a
|
|
313
|
-
}), c = getIsolateContext(),
|
|
314
|
-
|
|
317
|
+
}), c = getIsolateContext(), p = c.global;
|
|
318
|
+
p.setSync("global", p.derefInto()), p.setSync("log", function(...f) {
|
|
315
319
|
console.log(...f);
|
|
316
|
-
}),
|
|
320
|
+
}), p.setSync(BUILDER_SET_STATE_NAME, function(f, m) {
|
|
317
321
|
set(i, f, m), s == null || s(i);
|
|
318
322
|
}), l.forEach(([f, m]) => {
|
|
319
323
|
const g = typeof m == "object" ? new ivm.Reference(
|
|
324
|
+
// workaround: methods with default values for arguments is not being cloned over
|
|
320
325
|
f === "builder" ? {
|
|
321
326
|
...m,
|
|
322
327
|
getUserAttributes: () => m.getUserAttributes()
|
|
323
328
|
} : m
|
|
324
329
|
) : null;
|
|
325
|
-
|
|
326
|
-
}),
|
|
330
|
+
p.setSync(getSyncValName(f), g);
|
|
331
|
+
}), p.setSync(INJECTED_IVM_GLOBAL, ivm);
|
|
327
332
|
const d = processCode({
|
|
328
333
|
code: e,
|
|
329
334
|
args: l
|
|
330
|
-
}),
|
|
335
|
+
}), u = c.evalSync(d);
|
|
331
336
|
try {
|
|
332
|
-
return JSON.parse(
|
|
337
|
+
return JSON.parse(u);
|
|
333
338
|
} catch {
|
|
334
|
-
return
|
|
339
|
+
return u;
|
|
335
340
|
}
|
|
336
341
|
}, checkIsDefined = (e) => e != null;
|
|
337
342
|
function isNodeRuntime() {
|
|
@@ -478,8 +483,8 @@ function throttle(e, t, n = {}) {
|
|
|
478
483
|
return function() {
|
|
479
484
|
const c = Date.now();
|
|
480
485
|
!a && n.leading === !1 && (a = c);
|
|
481
|
-
const
|
|
482
|
-
return o = this, r = arguments,
|
|
486
|
+
const p = t - (c - a);
|
|
487
|
+
return o = this, r = arguments, p <= 0 || p > t ? (i && (clearTimeout(i), i = null), a = c, s = e.apply(o, r), i || (o = r = null)) : !i && n.trailing !== !1 && (i = setTimeout(l, p)), s;
|
|
483
488
|
};
|
|
484
489
|
}
|
|
485
490
|
function assign(e, ...t) {
|
|
@@ -576,9 +581,9 @@ function bindScrollInViewAnimation(e) {
|
|
|
576
581
|
const i = throttle(s, 200, {
|
|
577
582
|
leading: !1
|
|
578
583
|
});
|
|
579
|
-
function a(
|
|
580
|
-
const d =
|
|
581
|
-
return d.bottom > m && d.top <
|
|
584
|
+
function a(p) {
|
|
585
|
+
const d = p.getBoundingClientRect(), u = window.innerHeight, m = (e.thresholdPercent || 0) / 100 * u;
|
|
586
|
+
return d.bottom > m && d.top < u - m;
|
|
582
587
|
}
|
|
583
588
|
const l = e.steps[0].styles;
|
|
584
589
|
function c() {
|
|
@@ -647,22 +652,22 @@ const getComponent = ({
|
|
|
647
652
|
},
|
|
648
653
|
block: o
|
|
649
654
|
}));
|
|
650
|
-
}, BlockStyles = () => import("./block-styles.
|
|
655
|
+
}, BlockStyles = () => import("./block-styles-WHZ3oh47.js").then((e) => e.default).catch((e) => {
|
|
651
656
|
throw console.error(
|
|
652
657
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
653
658
|
e
|
|
654
659
|
), e;
|
|
655
|
-
}), BlockWrapper = () => import("./block-wrapper
|
|
660
|
+
}), BlockWrapper = () => import("./block-wrapper-Oi21HLL-.js").then((e) => e.default).catch((e) => {
|
|
656
661
|
throw console.error(
|
|
657
662
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
658
663
|
e
|
|
659
664
|
), e;
|
|
660
|
-
}), ComponentRef = () => import("./component-ref.
|
|
665
|
+
}), ComponentRef = () => import("./component-ref-6gNNgUIq.js").then((e) => e.default).catch((e) => {
|
|
661
666
|
throw console.error(
|
|
662
667
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
663
668
|
e
|
|
664
669
|
), e;
|
|
665
|
-
}), RepeatedBlock = () => import("./repeated-block.
|
|
670
|
+
}), RepeatedBlock = () => import("./repeated-block-4ZvFRl8H.js").then((e) => e.default).catch((e) => {
|
|
666
671
|
throw console.error(
|
|
667
672
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
668
673
|
e
|
|
@@ -725,21 +730,21 @@ const getComponent = ({
|
|
|
725
730
|
return ("show" in this.processedBlock ? this.processedBlock.show : !0) && !e;
|
|
726
731
|
},
|
|
727
732
|
childrenWithoutParentComponent() {
|
|
728
|
-
var t
|
|
729
|
-
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ?
|
|
733
|
+
var t;
|
|
734
|
+
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ? this.processedBlock.children ?? [] : [];
|
|
730
735
|
},
|
|
731
736
|
componentRefProps() {
|
|
732
|
-
var e, t, n, o, r, s, i, a, l, c
|
|
737
|
+
var e, t, n, o, r, s, i, a, l, c;
|
|
733
738
|
return {
|
|
734
|
-
blockChildren:
|
|
735
|
-
componentRef: (
|
|
739
|
+
blockChildren: this.processedBlock.children ?? [],
|
|
740
|
+
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
736
741
|
componentOptions: {
|
|
737
742
|
...getBlockComponentOptions(this.processedBlock),
|
|
738
743
|
builderContext: this.context,
|
|
739
|
-
...((
|
|
744
|
+
...((t = this.blockComponent) == null ? void 0 : t.name) === "Core:Button" || ((n = this.blockComponent) == null ? void 0 : n.name) === "Symbol" || ((o = this.blockComponent) == null ? void 0 : o.name) === "Columns" || ((r = this.blockComponent) == null ? void 0 : r.name) === "Form:Form" ? {
|
|
740
745
|
builderLinkComponent: this.linkComponent
|
|
741
746
|
} : {},
|
|
742
|
-
...((
|
|
747
|
+
...((s = this.blockComponent) == null ? void 0 : s.name) === "Symbol" || ((i = this.blockComponent) == null ? void 0 : i.name) === "Columns" || ((a = this.blockComponent) == null ? void 0 : a.name) === "Form:Form" ? {
|
|
743
748
|
builderComponents: this.registeredComponents
|
|
744
749
|
} : {}
|
|
745
750
|
},
|
|
@@ -747,15 +752,15 @@ const getComponent = ({
|
|
|
747
752
|
linkComponent: this.linkComponent,
|
|
748
753
|
registeredComponents: this.registeredComponents,
|
|
749
754
|
builderBlock: this.processedBlock,
|
|
750
|
-
includeBlockProps: ((
|
|
751
|
-
isInteractive: !((
|
|
755
|
+
includeBlockProps: ((l = this.blockComponent) == null ? void 0 : l.noWrap) === !0,
|
|
756
|
+
isInteractive: !((c = this.blockComponent) != null && c.isRSC)
|
|
752
757
|
};
|
|
753
758
|
}
|
|
754
759
|
}
|
|
755
760
|
});
|
|
756
761
|
function _sfc_render$l(e, t, n, o, r, s) {
|
|
757
762
|
var d;
|
|
758
|
-
const i = resolveComponent("block-styles"), a = resolveComponent("component-ref"), l = resolveComponent("block", !0), c = resolveComponent("block-wrapper"),
|
|
763
|
+
const i = resolveComponent("block-styles"), a = resolveComponent("component-ref"), l = resolveComponent("block", !0), c = resolveComponent("block-wrapper"), p = resolveComponent("repeated-block");
|
|
759
764
|
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
760
765
|
createVNode(i, {
|
|
761
766
|
block: e.block,
|
|
@@ -773,10 +778,10 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
773
778
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
774
779
|
isInteractive: e.componentRefProps.isInteractive
|
|
775
780
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"])) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
776
|
-
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (
|
|
781
|
+
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (u, f) => (openBlock(), createBlock(p, {
|
|
777
782
|
key: f,
|
|
778
|
-
repeatContext:
|
|
779
|
-
block:
|
|
783
|
+
repeatContext: u.context,
|
|
784
|
+
block: u.block,
|
|
780
785
|
registeredComponents: e.registeredComponents,
|
|
781
786
|
linkComponent: e.linkComponent
|
|
782
787
|
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(c, {
|
|
@@ -798,9 +803,9 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
798
803
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
799
804
|
isInteractive: e.componentRefProps.isInteractive
|
|
800
805
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
801
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (
|
|
802
|
-
key:
|
|
803
|
-
block:
|
|
806
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (u, f) => (openBlock(), createBlock(l, {
|
|
807
|
+
key: u.id,
|
|
808
|
+
block: u,
|
|
804
809
|
context: e.childrenContext,
|
|
805
810
|
registeredComponents: e.registeredComponents,
|
|
806
811
|
linkComponent: e.linkComponent
|
|
@@ -809,9 +814,9 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
809
814
|
_: 1
|
|
810
815
|
}, 8, ["Wrapper", "block", "context", "linkComponent"]))
|
|
811
816
|
], 64))
|
|
812
|
-
], 64)) : createCommentVNode("
|
|
817
|
+
], 64)) : createCommentVNode("", !0);
|
|
813
818
|
}
|
|
814
|
-
const Block = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]
|
|
819
|
+
const Block = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]]), block = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
815
820
|
__proto__: null,
|
|
816
821
|
default: Block
|
|
817
822
|
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$m = defineComponent({
|
|
@@ -858,7 +863,7 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l
|
|
|
858
863
|
));
|
|
859
864
|
}
|
|
860
865
|
}
|
|
861
|
-
})
|
|
866
|
+
});
|
|
862
867
|
function _sfc_render$k(e, t, n, o, r, s) {
|
|
863
868
|
return openBlock(), createBlock(resolveDynamicComponent(e.BlocksWrapper), mergeProps({
|
|
864
869
|
class: e.className + " component-b1turyjjkok",
|
|
@@ -875,7 +880,7 @@ function _sfc_render$k(e, t, n, o, r, s) {
|
|
|
875
880
|
_: 3
|
|
876
881
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
877
882
|
}
|
|
878
|
-
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$k], ["__scopeId", "data-v-
|
|
883
|
+
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$k], ["__scopeId", "data-v-3403e3cb"]]), _sfc_main$l = defineComponent({
|
|
879
884
|
name: "builder-blocks",
|
|
880
885
|
components: { BlocksWrapper, Block },
|
|
881
886
|
props: [
|
|
@@ -904,24 +909,24 @@ function _sfc_render$j(e, t, n, o, r, s) {
|
|
|
904
909
|
BlocksWrapperProps: (c = e.context) == null ? void 0 : c.BlocksWrapperProps
|
|
905
910
|
}, {
|
|
906
911
|
default: withCtx(() => [
|
|
907
|
-
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (
|
|
908
|
-
key:
|
|
909
|
-
block:
|
|
912
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (p, d) => (openBlock(), createBlock(i, {
|
|
913
|
+
key: p.id,
|
|
914
|
+
block: p,
|
|
910
915
|
linkComponent: e.linkComponent,
|
|
911
916
|
context: e.context || e.builderContext,
|
|
912
917
|
registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
|
|
913
|
-
}, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) : createCommentVNode("
|
|
918
|
+
}, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) : createCommentVNode("", !0)
|
|
914
919
|
]),
|
|
915
920
|
_: 1
|
|
916
921
|
}, 8, ["blocks", "parent", "path", "styleProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
917
922
|
}
|
|
918
|
-
const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$j]
|
|
923
|
+
const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$j]]), _sfc_main$k = defineComponent({
|
|
919
924
|
render() {
|
|
920
925
|
return h("style", { id: this.id, innerHTML: this.styles });
|
|
921
926
|
},
|
|
922
927
|
name: "inlined-styles",
|
|
923
928
|
props: ["styles", "id"]
|
|
924
|
-
}),
|
|
929
|
+
}), SIZES = {
|
|
925
930
|
small: {
|
|
926
931
|
min: 320,
|
|
927
932
|
default: 321,
|
|
@@ -959,18 +964,18 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$
|
|
|
959
964
|
const s = n.medium.max + 1;
|
|
960
965
|
return n.large = {
|
|
961
966
|
max: 2e3,
|
|
967
|
+
// TODO: decide upper limit
|
|
962
968
|
min: s,
|
|
963
969
|
default: s + 1
|
|
964
970
|
}, n;
|
|
965
971
|
}, _sfc_main$j = defineComponent({
|
|
966
972
|
name: "builder-columns",
|
|
967
973
|
components: {
|
|
968
|
-
InlinedStyles,
|
|
974
|
+
InlinedStyles: _sfc_main$k,
|
|
969
975
|
DynamicRenderer,
|
|
970
976
|
Blocks
|
|
971
977
|
},
|
|
972
978
|
props: [
|
|
973
|
-
"js",
|
|
974
979
|
"space",
|
|
975
980
|
"columns",
|
|
976
981
|
"stackColumnsAt",
|
|
@@ -1085,7 +1090,7 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$
|
|
|
1085
1090
|
)[e].max;
|
|
1086
1091
|
}
|
|
1087
1092
|
}
|
|
1088
|
-
})
|
|
1093
|
+
});
|
|
1089
1094
|
function _sfc_render$i(e, t, n, o, r, s) {
|
|
1090
1095
|
const i = resolveComponent("inlined-styles"), a = resolveComponent("blocks"), l = resolveComponent("dynamic-renderer");
|
|
1091
1096
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -1095,9 +1100,9 @@ function _sfc_render$i(e, t, n, o, r, s) {
|
|
|
1095
1100
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
1096
1101
|
key: 0,
|
|
1097
1102
|
styles: e.columnsStyles
|
|
1098
|
-
}, null, 8, ["styles"])) : createCommentVNode("
|
|
1099
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (c,
|
|
1100
|
-
key:
|
|
1103
|
+
}, null, 8, ["styles"])) : createCommentVNode("", !0),
|
|
1104
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (c, p) => (openBlock(), createBlock(l, {
|
|
1105
|
+
key: p,
|
|
1101
1106
|
TagName: c.link ? e.builderLinkComponent || "a" : "div",
|
|
1102
1107
|
actionAttributes: {},
|
|
1103
1108
|
attributes: {
|
|
@@ -1105,12 +1110,12 @@ function _sfc_render$i(e, t, n, o, r, s) {
|
|
|
1105
1110
|
href: c.link
|
|
1106
1111
|
} : {},
|
|
1107
1112
|
[e.getClassPropName()]: "builder-column",
|
|
1108
|
-
style: e.mapStyleObjToStrIfNeeded(e.columnCssVars(
|
|
1113
|
+
style: e.mapStyleObjToStrIfNeeded(e.columnCssVars(p))
|
|
1109
1114
|
}
|
|
1110
1115
|
}, {
|
|
1111
1116
|
default: withCtx(() => [
|
|
1112
1117
|
createVNode(a, {
|
|
1113
|
-
path: `component.options.columns.${
|
|
1118
|
+
path: `component.options.columns.${p}.blocks`,
|
|
1114
1119
|
parent: e.builderBlock.id,
|
|
1115
1120
|
styleProp: {
|
|
1116
1121
|
flexGrow: "1"
|
|
@@ -1125,7 +1130,7 @@ function _sfc_render$i(e, t, n, o, r, s) {
|
|
|
1125
1130
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1126
1131
|
], 16);
|
|
1127
1132
|
}
|
|
1128
|
-
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-
|
|
1133
|
+
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-3a12caec"]]), _sfc_main$i = defineComponent({
|
|
1129
1134
|
name: "builder-fragment-component",
|
|
1130
1135
|
props: []
|
|
1131
1136
|
});
|
|
@@ -1134,7 +1139,7 @@ function _sfc_render$h(e, t, n, o, r, s) {
|
|
|
1134
1139
|
renderSlot(e.$slots, "default")
|
|
1135
1140
|
]);
|
|
1136
1141
|
}
|
|
1137
|
-
const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h]
|
|
1142
|
+
const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h]]);
|
|
1138
1143
|
function removeProtocol(e) {
|
|
1139
1144
|
return e.replace(/http(s)?:/, "");
|
|
1140
1145
|
}
|
|
@@ -1185,9 +1190,11 @@ const _sfc_main$h = defineComponent({
|
|
|
1185
1190
|
srcSetToUse() {
|
|
1186
1191
|
var n;
|
|
1187
1192
|
const t = this.image || this.src;
|
|
1188
|
-
if (!t ||
|
|
1193
|
+
if (!t || // We can auto add srcset for cdn.builder.io and shopify
|
|
1194
|
+
// images, otherwise you can supply this prop manually
|
|
1195
|
+
!(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
|
|
1189
1196
|
return this.srcset;
|
|
1190
|
-
if (this.srcset && ((n = this.image)
|
|
1197
|
+
if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
|
|
1191
1198
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1192
1199
|
return console.debug("Removed given srcset"), getSrcSet(t);
|
|
1193
1200
|
} else if (this.image && !this.srcset)
|
|
@@ -1196,7 +1203,7 @@ const _sfc_main$h = defineComponent({
|
|
|
1196
1203
|
},
|
|
1197
1204
|
webpSrcSet() {
|
|
1198
1205
|
var e;
|
|
1199
|
-
return (
|
|
1206
|
+
return (e = this.srcSetToUse) != null && e.match(/builder\.io/) && !this.noWebp ? this.srcSetToUse.replace(/\?/g, "?format=webp&") : "";
|
|
1200
1207
|
},
|
|
1201
1208
|
aspectRatioCss() {
|
|
1202
1209
|
const e = {
|
|
@@ -1209,7 +1216,7 @@ const _sfc_main$h = defineComponent({
|
|
|
1209
1216
|
return this.aspectRatio ? e : void 0;
|
|
1210
1217
|
}
|
|
1211
1218
|
}
|
|
1212
|
-
}),
|
|
1219
|
+
}), _hoisted_1$8 = ["srcset"], _hoisted_2$3 = ["alt", "role", "src", "srcset", "sizes"], _hoisted_3$1 = {
|
|
1213
1220
|
key: 2,
|
|
1214
1221
|
class: "div-4wbls88y960-2"
|
|
1215
1222
|
};
|
|
@@ -1221,7 +1228,7 @@ function _sfc_render$g(e, t, n, o, r, s) {
|
|
|
1221
1228
|
key: 0,
|
|
1222
1229
|
type: "image/webp",
|
|
1223
1230
|
srcset: e.webpSrcSet
|
|
1224
|
-
}, null, 8, _hoisted_1$8)) : createCommentVNode("
|
|
1231
|
+
}, null, 8, _hoisted_1$8)) : createCommentVNode("", !0),
|
|
1225
1232
|
createElementVNode("img", {
|
|
1226
1233
|
loading: "lazy",
|
|
1227
1234
|
alt: e.altText,
|
|
@@ -1239,20 +1246,20 @@ function _sfc_render$g(e, t, n, o, r, s) {
|
|
|
1239
1246
|
sizes: e.sizes
|
|
1240
1247
|
}, null, 14, _hoisted_2$3)
|
|
1241
1248
|
]),
|
|
1242
|
-
e.aspectRatio && !((
|
|
1249
|
+
e.aspectRatio && !((a = (i = e.builderBlock) == null ? void 0 : i.children) != null && a.length && e.fitContent) ? (openBlock(), createElementBlock("div", {
|
|
1243
1250
|
key: 0,
|
|
1244
1251
|
class: "builder-image-sizer div-4wbls88y960",
|
|
1245
1252
|
style: normalizeStyle({
|
|
1246
1253
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1247
1254
|
})
|
|
1248
|
-
}, null, 4)) : createCommentVNode("
|
|
1249
|
-
(
|
|
1255
|
+
}, null, 4)) : createCommentVNode("", !0),
|
|
1256
|
+
(c = (l = e.builderBlock) == null ? void 0 : l.children) != null && c.length && e.fitContent ? renderSlot(e.$slots, "default", { key: 1 }, void 0, !0) : createCommentVNode("", !0),
|
|
1250
1257
|
!e.fitContent && e.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1251
1258
|
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
1252
|
-
])) : createCommentVNode("
|
|
1259
|
+
])) : createCommentVNode("", !0)
|
|
1253
1260
|
], 64);
|
|
1254
1261
|
}
|
|
1255
|
-
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-
|
|
1262
|
+
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-4ab1cc9f"]]), _sfc_main$g = defineComponent({
|
|
1256
1263
|
name: "builder-section-component",
|
|
1257
1264
|
props: ["attributes", "maxWidth"],
|
|
1258
1265
|
data() {
|
|
@@ -1277,7 +1284,7 @@ function _sfc_render$f(e, t, n, o, r, s) {
|
|
|
1277
1284
|
renderSlot(e.$slots, "default")
|
|
1278
1285
|
], 16);
|
|
1279
1286
|
}
|
|
1280
|
-
const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]
|
|
1287
|
+
const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]]), getTopLevelDomain = (e) => {
|
|
1281
1288
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1282
1289
|
return e;
|
|
1283
1290
|
const t = e.split(".");
|
|
@@ -1361,7 +1368,8 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1361
1368
|
testGroupId: t
|
|
1362
1369
|
}) => {
|
|
1363
1370
|
const n = e.variations[t];
|
|
1364
|
-
return t === e.id ||
|
|
1371
|
+
return t === e.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
1372
|
+
!n ? {
|
|
1365
1373
|
testVariationId: e.id,
|
|
1366
1374
|
testVariationName: "Default"
|
|
1367
1375
|
} : {
|
|
@@ -1415,6 +1423,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1415
1423
|
name: "Core:Button",
|
|
1416
1424
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1417
1425
|
defaultStyles: {
|
|
1426
|
+
// TODO: make min width more intuitive and set one
|
|
1418
1427
|
appearance: "none",
|
|
1419
1428
|
paddingTop: "15px",
|
|
1420
1429
|
paddingBottom: "15px",
|
|
@@ -1444,6 +1453,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1444
1453
|
static: !0,
|
|
1445
1454
|
noWrap: !0
|
|
1446
1455
|
}, componentInfo$e = {
|
|
1456
|
+
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1447
1457
|
name: "Columns",
|
|
1448
1458
|
isRSC: !0,
|
|
1449
1459
|
inputs: [{
|
|
@@ -1621,7 +1631,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1621
1631
|
});
|
|
1622
1632
|
}
|
|
1623
1633
|
const n = e.get("columns");
|
|
1624
|
-
Array.isArray(n) &&
|
|
1634
|
+
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((s) => !s.get("width")) || n.reduce((a, l) => a + l.get("width"), 0) !== 100) && t();
|
|
1625
1635
|
}
|
|
1626
1636
|
}, {
|
|
1627
1637
|
name: "space",
|
|
@@ -1671,13 +1681,13 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1671
1681
|
e.delete("srcset"), e.delete("noWebp");
|
|
1672
1682
|
function n(i, a = 6e4) {
|
|
1673
1683
|
return new Promise((l, c) => {
|
|
1674
|
-
const
|
|
1684
|
+
const p = document.createElement("img");
|
|
1675
1685
|
let d = !1;
|
|
1676
|
-
|
|
1677
|
-
d = !0, l(
|
|
1678
|
-
},
|
|
1679
|
-
console.warn("Image load failed",
|
|
1680
|
-
}),
|
|
1686
|
+
p.onload = () => {
|
|
1687
|
+
d = !0, l(p);
|
|
1688
|
+
}, p.addEventListener("error", (u) => {
|
|
1689
|
+
console.warn("Image load failed", u.error), c(u.error);
|
|
1690
|
+
}), p.src = i, setTimeout(() => {
|
|
1681
1691
|
d || c(new Error("Image load timed out"));
|
|
1682
1692
|
}, a);
|
|
1683
1693
|
});
|
|
@@ -1794,6 +1804,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1794
1804
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
1795
1805
|
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
1796
1806
|
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
1807
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
1797
1808
|
inputs: [{
|
|
1798
1809
|
name: "name",
|
|
1799
1810
|
type: "string",
|
|
@@ -1824,7 +1835,7 @@ function _sfc_render$e(e, t, n, o, r, s) {
|
|
|
1824
1835
|
}, null, 8, ["parent", "path", "context", "blocks"])
|
|
1825
1836
|
], 16);
|
|
1826
1837
|
}
|
|
1827
|
-
const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]
|
|
1838
|
+
const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]]), componentInfo$9 = {
|
|
1828
1839
|
name: "Symbol",
|
|
1829
1840
|
noWrap: !0,
|
|
1830
1841
|
static: !0,
|
|
@@ -1889,7 +1900,7 @@ function _sfc_render$d(e, t, n, o, r, s) {
|
|
|
1889
1900
|
}
|
|
1890
1901
|
}, null, 8, _hoisted_1$7);
|
|
1891
1902
|
}
|
|
1892
|
-
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d]
|
|
1903
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d]]), componentInfo$7 = {
|
|
1893
1904
|
name: "Custom Code",
|
|
1894
1905
|
static: !0,
|
|
1895
1906
|
requiredPermissions: ["editCode"],
|
|
@@ -1953,7 +1964,7 @@ function _sfc_render$c(e, t, n, o, r, s) {
|
|
|
1953
1964
|
innerHTML: e.code
|
|
1954
1965
|
}, null, 10, _hoisted_1$6);
|
|
1955
1966
|
}
|
|
1956
|
-
const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c]
|
|
1967
|
+
const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c]]), componentInfo$6 = {
|
|
1957
1968
|
name: "Embed",
|
|
1958
1969
|
static: !0,
|
|
1959
1970
|
inputs: [{
|
|
@@ -2028,8 +2039,9 @@ function _sfc_render$b(e, t, n, o, r, s) {
|
|
|
2028
2039
|
innerHTML: e.content
|
|
2029
2040
|
}, null, 8, _hoisted_1$5);
|
|
2030
2041
|
}
|
|
2031
|
-
const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b]
|
|
2042
|
+
const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b]]), componentInfo$5 = {
|
|
2032
2043
|
name: "Form:Form",
|
|
2044
|
+
// editableTags: ['builder-form-error']
|
|
2033
2045
|
defaults: {
|
|
2034
2046
|
responsiveStyles: {
|
|
2035
2047
|
large: {
|
|
@@ -2042,6 +2054,11 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2042
2054
|
inputs: [{
|
|
2043
2055
|
name: "sendSubmissionsTo",
|
|
2044
2056
|
type: "string",
|
|
2057
|
+
// TODO: save to builder data and user can download as csv
|
|
2058
|
+
// TODO: easy for mode too or computed add/remove fields form mode
|
|
2059
|
+
// so you can edit details and high level mode at same time...
|
|
2060
|
+
// Later - more integrations like mailchimp
|
|
2061
|
+
// /api/v1/form-submit?to=mailchimp
|
|
2045
2062
|
enum: [{
|
|
2046
2063
|
label: "Send to email",
|
|
2047
2064
|
value: "email",
|
|
@@ -2056,6 +2073,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2056
2073
|
name: "sendSubmissionsToEmail",
|
|
2057
2074
|
type: "string",
|
|
2058
2075
|
required: !0,
|
|
2076
|
+
// TODO: required: () => options.get("sendSubmissionsTo") === "email"
|
|
2059
2077
|
defaultValue: "your@email.com",
|
|
2060
2078
|
showIf: 'options.get("sendSubmissionsTo") === "email"'
|
|
2061
2079
|
}, {
|
|
@@ -2068,6 +2086,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2068
2086
|
name: "name",
|
|
2069
2087
|
type: "string",
|
|
2070
2088
|
defaultValue: "My form"
|
|
2089
|
+
// advanced: true
|
|
2071
2090
|
}, {
|
|
2072
2091
|
name: "action",
|
|
2073
2092
|
type: "string",
|
|
@@ -2078,6 +2097,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2078
2097
|
type: "string",
|
|
2079
2098
|
defaultValue: "application/json",
|
|
2080
2099
|
advanced: !0,
|
|
2100
|
+
// TODO: do automatically if file input
|
|
2081
2101
|
enum: ["application/json", "multipart/form-data", "application/x-www-form-urlencoded"],
|
|
2082
2102
|
showIf: 'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'
|
|
2083
2103
|
}, {
|
|
@@ -2089,6 +2109,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2089
2109
|
}, {
|
|
2090
2110
|
name: "previewState",
|
|
2091
2111
|
type: "string",
|
|
2112
|
+
// TODO: persist: false flag
|
|
2092
2113
|
enum: ["unsubmitted", "sending", "success", "error"],
|
|
2093
2114
|
defaultValue: "unsubmitted",
|
|
2094
2115
|
helperText: 'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',
|
|
@@ -2318,27 +2339,27 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2318
2339
|
const i = new FormData(o), a = Array.from(
|
|
2319
2340
|
e.currentTarget.querySelectorAll("input,select,textarea")
|
|
2320
2341
|
).filter((d) => !!d.name).map((d) => {
|
|
2321
|
-
let
|
|
2342
|
+
let u;
|
|
2322
2343
|
const f = d.name;
|
|
2323
2344
|
if (d instanceof HTMLInputElement)
|
|
2324
2345
|
if (d.type === "radio") {
|
|
2325
2346
|
if (d.checked)
|
|
2326
|
-
return
|
|
2347
|
+
return u = d.name, {
|
|
2327
2348
|
key: f,
|
|
2328
|
-
value:
|
|
2349
|
+
value: u
|
|
2329
2350
|
};
|
|
2330
2351
|
} else if (d.type === "checkbox")
|
|
2331
|
-
|
|
2352
|
+
u = d.checked;
|
|
2332
2353
|
else if (d.type === "number" || d.type === "range") {
|
|
2333
2354
|
const m = d.valueAsNumber;
|
|
2334
|
-
isNaN(m) || (
|
|
2355
|
+
isNaN(m) || (u = m);
|
|
2335
2356
|
} else
|
|
2336
|
-
d.type === "file" ?
|
|
2357
|
+
d.type === "file" ? u = d.files : u = d.value;
|
|
2337
2358
|
else
|
|
2338
|
-
|
|
2359
|
+
u = d.value;
|
|
2339
2360
|
return {
|
|
2340
2361
|
key: f,
|
|
2341
|
-
value:
|
|
2362
|
+
value: u
|
|
2342
2363
|
};
|
|
2343
2364
|
});
|
|
2344
2365
|
let l = this.contentType;
|
|
@@ -2348,11 +2369,11 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2348
2369
|
s = i;
|
|
2349
2370
|
else {
|
|
2350
2371
|
const d = {};
|
|
2351
|
-
Array.from(a).forEach(({ value:
|
|
2352
|
-
set(d, f,
|
|
2372
|
+
Array.from(a).forEach(({ value: u, key: f }) => {
|
|
2373
|
+
set(d, f, u);
|
|
2353
2374
|
}), s = JSON.stringify(d);
|
|
2354
2375
|
}
|
|
2355
|
-
l && l !== "multipart/form-data" && (t && ((n = this.action)
|
|
2376
|
+
l && l !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = l));
|
|
2356
2377
|
const c = new CustomEvent("presubmit", {
|
|
2357
2378
|
detail: {
|
|
2358
2379
|
body: s
|
|
@@ -2361,11 +2382,11 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2361
2382
|
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(c), c.defaultPrevented))
|
|
2362
2383
|
return;
|
|
2363
2384
|
this.formState = "sending";
|
|
2364
|
-
const
|
|
2385
|
+
const p = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
2365
2386
|
this.sendSubmissionsToEmail || ""
|
|
2366
2387
|
)}&name=${encodeURIComponent(this.name || "")}`;
|
|
2367
2388
|
fetch(
|
|
2368
|
-
this.sendSubmissionsTo === "email" ?
|
|
2389
|
+
this.sendSubmissionsTo === "email" ? p : this.action,
|
|
2369
2390
|
{
|
|
2370
2391
|
body: s,
|
|
2371
2392
|
headers: r,
|
|
@@ -2373,19 +2394,19 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2373
2394
|
}
|
|
2374
2395
|
).then(
|
|
2375
2396
|
async (d) => {
|
|
2376
|
-
let
|
|
2397
|
+
let u;
|
|
2377
2398
|
const f = d.headers.get("content-type");
|
|
2378
|
-
if (f && f.indexOf("application/json") !== -1 ?
|
|
2379
|
-
let m = get(
|
|
2399
|
+
if (f && f.indexOf("application/json") !== -1 ? u = await d.json() : u = await d.text(), !d.ok && this.errorMessagePath) {
|
|
2400
|
+
let m = get(u, this.errorMessagePath);
|
|
2380
2401
|
m && (typeof m != "string" && (m = JSON.stringify(m)), this.formErrorMessage = m, this.mergeNewRootState({
|
|
2381
2402
|
formErrorMessage: m
|
|
2382
2403
|
}));
|
|
2383
2404
|
}
|
|
2384
|
-
if (this.responseData =
|
|
2405
|
+
if (this.responseData = u, this.formState = d.ok ? "success" : "error", d.ok) {
|
|
2385
2406
|
const m = new CustomEvent("submit:success", {
|
|
2386
2407
|
detail: {
|
|
2387
2408
|
res: d,
|
|
2388
|
-
body:
|
|
2409
|
+
body: u
|
|
2389
2410
|
}
|
|
2390
2411
|
});
|
|
2391
2412
|
if (this.$refs.formRef) {
|
|
@@ -2406,18 +2427,18 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2406
2427
|
}
|
|
2407
2428
|
},
|
|
2408
2429
|
(d) => {
|
|
2409
|
-
const
|
|
2430
|
+
const u = new CustomEvent("submit:error", {
|
|
2410
2431
|
detail: {
|
|
2411
2432
|
error: d
|
|
2412
2433
|
}
|
|
2413
2434
|
});
|
|
2414
|
-
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
2435
|
+
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented) || (this.responseData = d, this.formState = "error");
|
|
2415
2436
|
}
|
|
2416
2437
|
);
|
|
2417
2438
|
}
|
|
2418
2439
|
}
|
|
2419
2440
|
}
|
|
2420
|
-
}),
|
|
2441
|
+
}), _hoisted_1$4 = ["validate", "action", "method", "name"], _hoisted_2$2 = {
|
|
2421
2442
|
key: 3,
|
|
2422
2443
|
class: "builder-form-error-text pre-tqyw9m0iue"
|
|
2423
2444
|
};
|
|
@@ -2432,36 +2453,36 @@ function _sfc_render$a(e, t, n, o, r, s) {
|
|
|
2432
2453
|
name: e.name,
|
|
2433
2454
|
onSubmit: t[0] || (t[0] = (c) => e.onSubmit(c))
|
|
2434
2455
|
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2435
|
-
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((l = e.builderBlock) == null ? void 0 : l.children, (c,
|
|
2456
|
+
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((l = e.builderBlock) == null ? void 0 : l.children, (c, p) => (openBlock(), createBlock(i, {
|
|
2436
2457
|
key: `form-block-${e.idx}`,
|
|
2437
2458
|
block: c,
|
|
2438
2459
|
context: e.builderContext,
|
|
2439
2460
|
registeredComponents: e.builderComponents,
|
|
2440
2461
|
linkComponent: e.builderLinkComponent
|
|
2441
|
-
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : createCommentVNode("
|
|
2462
|
+
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : createCommentVNode("", !0),
|
|
2442
2463
|
e.submissionState() === "error" ? (openBlock(), createBlock(a, {
|
|
2443
2464
|
key: 1,
|
|
2444
2465
|
path: "errorMessage",
|
|
2445
2466
|
blocks: e.errorMessage,
|
|
2446
2467
|
context: e.builderContext
|
|
2447
|
-
}, null, 8, ["blocks", "context"])) : createCommentVNode("
|
|
2468
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
|
|
2448
2469
|
e.submissionState() === "sending" ? (openBlock(), createBlock(a, {
|
|
2449
2470
|
key: 2,
|
|
2450
2471
|
path: "sendingMessage",
|
|
2451
2472
|
blocks: e.sendingMessage,
|
|
2452
2473
|
context: e.builderContext
|
|
2453
|
-
}, null, 8, ["blocks", "context"])) : createCommentVNode("
|
|
2474
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
|
|
2454
2475
|
e.submissionState() === "error" && e.responseData ? (openBlock(), createElementBlock("pre", _hoisted_2$2, " " + toDisplayString(JSON.stringify(e.responseData, null, 2)) + `
|
|
2455
|
-
`, 1)) : createCommentVNode("
|
|
2476
|
+
`, 1)) : createCommentVNode("", !0),
|
|
2456
2477
|
e.submissionState() === "success" ? (openBlock(), createBlock(a, {
|
|
2457
2478
|
key: 4,
|
|
2458
2479
|
path: "successMessage",
|
|
2459
2480
|
blocks: e.successMessage,
|
|
2460
2481
|
context: e.builderContext
|
|
2461
|
-
}, null, 8, ["blocks", "context"])) : createCommentVNode("
|
|
2482
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0)
|
|
2462
2483
|
], 16, _hoisted_1$4);
|
|
2463
2484
|
}
|
|
2464
|
-
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-
|
|
2485
|
+
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-e7803f50"]]), componentInfo$4 = {
|
|
2465
2486
|
name: "Form:Input",
|
|
2466
2487
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2467
2488
|
inputs: [
|
|
@@ -2483,6 +2504,7 @@ const Form = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a]
|
|
|
2483
2504
|
defaultValue: "Hello there",
|
|
2484
2505
|
helperText: "Text to display when there is no value"
|
|
2485
2506
|
},
|
|
2507
|
+
// TODO: handle value vs default value automatically like ng-model
|
|
2486
2508
|
{
|
|
2487
2509
|
name: "defaultValue",
|
|
2488
2510
|
type: "string"
|
|
@@ -2537,7 +2559,7 @@ function _sfc_render$9(e, t, n, o, r, s) {
|
|
|
2537
2559
|
required: e.required
|
|
2538
2560
|
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$3);
|
|
2539
2561
|
}
|
|
2540
|
-
const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]
|
|
2562
|
+
const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]), componentInfo$3 = {
|
|
2541
2563
|
name: "Form:Select",
|
|
2542
2564
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2543
2565
|
defaultStyles: {
|
|
@@ -2599,7 +2621,7 @@ function _sfc_render$8(e, t, n, o, r, s) {
|
|
|
2599
2621
|
}, toDisplayString(i.name || i.value), 9, _hoisted_2$1))), 128))
|
|
2600
2622
|
], 16, _hoisted_1$2);
|
|
2601
2623
|
}
|
|
2602
|
-
const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]
|
|
2624
|
+
const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]), componentInfo$2 = {
|
|
2603
2625
|
name: "Form:SubmitButton",
|
|
2604
2626
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2605
2627
|
defaultStyles: {
|
|
@@ -2620,6 +2642,10 @@ const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_ren
|
|
|
2620
2642
|
}],
|
|
2621
2643
|
static: !0,
|
|
2622
2644
|
noWrap: !0
|
|
2645
|
+
// TODO: optional children? maybe as optional form input
|
|
2646
|
+
// that only shows if advanced setting is flipped
|
|
2647
|
+
// TODO: defaultChildren
|
|
2648
|
+
// canHaveChildren: true,
|
|
2623
2649
|
}, _sfc_main$8 = defineComponent({
|
|
2624
2650
|
name: "builder-submit-button",
|
|
2625
2651
|
props: ["attributes", "text"],
|
|
@@ -2630,7 +2656,8 @@ const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_ren
|
|
|
2630
2656
|
function _sfc_render$7(e, t, n, o, r, s) {
|
|
2631
2657
|
return openBlock(), createElementBlock("button", mergeProps({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17);
|
|
2632
2658
|
}
|
|
2633
|
-
const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]
|
|
2659
|
+
const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]), componentInfo$1 = {
|
|
2660
|
+
// friendlyName?
|
|
2634
2661
|
name: "Raw:Img",
|
|
2635
2662
|
hideFromInsertMenu: !0,
|
|
2636
2663
|
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",
|
|
@@ -2668,7 +2695,7 @@ function _sfc_render$6(e, t, n, o, r, s) {
|
|
|
2668
2695
|
src: e.imgSrc || e.image
|
|
2669
2696
|
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$1);
|
|
2670
2697
|
}
|
|
2671
|
-
const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]
|
|
2698
|
+
const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]), componentInfo = {
|
|
2672
2699
|
name: "Video",
|
|
2673
2700
|
canHaveChildren: !0,
|
|
2674
2701
|
defaultStyles: {
|
|
@@ -2818,7 +2845,7 @@ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6],
|
|
|
2818
2845
|
}
|
|
2819
2846
|
};
|
|
2820
2847
|
function _sfc_render$5(e, t, n, o, r, s) {
|
|
2821
|
-
var i, a, l, c,
|
|
2848
|
+
var i, a, l, c, p, d, u;
|
|
2822
2849
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2823
2850
|
createElementVNode("video", mergeProps({
|
|
2824
2851
|
class: "builder-video",
|
|
@@ -2829,6 +2856,8 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2829
2856
|
...(i = e.attributes) == null ? void 0 : i.style,
|
|
2830
2857
|
objectFit: e.fit,
|
|
2831
2858
|
objectPosition: e.position,
|
|
2859
|
+
// Hack to get object fit to work as expected and
|
|
2860
|
+
// not have the video overflow
|
|
2832
2861
|
zIndex: 2,
|
|
2833
2862
|
borderRadius: "1px",
|
|
2834
2863
|
...e.aspectRatio ? {
|
|
@@ -2838,13 +2867,13 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2838
2867
|
src: e.video || "no-src",
|
|
2839
2868
|
poster: e.posterImage
|
|
2840
2869
|
}, e.spreadProps), [
|
|
2841
|
-
e.lazyLoad ? createCommentVNode("
|
|
2870
|
+
e.lazyLoad ? createCommentVNode("", !0) : (openBlock(), createElementBlock("source", {
|
|
2842
2871
|
key: 0,
|
|
2843
2872
|
type: "video/mp4",
|
|
2844
2873
|
src: e.video
|
|
2845
2874
|
}, null, 8, _hoisted_3))
|
|
2846
2875
|
], 16, _hoisted_2),
|
|
2847
|
-
e.aspectRatio && !(e.fitContent && ((l = (a = e.builderBlock) == null ? void 0 : a.children)
|
|
2876
|
+
e.aspectRatio && !(e.fitContent && ((l = (a = e.builderBlock) == null ? void 0 : a.children) != null && l.length)) ? (openBlock(), createElementBlock("div", {
|
|
2848
2877
|
key: 0,
|
|
2849
2878
|
style: normalizeStyle({
|
|
2850
2879
|
width: "100%",
|
|
@@ -2852,16 +2881,16 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2852
2881
|
pointerEvents: "none",
|
|
2853
2882
|
fontSize: "0px"
|
|
2854
2883
|
})
|
|
2855
|
-
}, null, 4)) : createCommentVNode("
|
|
2856
|
-
(
|
|
2884
|
+
}, null, 4)) : createCommentVNode("", !0),
|
|
2885
|
+
(p = (c = e.builderBlock) == null ? void 0 : c.children) != null && p.length && e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2857
2886
|
renderSlot(e.$slots, "default")
|
|
2858
|
-
])) : createCommentVNode("
|
|
2859
|
-
(
|
|
2887
|
+
])) : createCommentVNode("", !0),
|
|
2888
|
+
(u = (d = e.builderBlock) == null ? void 0 : d.children) != null && u.length && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2860
2889
|
renderSlot(e.$slots, "default")
|
|
2861
|
-
])) : createCommentVNode("
|
|
2890
|
+
])) : createCommentVNode("", !0)
|
|
2862
2891
|
]);
|
|
2863
2892
|
}
|
|
2864
|
-
const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]
|
|
2893
|
+
const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]), getExtraComponents = () => [{
|
|
2865
2894
|
component: customCode,
|
|
2866
2895
|
...componentInfo$7
|
|
2867
2896
|
}, {
|
|
@@ -3038,7 +3067,7 @@ const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5
|
|
|
3038
3067
|
},
|
|
3039
3068
|
name: "inlined-script",
|
|
3040
3069
|
props: ["scriptStr", "id"]
|
|
3041
|
-
})
|
|
3070
|
+
});
|
|
3042
3071
|
function getGlobalThis() {
|
|
3043
3072
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
3044
3073
|
}
|
|
@@ -3095,40 +3124,40 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
3095
3124
|
includeRefs: a = !0,
|
|
3096
3125
|
enrich: l,
|
|
3097
3126
|
locale: c,
|
|
3098
|
-
apiVersion:
|
|
3127
|
+
apiVersion: p = DEFAULT_API_VERSION,
|
|
3099
3128
|
fields: d,
|
|
3100
|
-
omit:
|
|
3129
|
+
omit: u,
|
|
3101
3130
|
offset: f,
|
|
3102
3131
|
cacheSeconds: m,
|
|
3103
3132
|
staleCacheSeconds: g,
|
|
3104
|
-
sort:
|
|
3133
|
+
sort: k,
|
|
3105
3134
|
includeUnpublished: C
|
|
3106
3135
|
} = e;
|
|
3107
3136
|
if (!i)
|
|
3108
3137
|
throw new Error("Missing API key");
|
|
3109
|
-
if (!["v3"].includes(
|
|
3110
|
-
throw new Error(`Invalid apiVersion: expected 'v3', received '${
|
|
3138
|
+
if (!["v3"].includes(p))
|
|
3139
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${p}'`);
|
|
3111
3140
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
3112
|
-
const b = new URL(`https://cdn.builder.io/api/${
|
|
3113
|
-
if (b.searchParams.set("omit",
|
|
3114
|
-
const
|
|
3115
|
-
sort:
|
|
3141
|
+
const b = new URL(`https://cdn.builder.io/api/${p}/content/${s}?apiKey=${i}&limit=${n}&noTraverse=${t}&includeRefs=${a}${c ? `&locale=${c}` : ""}${l ? `&enrich=${l}` : ""}`);
|
|
3142
|
+
if (b.searchParams.set("omit", u || "meta.componentsUsed"), d && b.searchParams.set("fields", d), Number.isFinite(f) && f > -1 && b.searchParams.set("offset", String(Math.floor(f))), typeof C == "boolean" && b.searchParams.set("includeUnpublished", String(C)), m && isPositiveNumber(m) && b.searchParams.set("cacheSeconds", String(m)), g && isPositiveNumber(g) && b.searchParams.set("staleCacheSeconds", String(g)), k) {
|
|
3143
|
+
const y = flatten({
|
|
3144
|
+
sort: k
|
|
3116
3145
|
});
|
|
3117
|
-
for (const S in
|
|
3118
|
-
b.searchParams.set(S, JSON.stringify(
|
|
3146
|
+
for (const S in y)
|
|
3147
|
+
b.searchParams.set(S, JSON.stringify(y[S]));
|
|
3119
3148
|
}
|
|
3120
3149
|
const I = {
|
|
3121
3150
|
...getBuilderSearchParamsFromWindow(),
|
|
3122
3151
|
...normalizeSearchParams(e.options || {})
|
|
3123
3152
|
}, v = flatten(I);
|
|
3124
|
-
for (const
|
|
3125
|
-
b.searchParams.set(
|
|
3153
|
+
for (const y in v)
|
|
3154
|
+
b.searchParams.set(y, String(v[y]));
|
|
3126
3155
|
if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), r) {
|
|
3127
|
-
const
|
|
3156
|
+
const y = flatten({
|
|
3128
3157
|
query: r
|
|
3129
3158
|
});
|
|
3130
|
-
for (const S in
|
|
3131
|
-
b.searchParams.set(S, JSON.stringify(
|
|
3159
|
+
for (const S in y)
|
|
3160
|
+
b.searchParams.set(S, JSON.stringify(y[S]));
|
|
3132
3161
|
}
|
|
3133
3162
|
return b;
|
|
3134
3163
|
}, checkContentHasResults = (e) => "results" in e;
|
|
@@ -3173,7 +3202,7 @@ async function fetchEntries(e) {
|
|
|
3173
3202
|
}
|
|
3174
3203
|
const getAllContent = fetchEntries;
|
|
3175
3204
|
function isPreviewing() {
|
|
3176
|
-
return !isBrowser() || isEditing() ? !1 :
|
|
3205
|
+
return !isBrowser() || isEditing() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
3177
3206
|
}
|
|
3178
3207
|
function uuidv4() {
|
|
3179
3208
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
@@ -3299,7 +3328,7 @@ async function _track(e) {
|
|
|
3299
3328
|
logger.error("Missing API key for track call. Please provide your API key.");
|
|
3300
3329
|
return;
|
|
3301
3330
|
}
|
|
3302
|
-
if (
|
|
3331
|
+
if (e.canTrack && !isEditing() && (isBrowser() || TARGET === "reactNative"))
|
|
3303
3332
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
3304
3333
|
method: "POST",
|
|
3305
3334
|
body: JSON.stringify({
|
|
@@ -3333,7 +3362,7 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
3333
3362
|
return null;
|
|
3334
3363
|
}, findBuilderParent = (e) => findParentElement(e, (t) => {
|
|
3335
3364
|
const n = t.getAttribute("builder-id") || t.id;
|
|
3336
|
-
return
|
|
3365
|
+
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
3337
3366
|
}), computeOffset = ({
|
|
3338
3367
|
event: e,
|
|
3339
3368
|
target: t
|
|
@@ -3364,7 +3393,7 @@ function isFromTrustedHost(e, t) {
|
|
|
3364
3393
|
const n = new URL(t.origin), o = n.hostname;
|
|
3365
3394
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
3366
3395
|
}
|
|
3367
|
-
const SDK_VERSION = "0.13.
|
|
3396
|
+
const SDK_VERSION = "0.13.3", registry = {};
|
|
3368
3397
|
function register(e, t) {
|
|
3369
3398
|
let n = registry[e];
|
|
3370
3399
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -3414,6 +3443,8 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3414
3443
|
target: TARGET,
|
|
3415
3444
|
version: SDK_VERSION,
|
|
3416
3445
|
supportsPatchUpdates: !1,
|
|
3446
|
+
// Supports builder-model="..." attribute which is needed to
|
|
3447
|
+
// scope our '+ add block' button styling
|
|
3417
3448
|
supportsAddBlockScoping: !0,
|
|
3418
3449
|
supportsCustomBreakpoints: !0
|
|
3419
3450
|
}
|
|
@@ -3429,21 +3460,21 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3429
3460
|
const {
|
|
3430
3461
|
data: r
|
|
3431
3462
|
} = o;
|
|
3432
|
-
if (
|
|
3463
|
+
if (r != null && r.type)
|
|
3433
3464
|
switch (r.type) {
|
|
3434
3465
|
case "builder.evaluate": {
|
|
3435
|
-
const a = r.data.text, l = r.data.arguments || [], c = r.data.id,
|
|
3436
|
-
let d,
|
|
3466
|
+
const a = r.data.text, l = r.data.arguments || [], c = r.data.id, p = new Function(a);
|
|
3467
|
+
let d, u = null;
|
|
3437
3468
|
try {
|
|
3438
|
-
d =
|
|
3469
|
+
d = p.apply(null, l);
|
|
3439
3470
|
} catch (f) {
|
|
3440
|
-
|
|
3471
|
+
u = f;
|
|
3441
3472
|
}
|
|
3442
|
-
|
|
3473
|
+
u ? (s = window.parent) == null || s.postMessage({
|
|
3443
3474
|
type: "builder.evaluateError",
|
|
3444
3475
|
data: {
|
|
3445
3476
|
id: c,
|
|
3446
|
-
error:
|
|
3477
|
+
error: u.message
|
|
3447
3478
|
}
|
|
3448
3479
|
}, "*") : d && typeof d.then == "function" ? d.then((f) => {
|
|
3449
3480
|
var m;
|
|
@@ -3760,14 +3791,14 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3760
3791
|
});
|
|
3761
3792
|
},
|
|
3762
3793
|
runHttpRequests() {
|
|
3763
|
-
var t, n
|
|
3764
|
-
const e = (
|
|
3765
|
-
Object.entries(e).forEach(([
|
|
3766
|
-
if (
|
|
3767
|
-
const
|
|
3794
|
+
var t, n;
|
|
3795
|
+
const e = ((n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) ?? {};
|
|
3796
|
+
Object.entries(e).forEach(([o, r]) => {
|
|
3797
|
+
if (r && (!this.httpReqsData[o] || isEditing())) {
|
|
3798
|
+
const s = this.evalExpression(r);
|
|
3768
3799
|
this.handleRequest({
|
|
3769
|
-
url:
|
|
3770
|
-
key:
|
|
3800
|
+
url: s,
|
|
3801
|
+
key: o
|
|
3771
3802
|
});
|
|
3772
3803
|
}
|
|
3773
3804
|
});
|
|
@@ -3848,11 +3879,11 @@ function _sfc_render$4(e, t, n, o, r, s) {
|
|
|
3848
3879
|
renderSlot(e.$slots, "default")
|
|
3849
3880
|
]),
|
|
3850
3881
|
_: 3
|
|
3851
|
-
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : createCommentVNode("
|
|
3882
|
+
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : createCommentVNode("", !0);
|
|
3852
3883
|
}
|
|
3853
|
-
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]
|
|
3854
|
-
var s
|
|
3855
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o =
|
|
3884
|
+
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]), getCssFromFont = (e) => {
|
|
3885
|
+
var s;
|
|
3886
|
+
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);
|
|
3856
3887
|
let r = "";
|
|
3857
3888
|
if (o && t && n && (r += `
|
|
3858
3889
|
@font-face {
|
|
@@ -3862,16 +3893,16 @@ font-display: fallback;
|
|
|
3862
3893
|
font-weight: 400;
|
|
3863
3894
|
}
|
|
3864
3895
|
`.trim()), e.files)
|
|
3865
|
-
for (const
|
|
3866
|
-
if (!(String(Number(
|
|
3896
|
+
for (const i in e.files) {
|
|
3897
|
+
if (!(String(Number(i)) === i))
|
|
3867
3898
|
continue;
|
|
3868
|
-
const
|
|
3869
|
-
|
|
3899
|
+
const l = e.files[i];
|
|
3900
|
+
l && l !== o && (r += `
|
|
3870
3901
|
@font-face {
|
|
3871
3902
|
font-family: "${t}";
|
|
3872
|
-
src: url('${
|
|
3903
|
+
src: url('${l}') format('woff2');
|
|
3873
3904
|
font-display: fallback;
|
|
3874
|
-
font-weight: ${
|
|
3905
|
+
font-weight: ${i};
|
|
3875
3906
|
}
|
|
3876
3907
|
`.trim());
|
|
3877
3908
|
}
|
|
@@ -3886,7 +3917,7 @@ font-weight: ${a};
|
|
|
3886
3917
|
contentId: t
|
|
3887
3918
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", _sfc_main$3 = defineComponent({
|
|
3888
3919
|
name: "content-styles",
|
|
3889
|
-
components: { InlinedStyles },
|
|
3920
|
+
components: { InlinedStyles: _sfc_main$k },
|
|
3890
3921
|
props: ["cssCode", "contentId", "customFonts"],
|
|
3891
3922
|
data() {
|
|
3892
3923
|
return {
|
|
@@ -3923,7 +3954,7 @@ function _sfc_render$3(e, t, n, o, r, s) {
|
|
|
3923
3954
|
const i = resolveComponent("inlined-styles");
|
|
3924
3955
|
return openBlock(), createBlock(i, { styles: e.injectedStyles }, null, 8, ["styles"]);
|
|
3925
3956
|
}
|
|
3926
|
-
const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]
|
|
3957
|
+
const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]), getRootStateInitialValue = ({
|
|
3927
3958
|
content: e,
|
|
3928
3959
|
data: t,
|
|
3929
3960
|
locale: n
|
|
@@ -3954,7 +3985,7 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
3954
3985
|
name: "content-component",
|
|
3955
3986
|
components: {
|
|
3956
3987
|
EnableEditor,
|
|
3957
|
-
InlinedScript,
|
|
3988
|
+
InlinedScript: _sfc_main$5,
|
|
3958
3989
|
ContentStyles,
|
|
3959
3990
|
Blocks
|
|
3960
3991
|
},
|
|
@@ -3983,11 +4014,18 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
3983
4014
|
var e, t;
|
|
3984
4015
|
return {
|
|
3985
4016
|
scriptStr: getUpdateVariantVisibilityScript({
|
|
4017
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3986
4018
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
4019
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3987
4020
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
3988
4021
|
}),
|
|
3989
4022
|
registeredComponents: [
|
|
3990
4023
|
...getDefaultRegisteredComponents(),
|
|
4024
|
+
// While this `components` object is deprecated, we must maintain support for it.
|
|
4025
|
+
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
4026
|
+
// existing usage.
|
|
4027
|
+
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
4028
|
+
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
3991
4029
|
...components,
|
|
3992
4030
|
...this.customComponents || []
|
|
3993
4031
|
].reduce(
|
|
@@ -4017,6 +4055,11 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4017
4055
|
apiVersion: this.apiVersion,
|
|
4018
4056
|
componentInfos: [
|
|
4019
4057
|
...getDefaultRegisteredComponents(),
|
|
4058
|
+
// While this `components` object is deprecated, we must maintain support for it.
|
|
4059
|
+
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
4060
|
+
// existing usage.
|
|
4061
|
+
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
4062
|
+
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
4020
4063
|
...components,
|
|
4021
4064
|
...this.customComponents || []
|
|
4022
4065
|
].reduce(
|
|
@@ -4067,20 +4110,20 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
4067
4110
|
trustedHosts: e.trustedHosts
|
|
4068
4111
|
}, {}), {
|
|
4069
4112
|
default: withCtx(() => {
|
|
4070
|
-
var
|
|
4113
|
+
var p, d, u, f, m, g, k;
|
|
4071
4114
|
return [
|
|
4072
4115
|
e.isSsrAbTest ? (openBlock(), createBlock(i, {
|
|
4073
4116
|
key: 0,
|
|
4074
4117
|
scriptStr: e.scriptStr
|
|
4075
|
-
}, null, 8, ["scriptStr"])) : createCommentVNode("
|
|
4118
|
+
}, null, 8, ["scriptStr"])) : createCommentVNode("", !0),
|
|
4076
4119
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(a, {
|
|
4077
4120
|
key: 1,
|
|
4078
|
-
contentId: (
|
|
4079
|
-
cssCode: (
|
|
4121
|
+
contentId: (p = e.builderContextSignal.content) == null ? void 0 : p.id,
|
|
4122
|
+
cssCode: (u = (d = e.builderContextSignal.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
|
|
4080
4123
|
customFonts: (m = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : m.customFonts
|
|
4081
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) : createCommentVNode("
|
|
4124
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : createCommentVNode("", !0),
|
|
4082
4125
|
createVNode(l, {
|
|
4083
|
-
blocks: (
|
|
4126
|
+
blocks: (k = (g = e.builderContextSignal.content) == null ? void 0 : g.data) == null ? void 0 : k.blocks,
|
|
4084
4127
|
context: e.builderContextSignal,
|
|
4085
4128
|
registeredComponents: e.registeredComponents,
|
|
4086
4129
|
linkComponent: e.linkComponent
|
|
@@ -4090,11 +4133,11 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
4090
4133
|
_: 1
|
|
4091
4134
|
}, 16, ["content", "data", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "linkComponent", "trustedHosts"]);
|
|
4092
4135
|
}
|
|
4093
|
-
const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]
|
|
4136
|
+
const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]), _sfc_main$1 = defineComponent({
|
|
4094
4137
|
name: "content-variants",
|
|
4095
4138
|
components: {
|
|
4096
|
-
InlinedScript,
|
|
4097
|
-
InlinedStyles,
|
|
4139
|
+
InlinedScript: _sfc_main$5,
|
|
4140
|
+
InlinedStyles: _sfc_main$k,
|
|
4098
4141
|
ContentComponent
|
|
4099
4142
|
},
|
|
4100
4143
|
props: [
|
|
@@ -4164,16 +4207,16 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
4164
4207
|
!e.__isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
4165
4208
|
key: 0,
|
|
4166
4209
|
scriptStr: e.getScriptString()
|
|
4167
|
-
}, null, 8, ["scriptStr"])) : createCommentVNode("
|
|
4210
|
+
}, null, 8, ["scriptStr"])) : createCommentVNode("", !0),
|
|
4168
4211
|
e.shouldRenderVariants ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
4169
4212
|
createVNode(a, {
|
|
4170
4213
|
id: `variants-styles-${(c = e.content) == null ? void 0 : c.id}`,
|
|
4171
4214
|
styles: e.hideVariantsStyleString
|
|
4172
4215
|
}, null, 8, ["id", "styles"]),
|
|
4173
4216
|
createVNode(i, { scriptStr: e.updateCookieAndStylesScriptStr }, null, 8, ["scriptStr"]),
|
|
4174
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (
|
|
4175
|
-
key:
|
|
4176
|
-
content:
|
|
4217
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (p, d) => (openBlock(), createBlock(l, {
|
|
4218
|
+
key: p.testVariationId,
|
|
4219
|
+
content: p,
|
|
4177
4220
|
showContent: !1,
|
|
4178
4221
|
model: e.model,
|
|
4179
4222
|
data: e.data,
|
|
@@ -4193,7 +4236,7 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
4193
4236
|
contentWrapperProps: e.contentWrapperProps,
|
|
4194
4237
|
trustedHosts: e.trustedHosts
|
|
4195
4238
|
}, null, 8, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
4196
|
-
], 64)) : createCommentVNode("
|
|
4239
|
+
], 64)) : createCommentVNode("", !0),
|
|
4197
4240
|
createVNode(l, mergeProps({
|
|
4198
4241
|
content: e.defaultContent,
|
|
4199
4242
|
showContent: !0,
|
|
@@ -4219,11 +4262,12 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
4219
4262
|
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4220
4263
|
], 64);
|
|
4221
4264
|
}
|
|
4222
|
-
const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]
|
|
4265
|
+
const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]), fetchSymbolContent = async ({
|
|
4223
4266
|
builderContextValue: e,
|
|
4224
4267
|
symbol: t
|
|
4225
4268
|
}) => {
|
|
4226
|
-
if (
|
|
4269
|
+
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4270
|
+
(e != null && e.apiKey))
|
|
4227
4271
|
return fetchOneEntry({
|
|
4228
4272
|
model: t.model,
|
|
4229
4273
|
apiKey: e.apiKey,
|
|
@@ -4240,7 +4284,6 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
4240
4284
|
name: "builder-symbol",
|
|
4241
4285
|
components: { ContentVariants: Content },
|
|
4242
4286
|
props: [
|
|
4243
|
-
"js",
|
|
4244
4287
|
"attributes",
|
|
4245
4288
|
"symbol",
|
|
4246
4289
|
"dynamic",
|
|
@@ -4271,7 +4314,7 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
4271
4314
|
this.attributes[getClassPropName()],
|
|
4272
4315
|
"builder-symbol",
|
|
4273
4316
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
4274
|
-
(
|
|
4317
|
+
(t = this.symbol) != null && t.dynamic || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
4275
4318
|
].filter(Boolean).join(" ");
|
|
4276
4319
|
},
|
|
4277
4320
|
onUpdateHook0() {
|
|
@@ -4292,7 +4335,7 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
4292
4335
|
}
|
|
4293
4336
|
});
|
|
4294
4337
|
function _sfc_render(e, t, n, o, r, s) {
|
|
4295
|
-
var a, l, c,
|
|
4338
|
+
var a, l, c, p, d;
|
|
4296
4339
|
const i = resolveComponent("content-variants");
|
|
4297
4340
|
return openBlock(), createElementBlock("div", mergeProps({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
4298
4341
|
createVNode(i, {
|
|
@@ -4307,7 +4350,7 @@ function _sfc_render(e, t, n, o, r, s) {
|
|
|
4307
4350
|
data: {
|
|
4308
4351
|
...(l = e.symbol) == null ? void 0 : l.data,
|
|
4309
4352
|
...e.builderContext.localState,
|
|
4310
|
-
...(
|
|
4353
|
+
...(p = (c = e.contentToUse) == null ? void 0 : c.data) == null ? void 0 : p.state
|
|
4311
4354
|
},
|
|
4312
4355
|
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
4313
4356
|
content: e.contentToUse,
|
|
@@ -4315,7 +4358,7 @@ function _sfc_render(e, t, n, o, r, s) {
|
|
|
4315
4358
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content", "linkComponent"])
|
|
4316
4359
|
], 16);
|
|
4317
4360
|
}
|
|
4318
|
-
const Symbol$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]
|
|
4361
|
+
const Symbol$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]), RenderBlocks = Blocks, RenderContent = Content, settings = {};
|
|
4319
4362
|
function setEditorSettings(e) {
|
|
4320
4363
|
if (isBrowser()) {
|
|
4321
4364
|
Object.assign(settings, e);
|
|
@@ -4355,28 +4398,28 @@ export {
|
|
|
4355
4398
|
Fragment as F,
|
|
4356
4399
|
getAllContent as G,
|
|
4357
4400
|
getContent as H,
|
|
4358
|
-
|
|
4401
|
+
Image as I,
|
|
4359
4402
|
dynamicRenderer as J,
|
|
4360
4403
|
block as K,
|
|
4361
4404
|
RenderBlocks as R,
|
|
4362
4405
|
Section as S,
|
|
4363
4406
|
TARGET as T,
|
|
4364
4407
|
Video as V,
|
|
4365
|
-
|
|
4408
|
+
_sfc_main$k as _,
|
|
4366
4409
|
getSizesForBreakpoints as a,
|
|
4367
4410
|
createCssClass as b,
|
|
4368
4411
|
checkIsDefined as c,
|
|
4369
4412
|
getMaxWidthQueryForSize as d,
|
|
4370
|
-
|
|
4371
|
-
|
|
4413
|
+
_export_sfc as e,
|
|
4414
|
+
evaluate as f,
|
|
4372
4415
|
getProcessedBlock as g,
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4416
|
+
getStyle as h,
|
|
4417
|
+
getClassPropName as i,
|
|
4418
|
+
BuilderContext as j,
|
|
4419
|
+
Blocks as k,
|
|
4420
|
+
RenderContent as l,
|
|
4421
|
+
Button as m,
|
|
4422
|
+
Columns as n,
|
|
4380
4423
|
Symbol$1 as o,
|
|
4381
4424
|
Text as p,
|
|
4382
4425
|
isEditing as q,
|