@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,43 @@
|
|
|
1
|
+
import { useHttp as c } from "../composables/useHttp.js";
|
|
2
|
+
import { URLS as a } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
import { useEditorStore as m } from "../stores/editor.js";
|
|
4
|
+
import { replaceString as s } from "../utils/genericUtil.js";
|
|
5
|
+
const l = () => {
|
|
6
|
+
const { get: o } = c();
|
|
7
|
+
return {
|
|
8
|
+
fetchRecommendationCreateData: async () => {
|
|
9
|
+
const e = m();
|
|
10
|
+
try {
|
|
11
|
+
return (await o(s(
|
|
12
|
+
"/newsletter/{id}/recommendations/get-campaign-create-data",
|
|
13
|
+
{ id: e.templateId }
|
|
14
|
+
))).data;
|
|
15
|
+
} catch (t) {
|
|
16
|
+
throw console.error("fetchUserModalState error:", t), t;
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
fetchRecommendationFilters: async () => {
|
|
20
|
+
try {
|
|
21
|
+
const { data: e } = await o("/stripo/email-recommendation-attributes");
|
|
22
|
+
return e;
|
|
23
|
+
} catch (e) {
|
|
24
|
+
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
fetchRecommendationProducts: async (e, t) => {
|
|
28
|
+
try {
|
|
29
|
+
const r = decodeURIComponent(new URLSearchParams(Object.entries(t)).toString());
|
|
30
|
+
console.debug("🏁 Recommendation API Query:", r);
|
|
31
|
+
const n = await o(
|
|
32
|
+
`${a.RECOMMENDATION_API_URL}/v2/${e}?${r}`
|
|
33
|
+
);
|
|
34
|
+
return (n == null ? void 0 : n.data) ?? [];
|
|
35
|
+
} catch (r) {
|
|
36
|
+
throw console.error("fetchRecommendationProducts error:", r), r;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
l as useRecommendationApi
|
|
43
|
+
};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var h = (t, e, r) => e in t ? d(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var i = (t, e, r) => h(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
class u {
|
|
5
|
+
constructor(e, r) {
|
|
6
|
+
i(this, "webhookUrl");
|
|
7
|
+
i(this, "channel");
|
|
8
|
+
i(this, "defaultUsername");
|
|
9
|
+
i(this, "enabled");
|
|
10
|
+
this.webhookUrl = e || void 0 || "", this.channel = (r == null ? void 0 : r.channel) || "#errors", this.defaultUsername = (r == null ? void 0 : r.username) || "Guido Error Bot", this.enabled = (r == null ? void 0 : r.enabled) !== !1, this.webhookUrl || (console.warn("[SlackNotificationService] Webhook URL not configured, Slack notifications disabled"), this.enabled = !1);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Send an error notification to Slack
|
|
14
|
+
*/
|
|
15
|
+
async sendErrorNotification(e) {
|
|
16
|
+
if (!this.enabled || !this.webhookUrl)
|
|
17
|
+
return !1;
|
|
18
|
+
try {
|
|
19
|
+
const r = this.buildErrorPayload(e), a = await fetch(this.webhookUrl, {
|
|
20
|
+
method: "POST",
|
|
21
|
+
headers: {
|
|
22
|
+
"Content-Type": "application/json"
|
|
23
|
+
},
|
|
24
|
+
body: JSON.stringify(r)
|
|
25
|
+
});
|
|
26
|
+
return a.ok ? !0 : (console.error("[SlackNotificationService] Failed to send Slack notification:", a.statusText), !1);
|
|
27
|
+
} catch (r) {
|
|
28
|
+
return console.error("[SlackNotificationService] Error sending Slack notification:", r), !1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Send a critical error that requires immediate attention
|
|
33
|
+
*/
|
|
34
|
+
async sendCriticalError(e, r, a) {
|
|
35
|
+
return this.sendErrorNotification({
|
|
36
|
+
title: e,
|
|
37
|
+
message: r,
|
|
38
|
+
errorType: "critical",
|
|
39
|
+
severity: "critical",
|
|
40
|
+
context: a,
|
|
41
|
+
timestamp: Date.now()
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Send a CORS error notification
|
|
46
|
+
*/
|
|
47
|
+
async sendCorsErrorNotification(e, r) {
|
|
48
|
+
return this.sendCriticalError(
|
|
49
|
+
"CORS Error in Stripo Email Editor",
|
|
50
|
+
"Failed to load Stripo resources due to CORS restrictions",
|
|
51
|
+
{
|
|
52
|
+
resourceUrl: e,
|
|
53
|
+
...r,
|
|
54
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Send a plugin load error notification
|
|
60
|
+
*/
|
|
61
|
+
async sendPluginLoadErrorNotification(e, r) {
|
|
62
|
+
return this.sendCriticalError(
|
|
63
|
+
"Stripo Plugin Failed to Load",
|
|
64
|
+
`Email editor initialization failed: ${e}`,
|
|
65
|
+
{
|
|
66
|
+
...r,
|
|
67
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Build Slack message payload from error notification
|
|
73
|
+
*/
|
|
74
|
+
buildErrorPayload(e) {
|
|
75
|
+
const a = {
|
|
76
|
+
critical: "#E74C3C",
|
|
77
|
+
// Red
|
|
78
|
+
high: "#E67E22",
|
|
79
|
+
// Orange
|
|
80
|
+
medium: "#F39C12",
|
|
81
|
+
// Yellow
|
|
82
|
+
low: "#3498DB"
|
|
83
|
+
// Blue
|
|
84
|
+
}[e.severity] || "#95A5A6", l = [
|
|
85
|
+
{
|
|
86
|
+
title: "Error Type",
|
|
87
|
+
value: e.errorType,
|
|
88
|
+
short: !0
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: "Severity",
|
|
92
|
+
value: e.severity.toUpperCase(),
|
|
93
|
+
short: !0
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: "Timestamp",
|
|
97
|
+
value: e.timestamp ? new Date(e.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(),
|
|
98
|
+
short: !0
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
e.context && Object.entries(e.context).forEach(([n, c]) => {
|
|
102
|
+
l.length < 20 && l.push({
|
|
103
|
+
title: this.formatFieldTitle(n),
|
|
104
|
+
value: this.formatFieldValue(c),
|
|
105
|
+
short: !0
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
const s = {
|
|
109
|
+
color: a,
|
|
110
|
+
title: e.title,
|
|
111
|
+
text: e.message,
|
|
112
|
+
fields: l,
|
|
113
|
+
footer: "Guido Error Tracking",
|
|
114
|
+
ts: Math.floor((e.timestamp || Date.now()) / 1e3)
|
|
115
|
+
};
|
|
116
|
+
return e.stackTrace && (s.text = `${e.message}
|
|
117
|
+
\`\`\`${e.stackTrace}\`\`\``), {
|
|
118
|
+
channel: this.channel,
|
|
119
|
+
username: this.defaultUsername,
|
|
120
|
+
// eslint-disable-next-line camelcase
|
|
121
|
+
icon_emoji: ":warning:",
|
|
122
|
+
attachments: [s]
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Format field title for Slack (e.g., emailId -> Email ID)
|
|
127
|
+
*/
|
|
128
|
+
formatFieldTitle(e) {
|
|
129
|
+
return e.replace(/([A-Z])/g, " $1").replace(/^./, (r) => r.toUpperCase()).trim();
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Format field value for Slack display
|
|
133
|
+
*/
|
|
134
|
+
formatFieldValue(e) {
|
|
135
|
+
return e == null ? "(empty)" : typeof e == "object" ? JSON.stringify(e).slice(0, 500) : String(e).slice(0, 500);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Check if notifications are enabled
|
|
139
|
+
*/
|
|
140
|
+
isEnabled() {
|
|
141
|
+
return this.enabled;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Update webhook URL
|
|
145
|
+
*/
|
|
146
|
+
setWebhookUrl(e) {
|
|
147
|
+
this.webhookUrl = e, this.enabled = !!e;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Update channel
|
|
151
|
+
*/
|
|
152
|
+
setChannel(e) {
|
|
153
|
+
this.channel = e;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Enable/disable notifications
|
|
157
|
+
*/
|
|
158
|
+
setEnabled(e) {
|
|
159
|
+
this.enabled = e && !!this.webhookUrl;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
let o = null;
|
|
163
|
+
const S = () => (o || (o = new u()), o);
|
|
164
|
+
export {
|
|
165
|
+
u as SlackNotificationService,
|
|
166
|
+
S as getSlackNotificationService
|
|
167
|
+
};
|
|
@@ -1,25 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useApiErrorTracking as c } from "../composables/useApiErrorTracking.js";
|
|
2
|
+
import { useHttp as p } from "../composables/useHttp.js";
|
|
3
|
+
import { useToaster as u } from "../composables/useToaster.js";
|
|
4
|
+
const k = (i) => {
|
|
5
|
+
const { get: s } = p({
|
|
6
|
+
onTokenRefresh: i
|
|
7
|
+
}), { handleError: n } = u(), { withParsingErrorTracking: a } = c();
|
|
5
8
|
return {
|
|
6
9
|
getToken: async () => {
|
|
7
10
|
try {
|
|
8
|
-
const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await
|
|
9
|
-
return
|
|
11
|
+
const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await s(`/stripo/get-user-token?test=${t}`);
|
|
12
|
+
return a(
|
|
13
|
+
() => {
|
|
14
|
+
var o;
|
|
15
|
+
if (!((o = e == null ? void 0 : e.body) != null && o.token))
|
|
16
|
+
throw new Error("Invalid token response: missing token in response body");
|
|
17
|
+
return e.body.token;
|
|
18
|
+
},
|
|
19
|
+
"/stripo/get-user-token",
|
|
20
|
+
e,
|
|
21
|
+
{ endpoint: "/stripo/get-user-token", operation: "getToken" }
|
|
22
|
+
);
|
|
10
23
|
} catch (t) {
|
|
11
|
-
return
|
|
24
|
+
return n(t, "Failed to fetch token"), "";
|
|
12
25
|
}
|
|
13
26
|
},
|
|
14
27
|
getCustomFonts: async () => {
|
|
15
28
|
try {
|
|
16
|
-
const { data: t = [] } = await
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
const { data: t = [] } = await s("/stripo/get-partner-custom-fonts");
|
|
30
|
+
return a(
|
|
31
|
+
() => {
|
|
32
|
+
if (!Array.isArray(t))
|
|
33
|
+
throw new Error("Invalid fonts response: expected array");
|
|
34
|
+
return t.map((r) => ({
|
|
35
|
+
...r,
|
|
36
|
+
active: !0
|
|
37
|
+
}));
|
|
38
|
+
},
|
|
39
|
+
"/stripo/get-partner-custom-fonts",
|
|
40
|
+
t,
|
|
41
|
+
{ endpoint: "/stripo/get-partner-custom-fonts", operation: "getCustomFonts" }
|
|
42
|
+
);
|
|
21
43
|
} catch (t) {
|
|
22
|
-
return
|
|
44
|
+
return n(t, "Failed to fetch custom fonts"), [];
|
|
23
45
|
}
|
|
24
46
|
},
|
|
25
47
|
getDefaultTemplate: async () => {
|
|
@@ -29,21 +51,31 @@ const m = () => {
|
|
|
29
51
|
forceRecreate: !0
|
|
30
52
|
};
|
|
31
53
|
try {
|
|
32
|
-
const { data: e } = await
|
|
54
|
+
const { data: e } = await s("/stripo/default-template");
|
|
33
55
|
try {
|
|
34
56
|
return {
|
|
35
|
-
...
|
|
57
|
+
...a(
|
|
58
|
+
() => {
|
|
59
|
+
const o = JSON.parse(e);
|
|
60
|
+
if (!o.html)
|
|
61
|
+
throw new Error("Invalid template response: missing html field");
|
|
62
|
+
return o;
|
|
63
|
+
},
|
|
64
|
+
"/stripo/default-template",
|
|
65
|
+
e,
|
|
66
|
+
{ endpoint: "/stripo/default-template", operation: "getDefaultTemplate" }
|
|
67
|
+
),
|
|
36
68
|
forceRecreate: !0
|
|
37
69
|
};
|
|
38
|
-
} catch {
|
|
39
|
-
return t;
|
|
70
|
+
} catch (r) {
|
|
71
|
+
return r instanceof Error && !r.message.includes("Invalid template") && n(r, "Failed to parse template as JSON"), t;
|
|
40
72
|
}
|
|
41
73
|
} catch (e) {
|
|
42
|
-
return
|
|
74
|
+
return n(e, "Failed to fetch default template"), t;
|
|
43
75
|
}
|
|
44
76
|
}
|
|
45
77
|
};
|
|
46
78
|
};
|
|
47
79
|
export {
|
|
48
|
-
|
|
80
|
+
k as useStripoApi
|
|
49
81
|
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var a = (e, r, t) => r in e ? c(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
3
|
+
var n = (e, r, t) => a(e, typeof r != "symbol" ? r + "" : r, t);
|
|
4
|
+
class s {
|
|
5
|
+
constructor() {
|
|
6
|
+
n(this, "reportedErrors", /* @__PURE__ */ new Set());
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Track an error locally to prevent duplicate Slack alerts
|
|
10
|
+
* Only sends Slack alert once per unique error within the same session
|
|
11
|
+
*/
|
|
12
|
+
trackError(r) {
|
|
13
|
+
const t = this.getDeduplicationKey(r);
|
|
14
|
+
return this.reportedErrors.has(t) ? !1 : (this.reportedErrors.add(t), !0);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Track plugin load error locally (CORS, script failure, timeout)
|
|
18
|
+
*/
|
|
19
|
+
trackPluginLoadError(r, t) {
|
|
20
|
+
return this.trackError({
|
|
21
|
+
errorType: "plugin_load_error",
|
|
22
|
+
errorMessage: r,
|
|
23
|
+
errorCategory: "critical",
|
|
24
|
+
context: {
|
|
25
|
+
...t,
|
|
26
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
27
|
+
environment: "production"
|
|
28
|
+
},
|
|
29
|
+
reportedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Track CORS error locally
|
|
34
|
+
*/
|
|
35
|
+
trackCorsError(r, t) {
|
|
36
|
+
return this.trackError({
|
|
37
|
+
errorType: "cors_error",
|
|
38
|
+
errorMessage: r,
|
|
39
|
+
errorCategory: "handled",
|
|
40
|
+
context: {
|
|
41
|
+
...t,
|
|
42
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
43
|
+
environment: "production"
|
|
44
|
+
},
|
|
45
|
+
reportedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Track authentication error locally (token refresh failure)
|
|
50
|
+
* Tracks it, but Slack notifier decides whether to alert based on token expiration
|
|
51
|
+
*/
|
|
52
|
+
trackAuthenticationError(r, t) {
|
|
53
|
+
return this.trackError({
|
|
54
|
+
errorType: "authentication_error",
|
|
55
|
+
errorMessage: r,
|
|
56
|
+
errorCategory: "critical",
|
|
57
|
+
context: {
|
|
58
|
+
...t,
|
|
59
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
60
|
+
environment: "production"
|
|
61
|
+
},
|
|
62
|
+
reportedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Generate unique deduplication key for error
|
|
67
|
+
* Format: "errorType:emailId:userId" to allow same error on different emails
|
|
68
|
+
*/
|
|
69
|
+
getDeduplicationKey(r) {
|
|
70
|
+
const t = r.context.emailId || "unknown", i = r.context.userId || "unknown";
|
|
71
|
+
return `${r.errorType}:${t}:${i}`;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Clear tracked errors (for testing or session reset)
|
|
75
|
+
*/
|
|
76
|
+
clearTrackedErrors() {
|
|
77
|
+
this.reportedErrors.clear();
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get count of errors tracked in this session
|
|
81
|
+
*/
|
|
82
|
+
getTrackedErrorCount() {
|
|
83
|
+
return this.reportedErrors.size;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
let o = null;
|
|
87
|
+
const u = () => (o || (o = new s()), o);
|
|
88
|
+
export {
|
|
89
|
+
s as StripoErrorDeduplicationService,
|
|
90
|
+
u as getStripoErrorDeduplicationService
|
|
91
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useHttp as t } from "../composables/useHttp.js";
|
|
2
|
+
import { useToaster as n } from "../composables/useToaster.js";
|
|
3
|
+
const u = () => {
|
|
4
|
+
const { get: r } = t(), { handleError: s } = n();
|
|
5
|
+
return { getUnsubscribePages: async () => {
|
|
6
|
+
try {
|
|
7
|
+
const { data: e = [] } = await r("/unsubscribe-pages/get-all");
|
|
8
|
+
return e;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
return s(e, "Failed to fetch unsubscribe pages"), [];
|
|
11
|
+
}
|
|
12
|
+
} };
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
u as useUnsubscribeApi
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type StripoEventType = 'save' | 'export' | 'close' | 'autosave' | 'publish' | 'export:requested' | 'export:ready';
|
|
2
|
+
export interface EventHandler {
|
|
3
|
+
(params: Record<string, string>): void | Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export interface EventHandlers {
|
|
6
|
+
[eventType: string]: EventHandler;
|
|
7
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { CompilerRule } from './html-compiler';
|
|
2
|
+
type Extensions = {
|
|
3
|
+
unsubscribe?: boolean;
|
|
4
|
+
};
|
|
2
5
|
type Features = {
|
|
3
6
|
dynamicContent?: boolean;
|
|
4
7
|
saveAsTemplate?: boolean;
|
|
@@ -16,12 +19,22 @@ export type GuidoConfig = {
|
|
|
16
19
|
useHeader?: boolean;
|
|
17
20
|
emailHeader: EmailHeader;
|
|
18
21
|
partner?: Partner;
|
|
22
|
+
extensions?: Extensions;
|
|
19
23
|
features?: Features;
|
|
20
24
|
};
|
|
25
|
+
export type TemplateConfig = {
|
|
26
|
+
preselectedDynamicContentList?: DynamicContent[];
|
|
27
|
+
selectedUnsubscribePages?: number[];
|
|
28
|
+
variationId?: string;
|
|
29
|
+
};
|
|
21
30
|
export type DynamicContent = {
|
|
22
31
|
value: string;
|
|
23
32
|
text: string;
|
|
24
33
|
fallback?: string;
|
|
34
|
+
format?: {
|
|
35
|
+
key: string;
|
|
36
|
+
value: string;
|
|
37
|
+
};
|
|
25
38
|
};
|
|
26
39
|
export interface EmailHeader {
|
|
27
40
|
senderName: string;
|
|
@@ -42,4 +55,8 @@ export type MergeTag = {
|
|
|
42
55
|
label: string;
|
|
43
56
|
value: string;
|
|
44
57
|
};
|
|
58
|
+
export type TextValueObject = {
|
|
59
|
+
text: string;
|
|
60
|
+
value: string;
|
|
61
|
+
};
|
|
45
62
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
|
|
1
|
+
import type { DynamicContent, GuidoConfig, TemplateConfig } from '@@/Types/generic';
|
|
2
2
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
templateId: string;
|
|
@@ -9,8 +9,9 @@ type __VLS_Props = {
|
|
|
9
9
|
username?: string;
|
|
10
10
|
html?: string;
|
|
11
11
|
css?: string;
|
|
12
|
-
preselectedDynamicContentList: DynamicContent[];
|
|
13
12
|
guidoConfig: GuidoConfig;
|
|
13
|
+
templateConfig?: TemplateConfig;
|
|
14
|
+
traceId?: string;
|
|
14
15
|
};
|
|
15
16
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
16
17
|
dynamicContent: {
|
|
@@ -18,12 +19,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
18
19
|
close: () => void;
|
|
19
20
|
};
|
|
20
21
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
22
|
+
saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
|
|
21
23
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
22
24
|
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
23
25
|
back: () => void;
|
|
24
26
|
"save:start": () => void;
|
|
25
27
|
"save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
|
|
26
|
-
"on-change": () => void;
|
|
28
|
+
"on-change": (hasChanges: boolean) => void;
|
|
29
|
+
ready: () => void;
|
|
27
30
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
28
31
|
export default _default;
|
|
29
32
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Filter } from '@@/Types/recommendation';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
filter: Filter;
|
|
4
|
+
index: number;
|
|
5
|
+
hasLogicAdapter?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
8
|
+
"delete-filter": (filter: Filter) => void;
|
|
9
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
+
type __VLS_TypePropsToOption<T> = {
|
|
13
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
+
} : {
|
|
16
|
+
type: import('vue').PropType<T[K]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
logic?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
5
|
+
change: (value: string) => void;
|
|
6
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
+
type __VLS_TypePropsToOption<T> = {
|
|
10
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
+
} : {
|
|
13
|
+
type: import('vue').PropType<T[K]>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo.js").SavedTemplateDetails | undefined> | undefined;
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo").SavedTemplateDetails | undefined>;
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -2,7 +2,7 @@ import type { FooterButtonGroupOptions } from '@@/Types/wrappers/wp-drawer';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
id: string;
|
|
4
4
|
className?: string;
|
|
5
|
-
size?:
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
6
|
closeOnOutsideClick?: boolean;
|
|
7
7
|
descriptionStatus?: boolean;
|
|
8
8
|
descriptionText?: string;
|
|
@@ -10,9 +10,11 @@ interface Props {
|
|
|
10
10
|
status: boolean;
|
|
11
11
|
titleText: string;
|
|
12
12
|
}
|
|
13
|
-
declare var __VLS_12: {};
|
|
13
|
+
declare var __VLS_12: {}, __VLS_14: {};
|
|
14
14
|
type __VLS_Slots = {} & {
|
|
15
|
-
|
|
15
|
+
headerBottomSlot?: (props: typeof __VLS_12) => any;
|
|
16
|
+
} & {
|
|
17
|
+
default?: (props: typeof __VLS_14) => any;
|
|
16
18
|
};
|
|
17
19
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
18
20
|
className: string;
|
|
@@ -32,7 +34,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
32
34
|
descriptionText: string;
|
|
33
35
|
}>>>, {
|
|
34
36
|
className: string;
|
|
35
|
-
size:
|
|
37
|
+
size: "small" | "medium" | "large";
|
|
36
38
|
closeOnOutsideClick: boolean;
|
|
37
39
|
descriptionStatus: boolean;
|
|
38
40
|
descriptionText: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HttpError, HttpResponse } from '@@/Composables/useHttp';
|
|
2
|
+
/**
|
|
3
|
+
* API error context with request/response details
|
|
4
|
+
*/
|
|
5
|
+
export interface ApiErrorContext {
|
|
6
|
+
endpoint: string;
|
|
7
|
+
method?: string;
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
statusText?: string;
|
|
10
|
+
errorType?: 'http_error' | 'network_error' | 'parsing_error' | 'timeout';
|
|
11
|
+
attemptNumber?: number;
|
|
12
|
+
retryable?: boolean;
|
|
13
|
+
context?: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Tracks API failures including HTTP errors, network issues, and data parsing failures
|
|
18
|
+
* Integrates with the main error tracking system (Sentry + FullStory)
|
|
19
|
+
* Routes errors to Slack/Sentry based on error categorization
|
|
20
|
+
*/
|
|
21
|
+
export declare const useApiErrorTracking: () => {
|
|
22
|
+
captureHttpError: (error: HttpError, endpoint: string, options?: Omit<ApiErrorContext, "endpoint">) => ApiErrorContext;
|
|
23
|
+
captureNetworkError: (error: Error, endpoint: string, options?: Omit<ApiErrorContext, "endpoint">) => ApiErrorContext;
|
|
24
|
+
captureParsingError: (error: unknown, endpoint: string, responseData?: unknown, options?: Omit<ApiErrorContext, "endpoint">) => ApiErrorContext;
|
|
25
|
+
captureTimeoutError: (endpoint: string, timeoutMs: number, options?: Omit<ApiErrorContext, "endpoint">) => ApiErrorContext;
|
|
26
|
+
withApiErrorTracking: <T>(apiCall: () => Promise<HttpResponse<T>>, endpoint: string, method?: string, options?: Omit<ApiErrorContext, "endpoint">) => Promise<HttpResponse<T>>;
|
|
27
|
+
withParsingErrorTracking: <T>(parser: () => T, endpoint: string, rawResponse?: unknown, options?: Omit<ApiErrorContext, "endpoint">) => T;
|
|
28
|
+
};
|