@builder.io/sdk-react 0.2.3-0 → 0.2.3-2
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/dist/react/cjs/blocks/BaseText.js +11 -0
- package/dist/react/cjs/blocks/button/button.js +15 -0
- package/dist/react/cjs/blocks/button/component-info.js +41 -0
- package/dist/react/cjs/blocks/columns/columns.js +133 -0
- package/dist/react/cjs/blocks/columns/component-info.js +243 -0
- package/dist/react/cjs/blocks/custom-code/component-info.js +31 -0
- package/dist/react/cjs/blocks/custom-code/custom-code.js +53 -0
- package/dist/react/cjs/blocks/embed/component-info.js +46 -0
- package/dist/react/cjs/blocks/embed/embed.js +44 -0
- package/dist/react/cjs/blocks/embed/helpers.js +10 -0
- package/dist/react/cjs/blocks/form/component-info.js +262 -0
- package/dist/react/cjs/blocks/form/form.js +205 -0
- package/dist/react/cjs/blocks/fragment/component-info.js +11 -0
- package/dist/react/cjs/blocks/fragment/fragment.js +8 -0
- package/dist/react/cjs/blocks/image/component-info.js +151 -0
- package/dist/react/cjs/blocks/image/image.helpers.js +49 -0
- package/dist/react/cjs/blocks/image/image.js +84 -0
- package/dist/react/cjs/blocks/img/component-info.js +20 -0
- package/dist/react/cjs/blocks/img/img.js +12 -0
- package/dist/react/cjs/blocks/input/component-info.js +74 -0
- package/dist/react/cjs/blocks/input/input.js +9 -0
- package/dist/react/cjs/blocks/raw-text/component-info.js +16 -0
- package/dist/react/cjs/blocks/raw-text/raw-text.js +8 -0
- package/dist/react/cjs/blocks/section/component-info.js +49 -0
- package/dist/react/cjs/blocks/section/section.js +19 -0
- package/dist/react/cjs/blocks/select/component-info.js +59 -0
- package/dist/react/cjs/blocks/select/select.js +9 -0
- package/dist/react/cjs/blocks/submit-button/component-info.js +28 -0
- package/dist/react/cjs/blocks/submit-button/submit-button.js +8 -0
- package/dist/react/cjs/blocks/symbol/component-info.js +43 -0
- package/dist/react/cjs/blocks/symbol/symbol.js +73 -0
- package/dist/react/cjs/blocks/text/component-info.js +24 -0
- package/dist/react/cjs/blocks/text/text.js +10 -0
- package/dist/react/cjs/blocks/textarea/component-info.js +47 -0
- package/dist/react/cjs/blocks/textarea/textarea.js +8 -0
- package/dist/react/cjs/blocks/util.js +9 -0
- package/dist/react/cjs/blocks/video/component-info.js +106 -0
- package/dist/react/cjs/blocks/video/video.js +52 -0
- package/dist/react/cjs/components/render-block/block-styles.js +66 -0
- package/dist/react/cjs/components/render-block/render-block.helpers.js +125 -0
- package/dist/react/cjs/components/render-block/render-block.js +134 -0
- package/dist/react/cjs/components/render-block/render-component.js +14 -0
- package/dist/react/cjs/components/render-block/render-repeated-block.js +20 -0
- package/dist/react/cjs/components/render-blocks.js +49 -0
- package/dist/react/cjs/components/render-content/builder-editing.js +8 -0
- package/dist/react/cjs/components/render-content/components/render-styles.helpers.js +55 -0
- package/dist/react/cjs/components/render-content/components/render-styles.js +34 -0
- package/dist/react/cjs/components/render-content/index.js +5 -0
- package/dist/react/cjs/components/render-content/render-content.helpers.js +42 -0
- package/dist/react/cjs/components/render-content/render-content.js +297 -0
- package/dist/react/cjs/components/render-inlined-styles.js +19 -0
- package/dist/react/cjs/constants/builder-registered-components.js +55 -0
- package/dist/react/cjs/constants/device-sizes.js +49 -0
- package/dist/react/cjs/constants/target.js +5 -0
- package/dist/react/cjs/context/builder.context.js +16 -0
- package/dist/react/cjs/functions/camel-to-kebab-case.js +5 -0
- package/dist/react/cjs/functions/evaluate.js +25 -0
- package/dist/react/cjs/functions/event-handler-name.js +8 -0
- package/dist/react/cjs/functions/extract-text-styles.js +23 -0
- package/dist/react/cjs/functions/fast-clone.js +5 -0
- package/dist/react/cjs/functions/get-block-actions-handler.js +12 -0
- package/dist/react/cjs/functions/get-block-actions.js +19 -0
- package/dist/react/cjs/functions/get-block-component-options.js +29 -0
- package/dist/react/cjs/functions/get-block-properties.js +54 -0
- package/dist/react/cjs/functions/get-builder-search-params/fn.test.js +15 -0
- package/dist/react/cjs/functions/get-builder-search-params/index.js +39 -0
- package/dist/react/cjs/functions/get-content/ab-testing.js +89 -0
- package/dist/react/cjs/functions/get-content/generate-content-url.js +48 -0
- package/dist/react/cjs/functions/get-content/generate-content-url.test.js +84 -0
- package/dist/react/cjs/functions/get-content/index.js +88 -0
- package/dist/react/cjs/functions/get-fetch.js +15 -0
- package/dist/react/cjs/functions/get-global-this.js +19 -0
- package/dist/react/cjs/functions/get-processed-block.js +52 -0
- package/dist/react/cjs/functions/get-processed-block.test.js +34 -0
- package/dist/react/cjs/functions/get-react-native-block-styles.js +30 -0
- package/dist/react/cjs/functions/if-target.js +13 -0
- package/dist/react/cjs/functions/is-browser.js +7 -0
- package/dist/react/cjs/functions/is-editing.js +9 -0
- package/dist/react/cjs/functions/is-iframe.js +8 -0
- package/dist/react/cjs/functions/is-previewing.js +15 -0
- package/dist/react/cjs/functions/on-change.js +28 -0
- package/dist/react/cjs/functions/on-change.test.js +21 -0
- package/dist/react/cjs/functions/register-component.js +65 -0
- package/dist/react/cjs/functions/register.js +31 -0
- package/dist/react/cjs/functions/sanitize-react-native-block-styles.js +71 -0
- package/dist/react/cjs/functions/set-editor-settings.js +16 -0
- package/dist/react/cjs/functions/set.js +12 -0
- package/dist/react/cjs/functions/set.test.js +18 -0
- package/dist/react/cjs/functions/track/helpers.js +53 -0
- package/dist/react/{functions/track.js → cjs/functions/track/index.js} +21 -12
- package/dist/react/cjs/functions/track/interaction.js +51 -0
- package/dist/react/cjs/functions/transform-block-properties.js +7 -0
- package/dist/react/cjs/functions/transform-block.js +7 -0
- package/dist/react/cjs/helpers/ab-tests.js +10 -0
- package/dist/react/cjs/helpers/cookie.js +74 -0
- package/dist/react/cjs/helpers/css.js +33 -0
- package/dist/react/cjs/helpers/flatten.js +35 -0
- package/dist/react/cjs/helpers/localStorage.js +31 -0
- package/dist/react/cjs/helpers/logger.js +10 -0
- package/dist/react/cjs/helpers/nullable.js +5 -0
- package/dist/react/cjs/helpers/sessionId.js +51 -0
- package/dist/react/cjs/helpers/time.js +6 -0
- package/dist/react/cjs/helpers/url.js +14 -0
- package/dist/react/cjs/helpers/url.test.js +23 -0
- package/dist/react/cjs/helpers/uuid.js +14 -0
- package/dist/react/cjs/helpers/visitorId.js +33 -0
- package/dist/react/cjs/index-helpers/blocks-exports.js +23 -0
- package/dist/react/cjs/index-helpers/top-of-file.js +5 -0
- package/dist/react/cjs/index.js +28 -0
- package/dist/react/cjs/scripts/init-editing.js +97 -0
- package/dist/react/cjs/types/api-version.js +5 -0
- package/dist/react/esm/blocks/BaseText.d.ts +2 -0
- package/dist/react/esm/blocks/button/button.d.ts +2 -0
- package/dist/react/esm/blocks/button/component-info.d.ts +38 -0
- package/dist/react/esm/blocks/columns/columns.d.ts +2 -0
- package/dist/react/esm/blocks/columns/component-info.d.ts +176 -0
- package/dist/react/esm/blocks/custom-code/component-info.d.ts +31 -0
- package/dist/react/esm/blocks/custom-code/custom-code.d.ts +2 -0
- package/dist/react/esm/blocks/embed/component-info.d.ts +22 -0
- package/dist/react/esm/blocks/embed/embed.d.ts +2 -0
- package/dist/react/esm/blocks/embed/helpers.d.ts +1 -0
- package/dist/react/esm/blocks/form/component-info.d.ts +235 -0
- package/dist/react/esm/blocks/form/form.d.ts +2 -0
- package/dist/react/esm/blocks/fragment/component-info.d.ts +8 -0
- package/dist/react/esm/blocks/fragment/fragment.d.ts +2 -0
- package/dist/react/esm/blocks/image/component-info.d.ts +114 -0
- package/dist/react/esm/blocks/image/image.d.ts +2 -0
- package/dist/react/esm/blocks/image/image.helpers.d.ts +1 -0
- package/dist/react/esm/blocks/img/component-info.d.ts +15 -0
- package/dist/react/esm/blocks/img/img.d.ts +2 -0
- package/dist/react/esm/blocks/input/component-info.d.ts +66 -0
- package/dist/react/esm/blocks/input/input.d.ts +2 -0
- package/dist/react/esm/blocks/raw-text/component-info.d.ts +10 -0
- package/dist/react/esm/blocks/raw-text/raw-text.d.ts +2 -0
- package/dist/react/esm/blocks/section/component-info.d.ts +43 -0
- package/dist/react/esm/blocks/section/section.d.ts +2 -0
- package/dist/react/esm/blocks/select/component-info.d.ts +61 -0
- package/dist/react/esm/blocks/select/select.d.ts +2 -0
- package/dist/react/esm/blocks/submit-button/component-info.d.ts +23 -0
- package/dist/react/esm/blocks/submit-button/submit-button.d.ts +2 -0
- package/dist/react/esm/blocks/symbol/component-info.d.ts +35 -0
- package/dist/react/esm/blocks/symbol/symbol.d.ts +2 -0
- package/dist/react/esm/blocks/text/component-info.d.ts +19 -0
- package/dist/react/esm/blocks/text/text.d.ts +2 -0
- package/dist/react/esm/blocks/textarea/component-info.d.ts +53 -0
- package/dist/react/esm/blocks/textarea/textarea.d.ts +2 -0
- package/dist/react/esm/blocks/util.d.ts +1 -0
- package/dist/react/esm/blocks/video/component-info.d.ts +80 -0
- package/dist/react/esm/blocks/video/video.d.ts +2 -0
- package/dist/react/esm/components/render-block/block-styles.d.ts +2 -0
- package/dist/react/esm/components/render-block/render-block.d.ts +2 -0
- package/dist/react/esm/components/render-block/render-block.helpers.d.ts +13 -0
- package/dist/react/esm/components/render-block/render-component.d.ts +2 -0
- package/dist/react/esm/components/render-block/render-repeated-block.d.ts +2 -0
- package/dist/react/esm/components/render-block/types.d.ts +0 -0
- package/dist/react/esm/components/render-block/types.js +1 -0
- package/dist/react/esm/components/render-blocks.d.ts +2 -0
- package/dist/react/esm/components/render-content/builder-editing.d.ts +2 -0
- package/dist/react/esm/components/render-content/components/render-styles.d.ts +2 -0
- package/dist/react/esm/components/render-content/components/render-styles.helpers.d.ts +7 -0
- package/dist/react/esm/components/render-content/index.d.ts +2 -0
- package/dist/react/esm/components/render-content/render-content.d.ts +2 -0
- package/dist/react/esm/components/render-content/render-content.helpers.d.ts +9 -0
- package/dist/react/esm/components/render-content/render-content.types.d.ts +0 -0
- package/dist/react/esm/components/render-content/render-content.types.js +1 -0
- package/dist/react/esm/components/render-inlined-styles.d.ts +2 -0
- package/dist/react/esm/constants/builder-registered-components.d.ts +1 -0
- package/dist/react/esm/constants/device-sizes.d.ts +21 -0
- package/dist/react/esm/constants/target.d.ts +1 -0
- package/dist/react/esm/context/builder.context.d.ts +11 -0
- package/dist/react/esm/context/types.d.ts +0 -0
- package/dist/react/esm/context/types.js +1 -0
- package/dist/react/esm/functions/camel-to-kebab-case.d.ts +1 -0
- package/dist/react/esm/functions/evaluate.d.ts +7 -0
- package/dist/react/esm/functions/event-handler-name.d.ts +1 -0
- package/dist/react/esm/functions/extract-text-styles.d.ts +1 -0
- package/dist/react/esm/functions/fast-clone.d.ts +1 -0
- package/dist/react/esm/functions/get-block-actions-handler.d.ts +1 -0
- package/dist/react/esm/functions/get-block-actions.d.ts +1 -0
- package/dist/react/esm/functions/get-block-component-options.d.ts +1 -0
- package/dist/react/esm/functions/get-block-properties.d.ts +1 -0
- package/dist/react/esm/functions/get-builder-search-params/fn.test.d.ts +1 -0
- package/dist/react/esm/functions/get-builder-search-params/index.d.ts +4 -0
- package/dist/react/esm/functions/get-content/ab-testing.d.ts +1 -0
- package/dist/react/esm/functions/get-content/generate-content-url.d.ts +1 -0
- package/dist/react/esm/functions/get-content/generate-content-url.test.d.ts +1 -0
- package/dist/react/esm/functions/get-content/index.d.ts +2 -0
- package/dist/react/esm/functions/get-content/types.d.ts +0 -0
- package/dist/react/esm/functions/get-content/types.js +1 -0
- package/dist/react/esm/functions/get-fetch.d.ts +1 -0
- package/dist/react/esm/functions/get-global-this.d.ts +1 -0
- package/dist/react/esm/functions/get-processed-block.d.ts +6 -0
- package/dist/react/esm/functions/get-processed-block.test.d.ts +1 -0
- package/dist/react/esm/functions/get-react-native-block-styles.d.ts +5 -0
- package/dist/react/esm/functions/if-target.d.ts +5 -0
- package/dist/react/esm/functions/is-browser.d.ts +1 -0
- package/dist/react/esm/functions/is-editing.d.ts +1 -0
- package/dist/react/esm/functions/is-iframe.d.ts +1 -0
- package/dist/react/esm/functions/is-previewing.d.ts +1 -0
- package/dist/react/esm/functions/on-change.d.ts +2 -0
- package/dist/react/esm/functions/on-change.test.d.ts +1 -0
- package/dist/react/esm/functions/register-component.d.ts +6 -0
- package/dist/react/esm/functions/register.d.ts +1 -0
- package/dist/react/esm/functions/sanitize-react-native-block-styles.d.ts +1 -0
- package/dist/react/esm/functions/set-editor-settings.d.ts +1 -0
- package/dist/react/esm/functions/set.d.ts +1 -0
- package/dist/react/esm/functions/set.test.d.ts +1 -0
- package/dist/react/esm/functions/track/helpers.d.ts +5 -0
- package/dist/react/esm/functions/track/index.d.ts +2 -0
- package/dist/react/esm/functions/track/interaction.d.ts +14 -0
- package/dist/react/esm/functions/transform-block-properties.d.ts +1 -0
- package/dist/react/esm/functions/transform-block.d.ts +1 -0
- package/dist/react/esm/helpers/ab-tests.d.ts +9 -0
- package/dist/react/esm/helpers/cookie.d.ts +2 -0
- package/dist/react/esm/helpers/css.d.ts +7 -0
- package/dist/react/esm/helpers/flatten.d.ts +1 -0
- package/dist/react/esm/helpers/localStorage.d.ts +9 -0
- package/dist/react/esm/helpers/logger.d.ts +5 -0
- package/dist/react/esm/helpers/nullable.d.ts +1 -0
- package/dist/react/esm/helpers/sessionId.d.ts +6 -0
- package/dist/react/esm/helpers/time.d.ts +1 -0
- package/dist/react/esm/helpers/url.d.ts +1 -0
- package/dist/react/esm/helpers/url.test.d.ts +1 -0
- package/dist/react/esm/helpers/uuid.d.ts +2 -0
- package/dist/react/esm/helpers/visitorId.d.ts +8 -0
- package/dist/react/esm/index-helpers/blocks-exports.js +11 -0
- package/dist/react/esm/index-helpers/top-of-file.d.ts +2 -0
- package/dist/react/esm/index.d.ts +11 -0
- package/dist/react/esm/scripts/init-editing.d.ts +2 -0
- package/dist/react/esm/types/api-version.d.ts +1 -0
- package/dist/react/esm/types/builder-block.d.ts +0 -0
- package/dist/react/esm/types/builder-block.js +1 -0
- package/dist/react/esm/types/builder-content.d.ts +0 -0
- package/dist/react/esm/types/builder-content.js +1 -0
- package/dist/react/esm/types/can-track.d.ts +0 -0
- package/dist/react/esm/types/can-track.js +1 -0
- package/dist/react/esm/types/components.d.ts +0 -0
- package/dist/react/esm/types/components.js +1 -0
- package/dist/react/esm/types/deep-partial.d.ts +0 -0
- package/dist/react/esm/types/deep-partial.js +1 -0
- package/dist/react/esm/types/element.d.ts +0 -0
- package/dist/react/esm/types/element.js +1 -0
- package/dist/react/esm/types/input.d.ts +0 -0
- package/dist/react/esm/types/input.js +1 -0
- package/dist/react/esm/types/targets.d.ts +0 -0
- package/dist/react/esm/types/targets.js +1 -0
- package/dist/react/esm/types/typescript.d.ts +0 -0
- package/dist/react/esm/types/typescript.js +1 -0
- package/package.json +11 -6
- package/tsconfig.react-cjs.json +10 -0
- package/tsconfig.react-esm.json +10 -0
- package/dist/react/components/render-block/render-component-with-context.js +0 -27
- package/dist/react/components/render-content-variants/helpers.js +0 -98
- package/dist/react/components/render-content-variants/render-content-variants.js +0 -45
- package/dist/react/functions/get-block-tag.js +0 -4
- package/tsconfig.react.json +0 -7
- /package/dist/react/{blocks → cjs/blocks}/BaseText.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/button/button.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/button/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/columns/columns.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/columns/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/custom-code/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/custom-code/custom-code.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/embed/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/embed/embed.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/embed/helpers.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/form/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/form/form.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/fragment/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/fragment/fragment.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/image/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/image/image.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/image/image.helpers.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/img/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/img/img.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/input/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/input/input.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/raw-text/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/raw-text/raw-text.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/section/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/section/section.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/select/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/select/select.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/submit-button/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/submit-button/submit-button.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/symbol/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/symbol/symbol.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/text/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/text/text.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/textarea/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/textarea/textarea.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/util.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/video/component-info.d.ts +0 -0
- /package/dist/react/{blocks → cjs/blocks}/video/video.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-block/block-styles.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-block/render-block.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-block/render-block.helpers.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-block/render-component.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-block/render-repeated-block.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-block/types.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-block/types.js +0 -0
- /package/dist/react/{components → cjs/components}/render-blocks.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-content/builder-editing.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-content/components/render-styles.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-content/components/render-styles.helpers.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-content/index.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-content/render-content.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-content/render-content.helpers.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-content/render-content.types.d.ts +0 -0
- /package/dist/react/{components → cjs/components}/render-content/render-content.types.js +0 -0
- /package/dist/react/{components → cjs/components}/render-inlined-styles.d.ts +0 -0
- /package/dist/react/{constants → cjs/constants}/builder-registered-components.d.ts +0 -0
- /package/dist/react/{constants → cjs/constants}/device-sizes.d.ts +0 -0
- /package/dist/react/{constants → cjs/constants}/target.d.ts +0 -0
- /package/dist/react/{context → cjs/context}/builder.context.d.ts +0 -0
- /package/dist/react/{context → cjs/context}/types.d.ts +0 -0
- /package/dist/react/{context → cjs/context}/types.js +0 -0
- /package/dist/react/{functions → cjs/functions}/camel-to-kebab-case.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/evaluate.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/event-handler-name.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/extract-text-styles.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/fast-clone.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-block-actions-handler.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-block-actions.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-block-component-options.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-block-properties.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-builder-search-params/fn.test.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-builder-search-params/index.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-content/ab-testing.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-content/generate-content-url.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-content/generate-content-url.test.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-content/index.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-content/types.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-content/types.js +0 -0
- /package/dist/react/{functions → cjs/functions}/get-fetch.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-global-this.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-processed-block.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-processed-block.test.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/get-react-native-block-styles.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/if-target.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/is-browser.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/is-editing.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/is-iframe.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/is-previewing.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/on-change.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/on-change.test.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/register-component.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/register.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/sanitize-react-native-block-styles.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/set-editor-settings.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/set.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/set.test.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/track/helpers.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/track/index.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/track/interaction.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/transform-block-properties.d.ts +0 -0
- /package/dist/react/{functions → cjs/functions}/transform-block.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/ab-tests.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/cookie.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/css.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/flatten.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/localStorage.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/logger.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/nullable.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/sessionId.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/time.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/url.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/url.test.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/uuid.d.ts +0 -0
- /package/dist/react/{helpers → cjs/helpers}/visitorId.d.ts +0 -0
- /package/dist/react/{index-helpers → cjs/index-helpers}/blocks-exports.d.ts +0 -0
- /package/dist/react/{index-helpers → cjs/index-helpers}/top-of-file.d.ts +0 -0
- /package/dist/react/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/react/{scripts → cjs/scripts}/init-editing.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/api-version.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/builder-block.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/builder-block.js +0 -0
- /package/dist/react/{types → cjs/types}/builder-content.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/builder-content.js +0 -0
- /package/dist/react/{types → cjs/types}/can-track.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/can-track.js +0 -0
- /package/dist/react/{types → cjs/types}/components.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/components.js +0 -0
- /package/dist/react/{types → cjs/types}/deep-partial.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/deep-partial.js +0 -0
- /package/dist/react/{types → cjs/types}/element.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/element.js +0 -0
- /package/dist/react/{types → cjs/types}/input.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/input.js +0 -0
- /package/dist/react/{types → cjs/types}/targets.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/targets.js +0 -0
- /package/dist/react/{types → cjs/types}/typescript.d.ts +0 -0
- /package/dist/react/{types → cjs/types}/typescript.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/BaseText.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/button/button.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/button/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/columns/columns.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/columns/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/custom-code/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/custom-code/custom-code.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/embed/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/embed/embed.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/embed/helpers.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/form/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/form/form.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/fragment/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/fragment/fragment.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/image/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/image/image.helpers.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/image/image.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/img/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/img/img.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/input/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/input/input.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/raw-text/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/raw-text/raw-text.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/section/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/section/section.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/select/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/select/select.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/submit-button/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/submit-button/submit-button.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/symbol/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/symbol/symbol.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/text/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/text/text.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/textarea/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/textarea/textarea.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/util.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/video/component-info.js +0 -0
- /package/dist/react/{blocks → esm/blocks}/video/video.js +0 -0
- /package/dist/react/{components → esm/components}/render-block/block-styles.js +0 -0
- /package/dist/react/{components → esm/components}/render-block/render-block.helpers.js +0 -0
- /package/dist/react/{components → esm/components}/render-block/render-block.js +0 -0
- /package/dist/react/{components → esm/components}/render-block/render-component.js +0 -0
- /package/dist/react/{components → esm/components}/render-block/render-repeated-block.js +0 -0
- /package/dist/react/{components → esm/components}/render-blocks.js +0 -0
- /package/dist/react/{components → esm/components}/render-content/builder-editing.js +0 -0
- /package/dist/react/{components → esm/components}/render-content/components/render-styles.helpers.js +0 -0
- /package/dist/react/{components → esm/components}/render-content/components/render-styles.js +0 -0
- /package/dist/react/{components → esm/components}/render-content/index.js +0 -0
- /package/dist/react/{components → esm/components}/render-content/render-content.helpers.js +0 -0
- /package/dist/react/{components → esm/components}/render-content/render-content.js +0 -0
- /package/dist/react/{components → esm/components}/render-inlined-styles.js +0 -0
- /package/dist/react/{constants → esm/constants}/builder-registered-components.js +0 -0
- /package/dist/react/{constants → esm/constants}/device-sizes.js +0 -0
- /package/dist/react/{constants → esm/constants}/target.js +0 -0
- /package/dist/react/{context → esm/context}/builder.context.js +0 -0
- /package/dist/react/{functions → esm/functions}/camel-to-kebab-case.js +0 -0
- /package/dist/react/{functions → esm/functions}/evaluate.js +0 -0
- /package/dist/react/{functions → esm/functions}/event-handler-name.js +0 -0
- /package/dist/react/{functions → esm/functions}/extract-text-styles.js +0 -0
- /package/dist/react/{functions → esm/functions}/fast-clone.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-block-actions-handler.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-block-actions.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-block-component-options.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-block-properties.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-builder-search-params/fn.test.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-builder-search-params/index.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-content/ab-testing.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-content/generate-content-url.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-content/generate-content-url.test.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-content/index.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-fetch.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-global-this.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-processed-block.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-processed-block.test.js +0 -0
- /package/dist/react/{functions → esm/functions}/get-react-native-block-styles.js +0 -0
- /package/dist/react/{functions → esm/functions}/if-target.js +0 -0
- /package/dist/react/{functions → esm/functions}/is-browser.js +0 -0
- /package/dist/react/{functions → esm/functions}/is-editing.js +0 -0
- /package/dist/react/{functions → esm/functions}/is-iframe.js +0 -0
- /package/dist/react/{functions → esm/functions}/is-previewing.js +0 -0
- /package/dist/react/{functions → esm/functions}/on-change.js +0 -0
- /package/dist/react/{functions → esm/functions}/on-change.test.js +0 -0
- /package/dist/react/{functions → esm/functions}/register-component.js +0 -0
- /package/dist/react/{functions → esm/functions}/register.js +0 -0
- /package/dist/react/{functions → esm/functions}/sanitize-react-native-block-styles.js +0 -0
- /package/dist/react/{functions → esm/functions}/set-editor-settings.js +0 -0
- /package/dist/react/{functions → esm/functions}/set.js +0 -0
- /package/dist/react/{functions → esm/functions}/set.test.js +0 -0
- /package/dist/react/{functions → esm/functions}/track/helpers.js +0 -0
- /package/dist/react/{functions → esm/functions}/track/index.js +0 -0
- /package/dist/react/{functions → esm/functions}/track/interaction.js +0 -0
- /package/dist/react/{functions → esm/functions}/transform-block-properties.js +0 -0
- /package/dist/react/{functions → esm/functions}/transform-block.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/ab-tests.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/cookie.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/css.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/flatten.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/localStorage.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/logger.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/nullable.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/sessionId.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/time.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/url.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/url.test.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/uuid.js +0 -0
- /package/dist/react/{helpers → esm/helpers}/visitorId.js +0 -0
- /package/dist/react/{index-helpers/blocks-exports.js → esm/index-helpers/blocks-exports.d.ts} +0 -0
- /package/dist/react/{index-helpers → esm/index-helpers}/top-of-file.js +0 -0
- /package/dist/react/{index.js → esm/index.js} +0 -0
- /package/dist/react/{scripts → esm/scripts}/init-editing.js +0 -0
- /package/dist/react/{types → esm/types}/api-version.js +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setSessionId = exports.getSessionId = exports.createSessionId = void 0;
|
|
4
|
+
var __async = (__this, __arguments, generator) => {
|
|
5
|
+
return new Promise((resolve, reject) => {
|
|
6
|
+
var fulfilled = (value) => {
|
|
7
|
+
try {
|
|
8
|
+
step(generator.next(value));
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
reject(e);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
var rejected = (value) => {
|
|
15
|
+
try {
|
|
16
|
+
step(generator.throw(value));
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
reject(e);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
23
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const cookie_js_1 = require("./cookie.js");
|
|
27
|
+
const nullable_js_1 = require("./nullable.js");
|
|
28
|
+
const uuid_js_1 = require("./uuid.js");
|
|
29
|
+
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
30
|
+
const getSessionId = (_0) => __async(void 0, [_0], function* ({ canTrack }) {
|
|
31
|
+
if (!canTrack) {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
const sessionId = yield (0, cookie_js_1.getCookie)({
|
|
35
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
36
|
+
canTrack
|
|
37
|
+
});
|
|
38
|
+
if ((0, nullable_js_1.checkIsDefined)(sessionId)) {
|
|
39
|
+
return sessionId;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const newSessionId = createSessionId();
|
|
43
|
+
setSessionId({ id: newSessionId, canTrack });
|
|
44
|
+
return newSessionId;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
exports.getSessionId = getSessionId;
|
|
48
|
+
const createSessionId = () => (0, uuid_js_1.uuid)();
|
|
49
|
+
exports.createSessionId = createSessionId;
|
|
50
|
+
const setSessionId = ({ id, canTrack }) => (0, cookie_js_1.setCookie)({ name: SESSION_LOCAL_STORAGE_KEY, value: id, canTrack });
|
|
51
|
+
exports.setSessionId = setSessionId;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCurrentDatePlusMinutes = void 0;
|
|
4
|
+
const MINUTE_TO_MILLESECONDS_MULTIPLIER = 6e4;
|
|
5
|
+
const getCurrentDatePlusMinutes = (minutes = 30) => new Date(Date.now() + minutes * MINUTE_TO_MILLESECONDS_MULTIPLIER);
|
|
6
|
+
exports.getCurrentDatePlusMinutes = getCurrentDatePlusMinutes;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTopLevelDomain = void 0;
|
|
4
|
+
const getTopLevelDomain = (host) => {
|
|
5
|
+
if (host === "localhost" || host === "127.0.0.1") {
|
|
6
|
+
return host;
|
|
7
|
+
}
|
|
8
|
+
const parts = host.split(".");
|
|
9
|
+
if (parts.length > 2) {
|
|
10
|
+
return parts.slice(1).join(".");
|
|
11
|
+
}
|
|
12
|
+
return host;
|
|
13
|
+
};
|
|
14
|
+
exports.getTopLevelDomain = getTopLevelDomain;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const url_js_1 = require("./url.js");
|
|
4
|
+
describe("getTopLevelDomain", () => {
|
|
5
|
+
test("handles root domain", () => {
|
|
6
|
+
const output = (0, url_js_1.getTopLevelDomain)("example.com");
|
|
7
|
+
expect(output).toBe("example.com");
|
|
8
|
+
});
|
|
9
|
+
test("handles subdomain", () => {
|
|
10
|
+
const output = (0, url_js_1.getTopLevelDomain)("wwww.example.com");
|
|
11
|
+
expect(output).toBe("example.com");
|
|
12
|
+
});
|
|
13
|
+
test("handles subdomain with long suffix", () => {
|
|
14
|
+
const output = (0, url_js_1.getTopLevelDomain)("www.example.co.uk");
|
|
15
|
+
expect(output).toBe("example.co.uk");
|
|
16
|
+
});
|
|
17
|
+
test("handles localhost", () => {
|
|
18
|
+
const output = (0, url_js_1.getTopLevelDomain)("localhost");
|
|
19
|
+
expect(output).toBe("localhost");
|
|
20
|
+
const output2 = (0, url_js_1.getTopLevelDomain)("127.0.0.1");
|
|
21
|
+
expect(output2).toBe("127.0.0.1");
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uuidv4 = exports.uuid = void 0;
|
|
4
|
+
function uuidv4() {
|
|
5
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
|
|
6
|
+
const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
|
|
7
|
+
return v.toString(16);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
exports.uuidv4 = uuidv4;
|
|
11
|
+
function uuid() {
|
|
12
|
+
return uuidv4().replace(/-/g, "");
|
|
13
|
+
}
|
|
14
|
+
exports.uuid = uuid;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setVisitorId = exports.getVisitorId = exports.createVisitorId = void 0;
|
|
4
|
+
const localStorage_js_1 = require("./localStorage.js");
|
|
5
|
+
const nullable_js_1 = require("./nullable.js");
|
|
6
|
+
const uuid_js_1 = require("./uuid.js");
|
|
7
|
+
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
8
|
+
const getVisitorId = ({ canTrack }) => {
|
|
9
|
+
if (!canTrack) {
|
|
10
|
+
return void 0;
|
|
11
|
+
}
|
|
12
|
+
const visitorId = (0, localStorage_js_1.getLocalStorageItem)({
|
|
13
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
14
|
+
canTrack
|
|
15
|
+
});
|
|
16
|
+
if ((0, nullable_js_1.checkIsDefined)(visitorId)) {
|
|
17
|
+
return visitorId;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
const newVisitorId = createVisitorId();
|
|
21
|
+
setVisitorId({ id: newVisitorId, canTrack });
|
|
22
|
+
return newVisitorId;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.getVisitorId = getVisitorId;
|
|
26
|
+
const createVisitorId = () => (0, uuid_js_1.uuid)();
|
|
27
|
+
exports.createVisitorId = createVisitorId;
|
|
28
|
+
const setVisitorId = ({ id, canTrack }) => (0, localStorage_js_1.setLocalStorageItem)({
|
|
29
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
30
|
+
value: id,
|
|
31
|
+
canTrack
|
|
32
|
+
});
|
|
33
|
+
exports.setVisitorId = setVisitorId;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Video = exports.Text = exports.Symbol = exports.Section = exports.RenderContent = exports.RenderBlocks = exports.Image = exports.Fragment = exports.Columns = exports.Button = void 0;
|
|
4
|
+
const button_1 = require("../blocks/button/button");
|
|
5
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return button_1.default; } });
|
|
6
|
+
const columns_1 = require("../blocks/columns/columns");
|
|
7
|
+
Object.defineProperty(exports, "Columns", { enumerable: true, get: function () { return columns_1.default; } });
|
|
8
|
+
const fragment_1 = require("../blocks/fragment/fragment");
|
|
9
|
+
Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return fragment_1.default; } });
|
|
10
|
+
const image_1 = require("../blocks/image/image");
|
|
11
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return image_1.default; } });
|
|
12
|
+
const render_blocks_1 = require("../components/render-blocks");
|
|
13
|
+
Object.defineProperty(exports, "RenderBlocks", { enumerable: true, get: function () { return render_blocks_1.default; } });
|
|
14
|
+
const render_content_1 = require("../components/render-content/render-content");
|
|
15
|
+
Object.defineProperty(exports, "RenderContent", { enumerable: true, get: function () { return render_content_1.default; } });
|
|
16
|
+
const section_1 = require("../blocks/section/section");
|
|
17
|
+
Object.defineProperty(exports, "Section", { enumerable: true, get: function () { return section_1.default; } });
|
|
18
|
+
const symbol_1 = require("../blocks/symbol/symbol");
|
|
19
|
+
Object.defineProperty(exports, "Symbol", { enumerable: true, get: function () { return symbol_1.default; } });
|
|
20
|
+
const text_1 = require("../blocks/text/text");
|
|
21
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return text_1.default; } });
|
|
22
|
+
const video_1 = require("../blocks/video/video");
|
|
23
|
+
Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return video_1.default; } });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.track = void 0;
|
|
18
|
+
__exportStar(require("./index-helpers/top-of-file.js"), exports);
|
|
19
|
+
__exportStar(require("./index-helpers/blocks-exports.js"), exports);
|
|
20
|
+
__exportStar(require("./functions/is-editing.js"), exports);
|
|
21
|
+
__exportStar(require("./functions/is-previewing.js"), exports);
|
|
22
|
+
__exportStar(require("./functions/register-component.js"), exports);
|
|
23
|
+
__exportStar(require("./functions/register.js"), exports);
|
|
24
|
+
__exportStar(require("./functions/set-editor-settings.js"), exports);
|
|
25
|
+
__exportStar(require("./functions/get-content/index.js"), exports);
|
|
26
|
+
__exportStar(require("./functions/get-builder-search-params/index.js"), exports);
|
|
27
|
+
const index_js_1 = require("./functions/track/index.js");
|
|
28
|
+
Object.defineProperty(exports, "track", { enumerable: true, get: function () { return index_js_1.track; } });
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupBrowserForEditing = exports.registerInsertMenu = void 0;
|
|
4
|
+
const target_js_1 = require("../constants/target.js");
|
|
5
|
+
const is_browser_js_1 = require("../functions/is-browser.js");
|
|
6
|
+
const register_js_1 = require("../functions/register.js");
|
|
7
|
+
const registerInsertMenu = () => {
|
|
8
|
+
(0, register_js_1.register)("insertMenu", {
|
|
9
|
+
name: "_default",
|
|
10
|
+
default: true,
|
|
11
|
+
items: [
|
|
12
|
+
{ name: "Box" },
|
|
13
|
+
{ name: "Text" },
|
|
14
|
+
{ name: "Image" },
|
|
15
|
+
{ name: "Columns" },
|
|
16
|
+
...target_js_1.TARGET === "reactNative" ? [] : [
|
|
17
|
+
{ name: "Core:Section" },
|
|
18
|
+
{ name: "Core:Button" },
|
|
19
|
+
{ name: "Embed" },
|
|
20
|
+
{ name: "Custom Code" }
|
|
21
|
+
]
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.registerInsertMenu = registerInsertMenu;
|
|
26
|
+
let isSetupForEditing = false;
|
|
27
|
+
const setupBrowserForEditing = (options = {}) => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
if (isSetupForEditing) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
isSetupForEditing = true;
|
|
33
|
+
if ((0, is_browser_js_1.isBrowser)()) {
|
|
34
|
+
(_a = window.parent) == null ? void 0 : _a.postMessage({
|
|
35
|
+
type: "builder.sdkInfo",
|
|
36
|
+
data: {
|
|
37
|
+
target: target_js_1.TARGET,
|
|
38
|
+
supportsPatchUpdates: false,
|
|
39
|
+
supportsAddBlockScoping: true,
|
|
40
|
+
supportsCustomBreakpoints: true
|
|
41
|
+
}
|
|
42
|
+
}, "*");
|
|
43
|
+
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
44
|
+
type: "builder.updateContent",
|
|
45
|
+
data: {
|
|
46
|
+
options
|
|
47
|
+
}
|
|
48
|
+
}, "*");
|
|
49
|
+
window.addEventListener("message", ({ data }) => {
|
|
50
|
+
var _a2, _b2;
|
|
51
|
+
if (!(data == null ? void 0 : data.type)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
switch (data.type) {
|
|
55
|
+
case "builder.evaluate": {
|
|
56
|
+
const text = data.data.text;
|
|
57
|
+
const args = data.data.arguments || [];
|
|
58
|
+
const id = data.data.id;
|
|
59
|
+
const fn = new Function(text);
|
|
60
|
+
let result;
|
|
61
|
+
let error = null;
|
|
62
|
+
try {
|
|
63
|
+
result = fn.apply(null, args);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
error = err;
|
|
67
|
+
}
|
|
68
|
+
if (error) {
|
|
69
|
+
(_a2 = window.parent) == null ? void 0 : _a2.postMessage({
|
|
70
|
+
type: "builder.evaluateError",
|
|
71
|
+
data: { id, error: error.message }
|
|
72
|
+
}, "*");
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
if (result && typeof result.then === "function") {
|
|
76
|
+
result.then((finalResult) => {
|
|
77
|
+
var _a3;
|
|
78
|
+
(_a3 = window.parent) == null ? void 0 : _a3.postMessage({
|
|
79
|
+
type: "builder.evaluateResult",
|
|
80
|
+
data: { id, result: finalResult }
|
|
81
|
+
}, "*");
|
|
82
|
+
}).catch(console.error);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
(_b2 = window.parent) == null ? void 0 : _b2.postMessage({
|
|
86
|
+
type: "builder.evaluateResult",
|
|
87
|
+
data: { result, id }
|
|
88
|
+
}, "*");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
exports.setupBrowserForEditing = setupBrowserForEditing;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export namespace componentInfo {
|
|
2
|
+
export const name: string;
|
|
3
|
+
export const image: string;
|
|
4
|
+
export namespace defaultStyles {
|
|
5
|
+
const appearance: string;
|
|
6
|
+
const paddingTop: string;
|
|
7
|
+
const paddingBottom: string;
|
|
8
|
+
const paddingLeft: string;
|
|
9
|
+
const paddingRight: string;
|
|
10
|
+
const backgroundColor: string;
|
|
11
|
+
const color: string;
|
|
12
|
+
const borderRadius: string;
|
|
13
|
+
const textAlign: string;
|
|
14
|
+
const cursor: string;
|
|
15
|
+
}
|
|
16
|
+
export const inputs: ({
|
|
17
|
+
name: string;
|
|
18
|
+
type: string;
|
|
19
|
+
defaultValue: string;
|
|
20
|
+
bubble: boolean;
|
|
21
|
+
friendlyName?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
name: string;
|
|
24
|
+
type: string;
|
|
25
|
+
bubble: boolean;
|
|
26
|
+
defaultValue?: undefined;
|
|
27
|
+
friendlyName?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
defaultValue: boolean;
|
|
32
|
+
friendlyName: string;
|
|
33
|
+
bubble?: undefined;
|
|
34
|
+
})[];
|
|
35
|
+
const _static: boolean;
|
|
36
|
+
export { _static as static };
|
|
37
|
+
export const noWrap: boolean;
|
|
38
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export namespace componentInfo {
|
|
2
|
+
const name: string;
|
|
3
|
+
const inputs: ({
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
broadcast: boolean;
|
|
7
|
+
subFields: ({
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
hideFromUI: boolean;
|
|
11
|
+
defaultValue: ({
|
|
12
|
+
"@type": string;
|
|
13
|
+
responsiveStyles: {
|
|
14
|
+
large: {
|
|
15
|
+
display: string;
|
|
16
|
+
flexDirection: string;
|
|
17
|
+
alignItems: string;
|
|
18
|
+
flexShrink: string;
|
|
19
|
+
position: string;
|
|
20
|
+
marginTop: string;
|
|
21
|
+
textAlign: string;
|
|
22
|
+
lineHeight: string;
|
|
23
|
+
height: string;
|
|
24
|
+
minHeight: string;
|
|
25
|
+
minWidth: string;
|
|
26
|
+
overflow: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
component: {
|
|
30
|
+
name: string;
|
|
31
|
+
options: {
|
|
32
|
+
image: string;
|
|
33
|
+
backgroundPosition: string;
|
|
34
|
+
backgroundSize: string;
|
|
35
|
+
aspectRatio: number;
|
|
36
|
+
text?: undefined;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
} | {
|
|
40
|
+
"@type": string;
|
|
41
|
+
responsiveStyles: {
|
|
42
|
+
large: {
|
|
43
|
+
display: string;
|
|
44
|
+
flexDirection: string;
|
|
45
|
+
alignItems: string;
|
|
46
|
+
flexShrink: string;
|
|
47
|
+
position: string;
|
|
48
|
+
marginTop: string;
|
|
49
|
+
textAlign: string;
|
|
50
|
+
lineHeight: string;
|
|
51
|
+
height: string;
|
|
52
|
+
minHeight?: undefined;
|
|
53
|
+
minWidth?: undefined;
|
|
54
|
+
overflow?: undefined;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
component: {
|
|
58
|
+
name: string;
|
|
59
|
+
options: {
|
|
60
|
+
text: string;
|
|
61
|
+
image?: undefined;
|
|
62
|
+
backgroundPosition?: undefined;
|
|
63
|
+
backgroundSize?: undefined;
|
|
64
|
+
aspectRatio?: undefined;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
})[];
|
|
68
|
+
helperText?: undefined;
|
|
69
|
+
} | {
|
|
70
|
+
name: string;
|
|
71
|
+
type: string;
|
|
72
|
+
hideFromUI: boolean;
|
|
73
|
+
helperText: string;
|
|
74
|
+
defaultValue?: undefined;
|
|
75
|
+
} | {
|
|
76
|
+
name: string;
|
|
77
|
+
type: string;
|
|
78
|
+
helperText: string;
|
|
79
|
+
hideFromUI?: undefined;
|
|
80
|
+
defaultValue?: undefined;
|
|
81
|
+
})[];
|
|
82
|
+
defaultValue: {
|
|
83
|
+
blocks: ({
|
|
84
|
+
"@type": string;
|
|
85
|
+
responsiveStyles: {
|
|
86
|
+
large: {
|
|
87
|
+
display: string;
|
|
88
|
+
flexDirection: string;
|
|
89
|
+
alignItems: string;
|
|
90
|
+
flexShrink: string;
|
|
91
|
+
position: string;
|
|
92
|
+
marginTop: string;
|
|
93
|
+
textAlign: string;
|
|
94
|
+
lineHeight: string;
|
|
95
|
+
height: string;
|
|
96
|
+
minHeight: string;
|
|
97
|
+
minWidth: string;
|
|
98
|
+
overflow: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
component: {
|
|
102
|
+
name: string;
|
|
103
|
+
options: {
|
|
104
|
+
image: string;
|
|
105
|
+
backgroundPosition: string;
|
|
106
|
+
backgroundSize: string;
|
|
107
|
+
aspectRatio: number;
|
|
108
|
+
text?: undefined;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
} | {
|
|
112
|
+
"@type": string;
|
|
113
|
+
responsiveStyles: {
|
|
114
|
+
large: {
|
|
115
|
+
display: string;
|
|
116
|
+
flexDirection: string;
|
|
117
|
+
alignItems: string;
|
|
118
|
+
flexShrink: string;
|
|
119
|
+
position: string;
|
|
120
|
+
marginTop: string;
|
|
121
|
+
textAlign: string;
|
|
122
|
+
lineHeight: string;
|
|
123
|
+
height: string;
|
|
124
|
+
minHeight?: undefined;
|
|
125
|
+
minWidth?: undefined;
|
|
126
|
+
overflow?: undefined;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
component: {
|
|
130
|
+
name: string;
|
|
131
|
+
options: {
|
|
132
|
+
text: string;
|
|
133
|
+
image?: undefined;
|
|
134
|
+
backgroundPosition?: undefined;
|
|
135
|
+
backgroundSize?: undefined;
|
|
136
|
+
aspectRatio?: undefined;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
})[];
|
|
140
|
+
}[];
|
|
141
|
+
onChange: string;
|
|
142
|
+
helperText?: undefined;
|
|
143
|
+
advanced?: undefined;
|
|
144
|
+
enum?: undefined;
|
|
145
|
+
} | {
|
|
146
|
+
name: string;
|
|
147
|
+
type: string;
|
|
148
|
+
defaultValue: number;
|
|
149
|
+
helperText: string;
|
|
150
|
+
advanced: boolean;
|
|
151
|
+
broadcast?: undefined;
|
|
152
|
+
subFields?: undefined;
|
|
153
|
+
onChange?: undefined;
|
|
154
|
+
enum?: undefined;
|
|
155
|
+
} | {
|
|
156
|
+
name: string;
|
|
157
|
+
type: string;
|
|
158
|
+
defaultValue: string;
|
|
159
|
+
helperText: string;
|
|
160
|
+
enum: string[];
|
|
161
|
+
advanced: boolean;
|
|
162
|
+
broadcast?: undefined;
|
|
163
|
+
subFields?: undefined;
|
|
164
|
+
onChange?: undefined;
|
|
165
|
+
} | {
|
|
166
|
+
name: string;
|
|
167
|
+
type: string;
|
|
168
|
+
defaultValue: boolean;
|
|
169
|
+
helperText: string;
|
|
170
|
+
advanced: boolean;
|
|
171
|
+
broadcast?: undefined;
|
|
172
|
+
subFields?: undefined;
|
|
173
|
+
onChange?: undefined;
|
|
174
|
+
enum?: undefined;
|
|
175
|
+
})[];
|
|
176
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export namespace componentInfo {
|
|
2
|
+
export const name: string;
|
|
3
|
+
const _static: boolean;
|
|
4
|
+
export { _static as static };
|
|
5
|
+
export const requiredPermissions: string[];
|
|
6
|
+
export const inputs: ({
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
required: boolean;
|
|
10
|
+
defaultValue: string;
|
|
11
|
+
code: boolean;
|
|
12
|
+
helperText?: undefined;
|
|
13
|
+
advanced?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
helperText: string;
|
|
18
|
+
advanced: boolean;
|
|
19
|
+
required?: undefined;
|
|
20
|
+
defaultValue?: undefined;
|
|
21
|
+
code?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
name: string;
|
|
24
|
+
type: string;
|
|
25
|
+
defaultValue: boolean;
|
|
26
|
+
helperText: string;
|
|
27
|
+
advanced: boolean;
|
|
28
|
+
required?: undefined;
|
|
29
|
+
code?: undefined;
|
|
30
|
+
})[];
|
|
31
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export namespace componentInfo {
|
|
2
|
+
export const name: string;
|
|
3
|
+
const _static: boolean;
|
|
4
|
+
export { _static as static };
|
|
5
|
+
export const inputs: ({
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
required: boolean;
|
|
9
|
+
defaultValue: string;
|
|
10
|
+
helperText: string;
|
|
11
|
+
onChange: string;
|
|
12
|
+
hideFromUI?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
name: string;
|
|
15
|
+
type: string;
|
|
16
|
+
defaultValue: string;
|
|
17
|
+
hideFromUI: boolean;
|
|
18
|
+
required?: undefined;
|
|
19
|
+
helperText?: undefined;
|
|
20
|
+
onChange?: undefined;
|
|
21
|
+
})[];
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function isJsScript(script: any): boolean;
|