@useinsider/guido 1.0.3-beta.e1adf59 → 1.0.3-beta.e517316

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 (222) hide show
  1. package/dist/{src/@types → @types}/generic.d.ts +0 -9
  2. package/dist/{src/components → components}/Guido.vue.d.ts +2 -3
  3. package/dist/components/Guido.vue.js +5 -5
  4. package/dist/components/Guido.vue2.js +71 -99
  5. package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +4 -6
  6. package/dist/components/wrappers/WpDrawer.vue.js +4 -6
  7. package/dist/composables/useHttp.js +52 -89
  8. package/dist/composables/useStripo.js +63 -158
  9. package/dist/config/compiler/unsubscribeCompilerRules.js +29 -42
  10. package/dist/config/migrator/index.d.ts +1 -0
  11. package/dist/config/migrator/index.js +6 -7
  12. package/dist/enums/defaults.js +3 -6
  13. package/dist/enums/unsubscribe.d.ts +15 -0
  14. package/dist/enums/unsubscribe.js +6 -43
  15. package/dist/extensions/Blocks/Checkbox/control.js +53 -55
  16. package/dist/extensions/Blocks/RadioButton/control.js +42 -44
  17. package/dist/extensions/Blocks/Recommendation/block.js +1 -1
  18. package/dist/{src/extensions → extensions}/Blocks/Recommendation/control.d.ts +1 -2
  19. package/dist/extensions/Blocks/Recommendation/control.js +77 -91
  20. package/dist/{src/extensions → extensions}/Blocks/Recommendation/store/recommendation.d.ts +0 -8
  21. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +15 -16
  22. package/dist/extensions/Blocks/Recommendation/template.js +26 -194
  23. package/dist/guido.css +1 -1
  24. package/dist/services/stripoApi.js +19 -49
  25. package/dist/stores/unsubscribe.d.ts +8 -0
  26. package/dist/stores/unsubscribe.js +6 -126
  27. package/dist/utils/templatePreparation.js +16 -17
  28. package/package.json +1 -6
  29. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
  30. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
  31. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
  32. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
  33. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
  34. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -107
  35. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
  36. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
  37. package/dist/composables/useApiErrorTracking.js +0 -120
  38. package/dist/composables/useErrorTracking.js +0 -98
  39. package/dist/composables/useStripoErrorCategory.js +0 -86
  40. package/dist/composables/useStripoSlackNotifier.js +0 -47
  41. package/dist/config/migrator/unsubscribeMigrator.js +0 -124
  42. package/dist/extensions/Blocks/Unsubscribe/block.js +0 -131
  43. package/dist/extensions/Blocks/Unsubscribe/control.js +0 -167
  44. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -42
  45. package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
  46. package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
  47. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -35
  48. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
  49. package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +0 -10
  50. package/dist/extensions/Blocks/Unsubscribe/template.js +0 -22
  51. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
  52. package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
  53. package/dist/package.json.js +0 -7
  54. package/dist/services/slackNotificationService.js +0 -167
  55. package/dist/services/stripoErrorDeduplicationService.js +0 -91
  56. package/dist/services/unsubscribeApi.js +0 -16
  57. package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
  58. package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
  59. package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
  60. package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
  61. package/dist/src/composables/useApiErrorTracking.d.ts +0 -26
  62. package/dist/src/composables/useErrorTracking.d.ts +0 -30
  63. package/dist/src/composables/useStripoErrorCategory.d.ts +0 -26
  64. package/dist/src/composables/useStripoSlackNotifier.d.ts +0 -8
  65. package/dist/src/config/migrator/index.d.ts +0 -1
  66. package/dist/src/config/migrator/unsubscribeMigrator.d.ts +0 -1
  67. package/dist/src/enums/unsubscribe.d.ts +0 -38
  68. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +0 -32
  69. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
  70. package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
  71. package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
  72. package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
  73. package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
  74. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
  75. package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
  76. package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
  77. package/dist/src/extensions/DynamicContent/extension.d.ts +0 -2
  78. package/dist/src/services/slackNotificationService.d.ts +0 -110
  79. package/dist/src/services/stripoErrorDeduplicationService.d.ts +0 -75
  80. package/dist/src/services/unsubscribeApi.d.ts +0 -4
  81. package/dist/src/stores/config.d.ts +0 -96
  82. package/dist/src/stores/unsubscribe.d.ts +0 -256
  83. package/dist/stores/config.js +0 -17
  84. /package/dist/{src/@types → @types}/events.d.ts +0 -0
  85. /package/dist/{src/@types → @types}/save-as-template.d.ts +0 -0
  86. /package/dist/{src/App.vue.d.ts → App.vue.d.ts} +0 -0
  87. /package/dist/{src/components → components}/organisms/LoadingWrapper.vue.d.ts +0 -0
  88. /package/dist/{src/components → components}/organisms/base/Toaster.vue.d.ts +0 -0
  89. /package/dist/{src/components → components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
  90. /package/dist/{src/components → components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
  91. /package/dist/{src/components → components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
  92. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
  93. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
  94. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
  95. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
  96. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
  97. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
  98. /package/dist/{src/components → components}/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -0
  99. /package/dist/{src/components → components}/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -0
  100. /package/dist/{src/components → components}/organisms/extensions/recommendation/Filters.vue.d.ts +0 -0
  101. /package/dist/{src/components → components}/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -0
  102. /package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
  103. /package/dist/{src/components → components}/organisms/header/LeftSlot.vue.d.ts +0 -0
  104. /package/dist/{src/components → components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
  105. /package/dist/{src/components → components}/organisms/header/RightSlot.vue.d.ts +0 -0
  106. /package/dist/{src/components → components}/organisms/header/ViewOptions.vue.d.ts +0 -0
  107. /package/dist/{src/components → components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
  108. /package/dist/{src/components → components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
  109. /package/dist/{src/components → components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
  110. /package/dist/{src/components → components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
  111. /package/dist/{src/components → components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
  112. /package/dist/{src/components → components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
  113. /package/dist/{src/components → components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
  114. /package/dist/{src/components → components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -0
  115. /package/dist/{src/components → components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
  116. /package/dist/{src/components → components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
  117. /package/dist/{src/components → components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
  118. /package/dist/{src/components → components}/wrappers/WpModal.vue.d.ts +0 -0
  119. /package/dist/{src/composables → composables}/useActionsApi.d.ts +0 -0
  120. /package/dist/{src/composables → composables}/useApiExample.d.ts +0 -0
  121. /package/dist/{src/composables → composables}/useCodeEditorApi.d.ts +0 -0
  122. /package/dist/{src/composables → composables}/useConfig.d.ts +0 -0
  123. /package/dist/{src/composables → composables}/useCustomInterfaceAppearance.d.ts +0 -0
  124. /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
  125. /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
  126. /package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -0
  127. /package/dist/{src/composables → composables}/useHtmlCompiler.d.ts +0 -0
  128. /package/dist/{src/composables → composables}/useHtmlValidator.d.ts +0 -0
  129. /package/dist/{src/composables → composables}/useHttp.d.ts +0 -0
  130. /package/dist/{src/composables → composables}/usePartner.d.ts +0 -0
  131. /package/dist/{src/composables → composables}/usePreviewMode.d.ts +0 -0
  132. /package/dist/{src/composables → composables}/useProvideInject.d.ts +0 -0
  133. /package/dist/{src/composables → composables}/useRecommendation.d.ts +0 -0
  134. /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
  135. /package/dist/{src/composables → composables}/useSave.d.ts +0 -0
  136. /package/dist/{src/composables → composables}/useStripo.d.ts +0 -0
  137. /package/dist/{src/composables → composables}/useStripoEventHandler.d.ts +0 -0
  138. /package/dist/{src/composables → composables}/useToaster.d.ts +0 -0
  139. /package/dist/{src/composables → composables}/useTranslations.d.ts +0 -0
  140. /package/dist/{src/composables → composables}/useValidation.d.ts +0 -0
  141. /package/dist/{src/composables → composables}/useVersionHistoryApi.d.ts +0 -0
  142. /package/dist/{src/composables → composables}/validators/saveAsTemplate.d.ts +0 -0
  143. /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
  144. /package/dist/{src/config → config}/compiler/outlookCompilerRules.d.ts +0 -0
  145. /package/dist/{src/config → config}/compiler/recommendationCompilerRules.d.ts +0 -0
  146. /package/dist/{src/config → config}/compiler/socialCompilerRules.d.ts +0 -0
  147. /package/dist/{src/config → config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
  148. /package/dist/{src/config → config}/migrator/checkboxMigrator.d.ts +0 -0
  149. /package/dist/{src/config → config}/migrator/couponBlockMigrator.d.ts +0 -0
  150. /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
  151. /package/dist/{src/enums → enums}/defaults.d.ts +0 -0
  152. /package/dist/{src/enums → enums}/displayConditions.d.ts +0 -0
  153. /package/dist/{src/enums → enums}/extensions/recommendationBlock.d.ts +0 -0
  154. /package/dist/{src/enums → enums}/html-validator.d.ts +0 -0
  155. /package/dist/{src/enums → enums}/onboarding.d.ts +0 -0
  156. /package/dist/{src/enums → enums}/preview.d.ts +0 -0
  157. /package/dist/{src/enums → enums}/recommendation.d.ts +0 -0
  158. /package/dist/{src/enums → enums}/toaster.d.ts +0 -0
  159. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/block.d.ts +0 -0
  160. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/control.d.ts +0 -0
  161. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/extension.d.ts +0 -0
  162. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/iconsRegistry.d.ts +0 -0
  163. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
  164. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/template.d.ts +0 -0
  165. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/block.d.ts +0 -0
  166. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
  167. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
  168. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
  169. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/template.d.ts +0 -0
  170. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/block.d.ts +0 -0
  171. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/control.d.ts +0 -0
  172. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/extension.d.ts +0 -0
  173. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/iconsRegistry.d.ts +0 -0
  174. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
  175. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/template.d.ts +0 -0
  176. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/block.d.ts +0 -0
  177. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/extension.d.ts +0 -0
  178. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/iconsRegistry.d.ts +0 -0
  179. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/settingsPanel.d.ts +0 -0
  180. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/template.d.ts +0 -0
  181. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/filterUtil.d.ts +0 -0
  182. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
  183. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
  184. /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
  185. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
  186. /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/Blocks/_Boilerplate}/settingsPanel.d.ts +0 -0
  187. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
  188. /package/dist/{src/extensions → extensions}/Blocks/common-control.d.ts +0 -0
  189. /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
  190. /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content.d.ts +0 -0
  191. /package/dist/{src/extensions/Blocks/_Boilerplate → extensions/DynamicContent}/extension.d.ts +0 -0
  192. /package/dist/{src/library.d.ts → library.d.ts} +0 -0
  193. /package/dist/{src/main.d.ts → main.d.ts} +0 -0
  194. /package/dist/{src/mock → mock}/api/auth.d.ts +0 -0
  195. /package/dist/{src/mock → mock}/api/custom-fonts.d.ts +0 -0
  196. /package/dist/{src/mock → mock}/api/default-template.d.ts +0 -0
  197. /package/dist/{src/mock → mock}/api/recommendation.d.ts +0 -0
  198. /package/dist/{src/mock → mock}/api/template-library.d.ts +0 -0
  199. /package/dist/{src/mock → mock}/api/unsubscribe.d.ts +0 -0
  200. /package/dist/{src/mock → mock}/api/user-modal-state.d.ts +0 -0
  201. /package/dist/{src/mock → mock}/api/validator.d.ts +0 -0
  202. /package/dist/{src/mock → mock}/browser.d.ts +0 -0
  203. /package/dist/{src/mock → mock}/handlers.d.ts +0 -0
  204. /package/dist/{src/services → services}/onboardingApi.d.ts +0 -0
  205. /package/dist/{src/services → services}/recommendationApi.d.ts +0 -0
  206. /package/dist/{src/services → services}/stripoApi.d.ts +0 -0
  207. /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
  208. /package/dist/{src/stores → stores}/dynamic-content.d.ts +0 -0
  209. /package/dist/{src/stores → stores}/editor.d.ts +0 -0
  210. /package/dist/{src/stores → stores}/onboarding.d.ts +0 -0
  211. /package/dist/{src/stores → stores}/preview.d.ts +0 -0
  212. /package/dist/{src/stores → stores}/recommendation.d.ts +0 -0
  213. /package/dist/{src/stores → stores}/save-as-template.d.ts +0 -0
  214. /package/dist/{src/stores → stores}/toaster.d.ts +0 -0
  215. /package/dist/{src/stores → stores}/version-history.d.ts +0 -0
  216. /package/dist/{src/utils → utils}/arrayUtil.d.ts +0 -0
  217. /package/dist/{src/utils → utils}/base64.d.ts +0 -0
  218. /package/dist/{src/utils → utils}/dateUtil.d.ts +0 -0
  219. /package/dist/{src/utils → utils}/genericUtil.d.ts +0 -0
  220. /package/dist/{src/utils → utils}/htmlCompiler.d.ts +0 -0
  221. /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
  222. /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
@@ -1,42 +1,27 @@
1
- import { useActionsApi as k } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as b } from "./useCustomInterfaceAppearance.js";
3
- import { useErrorTracking as v } from "./useErrorTracking.js";
4
- import { useStripoErrorCategory as V } from "./useStripoErrorCategory.js";
5
- import { useStripoEventHandler as B } from "./useStripoEventHandler.js";
6
- import { useStripoSlackNotifier as x } from "./useStripoSlackNotifier.js";
7
- import { useToaster as F } from "./useToaster.js";
8
- import { displayConditions as A } from "../enums/displayConditions.js";
9
- import U from "../extensions/Blocks/Checkbox/extension.js";
10
- import M from "../extensions/Blocks/CouponBlock/extension.js";
11
- import D from "../extensions/Blocks/RadioButton/extension.js";
12
- import P from "../extensions/Blocks/Recommendation/extension.js";
13
- import R from "../extensions/Blocks/Unsubscribe/extension.js";
14
- import z from "../extensions/DynamicContent/extension.js";
15
- import { useStripoApi as H } from "../services/stripoApi.js";
16
- import O from "../static/styles/customEditorStyle.css.js";
17
- import { useEditorStore as $ } from "../stores/editor.js";
18
- import { dynamicContentToMergeTags as q } from "../utils/genericUtil.js";
19
- import L from "../package.json.js";
20
- const po = (o) => {
21
- const { handleError: f } = F(), { getToken: E, getCustomFonts: h } = H(), { handleEvent: T } = B(), { captureStripoError: l, withTimeout: S } = v(), { shouldCaptureSentry: u } = V(), { notifySlack: p } = x(), C = (m, n = []) => {
22
- const r = $(), { html: c, css: y, forceRecreate: I } = m, s = (e) => {
23
- const t = e instanceof Error ? e : new Error(String(e)), i = "stripo_runtime_error", d = u(i);
24
- l(t, i, {
25
- emailId: o.emailId,
26
- userId: o.userId
27
- }, d), p(
28
- t.message,
29
- i,
30
- { emailId: o.emailId, userId: o.userId }
31
- );
32
- };
1
+ import { useActionsApi as f } from "./useActionsApi.js";
2
+ import { useCustomInterfaceAppearance as E } from "./useCustomInterfaceAppearance.js";
3
+ import { useStripoEventHandler as S } from "./useStripoEventHandler.js";
4
+ import { useToaster as C } from "./useToaster.js";
5
+ import { displayConditions as y } from "../enums/displayConditions.js";
6
+ import h from "../extensions/Blocks/Checkbox/extension.js";
7
+ import w from "../extensions/Blocks/CouponBlock/extension.js";
8
+ import b from "../extensions/Blocks/RadioButton/extension.js";
9
+ import _ from "../extensions/Blocks/Recommendation/extension.js";
10
+ import k from "../extensions/DynamicContent/extension.js";
11
+ import { useStripoApi as B } from "../services/stripoApi.js";
12
+ import V from "../static/styles/customEditorStyle.css.js";
13
+ import { useEditorStore as F } from "../stores/editor.js";
14
+ import { dynamicContentToMergeTags as x } from "../utils/genericUtil.js";
15
+ const N = (s) => {
16
+ const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = B(), { handleEvent: m } = S(), l = (r, i = []) => {
17
+ const t = F(), { html: e, css: a, forceRecreate: g } = r;
33
18
  window.UIEditor.initEditor(
34
19
  document.querySelector("#guido-editor"),
35
20
  {
36
- metadata: o,
37
- html: c,
38
- css: y,
39
- forceRecreate: I,
21
+ metadata: s,
22
+ html: e,
23
+ css: a,
24
+ forceRecreate: g,
40
25
  locale: "en",
41
26
  undoButtonSelector: "#guido__undo-button",
42
27
  redoButtonSelector: "#guido__redo-button",
@@ -46,168 +31,88 @@ const po = (o) => {
46
31
  customAppearanceMergetags: !0,
47
32
  customAppearanceMergetagsBorderColor: "#f1f3fe",
48
33
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
49
- customViewStyles: O,
34
+ customViewStyles: V,
50
35
  conditionsEnabled: !0,
51
36
  customConditionsEnabled: !0,
52
- conditionCategories: A,
37
+ conditionCategories: y,
53
38
  enableXSSSecurity: !0,
54
39
  messageSettingsEnabled: !1,
55
40
  selectBlockAfterDropFromSettingsPanel: !0,
56
41
  editorFonts: {
57
42
  showDefaultStandardFonts: !0,
58
43
  showDefaultNotStandardFonts: !0,
59
- customFonts: n
44
+ customFonts: i
60
45
  },
61
46
  mergeTags: [
62
47
  {
63
- entries: q(o.preselectedDynamicContentList)
48
+ entries: x(s.preselectedDynamicContentList)
64
49
  }
65
50
  ],
66
- async onTokenRefreshRequest(e) {
51
+ async onTokenRefreshRequest(o) {
67
52
  try {
68
- const t = await S(
69
- E(),
70
- 1e4,
71
- // 10 second timeout
72
- "token_refresh",
73
- { emailId: o.emailId, userId: o.userId }
74
- );
75
- e(t);
76
- } catch (t) {
77
- const i = "token_refresh", d = u(i);
78
- l(t, i, {
79
- templateId: o.emailId,
80
- userId: o.userId
81
- }, d), p(
82
- "Token refresh operation failed",
83
- i,
84
- { emailId: o.emailId, userId: o.userId }
85
- ), f(t, "Failed to refresh token");
53
+ const n = await c();
54
+ o(n);
55
+ } catch (n) {
56
+ d(n, "Failed to refresh token");
86
57
  }
87
58
  },
88
59
  onTemplateLoaded() {
89
60
  try {
90
- const { importCss: e } = b(), { activateCustomViewStyles: t } = k();
91
- e(), t(), o.onReady(), r.isStripoInitialized = !0, r.loadingStatus = !1, setTimeout(() => {
92
- r.hasChanges = !1;
61
+ const { importCss: o } = E(), { activateCustomViewStyles: n } = f();
62
+ o(), n(), s.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
63
+ t.hasChanges = !1;
93
64
  }, 1e3);
94
- } catch (e) {
95
- const t = "template_loaded", i = u(t);
96
- l(e, t, {
97
- templateId: o.emailId,
98
- userId: o.userId
99
- }, i), p(
100
- "Template loading operation failed",
101
- t,
102
- { emailId: o.emailId, userId: o.userId }
103
- ), f(e, "Failed to load custom interface appearance");
65
+ } catch (o) {
66
+ d(o, "Failed to load custom interface appearance");
104
67
  }
105
68
  },
106
- onCodeEditorVisibilityChanged(e) {
107
- r.isCodeEditorOpen = e;
69
+ onCodeEditorVisibilityChanged(o) {
70
+ t.isCodeEditorOpen = o;
108
71
  },
109
- onEditorVisualModeChanged(e) {
110
- r.editorVisualMode = e.toLowerCase();
72
+ onEditorVisualModeChanged(o) {
73
+ t.editorVisualMode = o.toLowerCase();
111
74
  },
112
- onVersionHistoryVisibilityChanged(e) {
113
- r.isVersionHistoryOpen = e;
75
+ onVersionHistoryVisibilityChanged(o) {
76
+ t.isVersionHistoryOpen = o;
114
77
  },
115
78
  onDataChanged() {
116
- r.hasChanges = !0;
79
+ t.hasChanges = !0;
117
80
  },
118
- onEvent: T,
119
- // Error handler for Stripo runtime errors (CORS, plugin issues, etc.)
120
- onError: s,
81
+ onEvent: m,
121
82
  ignoreClickOutsideSelectors: [
122
83
  "#guido-dynamic-content-modal",
123
84
  ".in-on-board-wrapper",
124
85
  ".in-drawer__container"
125
86
  ],
126
87
  extensions: [
127
- z,
128
- U,
129
- D,
130
- P,
131
- R,
132
- M
88
+ k,
89
+ h,
90
+ b,
91
+ _,
92
+ w
133
93
  ]
134
94
  }
135
95
  );
136
- }, _ = (m) => new Promise((n, r) => {
137
- var t;
96
+ }, p = (r) => new Promise((i, t) => {
138
97
  if (document.getElementById("UiEditorScript")) {
139
- m(), n();
98
+ r(), i();
140
99
  return;
141
100
  }
142
- const c = L.guido, I = `https://email-static.useinsider.com/guido/${(t = c == null ? void 0 : c.stripo) == null ? void 0 : t.version}/UIEditor.js`, s = document.createElement("script");
143
- s.id = "UiEditorScript", s.type = "module", s.src = I;
144
- const e = setTimeout(() => {
145
- const i = new Error("Timeout loading Stripo UIEditor script (30s)"), d = "plugin_load_timeout", a = u(d);
146
- l(i, d, {
147
- scriptSrc: s.src,
148
- emailId: o.emailId,
149
- userId: o.userId
150
- }, a), p(
151
- `Stripo plugin failed to load (timeout): ${s.src}`,
152
- d,
153
- { emailId: o.emailId, userId: o.userId, reason: "timeout" }
154
- ), r(i);
155
- }, 3e4);
156
- s.onload = () => {
157
- clearTimeout(e), m(), n();
158
- }, s.onerror = (i) => {
159
- clearTimeout(e);
160
- const d = new Error("Failed to load Stripo UIEditor script"), a = i instanceof Event ? i.type : String(i), g = "plugin_load_error", w = u(g);
161
- l(d, g, {
162
- scriptSrc: s.src,
163
- event: a,
164
- emailId: o.emailId,
165
- userId: o.userId
166
- }, w), p(
167
- `Stripo plugin failed to load: ${a}`,
168
- g,
169
- { emailId: o.emailId, userId: o.userId, scriptSrc: s.src }
170
- ), r(d);
171
- }, document.body.appendChild(s);
101
+ const e = document.createElement("script");
102
+ e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
103
+ r(), i();
104
+ }, e.onerror = () => {
105
+ const a = new Error("Failed to load Stripo UIEditor script");
106
+ t(a);
107
+ }, document.body.appendChild(e);
172
108
  });
173
- return { initPlugin: async (m) => {
174
- try {
175
- await _(async () => {
176
- try {
177
- const n = await S(
178
- h(),
179
- 5e3,
180
- // 5 second timeout for fonts
181
- "load_custom_fonts",
182
- { emailId: o.emailId }
183
- );
184
- C(m, n);
185
- } catch (n) {
186
- const r = "init_editor", c = u(r);
187
- throw l(n, r, {
188
- templateId: o.emailId,
189
- userId: o.userId,
190
- hasTemplate: !!m.html
191
- }, c), p(
192
- "Editor initialization failed",
193
- r,
194
- { emailId: o.emailId, userId: o.userId }
195
- ), n;
196
- }
197
- });
198
- } catch (n) {
199
- const r = "init_plugin", c = u(r);
200
- throw l(n, r, {
201
- templateId: o.emailId,
202
- userId: o.userId
203
- }, c), p(
204
- "Plugin initialization failed",
205
- r,
206
- { emailId: o.emailId, userId: o.userId }
207
- ), n;
208
- }
109
+ return { initPlugin: async (r) => {
110
+ await p(async () => {
111
+ const i = await u();
112
+ l(r, i);
113
+ });
209
114
  } };
210
115
  };
211
116
  export {
212
- po as useStripo
117
+ N as useStripo
213
118
  };
@@ -1,36 +1,23 @@
1
- import { usePartner as U } from "../../composables/usePartner.js";
2
- import { LINK_REGEXES as l, LINK_TYPES as b, URLS as f } from "../../enums/unsubscribe.js";
3
- import { parsePageList as B } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
4
- import { useConfigStore as N } from "../../stores/config.js";
5
- import { useUnsubscribeStore as I } from "../../stores/unsubscribe.js";
6
- const T = [
1
+ import { usePartner as m } from "../../composables/usePartner.js";
2
+ import { LINK_REGEXES as c, LINK_TYPES as p, URLS as E } from "../../enums/unsubscribe.js";
3
+ import { useUnsubscribeStore as b } from "../../stores/unsubscribe.js";
4
+ const S = [
7
5
  {
8
6
  id: "add-unsubscribe-link-values",
9
7
  description: "Adding unsubscribe link values",
10
8
  type: "custom",
11
- processor: (t) => {
12
- const { getPartnerName: i } = U(), a = N(), n = I(), u = a.getVariationId;
13
- if (!u)
14
- return t;
15
- let o = t;
16
- const e = `/${i()}/email/${u}?user={{iid}}`;
17
- return new DOMParser().parseFromString(o, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]").forEach((p) => {
18
- var g;
19
- const d = p.getAttribute("data-unsubscribe-page-list");
20
- if (!d)
21
- return;
22
- const S = B(d), m = ((g = n.templates) == null ? void 0 : g.filter(
23
- (c) => S.includes(c.id)
24
- )) ?? [], R = m.some((c) => c.type === b.UNSUBSCRIBE_LINK_TYPE), _ = m.some((c) => c.type === b.PREFERENCES_LINK_TYPE), E = p.outerHTML;
25
- let s = E;
26
- R && (s = s.replace(
27
- l.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
28
- f.UNSUBSCRIBE_URL + e
29
- )), _ && (s = s.replace(
30
- l.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
31
- f.PREFERENCES_URL + e
32
- )), s = s.replace(l.UNSUBSCRIBE_LINK_REGEX, ""), o = o.replace(E, s);
33
- }), o;
9
+ processor: (n) => {
10
+ var a, u;
11
+ const { getPartnerName: i } = m(), t = b();
12
+ let e = n;
13
+ const o = `/${i()}/email/0?user={{iid}}`, r = (a = t.selectedUnsubscribePages) == null ? void 0 : a.find((l) => l.type === p.UNSUBSCRIBE_LINK_TYPE), s = (u = t.selectedUnsubscribePages) == null ? void 0 : u.find((l) => l.type === p.PREFERENCES_LINK_TYPE);
14
+ return r && (e = e.replace(
15
+ c.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
16
+ E.UNSUBSCRIBE_URL + o
17
+ )), s && (e = e.replace(
18
+ c.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
19
+ E.PREFERENCES_URL + o
20
+ )), e.replace(c.UNSUBSCRIBE_LINK_REGEX, "");
34
21
  },
35
22
  priority: 60
36
23
  },
@@ -38,7 +25,7 @@ const T = [
38
25
  id: "remove-data-ogsb-button-styles",
39
26
  description: "Removing styles like [data-ogsb] .es-button.es-button-123 { background: red; }",
40
27
  type: "regex",
41
- pattern: l.DATA_OGSB_BUTTON_CSS_REGEX,
28
+ pattern: c.DATA_OGSB_BUTTON_CSS_REGEX,
42
29
  replacement: "",
43
30
  flags: "g",
44
31
  priority: 61
@@ -47,25 +34,25 @@ const T = [
47
34
  id: "format-comment-braces",
48
35
  description: "Adding spaces around comment braces for proper formatting",
49
36
  type: "custom",
50
- processor: (t) => t.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
37
+ processor: (n) => n.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
51
38
  priority: 62
52
39
  },
53
40
  {
54
41
  id: "add-universal-link-flags",
55
42
  description: "Adding universal link flags",
56
43
  type: "custom",
57
- processor: (t) => {
58
- let i = t;
59
- const a = i.match(/<a[^>]+>(.*?)<\/a>/gm);
60
- return a && a.forEach((n) => {
61
- if (n.includes("insEmail=1"))
44
+ processor: (n) => {
45
+ let i = n;
46
+ const t = i.match(/<a[^>]+>(.*?)<\/a>/gm);
47
+ return t && t.forEach((e) => {
48
+ if (e.includes("insEmail=1"))
62
49
  return;
63
- if (n.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
64
- const o = n.replace(/href=(["'`”])(.*?)\1/gm, (e) => {
65
- const r = e.slice(6, e.length - 1).trim();
66
- return e.includes("?") || e.includes("#") ? r.slice(-1) === "&" ? e.replace(r, `${r}insEmail=1`) : e.replace(r, `${r}&insEmail=1`) : e.replace(r, `${r}?insEmail=1`);
50
+ if (e.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
51
+ const o = e.replace(/href=(["'`”])(.*?)\1/gm, (r) => {
52
+ const s = r.slice(6, r.length - 1).trim();
53
+ return r.includes("?") || r.includes("#") ? s.slice(-1) === "&" ? r.replace(s, `${s}insEmail=1`) : r.replace(s, `${s}&insEmail=1`) : r.replace(s, `${s}?insEmail=1`);
67
54
  });
68
- i = i.replace(n, o);
55
+ i = i.replace(e, o);
69
56
  }
70
57
  }), i;
71
58
  },
@@ -73,5 +60,5 @@ const T = [
73
60
  }
74
61
  ];
75
62
  export {
76
- T as unsubscribeCompilerRules
63
+ S as unsubscribeCompilerRules
77
64
  };
@@ -0,0 +1 @@
1
+ export declare const migrate: (html: string) => string;
@@ -1,11 +1,10 @@
1
- import { migrateCheckbox as o } from "./checkboxMigrator.js";
1
+ import { migrateCheckbox as r } from "./checkboxMigrator.js";
2
2
  import { migrateCouponBlock as m } from "./couponBlockMigrator.js";
3
- import { migrateRadioButton as i } from "./radioButtonMigrator.js";
4
- import { migrateUnsubscribe as e } from "./unsubscribeMigrator.js";
5
- const c = async (t) => {
6
- let r = t;
7
- return r = o(r), r = i(r), r = await e(r), r = m(r), r;
3
+ import { migrateRadioButton as e } from "./radioButtonMigrator.js";
4
+ const p = (o) => {
5
+ let t = o;
6
+ return t = r(t), t = e(t), t = m(t), t;
8
7
  };
9
8
  export {
10
- c as migrate
9
+ p as migrate
11
10
  };
@@ -4,9 +4,6 @@ const a = {
4
4
  senderName: "",
5
5
  subject: ""
6
6
  },
7
- extensions: {
8
- unsubscribe: !0
9
- },
10
7
  features: {
11
8
  dynamicContent: !0,
12
9
  saveAsTemplate: !0,
@@ -16,7 +13,7 @@ const a = {
16
13
  }, t = {
17
14
  promotional: 1,
18
15
  transactional: 2
19
- }, e = "email", o = "Guido User", n = t.promotional, s = 2, i = {
16
+ }, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
20
17
  email: 60,
21
18
  architect: 49
22
19
  }, u = [
@@ -56,8 +53,8 @@ export {
56
53
  n as DefaultMessageType,
57
54
  e as DefaultProductType,
58
55
  o as DefaultUsername,
59
- s as EditorType,
60
- i as ProductIds,
56
+ i as EditorType,
57
+ s as ProductIds,
61
58
  u as TEST_PARTNER_LIST,
62
59
  t as TemplateTypes
63
60
  };
@@ -0,0 +1,15 @@
1
+ export declare const LINK_TYPES: {
2
+ UNSUBSCRIBE_LINK_TYPE: number;
3
+ PREFERENCES_LINK_TYPE: number;
4
+ };
5
+ export declare const LINK_REGEXES: {
6
+ UNSUBSCRIBE_LINK_REGEX: RegExp;
7
+ DATA_OGSB_BUTTON_CSS_REGEX: string;
8
+ GLOBAL_UNSUBSCRIBE_LINK_REGEX: RegExp;
9
+ PREFERENCES_UNSUBSCRIBE_LINK_REGEX: RegExp;
10
+ };
11
+ export declare const URLS: {
12
+ UNSUBSCRIBE_URL: string;
13
+ PREFERENCES_URL: string;
14
+ };
15
+ export declare const INSIDER_ID = "iid";
@@ -1,54 +1,17 @@
1
- import { useTranslations as e } from "../composables/useTranslations.js";
2
- const s = e(), R = {
1
+ const E = {
3
2
  UNSUBSCRIBE_LINK_TYPE: 1,
4
3
  PREFERENCES_LINK_TYPE: 3
5
- }, S = {
4
+ }, s = {
6
5
  UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
7
6
  DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
8
7
  GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
9
8
  PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
10
- }, N = {
9
+ }, _ = {
11
10
  UNSUBSCRIBE_URL: "https://mail.useinsider.com/user/v1/unsub",
12
11
  PREFERENCES_URL: "https://mail.useinsider.com/user/v1/prefs"
13
- }, _ = {
14
- name: "Global Unsubscribe",
15
- sendGridId: "G"
16
- }, I = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", r = "/email/unsubscribe-pages", E = {
17
- GLOBAL_UNSUBSCRIBE: 1,
18
- GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
19
- SUBSCRIPTION_PREFERENCE_CENTER: 3,
20
- SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
21
- RESUBSCRIBE: 5
22
- }, i = {
23
- [E.GLOBAL_UNSUBSCRIBE]: [
24
- E.GLOBAL_UNSUBSCRIBE,
25
- E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
26
- E.RESUBSCRIBE
27
- ],
28
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: [
29
- E.SUBSCRIPTION_PREFERENCE_CENTER,
30
- E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
31
- ]
32
- }, B = {
33
- [E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
34
- [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: s("unsubscription-preference.type-global-unsubscription-confirmation"),
35
- [E.RESUBSCRIBE]: s("unsubscription-preference.type-resubscribe"),
36
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
37
- [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
38
- }, C = {
39
- default: "{{ins-unsubscribe-link}}",
40
- [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
41
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
42
12
  };
43
13
  export {
44
- I as ACADEMY_LINK,
45
- _ as DEFAULT_UNSUBSCRIBE_GROUP,
46
- S as LINK_REGEXES,
47
- R as LINK_TYPES,
48
- C as MERGE_TAGS,
49
- E as PAGE_TYPES,
50
- i as TYPE_COLLECTIONS,
51
- B as TYPE_TRANSLATIONS,
52
- r as UNSUBSCRIBE_PAGES_LINK,
53
- N as URLS
14
+ s as LINK_REGEXES,
15
+ E as LINK_TYPES,
16
+ _ as URLS
54
17
  };