@useinsider/guido 3.11.0-beta.b9b7d29 → 3.11.0-beta.c237b25

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 (34) hide show
  1. package/dist/@types/config/schemas.js +49 -40
  2. package/dist/components/Guido.vue.js +3 -3
  3. package/dist/components/Guido.vue2.js +41 -41
  4. package/dist/components/organisms/header/EditorActions.vue.js +1 -1
  5. package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
  6. package/dist/components/organisms/header/HeaderWrapper.vue2.js +2 -0
  7. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
  8. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +23 -20
  9. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +11 -12
  10. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
  11. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +2 -2
  12. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  13. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +9 -9
  14. package/dist/composables/useModuleDynamicContentRepair.js +36 -0
  15. package/dist/composables/useStripo.js +62 -59
  16. package/dist/enums/academy.js +1 -1
  17. package/dist/enums/date.js +4 -3
  18. package/dist/enums/onboarding.js +12 -21
  19. package/dist/guido.css +1 -1
  20. package/dist/src/@types/config/schemas.d.ts +36 -0
  21. package/dist/src/composables/useConfig.d.ts +18 -0
  22. package/dist/src/composables/useModuleDynamicContentRepair.d.ts +18 -0
  23. package/dist/src/enums/academy.d.ts +3 -3
  24. package/dist/src/enums/onboarding.d.ts +0 -3
  25. package/dist/src/stores/config.d.ts +162 -0
  26. package/dist/src/utils/dynamicContentConverter.d.ts +27 -0
  27. package/dist/src/utils/genericUtil.d.ts +7 -0
  28. package/dist/stores/onboarding.js +11 -14
  29. package/dist/utils/dateUtil.js +23 -10
  30. package/dist/utils/dynamicContentConverter.js +31 -0
  31. package/dist/utils/genericUtil.js +26 -19
  32. package/package.json +10 -1
  33. package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
  34. package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
- import { object as a, number as s, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as h, boolean as o, array as c, record as k, literal as i, looseObject as y, variant as g, union as f, unknown as n } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as h, boolean as o, array as c, record as k, literal as i, looseObject as g, variant as R, union as f, unknown as s } from "../../node_modules/valibot/dist/index.js";
3
3
  const d = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -12,7 +12,7 @@ const d = {
12
12
  ARCHITECT: 49,
13
13
  /** Unsubscribe page builder */
14
14
  UNSUBSCRIBE_PAGES: 97
15
- }, R = a({
15
+ }, C = a({
16
16
  /** Unique identifier for the template being edited */
17
17
  templateId: p(
18
18
  t(),
@@ -30,7 +30,7 @@ const d = {
30
30
  name: t(),
31
31
  /** Fallback font family (e.g., "serif" or "sans-serif") */
32
32
  family: t()
33
- }), C = a({
33
+ }), A = a({
34
34
  /** Partner/organization name (required) */
35
35
  name: p(
36
36
  t(),
@@ -54,7 +54,7 @@ const d = {
54
54
  username: e(t(), "Guido User"),
55
55
  /** Fallback font settings from partner settings — used to match backend size calculation */
56
56
  fallbackFont: e(T)
57
- }), A = a({
57
+ }), y = a({
58
58
  /** Display text for the dynamic content */
59
59
  text: t(),
60
60
  /** Template variable value (e.g., {{username}}) */
@@ -68,35 +68,35 @@ const d = {
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), I = y({
71
+ }), I = g({
72
72
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
73
- id: e(s()),
73
+ id: e(n()),
74
74
  /** Decimal places for price display (legacy data may use string or number) */
75
- decimalCount: e(f([t(), s()])),
75
+ decimalCount: e(f([t(), n()])),
76
76
  /** Pinned product IDs (empty array when filter-driven) */
77
- productIds: e(c(n())),
77
+ productIds: e(c(s())),
78
78
  /** Whether the block requested live products at send time */
79
79
  sendProductRequestFlag: e(o()),
80
80
  /** Whether to randomize product order */
81
81
  shuffleProducts: e(o()),
82
82
  /** Filter rules driving product selection */
83
- filters: e(c(n())),
83
+ filters: e(c(s())),
84
84
  /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
85
85
  currency: e(t()),
86
86
  /** Currency display settings (separators, alignment, decimals) */
87
- currencySettings: e(n()),
87
+ currencySettings: e(s()),
88
88
  /** Locale (e.g. 'nl_NL') */
89
89
  language: e(t()),
90
90
  /** Recommendation strategy key (e.g. 'newArrivals') */
91
91
  strategy: e(t()),
92
92
  /** Snapshot of products as rendered by the legacy block */
93
- recommendedProducts: e(c(n())),
93
+ recommendedProducts: e(c(s())),
94
94
  /** Number of product cards per row */
95
- cardsInRow: e(s()),
95
+ cardsInRow: e(n()),
96
96
  /** Mobile-only padding (right) */
97
- mobileRightPadding: e(s()),
97
+ mobileRightPadding: e(n()),
98
98
  /** Mobile-only padding (left) */
99
- mobileLeftPadding: e(s()),
99
+ mobileLeftPadding: e(n()),
100
100
  /** Disable responsive scaling */
101
101
  unresponsive: e(o()),
102
102
  /** Layout orientation ('vertical' | 'horizontal') */
@@ -106,14 +106,14 @@ const d = {
106
106
  /** Block type marker used by some legacy variants */
107
107
  blockType: e(t()),
108
108
  /** Size variant marker (legacy data may use string or number) */
109
- size: e(f([t(), s()])),
109
+ size: e(f([t(), n()])),
110
110
  /** Vertical responsiveness flag (legacy size=1 variants) */
111
111
  verticalResponsiveness: e(o()),
112
112
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
113
113
  isPriceMovedToNextLine: e(o()),
114
114
  /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
115
115
  isPriceDeletedForZeroSale: e(o())
116
- }), L = a({
116
+ }), v = a({
117
117
  /**
118
118
  * Legacy recommendation block configs keyed by block ID.
119
119
  * Pass this when loading a template authored with the v1
@@ -124,25 +124,34 @@ const d = {
124
124
  k(t(), I),
125
125
  {}
126
126
  )
127
- }), P = a({
127
+ }), L = a({
128
128
  /** Initial HTML content */
129
129
  html: e(t(), ""),
130
130
  /** Initial CSS content */
131
131
  css: e(t(), ""),
132
132
  /** Preselected dynamic content items */
133
133
  preselectedDynamicContent: e(
134
- c(A),
134
+ c(y),
135
+ []
136
+ ),
137
+ /**
138
+ * Full set of dynamic-content items the account offers (label + token).
139
+ * Used as the label→token map that repairs label-form placeholders
140
+ * (e.g. `{{ Phone Number }}`) in dropped saved modules.
141
+ */
142
+ availableDynamicContent: e(
143
+ c(y),
135
144
  []
136
145
  ),
137
146
  /** Valid custom field attribute names from the partner's categorized fields */
138
147
  customFieldAttributes: e(c(t()), []),
139
148
  /** Selected unsubscribe page IDs */
140
- selectedUnsubscribePages: e(c(s()), []),
149
+ selectedUnsubscribePages: e(c(n()), []),
141
150
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
142
151
  forceRecreate: e(o(), !1),
143
152
  /** Migration-only inputs (legacy block configs) */
144
- migration: e(L, {})
145
- }), v = a({
153
+ migration: e(v, {})
154
+ }), P = a({
146
155
  /** Sender display name */
147
156
  senderName: e(t(), ""),
148
157
  /** Email subject line */
@@ -153,9 +162,9 @@ const d = {
153
162
  /** Path to translations object */
154
163
  translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
155
164
  /** Migration date for template compatibility */
156
- migrationDate: e(s(), 1759696858),
165
+ migrationDate: e(n(), 1759696858),
157
166
  /** Email header settings */
158
- emailHeader: e(v, { senderName: "", subject: "" }),
167
+ emailHeader: e(P, { senderName: "", subject: "" }),
159
168
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
160
169
  savedModulesFolderName: e(t(), S.SAVED_MODULES),
161
170
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
@@ -184,7 +193,7 @@ const d = {
184
193
  liquidSyntax: e(o(), !1),
185
194
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
186
195
  autosave: e(o(), !1)
187
- }), N = l([
196
+ }), D = l([
188
197
  "amp-accordion",
189
198
  "amp-carousel",
190
199
  "amp-form-controls",
@@ -198,7 +207,7 @@ const d = {
198
207
  "text-block",
199
208
  "timer-block",
200
209
  "video-block"
201
- ]), D = l([
210
+ ]), N = l([
202
211
  "dynamic-content",
203
212
  "checkbox-block",
204
213
  "radio-button-block",
@@ -209,12 +218,12 @@ const d = {
209
218
  ]), x = a({
210
219
  /** Default blocks to exclude from the editor */
211
220
  excludeDefaults: e(
212
- c(N),
221
+ c(D),
213
222
  []
214
223
  ),
215
224
  /** Custom blocks to include in the editor */
216
225
  includeCustoms: e(
217
- c(D),
226
+ c(N),
218
227
  []
219
228
  )
220
229
  }), m = a({
@@ -223,7 +232,7 @@ const d = {
223
232
  /** Human-readable description */
224
233
  description: e(t()),
225
234
  /** Priority for rule ordering (lower = earlier) */
226
- priority: s()
235
+ priority: n()
227
236
  }), F = a({
228
237
  ...m.entries,
229
238
  type: i("replace"),
@@ -255,7 +264,7 @@ const d = {
255
264
  (u) => typeof u == "function",
256
265
  "processor must be a function"
257
266
  )
258
- }), H = g("type", [
267
+ }), H = R("type", [
259
268
  F,
260
269
  U,
261
270
  B,
@@ -279,12 +288,12 @@ const d = {
279
288
  }), V = a({
280
289
  // Required sections
281
290
  /** Identity configuration (required) */
282
- identity: R,
291
+ identity: C,
283
292
  /** Partner configuration (required) */
284
- partner: C,
293
+ partner: A,
285
294
  // Optional sections (with defaults)
286
295
  /** Template content and presets */
287
- template: e(P, {}),
296
+ template: e(L, {}),
288
297
  /** Editor settings */
289
298
  editor: e(E, {}),
290
299
  /** UI configuration */
@@ -303,24 +312,24 @@ export {
303
312
  q as CallbacksSchema,
304
313
  H as CompilerRuleSchema,
305
314
  j as CompilerSchema,
306
- D as CustomBlockTypeSchema,
315
+ N as CustomBlockTypeSchema,
307
316
  w as CustomRuleSchema,
308
- N as DefaultBlockTypeSchema,
309
- A as DynamicContentSchema,
317
+ D as DefaultBlockTypeSchema,
318
+ y as DynamicContentSchema,
310
319
  E as EditorSchema,
311
- v as EmailHeaderSchema,
320
+ P as EmailHeaderSchema,
312
321
  T as FallbackFontSchema,
313
322
  O as FeaturesSchema,
314
323
  V as GuidoConfigSchema,
315
- R as IdentitySchema,
324
+ C as IdentitySchema,
316
325
  I as LegacyRecommendationConfigSchema,
317
326
  d as MessageType,
318
- C as PartnerSchema,
327
+ A as PartnerSchema,
319
328
  r as ProductType,
320
329
  U as RegexRuleSchema,
321
330
  B as RemoveRuleSchema,
322
331
  F as ReplaceRuleSchema,
323
- L as TemplateMigrationSchema,
324
- P as TemplateSchema,
332
+ v as TemplateMigrationSchema,
333
+ L as TemplateSchema,
325
334
  M as UISchema
326
335
  };
@@ -3,16 +3,16 @@ import i from "./Guido.vue2.js";
3
3
  import a from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), 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.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.FORCE_ONBOARDING_FOR_TESTING || !e.isTestPartner() ? r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), 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.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
7
7
  return e.emit("onboarding:finished");
8
- } } }) : o._e(), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
8
+ } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
9
  }, n = [], s = /* @__PURE__ */ a(
10
10
  i,
11
11
  t,
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "57d338df"
15
+ "50dac6de"
16
16
  );
17
17
  const l = s.exports;
18
18
  export {
@@ -1,42 +1,42 @@
1
- import { defineComponent as X, defineAsyncComponent as P, ref as G, computed as W, watch as Y, onMounted as Z, onUnmounted as ee } from "vue";
1
+ import { defineComponent as X, defineAsyncComponent as I, ref as W, computed as x, watch as Y, onMounted as Z, onUnmounted as ee } from "vue";
2
2
  import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
3
3
  import { provideGuidoActions as te } from "../composables/useGuidoActions.js";
4
4
  import { useGuidoStateBridge as ne } from "../composables/useGuidoStateBridge.js";
5
5
  import { usePartner as re } from "../composables/usePartner.js";
6
6
  import { useStripo as se } from "../composables/useStripo.js";
7
7
  import { useTimerClone as ae } from "../composables/useTimerClone.js";
8
- import { migrate as x } from "../config/migrator/index.js";
8
+ import { migrate as G } from "../config/migrator/index.js";
9
9
  import { ModuleFolderDefaults as H } from "../enums/defaults.js";
10
- import { FORCE_ONBOARDING_FOR_TESTING as ce, RIBBON_SELECTOR as ie } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as me } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import de from "./organisms/AutoSaveController.vue.js";
13
- import le from "./organisms/base/Toaster.vue.js";
14
- import ue from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import pe from "./organisms/header/HeaderWrapper.vue.js";
16
- import fe from "./organisms/LoadingWrapper.vue.js";
17
- import ve from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import Se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as ye } from "../services/stripoApi.js";
20
- import { useConfigStore as he } from "../stores/config.js";
21
- import { useDynamicContentStore as ge } from "../stores/dynamic-content.js";
10
+ import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
11
+ import { useRecommendationExtensionStore as ie } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import me from "./organisms/AutoSaveController.vue.js";
13
+ import de from "./organisms/base/Toaster.vue.js";
14
+ import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import ue from "./organisms/header/HeaderWrapper.vue.js";
16
+ import pe from "./organisms/LoadingWrapper.vue.js";
17
+ import fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import ve from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as Se } from "../services/stripoApi.js";
20
+ import { useConfigStore as ye } from "../stores/config.js";
21
+ import { useDynamicContentStore as he } from "../stores/dynamic-content.js";
22
22
  import { useEditorStore as $ } from "../stores/editor.js";
23
- import { usePreviewStore as be } from "../stores/preview.js";
24
- import { useTemplateStore as Ee } from "../stores/template.js";
25
- import { useUnsubscribeStore as we } from "../stores/unsubscribe.js";
26
- const je = /* @__PURE__ */ X({
23
+ import { usePreviewStore as ge } from "../stores/preview.js";
24
+ import { useTemplateStore as be } from "../stores/template.js";
25
+ import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
26
+ const Ve = /* @__PURE__ */ X({
27
27
  __name: "Guido",
28
28
  props: {
29
29
  config: null
30
30
  },
31
31
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
32
32
  setup(z, { expose: q, emit: n }) {
33
- const b = z, K = P(
33
+ const b = z, K = I(
34
34
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
35
- ), V = P(
35
+ ), V = I(
36
36
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
37
- ), E = G(), p = G(), f = ge(), w = we(), i = he();
37
+ ), E = W(), p = W(), f = he(), w = Ee(), i = ye();
38
38
  i.init(b.config);
39
- const m = $(), j = be(), d = W(() => m.hasChanges), { isTestPartner: J } = re(), D = () => {
39
+ const m = $(), j = ge(), d = x(() => m.hasChanges), { isTestPartner: J } = re(), D = () => {
40
40
  var e;
41
41
  return (e = E.value) == null ? void 0 : e.handleSave(!0);
42
42
  }, C = (e) => {
@@ -44,25 +44,25 @@ const je = /* @__PURE__ */ X({
44
44
  }, {
45
45
  templateId: v,
46
46
  userId: T,
47
- partnerName: O,
48
- username: _,
47
+ partnerName: L,
48
+ username: k,
49
49
  template: o,
50
50
  editor: s
51
- } = i, l = (o == null ? void 0 : o.html) || "", F = (o == null ? void 0 : o.css) || "", S = (o == null ? void 0 : o.preselectedDynamicContent) || [], R = (s == null ? void 0 : s.savedModulesFolderName) || H.SAVED_MODULES, L = (s == null ? void 0 : s.defaultModulesFolderName) || H.DEFAULT_MODULES;
51
+ } = i, l = (o == null ? void 0 : o.html) || "", F = (o == null ? void 0 : o.css) || "", S = (o == null ? void 0 : o.preselectedDynamicContent) || [], U = (s == null ? void 0 : s.savedModulesFolderName) || H.SAVED_MODULES, _ = (s == null ? void 0 : s.defaultModulesFolderName) || H.DEFAULT_MODULES;
52
52
  oe(), ne();
53
53
  const y = {
54
54
  emailId: v,
55
55
  userId: T,
56
- username: _,
57
- partnerName: O,
58
- savedModulesFolderName: R,
59
- defaultModulesFolderName: L
60
- }, N = {
56
+ username: k,
57
+ partnerName: L,
58
+ savedModulesFolderName: U,
59
+ defaultModulesFolderName: _
60
+ }, M = {
61
61
  preselectedDynamicContentList: S,
62
62
  onReady: () => {
63
63
  console.debug("guido:ready"), n("ready");
64
64
  }
65
- }, { initPlugin: k } = se(y, N), { getDefaultTemplate: U } = ye(), { cloneTimersOnSave: A, hasTimerBlocks: B } = ae(), Q = W(() => {
65
+ }, { initPlugin: O } = se(y, M), { getDefaultTemplate: P } = Se(), { cloneTimersOnSave: R, hasTimerBlocks: A } = ae(), Q = x(() => {
66
66
  var e;
67
67
  return !((e = i.ui) != null && e.showHeader);
68
68
  });
@@ -81,9 +81,9 @@ const je = /* @__PURE__ */ X({
81
81
  console.debug("guido:test-email:click"), n("test-email:click");
82
82
  }
83
83
  });
84
- const I = (e) => {
84
+ const B = (e) => {
85
85
  console.debug("dynamic-content:close", e), f.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
86
- }, M = () => {
86
+ }, N = () => {
87
87
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
88
88
  };
89
89
  Y(() => d.value, () => {
@@ -96,22 +96,22 @@ const je = /* @__PURE__ */ X({
96
96
  let a = null;
97
97
  const g = () => {
98
98
  var t;
99
- const e = document.querySelector(ie);
99
+ const e = document.querySelector(ce);
100
100
  (t = p.value) == null || t.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
101
101
  };
102
102
  return Z(async () => {
103
103
  var t, u;
104
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), me().$reset(), $().$reset(), m.templateId = v, Ee().$reset(), g();
104
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ie().$reset(), $().$reset(), m.templateId = v, be().$reset(), g();
105
105
  const e = (t = p.value) == null ? void 0 : t.parentElement;
106
106
  e && (a = new ResizeObserver(g), a.observe(e));
107
107
  try {
108
108
  w.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
109
109
  const c = ((u = o == null ? void 0 : o.migration) == null ? void 0 : u.recommendationConfigs) ?? {};
110
110
  let r = {
111
- html: l && await x(l, c),
111
+ html: l && await G(l, c),
112
112
  css: F
113
113
  };
114
- r.html || (r = await U(), r.html = await x(r.html, c)), B(r.html) && (r.html = await A(r.html)), await k(r), f.selectedDynamicContentList = S;
114
+ r.html || (r = await P(), r.html = await G(r.html, c)), A(r.html) && (r.html = await R(r.html)), await O(r), f.selectedDynamicContentList = S;
115
115
  } catch (c) {
116
116
  console.error("Failed to initialize Stripo editor:", c);
117
117
  }
@@ -126,15 +126,15 @@ const je = /* @__PURE__ */ X({
126
126
  i.reset();
127
127
  }), q({
128
128
  dynamicContent: {
129
- insert: I,
130
- close: M
129
+ insert: B,
130
+ close: N
131
131
  },
132
132
  hasChanges: d,
133
133
  saveSilent: D,
134
134
  setLoading: C
135
- }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: b, configStore: i, editorStore: m, previewStore: j, hasChanges: d, isTestPartner: J, saveSilent: D, setLoading: C, templateId: v, userId: T, partnerName: O, username: _, templateConfig: o, editorConfig: s, html: l, css: F, preselectedDynamicContentList: S, savedModulesFolderName: R, defaultModulesFolderName: L, emit: n, metadata: y, options: N, initPlugin: k, getDefaultTemplate: U, cloneTimersOnSave: A, hasTimerBlocks: B, noHeader: Q, insertDynamicContent: I, closeDynamicContent: M, handleDynamicContentOpen: h, ribbonObserver: a, updateRibbonOffset: g, FORCE_ONBOARDING_FOR_TESTING: ce, AutoSaveController: de, Toaster: le, FilterSelectionDrawer: ue, HeaderWrapper: pe, LoadingWrapper: fe, SaveAsTemplateDrawer: ve, UnsubscribeWrapper: Se };
135
+ }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: b, configStore: i, editorStore: m, previewStore: j, hasChanges: d, isTestPartner: J, saveSilent: D, setLoading: C, templateId: v, userId: T, partnerName: L, username: k, templateConfig: o, editorConfig: s, html: l, css: F, preselectedDynamicContentList: S, savedModulesFolderName: U, defaultModulesFolderName: _, emit: n, metadata: y, options: M, initPlugin: O, getDefaultTemplate: P, cloneTimersOnSave: R, hasTimerBlocks: A, noHeader: Q, insertDynamicContent: B, closeDynamicContent: N, handleDynamicContentOpen: h, ribbonObserver: a, updateRibbonOffset: g, AutoSaveController: me, Toaster: de, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ve };
136
136
  }
137
137
  });
138
138
  export {
139
- je as default
139
+ Ve as default
140
140
  };
@@ -15,7 +15,7 @@ var u = function() {
15
15
  p,
16
16
  !1,
17
17
  null,
18
- "82128f7d"
18
+ "6e711fd7"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {
@@ -10,9 +10,9 @@ var s = function() {
10
10
  d,
11
11
  !1,
12
12
  null,
13
- "5c02dcc7"
13
+ "d11dd577"
14
14
  );
15
- const p = i.exports;
15
+ const c = i.exports;
16
16
  export {
17
- p as default
17
+ c as default
18
18
  };
@@ -8,6 +8,8 @@ const c = /* @__PURE__ */ n({
8
8
  setup(l, { expose: r }) {
9
9
  const e = m(null);
10
10
  return r({
11
+ // Stryker disable next-line OptionalChaining: RightSlot is always rendered (no
12
+ // v-if), so rightSlotRef.value is never null and `?.` cannot short-circuit.
11
13
  handleSave: (t) => {
12
14
  var o;
13
15
  return (o = e.value) == null ? void 0 : o.handleSave(t);
@@ -14,7 +14,7 @@ var n = function() {
14
14
  a,
15
15
  !1,
16
16
  null,
17
- "64c52560"
17
+ "fad98586"
18
18
  );
19
19
  const _ = c.exports;
20
20
  export {
@@ -1,43 +1,46 @@
1
- import { defineComponent as b, ref as v, computed as o } from "vue";
2
- import D from "../../wrappers/WpModal.vue.js";
3
- import { useConfig as _ } from "../../../composables/useConfig.js";
1
+ import { defineComponent as v, ref as D, computed as o } from "vue";
2
+ import _ from "../../wrappers/WpModal.vue.js";
3
+ import { useConfig as h } from "../../../composables/useConfig.js";
4
4
  import { useTranslations as y } from "../../../composables/useTranslations.js";
5
- import { ACADEMY_LINKS as m } from "../../../enums/academy.js";
5
+ import { ACADEMY_LINKS as c } from "../../../enums/academy.js";
6
6
  import L from "../../../static/assets/onboarding-img.svg.js";
7
- import { useOnboardingStore as h } from "../../../stores/onboarding.js";
8
- import { isAfterDate as C } from "../../../utils/dateUtil.js";
9
- const x = /* @__PURE__ */ b({
7
+ import { useOnboardingStore as C } from "../../../stores/onboarding.js";
8
+ import { isAfterDate as w, formatShortDate as A } from "../../../utils/dateUtil.js";
9
+ const V = /* @__PURE__ */ v({
10
10
  __name: "NewVersionPopup",
11
11
  emits: ["onboarding-finished"],
12
- setup(w, { emit: i }) {
13
- const e = y(), t = h(), a = v(!0), { config: s } = _(), p = o(() => {
14
- var l, u;
15
- return (u = (l = s.value) == null ? void 0 : l.editor) == null ? void 0 : u.migrationDate;
16
- }), n = o(() => C(p.value || 0)), c = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), f = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
17
- academyLink: m.EMAIL_EDITOR
12
+ setup(I, { emit: a }) {
13
+ const e = y(), t = C(), s = D(!0), { config: p } = h(), i = o(() => {
14
+ var l, m;
15
+ return (m = (l = p.value) == null ? void 0 : l.editor) == null ? void 0 : m.migrationDate;
16
+ }), n = o(() => w(i.value || 0)), d = o(() => A(
17
+ i.value || 0
18
+ )), f = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), g = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
19
+ sunsetDate: d.value,
20
+ academyLink: c.EMAIL_EDITOR
18
21
  }) : e("email-editor.onboarding-description", {
19
- academyLink: m.EMAIL_EDITOR
20
- })), d = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), g = o(() => ({
22
+ academyLink: c.EMAIL_EDITOR
23
+ })), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), b = o(() => ({
21
24
  primaryButton: {
22
25
  type: "primary",
23
26
  labelText: e("left-menu.discover-now")
24
27
  },
25
28
  secondaryButton: {
26
29
  type: "subtle-primary",
27
- labelText: d.value
30
+ labelText: u.value
28
31
  }
29
32
  })), r = () => {
30
- a.value = !1, i("onboarding-finished");
33
+ s.value = !1, a("onboarding-finished");
31
34
  };
32
- return { __sfc: !0, emit: i, trans: e, onboardingStore: t, isVisible: a, config: s, migrationDate: p, isAfterMigrationDate: n, popupTitle: c, popupDescription: f, secondaryButtonLabel: d, footerButtonOptions: g, closePopup: r, handleDiscoverNow: () => {
35
+ return { __sfc: !0, emit: a, trans: e, onboardingStore: t, isVisible: s, config: p, migrationDate: i, isAfterMigrationDate: n, formattedSunsetDate: d, popupTitle: f, popupDescription: g, secondaryButtonLabel: u, footerButtonOptions: b, closePopup: r, handleDiscoverNow: () => {
33
36
  t.onDiscoverNowClicked(), r();
34
37
  }, handleRemindLater: () => {
35
38
  t.onRemindMeLater(), r();
36
39
  }, handleClose: () => {
37
40
  t.onNewVersionPopupClose(), r();
38
- }, WpModal: D, onboardingImageSvg: L };
41
+ }, WpModal: _, onboardingImageSvg: L };
39
42
  }
40
43
  });
41
44
  export {
42
- x as default
45
+ V as default
43
46
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, computed as e, onMounted as b, watch as t } from "vue";
1
+ import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
2
2
  import u from "./AMPOnboarding.vue.js";
3
3
  import v from "./GenericOnboarding.vue.js";
4
4
  import l from "./ItemsOnboarding.vue.js";
@@ -6,23 +6,22 @@ import y from "./NewVersionPopup.vue.js";
6
6
  import S from "./TextBlockOnboarding.vue.js";
7
7
  import h from "./VersionHistoryOnboarding.vue.js";
8
8
  import { usePartner as w } from "../../../composables/usePartner.js";
9
- import { FORCE_ONBOARDING_FOR_TESTING as P } from "../../../enums/onboarding.js";
10
- import { useEditorStore as _ } from "../../../stores/editor.js";
11
- import { useOnboardingStore as A } from "../../../stores/onboarding.js";
12
- import { usePreviewStore as H } from "../../../stores/preview.js";
13
- const z = /* @__PURE__ */ g({
9
+ import { useEditorStore as P } from "../../../stores/editor.js";
10
+ import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
11
+ import { usePreviewStore as A } from "../../../stores/preview.js";
12
+ const G = /* @__PURE__ */ b({
14
13
  __name: "OnboardingWrapper",
15
14
  emits: ["onboarding-finished"],
16
- setup(M, { emit: f }) {
17
- const o = A(), r = _(), s = H(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), m = e(() => !P && a()), d = [
15
+ setup(H, { emit: f }) {
16
+ const o = _(), r = P(), s = A(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
18
17
  { type: "newVersionPopup", component: y },
19
18
  { type: "genericOnboarding", component: v },
20
19
  { type: "textBlockOnboarding", component: S },
21
20
  { type: "versionHistoryOnboarding", component: h },
22
21
  { type: "ampOnboarding", component: u },
23
22
  { type: "itemsOnboarding", component: l }
24
- ], c = (n) => m.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), O = e(() => d.filter((n) => c(n.type)));
25
- return b(async () => {
23
+ ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
24
+ return O(async () => {
26
25
  await o.fetchUserModalState();
27
26
  }), t(
28
27
  () => r.isVersionHistoryOpen,
@@ -39,9 +38,9 @@ const z = /* @__PURE__ */ g({
39
38
  (n) => {
40
39
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
41
40
  }
42
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: m, onboardingConfigs: d, shouldShow: c, visibleOnboardings: O };
41
+ ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
43
42
  }
44
43
  });
45
44
  export {
46
- z as default
45
+ G as default
47
46
  };
@@ -1,6 +1,6 @@
1
- import n from "./UnsubscribePageSelection.vue2.js";
1
+ import a from "./UnsubscribePageSelection.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var o = function() {
5
5
  var r = this, e = r._self._c, t = r._self._setupProxy;
6
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.handleClose, primaryButtonEvent: t.handleSave }, scopedSlots: r._u([{ key: "headerBottomSlot", fn: function() {
@@ -10,13 +10,13 @@ var o = function() {
10
10
  return t.selectTemplate(s.id);
11
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
12
  }), 0)]);
13
- }, i = [], c = /* @__PURE__ */ a(
14
- n,
13
+ }, i = [], c = /* @__PURE__ */ n(
14
+ a,
15
15
  o,
16
16
  i,
17
17
  !1,
18
18
  null,
19
- "669fe7cf"
19
+ "91a26acd"
20
20
  );
21
21
  const _ = c.exports;
22
22
  export {
@@ -29,9 +29,9 @@ const N = /* @__PURE__ */ y({
29
29
  t();
30
30
  }, 500);
31
31
  }, m = () => {
32
- n(), e.pageSelectionUpdateStatus || document.dispatchEvent(new CustomEvent("unsubscribe:cancel", {
32
+ e.pageSelectionDrawerStatus && (n(), e.pageSelectionUpdateStatus || document.dispatchEvent(new CustomEvent("unsubscribe:cancel", {
33
33
  detail: { blockId: e.pendingBlockId }
34
- }));
34
+ })));
35
35
  }, b = () => {
36
36
  if (e.isActiveTypeFirstInCollection) {
37
37
  n(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);