@builder.io/sdk-vue 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -4
- package/package.json +1 -1
- package/vue2/lib/browser/{block-9d4161fb.cjs → block-8eb8a717.cjs} +2 -2
- package/vue2/lib/{edge/block-c6f466c0.js → browser/block-f46a2e5f.js} +7 -7
- package/vue2/lib/{node/block-styles-b947dfc5.js → browser/block-styles-5d933df0.js} +5 -5
- package/vue2/lib/{node/block-styles-c4974a44.cjs → browser/block-styles-c36b606c.cjs} +1 -1
- package/vue2/lib/browser/{block-wrapper-0d4fe902.js → block-wrapper-9032b3aa.js} +5 -5
- package/vue2/lib/browser/{block-wrapper-3157e1bc.cjs → block-wrapper-e68eb3ce.cjs} +1 -1
- package/vue2/lib/browser/blocks-wrapper-13a20963.js +74 -0
- package/vue2/lib/browser/blocks-wrapper-233d7a58.cjs +1 -0
- package/vue2/lib/{node/component-ref-7f93a1f0.cjs → browser/component-ref-3eabf9d3.cjs} +1 -1
- package/vue2/lib/{edge/component-ref-b3b70fa9.js → browser/component-ref-aff72404.js} +6 -6
- package/vue2/lib/browser/components/block/components/component-ref/component-ref.helpers.d.ts +1 -3
- package/vue2/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +1 -3
- package/vue2/lib/browser/components/blocks/blocks-wrapper.vue.d.ts +14 -0
- package/vue2/lib/browser/components/blocks/blocks.vue.d.ts +1 -1
- package/vue2/lib/browser/components/content/components/enable-editor.vue.d.ts +3 -0
- package/vue2/lib/browser/components/content/content.vue.d.ts +2 -0
- package/vue2/lib/browser/components/content-variants/content-variants.types.d.ts +16 -0
- package/vue2/lib/browser/components/content-variants/content-variants.vue.d.ts +12 -0
- package/vue2/lib/browser/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/browser/{content-0575efdf.cjs → content-01c5295f.cjs} +1 -1
- package/vue2/lib/{edge/content-90700d7e.js → browser/content-5ff1bf50.js} +29 -23
- package/vue2/lib/browser/context/builder.context.d.ts +2 -0
- package/vue2/lib/browser/context/types.d.ts +2 -1
- package/vue2/lib/{node/css-97122c97.js → browser/css-0e1a5906.js} +1 -1
- package/vue2/lib/browser/{css-9cb1ef7e.cjs → css-8f0dfb3a.cjs} +1 -1
- package/vue2/lib/browser/enable-editor-79943def.cjs +1 -0
- package/vue2/lib/browser/{enable-editor-c377a256.js → enable-editor-ba199201.js} +25 -27
- package/vue2/lib/browser/{evaluate-2857c518.js → evaluate-c7aac0ee.js} +1 -1
- package/vue2/lib/browser/{evaluate-5a5f1e1a.cjs → evaluate-ec382d17.cjs} +1 -1
- package/vue2/lib/browser/functions/get-block-properties.d.ts +1 -1
- package/vue2/lib/browser/functions/transform-block-properties.d.ts +5 -2
- package/vue2/lib/browser/{get-block-actions-797d49a2.cjs → get-block-actions-34f93bab.cjs} +1 -1
- package/vue2/lib/{edge/get-block-actions-a4c6a740.js → browser/get-block-actions-80d8a41d.js} +2 -2
- package/vue2/lib/browser/{get-block-properties-eb393578.js → get-block-properties-b80c51fd.js} +10 -4
- package/vue2/lib/browser/get-block-properties-fcbe86d3.cjs +1 -0
- package/vue2/lib/browser/{get-processed-block-d2849656.js → get-processed-block-08346ffe.js} +2 -2
- package/vue2/lib/browser/{get-processed-block-e9eb76d5.cjs → get-processed-block-bb410f6f.cjs} +1 -1
- package/vue2/lib/{node/index-f82ca488.cjs → browser/index-4d603d94.cjs} +7 -7
- package/vue2/lib/{edge/index-22fb0dfe.js → browser/index-d4551a7a.js} +110 -103
- package/vue2/lib/browser/index-helpers/blocks-exports.d.ts +12 -0
- package/vue2/lib/browser/index.cjs +1 -1
- package/vue2/lib/browser/index.js +1 -1
- package/vue2/lib/{edge/inlined-script-f5a56ea4.js → browser/inlined-script-18dd0beb.js} +1 -1
- package/vue2/lib/browser/{inlined-script-166d99c7.cjs → inlined-script-ff6b73ba.cjs} +1 -1
- package/vue2/lib/browser/{inlined-styles-4c4a89e2.cjs → inlined-styles-3c12a021.cjs} +1 -1
- package/vue2/lib/{node/inlined-styles-4fa88e65.js → browser/inlined-styles-b687d7f1.js} +1 -1
- package/vue2/lib/{node/interactive-element-f08c324e.cjs → browser/interactive-element-52eda23c.cjs} +1 -1
- package/vue2/lib/{node/interactive-element-f46aae31.js → browser/interactive-element-91f198a4.js} +5 -5
- package/vue2/lib/{node/repeated-block-fe5a6df8.js → browser/repeated-block-6a55f793.js} +2 -2
- package/vue2/lib/{node/repeated-block-5d832619.cjs → browser/repeated-block-956e883f.cjs} +1 -1
- package/vue2/lib/browser/style.css +1 -1
- package/vue2/lib/browser/{styles-3945b4c7.js → styles-36c9fddb.js} +2 -2
- package/vue2/lib/{node/styles-85761eb4.cjs → browser/styles-8dc5678c.cjs} +2 -2
- package/vue2/lib/browser/types/enforced-partials.d.ts +7 -2
- package/vue2/lib/{browser/block-f5679152.js → edge/block-3d9fb7c2.js} +7 -7
- package/vue2/lib/{node/block-f9029bc3.cjs → edge/block-f15be379.cjs} +2 -2
- package/vue2/lib/edge/{block-styles-37805084.js → block-styles-8d163d7c.js} +5 -5
- package/vue2/lib/edge/{block-styles-adc484c6.cjs → block-styles-b8533af9.cjs} +1 -1
- package/vue2/lib/{node/block-wrapper-04b443cd.js → edge/block-wrapper-5c00ae5e.js} +5 -5
- package/vue2/lib/{node/block-wrapper-8ba974d4.cjs → edge/block-wrapper-aaa3ed0e.cjs} +1 -1
- package/vue2/lib/edge/blocks-wrapper-61df90f4.js +74 -0
- package/vue2/lib/edge/blocks-wrapper-69c07fcc.cjs +1 -0
- package/vue2/lib/{browser/component-ref-c51b0a20.cjs → edge/component-ref-0f3a0ba1.cjs} +1 -1
- package/vue2/lib/{node/component-ref-5f0d480f.js → edge/component-ref-193f3231.js} +6 -6
- package/vue2/lib/edge/components/block/components/component-ref/component-ref.helpers.d.ts +1 -3
- package/vue2/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +1 -3
- package/vue2/lib/edge/components/blocks/blocks-wrapper.vue.d.ts +14 -0
- package/vue2/lib/edge/components/blocks/blocks.vue.d.ts +1 -1
- package/vue2/lib/edge/components/content/components/enable-editor.vue.d.ts +3 -0
- package/vue2/lib/edge/components/content/content.vue.d.ts +2 -0
- package/vue2/lib/edge/components/content-variants/content-variants.types.d.ts +16 -0
- package/vue2/lib/edge/components/content-variants/content-variants.vue.d.ts +12 -0
- package/vue2/lib/edge/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/{browser/content-84bda2e9.js → edge/content-0e433688.js} +29 -23
- package/vue2/lib/{node/content-a860398a.cjs → edge/content-deb91a9b.cjs} +1 -1
- package/vue2/lib/edge/context/builder.context.d.ts +2 -0
- package/vue2/lib/edge/context/types.d.ts +2 -1
- package/vue2/lib/{browser/css-bdeda4e4.js → edge/css-81e2e40c.js} +1 -1
- package/vue2/lib/{node/css-fb2674c8.cjs → edge/css-a72ded40.cjs} +1 -1
- package/vue2/lib/edge/enable-editor-27dc580b.cjs +1 -0
- package/vue2/lib/{node/enable-editor-df62e3bf.js → edge/enable-editor-cd9aa0aa.js} +25 -27
- package/vue2/lib/edge/{evaluate-4bd2a851.cjs → evaluate-128da0ac.cjs} +1 -1
- package/vue2/lib/edge/{evaluate-2a5e2028.js → evaluate-8d0bbfbd.js} +1 -1
- package/vue2/lib/edge/functions/get-block-properties.d.ts +1 -1
- package/vue2/lib/edge/functions/transform-block-properties.d.ts +5 -2
- package/vue2/lib/edge/{get-block-actions-84b02e58.cjs → get-block-actions-1b4a42bd.cjs} +1 -1
- package/vue2/lib/{node/get-block-actions-035815cd.js → edge/get-block-actions-b804a4ed.js} +2 -2
- package/vue2/lib/{node/get-block-properties-b3de78f4.js → edge/get-block-properties-248979b7.js} +10 -4
- package/vue2/lib/edge/get-block-properties-91cdf9bd.cjs +1 -0
- package/vue2/lib/edge/{get-processed-block-8f70184a.cjs → get-processed-block-08d699f0.cjs} +1 -1
- package/vue2/lib/{node/get-processed-block-e16b5f0b.js → edge/get-processed-block-9ad00b6e.js} +2 -2
- package/vue2/lib/{browser/index-1fdc0dd8.js → edge/index-23a8bb60.js} +110 -103
- package/vue2/lib/edge/{index-cf208007.cjs → index-4db92fa7.cjs} +7 -7
- package/vue2/lib/edge/index-helpers/blocks-exports.d.ts +12 -0
- package/vue2/lib/edge/index.cjs +1 -1
- package/vue2/lib/edge/index.js +1 -1
- package/vue2/lib/{node/inlined-script-a6f84120.js → edge/inlined-script-3796a498.js} +1 -1
- package/vue2/lib/edge/{inlined-script-f460fc92.cjs → inlined-script-e880446d.cjs} +1 -1
- package/vue2/lib/edge/{inlined-styles-ea805c3d.js → inlined-styles-ae4fbc9f.js} +1 -1
- package/vue2/lib/edge/{inlined-styles-c9c77496.cjs → inlined-styles-ae989bfa.cjs} +1 -1
- package/vue2/lib/{browser/interactive-element-f3bc9b6c.js → edge/interactive-element-4613d798.js} +5 -5
- package/vue2/lib/edge/{interactive-element-d909635d.cjs → interactive-element-e0de8a75.cjs} +1 -1
- package/vue2/lib/{browser/repeated-block-8c6f0ef0.cjs → edge/repeated-block-061a93e5.cjs} +1 -1
- package/vue2/lib/{browser/repeated-block-59ab7fe5.js → edge/repeated-block-277f2b40.js} +2 -2
- package/vue2/lib/edge/style.css +1 -1
- package/vue2/lib/{browser/styles-0fbadb80.cjs → edge/styles-290ae837.cjs} +2 -2
- package/vue2/lib/edge/{styles-8840ca47.js → styles-cca4b08e.js} +2 -2
- package/vue2/lib/edge/types/enforced-partials.d.ts +7 -2
- package/vue2/lib/node/{block-6dc57ba5.js → block-88d3d176.js} +7 -7
- package/vue2/lib/{edge/block-03548c5c.cjs → node/block-b586205d.cjs} +2 -2
- package/vue2/lib/{browser/block-styles-b76b4562.cjs → node/block-styles-471fd00b.cjs} +1 -1
- package/vue2/lib/{browser/block-styles-6ca785bb.js → node/block-styles-aba16bf4.js} +5 -5
- package/vue2/lib/{edge/block-wrapper-ff8027da.cjs → node/block-wrapper-c76e2259.cjs} +1 -1
- package/vue2/lib/{edge/block-wrapper-1d75af67.js → node/block-wrapper-d1dab513.js} +5 -5
- package/vue2/lib/node/blocks-wrapper-6dd528c4.js +74 -0
- package/vue2/lib/node/blocks-wrapper-9abf97bd.cjs +1 -0
- package/vue2/lib/{edge/component-ref-fc9c9d6b.cjs → node/component-ref-08e79b50.cjs} +1 -1
- package/vue2/lib/{browser/component-ref-d59047de.js → node/component-ref-3ee361bc.js} +6 -6
- package/vue2/lib/node/components/block/components/component-ref/component-ref.helpers.d.ts +1 -3
- package/vue2/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +1 -3
- package/vue2/lib/node/components/blocks/blocks-wrapper.vue.d.ts +14 -0
- package/vue2/lib/node/components/blocks/blocks.vue.d.ts +1 -1
- package/vue2/lib/node/components/content/components/enable-editor.vue.d.ts +3 -0
- package/vue2/lib/node/components/content/content.vue.d.ts +2 -0
- package/vue2/lib/node/components/content-variants/content-variants.types.d.ts +16 -0
- package/vue2/lib/node/components/content-variants/content-variants.vue.d.ts +12 -0
- package/vue2/lib/node/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/node/{content-b604b895.js → content-3d542f91.js} +29 -23
- package/vue2/lib/{edge/content-e5850b95.cjs → node/content-d8091f69.cjs} +1 -1
- package/vue2/lib/node/context/builder.context.d.ts +2 -0
- package/vue2/lib/node/context/types.d.ts +2 -1
- package/vue2/lib/{edge/css-5dcb14df.cjs → node/css-f88973d9.cjs} +1 -1
- package/vue2/lib/{edge/css-99493b5d.js → node/css-fc678131.js} +1 -1
- package/vue2/lib/{edge/enable-editor-81a0ad6d.js → node/enable-editor-7a3fcc5f.js} +25 -27
- package/vue2/lib/node/enable-editor-85e730f9.cjs +1 -0
- package/vue2/lib/node/{evaluate-44daeb3b.cjs → evaluate-10e29303.cjs} +1 -1
- package/vue2/lib/node/{evaluate-b86af327.js → evaluate-e38e24b8.js} +24 -23
- package/vue2/lib/node/functions/get-block-properties.d.ts +1 -1
- package/vue2/lib/node/functions/transform-block-properties.d.ts +5 -2
- package/vue2/lib/{browser/get-block-actions-6774e2de.js → node/get-block-actions-8c081856.js} +2 -2
- package/vue2/lib/node/{get-block-actions-0c98c4e4.cjs → get-block-actions-ac6479e1.cjs} +1 -1
- package/vue2/lib/{edge/get-block-properties-450803e5.js → node/get-block-properties-2a5dbda8.js} +10 -4
- package/vue2/lib/node/get-block-properties-81e3699e.cjs +1 -0
- package/vue2/lib/{edge/get-processed-block-1d7ecd6a.js → node/get-processed-block-ebacd599.js} +2 -2
- package/vue2/lib/node/{get-processed-block-34d0880b.cjs → get-processed-block-ebf5f46b.cjs} +1 -1
- package/vue2/lib/{browser/index-e56cba6d.cjs → node/index-d62c9232.cjs} +7 -7
- package/vue2/lib/node/{index-04eac5bd.js → index-ef12824d.js} +110 -103
- package/vue2/lib/node/index-helpers/blocks-exports.d.ts +12 -0
- package/vue2/lib/node/index.cjs +1 -1
- package/vue2/lib/node/index.js +1 -1
- package/vue2/lib/{browser/inlined-script-0fd7eea7.js → node/inlined-script-1cd578e5.js} +1 -1
- package/vue2/lib/node/{inlined-script-3d1617fb.cjs → inlined-script-88b1aa3e.cjs} +1 -1
- package/vue2/lib/{browser/inlined-styles-73447147.js → node/inlined-styles-1d3927dc.js} +1 -1
- package/vue2/lib/node/{inlined-styles-e70e3d2e.cjs → inlined-styles-91685244.cjs} +1 -1
- package/vue2/lib/{browser/interactive-element-772e6a3d.cjs → node/interactive-element-95a3909c.cjs} +1 -1
- package/vue2/lib/{edge/interactive-element-340237cb.js → node/interactive-element-97fabd2d.js} +5 -5
- package/vue2/lib/{edge/repeated-block-b32d9254.js → node/repeated-block-1bf29b19.js} +2 -2
- package/vue2/lib/{edge/repeated-block-d2b864a8.cjs → node/repeated-block-ef8d5bc1.cjs} +1 -1
- package/vue2/lib/node/style.css +1 -1
- package/vue2/lib/node/{styles-5a4adee9.js → styles-b6c2eccd.js} +2 -2
- package/vue2/lib/{edge/styles-8f4d5e0d.cjs → node/styles-c3cd7c3e.cjs} +2 -2
- package/vue2/lib/node/types/enforced-partials.d.ts +7 -2
- package/vue3/lib/{edge/block-wrapper.6ce0ef67.js → browser/block-wrapper.15e14a7d.js} +2 -2
- package/vue3/lib/{edge/block-wrapper.6a65a5d4.cjs → browser/block-wrapper.a7f5948e.cjs} +1 -1
- package/vue3/lib/browser/blocks/image/image.vue.d.ts +3 -3
- package/vue3/lib/{edge/component-ref.8741a80d.cjs → browser/component-ref.15d8ca5f.cjs} +1 -1
- package/vue3/lib/{edge/component-ref.6603a2a5.js → browser/component-ref.b4fe8508.js} +2 -2
- package/vue3/lib/browser/components/block/components/component-ref/component-ref.helpers.d.ts +1 -3
- package/vue3/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +1 -3
- package/vue3/lib/browser/components/blocks/blocks-wrapper.vue.d.ts +14 -0
- package/vue3/lib/browser/components/blocks/blocks.vue.d.ts +7 -7
- package/vue3/lib/browser/components/content/components/enable-editor.vue.d.ts +9 -0
- package/vue3/lib/browser/components/content/content.vue.d.ts +14 -0
- package/vue3/lib/browser/components/content-variants/content-variants.types.d.ts +16 -0
- package/vue3/lib/browser/components/content-variants/content-variants.vue.d.ts +12 -0
- package/vue3/lib/browser/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/browser/context/builder.context.d.ts +2 -0
- package/vue3/lib/browser/context/types.d.ts +2 -1
- package/vue3/lib/browser/functions/get-block-properties.d.ts +1 -1
- package/vue3/lib/browser/functions/transform-block-properties.d.ts +5 -2
- package/vue3/lib/browser/get-block-actions.1284f7f4.cjs +1 -0
- package/vue3/lib/{edge/get-block-actions.a147904d.js → browser/get-block-actions.25085dc6.js} +17 -11
- package/vue3/lib/browser/index-helpers/blocks-exports.d.ts +18 -6
- package/vue3/lib/browser/{index.dfff88fe.js → index.c84b511e.js} +675 -634
- package/vue3/lib/browser/index.cjs +1 -1
- package/vue3/lib/browser/{index.8871e74f.cjs → index.e038c54d.cjs} +19 -19
- package/vue3/lib/browser/index.js +1 -1
- package/vue3/lib/{edge/repeated-block.3cdac290.js → browser/repeated-block.c501aed0.js} +2 -2
- package/vue3/lib/browser/{repeated-block.fecd4553.cjs → repeated-block.eb1f9edd.cjs} +1 -1
- package/vue3/lib/browser/style.css +1 -1
- package/vue3/lib/browser/types/enforced-partials.d.ts +7 -2
- package/vue3/lib/{browser/block-wrapper.352385b7.js → edge/block-wrapper.695c0554.js} +2 -2
- package/vue3/lib/{browser/block-wrapper.5e6d25d7.cjs → edge/block-wrapper.9cca9b7b.cjs} +1 -1
- package/vue3/lib/edge/blocks/image/image.vue.d.ts +3 -3
- package/vue3/lib/{browser/component-ref.5c2938c9.cjs → edge/component-ref.50f222f3.cjs} +1 -1
- package/vue3/lib/{browser/component-ref.bf30bc42.js → edge/component-ref.5be0ad03.js} +2 -2
- package/vue3/lib/edge/components/block/components/component-ref/component-ref.helpers.d.ts +1 -3
- package/vue3/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +1 -3
- package/vue3/lib/edge/components/blocks/blocks-wrapper.vue.d.ts +14 -0
- package/vue3/lib/edge/components/blocks/blocks.vue.d.ts +7 -7
- package/vue3/lib/edge/components/content/components/enable-editor.vue.d.ts +9 -0
- package/vue3/lib/edge/components/content/content.vue.d.ts +14 -0
- package/vue3/lib/edge/components/content-variants/content-variants.types.d.ts +16 -0
- package/vue3/lib/edge/components/content-variants/content-variants.vue.d.ts +12 -0
- package/vue3/lib/edge/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/edge/context/builder.context.d.ts +2 -0
- package/vue3/lib/edge/context/types.d.ts +2 -1
- package/vue3/lib/edge/functions/get-block-properties.d.ts +1 -1
- package/vue3/lib/edge/functions/transform-block-properties.d.ts +5 -2
- package/vue3/lib/edge/get-block-actions.1d0e09b6.cjs +1 -0
- package/vue3/lib/{browser/get-block-actions.6a86c1e3.js → edge/get-block-actions.f2e5b517.js} +17 -11
- package/vue3/lib/edge/index-helpers/blocks-exports.d.ts +18 -6
- package/vue3/lib/edge/{index.7bae31e6.js → index.33299292.js} +846 -805
- package/vue3/lib/edge/{index.01b1f45a.cjs → index.99c2904d.cjs} +26 -26
- package/vue3/lib/edge/index.cjs +1 -1
- package/vue3/lib/edge/index.js +1 -1
- package/vue3/lib/{browser/repeated-block.16b97544.js → edge/repeated-block.14eebee4.js} +2 -2
- package/vue3/lib/edge/{repeated-block.7f5a9758.cjs → repeated-block.53e299ee.cjs} +1 -1
- package/vue3/lib/edge/style.css +1 -1
- package/vue3/lib/edge/types/enforced-partials.d.ts +7 -2
- package/vue3/lib/node/{block-wrapper.d4a48d58.cjs → block-wrapper.0a0c40cf.cjs} +1 -1
- package/vue3/lib/node/{block-wrapper.6198973e.js → block-wrapper.728d47ca.js} +2 -2
- package/vue3/lib/node/blocks/image/image.vue.d.ts +3 -3
- package/vue3/lib/node/{component-ref.d6bc01e4.cjs → component-ref.d5125dbe.cjs} +1 -1
- package/vue3/lib/node/{component-ref.a11780f4.js → component-ref.f9faaca2.js} +2 -2
- package/vue3/lib/node/components/block/components/component-ref/component-ref.helpers.d.ts +1 -3
- package/vue3/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +1 -3
- package/vue3/lib/node/components/blocks/blocks-wrapper.vue.d.ts +14 -0
- package/vue3/lib/node/components/blocks/blocks.vue.d.ts +7 -7
- package/vue3/lib/node/components/content/components/enable-editor.vue.d.ts +9 -0
- package/vue3/lib/node/components/content/content.vue.d.ts +14 -0
- package/vue3/lib/node/components/content-variants/content-variants.types.d.ts +16 -0
- package/vue3/lib/node/components/content-variants/content-variants.vue.d.ts +12 -0
- package/vue3/lib/node/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/node/context/builder.context.d.ts +2 -0
- package/vue3/lib/node/context/types.d.ts +2 -1
- package/vue3/lib/node/functions/get-block-properties.d.ts +1 -1
- package/vue3/lib/node/functions/transform-block-properties.d.ts +5 -2
- package/vue3/lib/node/get-block-actions.1079cc08.cjs +1 -0
- package/vue3/lib/node/{get-block-actions.a19931a2.js → get-block-actions.1b3dcb45.js} +17 -11
- package/vue3/lib/node/index-helpers/blocks-exports.d.ts +18 -6
- package/vue3/lib/node/{index.67294824.js → index.558533a1.js} +857 -810
- package/vue3/lib/node/index.6720f6e5.cjs +201 -0
- package/vue3/lib/node/index.cjs +1 -1
- package/vue3/lib/node/index.js +1 -1
- package/vue3/lib/node/{repeated-block.6106c352.js → repeated-block.38b9803d.js} +2 -2
- package/vue3/lib/node/{repeated-block.ab684d37.cjs → repeated-block.9d836783.cjs} +1 -1
- package/vue3/lib/node/style.css +1 -1
- package/vue3/lib/node/types/enforced-partials.d.ts +7 -2
- package/vue2/lib/browser/blocks-wrapper-02404286.cjs +0 -1
- package/vue2/lib/browser/blocks-wrapper-dc71efe8.js +0 -73
- package/vue2/lib/browser/enable-editor-c49316d4.cjs +0 -1
- package/vue2/lib/browser/functions/get-react-native-block-styles.d.ts +0 -7
- package/vue2/lib/browser/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/vue2/lib/browser/get-block-properties-b25a78e1.cjs +0 -1
- package/vue2/lib/edge/blocks-wrapper-e329b941.js +0 -73
- package/vue2/lib/edge/blocks-wrapper-ed7f6801.cjs +0 -1
- package/vue2/lib/edge/enable-editor-31a92cf5.cjs +0 -1
- package/vue2/lib/edge/functions/get-react-native-block-styles.d.ts +0 -7
- package/vue2/lib/edge/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/vue2/lib/edge/get-block-properties-a07f7705.cjs +0 -1
- package/vue2/lib/node/blocks-wrapper-2ebcec73.js +0 -73
- package/vue2/lib/node/blocks-wrapper-e32910ce.cjs +0 -1
- package/vue2/lib/node/enable-editor-cdf1803d.cjs +0 -1
- package/vue2/lib/node/functions/get-react-native-block-styles.d.ts +0 -7
- package/vue2/lib/node/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/vue2/lib/node/get-block-properties-d46ce865.cjs +0 -1
- package/vue3/lib/browser/functions/get-react-native-block-styles.d.ts +0 -7
- package/vue3/lib/browser/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/vue3/lib/browser/get-block-actions.f6ff7325.cjs +0 -1
- package/vue3/lib/edge/functions/get-react-native-block-styles.d.ts +0 -7
- package/vue3/lib/edge/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/vue3/lib/edge/get-block-actions.a9e5c4f5.cjs +0 -1
- package/vue3/lib/node/functions/get-react-native-block-styles.d.ts +0 -7
- package/vue3/lib/node/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/vue3/lib/node/get-block-actions.ecd370ea.cjs +0 -1
- package/vue3/lib/node/index.4291aa83.cjs +0 -201
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { defineComponent
|
|
3
|
-
import { createRequire
|
|
4
|
-
function
|
|
2
|
+
import { defineComponent, openBlock, createElementBlock, mergeProps, toHandlers, toDisplayString, defineAsyncComponent, resolveComponent, Fragment as Fragment$1, createBlock, createCommentVNode, renderList, withCtx, createVNode, h, resolveDynamicComponent, renderSlot, createElementVNode, normalizeStyle, normalizeClass, markRaw } from "vue";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
function filterAttrs(e = {}, t, n) {
|
|
5
5
|
const o = {};
|
|
6
6
|
for (const r in e) {
|
|
7
7
|
if (!e[r] || n && !r.startsWith(t))
|
|
8
8
|
continue;
|
|
9
|
-
const
|
|
10
|
-
o[
|
|
9
|
+
const s = n ? r.replace(t, "") : r;
|
|
10
|
+
o[s] = e[r];
|
|
11
11
|
}
|
|
12
12
|
return o;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const _sfc_main$k = defineComponent({
|
|
15
15
|
name: "builder-button",
|
|
16
16
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
17
17
|
data() {
|
|
18
|
-
return { filterAttrs
|
|
18
|
+
return { filterAttrs };
|
|
19
19
|
},
|
|
20
20
|
methods: {
|
|
21
21
|
_classStringToObject(e) {
|
|
@@ -28,26 +28,25 @@ const ot = g({
|
|
|
28
28
|
return t;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
})
|
|
32
|
-
const y = (e, t) => {
|
|
31
|
+
}), button_vue_vue_type_style_index_0_scoped_becdf225_lang = "", _export_sfc = (e, t) => {
|
|
33
32
|
const n = e.__vccOpts || e;
|
|
34
33
|
for (const [o, r] of t)
|
|
35
34
|
n[o] = r;
|
|
36
35
|
return n;
|
|
37
|
-
},
|
|
38
|
-
function
|
|
39
|
-
return e.link ? (
|
|
36
|
+
}, _hoisted_1$6 = ["href", "target"];
|
|
37
|
+
function _sfc_render$i(e, t, n, o, r, s) {
|
|
38
|
+
return e.link ? (openBlock(), createElementBlock("a", mergeProps({
|
|
40
39
|
key: 0,
|
|
41
40
|
href: e.link,
|
|
42
41
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
43
42
|
role: "button"
|
|
44
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
43
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17, _hoisted_1$6)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
45
44
|
key: 1,
|
|
46
45
|
style: e.attributes.style,
|
|
47
46
|
class: e._classStringToObject(e.attributes.class + " button-21azgz5avex")
|
|
48
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
47
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17));
|
|
49
48
|
}
|
|
50
|
-
const
|
|
49
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$i], ["__scopeId", "data-v-becdf225"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/button/button.vue"]]), key$1 = Symbol(), BuilderContext = {
|
|
51
50
|
Builder: {
|
|
52
51
|
content: null,
|
|
53
52
|
context: {},
|
|
@@ -58,14 +57,16 @@ const st = /* @__PURE__ */ y(ot, [["render", it], ["__scopeId", "data-v-becdf225
|
|
|
58
57
|
apiKey: null,
|
|
59
58
|
apiVersion: void 0,
|
|
60
59
|
componentInfos: {},
|
|
61
|
-
inheritedStyles: {}
|
|
60
|
+
inheritedStyles: {},
|
|
61
|
+
BlocksWrapper: "div",
|
|
62
|
+
BlocksWrapperProps: {}
|
|
62
63
|
},
|
|
63
|
-
key:
|
|
64
|
-
},
|
|
64
|
+
key: key$1
|
|
65
|
+
}, key = Symbol(), ComponentsContext = {
|
|
65
66
|
Components: { registeredComponents: {} },
|
|
66
|
-
key
|
|
67
|
+
key
|
|
67
68
|
};
|
|
68
|
-
function
|
|
69
|
+
function getBlockComponentOptions(e) {
|
|
69
70
|
var t;
|
|
70
71
|
return {
|
|
71
72
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -73,44 +74,44 @@ function ct(e) {
|
|
|
73
74
|
builderBlock: e
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
|
-
const
|
|
77
|
+
const TARGET = "vue3", camelToKebabCase = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), checkIsDefined = (e) => e != null, convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
77
78
|
if (typeof o == "string")
|
|
78
|
-
return `${
|
|
79
|
-
}).filter(
|
|
80
|
-
`),
|
|
79
|
+
return `${camelToKebabCase(n)}: ${o};`;
|
|
80
|
+
}).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
|
|
81
|
+
`), createCssClass = ({
|
|
81
82
|
mediaQuery: e,
|
|
82
83
|
className: t,
|
|
83
84
|
styles: n
|
|
84
85
|
}) => {
|
|
85
86
|
const o = `.${t} {
|
|
86
|
-
${
|
|
87
|
+
${convertStyleMapToCSS(n)}
|
|
87
88
|
}`;
|
|
88
89
|
return e ? `${e} {
|
|
89
90
|
${o}
|
|
90
91
|
}` : o;
|
|
91
|
-
},
|
|
92
|
-
log: (...e) => console.log(
|
|
93
|
-
error: (...e) => console.error(
|
|
94
|
-
warn: (...e) => console.warn(
|
|
95
|
-
debug: (...e) => console.debug(
|
|
92
|
+
}, MSG_PREFIX = "[Builder.io]: ", logger = {
|
|
93
|
+
log: (...e) => console.log(MSG_PREFIX, ...e),
|
|
94
|
+
error: (...e) => console.error(MSG_PREFIX, ...e),
|
|
95
|
+
warn: (...e) => console.warn(MSG_PREFIX, ...e),
|
|
96
|
+
debug: (...e) => console.debug(MSG_PREFIX, ...e)
|
|
96
97
|
};
|
|
97
|
-
function
|
|
98
|
+
function isBrowser() {
|
|
98
99
|
return typeof window < "u" && typeof document < "u";
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
101
|
+
function isIframe() {
|
|
102
|
+
return isBrowser() && window.self !== window.top;
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
104
|
+
function isEditing() {
|
|
105
|
+
return isIframe() && (TARGET === "reactNative" || window.location.search.indexOf("builder.frameEditing=") !== -1);
|
|
105
106
|
}
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
107
|
+
const getLocation = () => {
|
|
108
|
+
if (isBrowser()) {
|
|
108
109
|
const e = new URL(location.href);
|
|
109
110
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
110
111
|
} else
|
|
111
112
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
112
|
-
},
|
|
113
|
-
const e =
|
|
113
|
+
}, getUserAgent = () => typeof navigator == "object" && navigator.userAgent || "", getUserAttributes = () => {
|
|
114
|
+
const e = getUserAgent(), t = {
|
|
114
115
|
Android() {
|
|
115
116
|
return e.match(/Android/i);
|
|
116
117
|
},
|
|
@@ -127,15 +128,15 @@ const ht = () => {
|
|
|
127
128
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
128
129
|
},
|
|
129
130
|
any() {
|
|
130
|
-
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() ||
|
|
131
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || TARGET === "reactNative";
|
|
131
132
|
}
|
|
132
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
133
|
+
}, n = e.match(/Tablet|iPad/i), o = getLocation();
|
|
133
134
|
return {
|
|
134
135
|
urlPath: o == null ? void 0 : o.pathname,
|
|
135
136
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
136
137
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
137
138
|
};
|
|
138
|
-
},
|
|
139
|
+
}, getFunctionArguments = ({
|
|
139
140
|
builder: e,
|
|
140
141
|
context: t,
|
|
141
142
|
event: n,
|
|
@@ -146,54 +147,59 @@ const ht = () => {
|
|
|
146
147
|
builder: e,
|
|
147
148
|
context: t,
|
|
148
149
|
event: n
|
|
149
|
-
}),
|
|
150
|
-
isEditing:
|
|
151
|
-
isBrowser:
|
|
152
|
-
isServer: !
|
|
153
|
-
getUserAttributes: () =>
|
|
154
|
-
}),
|
|
150
|
+
}), getBuilderGlobals = () => ({
|
|
151
|
+
isEditing: isEditing(),
|
|
152
|
+
isBrowser: isBrowser(),
|
|
153
|
+
isServer: !isBrowser(),
|
|
154
|
+
getUserAttributes: () => getUserAttributes()
|
|
155
|
+
}), parseCode = (e, {
|
|
155
156
|
isExpression: t = !0
|
|
156
|
-
}) => t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
157
|
+
}) => t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, runInBrowser = ({
|
|
157
158
|
code: e,
|
|
158
159
|
builder: t,
|
|
159
160
|
context: n,
|
|
160
161
|
event: o,
|
|
161
162
|
localState: r,
|
|
162
|
-
rootSetState:
|
|
163
|
-
rootState:
|
|
163
|
+
rootSetState: s,
|
|
164
|
+
rootState: i
|
|
164
165
|
}) => {
|
|
165
|
-
const a =
|
|
166
|
+
const a = getFunctionArguments({
|
|
166
167
|
builder: t,
|
|
167
168
|
context: n,
|
|
168
169
|
event: o,
|
|
169
|
-
state:
|
|
170
|
+
state: flattenState(i, r, s)
|
|
170
171
|
});
|
|
171
|
-
return new Function(...a.map(([
|
|
172
|
+
return new Function(...a.map(([c]) => c), e)(...a.map(([, c]) => c));
|
|
172
173
|
};
|
|
173
|
-
function
|
|
174
|
+
function flattenState(e, t, n) {
|
|
174
175
|
if (e === t)
|
|
175
176
|
throw new Error("rootState === localState");
|
|
176
177
|
return new Proxy(e, {
|
|
177
178
|
get: (o, r) => t && r in t ? t[r] : e[r],
|
|
178
|
-
set: (o, r,
|
|
179
|
+
set: (o, r, s) => {
|
|
179
180
|
if (t && r in t)
|
|
180
181
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
181
|
-
return e[r] =
|
|
182
|
+
return e[r] = s, n == null || n(e), !0;
|
|
182
183
|
}
|
|
183
184
|
});
|
|
184
185
|
}
|
|
185
|
-
const
|
|
186
|
+
const fastClone = (e) => JSON.parse(JSON.stringify(e)), set = (e, t, n) => {
|
|
186
187
|
if (Object(e) !== e)
|
|
187
188
|
return e;
|
|
188
189
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
189
|
-
return o.slice(0, -1).reduce((r,
|
|
190
|
-
},
|
|
191
|
-
|
|
190
|
+
return o.slice(0, -1).reduce((r, s, i) => Object(r[s]) === r[s] ? r[s] : r[s] = Math.abs(Number(o[i + 1])) >> 0 === +o[i + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
191
|
+
}, noop = () => {
|
|
192
|
+
};
|
|
193
|
+
let safeDynamicRequire = noop;
|
|
192
194
|
try {
|
|
193
|
-
|
|
194
|
-
} catch {
|
|
195
|
+
safeDynamicRequire = createRequire(import.meta.url);
|
|
196
|
+
} catch (error) {
|
|
197
|
+
try {
|
|
198
|
+
safeDynamicRequire = eval("require");
|
|
199
|
+
} catch (e) {
|
|
200
|
+
}
|
|
195
201
|
}
|
|
196
|
-
const
|
|
202
|
+
const ivm = safeDynamicRequire("isolated-vm"), getSyncValName = (e) => `bldr_${e}_sync`, BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE", INJECTED_IVM_GLOBAL = "BUILDER_IVM", REF_TO_PROXY_FN = `
|
|
197
203
|
var refToProxy = (obj) => {
|
|
198
204
|
if (typeof obj !== 'object' || obj === null) {
|
|
199
205
|
return obj;
|
|
@@ -210,22 +216,22 @@ var refToProxy = (obj) => {
|
|
|
210
216
|
return val;
|
|
211
217
|
},
|
|
212
218
|
set(target, key, value) {
|
|
213
|
-
const v = typeof value === 'object' ? new ${
|
|
219
|
+
const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
|
|
214
220
|
obj.setSync(key, v);
|
|
215
|
-
${
|
|
221
|
+
${BUILDER_SET_STATE_NAME}(key, value)
|
|
216
222
|
},
|
|
217
223
|
deleteProperty(target, key) {
|
|
218
224
|
obj.deleteSync(key);
|
|
219
225
|
}
|
|
220
226
|
})
|
|
221
227
|
}
|
|
222
|
-
`,
|
|
228
|
+
`, processCode = ({
|
|
223
229
|
code: e,
|
|
224
230
|
args: t
|
|
225
231
|
}) => {
|
|
226
|
-
const n = t.map(([o]) => `var ${o} = refToProxy(${
|
|
232
|
+
const n = t.map(([o]) => `var ${o} = refToProxy(${getSyncValName(o)}); `).join("");
|
|
227
233
|
return `
|
|
228
|
-
${
|
|
234
|
+
${REF_TO_PROXY_FN}
|
|
229
235
|
${n}
|
|
230
236
|
function theFunction() {
|
|
231
237
|
${e}
|
|
@@ -239,83 +245,86 @@ if (typeof output === 'object' && output !== null) {
|
|
|
239
245
|
|
|
240
246
|
output;
|
|
241
247
|
`;
|
|
242
|
-
},
|
|
248
|
+
}, getIsolateContext = () => new ivm.Isolate({
|
|
243
249
|
memoryLimit: 128
|
|
244
|
-
}).createContextSync(),
|
|
250
|
+
}).createContextSync(), runInNode = ({
|
|
245
251
|
code: e,
|
|
246
252
|
builder: t,
|
|
247
253
|
context: n,
|
|
248
254
|
event: o,
|
|
249
255
|
localState: r,
|
|
250
|
-
rootSetState:
|
|
251
|
-
rootState:
|
|
256
|
+
rootSetState: s,
|
|
257
|
+
rootState: i
|
|
252
258
|
}) => {
|
|
253
|
-
const a =
|
|
254
|
-
...
|
|
259
|
+
const a = fastClone({
|
|
260
|
+
...i,
|
|
255
261
|
...r
|
|
256
|
-
}),
|
|
262
|
+
}), c = getFunctionArguments({
|
|
257
263
|
builder: t,
|
|
258
264
|
context: n,
|
|
259
265
|
event: o,
|
|
260
266
|
state: a
|
|
261
|
-
}),
|
|
262
|
-
|
|
263
|
-
console.log(...
|
|
264
|
-
}),
|
|
265
|
-
|
|
266
|
-
}),
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
...
|
|
270
|
-
getUserAttributes: () =>
|
|
271
|
-
} :
|
|
267
|
+
}), l = getIsolateContext(), d = l.global;
|
|
268
|
+
d.setSync("global", d.derefInto()), d.setSync("log", function(...m) {
|
|
269
|
+
console.log(...m);
|
|
270
|
+
}), d.setSync(BUILDER_SET_STATE_NAME, function(m, f) {
|
|
271
|
+
set(i, m, f), s == null || s(i);
|
|
272
|
+
}), c.forEach(([m, f]) => {
|
|
273
|
+
const b = typeof f == "object" ? new ivm.Reference(
|
|
274
|
+
m === "builder" ? {
|
|
275
|
+
...f,
|
|
276
|
+
getUserAttributes: () => f.getUserAttributes()
|
|
277
|
+
} : f
|
|
272
278
|
) : null;
|
|
273
|
-
|
|
274
|
-
}),
|
|
275
|
-
const
|
|
279
|
+
d.setSync(getSyncValName(m), b);
|
|
280
|
+
}), d.setSync(INJECTED_IVM_GLOBAL, ivm);
|
|
281
|
+
const u = processCode({
|
|
276
282
|
code: e,
|
|
277
|
-
args:
|
|
278
|
-
}),
|
|
283
|
+
args: c
|
|
284
|
+
}), p = l.evalSync(u);
|
|
279
285
|
try {
|
|
280
|
-
return JSON.parse(
|
|
286
|
+
return JSON.parse(p);
|
|
281
287
|
} catch {
|
|
282
|
-
return
|
|
288
|
+
return p;
|
|
283
289
|
}
|
|
284
|
-
},
|
|
285
|
-
function
|
|
290
|
+
}, chooseBrowserOrServerEval = (e) => isBrowser() ? runInBrowser(e) : runInNode(e);
|
|
291
|
+
function evaluate({
|
|
286
292
|
code: e,
|
|
287
293
|
context: t,
|
|
288
294
|
localState: n,
|
|
289
295
|
rootState: o,
|
|
290
296
|
rootSetState: r,
|
|
291
|
-
event:
|
|
292
|
-
isExpression:
|
|
297
|
+
event: s,
|
|
298
|
+
isExpression: i = !0
|
|
293
299
|
}) {
|
|
294
300
|
if (e === "") {
|
|
295
|
-
|
|
301
|
+
logger.warn("Skipping evaluation of empty code block.");
|
|
296
302
|
return;
|
|
297
303
|
}
|
|
298
304
|
const a = {
|
|
299
|
-
code:
|
|
300
|
-
isExpression:
|
|
305
|
+
code: parseCode(e, {
|
|
306
|
+
isExpression: i
|
|
301
307
|
}),
|
|
302
|
-
builder:
|
|
308
|
+
builder: getBuilderGlobals(),
|
|
303
309
|
context: t,
|
|
304
|
-
event:
|
|
310
|
+
event: s,
|
|
305
311
|
rootSetState: r,
|
|
306
312
|
rootState: o,
|
|
307
313
|
localState: n
|
|
308
314
|
};
|
|
309
315
|
try {
|
|
310
|
-
return
|
|
311
|
-
} catch (
|
|
312
|
-
|
|
316
|
+
return chooseBrowserOrServerEval(a);
|
|
317
|
+
} catch (c) {
|
|
318
|
+
logger.error("Failed code evaluation: " + c.message, {
|
|
313
319
|
code: e
|
|
314
320
|
});
|
|
315
321
|
return;
|
|
316
322
|
}
|
|
317
323
|
}
|
|
318
|
-
|
|
324
|
+
function transformBlock(e) {
|
|
325
|
+
return e;
|
|
326
|
+
}
|
|
327
|
+
const evaluateBindings = ({
|
|
319
328
|
block: e,
|
|
320
329
|
context: t,
|
|
321
330
|
localState: n,
|
|
@@ -324,58 +333,58 @@ const Tt = ({
|
|
|
324
333
|
}) => {
|
|
325
334
|
if (!e.bindings)
|
|
326
335
|
return e;
|
|
327
|
-
const
|
|
328
|
-
...
|
|
336
|
+
const s = fastClone(e), i = {
|
|
337
|
+
...s,
|
|
329
338
|
properties: {
|
|
330
|
-
...
|
|
339
|
+
...s.properties
|
|
331
340
|
},
|
|
332
341
|
actions: {
|
|
333
|
-
...
|
|
342
|
+
...s.actions
|
|
334
343
|
}
|
|
335
344
|
};
|
|
336
345
|
for (const a in e.bindings) {
|
|
337
|
-
const
|
|
338
|
-
code:
|
|
346
|
+
const c = e.bindings[a], l = evaluate({
|
|
347
|
+
code: c,
|
|
339
348
|
localState: n,
|
|
340
349
|
rootState: o,
|
|
341
350
|
rootSetState: r,
|
|
342
351
|
context: t
|
|
343
352
|
});
|
|
344
|
-
|
|
353
|
+
set(i, a, l);
|
|
345
354
|
}
|
|
346
|
-
return
|
|
355
|
+
return i;
|
|
347
356
|
};
|
|
348
|
-
function
|
|
357
|
+
function getProcessedBlock({
|
|
349
358
|
block: e,
|
|
350
359
|
context: t,
|
|
351
360
|
shouldEvaluateBindings: n,
|
|
352
361
|
localState: o,
|
|
353
362
|
rootState: r,
|
|
354
|
-
rootSetState:
|
|
363
|
+
rootSetState: s
|
|
355
364
|
}) {
|
|
356
|
-
const
|
|
357
|
-
return n ?
|
|
358
|
-
block:
|
|
365
|
+
const i = e;
|
|
366
|
+
return n ? evaluateBindings({
|
|
367
|
+
block: i,
|
|
359
368
|
localState: o,
|
|
360
369
|
rootState: r,
|
|
361
|
-
rootSetState:
|
|
370
|
+
rootSetState: s,
|
|
362
371
|
context: t
|
|
363
|
-
}) :
|
|
372
|
+
}) : i;
|
|
364
373
|
}
|
|
365
|
-
const
|
|
374
|
+
const EMPTY_HTML_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], isEmptyHtmlElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.includes(e.toLowerCase()), getComponent = ({
|
|
366
375
|
block: e,
|
|
367
376
|
context: t,
|
|
368
377
|
registeredComponents: n
|
|
369
378
|
}) => {
|
|
370
|
-
var
|
|
371
|
-
const o = (
|
|
379
|
+
var s;
|
|
380
|
+
const o = (s = getProcessedBlock({
|
|
372
381
|
block: e,
|
|
373
382
|
localState: t.localState,
|
|
374
383
|
rootState: t.rootState,
|
|
375
384
|
rootSetState: t.rootSetState,
|
|
376
385
|
context: t.context,
|
|
377
386
|
shouldEvaluateBindings: !1
|
|
378
|
-
}).component) == null ? void 0 :
|
|
387
|
+
}).component) == null ? void 0 : s.name;
|
|
379
388
|
if (!o)
|
|
380
389
|
return null;
|
|
381
390
|
const r = n[o];
|
|
@@ -384,7 +393,7 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
384
393
|
console.warn(`
|
|
385
394
|
Could not find a registered component named "${o}".
|
|
386
395
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
387
|
-
},
|
|
396
|
+
}, getRepeatItemData = ({
|
|
388
397
|
block: e,
|
|
389
398
|
context: t
|
|
390
399
|
}) => {
|
|
@@ -394,7 +403,7 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
394
403
|
} = e;
|
|
395
404
|
if (!(n != null && n.collection))
|
|
396
405
|
return;
|
|
397
|
-
const r =
|
|
406
|
+
const r = evaluate({
|
|
398
407
|
code: n.collection,
|
|
399
408
|
localState: t.localState,
|
|
400
409
|
rootState: t.rootState,
|
|
@@ -403,69 +412,69 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
403
412
|
});
|
|
404
413
|
if (!Array.isArray(r))
|
|
405
414
|
return;
|
|
406
|
-
const
|
|
407
|
-
return r.map((
|
|
415
|
+
const s = n.collection.split(".").pop(), i = n.itemName || (s ? s + "Item" : "item");
|
|
416
|
+
return r.map((c, l) => ({
|
|
408
417
|
context: {
|
|
409
418
|
...t,
|
|
410
419
|
localState: {
|
|
411
420
|
...t.localState,
|
|
412
|
-
$index:
|
|
413
|
-
$item:
|
|
414
|
-
[
|
|
415
|
-
[`$${
|
|
421
|
+
$index: l,
|
|
422
|
+
$item: c,
|
|
423
|
+
[i]: c,
|
|
424
|
+
[`$${i}Index`]: l
|
|
416
425
|
}
|
|
417
426
|
},
|
|
418
427
|
block: o
|
|
419
428
|
}));
|
|
420
|
-
},
|
|
429
|
+
}, BlockStyles$1 = () => Promise.resolve().then(() => blockStyles).then((e) => e.default).catch((e) => {
|
|
421
430
|
throw console.error(
|
|
422
431
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
423
432
|
e
|
|
424
433
|
), e;
|
|
425
|
-
}),
|
|
434
|
+
}), BlockWrapper = () => import("./block-wrapper.728d47ca.js").then((e) => e.default).catch((e) => {
|
|
426
435
|
throw console.error(
|
|
427
436
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
428
437
|
e
|
|
429
438
|
), e;
|
|
430
|
-
}),
|
|
439
|
+
}), ComponentRef = () => import("./component-ref.f9faaca2.js").then((e) => e.default).catch((e) => {
|
|
431
440
|
throw console.error(
|
|
432
441
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
433
442
|
e
|
|
434
443
|
), e;
|
|
435
|
-
}),
|
|
444
|
+
}), RepeatedBlock = () => import("./repeated-block.38b9803d.js").then((e) => e.default).catch((e) => {
|
|
436
445
|
throw console.error(
|
|
437
446
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
438
447
|
e
|
|
439
448
|
), e;
|
|
440
|
-
}),
|
|
449
|
+
}), _sfc_main$j = defineComponent({
|
|
441
450
|
name: "block",
|
|
442
451
|
components: {
|
|
443
|
-
ComponentRef:
|
|
444
|
-
BlockWrapper:
|
|
445
|
-
RepeatedBlock:
|
|
446
|
-
BlockStyles:
|
|
452
|
+
ComponentRef: defineAsyncComponent(ComponentRef),
|
|
453
|
+
BlockWrapper: defineAsyncComponent(BlockWrapper),
|
|
454
|
+
RepeatedBlock: defineAsyncComponent(RepeatedBlock),
|
|
455
|
+
BlockStyles: defineAsyncComponent(BlockStyles$1)
|
|
447
456
|
},
|
|
448
457
|
props: ["block", "context", "registeredComponents"],
|
|
449
458
|
data() {
|
|
450
|
-
return { childrenContext: this.context, isEmptyHtmlElement
|
|
459
|
+
return { childrenContext: this.context, isEmptyHtmlElement };
|
|
451
460
|
},
|
|
452
461
|
computed: {
|
|
453
462
|
blockComponent() {
|
|
454
|
-
return
|
|
463
|
+
return getComponent({
|
|
455
464
|
block: this.block,
|
|
456
465
|
context: this.context,
|
|
457
466
|
registeredComponents: this.registeredComponents
|
|
458
467
|
});
|
|
459
468
|
},
|
|
460
469
|
repeatItem() {
|
|
461
|
-
return
|
|
470
|
+
return getRepeatItemData({
|
|
462
471
|
block: this.block,
|
|
463
472
|
context: this.context
|
|
464
473
|
});
|
|
465
474
|
},
|
|
466
475
|
processedBlock() {
|
|
467
476
|
var e;
|
|
468
|
-
return (e = this.block.repeat) != null && e.collection ? this.block :
|
|
477
|
+
return (e = this.block.repeat) != null && e.collection ? this.block : getProcessedBlock({
|
|
469
478
|
block: this.block,
|
|
470
479
|
localState: this.context.localState,
|
|
471
480
|
rootState: this.context.rootState,
|
|
@@ -489,12 +498,12 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
489
498
|
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ? (n = this.processedBlock.children) != null ? n : [] : [];
|
|
490
499
|
},
|
|
491
500
|
componentRefProps() {
|
|
492
|
-
var e, t, n, o, r,
|
|
501
|
+
var e, t, n, o, r, s;
|
|
493
502
|
return {
|
|
494
503
|
blockChildren: (e = this.processedBlock.children) != null ? e : [],
|
|
495
504
|
componentRef: (t = this.blockComponent) == null ? void 0 : t.component,
|
|
496
505
|
componentOptions: {
|
|
497
|
-
...
|
|
506
|
+
...getBlockComponentOptions(this.processedBlock),
|
|
498
507
|
builderContext: this.context,
|
|
499
508
|
...((n = this.blockComponent) == null ? void 0 : n.name) === "Symbol" || ((o = this.blockComponent) == null ? void 0 : o.name) === "Columns" ? {
|
|
500
509
|
builderComponents: this.registeredComponents
|
|
@@ -504,16 +513,16 @@ const Rt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
504
513
|
registeredComponents: this.registeredComponents,
|
|
505
514
|
builderBlock: this.processedBlock,
|
|
506
515
|
includeBlockProps: ((r = this.blockComponent) == null ? void 0 : r.noWrap) === !0,
|
|
507
|
-
isInteractive: !((
|
|
516
|
+
isInteractive: !((s = this.blockComponent) != null && s.isRSC)
|
|
508
517
|
};
|
|
509
518
|
}
|
|
510
519
|
}
|
|
511
520
|
});
|
|
512
|
-
function
|
|
513
|
-
var
|
|
514
|
-
const
|
|
515
|
-
return e.canShowBlock ? (
|
|
516
|
-
(
|
|
521
|
+
function _sfc_render$h(e, t, n, o, r, s) {
|
|
522
|
+
var u;
|
|
523
|
+
const i = resolveComponent("block-wrapper"), a = resolveComponent("repeated-block"), c = resolveComponent("component-ref"), l = resolveComponent("block", !0), d = resolveComponent("block-styles");
|
|
524
|
+
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
525
|
+
(u = e.blockComponent) != null && u.noWrap ? (openBlock(), createBlock(c, {
|
|
517
526
|
key: 1,
|
|
518
527
|
componentRef: e.componentRefProps.componentRef,
|
|
519
528
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -523,29 +532,29 @@ function jt(e, t, n, o, r, i) {
|
|
|
523
532
|
builderBlock: e.componentRefProps.builderBlock,
|
|
524
533
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
525
534
|
isInteractive: e.componentRefProps.isInteractive
|
|
526
|
-
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"])) : (
|
|
527
|
-
e.isEmptyHtmlElement(e.Tag) ? (
|
|
535
|
+
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"])) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
536
|
+
e.isEmptyHtmlElement(e.Tag) ? (openBlock(), createBlock(i, {
|
|
528
537
|
key: 0,
|
|
529
538
|
Wrapper: e.Tag,
|
|
530
539
|
block: e.processedBlock,
|
|
531
540
|
context: e.context,
|
|
532
541
|
hasChildren: !1
|
|
533
|
-
}, null, 8, ["Wrapper", "block", "context"])) :
|
|
534
|
-
!e.isEmptyHtmlElement(e.Tag) && e.repeatItem ? (
|
|
535
|
-
key:
|
|
536
|
-
repeatContext:
|
|
537
|
-
block:
|
|
542
|
+
}, null, 8, ["Wrapper", "block", "context"])) : createCommentVNode("v-if", !0),
|
|
543
|
+
!e.isEmptyHtmlElement(e.Tag) && e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (p, m) => (openBlock(), createBlock(a, {
|
|
544
|
+
key: m,
|
|
545
|
+
repeatContext: p.context,
|
|
546
|
+
block: p.block,
|
|
538
547
|
registeredComponents: e.registeredComponents
|
|
539
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents"]))), 128)) :
|
|
540
|
-
!e.isEmptyHtmlElement(e.Tag) && !e.repeatItem ? (
|
|
548
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents"]))), 128)) : createCommentVNode("v-if", !0),
|
|
549
|
+
!e.isEmptyHtmlElement(e.Tag) && !e.repeatItem ? (openBlock(), createBlock(i, {
|
|
541
550
|
key: 2,
|
|
542
551
|
Wrapper: e.Tag,
|
|
543
552
|
block: e.processedBlock,
|
|
544
553
|
context: e.context,
|
|
545
554
|
hasChildren: !0
|
|
546
555
|
}, {
|
|
547
|
-
default:
|
|
548
|
-
|
|
556
|
+
default: withCtx(() => [
|
|
557
|
+
createVNode(c, {
|
|
549
558
|
componentRef: e.componentRefProps.componentRef,
|
|
550
559
|
componentOptions: e.componentRefProps.componentOptions,
|
|
551
560
|
blockChildren: e.componentRefProps.blockChildren,
|
|
@@ -555,27 +564,27 @@ function jt(e, t, n, o, r, i) {
|
|
|
555
564
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
556
565
|
isInteractive: e.componentRefProps.isInteractive
|
|
557
566
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
558
|
-
(
|
|
559
|
-
key: "block-" +
|
|
560
|
-
block:
|
|
567
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (p, m) => (openBlock(), createBlock(l, {
|
|
568
|
+
key: "block-" + p.id,
|
|
569
|
+
block: p,
|
|
561
570
|
context: e.childrenContext,
|
|
562
571
|
registeredComponents: e.registeredComponents
|
|
563
572
|
}, null, 8, ["block", "context", "registeredComponents"]))), 128)),
|
|
564
|
-
(
|
|
565
|
-
key: "block-style-" +
|
|
566
|
-
block:
|
|
573
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (p, m) => (openBlock(), createBlock(d, {
|
|
574
|
+
key: "block-style-" + p.id,
|
|
575
|
+
block: p,
|
|
567
576
|
context: e.childrenContext
|
|
568
577
|
}, null, 8, ["block", "context"]))), 128))
|
|
569
578
|
]),
|
|
570
579
|
_: 1
|
|
571
|
-
}, 8, ["Wrapper", "block", "context"])) :
|
|
580
|
+
}, 8, ["Wrapper", "block", "context"])) : createCommentVNode("v-if", !0)
|
|
572
581
|
], 64))
|
|
573
|
-
], 64)) :
|
|
582
|
+
], 64)) : createCommentVNode("v-if", !0);
|
|
574
583
|
}
|
|
575
|
-
const
|
|
584
|
+
const Block = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$h], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/block/block.vue"]]), block = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
576
585
|
__proto__: null,
|
|
577
|
-
default:
|
|
578
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
586
|
+
default: Block
|
|
587
|
+
}, Symbol.toStringTag, { value: "Module" })), SIZES = {
|
|
579
588
|
small: {
|
|
580
589
|
min: 320,
|
|
581
590
|
default: 321,
|
|
@@ -591,11 +600,11 @@ const Ae = /* @__PURE__ */ y(Ot, [["render", jt], ["__file", "/home/runner/work/
|
|
|
591
600
|
default: 991,
|
|
592
601
|
max: 1200
|
|
593
602
|
}
|
|
594
|
-
},
|
|
603
|
+
}, getMaxWidthQueryForSize = (e, t = SIZES) => `@media (max-width: ${t[e].max}px)`, getSizesForBreakpoints = ({
|
|
595
604
|
small: e,
|
|
596
605
|
medium: t
|
|
597
606
|
}) => {
|
|
598
|
-
const n =
|
|
607
|
+
const n = fastClone(SIZES);
|
|
599
608
|
if (!e || !t)
|
|
600
609
|
return n;
|
|
601
610
|
const o = Math.floor(e / 2);
|
|
@@ -610,28 +619,28 @@ const Ae = /* @__PURE__ */ y(Ot, [["render", jt], ["__file", "/home/runner/work/
|
|
|
610
619
|
min: r,
|
|
611
620
|
default: r + 1
|
|
612
621
|
};
|
|
613
|
-
const
|
|
622
|
+
const s = n.medium.max + 1;
|
|
614
623
|
return n.large = {
|
|
615
624
|
max: 2e3,
|
|
616
|
-
min:
|
|
617
|
-
default:
|
|
625
|
+
min: s,
|
|
626
|
+
default: s + 1
|
|
618
627
|
}, n;
|
|
619
|
-
},
|
|
628
|
+
}, _sfc_main$i = defineComponent({
|
|
620
629
|
render() {
|
|
621
|
-
return
|
|
630
|
+
return h("style", { id: this.id, innerHTML: this.styles });
|
|
622
631
|
},
|
|
623
632
|
name: "inlined-styles",
|
|
624
633
|
props: ["styles", "id"]
|
|
625
|
-
}),
|
|
634
|
+
}), InlinedStyles = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/inlined-styles.vue"]]), _sfc_main$h = defineComponent({
|
|
626
635
|
name: "block-styles",
|
|
627
|
-
components: { InlinedStyles
|
|
636
|
+
components: { InlinedStyles },
|
|
628
637
|
props: ["block", "context"],
|
|
629
638
|
data() {
|
|
630
|
-
return { TARGET
|
|
639
|
+
return { TARGET };
|
|
631
640
|
},
|
|
632
641
|
computed: {
|
|
633
642
|
canShowBlock() {
|
|
634
|
-
const e =
|
|
643
|
+
const e = getProcessedBlock({
|
|
635
644
|
block: this.block,
|
|
636
645
|
localState: this.context.localState,
|
|
637
646
|
rootState: this.context.rootState,
|
|
@@ -639,57 +648,64 @@ const Ae = /* @__PURE__ */ y(Ot, [["render", jt], ["__file", "/home/runner/work/
|
|
|
639
648
|
context: this.context.context,
|
|
640
649
|
shouldEvaluateBindings: !0
|
|
641
650
|
});
|
|
642
|
-
return
|
|
651
|
+
return checkIsDefined(e.hide) ? !e.hide : checkIsDefined(e.show) ? e.show : !0;
|
|
643
652
|
},
|
|
644
653
|
css() {
|
|
645
|
-
var
|
|
646
|
-
const e =
|
|
654
|
+
var u;
|
|
655
|
+
const e = getProcessedBlock({
|
|
647
656
|
block: this.block,
|
|
648
657
|
localState: this.context.localState,
|
|
649
658
|
rootState: this.context.rootState,
|
|
650
659
|
rootSetState: this.context.rootSetState,
|
|
651
660
|
context: this.context.context,
|
|
652
661
|
shouldEvaluateBindings: !0
|
|
653
|
-
}), t = e.responsiveStyles, n = this.context.content, o =
|
|
654
|
-
((
|
|
655
|
-
), r = t == null ? void 0 : t.large,
|
|
662
|
+
}), t = e.responsiveStyles, n = this.context.content, o = getSizesForBreakpoints(
|
|
663
|
+
((u = n == null ? void 0 : n.meta) == null ? void 0 : u.breakpoints) || {}
|
|
664
|
+
), r = t == null ? void 0 : t.large, s = t == null ? void 0 : t.medium, i = t == null ? void 0 : t.small, a = e.id;
|
|
656
665
|
if (!a)
|
|
657
666
|
return "";
|
|
658
|
-
const
|
|
667
|
+
const c = r ? createCssClass({
|
|
659
668
|
className: a,
|
|
660
669
|
styles: r
|
|
661
|
-
}) : "",
|
|
670
|
+
}) : "", l = s ? createCssClass({
|
|
662
671
|
className: a,
|
|
663
|
-
styles:
|
|
664
|
-
mediaQuery:
|
|
672
|
+
styles: s,
|
|
673
|
+
mediaQuery: getMaxWidthQueryForSize(
|
|
665
674
|
"medium",
|
|
666
675
|
o
|
|
667
676
|
)
|
|
668
|
-
}) : "",
|
|
677
|
+
}) : "", d = i ? createCssClass({
|
|
669
678
|
className: a,
|
|
670
|
-
styles:
|
|
671
|
-
mediaQuery:
|
|
679
|
+
styles: i,
|
|
680
|
+
mediaQuery: getMaxWidthQueryForSize(
|
|
672
681
|
"small",
|
|
673
682
|
o
|
|
674
683
|
)
|
|
675
684
|
}) : "";
|
|
676
|
-
return [
|
|
685
|
+
return [c, l, d].join(" ");
|
|
677
686
|
}
|
|
678
687
|
}
|
|
679
688
|
});
|
|
680
|
-
function
|
|
681
|
-
const
|
|
682
|
-
return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (
|
|
689
|
+
function _sfc_render$g(e, t, n, o, r, s) {
|
|
690
|
+
const i = resolveComponent("inlined-styles");
|
|
691
|
+
return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (openBlock(), createBlock(i, {
|
|
683
692
|
key: 0,
|
|
684
693
|
styles: e.css
|
|
685
|
-
}, null, 8, ["styles"])) :
|
|
694
|
+
}, null, 8, ["styles"])) : createCommentVNode("v-if", !0);
|
|
686
695
|
}
|
|
687
|
-
const
|
|
696
|
+
const BlockStyles = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/block/components/block-styles.vue"]]), blockStyles = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
688
697
|
__proto__: null,
|
|
689
|
-
default:
|
|
690
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
698
|
+
default: BlockStyles
|
|
699
|
+
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$g = defineComponent({
|
|
691
700
|
name: "builder-blocks-wrapper",
|
|
692
|
-
props: [
|
|
701
|
+
props: [
|
|
702
|
+
"BlocksWrapper",
|
|
703
|
+
"blocks",
|
|
704
|
+
"parent",
|
|
705
|
+
"path",
|
|
706
|
+
"styleProp",
|
|
707
|
+
"BlocksWrapperProps"
|
|
708
|
+
],
|
|
693
709
|
computed: {
|
|
694
710
|
className() {
|
|
695
711
|
var e;
|
|
@@ -699,7 +715,7 @@ const Ve = /* @__PURE__ */ y(Ut, [["render", Ft], ["__file", "/home/runner/work/
|
|
|
699
715
|
methods: {
|
|
700
716
|
onClick() {
|
|
701
717
|
var e, t;
|
|
702
|
-
|
|
718
|
+
isEditing() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
703
719
|
{
|
|
704
720
|
type: "builder.clickEmptyBlocks",
|
|
705
721
|
data: {
|
|
@@ -712,7 +728,7 @@ const Ve = /* @__PURE__ */ y(Ut, [["render", Ft], ["__file", "/home/runner/work/
|
|
|
712
728
|
},
|
|
713
729
|
onMouseEnter() {
|
|
714
730
|
var e, t;
|
|
715
|
-
|
|
731
|
+
isEditing() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
716
732
|
{
|
|
717
733
|
type: "builder.hoverEmptyBlocks",
|
|
718
734
|
data: {
|
|
@@ -733,27 +749,29 @@ const Ve = /* @__PURE__ */ y(Ut, [["render", Ft], ["__file", "/home/runner/work/
|
|
|
733
749
|
return t;
|
|
734
750
|
}
|
|
735
751
|
}
|
|
736
|
-
});
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
class: e._classStringToObject(e.className + " div-178o76acnws"),
|
|
752
|
+
}), blocksWrapper_vue_vue_type_style_index_0_scoped_1f8aab9f_lang = "";
|
|
753
|
+
function _sfc_render$f(e, t, n, o, r, s) {
|
|
754
|
+
return openBlock(), createBlock(resolveDynamicComponent(e.BlocksWrapper), mergeProps({
|
|
755
|
+
class: e._classStringToObject(e.className + " component-178o76acnws"),
|
|
741
756
|
"builder-path": e.path,
|
|
742
757
|
"builder-parent-id": e.parent,
|
|
743
758
|
style: e.styleProp,
|
|
744
|
-
onClick:
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
}, {}),
|
|
748
|
-
|
|
749
|
-
|
|
759
|
+
onClick: (i) => e.onClick(),
|
|
760
|
+
onMouseEnter: (i) => e.onMouseEnter(),
|
|
761
|
+
onKeyPress: (i) => e.onClick()
|
|
762
|
+
}, { ...e.BlocksWrapperProps }), {
|
|
763
|
+
default: withCtx(() => [
|
|
764
|
+
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
765
|
+
]),
|
|
766
|
+
_: 3
|
|
767
|
+
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
750
768
|
}
|
|
751
|
-
const
|
|
769
|
+
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-1f8aab9f"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/blocks/blocks-wrapper.vue"]]), _sfc_main$f = defineComponent({
|
|
752
770
|
name: "builder-blocks",
|
|
753
771
|
components: {
|
|
754
|
-
BlocksWrapper
|
|
755
|
-
Block
|
|
756
|
-
BlockStyles
|
|
772
|
+
BlocksWrapper,
|
|
773
|
+
Block,
|
|
774
|
+
BlockStyles
|
|
757
775
|
},
|
|
758
776
|
props: [
|
|
759
777
|
"blocks",
|
|
@@ -764,37 +782,40 @@ const Ht = /* @__PURE__ */ y(Lt, [["render", Dt], ["__scopeId", "data-v-1f8aab9f
|
|
|
764
782
|
"registeredComponents"
|
|
765
783
|
],
|
|
766
784
|
inject: {
|
|
767
|
-
builderContext:
|
|
768
|
-
componentsContext:
|
|
785
|
+
builderContext: BuilderContext.key,
|
|
786
|
+
componentsContext: ComponentsContext.key
|
|
769
787
|
}
|
|
770
788
|
});
|
|
771
|
-
function
|
|
772
|
-
|
|
773
|
-
|
|
789
|
+
function _sfc_render$e(e, t, n, o, r, s) {
|
|
790
|
+
var l, d;
|
|
791
|
+
const i = resolveComponent("block"), a = resolveComponent("block-styles"), c = resolveComponent("blocks-wrapper");
|
|
792
|
+
return openBlock(), createBlock(c, {
|
|
774
793
|
blocks: e.blocks,
|
|
775
794
|
parent: e.parent,
|
|
776
795
|
path: e.path,
|
|
777
|
-
styleProp: e.styleProp
|
|
796
|
+
styleProp: e.styleProp,
|
|
797
|
+
BlocksWrapper: (l = e.context) == null ? void 0 : l.BlocksWrapper,
|
|
798
|
+
BlocksWrapperProps: (d = e.context) == null ? void 0 : d.BlocksWrapperProps
|
|
778
799
|
}, {
|
|
779
|
-
default:
|
|
780
|
-
e.blocks ? (
|
|
781
|
-
key: "render-block-" +
|
|
782
|
-
block:
|
|
800
|
+
default: withCtx(() => [
|
|
801
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (u, p) => (openBlock(), createBlock(i, {
|
|
802
|
+
key: "render-block-" + u.id,
|
|
803
|
+
block: u,
|
|
783
804
|
context: e.context || e.builderContext,
|
|
784
805
|
registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
|
|
785
|
-
}, null, 8, ["block", "context", "registeredComponents"]))), 128)) :
|
|
786
|
-
e.blocks ? (
|
|
787
|
-
key: "block-style-" +
|
|
788
|
-
block:
|
|
806
|
+
}, null, 8, ["block", "context", "registeredComponents"]))), 128)) : createCommentVNode("v-if", !0),
|
|
807
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.blocks, (u, p) => (openBlock(), createBlock(a, {
|
|
808
|
+
key: "block-style-" + u.id,
|
|
809
|
+
block: u,
|
|
789
810
|
context: e.context || e.builderContext
|
|
790
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
811
|
+
}, null, 8, ["block", "context"]))), 128)) : createCommentVNode("v-if", !0)
|
|
791
812
|
]),
|
|
792
813
|
_: 1
|
|
793
|
-
}, 8, ["blocks", "parent", "path", "styleProp"]);
|
|
814
|
+
}, 8, ["blocks", "parent", "path", "styleProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
794
815
|
}
|
|
795
|
-
const
|
|
816
|
+
const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/blocks/blocks.vue"]]), _sfc_main$e = defineComponent({
|
|
796
817
|
name: "builder-columns",
|
|
797
|
-
components: { InlinedStyles
|
|
818
|
+
components: { InlinedStyles, Blocks },
|
|
798
819
|
props: [
|
|
799
820
|
"js",
|
|
800
821
|
"space",
|
|
@@ -811,7 +832,7 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
811
832
|
cols: this.columns || [],
|
|
812
833
|
stackAt: this.stackColumnsAt || "tablet",
|
|
813
834
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
814
|
-
TARGET
|
|
835
|
+
TARGET
|
|
815
836
|
};
|
|
816
837
|
},
|
|
817
838
|
computed: {
|
|
@@ -874,7 +895,7 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
874
895
|
return this.stackAt === "never" ? t : e;
|
|
875
896
|
},
|
|
876
897
|
columnCssVars(e) {
|
|
877
|
-
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%",
|
|
898
|
+
const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%", s = 0;
|
|
878
899
|
return {
|
|
879
900
|
width: n,
|
|
880
901
|
["margin-left"]: o,
|
|
@@ -883,7 +904,7 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
883
904
|
desktopStyle: n
|
|
884
905
|
}),
|
|
885
906
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
886
|
-
stackedStyle:
|
|
907
|
+
stackedStyle: s,
|
|
887
908
|
desktopStyle: o
|
|
888
909
|
}),
|
|
889
910
|
"--column-width-tablet": this.getTabletStyle({
|
|
@@ -891,14 +912,14 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
891
912
|
desktopStyle: n
|
|
892
913
|
}),
|
|
893
914
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
894
|
-
stackedStyle:
|
|
915
|
+
stackedStyle: s,
|
|
895
916
|
desktopStyle: o
|
|
896
917
|
})
|
|
897
918
|
};
|
|
898
919
|
},
|
|
899
920
|
getWidthForBreakpointSize(e) {
|
|
900
921
|
var n, o;
|
|
901
|
-
return
|
|
922
|
+
return getSizesForBreakpoints(
|
|
902
923
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
903
924
|
)[e].max;
|
|
904
925
|
},
|
|
@@ -912,78 +933,78 @@ const re = /* @__PURE__ */ y(Kt, [["render", zt], ["__file", "/home/runner/work/
|
|
|
912
933
|
return t;
|
|
913
934
|
}
|
|
914
935
|
}
|
|
915
|
-
});
|
|
916
|
-
function
|
|
917
|
-
const
|
|
918
|
-
return
|
|
936
|
+
}), columns_vue_vue_type_style_index_0_scoped_7be099dc_lang = "";
|
|
937
|
+
function _sfc_render$d(e, t, n, o, r, s) {
|
|
938
|
+
const i = resolveComponent("inlined-styles"), a = resolveComponent("blocks");
|
|
939
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
919
940
|
class: e._classStringToObject(
|
|
920
941
|
`builder-columns ${e.builderBlock.id}-breakpoints div-16nol0lwi20`
|
|
921
942
|
),
|
|
922
943
|
style: e.columnsCssVars
|
|
923
944
|
}, {}), [
|
|
924
|
-
e.TARGET !== "reactNative" ? (
|
|
945
|
+
e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
925
946
|
key: 0,
|
|
926
947
|
styles: e.columnsStyles
|
|
927
|
-
}, null, 8, ["styles"])) :
|
|
928
|
-
(
|
|
929
|
-
key:
|
|
948
|
+
}, null, 8, ["styles"])) : createCommentVNode("v-if", !0),
|
|
949
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (c, l) => (openBlock(), createElementBlock("div", mergeProps({
|
|
950
|
+
key: l,
|
|
930
951
|
class: "builder-column div-16nol0lwi20-2",
|
|
931
|
-
style: e.columnCssVars(
|
|
952
|
+
style: e.columnCssVars(l)
|
|
932
953
|
}, {}), [
|
|
933
|
-
|
|
934
|
-
path: `component.options.columns.${
|
|
954
|
+
createVNode(a, {
|
|
955
|
+
path: `component.options.columns.${l}.blocks`,
|
|
935
956
|
parent: e.builderBlock.id,
|
|
936
957
|
styleProp: {
|
|
937
958
|
flexGrow: "1"
|
|
938
959
|
},
|
|
939
960
|
context: e.builderContext,
|
|
940
961
|
registeredComponents: e.builderComponents,
|
|
941
|
-
blocks:
|
|
962
|
+
blocks: c.blocks
|
|
942
963
|
}, null, 8, ["path", "parent", "context", "registeredComponents", "blocks"])
|
|
943
964
|
], 16))), 128))
|
|
944
965
|
], 16);
|
|
945
966
|
}
|
|
946
|
-
const
|
|
967
|
+
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-7be099dc"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/columns/columns.vue"]]), _sfc_main$d = defineComponent({
|
|
947
968
|
name: "builder-fragment-component",
|
|
948
969
|
props: []
|
|
949
970
|
});
|
|
950
|
-
function
|
|
951
|
-
return
|
|
952
|
-
|
|
971
|
+
function _sfc_render$c(e, t, n, o, r, s) {
|
|
972
|
+
return openBlock(), createElementBlock("span", null, [
|
|
973
|
+
renderSlot(e.$slots, "default")
|
|
953
974
|
]);
|
|
954
975
|
}
|
|
955
|
-
const
|
|
956
|
-
function
|
|
976
|
+
const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/fragment/fragment.vue"]]);
|
|
977
|
+
function removeProtocol(e) {
|
|
957
978
|
return e.replace(/http(s)?:/, "");
|
|
958
979
|
}
|
|
959
|
-
function
|
|
980
|
+
function updateQueryParam(e = "", t, n) {
|
|
960
981
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
|
|
961
982
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
|
|
962
983
|
}
|
|
963
|
-
function
|
|
984
|
+
function getShopifyImageUrl(e, t) {
|
|
964
985
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
965
986
|
return e;
|
|
966
987
|
if (t === "master")
|
|
967
|
-
return
|
|
988
|
+
return removeProtocol(e);
|
|
968
989
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
969
990
|
if (n) {
|
|
970
|
-
const o = e.split(n[0]), r = n[3],
|
|
971
|
-
return
|
|
991
|
+
const o = e.split(n[0]), r = n[3], s = t.match("x") ? t : `${t}x`;
|
|
992
|
+
return removeProtocol(`${o[0]}_${s}${r}`);
|
|
972
993
|
}
|
|
973
994
|
return null;
|
|
974
995
|
}
|
|
975
|
-
function
|
|
996
|
+
function getSrcSet(e) {
|
|
976
997
|
if (!e)
|
|
977
998
|
return e;
|
|
978
999
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
979
1000
|
if (e.match(/builder\.io/)) {
|
|
980
1001
|
let n = e;
|
|
981
1002
|
const o = Number(e.split("?width=")[1]);
|
|
982
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${
|
|
1003
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${updateQueryParam(e, "width", r)} ${r}w`).concat([n]).join(", ");
|
|
983
1004
|
}
|
|
984
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1005
|
+
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;
|
|
985
1006
|
}
|
|
986
|
-
const
|
|
1007
|
+
const _sfc_main$c = defineComponent({
|
|
987
1008
|
name: "builder-image",
|
|
988
1009
|
props: [
|
|
989
1010
|
"image",
|
|
@@ -1007,10 +1028,10 @@ const tn = g({
|
|
|
1007
1028
|
return this.srcset;
|
|
1008
1029
|
if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
|
|
1009
1030
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1010
|
-
return console.debug("Removed given srcset"),
|
|
1031
|
+
return console.debug("Removed given srcset"), getSrcSet(t);
|
|
1011
1032
|
} else if (this.image && !this.srcset)
|
|
1012
|
-
return
|
|
1013
|
-
return
|
|
1033
|
+
return getSrcSet(t);
|
|
1034
|
+
return getSrcSet(t);
|
|
1014
1035
|
},
|
|
1015
1036
|
webpSrcSet() {
|
|
1016
1037
|
var e;
|
|
@@ -1038,30 +1059,29 @@ const tn = g({
|
|
|
1038
1059
|
return t;
|
|
1039
1060
|
}
|
|
1040
1061
|
}
|
|
1041
|
-
})
|
|
1042
|
-
const nn = ["srcset"], on = ["alt", "role", "src", "srcset", "sizes"], rn = {
|
|
1062
|
+
}), image_vue_vue_type_style_index_0_scoped_58ca75d1_lang = "", _hoisted_1$5 = ["srcset"], _hoisted_2$1 = ["alt", "role", "src", "srcset", "sizes"], _hoisted_3$1 = {
|
|
1043
1063
|
key: 2,
|
|
1044
1064
|
class: "div-1be3j8m9ewb-2"
|
|
1045
1065
|
};
|
|
1046
|
-
function
|
|
1047
|
-
var
|
|
1048
|
-
return
|
|
1049
|
-
|
|
1050
|
-
e.webpSrcSet ? (
|
|
1066
|
+
function _sfc_render$b(e, t, n, o, r, s) {
|
|
1067
|
+
var i, a, c, l;
|
|
1068
|
+
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
1069
|
+
createElementVNode("picture", null, [
|
|
1070
|
+
e.webpSrcSet ? (openBlock(), createElementBlock("source", {
|
|
1051
1071
|
key: 0,
|
|
1052
1072
|
type: "image/webp",
|
|
1053
1073
|
srcset: e.webpSrcSet
|
|
1054
|
-
}, null, 8,
|
|
1055
|
-
|
|
1074
|
+
}, null, 8, _hoisted_1$5)) : createCommentVNode("v-if", !0),
|
|
1075
|
+
createElementVNode("img", {
|
|
1056
1076
|
loading: "lazy",
|
|
1057
1077
|
alt: e.altText,
|
|
1058
1078
|
role: e.altText ? "presentation" : void 0,
|
|
1059
|
-
style:
|
|
1079
|
+
style: normalizeStyle({
|
|
1060
1080
|
objectPosition: e.backgroundPosition || "center",
|
|
1061
1081
|
objectFit: e.backgroundSize || "cover",
|
|
1062
1082
|
...e.aspectRatioCss
|
|
1063
1083
|
}),
|
|
1064
|
-
class:
|
|
1084
|
+
class: normalizeClass(
|
|
1065
1085
|
e._classStringToObject(
|
|
1066
1086
|
"builder-image" + (e.className ? " " + e.className : "") + " img-1be3j8m9ewb"
|
|
1067
1087
|
)
|
|
@@ -1069,30 +1089,30 @@ function sn(e, t, n, o, r, i) {
|
|
|
1069
1089
|
src: e.image,
|
|
1070
1090
|
srcset: e.srcSetToUse,
|
|
1071
1091
|
sizes: e.sizes
|
|
1072
|
-
}, null, 14,
|
|
1092
|
+
}, null, 14, _hoisted_2$1)
|
|
1073
1093
|
]),
|
|
1074
|
-
e.aspectRatio && !(((a = (
|
|
1094
|
+
e.aspectRatio && !(((a = (i = e.builderBlock) == null ? void 0 : i.children) == null ? void 0 : a.length) && e.fitContent) ? (openBlock(), createElementBlock("div", {
|
|
1075
1095
|
key: 0,
|
|
1076
1096
|
class: "builder-image-sizer div-1be3j8m9ewb",
|
|
1077
|
-
style:
|
|
1097
|
+
style: normalizeStyle({
|
|
1078
1098
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1079
1099
|
})
|
|
1080
|
-
}, null, 4)) :
|
|
1081
|
-
((
|
|
1082
|
-
!e.fitContent && e.$slots.default ? (
|
|
1083
|
-
|
|
1084
|
-
])) :
|
|
1100
|
+
}, null, 4)) : createCommentVNode("v-if", !0),
|
|
1101
|
+
((l = (c = e.builderBlock) == null ? void 0 : c.children) == null ? void 0 : l.length) && e.fitContent ? renderSlot(e.$slots, "default", { key: 1 }, void 0, !0) : createCommentVNode("v-if", !0),
|
|
1102
|
+
!e.fitContent && e.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1103
|
+
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
1104
|
+
])) : createCommentVNode("v-if", !0)
|
|
1085
1105
|
], 64);
|
|
1086
1106
|
}
|
|
1087
|
-
const
|
|
1107
|
+
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-58ca75d1"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/image/image.vue"]]), _sfc_main$b = defineComponent({
|
|
1088
1108
|
name: "builder-section-component",
|
|
1089
1109
|
props: ["attributes", "maxWidth"],
|
|
1090
1110
|
data() {
|
|
1091
|
-
return { filterAttrs
|
|
1111
|
+
return { filterAttrs };
|
|
1092
1112
|
}
|
|
1093
1113
|
});
|
|
1094
|
-
function
|
|
1095
|
-
return
|
|
1114
|
+
function _sfc_render$a(e, t, n, o, r, s) {
|
|
1115
|
+
return openBlock(), createElementBlock("section", mergeProps({
|
|
1096
1116
|
style: {
|
|
1097
1117
|
width: "100%",
|
|
1098
1118
|
alignSelf: "stretch",
|
|
@@ -1105,16 +1125,16 @@ function cn(e, t, n, o, r, i) {
|
|
|
1105
1125
|
marginLeft: "auto",
|
|
1106
1126
|
marginRight: "auto"
|
|
1107
1127
|
}
|
|
1108
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
1109
|
-
|
|
1128
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
1129
|
+
renderSlot(e.$slots, "default")
|
|
1110
1130
|
], 16);
|
|
1111
1131
|
}
|
|
1112
|
-
const
|
|
1132
|
+
const Section = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/section/section.vue"]]), getTopLevelDomain = (e) => {
|
|
1113
1133
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1114
1134
|
return e;
|
|
1115
1135
|
const t = e.split(".");
|
|
1116
1136
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
1117
|
-
},
|
|
1137
|
+
}, getCookieSync = ({
|
|
1118
1138
|
name: e,
|
|
1119
1139
|
canTrack: t
|
|
1120
1140
|
}) => {
|
|
@@ -1122,17 +1142,17 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1122
1142
|
try {
|
|
1123
1143
|
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
1124
1144
|
} catch (o) {
|
|
1125
|
-
|
|
1145
|
+
logger.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
1126
1146
|
return;
|
|
1127
1147
|
}
|
|
1128
|
-
},
|
|
1148
|
+
}, getCookie = async (e) => getCookieSync(e), stringifyCookie = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(checkIsDefined).join("; "), SECURE_CONFIG = [["secure", ""], ["SameSite", "None"]], createCookieString = ({
|
|
1129
1149
|
name: e,
|
|
1130
1150
|
value: t,
|
|
1131
1151
|
expires: n
|
|
1132
1152
|
}) => {
|
|
1133
|
-
const r = (
|
|
1134
|
-
return
|
|
1135
|
-
},
|
|
1153
|
+
const r = (isBrowser() ? location.protocol === "https:" : !0) ? SECURE_CONFIG : [[]], s = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...s, ["path", "/"], ["domain", getTopLevelDomain(window.location.hostname)], ...r];
|
|
1154
|
+
return stringifyCookie(i);
|
|
1155
|
+
}, setCookie = async ({
|
|
1136
1156
|
name: e,
|
|
1137
1157
|
value: t,
|
|
1138
1158
|
expires: n,
|
|
@@ -1141,54 +1161,54 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1141
1161
|
try {
|
|
1142
1162
|
if (!o)
|
|
1143
1163
|
return;
|
|
1144
|
-
const r =
|
|
1164
|
+
const r = createCookieString({
|
|
1145
1165
|
name: e,
|
|
1146
1166
|
value: t,
|
|
1147
1167
|
expires: n
|
|
1148
1168
|
});
|
|
1149
1169
|
document.cookie = r;
|
|
1150
1170
|
} catch (r) {
|
|
1151
|
-
|
|
1171
|
+
logger.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
1152
1172
|
}
|
|
1153
|
-
},
|
|
1173
|
+
}, BUILDER_STORE_PREFIX = "builder.tests", getContentTestKey = (e) => `${BUILDER_STORE_PREFIX}.${e}`, getContentVariationCookie = ({
|
|
1154
1174
|
contentId: e
|
|
1155
|
-
}) =>
|
|
1156
|
-
name:
|
|
1175
|
+
}) => getCookie({
|
|
1176
|
+
name: getContentTestKey(e),
|
|
1157
1177
|
canTrack: !0
|
|
1158
|
-
}),
|
|
1178
|
+
}), getContentVariationCookieSync = ({
|
|
1159
1179
|
contentId: e
|
|
1160
|
-
}) =>
|
|
1161
|
-
name:
|
|
1180
|
+
}) => getCookieSync({
|
|
1181
|
+
name: getContentTestKey(e),
|
|
1162
1182
|
canTrack: !0
|
|
1163
|
-
}),
|
|
1183
|
+
}), setContentVariationCookie = ({
|
|
1164
1184
|
contentId: e,
|
|
1165
1185
|
value: t
|
|
1166
|
-
}) =>
|
|
1167
|
-
name:
|
|
1186
|
+
}) => setCookie({
|
|
1187
|
+
name: getContentTestKey(e),
|
|
1168
1188
|
value: t,
|
|
1169
1189
|
canTrack: !0
|
|
1170
|
-
}),
|
|
1190
|
+
}), checkIsBuilderContentWithVariations = (e) => checkIsDefined(e.id) && checkIsDefined(e.variations) && Object.keys(e.variations).length > 0, getRandomVariationId = ({
|
|
1171
1191
|
id: e,
|
|
1172
1192
|
variations: t
|
|
1173
1193
|
}) => {
|
|
1174
1194
|
var r;
|
|
1175
1195
|
let n = 0;
|
|
1176
1196
|
const o = Math.random();
|
|
1177
|
-
for (const
|
|
1178
|
-
const
|
|
1179
|
-
if (n +=
|
|
1180
|
-
return
|
|
1197
|
+
for (const s in t) {
|
|
1198
|
+
const i = (r = t[s]) == null ? void 0 : r.testRatio;
|
|
1199
|
+
if (n += i, o < n)
|
|
1200
|
+
return s;
|
|
1181
1201
|
}
|
|
1182
1202
|
return e;
|
|
1183
|
-
},
|
|
1184
|
-
const t =
|
|
1185
|
-
return
|
|
1203
|
+
}, getAndSetVariantId = (e) => {
|
|
1204
|
+
const t = getRandomVariationId(e);
|
|
1205
|
+
return setContentVariationCookie({
|
|
1186
1206
|
contentId: e.id,
|
|
1187
1207
|
value: t
|
|
1188
1208
|
}).catch((n) => {
|
|
1189
|
-
|
|
1209
|
+
logger.error("could not store A/B test variation: ", n);
|
|
1190
1210
|
}), t;
|
|
1191
|
-
},
|
|
1211
|
+
}, getTestFields = ({
|
|
1192
1212
|
item: e,
|
|
1193
1213
|
testGroupId: t
|
|
1194
1214
|
}) => {
|
|
@@ -1201,7 +1221,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1201
1221
|
testVariationId: n.id,
|
|
1202
1222
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1203
1223
|
};
|
|
1204
|
-
},
|
|
1224
|
+
}, handleABTestingSync = ({
|
|
1205
1225
|
item: e,
|
|
1206
1226
|
canTrack: t
|
|
1207
1227
|
}) => {
|
|
@@ -1209,14 +1229,14 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1209
1229
|
return e;
|
|
1210
1230
|
if (!e)
|
|
1211
1231
|
return;
|
|
1212
|
-
if (!
|
|
1232
|
+
if (!checkIsBuilderContentWithVariations(e))
|
|
1213
1233
|
return e;
|
|
1214
|
-
const n =
|
|
1234
|
+
const n = getContentVariationCookieSync({
|
|
1215
1235
|
contentId: e.id
|
|
1216
|
-
}) ||
|
|
1236
|
+
}) || getAndSetVariantId({
|
|
1217
1237
|
variations: e.variations,
|
|
1218
1238
|
id: e.id
|
|
1219
|
-
}), o =
|
|
1239
|
+
}), o = getTestFields({
|
|
1220
1240
|
item: e,
|
|
1221
1241
|
testGroupId: n
|
|
1222
1242
|
});
|
|
@@ -1224,18 +1244,18 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1224
1244
|
...e,
|
|
1225
1245
|
...o
|
|
1226
1246
|
};
|
|
1227
|
-
},
|
|
1247
|
+
}, handleABTesting = async ({
|
|
1228
1248
|
item: e,
|
|
1229
1249
|
canTrack: t
|
|
1230
1250
|
}) => {
|
|
1231
|
-
if (!t || !
|
|
1251
|
+
if (!t || !checkIsBuilderContentWithVariations(e))
|
|
1232
1252
|
return e;
|
|
1233
|
-
const o = await
|
|
1253
|
+
const o = await getContentVariationCookie({
|
|
1234
1254
|
contentId: e.id
|
|
1235
|
-
}) ||
|
|
1255
|
+
}) || getAndSetVariantId({
|
|
1236
1256
|
variations: e.variations,
|
|
1237
1257
|
id: e.id
|
|
1238
|
-
}), r =
|
|
1258
|
+
}), r = getTestFields({
|
|
1239
1259
|
item: e,
|
|
1240
1260
|
testGroupId: o
|
|
1241
1261
|
});
|
|
@@ -1243,7 +1263,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1243
1263
|
...e,
|
|
1244
1264
|
...r
|
|
1245
1265
|
};
|
|
1246
|
-
},
|
|
1266
|
+
}, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0, componentInfo$a = {
|
|
1247
1267
|
name: "Core:Button",
|
|
1248
1268
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1249
1269
|
defaultStyles: {
|
|
@@ -1275,7 +1295,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1275
1295
|
}],
|
|
1276
1296
|
static: !0,
|
|
1277
1297
|
noWrap: !0
|
|
1278
|
-
},
|
|
1298
|
+
}, componentInfo$9 = {
|
|
1279
1299
|
name: "Columns",
|
|
1280
1300
|
isRSC: !0,
|
|
1281
1301
|
inputs: [{
|
|
@@ -1453,7 +1473,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1453
1473
|
});
|
|
1454
1474
|
}
|
|
1455
1475
|
const n = e.get("columns");
|
|
1456
|
-
Array.isArray(n) && !!n.find((r) => r.get("width")) && (!!n.find((
|
|
1476
|
+
Array.isArray(n) && !!n.find((r) => r.get("width")) && (!!n.find((s) => !s.get("width")) || n.reduce((a, c) => a + c.get("width"), 0) !== 100) && t();
|
|
1457
1477
|
}
|
|
1458
1478
|
}, {
|
|
1459
1479
|
name: "space",
|
|
@@ -1475,7 +1495,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1475
1495
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1476
1496
|
advanced: !0
|
|
1477
1497
|
}]
|
|
1478
|
-
},
|
|
1498
|
+
}, componentInfo$8 = {
|
|
1479
1499
|
name: "Custom Code",
|
|
1480
1500
|
static: !0,
|
|
1481
1501
|
requiredPermissions: ["editCode"],
|
|
@@ -1497,7 +1517,7 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1497
1517
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1498
1518
|
advanced: !0
|
|
1499
1519
|
}]
|
|
1500
|
-
}, $
|
|
1520
|
+
}, _sfc_main$a = defineComponent({
|
|
1501
1521
|
name: "builder-custom-code",
|
|
1502
1522
|
props: ["replaceNodes", "code"],
|
|
1503
1523
|
data() {
|
|
@@ -1542,19 +1562,19 @@ const dn = /* @__PURE__ */ y(ln, [["render", cn], ["__file", "/home/runner/work/
|
|
|
1542
1562
|
return t;
|
|
1543
1563
|
}
|
|
1544
1564
|
}
|
|
1545
|
-
}),
|
|
1546
|
-
function
|
|
1547
|
-
return
|
|
1565
|
+
}), _hoisted_1$4 = ["innerHTML"];
|
|
1566
|
+
function _sfc_render$9(e, t, n, o, r, s) {
|
|
1567
|
+
return openBlock(), createElementBlock("div", {
|
|
1548
1568
|
ref: "elementRef",
|
|
1549
|
-
class:
|
|
1569
|
+
class: normalizeClass(
|
|
1550
1570
|
e._classStringToObject(
|
|
1551
1571
|
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1552
1572
|
)
|
|
1553
1573
|
),
|
|
1554
1574
|
innerHTML: e.code
|
|
1555
|
-
}, null, 10,
|
|
1575
|
+
}, null, 10, _hoisted_1$4);
|
|
1556
1576
|
}
|
|
1557
|
-
const
|
|
1577
|
+
const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/custom-code/custom-code.vue"]]), componentInfo$7 = {
|
|
1558
1578
|
name: "Embed",
|
|
1559
1579
|
static: !0,
|
|
1560
1580
|
inputs: [{
|
|
@@ -1579,7 +1599,7 @@ const xn = /* @__PURE__ */ y($n, [["render", Rn], ["__file", "/home/runner/work/
|
|
|
1579
1599
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1580
1600
|
hideFromUI: !0
|
|
1581
1601
|
}]
|
|
1582
|
-
},
|
|
1602
|
+
}, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type), _sfc_main$9 = defineComponent({
|
|
1583
1603
|
name: "builder-embed",
|
|
1584
1604
|
props: ["content"],
|
|
1585
1605
|
data() {
|
|
@@ -1612,7 +1632,7 @@ const xn = /* @__PURE__ */ y($n, [["render", Rn], ["__file", "/home/runner/work/
|
|
|
1612
1632
|
this.scriptsInserted.push(n.src);
|
|
1613
1633
|
const o = document.createElement("script");
|
|
1614
1634
|
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1615
|
-
} else if (
|
|
1635
|
+
} else if (isJsScript(n) && !this.scriptsRun.includes(n.innerText))
|
|
1616
1636
|
try {
|
|
1617
1637
|
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1618
1638
|
} catch (o) {
|
|
@@ -1621,21 +1641,21 @@ const xn = /* @__PURE__ */ y($n, [["render", Rn], ["__file", "/home/runner/work/
|
|
|
1621
1641
|
}
|
|
1622
1642
|
}
|
|
1623
1643
|
}
|
|
1624
|
-
}),
|
|
1625
|
-
function
|
|
1626
|
-
return
|
|
1644
|
+
}), _hoisted_1$3 = ["innerHTML"];
|
|
1645
|
+
function _sfc_render$8(e, t, n, o, r, s) {
|
|
1646
|
+
return openBlock(), createElementBlock("div", {
|
|
1627
1647
|
class: "builder-embed",
|
|
1628
1648
|
ref: "elem",
|
|
1629
1649
|
innerHTML: e.content
|
|
1630
|
-
}, null, 8,
|
|
1650
|
+
}, null, 8, _hoisted_1$3);
|
|
1631
1651
|
}
|
|
1632
|
-
const
|
|
1652
|
+
const embed = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/embed/embed.vue"]]), componentInfo$6 = {
|
|
1633
1653
|
name: "Fragment",
|
|
1634
1654
|
static: !0,
|
|
1635
1655
|
hidden: !0,
|
|
1636
1656
|
canHaveChildren: !0,
|
|
1637
1657
|
noWrap: !0
|
|
1638
|
-
},
|
|
1658
|
+
}, componentInfo$5 = {
|
|
1639
1659
|
name: "Image",
|
|
1640
1660
|
static: !0,
|
|
1641
1661
|
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",
|
|
@@ -1655,29 +1675,29 @@ const On = /* @__PURE__ */ y(Pn, [["render", Vn], ["__file", "/home/runner/work/
|
|
|
1655
1675
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1656
1676
|
onChange: (e) => {
|
|
1657
1677
|
e.delete("srcset"), e.delete("noWebp");
|
|
1658
|
-
function n(
|
|
1659
|
-
return new Promise((
|
|
1660
|
-
const
|
|
1661
|
-
let
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
},
|
|
1665
|
-
console.warn("Image load failed",
|
|
1666
|
-
}),
|
|
1667
|
-
|
|
1678
|
+
function n(i, a = 6e4) {
|
|
1679
|
+
return new Promise((c, l) => {
|
|
1680
|
+
const d = document.createElement("img");
|
|
1681
|
+
let u = !1;
|
|
1682
|
+
d.onload = () => {
|
|
1683
|
+
u = !0, c(d);
|
|
1684
|
+
}, d.addEventListener("error", (p) => {
|
|
1685
|
+
console.warn("Image load failed", p.error), l(p.error);
|
|
1686
|
+
}), d.src = i, setTimeout(() => {
|
|
1687
|
+
u || l(new Error("Image load timed out"));
|
|
1668
1688
|
}, a);
|
|
1669
1689
|
});
|
|
1670
1690
|
}
|
|
1671
|
-
function o(
|
|
1672
|
-
return Math.round(
|
|
1691
|
+
function o(i) {
|
|
1692
|
+
return Math.round(i * 1e3) / 1e3;
|
|
1673
1693
|
}
|
|
1674
|
-
const r = e.get("image"),
|
|
1675
|
-
if (fetch(r).then((
|
|
1676
|
-
|
|
1677
|
-
}), r && (!
|
|
1678
|
-
return n(r).then((
|
|
1694
|
+
const r = e.get("image"), s = e.get("aspectRatio");
|
|
1695
|
+
if (fetch(r).then((i) => i.blob()).then((i) => {
|
|
1696
|
+
i.type.includes("svg") && e.set("noWebp", !0);
|
|
1697
|
+
}), r && (!s || s === 0.7041))
|
|
1698
|
+
return n(r).then((i) => {
|
|
1679
1699
|
const a = e.get("aspectRatio");
|
|
1680
|
-
e.get("image") === r && (!a || a === 0.7041) &&
|
|
1700
|
+
e.get("image") === r && (!a || a === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
|
|
1681
1701
|
});
|
|
1682
1702
|
}
|
|
1683
1703
|
}, {
|
|
@@ -1735,7 +1755,7 @@ const On = /* @__PURE__ */ y(Pn, [["render", Vn], ["__file", "/home/runner/work/
|
|
|
1735
1755
|
advanced: !0,
|
|
1736
1756
|
defaultValue: 0.7041
|
|
1737
1757
|
}]
|
|
1738
|
-
},
|
|
1758
|
+
}, componentInfo$4 = {
|
|
1739
1759
|
name: "Raw:Img",
|
|
1740
1760
|
hideFromInsertMenu: !0,
|
|
1741
1761
|
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",
|
|
@@ -1748,7 +1768,7 @@ const On = /* @__PURE__ */ y(Pn, [["render", Vn], ["__file", "/home/runner/work/
|
|
|
1748
1768
|
}],
|
|
1749
1769
|
noWrap: !0,
|
|
1750
1770
|
static: !0
|
|
1751
|
-
},
|
|
1771
|
+
}, _sfc_main$8 = defineComponent({
|
|
1752
1772
|
name: "builder-img-component",
|
|
1753
1773
|
props: [
|
|
1754
1774
|
"backgroundSize",
|
|
@@ -1759,11 +1779,11 @@ const On = /* @__PURE__ */ y(Pn, [["render", Vn], ["__file", "/home/runner/work/
|
|
|
1759
1779
|
"attributes"
|
|
1760
1780
|
],
|
|
1761
1781
|
data() {
|
|
1762
|
-
return { isEditing
|
|
1782
|
+
return { isEditing, filterAttrs };
|
|
1763
1783
|
}
|
|
1764
|
-
}),
|
|
1765
|
-
function
|
|
1766
|
-
return
|
|
1784
|
+
}), _hoisted_1$2 = ["alt", "src"];
|
|
1785
|
+
function _sfc_render$7(e, t, n, o, r, s) {
|
|
1786
|
+
return openBlock(), createElementBlock("img", mergeProps({
|
|
1767
1787
|
style: {
|
|
1768
1788
|
objectFit: e.backgroundSize || "cover",
|
|
1769
1789
|
objectPosition: e.backgroundPosition || "center"
|
|
@@ -1771,9 +1791,9 @@ function Ln(e, t, n, o, r, i) {
|
|
|
1771
1791
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
1772
1792
|
alt: e.altText,
|
|
1773
1793
|
src: e.imgSrc || e.image
|
|
1774
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
1794
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$2);
|
|
1775
1795
|
}
|
|
1776
|
-
const
|
|
1796
|
+
const Img = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/img/img.vue"]]), componentInfo$3 = {
|
|
1777
1797
|
name: "Core:Section",
|
|
1778
1798
|
static: !0,
|
|
1779
1799
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1812,7 +1832,7 @@ const Wn = /* @__PURE__ */ y(Fn, [["render", Ln], ["__file", "/home/runner/work/
|
|
|
1812
1832
|
}
|
|
1813
1833
|
}
|
|
1814
1834
|
}]
|
|
1815
|
-
},
|
|
1835
|
+
}, componentInfo$2 = {
|
|
1816
1836
|
name: "Symbol",
|
|
1817
1837
|
noWrap: !0,
|
|
1818
1838
|
static: !0,
|
|
@@ -1845,7 +1865,7 @@ const Wn = /* @__PURE__ */ y(Fn, [["render", Ln], ["__file", "/home/runner/work/
|
|
|
1845
1865
|
hideFromUI: !0,
|
|
1846
1866
|
type: "boolean"
|
|
1847
1867
|
}]
|
|
1848
|
-
},
|
|
1868
|
+
}, componentInfo$1 = {
|
|
1849
1869
|
name: "Text",
|
|
1850
1870
|
static: !0,
|
|
1851
1871
|
isRSC: !0,
|
|
@@ -1863,21 +1883,21 @@ const Wn = /* @__PURE__ */ y(Fn, [["render", Ln], ["__file", "/home/runner/work/
|
|
|
1863
1883
|
height: "auto",
|
|
1864
1884
|
textAlign: "center"
|
|
1865
1885
|
}
|
|
1866
|
-
},
|
|
1886
|
+
}, _sfc_main$7 = defineComponent({
|
|
1867
1887
|
name: "builder-text",
|
|
1868
1888
|
props: ["text"]
|
|
1869
|
-
}),
|
|
1870
|
-
function
|
|
1871
|
-
var
|
|
1872
|
-
return
|
|
1889
|
+
}), _hoisted_1$1 = ["innerHTML"];
|
|
1890
|
+
function _sfc_render$6(e, t, n, o, r, s) {
|
|
1891
|
+
var i;
|
|
1892
|
+
return openBlock(), createElementBlock("div", {
|
|
1873
1893
|
class: "builder-text",
|
|
1874
|
-
innerHTML: ((
|
|
1894
|
+
innerHTML: ((i = e.text) == null ? void 0 : i.toString()) || "",
|
|
1875
1895
|
style: {
|
|
1876
1896
|
outline: "none"
|
|
1877
1897
|
}
|
|
1878
|
-
}, null, 8,
|
|
1898
|
+
}, null, 8, _hoisted_1$1);
|
|
1879
1899
|
}
|
|
1880
|
-
const
|
|
1900
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/text/text.vue"]]), componentInfo = {
|
|
1881
1901
|
name: "Video",
|
|
1882
1902
|
canHaveChildren: !0,
|
|
1883
1903
|
defaultStyles: {
|
|
@@ -1958,7 +1978,7 @@ const Jn = /* @__PURE__ */ y(zn, [["render", Gn], ["__file", "/home/runner/work/
|
|
|
1958
1978
|
defaultValue: !0,
|
|
1959
1979
|
advanced: !0
|
|
1960
1980
|
}]
|
|
1961
|
-
},
|
|
1981
|
+
}, _sfc_main$6 = defineComponent({
|
|
1962
1982
|
name: "builder-video",
|
|
1963
1983
|
props: [
|
|
1964
1984
|
"autoPlay",
|
|
@@ -2003,16 +2023,16 @@ const Jn = /* @__PURE__ */ y(zn, [["render", Gn], ["__file", "/home/runner/work/
|
|
|
2003
2023
|
};
|
|
2004
2024
|
}
|
|
2005
2025
|
}
|
|
2006
|
-
}),
|
|
2026
|
+
}), _hoisted_1 = { style: {
|
|
2007
2027
|
position: "relative"
|
|
2008
|
-
} },
|
|
2028
|
+
} }, _hoisted_2 = ["preload", "src", "poster"], _hoisted_3 = ["src"], _hoisted_4 = {
|
|
2009
2029
|
key: 1,
|
|
2010
2030
|
style: {
|
|
2011
2031
|
display: "flex",
|
|
2012
2032
|
flexDirection: "column",
|
|
2013
2033
|
alignItems: "stretch"
|
|
2014
2034
|
}
|
|
2015
|
-
},
|
|
2035
|
+
}, _hoisted_5 = {
|
|
2016
2036
|
key: 2,
|
|
2017
2037
|
style: {
|
|
2018
2038
|
pointerEvents: "none",
|
|
@@ -2026,16 +2046,16 @@ const Jn = /* @__PURE__ */ y(zn, [["render", Gn], ["__file", "/home/runner/work/
|
|
|
2026
2046
|
height: "100%"
|
|
2027
2047
|
}
|
|
2028
2048
|
};
|
|
2029
|
-
function
|
|
2030
|
-
var
|
|
2031
|
-
return
|
|
2032
|
-
|
|
2049
|
+
function _sfc_render$5(e, t, n, o, r, s) {
|
|
2050
|
+
var i, a, c, l, d, u, p;
|
|
2051
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2052
|
+
createElementVNode("video", mergeProps({
|
|
2033
2053
|
class: "builder-video",
|
|
2034
2054
|
preload: e.preload || "metadata",
|
|
2035
2055
|
style: {
|
|
2036
2056
|
width: "100%",
|
|
2037
2057
|
height: "100%",
|
|
2038
|
-
...(
|
|
2058
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
2039
2059
|
objectFit: e.fit,
|
|
2040
2060
|
objectPosition: e.position,
|
|
2041
2061
|
zIndex: 2,
|
|
@@ -2047,78 +2067,78 @@ function oo(e, t, n, o, r, i) {
|
|
|
2047
2067
|
src: e.video || "no-src",
|
|
2048
2068
|
poster: e.posterImage
|
|
2049
2069
|
}, e.spreadProps), [
|
|
2050
|
-
e.lazyLoad ?
|
|
2070
|
+
e.lazyLoad ? createCommentVNode("v-if", !0) : (openBlock(), createElementBlock("source", {
|
|
2051
2071
|
key: 0,
|
|
2052
2072
|
type: "video/mp4",
|
|
2053
2073
|
src: e.video
|
|
2054
|
-
}, null, 8,
|
|
2055
|
-
], 16,
|
|
2056
|
-
e.aspectRatio && !(e.fitContent && ((
|
|
2074
|
+
}, null, 8, _hoisted_3))
|
|
2075
|
+
], 16, _hoisted_2),
|
|
2076
|
+
e.aspectRatio && !(e.fitContent && ((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length)) ? (openBlock(), createElementBlock("div", {
|
|
2057
2077
|
key: 0,
|
|
2058
|
-
style:
|
|
2078
|
+
style: normalizeStyle({
|
|
2059
2079
|
width: "100%",
|
|
2060
2080
|
paddingTop: e.aspectRatio * 100 + "%",
|
|
2061
2081
|
pointerEvents: "none",
|
|
2062
2082
|
fontSize: "0px"
|
|
2063
2083
|
})
|
|
2064
|
-
}, null, 4)) :
|
|
2065
|
-
((
|
|
2066
|
-
|
|
2067
|
-
])) :
|
|
2068
|
-
((
|
|
2069
|
-
|
|
2070
|
-
])) :
|
|
2084
|
+
}, null, 4)) : createCommentVNode("v-if", !0),
|
|
2085
|
+
((d = (l = e.builderBlock) == null ? void 0 : l.children) == null ? void 0 : d.length) && e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2086
|
+
renderSlot(e.$slots, "default")
|
|
2087
|
+
])) : createCommentVNode("v-if", !0),
|
|
2088
|
+
((p = (u = e.builderBlock) == null ? void 0 : u.children) == null ? void 0 : p.length) && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2089
|
+
renderSlot(e.$slots, "default")
|
|
2090
|
+
])) : createCommentVNode("v-if", !0)
|
|
2071
2091
|
]);
|
|
2072
2092
|
}
|
|
2073
|
-
const
|
|
2074
|
-
component:
|
|
2075
|
-
...
|
|
2093
|
+
const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/video/video.vue"]]), getDefaultRegisteredComponents = () => [{
|
|
2094
|
+
component: Button,
|
|
2095
|
+
...componentInfo$a
|
|
2076
2096
|
}, {
|
|
2077
|
-
component:
|
|
2078
|
-
...
|
|
2097
|
+
component: Columns,
|
|
2098
|
+
...componentInfo$9
|
|
2079
2099
|
}, {
|
|
2080
|
-
component:
|
|
2081
|
-
...
|
|
2100
|
+
component: customCode,
|
|
2101
|
+
...componentInfo$8
|
|
2082
2102
|
}, {
|
|
2083
|
-
component:
|
|
2084
|
-
...
|
|
2103
|
+
component: embed,
|
|
2104
|
+
...componentInfo$7
|
|
2085
2105
|
}, {
|
|
2086
|
-
component:
|
|
2087
|
-
...
|
|
2106
|
+
component: Fragment,
|
|
2107
|
+
...componentInfo$6
|
|
2088
2108
|
}, {
|
|
2089
|
-
component:
|
|
2090
|
-
...
|
|
2109
|
+
component: Image,
|
|
2110
|
+
...componentInfo$5
|
|
2091
2111
|
}, {
|
|
2092
|
-
component:
|
|
2093
|
-
...
|
|
2112
|
+
component: Img,
|
|
2113
|
+
...componentInfo$4
|
|
2094
2114
|
}, {
|
|
2095
|
-
component:
|
|
2096
|
-
...
|
|
2115
|
+
component: Section,
|
|
2116
|
+
...componentInfo$3
|
|
2097
2117
|
}, {
|
|
2098
|
-
component:
|
|
2099
|
-
...
|
|
2118
|
+
component: Symbol$1,
|
|
2119
|
+
...componentInfo$2
|
|
2100
2120
|
}, {
|
|
2101
|
-
component:
|
|
2102
|
-
...
|
|
2121
|
+
component: Text,
|
|
2122
|
+
...componentInfo$1
|
|
2103
2123
|
}, {
|
|
2104
|
-
component:
|
|
2105
|
-
...
|
|
2106
|
-
}],
|
|
2124
|
+
component: Video,
|
|
2125
|
+
...componentInfo
|
|
2126
|
+
}], components = [], createRegisterComponentMessage = (e) => ({
|
|
2107
2127
|
type: "builder.registerComponent",
|
|
2108
|
-
data:
|
|
2109
|
-
}),
|
|
2128
|
+
data: serializeComponentInfo(e)
|
|
2129
|
+
}), serializeFn = (e) => {
|
|
2110
2130
|
const t = e.toString().trim();
|
|
2111
2131
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
2112
|
-
},
|
|
2132
|
+
}, serializeValue = (e) => typeof e == "function" ? serializeFn(e) : fastClone(e), serializeComponentInfo = ({
|
|
2113
2133
|
inputs: e,
|
|
2114
2134
|
...t
|
|
2115
2135
|
}) => ({
|
|
2116
|
-
...
|
|
2117
|
-
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [r,
|
|
2136
|
+
...fastClone(t),
|
|
2137
|
+
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [r, s]) => ({
|
|
2118
2138
|
...o,
|
|
2119
|
-
[r]:
|
|
2139
|
+
[r]: serializeValue(s)
|
|
2120
2140
|
}), {}))
|
|
2121
|
-
}),
|
|
2141
|
+
}), UPDATE_COOKIES_AND_STYLES_SCRIPT = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2122
2142
|
function getAndSetVariantId() {
|
|
2123
2143
|
function setCookie(name, value, days) {
|
|
2124
2144
|
let expires = '';
|
|
@@ -2174,7 +2194,7 @@ const ro = /* @__PURE__ */ y(Qn, [["render", oo], ["__file", "/home/runner/work/
|
|
|
2174
2194
|
}).join('');
|
|
2175
2195
|
styleEl.innerHTML = newStyleStr;
|
|
2176
2196
|
}
|
|
2177
|
-
}`,
|
|
2197
|
+
}`, UPDATE_VARIANT_VISIBILITY_SCRIPT = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2178
2198
|
if (!navigator.cookieEnabled) {
|
|
2179
2199
|
return;
|
|
2180
2200
|
}
|
|
@@ -2208,75 +2228,75 @@ const ro = /* @__PURE__ */ y(Qn, [["render", oo], ["__file", "/home/runner/work/
|
|
|
2208
2228
|
thisScriptEl?.remove();
|
|
2209
2229
|
}
|
|
2210
2230
|
return;
|
|
2211
|
-
}`,
|
|
2231
|
+
}`, UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest", UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME = "builderIoRenderContent", getVariants = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2212
2232
|
...t,
|
|
2213
2233
|
testVariationId: t.id,
|
|
2214
2234
|
id: e == null ? void 0 : e.id
|
|
2215
|
-
})),
|
|
2235
|
+
})), checkShouldRenderVariants = ({
|
|
2216
2236
|
canTrack: e,
|
|
2217
2237
|
content: t
|
|
2218
|
-
}) => !(!(
|
|
2219
|
-
window.${
|
|
2220
|
-
window.${
|
|
2221
|
-
`,
|
|
2222
|
-
window.${
|
|
2223
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2224
|
-
)`,
|
|
2238
|
+
}) => !(!(getVariants(t).length > 0) || !e), getIsHydrationTarget = (e) => e === "react" || e === "reactNative", isHydrationTarget = getIsHydrationTarget(TARGET), getScriptString = () => `
|
|
2239
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
2240
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
2241
|
+
`, getUpdateCookieAndStylesScript = (e, t) => `
|
|
2242
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
2243
|
+
"${t}",${JSON.stringify(e)}, ${isHydrationTarget}
|
|
2244
|
+
)`, getUpdateVariantVisibilityScript = ({
|
|
2225
2245
|
contentId: e,
|
|
2226
2246
|
variationId: t
|
|
2227
|
-
}) => `window.${
|
|
2228
|
-
"${t}", "${e}", ${
|
|
2229
|
-
)`,
|
|
2247
|
+
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
2248
|
+
"${t}", "${e}", ${isHydrationTarget}
|
|
2249
|
+
)`, _sfc_main$5 = defineComponent({
|
|
2230
2250
|
render() {
|
|
2231
|
-
return
|
|
2251
|
+
return h("script", { id: this.id, innerHTML: this.scriptStr });
|
|
2232
2252
|
},
|
|
2233
2253
|
name: "inlined-script",
|
|
2234
2254
|
props: ["scriptStr", "id"]
|
|
2235
|
-
}),
|
|
2236
|
-
function
|
|
2255
|
+
}), InlinedScript = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/inlined-script.vue"]]);
|
|
2256
|
+
function getGlobalThis() {
|
|
2237
2257
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
2238
2258
|
}
|
|
2239
|
-
function
|
|
2240
|
-
const e =
|
|
2259
|
+
function getFetch() {
|
|
2260
|
+
const e = getGlobalThis().fetch;
|
|
2241
2261
|
if (typeof e > "u")
|
|
2242
2262
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
2243
2263
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
2244
2264
|
return e;
|
|
2245
2265
|
}
|
|
2246
|
-
const
|
|
2247
|
-
function
|
|
2266
|
+
const fetch$1 = getFetch();
|
|
2267
|
+
function flatten(e, t = null, n = ".") {
|
|
2248
2268
|
return Object.keys(e).reduce((o, r) => {
|
|
2249
|
-
const
|
|
2250
|
-
return [typeof
|
|
2269
|
+
const s = e[r], i = [t, r].filter(Boolean).join(n);
|
|
2270
|
+
return [typeof s == "object", s !== null, !(Array.isArray(s) && s.length === 0)].every(Boolean) ? {
|
|
2251
2271
|
...o,
|
|
2252
|
-
...
|
|
2272
|
+
...flatten(s, i, n)
|
|
2253
2273
|
} : {
|
|
2254
2274
|
...o,
|
|
2255
|
-
[
|
|
2275
|
+
[i]: s
|
|
2256
2276
|
};
|
|
2257
2277
|
}, {});
|
|
2258
2278
|
}
|
|
2259
|
-
const
|
|
2279
|
+
const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUILDER_OPTIONS_PREFIX = "options.", convertSearchParamsToQueryObject = (e) => {
|
|
2260
2280
|
const t = {};
|
|
2261
2281
|
return e.forEach((n, o) => {
|
|
2262
2282
|
t[o] = n;
|
|
2263
2283
|
}), t;
|
|
2264
|
-
},
|
|
2284
|
+
}, getBuilderSearchParams = (e) => {
|
|
2265
2285
|
if (!e)
|
|
2266
2286
|
return {};
|
|
2267
|
-
const t =
|
|
2287
|
+
const t = normalizeSearchParams(e), n = {};
|
|
2268
2288
|
return Object.keys(t).forEach((o) => {
|
|
2269
|
-
if (o.startsWith(
|
|
2270
|
-
const r = o.replace(
|
|
2289
|
+
if (o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)) {
|
|
2290
|
+
const r = o.replace(BUILDER_SEARCHPARAMS_PREFIX, "").replace(BUILDER_OPTIONS_PREFIX, "");
|
|
2271
2291
|
n[r] = t[o];
|
|
2272
2292
|
}
|
|
2273
2293
|
}), n;
|
|
2274
|
-
},
|
|
2275
|
-
if (!
|
|
2294
|
+
}, getBuilderSearchParamsFromWindow = () => {
|
|
2295
|
+
if (!isBrowser())
|
|
2276
2296
|
return {};
|
|
2277
2297
|
const e = new URLSearchParams(window.location.search);
|
|
2278
|
-
return
|
|
2279
|
-
},
|
|
2298
|
+
return getBuilderSearchParams(e);
|
|
2299
|
+
}, normalizeSearchParams = (e) => e instanceof URLSearchParams ? convertSearchParamsToQueryObject(e) : e, isPositiveNumber = (e) => typeof e == "number" && !isNaN(e) && e >= 0, generateContentUrl = (e) => {
|
|
2280
2300
|
let {
|
|
2281
2301
|
noTraverse: t = !1
|
|
2282
2302
|
} = e;
|
|
@@ -2284,173 +2304,173 @@ const ko = "v3", he = "builder.", vo = "options.", So = (e) => {
|
|
|
2284
2304
|
limit: n = 30,
|
|
2285
2305
|
userAttributes: o,
|
|
2286
2306
|
query: r,
|
|
2287
|
-
model:
|
|
2288
|
-
apiKey:
|
|
2307
|
+
model: s,
|
|
2308
|
+
apiKey: i,
|
|
2289
2309
|
includeRefs: a = !0,
|
|
2290
|
-
enrich:
|
|
2291
|
-
locale:
|
|
2292
|
-
apiVersion:
|
|
2293
|
-
fields:
|
|
2294
|
-
omit:
|
|
2295
|
-
offset:
|
|
2296
|
-
cacheSeconds:
|
|
2297
|
-
staleCacheSeconds:
|
|
2298
|
-
sort:
|
|
2299
|
-
includeUnpublished:
|
|
2310
|
+
enrich: c,
|
|
2311
|
+
locale: l,
|
|
2312
|
+
apiVersion: d = DEFAULT_API_VERSION,
|
|
2313
|
+
fields: u,
|
|
2314
|
+
omit: p,
|
|
2315
|
+
offset: m,
|
|
2316
|
+
cacheSeconds: f,
|
|
2317
|
+
staleCacheSeconds: b,
|
|
2318
|
+
sort: y,
|
|
2319
|
+
includeUnpublished: C
|
|
2300
2320
|
} = e;
|
|
2301
|
-
if (!
|
|
2321
|
+
if (!i)
|
|
2302
2322
|
throw new Error("Missing API key");
|
|
2303
|
-
if (!["v2", "v3"].includes(
|
|
2304
|
-
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
2323
|
+
if (!["v2", "v3"].includes(d))
|
|
2324
|
+
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${d}'`);
|
|
2305
2325
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
2306
|
-
const
|
|
2307
|
-
if (
|
|
2308
|
-
const
|
|
2309
|
-
sort:
|
|
2326
|
+
const g = new URL(`https://cdn.builder.io/api/${d}/content/${s}?apiKey=${i}&limit=${n}&noTraverse=${t}&includeRefs=${a}${l ? `&locale=${l}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
2327
|
+
if (g.searchParams.set("omit", p || "meta.componentsUsed"), u && g.searchParams.set("fields", u), Number.isFinite(m) && m > -1 && g.searchParams.set("offset", String(Math.floor(m))), typeof C == "boolean" && g.searchParams.set("includeUnpublished", String(C)), f && isPositiveNumber(f) && g.searchParams.set("cacheSeconds", String(f)), b && isPositiveNumber(b) && g.searchParams.set("staleCacheSeconds", String(b)), y) {
|
|
2328
|
+
const k = flatten({
|
|
2329
|
+
sort: y
|
|
2310
2330
|
});
|
|
2311
|
-
for (const
|
|
2312
|
-
|
|
2331
|
+
for (const S in k)
|
|
2332
|
+
g.searchParams.set(S, JSON.stringify(k[S]));
|
|
2313
2333
|
}
|
|
2314
|
-
const
|
|
2315
|
-
...
|
|
2316
|
-
...
|
|
2317
|
-
},
|
|
2318
|
-
for (const
|
|
2319
|
-
|
|
2320
|
-
if (o &&
|
|
2321
|
-
const
|
|
2334
|
+
const I = {
|
|
2335
|
+
...getBuilderSearchParamsFromWindow(),
|
|
2336
|
+
...normalizeSearchParams(e.options || {})
|
|
2337
|
+
}, v = flatten(I);
|
|
2338
|
+
for (const k in v)
|
|
2339
|
+
g.searchParams.set(k, String(v[k]));
|
|
2340
|
+
if (o && g.searchParams.set("userAttributes", JSON.stringify(o)), r) {
|
|
2341
|
+
const k = flatten({
|
|
2322
2342
|
query: r
|
|
2323
2343
|
});
|
|
2324
|
-
for (const
|
|
2325
|
-
|
|
2344
|
+
for (const S in k)
|
|
2345
|
+
g.searchParams.set(S, JSON.stringify(k[S]));
|
|
2326
2346
|
}
|
|
2327
|
-
return
|
|
2328
|
-
},
|
|
2329
|
-
async function
|
|
2330
|
-
const t = await
|
|
2347
|
+
return g;
|
|
2348
|
+
}, checkContentHasResults = (e) => "results" in e;
|
|
2349
|
+
async function fetchOneEntry(e) {
|
|
2350
|
+
const t = await fetchEntries({
|
|
2331
2351
|
...e,
|
|
2332
2352
|
limit: 1
|
|
2333
2353
|
});
|
|
2334
2354
|
return t && t.results[0] || null;
|
|
2335
2355
|
}
|
|
2336
|
-
const
|
|
2337
|
-
const t =
|
|
2338
|
-
return await (await
|
|
2339
|
-
},
|
|
2340
|
-
const o =
|
|
2341
|
-
if (n.search.includes("preview="), !o || !(
|
|
2356
|
+
const getContent = fetchOneEntry, _fetchContent = async (e) => {
|
|
2357
|
+
const t = generateContentUrl(e);
|
|
2358
|
+
return await (await fetch$1(t.href)).json();
|
|
2359
|
+
}, _processContentResult = async (e, t, n = generateContentUrl(e)) => {
|
|
2360
|
+
const o = getDefaultCanTrack(e.canTrack);
|
|
2361
|
+
if (n.search.includes("preview="), !o || !(isBrowser() || TARGET === "reactNative"))
|
|
2342
2362
|
return t;
|
|
2343
2363
|
try {
|
|
2344
2364
|
const r = [];
|
|
2345
|
-
for (const
|
|
2346
|
-
r.push(await
|
|
2347
|
-
item:
|
|
2365
|
+
for (const s of t.results)
|
|
2366
|
+
r.push(await handleABTesting({
|
|
2367
|
+
item: s,
|
|
2348
2368
|
canTrack: o
|
|
2349
2369
|
}));
|
|
2350
2370
|
t.results = r;
|
|
2351
2371
|
} catch (r) {
|
|
2352
|
-
|
|
2372
|
+
logger.error("Could not process A/B tests. ", r);
|
|
2353
2373
|
}
|
|
2354
2374
|
return t;
|
|
2355
2375
|
};
|
|
2356
|
-
async function
|
|
2376
|
+
async function fetchEntries(e) {
|
|
2357
2377
|
try {
|
|
2358
|
-
const t =
|
|
2359
|
-
return
|
|
2378
|
+
const t = generateContentUrl(e), n = await _fetchContent(e);
|
|
2379
|
+
return checkContentHasResults(n) ? _processContentResult(e, n) : (logger.error("Error fetching data. ", {
|
|
2360
2380
|
url: t,
|
|
2361
2381
|
content: n,
|
|
2362
2382
|
options: e
|
|
2363
2383
|
}), null);
|
|
2364
2384
|
} catch (t) {
|
|
2365
|
-
return
|
|
2385
|
+
return logger.error("Error fetching data. ", t), null;
|
|
2366
2386
|
}
|
|
2367
2387
|
}
|
|
2368
|
-
const
|
|
2369
|
-
function
|
|
2370
|
-
return !
|
|
2388
|
+
const getAllContent = fetchEntries;
|
|
2389
|
+
function isPreviewing() {
|
|
2390
|
+
return !isBrowser() || isEditing() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
2371
2391
|
}
|
|
2372
|
-
function
|
|
2392
|
+
function uuidv4() {
|
|
2373
2393
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
2374
2394
|
const t = Math.random() * 16 | 0;
|
|
2375
2395
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
2376
2396
|
});
|
|
2377
2397
|
}
|
|
2378
|
-
function
|
|
2379
|
-
return
|
|
2398
|
+
function uuid() {
|
|
2399
|
+
return uuidv4().replace(/-/g, "");
|
|
2380
2400
|
}
|
|
2381
|
-
const
|
|
2401
|
+
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId", getSessionId = async ({
|
|
2382
2402
|
canTrack: e
|
|
2383
2403
|
}) => {
|
|
2384
2404
|
if (!e)
|
|
2385
2405
|
return;
|
|
2386
|
-
const t = await
|
|
2387
|
-
name:
|
|
2406
|
+
const t = await getCookie({
|
|
2407
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2388
2408
|
canTrack: e
|
|
2389
2409
|
});
|
|
2390
|
-
if (
|
|
2410
|
+
if (checkIsDefined(t))
|
|
2391
2411
|
return t;
|
|
2392
2412
|
{
|
|
2393
|
-
const n =
|
|
2394
|
-
return
|
|
2413
|
+
const n = createSessionId();
|
|
2414
|
+
return setSessionId({
|
|
2395
2415
|
id: n,
|
|
2396
2416
|
canTrack: e
|
|
2397
2417
|
}), n;
|
|
2398
2418
|
}
|
|
2399
|
-
},
|
|
2419
|
+
}, createSessionId = () => uuid(), setSessionId = ({
|
|
2400
2420
|
id: e,
|
|
2401
2421
|
canTrack: t
|
|
2402
|
-
}) =>
|
|
2403
|
-
name:
|
|
2422
|
+
}) => setCookie({
|
|
2423
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2404
2424
|
value: e,
|
|
2405
2425
|
canTrack: t
|
|
2406
|
-
}),
|
|
2426
|
+
}), getLocalStorage = () => isBrowser() && typeof localStorage < "u" ? localStorage : void 0, getLocalStorageItem = ({
|
|
2407
2427
|
key: e,
|
|
2408
2428
|
canTrack: t
|
|
2409
2429
|
}) => {
|
|
2410
2430
|
var n;
|
|
2411
2431
|
try {
|
|
2412
|
-
return t ? (n =
|
|
2432
|
+
return t ? (n = getLocalStorage()) == null ? void 0 : n.getItem(e) : void 0;
|
|
2413
2433
|
} catch (o) {
|
|
2414
2434
|
console.debug("[LocalStorage] GET error: ", o);
|
|
2415
2435
|
return;
|
|
2416
2436
|
}
|
|
2417
|
-
},
|
|
2437
|
+
}, setLocalStorageItem = ({
|
|
2418
2438
|
key: e,
|
|
2419
2439
|
canTrack: t,
|
|
2420
2440
|
value: n
|
|
2421
2441
|
}) => {
|
|
2422
2442
|
var o;
|
|
2423
2443
|
try {
|
|
2424
|
-
t && ((o =
|
|
2444
|
+
t && ((o = getLocalStorage()) == null || o.setItem(e, n));
|
|
2425
2445
|
} catch (r) {
|
|
2426
2446
|
console.debug("[LocalStorage] SET error: ", r);
|
|
2427
2447
|
}
|
|
2428
|
-
},
|
|
2448
|
+
}, VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId", getVisitorId = ({
|
|
2429
2449
|
canTrack: e
|
|
2430
2450
|
}) => {
|
|
2431
2451
|
if (!e)
|
|
2432
2452
|
return;
|
|
2433
|
-
const t =
|
|
2434
|
-
key:
|
|
2453
|
+
const t = getLocalStorageItem({
|
|
2454
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2435
2455
|
canTrack: e
|
|
2436
2456
|
});
|
|
2437
|
-
if (
|
|
2457
|
+
if (checkIsDefined(t))
|
|
2438
2458
|
return t;
|
|
2439
2459
|
{
|
|
2440
|
-
const n =
|
|
2441
|
-
return
|
|
2460
|
+
const n = createVisitorId();
|
|
2461
|
+
return setVisitorId({
|
|
2442
2462
|
id: n,
|
|
2443
2463
|
canTrack: e
|
|
2444
2464
|
}), n;
|
|
2445
2465
|
}
|
|
2446
|
-
},
|
|
2466
|
+
}, createVisitorId = () => uuid(), setVisitorId = ({
|
|
2447
2467
|
id: e,
|
|
2448
2468
|
canTrack: t
|
|
2449
|
-
}) =>
|
|
2450
|
-
key:
|
|
2469
|
+
}) => setLocalStorageItem({
|
|
2470
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2451
2471
|
value: e,
|
|
2452
2472
|
canTrack: t
|
|
2453
|
-
}),
|
|
2473
|
+
}), getTrackingEventData = async ({
|
|
2454
2474
|
canTrack: e
|
|
2455
2475
|
}) => {
|
|
2456
2476
|
if (!e)
|
|
@@ -2458,16 +2478,16 @@ const Ye = "builderSessionId", xo = async ({
|
|
|
2458
2478
|
visitorId: void 0,
|
|
2459
2479
|
sessionId: void 0
|
|
2460
2480
|
};
|
|
2461
|
-
const t = await
|
|
2481
|
+
const t = await getSessionId({
|
|
2462
2482
|
canTrack: e
|
|
2463
|
-
}), n =
|
|
2483
|
+
}), n = getVisitorId({
|
|
2464
2484
|
canTrack: e
|
|
2465
2485
|
});
|
|
2466
2486
|
return {
|
|
2467
2487
|
sessionId: t,
|
|
2468
2488
|
visitorId: n
|
|
2469
2489
|
};
|
|
2470
|
-
},
|
|
2490
|
+
}, createEvent = async ({
|
|
2471
2491
|
type: e,
|
|
2472
2492
|
canTrack: t,
|
|
2473
2493
|
apiKey: n,
|
|
@@ -2481,23 +2501,23 @@ const Ye = "builderSessionId", xo = async ({
|
|
|
2481
2501
|
url: location.href,
|
|
2482
2502
|
...o
|
|
2483
2503
|
},
|
|
2484
|
-
...await
|
|
2504
|
+
...await getTrackingEventData({
|
|
2485
2505
|
canTrack: t
|
|
2486
2506
|
}),
|
|
2487
|
-
userAttributes:
|
|
2507
|
+
userAttributes: getUserAttributes(),
|
|
2488
2508
|
ownerId: n
|
|
2489
2509
|
}
|
|
2490
2510
|
});
|
|
2491
|
-
async function
|
|
2511
|
+
async function _track(e) {
|
|
2492
2512
|
if (!e.apiKey) {
|
|
2493
|
-
|
|
2513
|
+
logger.error("Missing API key for track call. Please provide your API key.");
|
|
2494
2514
|
return;
|
|
2495
2515
|
}
|
|
2496
|
-
if (!!e.canTrack && !
|
|
2516
|
+
if (!!e.canTrack && !isEditing() && !!(isBrowser() || TARGET === "reactNative"))
|
|
2497
2517
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2498
2518
|
method: "POST",
|
|
2499
2519
|
body: JSON.stringify({
|
|
2500
|
-
events: [await
|
|
2520
|
+
events: [await createEvent(e)]
|
|
2501
2521
|
}),
|
|
2502
2522
|
headers: {
|
|
2503
2523
|
"content-type": "application/json"
|
|
@@ -2507,14 +2527,14 @@ async function ne(e) {
|
|
|
2507
2527
|
console.error("Failed to track: ", t);
|
|
2508
2528
|
});
|
|
2509
2529
|
}
|
|
2510
|
-
const
|
|
2530
|
+
const track = (e) => _track({
|
|
2511
2531
|
...e,
|
|
2512
2532
|
canTrack: !0
|
|
2513
2533
|
});
|
|
2514
|
-
function
|
|
2534
|
+
function round(e) {
|
|
2515
2535
|
return Math.round(e * 1e3) / 1e3;
|
|
2516
2536
|
}
|
|
2517
|
-
const
|
|
2537
|
+
const findParentElement = (e, t, n = !0) => {
|
|
2518
2538
|
if (!(e instanceof HTMLElement))
|
|
2519
2539
|
return null;
|
|
2520
2540
|
let o = n ? e : e.parentElement;
|
|
@@ -2525,38 +2545,38 @@ const Uo = (e, t, n = !0) => {
|
|
|
2525
2545
|
return o;
|
|
2526
2546
|
} while (o = o.parentElement);
|
|
2527
2547
|
return null;
|
|
2528
|
-
},
|
|
2548
|
+
}, findBuilderParent = (e) => findParentElement(e, (t) => {
|
|
2529
2549
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2530
2550
|
return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
|
|
2531
|
-
}),
|
|
2551
|
+
}), computeOffset = ({
|
|
2532
2552
|
event: e,
|
|
2533
2553
|
target: t
|
|
2534
2554
|
}) => {
|
|
2535
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top,
|
|
2555
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, s = round(o / n.width), i = round(r / n.height);
|
|
2536
2556
|
return {
|
|
2537
|
-
x:
|
|
2538
|
-
y:
|
|
2557
|
+
x: s,
|
|
2558
|
+
y: i
|
|
2539
2559
|
};
|
|
2540
|
-
},
|
|
2541
|
-
const t = e.target, n = t &&
|
|
2560
|
+
}, getInteractionPropertiesForEvent = (e) => {
|
|
2561
|
+
const t = e.target, n = t && findBuilderParent(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2542
2562
|
return {
|
|
2543
2563
|
targetBuilderElement: o || void 0,
|
|
2544
2564
|
metadata: {
|
|
2545
|
-
targetOffset: t ?
|
|
2565
|
+
targetOffset: t ? computeOffset({
|
|
2546
2566
|
event: e,
|
|
2547
2567
|
target: t
|
|
2548
2568
|
}) : void 0,
|
|
2549
|
-
builderTargetOffset: n ?
|
|
2569
|
+
builderTargetOffset: n ? computeOffset({
|
|
2550
2570
|
event: e,
|
|
2551
2571
|
target: n
|
|
2552
2572
|
}) : void 0,
|
|
2553
2573
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2554
2574
|
}
|
|
2555
2575
|
};
|
|
2556
|
-
},
|
|
2557
|
-
function
|
|
2558
|
-
let n =
|
|
2559
|
-
if (n || (n =
|
|
2576
|
+
}, SDK_VERSION = "0.9.0", registry = {};
|
|
2577
|
+
function register(e, t) {
|
|
2578
|
+
let n = registry[e];
|
|
2579
|
+
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
2560
2580
|
const o = {
|
|
2561
2581
|
type: "builder.register",
|
|
2562
2582
|
data: {
|
|
@@ -2571,8 +2591,8 @@ function Wo(e, t) {
|
|
|
2571
2591
|
}
|
|
2572
2592
|
}
|
|
2573
2593
|
}
|
|
2574
|
-
const
|
|
2575
|
-
|
|
2594
|
+
const registerInsertMenu = () => {
|
|
2595
|
+
register("insertMenu", {
|
|
2576
2596
|
name: "_default",
|
|
2577
2597
|
default: !0,
|
|
2578
2598
|
items: [{
|
|
@@ -2594,14 +2614,14 @@ const Do = () => {
|
|
|
2594
2614
|
}]
|
|
2595
2615
|
});
|
|
2596
2616
|
};
|
|
2597
|
-
let
|
|
2598
|
-
const
|
|
2617
|
+
let isSetupForEditing = !1;
|
|
2618
|
+
const setupBrowserForEditing = (e = {}) => {
|
|
2599
2619
|
var t, n;
|
|
2600
|
-
|
|
2620
|
+
isSetupForEditing || (isSetupForEditing = !0, isBrowser() && ((t = window.parent) == null || t.postMessage({
|
|
2601
2621
|
type: "builder.sdkInfo",
|
|
2602
2622
|
data: {
|
|
2603
|
-
target:
|
|
2604
|
-
version:
|
|
2623
|
+
target: TARGET,
|
|
2624
|
+
version: SDK_VERSION,
|
|
2605
2625
|
supportsPatchUpdates: !1,
|
|
2606
2626
|
supportsAddBlockScoping: !0,
|
|
2607
2627
|
supportsCustomBreakpoints: !0
|
|
@@ -2614,47 +2634,48 @@ const Ho = (e = {}) => {
|
|
|
2614
2634
|
}, "*"), window.addEventListener("message", ({
|
|
2615
2635
|
data: o
|
|
2616
2636
|
}) => {
|
|
2617
|
-
var r,
|
|
2637
|
+
var r, s;
|
|
2618
2638
|
if (!!(o != null && o.type))
|
|
2619
2639
|
switch (o.type) {
|
|
2620
2640
|
case "builder.evaluate": {
|
|
2621
|
-
const
|
|
2622
|
-
let
|
|
2641
|
+
const i = o.data.text, a = o.data.arguments || [], c = o.data.id, l = new Function(i);
|
|
2642
|
+
let d, u = null;
|
|
2623
2643
|
try {
|
|
2624
|
-
|
|
2625
|
-
} catch (
|
|
2626
|
-
|
|
2644
|
+
d = l.apply(null, a);
|
|
2645
|
+
} catch (p) {
|
|
2646
|
+
u = p;
|
|
2627
2647
|
}
|
|
2628
|
-
|
|
2648
|
+
u ? (r = window.parent) == null || r.postMessage({
|
|
2629
2649
|
type: "builder.evaluateError",
|
|
2630
2650
|
data: {
|
|
2631
|
-
id:
|
|
2632
|
-
error:
|
|
2651
|
+
id: c,
|
|
2652
|
+
error: u.message
|
|
2633
2653
|
}
|
|
2634
|
-
}, "*") :
|
|
2635
|
-
var
|
|
2636
|
-
(
|
|
2654
|
+
}, "*") : d && typeof d.then == "function" ? d.then((p) => {
|
|
2655
|
+
var m;
|
|
2656
|
+
(m = window.parent) == null || m.postMessage({
|
|
2637
2657
|
type: "builder.evaluateResult",
|
|
2638
2658
|
data: {
|
|
2639
|
-
id:
|
|
2640
|
-
result:
|
|
2659
|
+
id: c,
|
|
2660
|
+
result: p
|
|
2641
2661
|
}
|
|
2642
2662
|
}, "*");
|
|
2643
|
-
}).catch(console.error) : (
|
|
2663
|
+
}).catch(console.error) : (s = window.parent) == null || s.postMessage({
|
|
2644
2664
|
type: "builder.evaluateResult",
|
|
2645
2665
|
data: {
|
|
2646
|
-
result:
|
|
2647
|
-
id:
|
|
2666
|
+
result: d,
|
|
2667
|
+
id: c
|
|
2648
2668
|
}
|
|
2649
2669
|
}, "*");
|
|
2650
2670
|
break;
|
|
2651
2671
|
}
|
|
2652
2672
|
}
|
|
2653
2673
|
})));
|
|
2654
|
-
},
|
|
2674
|
+
}, _sfc_main$4 = defineComponent({
|
|
2655
2675
|
name: "enable-editor",
|
|
2656
2676
|
props: [
|
|
2657
2677
|
"builderContextSignal",
|
|
2678
|
+
"contentWrapper",
|
|
2658
2679
|
"model",
|
|
2659
2680
|
"context",
|
|
2660
2681
|
"canTrack",
|
|
@@ -2663,46 +2684,48 @@ const Ho = (e = {}) => {
|
|
|
2663
2684
|
"includeRefs",
|
|
2664
2685
|
"enrich",
|
|
2665
2686
|
"content",
|
|
2666
|
-
"showContent"
|
|
2687
|
+
"showContent",
|
|
2688
|
+
"contentWrapperProps"
|
|
2667
2689
|
],
|
|
2668
2690
|
data() {
|
|
2669
2691
|
return {
|
|
2670
2692
|
forceReRenderCount: 0,
|
|
2671
2693
|
lastUpdated: 0,
|
|
2672
2694
|
shouldSendResetCookie: !1,
|
|
2695
|
+
ContentWrapper: this.contentWrapper || "div",
|
|
2673
2696
|
httpReqsData: {},
|
|
2674
2697
|
clicked: !1,
|
|
2675
|
-
builderContext:
|
|
2698
|
+
builderContext: BuilderContext
|
|
2676
2699
|
};
|
|
2677
2700
|
},
|
|
2678
2701
|
provide() {
|
|
2679
2702
|
const e = this;
|
|
2680
2703
|
return {
|
|
2681
|
-
[
|
|
2704
|
+
[BuilderContext.key]: e.builderContextSignal
|
|
2682
2705
|
};
|
|
2683
2706
|
},
|
|
2684
2707
|
mounted() {
|
|
2685
2708
|
(() => {
|
|
2686
2709
|
var n, o;
|
|
2687
|
-
if (
|
|
2688
|
-
if (
|
|
2710
|
+
if (isBrowser()) {
|
|
2711
|
+
if (isEditing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
2689
2712
|
new CustomEvent("initeditingbldr")
|
|
2690
|
-
), this.builderContextSignal.content &&
|
|
2691
|
-
const
|
|
2692
|
-
|
|
2713
|
+
), this.builderContextSignal.content && getDefaultCanTrack(this.canTrack)) {
|
|
2714
|
+
const s = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, i = (o = this.builderContextSignal.content) == null ? void 0 : o.id, a = this.apiKey;
|
|
2715
|
+
_track({
|
|
2693
2716
|
type: "impression",
|
|
2694
2717
|
canTrack: !0,
|
|
2695
|
-
contentId:
|
|
2718
|
+
contentId: i,
|
|
2696
2719
|
apiKey: a,
|
|
2697
|
-
variationId:
|
|
2720
|
+
variationId: s !== i ? s : void 0
|
|
2698
2721
|
});
|
|
2699
2722
|
}
|
|
2700
|
-
|
|
2723
|
+
isPreviewing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
2701
2724
|
new CustomEvent("initpreviewingbldr")
|
|
2702
2725
|
);
|
|
2703
2726
|
}
|
|
2704
2727
|
})(), (() => {
|
|
2705
|
-
this.apiKey ||
|
|
2728
|
+
this.apiKey || logger.error(
|
|
2706
2729
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2707
2730
|
), this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
2708
2731
|
})();
|
|
@@ -2736,7 +2759,7 @@ const Ho = (e = {}) => {
|
|
|
2736
2759
|
}
|
|
2737
2760
|
},
|
|
2738
2761
|
unmounted() {
|
|
2739
|
-
|
|
2762
|
+
isBrowser() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
2740
2763
|
"builder:component:stateChangeListenerActivated",
|
|
2741
2764
|
this.emitStateUpdate
|
|
2742
2765
|
));
|
|
@@ -2773,7 +2796,7 @@ const Ho = (e = {}) => {
|
|
|
2773
2796
|
},
|
|
2774
2797
|
methods: {
|
|
2775
2798
|
mergeNewContent(e) {
|
|
2776
|
-
var n, o, r,
|
|
2799
|
+
var n, o, r, s, i;
|
|
2777
2800
|
const t = {
|
|
2778
2801
|
...this.builderContextSignal.content,
|
|
2779
2802
|
...e,
|
|
@@ -2784,7 +2807,7 @@ const Ho = (e = {}) => {
|
|
|
2784
2807
|
meta: {
|
|
2785
2808
|
...(o = this.builderContextSignal.content) == null ? void 0 : o.meta,
|
|
2786
2809
|
...e == null ? void 0 : e.meta,
|
|
2787
|
-
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((
|
|
2810
|
+
breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((i = (s = this.builderContextSignal.content) == null ? void 0 : s.meta) == null ? void 0 : i.breakpoints)
|
|
2788
2811
|
}
|
|
2789
2812
|
};
|
|
2790
2813
|
this.builderContextSignal.content = t;
|
|
@@ -2795,8 +2818,8 @@ const Ho = (e = {}) => {
|
|
|
2795
2818
|
if (t)
|
|
2796
2819
|
switch (t.type) {
|
|
2797
2820
|
case "builder.configureSdk": {
|
|
2798
|
-
const o = t.data, { breakpoints: r, contentId:
|
|
2799
|
-
if (!
|
|
2821
|
+
const o = t.data, { breakpoints: r, contentId: s } = o;
|
|
2822
|
+
if (!s || s !== ((n = this.builderContextSignal.content) == null ? void 0 : n.id))
|
|
2800
2823
|
return;
|
|
2801
2824
|
r && this.mergeNewContent({
|
|
2802
2825
|
meta: {
|
|
@@ -2806,8 +2829,8 @@ const Ho = (e = {}) => {
|
|
|
2806
2829
|
break;
|
|
2807
2830
|
}
|
|
2808
2831
|
case "builder.contentUpdate": {
|
|
2809
|
-
const o = t.data, r = o.key || o.alias || o.entry || o.modelName,
|
|
2810
|
-
r === this.model && (this.mergeNewContent(
|
|
2832
|
+
const o = t.data, r = o.key || o.alias || o.entry || o.modelName, s = o.data;
|
|
2833
|
+
r === this.model && (this.mergeNewContent(s), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
2811
2834
|
break;
|
|
2812
2835
|
}
|
|
2813
2836
|
}
|
|
@@ -2815,7 +2838,7 @@ const Ho = (e = {}) => {
|
|
|
2815
2838
|
evaluateJsCode() {
|
|
2816
2839
|
var t, n;
|
|
2817
2840
|
const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
2818
|
-
e &&
|
|
2841
|
+
e && evaluate({
|
|
2819
2842
|
code: e,
|
|
2820
2843
|
context: this.context || {},
|
|
2821
2844
|
localState: void 0,
|
|
@@ -2827,13 +2850,13 @@ const Ho = (e = {}) => {
|
|
|
2827
2850
|
var t, n;
|
|
2828
2851
|
if (this.builderContextSignal.content) {
|
|
2829
2852
|
const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
|
|
2830
|
-
|
|
2853
|
+
_track({
|
|
2831
2854
|
type: "click",
|
|
2832
|
-
canTrack:
|
|
2855
|
+
canTrack: getDefaultCanTrack(this.canTrack),
|
|
2833
2856
|
contentId: r,
|
|
2834
2857
|
apiKey: this.apiKey,
|
|
2835
2858
|
variationId: o !== r ? o : void 0,
|
|
2836
|
-
...
|
|
2859
|
+
...getInteractionPropertiesForEvent(e),
|
|
2837
2860
|
unique: !this.clicked
|
|
2838
2861
|
});
|
|
2839
2862
|
}
|
|
@@ -2842,7 +2865,7 @@ const Ho = (e = {}) => {
|
|
|
2842
2865
|
evalExpression(e) {
|
|
2843
2866
|
return e.replace(
|
|
2844
2867
|
/{{([^}]+)}}/g,
|
|
2845
|
-
(t, n) =>
|
|
2868
|
+
(t, n) => evaluate({
|
|
2846
2869
|
code: n,
|
|
2847
2870
|
context: this.context || {},
|
|
2848
2871
|
localState: void 0,
|
|
@@ -2852,13 +2875,13 @@ const Ho = (e = {}) => {
|
|
|
2852
2875
|
);
|
|
2853
2876
|
},
|
|
2854
2877
|
handleRequest({ url: e, key: t }) {
|
|
2855
|
-
|
|
2856
|
-
var r,
|
|
2878
|
+
fetch$1(e).then((n) => n.json()).then((n) => {
|
|
2879
|
+
var r, s;
|
|
2857
2880
|
const o = {
|
|
2858
2881
|
...this.builderContextSignal.rootState,
|
|
2859
2882
|
[t]: n
|
|
2860
2883
|
};
|
|
2861
|
-
(
|
|
2884
|
+
(s = (r = this.builderContextSignal).rootSetState) == null || s.call(r, o), this.httpReqsData[t] = !0;
|
|
2862
2885
|
}).catch((n) => {
|
|
2863
2886
|
console.error("error fetching dynamic data", e, n);
|
|
2864
2887
|
});
|
|
@@ -2866,23 +2889,23 @@ const Ho = (e = {}) => {
|
|
|
2866
2889
|
runHttpRequests() {
|
|
2867
2890
|
var t, n, o;
|
|
2868
2891
|
const e = (o = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
|
|
2869
|
-
Object.entries(e).forEach(([r,
|
|
2870
|
-
if (
|
|
2871
|
-
const
|
|
2892
|
+
Object.entries(e).forEach(([r, s]) => {
|
|
2893
|
+
if (s && (!this.httpReqsData[r] || isEditing())) {
|
|
2894
|
+
const i = this.evalExpression(s);
|
|
2872
2895
|
this.handleRequest({
|
|
2873
|
-
url:
|
|
2896
|
+
url: i,
|
|
2874
2897
|
key: r
|
|
2875
2898
|
});
|
|
2876
2899
|
}
|
|
2877
2900
|
});
|
|
2878
2901
|
},
|
|
2879
2902
|
emitStateUpdate() {
|
|
2880
|
-
|
|
2903
|
+
isEditing() && window.dispatchEvent(
|
|
2881
2904
|
new CustomEvent(
|
|
2882
2905
|
"builder:component:stateChange",
|
|
2883
2906
|
{
|
|
2884
2907
|
detail: {
|
|
2885
|
-
state:
|
|
2908
|
+
state: fastClone(this.builderContextSignal.rootState),
|
|
2886
2909
|
ref: {
|
|
2887
2910
|
name: this.model
|
|
2888
2911
|
}
|
|
@@ -2892,7 +2915,7 @@ const Ho = (e = {}) => {
|
|
|
2892
2915
|
);
|
|
2893
2916
|
},
|
|
2894
2917
|
elementRef_onIniteditingbldr(e) {
|
|
2895
|
-
this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage),
|
|
2918
|
+
this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), registerInsertMenu(), setupBrowserForEditing({
|
|
2896
2919
|
...this.locale ? {
|
|
2897
2920
|
locale: this.locale
|
|
2898
2921
|
} : {},
|
|
@@ -2906,7 +2929,7 @@ const Ho = (e = {}) => {
|
|
|
2906
2929
|
this.builderContextSignal.componentInfos
|
|
2907
2930
|
).forEach((t) => {
|
|
2908
2931
|
var o;
|
|
2909
|
-
const n =
|
|
2932
|
+
const n = createRegisterComponentMessage(t);
|
|
2910
2933
|
(o = window.parent) == null || o.postMessage(n, "*");
|
|
2911
2934
|
}), window.addEventListener(
|
|
2912
2935
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -2917,12 +2940,12 @@ const Ho = (e = {}) => {
|
|
|
2917
2940
|
const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
|
|
2918
2941
|
`builder.preview.${n}`
|
|
2919
2942
|
), r = t.get("apiKey") || t.get("builder.space");
|
|
2920
|
-
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) &&
|
|
2943
|
+
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) && fetchOneEntry({
|
|
2921
2944
|
model: this.model,
|
|
2922
2945
|
apiKey: this.apiKey,
|
|
2923
2946
|
apiVersion: this.builderContextSignal.apiVersion
|
|
2924
|
-
}).then((
|
|
2925
|
-
|
|
2947
|
+
}).then((s) => {
|
|
2948
|
+
s && this.mergeNewContent(s);
|
|
2926
2949
|
});
|
|
2927
2950
|
},
|
|
2928
2951
|
_classStringToObject(e) {
|
|
@@ -2935,32 +2958,36 @@ const Ho = (e = {}) => {
|
|
|
2935
2958
|
return t;
|
|
2936
2959
|
}
|
|
2937
2960
|
}
|
|
2938
|
-
})
|
|
2939
|
-
function
|
|
2940
|
-
var
|
|
2941
|
-
return e.builderContextSignal.content ? (
|
|
2961
|
+
});
|
|
2962
|
+
function _sfc_render$4(e, t, n, o, r, s) {
|
|
2963
|
+
var i, a, c;
|
|
2964
|
+
return e.builderContextSignal.content ? (openBlock(), createBlock(resolveDynamicComponent(e.ContentWrapper), mergeProps({
|
|
2942
2965
|
key: e.forceReRenderCount,
|
|
2943
2966
|
ref: "elementRef",
|
|
2944
|
-
onClick:
|
|
2945
|
-
"builder-content-id": (
|
|
2967
|
+
onClick: (l) => e.onClick(l),
|
|
2968
|
+
"builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id,
|
|
2946
2969
|
"builder-model": e.model,
|
|
2947
2970
|
class: e._classStringToObject(
|
|
2948
|
-
`variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((
|
|
2971
|
+
`variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((c = e.content) == null ? void 0 : c.id)}`
|
|
2949
2972
|
),
|
|
2950
|
-
onIniteditingbldr:
|
|
2951
|
-
onInitpreviewingbldr:
|
|
2973
|
+
onIniteditingbldr: (l) => e.elementRef_onIniteditingbldr(l),
|
|
2974
|
+
onInitpreviewingbldr: (l) => e.elementRef_onInitpreviewingbldr(l)
|
|
2952
2975
|
}, {
|
|
2953
2976
|
...e.showContent ? {} : {
|
|
2954
2977
|
hidden: !0,
|
|
2955
2978
|
"aria-hidden": !0
|
|
2956
|
-
}
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2979
|
+
},
|
|
2980
|
+
...e.contentWrapperProps
|
|
2981
|
+
}), {
|
|
2982
|
+
default: withCtx(() => [
|
|
2983
|
+
renderSlot(e.$slots, "default")
|
|
2984
|
+
]),
|
|
2985
|
+
_: 3
|
|
2986
|
+
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : createCommentVNode("v-if", !0);
|
|
2960
2987
|
}
|
|
2961
|
-
const
|
|
2962
|
-
var
|
|
2963
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (
|
|
2988
|
+
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/components/enable-editor.vue"]]), getCssFromFont = (e) => {
|
|
2989
|
+
var s, i;
|
|
2990
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (i = e.fileUrl) != null ? i : (s = e == null ? void 0 : e.files) == null ? void 0 : s.regular;
|
|
2964
2991
|
let r = "";
|
|
2965
2992
|
if (o && t && n && (r += `
|
|
2966
2993
|
@font-face {
|
|
@@ -2973,37 +3000,37 @@ font-weight: 400;
|
|
|
2973
3000
|
for (const a in e.files) {
|
|
2974
3001
|
if (!(String(Number(a)) === a))
|
|
2975
3002
|
continue;
|
|
2976
|
-
const
|
|
2977
|
-
|
|
3003
|
+
const l = e.files[a];
|
|
3004
|
+
l && l !== o && (r += `
|
|
2978
3005
|
@font-face {
|
|
2979
3006
|
font-family: "${t}";
|
|
2980
|
-
src: url('${
|
|
3007
|
+
src: url('${l}') format('woff2');
|
|
2981
3008
|
font-display: fallback;
|
|
2982
3009
|
font-weight: ${a};
|
|
2983
3010
|
}
|
|
2984
3011
|
`.trim());
|
|
2985
3012
|
}
|
|
2986
3013
|
return r;
|
|
2987
|
-
},
|
|
3014
|
+
}, getFontCss = ({
|
|
2988
3015
|
customFonts: e
|
|
2989
3016
|
}) => {
|
|
2990
3017
|
var t;
|
|
2991
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2992
|
-
},
|
|
3018
|
+
return ((t = e == null ? void 0 : e.map((n) => getCssFromFont(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3019
|
+
}, getCss = ({
|
|
2993
3020
|
cssCode: e,
|
|
2994
3021
|
contentId: t
|
|
2995
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3022
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", _sfc_main$3 = defineComponent({
|
|
2996
3023
|
name: "content-styles",
|
|
2997
|
-
components: { InlinedStyles
|
|
3024
|
+
components: { InlinedStyles },
|
|
2998
3025
|
props: ["cssCode", "contentId", "customFonts"],
|
|
2999
3026
|
data() {
|
|
3000
3027
|
return {
|
|
3001
3028
|
injectedStyles: `
|
|
3002
|
-
${
|
|
3029
|
+
${getCss({
|
|
3003
3030
|
cssCode: this.cssCode,
|
|
3004
3031
|
contentId: this.contentId
|
|
3005
3032
|
})}
|
|
3006
|
-
${
|
|
3033
|
+
${getFontCss({
|
|
3007
3034
|
customFonts: this.customFonts
|
|
3008
3035
|
})}
|
|
3009
3036
|
|
|
@@ -3023,19 +3050,19 @@ ${Yo({
|
|
|
3023
3050
|
};
|
|
3024
3051
|
}
|
|
3025
3052
|
});
|
|
3026
|
-
function
|
|
3027
|
-
const
|
|
3028
|
-
return
|
|
3053
|
+
function _sfc_render$3(e, t, n, o, r, s) {
|
|
3054
|
+
const i = resolveComponent("inlined-styles");
|
|
3055
|
+
return openBlock(), createBlock(i, { styles: e.injectedStyles }, null, 8, ["styles"]);
|
|
3029
3056
|
}
|
|
3030
|
-
const
|
|
3057
|
+
const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/components/styles.vue"]]), getContextStateInitialValue = ({
|
|
3031
3058
|
content: e,
|
|
3032
3059
|
data: t,
|
|
3033
3060
|
locale: n
|
|
3034
3061
|
}) => {
|
|
3035
|
-
var
|
|
3036
|
-
const o = {}, r = ((
|
|
3037
|
-
return (a = (
|
|
3038
|
-
|
|
3062
|
+
var s, i, a;
|
|
3063
|
+
const o = {}, r = ((s = e == null ? void 0 : e.data) == null ? void 0 : s.state) || {};
|
|
3064
|
+
return (a = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || a.forEach((c) => {
|
|
3065
|
+
c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
|
|
3039
3066
|
}), {
|
|
3040
3067
|
...o,
|
|
3041
3068
|
...r,
|
|
@@ -3044,7 +3071,7 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3044
3071
|
locale: n
|
|
3045
3072
|
} : {}
|
|
3046
3073
|
};
|
|
3047
|
-
},
|
|
3074
|
+
}, getContentInitialValue = ({
|
|
3048
3075
|
content: e,
|
|
3049
3076
|
data: t
|
|
3050
3077
|
}) => e ? {
|
|
@@ -3054,13 +3081,13 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3054
3081
|
...t
|
|
3055
3082
|
},
|
|
3056
3083
|
meta: e == null ? void 0 : e.meta
|
|
3057
|
-
} : void 0,
|
|
3084
|
+
} : void 0, wrapComponentRef = markRaw, _sfc_main$2 = defineComponent({
|
|
3058
3085
|
name: "content-component",
|
|
3059
3086
|
components: {
|
|
3060
|
-
EnableEditor
|
|
3061
|
-
InlinedScript
|
|
3062
|
-
ContentStyles
|
|
3063
|
-
Blocks
|
|
3087
|
+
EnableEditor,
|
|
3088
|
+
InlinedScript,
|
|
3089
|
+
ContentStyles,
|
|
3090
|
+
Blocks
|
|
3064
3091
|
},
|
|
3065
3092
|
props: [
|
|
3066
3093
|
"content",
|
|
@@ -3070,41 +3097,45 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3070
3097
|
"context",
|
|
3071
3098
|
"apiKey",
|
|
3072
3099
|
"apiVersion",
|
|
3100
|
+
"blocksWrapper",
|
|
3101
|
+
"blocksWrapperProps",
|
|
3073
3102
|
"model",
|
|
3074
3103
|
"canTrack",
|
|
3075
3104
|
"includeRefs",
|
|
3076
3105
|
"enrich",
|
|
3077
3106
|
"showContent",
|
|
3107
|
+
"contentWrapper",
|
|
3108
|
+
"contentWrapperProps",
|
|
3078
3109
|
"isSsrAbTest"
|
|
3079
3110
|
],
|
|
3080
3111
|
data() {
|
|
3081
3112
|
var e, t;
|
|
3082
3113
|
return {
|
|
3083
|
-
scriptStr:
|
|
3114
|
+
scriptStr: getUpdateVariantVisibilityScript({
|
|
3084
3115
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
3085
3116
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
3086
3117
|
}),
|
|
3087
3118
|
registeredComponents: [
|
|
3088
|
-
...
|
|
3089
|
-
...
|
|
3119
|
+
...getDefaultRegisteredComponents(),
|
|
3120
|
+
...components,
|
|
3090
3121
|
...this.customComponents || []
|
|
3091
3122
|
].reduce(
|
|
3092
3123
|
(n, { component: o, ...r }) => ({
|
|
3093
3124
|
...n,
|
|
3094
3125
|
[r.name]: {
|
|
3095
|
-
component:
|
|
3096
|
-
...
|
|
3126
|
+
component: wrapComponentRef(o),
|
|
3127
|
+
...serializeComponentInfo(r)
|
|
3097
3128
|
}
|
|
3098
3129
|
}),
|
|
3099
3130
|
{}
|
|
3100
3131
|
),
|
|
3101
3132
|
builderContextSignal: {
|
|
3102
|
-
content:
|
|
3133
|
+
content: getContentInitialValue({
|
|
3103
3134
|
content: this.content,
|
|
3104
3135
|
data: this.data
|
|
3105
3136
|
}),
|
|
3106
3137
|
localState: void 0,
|
|
3107
|
-
rootState:
|
|
3138
|
+
rootState: getContextStateInitialValue({
|
|
3108
3139
|
content: this.content,
|
|
3109
3140
|
data: this.data,
|
|
3110
3141
|
locale: this.locale
|
|
@@ -3114,25 +3145,27 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3114
3145
|
apiKey: this.apiKey,
|
|
3115
3146
|
apiVersion: this.apiVersion,
|
|
3116
3147
|
componentInfos: [
|
|
3117
|
-
...
|
|
3118
|
-
...
|
|
3148
|
+
...getDefaultRegisteredComponents(),
|
|
3149
|
+
...components,
|
|
3119
3150
|
...this.customComponents || []
|
|
3120
3151
|
].reduce(
|
|
3121
3152
|
(n, { component: o, ...r }) => ({
|
|
3122
3153
|
...n,
|
|
3123
|
-
[r.name]:
|
|
3154
|
+
[r.name]: serializeComponentInfo(r)
|
|
3124
3155
|
}),
|
|
3125
3156
|
{}
|
|
3126
3157
|
),
|
|
3127
|
-
inheritedStyles: {}
|
|
3158
|
+
inheritedStyles: {},
|
|
3159
|
+
BlocksWrapper: this.blocksWrapper || "div",
|
|
3160
|
+
BlocksWrapperProps: this.blocksWrapperProps || {}
|
|
3128
3161
|
},
|
|
3129
|
-
TARGET
|
|
3162
|
+
TARGET
|
|
3130
3163
|
};
|
|
3131
3164
|
},
|
|
3132
3165
|
provide() {
|
|
3133
3166
|
const e = this;
|
|
3134
3167
|
return {
|
|
3135
|
-
[
|
|
3168
|
+
[ComponentsContext.key]: {
|
|
3136
3169
|
registeredComponents: e.registeredComponents
|
|
3137
3170
|
}
|
|
3138
3171
|
};
|
|
@@ -3143,9 +3176,9 @@ const er = /* @__PURE__ */ y(Xo, [["render", Zo], ["__file", "/home/runner/work/
|
|
|
3143
3176
|
}
|
|
3144
3177
|
}
|
|
3145
3178
|
});
|
|
3146
|
-
function
|
|
3147
|
-
const
|
|
3148
|
-
return
|
|
3179
|
+
function _sfc_render$2(e, t, n, o, r, s) {
|
|
3180
|
+
const i = resolveComponent("inlined-script"), a = resolveComponent("content-styles"), c = resolveComponent("blocks"), l = resolveComponent("enable-editor");
|
|
3181
|
+
return openBlock(), createBlock(l, mergeProps({
|
|
3149
3182
|
content: e.content,
|
|
3150
3183
|
model: e.model,
|
|
3151
3184
|
context: e.context,
|
|
@@ -3155,37 +3188,39 @@ function ir(e, t, n, o, r, i) {
|
|
|
3155
3188
|
includeRefs: e.includeRefs,
|
|
3156
3189
|
enrich: e.enrich,
|
|
3157
3190
|
showContent: e.showContent,
|
|
3158
|
-
builderContextSignal: e.builderContextSignal
|
|
3191
|
+
builderContextSignal: e.builderContextSignal,
|
|
3192
|
+
contentWrapper: e.contentWrapper,
|
|
3193
|
+
contentWrapperProps: e.contentWrapperProps
|
|
3159
3194
|
}, {}), {
|
|
3160
|
-
default:
|
|
3161
|
-
var u,
|
|
3195
|
+
default: withCtx(() => {
|
|
3196
|
+
var d, u, p, m, f, b, y;
|
|
3162
3197
|
return [
|
|
3163
|
-
e.isSsrAbTest ? (
|
|
3198
|
+
e.isSsrAbTest ? (openBlock(), createBlock(i, {
|
|
3164
3199
|
key: 0,
|
|
3165
3200
|
scriptStr: e.scriptStr
|
|
3166
|
-
}, null, 8, ["scriptStr"])) :
|
|
3167
|
-
e.TARGET !== "reactNative" ? (
|
|
3201
|
+
}, null, 8, ["scriptStr"])) : createCommentVNode("v-if", !0),
|
|
3202
|
+
e.TARGET !== "reactNative" ? (openBlock(), createBlock(a, {
|
|
3168
3203
|
key: 1,
|
|
3169
|
-
contentId: (
|
|
3170
|
-
cssCode: (
|
|
3171
|
-
customFonts: (
|
|
3172
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) :
|
|
3173
|
-
|
|
3174
|
-
blocks: (
|
|
3204
|
+
contentId: (d = e.builderContextSignal.content) == null ? void 0 : d.id,
|
|
3205
|
+
cssCode: (p = (u = e.builderContextSignal.content) == null ? void 0 : u.data) == null ? void 0 : p.cssCode,
|
|
3206
|
+
customFonts: (f = (m = e.builderContextSignal.content) == null ? void 0 : m.data) == null ? void 0 : f.customFonts
|
|
3207
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : createCommentVNode("v-if", !0),
|
|
3208
|
+
createVNode(c, {
|
|
3209
|
+
blocks: (y = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : y.blocks,
|
|
3175
3210
|
context: e.builderContextSignal,
|
|
3176
3211
|
registeredComponents: e.registeredComponents
|
|
3177
3212
|
}, null, 8, ["blocks", "context", "registeredComponents"])
|
|
3178
3213
|
];
|
|
3179
3214
|
}),
|
|
3180
3215
|
_: 1
|
|
3181
|
-
}, 16, ["content", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "showContent", "builderContextSignal"]);
|
|
3216
|
+
}, 16, ["content", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps"]);
|
|
3182
3217
|
}
|
|
3183
|
-
const
|
|
3218
|
+
const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/content.vue"]]), _sfc_main$1 = defineComponent({
|
|
3184
3219
|
name: "content-variants",
|
|
3185
3220
|
components: {
|
|
3186
|
-
InlinedScript
|
|
3187
|
-
InlinedStyles
|
|
3188
|
-
ContentComponent
|
|
3221
|
+
InlinedScript,
|
|
3222
|
+
InlinedStyles,
|
|
3223
|
+
ContentComponent
|
|
3189
3224
|
},
|
|
3190
3225
|
props: [
|
|
3191
3226
|
"canTrack",
|
|
@@ -3199,17 +3234,21 @@ const sr = /* @__PURE__ */ y(rr, [["render", ir], ["__file", "/home/runner/work/
|
|
|
3199
3234
|
"customComponents",
|
|
3200
3235
|
"locale",
|
|
3201
3236
|
"includeRefs",
|
|
3202
|
-
"enrich"
|
|
3237
|
+
"enrich",
|
|
3238
|
+
"blocksWrapper",
|
|
3239
|
+
"blocksWrapperProps",
|
|
3240
|
+
"contentWrapper",
|
|
3241
|
+
"contentWrapperProps"
|
|
3203
3242
|
],
|
|
3204
3243
|
data() {
|
|
3205
3244
|
return {
|
|
3206
|
-
shouldRenderVariants:
|
|
3207
|
-
canTrack:
|
|
3245
|
+
shouldRenderVariants: checkShouldRenderVariants({
|
|
3246
|
+
canTrack: getDefaultCanTrack(this.canTrack),
|
|
3208
3247
|
content: this.content
|
|
3209
3248
|
}),
|
|
3210
|
-
TARGET
|
|
3211
|
-
getScriptString
|
|
3212
|
-
getVariants
|
|
3249
|
+
TARGET,
|
|
3250
|
+
getScriptString,
|
|
3251
|
+
getVariants
|
|
3213
3252
|
};
|
|
3214
3253
|
},
|
|
3215
3254
|
mounted() {
|
|
@@ -3218,8 +3257,8 @@ const sr = /* @__PURE__ */ y(rr, [["render", ir], ["__file", "/home/runner/work/
|
|
|
3218
3257
|
computed: {
|
|
3219
3258
|
updateCookieAndStylesScriptStr() {
|
|
3220
3259
|
var e;
|
|
3221
|
-
return
|
|
3222
|
-
|
|
3260
|
+
return getUpdateCookieAndStylesScript(
|
|
3261
|
+
getVariants(this.content).map((t) => ({
|
|
3223
3262
|
id: t.testVariationId,
|
|
3224
3263
|
testRatio: t.testRatio
|
|
3225
3264
|
})),
|
|
@@ -3227,37 +3266,37 @@ const sr = /* @__PURE__ */ y(rr, [["render", ir], ["__file", "/home/runner/work/
|
|
|
3227
3266
|
);
|
|
3228
3267
|
},
|
|
3229
3268
|
hideVariantsStyleString() {
|
|
3230
|
-
return
|
|
3269
|
+
return getVariants(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
|
|
3231
3270
|
},
|
|
3232
3271
|
defaultContent() {
|
|
3233
3272
|
var e;
|
|
3234
3273
|
return this.shouldRenderVariants ? {
|
|
3235
3274
|
...this.content,
|
|
3236
3275
|
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
3237
|
-
} :
|
|
3276
|
+
} : handleABTestingSync({
|
|
3238
3277
|
item: this.content,
|
|
3239
|
-
canTrack:
|
|
3278
|
+
canTrack: getDefaultCanTrack(this.canTrack)
|
|
3240
3279
|
});
|
|
3241
3280
|
}
|
|
3242
3281
|
}
|
|
3243
3282
|
});
|
|
3244
|
-
function
|
|
3245
|
-
var
|
|
3246
|
-
const
|
|
3247
|
-
return
|
|
3248
|
-
!e.__isNestedRender && e.TARGET !== "reactNative" ? (
|
|
3283
|
+
function _sfc_render$1(e, t, n, o, r, s) {
|
|
3284
|
+
var l;
|
|
3285
|
+
const i = resolveComponent("inlined-script"), a = resolveComponent("inlined-styles"), c = resolveComponent("content-component");
|
|
3286
|
+
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
3287
|
+
!e.__isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
3249
3288
|
key: 0,
|
|
3250
3289
|
scriptStr: e.getScriptString()
|
|
3251
|
-
}, null, 8, ["scriptStr"])) :
|
|
3252
|
-
e.shouldRenderVariants ? (
|
|
3253
|
-
|
|
3254
|
-
id: `variants-styles-${(
|
|
3290
|
+
}, null, 8, ["scriptStr"])) : createCommentVNode("v-if", !0),
|
|
3291
|
+
e.shouldRenderVariants ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
3292
|
+
createVNode(a, {
|
|
3293
|
+
id: `variants-styles-${(l = e.content) == null ? void 0 : l.id}`,
|
|
3255
3294
|
styles: e.hideVariantsStyleString
|
|
3256
3295
|
}, null, 8, ["id", "styles"]),
|
|
3257
|
-
|
|
3258
|
-
(
|
|
3259
|
-
key:
|
|
3260
|
-
content:
|
|
3296
|
+
createVNode(i, { scriptStr: e.updateCookieAndStylesScriptStr }, null, 8, ["scriptStr"]),
|
|
3297
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (d, u) => (openBlock(), createBlock(c, {
|
|
3298
|
+
key: d.testVariationId,
|
|
3299
|
+
content: d,
|
|
3261
3300
|
showContent: !1,
|
|
3262
3301
|
model: e.model,
|
|
3263
3302
|
data: e.data,
|
|
@@ -3269,10 +3308,14 @@ function lr(e, t, n, o, r, i) {
|
|
|
3269
3308
|
locale: e.locale,
|
|
3270
3309
|
includeRefs: e.includeRefs,
|
|
3271
3310
|
enrich: e.enrich,
|
|
3272
|
-
isSsrAbTest: e.shouldRenderVariants
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3311
|
+
isSsrAbTest: e.shouldRenderVariants,
|
|
3312
|
+
blocksWrapper: e.blocksWrapper,
|
|
3313
|
+
blocksWrapperProps: e.blocksWrapperProps,
|
|
3314
|
+
contentWrapper: e.contentWrapper,
|
|
3315
|
+
contentWrapperProps: e.contentWrapperProps
|
|
3316
|
+
}, null, 8, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps"]))), 128))
|
|
3317
|
+
], 64)) : createCommentVNode("v-if", !0),
|
|
3318
|
+
createVNode(c, mergeProps({
|
|
3276
3319
|
content: e.defaultContent,
|
|
3277
3320
|
showContent: !0,
|
|
3278
3321
|
model: e.model,
|
|
@@ -3285,18 +3328,22 @@ function lr(e, t, n, o, r, i) {
|
|
|
3285
3328
|
locale: e.locale,
|
|
3286
3329
|
includeRefs: e.includeRefs,
|
|
3287
3330
|
enrich: e.enrich,
|
|
3288
|
-
isSsrAbTest: e.shouldRenderVariants
|
|
3331
|
+
isSsrAbTest: e.shouldRenderVariants,
|
|
3332
|
+
blocksWrapper: e.blocksWrapper,
|
|
3333
|
+
blocksWrapperProps: e.blocksWrapperProps,
|
|
3334
|
+
contentWrapper: e.contentWrapper,
|
|
3335
|
+
contentWrapperProps: e.contentWrapperProps
|
|
3289
3336
|
}, {
|
|
3290
3337
|
key: e.shouldRenderVariants.toString()
|
|
3291
|
-
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest"])
|
|
3338
|
+
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps"])
|
|
3292
3339
|
], 64);
|
|
3293
3340
|
}
|
|
3294
|
-
const
|
|
3341
|
+
const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content-variants/content-variants.vue"]]), fetchSymbolContent = async ({
|
|
3295
3342
|
builderContextValue: e,
|
|
3296
3343
|
symbol: t
|
|
3297
3344
|
}) => {
|
|
3298
3345
|
if ((t == null ? void 0 : t.model) && (e == null ? void 0 : e.apiKey))
|
|
3299
|
-
return
|
|
3346
|
+
return fetchOneEntry({
|
|
3300
3347
|
model: t.model,
|
|
3301
3348
|
apiKey: e.apiKey,
|
|
3302
3349
|
apiVersion: e.apiVersion,
|
|
@@ -3306,11 +3353,11 @@ const Ze = /* @__PURE__ */ y(ar, [["render", lr], ["__file", "/home/runner/work/
|
|
|
3306
3353
|
}
|
|
3307
3354
|
}
|
|
3308
3355
|
}).catch((n) => {
|
|
3309
|
-
|
|
3356
|
+
logger.error("Could not fetch symbol content: ", n);
|
|
3310
3357
|
});
|
|
3311
|
-
},
|
|
3358
|
+
}, _sfc_main = defineComponent({
|
|
3312
3359
|
name: "builder-symbol",
|
|
3313
|
-
components: { ContentVariants:
|
|
3360
|
+
components: { ContentVariants: Content },
|
|
3314
3361
|
props: [
|
|
3315
3362
|
"js",
|
|
3316
3363
|
"attributes",
|
|
@@ -3321,7 +3368,7 @@ const Ze = /* @__PURE__ */ y(ar, [["render", lr], ["__file", "/home/runner/work/
|
|
|
3321
3368
|
],
|
|
3322
3369
|
data() {
|
|
3323
3370
|
var e;
|
|
3324
|
-
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs
|
|
3371
|
+
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs };
|
|
3325
3372
|
},
|
|
3326
3373
|
mounted() {
|
|
3327
3374
|
this.setContent();
|
|
@@ -3352,7 +3399,7 @@ const Ze = /* @__PURE__ */ y(ar, [["render", lr], ["__file", "/home/runner/work/
|
|
|
3352
3399
|
},
|
|
3353
3400
|
methods: {
|
|
3354
3401
|
setContent() {
|
|
3355
|
-
this.contentToUse ||
|
|
3402
|
+
this.contentToUse || fetchSymbolContent({
|
|
3356
3403
|
symbol: this.symbol,
|
|
3357
3404
|
builderContextValue: this.builderContext
|
|
3358
3405
|
}).then((e) => {
|
|
@@ -3370,13 +3417,13 @@ const Ze = /* @__PURE__ */ y(ar, [["render", lr], ["__file", "/home/runner/work/
|
|
|
3370
3417
|
}
|
|
3371
3418
|
}
|
|
3372
3419
|
});
|
|
3373
|
-
function
|
|
3374
|
-
var a,
|
|
3375
|
-
const
|
|
3376
|
-
return
|
|
3420
|
+
function _sfc_render(e, t, n, o, r, s) {
|
|
3421
|
+
var a, c, l, d;
|
|
3422
|
+
const i = resolveComponent("content-variants");
|
|
3423
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
3377
3424
|
class: e._classStringToObject(e.className)
|
|
3378
|
-
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) },
|
|
3379
|
-
|
|
3425
|
+
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3426
|
+
createVNode(i, {
|
|
3380
3427
|
__isNestedRender: !0,
|
|
3381
3428
|
apiVersion: e.builderContext.apiVersion,
|
|
3382
3429
|
apiKey: e.builderContext.apiKey,
|
|
@@ -3385,26 +3432,26 @@ function ur(e, t, n, o, r, i) {
|
|
|
3385
3432
|
data: {
|
|
3386
3433
|
...(a = e.symbol) == null ? void 0 : a.data,
|
|
3387
3434
|
...e.builderContext.localState,
|
|
3388
|
-
...(
|
|
3435
|
+
...(l = (c = e.contentToUse) == null ? void 0 : c.data) == null ? void 0 : l.state
|
|
3389
3436
|
},
|
|
3390
|
-
model: (
|
|
3437
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
3391
3438
|
content: e.contentToUse
|
|
3392
3439
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
|
|
3393
3440
|
], 16);
|
|
3394
3441
|
}
|
|
3395
|
-
const
|
|
3396
|
-
function
|
|
3397
|
-
if (
|
|
3398
|
-
Object.assign(
|
|
3442
|
+
const Symbol$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/symbol/symbol.vue"]]), RenderBlocks = Blocks, RenderContent = Content, settings = {};
|
|
3443
|
+
function setEditorSettings(e) {
|
|
3444
|
+
if (isBrowser()) {
|
|
3445
|
+
Object.assign(settings, e);
|
|
3399
3446
|
const t = {
|
|
3400
3447
|
type: "builder.settingsChange",
|
|
3401
|
-
data:
|
|
3448
|
+
data: settings
|
|
3402
3449
|
};
|
|
3403
3450
|
parent.postMessage(t, "*");
|
|
3404
3451
|
}
|
|
3405
3452
|
}
|
|
3406
|
-
const
|
|
3407
|
-
var o, r,
|
|
3453
|
+
const fetchBuilderProps = async (e) => {
|
|
3454
|
+
var o, r, s;
|
|
3408
3455
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
|
|
3409
3456
|
...e,
|
|
3410
3457
|
apiKey: e.apiKey,
|
|
@@ -3415,47 +3462,47 @@ const wr = async (e) => {
|
|
|
3415
3462
|
urlPath: t
|
|
3416
3463
|
} : {}
|
|
3417
3464
|
},
|
|
3418
|
-
options:
|
|
3465
|
+
options: getBuilderSearchParams(e.searchParams || ((s = e.url) == null ? void 0 : s.searchParams) || e.options)
|
|
3419
3466
|
};
|
|
3420
3467
|
return {
|
|
3421
3468
|
apiKey: n.apiKey,
|
|
3422
3469
|
model: n.model,
|
|
3423
|
-
content: await
|
|
3470
|
+
content: await fetchOneEntry(n)
|
|
3424
3471
|
};
|
|
3425
3472
|
};
|
|
3426
3473
|
export {
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3474
|
+
Block as B,
|
|
3475
|
+
Content as C,
|
|
3476
|
+
Fragment as F,
|
|
3477
|
+
Image as I,
|
|
3478
|
+
RenderBlocks as R,
|
|
3479
|
+
Section as S,
|
|
3480
|
+
TARGET as T,
|
|
3481
|
+
Video as V,
|
|
3482
|
+
_export_sfc as _,
|
|
3483
|
+
BlockStyles as a,
|
|
3484
|
+
BuilderContext as b,
|
|
3485
|
+
convertStyleMapToCSSArray as c,
|
|
3486
|
+
Blocks as d,
|
|
3487
|
+
evaluate as e,
|
|
3488
|
+
RenderContent as f,
|
|
3489
|
+
Button as g,
|
|
3490
|
+
Columns as h,
|
|
3491
|
+
Symbol$1 as i,
|
|
3492
|
+
Text as j,
|
|
3493
|
+
isEditing as k,
|
|
3494
|
+
isPreviewing as l,
|
|
3495
|
+
createRegisterComponentMessage as m,
|
|
3496
|
+
_processContentResult as n,
|
|
3497
|
+
fetchEntries as o,
|
|
3498
|
+
fetchOneEntry as p,
|
|
3499
|
+
getAllContent as q,
|
|
3500
|
+
register as r,
|
|
3501
|
+
setEditorSettings as s,
|
|
3502
|
+
getContent as t,
|
|
3503
|
+
getBuilderSearchParams as u,
|
|
3504
|
+
track as v,
|
|
3505
|
+
wrapComponentRef as w,
|
|
3506
|
+
fetchBuilderProps as x,
|
|
3507
|
+
block as y
|
|
3461
3508
|
};
|