@useinsider/guido 1.0.3-beta.9dbb968 → 1.0.3-beta.9f7b494
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -3
- package/dist/components/Guido.vue.js +11 -9
- package/dist/components/Guido.vue2.js +73 -65
- 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/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -15
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/components/organisms/header/RightSlot.vue2.js +23 -22
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +30 -17
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -10
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +19 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +15 -14
- package/dist/composables/useBlocksConfig.js +49 -0
- package/dist/composables/useGuidoActions.js +19 -9
- package/dist/composables/useStripo.js +48 -52
- package/dist/config/compiler/unsubscribeCompilerRules.js +41 -33
- package/dist/config/migrator/couponBlockMigrator.js +67 -0
- package/dist/config/migrator/index.js +7 -5
- package/dist/config/migrator/recommendationMigrator.js +293 -0
- package/dist/config/migrator/unsubscribeMigrator.js +61 -49
- package/dist/enums/date.js +6 -0
- package/dist/enums/defaults.js +16 -8
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/enums/onboarding.js +2 -1
- package/dist/enums/unsubscribe.js +29 -23
- package/dist/extensions/Blocks/Checkbox/control.js +55 -53
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- 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/control.js +44 -42
- package/dist/extensions/Blocks/RadioButton/template.js +6 -6
- package/dist/extensions/Blocks/Recommendation/block.js +30 -0
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +103 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +5 -0
- package/dist/extensions/Blocks/Recommendation/control.js +306 -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/templates/blockTemplate.js +160 -0
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +152 -0
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +180 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
- package/dist/extensions/Blocks/common-control.js +184 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +25 -19
- package/dist/extensions/DynamicContent/dynamic-content.js +128 -33
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +311 -93
- package/dist/package.json.js +7 -0
- package/dist/services/recommendationApi.js +43 -0
- package/dist/services/stripoApi.js +1 -1
- package/dist/src/@types/generic.d.ts +98 -0
- package/dist/{components → src/components}/Guido.vue.d.ts +4 -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/NewVersionPopup.vue.d.ts +4 -0
- package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +4 -0
- package/dist/src/composables/useBlocksConfig.d.ts +11 -0
- package/dist/{composables → src/composables}/useGuidoActions.d.ts +9 -0
- package/dist/src/config/migrator/couponBlockMigrator.d.ts +1 -0
- package/dist/src/config/migrator/recommendationMigrator.d.ts +1 -0
- package/dist/src/enums/date.d.ts +4 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/src/enums/onboarding.d.ts +2 -0
- package/dist/{enums → src/enums}/unsubscribe.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/src/extensions/Blocks/Recommendation/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +28 -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/templates/blockTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +44 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
- package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +2 -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/dynamic-content-modal.d.ts +13 -0
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +66 -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/stores/config.d.ts +104 -0
- package/dist/{stores → src/stores}/dynamic-content.d.ts +3 -3
- package/dist/{stores → src/stores}/editor.d.ts +22 -1
- package/dist/{stores → src/stores}/onboarding.d.ts +1 -1
- package/dist/{stores → src/stores}/preview.d.ts +1 -1
- package/dist/{stores → src/stores}/recommendation.d.ts +1 -1
- package/dist/{stores → src/stores}/save-as-template.d.ts +1 -1
- package/dist/{stores → src/stores}/toaster.d.ts +1 -1
- package/dist/{stores → src/stores}/unsubscribe.d.ts +1 -1
- package/dist/{stores → src/stores}/version-history.d.ts +1 -1
- package/dist/src/utils/dateUtil.d.ts +22 -0
- package/dist/src/utils/environmentUtil.d.ts +5 -0
- package/dist/{utils → src/utils}/genericUtil.d.ts +2 -0
- package/dist/static/styles/components/narrow-panel.css.js +10 -0
- package/dist/static/styles/customEditorStyle.css.js +5 -0
- package/dist/stores/config.js +17 -0
- package/dist/stores/dynamic-content.js +2 -2
- package/dist/stores/editor.js +3 -2
- package/dist/stores/onboarding.js +27 -27
- package/dist/stores/preview.js +1 -1
- package/dist/stores/recommendation.js +3 -3
- package/dist/stores/save-as-template.js +2 -2
- package/dist/stores/toaster.js +1 -1
- package/dist/stores/unsubscribe.js +1 -1
- package/dist/stores/version-history.js +4 -4
- package/dist/utils/dateUtil.js +24 -3
- package/dist/utils/environmentUtil.js +4 -0
- package/dist/utils/genericUtil.js +23 -11
- package/package.json +9 -4
- package/dist/@types/generic.d.ts +0 -57
- package/dist/enums/onboarding.d.ts +0 -1
- package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
- package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
- package/dist/utils/dateUtil.d.ts +0 -1
- 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 → src/components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -0
- package/dist/{components → src/components}/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -0
- package/dist/{components → src/components}/wrappers/WpDrawer.vue.d.ts +0 -0
- package/dist/{components → src/components}/wrappers/WpModal.vue.d.ts +1 -1
- /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}/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/index.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/unsubscribeMigrator.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}/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/block.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/iconsRegistry.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/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/control.d.ts +0 -0
- /package/dist/{extensions/Blocks/Unsubscribe → src/extensions/Blocks/RadioButton}/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/iconsRegistry.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/Blocks/_Boilerplate → src/extensions/Blocks/Recommendation}/extension.d.ts +0 -0
- /package/dist/{extensions/Blocks/Unsubscribe → src/extensions/Blocks/Recommendation}/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/elements/preview.d.ts +0 -0
- /package/dist/{extensions/DynamicContent → src/extensions/Blocks/Unsubscribe}/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Unsubscribe}/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/tagRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/utils/constants.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Unsubscribe/utils/utils.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/template.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/{services → src/services}/unsubscribeApi.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}/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
|
@@ -1,37 +1,49 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { MERGE_TAGS as
|
|
5
|
-
import { DATA_ATTRIBUTES as
|
|
6
|
-
import { useUnsubscribeStore as
|
|
7
|
-
class
|
|
1
|
+
var h = Object.defineProperty;
|
|
2
|
+
var x = (l, e, t) => e in l ? h(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
|
|
3
|
+
var S = (l, e, t) => x(l, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { MERGE_TAGS as k, PAGE_TYPES as p } from "../../enums/unsubscribe.js";
|
|
5
|
+
import { DATA_ATTRIBUTES as A } from "../../extensions/Blocks/Unsubscribe/utils/constants.js";
|
|
6
|
+
import { useUnsubscribeStore as T } from "../../stores/unsubscribe.js";
|
|
7
|
+
class C {
|
|
8
8
|
constructor() {
|
|
9
|
-
|
|
9
|
+
S(this, "parser");
|
|
10
10
|
this.parser = new DOMParser();
|
|
11
11
|
}
|
|
12
12
|
async migrate(e) {
|
|
13
13
|
try {
|
|
14
|
-
const t = this.parser.parseFromString(e, "text/html"),
|
|
15
|
-
if (!
|
|
14
|
+
const t = this.parser.parseFromString(e, "text/html"), i = t.querySelectorAll("td.unsubscribe-block");
|
|
15
|
+
if (!i.length)
|
|
16
16
|
return e;
|
|
17
|
-
const
|
|
18
|
-
return await
|
|
19
|
-
const
|
|
17
|
+
const o = T();
|
|
18
|
+
return await o.fetchTemplates(), i.forEach((r) => {
|
|
19
|
+
const c = r.getAttribute("id"), g = this.extractPaddingClass(r), u = r.getAttribute("bgcolor") || "", n = this.extractUnsubscribeContent(r), s = this.getCollectionTypeFromMergeTag(n.linkHref), b = o.getSelectedUnsubscribePagesByCollection(s);
|
|
20
20
|
console.debug("[UnsubscribeMigrator]", {
|
|
21
21
|
mergeTag: n.linkHref,
|
|
22
|
-
collectionType:
|
|
23
|
-
pageIds:
|
|
22
|
+
collectionType: s,
|
|
23
|
+
pageIds: b,
|
|
24
|
+
paddingClass: g,
|
|
25
|
+
bgColor: u
|
|
24
26
|
});
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
+
const f = this.buildUnsubscribeBlock(
|
|
28
|
+
n,
|
|
29
|
+
s,
|
|
30
|
+
b,
|
|
31
|
+
g,
|
|
32
|
+
u
|
|
33
|
+
), a = this.parser.parseFromString(
|
|
34
|
+
`<table id="tempDoc"><tbody><tr>${f}</tr></tbody></table>`,
|
|
27
35
|
"text/html"
|
|
28
36
|
).querySelector(".unsubscribe-block-v2");
|
|
29
|
-
|
|
37
|
+
a && r.parentNode && (a.setAttribute("id", c || ""), r.parentNode.replaceChild(a, r));
|
|
30
38
|
}), t.documentElement.outerHTML;
|
|
31
39
|
} catch (t) {
|
|
32
40
|
return console.error("UnsubscribeMigrator failed:", t), e;
|
|
33
41
|
}
|
|
34
42
|
}
|
|
43
|
+
extractPaddingClass(e) {
|
|
44
|
+
const i = (e.getAttribute("class") || "").match(/\bes-p\d+\b/);
|
|
45
|
+
return i ? i[0] : "";
|
|
46
|
+
}
|
|
35
47
|
extractUnsubscribeContent(e) {
|
|
36
48
|
var m;
|
|
37
49
|
const t = e.querySelector("p");
|
|
@@ -47,8 +59,8 @@ class h {
|
|
|
47
59
|
align: "center",
|
|
48
60
|
paragraphStyle: ""
|
|
49
61
|
};
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
62
|
+
const i = e.getAttribute("align") || t.getAttribute("align") || "center", o = t.getAttribute("style") || "", r = t.querySelector("a.unsubscribe-link") || t.querySelector('a[href*="unsubscribe"]');
|
|
63
|
+
if (!r)
|
|
52
64
|
return {
|
|
53
65
|
textBefore: "You can ",
|
|
54
66
|
linkText: "unsubscribe",
|
|
@@ -57,56 +69,56 @@ class h {
|
|
|
57
69
|
textAfter: " from our emails, if you need to.",
|
|
58
70
|
isBold: !1,
|
|
59
71
|
isItalic: !1,
|
|
60
|
-
align:
|
|
61
|
-
paragraphStyle:
|
|
72
|
+
align: i,
|
|
73
|
+
paragraphStyle: o
|
|
62
74
|
};
|
|
63
|
-
const
|
|
75
|
+
const c = ((m = r.textContent) == null ? void 0 : m.trim()) || "unsubscribe", g = r.getAttribute("href") || "{{ins-unsubscribe-link}}", u = r.getAttribute("style") || "", n = t.textContent || "", s = n.indexOf(c), b = s >= 0 ? n.substring(0, s).trim() : "You can ", f = s >= 0 ? n.substring(s + c.length).trim() : " from our emails, if you need to.", d = !!t.querySelector("b, strong"), a = !!t.querySelector("i, em");
|
|
64
76
|
return {
|
|
65
|
-
textBefore:
|
|
66
|
-
linkText:
|
|
67
|
-
linkHref: this.normalizeUnsubscribeHref(
|
|
68
|
-
linkStyle:
|
|
69
|
-
textAfter:
|
|
70
|
-
isBold:
|
|
71
|
-
isItalic:
|
|
72
|
-
align:
|
|
73
|
-
paragraphStyle:
|
|
77
|
+
textBefore: b,
|
|
78
|
+
linkText: c,
|
|
79
|
+
linkHref: this.normalizeUnsubscribeHref(g),
|
|
80
|
+
linkStyle: u,
|
|
81
|
+
textAfter: f,
|
|
82
|
+
isBold: d,
|
|
83
|
+
isItalic: a,
|
|
84
|
+
align: i,
|
|
85
|
+
paragraphStyle: o
|
|
74
86
|
};
|
|
75
87
|
}
|
|
76
|
-
buildUnsubscribeBlock(e, t,
|
|
77
|
-
const
|
|
78
|
-
e.textBefore && n.push(e.textBefore), n.push(
|
|
79
|
-
let
|
|
80
|
-
e.isBold && e.isItalic ?
|
|
81
|
-
const
|
|
88
|
+
buildUnsubscribeBlock(e, t, i, o, r) {
|
|
89
|
+
const c = e.linkStyle ? ` style="${e.linkStyle}"` : "", u = `<a ${`href="${e.linkHref}" class="unsubscribe-link" target="_blank" data-unsubscribe-link="true"`}${c}>${e.linkText}</a>`, n = [];
|
|
90
|
+
e.textBefore && n.push(e.textBefore), n.push(u), e.textAfter && n.push(e.textAfter);
|
|
91
|
+
let s = n.join(" ");
|
|
92
|
+
e.isBold && e.isItalic ? s = `<strong path="1,0"><em path="1,0,0">${s}</em></strong>` : e.isBold ? s = `<strong path="1,0">${s}</strong>` : e.isItalic && (s = `<em path="1,0">${s}</em>`);
|
|
93
|
+
const b = e.align ? ` align="${e.align}"` : "", f = r ? ` bgcolor="${r}"` : "", d = e.paragraphStyle ? ` style="${e.paragraphStyle}"` : "", a = i.length > 0 ? ` ${A.PAGE_LIST}="${i.join(",")}"` : "", m = ` ${A.PAGE_TYPE}="${t}"`, y = "esd-block-text unsubscribe-block-v2 esd-block-unsubscribe esd-unsubscribe-block esd-extension-block";
|
|
82
94
|
return `
|
|
83
95
|
<td
|
|
84
96
|
data-migration="true"
|
|
85
97
|
esd-extension-block-id="unsubscribe-block"
|
|
86
|
-
class="
|
|
87
|
-
${
|
|
98
|
+
class="${o ? `${y} ${o}` : y}"
|
|
99
|
+
${b}${f}${m}${a}
|
|
88
100
|
>
|
|
89
|
-
<p path="1"${
|
|
90
|
-
${
|
|
101
|
+
<p path="1"${d}>
|
|
102
|
+
${s}
|
|
91
103
|
</p>
|
|
92
104
|
</td>
|
|
93
105
|
`;
|
|
94
106
|
}
|
|
95
107
|
getCollectionTypeFromMergeTag(e) {
|
|
96
|
-
return e === p
|
|
108
|
+
return e === k[p.SUBSCRIPTION_PREFERENCE_CENTER] ? p.SUBSCRIPTION_PREFERENCE_CENTER : e === k[p.GLOBAL_UNSUBSCRIBE] ? p.GLOBAL_UNSUBSCRIBE : p.GLOBAL_UNSUBSCRIBE;
|
|
97
109
|
}
|
|
98
110
|
normalizeUnsubscribeHref(e) {
|
|
99
|
-
if (Object.values(
|
|
111
|
+
if (Object.values(k).includes(e))
|
|
100
112
|
return e;
|
|
101
|
-
const
|
|
102
|
-
return
|
|
113
|
+
const i = e.match(/{{ins-(?:global-)?(?:preferences-)?unsubscribe-link}}/);
|
|
114
|
+
return i ? i[0] : e.includes("unsubscribe") || e.includes("unsub") ? (console.warn(
|
|
103
115
|
`[UnsubscribeMigrator] Unrecognized unsubscribe href format: "${e}". Defaulting to {{ins-unsubscribe-link}}`
|
|
104
116
|
), "{{ins-unsubscribe-link}}") : e;
|
|
105
117
|
}
|
|
106
118
|
}
|
|
107
|
-
async function
|
|
108
|
-
return new
|
|
119
|
+
async function M(l) {
|
|
120
|
+
return new C().migrate(l);
|
|
109
121
|
}
|
|
110
122
|
export {
|
|
111
|
-
|
|
123
|
+
M as migrateUnsubscribe
|
|
112
124
|
};
|
package/dist/enums/defaults.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
translationsPath: "window.trans.en",
|
|
3
|
+
migrationDate: 1759696858,
|
|
3
4
|
emailHeader: {
|
|
4
5
|
senderName: "",
|
|
5
6
|
subject: ""
|
|
@@ -7,18 +8,25 @@ const a = {
|
|
|
7
8
|
extensions: {
|
|
8
9
|
unsubscribe: !0
|
|
9
10
|
},
|
|
11
|
+
blocks: {
|
|
12
|
+
excludeDefaults: [],
|
|
13
|
+
includeCustoms: []
|
|
14
|
+
},
|
|
10
15
|
features: {
|
|
11
16
|
dynamicContent: !0,
|
|
12
17
|
saveAsTemplate: !0,
|
|
13
|
-
versionHistory: !0
|
|
18
|
+
versionHistory: !0,
|
|
19
|
+
testMessage: !0,
|
|
20
|
+
displayConditions: !0
|
|
14
21
|
},
|
|
15
22
|
useHeader: !0
|
|
16
23
|
}, t = {
|
|
17
24
|
promotional: 1,
|
|
18
25
|
transactional: 2
|
|
19
|
-
},
|
|
26
|
+
}, a = "email", o = "Guido User", s = t.promotional, n = 2, i = {
|
|
20
27
|
email: 60,
|
|
21
|
-
architect: 49
|
|
28
|
+
architect: 49,
|
|
29
|
+
unsubscribePages: 97
|
|
22
30
|
}, u = [
|
|
23
31
|
"alfredtesting",
|
|
24
32
|
"electio",
|
|
@@ -52,11 +60,11 @@ const a = {
|
|
|
52
60
|
"stripoeditorlivetest"
|
|
53
61
|
];
|
|
54
62
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
e as DefaultGuidoConfig,
|
|
64
|
+
s as DefaultMessageType,
|
|
65
|
+
a as DefaultProductType,
|
|
58
66
|
o as DefaultUsername,
|
|
59
|
-
|
|
67
|
+
n as EditorType,
|
|
60
68
|
i as ProductIds,
|
|
61
69
|
u as TEST_PARTNER_LIST,
|
|
62
70
|
t as TemplateTypes
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
RECOMMENDATION_API_URL: "http://recommendationv2.api.useinsider.com"
|
|
3
|
+
}, i = [
|
|
4
|
+
{ id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
|
|
5
|
+
{ id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
|
|
6
|
+
{ id: 13, key: "userBased", name: "User Based", path: "user-based" },
|
|
7
|
+
{ id: 36, key: "highestDiscounted", name: "Highest Discounted Items", path: "highest-discounted" },
|
|
8
|
+
{ id: 38, key: "manualMerchandising", name: "Manual Merchandising", path: "manual-merchandising" },
|
|
9
|
+
{ id: 39, key: "newArrivals", name: "New Arrivals", path: "new-arrivals" },
|
|
10
|
+
{ id: 40, key: "trendingProducts", name: "Trending Products", path: "trending" },
|
|
11
|
+
{ id: 46, key: "mostValuableOfPartner", name: "Most Valuable Products", path: "most-valuable" },
|
|
12
|
+
{ id: 61, key: "mostPopular", name: "Most Popular Items", path: "most-popular" },
|
|
13
|
+
{ id: 62, key: "mostPurchased", name: "Top Sellers", path: "top-sellers" }
|
|
14
|
+
], u = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], l = [
|
|
15
|
+
{ text: "after the amount", value: "1" },
|
|
16
|
+
{ text: "before the amount", value: "0" }
|
|
17
|
+
], c = [
|
|
18
|
+
{ text: "dot(.)", value: "." },
|
|
19
|
+
{ text: "comma(,)", value: "," }
|
|
20
|
+
], d = [
|
|
21
|
+
{ text: "0", value: "0" },
|
|
22
|
+
{ text: "1", value: "1" },
|
|
23
|
+
{ text: "2", value: "2" },
|
|
24
|
+
{ text: "3", value: "3" },
|
|
25
|
+
{ text: "4", value: "4" },
|
|
26
|
+
{ text: "5", value: "5" }
|
|
27
|
+
], e = [
|
|
28
|
+
{ text: "is exactly", value: "=" },
|
|
29
|
+
{ text: "contains", value: "~" },
|
|
30
|
+
{ text: "does not contain", value: "!~" },
|
|
31
|
+
{ text: "any of", value: "||" }
|
|
32
|
+
], a = [
|
|
33
|
+
{ text: "is exactly", value: "=" },
|
|
34
|
+
{ text: "is not exactly", value: "!==" },
|
|
35
|
+
{ text: "contains", value: "~" },
|
|
36
|
+
{ text: "does not contain", value: "!~" },
|
|
37
|
+
{ text: "any of", value: "||" }
|
|
38
|
+
], r = [
|
|
39
|
+
{ text: "is equal to", value: "=" },
|
|
40
|
+
{ text: "is greater than", value: ">" },
|
|
41
|
+
{ text: "is less than", value: "<" }
|
|
42
|
+
], o = [
|
|
43
|
+
{ text: "is equal to", value: "=" },
|
|
44
|
+
{ text: "after", value: ">" },
|
|
45
|
+
{ text: "before", value: "<" }
|
|
46
|
+
], n = [
|
|
47
|
+
{ text: "true", value: "==" },
|
|
48
|
+
{ text: "false", value: "!=" }
|
|
49
|
+
], p = (t) => {
|
|
50
|
+
if (!t)
|
|
51
|
+
return e;
|
|
52
|
+
switch (t) {
|
|
53
|
+
case "Boolean":
|
|
54
|
+
return n;
|
|
55
|
+
case "Date":
|
|
56
|
+
return o;
|
|
57
|
+
case "Number":
|
|
58
|
+
return r;
|
|
59
|
+
case "String":
|
|
60
|
+
return e;
|
|
61
|
+
case "Strings":
|
|
62
|
+
return a;
|
|
63
|
+
default:
|
|
64
|
+
return e;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
u as PriceAttributes,
|
|
69
|
+
i as RecommendationFeedSourceMaps,
|
|
70
|
+
s as URLS,
|
|
71
|
+
d as currencyDecimalCounts,
|
|
72
|
+
l as currencyLocationMaps,
|
|
73
|
+
c as currencyOperators,
|
|
74
|
+
p as getOperatorOptions,
|
|
75
|
+
a as operatorOptionsForArrayOfStrings,
|
|
76
|
+
n as operatorOptionsForBooleans,
|
|
77
|
+
o as operatorOptionsForDates,
|
|
78
|
+
r as operatorOptionsForNumbers,
|
|
79
|
+
e as operatorOptionsForStrings
|
|
80
|
+
};
|
package/dist/enums/onboarding.js
CHANGED
|
@@ -2,7 +2,8 @@ const e = [
|
|
|
2
2
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
|
|
3
3
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
|
|
4
4
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
|
|
5
|
-
];
|
|
5
|
+
], t = "https://academy.useinsider.com/docs/email-drag-drop-editor";
|
|
6
6
|
export {
|
|
7
|
+
t as ACADEMY_LINK,
|
|
7
8
|
e as SERVICE_HOVER_SELECTORS
|
|
8
9
|
};
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import { useTranslations as
|
|
2
|
-
|
|
1
|
+
import { useTranslations as n } from "../composables/useTranslations.js";
|
|
2
|
+
import { getEnvironmentPrefix as R } from "../utils/environmentUtil.js";
|
|
3
|
+
const e = n(), I = {
|
|
3
4
|
UNSUBSCRIBE_LINK_TYPE: 1,
|
|
4
5
|
PREFERENCES_LINK_TYPE: 3
|
|
5
|
-
},
|
|
6
|
+
}, r = {
|
|
6
7
|
UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
|
|
7
8
|
DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
|
|
8
9
|
GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
|
|
9
10
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
|
|
10
|
-
},
|
|
11
|
-
UNSUBSCRIBE_URL:
|
|
12
|
-
PREFERENCES_URL:
|
|
13
|
-
},
|
|
11
|
+
}, s = R(), _ = {
|
|
12
|
+
UNSUBSCRIBE_URL: `https://mail.${s}.com/user/v1/unsub`,
|
|
13
|
+
PREFERENCES_URL: `https://mail.${s}.com/user/v1/prefs`
|
|
14
|
+
}, i = "iid", B = {
|
|
15
|
+
name: "Global Unsubscribe",
|
|
16
|
+
sendGridId: "G"
|
|
17
|
+
}, C = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", c = "/email/unsubscribe-pages", E = {
|
|
14
18
|
GLOBAL_UNSUBSCRIBE: 1,
|
|
15
19
|
GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
|
|
16
20
|
SUBSCRIPTION_PREFERENCE_CENTER: 3,
|
|
17
21
|
SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
|
|
18
22
|
RESUBSCRIBE: 5
|
|
19
|
-
},
|
|
23
|
+
}, t = {
|
|
20
24
|
[E.GLOBAL_UNSUBSCRIBE]: [
|
|
21
25
|
E.GLOBAL_UNSUBSCRIBE,
|
|
22
26
|
E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
|
|
@@ -26,25 +30,27 @@ const s = e(), n = {
|
|
|
26
30
|
E.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
27
31
|
E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
|
|
28
32
|
]
|
|
29
|
-
},
|
|
30
|
-
[E.GLOBAL_UNSUBSCRIBE]:
|
|
31
|
-
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]:
|
|
32
|
-
[E.RESUBSCRIBE]:
|
|
33
|
-
[E.SUBSCRIPTION_PREFERENCE_CENTER]:
|
|
34
|
-
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]:
|
|
35
|
-
},
|
|
33
|
+
}, U = {
|
|
34
|
+
[E.GLOBAL_UNSUBSCRIBE]: e("unsubscription-preference.type-global-unsubscribe"),
|
|
35
|
+
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: e("unsubscription-preference.type-global-unsubscription-confirmation"),
|
|
36
|
+
[E.RESUBSCRIBE]: e("unsubscription-preference.type-resubscribe"),
|
|
37
|
+
[E.SUBSCRIPTION_PREFERENCE_CENTER]: e("unsubscription-preference.type-subscription-preferences-center"),
|
|
38
|
+
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: e("unsubscription-preference.type-subscription-preferences-confirmation")
|
|
39
|
+
}, o = {
|
|
36
40
|
default: "{{ins-unsubscribe-link}}",
|
|
37
41
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
38
42
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
39
43
|
};
|
|
40
44
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
C as ACADEMY_LINK,
|
|
46
|
+
B as DEFAULT_UNSUBSCRIBE_GROUP,
|
|
47
|
+
i as INSIDER_ID,
|
|
48
|
+
r as LINK_REGEXES,
|
|
49
|
+
I as LINK_TYPES,
|
|
50
|
+
o as MERGE_TAGS,
|
|
45
51
|
E as PAGE_TYPES,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
t as TYPE_COLLECTIONS,
|
|
53
|
+
U as TYPE_TRANSLATIONS,
|
|
54
|
+
c as UNSUBSCRIBE_PAGES_LINK,
|
|
55
|
+
_ as URLS
|
|
50
56
|
};
|
|
@@ -1,90 +1,92 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { useHttp as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var l = (r, n, e) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
|
|
3
|
+
var o = (r, n, e) => l(r, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { useHttp as L } from "../../../composables/useHttp.js";
|
|
5
|
+
import { DEFAULT_UNSUBSCRIBE_GROUP as u } from "../../../enums/unsubscribe.js";
|
|
6
|
+
import { Control as h, UIElementType as i, UEAttr as t, ModificationDescription as p } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
+
const m = "ui-elements-checkbox", a = "select", { get: C } = L();
|
|
8
|
+
class S extends h {
|
|
8
9
|
constructor() {
|
|
9
10
|
super(...arguments);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
o(this, "currentNode");
|
|
12
|
+
o(this, "selectedUnsubGroup");
|
|
13
|
+
o(this, "unsubList", []);
|
|
13
14
|
}
|
|
14
15
|
getId() {
|
|
15
|
-
return
|
|
16
|
+
return m;
|
|
16
17
|
}
|
|
17
18
|
_setFormValues() {
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
if (this.currentNode && "getAttribute" in this.currentNode) {
|
|
20
|
+
const e = this.currentNode.getAttribute("id");
|
|
21
|
+
if (e) {
|
|
22
|
+
const s = e === u.sendGridId ? e : Number(e);
|
|
23
|
+
s && (this.selectedUnsubGroup = s, this.api.updateValues({
|
|
24
|
+
[a]: this.selectedUnsubGroup
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
21
28
|
}
|
|
22
|
-
_getLabel(
|
|
29
|
+
_getLabel(e, s = `${Math.random()}`) {
|
|
23
30
|
return `
|
|
24
|
-
<${
|
|
25
|
-
${
|
|
26
|
-
${
|
|
27
|
-
</${
|
|
31
|
+
<${i.LABEL}
|
|
32
|
+
${t.LABEL.text}="${e}"
|
|
33
|
+
${t.LABEL.name}="${s}">
|
|
34
|
+
</${i.LABEL}>
|
|
28
35
|
`;
|
|
29
36
|
}
|
|
30
|
-
_getSelectItem(
|
|
37
|
+
_getSelectItem(e, s) {
|
|
31
38
|
return `
|
|
32
|
-
<${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
35
|
-
</${
|
|
39
|
+
<${i.SELECT_ITEM}
|
|
40
|
+
${t.SELECT_ITEM.text}="${e}"
|
|
41
|
+
${t.SELECT_ITEM.value}="${s}">
|
|
42
|
+
</${i.SELECT_ITEM}>`;
|
|
36
43
|
}
|
|
37
44
|
_getSelect() {
|
|
38
|
-
return this.unsubList.map((
|
|
45
|
+
return this.unsubList.map((e) => this._getSelectItem(e.name, e.sendGridId)).join("");
|
|
39
46
|
}
|
|
40
47
|
getTemplate() {
|
|
41
48
|
return `
|
|
42
49
|
<div class="checkbox-controls-container">
|
|
43
50
|
<div class="checkbox-select-container container two-columns stretch">
|
|
44
|
-
<${
|
|
45
|
-
${
|
|
46
|
-
${
|
|
47
|
-
</${
|
|
51
|
+
<${i.LABEL}
|
|
52
|
+
${t.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
|
|
53
|
+
${t.LABEL.name}="${Math.random()}">
|
|
54
|
+
</${i.LABEL}>
|
|
48
55
|
|
|
49
|
-
<${
|
|
50
|
-
${
|
|
51
|
-
${
|
|
56
|
+
<${i.SELECTPICKER}
|
|
57
|
+
${t.SELECTPICKER.name}="${a}"
|
|
58
|
+
${t.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
|
|
52
59
|
${this._getSelect()}
|
|
53
|
-
</${
|
|
60
|
+
</${i.SELECTPICKER}>
|
|
54
61
|
</div>
|
|
55
62
|
</div>
|
|
56
63
|
`;
|
|
57
64
|
}
|
|
58
|
-
_onSelectChange(
|
|
59
|
-
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id",
|
|
65
|
+
_onSelectChange(e) {
|
|
66
|
+
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new p(`Updated text to ${e}`));
|
|
60
67
|
}
|
|
61
68
|
_listenToFormUpdates() {
|
|
62
|
-
this.api.onValueChanged(
|
|
69
|
+
this.api.onValueChanged(a, (e) => this._onSelectChange(e));
|
|
63
70
|
}
|
|
64
|
-
onTemplateNodeUpdated(
|
|
65
|
-
|
|
66
|
-
const i = Number(t.getAttribute("id"));
|
|
67
|
-
i && (this.selectedUnsubGroup = i, this.api.updateValues({
|
|
68
|
-
[o]: this.selectedUnsubGroup
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
+
onTemplateNodeUpdated(e) {
|
|
72
|
+
this.currentNode = e;
|
|
71
73
|
}
|
|
72
74
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
73
75
|
async onRender() {
|
|
74
|
-
const
|
|
76
|
+
const e = await C(
|
|
75
77
|
"/unsubscribe-groups/unsubscribe-list"
|
|
76
|
-
),
|
|
77
|
-
[
|
|
78
|
-
[
|
|
78
|
+
), s = [u, ...e.data], E = s.map((c) => ({
|
|
79
|
+
[t.SELECT_ITEM.text]: c.name,
|
|
80
|
+
[t.SELECT_ITEM.value]: c.sendGridId
|
|
79
81
|
}));
|
|
80
|
-
this.unsubList =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
this.unsubList = s, this.api.setUIEAttribute(
|
|
83
|
+
a,
|
|
84
|
+
t.SELECTPICKER.items,
|
|
85
|
+
E
|
|
84
86
|
), this._setFormValues(), this._listenToFormUpdates();
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
export {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
m as CHECKBOX_CONTROL_BLOCK_ID,
|
|
91
|
+
S as CheckboxControl
|
|
90
92
|
};
|
|
@@ -3,7 +3,7 @@ import { CheckboxBlock as t } from "./block.js";
|
|
|
3
3
|
import { CheckboxControl as e } from "./control.js";
|
|
4
4
|
import { CheckboxIconsRegistry as r } from "./iconsRegistry.js";
|
|
5
5
|
import { CheckboxBlockSettings as i } from "./settingsPanel.js";
|
|
6
|
-
const
|
|
6
|
+
const d = new o().addBlock(t).withSettingsPanelRegistry(i).addControl(e).withIconsRegistry(r).build();
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
d as default
|
|
9
9
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Block as o, BlockCompositionType as e, BlockType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { getDefaultTemplate as r } from "./template.js";
|
|
3
|
+
const n = "coupon-block";
|
|
4
|
+
class s extends o {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
getId() {
|
|
9
|
+
return n;
|
|
10
|
+
}
|
|
11
|
+
getIcon() {
|
|
12
|
+
return "coupon-icon";
|
|
13
|
+
}
|
|
14
|
+
getBlockCompositionType() {
|
|
15
|
+
return e.BLOCK;
|
|
16
|
+
}
|
|
17
|
+
getName() {
|
|
18
|
+
return this.api.translate("Coupon Block");
|
|
19
|
+
}
|
|
20
|
+
getDescription() {
|
|
21
|
+
return this.api.translate("Coupon lets you add a coupon code to your message design.");
|
|
22
|
+
}
|
|
23
|
+
getBlockType() {
|
|
24
|
+
return t.BLOCK_TEXT;
|
|
25
|
+
}
|
|
26
|
+
getTemplate() {
|
|
27
|
+
return r();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
n as COUPON_BLOCK_ID,
|
|
32
|
+
s as CouponBlock
|
|
33
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { CouponBlock as t } from "./block.js";
|
|
3
|
+
import { CouponIconsRegistry as i } from "./iconsRegistry.js";
|
|
4
|
+
import { CouponBlockSettings as n } from "./settingsPanel.js";
|
|
5
|
+
const p = new o().addBlock(t).withSettingsPanelRegistry(n).withIconsRegistry(i).build();
|
|
6
|
+
export {
|
|
7
|
+
p as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IconsRegistry as L } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
class t extends L {
|
|
3
|
+
registerIconsSvg(C) {
|
|
4
|
+
C["coupon-icon"] = `
|
|
5
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<path d="M7.87939 0C8.56714 0.0576002 9.26998 0.793636 9.82275 1.37305L9.83057
|
|
7
|
+
1.38184C9.93483 1.49112 10.0343 1.5944 10.1265 1.68652L17.2573 8.79492C18.2493
|
|
8
|
+
9.7872 18.2493 11.3954 17.2573 12.3877L12.396 17.2471C11.9169 17.726 11.2659 17.9999
|
|
9
|
+
10.6157 18C9.96563 17.9999 9.31551 17.76 8.83643 17.2471L1.68896 10.1221C1.58907 10.0222
|
|
10
|
+
1.47548 9.91523 1.35596 9.80273C0.77939 9.26006 0.0584135 8.58144 0.00146484 7.87305L0.00439453
|
|
11
|
+
2.15625C-0.0298299 1.57462 0.209988 1.02683 0.620605 0.616211C1.03135 0.20572 1.57981 0 2.16162
|
|
12
|
+
0L7.87939 0ZM2.16162 2C2.10648 2 2.07333 2.01007 2.05908 2.01562C2.04707 2.02035 2.04069 2.02432
|
|
13
|
+
2.03467 2.03027C2.01884 2.04611 2.00915 2.05957 2.00342 2.06836L2.00439 2.09766L2.00146 7.59277C2.01413
|
|
14
|
+
7.61029 2.02975 7.63092 2.04834 7.6543C2.20264 7.84819 2.41884 8.05659 2.72705 8.34668L2.73682
|
|
15
|
+
8.35645C2.84844 8.46149 2.9808 8.58586 3.10205 8.70703L3.10303 8.70801L10.2739 15.8564L10.2983
|
|
16
|
+
15.8818C10.3564 15.9439 10.4539 15.9999 10.6157 16C10.7155 15.9998 10.8635 15.9513 10.9819
|
|
17
|
+
15.833L15.8433 10.9736C16.054 10.7626 16.0536 10.4212 15.8433 10.21L8.71436 3.10352L8.7124
|
|
18
|
+
3.10156C8.60329 2.99248 8.49054 2.8737 8.39209 2.77051L8.37549 2.75391C8.08113 2.44536 7.86049
|
|
19
|
+
2.21875 7.65479 2.05469C7.62752 2.03295 7.6037 2.01461 7.5835 2L2.16162 2ZM8.16748 9.83301C8.81172
|
|
20
|
+
9.18878 9.8571 9.18898 10.5015 9.83301L10.6265 9.71973C11.2745 9.19135 12.2304 9.22915 12.8345
|
|
21
|
+
9.83301C13.4787 10.4772 13.4795 11.5226 12.8354 12.167C12.8312 12.1713 12.8251 12.1745 12.8208
|
|
22
|
+
12.1787L11.2085 13.792C10.818 14.1825 10.185 14.1824 9.79443 13.792L8.18115 12.1797C8.1768 12.1755
|
|
23
|
+
8.17178 12.1713 8.16748 12.167C7.52346 11.5226 7.52325 10.4772 8.16748 9.83301ZM5.00146 4C5.55353
|
|
24
|
+
4.00025 6.00146 4.44787 6.00146 5C6.00146 5.55213 5.55353 5.99975 5.00146 6C4.44918 6 4.00146 5.55228
|
|
25
|
+
4.00146 5C4.00146 4.44772 4.44918 4 5.00146 4Z" fill="#666666"/>
|
|
26
|
+
</svg>
|
|
27
|
+
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
t as CouponIconsRegistry
|
|
33
|
+
};
|