@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.
Files changed (399) hide show
  1. package/README.md +32 -2
  2. package/dist/components/Guido.vue.js +7 -7
  3. package/dist/components/Guido.vue2.js +111 -68
  4. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  5. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
  6. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
  7. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
  8. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
  9. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
  10. package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
  11. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
  12. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
  13. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
  14. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  15. package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -9
  16. package/dist/components/organisms/header/LeftSlot.vue.js +10 -10
  17. package/dist/components/organisms/header/LeftSlot.vue2.js +23 -10
  18. package/dist/components/organisms/header/RightSlot.vue.js +5 -3
  19. package/dist/components/organisms/header/RightSlot.vue2.js +26 -27
  20. package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
  21. package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
  22. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  23. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  24. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +20 -0
  25. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +37 -0
  26. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +21 -0
  27. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +83 -0
  28. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +17 -0
  29. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +30 -0
  30. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +19 -0
  31. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -0
  32. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +21 -0
  33. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +74 -0
  34. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +20 -0
  35. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +37 -0
  36. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +18 -0
  37. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +16 -0
  38. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +24 -0
  39. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +64 -0
  40. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +18 -0
  41. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +107 -0
  42. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +18 -0
  43. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +12 -0
  44. package/dist/components/wrappers/WpDrawer.vue.js +6 -4
  45. package/dist/composables/useApiErrorTracking.js +137 -0
  46. package/dist/composables/useCustomInterfaceAppearance.js +22 -18
  47. package/dist/composables/useErrorTracking.js +98 -0
  48. package/dist/composables/useHtmlCompiler.js +17 -9
  49. package/dist/composables/useHtmlValidator.js +148 -0
  50. package/dist/composables/useHttp.js +127 -60
  51. package/dist/composables/usePartner.js +16 -9
  52. package/dist/composables/useRecommendation.js +27 -0
  53. package/dist/composables/useSave.js +15 -0
  54. package/dist/composables/useStripo.js +206 -53
  55. package/dist/composables/useStripoErrorCategory.js +138 -0
  56. package/dist/composables/useStripoEventHandler.js +20 -0
  57. package/dist/composables/useStripoSlackNotifier.js +47 -0
  58. package/dist/composables/useToaster.js +17 -17
  59. package/dist/config/compiler/outlookCompilerRules.js +36 -0
  60. package/dist/config/compiler/recommendationCompilerRules.js +83 -0
  61. package/dist/config/compiler/socialCompilerRules.js +21 -0
  62. package/dist/config/compiler/unsubscribeCompilerRules.js +77 -0
  63. package/dist/config/migrator/checkboxMigrator.js +83 -0
  64. package/dist/config/migrator/couponBlockMigrator.js +67 -0
  65. package/dist/config/migrator/index.js +11 -0
  66. package/dist/config/migrator/radioButtonMigrator.js +86 -0
  67. package/dist/config/migrator/unsubscribeMigrator.js +124 -0
  68. package/dist/enums/defaults.js +48 -9
  69. package/dist/enums/extensions/recommendationBlock.js +80 -0
  70. package/dist/enums/html-validator.js +7 -0
  71. package/dist/enums/onboarding.js +8 -0
  72. package/dist/enums/recommendation.js +56 -0
  73. package/dist/enums/unsubscribe.js +54 -0
  74. package/dist/extensions/Blocks/Checkbox/block.js +30 -0
  75. package/dist/extensions/Blocks/Checkbox/control.js +92 -0
  76. package/dist/extensions/Blocks/Checkbox/extension.js +9 -0
  77. package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +18 -0
  78. package/dist/extensions/Blocks/Checkbox/settingsPanel.js +25 -0
  79. package/dist/extensions/Blocks/Checkbox/template.js +64 -0
  80. package/dist/extensions/Blocks/CouponBlock/block.js +33 -0
  81. package/dist/extensions/Blocks/CouponBlock/extension.js +8 -0
  82. package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +33 -0
  83. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +24 -0
  84. package/dist/extensions/Blocks/CouponBlock/template.js +18 -0
  85. package/dist/extensions/Blocks/RadioButton/block.js +30 -0
  86. package/dist/extensions/Blocks/RadioButton/control.js +92 -0
  87. package/dist/extensions/Blocks/RadioButton/extension.js +9 -0
  88. package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +14 -0
  89. package/dist/extensions/Blocks/RadioButton/settingsPanel.js +26 -0
  90. package/dist/extensions/Blocks/RadioButton/template.js +149 -0
  91. package/dist/extensions/Blocks/Recommendation/block.js +27 -0
  92. package/dist/extensions/Blocks/Recommendation/control.js +277 -0
  93. package/dist/extensions/Blocks/Recommendation/extension.js +10 -0
  94. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
  95. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
  96. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +32 -0
  97. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
  98. package/dist/extensions/Blocks/Recommendation/template.js +200 -0
  99. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
  100. package/dist/extensions/Blocks/Unsubscribe/block.js +131 -0
  101. package/dist/extensions/Blocks/Unsubscribe/control.js +167 -0
  102. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +42 -0
  103. package/dist/extensions/Blocks/Unsubscribe/extension.js +21 -0
  104. package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +21 -0
  105. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +35 -0
  106. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +42 -0
  107. package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +10 -0
  108. package/dist/extensions/Blocks/Unsubscribe/template.js +22 -0
  109. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +11 -0
  110. package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +6 -0
  111. package/dist/extensions/Blocks/common-control.js +102 -0
  112. package/dist/extensions/DynamicContent/dynamic-content.js +21 -21
  113. package/dist/extensions/DynamicContent/extension.js +6 -6
  114. package/dist/guido.css +1 -1
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +659 -0
  116. package/dist/package.json.js +7 -0
  117. package/dist/services/onboardingApi.js +23 -0
  118. package/dist/services/recommendationApi.js +43 -0
  119. package/dist/services/slackNotificationService.js +167 -0
  120. package/dist/services/stripoApi.js +51 -19
  121. package/dist/services/stripoErrorDeduplicationService.js +91 -0
  122. package/dist/services/unsubscribeApi.js +16 -0
  123. package/dist/src/@types/events.d.ts +7 -0
  124. package/dist/{@types → src/@types}/generic.d.ts +17 -0
  125. package/dist/{components → src/components}/Guido.vue.d.ts +6 -3
  126. package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
  127. package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
  128. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +4 -0
  129. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +4 -0
  130. package/dist/src/components/organisms/onboarding/GenericOnboarding.vue.d.ts +2 -0
  131. package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +2 -0
  132. package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +2 -0
  133. package/dist/src/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +2 -0
  134. package/dist/src/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +2 -0
  135. package/dist/src/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
  136. package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +2 -0
  137. package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +2 -0
  138. package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +2 -0
  139. package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +2 -0
  140. package/dist/{components → src/components}/wrappers/WpDrawer.vue.d.ts +6 -4
  141. package/dist/src/composables/useApiErrorTracking.d.ts +28 -0
  142. package/dist/src/composables/useErrorTracking.d.ts +30 -0
  143. package/dist/src/composables/useHtmlValidator.d.ts +4 -0
  144. package/dist/{composables → src/composables}/useHttp.d.ts +2 -0
  145. package/dist/{composables → src/composables}/usePartner.d.ts +1 -0
  146. package/dist/src/composables/useRecommendation.d.ts +19 -0
  147. package/dist/src/composables/useSave.d.ts +4 -0
  148. package/dist/{composables → src/composables}/useStripo.d.ts +1 -0
  149. package/dist/src/composables/useStripoErrorCategory.d.ts +29 -0
  150. package/dist/src/composables/useStripoEventHandler.d.ts +3 -0
  151. package/dist/src/composables/useStripoSlackNotifier.d.ts +8 -0
  152. package/dist/src/config/compiler/outlookCompilerRules.d.ts +2 -0
  153. package/dist/src/config/compiler/recommendationCompilerRules.d.ts +2 -0
  154. package/dist/src/config/compiler/socialCompilerRules.d.ts +2 -0
  155. package/dist/src/config/compiler/unsubscribeCompilerRules.d.ts +2 -0
  156. package/dist/src/config/migrator/checkboxMigrator.d.ts +1 -0
  157. package/dist/src/config/migrator/couponBlockMigrator.d.ts +1 -0
  158. package/dist/src/config/migrator/index.d.ts +1 -0
  159. package/dist/src/config/migrator/radioButtonMigrator.d.ts +1 -0
  160. package/dist/src/config/migrator/unsubscribeMigrator.d.ts +1 -0
  161. package/dist/{enums → src/enums}/defaults.d.ts +6 -1
  162. package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
  163. package/dist/src/enums/html-validator.d.ts +6 -0
  164. package/dist/src/enums/onboarding.d.ts +1 -0
  165. package/dist/src/enums/recommendation.d.ts +54 -0
  166. package/dist/src/enums/unsubscribe.d.ts +38 -0
  167. package/dist/src/extensions/Blocks/Checkbox/block.d.ts +11 -0
  168. package/dist/src/extensions/Blocks/Checkbox/control.d.ts +22 -0
  169. package/dist/src/extensions/Blocks/Checkbox/iconsRegistry.d.ts +4 -0
  170. package/dist/src/extensions/Blocks/Checkbox/settingsPanel.d.ts +4 -0
  171. package/dist/src/extensions/Blocks/Checkbox/template.d.ts +6 -0
  172. package/dist/src/extensions/Blocks/CouponBlock/block.d.ts +12 -0
  173. package/dist/src/extensions/Blocks/CouponBlock/extension.d.ts +2 -0
  174. package/dist/src/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +4 -0
  175. package/dist/src/extensions/Blocks/CouponBlock/settingsPanel.d.ts +4 -0
  176. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +3 -0
  177. package/dist/src/extensions/Blocks/RadioButton/block.d.ts +11 -0
  178. package/dist/src/extensions/Blocks/RadioButton/control.d.ts +17 -0
  179. package/dist/src/extensions/Blocks/RadioButton/extension.d.ts +2 -0
  180. package/dist/src/extensions/Blocks/RadioButton/iconsRegistry.d.ts +4 -0
  181. package/dist/src/extensions/Blocks/RadioButton/settingsPanel.d.ts +4 -0
  182. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +6 -0
  183. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  184. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +29 -0
  185. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +2 -0
  186. package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
  187. package/dist/src/extensions/Blocks/Recommendation/settingsPanel.d.ts +4 -0
  188. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
  189. package/dist/src/extensions/Blocks/Recommendation/template.d.ts +6 -0
  190. package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
  191. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +32 -0
  192. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +29 -0
  193. package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +11 -0
  194. package/dist/src/extensions/Blocks/Unsubscribe/extension.d.ts +2 -0
  195. package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +4 -0
  196. package/dist/src/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +4 -0
  197. package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +4 -0
  198. package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +12 -0
  199. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +9 -0
  200. package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +7 -0
  201. package/dist/src/extensions/Blocks/_Boilerplate/block.d.ts +11 -0
  202. package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +17 -0
  203. package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +2 -0
  204. package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +4 -0
  205. package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
  206. package/dist/src/extensions/Blocks/_Boilerplate/template.d.ts +6 -0
  207. package/dist/src/extensions/Blocks/common-control.d.ts +66 -0
  208. package/dist/src/extensions/DynamicContent/extension.d.ts +2 -0
  209. package/dist/src/mock/api/template-library.d.ts +2 -0
  210. package/dist/src/mock/api/unsubscribe.d.ts +2 -0
  211. package/dist/src/mock/api/user-modal-state.d.ts +2 -0
  212. package/dist/src/mock/api/validator.d.ts +2 -0
  213. package/dist/src/services/onboardingApi.d.ts +4 -0
  214. package/dist/src/services/recommendationApi.d.ts +6 -0
  215. package/dist/src/services/slackNotificationService.d.ts +110 -0
  216. package/dist/{services → src/services}/stripoApi.d.ts +1 -1
  217. package/dist/src/services/stripoErrorDeduplicationService.d.ts +75 -0
  218. package/dist/src/services/unsubscribeApi.d.ts +4 -0
  219. package/dist/src/stores/config.d.ts +96 -0
  220. package/dist/{stores → src/stores}/dynamic-content.d.ts +12 -0
  221. package/dist/{stores → src/stores}/editor.d.ts +42 -0
  222. package/dist/src/stores/onboarding.d.ts +1068 -0
  223. package/dist/src/stores/recommendation.d.ts +10 -0
  224. package/dist/src/stores/unsubscribe.d.ts +256 -0
  225. package/dist/src/utils/genericUtil.d.ts +9 -0
  226. package/dist/static/assets/onboarding-img.svg.js +4 -0
  227. package/dist/static/styles/components/alert-message.css.js +32 -2
  228. package/dist/static/styles/components/button.css.js +32 -2
  229. package/dist/static/styles/components/notification.css.js +55 -0
  230. package/dist/static/styles/components/popup.css.js +68 -0
  231. package/dist/static/styles/components/wide-panel.css.js +5 -1
  232. package/dist/static/styles/customEditorStyle.css.js +6 -0
  233. package/dist/static/styles/variables.css.js +10 -0
  234. package/dist/stores/config.js +17 -0
  235. package/dist/stores/dynamic-content.js +7 -6
  236. package/dist/stores/editor.js +3 -1
  237. package/dist/stores/onboarding.js +95 -0
  238. package/dist/stores/recommendation.js +9 -0
  239. package/dist/stores/unsubscribe.js +129 -0
  240. package/dist/utils/genericUtil.js +9 -5
  241. package/dist/utils/templatePreparation.js +25 -17
  242. package/package.json +11 -5
  243. package/dist/@types/events.d.ts +0 -1
  244. package/dist/_virtual/AddCustomFont.js +0 -4
  245. package/dist/_virtual/AiAssistantValueType.js +0 -4
  246. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  247. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  248. package/dist/_virtual/Block.js +0 -4
  249. package/dist/_virtual/BlockAttributes.js +0 -4
  250. package/dist/_virtual/BlockCompositionType.js +0 -4
  251. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  252. package/dist/_virtual/BlockRenderer.js +0 -4
  253. package/dist/_virtual/BlockType.js +0 -4
  254. package/dist/_virtual/BlocksPanel.js +0 -4
  255. package/dist/_virtual/BuiltInControl.js +0 -4
  256. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  257. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  258. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  259. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  260. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  261. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  262. package/dist/_virtual/ContextAction.js +0 -4
  263. package/dist/_virtual/ContextActionType.js +0 -4
  264. package/dist/_virtual/Control.js +0 -4
  265. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  266. package/dist/_virtual/Extension.js +0 -4
  267. package/dist/_virtual/ExtensionBuilder.js +0 -4
  268. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  269. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  270. package/dist/_virtual/ModificationDescription.js +0 -4
  271. package/dist/_virtual/PanelPosition.js +0 -4
  272. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  273. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  274. package/dist/_virtual/SettingsPanelTab.js +0 -4
  275. package/dist/_virtual/SettingsTab.js +0 -4
  276. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  277. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  278. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  279. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  280. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  281. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  282. package/dist/_virtual/UIElement.js +0 -4
  283. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  284. package/dist/_virtual/UIElementType.js +0 -4
  285. package/dist/_virtual/UIElementsAttributes.js +0 -4
  286. package/dist/_virtual/index.js +0 -5
  287. package/dist/_virtual/index2.js +0 -4
  288. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  289. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
  290. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
  291. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
  292. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  293. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  294. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  295. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  296. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
  297. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  298. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
  299. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
  300. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
  301. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
  302. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
  303. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
  304. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
  305. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
  306. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
  307. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
  308. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  309. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  310. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  311. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  312. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  313. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  314. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  315. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  316. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  317. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
  318. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  319. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  320. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
  321. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
  322. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  323. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  324. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  325. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  326. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  327. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  328. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
  329. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
  330. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
  331. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
  332. package/dist/utils/genericUtil.d.ts +0 -3
  333. /package/dist/{@types → src/@types}/save-as-template.d.ts +0 -0
  334. /package/dist/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
  335. /package/dist/{components → src/components}/organisms/LoadingWrapper.vue.d.ts +0 -0
  336. /package/dist/{components → src/components}/organisms/base/Toaster.vue.d.ts +0 -0
  337. /package/dist/{components → src/components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
  338. /package/dist/{components → src/components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
  339. /package/dist/{components → src/components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
  340. /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
  341. /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
  342. /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
  343. /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
  344. /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
  345. /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
  346. /package/dist/{components/organisms/header/HeaderWrapper.vue.d.ts → src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts} +0 -0
  347. /package/dist/{components/organisms/header/LeftSlot.vue.d.ts → src/components/organisms/extensions/recommendation/Filters.vue.d.ts} +0 -0
  348. /package/dist/{components/organisms/header/MiddleSlot.vue.d.ts → src/components/organisms/header/LeftSlot.vue.d.ts} +0 -0
  349. /package/dist/{components/organisms/header/RightSlot.vue.d.ts → src/components/organisms/header/MiddleSlot.vue.d.ts} +0 -0
  350. /package/dist/{components → src/components}/organisms/header/ViewOptions.vue.d.ts +0 -0
  351. /package/dist/{components → src/components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
  352. /package/dist/{components → src/components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
  353. /package/dist/{components → src/components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
  354. /package/dist/{components → src/components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
  355. /package/dist/{components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts → src/components/organisms/onboarding/AMPOnboarding.vue.d.ts} +0 -0
  356. /package/dist/{components → src/components}/wrappers/WpModal.vue.d.ts +0 -0
  357. /package/dist/{composables → src/composables}/useActionsApi.d.ts +0 -0
  358. /package/dist/{composables → src/composables}/useApiExample.d.ts +0 -0
  359. /package/dist/{composables → src/composables}/useCodeEditorApi.d.ts +0 -0
  360. /package/dist/{composables → src/composables}/useConfig.d.ts +0 -0
  361. /package/dist/{composables → src/composables}/useCustomInterfaceAppearance.d.ts +0 -0
  362. /package/dist/{composables → src/composables}/useDebounce.d.ts +0 -0
  363. /package/dist/{composables → src/composables}/useExport.d.ts +0 -0
  364. /package/dist/{composables → src/composables}/useGuidoActions.d.ts +0 -0
  365. /package/dist/{composables → src/composables}/useHtmlCompiler.d.ts +0 -0
  366. /package/dist/{composables → src/composables}/usePreviewMode.d.ts +0 -0
  367. /package/dist/{composables → src/composables}/useProvideInject.d.ts +0 -0
  368. /package/dist/{composables → src/composables}/useResponsivePreview.d.ts +0 -0
  369. /package/dist/{composables → src/composables}/useToaster.d.ts +0 -0
  370. /package/dist/{composables → src/composables}/useTranslations.d.ts +0 -0
  371. /package/dist/{composables → src/composables}/useValidation.d.ts +0 -0
  372. /package/dist/{composables → src/composables}/useVersionHistoryApi.d.ts +0 -0
  373. /package/dist/{composables → src/composables}/validators/saveAsTemplate.d.ts +0 -0
  374. /package/dist/{config → src/config}/compiler/htmlCompilerRules.d.ts +0 -0
  375. /package/dist/{enums → src/enums}/displayConditions.d.ts +0 -0
  376. /package/dist/{enums → src/enums}/preview.d.ts +0 -0
  377. /package/dist/{enums → src/enums}/toaster.d.ts +0 -0
  378. /package/dist/{extensions/DynamicContent → src/extensions/Blocks/Checkbox}/extension.d.ts +0 -0
  379. /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
  380. /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content.d.ts +0 -0
  381. /package/dist/{library.d.ts → src/library.d.ts} +0 -0
  382. /package/dist/{main.d.ts → src/main.d.ts} +0 -0
  383. /package/dist/{mock → src/mock}/api/auth.d.ts +0 -0
  384. /package/dist/{mock → src/mock}/api/custom-fonts.d.ts +0 -0
  385. /package/dist/{mock → src/mock}/api/default-template.d.ts +0 -0
  386. /package/dist/{mock/api/template-library.d.ts → src/mock/api/recommendation.d.ts} +0 -0
  387. /package/dist/{mock → src/mock}/browser.d.ts +0 -0
  388. /package/dist/{mock → src/mock}/handlers.d.ts +0 -0
  389. /package/dist/{services → src/services}/templateLibraryApi.d.ts +0 -0
  390. /package/dist/{stores → src/stores}/preview.d.ts +0 -0
  391. /package/dist/{stores → src/stores}/save-as-template.d.ts +0 -0
  392. /package/dist/{stores → src/stores}/toaster.d.ts +0 -0
  393. /package/dist/{stores → src/stores}/version-history.d.ts +0 -0
  394. /package/dist/{utils → src/utils}/arrayUtil.d.ts +0 -0
  395. /package/dist/{utils → src/utils}/base64.d.ts +0 -0
  396. /package/dist/{utils → src/utils}/dateUtil.d.ts +0 -0
  397. /package/dist/{utils → src/utils}/htmlCompiler.d.ts +0 -0
  398. /package/dist/{utils → src/utils}/templatePreparation.d.ts +0 -0
  399. /package/dist/{utils → src/utils}/tooltipUtils.d.ts +0 -0
@@ -1,22 +1,82 @@
1
- import { useActionsApi as g } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
3
- import { useToaster as S } from "./useToaster.js";
4
- import { displayConditions as C } from "../enums/displayConditions.js";
5
- import y from "../extensions/DynamicContent/extension.js";
6
- import { useStripoApi as E } from "../services/stripoApi.js";
7
- import h from "../static/styles/customEditorStyle.css.js";
8
- import { useEditorStore as w } from "../stores/editor.js";
9
- import { dynamicContentToMergeTags as b } from "../utils/genericUtil.js";
10
- const P = (d) => {
11
- const { handleError: a } = S(), { getToken: c, getCustomFonts: u } = E(), l = (r, i = []) => {
12
- const e = w(), { html: o, css: s, forceRecreate: p } = r;
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: d,
17
- html: o,
18
- css: s,
19
- forceRecreate: p,
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: h,
89
+ customViewStyles: J,
30
90
  conditionsEnabled: !0,
31
91
  customConditionsEnabled: !0,
32
- conditionCategories: C,
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: b(d.preselectedDynamicContentList)
103
+ entries: K(e.preselectedDynamicContentList)
44
104
  }
45
105
  ],
46
- async onTokenRefreshRequest(t) {
106
+ async onTokenRefreshRequest(r) {
47
107
  try {
48
- const n = await c();
49
- t(n);
50
- } catch (n) {
51
- a(n, "Failed to refresh token");
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: t } = f(), { activateCustomViewStyles: n } = g();
57
- t(), n(), e.loadingStatus = !1;
58
- } catch (t) {
59
- a(t, "Failed to load custom interface appearance");
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(t) {
63
- e.isCodeEditorOpen = t;
146
+ onCodeEditorVisibilityChanged(r) {
147
+ o.isCodeEditorOpen = r;
64
148
  },
65
- onEditorVisualModeChanged(t) {
66
- e.editorVisualMode = t.toLowerCase();
149
+ onEditorVisualModeChanged(r) {
150
+ o.editorVisualMode = r.toLowerCase();
67
151
  },
68
- onVersionHistoryVisibilityChanged(t) {
69
- e.isVersionHistoryOpen = t;
152
+ onVersionHistoryVisibilityChanged(r) {
153
+ o.isVersionHistoryOpen = r;
70
154
  },
71
155
  onDataChanged() {
72
- e.hasChanges = !0;
156
+ o.hasChanges = !0;
73
157
  },
74
- ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
75
- extensions: [y]
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
- }, m = (r) => new Promise((i, e) => {
176
+ }, R = (s) => new Promise((i, o) => {
177
+ var t;
79
178
  if (document.getElementById("UiEditorScript")) {
80
- r(), i();
179
+ s(), i();
81
180
  return;
82
181
  }
83
- const o = document.createElement("script");
84
- o.id = "UiEditorScript", o.type = "module", o.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", o.onload = () => {
85
- r(), i();
86
- }, o.onerror = () => {
87
- const s = new Error("Failed to load Stripo UIEditor script");
88
- e(s);
89
- }, document.body.appendChild(o);
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 (r) => {
92
- await m(async () => {
93
- const i = await u();
94
- l(r, i);
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
- P as useStripo
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 u } from "../enums/toaster.js";
2
- import { useToasterStore as T } from "../stores/toaster.js";
3
- import { watch as c, onUnmounted as l } from "vue";
4
- const p = () => {
5
- const t = T();
6
- let s = null;
7
- const o = () => {
8
- s && (clearTimeout(s), s = null);
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
- o(), t.hideToaster(), t.showToaster(e);
11
+ s(), t.hideToaster(), t.showToaster(e);
12
12
  }
13
- function n() {
14
- o(), t.hideToaster();
13
+ function i() {
14
+ s(), t.hideToaster();
15
15
  }
16
- function i(e, a) {
16
+ function a(e, n) {
17
17
  const m = e instanceof Error ? e.message : String(e);
18
- r({ type: u.Alert, message: `${a}: ${m}` });
18
+ r({ type: T.Alert, message: `${n}: ${m}` });
19
19
  }
20
20
  return c(
21
21
  () => t.shouldAutoHide,
22
22
  (e) => {
23
- o(), e && (s = setTimeout(() => {
24
- t.hideToaster(), o();
23
+ s(), e && (o = setTimeout(() => {
24
+ t.hideToaster(), s();
25
25
  }, 6e3));
26
26
  }
27
- ), l(o), { showToaster: r, hideToaster: n, handleError: i };
27
+ ), { showToaster: r, hideToaster: i, handleError: a };
28
28
  };
29
29
  export {
30
- p as useToaster
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
+ };