@builder.io/sdk-qwik 0.16.11 → 0.16.14
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 +74 -143
- package/lib/browser/blocks/accordion/accordion.qwik.mjs +74 -143
- package/lib/browser/blocks/accordion/component-info.qwik.cjs +2 -1
- package/lib/browser/blocks/accordion/component-info.qwik.mjs +2 -1
- package/lib/browser/blocks/button/button.qwik.cjs +8 -17
- package/lib/browser/blocks/button/button.qwik.mjs +8 -17
- package/lib/browser/blocks/columns/columns.qwik.cjs +33 -67
- package/lib/browser/blocks/columns/columns.qwik.mjs +33 -67
- package/lib/browser/blocks/columns/component-info.qwik.cjs +4 -3
- package/lib/browser/blocks/columns/component-info.qwik.mjs +4 -3
- package/lib/browser/blocks/custom-code/custom-code.qwik.cjs +18 -22
- package/lib/browser/blocks/custom-code/custom-code.qwik.mjs +19 -23
- package/lib/browser/blocks/embed/embed.qwik.cjs +17 -23
- package/lib/browser/blocks/embed/embed.qwik.mjs +17 -23
- package/lib/browser/blocks/form/form/form.qwik.cjs +74 -128
- package/lib/browser/blocks/form/form/form.qwik.mjs +75 -129
- 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 +7 -5
- package/lib/browser/blocks/form/select/select.qwik.mjs +8 -6
- package/lib/browser/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
- package/lib/browser/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
- package/lib/browser/blocks/form/textarea/textarea.qwik.cjs +11 -21
- package/lib/browser/blocks/form/textarea/textarea.qwik.mjs +12 -22
- package/lib/browser/blocks/fragment/fragment.qwik.cjs +6 -3
- package/lib/browser/blocks/fragment/fragment.qwik.mjs +7 -4
- package/lib/browser/blocks/image/component-info.qwik.cjs +6 -3
- package/lib/browser/blocks/image/component-info.qwik.mjs +6 -3
- package/lib/browser/blocks/image/image.helpers.qwik.cjs +12 -6
- package/lib/browser/blocks/image/image.helpers.qwik.mjs +12 -6
- package/lib/browser/blocks/image/image.qwik.cjs +63 -89
- package/lib/browser/blocks/image/image.qwik.mjs +63 -89
- package/lib/browser/blocks/img/img.qwik.cjs +12 -18
- package/lib/browser/blocks/img/img.qwik.mjs +12 -18
- package/lib/browser/blocks/section/section.qwik.cjs +7 -6
- package/lib/browser/blocks/section/section.qwik.mjs +8 -7
- package/lib/browser/blocks/slot/slot.qwik.cjs +17 -43
- package/lib/browser/blocks/slot/slot.qwik.mjs +17 -43
- package/lib/browser/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
- package/lib/browser/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
- package/lib/browser/blocks/symbol/symbol.qwik.cjs +45 -137
- package/lib/browser/blocks/symbol/symbol.qwik.mjs +45 -137
- package/lib/browser/blocks/tabs/tabs.qwik.cjs +45 -99
- package/lib/browser/blocks/tabs/tabs.qwik.mjs +45 -99
- package/lib/browser/blocks/text/text.qwik.cjs +11 -15
- package/lib/browser/blocks/text/text.qwik.mjs +11 -15
- package/lib/browser/blocks/video/video.qwik.cjs +73 -87
- package/lib/browser/blocks/video/video.qwik.mjs +74 -88
- package/lib/browser/components/awaiter.qwik.cjs +13 -0
- package/lib/browser/components/awaiter.qwik.mjs +13 -0
- package/lib/browser/components/block/animator.qwik.cjs +22 -11
- package/lib/browser/components/block/animator.qwik.mjs +22 -11
- package/lib/browser/components/block/block.helpers.qwik.cjs +8 -4
- package/lib/browser/components/block/block.helpers.qwik.mjs +8 -4
- package/lib/browser/components/block/block.qwik.cjs +114 -320
- package/lib/browser/components/block/block.qwik.mjs +115 -321
- package/lib/browser/components/block/components/block-styles.qwik.cjs +22 -39
- package/lib/browser/components/block/components/block-styles.qwik.mjs +23 -40
- package/lib/browser/components/block/components/block-wrapper.qwik.cjs +12 -18
- package/lib/browser/components/block/components/block-wrapper.qwik.mjs +12 -18
- package/lib/browser/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
- package/lib/browser/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
- package/lib/browser/components/block/components/interactive-element.qwik.cjs +28 -28
- package/lib/browser/components/block/components/interactive-element.qwik.mjs +28 -28
- package/lib/browser/components/block/components/repeated-block.qwik.cjs +10 -31
- package/lib/browser/components/block/components/repeated-block.qwik.mjs +11 -32
- package/lib/browser/components/blocks/blocks-wrapper.qwik.cjs +24 -72
- package/lib/browser/components/blocks/blocks-wrapper.qwik.mjs +24 -72
- package/lib/browser/components/blocks/blocks.qwik.cjs +19 -78
- package/lib/browser/components/blocks/blocks.qwik.mjs +20 -79
- package/lib/browser/components/content/components/enable-editor.qwik.cjs +89 -219
- package/lib/browser/components/content/components/enable-editor.qwik.mjs +89 -219
- package/lib/browser/components/content/components/styles.helpers.qwik.cjs +12 -6
- package/lib/browser/components/content/components/styles.helpers.qwik.mjs +12 -6
- package/lib/browser/components/content/components/styles.qwik.cjs +8 -20
- package/lib/browser/components/content/components/styles.qwik.mjs +8 -20
- package/lib/browser/components/content/content.helpers.qwik.cjs +2 -1
- package/lib/browser/components/content/content.helpers.qwik.mjs +2 -1
- package/lib/browser/components/content/content.qwik.cjs +65 -189
- package/lib/browser/components/content/content.qwik.mjs +65 -189
- package/lib/browser/components/content-variants/content-variants.qwik.cjs +74 -313
- package/lib/browser/components/content-variants/content-variants.qwik.mjs +75 -314
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
- package/lib/browser/components/inlined-script.qwik.cjs +8 -13
- package/lib/browser/components/inlined-script.qwik.mjs +9 -14
- package/lib/browser/components/inlined-styles.qwik.cjs +8 -13
- package/lib/browser/components/inlined-styles.qwik.mjs +9 -14
- package/lib/browser/constants/device-sizes.qwik.cjs +2 -1
- package/lib/browser/constants/device-sizes.qwik.mjs +2 -1
- 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/browser-runtime/browser.qwik.cjs +1 -28
- package/lib/browser/functions/evaluate/browser-runtime/browser.qwik.mjs +1 -28
- package/lib/browser/functions/evaluate/choose-eval.qwik.cjs +3 -1
- package/lib/browser/functions/evaluate/choose-eval.qwik.mjs +3 -1
- package/lib/browser/functions/evaluate/evaluate.qwik.cjs +6 -3
- package/lib/browser/functions/evaluate/evaluate.qwik.mjs +6 -3
- package/lib/browser/functions/evaluate/helpers.qwik.cjs +30 -0
- package/lib/browser/functions/evaluate/helpers.qwik.mjs +30 -0
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
- package/lib/browser/functions/get-block-actions-handler.qwik.cjs +9 -15
- package/lib/browser/functions/get-block-actions-handler.qwik.mjs +10 -16
- package/lib/browser/functions/get-block-actions.qwik.cjs +4 -2
- package/lib/browser/functions/get-block-actions.qwik.mjs +4 -2
- package/lib/browser/functions/get-builder-search-params/index.qwik.cjs +4 -2
- package/lib/browser/functions/get-builder-search-params/index.qwik.mjs +4 -2
- package/lib/browser/functions/get-content/generate-content-url.qwik.cjs +22 -11
- package/lib/browser/functions/get-content/generate-content-url.qwik.mjs +22 -11
- package/lib/browser/functions/get-content/index.qwik.cjs +4 -2
- package/lib/browser/functions/get-content/index.qwik.mjs +4 -2
- package/lib/browser/functions/get-global-this.qwik.cjs +8 -4
- package/lib/browser/functions/get-global-this.qwik.mjs +8 -4
- package/lib/browser/functions/get-processed-block.qwik.cjs +15 -8
- package/lib/browser/functions/get-processed-block.qwik.mjs +15 -8
- package/lib/browser/functions/is-from-trusted-host.qwik.cjs +2 -1
- package/lib/browser/functions/is-from-trusted-host.qwik.mjs +2 -1
- package/lib/browser/functions/is-previewing.qwik.cjs +2 -1
- package/lib/browser/functions/is-previewing.qwik.mjs +2 -1
- package/lib/browser/functions/register-component.qwik.cjs +2 -1
- package/lib/browser/functions/register-component.qwik.mjs +2 -1
- package/lib/browser/functions/register.qwik.cjs +6 -3
- package/lib/browser/functions/register.qwik.mjs +6 -3
- package/lib/browser/functions/set.qwik.cjs +2 -1
- package/lib/browser/functions/set.qwik.mjs +2 -1
- package/lib/browser/functions/track/helpers.qwik.cjs +2 -1
- package/lib/browser/functions/track/helpers.qwik.mjs +2 -1
- package/lib/browser/functions/track/index.qwik.cjs +8 -4
- package/lib/browser/functions/track/index.qwik.mjs +8 -4
- package/lib/browser/functions/track/interaction.qwik.cjs +6 -3
- package/lib/browser/functions/track/interaction.qwik.mjs +6 -3
- package/lib/browser/helpers/ab-tests.qwik.cjs +15 -8
- package/lib/browser/helpers/ab-tests.qwik.mjs +16 -9
- package/lib/browser/helpers/cookie.qwik.cjs +4 -2
- package/lib/browser/helpers/cookie.qwik.mjs +4 -2
- package/lib/browser/helpers/css.qwik.cjs +6 -4
- package/lib/browser/helpers/css.qwik.mjs +6 -4
- package/lib/browser/helpers/flatten.qwik.cjs +3 -2
- package/lib/browser/helpers/flatten.qwik.mjs +3 -2
- package/lib/browser/helpers/localStorage.qwik.cjs +4 -2
- package/lib/browser/helpers/localStorage.qwik.mjs +4 -2
- package/lib/browser/helpers/omit.qwik.cjs +2 -1
- package/lib/browser/helpers/omit.qwik.mjs +2 -1
- package/lib/browser/helpers/search/search.qwik.cjs +3 -2
- package/lib/browser/helpers/search/search.qwik.mjs +3 -2
- package/lib/browser/helpers/sessionId.qwik.cjs +4 -3
- package/lib/browser/helpers/sessionId.qwik.mjs +4 -3
- package/lib/browser/helpers/subscribe-to-editor.qwik.cjs +10 -5
- package/lib/browser/helpers/subscribe-to-editor.qwik.mjs +10 -5
- package/lib/browser/helpers/url.qwik.cjs +4 -2
- package/lib/browser/helpers/url.qwik.mjs +4 -2
- package/lib/browser/helpers/visitorId.qwik.cjs +4 -3
- package/lib/browser/helpers/visitorId.qwik.mjs +4 -3
- package/lib/browser/scripts/init-editing.qwik.cjs +25 -19
- package/lib/browser/scripts/init-editing.qwik.mjs +25 -19
- package/lib/edge/blocks/accordion/accordion.qwik.cjs +74 -143
- package/lib/edge/blocks/accordion/accordion.qwik.mjs +74 -143
- package/lib/edge/blocks/accordion/component-info.qwik.cjs +2 -1
- package/lib/edge/blocks/accordion/component-info.qwik.mjs +2 -1
- package/lib/edge/blocks/button/button.qwik.cjs +8 -17
- package/lib/edge/blocks/button/button.qwik.mjs +8 -17
- package/lib/edge/blocks/columns/columns.qwik.cjs +33 -67
- package/lib/edge/blocks/columns/columns.qwik.mjs +33 -67
- package/lib/edge/blocks/columns/component-info.qwik.cjs +4 -3
- package/lib/edge/blocks/columns/component-info.qwik.mjs +4 -3
- package/lib/edge/blocks/custom-code/custom-code.qwik.cjs +18 -22
- package/lib/edge/blocks/custom-code/custom-code.qwik.mjs +19 -23
- package/lib/edge/blocks/embed/embed.qwik.cjs +17 -23
- package/lib/edge/blocks/embed/embed.qwik.mjs +17 -23
- package/lib/edge/blocks/form/form/form.qwik.cjs +74 -128
- package/lib/edge/blocks/form/form/form.qwik.mjs +75 -129
- 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 +7 -5
- package/lib/edge/blocks/form/select/select.qwik.mjs +8 -6
- package/lib/edge/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
- package/lib/edge/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
- package/lib/edge/blocks/form/textarea/textarea.qwik.cjs +11 -21
- package/lib/edge/blocks/form/textarea/textarea.qwik.mjs +12 -22
- package/lib/edge/blocks/fragment/fragment.qwik.cjs +6 -3
- package/lib/edge/blocks/fragment/fragment.qwik.mjs +7 -4
- package/lib/edge/blocks/image/component-info.qwik.cjs +6 -3
- package/lib/edge/blocks/image/component-info.qwik.mjs +6 -3
- package/lib/edge/blocks/image/image.helpers.qwik.cjs +12 -6
- package/lib/edge/blocks/image/image.helpers.qwik.mjs +12 -6
- package/lib/edge/blocks/image/image.qwik.cjs +63 -89
- package/lib/edge/blocks/image/image.qwik.mjs +63 -89
- package/lib/edge/blocks/img/img.qwik.cjs +12 -18
- package/lib/edge/blocks/img/img.qwik.mjs +12 -18
- package/lib/edge/blocks/section/section.qwik.cjs +7 -6
- package/lib/edge/blocks/section/section.qwik.mjs +8 -7
- package/lib/edge/blocks/slot/slot.qwik.cjs +17 -43
- package/lib/edge/blocks/slot/slot.qwik.mjs +17 -43
- package/lib/edge/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
- package/lib/edge/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
- package/lib/edge/blocks/symbol/symbol.qwik.cjs +45 -137
- package/lib/edge/blocks/symbol/symbol.qwik.mjs +45 -137
- package/lib/edge/blocks/tabs/tabs.qwik.cjs +45 -99
- package/lib/edge/blocks/tabs/tabs.qwik.mjs +45 -99
- package/lib/edge/blocks/text/text.qwik.cjs +11 -15
- package/lib/edge/blocks/text/text.qwik.mjs +11 -15
- package/lib/edge/blocks/video/video.qwik.cjs +73 -87
- package/lib/edge/blocks/video/video.qwik.mjs +74 -88
- package/lib/edge/components/awaiter.qwik.cjs +13 -0
- package/lib/edge/components/awaiter.qwik.mjs +13 -0
- package/lib/edge/components/block/animator.qwik.cjs +22 -11
- package/lib/edge/components/block/animator.qwik.mjs +22 -11
- package/lib/edge/components/block/block.helpers.qwik.cjs +8 -4
- package/lib/edge/components/block/block.helpers.qwik.mjs +8 -4
- package/lib/edge/components/block/block.qwik.cjs +114 -320
- package/lib/edge/components/block/block.qwik.mjs +115 -321
- package/lib/edge/components/block/components/block-styles.qwik.cjs +22 -39
- package/lib/edge/components/block/components/block-styles.qwik.mjs +23 -40
- package/lib/edge/components/block/components/block-wrapper.qwik.cjs +12 -18
- package/lib/edge/components/block/components/block-wrapper.qwik.mjs +12 -18
- package/lib/edge/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
- package/lib/edge/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
- package/lib/edge/components/block/components/interactive-element.qwik.cjs +28 -28
- package/lib/edge/components/block/components/interactive-element.qwik.mjs +28 -28
- package/lib/edge/components/block/components/repeated-block.qwik.cjs +10 -31
- package/lib/edge/components/block/components/repeated-block.qwik.mjs +11 -32
- package/lib/edge/components/blocks/blocks-wrapper.qwik.cjs +24 -72
- package/lib/edge/components/blocks/blocks-wrapper.qwik.mjs +24 -72
- package/lib/edge/components/blocks/blocks.qwik.cjs +19 -78
- package/lib/edge/components/blocks/blocks.qwik.mjs +20 -79
- package/lib/edge/components/content/components/enable-editor.qwik.cjs +89 -219
- package/lib/edge/components/content/components/enable-editor.qwik.mjs +89 -219
- package/lib/edge/components/content/components/styles.helpers.qwik.cjs +12 -6
- package/lib/edge/components/content/components/styles.helpers.qwik.mjs +12 -6
- package/lib/edge/components/content/components/styles.qwik.cjs +8 -20
- package/lib/edge/components/content/components/styles.qwik.mjs +8 -20
- package/lib/edge/components/content/content.helpers.qwik.cjs +2 -1
- package/lib/edge/components/content/content.helpers.qwik.mjs +2 -1
- package/lib/edge/components/content/content.qwik.cjs +65 -189
- package/lib/edge/components/content/content.qwik.mjs +65 -189
- package/lib/edge/components/content-variants/content-variants.qwik.cjs +74 -313
- package/lib/edge/components/content-variants/content-variants.qwik.mjs +75 -314
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
- package/lib/edge/components/inlined-script.qwik.cjs +8 -13
- package/lib/edge/components/inlined-script.qwik.mjs +9 -14
- package/lib/edge/components/inlined-styles.qwik.cjs +8 -13
- package/lib/edge/components/inlined-styles.qwik.mjs +9 -14
- package/lib/edge/constants/device-sizes.qwik.cjs +2 -1
- package/lib/edge/constants/device-sizes.qwik.mjs +2 -1
- 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/browser-runtime/browser.qwik.cjs +1 -28
- package/lib/edge/functions/evaluate/browser-runtime/browser.qwik.mjs +1 -28
- package/lib/edge/functions/evaluate/choose-eval.qwik.cjs +3 -1
- package/lib/edge/functions/evaluate/choose-eval.qwik.mjs +3 -1
- package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.cjs +6 -7
- package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.mjs +6 -7
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.cjs +63 -27
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.mjs +64 -28
- package/lib/edge/functions/evaluate/evaluate.qwik.cjs +6 -3
- package/lib/edge/functions/evaluate/evaluate.qwik.mjs +6 -3
- package/lib/edge/functions/evaluate/helpers.qwik.cjs +30 -0
- package/lib/edge/functions/evaluate/helpers.qwik.mjs +30 -0
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
- package/lib/edge/functions/get-block-actions-handler.qwik.cjs +9 -15
- package/lib/edge/functions/get-block-actions-handler.qwik.mjs +10 -16
- package/lib/edge/functions/get-block-actions.qwik.cjs +4 -2
- package/lib/edge/functions/get-block-actions.qwik.mjs +4 -2
- package/lib/edge/functions/get-builder-search-params/index.qwik.cjs +4 -2
- package/lib/edge/functions/get-builder-search-params/index.qwik.mjs +4 -2
- package/lib/edge/functions/get-content/generate-content-url.qwik.cjs +22 -11
- package/lib/edge/functions/get-content/generate-content-url.qwik.mjs +22 -11
- package/lib/edge/functions/get-content/index.qwik.cjs +4 -2
- package/lib/edge/functions/get-content/index.qwik.mjs +4 -2
- package/lib/edge/functions/get-global-this.qwik.cjs +8 -4
- package/lib/edge/functions/get-global-this.qwik.mjs +8 -4
- package/lib/edge/functions/get-processed-block.qwik.cjs +15 -8
- package/lib/edge/functions/get-processed-block.qwik.mjs +15 -8
- package/lib/edge/functions/is-from-trusted-host.qwik.cjs +2 -1
- package/lib/edge/functions/is-from-trusted-host.qwik.mjs +2 -1
- package/lib/edge/functions/is-previewing.qwik.cjs +2 -1
- package/lib/edge/functions/is-previewing.qwik.mjs +2 -1
- package/lib/edge/functions/register-component.qwik.cjs +2 -1
- package/lib/edge/functions/register-component.qwik.mjs +2 -1
- package/lib/edge/functions/register.qwik.cjs +6 -3
- package/lib/edge/functions/register.qwik.mjs +6 -3
- package/lib/edge/functions/set.qwik.cjs +2 -1
- package/lib/edge/functions/set.qwik.mjs +2 -1
- package/lib/edge/functions/track/helpers.qwik.cjs +2 -1
- package/lib/edge/functions/track/helpers.qwik.mjs +2 -1
- package/lib/edge/functions/track/index.qwik.cjs +8 -4
- package/lib/edge/functions/track/index.qwik.mjs +8 -4
- package/lib/edge/functions/track/interaction.qwik.cjs +6 -3
- package/lib/edge/functions/track/interaction.qwik.mjs +6 -3
- package/lib/edge/helpers/ab-tests.qwik.cjs +15 -8
- package/lib/edge/helpers/ab-tests.qwik.mjs +16 -9
- package/lib/edge/helpers/cookie.qwik.cjs +4 -2
- package/lib/edge/helpers/cookie.qwik.mjs +4 -2
- package/lib/edge/helpers/css.qwik.cjs +6 -4
- package/lib/edge/helpers/css.qwik.mjs +6 -4
- package/lib/edge/helpers/flatten.qwik.cjs +3 -2
- package/lib/edge/helpers/flatten.qwik.mjs +3 -2
- package/lib/edge/helpers/localStorage.qwik.cjs +4 -2
- package/lib/edge/helpers/localStorage.qwik.mjs +4 -2
- package/lib/edge/helpers/omit.qwik.cjs +2 -1
- package/lib/edge/helpers/omit.qwik.mjs +2 -1
- package/lib/edge/helpers/search/search.qwik.cjs +3 -2
- package/lib/edge/helpers/search/search.qwik.mjs +3 -2
- package/lib/edge/helpers/sessionId.qwik.cjs +4 -3
- package/lib/edge/helpers/sessionId.qwik.mjs +4 -3
- package/lib/edge/helpers/subscribe-to-editor.qwik.cjs +10 -5
- package/lib/edge/helpers/subscribe-to-editor.qwik.mjs +10 -5
- package/lib/edge/helpers/url.qwik.cjs +4 -2
- package/lib/edge/helpers/url.qwik.mjs +4 -2
- package/lib/edge/helpers/visitorId.qwik.cjs +4 -3
- package/lib/edge/helpers/visitorId.qwik.mjs +4 -3
- package/lib/edge/scripts/init-editing.qwik.cjs +25 -19
- package/lib/edge/scripts/init-editing.qwik.mjs +25 -19
- package/lib/node/blocks/accordion/accordion.qwik.cjs +74 -143
- package/lib/node/blocks/accordion/accordion.qwik.mjs +74 -143
- package/lib/node/blocks/accordion/component-info.qwik.cjs +2 -1
- package/lib/node/blocks/accordion/component-info.qwik.mjs +2 -1
- package/lib/node/blocks/button/button.qwik.cjs +8 -17
- package/lib/node/blocks/button/button.qwik.mjs +8 -17
- package/lib/node/blocks/columns/columns.qwik.cjs +33 -67
- package/lib/node/blocks/columns/columns.qwik.mjs +33 -67
- package/lib/node/blocks/columns/component-info.qwik.cjs +4 -3
- package/lib/node/blocks/columns/component-info.qwik.mjs +4 -3
- package/lib/node/blocks/custom-code/custom-code.qwik.cjs +18 -22
- package/lib/node/blocks/custom-code/custom-code.qwik.mjs +19 -23
- package/lib/node/blocks/embed/embed.qwik.cjs +17 -23
- package/lib/node/blocks/embed/embed.qwik.mjs +17 -23
- package/lib/node/blocks/form/form/form.qwik.cjs +74 -128
- package/lib/node/blocks/form/form/form.qwik.mjs +75 -129
- 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 +7 -5
- package/lib/node/blocks/form/select/select.qwik.mjs +8 -6
- package/lib/node/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
- package/lib/node/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
- package/lib/node/blocks/form/textarea/textarea.qwik.cjs +11 -21
- package/lib/node/blocks/form/textarea/textarea.qwik.mjs +12 -22
- package/lib/node/blocks/fragment/fragment.qwik.cjs +6 -3
- package/lib/node/blocks/fragment/fragment.qwik.mjs +7 -4
- package/lib/node/blocks/image/component-info.qwik.cjs +6 -3
- package/lib/node/blocks/image/component-info.qwik.mjs +6 -3
- package/lib/node/blocks/image/image.helpers.qwik.cjs +12 -6
- package/lib/node/blocks/image/image.helpers.qwik.mjs +12 -6
- package/lib/node/blocks/image/image.qwik.cjs +63 -89
- package/lib/node/blocks/image/image.qwik.mjs +63 -89
- package/lib/node/blocks/img/img.qwik.cjs +12 -18
- package/lib/node/blocks/img/img.qwik.mjs +12 -18
- package/lib/node/blocks/section/section.qwik.cjs +7 -6
- package/lib/node/blocks/section/section.qwik.mjs +8 -7
- package/lib/node/blocks/slot/slot.qwik.cjs +17 -43
- package/lib/node/blocks/slot/slot.qwik.mjs +17 -43
- package/lib/node/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
- package/lib/node/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
- package/lib/node/blocks/symbol/symbol.qwik.cjs +45 -137
- package/lib/node/blocks/symbol/symbol.qwik.mjs +45 -137
- package/lib/node/blocks/tabs/tabs.qwik.cjs +45 -99
- package/lib/node/blocks/tabs/tabs.qwik.mjs +45 -99
- package/lib/node/blocks/text/text.qwik.cjs +11 -15
- package/lib/node/blocks/text/text.qwik.mjs +11 -15
- package/lib/node/blocks/video/video.qwik.cjs +73 -87
- package/lib/node/blocks/video/video.qwik.mjs +74 -88
- package/lib/node/components/awaiter.qwik.cjs +13 -0
- package/lib/node/components/awaiter.qwik.mjs +13 -0
- package/lib/node/components/block/animator.qwik.cjs +22 -11
- package/lib/node/components/block/animator.qwik.mjs +22 -11
- package/lib/node/components/block/block.helpers.qwik.cjs +8 -4
- package/lib/node/components/block/block.helpers.qwik.mjs +8 -4
- package/lib/node/components/block/block.qwik.cjs +114 -320
- package/lib/node/components/block/block.qwik.mjs +115 -321
- package/lib/node/components/block/components/block-styles.qwik.cjs +22 -39
- package/lib/node/components/block/components/block-styles.qwik.mjs +23 -40
- package/lib/node/components/block/components/block-wrapper.qwik.cjs +12 -18
- package/lib/node/components/block/components/block-wrapper.qwik.mjs +12 -18
- package/lib/node/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
- package/lib/node/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
- package/lib/node/components/block/components/interactive-element.qwik.cjs +28 -28
- package/lib/node/components/block/components/interactive-element.qwik.mjs +28 -28
- package/lib/node/components/block/components/repeated-block.qwik.cjs +10 -31
- package/lib/node/components/block/components/repeated-block.qwik.mjs +11 -32
- package/lib/node/components/blocks/blocks-wrapper.qwik.cjs +24 -72
- package/lib/node/components/blocks/blocks-wrapper.qwik.mjs +24 -72
- package/lib/node/components/blocks/blocks.qwik.cjs +19 -78
- package/lib/node/components/blocks/blocks.qwik.mjs +20 -79
- package/lib/node/components/content/components/enable-editor.qwik.cjs +89 -219
- package/lib/node/components/content/components/enable-editor.qwik.mjs +89 -219
- package/lib/node/components/content/components/styles.helpers.qwik.cjs +12 -6
- package/lib/node/components/content/components/styles.helpers.qwik.mjs +12 -6
- package/lib/node/components/content/components/styles.qwik.cjs +8 -20
- package/lib/node/components/content/components/styles.qwik.mjs +8 -20
- package/lib/node/components/content/content.helpers.qwik.cjs +2 -1
- package/lib/node/components/content/content.helpers.qwik.mjs +2 -1
- package/lib/node/components/content/content.qwik.cjs +65 -189
- package/lib/node/components/content/content.qwik.mjs +65 -189
- package/lib/node/components/content-variants/content-variants.qwik.cjs +74 -313
- package/lib/node/components/content-variants/content-variants.qwik.mjs +75 -314
- package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
- package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
- package/lib/node/components/inlined-script.qwik.cjs +8 -13
- package/lib/node/components/inlined-script.qwik.mjs +9 -14
- package/lib/node/components/inlined-styles.qwik.cjs +8 -13
- package/lib/node/components/inlined-styles.qwik.mjs +9 -14
- package/lib/node/constants/device-sizes.qwik.cjs +2 -1
- package/lib/node/constants/device-sizes.qwik.mjs +2 -1
- 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/browser-runtime/browser.qwik.cjs +1 -28
- package/lib/node/functions/evaluate/browser-runtime/browser.qwik.mjs +1 -28
- package/lib/node/functions/evaluate/choose-eval.qwik.cjs +3 -1
- package/lib/node/functions/evaluate/choose-eval.qwik.mjs +3 -1
- package/lib/node/functions/evaluate/evaluate.qwik.cjs +6 -3
- package/lib/node/functions/evaluate/evaluate.qwik.mjs +6 -3
- package/lib/node/functions/evaluate/helpers.qwik.cjs +30 -0
- package/lib/node/functions/evaluate/helpers.qwik.mjs +30 -0
- package/lib/node/functions/evaluate/node-runtime/init.qwik.cjs +6 -0
- package/lib/node/functions/evaluate/node-runtime/init.qwik.mjs +6 -0
- package/lib/node/functions/evaluate/node-runtime/node-runtime.qwik.cjs +1 -1
- package/lib/node/functions/evaluate/node-runtime/node-runtime.qwik.mjs +1 -1
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
- package/lib/node/functions/get-block-actions-handler.qwik.cjs +9 -15
- package/lib/node/functions/get-block-actions-handler.qwik.mjs +10 -16
- package/lib/node/functions/get-block-actions.qwik.cjs +4 -2
- package/lib/node/functions/get-block-actions.qwik.mjs +4 -2
- package/lib/node/functions/get-builder-search-params/index.qwik.cjs +4 -2
- package/lib/node/functions/get-builder-search-params/index.qwik.mjs +4 -2
- package/lib/node/functions/get-content/generate-content-url.qwik.cjs +22 -11
- package/lib/node/functions/get-content/generate-content-url.qwik.mjs +22 -11
- package/lib/node/functions/get-content/index.qwik.cjs +4 -2
- package/lib/node/functions/get-content/index.qwik.mjs +4 -2
- package/lib/node/functions/get-global-this.qwik.cjs +8 -4
- package/lib/node/functions/get-global-this.qwik.mjs +8 -4
- package/lib/node/functions/get-processed-block.qwik.cjs +15 -8
- package/lib/node/functions/get-processed-block.qwik.mjs +15 -8
- package/lib/node/functions/is-from-trusted-host.qwik.cjs +2 -1
- package/lib/node/functions/is-from-trusted-host.qwik.mjs +2 -1
- package/lib/node/functions/is-previewing.qwik.cjs +2 -1
- package/lib/node/functions/is-previewing.qwik.mjs +2 -1
- package/lib/node/functions/register-component.qwik.cjs +2 -1
- package/lib/node/functions/register-component.qwik.mjs +2 -1
- package/lib/node/functions/register.qwik.cjs +6 -3
- package/lib/node/functions/register.qwik.mjs +6 -3
- package/lib/node/functions/set.qwik.cjs +2 -1
- package/lib/node/functions/set.qwik.mjs +2 -1
- package/lib/node/functions/track/helpers.qwik.cjs +2 -1
- package/lib/node/functions/track/helpers.qwik.mjs +2 -1
- package/lib/node/functions/track/index.qwik.cjs +8 -4
- package/lib/node/functions/track/index.qwik.mjs +8 -4
- package/lib/node/functions/track/interaction.qwik.cjs +6 -3
- package/lib/node/functions/track/interaction.qwik.mjs +6 -3
- package/lib/node/helpers/ab-tests.qwik.cjs +15 -8
- package/lib/node/helpers/ab-tests.qwik.mjs +16 -9
- package/lib/node/helpers/cookie.qwik.cjs +4 -2
- package/lib/node/helpers/cookie.qwik.mjs +4 -2
- package/lib/node/helpers/css.qwik.cjs +6 -4
- package/lib/node/helpers/css.qwik.mjs +6 -4
- package/lib/node/helpers/flatten.qwik.cjs +3 -2
- package/lib/node/helpers/flatten.qwik.mjs +3 -2
- package/lib/node/helpers/localStorage.qwik.cjs +4 -2
- package/lib/node/helpers/localStorage.qwik.mjs +4 -2
- package/lib/node/helpers/omit.qwik.cjs +2 -1
- package/lib/node/helpers/omit.qwik.mjs +2 -1
- package/lib/node/helpers/search/search.qwik.cjs +3 -2
- package/lib/node/helpers/search/search.qwik.mjs +3 -2
- package/lib/node/helpers/sessionId.qwik.cjs +4 -3
- package/lib/node/helpers/sessionId.qwik.mjs +4 -3
- package/lib/node/helpers/subscribe-to-editor.qwik.cjs +10 -5
- package/lib/node/helpers/subscribe-to-editor.qwik.mjs +10 -5
- package/lib/node/helpers/url.qwik.cjs +4 -2
- package/lib/node/helpers/url.qwik.mjs +4 -2
- package/lib/node/helpers/visitorId.qwik.cjs +4 -3
- package/lib/node/helpers/visitorId.qwik.mjs +4 -3
- package/lib/node/scripts/init-editing.qwik.cjs +25 -19
- package/lib/node/scripts/init-editing.qwik.mjs +25 -19
- package/package.json +2 -2
- package/types/src/components/awaiter.d.ts +13 -0
- package/types/src/components/content/components/enable-editor.d.ts +0 -1
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/context/component-reference-types.d.ts +4 -0
- package/types/src/context/types.d.ts +2 -1
- package/types/src/functions/evaluate/browser-runtime/browser.d.ts +0 -6
- package/types/src/functions/evaluate/helpers.d.ts +5 -0
- package/types/src/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
- package/lib/browser/constants/sdk-name.qwik.cjs +0 -15
- package/lib/browser/constants/sdk-name.qwik.mjs +0 -15
- package/lib/browser/functions/evaluate/node-runtime/init.qwik.cjs +0 -9
- package/lib/browser/functions/evaluate/node-runtime/init.qwik.mjs +0 -9
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.qwik.cjs +0 -47
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.qwik.mjs +0 -47
- package/lib/browser/functions/evaluate/node-runtime/safeDynamicRequire.qwik.cjs +0 -15
- package/lib/browser/functions/evaluate/node-runtime/safeDynamicRequire.qwik.mjs +0 -15
- package/lib/edge/constants/sdk-name.qwik.cjs +0 -15
- package/lib/edge/constants/sdk-name.qwik.mjs +0 -15
- package/lib/edge/functions/evaluate/node-runtime/init.qwik.cjs +0 -9
- package/lib/edge/functions/evaluate/node-runtime/init.qwik.mjs +0 -9
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.qwik.cjs +0 -47
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.qwik.mjs +0 -47
- package/lib/edge/functions/evaluate/node-runtime/safeDynamicRequire.qwik.cjs +0 -15
- package/lib/edge/functions/evaluate/node-runtime/safeDynamicRequire.qwik.mjs +0 -15
|
@@ -8,11 +8,12 @@ const isBrowser = require("../is-browser.qwik.cjs");
|
|
|
8
8
|
const isEditing = require("../is-editing.qwik.cjs");
|
|
9
9
|
const helpers = require("./helpers.qwik.cjs");
|
|
10
10
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
11
|
-
if (!canTrack)
|
|
11
|
+
if (!canTrack) {
|
|
12
12
|
return {
|
|
13
13
|
visitorId: void 0,
|
|
14
14
|
sessionId: void 0
|
|
15
15
|
};
|
|
16
|
+
}
|
|
16
17
|
const sessionId$1 = await sessionId.getSessionId({
|
|
17
18
|
canTrack
|
|
18
19
|
});
|
|
@@ -44,12 +45,15 @@ async function _track(eventProps) {
|
|
|
44
45
|
logger.logger.error("Missing API key for track call. Please provide your API key.");
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
if (!eventProps.canTrack)
|
|
48
|
+
if (!eventProps.canTrack) {
|
|
48
49
|
return;
|
|
49
|
-
|
|
50
|
+
}
|
|
51
|
+
if (isEditing.isEditing()) {
|
|
50
52
|
return;
|
|
51
|
-
|
|
53
|
+
}
|
|
54
|
+
if (!(isBrowser.isBrowser() || target.TARGET === "reactNative")) {
|
|
52
55
|
return;
|
|
56
|
+
}
|
|
53
57
|
return fetch(`https://cdn.builder.io/api/v1/track`, {
|
|
54
58
|
method: "POST",
|
|
55
59
|
body: JSON.stringify({
|
|
@@ -6,11 +6,12 @@ import { isBrowser } from "../is-browser.qwik.mjs";
|
|
|
6
6
|
import { isEditing } from "../is-editing.qwik.mjs";
|
|
7
7
|
import { getUserAttributes } from "./helpers.qwik.mjs";
|
|
8
8
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
9
|
-
if (!canTrack)
|
|
9
|
+
if (!canTrack) {
|
|
10
10
|
return {
|
|
11
11
|
visitorId: void 0,
|
|
12
12
|
sessionId: void 0
|
|
13
13
|
};
|
|
14
|
+
}
|
|
14
15
|
const sessionId = await getSessionId({
|
|
15
16
|
canTrack
|
|
16
17
|
});
|
|
@@ -42,12 +43,15 @@ async function _track(eventProps) {
|
|
|
42
43
|
logger.error("Missing API key for track call. Please provide your API key.");
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
45
|
-
if (!eventProps.canTrack)
|
|
46
|
+
if (!eventProps.canTrack) {
|
|
46
47
|
return;
|
|
47
|
-
|
|
48
|
+
}
|
|
49
|
+
if (isEditing()) {
|
|
48
50
|
return;
|
|
49
|
-
|
|
51
|
+
}
|
|
52
|
+
if (!(isBrowser() || TARGET === "reactNative")) {
|
|
50
53
|
return;
|
|
54
|
+
}
|
|
51
55
|
return fetch(`https://cdn.builder.io/api/v1/track`, {
|
|
52
56
|
method: "POST",
|
|
53
57
|
body: JSON.stringify({
|
|
@@ -4,15 +4,18 @@ 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
|
+
}
|
|
9
10
|
let parent = checkElement ? target : target.parentElement;
|
|
10
11
|
do {
|
|
11
|
-
if (!parent)
|
|
12
|
+
if (!parent) {
|
|
12
13
|
return null;
|
|
14
|
+
}
|
|
13
15
|
const matches = callback(parent);
|
|
14
|
-
if (matches)
|
|
16
|
+
if (matches) {
|
|
15
17
|
return parent;
|
|
18
|
+
}
|
|
16
19
|
} while (parent = parent.parentElement);
|
|
17
20
|
return null;
|
|
18
21
|
};
|
|
@@ -2,15 +2,18 @@ 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
|
+
}
|
|
7
8
|
let parent = checkElement ? target : target.parentElement;
|
|
8
9
|
do {
|
|
9
|
-
if (!parent)
|
|
10
|
+
if (!parent) {
|
|
10
11
|
return null;
|
|
12
|
+
}
|
|
11
13
|
const matches = callback(parent);
|
|
12
|
-
if (matches)
|
|
14
|
+
if (matches) {
|
|
13
15
|
return parent;
|
|
16
|
+
}
|
|
14
17
|
} while (parent = parent.parentElement);
|
|
15
18
|
return null;
|
|
16
19
|
};
|
|
@@ -26,8 +26,9 @@ 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
|
+
}
|
|
31
32
|
}
|
|
32
33
|
return id;
|
|
33
34
|
};
|
|
@@ -44,25 +45,29 @@ const getAndSetVariantId = (args) => {
|
|
|
44
45
|
const getTestFields = ({ item, testGroupId }) => {
|
|
45
46
|
const variationValue = item.variations[testGroupId];
|
|
46
47
|
if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
47
|
-
!variationValue)
|
|
48
|
+
!variationValue) {
|
|
48
49
|
return {
|
|
49
50
|
testVariationId: item.id,
|
|
50
51
|
testVariationName: "Default"
|
|
51
52
|
};
|
|
52
|
-
else
|
|
53
|
+
} else {
|
|
53
54
|
return {
|
|
54
55
|
data: variationValue.data,
|
|
55
56
|
testVariationId: variationValue.id,
|
|
56
57
|
testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
|
|
57
58
|
};
|
|
59
|
+
}
|
|
58
60
|
};
|
|
59
61
|
const handleABTestingSync = ({ item, canTrack }) => {
|
|
60
|
-
if (!canTrack)
|
|
62
|
+
if (!canTrack) {
|
|
61
63
|
return item;
|
|
62
|
-
|
|
64
|
+
}
|
|
65
|
+
if (!item) {
|
|
63
66
|
return void 0;
|
|
64
|
-
|
|
67
|
+
}
|
|
68
|
+
if (!checkIsBuilderContentWithVariations(item)) {
|
|
65
69
|
return item;
|
|
70
|
+
}
|
|
66
71
|
const testGroupId = getContentVariationCookieSync({
|
|
67
72
|
contentId: item.id
|
|
68
73
|
}) || getAndSetVariantId({
|
|
@@ -79,10 +84,12 @@ const handleABTestingSync = ({ item, canTrack }) => {
|
|
|
79
84
|
};
|
|
80
85
|
};
|
|
81
86
|
const handleABTesting = async ({ item, canTrack }) => {
|
|
82
|
-
if (!canTrack)
|
|
87
|
+
if (!canTrack) {
|
|
83
88
|
return item;
|
|
84
|
-
|
|
89
|
+
}
|
|
90
|
+
if (!checkIsBuilderContentWithVariations(item)) {
|
|
85
91
|
return item;
|
|
92
|
+
}
|
|
86
93
|
const cookieValue = await getContentVariationCookie({
|
|
87
94
|
contentId: item.id
|
|
88
95
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { checkIsDefined } from "./nullable.qwik.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { getCookieSync, getCookie, 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,8 +24,9 @@ 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
|
+
}
|
|
29
30
|
}
|
|
30
31
|
return id;
|
|
31
32
|
};
|
|
@@ -42,25 +43,29 @@ const getAndSetVariantId = (args) => {
|
|
|
42
43
|
const getTestFields = ({ item, testGroupId }) => {
|
|
43
44
|
const variationValue = item.variations[testGroupId];
|
|
44
45
|
if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
45
|
-
!variationValue)
|
|
46
|
+
!variationValue) {
|
|
46
47
|
return {
|
|
47
48
|
testVariationId: item.id,
|
|
48
49
|
testVariationName: "Default"
|
|
49
50
|
};
|
|
50
|
-
else
|
|
51
|
+
} else {
|
|
51
52
|
return {
|
|
52
53
|
data: variationValue.data,
|
|
53
54
|
testVariationId: variationValue.id,
|
|
54
55
|
testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
|
|
55
56
|
};
|
|
57
|
+
}
|
|
56
58
|
};
|
|
57
59
|
const handleABTestingSync = ({ item, canTrack }) => {
|
|
58
|
-
if (!canTrack)
|
|
60
|
+
if (!canTrack) {
|
|
59
61
|
return item;
|
|
60
|
-
|
|
62
|
+
}
|
|
63
|
+
if (!item) {
|
|
61
64
|
return void 0;
|
|
62
|
-
|
|
65
|
+
}
|
|
66
|
+
if (!checkIsBuilderContentWithVariations(item)) {
|
|
63
67
|
return item;
|
|
68
|
+
}
|
|
64
69
|
const testGroupId = getContentVariationCookieSync({
|
|
65
70
|
contentId: item.id
|
|
66
71
|
}) || getAndSetVariantId({
|
|
@@ -77,10 +82,12 @@ const handleABTestingSync = ({ item, canTrack }) => {
|
|
|
77
82
|
};
|
|
78
83
|
};
|
|
79
84
|
const handleABTesting = async ({ item, canTrack }) => {
|
|
80
|
-
if (!canTrack)
|
|
85
|
+
if (!canTrack) {
|
|
81
86
|
return item;
|
|
82
|
-
|
|
87
|
+
}
|
|
88
|
+
if (!checkIsBuilderContentWithVariations(item)) {
|
|
83
89
|
return item;
|
|
90
|
+
}
|
|
84
91
|
const cookieValue = await getContentVariationCookie({
|
|
85
92
|
contentId: item.id
|
|
86
93
|
});
|
|
@@ -7,8 +7,9 @@ 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
|
+
}
|
|
12
13
|
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
13
14
|
} catch (err) {
|
|
14
15
|
logger.logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
|
|
@@ -61,8 +62,9 @@ const createCookieString = ({ name, value, expires }) => {
|
|
|
61
62
|
};
|
|
62
63
|
const setCookie = async ({ name, value, expires, canTrack }) => {
|
|
63
64
|
try {
|
|
64
|
-
if (!canTrack)
|
|
65
|
+
if (!canTrack) {
|
|
65
66
|
return;
|
|
67
|
+
}
|
|
66
68
|
const cookie = createCookieString({
|
|
67
69
|
name,
|
|
68
70
|
value,
|
|
@@ -5,8 +5,9 @@ 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
|
+
}
|
|
10
11
|
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
11
12
|
} catch (err) {
|
|
12
13
|
logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
|
|
@@ -59,8 +60,9 @@ const createCookieString = ({ name, value, expires }) => {
|
|
|
59
60
|
};
|
|
60
61
|
const setCookie = async ({ name, value, expires, canTrack }) => {
|
|
61
62
|
try {
|
|
62
|
-
if (!canTrack)
|
|
63
|
+
if (!canTrack) {
|
|
63
64
|
return;
|
|
65
|
+
}
|
|
64
66
|
const cookie = createCookieString({
|
|
65
67
|
name,
|
|
66
68
|
value,
|
|
@@ -4,10 +4,11 @@ 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
|
-
else
|
|
9
|
+
} else {
|
|
10
10
|
return void 0;
|
|
11
|
+
}
|
|
11
12
|
});
|
|
12
13
|
return cssProps.filter(nullable.checkIsDefined);
|
|
13
14
|
};
|
|
@@ -16,12 +17,13 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
|
|
|
16
17
|
const cssClass = `.${className} {
|
|
17
18
|
${convertStyleMapToCSS(styles)}
|
|
18
19
|
}`;
|
|
19
|
-
if (mediaQuery)
|
|
20
|
+
if (mediaQuery) {
|
|
20
21
|
return `${mediaQuery} {
|
|
21
22
|
${cssClass}
|
|
22
23
|
}`;
|
|
23
|
-
else
|
|
24
|
+
} else {
|
|
24
25
|
return cssClass;
|
|
26
|
+
}
|
|
25
27
|
};
|
|
26
28
|
exports.convertStyleMapToCSS = convertStyleMapToCSS;
|
|
27
29
|
exports.convertStyleMapToCSSArray = convertStyleMapToCSSArray;
|
|
@@ -2,10 +2,11 @@ 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
|
-
else
|
|
7
|
+
} else {
|
|
8
8
|
return void 0;
|
|
9
|
+
}
|
|
9
10
|
});
|
|
10
11
|
return cssProps.filter(checkIsDefined);
|
|
11
12
|
};
|
|
@@ -14,12 +15,13 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
|
|
|
14
15
|
const cssClass = `.${className} {
|
|
15
16
|
${convertStyleMapToCSS(styles)}
|
|
16
17
|
}`;
|
|
17
|
-
if (mediaQuery)
|
|
18
|
+
if (mediaQuery) {
|
|
18
19
|
return `${mediaQuery} {
|
|
19
20
|
${cssClass}
|
|
20
21
|
}`;
|
|
21
|
-
else
|
|
22
|
+
} else {
|
|
22
23
|
return cssClass;
|
|
24
|
+
}
|
|
23
25
|
};
|
|
24
26
|
export {
|
|
25
27
|
convertStyleMapToCSS,
|
|
@@ -25,10 +25,11 @@ 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
|
-
else
|
|
30
|
+
} else {
|
|
31
31
|
_res[newKey] = value;
|
|
32
|
+
}
|
|
32
33
|
}
|
|
33
34
|
return _res;
|
|
34
35
|
}
|
|
@@ -23,10 +23,11 @@ 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
|
-
else
|
|
28
|
+
} else {
|
|
29
29
|
_res[newKey] = value;
|
|
30
|
+
}
|
|
30
31
|
}
|
|
31
32
|
return _res;
|
|
32
33
|
}
|
|
@@ -5,8 +5,9 @@ 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
|
+
}
|
|
10
11
|
return void 0;
|
|
11
12
|
} catch (err) {
|
|
12
13
|
console.debug("[LocalStorage] GET error: ", err);
|
|
@@ -16,8 +17,9 @@ const getLocalStorageItem = ({ key, canTrack }) => {
|
|
|
16
17
|
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
17
18
|
var _a;
|
|
18
19
|
try {
|
|
19
|
-
if (canTrack)
|
|
20
|
+
if (canTrack) {
|
|
20
21
|
(_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
|
|
22
|
+
}
|
|
21
23
|
} catch (err) {
|
|
22
24
|
console.debug("[LocalStorage] SET error: ", err);
|
|
23
25
|
}
|
|
@@ -3,8 +3,9 @@ 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
|
+
}
|
|
8
9
|
return void 0;
|
|
9
10
|
} catch (err) {
|
|
10
11
|
console.debug("[LocalStorage] GET error: ", err);
|
|
@@ -14,8 +15,9 @@ const getLocalStorageItem = ({ key, canTrack }) => {
|
|
|
14
15
|
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
15
16
|
var _a;
|
|
16
17
|
try {
|
|
17
|
-
if (canTrack)
|
|
18
|
+
if (canTrack) {
|
|
18
19
|
(_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
|
|
20
|
+
}
|
|
19
21
|
} catch (err) {
|
|
20
22
|
console.debug("[LocalStorage] SET error: ", err);
|
|
21
23
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
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
|
+
}
|
|
7
8
|
return newObject;
|
|
8
9
|
}
|
|
9
10
|
exports.omit = omit;
|
|
@@ -9,10 +9,11 @@ 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
|
-
else if (search instanceof URLSearchParams)
|
|
14
|
+
} else if (search instanceof URLSearchParams) {
|
|
15
15
|
return search.toString();
|
|
16
|
+
}
|
|
16
17
|
return new URLSearchParams(search).toString();
|
|
17
18
|
};
|
|
18
19
|
exports.convertSearchParamsToQueryObject = convertSearchParamsToQueryObject;
|
|
@@ -7,10 +7,11 @@ 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
|
-
else if (search instanceof URLSearchParams)
|
|
12
|
+
} else if (search instanceof URLSearchParams) {
|
|
13
13
|
return search.toString();
|
|
14
|
+
}
|
|
14
15
|
return new URLSearchParams(search).toString();
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
@@ -5,15 +5,16 @@ 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
|
+
}
|
|
10
11
|
const sessionId = await cookie.getCookie({
|
|
11
12
|
name: SESSION_LOCAL_STORAGE_KEY,
|
|
12
13
|
canTrack
|
|
13
14
|
});
|
|
14
|
-
if (nullable.checkIsDefined(sessionId))
|
|
15
|
+
if (nullable.checkIsDefined(sessionId)) {
|
|
15
16
|
return sessionId;
|
|
16
|
-
else {
|
|
17
|
+
} else {
|
|
17
18
|
const newSessionId = createSessionId();
|
|
18
19
|
setSessionId({
|
|
19
20
|
id: newSessionId,
|
|
@@ -3,15 +3,16 @@ import { checkIsDefined } from "./nullable.qwik.mjs";
|
|
|
3
3
|
import { uuid } from "./uuid.qwik.mjs";
|
|
4
4
|
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
5
5
|
const getSessionId = async ({ canTrack }) => {
|
|
6
|
-
if (!canTrack)
|
|
6
|
+
if (!canTrack) {
|
|
7
7
|
return void 0;
|
|
8
|
+
}
|
|
8
9
|
const sessionId = await getCookie({
|
|
9
10
|
name: SESSION_LOCAL_STORAGE_KEY,
|
|
10
11
|
canTrack
|
|
11
12
|
});
|
|
12
|
-
if (checkIsDefined(sessionId))
|
|
13
|
+
if (checkIsDefined(sessionId)) {
|
|
13
14
|
return sessionId;
|
|
14
|
-
else {
|
|
15
|
+
} else {
|
|
15
16
|
const newSessionId = createSessionId();
|
|
16
17
|
setSessionId({
|
|
17
18
|
id: newSessionId,
|
|
@@ -6,26 +6,31 @@ const initEditing = require("../scripts/init-editing.qwik.cjs");
|
|
|
6
6
|
const logger = require("./logger.qwik.cjs");
|
|
7
7
|
const createEditorListener = ({ model, trustedHosts, callbacks }) => {
|
|
8
8
|
return (event) => {
|
|
9
|
-
if (!isFromTrustedHost.isFromTrustedHost(trustedHosts, event))
|
|
9
|
+
if (!isFromTrustedHost.isFromTrustedHost(trustedHosts, event)) {
|
|
10
10
|
return;
|
|
11
|
+
}
|
|
11
12
|
const { data } = event;
|
|
12
|
-
if (data)
|
|
13
|
+
if (data) {
|
|
13
14
|
switch (data.type) {
|
|
14
|
-
case "builder.configureSdk":
|
|
15
|
+
case "builder.configureSdk": {
|
|
15
16
|
callbacks.configureSdk(data.data);
|
|
16
17
|
break;
|
|
17
|
-
|
|
18
|
+
}
|
|
19
|
+
case "builder.triggerAnimation": {
|
|
18
20
|
callbacks.animation(data.data);
|
|
19
21
|
break;
|
|
22
|
+
}
|
|
20
23
|
case "builder.contentUpdate": {
|
|
21
24
|
const messageContent = data.data;
|
|
22
25
|
const key = messageContent.key || messageContent.alias || messageContent.entry || messageContent.modelName;
|
|
23
26
|
const contentData = messageContent.data;
|
|
24
|
-
if (key === model)
|
|
27
|
+
if (key === model) {
|
|
25
28
|
callbacks.contentUpdate(contentData);
|
|
29
|
+
}
|
|
26
30
|
break;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
33
|
+
}
|
|
29
34
|
};
|
|
30
35
|
};
|
|
31
36
|
const subscribeToEditor = (model, callback, options) => {
|
|
@@ -4,26 +4,31 @@ import { setupBrowserForEditing } from "../scripts/init-editing.qwik.mjs";
|
|
|
4
4
|
import { logger } from "./logger.qwik.mjs";
|
|
5
5
|
const createEditorListener = ({ model, trustedHosts, callbacks }) => {
|
|
6
6
|
return (event) => {
|
|
7
|
-
if (!isFromTrustedHost(trustedHosts, event))
|
|
7
|
+
if (!isFromTrustedHost(trustedHosts, event)) {
|
|
8
8
|
return;
|
|
9
|
+
}
|
|
9
10
|
const { data } = event;
|
|
10
|
-
if (data)
|
|
11
|
+
if (data) {
|
|
11
12
|
switch (data.type) {
|
|
12
|
-
case "builder.configureSdk":
|
|
13
|
+
case "builder.configureSdk": {
|
|
13
14
|
callbacks.configureSdk(data.data);
|
|
14
15
|
break;
|
|
15
|
-
|
|
16
|
+
}
|
|
17
|
+
case "builder.triggerAnimation": {
|
|
16
18
|
callbacks.animation(data.data);
|
|
17
19
|
break;
|
|
20
|
+
}
|
|
18
21
|
case "builder.contentUpdate": {
|
|
19
22
|
const messageContent = data.data;
|
|
20
23
|
const key = messageContent.key || messageContent.alias || messageContent.entry || messageContent.modelName;
|
|
21
24
|
const contentData = messageContent.data;
|
|
22
|
-
if (key === model)
|
|
25
|
+
if (key === model) {
|
|
23
26
|
callbacks.contentUpdate(contentData);
|
|
27
|
+
}
|
|
24
28
|
break;
|
|
25
29
|
}
|
|
26
30
|
}
|
|
31
|
+
}
|
|
27
32
|
};
|
|
28
33
|
};
|
|
29
34
|
const subscribeToEditor = (model, callback, options) => {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const getTopLevelDomain = (host) => {
|
|
4
|
-
if (host === "localhost" || host === "127.0.0.1")
|
|
4
|
+
if (host === "localhost" || host === "127.0.0.1") {
|
|
5
5
|
return host;
|
|
6
|
+
}
|
|
6
7
|
const parts = host.split(".");
|
|
7
|
-
if (parts.length > 2)
|
|
8
|
+
if (parts.length > 2) {
|
|
8
9
|
return parts.slice(1).join(".");
|
|
10
|
+
}
|
|
9
11
|
return host;
|
|
10
12
|
};
|
|
11
13
|
exports.getTopLevelDomain = getTopLevelDomain;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
const getTopLevelDomain = (host) => {
|
|
2
|
-
if (host === "localhost" || host === "127.0.0.1")
|
|
2
|
+
if (host === "localhost" || host === "127.0.0.1") {
|
|
3
3
|
return host;
|
|
4
|
+
}
|
|
4
5
|
const parts = host.split(".");
|
|
5
|
-
if (parts.length > 2)
|
|
6
|
+
if (parts.length > 2) {
|
|
6
7
|
return parts.slice(1).join(".");
|
|
8
|
+
}
|
|
7
9
|
return host;
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
@@ -5,15 +5,16 @@ const nullable = require("./nullable.qwik.cjs");
|
|
|
5
5
|
const uuid = require("./uuid.qwik.cjs");
|
|
6
6
|
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
7
7
|
const getVisitorId = ({ canTrack }) => {
|
|
8
|
-
if (!canTrack)
|
|
8
|
+
if (!canTrack) {
|
|
9
9
|
return void 0;
|
|
10
|
+
}
|
|
10
11
|
const visitorId = localStorage.getLocalStorageItem({
|
|
11
12
|
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
12
13
|
canTrack
|
|
13
14
|
});
|
|
14
|
-
if (nullable.checkIsDefined(visitorId))
|
|
15
|
+
if (nullable.checkIsDefined(visitorId)) {
|
|
15
16
|
return visitorId;
|
|
16
|
-
else {
|
|
17
|
+
} else {
|
|
17
18
|
const newVisitorId = createVisitorId();
|
|
18
19
|
setVisitorId({
|
|
19
20
|
id: newVisitorId,
|
|
@@ -3,15 +3,16 @@ import { checkIsDefined } from "./nullable.qwik.mjs";
|
|
|
3
3
|
import { uuid } from "./uuid.qwik.mjs";
|
|
4
4
|
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
5
5
|
const getVisitorId = ({ canTrack }) => {
|
|
6
|
-
if (!canTrack)
|
|
6
|
+
if (!canTrack) {
|
|
7
7
|
return void 0;
|
|
8
|
+
}
|
|
8
9
|
const visitorId = getLocalStorageItem({
|
|
9
10
|
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
10
11
|
canTrack
|
|
11
12
|
});
|
|
12
|
-
if (checkIsDefined(visitorId))
|
|
13
|
+
if (checkIsDefined(visitorId)) {
|
|
13
14
|
return visitorId;
|
|
14
|
-
else {
|
|
15
|
+
} else {
|
|
15
16
|
const newVisitorId = createVisitorId();
|
|
16
17
|
setVisitorId({
|
|
17
18
|
id: newVisitorId,
|