@useinsider/guido 1.0.2 → 1.0.3-beta.001f60f
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 +32 -2
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +111 -68
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
- 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/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -9
- package/dist/components/organisms/header/LeftSlot.vue.js +10 -10
- package/dist/components/organisms/header/LeftSlot.vue2.js +23 -10
- package/dist/components/organisms/header/RightSlot.vue.js +5 -3
- package/dist/components/organisms/header/RightSlot.vue2.js +26 -27
- package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +20 -0
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +37 -0
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +83 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +17 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +30 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +19 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -0
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +74 -0
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +20 -0
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +37 -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/useApiErrorTracking.js +137 -0
- package/dist/composables/useCustomInterfaceAppearance.js +22 -18
- package/dist/composables/useErrorTracking.js +98 -0
- package/dist/composables/useHtmlCompiler.js +17 -9
- package/dist/composables/useHtmlValidator.js +148 -0
- package/dist/composables/useHttp.js +127 -60
- package/dist/composables/usePartner.js +16 -9
- package/dist/composables/useRecommendation.js +27 -0
- package/dist/composables/useSave.js +15 -0
- package/dist/composables/useStripo.js +206 -53
- package/dist/composables/useStripoErrorCategory.js +138 -0
- package/dist/composables/useStripoEventHandler.js +20 -0
- package/dist/composables/useStripoSlackNotifier.js +47 -0
- package/dist/composables/useToaster.js +17 -17
- package/dist/config/compiler/outlookCompilerRules.js +36 -0
- package/dist/config/compiler/recommendationCompilerRules.js +83 -0
- package/dist/config/compiler/socialCompilerRules.js +21 -0
- package/dist/config/compiler/unsubscribeCompilerRules.js +77 -0
- package/dist/config/migrator/checkboxMigrator.js +83 -0
- package/dist/config/migrator/couponBlockMigrator.js +67 -0
- package/dist/config/migrator/index.js +11 -0
- package/dist/config/migrator/radioButtonMigrator.js +86 -0
- package/dist/config/migrator/unsubscribeMigrator.js +124 -0
- package/dist/enums/defaults.js +48 -9
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/enums/html-validator.js +7 -0
- package/dist/enums/onboarding.js +8 -0
- package/dist/enums/recommendation.js +56 -0
- package/dist/enums/unsubscribe.js +54 -0
- package/dist/extensions/Blocks/Checkbox/block.js +30 -0
- package/dist/extensions/Blocks/Checkbox/control.js +92 -0
- package/dist/extensions/Blocks/Checkbox/extension.js +9 -0
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +18 -0
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +25 -0
- package/dist/extensions/Blocks/Checkbox/template.js +64 -0
- 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 +30 -0
- package/dist/extensions/Blocks/RadioButton/control.js +92 -0
- package/dist/extensions/Blocks/RadioButton/extension.js +9 -0
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +14 -0
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +26 -0
- package/dist/extensions/Blocks/RadioButton/template.js +149 -0
- package/dist/extensions/Blocks/Recommendation/block.js +27 -0
- package/dist/extensions/Blocks/Recommendation/control.js +277 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +10 -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 +32 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/template.js +200 -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 +102 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +21 -21
- package/dist/extensions/DynamicContent/extension.js +6 -6
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +659 -0
- package/dist/package.json.js +7 -0
- package/dist/services/onboardingApi.js +23 -0
- package/dist/services/recommendationApi.js +43 -0
- package/dist/services/slackNotificationService.js +167 -0
- package/dist/services/stripoApi.js +51 -19
- package/dist/services/stripoErrorDeduplicationService.js +91 -0
- package/dist/services/unsubscribeApi.js +16 -0
- package/dist/src/@types/events.d.ts +7 -0
- package/dist/{@types → src/@types}/generic.d.ts +17 -0
- package/dist/{components → src/components}/Guido.vue.d.ts +6 -3
- 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/header/HeaderWrapper.vue.d.ts +4 -0
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +4 -0
- package/dist/src/components/organisms/onboarding/GenericOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +2 -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/composables/useApiErrorTracking.d.ts +28 -0
- package/dist/src/composables/useErrorTracking.d.ts +30 -0
- package/dist/src/composables/useHtmlValidator.d.ts +4 -0
- package/dist/{composables → src/composables}/useHttp.d.ts +2 -0
- package/dist/{composables → src/composables}/usePartner.d.ts +1 -0
- package/dist/src/composables/useRecommendation.d.ts +19 -0
- package/dist/src/composables/useSave.d.ts +4 -0
- package/dist/{composables → src/composables}/useStripo.d.ts +1 -0
- package/dist/src/composables/useStripoErrorCategory.d.ts +29 -0
- package/dist/src/composables/useStripoEventHandler.d.ts +3 -0
- package/dist/src/composables/useStripoSlackNotifier.d.ts +8 -0
- package/dist/src/config/compiler/outlookCompilerRules.d.ts +2 -0
- package/dist/src/config/compiler/recommendationCompilerRules.d.ts +2 -0
- package/dist/src/config/compiler/socialCompilerRules.d.ts +2 -0
- package/dist/src/config/compiler/unsubscribeCompilerRules.d.ts +2 -0
- package/dist/src/config/migrator/checkboxMigrator.d.ts +1 -0
- 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/radioButtonMigrator.d.ts +1 -0
- package/dist/src/config/migrator/unsubscribeMigrator.d.ts +1 -0
- package/dist/{enums → src/enums}/defaults.d.ts +6 -1
- package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/src/enums/html-validator.d.ts +6 -0
- package/dist/src/enums/onboarding.d.ts +1 -0
- package/dist/src/enums/recommendation.d.ts +54 -0
- package/dist/src/enums/unsubscribe.d.ts +38 -0
- package/dist/src/extensions/Blocks/Checkbox/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/Checkbox/control.d.ts +22 -0
- package/dist/src/extensions/Blocks/Checkbox/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Checkbox/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/Checkbox/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/CouponBlock/block.d.ts +12 -0
- package/dist/src/extensions/Blocks/CouponBlock/extension.d.ts +2 -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/RadioButton/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/RadioButton/control.d.ts +17 -0
- package/dist/src/extensions/Blocks/RadioButton/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/RadioButton/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/RadioButton/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/settingsPanel.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 +6 -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/src/extensions/Blocks/_Boilerplate/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +17 -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/_Boilerplate/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +66 -0
- package/dist/src/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/src/mock/api/template-library.d.ts +2 -0
- package/dist/src/mock/api/unsubscribe.d.ts +2 -0
- package/dist/src/mock/api/user-modal-state.d.ts +2 -0
- package/dist/src/mock/api/validator.d.ts +2 -0
- package/dist/src/services/onboardingApi.d.ts +4 -0
- package/dist/src/services/recommendationApi.d.ts +6 -0
- package/dist/src/services/slackNotificationService.d.ts +110 -0
- package/dist/{services → src/services}/stripoApi.d.ts +1 -1
- package/dist/src/services/stripoErrorDeduplicationService.d.ts +75 -0
- package/dist/src/services/unsubscribeApi.d.ts +4 -0
- package/dist/src/stores/config.d.ts +96 -0
- package/dist/{stores → src/stores}/dynamic-content.d.ts +12 -0
- package/dist/{stores → src/stores}/editor.d.ts +42 -0
- package/dist/src/stores/onboarding.d.ts +1068 -0
- package/dist/src/stores/recommendation.d.ts +10 -0
- package/dist/src/stores/unsubscribe.d.ts +256 -0
- package/dist/src/utils/genericUtil.d.ts +9 -0
- package/dist/static/assets/onboarding-img.svg.js +4 -0
- package/dist/static/styles/components/alert-message.css.js +32 -2
- package/dist/static/styles/components/button.css.js +32 -2
- package/dist/static/styles/components/notification.css.js +55 -0
- package/dist/static/styles/components/popup.css.js +68 -0
- package/dist/static/styles/components/wide-panel.css.js +5 -1
- package/dist/static/styles/customEditorStyle.css.js +6 -0
- package/dist/static/styles/variables.css.js +10 -0
- package/dist/stores/config.js +17 -0
- package/dist/stores/dynamic-content.js +7 -6
- package/dist/stores/editor.js +3 -1
- package/dist/stores/onboarding.js +95 -0
- package/dist/stores/recommendation.js +9 -0
- package/dist/stores/unsubscribe.js +129 -0
- package/dist/utils/genericUtil.js +9 -5
- package/dist/utils/templatePreparation.js +25 -17
- package/package.json +11 -5
- package/dist/@types/events.d.ts +0 -1
- package/dist/_virtual/AddCustomFont.js +0 -4
- package/dist/_virtual/AiAssistantValueType.js +0 -4
- package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
- package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
- package/dist/_virtual/Block.js +0 -4
- package/dist/_virtual/BlockAttributes.js +0 -4
- package/dist/_virtual/BlockCompositionType.js +0 -4
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
- package/dist/_virtual/BlockRenderer.js +0 -4
- package/dist/_virtual/BlockType.js +0 -4
- package/dist/_virtual/BlocksPanel.js +0 -4
- package/dist/_virtual/BuiltInControl.js +0 -4
- package/dist/_virtual/BuiltInControlTypes.js +0 -4
- package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
- package/dist/_virtual/ContextAction.js +0 -4
- package/dist/_virtual/ContextActionType.js +0 -4
- package/dist/_virtual/Control.js +0 -4
- package/dist/_virtual/EditorStatePropertyType.js +0 -4
- package/dist/_virtual/Extension.js +0 -4
- package/dist/_virtual/ExtensionBuilder.js +0 -4
- package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
- package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
- package/dist/_virtual/ModificationDescription.js +0 -4
- package/dist/_virtual/PanelPosition.js +0 -4
- package/dist/_virtual/PreviewDeviceMode.js +0 -4
- package/dist/_virtual/SettingsPanelRegistry.js +0 -4
- package/dist/_virtual/SettingsPanelTab.js +0 -4
- package/dist/_virtual/SettingsTab.js +0 -4
- package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
- package/dist/_virtual/TextColorBuiltInControl.js +0 -4
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
- package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
- package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
- package/dist/_virtual/UIElement.js +0 -4
- package/dist/_virtual/UIElementTagRegistry.js +0 -4
- package/dist/_virtual/UIElementType.js +0 -4
- package/dist/_virtual/UIElementsAttributes.js +0 -4
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
- package/dist/utils/genericUtil.d.ts +0 -3
- /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/HeaderWrapper.vue.d.ts → src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/LeftSlot.vue.d.ts → src/components/organisms/extensions/recommendation/Filters.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/MiddleSlot.vue.d.ts → src/components/organisms/header/LeftSlot.vue.d.ts} +0 -0
- /package/dist/{components/organisms/header/RightSlot.vue.d.ts → src/components/organisms/header/MiddleSlot.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/header/ViewOptions.vue.d.ts +0 -0
- /package/dist/{components → 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 → src/components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
- /package/dist/{components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts → src/components/organisms/onboarding/AMPOnboarding.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}/usePreviewMode.d.ts +0 -0
- /package/dist/{composables → src/composables}/useProvideInject.d.ts +0 -0
- /package/dist/{composables → src/composables}/useResponsivePreview.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/{enums → src/enums}/displayConditions.d.ts +0 -0
- /package/dist/{enums → src/enums}/preview.d.ts +0 -0
- /package/dist/{enums → src/enums}/toaster.d.ts +0 -0
- /package/dist/{extensions/DynamicContent → src/extensions/Blocks/Checkbox}/extension.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 → src/mock}/browser.d.ts +0 -0
- /package/dist/{mock → src/mock}/handlers.d.ts +0 -0
- /package/dist/{services → src/services}/templateLibraryApi.d.ts +0 -0
- /package/dist/{stores → src/stores}/preview.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,98 @@
|
|
|
1
|
+
import { inject as S, ref as g } from "vue";
|
|
2
|
+
const f = () => {
|
|
3
|
+
const s = S("traceId", ""), n = g(0), i = g(null), d = (r, e = {}) => {
|
|
4
|
+
const t = r instanceof Error ? r.message : String(r), o = {
|
|
5
|
+
...e,
|
|
6
|
+
errorMessage: t,
|
|
7
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
8
|
+
userAgent: navigator.userAgent,
|
|
9
|
+
url: window.location.href,
|
|
10
|
+
traceId: s || void 0
|
|
11
|
+
};
|
|
12
|
+
return n.value += 1, r instanceof Error && (i.value = r), window.Sentry && window.Sentry.captureException(r, {
|
|
13
|
+
tags: {
|
|
14
|
+
component: e.component,
|
|
15
|
+
operation: e.operation,
|
|
16
|
+
source: "guido"
|
|
17
|
+
},
|
|
18
|
+
contexts: {
|
|
19
|
+
guido: o
|
|
20
|
+
},
|
|
21
|
+
extra: {
|
|
22
|
+
traceId: s || void 0
|
|
23
|
+
}
|
|
24
|
+
}), window.FS && window.FS("event", "guido_error", {
|
|
25
|
+
errorMessageStr: t,
|
|
26
|
+
componentStr: e.component || "unknown",
|
|
27
|
+
operationStr: e.operation || "unknown",
|
|
28
|
+
templateIdStr: e.templateId || "",
|
|
29
|
+
userIdStr: e.userId || "",
|
|
30
|
+
traceIdStr: s || "",
|
|
31
|
+
errorCountInt: n.value,
|
|
32
|
+
timestampInt: Date.now()
|
|
33
|
+
}), o;
|
|
34
|
+
}, c = (r, e, t = {}, o = !0) => {
|
|
35
|
+
const a = r instanceof Error ? r : new Error(String(r)), u = a.message, p = {
|
|
36
|
+
component: "stripo-wrapper",
|
|
37
|
+
operation: e,
|
|
38
|
+
...t,
|
|
39
|
+
errorMessage: u,
|
|
40
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
41
|
+
userAgent: navigator.userAgent,
|
|
42
|
+
url: window.location.href
|
|
43
|
+
};
|
|
44
|
+
return n.value += 1, i.value = a, o && window.Sentry && window.Sentry.captureException(a, {
|
|
45
|
+
tags: {
|
|
46
|
+
component: "stripo-wrapper",
|
|
47
|
+
operation: e
|
|
48
|
+
},
|
|
49
|
+
contexts: {
|
|
50
|
+
guido: p
|
|
51
|
+
}
|
|
52
|
+
}), o && window.FS && window.FS("event", "guido_stripo_error", {
|
|
53
|
+
errorMessageStr: u,
|
|
54
|
+
operationStr: e || "unknown",
|
|
55
|
+
timestampInt: Date.now()
|
|
56
|
+
}), p;
|
|
57
|
+
}, w = (r, e, t = {}) => {
|
|
58
|
+
const o = new Error(
|
|
59
|
+
`Timeout waiting for Stripo ${r} (${e}ms)`
|
|
60
|
+
);
|
|
61
|
+
return c(o, `${r}_timeout`, {
|
|
62
|
+
timeoutMs: e,
|
|
63
|
+
...t
|
|
64
|
+
});
|
|
65
|
+
}, m = (r, e, t = {}) => new Promise((o, a) => {
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
const u = w(
|
|
68
|
+
e,
|
|
69
|
+
r,
|
|
70
|
+
t
|
|
71
|
+
);
|
|
72
|
+
a(new Error(u.errorMessage));
|
|
73
|
+
}, r);
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
traceId: s,
|
|
77
|
+
errorCount: n,
|
|
78
|
+
lastError: i,
|
|
79
|
+
captureError: d,
|
|
80
|
+
captureStripoError: c,
|
|
81
|
+
captureTimeoutError: w,
|
|
82
|
+
createTimeoutPromise: m,
|
|
83
|
+
withTimeout: (r, e, t, o = {}) => Promise.race([
|
|
84
|
+
r,
|
|
85
|
+
m(e, t, o)
|
|
86
|
+
]),
|
|
87
|
+
getErrorSummary: () => ({
|
|
88
|
+
errorCount: n.value,
|
|
89
|
+
lastError: i.value
|
|
90
|
+
}),
|
|
91
|
+
resetErrorTracking: () => {
|
|
92
|
+
n.value = 0, i.value = null;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
f as useErrorTracking
|
|
98
|
+
};
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import { defaultHtmlCompilerRules as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { defaultHtmlCompilerRules as t } from "../config/compiler/htmlCompilerRules.js";
|
|
2
|
+
import { outlookCompilerRules as p } from "../config/compiler/outlookCompilerRules.js";
|
|
3
|
+
import { recommendationCompilerRules as s } from "../config/compiler/recommendationCompilerRules.js";
|
|
4
|
+
import { socialCompilerRules as u } from "../config/compiler/socialCompilerRules.js";
|
|
5
|
+
import { unsubscribeCompilerRules as n } from "../config/compiler/unsubscribeCompilerRules.js";
|
|
6
|
+
import { createHtmlCompiler as c } from "../utils/htmlCompiler.js";
|
|
7
|
+
import { useConfig as f } from "./useConfig.js";
|
|
8
|
+
const h = () => {
|
|
9
|
+
const { config: e } = f(), l = e.htmlCompilerRules || [], m = [
|
|
10
|
+
...!!e.ignoreDefaultHtmlCompilerRules ? [] : t,
|
|
11
|
+
...s,
|
|
12
|
+
...n,
|
|
13
|
+
...p,
|
|
14
|
+
...u,
|
|
7
15
|
...l.map((o, i) => ({
|
|
8
16
|
...o,
|
|
9
17
|
priority: o.priority + 1e3 + i
|
|
10
18
|
// Ensure additional rules run after default rules
|
|
11
19
|
}))
|
|
12
|
-
],
|
|
13
|
-
return { compileHtml: (o) =>
|
|
20
|
+
], r = c(m);
|
|
21
|
+
return { compileHtml: (o) => r.compile(o) };
|
|
14
22
|
};
|
|
15
23
|
export {
|
|
16
|
-
|
|
24
|
+
h as useHtmlCompiler
|
|
17
25
|
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { useConfig as H } from "./useConfig.js";
|
|
2
|
+
import { TemplateTypes as V } from "../enums/defaults.js";
|
|
3
|
+
import { DISPLAY_CONDITIONS_REGEX as D, DISPLAY_CONDITIONS_EXCEPTIONS_REGEX as P, CampaignCouldNotBeSavedKey as R, CanNotMakeAnyChangesForRunningKey as _ } from "../enums/html-validator.js";
|
|
4
|
+
import { ToasterTypeOptions as l } from "../enums/toaster.js";
|
|
5
|
+
import { useRecommendationStore as G } from "../stores/recommendation.js";
|
|
6
|
+
import { base64EncodeWithSpecialChars as $ } from "../utils/base64.js";
|
|
7
|
+
import { useHttp as j } from "./useHttp.js";
|
|
8
|
+
import { useToaster as q } from "./useToaster.js";
|
|
9
|
+
import { useTranslations as M } from "./useTranslations.js";
|
|
10
|
+
const se = () => {
|
|
11
|
+
var d;
|
|
12
|
+
const { showToaster: c } = q(), { post: y } = j(), { config: h } = H(), a = M(), m = G(), u = ((d = h.partner) == null ? void 0 : d.messageType) === V.transactional, v = async (e) => {
|
|
13
|
+
const t = await y(
|
|
14
|
+
"/newsletter/template-library/check-template-html-body",
|
|
15
|
+
{ html: $(e) }
|
|
16
|
+
), { status: n, message: r } = t.data;
|
|
17
|
+
return n || c({
|
|
18
|
+
type: l.Alert,
|
|
19
|
+
message: n === void 0 ? r : a("newsletter.invalid-url-link-for-toaster")
|
|
20
|
+
}), a(R), r === a(_) && c({
|
|
21
|
+
type: l.Alert,
|
|
22
|
+
message: a("newsletter.already-in-progress")
|
|
23
|
+
}), n;
|
|
24
|
+
}, C = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), w = (e) => ["if", "endif"].includes(e.toLowerCase()), S = (e, s) => {
|
|
25
|
+
const t = e.match(/({%(.*?)%})/g);
|
|
26
|
+
let n = !0;
|
|
27
|
+
return t !== null && !u && t.forEach((r) => {
|
|
28
|
+
const o = r.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
|
|
29
|
+
if (o && o.length > 0) {
|
|
30
|
+
const [i] = o;
|
|
31
|
+
C(i) && !s.includes(i) && (c({
|
|
32
|
+
type: l.Warning,
|
|
33
|
+
message: a("custom-fields.invalid-custom-fields")
|
|
34
|
+
}), n = !1);
|
|
35
|
+
}
|
|
36
|
+
}), n;
|
|
37
|
+
}, b = async (e, s, t) => {
|
|
38
|
+
const n = t ? await v(e) : !0;
|
|
39
|
+
return S(e, s) && n;
|
|
40
|
+
}, E = (e) => e.length > 0 ? !0 : (c({
|
|
41
|
+
type: l.Warning,
|
|
42
|
+
message: a("newsletter.html-content-is-empty")
|
|
43
|
+
}), !1), A = (e) => {
|
|
44
|
+
const s = (e.match(/{/gm) || []).length, t = (e.match(/}/gm) || []).length;
|
|
45
|
+
return s > t && c({
|
|
46
|
+
type: l.Warning,
|
|
47
|
+
message: a("custom-fields.missing-closing-braces")
|
|
48
|
+
}), s < t && c({
|
|
49
|
+
type: l.Warning,
|
|
50
|
+
message: a("custom-fields.missing-opening-braces")
|
|
51
|
+
}), s === t;
|
|
52
|
+
}, x = (e) => {
|
|
53
|
+
const s = e.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
|
|
54
|
+
return s || c({
|
|
55
|
+
type: l.Warning,
|
|
56
|
+
message: a("custom-fields.invalid-custom-fields")
|
|
57
|
+
}), s;
|
|
58
|
+
}, k = (e, s) => {
|
|
59
|
+
const t = e.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
|
|
60
|
+
if (t && !u) {
|
|
61
|
+
const n = new Set(s.map((o) => o.toLowerCase())), r = [];
|
|
62
|
+
if (t.forEach((o) => {
|
|
63
|
+
const i = o.slice(2, -2).trim().toLowerCase();
|
|
64
|
+
(!n.has(i) || i === "") && r.push(i);
|
|
65
|
+
}), r.length > 0) {
|
|
66
|
+
const o = `
|
|
67
|
+
<ul>
|
|
68
|
+
${r.map((i) => `<li>${i}</li>`).join("")}
|
|
69
|
+
</ul>
|
|
70
|
+
`;
|
|
71
|
+
return c({
|
|
72
|
+
type: l.Alert,
|
|
73
|
+
message: a("custom-fields.invalid-custom-fields") + o
|
|
74
|
+
}), !1;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return !0;
|
|
78
|
+
}, T = (e) => {
|
|
79
|
+
const s = e.match(/{%(.*?)%}/g), t = [];
|
|
80
|
+
let n = !0;
|
|
81
|
+
if (s && s.forEach((r) => {
|
|
82
|
+
const o = r.match(D), i = r.match(P), B = (o == null ? void 0 : o.join("")) || "";
|
|
83
|
+
(!o || r !== B) && !i && (c({
|
|
84
|
+
type: l.Alert,
|
|
85
|
+
message: a("newsletter.display-conditions-invalid-syntax")
|
|
86
|
+
}), n = !1), o && o.forEach((f) => {
|
|
87
|
+
f.trim() === "=" && (c({
|
|
88
|
+
type: l.Alert,
|
|
89
|
+
message: a("custom-conditions.wrong-equality-operators")
|
|
90
|
+
}), n = !1);
|
|
91
|
+
const g = f.match(/^[a-zA-Z]*$/g);
|
|
92
|
+
g && g.forEach((p) => {
|
|
93
|
+
w(p) && t.push(p);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}), t.length) {
|
|
97
|
+
const r = t.filter((i) => i === "if"), o = t.filter((i) => i === "endif");
|
|
98
|
+
r.length !== o.length && (c({
|
|
99
|
+
type: l.Alert,
|
|
100
|
+
message: a("custom-conditions.missing-if-endif-tag")
|
|
101
|
+
}), n = !1);
|
|
102
|
+
}
|
|
103
|
+
return n;
|
|
104
|
+
}, F = (e) => {
|
|
105
|
+
const s = (e.match(/{% /gm) || []).length, t = (e.match(/ %}/gm) || []).length, n = s === t;
|
|
106
|
+
return n || c({
|
|
107
|
+
type: l.Warning,
|
|
108
|
+
message: a("custom-conditions.no-space-after-braces")
|
|
109
|
+
}), n;
|
|
110
|
+
}, I = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (c({
|
|
111
|
+
type: l.Warning,
|
|
112
|
+
message: a("custom-conditions.no-braces-inside-if-tag")
|
|
113
|
+
}), !1) : !0, W = () => m.recommendationConfigs && Object.values(m.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (c({
|
|
114
|
+
type: l.Alert,
|
|
115
|
+
message: a("newsletter.fill-all-necessary-fields")
|
|
116
|
+
}), !1) : !0, L = (e) => {
|
|
117
|
+
const s = /src="[^"]*\.(svg|pst)"/gm;
|
|
118
|
+
return e.match(s) === null ? !0 : (c({
|
|
119
|
+
type: l.Alert,
|
|
120
|
+
message: a("newsletter.invalid-image-type")
|
|
121
|
+
}), !1);
|
|
122
|
+
}, N = (e) => {
|
|
123
|
+
const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".checkbox-block-v2");
|
|
124
|
+
return Array.from(n).find((o) => {
|
|
125
|
+
var i;
|
|
126
|
+
return !((i = o.id) != null && i.trim());
|
|
127
|
+
}) ? (c({
|
|
128
|
+
type: l.Alert,
|
|
129
|
+
message: a("unsubscribe-templates.select-checkbox-groups")
|
|
130
|
+
}), !1) : !0;
|
|
131
|
+
}, O = (e) => {
|
|
132
|
+
const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".radio-button-v2");
|
|
133
|
+
return Array.from(n).find((o) => {
|
|
134
|
+
var i;
|
|
135
|
+
return !((i = o.id) != null && i.trim());
|
|
136
|
+
}) ? (c({
|
|
137
|
+
type: l.Alert,
|
|
138
|
+
message: a("unsubscribe-templates.select-radio-button-groups")
|
|
139
|
+
}), !1) : !0;
|
|
140
|
+
};
|
|
141
|
+
return { validateHtml: async (e, s, t = !1) => {
|
|
142
|
+
const n = s.map((o) => o.value);
|
|
143
|
+
return await b(e, n, t) && E(e) && A(e) && x(e) && k(e, n) && T(e) && F(e) && I(e) && W() && L(e) && N(e) && O(e);
|
|
144
|
+
} };
|
|
145
|
+
};
|
|
146
|
+
export {
|
|
147
|
+
se as useHtmlValidator
|
|
148
|
+
};
|
|
@@ -1,86 +1,153 @@
|
|
|
1
|
-
import { getCsrfToken as
|
|
2
|
-
import { ref as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { getCsrfToken as P } from "../utils/genericUtil.js";
|
|
2
|
+
import { ref as v, computed as b } from "vue";
|
|
3
|
+
let x;
|
|
4
|
+
const m = async () => {
|
|
5
|
+
if (!x)
|
|
6
|
+
try {
|
|
7
|
+
const { useApiErrorTracking: k } = await import("./useApiErrorTracking.js");
|
|
8
|
+
x = k();
|
|
9
|
+
} catch {
|
|
10
|
+
}
|
|
11
|
+
return x;
|
|
12
|
+
}, M = (k = {}) => {
|
|
13
|
+
const g = v(!1), c = v(null), T = v(null);
|
|
14
|
+
let w = !1;
|
|
15
|
+
const A = b(() => g.value), $ = b(() => c.value !== null), R = {
|
|
5
16
|
baseURL: "",
|
|
6
17
|
timeout: 1e4,
|
|
7
18
|
retry: 0,
|
|
8
19
|
retryDelay: 1e3,
|
|
9
20
|
headers: {
|
|
10
21
|
"Content-Type": "application/json",
|
|
11
|
-
"X-CSRF-TOKEN":
|
|
22
|
+
"X-CSRF-TOKEN": P()
|
|
12
23
|
},
|
|
13
|
-
...
|
|
14
|
-
},
|
|
15
|
-
if (
|
|
16
|
-
return
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
},
|
|
24
|
+
...k
|
|
25
|
+
}, U = (t, s) => {
|
|
26
|
+
if (t.startsWith("http://") || t.startsWith("https://"))
|
|
27
|
+
return t;
|
|
28
|
+
const r = s || R.baseURL || "";
|
|
29
|
+
return r.endsWith("/") && t.startsWith("/") ? `${r}${t.slice(1)}` : r.endsWith("/") || t.startsWith("/") ? `${r}${t}` : `${r}/${t}`;
|
|
30
|
+
}, N = (t) => new Promise((s, r) => {
|
|
20
31
|
setTimeout(() => {
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
setTimeout(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
...
|
|
32
|
+
r(new Error("Request timeout"));
|
|
33
|
+
}, t);
|
|
34
|
+
}), H = (t) => new Promise((s) => {
|
|
35
|
+
setTimeout(() => {
|
|
36
|
+
s();
|
|
37
|
+
}, t);
|
|
38
|
+
}), u = async (t, s, r, _ = {}) => {
|
|
39
|
+
c.value = null, g.value = !0, T.value = new AbortController();
|
|
40
|
+
const a = { ...R, ..._ }, h = U(s, a.baseURL), p = {
|
|
41
|
+
method: t,
|
|
42
|
+
headers: { ...a.headers },
|
|
43
|
+
signal: T.value.signal,
|
|
44
|
+
...a
|
|
32
45
|
};
|
|
33
|
-
|
|
34
|
-
const
|
|
46
|
+
r && ["POST", "PUT", "PATCH"].includes(t) && (r instanceof FormData ? (delete p.headers["Content-Type"], p.body = r) : p.body = JSON.stringify(r));
|
|
47
|
+
const y = async (l = 0) => {
|
|
35
48
|
try {
|
|
36
|
-
const o = [fetch(
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
const o = [fetch(h, p)];
|
|
50
|
+
a.timeout && o.push(N(a.timeout));
|
|
51
|
+
const e = await Promise.race(o);
|
|
52
|
+
if (!e.ok) {
|
|
53
|
+
if (e.status === 401 && a.onTokenRefresh && !a.skipTokenRefreshRetry && !w) {
|
|
54
|
+
w = !0;
|
|
55
|
+
try {
|
|
56
|
+
const i = await a.onTokenRefresh();
|
|
57
|
+
if (i) {
|
|
58
|
+
const E = p.headers;
|
|
59
|
+
return E.Authorization = `Bearer ${i}`, E["X-CSRF-TOKEN"] = P(), w = !1, await y(l);
|
|
60
|
+
}
|
|
61
|
+
} catch (i) {
|
|
62
|
+
w = !1;
|
|
63
|
+
const E = await m();
|
|
64
|
+
E && i instanceof Error && E.captureHttpError(
|
|
65
|
+
i,
|
|
66
|
+
h,
|
|
67
|
+
{
|
|
68
|
+
method: t,
|
|
69
|
+
statusCode: 401,
|
|
70
|
+
statusText: "Unauthorized - Token Refresh Failed",
|
|
71
|
+
context: "stale_token_refresh"
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const j = `HTTP Error: ${e.status} ${e.statusText}`, d = new Error(j);
|
|
77
|
+
d.status = e.status, d.statusText = e.statusText, d.response = e;
|
|
78
|
+
const C = await m();
|
|
79
|
+
if (C) {
|
|
80
|
+
const i = e.status === 404 ? "asset_missing" : void 0;
|
|
81
|
+
C.captureHttpError(d, h, {
|
|
82
|
+
method: t,
|
|
83
|
+
statusCode: e.status,
|
|
84
|
+
statusText: e.statusText,
|
|
85
|
+
...i && { context: i }
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
throw d;
|
|
42
89
|
}
|
|
43
|
-
let
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
data:
|
|
47
|
-
status:
|
|
48
|
-
statusText:
|
|
49
|
-
headers:
|
|
90
|
+
let n;
|
|
91
|
+
const f = e.headers.get("content-type");
|
|
92
|
+
return f != null && f.includes("application/json") ? n = await e.json() : f != null && f.includes("text/") ? n = await e.text() : n = await e.blob(), {
|
|
93
|
+
data: n,
|
|
94
|
+
status: e.status,
|
|
95
|
+
statusText: e.statusText,
|
|
96
|
+
headers: e.headers
|
|
50
97
|
};
|
|
51
98
|
} catch (o) {
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
return await
|
|
55
|
-
|
|
99
|
+
const e = o instanceof Error && o.name === "AbortError";
|
|
100
|
+
if (l < (a.retry || 0) && !e)
|
|
101
|
+
return await H(a.retryDelay || 1e3), y(l + 1);
|
|
102
|
+
if (o instanceof Error)
|
|
103
|
+
if (o.name === "AbortError")
|
|
104
|
+
c.value = { message: "Request was cancelled" };
|
|
105
|
+
else {
|
|
106
|
+
c.value = { message: o.message };
|
|
107
|
+
const n = await m();
|
|
108
|
+
n && n.captureNetworkError(o, h, {
|
|
109
|
+
method: t,
|
|
110
|
+
attemptNumber: l + 1,
|
|
111
|
+
timeoutMs: a.timeout
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
c.value = o;
|
|
116
|
+
const n = await m();
|
|
117
|
+
n && o instanceof Error && n.captureNetworkError(o, h, {
|
|
118
|
+
method: t,
|
|
119
|
+
attemptNumber: l + 1
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
throw o;
|
|
56
123
|
}
|
|
57
124
|
};
|
|
58
125
|
try {
|
|
59
|
-
return await
|
|
126
|
+
return await y();
|
|
60
127
|
} finally {
|
|
61
|
-
|
|
128
|
+
g.value = !1, T.value = null;
|
|
62
129
|
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
130
|
+
}, O = (t, s) => u("GET", t, void 0, s), W = (t, s, r) => u("POST", t, s, r), q = (t, s, r) => u("PUT", t, s, r), D = (t, s, r) => u("PATCH", t, s, r), L = (t, s) => u("DELETE", t, void 0, s), S = (t) => {
|
|
131
|
+
T.value && T.value.abort(t);
|
|
132
|
+
}, F = () => {
|
|
133
|
+
c.value = null;
|
|
67
134
|
};
|
|
68
135
|
return {
|
|
69
136
|
// State
|
|
70
|
-
loading:
|
|
71
|
-
error:
|
|
72
|
-
hasError:
|
|
137
|
+
loading: A,
|
|
138
|
+
error: b(() => c.value),
|
|
139
|
+
hasError: $,
|
|
73
140
|
// Methods
|
|
74
|
-
request:
|
|
75
|
-
get:
|
|
76
|
-
post:
|
|
77
|
-
put:
|
|
78
|
-
patch:
|
|
79
|
-
delete:
|
|
80
|
-
cancel:
|
|
81
|
-
clearError:
|
|
141
|
+
request: u,
|
|
142
|
+
get: O,
|
|
143
|
+
post: W,
|
|
144
|
+
put: q,
|
|
145
|
+
patch: D,
|
|
146
|
+
delete: L,
|
|
147
|
+
cancel: S,
|
|
148
|
+
clearError: F
|
|
82
149
|
};
|
|
83
150
|
};
|
|
84
151
|
export {
|
|
85
|
-
|
|
152
|
+
M as useHttp
|
|
86
153
|
};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { DefaultProductType as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { TEST_PARTNER_LIST as r, DefaultProductType as o, ProductIds as n } from "../enums/defaults.js";
|
|
2
|
+
const i = () => {
|
|
3
|
+
const e = () => window.location.hostname.split(".")[0] || "";
|
|
4
|
+
return {
|
|
5
|
+
getPartnerName: e,
|
|
6
|
+
getProductType: () => {
|
|
7
|
+
const t = window.location.pathname.split("/").filter(Boolean)[0] || o;
|
|
8
|
+
return n[t] || 0;
|
|
9
|
+
},
|
|
10
|
+
isTestPartner: () => {
|
|
11
|
+
const t = e();
|
|
12
|
+
return r.includes(t);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
};
|
|
9
16
|
export {
|
|
10
|
-
|
|
17
|
+
i as usePartner
|
|
11
18
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MinDeviceViewport as r, DefaultPadding as c } from "../enums/recommendation.js";
|
|
2
|
+
const m = () => ({
|
|
3
|
+
calculateCardWidth: ({
|
|
4
|
+
mobileLeftPadding: e,
|
|
5
|
+
mobileRightPadding: a,
|
|
6
|
+
cardsInRow: n,
|
|
7
|
+
unresponsive: i
|
|
8
|
+
}) => {
|
|
9
|
+
const t = i ? n : 1, o = e + a + (t - 1) * c;
|
|
10
|
+
return (r - o) / t;
|
|
11
|
+
},
|
|
12
|
+
getRecommendationCampaignData: (e) => (console.debug(e), {
|
|
13
|
+
textTrimming: !1,
|
|
14
|
+
orientation: "vertical",
|
|
15
|
+
mobileLeftPadding: 0,
|
|
16
|
+
mobileRightPadding: 0,
|
|
17
|
+
cardsInRow: 2,
|
|
18
|
+
unresponsive: !1,
|
|
19
|
+
priceBeforeTextValue: "",
|
|
20
|
+
priceAfterTextValue: "",
|
|
21
|
+
discountBeforeTextValue: "",
|
|
22
|
+
discountAfterTextValue: ""
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
m as useRecommendation
|
|
27
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useSaveStart as i, useSaveComplete as m } from "./useGuidoActions.js";
|
|
2
|
+
import { useTemplatePreparation as n } from "../utils/templatePreparation.js";
|
|
3
|
+
import { useHtmlValidator as l } from "./useHtmlValidator.js";
|
|
4
|
+
const f = () => {
|
|
5
|
+
const e = i(), a = m(), { validateHtml: s } = l();
|
|
6
|
+
return { save: async (o = !1) => {
|
|
7
|
+
e();
|
|
8
|
+
const { prepareTemplateDetails: r } = n(), t = await r();
|
|
9
|
+
if (await s(t.compiledHtml, t.dynamicContentList, !0))
|
|
10
|
+
return o || a(t), t;
|
|
11
|
+
} };
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
f as useSave
|
|
15
|
+
};
|