@builder.io/sdk-qwik 0.16.20 → 0.16.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks/accordion/accordion.qwik.cjs +143 -74
- package/lib/browser/blocks/accordion/accordion.qwik.mjs +143 -74
- package/lib/browser/blocks/accordion/component-info.qwik.cjs +1 -2
- package/lib/browser/blocks/accordion/component-info.qwik.mjs +1 -2
- package/lib/browser/blocks/button/button.qwik.cjs +17 -8
- package/lib/browser/blocks/button/button.qwik.mjs +17 -8
- package/lib/browser/blocks/columns/columns.qwik.cjs +91 -45
- package/lib/browser/blocks/columns/columns.qwik.mjs +91 -45
- package/lib/browser/blocks/columns/component-info.qwik.cjs +3 -4
- package/lib/browser/blocks/columns/component-info.qwik.mjs +3 -4
- package/lib/browser/blocks/custom-code/custom-code.qwik.cjs +22 -18
- package/lib/browser/blocks/custom-code/custom-code.qwik.mjs +23 -19
- package/lib/browser/blocks/embed/embed.qwik.cjs +23 -17
- package/lib/browser/blocks/embed/embed.qwik.mjs +23 -17
- package/lib/browser/blocks/form/form/form.qwik.cjs +128 -74
- package/lib/browser/blocks/form/form/form.qwik.mjs +129 -75
- package/lib/browser/blocks/form/input/input.qwik.cjs +2 -2
- package/lib/browser/blocks/form/input/input.qwik.mjs +3 -3
- package/lib/browser/blocks/form/select/select.qwik.cjs +5 -7
- package/lib/browser/blocks/form/select/select.qwik.mjs +6 -8
- package/lib/browser/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
- package/lib/browser/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
- package/lib/browser/blocks/form/textarea/textarea.qwik.cjs +21 -11
- package/lib/browser/blocks/form/textarea/textarea.qwik.mjs +22 -12
- package/lib/browser/blocks/fragment/fragment.qwik.cjs +3 -6
- package/lib/browser/blocks/fragment/fragment.qwik.mjs +4 -7
- package/lib/browser/blocks/image/component-info.qwik.cjs +3 -6
- package/lib/browser/blocks/image/component-info.qwik.mjs +3 -6
- package/lib/browser/blocks/image/image.helpers.qwik.cjs +6 -12
- package/lib/browser/blocks/image/image.helpers.qwik.mjs +6 -12
- package/lib/browser/blocks/image/image.qwik.cjs +89 -63
- package/lib/browser/blocks/image/image.qwik.mjs +89 -63
- package/lib/browser/blocks/img/img.qwik.cjs +18 -12
- package/lib/browser/blocks/img/img.qwik.mjs +18 -12
- package/lib/browser/blocks/section/section.qwik.cjs +6 -7
- package/lib/browser/blocks/section/section.qwik.mjs +7 -8
- package/lib/browser/blocks/slot/slot.qwik.cjs +43 -17
- package/lib/browser/blocks/slot/slot.qwik.mjs +43 -17
- package/lib/browser/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
- package/lib/browser/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
- package/lib/browser/blocks/symbol/symbol.qwik.cjs +137 -45
- package/lib/browser/blocks/symbol/symbol.qwik.mjs +137 -45
- package/lib/browser/blocks/tabs/tabs.qwik.cjs +99 -45
- package/lib/browser/blocks/tabs/tabs.qwik.mjs +99 -45
- package/lib/browser/blocks/text/text.qwik.cjs +15 -11
- package/lib/browser/blocks/text/text.qwik.mjs +15 -11
- package/lib/browser/blocks/video/video.qwik.cjs +87 -73
- package/lib/browser/blocks/video/video.qwik.mjs +88 -74
- package/lib/browser/components/awaiter.qwik.cjs +7 -8
- package/lib/browser/components/awaiter.qwik.mjs +8 -9
- package/lib/browser/components/block/animator.qwik.cjs +11 -22
- package/lib/browser/components/block/animator.qwik.mjs +11 -22
- package/lib/browser/components/block/block.helpers.qwik.cjs +4 -8
- package/lib/browser/components/block/block.helpers.qwik.mjs +4 -8
- package/lib/browser/components/block/block.qwik.cjs +320 -114
- package/lib/browser/components/block/block.qwik.mjs +321 -115
- package/lib/browser/components/block/components/block-styles.qwik.cjs +39 -22
- package/lib/browser/components/block/components/block-styles.qwik.mjs +40 -23
- package/lib/browser/components/block/components/block-wrapper.qwik.cjs +18 -12
- package/lib/browser/components/block/components/block-wrapper.qwik.mjs +18 -12
- package/lib/browser/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
- package/lib/browser/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
- package/lib/browser/components/block/components/interactive-element.qwik.cjs +58 -25
- package/lib/browser/components/block/components/interactive-element.qwik.mjs +59 -26
- package/lib/browser/components/block/components/repeated-block.qwik.cjs +31 -10
- package/lib/browser/components/block/components/repeated-block.qwik.mjs +32 -11
- package/lib/browser/components/blocks/blocks-wrapper.qwik.cjs +73 -25
- package/lib/browser/components/blocks/blocks-wrapper.qwik.mjs +73 -25
- package/lib/browser/components/blocks/blocks.qwik.cjs +84 -20
- package/lib/browser/components/blocks/blocks.qwik.mjs +85 -21
- package/lib/browser/components/content/components/enable-editor.qwik.cjs +175 -90
- package/lib/browser/components/content/components/enable-editor.qwik.mjs +176 -91
- package/lib/browser/components/content/components/styles.helpers.qwik.cjs +6 -12
- package/lib/browser/components/content/components/styles.helpers.qwik.mjs +6 -12
- package/lib/browser/components/content/components/styles.qwik.cjs +20 -8
- package/lib/browser/components/content/components/styles.qwik.mjs +20 -8
- package/lib/browser/components/content/content.helpers.qwik.cjs +1 -2
- package/lib/browser/components/content/content.helpers.qwik.mjs +1 -2
- package/lib/browser/components/content/content.qwik.cjs +213 -51
- package/lib/browser/components/content/content.qwik.mjs +213 -51
- package/lib/browser/components/content-variants/content-variants.qwik.cjs +325 -76
- package/lib/browser/components/content-variants/content-variants.qwik.mjs +326 -77
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
- package/lib/browser/components/inlined-script.qwik.cjs +13 -8
- package/lib/browser/components/inlined-script.qwik.mjs +14 -9
- package/lib/browser/components/inlined-styles.qwik.cjs +13 -8
- package/lib/browser/components/inlined-styles.qwik.mjs +14 -9
- package/lib/browser/constants/device-sizes.qwik.cjs +1 -2
- package/lib/browser/constants/device-sizes.qwik.mjs +1 -2
- package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
- package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
- package/lib/browser/functions/evaluate/evaluate.qwik.cjs +2 -4
- package/lib/browser/functions/evaluate/evaluate.qwik.mjs +2 -4
- package/lib/browser/functions/evaluate/helpers.qwik.cjs +3 -6
- package/lib/browser/functions/evaluate/helpers.qwik.mjs +3 -6
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
- package/lib/browser/functions/get-block-actions-handler.qwik.cjs +14 -8
- package/lib/browser/functions/get-block-actions-handler.qwik.mjs +15 -9
- package/lib/browser/functions/get-block-actions.qwik.cjs +2 -4
- package/lib/browser/functions/get-block-actions.qwik.mjs +2 -4
- package/lib/browser/functions/get-builder-search-params/index.qwik.cjs +2 -4
- package/lib/browser/functions/get-builder-search-params/index.qwik.mjs +2 -4
- package/lib/browser/functions/get-content/generate-content-url.qwik.cjs +11 -22
- package/lib/browser/functions/get-content/generate-content-url.qwik.mjs +11 -22
- package/lib/browser/functions/get-content/index.qwik.cjs +2 -4
- package/lib/browser/functions/get-content/index.qwik.mjs +2 -4
- package/lib/browser/functions/get-global-this.qwik.cjs +4 -8
- package/lib/browser/functions/get-global-this.qwik.mjs +4 -8
- package/lib/browser/functions/get-processed-block.qwik.cjs +8 -15
- package/lib/browser/functions/get-processed-block.qwik.mjs +8 -15
- package/lib/browser/functions/is-from-trusted-host.qwik.cjs +1 -2
- package/lib/browser/functions/is-from-trusted-host.qwik.mjs +1 -2
- package/lib/browser/functions/is-previewing.qwik.cjs +1 -2
- package/lib/browser/functions/is-previewing.qwik.mjs +1 -2
- package/lib/browser/functions/register-component.qwik.cjs +1 -2
- package/lib/browser/functions/register-component.qwik.mjs +1 -2
- package/lib/browser/functions/register.qwik.cjs +3 -6
- package/lib/browser/functions/register.qwik.mjs +3 -6
- package/lib/browser/functions/set.qwik.cjs +1 -2
- package/lib/browser/functions/set.qwik.mjs +1 -2
- package/lib/browser/functions/track/helpers.qwik.cjs +1 -2
- package/lib/browser/functions/track/helpers.qwik.mjs +1 -2
- package/lib/browser/functions/track/index.qwik.cjs +4 -8
- package/lib/browser/functions/track/index.qwik.mjs +4 -8
- package/lib/browser/functions/track/interaction.qwik.cjs +3 -6
- package/lib/browser/functions/track/interaction.qwik.mjs +3 -6
- package/lib/browser/helpers/ab-tests.qwik.cjs +8 -15
- package/lib/browser/helpers/ab-tests.qwik.mjs +9 -16
- package/lib/browser/helpers/cookie.qwik.cjs +2 -4
- package/lib/browser/helpers/cookie.qwik.mjs +2 -4
- package/lib/browser/helpers/css.qwik.cjs +4 -6
- package/lib/browser/helpers/css.qwik.mjs +4 -6
- package/lib/browser/helpers/flatten.qwik.cjs +2 -3
- package/lib/browser/helpers/flatten.qwik.mjs +2 -3
- package/lib/browser/helpers/localStorage.qwik.cjs +2 -4
- package/lib/browser/helpers/localStorage.qwik.mjs +2 -4
- package/lib/browser/helpers/omit.qwik.cjs +1 -2
- package/lib/browser/helpers/omit.qwik.mjs +1 -2
- package/lib/browser/helpers/search/search.qwik.cjs +2 -3
- package/lib/browser/helpers/search/search.qwik.mjs +2 -3
- package/lib/browser/helpers/sessionId.qwik.cjs +3 -4
- package/lib/browser/helpers/sessionId.qwik.mjs +3 -4
- package/lib/browser/helpers/subscribe-to-editor.qwik.cjs +5 -10
- package/lib/browser/helpers/subscribe-to-editor.qwik.mjs +5 -10
- package/lib/browser/helpers/url.qwik.cjs +2 -4
- package/lib/browser/helpers/url.qwik.mjs +2 -4
- package/lib/browser/helpers/visitorId.qwik.cjs +3 -4
- package/lib/browser/helpers/visitorId.qwik.mjs +3 -4
- package/lib/browser/scripts/init-editing.qwik.cjs +19 -25
- package/lib/browser/scripts/init-editing.qwik.mjs +19 -25
- package/lib/edge/blocks/accordion/accordion.qwik.cjs +143 -74
- package/lib/edge/blocks/accordion/accordion.qwik.mjs +143 -74
- package/lib/edge/blocks/accordion/component-info.qwik.cjs +1 -2
- package/lib/edge/blocks/accordion/component-info.qwik.mjs +1 -2
- package/lib/edge/blocks/button/button.qwik.cjs +17 -8
- package/lib/edge/blocks/button/button.qwik.mjs +17 -8
- package/lib/edge/blocks/columns/columns.qwik.cjs +91 -45
- package/lib/edge/blocks/columns/columns.qwik.mjs +91 -45
- package/lib/edge/blocks/columns/component-info.qwik.cjs +3 -4
- package/lib/edge/blocks/columns/component-info.qwik.mjs +3 -4
- package/lib/edge/blocks/custom-code/custom-code.qwik.cjs +22 -18
- package/lib/edge/blocks/custom-code/custom-code.qwik.mjs +23 -19
- package/lib/edge/blocks/embed/embed.qwik.cjs +23 -17
- package/lib/edge/blocks/embed/embed.qwik.mjs +23 -17
- package/lib/edge/blocks/form/form/form.qwik.cjs +128 -74
- package/lib/edge/blocks/form/form/form.qwik.mjs +129 -75
- package/lib/edge/blocks/form/input/input.qwik.cjs +2 -2
- package/lib/edge/blocks/form/input/input.qwik.mjs +3 -3
- package/lib/edge/blocks/form/select/select.qwik.cjs +5 -7
- package/lib/edge/blocks/form/select/select.qwik.mjs +6 -8
- package/lib/edge/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
- package/lib/edge/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
- package/lib/edge/blocks/form/textarea/textarea.qwik.cjs +21 -11
- package/lib/edge/blocks/form/textarea/textarea.qwik.mjs +22 -12
- package/lib/edge/blocks/fragment/fragment.qwik.cjs +3 -6
- package/lib/edge/blocks/fragment/fragment.qwik.mjs +4 -7
- package/lib/edge/blocks/image/component-info.qwik.cjs +3 -6
- package/lib/edge/blocks/image/component-info.qwik.mjs +3 -6
- package/lib/edge/blocks/image/image.helpers.qwik.cjs +6 -12
- package/lib/edge/blocks/image/image.helpers.qwik.mjs +6 -12
- package/lib/edge/blocks/image/image.qwik.cjs +89 -63
- package/lib/edge/blocks/image/image.qwik.mjs +89 -63
- package/lib/edge/blocks/img/img.qwik.cjs +18 -12
- package/lib/edge/blocks/img/img.qwik.mjs +18 -12
- package/lib/edge/blocks/section/section.qwik.cjs +6 -7
- package/lib/edge/blocks/section/section.qwik.mjs +7 -8
- package/lib/edge/blocks/slot/slot.qwik.cjs +43 -17
- package/lib/edge/blocks/slot/slot.qwik.mjs +43 -17
- package/lib/edge/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
- package/lib/edge/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
- package/lib/edge/blocks/symbol/symbol.qwik.cjs +137 -45
- package/lib/edge/blocks/symbol/symbol.qwik.mjs +137 -45
- package/lib/edge/blocks/tabs/tabs.qwik.cjs +99 -45
- package/lib/edge/blocks/tabs/tabs.qwik.mjs +99 -45
- package/lib/edge/blocks/text/text.qwik.cjs +15 -11
- package/lib/edge/blocks/text/text.qwik.mjs +15 -11
- package/lib/edge/blocks/video/video.qwik.cjs +87 -73
- package/lib/edge/blocks/video/video.qwik.mjs +88 -74
- package/lib/edge/components/awaiter.qwik.cjs +7 -8
- package/lib/edge/components/awaiter.qwik.mjs +8 -9
- package/lib/edge/components/block/animator.qwik.cjs +11 -22
- package/lib/edge/components/block/animator.qwik.mjs +11 -22
- package/lib/edge/components/block/block.helpers.qwik.cjs +4 -8
- package/lib/edge/components/block/block.helpers.qwik.mjs +4 -8
- package/lib/edge/components/block/block.qwik.cjs +320 -114
- package/lib/edge/components/block/block.qwik.mjs +321 -115
- package/lib/edge/components/block/components/block-styles.qwik.cjs +39 -22
- package/lib/edge/components/block/components/block-styles.qwik.mjs +40 -23
- package/lib/edge/components/block/components/block-wrapper.qwik.cjs +18 -12
- package/lib/edge/components/block/components/block-wrapper.qwik.mjs +18 -12
- package/lib/edge/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
- package/lib/edge/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
- package/lib/edge/components/block/components/interactive-element.qwik.cjs +58 -25
- package/lib/edge/components/block/components/interactive-element.qwik.mjs +59 -26
- package/lib/edge/components/block/components/repeated-block.qwik.cjs +31 -10
- package/lib/edge/components/block/components/repeated-block.qwik.mjs +32 -11
- package/lib/edge/components/blocks/blocks-wrapper.qwik.cjs +73 -25
- package/lib/edge/components/blocks/blocks-wrapper.qwik.mjs +73 -25
- package/lib/edge/components/blocks/blocks.qwik.cjs +84 -20
- package/lib/edge/components/blocks/blocks.qwik.mjs +85 -21
- package/lib/edge/components/content/components/enable-editor.qwik.cjs +175 -90
- package/lib/edge/components/content/components/enable-editor.qwik.mjs +176 -91
- package/lib/edge/components/content/components/styles.helpers.qwik.cjs +6 -12
- package/lib/edge/components/content/components/styles.helpers.qwik.mjs +6 -12
- package/lib/edge/components/content/components/styles.qwik.cjs +20 -8
- package/lib/edge/components/content/components/styles.qwik.mjs +20 -8
- package/lib/edge/components/content/content.helpers.qwik.cjs +1 -2
- package/lib/edge/components/content/content.helpers.qwik.mjs +1 -2
- package/lib/edge/components/content/content.qwik.cjs +213 -51
- package/lib/edge/components/content/content.qwik.mjs +213 -51
- package/lib/edge/components/content-variants/content-variants.qwik.cjs +325 -76
- package/lib/edge/components/content-variants/content-variants.qwik.mjs +326 -77
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
- package/lib/edge/components/inlined-script.qwik.cjs +13 -8
- package/lib/edge/components/inlined-script.qwik.mjs +14 -9
- package/lib/edge/components/inlined-styles.qwik.cjs +13 -8
- package/lib/edge/components/inlined-styles.qwik.mjs +14 -9
- package/lib/edge/constants/device-sizes.qwik.cjs +1 -2
- package/lib/edge/constants/device-sizes.qwik.mjs +1 -2
- package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
- package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
- package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.cjs +7 -6
- package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.mjs +7 -6
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.cjs +11 -20
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.mjs +11 -20
- package/lib/edge/functions/evaluate/evaluate.qwik.cjs +2 -4
- package/lib/edge/functions/evaluate/evaluate.qwik.mjs +2 -4
- package/lib/edge/functions/evaluate/helpers.qwik.cjs +3 -6
- package/lib/edge/functions/evaluate/helpers.qwik.mjs +3 -6
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
- package/lib/edge/functions/get-block-actions-handler.qwik.cjs +14 -8
- package/lib/edge/functions/get-block-actions-handler.qwik.mjs +15 -9
- package/lib/edge/functions/get-block-actions.qwik.cjs +2 -4
- package/lib/edge/functions/get-block-actions.qwik.mjs +2 -4
- package/lib/edge/functions/get-builder-search-params/index.qwik.cjs +2 -4
- package/lib/edge/functions/get-builder-search-params/index.qwik.mjs +2 -4
- package/lib/edge/functions/get-content/generate-content-url.qwik.cjs +11 -22
- package/lib/edge/functions/get-content/generate-content-url.qwik.mjs +11 -22
- package/lib/edge/functions/get-content/index.qwik.cjs +2 -4
- package/lib/edge/functions/get-content/index.qwik.mjs +2 -4
- package/lib/edge/functions/get-global-this.qwik.cjs +4 -8
- package/lib/edge/functions/get-global-this.qwik.mjs +4 -8
- package/lib/edge/functions/get-processed-block.qwik.cjs +8 -15
- package/lib/edge/functions/get-processed-block.qwik.mjs +8 -15
- package/lib/edge/functions/is-from-trusted-host.qwik.cjs +1 -2
- package/lib/edge/functions/is-from-trusted-host.qwik.mjs +1 -2
- package/lib/edge/functions/is-previewing.qwik.cjs +1 -2
- package/lib/edge/functions/is-previewing.qwik.mjs +1 -2
- package/lib/edge/functions/register-component.qwik.cjs +1 -2
- package/lib/edge/functions/register-component.qwik.mjs +1 -2
- package/lib/edge/functions/register.qwik.cjs +3 -6
- package/lib/edge/functions/register.qwik.mjs +3 -6
- package/lib/edge/functions/set.qwik.cjs +1 -2
- package/lib/edge/functions/set.qwik.mjs +1 -2
- package/lib/edge/functions/track/helpers.qwik.cjs +1 -2
- package/lib/edge/functions/track/helpers.qwik.mjs +1 -2
- package/lib/edge/functions/track/index.qwik.cjs +4 -8
- package/lib/edge/functions/track/index.qwik.mjs +4 -8
- package/lib/edge/functions/track/interaction.qwik.cjs +3 -6
- package/lib/edge/functions/track/interaction.qwik.mjs +3 -6
- package/lib/edge/helpers/ab-tests.qwik.cjs +8 -15
- package/lib/edge/helpers/ab-tests.qwik.mjs +9 -16
- package/lib/edge/helpers/cookie.qwik.cjs +2 -4
- package/lib/edge/helpers/cookie.qwik.mjs +2 -4
- package/lib/edge/helpers/css.qwik.cjs +4 -6
- package/lib/edge/helpers/css.qwik.mjs +4 -6
- package/lib/edge/helpers/flatten.qwik.cjs +2 -3
- package/lib/edge/helpers/flatten.qwik.mjs +2 -3
- package/lib/edge/helpers/localStorage.qwik.cjs +2 -4
- package/lib/edge/helpers/localStorage.qwik.mjs +2 -4
- package/lib/edge/helpers/omit.qwik.cjs +1 -2
- package/lib/edge/helpers/omit.qwik.mjs +1 -2
- package/lib/edge/helpers/search/search.qwik.cjs +2 -3
- package/lib/edge/helpers/search/search.qwik.mjs +2 -3
- package/lib/edge/helpers/sessionId.qwik.cjs +3 -4
- package/lib/edge/helpers/sessionId.qwik.mjs +3 -4
- package/lib/edge/helpers/subscribe-to-editor.qwik.cjs +5 -10
- package/lib/edge/helpers/subscribe-to-editor.qwik.mjs +5 -10
- package/lib/edge/helpers/url.qwik.cjs +2 -4
- package/lib/edge/helpers/url.qwik.mjs +2 -4
- package/lib/edge/helpers/visitorId.qwik.cjs +3 -4
- package/lib/edge/helpers/visitorId.qwik.mjs +3 -4
- package/lib/edge/scripts/init-editing.qwik.cjs +19 -25
- package/lib/edge/scripts/init-editing.qwik.mjs +19 -25
- package/lib/node/blocks/accordion/accordion.qwik.cjs +143 -74
- package/lib/node/blocks/accordion/accordion.qwik.mjs +143 -74
- package/lib/node/blocks/accordion/component-info.qwik.cjs +1 -2
- package/lib/node/blocks/accordion/component-info.qwik.mjs +1 -2
- package/lib/node/blocks/button/button.qwik.cjs +17 -8
- package/lib/node/blocks/button/button.qwik.mjs +17 -8
- package/lib/node/blocks/columns/columns.qwik.cjs +91 -45
- package/lib/node/blocks/columns/columns.qwik.mjs +91 -45
- package/lib/node/blocks/columns/component-info.qwik.cjs +3 -4
- package/lib/node/blocks/columns/component-info.qwik.mjs +3 -4
- package/lib/node/blocks/custom-code/custom-code.qwik.cjs +22 -18
- package/lib/node/blocks/custom-code/custom-code.qwik.mjs +23 -19
- package/lib/node/blocks/embed/embed.qwik.cjs +23 -17
- package/lib/node/blocks/embed/embed.qwik.mjs +23 -17
- package/lib/node/blocks/form/form/form.qwik.cjs +128 -74
- package/lib/node/blocks/form/form/form.qwik.mjs +129 -75
- package/lib/node/blocks/form/input/input.qwik.cjs +2 -2
- package/lib/node/blocks/form/input/input.qwik.mjs +3 -3
- package/lib/node/blocks/form/select/select.qwik.cjs +5 -7
- package/lib/node/blocks/form/select/select.qwik.mjs +6 -8
- package/lib/node/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
- package/lib/node/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
- package/lib/node/blocks/form/textarea/textarea.qwik.cjs +21 -11
- package/lib/node/blocks/form/textarea/textarea.qwik.mjs +22 -12
- package/lib/node/blocks/fragment/fragment.qwik.cjs +3 -6
- package/lib/node/blocks/fragment/fragment.qwik.mjs +4 -7
- package/lib/node/blocks/image/component-info.qwik.cjs +3 -6
- package/lib/node/blocks/image/component-info.qwik.mjs +3 -6
- package/lib/node/blocks/image/image.helpers.qwik.cjs +6 -12
- package/lib/node/blocks/image/image.helpers.qwik.mjs +6 -12
- package/lib/node/blocks/image/image.qwik.cjs +89 -63
- package/lib/node/blocks/image/image.qwik.mjs +89 -63
- package/lib/node/blocks/img/img.qwik.cjs +18 -12
- package/lib/node/blocks/img/img.qwik.mjs +18 -12
- package/lib/node/blocks/section/section.qwik.cjs +6 -7
- package/lib/node/blocks/section/section.qwik.mjs +7 -8
- package/lib/node/blocks/slot/slot.qwik.cjs +43 -17
- package/lib/node/blocks/slot/slot.qwik.mjs +43 -17
- package/lib/node/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
- package/lib/node/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
- package/lib/node/blocks/symbol/symbol.qwik.cjs +137 -45
- package/lib/node/blocks/symbol/symbol.qwik.mjs +137 -45
- package/lib/node/blocks/tabs/tabs.qwik.cjs +99 -45
- package/lib/node/blocks/tabs/tabs.qwik.mjs +99 -45
- package/lib/node/blocks/text/text.qwik.cjs +15 -11
- package/lib/node/blocks/text/text.qwik.mjs +15 -11
- package/lib/node/blocks/video/video.qwik.cjs +87 -73
- package/lib/node/blocks/video/video.qwik.mjs +88 -74
- package/lib/node/components/awaiter.qwik.cjs +7 -8
- package/lib/node/components/awaiter.qwik.mjs +8 -9
- package/lib/node/components/block/animator.qwik.cjs +11 -22
- package/lib/node/components/block/animator.qwik.mjs +11 -22
- package/lib/node/components/block/block.helpers.qwik.cjs +4 -8
- package/lib/node/components/block/block.helpers.qwik.mjs +4 -8
- package/lib/node/components/block/block.qwik.cjs +320 -114
- package/lib/node/components/block/block.qwik.mjs +321 -115
- package/lib/node/components/block/components/block-styles.qwik.cjs +39 -22
- package/lib/node/components/block/components/block-styles.qwik.mjs +40 -23
- package/lib/node/components/block/components/block-wrapper.qwik.cjs +18 -12
- package/lib/node/components/block/components/block-wrapper.qwik.mjs +18 -12
- package/lib/node/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
- package/lib/node/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
- package/lib/node/components/block/components/interactive-element.qwik.cjs +58 -25
- package/lib/node/components/block/components/interactive-element.qwik.mjs +59 -26
- package/lib/node/components/block/components/repeated-block.qwik.cjs +31 -10
- package/lib/node/components/block/components/repeated-block.qwik.mjs +32 -11
- package/lib/node/components/blocks/blocks-wrapper.qwik.cjs +73 -25
- package/lib/node/components/blocks/blocks-wrapper.qwik.mjs +73 -25
- package/lib/node/components/blocks/blocks.qwik.cjs +84 -20
- package/lib/node/components/blocks/blocks.qwik.mjs +85 -21
- package/lib/node/components/content/components/enable-editor.qwik.cjs +175 -90
- package/lib/node/components/content/components/enable-editor.qwik.mjs +176 -91
- package/lib/node/components/content/components/styles.helpers.qwik.cjs +6 -12
- package/lib/node/components/content/components/styles.helpers.qwik.mjs +6 -12
- package/lib/node/components/content/components/styles.qwik.cjs +20 -8
- package/lib/node/components/content/components/styles.qwik.mjs +20 -8
- package/lib/node/components/content/content.helpers.qwik.cjs +1 -2
- package/lib/node/components/content/content.helpers.qwik.mjs +1 -2
- package/lib/node/components/content/content.qwik.cjs +213 -51
- package/lib/node/components/content/content.qwik.mjs +213 -51
- package/lib/node/components/content-variants/content-variants.qwik.cjs +325 -76
- package/lib/node/components/content-variants/content-variants.qwik.mjs +326 -77
- package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
- package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
- package/lib/node/components/inlined-script.qwik.cjs +13 -8
- package/lib/node/components/inlined-script.qwik.mjs +14 -9
- package/lib/node/components/inlined-styles.qwik.cjs +13 -8
- package/lib/node/components/inlined-styles.qwik.mjs +14 -9
- package/lib/node/constants/device-sizes.qwik.cjs +1 -2
- package/lib/node/constants/device-sizes.qwik.mjs +1 -2
- package/lib/node/constants/sdk-version.qwik.cjs +1 -1
- package/lib/node/constants/sdk-version.qwik.mjs +1 -1
- package/lib/node/functions/evaluate/evaluate.qwik.cjs +2 -4
- package/lib/node/functions/evaluate/evaluate.qwik.mjs +2 -4
- package/lib/node/functions/evaluate/helpers.qwik.cjs +3 -6
- package/lib/node/functions/evaluate/helpers.qwik.mjs +3 -6
- package/lib/node/functions/evaluate/node-runtime/init.qwik.cjs +1 -2
- package/lib/node/functions/evaluate/node-runtime/init.qwik.mjs +1 -2
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
- package/lib/node/functions/get-block-actions-handler.qwik.cjs +14 -8
- package/lib/node/functions/get-block-actions-handler.qwik.mjs +15 -9
- package/lib/node/functions/get-block-actions.qwik.cjs +2 -4
- package/lib/node/functions/get-block-actions.qwik.mjs +2 -4
- package/lib/node/functions/get-builder-search-params/index.qwik.cjs +2 -4
- package/lib/node/functions/get-builder-search-params/index.qwik.mjs +2 -4
- package/lib/node/functions/get-content/generate-content-url.qwik.cjs +11 -22
- package/lib/node/functions/get-content/generate-content-url.qwik.mjs +11 -22
- package/lib/node/functions/get-content/index.qwik.cjs +2 -4
- package/lib/node/functions/get-content/index.qwik.mjs +2 -4
- package/lib/node/functions/get-global-this.qwik.cjs +4 -8
- package/lib/node/functions/get-global-this.qwik.mjs +4 -8
- package/lib/node/functions/get-processed-block.qwik.cjs +8 -15
- package/lib/node/functions/get-processed-block.qwik.mjs +8 -15
- package/lib/node/functions/is-from-trusted-host.qwik.cjs +1 -2
- package/lib/node/functions/is-from-trusted-host.qwik.mjs +1 -2
- package/lib/node/functions/is-previewing.qwik.cjs +1 -2
- package/lib/node/functions/is-previewing.qwik.mjs +1 -2
- package/lib/node/functions/register-component.qwik.cjs +1 -2
- package/lib/node/functions/register-component.qwik.mjs +1 -2
- package/lib/node/functions/register.qwik.cjs +3 -6
- package/lib/node/functions/register.qwik.mjs +3 -6
- package/lib/node/functions/set.qwik.cjs +1 -2
- package/lib/node/functions/set.qwik.mjs +1 -2
- package/lib/node/functions/track/helpers.qwik.cjs +1 -2
- package/lib/node/functions/track/helpers.qwik.mjs +1 -2
- package/lib/node/functions/track/index.qwik.cjs +4 -8
- package/lib/node/functions/track/index.qwik.mjs +4 -8
- package/lib/node/functions/track/interaction.qwik.cjs +3 -6
- package/lib/node/functions/track/interaction.qwik.mjs +3 -6
- package/lib/node/helpers/ab-tests.qwik.cjs +8 -15
- package/lib/node/helpers/ab-tests.qwik.mjs +9 -16
- package/lib/node/helpers/cookie.qwik.cjs +2 -4
- package/lib/node/helpers/cookie.qwik.mjs +2 -4
- package/lib/node/helpers/css.qwik.cjs +4 -6
- package/lib/node/helpers/css.qwik.mjs +4 -6
- package/lib/node/helpers/flatten.qwik.cjs +2 -3
- package/lib/node/helpers/flatten.qwik.mjs +2 -3
- package/lib/node/helpers/localStorage.qwik.cjs +2 -4
- package/lib/node/helpers/localStorage.qwik.mjs +2 -4
- package/lib/node/helpers/omit.qwik.cjs +1 -2
- package/lib/node/helpers/omit.qwik.mjs +1 -2
- package/lib/node/helpers/search/search.qwik.cjs +2 -3
- package/lib/node/helpers/search/search.qwik.mjs +2 -3
- package/lib/node/helpers/sessionId.qwik.cjs +3 -4
- package/lib/node/helpers/sessionId.qwik.mjs +3 -4
- package/lib/node/helpers/subscribe-to-editor.qwik.cjs +5 -10
- package/lib/node/helpers/subscribe-to-editor.qwik.mjs +5 -10
- package/lib/node/helpers/url.qwik.cjs +2 -4
- package/lib/node/helpers/url.qwik.mjs +2 -4
- package/lib/node/helpers/visitorId.qwik.cjs +3 -4
- package/lib/node/helpers/visitorId.qwik.mjs +3 -4
- package/lib/node/scripts/init-editing.qwik.cjs +19 -25
- package/lib/node/scripts/init-editing.qwik.mjs +19 -25
- package/package.json +2 -2
- package/types/src/constants/sdk-version.d.ts +1 -1
|
@@ -6,9 +6,8 @@ const DEFAULT_TRUSTED_HOSTS = [
|
|
|
6
6
|
"qa.builder.io"
|
|
7
7
|
];
|
|
8
8
|
function isFromTrustedHost(trustedHosts, e) {
|
|
9
|
-
if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
|
|
9
|
+
if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
|
|
10
10
|
return false;
|
|
11
|
-
}
|
|
12
11
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
13
12
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
14
13
|
}
|
|
@@ -4,9 +4,8 @@ const search = require("../helpers/search/search.qwik.cjs");
|
|
|
4
4
|
const isBrowser = require("./is-browser.qwik.cjs");
|
|
5
5
|
function isPreviewing(_search) {
|
|
6
6
|
const search$1 = _search || (isBrowser.isBrowser() ? window.location.search : void 0);
|
|
7
|
-
if (!search$1)
|
|
7
|
+
if (!search$1)
|
|
8
8
|
return false;
|
|
9
|
-
}
|
|
10
9
|
const normalizedSearch = search.getSearchString(search$1);
|
|
11
10
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
12
11
|
}
|
|
@@ -2,9 +2,8 @@ import { getSearchString } from "../helpers/search/search.qwik.mjs";
|
|
|
2
2
|
import { isBrowser } from "./is-browser.qwik.mjs";
|
|
3
3
|
function isPreviewing(_search) {
|
|
4
4
|
const search = _search || (isBrowser() ? window.location.search : void 0);
|
|
5
|
-
if (!search)
|
|
5
|
+
if (!search)
|
|
6
6
|
return false;
|
|
7
|
-
}
|
|
8
7
|
const normalizedSearch = getSearchString(search);
|
|
9
8
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
10
9
|
}
|
|
@@ -11,9 +11,8 @@ const serializeFn = (fnValue) => {
|
|
|
11
11
|
};
|
|
12
12
|
function serializeIncludingFunctions(info) {
|
|
13
13
|
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
14
|
-
if (typeof value === "function")
|
|
14
|
+
if (typeof value === "function")
|
|
15
15
|
return serializeFn(value);
|
|
16
|
-
}
|
|
17
16
|
return value;
|
|
18
17
|
}));
|
|
19
18
|
}
|
|
@@ -9,9 +9,8 @@ const serializeFn = (fnValue) => {
|
|
|
9
9
|
};
|
|
10
10
|
function serializeIncludingFunctions(info) {
|
|
11
11
|
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
12
|
-
if (typeof value === "function")
|
|
12
|
+
if (typeof value === "function")
|
|
13
13
|
return serializeFn(value);
|
|
14
|
-
}
|
|
15
14
|
return value;
|
|
16
15
|
}));
|
|
17
16
|
}
|
|
@@ -4,13 +4,11 @@ const isBrowser = require("./is-browser.qwik.cjs");
|
|
|
4
4
|
const registerComponent = require("./register-component.qwik.cjs");
|
|
5
5
|
const registry = {};
|
|
6
6
|
function register(type, info) {
|
|
7
|
-
if (type === "plugin")
|
|
7
|
+
if (type === "plugin")
|
|
8
8
|
info = registerComponent.serializeIncludingFunctions(info);
|
|
9
|
-
}
|
|
10
9
|
let typeList = registry[type];
|
|
11
|
-
if (!typeList)
|
|
10
|
+
if (!typeList)
|
|
12
11
|
typeList = registry[type] = [];
|
|
13
|
-
}
|
|
14
12
|
typeList.push(info);
|
|
15
13
|
if (isBrowser.isBrowser()) {
|
|
16
14
|
const message = {
|
|
@@ -22,9 +20,8 @@ function register(type, info) {
|
|
|
22
20
|
};
|
|
23
21
|
try {
|
|
24
22
|
parent.postMessage(message, "*");
|
|
25
|
-
if (parent !== window)
|
|
23
|
+
if (parent !== window)
|
|
26
24
|
window.postMessage(message, "*");
|
|
27
|
-
}
|
|
28
25
|
} catch (err) {
|
|
29
26
|
console.debug("Could not postmessage", err);
|
|
30
27
|
}
|
|
@@ -2,13 +2,11 @@ import { isBrowser } from "./is-browser.qwik.mjs";
|
|
|
2
2
|
import { serializeIncludingFunctions } from "./register-component.qwik.mjs";
|
|
3
3
|
const registry = {};
|
|
4
4
|
function register(type, info) {
|
|
5
|
-
if (type === "plugin")
|
|
5
|
+
if (type === "plugin")
|
|
6
6
|
info = serializeIncludingFunctions(info);
|
|
7
|
-
}
|
|
8
7
|
let typeList = registry[type];
|
|
9
|
-
if (!typeList)
|
|
8
|
+
if (!typeList)
|
|
10
9
|
typeList = registry[type] = [];
|
|
11
|
-
}
|
|
12
10
|
typeList.push(info);
|
|
13
11
|
if (isBrowser()) {
|
|
14
12
|
const message = {
|
|
@@ -20,9 +18,8 @@ function register(type, info) {
|
|
|
20
18
|
};
|
|
21
19
|
try {
|
|
22
20
|
parent.postMessage(message, "*");
|
|
23
|
-
if (parent !== window)
|
|
21
|
+
if (parent !== window)
|
|
24
22
|
window.postMessage(message, "*");
|
|
25
|
-
}
|
|
26
23
|
} catch (err) {
|
|
27
24
|
console.debug("Could not postmessage", err);
|
|
28
25
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const set = (obj, _path, value) => {
|
|
4
|
-
if (Object(obj) !== obj)
|
|
4
|
+
if (Object(obj) !== obj)
|
|
5
5
|
return obj;
|
|
6
|
-
}
|
|
7
6
|
const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
|
|
8
7
|
path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
|
|
9
8
|
return obj;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const set = (obj, _path, value) => {
|
|
2
|
-
if (Object(obj) !== obj)
|
|
2
|
+
if (Object(obj) !== obj)
|
|
3
3
|
return obj;
|
|
4
|
-
}
|
|
5
4
|
const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
|
|
6
5
|
path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
|
|
7
6
|
return obj;
|
|
@@ -5,9 +5,8 @@ const isBrowser = require("../is-browser.qwik.cjs");
|
|
|
5
5
|
const getLocation = () => {
|
|
6
6
|
if (isBrowser.isBrowser()) {
|
|
7
7
|
const parsedLocation = new URL(location.href);
|
|
8
|
-
if (parsedLocation.pathname === "")
|
|
8
|
+
if (parsedLocation.pathname === "")
|
|
9
9
|
parsedLocation.pathname = "/";
|
|
10
|
-
}
|
|
11
10
|
return parsedLocation;
|
|
12
11
|
} else {
|
|
13
12
|
console.warn("Cannot get location for tracking in non-browser environment");
|
|
@@ -3,9 +3,8 @@ import { isBrowser } from "../is-browser.qwik.mjs";
|
|
|
3
3
|
const getLocation = () => {
|
|
4
4
|
if (isBrowser()) {
|
|
5
5
|
const parsedLocation = new URL(location.href);
|
|
6
|
-
if (parsedLocation.pathname === "")
|
|
6
|
+
if (parsedLocation.pathname === "")
|
|
7
7
|
parsedLocation.pathname = "/";
|
|
8
|
-
}
|
|
9
8
|
return parsedLocation;
|
|
10
9
|
} else {
|
|
11
10
|
console.warn("Cannot get location for tracking in non-browser environment");
|
|
@@ -9,12 +9,11 @@ const isBrowser = require("../is-browser.qwik.cjs");
|
|
|
9
9
|
const isEditing = require("../is-editing.qwik.cjs");
|
|
10
10
|
const helpers = require("./helpers.qwik.cjs");
|
|
11
11
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
12
|
-
if (!canTrack)
|
|
12
|
+
if (!canTrack)
|
|
13
13
|
return {
|
|
14
14
|
visitorId: void 0,
|
|
15
15
|
sessionId: void 0
|
|
16
16
|
};
|
|
17
|
-
}
|
|
18
17
|
const sessionId$1 = await sessionId.getSessionId({
|
|
19
18
|
canTrack
|
|
20
19
|
});
|
|
@@ -46,15 +45,12 @@ async function _track({ apiHost, ...eventProps }) {
|
|
|
46
45
|
logger.logger.error("Missing API key for track call. Please provide your API key.");
|
|
47
46
|
return;
|
|
48
47
|
}
|
|
49
|
-
if (!eventProps.canTrack)
|
|
48
|
+
if (!eventProps.canTrack)
|
|
50
49
|
return;
|
|
51
|
-
|
|
52
|
-
if (isEditing.isEditing()) {
|
|
50
|
+
if (isEditing.isEditing())
|
|
53
51
|
return;
|
|
54
|
-
|
|
55
|
-
if (!(isBrowser.isBrowser() || target.TARGET === "reactNative")) {
|
|
52
|
+
if (!(isBrowser.isBrowser() || target.TARGET === "reactNative"))
|
|
56
53
|
return;
|
|
57
|
-
}
|
|
58
54
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
59
55
|
return fetch(`${baseUrl}/api/v1/track`, {
|
|
60
56
|
method: "POST",
|
|
@@ -7,12 +7,11 @@ import { isBrowser } from "../is-browser.qwik.mjs";
|
|
|
7
7
|
import { isEditing } from "../is-editing.qwik.mjs";
|
|
8
8
|
import { getUserAttributes } from "./helpers.qwik.mjs";
|
|
9
9
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
10
|
-
if (!canTrack)
|
|
10
|
+
if (!canTrack)
|
|
11
11
|
return {
|
|
12
12
|
visitorId: void 0,
|
|
13
13
|
sessionId: void 0
|
|
14
14
|
};
|
|
15
|
-
}
|
|
16
15
|
const sessionId = await getSessionId({
|
|
17
16
|
canTrack
|
|
18
17
|
});
|
|
@@ -44,15 +43,12 @@ async function _track({ apiHost, ...eventProps }) {
|
|
|
44
43
|
logger.error("Missing API key for track call. Please provide your API key.");
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
|
-
if (!eventProps.canTrack)
|
|
46
|
+
if (!eventProps.canTrack)
|
|
48
47
|
return;
|
|
49
|
-
|
|
50
|
-
if (isEditing()) {
|
|
48
|
+
if (isEditing())
|
|
51
49
|
return;
|
|
52
|
-
|
|
53
|
-
if (!(isBrowser() || TARGET === "reactNative")) {
|
|
50
|
+
if (!(isBrowser() || TARGET === "reactNative"))
|
|
54
51
|
return;
|
|
55
|
-
}
|
|
56
52
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
57
53
|
return fetch(`${baseUrl}/api/v1/track`, {
|
|
58
54
|
method: "POST",
|
|
@@ -4,18 +4,15 @@ function round(num) {
|
|
|
4
4
|
return Math.round(num * 1e3) / 1e3;
|
|
5
5
|
}
|
|
6
6
|
const findParentElement = (target, callback, checkElement = true) => {
|
|
7
|
-
if (!(target instanceof HTMLElement))
|
|
7
|
+
if (!(target instanceof HTMLElement))
|
|
8
8
|
return null;
|
|
9
|
-
}
|
|
10
9
|
let parent = checkElement ? target : target.parentElement;
|
|
11
10
|
do {
|
|
12
|
-
if (!parent)
|
|
11
|
+
if (!parent)
|
|
13
12
|
return null;
|
|
14
|
-
}
|
|
15
13
|
const matches = callback(parent);
|
|
16
|
-
if (matches)
|
|
14
|
+
if (matches)
|
|
17
15
|
return parent;
|
|
18
|
-
}
|
|
19
16
|
} while (parent = parent.parentElement);
|
|
20
17
|
return null;
|
|
21
18
|
};
|
|
@@ -2,18 +2,15 @@ function round(num) {
|
|
|
2
2
|
return Math.round(num * 1e3) / 1e3;
|
|
3
3
|
}
|
|
4
4
|
const findParentElement = (target, callback, checkElement = true) => {
|
|
5
|
-
if (!(target instanceof HTMLElement))
|
|
5
|
+
if (!(target instanceof HTMLElement))
|
|
6
6
|
return null;
|
|
7
|
-
}
|
|
8
7
|
let parent = checkElement ? target : target.parentElement;
|
|
9
8
|
do {
|
|
10
|
-
if (!parent)
|
|
9
|
+
if (!parent)
|
|
11
10
|
return null;
|
|
12
|
-
}
|
|
13
11
|
const matches = callback(parent);
|
|
14
|
-
if (matches)
|
|
12
|
+
if (matches)
|
|
15
13
|
return parent;
|
|
16
|
-
}
|
|
17
14
|
} while (parent = parent.parentElement);
|
|
18
15
|
return null;
|
|
19
16
|
};
|
|
@@ -26,9 +26,8 @@ const getRandomVariationId = ({ id, variations }) => {
|
|
|
26
26
|
for (const id2 in variations) {
|
|
27
27
|
const testRatio = (_a = variations[id2]) == null ? void 0 : _a.testRatio;
|
|
28
28
|
n += testRatio;
|
|
29
|
-
if (random < n)
|
|
29
|
+
if (random < n)
|
|
30
30
|
return id2;
|
|
31
|
-
}
|
|
32
31
|
}
|
|
33
32
|
return id;
|
|
34
33
|
};
|
|
@@ -45,29 +44,25 @@ const getAndSetVariantId = (args) => {
|
|
|
45
44
|
const getTestFields = ({ item, testGroupId }) => {
|
|
46
45
|
const variationValue = item.variations[testGroupId];
|
|
47
46
|
if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
48
|
-
!variationValue)
|
|
47
|
+
!variationValue)
|
|
49
48
|
return {
|
|
50
49
|
testVariationId: item.id,
|
|
51
50
|
testVariationName: "Default"
|
|
52
51
|
};
|
|
53
|
-
|
|
52
|
+
else
|
|
54
53
|
return {
|
|
55
54
|
data: variationValue.data,
|
|
56
55
|
testVariationId: variationValue.id,
|
|
57
56
|
testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
|
|
58
57
|
};
|
|
59
|
-
}
|
|
60
58
|
};
|
|
61
59
|
const handleABTestingSync = ({ item, canTrack }) => {
|
|
62
|
-
if (!canTrack)
|
|
60
|
+
if (!canTrack)
|
|
63
61
|
return item;
|
|
64
|
-
|
|
65
|
-
if (!item) {
|
|
62
|
+
if (!item)
|
|
66
63
|
return void 0;
|
|
67
|
-
|
|
68
|
-
if (!checkIsBuilderContentWithVariations(item)) {
|
|
64
|
+
if (!checkIsBuilderContentWithVariations(item))
|
|
69
65
|
return item;
|
|
70
|
-
}
|
|
71
66
|
const testGroupId = getContentVariationCookieSync({
|
|
72
67
|
contentId: item.id
|
|
73
68
|
}) || getAndSetVariantId({
|
|
@@ -84,12 +79,10 @@ const handleABTestingSync = ({ item, canTrack }) => {
|
|
|
84
79
|
};
|
|
85
80
|
};
|
|
86
81
|
const handleABTesting = async ({ item, canTrack }) => {
|
|
87
|
-
if (!canTrack)
|
|
82
|
+
if (!canTrack)
|
|
88
83
|
return item;
|
|
89
|
-
|
|
90
|
-
if (!checkIsBuilderContentWithVariations(item)) {
|
|
84
|
+
if (!checkIsBuilderContentWithVariations(item))
|
|
91
85
|
return item;
|
|
92
|
-
}
|
|
93
86
|
const cookieValue = await getContentVariationCookie({
|
|
94
87
|
contentId: item.id
|
|
95
88
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { checkIsDefined } from "./nullable.qwik.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { getCookie, getCookieSync, setCookie } from "./cookie.qwik.mjs";
|
|
3
3
|
import { logger } from "./logger.qwik.mjs";
|
|
4
4
|
const BUILDER_STORE_PREFIX = "builder.tests";
|
|
5
5
|
const getContentTestKey = (id) => `${BUILDER_STORE_PREFIX}.${id}`;
|
|
@@ -24,9 +24,8 @@ const getRandomVariationId = ({ id, variations }) => {
|
|
|
24
24
|
for (const id2 in variations) {
|
|
25
25
|
const testRatio = (_a = variations[id2]) == null ? void 0 : _a.testRatio;
|
|
26
26
|
n += testRatio;
|
|
27
|
-
if (random < n)
|
|
27
|
+
if (random < n)
|
|
28
28
|
return id2;
|
|
29
|
-
}
|
|
30
29
|
}
|
|
31
30
|
return id;
|
|
32
31
|
};
|
|
@@ -43,29 +42,25 @@ const getAndSetVariantId = (args) => {
|
|
|
43
42
|
const getTestFields = ({ item, testGroupId }) => {
|
|
44
43
|
const variationValue = item.variations[testGroupId];
|
|
45
44
|
if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
46
|
-
!variationValue)
|
|
45
|
+
!variationValue)
|
|
47
46
|
return {
|
|
48
47
|
testVariationId: item.id,
|
|
49
48
|
testVariationName: "Default"
|
|
50
49
|
};
|
|
51
|
-
|
|
50
|
+
else
|
|
52
51
|
return {
|
|
53
52
|
data: variationValue.data,
|
|
54
53
|
testVariationId: variationValue.id,
|
|
55
54
|
testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
|
|
56
55
|
};
|
|
57
|
-
}
|
|
58
56
|
};
|
|
59
57
|
const handleABTestingSync = ({ item, canTrack }) => {
|
|
60
|
-
if (!canTrack)
|
|
58
|
+
if (!canTrack)
|
|
61
59
|
return item;
|
|
62
|
-
|
|
63
|
-
if (!item) {
|
|
60
|
+
if (!item)
|
|
64
61
|
return void 0;
|
|
65
|
-
|
|
66
|
-
if (!checkIsBuilderContentWithVariations(item)) {
|
|
62
|
+
if (!checkIsBuilderContentWithVariations(item))
|
|
67
63
|
return item;
|
|
68
|
-
}
|
|
69
64
|
const testGroupId = getContentVariationCookieSync({
|
|
70
65
|
contentId: item.id
|
|
71
66
|
}) || getAndSetVariantId({
|
|
@@ -82,12 +77,10 @@ const handleABTestingSync = ({ item, canTrack }) => {
|
|
|
82
77
|
};
|
|
83
78
|
};
|
|
84
79
|
const handleABTesting = async ({ item, canTrack }) => {
|
|
85
|
-
if (!canTrack)
|
|
80
|
+
if (!canTrack)
|
|
86
81
|
return item;
|
|
87
|
-
|
|
88
|
-
if (!checkIsBuilderContentWithVariations(item)) {
|
|
82
|
+
if (!checkIsBuilderContentWithVariations(item))
|
|
89
83
|
return item;
|
|
90
|
-
}
|
|
91
84
|
const cookieValue = await getContentVariationCookie({
|
|
92
85
|
contentId: item.id
|
|
93
86
|
});
|
|
@@ -7,9 +7,8 @@ const url = require("./url.qwik.cjs");
|
|
|
7
7
|
const getCookieSync = ({ name, canTrack }) => {
|
|
8
8
|
var _a;
|
|
9
9
|
try {
|
|
10
|
-
if (!canTrack)
|
|
10
|
+
if (!canTrack)
|
|
11
11
|
return void 0;
|
|
12
|
-
}
|
|
13
12
|
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
14
13
|
} catch (err) {
|
|
15
14
|
logger.logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
|
|
@@ -62,9 +61,8 @@ const createCookieString = ({ name, value, expires }) => {
|
|
|
62
61
|
};
|
|
63
62
|
const setCookie = async ({ name, value, expires, canTrack }) => {
|
|
64
63
|
try {
|
|
65
|
-
if (!canTrack)
|
|
64
|
+
if (!canTrack)
|
|
66
65
|
return;
|
|
67
|
-
}
|
|
68
66
|
const cookie = createCookieString({
|
|
69
67
|
name,
|
|
70
68
|
value,
|
|
@@ -5,9 +5,8 @@ import { getTopLevelDomain } from "./url.qwik.mjs";
|
|
|
5
5
|
const getCookieSync = ({ name, canTrack }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
try {
|
|
8
|
-
if (!canTrack)
|
|
8
|
+
if (!canTrack)
|
|
9
9
|
return void 0;
|
|
10
|
-
}
|
|
11
10
|
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
12
11
|
} catch (err) {
|
|
13
12
|
logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
|
|
@@ -60,9 +59,8 @@ const createCookieString = ({ name, value, expires }) => {
|
|
|
60
59
|
};
|
|
61
60
|
const setCookie = async ({ name, value, expires, canTrack }) => {
|
|
62
61
|
try {
|
|
63
|
-
if (!canTrack)
|
|
62
|
+
if (!canTrack)
|
|
64
63
|
return;
|
|
65
|
-
}
|
|
66
64
|
const cookie = createCookieString({
|
|
67
65
|
name,
|
|
68
66
|
value,
|
|
@@ -4,11 +4,10 @@ const camelToKebabCase = require("../functions/camel-to-kebab-case.qwik.cjs");
|
|
|
4
4
|
const nullable = require("./nullable.qwik.cjs");
|
|
5
5
|
const convertStyleMapToCSSArray = (style) => {
|
|
6
6
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
7
|
-
if (typeof value === "string")
|
|
7
|
+
if (typeof value === "string")
|
|
8
8
|
return `${camelToKebabCase.camelToKebabCase(key)}: ${value};`;
|
|
9
|
-
|
|
9
|
+
else
|
|
10
10
|
return void 0;
|
|
11
|
-
}
|
|
12
11
|
});
|
|
13
12
|
return cssProps.filter(nullable.checkIsDefined);
|
|
14
13
|
};
|
|
@@ -17,13 +16,12 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
|
|
|
17
16
|
const cssClass = `.${className} {
|
|
18
17
|
${convertStyleMapToCSS(styles)}
|
|
19
18
|
}`;
|
|
20
|
-
if (mediaQuery)
|
|
19
|
+
if (mediaQuery)
|
|
21
20
|
return `${mediaQuery} {
|
|
22
21
|
${cssClass}
|
|
23
22
|
}`;
|
|
24
|
-
|
|
23
|
+
else
|
|
25
24
|
return cssClass;
|
|
26
|
-
}
|
|
27
25
|
};
|
|
28
26
|
exports.convertStyleMapToCSS = convertStyleMapToCSS;
|
|
29
27
|
exports.convertStyleMapToCSSArray = convertStyleMapToCSSArray;
|
|
@@ -2,11 +2,10 @@ import { camelToKebabCase } from "../functions/camel-to-kebab-case.qwik.mjs";
|
|
|
2
2
|
import { checkIsDefined } from "./nullable.qwik.mjs";
|
|
3
3
|
const convertStyleMapToCSSArray = (style) => {
|
|
4
4
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
5
|
-
if (typeof value === "string")
|
|
5
|
+
if (typeof value === "string")
|
|
6
6
|
return `${camelToKebabCase(key)}: ${value};`;
|
|
7
|
-
|
|
7
|
+
else
|
|
8
8
|
return void 0;
|
|
9
|
-
}
|
|
10
9
|
});
|
|
11
10
|
return cssProps.filter(checkIsDefined);
|
|
12
11
|
};
|
|
@@ -15,13 +14,12 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
|
|
|
15
14
|
const cssClass = `.${className} {
|
|
16
15
|
${convertStyleMapToCSS(styles)}
|
|
17
16
|
}`;
|
|
18
|
-
if (mediaQuery)
|
|
17
|
+
if (mediaQuery)
|
|
19
18
|
return `${mediaQuery} {
|
|
20
19
|
${cssClass}
|
|
21
20
|
}`;
|
|
22
|
-
|
|
21
|
+
else
|
|
23
22
|
return cssClass;
|
|
24
|
-
}
|
|
25
23
|
};
|
|
26
24
|
export {
|
|
27
25
|
convertStyleMapToCSS,
|
|
@@ -25,11 +25,10 @@ function flattenMongoQuery(obj, _current, _res = {}) {
|
|
|
25
25
|
for (const key in obj) {
|
|
26
26
|
const value = obj[key];
|
|
27
27
|
const newKey = _current ? _current + "." + key : key;
|
|
28
|
-
if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$")))
|
|
28
|
+
if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$")))
|
|
29
29
|
flattenMongoQuery(value, newKey, _res);
|
|
30
|
-
|
|
30
|
+
else
|
|
31
31
|
_res[newKey] = value;
|
|
32
|
-
}
|
|
33
32
|
}
|
|
34
33
|
return _res;
|
|
35
34
|
}
|
|
@@ -23,11 +23,10 @@ function flattenMongoQuery(obj, _current, _res = {}) {
|
|
|
23
23
|
for (const key in obj) {
|
|
24
24
|
const value = obj[key];
|
|
25
25
|
const newKey = _current ? _current + "." + key : key;
|
|
26
|
-
if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$")))
|
|
26
|
+
if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$")))
|
|
27
27
|
flattenMongoQuery(value, newKey, _res);
|
|
28
|
-
|
|
28
|
+
else
|
|
29
29
|
_res[newKey] = value;
|
|
30
|
-
}
|
|
31
30
|
}
|
|
32
31
|
return _res;
|
|
33
32
|
}
|
|
@@ -5,9 +5,8 @@ const getLocalStorage = () => isBrowser.isBrowser() && typeof localStorage !== "
|
|
|
5
5
|
const getLocalStorageItem = ({ key, canTrack }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
try {
|
|
8
|
-
if (canTrack)
|
|
8
|
+
if (canTrack)
|
|
9
9
|
return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
|
|
10
|
-
}
|
|
11
10
|
return void 0;
|
|
12
11
|
} catch (err) {
|
|
13
12
|
console.debug("[LocalStorage] GET error: ", err);
|
|
@@ -17,9 +16,8 @@ const getLocalStorageItem = ({ key, canTrack }) => {
|
|
|
17
16
|
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
18
17
|
var _a;
|
|
19
18
|
try {
|
|
20
|
-
if (canTrack)
|
|
19
|
+
if (canTrack)
|
|
21
20
|
(_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
|
|
22
|
-
}
|
|
23
21
|
} catch (err) {
|
|
24
22
|
console.debug("[LocalStorage] SET error: ", err);
|
|
25
23
|
}
|
|
@@ -3,9 +3,8 @@ const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined"
|
|
|
3
3
|
const getLocalStorageItem = ({ key, canTrack }) => {
|
|
4
4
|
var _a;
|
|
5
5
|
try {
|
|
6
|
-
if (canTrack)
|
|
6
|
+
if (canTrack)
|
|
7
7
|
return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
|
|
8
|
-
}
|
|
9
8
|
return void 0;
|
|
10
9
|
} catch (err) {
|
|
11
10
|
console.debug("[LocalStorage] GET error: ", err);
|
|
@@ -15,9 +14,8 @@ const getLocalStorageItem = ({ key, canTrack }) => {
|
|
|
15
14
|
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
16
15
|
var _a;
|
|
17
16
|
try {
|
|
18
|
-
if (canTrack)
|
|
17
|
+
if (canTrack)
|
|
19
18
|
(_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
|
|
20
|
-
}
|
|
21
19
|
} catch (err) {
|
|
22
20
|
console.debug("[LocalStorage] SET error: ", err);
|
|
23
21
|
}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
function omit(obj, ...values) {
|
|
4
4
|
const newObject = Object.assign({}, obj);
|
|
5
|
-
for (const key of values)
|
|
5
|
+
for (const key of values)
|
|
6
6
|
delete newObject[key];
|
|
7
|
-
}
|
|
8
7
|
return newObject;
|
|
9
8
|
}
|
|
10
9
|
exports.omit = omit;
|
|
@@ -9,11 +9,10 @@ const convertSearchParamsToQueryObject = (searchParams) => {
|
|
|
9
9
|
};
|
|
10
10
|
const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
|
|
11
11
|
const getSearchString = (search) => {
|
|
12
|
-
if (typeof search === "string")
|
|
12
|
+
if (typeof search === "string")
|
|
13
13
|
return search;
|
|
14
|
-
|
|
14
|
+
else if (search instanceof URLSearchParams)
|
|
15
15
|
return search.toString();
|
|
16
|
-
}
|
|
17
16
|
return new URLSearchParams(search).toString();
|
|
18
17
|
};
|
|
19
18
|
exports.convertSearchParamsToQueryObject = convertSearchParamsToQueryObject;
|
|
@@ -7,11 +7,10 @@ const convertSearchParamsToQueryObject = (searchParams) => {
|
|
|
7
7
|
};
|
|
8
8
|
const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
|
|
9
9
|
const getSearchString = (search) => {
|
|
10
|
-
if (typeof search === "string")
|
|
10
|
+
if (typeof search === "string")
|
|
11
11
|
return search;
|
|
12
|
-
|
|
12
|
+
else if (search instanceof URLSearchParams)
|
|
13
13
|
return search.toString();
|
|
14
|
-
}
|
|
15
14
|
return new URLSearchParams(search).toString();
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
@@ -5,16 +5,15 @@ const nullable = require("./nullable.qwik.cjs");
|
|
|
5
5
|
const uuid = require("./uuid.qwik.cjs");
|
|
6
6
|
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
7
7
|
const getSessionId = async ({ canTrack }) => {
|
|
8
|
-
if (!canTrack)
|
|
8
|
+
if (!canTrack)
|
|
9
9
|
return void 0;
|
|
10
|
-
}
|
|
11
10
|
const sessionId = await cookie.getCookie({
|
|
12
11
|
name: SESSION_LOCAL_STORAGE_KEY,
|
|
13
12
|
canTrack
|
|
14
13
|
});
|
|
15
|
-
if (nullable.checkIsDefined(sessionId))
|
|
14
|
+
if (nullable.checkIsDefined(sessionId))
|
|
16
15
|
return sessionId;
|
|
17
|
-
|
|
16
|
+
else {
|
|
18
17
|
const newSessionId = createSessionId();
|
|
19
18
|
setSessionId({
|
|
20
19
|
id: newSessionId,
|