@useinsider/guido 1.0.3-beta.d8a9e56 → 1.0.3-beta.dbf4a88

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 (189) hide show
  1. package/dist/components/Guido.vue.js +8 -8
  2. package/dist/components/Guido.vue2.js +74 -69
  3. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +18 -0
  4. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +16 -0
  5. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +24 -0
  6. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +64 -0
  7. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +18 -0
  8. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +107 -0
  9. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +18 -0
  10. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +12 -0
  11. package/dist/components/wrappers/WpDrawer.vue.js +6 -4
  12. package/dist/composables/useStripo.js +41 -34
  13. package/dist/config/compiler/unsubscribeCompilerRules.js +42 -29
  14. package/dist/config/migrator/index.js +7 -6
  15. package/dist/config/migrator/unsubscribeMigrator.js +124 -0
  16. package/dist/enums/defaults.js +6 -3
  17. package/dist/enums/unsubscribe.js +43 -6
  18. package/dist/extensions/Blocks/Checkbox/control.js +55 -53
  19. package/dist/extensions/Blocks/RadioButton/control.js +44 -42
  20. package/dist/extensions/Blocks/Unsubscribe/block.js +131 -0
  21. package/dist/extensions/Blocks/Unsubscribe/control.js +167 -0
  22. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +42 -0
  23. package/dist/extensions/Blocks/Unsubscribe/extension.js +21 -0
  24. package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +21 -0
  25. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +35 -0
  26. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +42 -0
  27. package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +10 -0
  28. package/dist/extensions/Blocks/Unsubscribe/template.js +22 -0
  29. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +11 -0
  30. package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +6 -0
  31. package/dist/guido.css +1 -1
  32. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +2 -1
  33. package/dist/package.json.js +7 -0
  34. package/dist/services/unsubscribeApi.js +16 -0
  35. package/dist/{@types → src/@types}/generic.d.ts +9 -0
  36. package/dist/{components → src/components}/Guido.vue.d.ts +2 -2
  37. package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +2 -0
  38. package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +2 -0
  40. package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +2 -0
  41. package/dist/{components → src/components}/wrappers/WpDrawer.vue.d.ts +6 -4
  42. package/dist/src/config/migrator/index.d.ts +1 -0
  43. package/dist/src/config/migrator/unsubscribeMigrator.d.ts +1 -0
  44. package/dist/src/enums/unsubscribe.d.ts +38 -0
  45. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +32 -0
  46. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +29 -0
  47. package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +11 -0
  48. package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +4 -0
  49. package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +4 -0
  50. package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +12 -0
  51. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +9 -0
  52. package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +7 -0
  53. package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
  54. package/dist/src/extensions/DynamicContent/extension.d.ts +2 -0
  55. package/dist/src/services/unsubscribeApi.d.ts +4 -0
  56. package/dist/src/stores/config.d.ts +96 -0
  57. package/dist/src/stores/unsubscribe.d.ts +256 -0
  58. package/dist/stores/config.js +17 -0
  59. package/dist/stores/unsubscribe.js +126 -6
  60. package/dist/utils/templatePreparation.js +17 -16
  61. package/package.json +6 -1
  62. package/dist/config/migrator/index.d.ts +0 -1
  63. package/dist/enums/unsubscribe.d.ts +0 -15
  64. package/dist/stores/unsubscribe.d.ts +0 -8
  65. /package/dist/{@types → src/@types}/events.d.ts +0 -0
  66. /package/dist/{@types → src/@types}/save-as-template.d.ts +0 -0
  67. /package/dist/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
  68. /package/dist/{components → src/components}/organisms/LoadingWrapper.vue.d.ts +0 -0
  69. /package/dist/{components → src/components}/organisms/base/Toaster.vue.d.ts +0 -0
  70. /package/dist/{components → src/components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
  71. /package/dist/{components → src/components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
  72. /package/dist/{components → src/components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
  73. /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
  74. /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
  75. /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
  76. /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
  77. /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
  78. /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
  79. /package/dist/{components → src/components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
  80. /package/dist/{components → src/components}/organisms/header/LeftSlot.vue.d.ts +0 -0
  81. /package/dist/{components → src/components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
  82. /package/dist/{components → src/components}/organisms/header/RightSlot.vue.d.ts +0 -0
  83. /package/dist/{components → src/components}/organisms/header/ViewOptions.vue.d.ts +0 -0
  84. /package/dist/{components → src/components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
  85. /package/dist/{components → src/components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
  86. /package/dist/{components → src/components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
  87. /package/dist/{components → src/components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
  88. /package/dist/{components → src/components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
  89. /package/dist/{components → src/components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
  90. /package/dist/{components → src/components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
  91. /package/dist/{components → src/components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -0
  92. /package/dist/{components → src/components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
  93. /package/dist/{components → src/components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
  94. /package/dist/{components → src/components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
  95. /package/dist/{components → src/components}/wrappers/WpModal.vue.d.ts +0 -0
  96. /package/dist/{composables → src/composables}/useActionsApi.d.ts +0 -0
  97. /package/dist/{composables → src/composables}/useApiExample.d.ts +0 -0
  98. /package/dist/{composables → src/composables}/useCodeEditorApi.d.ts +0 -0
  99. /package/dist/{composables → src/composables}/useConfig.d.ts +0 -0
  100. /package/dist/{composables → src/composables}/useCustomInterfaceAppearance.d.ts +0 -0
  101. /package/dist/{composables → src/composables}/useDebounce.d.ts +0 -0
  102. /package/dist/{composables → src/composables}/useExport.d.ts +0 -0
  103. /package/dist/{composables → src/composables}/useGuidoActions.d.ts +0 -0
  104. /package/dist/{composables → src/composables}/useHtmlCompiler.d.ts +0 -0
  105. /package/dist/{composables → src/composables}/useHtmlValidator.d.ts +0 -0
  106. /package/dist/{composables → src/composables}/useHttp.d.ts +0 -0
  107. /package/dist/{composables → src/composables}/usePartner.d.ts +0 -0
  108. /package/dist/{composables → src/composables}/usePreviewMode.d.ts +0 -0
  109. /package/dist/{composables → src/composables}/useProvideInject.d.ts +0 -0
  110. /package/dist/{composables → src/composables}/useRecommendation.d.ts +0 -0
  111. /package/dist/{composables → src/composables}/useResponsivePreview.d.ts +0 -0
  112. /package/dist/{composables → src/composables}/useSave.d.ts +0 -0
  113. /package/dist/{composables → src/composables}/useStripo.d.ts +0 -0
  114. /package/dist/{composables → src/composables}/useStripoEventHandler.d.ts +0 -0
  115. /package/dist/{composables → src/composables}/useToaster.d.ts +0 -0
  116. /package/dist/{composables → src/composables}/useTranslations.d.ts +0 -0
  117. /package/dist/{composables → src/composables}/useValidation.d.ts +0 -0
  118. /package/dist/{composables → src/composables}/useVersionHistoryApi.d.ts +0 -0
  119. /package/dist/{composables → src/composables}/validators/saveAsTemplate.d.ts +0 -0
  120. /package/dist/{config → src/config}/compiler/htmlCompilerRules.d.ts +0 -0
  121. /package/dist/{config → src/config}/compiler/outlookCompilerRules.d.ts +0 -0
  122. /package/dist/{config → src/config}/compiler/recommendationCompilerRules.d.ts +0 -0
  123. /package/dist/{config → src/config}/compiler/socialCompilerRules.d.ts +0 -0
  124. /package/dist/{config → src/config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
  125. /package/dist/{config → src/config}/migrator/checkboxMigrator.d.ts +0 -0
  126. /package/dist/{config → src/config}/migrator/couponBlockMigrator.d.ts +0 -0
  127. /package/dist/{config → src/config}/migrator/radioButtonMigrator.d.ts +0 -0
  128. /package/dist/{enums → src/enums}/defaults.d.ts +0 -0
  129. /package/dist/{enums → src/enums}/displayConditions.d.ts +0 -0
  130. /package/dist/{enums → src/enums}/html-validator.d.ts +0 -0
  131. /package/dist/{enums → src/enums}/onboarding.d.ts +0 -0
  132. /package/dist/{enums → src/enums}/preview.d.ts +0 -0
  133. /package/dist/{enums → src/enums}/recommendation.d.ts +0 -0
  134. /package/dist/{enums → src/enums}/toaster.d.ts +0 -0
  135. /package/dist/{extensions → src/extensions}/Blocks/Checkbox/block.d.ts +0 -0
  136. /package/dist/{extensions → src/extensions}/Blocks/Checkbox/control.d.ts +0 -0
  137. /package/dist/{extensions → src/extensions}/Blocks/Checkbox/extension.d.ts +0 -0
  138. /package/dist/{extensions → src/extensions}/Blocks/Checkbox/iconsRegistry.d.ts +0 -0
  139. /package/dist/{extensions → src/extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
  140. /package/dist/{extensions → src/extensions}/Blocks/Checkbox/template.d.ts +0 -0
  141. /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/block.d.ts +0 -0
  142. /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
  143. /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
  144. /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
  145. /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/template.d.ts +0 -0
  146. /package/dist/{extensions → src/extensions}/Blocks/RadioButton/block.d.ts +0 -0
  147. /package/dist/{extensions → src/extensions}/Blocks/RadioButton/control.d.ts +0 -0
  148. /package/dist/{extensions → src/extensions}/Blocks/RadioButton/extension.d.ts +0 -0
  149. /package/dist/{extensions → src/extensions}/Blocks/RadioButton/iconsRegistry.d.ts +0 -0
  150. /package/dist/{extensions → src/extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
  151. /package/dist/{extensions → src/extensions}/Blocks/RadioButton/template.d.ts +0 -0
  152. /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Unsubscribe}/extension.d.ts +0 -0
  153. /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Unsubscribe}/settingsPanel.d.ts +0 -0
  154. /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
  155. /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
  156. /package/dist/{extensions/DynamicContent → src/extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
  157. /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
  158. /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
  159. /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
  160. /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content.d.ts +0 -0
  161. /package/dist/{library.d.ts → src/library.d.ts} +0 -0
  162. /package/dist/{main.d.ts → src/main.d.ts} +0 -0
  163. /package/dist/{mock → src/mock}/api/auth.d.ts +0 -0
  164. /package/dist/{mock → src/mock}/api/custom-fonts.d.ts +0 -0
  165. /package/dist/{mock → src/mock}/api/default-template.d.ts +0 -0
  166. /package/dist/{mock → src/mock}/api/template-library.d.ts +0 -0
  167. /package/dist/{mock → src/mock}/api/unsubscribe.d.ts +0 -0
  168. /package/dist/{mock → src/mock}/api/user-modal-state.d.ts +0 -0
  169. /package/dist/{mock → src/mock}/api/validator.d.ts +0 -0
  170. /package/dist/{mock → src/mock}/browser.d.ts +0 -0
  171. /package/dist/{mock → src/mock}/handlers.d.ts +0 -0
  172. /package/dist/{services → src/services}/onboardingApi.d.ts +0 -0
  173. /package/dist/{services → src/services}/stripoApi.d.ts +0 -0
  174. /package/dist/{services → src/services}/templateLibraryApi.d.ts +0 -0
  175. /package/dist/{stores → src/stores}/dynamic-content.d.ts +0 -0
  176. /package/dist/{stores → src/stores}/editor.d.ts +0 -0
  177. /package/dist/{stores → src/stores}/onboarding.d.ts +0 -0
  178. /package/dist/{stores → src/stores}/preview.d.ts +0 -0
  179. /package/dist/{stores → src/stores}/recommendation.d.ts +0 -0
  180. /package/dist/{stores → src/stores}/save-as-template.d.ts +0 -0
  181. /package/dist/{stores → src/stores}/toaster.d.ts +0 -0
  182. /package/dist/{stores → src/stores}/version-history.d.ts +0 -0
  183. /package/dist/{utils → src/utils}/arrayUtil.d.ts +0 -0
  184. /package/dist/{utils → src/utils}/base64.d.ts +0 -0
  185. /package/dist/{utils → src/utils}/dateUtil.d.ts +0 -0
  186. /package/dist/{utils → src/utils}/genericUtil.d.ts +0 -0
  187. /package/dist/{utils → src/utils}/htmlCompiler.d.ts +0 -0
  188. /package/dist/{utils → src/utils}/templatePreparation.d.ts +0 -0
  189. /package/dist/{utils → src/utils}/tooltipUtils.d.ts +0 -0
@@ -1,16 +1,16 @@
1
- import o from "./Guido.vue2.js";
1
+ import a from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
- var t = function() {
5
- var a = this, r = a._self._c, e = a._self._setupProxy;
6
- return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
7
- }, s = [], d = /* @__PURE__ */ i(
8
- o,
9
- t,
4
+ var s = function() {
5
+ var o = this, r = o._self._c, e = o._self._setupProxy;
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
7
+ }, t = [], d = /* @__PURE__ */ i(
8
+ a,
10
9
  s,
10
+ t,
11
11
  !1,
12
12
  null,
13
- "aca05338"
13
+ "96687c1d"
14
14
  );
15
15
  const v = d.exports;
16
16
  export {
@@ -1,19 +1,22 @@
1
- import { defineComponent as H, defineAsyncComponent as E, ref as R, computed as G, watch as U, onMounted as x, onUnmounted as F } from "vue";
2
- import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
3
- import { usePartner as z } from "../composables/usePartner.js";
4
- import { useStripo as B } from "../composables/useStripo.js";
5
- import { migrate as P } from "../config/migrator/index.js";
6
- import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
7
- import q from "./organisms/base/Toaster.vue.js";
8
- import J from "./organisms/header/HeaderWrapper.vue.js";
9
- import Q from "./organisms/LoadingWrapper.vue.js";
10
- import V from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
11
- import { useStripoApi as X } from "../services/stripoApi.js";
12
- import { useDynamicContentStore as Y } from "../stores/dynamic-content.js";
13
- import { useEditorStore as Z } from "../stores/editor.js";
14
- import { usePreviewStore as $ } from "../stores/preview.js";
15
- import ee from "../node_modules/lodash-es/merge.js";
16
- const ye = /* @__PURE__ */ H({
1
+ import { defineComponent as x, defineAsyncComponent as U, ref as F, computed as I, watch as M, onMounted as z, onUnmounted as B } from "vue";
2
+ import { provideGuidoActions as K } from "../composables/useGuidoActions.js";
3
+ import { usePartner as O } from "../composables/usePartner.js";
4
+ import { useStripo as j } from "../composables/useStripo.js";
5
+ import { migrate as W } from "../config/migrator/index.js";
6
+ import { DefaultUsername as q, DefaultMessageType as J, DefaultGuidoConfig as Q } from "../enums/defaults.js";
7
+ import V from "./organisms/base/Toaster.vue.js";
8
+ import X from "./organisms/header/HeaderWrapper.vue.js";
9
+ import Y from "./organisms/LoadingWrapper.vue.js";
10
+ import Z from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
11
+ import $ from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
12
+ import { useStripoApi as ee } from "../services/stripoApi.js";
13
+ import { useConfigStore as oe } from "../stores/config.js";
14
+ import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
15
+ import { useEditorStore as ne } from "../stores/editor.js";
16
+ import { usePreviewStore as re } from "../stores/preview.js";
17
+ import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
18
+ import ae from "../node_modules/lodash-es/merge.js";
19
+ const Ee = /* @__PURE__ */ x({
17
20
  __name: "Guido",
18
21
  props: {
19
22
  templateId: null,
@@ -24,84 +27,86 @@ const ye = /* @__PURE__ */ H({
24
27
  username: null,
25
28
  html: null,
26
29
  css: null,
27
- preselectedDynamicContentList: null,
28
- guidoConfig: null
30
+ guidoConfig: null,
31
+ templateConfig: null
29
32
  },
30
33
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
31
- setup(I, { expose: L, emit: o }) {
32
- const r = I, _ = E(
34
+ setup(_, { expose: L, emit: t }) {
35
+ const d = _, k = U(
33
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
34
- ), W = E(
37
+ ), A = U(
35
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
36
- ), d = R(), a = Y(), m = Z(), k = $(), t = G(() => m.hasChanges), i = r.preselectedDynamicContentList || [], { getPartnerName: l, getProductType: u, isTestPartner: A } = z(), p = () => {
39
+ ), m = F(), s = te(), u = se(), l = oe(), p = ne(), N = re(), n = I(() => p.hasChanges), { getPartnerName: g, getProductType: f, isTestPartner: H } = O(), y = () => {
37
40
  var e;
38
- return (e = d.value) == null ? void 0 : e.handleSave(!0);
41
+ return (e = m.value) == null ? void 0 : e.handleSave(!0);
39
42
  }, {
40
- templateId: g,
41
- userId: f,
42
- guidoConfig: y,
43
- html: n = "",
44
- css: v = "",
45
- partnerName: s = l(),
46
- productType: c = u(),
47
- messageType: C = O,
48
- username: h = K
49
- } = r;
50
- window.GuidoConfig = ee(j, y), window.GuidoConfig.partner = {
51
- partnerName: s,
52
- productType: c,
53
- messageType: C
54
- };
55
- const { initPlugin: w } = B({
56
- emailId: g,
57
- userId: f,
58
- username: h,
59
- partnerName: s,
60
- productType: c,
61
- preselectedDynamicContentList: i,
43
+ templateId: v,
44
+ userId: b,
45
+ guidoConfig: C,
46
+ templateConfig: o,
47
+ html: r = "",
48
+ css: h = "",
49
+ partnerName: a = g(),
50
+ productType: i = f(),
51
+ messageType: S = J,
52
+ username: w = q
53
+ } = d, c = (o == null ? void 0 : o.preselectedDynamicContentList) || [];
54
+ window.GuidoConfig = ae(Q, C), window.GuidoConfig.partner = {
55
+ partnerName: a,
56
+ productType: i,
57
+ messageType: S
58
+ }, l.templateConfig = o;
59
+ const { initPlugin: D } = j({
60
+ emailId: v,
61
+ userId: b,
62
+ username: w,
63
+ partnerName: a,
64
+ productType: i,
65
+ preselectedDynamicContentList: c,
62
66
  onReady: () => {
63
- console.debug("guido:ready"), o("ready");
67
+ console.debug("guido:ready"), t("ready");
64
68
  }
65
- }), { getDefaultTemplate: S } = X(), N = G(() => {
69
+ }), { getDefaultTemplate: T } = ee(), R = I(() => {
66
70
  var e;
67
71
  return !((e = window.GuidoConfig) != null && e.useHeader);
68
72
  });
69
- M({
73
+ K({
70
74
  onBack: () => {
71
- console.debug("guido:back"), o("back");
75
+ console.debug("guido:back"), t("back");
72
76
  },
73
77
  onSaveStart: () => {
74
- console.debug("guido:save:start"), o("save:start");
78
+ console.debug("guido:save:start"), t("save:start");
75
79
  },
76
80
  onSaveComplete: (e) => {
77
- console.debug("guido:save:complete", e), o("save:complete", e);
81
+ console.debug("guido:save:complete", e), t("save:complete", e);
78
82
  }
79
83
  });
80
- const b = (e) => {
81
- console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
82
- }, D = () => {
84
+ const E = (e) => {
85
+ console.debug("dynamic-content:close", e), s.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
86
+ }, P = () => {
83
87
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
84
88
  };
85
- return U(() => t.value, () => {
86
- o("on-change", t.value);
87
- }), x(async () => {
89
+ return M(() => n.value, () => {
90
+ t("on-change", n.value);
91
+ }), z(async () => {
88
92
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
89
93
  try {
94
+ u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
90
95
  let e = {
91
- html: n && P(n),
92
- css: v,
96
+ html: r && await W(r),
97
+ css: h,
93
98
  forceRecreate: !0
94
99
  // TODO: It should be false for old templates. We will communicate with Stripo
95
100
  };
96
- e.html || (e = await S(), e.html = P(e.html)), await w(e), a.selectedDynamicContentList = i;
101
+ e.html || (e = await T(), e.html = await W(e.html)), await D(e), s.selectedDynamicContentList = c;
97
102
  } catch (e) {
98
103
  console.error("Failed to initialize Stripo editor:", e);
99
104
  }
100
105
  document.addEventListener("dynamic-content:open", (e) => {
101
- const T = e;
102
- console.debug("dynamic-content:open", T.detail), o("dynamic-content:open", T.detail);
106
+ const G = e;
107
+ console.debug("dynamic-content:open", G.detail), t("dynamic-content:open", G.detail);
103
108
  });
104
- }), F(() => {
109
+ }), B(() => {
105
110
  try {
106
111
  window.UIEditor.removeEditor();
107
112
  } catch {
@@ -109,14 +114,14 @@ const ye = /* @__PURE__ */ H({
109
114
  }
110
115
  }), L({
111
116
  dynamicContent: {
112
- insert: b,
113
- close: D
117
+ insert: E,
118
+ close: P
114
119
  },
115
- hasChanges: t,
116
- saveSilent: p
117
- }), { __sfc: !0, PreviewContainer: _, OnboardingWrapper: W, headerWrapperRef: d, dynamicContentStore: a, props: r, editorStore: m, previewStore: k, hasChanges: t, preselectedDynamicContentList: i, getPartnerName: l, getProductType: u, isTestPartner: A, saveSilent: p, templateId: g, userId: f, guidoConfig: y, html: n, css: v, partnerName: s, productType: c, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: N, insertDynamicContent: b, closeDynamicContent: D, Toaster: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V };
120
+ hasChanges: n,
121
+ saveSilent: y
122
+ }), { __sfc: !0, PreviewContainer: k, OnboardingWrapper: A, headerWrapperRef: m, dynamicContentStore: s, unsubscribeStore: u, props: d, configStore: l, editorStore: p, previewStore: N, hasChanges: n, getPartnerName: g, getProductType: f, isTestPartner: H, saveSilent: y, templateId: v, userId: b, guidoConfig: C, templateConfig: o, html: r, css: h, partnerName: a, productType: i, messageType: S, username: w, preselectedDynamicContentList: c, emit: t, initPlugin: D, getDefaultTemplate: T, noHeader: R, insertDynamicContent: E, closeDynamicContent: P, Toaster: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
118
123
  }
119
124
  });
120
125
  export {
121
- ye as default
126
+ Ee as default
122
127
  };
@@ -0,0 +1,18 @@
1
+ import s from "./UnsubscribeBreadcrumb.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var o = function() {
5
+ var e = this, t = e._self._c, r = e._self._setupProxy;
6
+ return t(r.InBreadcrumb, { staticClass: "c-p", attrs: { "without-router": "", "active-tab": r.unsubscribeStore.activeType, "home-icon": !1, list: r.breadcrumbs, routes: [] }, on: { click: r.navigate } });
7
+ }, c = [], n = /* @__PURE__ */ a(
8
+ s,
9
+ o,
10
+ c,
11
+ !1,
12
+ null,
13
+ "70835920"
14
+ );
15
+ const f = n.exports;
16
+ export {
17
+ f as default
18
+ };
@@ -0,0 +1,16 @@
1
+ import { defineComponent as o, computed as n } from "vue";
2
+ import { TYPE_TRANSLATIONS as s } from "../../../enums/unsubscribe.js";
3
+ import { useUnsubscribeStore as c } from "../../../stores/unsubscribe.js";
4
+ import { InBreadcrumb as m } from "@useinsider/design-system-vue";
5
+ const f = /* @__PURE__ */ o({
6
+ __name: "UnsubscribeBreadcrumb",
7
+ setup(a) {
8
+ const r = c(), t = n(() => r.getSelectedCollection.map((e) => ({ value: e, text: s[e] })));
9
+ return { __sfc: !0, unsubscribeStore: r, breadcrumbs: t, navigate: (e) => {
10
+ r.activeType = e.value;
11
+ }, InBreadcrumb: m };
12
+ }
13
+ });
14
+ export {
15
+ f as default
16
+ };
@@ -0,0 +1,24 @@
1
+ import a from "./UnsubscribePageSelection.vue2.js";
2
+ /* empty css */
3
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var o = function() {
5
+ var r = this, e = r._self._c, t = r._self._setupProxy;
6
+ return e(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", size: "large", "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.pageSelectionDrawerStatus, "title-text": t.trans("newsletter.select-a-template") }, on: { cancelOrBackButtonEvent: t.handleBack, onCloseEvent: t.closeModal, primaryButtonEvent: t.handleSave }, scopedSlots: r._u([{ key: "headerBottomSlot", fn: function() {
7
+ return [e(t.UnsubscribeBreadcrumb, { staticClass: "px-5 py-3" })];
8
+ }, proxy: !0 }]) }, [e("div", { staticClass: "d-g templates-wrapper" }, r._l(t.unsubscribeStore.getTemplatesByActiveType, function(s) {
9
+ return e("div", { key: s.id, staticClass: "template-wrapper", on: { click: function(u) {
10
+ return t.selectTemplate(s.id);
11
+ } } }, [e(t.InContainer, { staticClass: "template-container o-h", class: { selected: t.unsubscribeStore.getSelectedTemplateByActiveType === s.id }, attrs: { border: t.getBorderClass(s.id) } }, [e("div", { staticClass: "w-1 h-1 d-f j-c-c a-i-c" }, [e("img", { staticClass: "w-1 h-1 thumbnail o-h", attrs: { alt: s.name, src: s.thumbnail } })])]), e("div", { staticClass: "mt-1 f-s-1" }, [r._v(" " + r._s(s.name) + " ")])], 1);
12
+ }), 0)]);
13
+ }, i = [], c = /* @__PURE__ */ n(
14
+ a,
15
+ o,
16
+ i,
17
+ !1,
18
+ null,
19
+ "a86fc486"
20
+ );
21
+ const _ = c.exports;
22
+ export {
23
+ _ as default
24
+ };
@@ -0,0 +1,64 @@
1
+ import { defineComponent as f, ref as y, computed as n, watch as T } from "vue";
2
+ import g from "../../wrappers/WpDrawer.vue.js";
3
+ import { useToaster as S } from "../../../composables/useToaster.js";
4
+ import { useTranslations as v } from "../../../composables/useTranslations.js";
5
+ import { ToasterTypeOptions as B } from "../../../enums/toaster.js";
6
+ import { useUnsubscribeStore as w } from "../../../stores/unsubscribe.js";
7
+ import { InContainer as C } from "@useinsider/design-system-vue";
8
+ import h from "./UnsubscribeBreadcrumb.vue.js";
9
+ const E = /* @__PURE__ */ f({
10
+ __name: "UnsubscribePageSelection",
11
+ setup(_) {
12
+ const s = v(), e = w(), { showToaster: a } = S(), o = y(!1), c = n(() => e.isActiveTypeLastInCollection ? o.value ? s("unsubscription-preference.applying-changes") : s("statistics.apply") : s("products.select-and-continue")), i = n(() => e.pageSelectionUpdateStatus && e.isActiveTypeFirstInCollection ? s("products.cancel") : s("newsletter.back")), p = n(() => ({
13
+ primaryButton: {
14
+ styling: "solid",
15
+ type: "primary",
16
+ labelText: c.value,
17
+ loadingStatus: o.value,
18
+ disabledStatus: !1
19
+ },
20
+ cancelOrBackButton: {
21
+ styling: "ghost",
22
+ type: "secondary",
23
+ labelText: i.value,
24
+ disabledStatus: o.value
25
+ }
26
+ })), u = (t) => e.getSelectedTemplateByActiveType === t ? "bor-w-3 bor-s-s bor-c-7" : "bor-w-1 bor-s-s bor-c-6", r = (t) => {
27
+ e.pageSelectionDrawerStatus = !1, t && setTimeout(() => {
28
+ t();
29
+ }, 500);
30
+ }, m = () => {
31
+ if (e.isActiveTypeFirstInCollection) {
32
+ r(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);
33
+ return;
34
+ }
35
+ e.setPreviousType();
36
+ }, d = () => {
37
+ if (e.isActiveTypeLastInCollection) {
38
+ o.value = !0;
39
+ const t = e.selectedCollectionType, l = e.getSelectedTemplatesByCollection(t);
40
+ e.addUnsubscribePages(l), document.dispatchEvent(new CustomEvent("unsubscribe:select", {
41
+ detail: {
42
+ collectionType: t,
43
+ selectedPages: l
44
+ }
45
+ })), r(() => {
46
+ o.value = !1, a({
47
+ type: B.Success,
48
+ message: s("global-unsubscribe.pages-were-attached")
49
+ });
50
+ });
51
+ return;
52
+ }
53
+ e.setNextType();
54
+ }, b = (t) => {
55
+ e.setSelectedTemplate(t);
56
+ };
57
+ return T(() => e.pageSelectionDrawerStatus, (t) => {
58
+ t && e.pageSelectionUpdateStatus && e.fetchTemplates();
59
+ }), { __sfc: !0, trans: s, unsubscribeStore: e, showToaster: a, isApplying: o, getPrimaryButtonText: c, getCancelOrBackButtonText: i, footerButtonGroupOptions: p, getBorderClass: u, closeModal: r, handleBack: m, handleSave: d, selectTemplate: b, WpDrawer: g, InContainer: C, UnsubscribeBreadcrumb: h };
60
+ }
61
+ });
62
+ export {
63
+ E as default
64
+ };
@@ -0,0 +1,18 @@
1
+ import n from "./UnsubscribeTypeSelection.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var i = function() {
5
+ var e = this, s = e._self._c, t = e._self._setupProxy;
6
+ return s(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.typeSelectionDrawerStatus, "title-text": t.trans("unsubscription-preference.select-unsubscribe-page-title") }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.selectCollection } }, [s(t.InSegments, { staticClass: "w-1", attrs: { "with-icon": "", align: "vertical", disable: t.isSelecting, "segment-list": t.segmentList, selected: t.selectedCollection, "skeleton-sizing": { width: 495, height: 180 }, "skeleton-status": t.skeletonStatus }, on: { click: t.changeCollection } })], 1);
7
+ }, r = [], c = /* @__PURE__ */ o(
8
+ n,
9
+ i,
10
+ r,
11
+ !1,
12
+ null,
13
+ "dd57102d"
14
+ );
15
+ const d = c.exports;
16
+ export {
17
+ d as default
18
+ };
@@ -0,0 +1,107 @@
1
+ import { defineComponent as h, ref as b, computed as m, watch as _ } from "vue";
2
+ import v from "../../wrappers/WpDrawer.vue.js";
3
+ import { useToaster as B } from "../../../composables/useToaster.js";
4
+ import { useTranslations as N } from "../../../composables/useTranslations.js";
5
+ import { ToasterTypeOptions as U } from "../../../enums/toaster.js";
6
+ import { PAGE_TYPES as l, ACADEMY_LINK as w, UNSUBSCRIBE_PAGES_LINK as P, TYPE_TRANSLATIONS as R } from "../../../enums/unsubscribe.js";
7
+ import { useUnsubscribeStore as D } from "../../../stores/unsubscribe.js";
8
+ import { InSegments as I } from "@useinsider/design-system-vue";
9
+ const z = /* @__PURE__ */ h({
10
+ __name: "UnsubscribeTypeSelection",
11
+ setup(G) {
12
+ const e = N(), { showToaster: f } = B(), t = D(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), S = e(
13
+ "unsubscription-preference.select-unsubscribe-page-description",
14
+ { action: `<a href="${w}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
15
+ ), T = m(() => [
16
+ {
17
+ description: e("unsubscription-preference.type-global-unsubscribe-description"),
18
+ icon: "line-contact-global-unsub-page",
19
+ text: e("unsubscription-preference.type-global-unsubscribe"),
20
+ value: l.GLOBAL_UNSUBSCRIBE,
21
+ disable: t.isGlobalUnsubscribeDisabled,
22
+ position: "bottom",
23
+ tooltipText: t.isGlobalUnsubscribeDisabled ? e("unsubscription-preference.global-unsub-added") : ""
24
+ },
25
+ {
26
+ description: e("unsubscription-preference.type-subscription-preferences-center-description"),
27
+ icon: "line-contact-sub-pref-center-page",
28
+ text: e("unsubscription-preference.type-subscription-preferences-center"),
29
+ value: l.SUBSCRIPTION_PREFERENCE_CENTER,
30
+ disable: t.isSubscriptionPreferencesCenterDisabled,
31
+ tooltipText: t.isSubscriptionPreferencesCenterDisabled ? e("unsubscription-preference.pref-center-added") : ""
32
+ }
33
+ ]), y = m(() => ({
34
+ primaryButton: {
35
+ styling: "solid",
36
+ type: "primary",
37
+ labelText: e(
38
+ n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
39
+ ),
40
+ loadingStatus: n.value,
41
+ disabledStatus: !1,
42
+ skeletonStatus: i.value,
43
+ skeletonSizing: { width: 168, height: 40 }
44
+ },
45
+ cancelOrBackButton: {
46
+ styling: "ghost",
47
+ type: "secondary",
48
+ labelText: e("products.cancel"),
49
+ disabledStatus: n.value,
50
+ skeletonStatus: i.value,
51
+ skeletonSizing: { width: 78, height: 40 }
52
+ }
53
+ })), d = (s) => {
54
+ t.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel")), s && setTimeout(() => {
55
+ s();
56
+ }, 500);
57
+ }, E = (s) => {
58
+ o.value = s;
59
+ }, g = () => {
60
+ const s = t.hasTemplatesByCollectionType, r = [];
61
+ if (Object.entries(s).forEach(([c, p]) => {
62
+ p || r.push(Number(c));
63
+ }), r.length === 0)
64
+ return !0;
65
+ const a = r.map((c) => R[c]);
66
+ let u = "";
67
+ if (r.length === 1)
68
+ u = e("unsubscription-preference.create-page-to-continue", {
69
+ page: a[0]
70
+ });
71
+ else if (r.length === 2)
72
+ u = e("unsubscription-preference.create-pages-to-continue", {
73
+ page1: a[0],
74
+ page2: a[1]
75
+ });
76
+ else {
77
+ const c = a.pop() ?? "", p = a.join(", ");
78
+ u = e("unsubscription-preference.create-multiple-pages-to-continue", {
79
+ pages: p,
80
+ lastPage: c
81
+ });
82
+ }
83
+ return f({
84
+ type: U.Warning,
85
+ message: u,
86
+ actionButton: {
87
+ text: "Go to Unsubscribe Pages",
88
+ onClick: () => {
89
+ window.location.href = P;
90
+ }
91
+ }
92
+ }), !1;
93
+ }, C = async () => {
94
+ if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !g()) {
95
+ n.value = !1, d();
96
+ return;
97
+ }
98
+ n.value = !1, t.typeSelectionDrawerStatus = !1, t.pageSelectionDrawerStatus = !0;
99
+ };
100
+ return _(() => t.typeSelectionDrawerStatus, (s) => {
101
+ s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (o.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), i.value = !1);
102
+ }), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: g, selectCollection: C, WpDrawer: v, InSegments: I };
103
+ }
104
+ });
105
+ export {
106
+ z as default
107
+ };
@@ -0,0 +1,18 @@
1
+ import o from "./UnsubscribeWrapper.vue2.js";
2
+ import t from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var _ = function() {
4
+ var s;
5
+ var e = this, n = e._self._c, r = e._self._setupProxy;
6
+ return (s = r.config.extensions) != null && s.unsubscribe ? n("div", [n(r.UnsubscribeTypeSelection), n(r.UnsubscribePageSelection)], 1) : e._e();
7
+ }, c = [], i = /* @__PURE__ */ t(
8
+ o,
9
+ _,
10
+ c,
11
+ !1,
12
+ null,
13
+ null
14
+ );
15
+ const l = i.exports;
16
+ export {
17
+ l as default
18
+ };
@@ -0,0 +1,12 @@
1
+ import { defineComponent as t, defineAsyncComponent as e } from "vue";
2
+ import { useConfig as r } from "../../../composables/useConfig.js";
3
+ const m = /* @__PURE__ */ t({
4
+ __name: "UnsubscribeWrapper",
5
+ setup(i) {
6
+ const n = e(() => import("./UnsubscribePageSelection.vue.js")), o = e(() => import("./UnsubscribeTypeSelection.vue.js")), { config: s } = r();
7
+ return { __sfc: !0, UnsubscribePageSelection: n, UnsubscribeTypeSelection: o, config: s };
8
+ }
9
+ });
10
+ export {
11
+ m as default
12
+ };
@@ -1,6 +1,6 @@
1
1
  import r from "./WpDrawer.vue2.js";
2
2
  import s from "../../_virtual/_plugin-vue2_normalizer.js";
3
- var i = function() {
3
+ var u = function() {
4
4
  var t = this, n = t._self._c, e = t._self._setupProxy;
5
5
  return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
6
6
  return e.emit("cancelOrBackButtonEvent");
@@ -8,13 +8,15 @@ var i = function() {
8
8
  return e.emit("onCloseEvent");
9
9
  }, primaryButtonEvent: function(o) {
10
10
  return e.emit("primaryButtonEvent");
11
- } }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
11
+ } }, scopedSlots: t._u([t.$slots.headerBottomSlot ? { key: "headerBottomSlot", fn: function() {
12
+ return [t._t("headerBottomSlot")];
13
+ }, proxy: !0 } : null, { key: "contentSlot", fn: function() {
12
14
  return [n("div", [t._t("default")], 2)];
13
15
  }, proxy: !0 }], null, !0) });
14
- }, u = [], c = /* @__PURE__ */ s(
16
+ }, i = [], c = /* @__PURE__ */ s(
15
17
  r,
16
- i,
17
18
  u,
19
+ i,
18
20
  !1,
19
21
  null,
20
22
  null