@useinsider/guido 1.0.3-beta.3cb36f8 → 1.0.3-beta.3e280d4
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/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +74 -68
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +16 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +24 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +64 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +107 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +12 -0
- package/dist/components/wrappers/WpDrawer.vue.js +6 -4
- package/dist/composables/useStripo.js +59 -48
- package/dist/config/compiler/unsubscribeCompilerRules.js +42 -29
- package/dist/config/migrator/couponBlockMigrator.js +67 -0
- package/dist/config/migrator/index.js +9 -6
- package/dist/config/migrator/recommendationMigrator.js +203 -0
- package/dist/config/migrator/unsubscribeMigrator.js +124 -0
- package/dist/enums/defaults.js +6 -3
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/enums/unsubscribe.js +43 -6
- package/dist/extensions/Blocks/Checkbox/block.js +15 -24
- package/dist/extensions/Blocks/Checkbox/control.js +55 -67
- package/dist/extensions/Blocks/Checkbox/extension.js +5 -16
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +18 -0
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +12 -25
- package/dist/extensions/Blocks/Checkbox/template.js +5 -16
- package/dist/extensions/Blocks/CouponBlock/block.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +8 -0
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +24 -0
- package/dist/extensions/Blocks/CouponBlock/template.js +18 -0
- package/dist/extensions/Blocks/RadioButton/block.js +13 -22
- package/dist/extensions/Blocks/RadioButton/control.js +40 -52
- package/dist/extensions/Blocks/RadioButton/extension.js +4 -15
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +14 -0
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +13 -26
- package/dist/extensions/Blocks/RadioButton/template.js +13 -24
- package/dist/extensions/Blocks/Recommendation/block.js +30 -0
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +335 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +5 -0
- package/dist/extensions/Blocks/Recommendation/control.js +305 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +45 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +117 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/template.js +365 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
- package/dist/extensions/Blocks/Unsubscribe/block.js +131 -0
- package/dist/extensions/Blocks/Unsubscribe/control.js +167 -0
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +35 -0
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +10 -0
- package/dist/extensions/Blocks/Unsubscribe/template.js +22 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +11 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +6 -0
- package/dist/extensions/Blocks/common-control.js +184 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +31 -45
- package/dist/extensions/DynamicContent/extension.js +6 -18
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +866 -0
- package/dist/package.json.js +7 -0
- package/dist/services/recommendationApi.js +43 -0
- package/dist/services/unsubscribeApi.js +16 -0
- package/dist/{@types → src/@types}/generic.d.ts +13 -0
- package/dist/{components → src/components}/Guido.vue.d.ts +2 -2
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
- package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
- package/dist/src/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +2 -0
- package/dist/{components → src/components}/wrappers/WpDrawer.vue.d.ts +6 -4
- package/dist/src/config/migrator/couponBlockMigrator.d.ts +1 -0
- package/dist/src/config/migrator/index.d.ts +1 -0
- package/dist/src/config/migrator/recommendationMigrator.d.ts +1 -0
- package/dist/src/config/migrator/unsubscribeMigrator.d.ts +1 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/src/enums/unsubscribe.d.ts +38 -0
- package/dist/{extensions → src/extensions}/Blocks/Checkbox/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/Checkbox/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/CouponBlock/block.d.ts +12 -0
- package/dist/src/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/CouponBlock/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +3 -0
- package/dist/{extensions → src/extensions}/Blocks/RadioButton/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/RadioButton/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +65 -0
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +51 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
- package/dist/src/extensions/Blocks/Recommendation/template.d.ts +43 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +32 -0
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +29 -0
- package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +11 -0
- package/dist/src/extensions/Blocks/Unsubscribe/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +12 -0
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +9 -0
- package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +7 -0
- package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +87 -0
- package/dist/src/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/src/mock/api/validator.d.ts +2 -0
- package/dist/src/services/recommendationApi.d.ts +6 -0
- package/dist/src/services/unsubscribeApi.d.ts +4 -0
- package/dist/src/stores/config.d.ts +96 -0
- package/dist/{stores → src/stores}/editor.d.ts +21 -0
- package/dist/src/stores/unsubscribe.d.ts +256 -0
- package/dist/{utils → src/utils}/genericUtil.d.ts +1 -0
- package/dist/static/styles/customEditorStyle.css.js +5 -0
- package/dist/stores/config.js +17 -0
- package/dist/stores/editor.js +2 -1
- package/dist/stores/unsubscribe.js +126 -6
- package/dist/utils/genericUtil.js +8 -7
- package/dist/utils/templatePreparation.js +17 -16
- package/package.json +8 -3
- package/dist/config/migrator/index.d.ts +0 -1
- package/dist/enums/unsubscribe.d.ts +0 -15
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -75
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -77
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -123
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +0 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -119
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +0 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -24
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -24
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -33
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -40
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -5
- package/dist/stores/unsubscribe.d.ts +0 -8
- /package/dist/{@types → src/@types}/events.d.ts +0 -0
- /package/dist/{@types → src/@types}/save-as-template.d.ts +0 -0
- /package/dist/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/LoadingWrapper.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/base/Toaster.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
- /package/dist/{components/organisms/header/LeftSlot.vue.d.ts → src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/MiddleSlot.vue.d.ts → src/components/organisms/extensions/recommendation/Filters.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
- /package/dist/{components/organisms/header/ViewOptions.vue.d.ts → src/components/organisms/header/LeftSlot.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/version-history/RestoreButton.vue.d.ts → src/components/organisms/header/MiddleSlot.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/header/RightSlot.vue.d.ts +0 -0
- /package/dist/{components/organisms/header/version-history → src/components/organisms/header}/ViewOptions.vue.d.ts +0 -0
- /package/dist/{components/organisms/onboarding/AMPOnboarding.vue.d.ts → src/components/organisms/header/version-history/RestoreButton.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
- /package/dist/{components/organisms/onboarding/GenericOnboarding.vue.d.ts → src/components/organisms/header/version-history/ViewOptions.vue.d.ts} +0 -0
- /package/dist/{components/organisms/onboarding/NewVersionPopup.vue.d.ts → src/components/organisms/onboarding/AMPOnboarding.vue.d.ts} +0 -0
- /package/dist/{components/organisms/onboarding/OnboardingWrapper.vue.d.ts → src/components/organisms/onboarding/GenericOnboarding.vue.d.ts} +0 -0
- /package/dist/{components/organisms/onboarding/TextBlockOnboarding.vue.d.ts → src/components/organisms/onboarding/NewVersionPopup.vue.d.ts} +0 -0
- /package/dist/{components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts → src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts} +0 -0
- /package/dist/{components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts → src/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/wrappers/WpModal.vue.d.ts +0 -0
- /package/dist/{composables → src/composables}/useActionsApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/useApiExample.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCodeEditorApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/useConfig.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCustomInterfaceAppearance.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDebounce.d.ts +0 -0
- /package/dist/{composables → src/composables}/useExport.d.ts +0 -0
- /package/dist/{composables → src/composables}/useGuidoActions.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHtmlCompiler.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHtmlValidator.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHttp.d.ts +0 -0
- /package/dist/{composables → src/composables}/usePartner.d.ts +0 -0
- /package/dist/{composables → src/composables}/usePreviewMode.d.ts +0 -0
- /package/dist/{composables → src/composables}/useProvideInject.d.ts +0 -0
- /package/dist/{composables → src/composables}/useRecommendation.d.ts +0 -0
- /package/dist/{composables → src/composables}/useResponsivePreview.d.ts +0 -0
- /package/dist/{composables → src/composables}/useSave.d.ts +0 -0
- /package/dist/{composables → src/composables}/useStripo.d.ts +0 -0
- /package/dist/{composables → src/composables}/useStripoEventHandler.d.ts +0 -0
- /package/dist/{composables → src/composables}/useToaster.d.ts +0 -0
- /package/dist/{composables → src/composables}/useTranslations.d.ts +0 -0
- /package/dist/{composables → src/composables}/useValidation.d.ts +0 -0
- /package/dist/{composables → src/composables}/useVersionHistoryApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/validators/saveAsTemplate.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/htmlCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/outlookCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/recommendationCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/socialCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/checkboxMigrator.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{enums → src/enums}/defaults.d.ts +0 -0
- /package/dist/{enums → src/enums}/displayConditions.d.ts +0 -0
- /package/dist/{enums → src/enums}/html-validator.d.ts +0 -0
- /package/dist/{enums → src/enums}/onboarding.d.ts +0 -0
- /package/dist/{enums → src/enums}/preview.d.ts +0 -0
- /package/dist/{enums → src/enums}/recommendation.d.ts +0 -0
- /package/dist/{enums → src/enums}/toaster.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/template.d.ts +0 -0
- /package/dist/{extensions/Blocks/RadioButton → src/extensions/Blocks/CouponBlock}/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/control.d.ts +0 -0
- /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/RadioButton}/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/template.d.ts +0 -0
- /package/dist/{extensions/DynamicContent → src/extensions/Blocks/Recommendation}/extension.d.ts +0 -0
- /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Recommendation}/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content.d.ts +0 -0
- /package/dist/{library.d.ts → src/library.d.ts} +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/dist/{mock → src/mock}/api/auth.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/custom-fonts.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/default-template.d.ts +0 -0
- /package/dist/{mock/api/template-library.d.ts → src/mock/api/recommendation.d.ts} +0 -0
- /package/dist/{mock/api/unsubscribe.d.ts → src/mock/api/template-library.d.ts} +0 -0
- /package/dist/{mock/api/user-modal-state.d.ts → src/mock/api/unsubscribe.d.ts} +0 -0
- /package/dist/{mock/api/validator.d.ts → src/mock/api/user-modal-state.d.ts} +0 -0
- /package/dist/{mock → src/mock}/browser.d.ts +0 -0
- /package/dist/{mock → src/mock}/handlers.d.ts +0 -0
- /package/dist/{services → src/services}/onboardingApi.d.ts +0 -0
- /package/dist/{services → src/services}/stripoApi.d.ts +0 -0
- /package/dist/{services → src/services}/templateLibraryApi.d.ts +0 -0
- /package/dist/{stores → src/stores}/dynamic-content.d.ts +0 -0
- /package/dist/{stores → src/stores}/onboarding.d.ts +0 -0
- /package/dist/{stores → src/stores}/preview.d.ts +0 -0
- /package/dist/{stores → src/stores}/recommendation.d.ts +0 -0
- /package/dist/{stores → src/stores}/save-as-template.d.ts +0 -0
- /package/dist/{stores → src/stores}/toaster.d.ts +0 -0
- /package/dist/{stores → src/stores}/version-history.d.ts +0 -0
- /package/dist/{utils → src/utils}/arrayUtil.d.ts +0 -0
- /package/dist/{utils → src/utils}/base64.d.ts +0 -0
- /package/dist/{utils → src/utils}/dateUtil.d.ts +0 -0
- /package/dist/{utils → src/utils}/htmlCompiler.d.ts +0 -0
- /package/dist/{utils → src/utils}/templatePreparation.d.ts +0 -0
- /package/dist/{utils → src/utils}/tooltipUtils.d.ts +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as h, ref as b, computed as m, watch as _ } from "vue";
|
|
2
|
+
import v from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useToaster as B } from "../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as N } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ToasterTypeOptions as U } from "../../../enums/toaster.js";
|
|
6
|
+
import { PAGE_TYPES as l, ACADEMY_LINK as w, UNSUBSCRIBE_PAGES_LINK as P, TYPE_TRANSLATIONS as R } from "../../../enums/unsubscribe.js";
|
|
7
|
+
import { useUnsubscribeStore as D } from "../../../stores/unsubscribe.js";
|
|
8
|
+
import { InSegments as I } from "@useinsider/design-system-vue";
|
|
9
|
+
const z = /* @__PURE__ */ h({
|
|
10
|
+
__name: "UnsubscribeTypeSelection",
|
|
11
|
+
setup(G) {
|
|
12
|
+
const e = N(), { showToaster: f } = B(), t = D(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), S = e(
|
|
13
|
+
"unsubscription-preference.select-unsubscribe-page-description",
|
|
14
|
+
{ action: `<a href="${w}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
|
|
15
|
+
), T = m(() => [
|
|
16
|
+
{
|
|
17
|
+
description: e("unsubscription-preference.type-global-unsubscribe-description"),
|
|
18
|
+
icon: "line-contact-global-unsub-page",
|
|
19
|
+
text: e("unsubscription-preference.type-global-unsubscribe"),
|
|
20
|
+
value: l.GLOBAL_UNSUBSCRIBE,
|
|
21
|
+
disable: t.isGlobalUnsubscribeDisabled,
|
|
22
|
+
position: "bottom",
|
|
23
|
+
tooltipText: t.isGlobalUnsubscribeDisabled ? e("unsubscription-preference.global-unsub-added") : ""
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
description: e("unsubscription-preference.type-subscription-preferences-center-description"),
|
|
27
|
+
icon: "line-contact-sub-pref-center-page",
|
|
28
|
+
text: e("unsubscription-preference.type-subscription-preferences-center"),
|
|
29
|
+
value: l.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
30
|
+
disable: t.isSubscriptionPreferencesCenterDisabled,
|
|
31
|
+
tooltipText: t.isSubscriptionPreferencesCenterDisabled ? e("unsubscription-preference.pref-center-added") : ""
|
|
32
|
+
}
|
|
33
|
+
]), y = m(() => ({
|
|
34
|
+
primaryButton: {
|
|
35
|
+
styling: "solid",
|
|
36
|
+
type: "primary",
|
|
37
|
+
labelText: e(
|
|
38
|
+
n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
|
|
39
|
+
),
|
|
40
|
+
loadingStatus: n.value,
|
|
41
|
+
disabledStatus: !1,
|
|
42
|
+
skeletonStatus: i.value,
|
|
43
|
+
skeletonSizing: { width: 168, height: 40 }
|
|
44
|
+
},
|
|
45
|
+
cancelOrBackButton: {
|
|
46
|
+
styling: "ghost",
|
|
47
|
+
type: "secondary",
|
|
48
|
+
labelText: e("products.cancel"),
|
|
49
|
+
disabledStatus: n.value,
|
|
50
|
+
skeletonStatus: i.value,
|
|
51
|
+
skeletonSizing: { width: 78, height: 40 }
|
|
52
|
+
}
|
|
53
|
+
})), d = (s) => {
|
|
54
|
+
t.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel")), s && setTimeout(() => {
|
|
55
|
+
s();
|
|
56
|
+
}, 500);
|
|
57
|
+
}, E = (s) => {
|
|
58
|
+
o.value = s;
|
|
59
|
+
}, g = () => {
|
|
60
|
+
const s = t.hasTemplatesByCollectionType, r = [];
|
|
61
|
+
if (Object.entries(s).forEach(([c, p]) => {
|
|
62
|
+
p || r.push(Number(c));
|
|
63
|
+
}), r.length === 0)
|
|
64
|
+
return !0;
|
|
65
|
+
const a = r.map((c) => R[c]);
|
|
66
|
+
let u = "";
|
|
67
|
+
if (r.length === 1)
|
|
68
|
+
u = e("unsubscription-preference.create-page-to-continue", {
|
|
69
|
+
page: a[0]
|
|
70
|
+
});
|
|
71
|
+
else if (r.length === 2)
|
|
72
|
+
u = e("unsubscription-preference.create-pages-to-continue", {
|
|
73
|
+
page1: a[0],
|
|
74
|
+
page2: a[1]
|
|
75
|
+
});
|
|
76
|
+
else {
|
|
77
|
+
const c = a.pop() ?? "", p = a.join(", ");
|
|
78
|
+
u = e("unsubscription-preference.create-multiple-pages-to-continue", {
|
|
79
|
+
pages: p,
|
|
80
|
+
lastPage: c
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return f({
|
|
84
|
+
type: U.Warning,
|
|
85
|
+
message: u,
|
|
86
|
+
actionButton: {
|
|
87
|
+
text: "Go to Unsubscribe Pages",
|
|
88
|
+
onClick: () => {
|
|
89
|
+
window.location.href = P;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}), !1;
|
|
93
|
+
}, C = async () => {
|
|
94
|
+
if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !g()) {
|
|
95
|
+
n.value = !1, d();
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
n.value = !1, t.typeSelectionDrawerStatus = !1, t.pageSelectionDrawerStatus = !0;
|
|
99
|
+
};
|
|
100
|
+
return _(() => t.typeSelectionDrawerStatus, (s) => {
|
|
101
|
+
s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (o.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), i.value = !1);
|
|
102
|
+
}), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: g, selectCollection: C, WpDrawer: v, InSegments: I };
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
z as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import o from "./UnsubscribeWrapper.vue2.js";
|
|
2
|
+
import t from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var _ = function() {
|
|
4
|
+
var s;
|
|
5
|
+
var e = this, n = e._self._c, r = e._self._setupProxy;
|
|
6
|
+
return (s = r.config.extensions) != null && s.unsubscribe ? n("div", [n(r.UnsubscribeTypeSelection), n(r.UnsubscribePageSelection)], 1) : e._e();
|
|
7
|
+
}, c = [], i = /* @__PURE__ */ t(
|
|
8
|
+
o,
|
|
9
|
+
_,
|
|
10
|
+
c,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
null
|
|
14
|
+
);
|
|
15
|
+
const l = i.exports;
|
|
16
|
+
export {
|
|
17
|
+
l as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineComponent as t, defineAsyncComponent as e } from "vue";
|
|
2
|
+
import { useConfig as r } from "../../../composables/useConfig.js";
|
|
3
|
+
const m = /* @__PURE__ */ t({
|
|
4
|
+
__name: "UnsubscribeWrapper",
|
|
5
|
+
setup(i) {
|
|
6
|
+
const n = e(() => import("./UnsubscribePageSelection.vue.js")), o = e(() => import("./UnsubscribeTypeSelection.vue.js")), { config: s } = r();
|
|
7
|
+
return { __sfc: !0, UnsubscribePageSelection: n, UnsubscribeTypeSelection: o, config: s };
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
m as default
|
|
12
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "./WpDrawer.vue2.js";
|
|
2
2
|
import s from "../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var u = function() {
|
|
4
4
|
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
5
5
|
return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
|
|
6
6
|
return e.emit("cancelOrBackButtonEvent");
|
|
@@ -8,13 +8,15 @@ var i = function() {
|
|
|
8
8
|
return e.emit("onCloseEvent");
|
|
9
9
|
}, primaryButtonEvent: function(o) {
|
|
10
10
|
return e.emit("primaryButtonEvent");
|
|
11
|
-
} }, scopedSlots: t._u([{ key: "
|
|
11
|
+
} }, scopedSlots: t._u([t.$slots.headerBottomSlot ? { key: "headerBottomSlot", fn: function() {
|
|
12
|
+
return [t._t("headerBottomSlot")];
|
|
13
|
+
}, proxy: !0 } : null, { key: "contentSlot", fn: function() {
|
|
12
14
|
return [n("div", [t._t("default")], 2)];
|
|
13
15
|
}, proxy: !0 }], null, !0) });
|
|
14
|
-
},
|
|
16
|
+
}, i = [], c = /* @__PURE__ */ s(
|
|
15
17
|
r,
|
|
16
|
-
i,
|
|
17
18
|
u,
|
|
19
|
+
i,
|
|
18
20
|
!1,
|
|
19
21
|
null,
|
|
20
22
|
null
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import { useActionsApi as f } from "./useActionsApi.js";
|
|
2
|
-
import { useCustomInterfaceAppearance as
|
|
3
|
-
import { useStripoEventHandler as
|
|
2
|
+
import { useCustomInterfaceAppearance as E } from "./useCustomInterfaceAppearance.js";
|
|
3
|
+
import { useStripoEventHandler as S } from "./useStripoEventHandler.js";
|
|
4
4
|
import { useToaster as C } from "./useToaster.js";
|
|
5
5
|
import { displayConditions as y } from "../enums/displayConditions.js";
|
|
6
6
|
import h from "../extensions/Blocks/Checkbox/extension.js";
|
|
7
|
-
import w from "../extensions/Blocks/
|
|
8
|
-
import b from "../extensions/
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import w from "../extensions/Blocks/CouponBlock/extension.js";
|
|
8
|
+
import b from "../extensions/Blocks/RadioButton/extension.js";
|
|
9
|
+
import V from "../extensions/Blocks/Recommendation/extension.js";
|
|
10
|
+
import _ from "../extensions/Blocks/Unsubscribe/extension.js";
|
|
11
|
+
import k from "../extensions/DynamicContent/extension.js";
|
|
12
|
+
import { useStripoApi as B } from "../services/stripoApi.js";
|
|
13
|
+
import x from "../static/styles/customEditorStyle.css.js";
|
|
14
|
+
import { useEditorStore as F } from "../stores/editor.js";
|
|
15
|
+
import { dynamicContentToMergeTags as A } from "../utils/genericUtil.js";
|
|
16
|
+
import T from "../package.json.js";
|
|
17
|
+
const G = (a) => {
|
|
18
|
+
const { handleError: d } = C(), { getToken: u, getCustomFonts: m } = B(), { handleEvent: p } = S(), l = (r, i = []) => {
|
|
19
|
+
const t = F(), { html: n, css: c, forceRecreate: s } = r;
|
|
16
20
|
window.UIEditor.initEditor(
|
|
17
21
|
document.querySelector("#guido-editor"),
|
|
18
22
|
{
|
|
19
|
-
metadata:
|
|
20
|
-
html:
|
|
21
|
-
css:
|
|
22
|
-
forceRecreate:
|
|
23
|
+
metadata: a,
|
|
24
|
+
html: n,
|
|
25
|
+
css: c,
|
|
26
|
+
forceRecreate: s,
|
|
23
27
|
locale: "en",
|
|
24
28
|
undoButtonSelector: "#guido__undo-button",
|
|
25
29
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -29,7 +33,7 @@ const q = (s) => {
|
|
|
29
33
|
customAppearanceMergetags: !0,
|
|
30
34
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
31
35
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
32
|
-
customViewStyles:
|
|
36
|
+
customViewStyles: x,
|
|
33
37
|
conditionsEnabled: !0,
|
|
34
38
|
customConditionsEnabled: !0,
|
|
35
39
|
conditionCategories: y,
|
|
@@ -43,68 +47,75 @@ const q = (s) => {
|
|
|
43
47
|
},
|
|
44
48
|
mergeTags: [
|
|
45
49
|
{
|
|
46
|
-
entries:
|
|
50
|
+
entries: A(a.preselectedDynamicContentList)
|
|
47
51
|
}
|
|
48
52
|
],
|
|
49
|
-
async onTokenRefreshRequest(
|
|
53
|
+
async onTokenRefreshRequest(o) {
|
|
50
54
|
try {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
} catch (
|
|
54
|
-
d(
|
|
55
|
+
const e = await u();
|
|
56
|
+
o(e);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
d(e, "Failed to refresh token");
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
onTemplateLoaded() {
|
|
58
62
|
try {
|
|
59
|
-
const { importCss:
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
const { importCss: o } = E(), { activateCustomViewStyles: e } = f();
|
|
64
|
+
o(), e(), a.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
65
|
+
t.hasChanges = !1;
|
|
62
66
|
}, 1e3);
|
|
63
|
-
} catch (
|
|
64
|
-
d(
|
|
67
|
+
} catch (o) {
|
|
68
|
+
d(o, "Failed to load custom interface appearance");
|
|
65
69
|
}
|
|
66
70
|
},
|
|
67
|
-
onCodeEditorVisibilityChanged(
|
|
68
|
-
|
|
71
|
+
onCodeEditorVisibilityChanged(o) {
|
|
72
|
+
t.isCodeEditorOpen = o;
|
|
69
73
|
},
|
|
70
|
-
onEditorVisualModeChanged(
|
|
71
|
-
|
|
74
|
+
onEditorVisualModeChanged(o) {
|
|
75
|
+
t.editorVisualMode = o.toLowerCase();
|
|
72
76
|
},
|
|
73
|
-
onVersionHistoryVisibilityChanged(
|
|
74
|
-
|
|
77
|
+
onVersionHistoryVisibilityChanged(o) {
|
|
78
|
+
t.isVersionHistoryOpen = o;
|
|
75
79
|
},
|
|
76
80
|
onDataChanged() {
|
|
77
|
-
|
|
81
|
+
t.hasChanges = !0;
|
|
78
82
|
},
|
|
79
|
-
onEvent:
|
|
80
|
-
ignoreClickOutsideSelectors: [
|
|
83
|
+
onEvent: p,
|
|
84
|
+
ignoreClickOutsideSelectors: [
|
|
85
|
+
"#guido-dynamic-content-modal",
|
|
86
|
+
".in-on-board-wrapper",
|
|
87
|
+
".in-drawer__container"
|
|
88
|
+
],
|
|
81
89
|
extensions: [
|
|
82
|
-
|
|
90
|
+
k,
|
|
83
91
|
h,
|
|
92
|
+
b,
|
|
93
|
+
V,
|
|
94
|
+
_,
|
|
84
95
|
w
|
|
85
96
|
]
|
|
86
97
|
}
|
|
87
98
|
);
|
|
88
|
-
},
|
|
99
|
+
}, g = (r) => new Promise((i, t) => {
|
|
100
|
+
var e;
|
|
89
101
|
if (document.getElementById("UiEditorScript")) {
|
|
90
102
|
r(), i();
|
|
91
103
|
return;
|
|
92
104
|
}
|
|
93
|
-
const e = document.createElement("script");
|
|
94
|
-
|
|
105
|
+
const n = T.guido, s = `https://email-static.useinsider.com/guido/${(e = n == null ? void 0 : n.stripo) == null ? void 0 : e.version}/UIEditor.js`, o = document.createElement("script");
|
|
106
|
+
o.id = "UiEditorScript", o.type = "module", o.src = s, o.onload = () => {
|
|
95
107
|
r(), i();
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}, document.body.appendChild(e);
|
|
108
|
+
}, o.onerror = () => {
|
|
109
|
+
t(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
|
|
110
|
+
}, document.body.appendChild(o);
|
|
100
111
|
});
|
|
101
112
|
return { initPlugin: async (r) => {
|
|
102
|
-
await
|
|
103
|
-
const i = await
|
|
104
|
-
|
|
113
|
+
await g(async () => {
|
|
114
|
+
const i = await m();
|
|
115
|
+
l(r, i);
|
|
105
116
|
});
|
|
106
117
|
} };
|
|
107
118
|
};
|
|
108
119
|
export {
|
|
109
|
-
|
|
120
|
+
G as useStripo
|
|
110
121
|
};
|
|
@@ -1,23 +1,36 @@
|
|
|
1
|
-
import { usePartner as
|
|
2
|
-
import { LINK_REGEXES as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { usePartner as U } from "../../composables/usePartner.js";
|
|
2
|
+
import { LINK_REGEXES as l, LINK_TYPES as b, URLS as f } from "../../enums/unsubscribe.js";
|
|
3
|
+
import { parsePageList as B } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
|
|
4
|
+
import { useConfigStore as N } from "../../stores/config.js";
|
|
5
|
+
import { useUnsubscribeStore as I } from "../../stores/unsubscribe.js";
|
|
6
|
+
const T = [
|
|
5
7
|
{
|
|
6
8
|
id: "add-unsubscribe-link-values",
|
|
7
9
|
description: "Adding unsubscribe link values",
|
|
8
10
|
type: "custom",
|
|
9
|
-
processor: (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
processor: (t) => {
|
|
12
|
+
const { getPartnerName: i } = U(), a = N(), n = I(), u = a.getVariationId;
|
|
13
|
+
if (!u)
|
|
14
|
+
return t;
|
|
15
|
+
let o = t;
|
|
16
|
+
const e = `/${i()}/email/${u}?user={{iid}}`;
|
|
17
|
+
return new DOMParser().parseFromString(o, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]").forEach((p) => {
|
|
18
|
+
var g;
|
|
19
|
+
const d = p.getAttribute("data-unsubscribe-page-list");
|
|
20
|
+
if (!d)
|
|
21
|
+
return;
|
|
22
|
+
const S = B(d), m = ((g = n.templates) == null ? void 0 : g.filter(
|
|
23
|
+
(c) => S.includes(c.id)
|
|
24
|
+
)) ?? [], R = m.some((c) => c.type === b.UNSUBSCRIBE_LINK_TYPE), _ = m.some((c) => c.type === b.PREFERENCES_LINK_TYPE), E = p.outerHTML;
|
|
25
|
+
let s = E;
|
|
26
|
+
R && (s = s.replace(
|
|
27
|
+
l.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
28
|
+
f.UNSUBSCRIBE_URL + e
|
|
29
|
+
)), _ && (s = s.replace(
|
|
30
|
+
l.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
31
|
+
f.PREFERENCES_URL + e
|
|
32
|
+
)), s = s.replace(l.UNSUBSCRIBE_LINK_REGEX, ""), o = o.replace(E, s);
|
|
33
|
+
}), o;
|
|
21
34
|
},
|
|
22
35
|
priority: 60
|
|
23
36
|
},
|
|
@@ -25,7 +38,7 @@ const S = [
|
|
|
25
38
|
id: "remove-data-ogsb-button-styles",
|
|
26
39
|
description: "Removing styles like [data-ogsb] .es-button.es-button-123 { background: red; }",
|
|
27
40
|
type: "regex",
|
|
28
|
-
pattern:
|
|
41
|
+
pattern: l.DATA_OGSB_BUTTON_CSS_REGEX,
|
|
29
42
|
replacement: "",
|
|
30
43
|
flags: "g",
|
|
31
44
|
priority: 61
|
|
@@ -34,25 +47,25 @@ const S = [
|
|
|
34
47
|
id: "format-comment-braces",
|
|
35
48
|
description: "Adding spaces around comment braces for proper formatting",
|
|
36
49
|
type: "custom",
|
|
37
|
-
processor: (
|
|
50
|
+
processor: (t) => t.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
|
|
38
51
|
priority: 62
|
|
39
52
|
},
|
|
40
53
|
{
|
|
41
54
|
id: "add-universal-link-flags",
|
|
42
55
|
description: "Adding universal link flags",
|
|
43
56
|
type: "custom",
|
|
44
|
-
processor: (
|
|
45
|
-
let i =
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
if (
|
|
57
|
+
processor: (t) => {
|
|
58
|
+
let i = t;
|
|
59
|
+
const a = i.match(/<a[^>]+>(.*?)<\/a>/gm);
|
|
60
|
+
return a && a.forEach((n) => {
|
|
61
|
+
if (n.includes("insEmail=1"))
|
|
49
62
|
return;
|
|
50
|
-
if (
|
|
51
|
-
const o =
|
|
52
|
-
const
|
|
53
|
-
return
|
|
63
|
+
if (n.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
|
|
64
|
+
const o = n.replace(/href=(["'`”])(.*?)\1/gm, (e) => {
|
|
65
|
+
const r = e.slice(6, e.length - 1).trim();
|
|
66
|
+
return e.includes("?") || e.includes("#") ? r.slice(-1) === "&" ? e.replace(r, `${r}insEmail=1`) : e.replace(r, `${r}&insEmail=1`) : e.replace(r, `${r}?insEmail=1`);
|
|
54
67
|
});
|
|
55
|
-
i = i.replace(
|
|
68
|
+
i = i.replace(n, o);
|
|
56
69
|
}
|
|
57
70
|
}), i;
|
|
58
71
|
},
|
|
@@ -60,5 +73,5 @@ const S = [
|
|
|
60
73
|
}
|
|
61
74
|
];
|
|
62
75
|
export {
|
|
63
|
-
|
|
76
|
+
T as unsubscribeCompilerRules
|
|
64
77
|
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var k = Object.defineProperty;
|
|
2
|
+
var m = (o, t, e) => t in o ? k(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var x = (o, t, e) => m(o, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import h from "../../extensions/Blocks/CouponBlock/template.js";
|
|
5
|
+
class y {
|
|
6
|
+
constructor() {
|
|
7
|
+
x(this, "parser");
|
|
8
|
+
this.parser = new DOMParser();
|
|
9
|
+
}
|
|
10
|
+
migrate(t) {
|
|
11
|
+
try {
|
|
12
|
+
const e = this.parser.parseFromString(t, "text/html"), n = e.querySelectorAll("td.coupon-block.ins-coupon-code:not([esd-extension-block-id])");
|
|
13
|
+
return n.length === 0 ? t : (n.forEach((s) => {
|
|
14
|
+
const i = this.extractText(s), c = this.extractAttributes(s), l = h.replace("{@COUPON_CODE}", i).replace(
|
|
15
|
+
'class="coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block"',
|
|
16
|
+
c.class
|
|
17
|
+
).replace(
|
|
18
|
+
'esd-extension-block-id="coupon-block"',
|
|
19
|
+
`esd-extension-block-id="coupon-block"${c.block}`
|
|
20
|
+
).replace(
|
|
21
|
+
'<p class="ins-title"',
|
|
22
|
+
`<p class="ins-title"${c.text}`
|
|
23
|
+
);
|
|
24
|
+
s.outerHTML = l;
|
|
25
|
+
}), e.documentElement.outerHTML);
|
|
26
|
+
} catch (e) {
|
|
27
|
+
return console.error("CouponBlockMigrator failed:", e), t;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
extractText(t) {
|
|
31
|
+
var g;
|
|
32
|
+
const e = t.querySelector(".ins-title");
|
|
33
|
+
if (!e)
|
|
34
|
+
return "{@COUPON_CODE}";
|
|
35
|
+
const n = ((g = e.textContent) == null ? void 0 : g.trim()) || "{@COUPON_CODE}", s = e.getAttribute("style") || "", i = /font-weight\s*:\s*bold/i.test(s), c = /font-style\s*:\s*italic/i.test(s), l = /text-decoration[^;]*underline/i.test(s), u = /text-decoration[^;]*line-through/i.test(s), a = /vertical-align\s*:\s*sub/i.test(s), p = /vertical-align\s*:\s*super/i.test(s);
|
|
36
|
+
return [
|
|
37
|
+
[i, "strong"],
|
|
38
|
+
[c, "em"],
|
|
39
|
+
[l, "u"],
|
|
40
|
+
[u, "s"],
|
|
41
|
+
[a, "sub"],
|
|
42
|
+
[p, "sup"]
|
|
43
|
+
].reduce((b, [f, d]) => f ? `<${d}>${b}</${d}>` : b, n);
|
|
44
|
+
}
|
|
45
|
+
extractAttributes(t) {
|
|
46
|
+
const e = t.querySelector(".ins-title"), n = t.className.split(" ").filter((r) => r.startsWith("es-")), s = t.getAttribute("align"), i = t.getAttribute("bgcolor"), c = t.getAttribute("style"), l = e == null ? void 0 : e.getAttribute("style");
|
|
47
|
+
let u = 'class="coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block';
|
|
48
|
+
n.length && (u += ` ${n.join(" ")}`), u += '"';
|
|
49
|
+
let a = "";
|
|
50
|
+
if (s && (a += ` align="${s}"`), i && (a += ` bgcolor="${i}"`), c) {
|
|
51
|
+
const r = c.replace(/background-color[^;]+;?/gi, "").replace(/;+/g, ";").trim();
|
|
52
|
+
r && (a += ` style="${r.replace(/"/g, "'")}"`);
|
|
53
|
+
}
|
|
54
|
+
let p = "";
|
|
55
|
+
if (l) {
|
|
56
|
+
const r = l.replace(/"/g, '"').replace(/font-weight\s*:\s*[^;]+;?/gi, "").replace(/font-style\s*:\s*[^;]+;?/gi, "").replace(/text-decoration\s*:\s*[^;]+;?/gi, "").replace(/vertical-align\s*:\s*[^;]+;?/gi, "").replace(/;+/g, ";").replace(/^;|;$/g, "").trim().replace(/"/g, "'");
|
|
57
|
+
r && (p = ` style="${r}"`);
|
|
58
|
+
}
|
|
59
|
+
return { class: u, block: a, text: p };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function C(o) {
|
|
63
|
+
return new y().migrate(o);
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
C as migrateCouponBlock
|
|
67
|
+
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { migrateCheckbox as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { migrateCheckbox as m } from "./checkboxMigrator.js";
|
|
2
|
+
import { migrateCouponBlock as o } from "./couponBlockMigrator.js";
|
|
3
|
+
import { migrateRadioButton as i } from "./radioButtonMigrator.js";
|
|
4
|
+
import { migrateRecommendation as e } from "./recommendationMigrator.js";
|
|
5
|
+
import { migrateUnsubscribe as a } from "./unsubscribeMigrator.js";
|
|
6
|
+
const s = async (t) => {
|
|
7
|
+
let r = t;
|
|
8
|
+
return r = m(r), r = i(r), r = await a(r), r = o(r), r = e(r), r;
|
|
6
9
|
};
|
|
7
10
|
export {
|
|
8
|
-
|
|
11
|
+
s as migrate
|
|
9
12
|
};
|