@useinsider/guido 3.17.0-beta.7c9fc24 → 3.17.0-beta.7d051ef

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 (58) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +26 -28
  3. package/dist/components/Guido.vue.js +8 -8
  4. package/dist/components/Guido.vue2.js +48 -50
  5. package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
  6. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  7. package/dist/components/organisms/header/EditorActions.vue2.js +43 -74
  8. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
  10. package/dist/components/wrappers/WpDrawer.vue.js +7 -9
  11. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  12. package/dist/composables/useHtmlCompiler.js +26 -37
  13. package/dist/composables/useHtmlValidator.js +0 -2
  14. package/dist/composables/useSave.js +41 -84
  15. package/dist/composables/validators/useCouponBlockValidator.js +21 -24
  16. package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
  17. package/dist/config/migrator/itemsBlockMigrator.js +197 -137
  18. package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
  19. package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
  20. package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
  21. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  22. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
  23. package/dist/extensions/Blocks/Items/template.js +213 -204
  24. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +34 -41
  25. package/dist/guido.css +1 -1
  26. package/dist/src/@types/config/schemas.d.ts +0 -4
  27. package/dist/src/components/Guido.vue.d.ts +1 -17
  28. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
  29. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
  30. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
  31. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
  32. package/dist/src/composables/useConfig.d.ts +0 -2
  33. package/dist/src/composables/useHtmlValidator.d.ts +0 -21
  34. package/dist/src/composables/useSave.d.ts +1 -6
  35. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
  36. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
  37. package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
  38. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
  39. package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
  40. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
  41. package/dist/src/stores/config.d.ts +0 -30
  42. package/dist/src/utils/templatePreparation.d.ts +0 -30
  43. package/dist/stores/config.js +22 -39
  44. package/dist/utils/pairProductVariables.js +70 -70
  45. package/dist/utils/templatePreparation.js +25 -28
  46. package/package.json +1 -1
  47. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
  48. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
  49. package/dist/composables/useSaveValidation.js +0 -279
  50. package/dist/composables/useSaveValidationRollout.js +0 -9
  51. package/dist/enums/save-validation.js +0 -4
  52. package/dist/src/@types/save-validation.d.ts +0 -19
  53. package/dist/src/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +0 -2
  54. package/dist/src/composables/useSaveValidation.d.ts +0 -6
  55. package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
  56. package/dist/src/enums/save-validation.d.ts +0 -27
  57. package/dist/src/stores/save-validation.d.ts +0 -22
  58. package/dist/stores/save-validation.js +0 -30
package/README.md CHANGED
@@ -162,7 +162,6 @@ const config: GuidoConfigInput = {
162
162
  liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
163
163
  autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
164
164
  allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
165
- allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
166
165
  reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
167
166
  },
168
167
 
@@ -30,7 +30,7 @@ const p = {
30
30
  name: t(),
31
31
  /** Fallback font family (e.g., "serif" or "sans-serif") */
32
32
  family: t()
33
- }), E = a({
33
+ }), M = a({
34
34
  /** Partner/organization name (required) */
35
35
  name: m(
36
36
  t(),
@@ -54,7 +54,7 @@ const p = {
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(L)
57
- }), M = a({
57
+ }), E = a({
58
58
  /** Display text for the dynamic content */
59
59
  text: t(),
60
60
  /** Template variable value (e.g., {{username}}) */
@@ -76,10 +76,10 @@ const p = {
76
76
  children: e(c(S)),
77
77
  // eslint-disable-next-line camelcase -- backend field name
78
78
  select_items: e(c(S))
79
- })), v = k(
79
+ })), N = k(
80
80
  t(),
81
81
  R(c(S), [])
82
- ), N = g({
82
+ ), P = g({
83
83
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
84
84
  id: e(n()),
85
85
  /** Decimal places for price display (legacy data may use string or number) */
@@ -124,7 +124,7 @@ const p = {
124
124
  isPriceMovedToNextLine: e(o()),
125
125
  /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
126
126
  isPriceDeletedForZeroSale: e(o())
127
- }), P = a({
127
+ }), v = a({
128
128
  /**
129
129
  * Legacy recommendation block configs keyed by block ID.
130
130
  * Pass this when loading a template authored with the v1
@@ -132,7 +132,7 @@ const p = {
132
132
  * strategy, currency, locale, and layout data.
133
133
  */
134
134
  recommendationConfigs: e(
135
- k(t(), N),
135
+ k(t(), P),
136
136
  {}
137
137
  )
138
138
  }), x = a({
@@ -142,7 +142,7 @@ const p = {
142
142
  css: e(t(), ""),
143
143
  /** Preselected dynamic content items */
144
144
  preselectedDynamicContent: e(
145
- c(M),
145
+ c(E),
146
146
  []
147
147
  ),
148
148
  /**
@@ -151,7 +151,7 @@ const p = {
151
151
  * (first) partner's leaf attributes into the label→token map that repairs
152
152
  * label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
153
153
  */
154
- dynamicContentList: e(v, {}),
154
+ dynamicContentList: e(N, {}),
155
155
  /** Valid custom field attribute names from the partner's categorized fields */
156
156
  customFieldAttributes: e(c(t()), []),
157
157
  /** Selected unsubscribe page IDs */
@@ -173,7 +173,7 @@ const p = {
173
173
  0
174
174
  ),
175
175
  /** Migration-only inputs (legacy block configs) */
176
- migration: e(P, {})
176
+ migration: e(v, {})
177
177
  }), D = a({
178
178
  /** Sender display name */
179
179
  senderName: e(t(), ""),
@@ -220,10 +220,8 @@ const p = {
220
220
  allowlistEnabled: e(o(), !1),
221
221
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
222
222
  linkTrackingIds: e(o(), !1),
223
- /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
224
- allowSaveWithErrors: e(o(), !0),
225
223
  reusableRecommendationStrategy: e(o(), !1)
226
- }), w = i([
224
+ }), B = i([
227
225
  "amp-accordion",
228
226
  "amp-carousel",
229
227
  "amp-form-controls",
@@ -237,7 +235,7 @@ const p = {
237
235
  "text-block",
238
236
  "timer-block",
239
237
  "video-block"
240
- ]), B = i([
238
+ ]), w = i([
241
239
  "dynamic-content",
242
240
  "checkbox-block",
243
241
  "radio-button-block",
@@ -248,12 +246,12 @@ const p = {
248
246
  ]), H = a({
249
247
  /** Default blocks to exclude from the editor */
250
248
  excludeDefaults: e(
251
- c(w),
249
+ c(B),
252
250
  []
253
251
  ),
254
252
  /** Custom blocks to include in the editor */
255
253
  includeCustoms: e(
256
- c(B),
254
+ c(w),
257
255
  []
258
256
  )
259
257
  }), d = a({
@@ -304,7 +302,7 @@ const p = {
304
302
  customRules: e(c(V), []),
305
303
  /** Skip default compiler rules */
306
304
  ignoreDefaultRules: e(o(), !1)
307
- }), W = a({
305
+ }), Z = a({
308
306
  /**
309
307
  * External validation handler called before save completes.
310
308
  * Return false to cancel the save operation.
@@ -315,12 +313,12 @@ const p = {
315
313
  "externalValidation must be a function"
316
314
  )
317
315
  )
318
- }), K = a({
316
+ }), Q = a({
319
317
  // Required sections
320
318
  /** Identity configuration (required) */
321
319
  identity: A,
322
320
  /** Partner configuration (required) */
323
- partner: E,
321
+ partner: M,
324
322
  // Optional sections (with defaults)
325
323
  /** Template content and presets */
326
324
  template: e(x, {}),
@@ -335,33 +333,33 @@ const p = {
335
333
  /** Compiler configuration */
336
334
  compiler: e(z, {}),
337
335
  /** Callbacks and event handlers */
338
- callbacks: e(W, {})
336
+ callbacks: e(Z, {})
339
337
  });
340
338
  export {
341
339
  H as BlocksSchema,
342
- W as CallbacksSchema,
340
+ Z as CallbacksSchema,
343
341
  V as CompilerRuleSchema,
344
342
  z as CompilerSchema,
345
- B as CustomBlockTypeSchema,
343
+ w as CustomBlockTypeSchema,
346
344
  G as CustomRuleSchema,
347
- w as DefaultBlockTypeSchema,
348
- v as DynamicContentListSchema,
345
+ B as DefaultBlockTypeSchema,
346
+ N as DynamicContentListSchema,
349
347
  S as DynamicContentNodeSchema,
350
- M as DynamicContentSchema,
348
+ E as DynamicContentSchema,
351
349
  O as EditorSchema,
352
350
  D as EmailHeaderSchema,
353
351
  L as FallbackFontSchema,
354
352
  U as FeaturesSchema,
355
- K as GuidoConfigSchema,
353
+ Q as GuidoConfigSchema,
356
354
  A as IdentitySchema,
357
- N as LegacyRecommendationConfigSchema,
355
+ P as LegacyRecommendationConfigSchema,
358
356
  p as MessageType,
359
- E as PartnerSchema,
357
+ M as PartnerSchema,
360
358
  l as ProductType,
361
359
  j as RegexRuleSchema,
362
360
  q as RemoveRuleSchema,
363
361
  _ as ReplaceRuleSchema,
364
- P as TemplateMigrationSchema,
362
+ v as TemplateMigrationSchema,
365
363
  x as TemplateSchema,
366
364
  F as UISchema
367
365
  };
@@ -1,20 +1,20 @@
1
- import i from "./Guido.vue2.js";
1
+ import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import o from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var a = this, r = a._self._c, e = a._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) : 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.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isTestPartner() ? a._e() : 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) : 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.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, s = [], n = /* @__PURE__ */ o(
10
- i,
9
+ }, s = [], n = /* @__PURE__ */ i(
10
+ o,
11
11
  t,
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "2db79b8f"
15
+ "5c588dc5"
16
16
  );
17
- const c = n.exports;
17
+ const v = n.exports;
18
18
  export {
19
- c as default
19
+ v as default
20
20
  };
@@ -1,32 +1,30 @@
1
- import { defineComponent as ee, defineAsyncComponent as l, ref as A, computed as u, watch as U, onMounted as te, onUnmounted as oe } from "vue";
2
- import { useCortexBlueprintBridge as ne } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as re } from "../composables/useGuidoActions.js";
4
- import { useGuidoStateBridge as se } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as ae } from "../composables/usePartner.js";
6
- import { useSaveValidationRollout as ie } from "../composables/useSaveValidationRollout.js";
7
- import { useStripo as ce } from "../composables/useStripo.js";
8
- import { useTimerClone as de } from "../composables/useTimerClone.js";
1
+ import { defineComponent as Z, defineAsyncComponent as l, ref as A, computed as u, watch as U, onMounted as ee, onUnmounted as te } from "vue";
2
+ import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as ne } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as re } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as se } from "../composables/usePartner.js";
6
+ import { useStripo as ae } from "../composables/useStripo.js";
7
+ import { useTimerClone as ie } from "../composables/useTimerClone.js";
9
8
  import { migrate as _ } from "../config/migrator/index.js";
10
9
  import { ModuleFolderDefaults as N } from "../enums/defaults.js";
11
- import { RIBBON_SELECTOR as me } from "../enums/onboarding.js";
10
+ import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
12
11
  import { useRecommendationExtensionStore as O } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
- import le from "./organisms/AutoSaveController.vue.js";
14
- import ue from "./organisms/base/Toaster.vue.js";
15
- import pe from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
- import fe from "./organisms/header/HeaderWrapper.vue.js";
17
- import ye from "./organisms/LoadingWrapper.vue.js";
18
- import ge from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
- import ve from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
- import Se from "./organisms/validation/ValidationErrorDrawer.vue.js";
21
- import { useStripoApi as be } from "../services/stripoApi.js";
22
- import { useConfigStore as he } from "../stores/config.js";
23
- import { useDynamicContentStore as Ee } from "../stores/dynamic-content.js";
12
+ import de from "./organisms/AutoSaveController.vue.js";
13
+ import me 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 ye from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as ge } from "../services/stripoApi.js";
20
+ import { useConfigStore as ve } from "../stores/config.js";
21
+ import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
24
22
  import { useEditorStore as P } from "../stores/editor.js";
25
- import { usePreviewStore as we } from "../stores/preview.js";
26
- import { useTemplateStore as De } from "../stores/template.js";
27
- import { useUnsubscribeStore as Ce } from "../stores/unsubscribe.js";
23
+ import { usePreviewStore as he } from "../stores/preview.js";
24
+ import { useTemplateStore as be } from "../stores/template.js";
25
+ import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
28
26
  import { readTrackFloor as W } from "../utils/linkTrackingIds.js";
29
- const Ze = /* @__PURE__ */ ee({
27
+ const je = /* @__PURE__ */ Z({
30
28
  __name: "Guido",
31
29
  props: {
32
30
  config: null,
@@ -36,21 +34,21 @@ const Ze = /* @__PURE__ */ ee({
36
34
  setup(x, { expose: G, emit: r }) {
37
35
  const a = x, H = l(
38
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
39
- ), V = l(
40
- () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
41
37
  ), $ = l(
42
- () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
38
+ () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
43
39
  ), z = l(
40
+ () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
41
+ ), q = l(
44
42
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
45
- ), b = A(), p = A(), f = Ee(), h = Ce(), o = he();
43
+ ), h = A(), p = A(), f = Se(), b = Ee(), o = ve();
46
44
  a.ready && o.init(a.config);
47
- const c = P(), q = we(), m = u(() => c.hasChanges), { isTestPartner: K } = ae(), { isEnabled: j } = ie(), E = () => {
45
+ const c = P(), K = he(), m = u(() => c.hasChanges), { isTestPartner: V } = se(), E = () => {
48
46
  var t;
49
- return (t = b.value) == null ? void 0 : t.handleSave(!0);
47
+ return (t = h.value) == null ? void 0 : t.handleSave(!0);
50
48
  }, w = (t) => {
51
49
  c.loadingStatus = t;
52
50
  };
53
- ne(), se();
51
+ oe(), re();
54
52
  const y = () => {
55
53
  var t, e;
56
54
  return {
@@ -61,13 +59,13 @@ const Ze = /* @__PURE__ */ ee({
61
59
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
62
60
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
63
61
  };
64
- }, { initPlugin: D, preloadRuntime: C } = ce(), { getDefaultTemplate: k } = be(), { cloneTimersOnSave: T, hasTimerBlocks: F } = de(), J = u(() => {
62
+ }, { initPlugin: C, preloadRuntime: D } = ae(), { getDefaultTemplate: k } = ge(), { cloneTimersOnSave: T, hasTimerBlocks: F } = ie(), j = u(() => {
65
63
  var t;
66
64
  return !((t = o.ui) != null && t.showHeader);
67
- }), Q = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), X = u(
65
+ }), J = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), Q = u(
68
66
  () => !!O().recommendationConfigs.strategyId
69
67
  );
70
- re({
68
+ ne({
71
69
  onBack: () => {
72
70
  console.debug("guido:back"), r("back");
73
71
  },
@@ -82,9 +80,9 @@ const Ze = /* @__PURE__ */ ee({
82
80
  console.debug("guido:test-email:click"), r("test-email:click");
83
81
  }
84
82
  });
85
- const R = (t) => {
83
+ const I = (t) => {
86
84
  console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
87
- }, I = () => {
85
+ }, R = () => {
88
86
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
89
87
  };
90
88
  U(() => m.value, () => {
@@ -97,38 +95,38 @@ const Ze = /* @__PURE__ */ ee({
97
95
  let i = null;
98
96
  const v = () => {
99
97
  var e;
100
- const t = document.querySelector(me);
98
+ const t = document.querySelector(ce);
101
99
  (e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
102
100
  }, S = async () => {
103
101
  var t;
104
102
  try {
105
103
  o.initialized || o.init(a.config), c.templateId = o.templateId;
106
104
  const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", L = (e == null ? void 0 : e.preselectedDynamicContent) || [];
107
- h.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
105
+ b.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
108
106
  const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, B = o.isFeatureEnabled("linkTrackingIds");
109
107
  let n = {
110
108
  html: s && await _(s, M),
111
109
  css: d
112
110
  };
113
111
  n.html || (n = await k(), n.html = await _(n.html, M));
114
- const Y = B ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
115
- F(n.html) && (n.html = await T(n.html)), B && (c.trackIdSessionFloor = Math.max(Y, W(n.html)));
116
- const Z = {
112
+ const X = B ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
113
+ F(n.html) && (n.html = await T(n.html)), B && (c.trackIdSessionFloor = Math.max(X, W(n.html)));
114
+ const Y = {
117
115
  preselectedDynamicContentList: L,
118
116
  onReady: () => {
119
117
  console.debug("guido:ready"), r("ready");
120
118
  }
121
119
  };
122
- await D(n, y(), Z), f.selectedDynamicContentList = L;
120
+ await C(n, y(), Y), f.selectedDynamicContentList = L;
123
121
  } catch (e) {
124
122
  console.error("Failed to initialize Stripo editor:", e);
125
123
  }
126
124
  };
127
- return te(async () => {
125
+ return ee(async () => {
128
126
  var e;
129
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), De().$reset(), v();
127
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), be().$reset(), v();
130
128
  const t = (e = p.value) == null ? void 0 : e.parentElement;
131
- if (t && (i = new ResizeObserver(v), i.observe(t)), C(), a.ready)
129
+ if (t && (i = new ResizeObserver(v), i.observe(t)), D(), a.ready)
132
130
  await S();
133
131
  else {
134
132
  const s = U(() => a.ready, (d) => {
@@ -136,7 +134,7 @@ const Ze = /* @__PURE__ */ ee({
136
134
  });
137
135
  }
138
136
  document.addEventListener("dynamic-content:open", g);
139
- }), oe(() => {
137
+ }), te(() => {
140
138
  i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g);
141
139
  try {
142
140
  window.UIEditor.removeEditor();
@@ -146,15 +144,15 @@ const Ze = /* @__PURE__ */ ee({
146
144
  o.reset();
147
145
  }), G({
148
146
  dynamicContent: {
149
- insert: R,
150
- close: I
147
+ insert: I,
148
+ close: R
151
149
  },
152
150
  hasChanges: m,
153
151
  saveSilent: E,
154
152
  setLoading: w
155
- }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: V, AssignStrategyDrawer: $, RemoveStrategyModal: z, headerWrapperRef: b, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: h, props: a, configStore: o, editorStore: c, previewStore: q, hasChanges: m, isTestPartner: K, isSaveValidationEnabled: j, saveSilent: E, setLoading: w, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: C, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: J, isRrsEnabled: Q, hasAssignedStrategy: X, insertDynamicContent: R, closeDynamicContent: I, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: v, startEditor: S, AutoSaveController: le, Toaster: ue, FilterSelectionDrawer: pe, HeaderWrapper: fe, LoadingWrapper: ye, SaveAsTemplateDrawer: ge, UnsubscribeWrapper: ve, ValidationErrorDrawer: Se };
153
+ }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, RemoveStrategyModal: q, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: b, props: a, configStore: o, editorStore: c, previewStore: K, hasChanges: m, isTestPartner: V, saveSilent: E, setLoading: w, emit: r, buildMetadata: y, initPlugin: C, preloadRuntime: D, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: j, isRrsEnabled: J, hasAssignedStrategy: Q, insertDynamicContent: I, closeDynamicContent: R, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: v, startEditor: S, AutoSaveController: de, Toaster: me, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ye };
156
154
  }
157
155
  });
158
156
  export {
159
- Ze as default
157
+ je as default
160
158
  };
@@ -1,14 +1,13 @@
1
- import { defineComponent as r } from "vue";
2
- import { useAutoSave as s } from "../../composables/useAutoSave.js";
3
- import { useSave as n } from "../../composables/useSave.js";
4
- import { useSaveValidationRollout as u } from "../../composables/useSaveValidationRollout.js";
5
- const v = /* @__PURE__ */ r({
1
+ import { defineComponent as t } from "vue";
2
+ import { useAutoSave as r } from "../../composables/useAutoSave.js";
3
+ import { useSave as s } from "../../composables/useSave.js";
4
+ const f = /* @__PURE__ */ t({
6
5
  __name: "AutoSaveController",
7
- setup(m) {
8
- const { save: e, saveRawOnly: o } = n(), { isEnabled: t } = u(), a = () => t.value ? o() : e(!1, !0);
9
- return s(a), { __sfc: !0, save: e, saveRawOnly: o, isEnabled: t, backgroundSave: a };
6
+ setup(a) {
7
+ const { save: e } = s(), o = () => e(!1, !0);
8
+ return r(o), { __sfc: !0, save: e, backgroundSave: o };
10
9
  }
11
10
  });
12
11
  export {
13
- v as default
12
+ f as default
14
13
  };
@@ -4,7 +4,7 @@ import d from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var u = function() {
5
5
  var s, i, n, a;
6
6
  var o = this, e = o._self._c, t = o._self._setupProxy;
7
- return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "loading-status": t.isSaving }, on: { click: function(r) {
7
+ return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(r) {
8
8
  return t.handleSave(!1);
9
9
  } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
10
10
  return t.executeSave(!1);
@@ -15,7 +15,7 @@ var u = function() {
15
15
  p,
16
16
  !1,
17
17
  null,
18
- "eedf7416"
18
+ "6e711fd7"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {
@@ -1,97 +1,66 @@
1
- import { defineComponent as R, computed as l, ref as m } from "vue";
2
- import { useActionsApi as D } from "../../../composables/useActionsApi.js";
3
- import { useConfig as F } from "../../../composables/useConfig.js";
4
- import { useExport as z } from "../../../composables/useExport.js";
5
- import { useTestEmailClick as I } from "../../../composables/useGuidoActions.js";
6
- import { useHtmlCompiler as P } from "../../../composables/useHtmlCompiler.js";
7
- import { useSave as W } from "../../../composables/useSave.js";
8
- import { useSaveValidation as j } from "../../../composables/useSaveValidation.js";
9
- import { useSaveValidationRollout as G } from "../../../composables/useSaveValidationRollout.js";
10
- import { useToaster as J } from "../../../composables/useToaster.js";
11
- import { useTranslations as K } from "../../../composables/useTranslations.js";
12
- import { useVersionHistoryApi as N } from "../../../composables/useVersionHistoryApi.js";
13
- import { useLiquidValidator as Q } from "../../../composables/validators/useLiquidValidator.js";
14
- import { ToasterTypeOptions as U } from "../../../enums/toaster.js";
15
- import { useConfigStore as X } from "../../../stores/config.js";
16
- import { useEditorStore as Y } from "../../../stores/editor.js";
17
- import { useSaveValidationStore as Z } from "../../../stores/save-validation.js";
18
- import { useTemplateStore as $ } from "../../../stores/template.js";
19
- import { getTooltipOptions as tt } from "../../../utils/tooltipUtils.js";
20
- import { InButtonV2 as ot } from "@useinsider/design-system-vue";
21
- import { storeToRefs as et } from "pinia";
22
- import rt from "./MigrationConfirmModal.vue.js";
23
- const At = /* @__PURE__ */ R({
1
+ import { defineComponent as O, ref as n, computed as h } from "vue";
2
+ import { useActionsApi as q } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as b } from "../../../composables/useConfig.js";
4
+ import { useExport as k } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as F } from "../../../composables/useSave.js";
8
+ import { useTranslations as L } from "../../../composables/useTranslations.js";
9
+ import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
10
+ import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
11
+ import { useEditorStore as I } from "../../../stores/editor.js";
12
+ import { useTemplateStore as P } from "../../../stores/template.js";
13
+ import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
14
+ import { InButtonV2 as G } from "@useinsider/design-system-vue";
15
+ import { storeToRefs as J } from "pinia";
16
+ import K from "./MigrationConfirmModal.vue.js";
17
+ const ut = /* @__PURE__ */ O({
24
18
  __name: "EditorActions",
25
- setup(it, { expose: A }) {
26
- const { config: u, isFeatureEnabled: c } = F(), { exportHtml: f } = z(), { save: p } = W(), { validateCurrentTemplate: d } = j(), { isEnabled: i } = G(), { showToaster: v } = J(), { openVersionHistory: S, closeVersionHistory: y } = N(), { getCompiledEmail: g } = D(), { compileHtml: h } = P(), { validateLiquidSyntax: V } = Q(), T = X(), e = Y(), w = Z(), H = $(), { hasMigrations: E } = et(H), r = K(), O = l(() => i.value && T.allowSaveWithErrors ? r("email-editor.save-and-continue") : "Save"), s = m(!1), a = m(!1), x = m(), n = I(), M = () => {
19
+ setup(N, { expose: x }) {
20
+ const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), e = I(), y = P(), { hasMigrations: g } = J(y), s = L(), i = n(!1), r = n(!1), S = n(), H = B(), T = () => {
27
21
  if (e.isVersionHistoryOpen) {
28
- y();
22
+ p();
29
23
  return;
30
24
  }
31
- S();
32
- }, b = async () => {
33
- s.value = !0, await f(), s.value = !1;
34
- }, k = () => {
25
+ c();
26
+ }, w = async () => {
27
+ i.value = !0, await m(), i.value = !1;
28
+ }, _ = () => {
35
29
  e.isSaveAsTemplateDrawerOpen = !0;
36
- }, q = l(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), B = l(
30
+ }, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
37
31
  () => {
38
32
  var t, o;
39
- return ((o = (t = u.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
33
+ return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
40
34
  }
41
- ), C = async (t) => {
42
- a.value = !0, t || (e.loadingStatus = !0);
43
- const o = await p(t);
44
- return a.value = !1, !t && !o && (e.loadingStatus = !1), o;
45
- }, _ = (t) => {
35
+ ), V = async (t) => {
36
+ r.value = !0, t || (e.loadingStatus = !0);
37
+ const o = await u(t);
38
+ return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
39
+ }, E = (t) => {
46
40
  var o;
47
- if (!t && E.value) {
48
- (o = x.value) == null || o.open();
41
+ if (!t && g.value) {
42
+ (o = S.value) == null || o.open();
49
43
  return;
50
44
  }
51
- return C(t);
52
- }, L = async () => {
53
- if (i.value) {
45
+ return V(t);
46
+ }, M = async () => {
47
+ if (l("liquidSyntax")) {
54
48
  e.loadingStatus = !0;
55
- let t = [];
56
49
  try {
57
- t = await d();
58
- } catch (o) {
59
- console.warn("Test-path validation failed; sending without the drawer.", o);
60
- } finally {
61
- e.loadingStatus = !1;
62
- }
63
- if (t.length) {
64
- v({
65
- type: U.Error,
66
- message: r("email-editor.validation-errors-found"),
67
- actionButton: {
68
- text: r("email-editor.check-errors"),
69
- onClick: () => w.open(t, "test")
70
- },
71
- autoHide: !1
72
- });
73
- return;
74
- }
75
- n();
76
- return;
77
- }
78
- if (c("liquidSyntax")) {
79
- e.loadingStatus = !0;
80
- try {
81
- const { html: t } = await g({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = h(t);
82
- if (!await V(o))
50
+ const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
51
+ if (!await v(o))
83
52
  return;
84
53
  } finally {
85
54
  e.loadingStatus = !1;
86
55
  }
87
56
  }
88
- n();
57
+ H();
89
58
  };
90
- return A({
91
- handleSave: _
92
- }), { __sfc: !0, config: u, isFeatureEnabled: c, exportHtml: f, save: p, validateCurrentTemplate: d, isEnabled: i, showToaster: v, openVersionHistory: S, closeVersionHistory: y, getCompiledEmail: g, compileHtml: h, validateLiquidSyntax: V, configStore: T, editorStore: e, saveValidationStore: w, templateStore: H, hasMigrations: E, trans: r, saveLabel: O, isExporting: s, isSaving: a, migrationModalRef: x, testEmailClick: n, handleVersionHistory: M, handleExport: b, handleSaveAs: k, versionHistoryTooltipText: q, isVersionHistoryButtonVisible: B, executeSave: C, handleSave: _, handleTestEmail: L, getTooltipOptions: tt, InButtonV2: ot, MigrationConfirmModal: rt };
59
+ return x({
60
+ handleSave: E
61
+ }), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: e, templateStore: y, hasMigrations: g, trans: s, isExporting: i, isSaving: r, migrationModalRef: S, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
93
62
  }
94
63
  });
95
64
  export {
96
- At as default
65
+ ut as default
97
66
  };
@@ -1,16 +1,16 @@
1
1
  import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
- import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var a = function() {
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
5
  var e = this, s = e._self._c, t = e._self._setupProxy;
6
6
  return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "ghost", type: "secondary", "disabled-status": t.isBackButtonDisabled, "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } })], 1);
7
- }, i = [], r = /* @__PURE__ */ n(
7
+ }, i = [], r = /* @__PURE__ */ a(
8
8
  o,
9
- a,
9
+ n,
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "b8f24f34"
13
+ "73199fa4"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {