@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
|
@@ -1,22 +1,82 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useCustomInterfaceAppearance as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { useActionsApi as F } from "./useActionsApi.js";
|
|
2
|
+
import { useCustomInterfaceAppearance as x } from "./useCustomInterfaceAppearance.js";
|
|
3
|
+
import { useErrorTracking as A } from "./useErrorTracking.js";
|
|
4
|
+
import { useStripoErrorCategory as P } from "./useStripoErrorCategory.js";
|
|
5
|
+
import { useStripoEventHandler as U } from "./useStripoEventHandler.js";
|
|
6
|
+
import { useStripoSlackNotifier as D } from "./useStripoSlackNotifier.js";
|
|
7
|
+
import { useToaster as M } from "./useToaster.js";
|
|
8
|
+
import { displayConditions as z } from "../enums/displayConditions.js";
|
|
9
|
+
import H from "../extensions/Blocks/Checkbox/extension.js";
|
|
10
|
+
import L from "../extensions/Blocks/CouponBlock/extension.js";
|
|
11
|
+
import N from "../extensions/Blocks/RadioButton/extension.js";
|
|
12
|
+
import O from "../extensions/Blocks/Recommendation/extension.js";
|
|
13
|
+
import $ from "../extensions/Blocks/Unsubscribe/extension.js";
|
|
14
|
+
import q from "../extensions/DynamicContent/extension.js";
|
|
15
|
+
import { useStripoApi as T } from "../services/stripoApi.js";
|
|
16
|
+
import J from "../static/styles/customEditorStyle.css.js";
|
|
17
|
+
import { useEditorStore as _ } from "../stores/editor.js";
|
|
18
|
+
import { dynamicContentToMergeTags as K } from "../utils/genericUtil.js";
|
|
19
|
+
import X from "../package.json.js";
|
|
20
|
+
const j = 1500 * 1e3;
|
|
21
|
+
let m = null;
|
|
22
|
+
const fe = (e) => {
|
|
23
|
+
const { handleError: y } = M(), k = async () => {
|
|
24
|
+
try {
|
|
25
|
+
const { getToken: s } = T();
|
|
26
|
+
return await s();
|
|
27
|
+
} catch {
|
|
28
|
+
return "";
|
|
29
|
+
}
|
|
30
|
+
}, { getToken: E, getCustomFonts: C } = T(k), { handleEvent: w } = U(), { captureStripoError: p, withTimeout: f } = A(), { shouldCaptureSentry: I } = P(), { notifySlack: c } = D(), v = () => {
|
|
31
|
+
m && clearInterval(m), m = setInterval(async () => {
|
|
32
|
+
try {
|
|
33
|
+
await f(
|
|
34
|
+
E(),
|
|
35
|
+
1e4,
|
|
36
|
+
"idle_token_refresh",
|
|
37
|
+
{ emailId: e.emailId, userId: e.userId }
|
|
38
|
+
) && _().isStripoInitialized && c(
|
|
39
|
+
"Proactive token refresh completed successfully",
|
|
40
|
+
"idle_token_refresh",
|
|
41
|
+
{
|
|
42
|
+
emailId: e.emailId,
|
|
43
|
+
userId: e.userId,
|
|
44
|
+
reason: "scheduled_refresh"
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
} catch (s) {
|
|
48
|
+
const i = "idle_token_refresh", o = I(i);
|
|
49
|
+
p(s, i, {
|
|
50
|
+
emailId: e.emailId,
|
|
51
|
+
userId: e.userId
|
|
52
|
+
}, o), c(
|
|
53
|
+
"Proactive token refresh failed",
|
|
54
|
+
i,
|
|
55
|
+
{ emailId: e.emailId, userId: e.userId }
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}, j);
|
|
59
|
+
}, b = () => {
|
|
60
|
+
m && (clearInterval(m), m = null);
|
|
61
|
+
}, V = (s, i = []) => {
|
|
62
|
+
const o = _(), { html: u, css: h, forceRecreate: g } = s, d = (r) => {
|
|
63
|
+
const t = r instanceof Error ? r : new Error(String(r)), n = "stripo_runtime_error", l = I(n);
|
|
64
|
+
p(t, n, {
|
|
65
|
+
emailId: e.emailId,
|
|
66
|
+
userId: e.userId
|
|
67
|
+
}, l), c(
|
|
68
|
+
t.message,
|
|
69
|
+
n,
|
|
70
|
+
{ emailId: e.emailId, userId: e.userId }
|
|
71
|
+
);
|
|
72
|
+
};
|
|
13
73
|
window.UIEditor.initEditor(
|
|
14
74
|
document.querySelector("#guido-editor"),
|
|
15
75
|
{
|
|
16
|
-
metadata:
|
|
17
|
-
html:
|
|
18
|
-
css:
|
|
19
|
-
forceRecreate:
|
|
76
|
+
metadata: e,
|
|
77
|
+
html: u,
|
|
78
|
+
css: h,
|
|
79
|
+
forceRecreate: g,
|
|
20
80
|
locale: "en",
|
|
21
81
|
undoButtonSelector: "#guido__undo-button",
|
|
22
82
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -26,10 +86,10 @@ const P = (d) => {
|
|
|
26
86
|
customAppearanceMergetags: !0,
|
|
27
87
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
28
88
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
29
|
-
customViewStyles:
|
|
89
|
+
customViewStyles: J,
|
|
30
90
|
conditionsEnabled: !0,
|
|
31
91
|
customConditionsEnabled: !0,
|
|
32
|
-
conditionCategories:
|
|
92
|
+
conditionCategories: z,
|
|
33
93
|
enableXSSSecurity: !0,
|
|
34
94
|
messageSettingsEnabled: !1,
|
|
35
95
|
selectBlockAfterDropFromSettingsPanel: !0,
|
|
@@ -40,61 +100,154 @@ const P = (d) => {
|
|
|
40
100
|
},
|
|
41
101
|
mergeTags: [
|
|
42
102
|
{
|
|
43
|
-
entries:
|
|
103
|
+
entries: K(e.preselectedDynamicContentList)
|
|
44
104
|
}
|
|
45
105
|
],
|
|
46
|
-
async onTokenRefreshRequest(
|
|
106
|
+
async onTokenRefreshRequest(r) {
|
|
47
107
|
try {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
108
|
+
const t = await f(
|
|
109
|
+
E(),
|
|
110
|
+
1e4,
|
|
111
|
+
// 10 second timeout
|
|
112
|
+
"token_refresh",
|
|
113
|
+
{ emailId: e.emailId, userId: e.userId }
|
|
114
|
+
);
|
|
115
|
+
r(t);
|
|
116
|
+
} catch (t) {
|
|
117
|
+
const n = "token_refresh", l = I(n);
|
|
118
|
+
p(t, n, {
|
|
119
|
+
templateId: e.emailId,
|
|
120
|
+
userId: e.userId
|
|
121
|
+
}, l), c(
|
|
122
|
+
"Token refresh operation failed",
|
|
123
|
+
n,
|
|
124
|
+
{ emailId: e.emailId, userId: e.userId }
|
|
125
|
+
), y(t, "Failed to refresh token");
|
|
52
126
|
}
|
|
53
127
|
},
|
|
54
128
|
onTemplateLoaded() {
|
|
55
129
|
try {
|
|
56
|
-
const { importCss:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
130
|
+
const { importCss: r } = x(), { activateCustomViewStyles: t } = F();
|
|
131
|
+
r(), t(), e.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, v(), setTimeout(() => {
|
|
132
|
+
o.hasChanges = !1;
|
|
133
|
+
}, 1e3);
|
|
134
|
+
} catch (r) {
|
|
135
|
+
const t = "template_loaded", n = I(t);
|
|
136
|
+
p(r, t, {
|
|
137
|
+
templateId: e.emailId,
|
|
138
|
+
userId: e.userId
|
|
139
|
+
}, n), c(
|
|
140
|
+
"Template loading operation failed",
|
|
141
|
+
t,
|
|
142
|
+
{ emailId: e.emailId, userId: e.userId }
|
|
143
|
+
), y(r, "Failed to load custom interface appearance");
|
|
60
144
|
}
|
|
61
145
|
},
|
|
62
|
-
onCodeEditorVisibilityChanged(
|
|
63
|
-
|
|
146
|
+
onCodeEditorVisibilityChanged(r) {
|
|
147
|
+
o.isCodeEditorOpen = r;
|
|
64
148
|
},
|
|
65
|
-
onEditorVisualModeChanged(
|
|
66
|
-
|
|
149
|
+
onEditorVisualModeChanged(r) {
|
|
150
|
+
o.editorVisualMode = r.toLowerCase();
|
|
67
151
|
},
|
|
68
|
-
onVersionHistoryVisibilityChanged(
|
|
69
|
-
|
|
152
|
+
onVersionHistoryVisibilityChanged(r) {
|
|
153
|
+
o.isVersionHistoryOpen = r;
|
|
70
154
|
},
|
|
71
155
|
onDataChanged() {
|
|
72
|
-
|
|
156
|
+
o.hasChanges = !0;
|
|
73
157
|
},
|
|
74
|
-
|
|
75
|
-
|
|
158
|
+
onEvent: w,
|
|
159
|
+
// Error handler for Stripo runtime errors (CORS, plugin issues, etc.)
|
|
160
|
+
onError: d,
|
|
161
|
+
ignoreClickOutsideSelectors: [
|
|
162
|
+
"#guido-dynamic-content-modal",
|
|
163
|
+
".in-on-board-wrapper",
|
|
164
|
+
".in-drawer__container"
|
|
165
|
+
],
|
|
166
|
+
extensions: [
|
|
167
|
+
q,
|
|
168
|
+
H,
|
|
169
|
+
N,
|
|
170
|
+
O,
|
|
171
|
+
$,
|
|
172
|
+
L
|
|
173
|
+
]
|
|
76
174
|
}
|
|
77
175
|
);
|
|
78
|
-
},
|
|
176
|
+
}, R = (s) => new Promise((i, o) => {
|
|
177
|
+
var t;
|
|
79
178
|
if (document.getElementById("UiEditorScript")) {
|
|
80
|
-
|
|
179
|
+
s(), i();
|
|
81
180
|
return;
|
|
82
181
|
}
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
182
|
+
const u = X.guido, g = `https://email-static.useinsider.com/guido/${(t = u == null ? void 0 : u.stripo) == null ? void 0 : t.version}/UIEditor.js`, d = document.createElement("script");
|
|
183
|
+
d.id = "UiEditorScript", d.type = "module", d.src = g;
|
|
184
|
+
const r = setTimeout(() => {
|
|
185
|
+
const n = new Error("Timeout loading Stripo UIEditor script (30s)"), l = "plugin_load_timeout", a = I(l);
|
|
186
|
+
p(n, l, {
|
|
187
|
+
scriptSrc: d.src,
|
|
188
|
+
emailId: e.emailId,
|
|
189
|
+
userId: e.userId
|
|
190
|
+
}, a), c(
|
|
191
|
+
`Stripo plugin failed to load (timeout): ${d.src}`,
|
|
192
|
+
l,
|
|
193
|
+
{ emailId: e.emailId, userId: e.userId, reason: "timeout" }
|
|
194
|
+
), o(n);
|
|
195
|
+
}, 3e4);
|
|
196
|
+
d.onload = () => {
|
|
197
|
+
clearTimeout(r), s(), i();
|
|
198
|
+
}, d.onerror = (n) => {
|
|
199
|
+
clearTimeout(r);
|
|
200
|
+
const l = new Error("Failed to load Stripo UIEditor script"), a = n instanceof Event ? n.type : String(n), S = "plugin_load_error", B = I(S);
|
|
201
|
+
p(l, S, {
|
|
202
|
+
scriptSrc: d.src,
|
|
203
|
+
event: a,
|
|
204
|
+
emailId: e.emailId,
|
|
205
|
+
userId: e.userId
|
|
206
|
+
}, B), c(
|
|
207
|
+
`Stripo plugin failed to load: ${a}`,
|
|
208
|
+
S,
|
|
209
|
+
{ emailId: e.emailId, userId: e.userId, scriptSrc: d.src }
|
|
210
|
+
), o(l);
|
|
211
|
+
}, document.body.appendChild(d);
|
|
90
212
|
});
|
|
91
|
-
return { initPlugin: async (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
213
|
+
return { initPlugin: async (s) => {
|
|
214
|
+
try {
|
|
215
|
+
await R(async () => {
|
|
216
|
+
try {
|
|
217
|
+
const i = await f(
|
|
218
|
+
C(),
|
|
219
|
+
5e3,
|
|
220
|
+
// 5 second timeout for fonts
|
|
221
|
+
"load_custom_fonts",
|
|
222
|
+
{ emailId: e.emailId }
|
|
223
|
+
);
|
|
224
|
+
V(s, i);
|
|
225
|
+
} catch (i) {
|
|
226
|
+
const o = "init_editor", u = I(o);
|
|
227
|
+
throw p(i, o, {
|
|
228
|
+
templateId: e.emailId,
|
|
229
|
+
userId: e.userId,
|
|
230
|
+
hasTemplate: !!s.html
|
|
231
|
+
}, u), c(
|
|
232
|
+
"Editor initialization failed",
|
|
233
|
+
o,
|
|
234
|
+
{ emailId: e.emailId, userId: e.userId }
|
|
235
|
+
), i;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
} catch (i) {
|
|
239
|
+
const o = "init_plugin", u = I(o);
|
|
240
|
+
throw p(i, o, {
|
|
241
|
+
templateId: e.emailId,
|
|
242
|
+
userId: e.userId
|
|
243
|
+
}, u), c(
|
|
244
|
+
"Plugin initialization failed",
|
|
245
|
+
o,
|
|
246
|
+
{ emailId: e.emailId, userId: e.userId }
|
|
247
|
+
), i;
|
|
248
|
+
}
|
|
249
|
+
}, stopIdleTokenRefresh: b };
|
|
97
250
|
};
|
|
98
251
|
export {
|
|
99
|
-
|
|
252
|
+
fe as useStripo
|
|
100
253
|
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
// Critical errors: Log to Sentry + Alert Slack - Always bubble to consumers
|
|
3
|
+
plugin_load_error: {
|
|
4
|
+
type: "plugin_load_error",
|
|
5
|
+
severity: "critical",
|
|
6
|
+
captureLevel: "sentry_and_slack",
|
|
7
|
+
bubblePolicy: "always",
|
|
8
|
+
description: "Stripo UIEditor.js script failed to load"
|
|
9
|
+
},
|
|
10
|
+
plugin_load_timeout: {
|
|
11
|
+
type: "plugin_load_timeout",
|
|
12
|
+
severity: "critical",
|
|
13
|
+
captureLevel: "sentry_and_slack",
|
|
14
|
+
bubblePolicy: "always",
|
|
15
|
+
description: "Stripo script loading exceeded timeout threshold"
|
|
16
|
+
},
|
|
17
|
+
authentication_error: {
|
|
18
|
+
type: "authentication_error",
|
|
19
|
+
severity: "critical",
|
|
20
|
+
captureLevel: "sentry_and_slack",
|
|
21
|
+
bubblePolicy: "always",
|
|
22
|
+
description: "Token or authentication failure"
|
|
23
|
+
},
|
|
24
|
+
// Handled errors: Alert Slack but DON'T log to Sentry/FullStory - Never bubble (handled internally)
|
|
25
|
+
cors_error: {
|
|
26
|
+
type: "cors_error",
|
|
27
|
+
severity: "warning",
|
|
28
|
+
captureLevel: "slack_only",
|
|
29
|
+
bubblePolicy: "never",
|
|
30
|
+
description: "CORS policy blocked resource (can be caught before Sentry)"
|
|
31
|
+
},
|
|
32
|
+
// Runtime errors: Log to Sentry but DON'T alert Slack - Always bubble (consumers should know)
|
|
33
|
+
stripo_runtime_error: {
|
|
34
|
+
type: "stripo_runtime_error",
|
|
35
|
+
severity: "warning",
|
|
36
|
+
captureLevel: "sentry_only",
|
|
37
|
+
bubblePolicy: "always",
|
|
38
|
+
description: "Runtime error from Stripo editor"
|
|
39
|
+
},
|
|
40
|
+
init_editor: {
|
|
41
|
+
type: "init_editor",
|
|
42
|
+
severity: "warning",
|
|
43
|
+
captureLevel: "sentry_only",
|
|
44
|
+
bubblePolicy: "always",
|
|
45
|
+
description: "Editor initialization failure"
|
|
46
|
+
},
|
|
47
|
+
init_plugin: {
|
|
48
|
+
type: "init_plugin",
|
|
49
|
+
severity: "warning",
|
|
50
|
+
captureLevel: "sentry_only",
|
|
51
|
+
bubblePolicy: "always",
|
|
52
|
+
description: "Plugin initialization failure"
|
|
53
|
+
},
|
|
54
|
+
token_refresh: {
|
|
55
|
+
type: "token_refresh",
|
|
56
|
+
severity: "warning",
|
|
57
|
+
captureLevel: "sentry_only",
|
|
58
|
+
bubblePolicy: "always",
|
|
59
|
+
description: "Token refresh operation failed"
|
|
60
|
+
},
|
|
61
|
+
// Token recovery errors: Log to Slack - Only bubble if not recovered (401 retry failed)
|
|
62
|
+
idle_token_refresh: {
|
|
63
|
+
type: "idle_token_refresh",
|
|
64
|
+
severity: "warning",
|
|
65
|
+
captureLevel: "slack_only",
|
|
66
|
+
bubblePolicy: "never",
|
|
67
|
+
description: "Proactive token refresh (scheduled every 25 min) failed - will be retried on next request"
|
|
68
|
+
},
|
|
69
|
+
// cspell:disable-next-line
|
|
70
|
+
stale_token_refresh: {
|
|
71
|
+
type: "stale_token_refresh",
|
|
72
|
+
severity: "critical",
|
|
73
|
+
captureLevel: "sentry_and_slack",
|
|
74
|
+
// cspell:disable-next-line
|
|
75
|
+
bubblePolicy: "unrecovered_only",
|
|
76
|
+
description: "Token expired and had to be refreshed after receiving 401 error"
|
|
77
|
+
},
|
|
78
|
+
// Asset errors: Alert Slack - Never bubble (user-actionable, not code error)
|
|
79
|
+
asset_missing: {
|
|
80
|
+
type: "asset_missing",
|
|
81
|
+
severity: "warning",
|
|
82
|
+
captureLevel: "slack_only",
|
|
83
|
+
bubblePolicy: "never",
|
|
84
|
+
description: "Asset (image/resource) not found in current partner bucket - likely cross-partner template issue"
|
|
85
|
+
},
|
|
86
|
+
// Other runtime errors
|
|
87
|
+
template_loaded: {
|
|
88
|
+
type: "template_loaded",
|
|
89
|
+
severity: "warning",
|
|
90
|
+
captureLevel: "sentry_only",
|
|
91
|
+
bubblePolicy: "always",
|
|
92
|
+
description: "Template loading operation failed"
|
|
93
|
+
}
|
|
94
|
+
}, c = () => {
|
|
95
|
+
const t = (e) => {
|
|
96
|
+
const r = i[e];
|
|
97
|
+
return r || {
|
|
98
|
+
type: e,
|
|
99
|
+
severity: "warning",
|
|
100
|
+
captureLevel: "sentry_only",
|
|
101
|
+
bubblePolicy: "always",
|
|
102
|
+
description: "Unknown error type"
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
getErrorCategory: t,
|
|
107
|
+
shouldCaptureSentry: (e) => {
|
|
108
|
+
const r = t(e);
|
|
109
|
+
return ["sentry_and_slack", "sentry_only"].includes(r.captureLevel);
|
|
110
|
+
},
|
|
111
|
+
shouldNotifySlack: (e) => {
|
|
112
|
+
const r = t(e);
|
|
113
|
+
return ["sentry_and_slack", "slack_only"].includes(r.captureLevel);
|
|
114
|
+
},
|
|
115
|
+
shouldBubbleToConsumers: (e, r = !1) => {
|
|
116
|
+
switch (t(e).bubblePolicy) {
|
|
117
|
+
case "always":
|
|
118
|
+
return !0;
|
|
119
|
+
// Always bubble critical errors
|
|
120
|
+
case "never":
|
|
121
|
+
return !1;
|
|
122
|
+
// Never bubble handled/internal errors
|
|
123
|
+
// cspell:disable-next-line
|
|
124
|
+
case "unrecovered_only":
|
|
125
|
+
return !r;
|
|
126
|
+
// Only bubble if we COULDN'T recover
|
|
127
|
+
default:
|
|
128
|
+
return !0;
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
addErrorCategory: (e) => {
|
|
132
|
+
i[e.type] = e;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export {
|
|
137
|
+
c as useStripoErrorCategory
|
|
138
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useOnboardingStore as i } from "../stores/onboarding.js";
|
|
2
|
+
const c = () => {
|
|
3
|
+
const e = {
|
|
4
|
+
block_dropped: ({ blockName: t }) => {
|
|
5
|
+
if (t === "BLOCK_TEXT") {
|
|
6
|
+
const n = i(), o = !n.shouldShowOnboarding("textBlockOnboarding"), r = n.isActive("textBlockOnboarding");
|
|
7
|
+
if (o || r)
|
|
8
|
+
return;
|
|
9
|
+
n.start("textBlockOnboarding");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
return { handleEvent: async (t, n) => {
|
|
14
|
+
const o = e[t];
|
|
15
|
+
o && await o(n);
|
|
16
|
+
} };
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
c as useStripoEventHandler
|
|
20
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useStripoErrorCategory as g } from "./useStripoErrorCategory.js";
|
|
2
|
+
import { getSlackNotificationService as f } from "../services/slackNotificationService.js";
|
|
3
|
+
import { getStripoErrorDeduplicationService as u } from "../services/stripoErrorDeduplicationService.js";
|
|
4
|
+
const w = () => {
|
|
5
|
+
const c = f(), s = u(), { shouldNotifySlack: a, getErrorCategory: l } = g();
|
|
6
|
+
return {
|
|
7
|
+
notifySlack: async (o, t, r) => {
|
|
8
|
+
const e = l(t), i = a(t) || e.captureLevel === "sentry_only", S = {
|
|
9
|
+
critical: "critical",
|
|
10
|
+
warning: "high",
|
|
11
|
+
info: "low"
|
|
12
|
+
};
|
|
13
|
+
let n = o;
|
|
14
|
+
i && (n += `
|
|
15
|
+
|
|
16
|
+
_Also logged to Sentry/FullStory for analysis_`);
|
|
17
|
+
const p = {
|
|
18
|
+
title: `Stripo ${t.replace(/_/g, " ").toUpperCase()}`,
|
|
19
|
+
message: n,
|
|
20
|
+
errorType: t,
|
|
21
|
+
severity: S[e.severity] || "high",
|
|
22
|
+
context: {
|
|
23
|
+
...r,
|
|
24
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
25
|
+
environment: "production",
|
|
26
|
+
captureLevel: e.captureLevel,
|
|
27
|
+
description: e.description,
|
|
28
|
+
loggedToSentry: i
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return s.trackError({
|
|
32
|
+
errorType: t,
|
|
33
|
+
errorMessage: o,
|
|
34
|
+
errorCategory: e.severity,
|
|
35
|
+
context: {
|
|
36
|
+
...r,
|
|
37
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
38
|
+
environment: "production"
|
|
39
|
+
},
|
|
40
|
+
reportedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
41
|
+
}) ? c.sendErrorNotification(p) : !1;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
w as useStripoSlackNotifier
|
|
47
|
+
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ToasterTypeOptions as
|
|
2
|
-
import { useToasterStore as
|
|
3
|
-
import { watch as c
|
|
4
|
-
const
|
|
5
|
-
const t =
|
|
6
|
-
let
|
|
7
|
-
const
|
|
8
|
-
|
|
1
|
+
import { ToasterTypeOptions as T } from "../enums/toaster.js";
|
|
2
|
+
import { useToasterStore as u } from "../stores/toaster.js";
|
|
3
|
+
import { watch as c } from "vue";
|
|
4
|
+
const d = () => {
|
|
5
|
+
const t = u();
|
|
6
|
+
let o = null;
|
|
7
|
+
const s = () => {
|
|
8
|
+
o && (clearTimeout(o), o = null);
|
|
9
9
|
};
|
|
10
10
|
function r(e = { message: "" }) {
|
|
11
|
-
|
|
11
|
+
s(), t.hideToaster(), t.showToaster(e);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
13
|
+
function i() {
|
|
14
|
+
s(), t.hideToaster();
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function a(e, n) {
|
|
17
17
|
const m = e instanceof Error ? e.message : String(e);
|
|
18
|
-
r({ type:
|
|
18
|
+
r({ type: T.Alert, message: `${n}: ${m}` });
|
|
19
19
|
}
|
|
20
20
|
return c(
|
|
21
21
|
() => t.shouldAutoHide,
|
|
22
22
|
(e) => {
|
|
23
|
-
|
|
24
|
-
t.hideToaster(),
|
|
23
|
+
s(), e && (o = setTimeout(() => {
|
|
24
|
+
t.hideToaster(), s();
|
|
25
25
|
}, 6e3));
|
|
26
26
|
}
|
|
27
|
-
),
|
|
27
|
+
), { showToaster: r, hideToaster: i, handleError: a };
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
d as useToaster
|
|
31
31
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const c = `
|
|
2
|
+
<!--[if gte mso 9]>
|
|
3
|
+
<xml>
|
|
4
|
+
<o:OfficeDocumentSettings>
|
|
5
|
+
<o:AllowPNG></o:AllowPNG>
|
|
6
|
+
<o:PixelsPerInch>96</o:PixelsPerInch>
|
|
7
|
+
</o:OfficeDocumentSettings>
|
|
8
|
+
</xml>
|
|
9
|
+
<![endif]-->`, s = {
|
|
10
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
11
|
+
"xmlns:o": "urn:schemas-microsoft-com:office:office"
|
|
12
|
+
}, r = [
|
|
13
|
+
{
|
|
14
|
+
id: "append-office-xml",
|
|
15
|
+
description: "Appending office XML into the head if it does not exist.",
|
|
16
|
+
type: "custom",
|
|
17
|
+
processor: (e) => e.includes("<o:OfficeDocumentSettings>") ? e : e.replace("</head>", `${c}</head>`),
|
|
18
|
+
priority: 70
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "set-html-attributes",
|
|
22
|
+
description: "Appending office XML into the head if it does not exist.",
|
|
23
|
+
type: "custom",
|
|
24
|
+
processor: (e) => {
|
|
25
|
+
let t = e;
|
|
26
|
+
return Object.entries(s).forEach(([o, i]) => {
|
|
27
|
+
const n = new RegExp(`${o}="[^"]*"`);
|
|
28
|
+
t.search(n) === -1 && (t = t.replace("<html", `<html ${o}="${i}"`));
|
|
29
|
+
}), t;
|
|
30
|
+
},
|
|
31
|
+
priority: 71
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
export {
|
|
35
|
+
r as outlookCompilerRules
|
|
36
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { useRecommendation as u } from "../../composables/useRecommendation.js";
|
|
2
|
+
import { DUMMY_IMAGE_MAPPINGS as P, REGEX as i, CSS as e, CONDITIONS as E, ATTRIBUTES as r, HTML as h } from "../../enums/recommendation.js";
|
|
3
|
+
const H = [
|
|
4
|
+
{
|
|
5
|
+
id: "replace-images-with-variable-names",
|
|
6
|
+
description: "Replacing dummy images with variable names in recommendation module",
|
|
7
|
+
type: "custom",
|
|
8
|
+
processor: (a) => {
|
|
9
|
+
let t = a;
|
|
10
|
+
return Object.entries(P).forEach(([, n]) => {
|
|
11
|
+
Object.entries(n).forEach(([s, o]) => {
|
|
12
|
+
t = t.replaceAll(o, `{{${s}}}`);
|
|
13
|
+
});
|
|
14
|
+
}), t;
|
|
15
|
+
},
|
|
16
|
+
priority: 50
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "replace-recommendation-button-span-css",
|
|
20
|
+
description: "Replacing recommendation button span css",
|
|
21
|
+
type: "replace",
|
|
22
|
+
search: ".ext-product-button span,",
|
|
23
|
+
replacement: ".ext-product-button,",
|
|
24
|
+
replaceAll: !0,
|
|
25
|
+
priority: 51
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "add-recommendation-unresponsive-css",
|
|
29
|
+
description: "Adding recommendation unresponsive css",
|
|
30
|
+
type: "custom",
|
|
31
|
+
processor: (a) => {
|
|
32
|
+
const { getRecommendationCampaignData: t } = u();
|
|
33
|
+
let n = a;
|
|
34
|
+
const s = n.match(i.ID);
|
|
35
|
+
if (s) {
|
|
36
|
+
const o = [];
|
|
37
|
+
if (s.forEach((c) => {
|
|
38
|
+
const m = c.slice(35, c.length - 1).trim();
|
|
39
|
+
t(m);
|
|
40
|
+
}), o.length) {
|
|
41
|
+
const c = `width:${Math.min(...o)}px!important;`;
|
|
42
|
+
n = n.replace(e.REGULAR_NAME_HEIGHT, `${e.TRIMMED_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.REGULAR_NAME_CONTAINER_HEIGHT, e.TRIMMED_NAME_CONTAINER_CSS).replace(e.RESPONSIVE_NAME_SIZE, `${e.RESPONSIVE_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.RESPONSIVE_NAME_CONTAINER_HEIGHT, e.TRIMMED_RESPONSIVE_NAME_CONTAINER_CSS);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return n;
|
|
46
|
+
},
|
|
47
|
+
priority: 52
|
|
48
|
+
},
|
|
49
|
+
// TODO: prepareRecommendations
|
|
50
|
+
// TODO: addRecommendationCustomFields
|
|
51
|
+
{
|
|
52
|
+
id: "add-discount-conditions",
|
|
53
|
+
description: "Adding discount conditions to the recommendation block",
|
|
54
|
+
type: "custom",
|
|
55
|
+
processor: (a) => {
|
|
56
|
+
let t = a;
|
|
57
|
+
const n = t.match(i.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: s } = u();
|
|
58
|
+
return n !== null && n.forEach((o) => {
|
|
59
|
+
const c = o.match(i.CUSTOM_FIELD);
|
|
60
|
+
if (!c)
|
|
61
|
+
return;
|
|
62
|
+
const [m] = c, p = m.match(i.CUSTOM_FIELD_INDEXES_PART), A = m.match(i.CUSTOM_FIELD_NAME_PART), _ = o.match(i.ATTRIBUTE_PARAGRAPH_START_TAG);
|
|
63
|
+
if (!p || !A || !_)
|
|
64
|
+
return;
|
|
65
|
+
const [l] = p, [T] = A, [d] = _, N = T.substring(1, T.length - 2), R = d.match(i.COMPOSITION) !== null;
|
|
66
|
+
let O = m;
|
|
67
|
+
if (R) {
|
|
68
|
+
const M = l.substring(2, l.length - 3);
|
|
69
|
+
s(M);
|
|
70
|
+
}
|
|
71
|
+
const I = l.substring(2);
|
|
72
|
+
let S = "";
|
|
73
|
+
N in E.IF && (S = E.IF[N].replaceAll(`{${r.DISCOUNT}}`, `${I}${r.DISCOUNT}`).replaceAll(`{${r.OMNIBUS_DISCOUNT}}`, `${I}${r.OMNIBUS_DISCOUNT}`).replaceAll(`{${r.OMNIBUS_PRICE}}`, `${I}${r.OMNIBUS_PRICE}`));
|
|
74
|
+
const $ = `${d}${O}${h.PARAGRAPH_END_TAG}`, C = `${S}${R ? $ : o}${E.ELSE}${d}${h.PARAGRAPH_END_TAG}${E.END_IF}`;
|
|
75
|
+
t = t.replace(o, C);
|
|
76
|
+
}), t;
|
|
77
|
+
},
|
|
78
|
+
priority: 53
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
export {
|
|
82
|
+
H as recommendationCompilerRules
|
|
83
|
+
};
|