@builder.io/sdk-vue 0.13.1 → 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.f235a6b3.js → block-styles-jDSz7IPu.js} +15 -15
- package/lib/browser/{block-wrapper.5c142781.cjs → block-wrapper-aYMueUMD.cjs} +1 -1
- package/lib/browser/{block-wrapper.0326cf92.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/component-info.d.ts +2 -0
- package/lib/browser/blocks/form/form/form.vue.d.ts +112 -0
- package/lib/browser/blocks/form/input/component-info.d.ts +2 -0
- package/lib/browser/blocks/form/input/input.vue.d.ts +43 -0
- package/lib/browser/blocks/form/select/component-info.d.ts +2 -0
- package/lib/browser/blocks/form/select/select.vue.d.ts +38 -0
- package/lib/browser/blocks/form/submit-button/component-info.d.ts +2 -0
- package/lib/browser/blocks/form/submit-button/submit-button.vue.d.ts +21 -0
- 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 +7 -7
- 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.1182befe.cjs → component-ref-23FBngqj.cjs} +1 -1
- package/lib/browser/{component-ref.4425a615.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/extra-components.d.ts +7 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/get-env.d.ts +2 -0
- package/lib/browser/functions/get.d.ts +1 -0
- package/lib/browser/get-block-properties-KacPzO_o.cjs +1 -0
- package/lib/browser/{get-block-properties.73425f09.js → get-block-properties-ZirT3ZGB.js} +19 -20
- package/lib/browser/{index.5f9ed15d.js → index-6a_qPbnw.js} +1710 -1055
- 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.4b8c3ea0.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.c430e392.js → block-styles-Tjp0oeui.js} +18 -18
- package/lib/edge/{block-wrapper.53b24038.cjs → block-wrapper-K-I0ddom.cjs} +1 -1
- package/lib/{node/block-wrapper.779562b4.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/component-info.d.ts +2 -0
- package/lib/edge/blocks/form/form/form.vue.d.ts +112 -0
- package/lib/edge/blocks/form/input/component-info.d.ts +2 -0
- package/lib/edge/blocks/form/input/input.vue.d.ts +43 -0
- package/lib/edge/blocks/form/select/component-info.d.ts +2 -0
- package/lib/edge/blocks/form/select/select.vue.d.ts +38 -0
- package/lib/edge/blocks/form/submit-button/component-info.d.ts +2 -0
- package/lib/edge/blocks/form/submit-button/submit-button.vue.d.ts +21 -0
- 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 +7 -7
- 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.ebab0bd9.js → component-ref-Oo-dR5xV.js} +21 -17
- package/lib/edge/{component-ref.62a7f1bd.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/extra-components.d.ts +7 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/get-env.d.ts +2 -0
- package/lib/edge/functions/get.d.ts +1 -0
- package/lib/{node/get-block-properties.5a8121c0.js → edge/get-block-properties-BKnsvu-2.js} +19 -20
- package/lib/edge/get-block-properties-q52zAZuL.cjs +1 -0
- package/lib/edge/{index.ae2d13a8.js → index-FjGYEtq6.js} +2574 -1919
- 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.ea7178d4.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.5c506171.js → block-styles-WHZ3oh47.js} +18 -19
- package/lib/node/block-wrapper-7G595XQl.cjs +1 -0
- package/lib/{edge/block-wrapper.f04e7d06.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/component-info.d.ts +2 -0
- package/lib/node/blocks/form/form/form.vue.d.ts +112 -0
- package/lib/node/blocks/form/input/component-info.d.ts +2 -0
- package/lib/node/blocks/form/input/input.vue.d.ts +43 -0
- package/lib/node/blocks/form/select/component-info.d.ts +2 -0
- package/lib/node/blocks/form/select/select.vue.d.ts +38 -0
- package/lib/node/blocks/form/submit-button/component-info.d.ts +2 -0
- package/lib/node/blocks/form/submit-button/submit-button.vue.d.ts +21 -0
- 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 +7 -7
- 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.616a1d7e.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/extra-components.d.ts +7 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/get-env.d.ts +2 -0
- package/lib/node/functions/get.d.ts +1 -0
- package/lib/{edge/get-block-properties.3eea9a11.js → node/get-block-properties-LsQPb5mK.js} +19 -20
- package/lib/node/get-block-properties-saGQjgeQ.cjs +1 -0
- package/lib/node/{index.f804c64d.js → index-TgZujUqz.js} +1131 -474
- 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.4fe417ba.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.443192e0.cjs +0 -1
- package/lib/browser/blocks/form/component-info.d.ts +0 -2
- package/lib/browser/blocks/input/component-info.d.ts +0 -2
- package/lib/browser/blocks/select/component-info.d.ts +0 -2
- package/lib/browser/blocks/submit-button/component-info.d.ts +0 -2
- package/lib/browser/get-block-properties.75a4033c.cjs +0 -1
- package/lib/browser/index.ea2f8191.cjs +0 -165
- package/lib/edge/block-styles.ae042612.cjs +0 -1
- package/lib/edge/blocks/form/component-info.d.ts +0 -2
- package/lib/edge/blocks/input/component-info.d.ts +0 -2
- package/lib/edge/blocks/select/component-info.d.ts +0 -2
- package/lib/edge/blocks/submit-button/component-info.d.ts +0 -2
- package/lib/edge/get-block-properties.ef38da5e.cjs +0 -1
- package/lib/edge/index.6a49244b.cjs +0 -185
- package/lib/edge/repeated-block.391f9aec.cjs +0 -1
- package/lib/edge/repeated-block.8c46a7c6.js +0 -34
- package/lib/node/block-styles.b0758e84.cjs +0 -1
- package/lib/node/block-wrapper.4b4b32dd.cjs +0 -1
- package/lib/node/blocks/form/component-info.d.ts +0 -2
- package/lib/node/blocks/input/component-info.d.ts +0 -2
- package/lib/node/blocks/select/component-info.d.ts +0 -2
- package/lib/node/blocks/submit-button/component-info.d.ts +0 -2
- package/lib/node/component-ref.471ae470.cjs +0 -1
- package/lib/node/get-block-properties.310a39f2.cjs +0 -1
- package/lib/node/index.9cc8fd23.cjs +0 -205
- package/lib/node/repeated-block.fc61b1ce.cjs +0 -1
|
@@ -11,7 +11,7 @@ function filterAttrs(e = {}, t, n) {
|
|
|
11
11
|
}
|
|
12
12
|
return o;
|
|
13
13
|
}
|
|
14
|
-
const _sfc_main$
|
|
14
|
+
const _sfc_main$p = defineComponent({
|
|
15
15
|
name: "dynamic-renderer",
|
|
16
16
|
props: ["attributes", "actionAttributes", "TagName"],
|
|
17
17
|
data() {
|
|
@@ -23,7 +23,7 @@ const _sfc_main$l = defineComponent({
|
|
|
23
23
|
n[o] = r;
|
|
24
24
|
return n;
|
|
25
25
|
};
|
|
26
|
-
function _sfc_render$
|
|
26
|
+
function _sfc_render$n(e, t, n, o, r, s) {
|
|
27
27
|
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 }, [
|
|
28
28
|
typeof e.TagName == "string" ? (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 0 }, e.attributes, toHandlers(e.actionAttributes)), {
|
|
29
29
|
default: withCtx(() => [
|
|
@@ -38,7 +38,7 @@ function _sfc_render$j(e, t, n, o, r, s) {
|
|
|
38
38
|
}, 16))
|
|
39
39
|
], 64));
|
|
40
40
|
}
|
|
41
|
-
const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
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 = () => {
|
|
@@ -53,7 +53,7 @@ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sf
|
|
|
53
53
|
case "qwik":
|
|
54
54
|
return "class";
|
|
55
55
|
}
|
|
56
|
-
}, _sfc_main$
|
|
56
|
+
}, _sfc_main$o = defineComponent({
|
|
57
57
|
name: "builder-button",
|
|
58
58
|
components: { DynamicRenderer },
|
|
59
59
|
props: [
|
|
@@ -67,7 +67,7 @@ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sf
|
|
|
67
67
|
return { getClassPropName, filterAttrs };
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
function _sfc_render$
|
|
70
|
+
function _sfc_render$m(e, t, n, o, r, s) {
|
|
71
71
|
const i = resolveComponent("dynamic-renderer");
|
|
72
72
|
return openBlock(), createBlock(i, {
|
|
73
73
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
@@ -90,7 +90,7 @@ function _sfc_render$i(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$
|
|
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
|
-
|
|
315
|
-
console.log(...
|
|
316
|
-
}),
|
|
317
|
-
set(i,
|
|
318
|
-
}), l.forEach(([
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
317
|
+
}), c = getIsolateContext(), p = c.global;
|
|
318
|
+
p.setSync("global", p.derefInto()), p.setSync("log", function(...f) {
|
|
319
|
+
console.log(...f);
|
|
320
|
+
}), p.setSync(BUILDER_SET_STATE_NAME, function(f, m) {
|
|
321
|
+
set(i, f, m), s == null || s(i);
|
|
322
|
+
}), l.forEach(([f, m]) => {
|
|
323
|
+
const g = typeof m == "object" ? new ivm.Reference(
|
|
324
|
+
// workaround: methods with default values for arguments is not being cloned over
|
|
325
|
+
f === "builder" ? {
|
|
326
|
+
...m,
|
|
327
|
+
getUserAttributes: () => m.getUserAttributes()
|
|
328
|
+
} : m
|
|
324
329
|
) : null;
|
|
325
|
-
|
|
326
|
-
}),
|
|
327
|
-
const
|
|
330
|
+
p.setSync(getSyncValName(f), g);
|
|
331
|
+
}), p.setSync(INJECTED_IVM_GLOBAL, ivm);
|
|
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
|
|
581
|
-
return
|
|
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,27 +652,27 @@ 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
|
|
669
674
|
), e;
|
|
670
|
-
}), _sfc_main$
|
|
675
|
+
}), _sfc_main$n = defineComponent({
|
|
671
676
|
name: "block",
|
|
672
677
|
components: {
|
|
673
678
|
BlockStyles: defineAsyncComponent(BlockStyles),
|
|
@@ -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;
|
|
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
|
-
...((s = this.blockComponent) == null ? void 0 : s.name) === "Symbol" || ((i = this.blockComponent) == null ? void 0 : i.name) === "Columns" ? {
|
|
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,21 +752,21 @@ 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
|
-
function _sfc_render$
|
|
757
|
-
var
|
|
758
|
-
const i = resolveComponent("block-styles"), a = resolveComponent("component-ref"), l = resolveComponent("block", !0), c = resolveComponent("block-wrapper"),
|
|
761
|
+
function _sfc_render$l(e, t, n, o, r, s) {
|
|
762
|
+
var d;
|
|
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,
|
|
762
767
|
context: e.context
|
|
763
768
|
}, null, 8, ["block", "context"]),
|
|
764
|
-
(
|
|
769
|
+
(d = e.blockComponent) != null && d.noWrap ? (openBlock(), createBlock(a, {
|
|
765
770
|
key: 1,
|
|
766
771
|
componentRef: e.componentRefProps.componentRef,
|
|
767
772
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -773,10 +778,10 @@ function _sfc_render$h(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, (
|
|
777
|
-
key:
|
|
778
|
-
repeatContext:
|
|
779
|
-
block:
|
|
781
|
+
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (u, f) => (openBlock(), createBlock(p, {
|
|
782
|
+
key: f,
|
|
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$h(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,12 +814,12 @@ function _sfc_render$h(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$
|
|
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
|
-
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$
|
|
822
|
+
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$m = defineComponent({
|
|
818
823
|
name: "builder-blocks-wrapper",
|
|
819
824
|
props: [
|
|
820
825
|
"BlocksWrapper",
|
|
@@ -858,10 +863,10 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$h
|
|
|
858
863
|
));
|
|
859
864
|
}
|
|
860
865
|
}
|
|
861
|
-
})
|
|
862
|
-
function _sfc_render$
|
|
866
|
+
});
|
|
867
|
+
function _sfc_render$k(e, t, n, o, r, s) {
|
|
863
868
|
return openBlock(), createBlock(resolveDynamicComponent(e.BlocksWrapper), mergeProps({
|
|
864
|
-
class: e.className + " component-
|
|
869
|
+
class: e.className + " component-b1turyjjkok",
|
|
865
870
|
"builder-path": e.path,
|
|
866
871
|
"builder-parent-id": e.parent,
|
|
867
872
|
style: e.styleProp,
|
|
@@ -875,7 +880,7 @@ function _sfc_render$g(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$
|
|
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: [
|
|
@@ -892,7 +897,7 @@ const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_
|
|
|
892
897
|
componentsContext: ComponentsContext.key
|
|
893
898
|
}
|
|
894
899
|
});
|
|
895
|
-
function _sfc_render$
|
|
900
|
+
function _sfc_render$j(e, t, n, o, r, s) {
|
|
896
901
|
var l, c;
|
|
897
902
|
const i = resolveComponent("block"), a = resolveComponent("blocks-wrapper");
|
|
898
903
|
return openBlock(), createBlock(a, {
|
|
@@ -904,24 +909,24 @@ function _sfc_render$f(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$
|
|
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$h, [["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
|
-
}, _sfc_main$
|
|
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,8 +1090,8 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$
|
|
|
1085
1090
|
)[e].max;
|
|
1086
1091
|
}
|
|
1087
1092
|
}
|
|
1088
|
-
})
|
|
1089
|
-
function _sfc_render$
|
|
1093
|
+
});
|
|
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({
|
|
1092
1097
|
class: `builder-columns ${e.builderBlock.id}-breakpoints div-16nol0lwi20`,
|
|
@@ -1095,9 +1100,9 @@ function _sfc_render$e(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$e(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,16 +1130,16 @@ function _sfc_render$e(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$
|
|
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
|
});
|
|
1132
|
-
function _sfc_render$
|
|
1137
|
+
function _sfc_render$h(e, t, n, o, r, s) {
|
|
1133
1138
|
return openBlock(), createElementBlock("span", null, [
|
|
1134
1139
|
renderSlot(e.$slots, "default")
|
|
1135
1140
|
]);
|
|
1136
1141
|
}
|
|
1137
|
-
const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
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
|
}
|
|
@@ -1165,7 +1170,7 @@ function getSrcSet(e) {
|
|
|
1165
1170
|
}
|
|
1166
1171
|
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;
|
|
1167
1172
|
}
|
|
1168
|
-
const _sfc_main$
|
|
1173
|
+
const _sfc_main$h = defineComponent({
|
|
1169
1174
|
name: "builder-image",
|
|
1170
1175
|
props: [
|
|
1171
1176
|
"image",
|
|
@@ -1185,9 +1190,11 @@ const _sfc_main$d = 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$d = 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,11 +1216,11 @@ const _sfc_main$d = 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
|
-
class: "div-
|
|
1221
|
+
class: "div-4wbls88y960-2"
|
|
1215
1222
|
};
|
|
1216
|
-
function _sfc_render$
|
|
1223
|
+
function _sfc_render$g(e, t, n, o, r, s) {
|
|
1217
1224
|
var i, a, l, c;
|
|
1218
1225
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
1219
1226
|
createElementVNode("picture", null, [
|
|
@@ -1221,7 +1228,7 @@ function _sfc_render$c(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$
|
|
1231
|
+
}, null, 8, _hoisted_1$8)) : createCommentVNode("", !0),
|
|
1225
1232
|
createElementVNode("img", {
|
|
1226
1233
|
loading: "lazy",
|
|
1227
1234
|
alt: e.altText,
|
|
@@ -1232,34 +1239,34 @@ function _sfc_render$c(e, t, n, o, r, s) {
|
|
|
1232
1239
|
...e.aspectRatioCss
|
|
1233
1240
|
}),
|
|
1234
1241
|
class: normalizeClass(
|
|
1235
|
-
"builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1242
|
+
"builder-image" + (e.className ? " " + e.className : "") + " img-4wbls88y960"
|
|
1236
1243
|
),
|
|
1237
1244
|
src: e.image,
|
|
1238
1245
|
srcset: e.srcSetToUse,
|
|
1239
1246
|
sizes: e.sizes
|
|
1240
|
-
}, null, 14, _hoisted_2$
|
|
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
|
-
class: "builder-image-sizer div-
|
|
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$
|
|
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() {
|
|
1259
1266
|
return { filterAttrs };
|
|
1260
1267
|
}
|
|
1261
1268
|
});
|
|
1262
|
-
function _sfc_render$
|
|
1269
|
+
function _sfc_render$f(e, t, n, o, r, s) {
|
|
1263
1270
|
return openBlock(), createElementBlock("section", mergeProps({
|
|
1264
1271
|
style: {
|
|
1265
1272
|
width: "100%",
|
|
@@ -1277,7 +1284,7 @@ function _sfc_render$b(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$
|
|
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$c, [["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
|
} : {
|
|
@@ -1411,10 +1419,11 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render
|
|
|
1411
1419
|
...e,
|
|
1412
1420
|
...r
|
|
1413
1421
|
};
|
|
1414
|
-
}, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0, componentInfo$
|
|
1422
|
+
}, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0, componentInfo$f = {
|
|
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",
|
|
@@ -1443,7 +1452,8 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render
|
|
|
1443
1452
|
}],
|
|
1444
1453
|
static: !0,
|
|
1445
1454
|
noWrap: !0
|
|
1446
|
-
}, componentInfo$
|
|
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$c, [["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",
|
|
@@ -1643,152 +1653,13 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render
|
|
|
1643
1653
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1644
1654
|
advanced: !0
|
|
1645
1655
|
}]
|
|
1646
|
-
}, componentInfo$
|
|
1647
|
-
name: "Custom Code",
|
|
1648
|
-
static: !0,
|
|
1649
|
-
requiredPermissions: ["editCode"],
|
|
1650
|
-
inputs: [{
|
|
1651
|
-
name: "code",
|
|
1652
|
-
type: "html",
|
|
1653
|
-
required: !0,
|
|
1654
|
-
defaultValue: "<p>Hello there, I am custom HTML code!</p>",
|
|
1655
|
-
code: !0
|
|
1656
|
-
}, {
|
|
1657
|
-
name: "replaceNodes",
|
|
1658
|
-
type: "boolean",
|
|
1659
|
-
helperText: "Preserve server rendered dom nodes",
|
|
1660
|
-
advanced: !0
|
|
1661
|
-
}, {
|
|
1662
|
-
name: "scriptsClientOnly",
|
|
1663
|
-
type: "boolean",
|
|
1664
|
-
defaultValue: !1,
|
|
1665
|
-
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1666
|
-
advanced: !0
|
|
1667
|
-
}]
|
|
1668
|
-
}, _sfc_main$b = defineComponent({
|
|
1669
|
-
name: "builder-custom-code",
|
|
1670
|
-
props: ["replaceNodes", "code"],
|
|
1671
|
-
data() {
|
|
1672
|
-
return { scriptsInserted: [], scriptsRun: [] };
|
|
1673
|
-
},
|
|
1674
|
-
mounted() {
|
|
1675
|
-
var t;
|
|
1676
|
-
if (!((t = this.$refs.elementRef) != null && t.getElementsByTagName) || typeof window > "u")
|
|
1677
|
-
return;
|
|
1678
|
-
const e = this.$refs.elementRef.getElementsByTagName("script");
|
|
1679
|
-
for (let n = 0; n < e.length; n++) {
|
|
1680
|
-
const o = e[n];
|
|
1681
|
-
if (o.src) {
|
|
1682
|
-
if (this.scriptsInserted.includes(o.src))
|
|
1683
|
-
continue;
|
|
1684
|
-
this.scriptsInserted.push(o.src);
|
|
1685
|
-
const r = document.createElement("script");
|
|
1686
|
-
r.async = !0, r.src = o.src, document.head.appendChild(r);
|
|
1687
|
-
} else if (!o.type || [
|
|
1688
|
-
"text/javascript",
|
|
1689
|
-
"application/javascript",
|
|
1690
|
-
"application/ecmascript"
|
|
1691
|
-
].includes(o.type)) {
|
|
1692
|
-
if (this.scriptsRun.includes(o.innerText))
|
|
1693
|
-
continue;
|
|
1694
|
-
try {
|
|
1695
|
-
this.scriptsRun.push(o.innerText), new Function(o.innerText)();
|
|
1696
|
-
} catch (r) {
|
|
1697
|
-
console.warn("`CustomCode`: Error running script:", r);
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
}), _hoisted_1$4 = ["innerHTML"];
|
|
1703
|
-
function _sfc_render$a(e, t, n, o, r, s) {
|
|
1704
|
-
return openBlock(), createElementBlock("div", {
|
|
1705
|
-
ref: "elementRef",
|
|
1706
|
-
class: normalizeClass("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
1707
|
-
innerHTML: e.code
|
|
1708
|
-
}, null, 10, _hoisted_1$4);
|
|
1709
|
-
}
|
|
1710
|
-
const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/blocks/custom-code/custom-code.vue"]]), componentInfo$8 = {
|
|
1711
|
-
name: "Embed",
|
|
1712
|
-
static: !0,
|
|
1713
|
-
inputs: [{
|
|
1714
|
-
name: "url",
|
|
1715
|
-
type: "url",
|
|
1716
|
-
required: !0,
|
|
1717
|
-
defaultValue: "",
|
|
1718
|
-
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1719
|
-
onChange: (e) => {
|
|
1720
|
-
const t = e.get("url");
|
|
1721
|
-
if (t)
|
|
1722
|
-
return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((o) => o.json()).then((o) => {
|
|
1723
|
-
e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
|
|
1724
|
-
}).catch((o) => {
|
|
1725
|
-
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
1726
|
-
});
|
|
1727
|
-
e.delete("content");
|
|
1728
|
-
}
|
|
1729
|
-
}, {
|
|
1730
|
-
name: "content",
|
|
1731
|
-
type: "html",
|
|
1732
|
-
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1733
|
-
hideFromUI: !0
|
|
1734
|
-
}]
|
|
1735
|
-
}, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type), _sfc_main$a = defineComponent({
|
|
1736
|
-
name: "builder-embed",
|
|
1737
|
-
props: ["content"],
|
|
1738
|
-
data() {
|
|
1739
|
-
return { scriptsInserted: [], scriptsRun: [], ranInitFn: !1 };
|
|
1740
|
-
},
|
|
1741
|
-
watch: {
|
|
1742
|
-
onUpdateHook0: {
|
|
1743
|
-
handler() {
|
|
1744
|
-
this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
|
|
1745
|
-
},
|
|
1746
|
-
immediate: !0
|
|
1747
|
-
}
|
|
1748
|
-
},
|
|
1749
|
-
computed: {
|
|
1750
|
-
onUpdateHook0() {
|
|
1751
|
-
return {
|
|
1752
|
-
0: this.$refs.elem,
|
|
1753
|
-
1: this.ranInitFn
|
|
1754
|
-
};
|
|
1755
|
-
}
|
|
1756
|
-
},
|
|
1757
|
-
methods: {
|
|
1758
|
-
findAndRunScripts() {
|
|
1759
|
-
if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
|
|
1760
|
-
return;
|
|
1761
|
-
const e = this.$refs.elem.getElementsByTagName("script");
|
|
1762
|
-
for (let t = 0; t < e.length; t++) {
|
|
1763
|
-
const n = e[t];
|
|
1764
|
-
if (n.src && !this.scriptsInserted.includes(n.src)) {
|
|
1765
|
-
this.scriptsInserted.push(n.src);
|
|
1766
|
-
const o = document.createElement("script");
|
|
1767
|
-
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1768
|
-
} else if (isJsScript(n) && !this.scriptsRun.includes(n.innerText))
|
|
1769
|
-
try {
|
|
1770
|
-
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1771
|
-
} catch (o) {
|
|
1772
|
-
console.warn("`Embed`: Error running script:", o);
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
}), _hoisted_1$3 = ["innerHTML"];
|
|
1778
|
-
function _sfc_render$9(e, t, n, o, r, s) {
|
|
1779
|
-
return openBlock(), createElementBlock("div", {
|
|
1780
|
-
class: "builder-embed",
|
|
1781
|
-
ref: "elem",
|
|
1782
|
-
innerHTML: e.content
|
|
1783
|
-
}, null, 8, _hoisted_1$3);
|
|
1784
|
-
}
|
|
1785
|
-
const embed = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/blocks/embed/embed.vue"]]), componentInfo$7 = {
|
|
1656
|
+
}, componentInfo$d = {
|
|
1786
1657
|
name: "Fragment",
|
|
1787
1658
|
static: !0,
|
|
1788
1659
|
hidden: !0,
|
|
1789
1660
|
canHaveChildren: !0,
|
|
1790
1661
|
noWrap: !0
|
|
1791
|
-
}, componentInfo$
|
|
1662
|
+
}, componentInfo$c = {
|
|
1792
1663
|
name: "Image",
|
|
1793
1664
|
static: !0,
|
|
1794
1665
|
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",
|
|
@@ -1810,14 +1681,14 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9
|
|
|
1810
1681
|
e.delete("srcset"), e.delete("noWebp");
|
|
1811
1682
|
function n(i, a = 6e4) {
|
|
1812
1683
|
return new Promise((l, c) => {
|
|
1813
|
-
const
|
|
1814
|
-
let
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
},
|
|
1818
|
-
console.warn("Image load failed",
|
|
1819
|
-
}),
|
|
1820
|
-
|
|
1684
|
+
const p = document.createElement("img");
|
|
1685
|
+
let d = !1;
|
|
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(() => {
|
|
1691
|
+
d || c(new Error("Image load timed out"));
|
|
1821
1692
|
}, a);
|
|
1822
1693
|
});
|
|
1823
1694
|
}
|
|
@@ -1888,45 +1759,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9
|
|
|
1888
1759
|
advanced: !0,
|
|
1889
1760
|
defaultValue: 0.7041
|
|
1890
1761
|
}]
|
|
1891
|
-
}, componentInfo$
|
|
1892
|
-
name: "Raw:Img",
|
|
1893
|
-
hideFromInsertMenu: !0,
|
|
1894
|
-
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",
|
|
1895
|
-
inputs: [{
|
|
1896
|
-
name: "image",
|
|
1897
|
-
bubble: !0,
|
|
1898
|
-
type: "file",
|
|
1899
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
|
|
1900
|
-
required: !0
|
|
1901
|
-
}],
|
|
1902
|
-
noWrap: !0,
|
|
1903
|
-
static: !0
|
|
1904
|
-
}, _sfc_main$9 = defineComponent({
|
|
1905
|
-
name: "builder-img-component",
|
|
1906
|
-
props: [
|
|
1907
|
-
"backgroundSize",
|
|
1908
|
-
"backgroundPosition",
|
|
1909
|
-
"imgSrc",
|
|
1910
|
-
"altText",
|
|
1911
|
-
"image",
|
|
1912
|
-
"attributes"
|
|
1913
|
-
],
|
|
1914
|
-
data() {
|
|
1915
|
-
return { isEditing, filterAttrs };
|
|
1916
|
-
}
|
|
1917
|
-
}), _hoisted_1$2 = ["alt", "src"];
|
|
1918
|
-
function _sfc_render$8(e, t, n, o, r, s) {
|
|
1919
|
-
return openBlock(), createElementBlock("img", mergeProps({
|
|
1920
|
-
style: {
|
|
1921
|
-
objectFit: e.backgroundSize || "cover",
|
|
1922
|
-
objectPosition: e.backgroundPosition || "center"
|
|
1923
|
-
},
|
|
1924
|
-
key: e.isEditing() && e.imgSrc || "default-key",
|
|
1925
|
-
alt: e.altText,
|
|
1926
|
-
src: e.imgSrc || e.image
|
|
1927
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$2);
|
|
1928
|
-
}
|
|
1929
|
-
const Img = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/blocks/img/img.vue"]]), componentInfo$4 = {
|
|
1762
|
+
}, componentInfo$b = {
|
|
1930
1763
|
name: "Core:Section",
|
|
1931
1764
|
static: !0,
|
|
1932
1765
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1965,24 +1798,25 @@ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8],
|
|
|
1965
1798
|
}
|
|
1966
1799
|
}
|
|
1967
1800
|
}]
|
|
1968
|
-
}, componentInfo$
|
|
1801
|
+
}, componentInfo$a = {
|
|
1969
1802
|
name: "Slot",
|
|
1970
1803
|
isRSC: !0,
|
|
1971
1804
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
1972
1805
|
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
1973
1806
|
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
1807
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
1974
1808
|
inputs: [{
|
|
1975
1809
|
name: "name",
|
|
1976
1810
|
type: "string",
|
|
1977
1811
|
required: !0,
|
|
1978
1812
|
defaultValue: "children"
|
|
1979
1813
|
}]
|
|
1980
|
-
}, _sfc_main$
|
|
1814
|
+
}, _sfc_main$f = defineComponent({
|
|
1981
1815
|
name: "builder-slot",
|
|
1982
1816
|
components: { Blocks },
|
|
1983
|
-
props: ["builderContext", "name"]
|
|
1817
|
+
props: ["js", "builderContext", "name"]
|
|
1984
1818
|
});
|
|
1985
|
-
function _sfc_render$
|
|
1819
|
+
function _sfc_render$e(e, t, n, o, r, s) {
|
|
1986
1820
|
var a, l, c;
|
|
1987
1821
|
const i = resolveComponent("blocks");
|
|
1988
1822
|
return openBlock(), createElementBlock("div", mergeProps(
|
|
@@ -2001,7 +1835,7 @@ function _sfc_render$7(e, t, n, o, r, s) {
|
|
|
2001
1835
|
}, null, 8, ["parent", "path", "context", "blocks"])
|
|
2002
1836
|
], 16);
|
|
2003
1837
|
}
|
|
2004
|
-
const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1838
|
+
const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]]), componentInfo$9 = {
|
|
2005
1839
|
name: "Symbol",
|
|
2006
1840
|
noWrap: !0,
|
|
2007
1841
|
static: !0,
|
|
@@ -2034,7 +1868,7 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]
|
|
|
2034
1868
|
hideFromUI: !0,
|
|
2035
1869
|
type: "boolean"
|
|
2036
1870
|
}]
|
|
2037
|
-
}, componentInfo$
|
|
1871
|
+
}, componentInfo$8 = {
|
|
2038
1872
|
name: "Text",
|
|
2039
1873
|
static: !0,
|
|
2040
1874
|
isRSC: !0,
|
|
@@ -2052,11 +1886,11 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]
|
|
|
2052
1886
|
height: "auto",
|
|
2053
1887
|
textAlign: "center"
|
|
2054
1888
|
}
|
|
2055
|
-
}, _sfc_main$
|
|
1889
|
+
}, _sfc_main$e = defineComponent({
|
|
2056
1890
|
name: "builder-text",
|
|
2057
1891
|
props: ["text"]
|
|
2058
|
-
}), _hoisted_1$
|
|
2059
|
-
function _sfc_render$
|
|
1892
|
+
}), _hoisted_1$7 = ["innerHTML"];
|
|
1893
|
+
function _sfc_render$d(e, t, n, o, r, s) {
|
|
2060
1894
|
var i;
|
|
2061
1895
|
return openBlock(), createElementBlock("div", {
|
|
2062
1896
|
class: "builder-text",
|
|
@@ -2064,62 +1898,857 @@ function _sfc_render$6(e, t, n, o, r, s) {
|
|
|
2064
1898
|
style: {
|
|
2065
1899
|
outline: "none"
|
|
2066
1900
|
}
|
|
2067
|
-
}, null, 8, _hoisted_1$
|
|
1901
|
+
}, null, 8, _hoisted_1$7);
|
|
2068
1902
|
}
|
|
2069
|
-
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2070
|
-
name: "
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
minHeight: "20px",
|
|
2074
|
-
minWidth: "20px"
|
|
2075
|
-
},
|
|
2076
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
|
|
1903
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d]]), componentInfo$7 = {
|
|
1904
|
+
name: "Custom Code",
|
|
1905
|
+
static: !0,
|
|
1906
|
+
requiredPermissions: ["editCode"],
|
|
2077
1907
|
inputs: [{
|
|
2078
|
-
name: "
|
|
2079
|
-
type: "
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
required: !0
|
|
2084
|
-
}, {
|
|
2085
|
-
name: "posterImage",
|
|
2086
|
-
type: "file",
|
|
2087
|
-
allowedFileTypes: ["jpeg", "png"],
|
|
2088
|
-
helperText: "Image to show before the video plays"
|
|
2089
|
-
}, {
|
|
2090
|
-
name: "autoPlay",
|
|
2091
|
-
type: "boolean",
|
|
2092
|
-
defaultValue: !0
|
|
2093
|
-
}, {
|
|
2094
|
-
name: "controls",
|
|
2095
|
-
type: "boolean",
|
|
2096
|
-
defaultValue: !1
|
|
2097
|
-
}, {
|
|
2098
|
-
name: "muted",
|
|
2099
|
-
type: "boolean",
|
|
2100
|
-
defaultValue: !0
|
|
2101
|
-
}, {
|
|
2102
|
-
name: "loop",
|
|
2103
|
-
type: "boolean",
|
|
2104
|
-
defaultValue: !0
|
|
1908
|
+
name: "code",
|
|
1909
|
+
type: "html",
|
|
1910
|
+
required: !0,
|
|
1911
|
+
defaultValue: "<p>Hello there, I am custom HTML code!</p>",
|
|
1912
|
+
code: !0
|
|
2105
1913
|
}, {
|
|
2106
|
-
name: "
|
|
1914
|
+
name: "replaceNodes",
|
|
2107
1915
|
type: "boolean",
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
name: "fit",
|
|
2111
|
-
type: "text",
|
|
2112
|
-
defaultValue: "cover",
|
|
2113
|
-
enum: ["contain", "cover", "fill", "auto"]
|
|
2114
|
-
}, {
|
|
2115
|
-
name: "preload",
|
|
2116
|
-
type: "text",
|
|
2117
|
-
defaultValue: "metadata",
|
|
2118
|
-
enum: ["auto", "metadata", "none"]
|
|
1916
|
+
helperText: "Preserve server rendered dom nodes",
|
|
1917
|
+
advanced: !0
|
|
2119
1918
|
}, {
|
|
2120
|
-
name: "
|
|
1919
|
+
name: "scriptsClientOnly",
|
|
2121
1920
|
type: "boolean",
|
|
2122
|
-
|
|
1921
|
+
defaultValue: !1,
|
|
1922
|
+
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1923
|
+
advanced: !0
|
|
1924
|
+
}]
|
|
1925
|
+
}, _sfc_main$d = defineComponent({
|
|
1926
|
+
name: "builder-custom-code",
|
|
1927
|
+
props: ["replaceNodes", "code"],
|
|
1928
|
+
data() {
|
|
1929
|
+
return { scriptsInserted: [], scriptsRun: [] };
|
|
1930
|
+
},
|
|
1931
|
+
mounted() {
|
|
1932
|
+
var t;
|
|
1933
|
+
if (!((t = this.$refs.elementRef) != null && t.getElementsByTagName) || typeof window > "u")
|
|
1934
|
+
return;
|
|
1935
|
+
const e = this.$refs.elementRef.getElementsByTagName("script");
|
|
1936
|
+
for (let n = 0; n < e.length; n++) {
|
|
1937
|
+
const o = e[n];
|
|
1938
|
+
if (o.src) {
|
|
1939
|
+
if (this.scriptsInserted.includes(o.src))
|
|
1940
|
+
continue;
|
|
1941
|
+
this.scriptsInserted.push(o.src);
|
|
1942
|
+
const r = document.createElement("script");
|
|
1943
|
+
r.async = !0, r.src = o.src, document.head.appendChild(r);
|
|
1944
|
+
} else if (!o.type || [
|
|
1945
|
+
"text/javascript",
|
|
1946
|
+
"application/javascript",
|
|
1947
|
+
"application/ecmascript"
|
|
1948
|
+
].includes(o.type)) {
|
|
1949
|
+
if (this.scriptsRun.includes(o.innerText))
|
|
1950
|
+
continue;
|
|
1951
|
+
try {
|
|
1952
|
+
this.scriptsRun.push(o.innerText), new Function(o.innerText)();
|
|
1953
|
+
} catch (r) {
|
|
1954
|
+
console.warn("`CustomCode`: Error running script:", r);
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
}), _hoisted_1$6 = ["innerHTML"];
|
|
1960
|
+
function _sfc_render$c(e, t, n, o, r, s) {
|
|
1961
|
+
return openBlock(), createElementBlock("div", {
|
|
1962
|
+
ref: "elementRef",
|
|
1963
|
+
class: normalizeClass("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
1964
|
+
innerHTML: e.code
|
|
1965
|
+
}, null, 10, _hoisted_1$6);
|
|
1966
|
+
}
|
|
1967
|
+
const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c]]), componentInfo$6 = {
|
|
1968
|
+
name: "Embed",
|
|
1969
|
+
static: !0,
|
|
1970
|
+
inputs: [{
|
|
1971
|
+
name: "url",
|
|
1972
|
+
type: "url",
|
|
1973
|
+
required: !0,
|
|
1974
|
+
defaultValue: "",
|
|
1975
|
+
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1976
|
+
onChange: (e) => {
|
|
1977
|
+
const t = e.get("url");
|
|
1978
|
+
if (t)
|
|
1979
|
+
return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((o) => o.json()).then((o) => {
|
|
1980
|
+
e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
|
|
1981
|
+
}).catch((o) => {
|
|
1982
|
+
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
1983
|
+
});
|
|
1984
|
+
e.delete("content");
|
|
1985
|
+
}
|
|
1986
|
+
}, {
|
|
1987
|
+
name: "content",
|
|
1988
|
+
type: "html",
|
|
1989
|
+
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1990
|
+
hideFromUI: !0
|
|
1991
|
+
}]
|
|
1992
|
+
}, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type), _sfc_main$c = defineComponent({
|
|
1993
|
+
name: "builder-embed",
|
|
1994
|
+
props: ["content"],
|
|
1995
|
+
data() {
|
|
1996
|
+
return { scriptsInserted: [], scriptsRun: [], ranInitFn: !1 };
|
|
1997
|
+
},
|
|
1998
|
+
watch: {
|
|
1999
|
+
onUpdateHook0: {
|
|
2000
|
+
handler() {
|
|
2001
|
+
this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
|
|
2002
|
+
},
|
|
2003
|
+
immediate: !0
|
|
2004
|
+
}
|
|
2005
|
+
},
|
|
2006
|
+
computed: {
|
|
2007
|
+
onUpdateHook0() {
|
|
2008
|
+
return {
|
|
2009
|
+
0: this.$refs.elem,
|
|
2010
|
+
1: this.ranInitFn
|
|
2011
|
+
};
|
|
2012
|
+
}
|
|
2013
|
+
},
|
|
2014
|
+
methods: {
|
|
2015
|
+
findAndRunScripts() {
|
|
2016
|
+
if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
|
|
2017
|
+
return;
|
|
2018
|
+
const e = this.$refs.elem.getElementsByTagName("script");
|
|
2019
|
+
for (let t = 0; t < e.length; t++) {
|
|
2020
|
+
const n = e[t];
|
|
2021
|
+
if (n.src && !this.scriptsInserted.includes(n.src)) {
|
|
2022
|
+
this.scriptsInserted.push(n.src);
|
|
2023
|
+
const o = document.createElement("script");
|
|
2024
|
+
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
2025
|
+
} else if (isJsScript(n) && !this.scriptsRun.includes(n.innerText))
|
|
2026
|
+
try {
|
|
2027
|
+
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
2028
|
+
} catch (o) {
|
|
2029
|
+
console.warn("`Embed`: Error running script:", o);
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
}), _hoisted_1$5 = ["innerHTML"];
|
|
2035
|
+
function _sfc_render$b(e, t, n, o, r, s) {
|
|
2036
|
+
return openBlock(), createElementBlock("div", {
|
|
2037
|
+
class: "builder-embed",
|
|
2038
|
+
ref: "elem",
|
|
2039
|
+
innerHTML: e.content
|
|
2040
|
+
}, null, 8, _hoisted_1$5);
|
|
2041
|
+
}
|
|
2042
|
+
const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b]]), componentInfo$5 = {
|
|
2043
|
+
name: "Form:Form",
|
|
2044
|
+
// editableTags: ['builder-form-error']
|
|
2045
|
+
defaults: {
|
|
2046
|
+
responsiveStyles: {
|
|
2047
|
+
large: {
|
|
2048
|
+
marginTop: "15px",
|
|
2049
|
+
paddingBottom: "15px"
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
},
|
|
2053
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",
|
|
2054
|
+
inputs: [{
|
|
2055
|
+
name: "sendSubmissionsTo",
|
|
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
|
|
2062
|
+
enum: [{
|
|
2063
|
+
label: "Send to email",
|
|
2064
|
+
value: "email",
|
|
2065
|
+
helperText: "Send form submissions to the email address of your choosing"
|
|
2066
|
+
}, {
|
|
2067
|
+
label: "Custom",
|
|
2068
|
+
value: "custom",
|
|
2069
|
+
helperText: "Handle where the form requests go manually with a little code, e.g. to your own custom backend"
|
|
2070
|
+
}],
|
|
2071
|
+
defaultValue: "email"
|
|
2072
|
+
}, {
|
|
2073
|
+
name: "sendSubmissionsToEmail",
|
|
2074
|
+
type: "string",
|
|
2075
|
+
required: !0,
|
|
2076
|
+
// TODO: required: () => options.get("sendSubmissionsTo") === "email"
|
|
2077
|
+
defaultValue: "your@email.com",
|
|
2078
|
+
showIf: 'options.get("sendSubmissionsTo") === "email"'
|
|
2079
|
+
}, {
|
|
2080
|
+
name: "sendWithJs",
|
|
2081
|
+
type: "boolean",
|
|
2082
|
+
helperText: "Set to false to use basic html form action",
|
|
2083
|
+
defaultValue: !0,
|
|
2084
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom"'
|
|
2085
|
+
}, {
|
|
2086
|
+
name: "name",
|
|
2087
|
+
type: "string",
|
|
2088
|
+
defaultValue: "My form"
|
|
2089
|
+
// advanced: true
|
|
2090
|
+
}, {
|
|
2091
|
+
name: "action",
|
|
2092
|
+
type: "string",
|
|
2093
|
+
helperText: "URL to send the form data to",
|
|
2094
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom"'
|
|
2095
|
+
}, {
|
|
2096
|
+
name: "contentType",
|
|
2097
|
+
type: "string",
|
|
2098
|
+
defaultValue: "application/json",
|
|
2099
|
+
advanced: !0,
|
|
2100
|
+
// TODO: do automatically if file input
|
|
2101
|
+
enum: ["application/json", "multipart/form-data", "application/x-www-form-urlencoded"],
|
|
2102
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'
|
|
2103
|
+
}, {
|
|
2104
|
+
name: "method",
|
|
2105
|
+
type: "string",
|
|
2106
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom"',
|
|
2107
|
+
defaultValue: "POST",
|
|
2108
|
+
advanced: !0
|
|
2109
|
+
}, {
|
|
2110
|
+
name: "previewState",
|
|
2111
|
+
type: "string",
|
|
2112
|
+
// TODO: persist: false flag
|
|
2113
|
+
enum: ["unsubmitted", "sending", "success", "error"],
|
|
2114
|
+
defaultValue: "unsubmitted",
|
|
2115
|
+
helperText: 'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',
|
|
2116
|
+
showIf: 'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'
|
|
2117
|
+
}, {
|
|
2118
|
+
name: "successUrl",
|
|
2119
|
+
type: "url",
|
|
2120
|
+
helperText: "Optional URL to redirect the user to on form submission success",
|
|
2121
|
+
showIf: 'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'
|
|
2122
|
+
}, {
|
|
2123
|
+
name: "resetFormOnSubmit",
|
|
2124
|
+
type: "boolean",
|
|
2125
|
+
showIf: "options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",
|
|
2126
|
+
advanced: !0
|
|
2127
|
+
}, {
|
|
2128
|
+
name: "successMessage",
|
|
2129
|
+
type: "uiBlocks",
|
|
2130
|
+
hideFromUI: !0,
|
|
2131
|
+
defaultValue: [{
|
|
2132
|
+
"@type": "@builder.io/sdk:Element",
|
|
2133
|
+
responsiveStyles: {
|
|
2134
|
+
large: {
|
|
2135
|
+
marginTop: "10px"
|
|
2136
|
+
}
|
|
2137
|
+
},
|
|
2138
|
+
component: {
|
|
2139
|
+
name: "Text",
|
|
2140
|
+
options: {
|
|
2141
|
+
text: "<span>Thanks!</span>"
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
}]
|
|
2145
|
+
}, {
|
|
2146
|
+
name: "validate",
|
|
2147
|
+
type: "boolean",
|
|
2148
|
+
defaultValue: !0,
|
|
2149
|
+
advanced: !0
|
|
2150
|
+
}, {
|
|
2151
|
+
name: "errorMessagePath",
|
|
2152
|
+
type: "text",
|
|
2153
|
+
advanced: !0,
|
|
2154
|
+
helperText: 'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'
|
|
2155
|
+
}, {
|
|
2156
|
+
name: "errorMessage",
|
|
2157
|
+
type: "uiBlocks",
|
|
2158
|
+
hideFromUI: !0,
|
|
2159
|
+
defaultValue: [{
|
|
2160
|
+
"@type": "@builder.io/sdk:Element",
|
|
2161
|
+
responsiveStyles: {
|
|
2162
|
+
large: {
|
|
2163
|
+
marginTop: "10px"
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
bindings: {
|
|
2167
|
+
"component.options.text": "state.formErrorMessage || block.component.options.text"
|
|
2168
|
+
},
|
|
2169
|
+
component: {
|
|
2170
|
+
name: "Text",
|
|
2171
|
+
options: {
|
|
2172
|
+
text: "<span>Form submission error :( Please check your answers and try again</span>"
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
}]
|
|
2176
|
+
}, {
|
|
2177
|
+
name: "sendingMessage",
|
|
2178
|
+
type: "uiBlocks",
|
|
2179
|
+
hideFromUI: !0,
|
|
2180
|
+
defaultValue: [{
|
|
2181
|
+
"@type": "@builder.io/sdk:Element",
|
|
2182
|
+
responsiveStyles: {
|
|
2183
|
+
large: {
|
|
2184
|
+
marginTop: "10px"
|
|
2185
|
+
}
|
|
2186
|
+
},
|
|
2187
|
+
component: {
|
|
2188
|
+
name: "Text",
|
|
2189
|
+
options: {
|
|
2190
|
+
text: "<span>Sending...</span>"
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
}]
|
|
2194
|
+
}, {
|
|
2195
|
+
name: "customHeaders",
|
|
2196
|
+
type: "map",
|
|
2197
|
+
valueType: {
|
|
2198
|
+
type: "string"
|
|
2199
|
+
},
|
|
2200
|
+
advanced: !0,
|
|
2201
|
+
showIf: 'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'
|
|
2202
|
+
}],
|
|
2203
|
+
noWrap: !0,
|
|
2204
|
+
canHaveChildren: !0,
|
|
2205
|
+
defaultChildren: [{
|
|
2206
|
+
"@type": "@builder.io/sdk:Element",
|
|
2207
|
+
responsiveStyles: {
|
|
2208
|
+
large: {
|
|
2209
|
+
marginTop: "10px"
|
|
2210
|
+
}
|
|
2211
|
+
},
|
|
2212
|
+
component: {
|
|
2213
|
+
name: "Text",
|
|
2214
|
+
options: {
|
|
2215
|
+
text: "<span>Enter your name</span>"
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
}, {
|
|
2219
|
+
"@type": "@builder.io/sdk:Element",
|
|
2220
|
+
responsiveStyles: {
|
|
2221
|
+
large: {
|
|
2222
|
+
marginTop: "10px"
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2225
|
+
component: {
|
|
2226
|
+
name: "Form:Input",
|
|
2227
|
+
options: {
|
|
2228
|
+
name: "name",
|
|
2229
|
+
placeholder: "Jane Doe"
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
}, {
|
|
2233
|
+
"@type": "@builder.io/sdk:Element",
|
|
2234
|
+
responsiveStyles: {
|
|
2235
|
+
large: {
|
|
2236
|
+
marginTop: "10px"
|
|
2237
|
+
}
|
|
2238
|
+
},
|
|
2239
|
+
component: {
|
|
2240
|
+
name: "Text",
|
|
2241
|
+
options: {
|
|
2242
|
+
text: "<span>Enter your email</span>"
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
}, {
|
|
2246
|
+
"@type": "@builder.io/sdk:Element",
|
|
2247
|
+
responsiveStyles: {
|
|
2248
|
+
large: {
|
|
2249
|
+
marginTop: "10px"
|
|
2250
|
+
}
|
|
2251
|
+
},
|
|
2252
|
+
component: {
|
|
2253
|
+
name: "Form:Input",
|
|
2254
|
+
options: {
|
|
2255
|
+
name: "email",
|
|
2256
|
+
placeholder: "jane@doe.com"
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
}, {
|
|
2260
|
+
"@type": "@builder.io/sdk:Element",
|
|
2261
|
+
responsiveStyles: {
|
|
2262
|
+
large: {
|
|
2263
|
+
marginTop: "10px"
|
|
2264
|
+
}
|
|
2265
|
+
},
|
|
2266
|
+
component: {
|
|
2267
|
+
name: "Form:SubmitButton",
|
|
2268
|
+
options: {
|
|
2269
|
+
text: "Submit"
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
}]
|
|
2273
|
+
}, validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], getEnv = () => {
|
|
2274
|
+
const e = process.env.NODE_ENV || "production";
|
|
2275
|
+
return validEnvList.includes(e) ? e : "production";
|
|
2276
|
+
}, get = (e, t, n) => {
|
|
2277
|
+
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, s) => r != null ? r[s] : r, e);
|
|
2278
|
+
return o === void 0 || o === e ? n : o;
|
|
2279
|
+
}, _sfc_main$b = defineComponent({
|
|
2280
|
+
name: "builder-form-component",
|
|
2281
|
+
components: { Block, Blocks },
|
|
2282
|
+
props: [
|
|
2283
|
+
"js",
|
|
2284
|
+
"builderContext",
|
|
2285
|
+
"previewState",
|
|
2286
|
+
"sendWithJs",
|
|
2287
|
+
"sendSubmissionsTo",
|
|
2288
|
+
"action",
|
|
2289
|
+
"customHeaders",
|
|
2290
|
+
"contentType",
|
|
2291
|
+
"sendSubmissionsToEmail",
|
|
2292
|
+
"name",
|
|
2293
|
+
"method",
|
|
2294
|
+
"errorMessagePath",
|
|
2295
|
+
"resetFormOnSubmit",
|
|
2296
|
+
"successUrl",
|
|
2297
|
+
"validate",
|
|
2298
|
+
"attributes",
|
|
2299
|
+
"builderBlock",
|
|
2300
|
+
"builderComponents",
|
|
2301
|
+
"builderLinkComponent",
|
|
2302
|
+
"errorMessage",
|
|
2303
|
+
"sendingMessage",
|
|
2304
|
+
"successMessage"
|
|
2305
|
+
],
|
|
2306
|
+
data() {
|
|
2307
|
+
return {
|
|
2308
|
+
formState: "unsubmitted",
|
|
2309
|
+
responseData: null,
|
|
2310
|
+
formErrorMessage: "",
|
|
2311
|
+
filterAttrs
|
|
2312
|
+
};
|
|
2313
|
+
},
|
|
2314
|
+
methods: {
|
|
2315
|
+
mergeNewRootState(e) {
|
|
2316
|
+
var n, o;
|
|
2317
|
+
const t = {
|
|
2318
|
+
...this.builderContext.rootState,
|
|
2319
|
+
...e
|
|
2320
|
+
};
|
|
2321
|
+
this.builderContext.rootSetState ? (o = (n = this.builderContext).rootSetState) == null || o.call(n, t) : this.builderContext.rootState = t;
|
|
2322
|
+
},
|
|
2323
|
+
submissionState() {
|
|
2324
|
+
return isEditing() && this.previewState || this.formState;
|
|
2325
|
+
},
|
|
2326
|
+
onSubmit(e) {
|
|
2327
|
+
var n;
|
|
2328
|
+
const t = this.sendWithJs || this.sendSubmissionsTo === "email";
|
|
2329
|
+
if (this.sendSubmissionsTo === "zapier")
|
|
2330
|
+
e.preventDefault();
|
|
2331
|
+
else if (t) {
|
|
2332
|
+
if (!(this.action || this.sendSubmissionsTo === "email")) {
|
|
2333
|
+
e.preventDefault();
|
|
2334
|
+
return;
|
|
2335
|
+
}
|
|
2336
|
+
e.preventDefault();
|
|
2337
|
+
const o = e.currentTarget, r = this.customHeaders || {};
|
|
2338
|
+
let s;
|
|
2339
|
+
const i = new FormData(o), a = Array.from(
|
|
2340
|
+
e.currentTarget.querySelectorAll("input,select,textarea")
|
|
2341
|
+
).filter((d) => !!d.name).map((d) => {
|
|
2342
|
+
let u;
|
|
2343
|
+
const f = d.name;
|
|
2344
|
+
if (d instanceof HTMLInputElement)
|
|
2345
|
+
if (d.type === "radio") {
|
|
2346
|
+
if (d.checked)
|
|
2347
|
+
return u = d.name, {
|
|
2348
|
+
key: f,
|
|
2349
|
+
value: u
|
|
2350
|
+
};
|
|
2351
|
+
} else if (d.type === "checkbox")
|
|
2352
|
+
u = d.checked;
|
|
2353
|
+
else if (d.type === "number" || d.type === "range") {
|
|
2354
|
+
const m = d.valueAsNumber;
|
|
2355
|
+
isNaN(m) || (u = m);
|
|
2356
|
+
} else
|
|
2357
|
+
d.type === "file" ? u = d.files : u = d.value;
|
|
2358
|
+
else
|
|
2359
|
+
u = d.value;
|
|
2360
|
+
return {
|
|
2361
|
+
key: f,
|
|
2362
|
+
value: u
|
|
2363
|
+
};
|
|
2364
|
+
});
|
|
2365
|
+
let l = this.contentType;
|
|
2366
|
+
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value: d }) => {
|
|
2367
|
+
(d instanceof File || Array.isArray(d) && d[0] instanceof File || d instanceof FileList) && (l = "multipart/form-data");
|
|
2368
|
+
}), l !== "application/json")
|
|
2369
|
+
s = i;
|
|
2370
|
+
else {
|
|
2371
|
+
const d = {};
|
|
2372
|
+
Array.from(a).forEach(({ value: u, key: f }) => {
|
|
2373
|
+
set(d, f, u);
|
|
2374
|
+
}), s = JSON.stringify(d);
|
|
2375
|
+
}
|
|
2376
|
+
l && l !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = l));
|
|
2377
|
+
const c = new CustomEvent("presubmit", {
|
|
2378
|
+
detail: {
|
|
2379
|
+
body: s
|
|
2380
|
+
}
|
|
2381
|
+
});
|
|
2382
|
+
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(c), c.defaultPrevented))
|
|
2383
|
+
return;
|
|
2384
|
+
this.formState = "sending";
|
|
2385
|
+
const p = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
2386
|
+
this.sendSubmissionsToEmail || ""
|
|
2387
|
+
)}&name=${encodeURIComponent(this.name || "")}`;
|
|
2388
|
+
fetch(
|
|
2389
|
+
this.sendSubmissionsTo === "email" ? p : this.action,
|
|
2390
|
+
{
|
|
2391
|
+
body: s,
|
|
2392
|
+
headers: r,
|
|
2393
|
+
method: this.method || "post"
|
|
2394
|
+
}
|
|
2395
|
+
).then(
|
|
2396
|
+
async (d) => {
|
|
2397
|
+
let u;
|
|
2398
|
+
const f = d.headers.get("content-type");
|
|
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);
|
|
2401
|
+
m && (typeof m != "string" && (m = JSON.stringify(m)), this.formErrorMessage = m, this.mergeNewRootState({
|
|
2402
|
+
formErrorMessage: m
|
|
2403
|
+
}));
|
|
2404
|
+
}
|
|
2405
|
+
if (this.responseData = u, this.formState = d.ok ? "success" : "error", d.ok) {
|
|
2406
|
+
const m = new CustomEvent("submit:success", {
|
|
2407
|
+
detail: {
|
|
2408
|
+
res: d,
|
|
2409
|
+
body: u
|
|
2410
|
+
}
|
|
2411
|
+
});
|
|
2412
|
+
if (this.$refs.formRef) {
|
|
2413
|
+
if (this.$refs.formRef.dispatchEvent(m), m.defaultPrevented)
|
|
2414
|
+
return;
|
|
2415
|
+
this.resetFormOnSubmit !== !1 && this.$refs.formRef.reset();
|
|
2416
|
+
}
|
|
2417
|
+
if (this.successUrl)
|
|
2418
|
+
if (this.$refs.formRef) {
|
|
2419
|
+
const g = new CustomEvent("route", {
|
|
2420
|
+
detail: {
|
|
2421
|
+
url: this.successUrl
|
|
2422
|
+
}
|
|
2423
|
+
});
|
|
2424
|
+
this.$refs.formRef.dispatchEvent(g), g.defaultPrevented || (location.href = this.successUrl);
|
|
2425
|
+
} else
|
|
2426
|
+
location.href = this.successUrl;
|
|
2427
|
+
}
|
|
2428
|
+
},
|
|
2429
|
+
(d) => {
|
|
2430
|
+
const u = new CustomEvent("submit:error", {
|
|
2431
|
+
detail: {
|
|
2432
|
+
error: d
|
|
2433
|
+
}
|
|
2434
|
+
});
|
|
2435
|
+
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented) || (this.responseData = d, this.formState = "error");
|
|
2436
|
+
}
|
|
2437
|
+
);
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
}), _hoisted_1$4 = ["validate", "action", "method", "name"], _hoisted_2$2 = {
|
|
2442
|
+
key: 3,
|
|
2443
|
+
class: "builder-form-error-text pre-tqyw9m0iue"
|
|
2444
|
+
};
|
|
2445
|
+
function _sfc_render$a(e, t, n, o, r, s) {
|
|
2446
|
+
var l;
|
|
2447
|
+
const i = resolveComponent("block"), a = resolveComponent("blocks");
|
|
2448
|
+
return openBlock(), createElementBlock("form", mergeProps({
|
|
2449
|
+
validate: e.validate,
|
|
2450
|
+
ref: "formRef",
|
|
2451
|
+
action: !e.sendWithJs && e.action,
|
|
2452
|
+
method: e.method,
|
|
2453
|
+
name: e.name,
|
|
2454
|
+
onSubmit: t[0] || (t[0] = (c) => e.onSubmit(c))
|
|
2455
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
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, {
|
|
2457
|
+
key: `form-block-${e.idx}`,
|
|
2458
|
+
block: c,
|
|
2459
|
+
context: e.builderContext,
|
|
2460
|
+
registeredComponents: e.builderComponents,
|
|
2461
|
+
linkComponent: e.builderLinkComponent
|
|
2462
|
+
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : createCommentVNode("", !0),
|
|
2463
|
+
e.submissionState() === "error" ? (openBlock(), createBlock(a, {
|
|
2464
|
+
key: 1,
|
|
2465
|
+
path: "errorMessage",
|
|
2466
|
+
blocks: e.errorMessage,
|
|
2467
|
+
context: e.builderContext
|
|
2468
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
|
|
2469
|
+
e.submissionState() === "sending" ? (openBlock(), createBlock(a, {
|
|
2470
|
+
key: 2,
|
|
2471
|
+
path: "sendingMessage",
|
|
2472
|
+
blocks: e.sendingMessage,
|
|
2473
|
+
context: e.builderContext
|
|
2474
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
|
|
2475
|
+
e.submissionState() === "error" && e.responseData ? (openBlock(), createElementBlock("pre", _hoisted_2$2, " " + toDisplayString(JSON.stringify(e.responseData, null, 2)) + `
|
|
2476
|
+
`, 1)) : createCommentVNode("", !0),
|
|
2477
|
+
e.submissionState() === "success" ? (openBlock(), createBlock(a, {
|
|
2478
|
+
key: 4,
|
|
2479
|
+
path: "successMessage",
|
|
2480
|
+
blocks: e.successMessage,
|
|
2481
|
+
context: e.builderContext
|
|
2482
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0)
|
|
2483
|
+
], 16, _hoisted_1$4);
|
|
2484
|
+
}
|
|
2485
|
+
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-e7803f50"]]), componentInfo$4 = {
|
|
2486
|
+
name: "Form:Input",
|
|
2487
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2488
|
+
inputs: [
|
|
2489
|
+
{
|
|
2490
|
+
name: "type",
|
|
2491
|
+
type: "text",
|
|
2492
|
+
enum: ["text", "number", "email", "url", "checkbox", "radio", "range", "date", "datetime-local", "search", "tel", "time", "file", "month", "week", "password", "color", "hidden"],
|
|
2493
|
+
defaultValue: "text"
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
name: "name",
|
|
2497
|
+
type: "string",
|
|
2498
|
+
required: !0,
|
|
2499
|
+
helperText: 'Every input in a form needs a unique name describing what it takes, e.g. "email"'
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
name: "placeholder",
|
|
2503
|
+
type: "string",
|
|
2504
|
+
defaultValue: "Hello there",
|
|
2505
|
+
helperText: "Text to display when there is no value"
|
|
2506
|
+
},
|
|
2507
|
+
// TODO: handle value vs default value automatically like ng-model
|
|
2508
|
+
{
|
|
2509
|
+
name: "defaultValue",
|
|
2510
|
+
type: "string"
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
name: "value",
|
|
2514
|
+
type: "string",
|
|
2515
|
+
advanced: !0
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
name: "required",
|
|
2519
|
+
type: "boolean",
|
|
2520
|
+
helperText: "Is this input required to be filled out to submit a form",
|
|
2521
|
+
defaultValue: !1
|
|
2522
|
+
}
|
|
2523
|
+
],
|
|
2524
|
+
noWrap: !0,
|
|
2525
|
+
static: !0,
|
|
2526
|
+
defaultStyles: {
|
|
2527
|
+
paddingTop: "10px",
|
|
2528
|
+
paddingBottom: "10px",
|
|
2529
|
+
paddingLeft: "10px",
|
|
2530
|
+
paddingRight: "10px",
|
|
2531
|
+
borderRadius: "3px",
|
|
2532
|
+
borderWidth: "1px",
|
|
2533
|
+
borderStyle: "solid",
|
|
2534
|
+
borderColor: "#ccc"
|
|
2535
|
+
}
|
|
2536
|
+
}, _sfc_main$a = defineComponent({
|
|
2537
|
+
name: "builder-form-input-component",
|
|
2538
|
+
props: [
|
|
2539
|
+
"attributes",
|
|
2540
|
+
"defaultValue",
|
|
2541
|
+
"placeholder",
|
|
2542
|
+
"type",
|
|
2543
|
+
"name",
|
|
2544
|
+
"value",
|
|
2545
|
+
"required"
|
|
2546
|
+
],
|
|
2547
|
+
data() {
|
|
2548
|
+
return { isEditing, filterAttrs };
|
|
2549
|
+
}
|
|
2550
|
+
}), _hoisted_1$3 = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
2551
|
+
function _sfc_render$9(e, t, n, o, r, s) {
|
|
2552
|
+
return openBlock(), createElementBlock("input", mergeProps({
|
|
2553
|
+
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2554
|
+
placeholder: e.placeholder,
|
|
2555
|
+
type: e.type,
|
|
2556
|
+
name: e.name,
|
|
2557
|
+
value: e.value,
|
|
2558
|
+
defaultValue: e.defaultValue,
|
|
2559
|
+
required: e.required
|
|
2560
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$3);
|
|
2561
|
+
}
|
|
2562
|
+
const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]), componentInfo$3 = {
|
|
2563
|
+
name: "Form:Select",
|
|
2564
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2565
|
+
defaultStyles: {
|
|
2566
|
+
alignSelf: "flex-start"
|
|
2567
|
+
},
|
|
2568
|
+
inputs: [{
|
|
2569
|
+
name: "options",
|
|
2570
|
+
type: "list",
|
|
2571
|
+
required: !0,
|
|
2572
|
+
subFields: [{
|
|
2573
|
+
name: "value",
|
|
2574
|
+
type: "text",
|
|
2575
|
+
required: !0
|
|
2576
|
+
}, {
|
|
2577
|
+
name: "name",
|
|
2578
|
+
type: "text"
|
|
2579
|
+
}],
|
|
2580
|
+
defaultValue: [{
|
|
2581
|
+
value: "option 1"
|
|
2582
|
+
}, {
|
|
2583
|
+
value: "option 2"
|
|
2584
|
+
}]
|
|
2585
|
+
}, {
|
|
2586
|
+
name: "name",
|
|
2587
|
+
type: "string",
|
|
2588
|
+
required: !0,
|
|
2589
|
+
helperText: 'Every select in a form needs a unique name describing what it gets, e.g. "email"'
|
|
2590
|
+
}, {
|
|
2591
|
+
name: "defaultValue",
|
|
2592
|
+
type: "string"
|
|
2593
|
+
}, {
|
|
2594
|
+
name: "value",
|
|
2595
|
+
type: "string",
|
|
2596
|
+
advanced: !0
|
|
2597
|
+
}, {
|
|
2598
|
+
name: "required",
|
|
2599
|
+
type: "boolean",
|
|
2600
|
+
defaultValue: !1
|
|
2601
|
+
}],
|
|
2602
|
+
static: !0,
|
|
2603
|
+
noWrap: !0
|
|
2604
|
+
}, _sfc_main$9 = defineComponent({
|
|
2605
|
+
name: "builder-select-component",
|
|
2606
|
+
props: ["attributes", "value", "defaultValue", "name", "options"],
|
|
2607
|
+
data() {
|
|
2608
|
+
return { isEditing, filterAttrs };
|
|
2609
|
+
}
|
|
2610
|
+
}), _hoisted_1$2 = ["value", "defaultValue", "name"], _hoisted_2$1 = ["value"];
|
|
2611
|
+
function _sfc_render$8(e, t, n, o, r, s) {
|
|
2612
|
+
return openBlock(), createElementBlock("select", mergeProps({
|
|
2613
|
+
value: e.value,
|
|
2614
|
+
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2615
|
+
defaultValue: e.defaultValue,
|
|
2616
|
+
name: e.name
|
|
2617
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2618
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.options, (i, a) => (openBlock(), createElementBlock("option", {
|
|
2619
|
+
key: a,
|
|
2620
|
+
value: i.value
|
|
2621
|
+
}, toDisplayString(i.name || i.value), 9, _hoisted_2$1))), 128))
|
|
2622
|
+
], 16, _hoisted_1$2);
|
|
2623
|
+
}
|
|
2624
|
+
const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]), componentInfo$2 = {
|
|
2625
|
+
name: "Form:SubmitButton",
|
|
2626
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2627
|
+
defaultStyles: {
|
|
2628
|
+
appearance: "none",
|
|
2629
|
+
paddingTop: "15px",
|
|
2630
|
+
paddingBottom: "15px",
|
|
2631
|
+
paddingLeft: "25px",
|
|
2632
|
+
paddingRight: "25px",
|
|
2633
|
+
backgroundColor: "#3898EC",
|
|
2634
|
+
color: "white",
|
|
2635
|
+
borderRadius: "4px",
|
|
2636
|
+
cursor: "pointer"
|
|
2637
|
+
},
|
|
2638
|
+
inputs: [{
|
|
2639
|
+
name: "text",
|
|
2640
|
+
type: "text",
|
|
2641
|
+
defaultValue: "Click me"
|
|
2642
|
+
}],
|
|
2643
|
+
static: !0,
|
|
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,
|
|
2649
|
+
}, _sfc_main$8 = defineComponent({
|
|
2650
|
+
name: "builder-submit-button",
|
|
2651
|
+
props: ["attributes", "text"],
|
|
2652
|
+
data() {
|
|
2653
|
+
return { filterAttrs };
|
|
2654
|
+
}
|
|
2655
|
+
});
|
|
2656
|
+
function _sfc_render$7(e, t, n, o, r, s) {
|
|
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);
|
|
2658
|
+
}
|
|
2659
|
+
const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]), componentInfo$1 = {
|
|
2660
|
+
// friendlyName?
|
|
2661
|
+
name: "Raw:Img",
|
|
2662
|
+
hideFromInsertMenu: !0,
|
|
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",
|
|
2664
|
+
inputs: [{
|
|
2665
|
+
name: "image",
|
|
2666
|
+
bubble: !0,
|
|
2667
|
+
type: "file",
|
|
2668
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
|
|
2669
|
+
required: !0
|
|
2670
|
+
}],
|
|
2671
|
+
noWrap: !0,
|
|
2672
|
+
static: !0
|
|
2673
|
+
}, _sfc_main$7 = defineComponent({
|
|
2674
|
+
name: "builder-img-component",
|
|
2675
|
+
props: [
|
|
2676
|
+
"backgroundSize",
|
|
2677
|
+
"backgroundPosition",
|
|
2678
|
+
"imgSrc",
|
|
2679
|
+
"altText",
|
|
2680
|
+
"image",
|
|
2681
|
+
"attributes"
|
|
2682
|
+
],
|
|
2683
|
+
data() {
|
|
2684
|
+
return { isEditing, filterAttrs };
|
|
2685
|
+
}
|
|
2686
|
+
}), _hoisted_1$1 = ["alt", "src"];
|
|
2687
|
+
function _sfc_render$6(e, t, n, o, r, s) {
|
|
2688
|
+
return openBlock(), createElementBlock("img", mergeProps({
|
|
2689
|
+
style: {
|
|
2690
|
+
objectFit: e.backgroundSize || "cover",
|
|
2691
|
+
objectPosition: e.backgroundPosition || "center"
|
|
2692
|
+
},
|
|
2693
|
+
key: e.isEditing() && e.imgSrc || "default-key",
|
|
2694
|
+
alt: e.altText,
|
|
2695
|
+
src: e.imgSrc || e.image
|
|
2696
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$1);
|
|
2697
|
+
}
|
|
2698
|
+
const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]), componentInfo = {
|
|
2699
|
+
name: "Video",
|
|
2700
|
+
canHaveChildren: !0,
|
|
2701
|
+
defaultStyles: {
|
|
2702
|
+
minHeight: "20px",
|
|
2703
|
+
minWidth: "20px"
|
|
2704
|
+
},
|
|
2705
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
|
|
2706
|
+
inputs: [{
|
|
2707
|
+
name: "video",
|
|
2708
|
+
type: "file",
|
|
2709
|
+
allowedFileTypes: ["mp4"],
|
|
2710
|
+
bubble: !0,
|
|
2711
|
+
defaultValue: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",
|
|
2712
|
+
required: !0
|
|
2713
|
+
}, {
|
|
2714
|
+
name: "posterImage",
|
|
2715
|
+
type: "file",
|
|
2716
|
+
allowedFileTypes: ["jpeg", "png"],
|
|
2717
|
+
helperText: "Image to show before the video plays"
|
|
2718
|
+
}, {
|
|
2719
|
+
name: "autoPlay",
|
|
2720
|
+
type: "boolean",
|
|
2721
|
+
defaultValue: !0
|
|
2722
|
+
}, {
|
|
2723
|
+
name: "controls",
|
|
2724
|
+
type: "boolean",
|
|
2725
|
+
defaultValue: !1
|
|
2726
|
+
}, {
|
|
2727
|
+
name: "muted",
|
|
2728
|
+
type: "boolean",
|
|
2729
|
+
defaultValue: !0
|
|
2730
|
+
}, {
|
|
2731
|
+
name: "loop",
|
|
2732
|
+
type: "boolean",
|
|
2733
|
+
defaultValue: !0
|
|
2734
|
+
}, {
|
|
2735
|
+
name: "playsInline",
|
|
2736
|
+
type: "boolean",
|
|
2737
|
+
defaultValue: !0
|
|
2738
|
+
}, {
|
|
2739
|
+
name: "fit",
|
|
2740
|
+
type: "text",
|
|
2741
|
+
defaultValue: "cover",
|
|
2742
|
+
enum: ["contain", "cover", "fill", "auto"]
|
|
2743
|
+
}, {
|
|
2744
|
+
name: "preload",
|
|
2745
|
+
type: "text",
|
|
2746
|
+
defaultValue: "metadata",
|
|
2747
|
+
enum: ["auto", "metadata", "none"]
|
|
2748
|
+
}, {
|
|
2749
|
+
name: "fitContent",
|
|
2750
|
+
type: "boolean",
|
|
2751
|
+
helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
|
|
2123
2752
|
defaultValue: !0,
|
|
2124
2753
|
advanced: !0
|
|
2125
2754
|
}, {
|
|
@@ -2216,7 +2845,7 @@ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]
|
|
|
2216
2845
|
}
|
|
2217
2846
|
};
|
|
2218
2847
|
function _sfc_render$5(e, t, n, o, r, s) {
|
|
2219
|
-
var i, a, l, c, d, u
|
|
2848
|
+
var i, a, l, c, p, d, u;
|
|
2220
2849
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2221
2850
|
createElementVNode("video", mergeProps({
|
|
2222
2851
|
class: "builder-video",
|
|
@@ -2227,6 +2856,8 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2227
2856
|
...(i = e.attributes) == null ? void 0 : i.style,
|
|
2228
2857
|
objectFit: e.fit,
|
|
2229
2858
|
objectPosition: e.position,
|
|
2859
|
+
// Hack to get object fit to work as expected and
|
|
2860
|
+
// not have the video overflow
|
|
2230
2861
|
zIndex: 2,
|
|
2231
2862
|
borderRadius: "1px",
|
|
2232
2863
|
...e.aspectRatio ? {
|
|
@@ -2236,13 +2867,13 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2236
2867
|
src: e.video || "no-src",
|
|
2237
2868
|
poster: e.posterImage
|
|
2238
2869
|
}, e.spreadProps), [
|
|
2239
|
-
e.lazyLoad ? createCommentVNode("
|
|
2870
|
+
e.lazyLoad ? createCommentVNode("", !0) : (openBlock(), createElementBlock("source", {
|
|
2240
2871
|
key: 0,
|
|
2241
2872
|
type: "video/mp4",
|
|
2242
2873
|
src: e.video
|
|
2243
2874
|
}, null, 8, _hoisted_3))
|
|
2244
2875
|
], 16, _hoisted_2),
|
|
2245
|
-
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", {
|
|
2246
2877
|
key: 0,
|
|
2247
2878
|
style: normalizeStyle({
|
|
2248
2879
|
width: "100%",
|
|
@@ -2250,52 +2881,64 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2250
2881
|
pointerEvents: "none",
|
|
2251
2882
|
fontSize: "0px"
|
|
2252
2883
|
})
|
|
2253
|
-
}, null, 4)) : createCommentVNode("
|
|
2254
|
-
(
|
|
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, [
|
|
2255
2886
|
renderSlot(e.$slots, "default")
|
|
2256
|
-
])) : createCommentVNode("
|
|
2257
|
-
(
|
|
2887
|
+
])) : createCommentVNode("", !0),
|
|
2888
|
+
(u = (d = e.builderBlock) == null ? void 0 : d.children) != null && u.length && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2258
2889
|
renderSlot(e.$slots, "default")
|
|
2259
|
-
])) : createCommentVNode("
|
|
2890
|
+
])) : createCommentVNode("", !0)
|
|
2260
2891
|
]);
|
|
2261
2892
|
}
|
|
2262
|
-
const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]
|
|
2263
|
-
component: Button,
|
|
2264
|
-
...componentInfo$b
|
|
2265
|
-
}, {
|
|
2266
|
-
component: Columns,
|
|
2267
|
-
...componentInfo$a
|
|
2268
|
-
}, {
|
|
2893
|
+
const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]), getExtraComponents = () => [{
|
|
2269
2894
|
component: customCode,
|
|
2270
|
-
...componentInfo$9
|
|
2271
|
-
}, {
|
|
2272
|
-
component: embed,
|
|
2273
|
-
...componentInfo$8
|
|
2274
|
-
}, {
|
|
2275
|
-
component: Fragment,
|
|
2276
2895
|
...componentInfo$7
|
|
2277
2896
|
}, {
|
|
2278
|
-
component:
|
|
2897
|
+
component: embed,
|
|
2279
2898
|
...componentInfo$6
|
|
2280
2899
|
}, {
|
|
2281
|
-
component:
|
|
2900
|
+
component: Form,
|
|
2282
2901
|
...componentInfo$5
|
|
2283
2902
|
}, {
|
|
2284
|
-
component:
|
|
2903
|
+
component: FormInput,
|
|
2285
2904
|
...componentInfo$4
|
|
2286
2905
|
}, {
|
|
2287
|
-
component:
|
|
2906
|
+
component: FormSubmitButton,
|
|
2288
2907
|
...componentInfo$2
|
|
2289
2908
|
}, {
|
|
2290
|
-
component:
|
|
2909
|
+
component: FormSelect,
|
|
2910
|
+
...componentInfo$3
|
|
2911
|
+
}, {
|
|
2912
|
+
component: Img,
|
|
2291
2913
|
...componentInfo$1
|
|
2292
2914
|
}, {
|
|
2293
2915
|
component: Video,
|
|
2294
2916
|
...componentInfo
|
|
2917
|
+
}], getDefaultRegisteredComponents = () => [{
|
|
2918
|
+
component: Button,
|
|
2919
|
+
...componentInfo$f
|
|
2920
|
+
}, {
|
|
2921
|
+
component: Columns,
|
|
2922
|
+
...componentInfo$e
|
|
2923
|
+
}, {
|
|
2924
|
+
component: Fragment,
|
|
2925
|
+
...componentInfo$d
|
|
2926
|
+
}, {
|
|
2927
|
+
component: Image,
|
|
2928
|
+
...componentInfo$c
|
|
2929
|
+
}, {
|
|
2930
|
+
component: Section,
|
|
2931
|
+
...componentInfo$b
|
|
2295
2932
|
}, {
|
|
2296
2933
|
component: Slot,
|
|
2297
|
-
...componentInfo$
|
|
2298
|
-
}
|
|
2934
|
+
...componentInfo$a
|
|
2935
|
+
}, {
|
|
2936
|
+
component: Symbol$1,
|
|
2937
|
+
...componentInfo$9
|
|
2938
|
+
}, {
|
|
2939
|
+
component: Text,
|
|
2940
|
+
...componentInfo$8
|
|
2941
|
+
}, ...getExtraComponents()], components = [], createRegisterComponentMessage = (e) => ({
|
|
2299
2942
|
type: "builder.registerComponent",
|
|
2300
2943
|
data: serializeComponentInfo(e)
|
|
2301
2944
|
}), serializeFn = (e) => {
|
|
@@ -2424,7 +3067,7 @@ const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5
|
|
|
2424
3067
|
},
|
|
2425
3068
|
name: "inlined-script",
|
|
2426
3069
|
props: ["scriptStr", "id"]
|
|
2427
|
-
})
|
|
3070
|
+
});
|
|
2428
3071
|
function getGlobalThis() {
|
|
2429
3072
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
2430
3073
|
}
|
|
@@ -2481,42 +3124,42 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
2481
3124
|
includeRefs: a = !0,
|
|
2482
3125
|
enrich: l,
|
|
2483
3126
|
locale: c,
|
|
2484
|
-
apiVersion:
|
|
2485
|
-
fields:
|
|
2486
|
-
omit:
|
|
2487
|
-
offset:
|
|
2488
|
-
cacheSeconds:
|
|
2489
|
-
staleCacheSeconds:
|
|
2490
|
-
sort:
|
|
2491
|
-
includeUnpublished:
|
|
3127
|
+
apiVersion: p = DEFAULT_API_VERSION,
|
|
3128
|
+
fields: d,
|
|
3129
|
+
omit: u,
|
|
3130
|
+
offset: f,
|
|
3131
|
+
cacheSeconds: m,
|
|
3132
|
+
staleCacheSeconds: g,
|
|
3133
|
+
sort: k,
|
|
3134
|
+
includeUnpublished: C
|
|
2492
3135
|
} = e;
|
|
2493
3136
|
if (!i)
|
|
2494
3137
|
throw new Error("Missing API key");
|
|
2495
|
-
if (!["v3"].includes(
|
|
2496
|
-
throw new Error(`Invalid apiVersion: expected 'v3', received '${
|
|
3138
|
+
if (!["v3"].includes(p))
|
|
3139
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${p}'`);
|
|
2497
3140
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
2498
|
-
const
|
|
2499
|
-
if (
|
|
2500
|
-
const
|
|
2501
|
-
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
|
|
2502
3145
|
});
|
|
2503
|
-
for (const
|
|
2504
|
-
|
|
3146
|
+
for (const S in y)
|
|
3147
|
+
b.searchParams.set(S, JSON.stringify(y[S]));
|
|
2505
3148
|
}
|
|
2506
3149
|
const I = {
|
|
2507
3150
|
...getBuilderSearchParamsFromWindow(),
|
|
2508
3151
|
...normalizeSearchParams(e.options || {})
|
|
2509
3152
|
}, v = flatten(I);
|
|
2510
|
-
for (const
|
|
2511
|
-
|
|
2512
|
-
if (o &&
|
|
2513
|
-
const
|
|
3153
|
+
for (const y in v)
|
|
3154
|
+
b.searchParams.set(y, String(v[y]));
|
|
3155
|
+
if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), r) {
|
|
3156
|
+
const y = flatten({
|
|
2514
3157
|
query: r
|
|
2515
3158
|
});
|
|
2516
|
-
for (const
|
|
2517
|
-
|
|
3159
|
+
for (const S in y)
|
|
3160
|
+
b.searchParams.set(S, JSON.stringify(y[S]));
|
|
2518
3161
|
}
|
|
2519
|
-
return
|
|
3162
|
+
return b;
|
|
2520
3163
|
}, checkContentHasResults = (e) => "results" in e;
|
|
2521
3164
|
async function fetchOneEntry(e) {
|
|
2522
3165
|
const t = await fetchEntries({
|
|
@@ -2559,7 +3202,7 @@ async function fetchEntries(e) {
|
|
|
2559
3202
|
}
|
|
2560
3203
|
const getAllContent = fetchEntries;
|
|
2561
3204
|
function isPreviewing() {
|
|
2562
|
-
return !isBrowser() || isEditing() ? !1 :
|
|
3205
|
+
return !isBrowser() || isEditing() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
2563
3206
|
}
|
|
2564
3207
|
function uuidv4() {
|
|
2565
3208
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
@@ -2685,7 +3328,7 @@ async function _track(e) {
|
|
|
2685
3328
|
logger.error("Missing API key for track call. Please provide your API key.");
|
|
2686
3329
|
return;
|
|
2687
3330
|
}
|
|
2688
|
-
if (
|
|
3331
|
+
if (e.canTrack && !isEditing() && (isBrowser() || TARGET === "reactNative"))
|
|
2689
3332
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2690
3333
|
method: "POST",
|
|
2691
3334
|
body: JSON.stringify({
|
|
@@ -2719,7 +3362,7 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
2719
3362
|
return null;
|
|
2720
3363
|
}, findBuilderParent = (e) => findParentElement(e, (t) => {
|
|
2721
3364
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2722
|
-
return
|
|
3365
|
+
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2723
3366
|
}), computeOffset = ({
|
|
2724
3367
|
event: e,
|
|
2725
3368
|
target: t
|
|
@@ -2750,7 +3393,7 @@ function isFromTrustedHost(e, t) {
|
|
|
2750
3393
|
const n = new URL(t.origin), o = n.hostname;
|
|
2751
3394
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
2752
3395
|
}
|
|
2753
|
-
const SDK_VERSION = "0.13.
|
|
3396
|
+
const SDK_VERSION = "0.13.3", registry = {};
|
|
2754
3397
|
function register(e, t) {
|
|
2755
3398
|
let n = registry[e];
|
|
2756
3399
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -2800,6 +3443,8 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2800
3443
|
target: TARGET,
|
|
2801
3444
|
version: SDK_VERSION,
|
|
2802
3445
|
supportsPatchUpdates: !1,
|
|
3446
|
+
// Supports builder-model="..." attribute which is needed to
|
|
3447
|
+
// scope our '+ add block' button styling
|
|
2803
3448
|
supportsAddBlockScoping: !0,
|
|
2804
3449
|
supportsCustomBreakpoints: !0
|
|
2805
3450
|
}
|
|
@@ -2815,35 +3460,35 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2815
3460
|
const {
|
|
2816
3461
|
data: r
|
|
2817
3462
|
} = o;
|
|
2818
|
-
if (
|
|
3463
|
+
if (r != null && r.type)
|
|
2819
3464
|
switch (r.type) {
|
|
2820
3465
|
case "builder.evaluate": {
|
|
2821
|
-
const a = r.data.text, l = r.data.arguments || [], c = r.data.id,
|
|
2822
|
-
let
|
|
3466
|
+
const a = r.data.text, l = r.data.arguments || [], c = r.data.id, p = new Function(a);
|
|
3467
|
+
let d, u = null;
|
|
2823
3468
|
try {
|
|
2824
|
-
|
|
2825
|
-
} catch (
|
|
2826
|
-
|
|
3469
|
+
d = p.apply(null, l);
|
|
3470
|
+
} catch (f) {
|
|
3471
|
+
u = f;
|
|
2827
3472
|
}
|
|
2828
|
-
|
|
3473
|
+
u ? (s = window.parent) == null || s.postMessage({
|
|
2829
3474
|
type: "builder.evaluateError",
|
|
2830
3475
|
data: {
|
|
2831
3476
|
id: c,
|
|
2832
|
-
error:
|
|
3477
|
+
error: u.message
|
|
2833
3478
|
}
|
|
2834
|
-
}, "*") :
|
|
2835
|
-
var
|
|
2836
|
-
(
|
|
3479
|
+
}, "*") : d && typeof d.then == "function" ? d.then((f) => {
|
|
3480
|
+
var m;
|
|
3481
|
+
(m = window.parent) == null || m.postMessage({
|
|
2837
3482
|
type: "builder.evaluateResult",
|
|
2838
3483
|
data: {
|
|
2839
3484
|
id: c,
|
|
2840
|
-
result:
|
|
3485
|
+
result: f
|
|
2841
3486
|
}
|
|
2842
3487
|
}, "*");
|
|
2843
3488
|
}).catch(console.error) : (i = window.parent) == null || i.postMessage({
|
|
2844
3489
|
type: "builder.evaluateResult",
|
|
2845
3490
|
data: {
|
|
2846
|
-
result:
|
|
3491
|
+
result: d,
|
|
2847
3492
|
id: c
|
|
2848
3493
|
}
|
|
2849
3494
|
}, "*");
|
|
@@ -3146,14 +3791,14 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3146
3791
|
});
|
|
3147
3792
|
},
|
|
3148
3793
|
runHttpRequests() {
|
|
3149
|
-
var t, n
|
|
3150
|
-
const e = (
|
|
3151
|
-
Object.entries(e).forEach(([
|
|
3152
|
-
if (
|
|
3153
|
-
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);
|
|
3154
3799
|
this.handleRequest({
|
|
3155
|
-
url:
|
|
3156
|
-
key:
|
|
3800
|
+
url: s,
|
|
3801
|
+
key: o
|
|
3157
3802
|
});
|
|
3158
3803
|
}
|
|
3159
3804
|
});
|
|
@@ -3234,11 +3879,11 @@ function _sfc_render$4(e, t, n, o, r, s) {
|
|
|
3234
3879
|
renderSlot(e.$slots, "default")
|
|
3235
3880
|
]),
|
|
3236
3881
|
_: 3
|
|
3237
|
-
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : createCommentVNode("
|
|
3882
|
+
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : createCommentVNode("", !0);
|
|
3238
3883
|
}
|
|
3239
|
-
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]
|
|
3240
|
-
var s
|
|
3241
|
-
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);
|
|
3242
3887
|
let r = "";
|
|
3243
3888
|
if (o && t && n && (r += `
|
|
3244
3889
|
@font-face {
|
|
@@ -3248,16 +3893,16 @@ font-display: fallback;
|
|
|
3248
3893
|
font-weight: 400;
|
|
3249
3894
|
}
|
|
3250
3895
|
`.trim()), e.files)
|
|
3251
|
-
for (const
|
|
3252
|
-
if (!(String(Number(
|
|
3896
|
+
for (const i in e.files) {
|
|
3897
|
+
if (!(String(Number(i)) === i))
|
|
3253
3898
|
continue;
|
|
3254
|
-
const
|
|
3255
|
-
|
|
3899
|
+
const l = e.files[i];
|
|
3900
|
+
l && l !== o && (r += `
|
|
3256
3901
|
@font-face {
|
|
3257
3902
|
font-family: "${t}";
|
|
3258
|
-
src: url('${
|
|
3903
|
+
src: url('${l}') format('woff2');
|
|
3259
3904
|
font-display: fallback;
|
|
3260
|
-
font-weight: ${
|
|
3905
|
+
font-weight: ${i};
|
|
3261
3906
|
}
|
|
3262
3907
|
`.trim());
|
|
3263
3908
|
}
|
|
@@ -3272,7 +3917,7 @@ font-weight: ${a};
|
|
|
3272
3917
|
contentId: t
|
|
3273
3918
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", _sfc_main$3 = defineComponent({
|
|
3274
3919
|
name: "content-styles",
|
|
3275
|
-
components: { InlinedStyles },
|
|
3920
|
+
components: { InlinedStyles: _sfc_main$k },
|
|
3276
3921
|
props: ["cssCode", "contentId", "customFonts"],
|
|
3277
3922
|
data() {
|
|
3278
3923
|
return {
|
|
@@ -3309,7 +3954,7 @@ function _sfc_render$3(e, t, n, o, r, s) {
|
|
|
3309
3954
|
const i = resolveComponent("inlined-styles");
|
|
3310
3955
|
return openBlock(), createBlock(i, { styles: e.injectedStyles }, null, 8, ["styles"]);
|
|
3311
3956
|
}
|
|
3312
|
-
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 = ({
|
|
3313
3958
|
content: e,
|
|
3314
3959
|
data: t,
|
|
3315
3960
|
locale: n
|
|
@@ -3340,7 +3985,7 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
3340
3985
|
name: "content-component",
|
|
3341
3986
|
components: {
|
|
3342
3987
|
EnableEditor,
|
|
3343
|
-
InlinedScript,
|
|
3988
|
+
InlinedScript: _sfc_main$5,
|
|
3344
3989
|
ContentStyles,
|
|
3345
3990
|
Blocks
|
|
3346
3991
|
},
|
|
@@ -3369,11 +4014,18 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
3369
4014
|
var e, t;
|
|
3370
4015
|
return {
|
|
3371
4016
|
scriptStr: getUpdateVariantVisibilityScript({
|
|
4017
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3372
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
|
|
3373
4020
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
3374
4021
|
}),
|
|
3375
4022
|
registeredComponents: [
|
|
3376
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.
|
|
3377
4029
|
...components,
|
|
3378
4030
|
...this.customComponents || []
|
|
3379
4031
|
].reduce(
|
|
@@ -3403,6 +4055,11 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
3403
4055
|
apiVersion: this.apiVersion,
|
|
3404
4056
|
componentInfos: [
|
|
3405
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.
|
|
3406
4063
|
...components,
|
|
3407
4064
|
...this.customComponents || []
|
|
3408
4065
|
].reduce(
|
|
@@ -3453,20 +4110,20 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
3453
4110
|
trustedHosts: e.trustedHosts
|
|
3454
4111
|
}, {}), {
|
|
3455
4112
|
default: withCtx(() => {
|
|
3456
|
-
var d, u,
|
|
4113
|
+
var p, d, u, f, m, g, k;
|
|
3457
4114
|
return [
|
|
3458
4115
|
e.isSsrAbTest ? (openBlock(), createBlock(i, {
|
|
3459
4116
|
key: 0,
|
|
3460
4117
|
scriptStr: e.scriptStr
|
|
3461
|
-
}, null, 8, ["scriptStr"])) : createCommentVNode("
|
|
4118
|
+
}, null, 8, ["scriptStr"])) : createCommentVNode("", !0),
|
|
3462
4119
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(a, {
|
|
3463
4120
|
key: 1,
|
|
3464
|
-
contentId: (
|
|
3465
|
-
cssCode: (
|
|
3466
|
-
customFonts: (
|
|
3467
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) : createCommentVNode("
|
|
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,
|
|
4123
|
+
customFonts: (m = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : m.customFonts
|
|
4124
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : createCommentVNode("", !0),
|
|
3468
4125
|
createVNode(l, {
|
|
3469
|
-
blocks: (
|
|
4126
|
+
blocks: (k = (g = e.builderContextSignal.content) == null ? void 0 : g.data) == null ? void 0 : k.blocks,
|
|
3470
4127
|
context: e.builderContextSignal,
|
|
3471
4128
|
registeredComponents: e.registeredComponents,
|
|
3472
4129
|
linkComponent: e.linkComponent
|
|
@@ -3476,11 +4133,11 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
3476
4133
|
_: 1
|
|
3477
4134
|
}, 16, ["content", "data", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "linkComponent", "trustedHosts"]);
|
|
3478
4135
|
}
|
|
3479
|
-
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({
|
|
3480
4137
|
name: "content-variants",
|
|
3481
4138
|
components: {
|
|
3482
|
-
InlinedScript,
|
|
3483
|
-
InlinedStyles,
|
|
4139
|
+
InlinedScript: _sfc_main$5,
|
|
4140
|
+
InlinedStyles: _sfc_main$k,
|
|
3484
4141
|
ContentComponent
|
|
3485
4142
|
},
|
|
3486
4143
|
props: [
|
|
@@ -3550,16 +4207,16 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
3550
4207
|
!e.__isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
3551
4208
|
key: 0,
|
|
3552
4209
|
scriptStr: e.getScriptString()
|
|
3553
|
-
}, null, 8, ["scriptStr"])) : createCommentVNode("
|
|
4210
|
+
}, null, 8, ["scriptStr"])) : createCommentVNode("", !0),
|
|
3554
4211
|
e.shouldRenderVariants ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
3555
4212
|
createVNode(a, {
|
|
3556
4213
|
id: `variants-styles-${(c = e.content) == null ? void 0 : c.id}`,
|
|
3557
4214
|
styles: e.hideVariantsStyleString
|
|
3558
4215
|
}, null, 8, ["id", "styles"]),
|
|
3559
4216
|
createVNode(i, { scriptStr: e.updateCookieAndStylesScriptStr }, null, 8, ["scriptStr"]),
|
|
3560
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (
|
|
3561
|
-
key:
|
|
3562
|
-
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,
|
|
3563
4220
|
showContent: !1,
|
|
3564
4221
|
model: e.model,
|
|
3565
4222
|
data: e.data,
|
|
@@ -3579,7 +4236,7 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
3579
4236
|
contentWrapperProps: e.contentWrapperProps,
|
|
3580
4237
|
trustedHosts: e.trustedHosts
|
|
3581
4238
|
}, null, 8, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
3582
|
-
], 64)) : createCommentVNode("
|
|
4239
|
+
], 64)) : createCommentVNode("", !0),
|
|
3583
4240
|
createVNode(l, mergeProps({
|
|
3584
4241
|
content: e.defaultContent,
|
|
3585
4242
|
showContent: !0,
|
|
@@ -3605,11 +4262,12 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
3605
4262
|
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
3606
4263
|
], 64);
|
|
3607
4264
|
}
|
|
3608
|
-
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 ({
|
|
3609
4266
|
builderContextValue: e,
|
|
3610
4267
|
symbol: t
|
|
3611
4268
|
}) => {
|
|
3612
|
-
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))
|
|
3613
4271
|
return fetchOneEntry({
|
|
3614
4272
|
model: t.model,
|
|
3615
4273
|
apiKey: e.apiKey,
|
|
@@ -3626,7 +4284,6 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
3626
4284
|
name: "builder-symbol",
|
|
3627
4285
|
components: { ContentVariants: Content },
|
|
3628
4286
|
props: [
|
|
3629
|
-
"js",
|
|
3630
4287
|
"attributes",
|
|
3631
4288
|
"symbol",
|
|
3632
4289
|
"dynamic",
|
|
@@ -3657,7 +4314,7 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
3657
4314
|
this.attributes[getClassPropName()],
|
|
3658
4315
|
"builder-symbol",
|
|
3659
4316
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
3660
|
-
(
|
|
4317
|
+
(t = this.symbol) != null && t.dynamic || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
3661
4318
|
].filter(Boolean).join(" ");
|
|
3662
4319
|
},
|
|
3663
4320
|
onUpdateHook0() {
|
|
@@ -3678,7 +4335,7 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
3678
4335
|
}
|
|
3679
4336
|
});
|
|
3680
4337
|
function _sfc_render(e, t, n, o, r, s) {
|
|
3681
|
-
var a, l, c,
|
|
4338
|
+
var a, l, c, p, d;
|
|
3682
4339
|
const i = resolveComponent("content-variants");
|
|
3683
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)), [
|
|
3684
4341
|
createVNode(i, {
|
|
@@ -3693,15 +4350,15 @@ function _sfc_render(e, t, n, o, r, s) {
|
|
|
3693
4350
|
data: {
|
|
3694
4351
|
...(l = e.symbol) == null ? void 0 : l.data,
|
|
3695
4352
|
...e.builderContext.localState,
|
|
3696
|
-
...(
|
|
4353
|
+
...(p = (c = e.contentToUse) == null ? void 0 : c.data) == null ? void 0 : p.state
|
|
3697
4354
|
},
|
|
3698
|
-
model: (
|
|
4355
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
3699
4356
|
content: e.contentToUse,
|
|
3700
4357
|
linkComponent: e.builderLinkComponent
|
|
3701
4358
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content", "linkComponent"])
|
|
3702
4359
|
], 16);
|
|
3703
4360
|
}
|
|
3704
|
-
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 = {};
|
|
3705
4362
|
function setEditorSettings(e) {
|
|
3706
4363
|
if (isBrowser()) {
|
|
3707
4364
|
Object.assign(settings, e);
|
|
@@ -3741,28 +4398,28 @@ export {
|
|
|
3741
4398
|
Fragment as F,
|
|
3742
4399
|
getAllContent as G,
|
|
3743
4400
|
getContent as H,
|
|
3744
|
-
|
|
4401
|
+
Image as I,
|
|
3745
4402
|
dynamicRenderer as J,
|
|
3746
4403
|
block as K,
|
|
3747
4404
|
RenderBlocks as R,
|
|
3748
4405
|
Section as S,
|
|
3749
4406
|
TARGET as T,
|
|
3750
4407
|
Video as V,
|
|
3751
|
-
|
|
4408
|
+
_sfc_main$k as _,
|
|
3752
4409
|
getSizesForBreakpoints as a,
|
|
3753
4410
|
createCssClass as b,
|
|
3754
4411
|
checkIsDefined as c,
|
|
3755
4412
|
getMaxWidthQueryForSize as d,
|
|
3756
|
-
|
|
3757
|
-
|
|
4413
|
+
_export_sfc as e,
|
|
4414
|
+
evaluate as f,
|
|
3758
4415
|
getProcessedBlock as g,
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
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,
|
|
3766
4423
|
Symbol$1 as o,
|
|
3767
4424
|
Text as p,
|
|
3768
4425
|
isEditing as q,
|