@builder.io/sdk-vue 0.6.1 → 0.6.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/package.json +1 -1
- package/vue2/lib/{edge/block-a17dd5f3.js → browser/block-517be5fb.js} +7 -7
- package/vue2/lib/browser/{block-7572b272.cjs → block-86374ead.cjs} +2 -2
- package/vue2/lib/browser/block-styles-29c86145.js +82 -0
- package/vue2/lib/browser/block-styles-abd88aab.cjs +1 -0
- package/vue2/lib/browser/{block-wrapper-7137e4eb.js → block-wrapper-68ce7a31.js} +5 -5
- package/vue2/lib/browser/{block-wrapper-73003591.cjs → block-wrapper-9c4ec9d2.cjs} +1 -1
- package/vue2/lib/{edge/blocks-wrapper-e865d99a.js → browser/blocks-wrapper-22427504.js} +1 -1
- package/vue2/lib/{edge/blocks-wrapper-4e301a45.cjs → browser/blocks-wrapper-572ac8fc.cjs} +1 -1
- package/vue2/lib/{edge/component-ref-46ff36c7.cjs → browser/component-ref-314af75f.cjs} +1 -1
- package/vue2/lib/{edge/component-ref-47c7b4b9.js → browser/component-ref-ad69c5c3.js} +6 -6
- package/vue2/lib/browser/components/block/components/block-styles.vue.d.ts +0 -1
- package/vue2/lib/browser/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/{edge/content-dba5c9d2.js → browser/content-ab810c5a.js} +5 -5
- package/vue2/lib/browser/{content-284be2c3.cjs → content-cd8c708e.cjs} +1 -1
- package/vue2/lib/{node/css-924d8859.cjs → browser/css-6ab3de61.cjs} +1 -1
- package/vue2/lib/browser/{css-01587ac9.js → css-9ff60711.js} +1 -1
- package/vue2/lib/browser/enable-editor-3ae81c32.cjs +1 -0
- package/vue2/lib/{edge/enable-editor-985c44d4.js → browser/enable-editor-e4a75de2.js} +3 -3
- package/vue2/lib/browser/{evaluate-34eb09eb.js → evaluate-73ab20d5.js} +1 -1
- package/vue2/lib/browser/{evaluate-3b22ca76.cjs → evaluate-ddca0796.cjs} +1 -1
- package/vue2/lib/browser/functions/fetch-builder-props.d.ts +13 -0
- package/vue2/lib/browser/{get-block-actions-55e90df6.cjs → get-block-actions-d7bad2e7.cjs} +1 -1
- package/vue2/lib/{node/get-block-actions-2147e6cd.js → browser/get-block-actions-f0e194ec.js} +2 -2
- package/vue2/lib/browser/{get-block-properties-58c54a69.js → get-block-properties-3266f9fa.js} +2 -2
- package/vue2/lib/{node/get-block-properties-2f43ed48.cjs → browser/get-block-properties-690c354d.cjs} +1 -1
- package/vue2/lib/browser/{get-processed-block-a2ff4c51.js → get-processed-block-2c962134.js} +2 -2
- package/vue2/lib/browser/{get-processed-block-15b0d499.cjs → get-processed-block-f4410a90.cjs} +1 -1
- package/vue2/lib/{node/index-20a64e56.js → browser/index-35e9f8af.js} +39 -39
- package/vue2/lib/{node/index-31b135ac.cjs → browser/index-6d420ce4.cjs} +3 -3
- package/vue2/lib/browser/index.cjs +1 -1
- package/vue2/lib/browser/index.js +1 -1
- package/vue2/lib/{edge/inlined-script-58f8fb7e.js → browser/inlined-script-9e201117.js} +1 -1
- package/vue2/lib/browser/{inlined-script-395a54bf.cjs → inlined-script-fd0e31a3.cjs} +1 -1
- package/vue2/lib/{node/inlined-styles-6ad3b97d.cjs → browser/inlined-styles-21a44abc.cjs} +1 -1
- package/vue2/lib/{node/inlined-styles-5f724636.js → browser/inlined-styles-c977be7a.js} +1 -1
- package/vue2/lib/{node/interactive-element-91844a73.cjs → browser/interactive-element-1b2efcea.cjs} +1 -1
- package/vue2/lib/{node/interactive-element-9a3140c7.js → browser/interactive-element-a457f13d.js} +5 -5
- package/vue2/lib/{node/repeated-block-db085f7a.js → browser/repeated-block-2b47cc10.js} +2 -2
- package/vue2/lib/browser/{repeated-block-2801e2ad.cjs → repeated-block-80cb7500.cjs} +1 -1
- package/vue2/lib/browser/{styles-1aad0890.cjs → styles-48f7b053.cjs} +2 -2
- package/vue2/lib/browser/{styles-c675d986.js → styles-e7ee6699.js} +2 -2
- package/vue2/lib/browser/types/components.d.ts +0 -1
- package/vue2/lib/{browser/block-c120af6b.js → edge/block-79f216bd.js} +7 -7
- package/vue2/lib/{node/block-7572b272.cjs → edge/block-d431c5a1.cjs} +2 -2
- package/vue2/lib/edge/block-styles-809fea02.cjs +1 -0
- package/vue2/lib/edge/block-styles-a4646383.js +82 -0
- package/vue2/lib/{node/block-wrapper-7137e4eb.js → edge/block-wrapper-02e29a39.js} +5 -5
- package/vue2/lib/edge/{block-wrapper-224770b5.cjs → block-wrapper-96d6e19a.cjs} +1 -1
- package/vue2/lib/{browser/blocks-wrapper-b4d967ac.cjs → edge/blocks-wrapper-26c2556a.cjs} +1 -1
- package/vue2/lib/{browser/blocks-wrapper-9f1e75a3.js → edge/blocks-wrapper-58a3dc1c.js} +1 -1
- package/vue2/lib/{node/component-ref-b509786c.js → edge/component-ref-bb6f5d05.js} +6 -6
- package/vue2/lib/{node/component-ref-da79bed8.cjs → edge/component-ref-eeb18cc8.cjs} +1 -1
- package/vue2/lib/edge/components/block/components/block-styles.vue.d.ts +0 -1
- package/vue2/lib/edge/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/{browser/content-adf884f8.js → edge/content-1fe9f483.js} +5 -5
- package/vue2/lib/{node/content-284be2c3.cjs → edge/content-b0e3265b.cjs} +1 -1
- package/vue2/lib/{node/css-01587ac9.js → edge/css-766c9e43.js} +1 -1
- package/vue2/lib/{browser/css-924d8859.cjs → edge/css-c85f369a.cjs} +1 -1
- package/vue2/lib/{node/enable-editor-872f651f.js → edge/enable-editor-1c97f1ce.js} +3 -3
- package/vue2/lib/edge/enable-editor-c96b8ba3.cjs +1 -0
- package/vue2/lib/edge/{evaluate-60a4358c.js → evaluate-67915572.js} +1 -1
- package/vue2/lib/edge/{evaluate-d1682114.cjs → evaluate-94193bd8.cjs} +1 -1
- package/vue2/lib/edge/functions/fetch-builder-props.d.ts +13 -0
- package/vue2/lib/{browser/get-block-actions-2147e6cd.js → edge/get-block-actions-6ffacde6.js} +2 -2
- package/vue2/lib/edge/{get-block-actions-70f0ddb1.cjs → get-block-actions-eb913df3.cjs} +1 -1
- package/vue2/lib/edge/{get-block-properties-26d44344.js → get-block-properties-65d31491.js} +2 -2
- package/vue2/lib/{browser/get-block-properties-2f43ed48.cjs → edge/get-block-properties-9f36f432.cjs} +1 -1
- package/vue2/lib/edge/{get-processed-block-d3436370.js → get-processed-block-54d47a44.js} +2 -2
- package/vue2/lib/edge/{get-processed-block-6bfaca9c.cjs → get-processed-block-d64d51b8.cjs} +1 -1
- package/vue2/lib/edge/{index-a83a44e7.cjs → index-0e6898f4.cjs} +3 -3
- package/vue2/lib/{browser/index-20a64e56.js → edge/index-e4b98f3f.js} +39 -39
- package/vue2/lib/edge/index.cjs +1 -1
- package/vue2/lib/edge/index.js +1 -1
- package/vue2/lib/{node/inlined-script-dd1c2277.js → edge/inlined-script-528cf671.js} +1 -1
- package/vue2/lib/{node/inlined-script-395a54bf.cjs → edge/inlined-script-f08590fd.cjs} +1 -1
- package/vue2/lib/edge/{inlined-styles-f19ba9ed.js → inlined-styles-3ae3536e.js} +1 -1
- package/vue2/lib/{browser/inlined-styles-6ad3b97d.cjs → edge/inlined-styles-8a4eca1c.cjs} +1 -1
- package/vue2/lib/{browser/interactive-element-9a3140c7.js → edge/interactive-element-448f1b25.js} +5 -5
- package/vue2/lib/{browser/interactive-element-91844a73.cjs → edge/interactive-element-a4e35976.cjs} +1 -1
- package/vue2/lib/edge/{repeated-block-5d01ffbd.cjs → repeated-block-5125d911.cjs} +1 -1
- package/vue2/lib/{browser/repeated-block-db085f7a.js → edge/repeated-block-5d6ad9e8.js} +2 -2
- package/vue2/lib/{node/styles-c675d986.js → edge/styles-4607da35.js} +2 -2
- package/vue2/lib/{node/styles-1aad0890.cjs → edge/styles-7b4eb536.cjs} +2 -2
- package/vue2/lib/edge/types/components.d.ts +0 -1
- package/vue2/lib/node/{block-c120af6b.js → block-517be5fb.js} +7 -7
- package/vue2/lib/{edge/block-89ebff36.cjs → node/block-86374ead.cjs} +2 -2
- package/vue2/lib/node/block-styles-29c86145.js +82 -0
- package/vue2/lib/node/block-styles-abd88aab.cjs +1 -0
- package/vue2/lib/{edge/block-wrapper-1d8816f6.js → node/block-wrapper-68ce7a31.js} +5 -5
- package/vue2/lib/node/{block-wrapper-73003591.cjs → block-wrapper-9c4ec9d2.cjs} +1 -1
- package/vue2/lib/node/{blocks-wrapper-9f1e75a3.js → blocks-wrapper-22427504.js} +1 -1
- package/vue2/lib/node/{blocks-wrapper-b4d967ac.cjs → blocks-wrapper-572ac8fc.cjs} +1 -1
- package/vue2/lib/{browser/component-ref-da79bed8.cjs → node/component-ref-314af75f.cjs} +1 -1
- package/vue2/lib/{browser/component-ref-b509786c.js → node/component-ref-ad69c5c3.js} +6 -6
- package/vue2/lib/node/components/block/components/block-styles.vue.d.ts +0 -1
- package/vue2/lib/node/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/node/{content-adf884f8.js → content-ab810c5a.js} +5 -5
- package/vue2/lib/{edge/content-c1d216c0.cjs → node/content-cd8c708e.cjs} +1 -1
- package/vue2/lib/{edge/css-f5a4c224.cjs → node/css-6ab3de61.cjs} +1 -1
- package/vue2/lib/{edge/css-384211ae.js → node/css-9ff60711.js} +1 -1
- package/vue2/lib/node/enable-editor-3ae81c32.cjs +1 -0
- package/vue2/lib/{browser/enable-editor-872f651f.js → node/enable-editor-e4a75de2.js} +3 -3
- package/vue2/lib/node/{evaluate-34eb09eb.js → evaluate-73ab20d5.js} +1 -1
- package/vue2/lib/node/{evaluate-3b22ca76.cjs → evaluate-ddca0796.cjs} +1 -1
- package/vue2/lib/node/functions/fetch-builder-props.d.ts +13 -0
- package/vue2/lib/node/{get-block-actions-55e90df6.cjs → get-block-actions-d7bad2e7.cjs} +1 -1
- package/vue2/lib/{edge/get-block-actions-30acfe84.js → node/get-block-actions-f0e194ec.js} +2 -2
- package/vue2/lib/node/{get-block-properties-58c54a69.js → get-block-properties-3266f9fa.js} +2 -2
- package/vue2/lib/{edge/get-block-properties-e47eac50.cjs → node/get-block-properties-690c354d.cjs} +1 -1
- package/vue2/lib/node/{get-processed-block-a2ff4c51.js → get-processed-block-2c962134.js} +2 -2
- package/vue2/lib/node/{get-processed-block-15b0d499.cjs → get-processed-block-f4410a90.cjs} +1 -1
- package/vue2/lib/{edge/index-84b65a4f.js → node/index-35e9f8af.js} +39 -39
- package/vue2/lib/{browser/index-31b135ac.cjs → node/index-6d420ce4.cjs} +3 -3
- package/vue2/lib/node/index.cjs +1 -1
- package/vue2/lib/node/index.js +1 -1
- package/vue2/lib/{browser/inlined-script-dd1c2277.js → node/inlined-script-9e201117.js} +1 -1
- package/vue2/lib/{edge/inlined-script-c7731507.cjs → node/inlined-script-fd0e31a3.cjs} +1 -1
- package/vue2/lib/{edge/inlined-styles-fac668de.cjs → node/inlined-styles-21a44abc.cjs} +1 -1
- package/vue2/lib/{browser/inlined-styles-5f724636.js → node/inlined-styles-c977be7a.js} +1 -1
- package/vue2/lib/{edge/interactive-element-f7ebf39a.cjs → node/interactive-element-1b2efcea.cjs} +1 -1
- package/vue2/lib/{edge/interactive-element-086120dd.js → node/interactive-element-a457f13d.js} +5 -5
- package/vue2/lib/{edge/repeated-block-8d023e60.js → node/repeated-block-2b47cc10.js} +2 -2
- package/vue2/lib/node/{repeated-block-2801e2ad.cjs → repeated-block-80cb7500.cjs} +1 -1
- package/vue2/lib/{edge/styles-022c2ac6.cjs → node/styles-48f7b053.cjs} +2 -2
- package/vue2/lib/{edge/styles-dafbc021.js → node/styles-e7ee6699.js} +2 -2
- package/vue2/lib/node/types/components.d.ts +0 -1
- package/vue3/lib/browser/{block-wrapper.ae2637e5.cjs → block-wrapper.3424c8e5.cjs} +1 -1
- package/vue3/lib/{edge/block-wrapper.5020430a.js → browser/block-wrapper.ac839834.js} +2 -2
- package/vue3/lib/{edge/component-ref.1af99a31.js → browser/component-ref.8de03d1c.js} +2 -2
- package/vue3/lib/{edge/component-ref.0528b1a0.cjs → browser/component-ref.96453075.cjs} +1 -1
- package/vue3/lib/browser/components/block/components/block-styles.vue.d.ts +0 -1
- package/vue3/lib/browser/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/browser/functions/fetch-builder-props.d.ts +13 -0
- package/vue3/lib/browser/{get-block-actions.9a71b975.cjs → get-block-actions.777560e5.cjs} +1 -1
- package/vue3/lib/{edge/get-block-actions.8e0880b9.js → browser/get-block-actions.e59fcd98.js} +1 -1
- package/vue3/lib/{node/index.bb9d2170.js → browser/index.12730bde.js} +358 -353
- package/vue3/lib/browser/index.4cfec3cb.cjs +69 -0
- package/vue3/lib/browser/index.cjs +1 -1
- package/vue3/lib/browser/index.js +1 -1
- package/vue3/lib/{edge/repeated-block.1735d6ce.js → browser/repeated-block.0bc816fe.js} +2 -2
- package/vue3/lib/{edge/repeated-block.6e7688cb.cjs → browser/repeated-block.764b4af3.cjs} +1 -1
- package/vue3/lib/browser/types/components.d.ts +0 -1
- package/vue3/lib/edge/{block-wrapper.6bb62da5.cjs → block-wrapper.5ba52bd5.cjs} +1 -1
- package/vue3/lib/{node/block-wrapper.f1e0d99f.js → edge/block-wrapper.f7fd1d3e.js} +2 -2
- package/vue3/lib/{browser/component-ref.90060339.cjs → edge/component-ref.76d870e8.cjs} +1 -1
- package/vue3/lib/{node/component-ref.e2ad1f80.js → edge/component-ref.c65a87a1.js} +2 -2
- package/vue3/lib/edge/components/block/components/block-styles.vue.d.ts +0 -1
- package/vue3/lib/edge/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/edge/functions/fetch-builder-props.d.ts +13 -0
- package/vue3/lib/edge/{get-block-actions.cdcc68a3.cjs → get-block-actions.1bd9f726.cjs} +1 -1
- package/vue3/lib/{browser/get-block-actions.05d2bf89.js → edge/get-block-actions.d05efca1.js} +1 -1
- package/vue3/lib/edge/{index.51a4e9bc.js → index.a89f2469.js} +552 -547
- package/vue3/lib/edge/index.cjs +1 -1
- package/vue3/lib/edge/{index.f8106764.cjs → index.d22d7b12.cjs} +23 -23
- package/vue3/lib/edge/index.js +1 -1
- package/vue3/lib/{browser/repeated-block.f7f28e2b.cjs → edge/repeated-block.865463b0.cjs} +1 -1
- package/vue3/lib/{node/repeated-block.6860cc5f.js → edge/repeated-block.e31ecdbc.js} +2 -2
- package/vue3/lib/edge/types/components.d.ts +0 -1
- package/vue3/lib/node/{block-wrapper.ae2637e5.cjs → block-wrapper.3424c8e5.cjs} +1 -1
- package/vue3/lib/{browser/block-wrapper.f1e0d99f.js → node/block-wrapper.ac839834.js} +2 -2
- package/vue3/lib/{browser/component-ref.e2ad1f80.js → node/component-ref.8de03d1c.js} +2 -2
- package/vue3/lib/node/{component-ref.90060339.cjs → component-ref.96453075.cjs} +1 -1
- package/vue3/lib/node/components/block/components/block-styles.vue.d.ts +0 -1
- package/vue3/lib/node/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/node/functions/fetch-builder-props.d.ts +13 -0
- package/vue3/lib/node/{get-block-actions.9a71b975.cjs → get-block-actions.777560e5.cjs} +1 -1
- package/vue3/lib/node/{get-block-actions.05d2bf89.js → get-block-actions.e59fcd98.js} +1 -1
- package/vue3/lib/{browser/index.bb9d2170.js → node/index.12730bde.js} +358 -353
- package/vue3/lib/node/index.4cfec3cb.cjs +69 -0
- package/vue3/lib/node/index.cjs +1 -1
- package/vue3/lib/node/index.js +1 -1
- package/vue3/lib/{browser/repeated-block.6860cc5f.js → node/repeated-block.0bc816fe.js} +2 -2
- package/vue3/lib/node/{repeated-block.f7f28e2b.cjs → repeated-block.764b4af3.cjs} +1 -1
- package/vue3/lib/node/types/components.d.ts +0 -1
- package/vue2/lib/browser/block-styles-7b6133cb.js +0 -77
- package/vue2/lib/browser/block-styles-d210742a.cjs +0 -1
- package/vue2/lib/browser/enable-editor-4c0af531.cjs +0 -1
- package/vue2/lib/edge/block-styles-68308a10.js +0 -77
- package/vue2/lib/edge/block-styles-c081fccd.cjs +0 -1
- package/vue2/lib/edge/enable-editor-8c6fd5f2.cjs +0 -1
- package/vue2/lib/node/block-styles-7b6133cb.js +0 -77
- package/vue2/lib/node/block-styles-d210742a.cjs +0 -1
- package/vue2/lib/node/enable-editor-4c0af531.cjs +0 -1
- package/vue3/lib/browser/index.eed52cb2.cjs +0 -69
- package/vue3/lib/node/index.eed52cb2.cjs +0 -69
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as p } from "vue";
|
|
2
|
-
import { g as a } from "./get-processed-block-
|
|
3
|
-
import { e as m } from "./evaluate-
|
|
4
|
-
import { n as d } from "./index-
|
|
2
|
+
import { g as a } from "./get-processed-block-2c962134.js";
|
|
3
|
+
import { e as m } from "./evaluate-73ab20d5.js";
|
|
4
|
+
import { n as d } from "./index-35e9f8af.js";
|
|
5
5
|
function h(e) {
|
|
6
6
|
var t;
|
|
7
7
|
return {
|
|
@@ -68,22 +68,22 @@ const k = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen",
|
|
|
68
68
|
},
|
|
69
69
|
block: r
|
|
70
70
|
}));
|
|
71
|
-
}, C = () => import("./block-styles-
|
|
71
|
+
}, C = () => import("./block-styles-29c86145.js").then((e) => e.default).catch((e) => {
|
|
72
72
|
throw console.error(
|
|
73
73
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
74
74
|
e
|
|
75
75
|
), e;
|
|
76
|
-
}), S = () => import("./repeated-block-
|
|
76
|
+
}), S = () => import("./repeated-block-2b47cc10.js").then((e) => e.default).catch((e) => {
|
|
77
77
|
throw console.error(
|
|
78
78
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
79
79
|
e
|
|
80
80
|
), e;
|
|
81
|
-
}), g = () => import("./component-ref-
|
|
81
|
+
}), g = () => import("./component-ref-ad69c5c3.js").then((e) => e.default).catch((e) => {
|
|
82
82
|
throw console.error(
|
|
83
83
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
84
84
|
e
|
|
85
85
|
), e;
|
|
86
|
-
}), y = () => import("./block-wrapper-
|
|
86
|
+
}), y = () => import("./block-wrapper-68ce7a31.js").then((e) => e.default).catch((e) => {
|
|
87
87
|
throw console.error(
|
|
88
88
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
89
89
|
e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),a=require("./get-processed-block-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),a=require("./get-processed-block-f4410a90.cjs"),m=require("./evaluate-ddca0796.cjs"),d=require("./index-6d420ce4.cjs");function h(t){var e;return{...(e=t.component)==null?void 0:e.options,...t.options,builderBlock:t}}const u=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],k=t=>typeof t=="string"&&u.includes(t.toLowerCase()),b=({block:t,context:e,registeredComponents:o})=>{var c;const r=(c=a.getProcessedBlock({block:t,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,context:e.context,shouldEvaluateBindings:!1}).component)==null?void 0:c.name;if(!r)return null;const n=o[r];if(n)return n;console.warn(`
|
|
2
2
|
Could not find a registered component named "${r}".
|
|
3
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},f=({block:t,context:e})=>{const{repeat:o,...r}=t;if(!(o!=null&&o.collection))return;const n=m.evaluate({code:o.collection,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,context:e.context});if(!Array.isArray(n))return;const c=o.collection.split(".").pop(),s=o.itemName||(c?c+"Item":"item");return n.map((l,i)=>({context:{...e,localState:{...e.localState,$index:i,$item:l,[s]:l,[`$${s}Index`]:i}},block:r}))},C=()=>Promise.resolve().then(()=>require("./block-styles-
|
|
3
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},f=({block:t,context:e})=>{const{repeat:o,...r}=t;if(!(o!=null&&o.collection))return;const n=m.evaluate({code:o.collection,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,context:e.context});if(!Array.isArray(n))return;const c=o.collection.split(".").pop(),s=o.itemName||(c?c+"Item":"item");return n.map((l,i)=>({context:{...e,localState:{...e.localState,$index:i,$item:l,[s]:l,[`$${s}Index`]:i}},block:r}))},C=()=>Promise.resolve().then(()=>require("./block-styles-abd88aab.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",t),t}),S=()=>Promise.resolve().then(()=>require("./repeated-block-80cb7500.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",t),t}),g=()=>Promise.resolve().then(()=>require("./component-ref-314af75f.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",t),t}),y=()=>Promise.resolve().then(()=>require("./block-wrapper-9c4ec9d2.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",t),t}),B=p.defineComponent({name:"block",components:{"component-ref":g,"block-wrapper":y,"repeated-block":S,"block-styles":C},props:["block","context","registeredComponents"],data(){return{childrenContext:this.context,isEmptyHtmlElement:k}},computed:{blockComponent(){return b({block:this.block,context:this.context,registeredComponents:this.registeredComponents})},repeatItem(){return f({block:this.block,context:this.context})},processedBlock(){return this.repeatItem?this.block:a.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},Tag(){return this.block.tagName||"div"},canShowBlock(){return"hide"in this.processedBlock?!this.processedBlock.hide:"show"in this.processedBlock?this.processedBlock.show:!0},childrenWithoutParentComponent(){var e;return!((e=this.blockComponent)!=null&&e.component)&&!this.repeatItem?this.processedBlock.children??[]:[]},componentRefProps(){var t,e,o,r,n;return{blockChildren:this.processedBlock.children??[],componentRef:(t=this.blockComponent)==null?void 0:t.component,componentOptions:{...h(this.processedBlock),builderContext:this.context,...((e=this.blockComponent)==null?void 0:e.name)==="Symbol"||((o=this.blockComponent)==null?void 0:o.name)==="Columns"?{builderComponents:this.registeredComponents}:{}},context:this.childrenContext,registeredComponents:this.registeredComponents,builderBlock:this.processedBlock,includeBlockProps:((r=this.blockComponent)==null?void 0:r.noWrap)===!0,isInteractive:!((n=this.blockComponent)!=null&&n.isRSC)}}}});var x=function(){var r;var e=this,o=e._self._c;return e._self._setupProxy,(r=e.blockComponent)!=null&&r.noWrap&&e.canShowBlock?o("component-ref",e._b({},"component-ref",e.componentRefProps,!1)):e.isEmptyHtmlElement(e.Tag)&&e.canShowBlock?o("block-wrapper",{attrs:{Wrapper:e.Tag,block:e.processedBlock,context:e.context,hasChildren:!1}}):!e.isEmptyHtmlElement(e.Tag)&&e.repeatItem&&e.canShowBlock?o("div",{staticClass:"vue2-root-element-workaround"},e._l(e.repeatItem,function(n,c){return o("repeated-block",{key:c,attrs:{repeatContext:n.context,block:n.block,registeredComponents:e.registeredComponents}})}),1):e.canShowBlock?o("block-wrapper",{attrs:{Wrapper:e.Tag,block:e.processedBlock,context:e.context,hasChildren:!0}},[o("component-ref",e._b({},"component-ref",e.componentRefProps,!1)),e._l(e.childrenWithoutParentComponent,function(n,c){return o("block",{key:"block-"+n.id,attrs:{block:n,context:e.childrenContext,registeredComponents:e.registeredComponents}})}),e._l(e.childrenWithoutParentComponent,function(n,c){return o("block-styles",{key:"block-style-"+n.id,attrs:{block:n,context:e.childrenContext}})})],2):e._e()},v=[],_=d.normalizeComponent(B,x,v,!1,null,null,null,null);const w=_.exports;exports.default=w;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as y } from "vue";
|
|
2
|
+
import { T as f, c as m, g as x, a as d, n as _ } from "./index-35e9f8af.js";
|
|
3
|
+
import { g as u } from "./get-processed-block-2c962134.js";
|
|
4
|
+
import { c as n } from "./css-9ff60711.js";
|
|
5
|
+
import "./evaluate-73ab20d5.js";
|
|
6
|
+
const k = () => import("./inlined-styles-c977be7a.js").then((e) => e.default).catch((e) => {
|
|
7
|
+
throw console.error(
|
|
8
|
+
"Error while attempting to dynamically import component InlinedStyles at ../../inlined-styles.vue",
|
|
9
|
+
e
|
|
10
|
+
), e;
|
|
11
|
+
}), g = y({
|
|
12
|
+
name: "block-styles",
|
|
13
|
+
components: { "inlined-styles": k },
|
|
14
|
+
props: ["block", "context"],
|
|
15
|
+
data() {
|
|
16
|
+
return { TARGET: f };
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
canShowBlock() {
|
|
20
|
+
const e = u({
|
|
21
|
+
block: this.block,
|
|
22
|
+
localState: this.context.localState,
|
|
23
|
+
rootState: this.context.rootState,
|
|
24
|
+
rootSetState: this.context.rootSetState,
|
|
25
|
+
context: this.context.context,
|
|
26
|
+
shouldEvaluateBindings: !0
|
|
27
|
+
});
|
|
28
|
+
return m(e.hide) ? !e.hide : m(e.show) ? e.show : !0;
|
|
29
|
+
},
|
|
30
|
+
css() {
|
|
31
|
+
var i;
|
|
32
|
+
const e = u({
|
|
33
|
+
block: this.block,
|
|
34
|
+
localState: this.context.localState,
|
|
35
|
+
rootState: this.context.rootState,
|
|
36
|
+
rootSetState: this.context.rootSetState,
|
|
37
|
+
context: this.context.context,
|
|
38
|
+
shouldEvaluateBindings: !0
|
|
39
|
+
}), t = e.responsiveStyles, o = this.context.content, l = x(
|
|
40
|
+
((i = o == null ? void 0 : o.meta) == null ? void 0 : i.breakpoints) || {}
|
|
41
|
+
), c = t == null ? void 0 : t.large, a = t == null ? void 0 : t.medium, r = t == null ? void 0 : t.small, s = e.id;
|
|
42
|
+
if (!s)
|
|
43
|
+
return "";
|
|
44
|
+
const S = c ? n({
|
|
45
|
+
className: s,
|
|
46
|
+
styles: c
|
|
47
|
+
}) : "", h = a ? n({
|
|
48
|
+
className: s,
|
|
49
|
+
styles: a,
|
|
50
|
+
mediaQuery: d(
|
|
51
|
+
"medium",
|
|
52
|
+
l
|
|
53
|
+
)
|
|
54
|
+
}) : "", p = r ? n({
|
|
55
|
+
className: s,
|
|
56
|
+
styles: r,
|
|
57
|
+
mediaQuery: d(
|
|
58
|
+
"small",
|
|
59
|
+
l
|
|
60
|
+
)
|
|
61
|
+
}) : "";
|
|
62
|
+
return [S, h, p].join(" ");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
var v = function() {
|
|
67
|
+
var t = this, o = t._self._c;
|
|
68
|
+
return t._self._setupProxy, t.TARGET !== "reactNative" && t.css && t.canShowBlock ? o("inlined-styles", { attrs: { styles: t.css } }) : t._e();
|
|
69
|
+
}, B = [], b = /* @__PURE__ */ _(
|
|
70
|
+
g,
|
|
71
|
+
v,
|
|
72
|
+
B,
|
|
73
|
+
!1,
|
|
74
|
+
null,
|
|
75
|
+
null,
|
|
76
|
+
null,
|
|
77
|
+
null
|
|
78
|
+
);
|
|
79
|
+
const F = b.exports;
|
|
80
|
+
export {
|
|
81
|
+
F as default
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("vue"),s=require("./index-6d420ce4.cjs"),d=require("./get-processed-block-f4410a90.cjs"),c=require("./css-6ab3de61.cjs");require("./evaluate-ddca0796.cjs");const p=()=>Promise.resolve().then(()=>require("./inlined-styles-21a44abc.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../../inlined-styles.vue",t),t}),k=y.defineComponent({name:"block-styles",components:{"inlined-styles":p},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{canShowBlock(){const t=d.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return s.checkIsDefined(t.hide)?!t.hide:s.checkIsDefined(t.show)?t.show:!0},css(){var u;const t=d.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),e=t.responsiveStyles,o=this.context.content,r=s.getSizesForBreakpoints(((u=o==null?void 0:o.meta)==null?void 0:u.breakpoints)||{}),l=e==null?void 0:e.large,a=e==null?void 0:e.medium,i=e==null?void 0:e.small,n=t.id;if(!n)return"";const S=l?c.createCssClass({className:n,styles:l}):"",m=a?c.createCssClass({className:n,styles:a,mediaQuery:s.getMaxWidthQueryForSize("medium",r)}):"",h=i?c.createCssClass({className:n,styles:i,mediaQuery:s.getMaxWidthQueryForSize("small",r)}):"";return[S,m,h].join(" ")}}});var x=function(){var e=this,o=e._self._c;return e._self._setupProxy,e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?o("inlined-styles",{attrs:{styles:e.css}}):e._e()},_=[],f=s.normalizeComponent(k,x,_,!1,null,null,null,null);const g=f.exports;exports.default=g;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as e } from "vue";
|
|
2
|
-
import { g as r } from "./get-block-actions-
|
|
3
|
-
import { g as c } from "./get-block-properties-
|
|
4
|
-
import { n } from "./index-
|
|
5
|
-
import "./evaluate-
|
|
6
|
-
import "./css-
|
|
2
|
+
import { g as r } from "./get-block-actions-f0e194ec.js";
|
|
3
|
+
import { g as c } from "./get-block-properties-3266f9fa.js";
|
|
4
|
+
import { n } from "./index-35e9f8af.js";
|
|
5
|
+
import "./evaluate-73ab20d5.js";
|
|
6
|
+
import "./css-9ff60711.js";
|
|
7
7
|
const a = e({
|
|
8
8
|
name: "block-wrapper",
|
|
9
9
|
props: ["Wrapper", "block", "context", "hasChildren"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./get-block-actions-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./get-block-actions-d7bad2e7.cjs"),c=require("./get-block-properties-690c354d.cjs"),n=require("./index-6d420ce4.cjs");require("./evaluate-ddca0796.cjs");require("./css-6ab3de61.cjs");const l=o.defineComponent({name:"block-wrapper",props:["Wrapper","block","context","hasChildren"],data(){return{getBlockActions:r.getBlockActions,getBlockProperties:c.getBlockProperties}}});var a=function(){var t=this,e=t._self._c;return t._self._setupProxy,t.hasChildren?e(t.Wrapper,t._g(t._b({tag:"component"},"component",t.getBlockProperties({block:t.block,context:t.context}),!1),t.getBlockActions({block:t.block,rootState:t.context.rootState,rootSetState:t.context.rootSetState,localState:t.context.localState,context:t.context.context,stripPrefix:!0})),[t._t("default")],2):e(t.Wrapper,t._g(t._b({tag:"component"},"component",t.getBlockProperties({block:t.block,context:t.context}),!1),t.getBlockActions({block:t.block,rootState:t.context.rootState,rootSetState:t.context.rootSetState,localState:t.context.localState,context:t.context.context,stripPrefix:!0})))},s=[],i=n.normalizeComponent(l,a,s,!1,null,null,null,null);const p=i.exports;exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index-6d420ce4.cjs"),a=o.defineComponent({name:"builder-blocks-wrapper",props:["blocks","parent","path","styleProp"],computed:{className(){var t;return"builder-blocks"+((t=this.blocks)!=null&&t.length?"":" no-blocks")}},methods:{onClick(){var t,e;r.isEditing()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var t,e;r.isEditing()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const s=t.trim().split(/\s+/);for(const n of s)e[n]=!0;return e}}});var i=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("div",e._b({class:e._classStringToObject(e.className+" div-tqyw9m0iue"),style:e.styleProp,attrs:{"builder-path":e.path,"builder-parent-id":e.parent},on:{click:function(n){return e.onClick()},mouseenter:function(n){return e.onMouseEnter()},keypress:function(n){return e.onClick()}}},"div",{},!1),[e._t("default")],2)},l=[],c=r.normalizeComponent(a,i,l,!1,null,"a3106f07",null,null);const p=c.exports;exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),p=require("./get-block-properties-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),p=require("./get-block-properties-690c354d.cjs"),a=require("./index-6d420ce4.cjs");require("./css-6ab3de61.cjs");const m=t=>t,u=({componentOptions:t,builderBlock:e,context:n,componentRef:o,includeBlockProps:r,isInteractive:l,contextValue:i})=>l?{Wrapper:o,block:e,context:n,wrapperProps:t}:{...t,...r?{attributes:p.getBlockProperties({block:e,context:i})}:{}},d=()=>Promise.resolve().then(()=>require("./block-styles-abd88aab.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ../block-styles.vue",t),t}),k=()=>Promise.resolve().then(()=>require("./block-86374ead.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component Block at ../../block.vue",t),t}),c=()=>Promise.resolve().then(()=>require("./interactive-element-1b2efcea.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component InteractiveElement at ../interactive-element.vue",t),t}),f=s.defineComponent({name:"component-ref",components:{block:k,"block-styles":d,"interactive-element":c},props:["isInteractive","componentRef","componentOptions","builderBlock","context","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?m(c):this.componentRef,getWrapperProps:u}}});var v=function(){var e=this,n=e._self._c;return e._self._setupProxy,e.componentRef?n(e.Wrapper,e._b({tag:"component"},"component",e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),!1),[e._l(e.blockChildren,function(o,r){return n("block",{key:"block-"+o.id,attrs:{block:o,context:e.context,registeredComponents:e.registeredComponents}})}),e._l(e.blockChildren,function(o,r){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.context}})})],2):e._e()},b=[],_=a.normalizeComponent(f,v,b,!1,null,null,null,null);const h=_.exports;exports.default=h;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as p } from "vue";
|
|
2
|
-
import { g as s } from "./get-block-properties-
|
|
3
|
-
import { n as a } from "./index-
|
|
4
|
-
import "./css-
|
|
2
|
+
import { g as s } from "./get-block-properties-3266f9fa.js";
|
|
3
|
+
import { n as a } from "./index-35e9f8af.js";
|
|
4
|
+
import "./css-9ff60711.js";
|
|
5
5
|
const m = (t) => t, k = ({
|
|
6
6
|
componentOptions: t,
|
|
7
7
|
builderBlock: e,
|
|
@@ -27,17 +27,17 @@ const m = (t) => t, k = ({
|
|
|
27
27
|
context: i
|
|
28
28
|
})
|
|
29
29
|
} : {}
|
|
30
|
-
}, u = () => import("./block-styles-
|
|
30
|
+
}, u = () => import("./block-styles-29c86145.js").then((t) => t.default).catch((t) => {
|
|
31
31
|
throw console.error(
|
|
32
32
|
"Error while attempting to dynamically import component BlockStyles at ../block-styles.vue",
|
|
33
33
|
t
|
|
34
34
|
), t;
|
|
35
|
-
}), f = () => import("./block-
|
|
35
|
+
}), f = () => import("./block-517be5fb.js").then((t) => t.default).catch((t) => {
|
|
36
36
|
throw console.error(
|
|
37
37
|
"Error while attempting to dynamically import component Block at ../../block.vue",
|
|
38
38
|
t
|
|
39
39
|
), t;
|
|
40
|
-
}), c = () => import("./interactive-element-
|
|
40
|
+
}), c = () => import("./interactive-element-a457f13d.js").then((t) => t.default).catch((t) => {
|
|
41
41
|
throw console.error(
|
|
42
42
|
"Error while attempting to dynamically import component InteractiveElement at ../interactive-element.vue",
|
|
43
43
|
t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.6.
|
|
1
|
+
export declare const SDK_VERSION = "0.6.3";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p } from "vue";
|
|
2
|
-
import { n as u, i as y, b as x, B as v, C as S, F as _, I as T, S as I, d as C, e as w, V as k, h as F, j as f, s as g, T as R, k as E } from "./index-
|
|
2
|
+
import { n as u, i as y, b as x, B as v, C as S, F as _, I as T, S as I, d as C, e as w, V as k, h as F, j as f, s as g, T as R, k as E } from "./index-35e9f8af.js";
|
|
3
3
|
const V = {
|
|
4
4
|
name: "Core:Button",
|
|
5
5
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -786,22 +786,22 @@ const ae = ne.exports, oe = {
|
|
|
786
786
|
...t
|
|
787
787
|
},
|
|
788
788
|
meta: e == null ? void 0 : e.meta
|
|
789
|
-
} : void 0, se = () => import("./index-
|
|
789
|
+
} : void 0, se = () => import("./index-35e9f8af.js").then((e) => e.L).then((e) => e.default).catch((e) => {
|
|
790
790
|
throw console.error(
|
|
791
791
|
"Error while attempting to dynamically import component Blocks at ../blocks/blocks.vue",
|
|
792
792
|
e
|
|
793
793
|
), e;
|
|
794
|
-
}), le = () => import("./styles-
|
|
794
|
+
}), le = () => import("./styles-e7ee6699.js").then((e) => e.default).catch((e) => {
|
|
795
795
|
throw console.error(
|
|
796
796
|
"Error while attempting to dynamically import component ContentStyles at ./components/styles.vue",
|
|
797
797
|
e
|
|
798
798
|
), e;
|
|
799
|
-
}), ce = () => import("./enable-editor-
|
|
799
|
+
}), ce = () => import("./enable-editor-e4a75de2.js").then((e) => e.default).catch((e) => {
|
|
800
800
|
throw console.error(
|
|
801
801
|
"Error while attempting to dynamically import component EnableEditor at ./components/enable-editor.vue",
|
|
802
802
|
e
|
|
803
803
|
), e;
|
|
804
|
-
}), de = () => import("./inlined-script-
|
|
804
|
+
}), de = () => import("./inlined-script-9e201117.js").then((e) => e.default).catch((e) => {
|
|
805
805
|
throw console.error(
|
|
806
806
|
"Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",
|
|
807
807
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("./index-31b135ac.cjs"),g={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},b={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(r=>r.get("width"))&&(n.find(c=>!c.get("width"))||n.reduce((s,l)=>s+l.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},y={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},x={name:"Image",static:!0,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",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(o,s=6e4){return new Promise((l,d)=>{const p=document.createElement("img");let m=!1;p.onload=()=>{m=!0,l(p)},p.addEventListener("error",h=>{console.warn("Image load failed",h.error),d(h.error)}),p.src=o,setTimeout(()=>{m||d(new Error("Image load timed out"))},s)})}function a(o){return Math.round(o*1e3)/1e3}const r=e.get("image"),c=e.get("aspectRatio");if(fetch(r).then(o=>o.blob()).then(o=>{o.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!c||c===.7041))return n(r).then(o=>{const s=e.get("aspectRatio");e.get("image")===r&&(!s||s===.7041)&&o.width&&o.height&&(e.set("aspectRatio",a(o.height/o.width)),e.set("height",o.height),e.set("width",o.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},v={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},S={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},T={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},_={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},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",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},C={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},I=["text/javascript","application/javascript","application/ecmascript"],w=e=>I.includes(e.type),k=u.defineComponent({name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(w(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`Embed`: Error running script:",a)}}}}});var R=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:t._s(t.content)}})},F=[],E=i.normalizeComponent(k,R,F,!1,null,null,null,null);const V=E.exports,A=u.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:i.isEditing,filterAttrs:i.filterAttrs}}});var P=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("img",t._g(t._b({key:t.isEditing()&&t.imgSrc||"default-key",style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},attrs:{alt:t.altText,src:t.imgSrc||t.image}},"img",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)))},W=[],$=i.normalizeComponent(A,P,W,!1,null,null,null,null);const U=$.exports,j={name:"Raw:Img",hideFromInsertMenu:!0,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",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},z=u.defineComponent({name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`CustomCode`: Error running script:",a)}}}}},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const a of n)t[a]=!0;return t}}});var H=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",class:t._classStringToObject("builder-custom-code"+(t.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:t._s(t.code)}})},q=[],L=i.normalizeComponent(z,H,q,!1,null,null,null,null);const D=L.exports,N={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},f=()=>[{component:i.Button,...g},{component:i.Columns,...b},{component:D,...N},{component:V,...C},{component:i.Fragment,...y},{component:i.Image,...x},{component:U,...j},{component:i.Section,...v},{component:i.Symbol,...S},{component:i.Text,...T},{component:i.Video,..._}],M=({content:e,data:t,locale:n})=>{var c,o,s;const a={};(o=(c=e==null?void 0:e.data)==null?void 0:c.inputs)==null||o.forEach(l=>{var d;l.name&&l.defaultValue!==void 0&&((d=e==null?void 0:e.data)!=null&&d.state)&&e.data.state[l.name]===void 0&&(a[l.name]=l.defaultValue)});const r={...(s=e==null?void 0:e.data)==null?void 0:s.state,...t,...n?{locale:n}:{}};return{...a,...r}},B=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0,K=()=>Promise.resolve().then(()=>require("./index-31b135ac.cjs")).then(e=>e.blocks).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Blocks at ../blocks/blocks.vue",e),e}),O=()=>Promise.resolve().then(()=>require("./styles-1aad0890.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentStyles at ./components/styles.vue",e),e}),G=()=>Promise.resolve().then(()=>require("./enable-editor-4c0af531.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component EnableEditor at ./components/enable-editor.vue",e),e}),J=()=>Promise.resolve().then(()=>require("./inlined-script-395a54bf.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Y=u.defineComponent({name:"content-component",components:{"enable-editor":G,"inlined-script":J,"content-styles":O,blocks:K},props:["content","customComponents","data","locale","context","apiKey","apiVersion","model","canTrack","includeRefs","enrich","classNameProp","showContent","isSsrAbTest"],data(){var e,t;return{scriptStr:i.getRenderContentScriptString({variationId:(e=this.content)==null?void 0:e.testVariationId,contentId:(t=this.content)==null?void 0:t.id}),registeredComponents:[...f(),...i.components,...this.customComponents||[]].reduce((n,{component:a,...r})=>({...n,[r.name]:{component:a,...i.serializeComponentInfo(r)}}),{}),builderContextSignal:{content:B({content:this.content,data:this.data}),localState:void 0,rootState:M({content:this.content,data:this.data,locale:this.locale}),rootSetState:this.contentSetState,context:this.context||{},apiKey:this.apiKey,apiVersion:this.apiVersion,componentInfos:[...f(),...i.components,...this.customComponents||[]].reduce((n,{component:a,...r})=>({...n,[r.name]:i.serializeComponentInfo(r)}),{}),inheritedStyles:{}},TARGET:i.TARGET}},provide(){const e=this;return{[i.ComponentsContext.key]:{registeredComponents:e.registeredComponents}}},methods:{contentSetState(e){this.builderContextSignal.rootState=e}}});var X=function(){var a,r,c,o,s,l,d;var t=this,n=t._self._c;return t._self._setupProxy,n("enable-editor",t._b({attrs:{content:t.content,model:t.model,context:t.context,apiKey:t.apiKey,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,classNameProp:t.classNameProp,showContent:t.showContent,builderContextSignal:t.builderContextSignal}},"enable-editor",{},!1),[t.isSsrAbTest?[n("inlined-script",{attrs:{scriptStr:t.scriptStr}})]:t._e(),t.TARGET!=="reactNative"?[n("content-styles",{attrs:{contentId:(a=t.builderContextSignal.content)==null?void 0:a.id,cssCode:(c=(r=t.builderContextSignal.content)==null?void 0:r.data)==null?void 0:c.cssCode,customFonts:(s=(o=t.builderContextSignal.content)==null?void 0:o.data)==null?void 0:s.customFonts}})]:t._e(),n("blocks",{attrs:{blocks:(d=(l=t.builderContextSignal.content)==null?void 0:l.data)==null?void 0:d.blocks,context:t.builderContextSignal,registeredComponents:t.registeredComponents}})],2)},Q=[],Z=i.normalizeComponent(Y,X,Q,!1,null,null,null,null);const ee=Z.exports;exports.default=ee;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("./index-6d420ce4.cjs"),g={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},b={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(r=>r.get("width"))&&(n.find(c=>!c.get("width"))||n.reduce((s,l)=>s+l.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},y={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},x={name:"Image",static:!0,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",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(o,s=6e4){return new Promise((l,d)=>{const p=document.createElement("img");let m=!1;p.onload=()=>{m=!0,l(p)},p.addEventListener("error",h=>{console.warn("Image load failed",h.error),d(h.error)}),p.src=o,setTimeout(()=>{m||d(new Error("Image load timed out"))},s)})}function a(o){return Math.round(o*1e3)/1e3}const r=e.get("image"),c=e.get("aspectRatio");if(fetch(r).then(o=>o.blob()).then(o=>{o.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!c||c===.7041))return n(r).then(o=>{const s=e.get("aspectRatio");e.get("image")===r&&(!s||s===.7041)&&o.width&&o.height&&(e.set("aspectRatio",a(o.height/o.width)),e.set("height",o.height),e.set("width",o.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},v={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},S={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},T={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},_={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},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",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},C={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},I=["text/javascript","application/javascript","application/ecmascript"],w=e=>I.includes(e.type),k=u.defineComponent({name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(w(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`Embed`: Error running script:",a)}}}}});var R=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:t._s(t.content)}})},F=[],E=i.normalizeComponent(k,R,F,!1,null,null,null,null);const V=E.exports,A=u.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:i.isEditing,filterAttrs:i.filterAttrs}}});var P=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("img",t._g(t._b({key:t.isEditing()&&t.imgSrc||"default-key",style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},attrs:{alt:t.altText,src:t.imgSrc||t.image}},"img",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)))},W=[],$=i.normalizeComponent(A,P,W,!1,null,null,null,null);const U=$.exports,j={name:"Raw:Img",hideFromInsertMenu:!0,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",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},z=u.defineComponent({name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`CustomCode`: Error running script:",a)}}}}},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const a of n)t[a]=!0;return t}}});var H=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",class:t._classStringToObject("builder-custom-code"+(t.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:t._s(t.code)}})},q=[],L=i.normalizeComponent(z,H,q,!1,null,null,null,null);const D=L.exports,N={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},f=()=>[{component:i.Button,...g},{component:i.Columns,...b},{component:D,...N},{component:V,...C},{component:i.Fragment,...y},{component:i.Image,...x},{component:U,...j},{component:i.Section,...v},{component:i.Symbol,...S},{component:i.Text,...T},{component:i.Video,..._}],M=({content:e,data:t,locale:n})=>{var c,o,s;const a={};(o=(c=e==null?void 0:e.data)==null?void 0:c.inputs)==null||o.forEach(l=>{var d;l.name&&l.defaultValue!==void 0&&((d=e==null?void 0:e.data)!=null&&d.state)&&e.data.state[l.name]===void 0&&(a[l.name]=l.defaultValue)});const r={...(s=e==null?void 0:e.data)==null?void 0:s.state,...t,...n?{locale:n}:{}};return{...a,...r}},B=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0,K=()=>Promise.resolve().then(()=>require("./index-6d420ce4.cjs")).then(e=>e.blocks).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Blocks at ../blocks/blocks.vue",e),e}),O=()=>Promise.resolve().then(()=>require("./styles-48f7b053.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentStyles at ./components/styles.vue",e),e}),G=()=>Promise.resolve().then(()=>require("./enable-editor-3ae81c32.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component EnableEditor at ./components/enable-editor.vue",e),e}),J=()=>Promise.resolve().then(()=>require("./inlined-script-fd0e31a3.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Y=u.defineComponent({name:"content-component",components:{"enable-editor":G,"inlined-script":J,"content-styles":O,blocks:K},props:["content","customComponents","data","locale","context","apiKey","apiVersion","model","canTrack","includeRefs","enrich","classNameProp","showContent","isSsrAbTest"],data(){var e,t;return{scriptStr:i.getRenderContentScriptString({variationId:(e=this.content)==null?void 0:e.testVariationId,contentId:(t=this.content)==null?void 0:t.id}),registeredComponents:[...f(),...i.components,...this.customComponents||[]].reduce((n,{component:a,...r})=>({...n,[r.name]:{component:a,...i.serializeComponentInfo(r)}}),{}),builderContextSignal:{content:B({content:this.content,data:this.data}),localState:void 0,rootState:M({content:this.content,data:this.data,locale:this.locale}),rootSetState:this.contentSetState,context:this.context||{},apiKey:this.apiKey,apiVersion:this.apiVersion,componentInfos:[...f(),...i.components,...this.customComponents||[]].reduce((n,{component:a,...r})=>({...n,[r.name]:i.serializeComponentInfo(r)}),{}),inheritedStyles:{}},TARGET:i.TARGET}},provide(){const e=this;return{[i.ComponentsContext.key]:{registeredComponents:e.registeredComponents}}},methods:{contentSetState(e){this.builderContextSignal.rootState=e}}});var X=function(){var a,r,c,o,s,l,d;var t=this,n=t._self._c;return t._self._setupProxy,n("enable-editor",t._b({attrs:{content:t.content,model:t.model,context:t.context,apiKey:t.apiKey,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,classNameProp:t.classNameProp,showContent:t.showContent,builderContextSignal:t.builderContextSignal}},"enable-editor",{},!1),[t.isSsrAbTest?[n("inlined-script",{attrs:{scriptStr:t.scriptStr}})]:t._e(),t.TARGET!=="reactNative"?[n("content-styles",{attrs:{contentId:(a=t.builderContextSignal.content)==null?void 0:a.id,cssCode:(c=(r=t.builderContextSignal.content)==null?void 0:r.data)==null?void 0:c.cssCode,customFonts:(s=(o=t.builderContextSignal.content)==null?void 0:o.data)==null?void 0:s.customFonts}})]:t._e(),n("blocks",{attrs:{blocks:(d=(l=t.builderContextSignal.content)==null?void 0:l.data)==null?void 0:d.blocks,context:t.builderContextSignal,registeredComponents:t.registeredComponents}})],2)},Q=[],Z=i.normalizeComponent(Y,X,Q,!1,null,null,null,null);const ee=Z.exports;exports.default=ee;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const n=require("./index-
|
|
1
|
+
"use strict";const n=require("./index-6d420ce4.cjs"),o=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),c=e=>Object.entries(e).map(([r,s])=>{if(typeof s=="string")return`${o(r)}: ${s};`}).filter(n.checkIsDefined),a=e=>c(e).join(`
|
|
2
2
|
`),i=({mediaQuery:e,className:t,styles:r})=>{const s=`.${t} {
|
|
3
3
|
${a(r)}
|
|
4
4
|
}`;return e?`${e} {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as o } from "./index-
|
|
1
|
+
import { c as o } from "./index-35e9f8af.js";
|
|
2
2
|
const c = (s) => s.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), n = (s) => Object.entries(s).map(([r, e]) => {
|
|
3
3
|
if (typeof e == "string")
|
|
4
4
|
return `${c(r)}: ${e};`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("vue"),p=require("./evaluate-ddca0796.cjs"),s=require("./index-6d420ce4.cjs"),v="0.6.3",x=()=>{s.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let m=!1;const k=(n={})=>{var e,t;m||(m=!0,s.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:s.TARGET,version:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(t=window.parent)==null||t.postMessage({type:"builder.updateContent",data:{options:n}},"*"),window.addEventListener("message",({data:i})=>{var o,a;if(i!=null&&i.type)switch(i.type){case"builder.evaluate":{const r=i.data.text,b=i.data.arguments||[],c=i.data.id,S=new Function(r);let d,l=null;try{d=S.apply(null,b)}catch(u){l=u}l?(o=window.parent)==null||o.postMessage({type:"builder.evaluateError",data:{id:c,error:l.message}},"*"):d&&typeof d.then=="function"?d.then(u=>{var h;(h=window.parent)==null||h.postMessage({type:"builder.evaluateResult",data:{id:c,result:u}},"*")}).catch(console.error):(a=window.parent)==null||a.postMessage({type:"builder.evaluateResult",data:{result:d,id:c}},"*");break}}})))};function f(n){return Math.round(n*1e3)/1e3}const R=(n,e,t=!0)=>{if(!(n instanceof HTMLElement))return null;let i=t?n:n.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},y=n=>R(n,e=>{const t=e.getAttribute("builder-id")||e.id;return(t==null?void 0:t.indexOf("builder-"))===0}),g=({event:n,target:e})=>{const t=e.getBoundingClientRect(),i=n.clientX-t.left,o=n.clientY-t.top,a=f(i/t.width),r=f(o/t.height);return{x:a,y:r}},w=n=>{const e=n.target,t=e&&y(e),i=(t==null?void 0:t.getAttribute("builder-id"))||(t==null?void 0:t.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?g({event:n,target:e}):void 0,builderTargetOffset:t?g({event:n,target:t}):void 0,builderElementIndex:t&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(t):void 0}}},E=C.defineComponent({name:"enable-editor",props:["canTrack","builderContextSignal","model","context","apiKey","showContent","classNameProp","content","locale","includeRefs","enrich"],data(){return{canTrackToUse:s.checkIsDefined(this.canTrack)?this.canTrack:!0,forceReRenderCount:0,lastUpdated:0,shouldSendResetCookie:!1,httpReqsData:{},clicked:!1,builderContext:s.builderContext}},provide(){const n=this;return{[s.builderContext.key]:n.builderContextSignal}},mounted(){var n,e;if(this.apiKey||s.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),s.isBrowser()){if(s.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,window.addEventListener("message",this.processMessage),x(),k({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.componentInfos).forEach(t=>{var o;const i=s.createRegisterComponentMessage(t);(o=window.parent)==null||o.postMessage(i,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const t=(n=this.builderContextSignal.content)==null?void 0:n.testVariationId,i=(e=this.builderContextSignal.content)==null?void 0:e.id;s._track({type:"impression",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:t!==i?t:void 0})}if(s.isPreviewing()){const t=new URL(location.href).searchParams,i=t.get("builder.preview"),o=t.get(`builder.preview.${i}`),a=t.get("apiKey")||t.get("builder.space");i===this.model&&a===this.apiKey&&(!this.content||o===this.content.id)&&s.fetchOneEntry({model:this.model,apiKey:this.apiKey,apiVersion:this.builderContextSignal.apiVersion}).then(r=>{r&&this.mergeNewContent(r)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){},immediate:!0},onUpdateHook2:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook3:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook4:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){s.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){return{0:this.shouldSendResetCookie}},onUpdateHook2(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook3(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.httpRequests}},onUpdateHook4(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(n){var t,i,o,a,r;const e={...this.builderContextSignal.content,...n,data:{...(t=this.builderContextSignal.content)==null?void 0:t.data,...n==null?void 0:n.data},meta:{...(i=this.builderContextSignal.content)==null?void 0:i.meta,...n==null?void 0:n.meta,breakpoints:((o=n==null?void 0:n.meta)==null?void 0:o.breakpoints)||((r=(a=this.builderContextSignal.content)==null?void 0:a.meta)==null?void 0:r.breakpoints)}};this.builderContextSignal.content=e},processMessage(n){var t;const{data:e}=n;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:o,contentId:a}=i;if(!a||a!==((t=this.builderContextSignal.content)==null?void 0:t.id))return;o&&this.mergeNewContent({meta:{breakpoints:o}}),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,o=i.key||i.alias||i.entry||i.modelName,a=i.data;o===this.model&&(this.mergeNewContent(a),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,t;const n=(t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.jsCode;n&&p.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState})},onClick(n){var e,t;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,o=(t=this.builderContextSignal.content)==null?void 0:t.id;s._track({type:"click",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:i!==o?i:void 0,...w(n),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(n){return n.replace(/{{([^}]+)}}/g,(e,t)=>p.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState}))},handleRequest({url:n,key:e}){s.fetch(n).then(t=>t.json()).then(t=>{var o,a;const i={...this.builderContextSignal.rootState,[e]:t};(a=(o=this.builderContextSignal).rootSetState)==null||a.call(o,i),this.httpReqsData[e]=!0}).catch(t=>{console.error("error fetching dynamic data",n,t)})},runHttpRequests(){var e,t;const n=((t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.httpRequests)??{};Object.entries(n).forEach(([i,o])=>{if(o&&(!this.httpReqsData[i]||s.isEditing())){const a=this.evalExpression(o);this.handleRequest({url:a,key:i})}})},emitStateUpdate(){s.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:s.fastClone(this.builderContextSignal.rootState),ref:{name:this.model}}}))},_classStringToObject(n){const e={};if(typeof n!="string")return e;const t=n.trim().split(/\s+/);for(const i of t)e[i]=!0;return e}}});var _=function(){var i;var e=this,t=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?t("div",e._b({key:e.forceReRenderCount,ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(o){return e.onClick(o)}}},"div",{...e.showContent?{}:{hidden:!0,"aria-hidden":!0}},!1),[e._t("default")],2):e._e()},U=[],I=s.normalizeComponent(E,_,U,!1,null,null,null,null);const T=I.exports;exports.default=T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as k } from "vue";
|
|
2
|
-
import { e as m } from "./evaluate-
|
|
3
|
-
import { r as R, m as h, T as y, c as w, l as f, o as _, i as u, p as E, _ as g, q as U, t as I, u as T, f as P, n as M } from "./index-
|
|
4
|
-
const H = "0.6.
|
|
2
|
+
import { e as m } from "./evaluate-73ab20d5.js";
|
|
3
|
+
import { r as R, m as h, T as y, c as w, l as f, o as _, i as u, p as E, _ as g, q as U, t as I, u as T, f as P, n as M } from "./index-35e9f8af.js";
|
|
4
|
+
const H = "0.6.3", q = () => {
|
|
5
5
|
R("insertMenu", {
|
|
6
6
|
name: "_default",
|
|
7
7
|
default: !0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./index-
|
|
1
|
+
"use strict";const t=require("./index-6d420ce4.cjs"),d=({builder:r,context:n,event:s,state:i})=>Object.entries({state:i,Builder:r,builder:r,context:n,event:s}),f=({code:r,builder:n,context:s,event:i,localState:e,rootSetState:u,rootState:o})=>{const g=d({builder:n,context:s,event:i,state:l(o,e,u)});return new Function(...g.map(([c])=>c),r)(...g.map(([,c])=>c))};function l(r,n,s){if(r===n)throw new Error("rootState === localState");return new Proxy(r,{get:(i,e)=>n&&e in n?n[e]:r[e],set:(i,e,u)=>{if(n&&e in n)throw new Error("Writing to local state is not allowed as it is read-only.");return r[e]=u,s==null||s(r),!0}})}function m({code:r,context:n,localState:s,rootState:i,rootSetState:e,event:u,isExpression:o=!0}){if(r===""){t.logger.warn("Skipping evaluation of empty code block.");return}const g={isEditing:t.isEditing(),isBrowser:t.isBrowser(),isServer:!t.isBrowser(),getUserAttributes:()=>t.getUserAttributes()},w={code:o&&!(r.includes(";")||r.includes(" return ")||r.trim().startsWith("return "))?`return (${r});`:r,builder:g,context:n,event:u,rootSetState:e,rootState:i,localState:s};try{return f(w)}catch(a){t.logger.error("Failed code evaluation: "+a.message,{code:r});return}}exports.evaluate=m;
|
|
@@ -35,6 +35,19 @@ type GetBuilderPropsOptions = (Omit<GetContentOptions, 'model'> & {
|
|
|
35
35
|
/**
|
|
36
36
|
* Given an `apiKey` and `url` (or `path` + `searchParams`), provides all props that `Content` needs to render Builder Content.
|
|
37
37
|
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```jsx
|
|
40
|
+
* const builderProps = await fetchBuilderProps({
|
|
41
|
+
* apiKey: 'API_KEY',
|
|
42
|
+
* // provide `url`
|
|
43
|
+
* url: yourPageUrl,
|
|
44
|
+
* // OR provide `path` + `searchParams`
|
|
45
|
+
* path: yourPath,
|
|
46
|
+
* searchParams: yourSearchParams,
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
* return <Content {...builderProps} />;
|
|
50
|
+
* ```
|
|
38
51
|
*/
|
|
39
52
|
export declare const fetchBuilderProps: (_args: GetBuilderPropsOptions) => Promise<ContentVariantsPrps>;
|
|
40
53
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./index-
|
|
1
|
+
"use strict";const r=require("./index-6d420ce4.cjs"),s=require("./evaluate-ddca0796.cjs"),l=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>o=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1});function u(e){const t={},o=e.block.actions??{};for(const c in o){if(!o.hasOwnProperty(c))continue;const n=o[c];let a=l(c);if(e.stripPrefix)switch(r.TARGET){case"vue2":case"vue3":a=a.replace("v-on:","");break;case"svelte":a=a.replace("on:","");break}t[a]=i(n,e)}return t}exports.getBlockActions=u;
|
package/vue2/lib/{node/get-block-actions-2147e6cd.js → browser/get-block-actions-f0e194ec.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as n } from "./index-
|
|
2
|
-
import { e as s } from "./evaluate-
|
|
1
|
+
import { T as n } from "./index-35e9f8af.js";
|
|
2
|
+
import { e as s } from "./evaluate-73ab20d5.js";
|
|
3
3
|
const l = (e) => `v-on:${e.toLowerCase()}`, i = (e, t) => (o) => s({
|
|
4
4
|
code: e,
|
|
5
5
|
context: t.context,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("./index-
|
|
1
|
+
"use strict";const c=require("./index-6d420ce4.cjs"),n=require("./css-6ab3de61.cjs");function i(e){const t={};if(typeof e!="string")return t;const s=e.trim().split(/\\s+/);for(const r of s)t[r]=!0;return t}function o(e){return e.class=i(e.class),e}const a=e=>({href:e.href});function u({block:e,context:t}){var r;const s={...a(e),...e.properties,"builder-id":e.id,style:e.style?l(e.style):void 0,class:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return o(s)}function l(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return n.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}exports.getBlockProperties=u;
|
package/vue2/lib/browser/{get-processed-block-15b0d499.cjs → get-processed-block-f4410a90.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const d=require("./evaluate-
|
|
1
|
+
"use strict";const d=require("./evaluate-ddca0796.cjs"),g=require("./index-6d420ce4.cjs"),f=(e,i,o)=>{if(Object(e)!==e)return e;const t=Array.isArray(i)?i:i.toString().match(/[^.[\]]+/g);return t.slice(0,-1).reduce((r,n,s)=>Object(r[n])===r[n]?r[n]:r[n]=Math.abs(Number(t[s+1]))>>0===+t[s+1]?[]:{},e)[t[t.length-1]]=o,e};const l=({block:e,context:i,localState:o,rootState:t,rootSetState:r})=>{if(!e.bindings)return e;const n=g.fastClone(e),s={...n,properties:{...n.properties},actions:{...n.actions}};for(const c in e.bindings){const u=e.bindings[c],a=d.evaluate({code:u,localState:o,rootState:t,rootSetState:r,context:i});f(s,c,a)}return s};function p({block:e,context:i,shouldEvaluateBindings:o,localState:t,rootState:r,rootSetState:n}){const s=e;return o?l({block:s,localState:t,rootState:r,rootSetState:n,context:i}):s}exports.getProcessedBlock=p;
|