@useinsider/guido 2.1.0-beta.3889d62 → 2.1.0-beta.3a2681b

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 (182) hide show
  1. package/README.md +41 -2
  2. package/dist/components/Guido.vue.js +1 -1
  3. package/dist/components/Guido.vue2.js +66 -66
  4. package/dist/components/organisms/base/Toaster.vue.js +4 -4
  5. package/dist/components/organisms/base/Toaster.vue2.js +12 -9
  6. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
  7. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
  8. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
  9. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
  10. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
  11. package/dist/composables/useHtmlValidator.js +114 -104
  12. package/dist/composables/useRecommendation.js +54 -21
  13. package/dist/composables/useSave.js +16 -12
  14. package/dist/composables/useStripo.js +63 -57
  15. package/dist/composables/useStripoEventHandler.js +27 -12
  16. package/dist/composables/useSyncModuleExtractor.js +45 -0
  17. package/dist/composables/useVersionHistoryApi.js +1 -1
  18. package/dist/config/compiler/recommendationCompilerRules.js +45 -39
  19. package/dist/config/compiler/utils/recommendationCompilerUtils.js +121 -0
  20. package/dist/config/i18n/en/index.js +11 -0
  21. package/dist/config/i18n/en/labels.json.js +7 -0
  22. package/dist/config/i18n/en/toasters.json.js +56 -0
  23. package/dist/config/i18n/en/tooltips.json.js +82 -0
  24. package/dist/config/i18n/index.js +7 -0
  25. package/dist/config/migrator/itemsBlockMigrator.js +127 -122
  26. package/dist/config/migrator/recommendationMigrator.js +2 -2
  27. package/dist/enums/extensions/recommendationBlock.js +1 -1
  28. package/dist/enums/recommendation.js +16 -15
  29. package/dist/enums/unsubscribe.js +25 -21
  30. package/dist/extensions/Blocks/Recommendation/block.js +133 -9
  31. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
  32. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
  33. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +66 -0
  34. package/dist/extensions/Blocks/Recommendation/constants/layout.js +22 -0
  35. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +21 -0
  36. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
  37. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +80 -0
  38. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +232 -0
  39. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
  40. package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +92 -0
  41. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +102 -0
  42. package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +209 -0
  43. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +52 -0
  44. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +250 -0
  45. package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +70 -0
  46. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +160 -0
  47. package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +67 -0
  48. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +307 -0
  49. package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
  50. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
  51. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +108 -0
  52. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
  53. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
  54. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextAfterControl.js → omnibusDiscount/textAfter.js} +16 -14
  55. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.js → omnibusDiscount/textBefore.js} +16 -14
  56. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
  57. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextAfterControl.js → omnibusPrice/textAfter.js} +16 -14
  58. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextBeforeControl.js → omnibusPrice/textBefore.js} +14 -12
  59. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
  60. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +222 -0
  61. package/dist/extensions/Blocks/Recommendation/extension.js +40 -17
  62. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +19 -3
  63. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +13 -4
  64. package/dist/extensions/Blocks/Recommendation/services/configService.js +240 -0
  65. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -10
  66. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +254 -207
  67. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +228 -0
  68. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +251 -0
  69. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +66 -0
  70. package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
  71. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +169 -0
  72. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +73 -0
  73. package/dist/extensions/Blocks/Recommendation/templates/utils.js +134 -0
  74. package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +6 -0
  75. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
  76. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +26 -15
  77. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +29 -0
  78. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
  79. package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
  80. package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
  81. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
  82. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
  83. package/dist/extensions/Blocks/controlFactories.js +125 -93
  84. package/dist/guido.css +1 -1
  85. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +242 -186
  86. package/dist/services/recommendationApi.js +11 -8
  87. package/dist/services/stripoApi.js +55 -19
  88. package/dist/services/templateLibraryApi.js +16 -13
  89. package/dist/src/@types/config/schemas.d.ts +1 -1
  90. package/dist/src/@types/events.d.ts +38 -2
  91. package/dist/src/components/Guido.vue.d.ts +2 -2
  92. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  93. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  94. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  95. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
  96. package/dist/src/composables/useGuidoActions.d.ts +1 -1
  97. package/dist/src/composables/useRecommendation.d.ts +1 -0
  98. package/dist/src/composables/useSave.d.ts +2 -2
  99. package/dist/src/composables/useStripo.d.ts +2 -2
  100. package/dist/src/composables/useSyncModuleExtractor.d.ts +4 -0
  101. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
  102. package/dist/src/config/i18n/en/index.d.ts +1 -0
  103. package/dist/src/config/i18n/index.d.ts +16 -0
  104. package/dist/src/enums/unsubscribe.d.ts +3 -0
  105. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +67 -0
  106. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
  107. package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +0 -24
  108. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +49 -0
  109. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +13 -0
  110. package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +41 -0
  111. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +35 -0
  112. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
  113. package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +31 -0
  114. package/dist/src/extensions/Blocks/Recommendation/{cardCompositionControl.d.ts → controls/cardComposition/index.d.ts} +23 -3
  115. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
  116. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +21 -589
  117. package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +37 -0
  118. package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +29 -0
  119. package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +52 -0
  120. package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
  121. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +79 -0
  122. package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +24 -0
  123. package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +60 -0
  124. package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +23 -0
  125. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +221 -0
  126. package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
  127. package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
  128. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +34 -0
  129. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
  130. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
  131. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
  132. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
  133. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
  134. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
  135. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
  136. package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
  137. package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +83 -0
  138. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
  139. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +151 -0
  140. package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +6 -0
  141. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +138 -468
  142. package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +20 -0
  143. package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → grid/migration.d.ts} +11 -4
  144. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +33 -0
  145. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +41 -0
  146. package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +8 -0
  147. package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +25 -0
  148. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +18 -0
  149. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +66 -0
  150. package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +7 -0
  151. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +166 -0
  152. package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +33 -0
  153. package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
  154. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +77 -0
  155. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
  156. package/dist/src/mock/api/settings.d.ts +2 -0
  157. package/dist/src/services/stripoApi.d.ts +5 -0
  158. package/dist/src/stores/editor.d.ts +23 -0
  159. package/dist/src/utils/templatePreparation.d.ts +1 -1
  160. package/dist/static/styles/components/notification.css.js +18 -0
  161. package/dist/static/styles/components/tools.css.js +6 -2
  162. package/dist/static/styles/customEditorStyle.css.js +35 -11
  163. package/dist/static/styles/variables.css.js +2 -0
  164. package/dist/stores/editor.js +2 -1
  165. package/dist/stores/unsubscribe.js +37 -34
  166. package/dist/utils/pairProductVariables.js +57 -56
  167. package/dist/utils/templatePreparation.js +16 -15
  168. package/package.json +1 -1
  169. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
  170. package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
  171. package/dist/extensions/Blocks/Recommendation/control.js +0 -336
  172. package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
  173. package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
  174. package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
  175. package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
  176. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
  177. package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
  178. package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
  179. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -38
  180. package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
  181. package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
  182. package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  <p align="center">
2
2
  <a href="https://www.youtube.com/shorts/Y0RwBeMezL4" target="_blank" rel="noopener noreferrer">
3
- <img width="180" src="./public/guido.png" alt="Guido logo">
3
+ <img width="180"
4
+ src="https://web-image.useinsider.com/guido/defaultImageLibrary/iUH0liTK0d2YDsVB5LDN1770169173.jpg"
5
+ alt="Guido logo">
4
6
  </a>
5
7
  </p>
6
8
 
@@ -172,11 +174,48 @@ const config: GuidoConfigInput = {
172
174
  | `dynamic-content:open` | `DynamicContent \| null` | User wants to insert dynamic content |
173
175
  | `back` | - | Back button clicked |
174
176
  | `save:start` | - | Save process started |
175
- | `save:complete` | `Template` | Save completed successfully |
177
+ | `save:complete` | `SavedTemplateDetails` | Save completed successfully (includes `metadata`) |
176
178
  | `on-change` | - | Template was modified |
177
179
  | `test-email:click` | - | Test email button clicked |
178
180
  | `onboarding-finished` | - | Onboarding popup dismissed |
179
181
 
182
+ ### `save:complete` Payload
183
+
184
+ The `save:complete` event emits a `SavedTemplateDetails` object containing the compiled template data along with editor `metadata`:
185
+
186
+ ```typescript
187
+ interface SavedTemplateDetails {
188
+ dynamicContentList: DynamicContent[];
189
+ compiledHtml: string;
190
+ rawHtml: string;
191
+ css: string;
192
+ ampHtml: string;
193
+ ampErrors: string[];
194
+ modules: number[];
195
+ recommendation: {
196
+ campaignUrls: Record<string, string>;
197
+ configs: Record<string, string>;
198
+ };
199
+ unsubscribe: {
200
+ status: boolean;
201
+ config: number[];
202
+ };
203
+ metadata: Metadata;
204
+ }
205
+
206
+ interface Metadata {
207
+ emailId: string;
208
+ partnerName?: string;
209
+ productType?: number;
210
+ userId: string;
211
+ username?: string;
212
+ savedModulesFolderName?: string;
213
+ defaultModulesFolderName?: string;
214
+ }
215
+ ```
216
+
217
+ > ⚠️ **Important:** The `metadata` object in the `save:complete` payload must be passed directly into your `templateConfig` / `stripoConfig` object while saving. This ensures the email-service receives the correct version of sync modules features
218
+
180
219
  ---
181
220
 
182
221
  ## Exposed Methods
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "16abb398"
15
+ "a26d7792"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,65 +1,64 @@
1
- import { defineComponent as z, defineAsyncComponent as M, ref as K, computed as _, watch as V, onMounted as j, onUnmounted as q } from "vue";
2
- import { provideGuidoActions as J } from "../composables/useGuidoActions.js";
3
- import { usePartner as Q } from "../composables/usePartner.js";
4
- import { useStripo as X } from "../composables/useStripo.js";
5
- import { useTimerClone as Y } from "../composables/useTimerClone.js";
6
- import { migrate as P } from "../config/migrator/index.js";
7
- import { ModuleFolderDefaults as A } from "../enums/defaults.js";
8
- import Z from "./organisms/base/Toaster.vue.js";
9
- import $ from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
10
- import ee from "./organisms/header/HeaderWrapper.vue.js";
11
- import oe from "./organisms/LoadingWrapper.vue.js";
12
- import te from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
13
- import ne from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
1
+ import { defineComponent as K, defineAsyncComponent as _, ref as V, computed as P, watch as j, onMounted as q, onUnmounted as J } from "vue";
2
+ import { provideGuidoActions as Q } from "../composables/useGuidoActions.js";
3
+ import { usePartner as X } from "../composables/usePartner.js";
4
+ import { useStripo as Y } from "../composables/useStripo.js";
5
+ import { useTimerClone as Z } from "../composables/useTimerClone.js";
6
+ import { migrate as A } from "../config/migrator/index.js";
7
+ import { ModuleFolderDefaults as N } from "../enums/defaults.js";
8
+ import $ from "./organisms/base/Toaster.vue.js";
9
+ import ee from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
10
+ import oe from "./organisms/header/HeaderWrapper.vue.js";
11
+ import te from "./organisms/LoadingWrapper.vue.js";
12
+ import ne from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
13
+ import se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
14
14
  import { useStripoApi as re } from "../services/stripoApi.js";
15
- import { useConfigStore as se } from "../stores/config.js";
16
- import { useDynamicContentStore as ce } from "../stores/dynamic-content.js";
17
- import { useEditorStore as ae } from "../stores/editor.js";
18
- import { usePreviewStore as ie } from "../stores/preview.js";
15
+ import { useConfigStore as ce } from "../stores/config.js";
16
+ import { useDynamicContentStore as ae } from "../stores/dynamic-content.js";
17
+ import { useEditorStore as ie } from "../stores/editor.js";
18
+ import { usePreviewStore as me } from "../stores/preview.js";
19
19
  import { useUnsubscribeStore as de } from "../stores/unsubscribe.js";
20
- const Le = /* @__PURE__ */ z({
20
+ const Me = /* @__PURE__ */ K({
21
21
  __name: "Guido",
22
22
  props: {
23
23
  config: null
24
24
  },
25
25
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
26
- setup(N, { expose: W, emit: t }) {
27
- const u = N, I = M(
26
+ setup(W, { expose: I, emit: t }) {
27
+ const v = W, O = _(
28
28
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
29
- ), O = M(
29
+ ), G = _(
30
30
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
31
- ), p = K(), a = ce(), v = de(), r = se();
32
- r.init(u.config);
33
- const i = ae(), G = ie(), s = _(() => i.hasChanges), { isTestPartner: H } = Q(), y = () => {
31
+ ), h = V(), i = ae(), y = de(), s = ce();
32
+ s.init(v.config);
33
+ const m = ie(), H = me(), c = P(() => m.hasChanges), { isTestPartner: x } = X(), f = () => {
34
34
  var e;
35
- return (e = p.value) == null ? void 0 : e.handleSave(!0);
35
+ return (e = h.value) == null ? void 0 : e.handleSave(!0);
36
36
  }, {
37
37
  templateId: d,
38
- userId: h,
39
- partnerName: f,
40
- productType: b,
41
- username: S,
38
+ userId: b,
39
+ partnerName: S,
40
+ username: g,
42
41
  template: o,
43
42
  editor: n
44
- } = r, c = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [], w = (n == null ? void 0 : n.savedModulesFolderName) || A.SAVED_MODULES, D = (n == null ? void 0 : n.defaultModulesFolderName) || A.DEFAULT_MODULES;
45
- i.templateId = d;
46
- const { initPlugin: E } = X({
43
+ } = s, a = (o == null ? void 0 : o.html) || "", D = (o == null ? void 0 : o.css) || "", l = (o == null ? void 0 : o.preselectedDynamicContent) || [], w = (n == null ? void 0 : n.savedModulesFolderName) || N.SAVED_MODULES, E = (n == null ? void 0 : n.defaultModulesFolderName) || N.DEFAULT_MODULES;
44
+ m.templateId = d;
45
+ const u = {
47
46
  emailId: d,
48
- userId: h,
49
- username: S,
50
- partnerName: f,
51
- productType: b,
52
- preselectedDynamicContentList: m,
47
+ userId: b,
48
+ username: g,
49
+ partnerName: S,
53
50
  savedModulesFolderName: w,
54
- defaultModulesFolderName: D,
51
+ defaultModulesFolderName: E
52
+ }, C = {
53
+ preselectedDynamicContentList: l,
55
54
  onReady: () => {
56
55
  console.debug("guido:ready"), t("ready");
57
56
  }
58
- }), { getDefaultTemplate: C } = re(), { cloneTimersOnSave: T, hasTimerBlocks: k } = Y(), x = _(() => {
57
+ }, { initPlugin: T } = Y(u, C), { getDefaultTemplate: k } = re(), { cloneTimersOnSave: F, hasTimerBlocks: U } = Z(), B = P(() => {
59
58
  var e;
60
- return !((e = r.ui) != null && e.showHeader);
59
+ return !((e = s.ui) != null && e.showHeader);
61
60
  });
62
- J({
61
+ Q({
63
62
  onBack: () => {
64
63
  console.debug("guido:back"), t("back");
65
64
  },
@@ -67,55 +66,56 @@ const Le = /* @__PURE__ */ z({
67
66
  console.debug("guido:save:start"), t("save:start");
68
67
  },
69
68
  onSaveComplete: (e) => {
70
- console.debug("guido:save:complete", e), t("save:complete", e);
69
+ const r = { ...e, metadata: u };
70
+ console.debug("guido:save:complete", r), t("save:complete", r);
71
71
  },
72
72
  onTestEmailClick: () => {
73
73
  console.debug("guido:test-email:click"), t("test-email:click");
74
74
  }
75
75
  });
76
- const F = (e) => {
77
- console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
78
- }, U = () => {
76
+ const L = (e) => {
77
+ console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
78
+ }, M = () => {
79
79
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
80
80
  };
81
- V(() => s.value, () => {
82
- t("on-change", s.value);
81
+ j(() => c.value, () => {
82
+ t("on-change", c.value);
83
83
  });
84
- const l = (e) => {
85
- const L = e, { attribute: B, position: R } = L.detail;
86
- console.debug("dynamic-content:open", L.detail), t("dynamic-content:open", B, R);
84
+ const p = (e) => {
85
+ const r = e, { attribute: R, position: z } = r.detail;
86
+ console.debug("dynamic-content:open", r.detail), t("dynamic-content:open", R, z);
87
87
  };
88
- return j(async () => {
88
+ return q(async () => {
89
89
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
90
90
  try {
91
- v.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
91
+ y.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
92
92
  let e = {
93
- html: c && await P(c),
94
- css: g
93
+ html: a && await A(a),
94
+ css: D
95
95
  };
96
- e.html || (e = await C(), e.html = await P(e.html)), k(e.html) && (e.html = await T(e.html)), await E(e), a.selectedDynamicContentList = m;
96
+ e.html || (e = await k(), e.html = await A(e.html)), U(e.html) && (e.html = await F(e.html)), await T(e), i.selectedDynamicContentList = l;
97
97
  } catch (e) {
98
98
  console.error("Failed to initialize Stripo editor:", e);
99
99
  }
100
- document.addEventListener("dynamic-content:open", l);
101
- }), q(() => {
102
- document.removeEventListener("dynamic-content:open", l);
100
+ document.addEventListener("dynamic-content:open", p);
101
+ }), J(() => {
102
+ document.removeEventListener("dynamic-content:open", p);
103
103
  try {
104
104
  window.UIEditor.removeEditor();
105
105
  } catch {
106
106
  console.debug("Failed to remove Stripo editor: No editor found");
107
107
  }
108
- r.reset();
109
- }), W({
108
+ s.reset();
109
+ }), I({
110
110
  dynamicContent: {
111
- insert: F,
112
- close: U
111
+ insert: L,
112
+ close: M
113
113
  },
114
- hasChanges: s,
115
- saveSilent: y
116
- }), { __sfc: !0, PreviewContainer: I, OnboardingWrapper: O, headerWrapperRef: p, dynamicContentStore: a, unsubscribeStore: v, props: u, configStore: r, editorStore: i, previewStore: G, hasChanges: s, isTestPartner: H, saveSilent: y, templateId: d, userId: h, partnerName: f, productType: b, username: S, templateConfig: o, editorConfig: n, html: c, css: g, preselectedDynamicContentList: m, savedModulesFolderName: w, defaultModulesFolderName: D, emit: t, initPlugin: E, getDefaultTemplate: C, cloneTimersOnSave: T, hasTimerBlocks: k, noHeader: x, insertDynamicContent: F, closeDynamicContent: U, handleDynamicContentOpen: l, Toaster: Z, FilterSelectionDrawer: $, HeaderWrapper: ee, LoadingWrapper: oe, SaveAsTemplateDrawer: te, UnsubscribeWrapper: ne };
114
+ hasChanges: c,
115
+ saveSilent: f
116
+ }), { __sfc: !0, PreviewContainer: O, OnboardingWrapper: G, headerWrapperRef: h, dynamicContentStore: i, unsubscribeStore: y, props: v, configStore: s, editorStore: m, previewStore: H, hasChanges: c, isTestPartner: x, saveSilent: f, templateId: d, userId: b, partnerName: S, username: g, templateConfig: o, editorConfig: n, html: a, css: D, preselectedDynamicContentList: l, savedModulesFolderName: w, defaultModulesFolderName: E, emit: t, metadata: u, options: C, initPlugin: T, getDefaultTemplate: k, cloneTimersOnSave: F, hasTimerBlocks: U, noHeader: B, insertDynamicContent: L, closeDynamicContent: M, handleDynamicContentOpen: p, Toaster: $, FilterSelectionDrawer: ee, HeaderWrapper: oe, LoadingWrapper: te, SaveAsTemplateDrawer: ne, UnsubscribeWrapper: se };
117
117
  }
118
118
  });
119
119
  export {
120
- Le as default
120
+ Me as default
121
121
  };
@@ -1,10 +1,10 @@
1
- import e from "./Toaster.vue2.js";
1
+ import n from "./Toaster.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var r = function() {
4
- var o = this, n = o._self._c, t = o._self._setupProxy;
5
- return n(t.InToasts, { attrs: { "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
4
+ var o = this, e = o._self._c, t = o._self._setupProxy;
5
+ return e(t.InToasts, { ref: "toastRef", attrs: { "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
6
6
  }, a = [], _ = /* @__PURE__ */ s(
7
- e,
7
+ n,
8
8
  r,
9
9
  a,
10
10
  !1,
@@ -1,15 +1,18 @@
1
- import { defineComponent as n, computed as e } from "vue";
2
- import { useToasterStore as i } from "../../../stores/toaster.js";
3
- import { InToasts as c } from "@useinsider/design-system-vue";
4
- const f = /* @__PURE__ */ n({
1
+ import { defineComponent as a, ref as c, computed as i, onBeforeUnmount as u } from "vue";
2
+ import { useToasterStore as f } from "../../../stores/toaster.js";
3
+ import { InToasts as m } from "@useinsider/design-system-vue";
4
+ const d = /* @__PURE__ */ a({
5
5
  __name: "Toaster",
6
- setup(s) {
7
- const t = i(), o = e(() => t.actionButton ? [{ text: t.actionButton.text }] : []);
8
- return { __sfc: !0, store: t, actionButtonsConfig: o, handleActionClick: () => {
6
+ setup(p) {
7
+ const t = f(), o = c(null), r = i(() => t.actionButton ? [{ text: t.actionButton.text }] : []), s = () => {
9
8
  t.actionButton && t.actionButton.onClick(), t.hideToaster();
10
- }, InToasts: c };
9
+ };
10
+ return u(() => {
11
+ var e, n;
12
+ t.$reset(), (n = (e = o.value) == null ? void 0 : e.$el) == null || n.remove();
13
+ }), { __sfc: !0, store: t, toastRef: o, actionButtonsConfig: r, handleActionClick: s, InToasts: m };
11
14
  }
12
15
  });
13
16
  export {
14
- f as default
17
+ d as default
15
18
  };
@@ -1,16 +1,16 @@
1
- import i from "./EmailSizeIndicator.vue2.js";
1
+ import s from "./EmailSizeIndicator.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var o = function() {
5
- var t = this, s = t._self._c, e = t._self._setupProxy;
6
- return e.previewStore.previewHtml ? s("div", { staticClass: "d-f a-i-c j-c-c" }, [s(e.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: e.htmlSize, "max-value": e.MAX_EMAIL_SIZE_IN_KB, type: e.progress.type, value: e.progress.value } }), s(e.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: e.trans("email-editor.preview-design-size-tooltip") } })], 1) : t._e();
5
+ var e = this, i = e._self._c, t = e._self._setupProxy;
6
+ return t.previewStore.previewHtml ? i("div", { staticClass: "d-f a-i-c j-c-c" }, [i(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), i(t.InTooltipV2, { attrs: { id: "email-size-tooltip", "icon-status": "", "static-position": "bottom center", "dynamic-position": !1, text: t.trans("email-editor.preview-design-size-tooltip") } })], 1) : e._e();
7
7
  }, a = [], n = /* @__PURE__ */ r(
8
- i,
8
+ s,
9
9
  o,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "913a3417"
13
+ "079d2bf7"
14
14
  );
15
15
  const m = n.exports;
16
16
  export {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
2
2
  import { useTranslations as p } from "../../../../composables/useTranslations.js";
3
3
  import { usePreviewStore as _ } from "../../../../stores/preview.js";
4
- import { InTooltip as v, InProgress as f } from "@useinsider/design-system-vue";
4
+ import { InTooltipV2 as v, InProgress as f } from "@useinsider/design-system-vue";
5
5
  const S = /* @__PURE__ */ c({
6
6
  __name: "EmailSizeIndicator",
7
7
  setup(w) {
@@ -17,7 +17,7 @@ const S = /* @__PURE__ */ c({
17
17
  }, i = p();
18
18
  return u(() => t.previewHtml, () => {
19
19
  r();
20
- }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltip: v };
20
+ }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltipV2: v };
21
21
  }
22
22
  });
23
23
  export {
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as n, ref as a, computed as l } from "vue";
2
2
  import i from "../../../wrappers/WpDrawer.vue.js";
3
- import { useTranslations as p } from "../../../../composables/useTranslations.js";
4
- import { useRecommendationExtensionStore as c } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
3
+ import { useTranslations as c } from "../../../../composables/useTranslations.js";
4
+ import { useRecommendationExtensionStore as p } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
5
  import u from "./Filters.vue.js";
6
- const b = /* @__PURE__ */ n({
6
+ const v = /* @__PURE__ */ n({
7
7
  __name: "FilterSelectionDrawer",
8
- setup(m) {
9
- const t = p(), o = c(), e = a(!1), s = l(() => ({
8
+ setup(f) {
9
+ const r = c(), t = p(), e = a(!1), s = l(() => ({
10
10
  primaryButton: {
11
11
  styling: "solid",
12
12
  type: "primary",
13
- labelText: t(
13
+ labelText: r(
14
14
  e.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
15
15
  ),
16
16
  loadingStatus: e.value,
@@ -19,19 +19,20 @@ const b = /* @__PURE__ */ n({
19
19
  cancelOrBackButton: {
20
20
  styling: "ghost",
21
21
  type: "secondary",
22
- labelText: t("products.cancel"),
22
+ labelText: r("products.cancel"),
23
23
  disabledStatus: e.value
24
24
  }
25
- })), r = () => {
26
- o.filterSelectionDrawerStatus = !1;
25
+ })), o = () => {
26
+ t.closeFilterDrawer();
27
27
  };
28
- return { __sfc: !0, trans: t, store: o, isApplying: e, footerButtonGroupOptions: s, closeModal: r, applyFilter: () => {
29
- e.value = !0, setTimeout(() => {
30
- console.debug("Filter applied!"), r(), o.generateFilterQuery();
31
- }, 2e3);
28
+ return { __sfc: !0, trans: r, store: t, isApplying: e, footerButtonGroupOptions: s, closeModal: o, applyFilter: () => {
29
+ e.value = !0, t.patchCurrentBlockConfig(
30
+ { filters: t.recommendationConfigs.filters },
31
+ { triggerRefetch: !0 }
32
+ ), o(), e.value = !1;
32
33
  }, WpDrawer: i, Filters: u };
33
34
  }
34
35
  });
35
36
  export {
36
- b as default
37
+ v as default
37
38
  };
@@ -16,7 +16,7 @@ var o = function() {
16
16
  i,
17
17
  !1,
18
18
  null,
19
- "a86fc486"
19
+ "df672485"
20
20
  );
21
21
  const _ = c.exports;
22
22
  export {
@@ -1,15 +1,15 @@
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";
1
+ import { defineComponent as g, ref as y, computed as n, watch as S } from "vue";
2
+ import T from "../../wrappers/WpDrawer.vue.js";
3
+ import { useToaster as v } from "../../../composables/useToaster.js";
4
+ import { useTranslations as B } from "../../../composables/useTranslations.js";
5
+ import { ToasterTypeOptions as C } from "../../../enums/toaster.js";
6
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({
7
+ import { InContainer as h } from "@useinsider/design-system-vue";
8
+ import U from "./UnsubscribeBreadcrumb.vue.js";
9
+ const F = /* @__PURE__ */ g({
10
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(() => ({
11
+ setup(P) {
12
+ const s = B(), e = w(), { showToaster: a } = v(), 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")), u = n(() => ({
13
13
  primaryButton: {
14
14
  styling: "solid",
15
15
  type: "primary",
@@ -23,28 +23,28 @@ const E = /* @__PURE__ */ f({
23
23
  labelText: i.value,
24
24
  disabledStatus: o.value
25
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) => {
26
+ })), p = (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
27
  e.pageSelectionDrawerStatus = !1, t && setTimeout(() => {
28
28
  t();
29
29
  }, 500);
30
- }, m = () => {
30
+ }, d = () => {
31
31
  if (e.isActiveTypeFirstInCollection) {
32
32
  r(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);
33
33
  return;
34
34
  }
35
35
  e.setPreviousType();
36
- }, d = () => {
36
+ }, m = () => {
37
37
  if (e.isActiveTypeLastInCollection) {
38
38
  o.value = !0;
39
- const t = e.selectedCollectionType, l = e.getSelectedTemplatesByCollection(t);
40
- e.addUnsubscribePages(l), document.dispatchEvent(new CustomEvent("unsubscribe:select", {
39
+ const t = e.selectedCollectionType, l = e.getSelectedTemplatesByCollection(t), f = e.getSelectedUnsubscribePagesByCollection(t);
40
+ e.removeUnsubscribePages(f), e.addUnsubscribePages(l), document.dispatchEvent(new CustomEvent("unsubscribe:select", {
41
41
  detail: {
42
42
  collectionType: t,
43
43
  selectedPages: l
44
44
  }
45
45
  })), r(() => {
46
46
  o.value = !1, a({
47
- type: B.Success,
47
+ type: C.Success,
48
48
  message: s("global-unsubscribe.pages-were-attached")
49
49
  });
50
50
  });
@@ -54,11 +54,11 @@ const E = /* @__PURE__ */ f({
54
54
  }, b = (t) => {
55
55
  e.setSelectedTemplate(t);
56
56
  };
57
- return T(() => e.pageSelectionDrawerStatus, (t) => {
57
+ return S(() => e.pageSelectionDrawerStatus, (t) => {
58
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 };
59
+ }), { __sfc: !0, trans: s, unsubscribeStore: e, showToaster: a, isApplying: o, getPrimaryButtonText: c, getCancelOrBackButtonText: i, footerButtonGroupOptions: u, getBorderClass: p, closeModal: r, handleBack: d, handleSave: m, selectTemplate: b, WpDrawer: T, InContainer: h, UnsubscribeBreadcrumb: U };
60
60
  }
61
61
  });
62
62
  export {
63
- E as default
63
+ F as default
64
64
  };