@useinsider/guido 3.19.0-beta.cd75ff0 → 3.19.0-beta.cf43946

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 (61) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +37 -39
  3. package/dist/components/Guido.vue.js +8 -8
  4. package/dist/components/Guido.vue2.js +65 -68
  5. package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
  6. package/dist/components/organisms/header/EditorActions.vue.js +5 -5
  7. package/dist/components/organisms/header/EditorActions.vue2.js +46 -83
  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/useAutoSave.js +44 -46
  13. package/dist/composables/useHtmlCompiler.js +26 -37
  14. package/dist/composables/useHtmlValidator.js +0 -2
  15. package/dist/composables/useSave.js +45 -92
  16. package/dist/composables/validators/useCouponBlockValidator.js +21 -24
  17. package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
  18. package/dist/config/migrator/recommendationMigrator.js +28 -21
  19. package/dist/config/migrator/recommendationPartnerMigrator.js +36 -30
  20. package/dist/guido.css +1 -1
  21. package/dist/src/@types/config/schemas.d.ts +0 -4
  22. package/dist/src/components/Guido.vue.d.ts +1 -17
  23. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
  24. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
  25. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
  26. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
  27. package/dist/src/composables/useAutoSave.d.ts +1 -4
  28. package/dist/src/composables/useConfig.d.ts +0 -2
  29. package/dist/src/composables/useGuidoActions.d.ts +2 -0
  30. package/dist/src/composables/useHtmlValidator.d.ts +0 -21
  31. package/dist/src/composables/useSave.d.ts +1 -6
  32. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
  33. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
  34. package/dist/src/mock/cortexChatStore.d.ts +12 -0
  35. package/dist/src/stores/config.d.ts +0 -32
  36. package/dist/src/stores/onboarding.d.ts +4 -0
  37. package/dist/src/stores/recommendation.d.ts +5 -0
  38. package/dist/src/utils/dateUtil.d.ts +10 -0
  39. package/dist/src/utils/genericUtil.d.ts +3 -0
  40. package/dist/src/utils/templatePreparation.d.ts +0 -30
  41. package/dist/static/styles/components/version-history.css.js +2 -6
  42. package/dist/stores/config.js +67 -84
  43. package/dist/stores/onboarding.js +4 -0
  44. package/dist/utils/templatePreparation.js +36 -39
  45. package/package.json +1 -1
  46. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
  47. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -50
  48. package/dist/composables/useSaveValidation.js +0 -284
  49. package/dist/composables/useSaveValidationRollout.js +0 -20
  50. package/dist/enums/save-validation.js +0 -4
  51. package/dist/services/settingsApi.js +0 -11
  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 -4
  56. package/dist/src/enums/save-validation.d.ts +0 -27
  57. package/dist/src/services/settingsApi.d.ts +0 -6
  58. package/dist/src/stores/save-validation.d.ts +0 -22
  59. package/dist/src/stores/setup-settings.d.ts +0 -4
  60. package/dist/stores/save-validation.js +0 -30
  61. package/dist/stores/setup-settings.js +0 -10
@@ -1,8 +1,8 @@
1
- import { MessageType as r } from "../@types/config/schemas.js";
1
+ import "../@types/config/schemas.js";
2
2
  import "../@types/config/defaults.js";
3
- import { parseConfig as a } from "../@types/config/validator.js";
4
- import { defineStore as o } from "pinia";
5
- const g = o("guido-config", {
3
+ import { parseConfig as o } from "../@types/config/validator.js";
4
+ import { defineStore as a } from "pinia";
5
+ const s = a("guido-config", {
6
6
  state: () => ({
7
7
  initialized: !1,
8
8
  config: null
@@ -11,152 +11,135 @@ const g = o("guido-config", {
11
11
  /**
12
12
  * Get the identity configuration
13
13
  */
14
- identity: (i) => {
15
- var e;
16
- return ((e = i.config) == null ? void 0 : e.identity) ?? null;
14
+ identity: (e) => {
15
+ var i;
16
+ return ((i = e.config) == null ? void 0 : i.identity) ?? null;
17
17
  },
18
18
  /**
19
19
  * Get the partner configuration
20
20
  */
21
- partner: (i) => {
22
- var e;
23
- return ((e = i.config) == null ? void 0 : e.partner) ?? null;
21
+ partner: (e) => {
22
+ var i;
23
+ return ((i = e.config) == null ? void 0 : i.partner) ?? null;
24
24
  },
25
25
  /**
26
26
  * Get the template configuration
27
27
  */
28
- template: (i) => {
29
- var e;
30
- return ((e = i.config) == null ? void 0 : e.template) ?? null;
28
+ template: (e) => {
29
+ var i;
30
+ return ((i = e.config) == null ? void 0 : i.template) ?? null;
31
31
  },
32
32
  /**
33
33
  * Get the editor configuration
34
34
  */
35
- editor: (i) => {
36
- var e;
37
- return ((e = i.config) == null ? void 0 : e.editor) ?? null;
35
+ editor: (e) => {
36
+ var i;
37
+ return ((i = e.config) == null ? void 0 : i.editor) ?? null;
38
38
  },
39
39
  /**
40
40
  * Get the UI configuration
41
41
  */
42
- ui: (i) => {
43
- var e;
44
- return ((e = i.config) == null ? void 0 : e.ui) ?? null;
42
+ ui: (e) => {
43
+ var i;
44
+ return ((i = e.config) == null ? void 0 : i.ui) ?? null;
45
45
  },
46
46
  /**
47
47
  * Get the features configuration
48
48
  */
49
- features: (i) => {
50
- var e;
51
- return ((e = i.config) == null ? void 0 : e.features) ?? null;
49
+ features: (e) => {
50
+ var i;
51
+ return ((i = e.config) == null ? void 0 : i.features) ?? null;
52
52
  },
53
53
  /**
54
54
  * Get the blocks configuration
55
55
  */
56
- blocks: (i) => {
57
- var e;
58
- return ((e = i.config) == null ? void 0 : e.blocks) ?? null;
56
+ blocks: (e) => {
57
+ var i;
58
+ return ((i = e.config) == null ? void 0 : i.blocks) ?? null;
59
59
  },
60
60
  /**
61
61
  * Get the compiler configuration
62
62
  */
63
- compiler: (i) => {
64
- var e;
65
- return ((e = i.config) == null ? void 0 : e.compiler) ?? null;
63
+ compiler: (e) => {
64
+ var i;
65
+ return ((i = e.config) == null ? void 0 : i.compiler) ?? null;
66
66
  },
67
67
  /**
68
68
  * Get the callbacks configuration
69
69
  */
70
- callbacks: (i) => {
71
- var e;
72
- return ((e = i.config) == null ? void 0 : e.callbacks) ?? null;
70
+ callbacks: (e) => {
71
+ var i;
72
+ return ((i = e.config) == null ? void 0 : i.callbacks) ?? null;
73
73
  },
74
74
  /**
75
75
  * Get the template ID
76
76
  */
77
- templateId: (i) => {
78
- var e, t;
79
- return ((t = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : t.templateId) ?? "";
77
+ templateId: (e) => {
78
+ var i, t;
79
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.templateId) ?? "";
80
80
  },
81
81
  /**
82
82
  * Get the user ID
83
83
  */
84
- userId: (i) => {
85
- var e, t;
86
- return ((t = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : t.userId) ?? "";
84
+ userId: (e) => {
85
+ var i, t;
86
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.userId) ?? "";
87
87
  },
88
88
  /**
89
89
  * Get the variation ID
90
90
  */
91
- variationId: (i) => {
92
- var e, t;
93
- return ((t = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : t.variationId) ?? "";
91
+ variationId: (e) => {
92
+ var i, t;
93
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.variationId) ?? "";
94
94
  },
95
95
  /**
96
96
  * Get the campaign ID
97
97
  */
98
- campaignId: (i) => {
99
- var e, t;
100
- return ((t = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : t.campaignId) ?? "";
98
+ campaignId: (e) => {
99
+ var i, t;
100
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.campaignId) ?? "";
101
101
  },
102
102
  /**
103
103
  * Get the template-library ID of the host template
104
104
  */
105
- templateLibraryId: (i) => {
106
- var e, t;
107
- return ((t = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : t.templateLibraryId) ?? "";
105
+ templateLibraryId: (e) => {
106
+ var i, t;
107
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.templateLibraryId) ?? "";
108
108
  },
109
109
  /**
110
110
  * Get the partner name
111
111
  */
112
- partnerName: (i) => {
113
- var e, t;
114
- return ((t = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : t.name) ?? "";
112
+ partnerName: (e) => {
113
+ var i, t;
114
+ return ((t = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : t.name) ?? "";
115
115
  },
116
116
  /**
117
117
  * Get the product type
118
118
  */
119
- productType: (i) => {
120
- var e, t;
121
- return ((t = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : t.productType) ?? 60;
119
+ productType: (e) => {
120
+ var i, t;
121
+ return ((t = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : t.productType) ?? 60;
122
122
  },
123
123
  /**
124
124
  * Get the message type
125
125
  */
126
- messageType: (i) => {
127
- var e, t;
128
- return ((t = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : t.messageType) ?? 1;
129
- },
130
- /**
131
- * Transactional campaigns keep the hard save block. Reactive getter, so
132
- * consumers stay safe in setup where a raw config read snapshots null (SD-147945).
133
- */
134
- isTransactional() {
135
- return this.messageType === r.TRANSACTIONAL;
136
- },
137
- /**
138
- * Soft-save policy: may the editor persist a template with validation errors?
139
- * Default true (host sets features.allowSaveWithErrors=false for transactional +
140
- * unsub). Reactive getter defaulting true — reading via isFeatureEnabled would
141
- * floor to false pre-init and momentarily hide the soft-save option (SD-147430).
142
- */
143
- allowSaveWithErrors() {
144
- var i;
145
- return ((i = this.features) == null ? void 0 : i.allowSaveWithErrors) ?? !0;
126
+ messageType: (e) => {
127
+ var i, t;
128
+ return ((t = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : t.messageType) ?? 1;
146
129
  },
147
130
  /**
148
131
  * Get the username
149
132
  */
150
- username: (i) => {
151
- var e, t;
152
- return ((t = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : t.username) ?? "Guido User";
133
+ username: (e) => {
134
+ var i, t;
135
+ return ((t = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : t.username) ?? "Guido User";
153
136
  },
154
137
  /**
155
138
  * Check if header should be shown
156
139
  */
157
- showHeader: (i) => {
158
- var e, t;
159
- return ((t = (e = i.config) == null ? void 0 : e.ui) == null ? void 0 : t.showHeader) ?? !0;
140
+ showHeader: (e) => {
141
+ var i, t;
142
+ return ((t = (i = e.config) == null ? void 0 : i.ui) == null ? void 0 : t.showHeader) ?? !0;
160
143
  },
161
144
  /**
162
145
  * Check if a specific feature is enabled.
@@ -164,18 +147,18 @@ const g = o("guido-config", {
164
147
  * flash on during loading, then disappear once config resolves.
165
148
  */
166
149
  // eslint-disable-next-line @stylistic/max-len
167
- isFeatureEnabled: (i) => (e) => {
150
+ isFeatureEnabled: (e) => (i) => {
168
151
  var t, n;
169
- return ((n = (t = i.config) == null ? void 0 : t.features) == null ? void 0 : n[e]) ?? !1;
152
+ return ((n = (t = e.config) == null ? void 0 : t.features) == null ? void 0 : n[i]) ?? !1;
170
153
  }
171
154
  },
172
155
  actions: {
173
156
  /**
174
157
  * Initialize the config store with validated configuration
175
158
  */
176
- init(i) {
177
- const e = a(i);
178
- this.config = e, this.initialized = !0;
159
+ init(e) {
160
+ const i = o(e);
161
+ this.config = i, this.initialized = !0;
179
162
  },
180
163
  /**
181
164
  * Reset the config store
@@ -186,5 +169,5 @@ const g = o("guido-config", {
186
169
  }
187
170
  });
188
171
  export {
189
- g as useConfigStore
172
+ s as useConfigStore
190
173
  };
@@ -20,8 +20,10 @@ const t = () => ({
20
20
  }), c = s("guidoOnboarding", {
21
21
  state: () => a(),
22
22
  getters: {
23
+ /** @deprecated Components use the type-specific getters. Slated for deletion, see the SD-667788 dead-code ledger. */
23
24
  getOnboarding: (n) => (o) => n.onboardings[o],
24
25
  isActive: (n) => (o) => n.onboardings[o].isActive,
26
+ /** @deprecated Components use getGenericCurrentCard / getTextBlockCurrentCard. Slated for deletion, see the SD-667788 dead-code ledger. */
25
27
  getCurrentCard: (n) => (o) => {
26
28
  const i = n.onboardings[o];
27
29
  return i.config[i.cardIndex];
@@ -81,6 +83,7 @@ const t = () => ({
81
83
  previous(n) {
82
84
  this.onboardings[n].cardIndex > 0 && this.onboardings[n].cardIndex--;
83
85
  },
86
+ /** @deprecated No caller in src/. Slated for deletion, see the SD-667788 dead-code ledger. */
84
87
  updateCardPosition(n, o, i) {
85
88
  const r = this.onboardings[n].config[o];
86
89
  r && (r.top = i.top, r.position = i.position);
@@ -97,6 +100,7 @@ const t = () => ({
97
100
  async onNewVersionPopupClose() {
98
101
  await this.setUserModalState("newVersionPopup", "true", "Guido");
99
102
  },
103
+ /** @deprecated No caller in src/. Slated for deletion, see the SD-667788 dead-code ledger. */
100
104
  isOnboardingActive() {
101
105
  return Object.values(this.onboardings).some((n) => n.isActive);
102
106
  },
@@ -1,31 +1,31 @@
1
- import { useActionsApi as k } from "../composables/useActionsApi.js";
2
- import { useConfig as N } from "../composables/useConfig.js";
3
- import { useHtmlCompiler as U } from "../composables/useHtmlCompiler.js";
4
- import { RRS_CONFIG_VERSION as x, DEFAULT_CURRENCY as m, DEFAULT_NODE_CONFIG as n } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
5
- import { useRecommendationExtensionStore as w } from "../extensions/Blocks/Recommendation/store/recommendation.js";
6
- import { mapLegacyStrategy as L } from "../extensions/Blocks/Recommendation/utils/legacyStrategyMap.js";
1
+ import { useActionsApi as R } from "../composables/useActionsApi.js";
2
+ import { useConfig as k } from "../composables/useConfig.js";
3
+ import { useHtmlCompiler as N } from "../composables/useHtmlCompiler.js";
4
+ import { RRS_CONFIG_VERSION as U, DEFAULT_CURRENCY as m, DEFAULT_NODE_CONFIG as n } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
5
+ import { useRecommendationExtensionStore as I } from "../extensions/Blocks/Recommendation/store/recommendation.js";
6
+ import { mapLegacyStrategy as x } from "../extensions/Blocks/Recommendation/utils/legacyStrategyMap.js";
7
7
  import { DATA_ATTRIBUTES as A } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
8
- import { parsePageList as z } from "../extensions/Blocks/Unsubscribe/utils/utils.js";
9
- import { useDynamicContentStore as O } from "../stores/dynamic-content.js";
10
- import { useEditorStore as _ } from "../stores/editor.js";
11
- import { useUnsubscribeStore as v } from "../stores/unsubscribe.js";
12
- import { isPlainObject as B } from "./genericUtil.js";
13
- import { assignTrackingIds as G } from "./linkTrackingIds.js";
14
- function M(l) {
8
+ import { parsePageList as L } from "../extensions/Blocks/Unsubscribe/utils/utils.js";
9
+ import { useDynamicContentStore as z } from "../stores/dynamic-content.js";
10
+ import { useEditorStore as O } from "../stores/editor.js";
11
+ import { useUnsubscribeStore as _ } from "../stores/unsubscribe.js";
12
+ import { isPlainObject as v } from "./genericUtil.js";
13
+ import { assignTrackingIds as B } from "./linkTrackingIds.js";
14
+ function G(l) {
15
15
  const i = new DOMParser().parseFromString(l, "text/html").querySelectorAll(`[${A.PAGE_LIST}]`), t = [];
16
- return i.forEach((c) => {
17
- const r = c.getAttribute(A.PAGE_LIST);
18
- r && t.push(...z(r));
16
+ return i.forEach((s) => {
17
+ const r = s.getAttribute(A.PAGE_LIST);
18
+ r && t.push(...L(r));
19
19
  }), [...new Set(t)];
20
20
  }
21
- async function I(l) {
21
+ async function M(l) {
22
22
  const a = new DOMParser().parseFromString(l, "text/html").querySelectorAll(".recommendation-block-v2");
23
23
  if (a.length === 0)
24
24
  return;
25
- const i = w();
25
+ const i = I();
26
26
  a.forEach((t) => {
27
- var d, g, f, s, y, S;
28
- const c = t.getAttribute("recommendation-id"), r = c ? Number(c) : NaN;
27
+ var d, g, f, c, y, S;
28
+ const s = t.getAttribute("recommendation-id"), r = s ? Number(s) : NaN;
29
29
  if (!Number.isFinite(r))
30
30
  return;
31
31
  const p = t.getAttribute("esd-ext-config");
@@ -37,13 +37,13 @@ async function I(l) {
37
37
  } catch {
38
38
  return;
39
39
  }
40
- if (!B(e))
40
+ if (!v(e))
41
41
  return;
42
- const C = !!e.strategyId || (e.configVersion ?? 0) >= x, o = {
42
+ const C = !!e.strategyId || (e.configVersion ?? 0) >= U, o = {
43
43
  // Normalize legacy strategy keys (e.g. `mostViewed` → `mostPopular`) so
44
44
  // already-saved blocks that never re-run the migrator don't emit a
45
45
  // strategy-less campaign URL. `||` also catches '' / undefined (SD-144882).
46
- strategy: L(e.strategy) || (C ? "" : n.strategy),
46
+ strategy: x(e.strategy) || (C ? "" : n.strategy),
47
47
  strategyId: e.strategyId ?? n.strategyId,
48
48
  language: e.language ?? n.language,
49
49
  size: e.size ?? n.size,
@@ -55,7 +55,7 @@ async function I(l) {
55
55
  currencyCode: ((d = e.currency) == null ? void 0 : d.code) ?? m.code,
56
56
  currencySymbol: ((g = e.currency) == null ? void 0 : g.symbol) ?? m.symbol,
57
57
  currencyAlignment: ((f = e.currency) == null ? void 0 : f.alignment) ?? m.alignment,
58
- currencyDecimalCount: ((s = e.currency) == null ? void 0 : s.decimalCount) ?? m.decimalCount,
58
+ currencyDecimalCount: ((c = e.currency) == null ? void 0 : c.decimalCount) ?? m.decimalCount,
59
59
  currencyDecimalSeparator: ((y = e.currency) == null ? void 0 : y.decimalSeparator) ?? m.decimalSeparator,
60
60
  currencyThousandSeparator: ((S = e.currency) == null ? void 0 : S.thousandSeparator) ?? m.thousandSeparator
61
61
  };
@@ -71,39 +71,39 @@ async function I(l) {
71
71
  }
72
72
  }
73
73
  const re = () => {
74
- const l = O(), u = _(), a = v(), { getCompiledEmail: i, getTemplateData: t, updateHtmlAndCss: c } = k(), { compileHtml: r, compileAmpHtml: p } = U(), { isFeatureEnabled: e } = N();
74
+ const l = z(), u = O(), a = _(), { getCompiledEmail: i, getTemplateData: t, updateHtmlAndCss: s } = R(), { compileHtml: r, compileAmpHtml: p } = N(), { isFeatureEnabled: e } = k();
75
75
  return {
76
76
  prepareTemplateDetails: async () => {
77
77
  let { html: o, css: d, syncModulesIds: g = [] } = await t();
78
78
  if (e("linkTrackingIds"))
79
79
  try {
80
- const { html: b, changed: R, nextSeq: H } = G(o, u.trackIdSessionFloor);
81
- u.trackIdSessionFloor = H, R && (o = b, await c(b, d));
80
+ const { html: b, changed: F, nextSeq: H } = B(o, u.trackIdSessionFloor);
81
+ u.trackIdSessionFloor = H, F && (o = b, await s(b, d));
82
82
  } catch (b) {
83
83
  console.error("Tracking-id step failed, saving anyway:", b);
84
84
  }
85
- const { html: f, ampHtml: s = "", ampErrors: y = [] } = await i({
85
+ const { html: f, ampHtml: c = "", ampErrors: y = [] } = await i({
86
86
  minimize: !0,
87
87
  resetDataSavedFlag: !1
88
88
  });
89
- a.selectedUnsubscribePages.length && await a.fetchTemplates(), await I(o);
90
- const { compiledHtml: S, stats: h, appliedRules: D } = r(f), E = s && p(s).compiledHtml, P = l.getSelectedDynamicContentList, F = w(), T = M(o);
89
+ a.selectedUnsubscribePages.length && await a.fetchTemplates(), await M(o);
90
+ const { compiledHtml: S, stats: h, appliedRules: w } = r(f), D = c && p(c).compiledHtml, E = l.getSelectedDynamicContentList, P = I(), T = G(o);
91
91
  return console.debug("HTML Compilation Stats:", {
92
92
  originalSize: h.originalSize,
93
93
  compiledSize: h.compiledSize,
94
94
  reduction: `${h.reductionPercentage.toFixed(2)}%`,
95
- appliedRules: D,
95
+ appliedRules: w,
96
96
  executionTime: `${h.executionTime.toFixed(2)}ms`
97
97
  }), {
98
- dynamicContentList: P,
98
+ dynamicContentList: E,
99
99
  compiledHtml: S,
100
100
  rawHtml: o,
101
101
  css: d,
102
- ampHtml: E,
102
+ ampHtml: D,
103
103
  ampErrors: y,
104
104
  modules: g.map(Number),
105
105
  recommendation: {
106
- campaignUrls: F.recommendationCampaignUrls,
106
+ campaignUrls: P.recommendationCampaignUrls,
107
107
  configs: {}
108
108
  },
109
109
  unsubscribe: {
@@ -111,13 +111,10 @@ const re = () => {
111
111
  config: T
112
112
  }
113
113
  };
114
- },
115
- // Exposed so the back/test validate-only path can seed the reco store the
116
- // same way a full save does (required-field findings depend on it).
117
- hydrateRecommendationStore: I
114
+ }
118
115
  };
119
116
  };
120
117
  export {
121
- M as getHtmlReferencedUnsubscribePages,
118
+ G as getHtmlReferencedUnsubscribePages,
122
119
  re as useTemplatePreparation
123
120
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.19.0-beta.cd75ff0",
3
+ "version": "3.19.0-beta.cf43946",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -1,20 +0,0 @@
1
- import a from "./ValidationErrorDrawer.vue2.js";
2
- /* empty css */
3
- import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var i = function() {
5
- var o = this, r = o._self._c, t = o._self._setupProxy;
6
- return r(t.WpDrawer, { attrs: { id: "guido__validation-error-drawer", size: "small", "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.isDrawerOpen, "title-text": t.titleText }, on: { onCloseEvent: t.handleClose, primaryButtonEvent: t.handleClose, secondaryButtonEvent: t.handleSaveAndContinue } }, [r("div", { staticClass: "d-f f-d-c validation-error-list" }, o._l(t.rows, function(e, n) {
7
- return r("div", { key: n, staticClass: "d-f a-i-c validation-error-row" }, [r(t.InIcons, { staticClass: "validation-error-row__icon i-c-12", attrs: { name: "filled-caution-triangle" } }), r("span", { staticClass: "validation-error-row__text", domProps: { innerHTML: o._s(e) } })], 1);
8
- }), 0)]);
9
- }, l = [], d = /* @__PURE__ */ s(
10
- a,
11
- i,
12
- l,
13
- !1,
14
- null,
15
- "e48cebe9"
16
- );
17
- const f = d.exports;
18
- export {
19
- f as default
20
- };
@@ -1,50 +0,0 @@
1
- import { defineComponent as c, ref as f, computed as s } from "vue";
2
- import v from "../../wrappers/WpDrawer.vue.js";
3
- import { useSave as S } from "../../../composables/useSave.js";
4
- import { useToaster as g } from "../../../composables/useToaster.js";
5
- import { useTranslations as y } from "../../../composables/useTranslations.js";
6
- import { useConfigStore as h } from "../../../stores/config.js";
7
- import { useEditorStore as _ } from "../../../stores/editor.js";
8
- import { useSaveValidationStore as w } from "../../../stores/save-validation.js";
9
- import { escapeHtml as C } from "../../../utils/htmlEscape.js";
10
- import { InIcons as E } from "@useinsider/design-system-vue";
11
- const H = /* @__PURE__ */ c({
12
- __name: "ValidationErrorDrawer",
13
- setup(T) {
14
- const r = y(), e = w(), a = _(), n = h(), { saveWithErrors: i } = S(), { handleError: l } = g(), o = f(!1), m = s(() => {
15
- const t = {
16
- primaryButton: {
17
- styling: "solid",
18
- type: "primary",
19
- labelText: r("email-editor.update-design")
20
- }
21
- };
22
- return n.allowSaveWithErrors && e.intent !== "test" && (t.secondaryButton = {
23
- styling: "solid",
24
- type: "subtle-primary",
25
- labelText: r("email-editor.save-and-continue"),
26
- loadingStatus: o.value
27
- }), t;
28
- }), u = s(() => e.errors.map((t) => {
29
- const p = t.detail ? ` (${C(t.detail)})` : "";
30
- return `${t.message}${p}`;
31
- })), d = s(() => `${r("email-editor.validation-errors")} (${u.value.length})`);
32
- return { __sfc: !0, trans: r, store: e, editorStore: a, configStore: n, saveWithErrors: i, handleError: l, isSaving: o, footerButtonGroupOptions: m, rows: u, titleText: d, handleClose: () => {
33
- e.isDrawerOpen && e.close();
34
- }, handleSaveAndContinue: async () => {
35
- if (!o.value) {
36
- o.value = !0, a.loadingStatus = !0;
37
- try {
38
- await i() ? e.close() : a.loadingStatus = !1;
39
- } catch (t) {
40
- l(t, "Failed to save template"), a.loadingStatus = !1;
41
- } finally {
42
- o.value = !1;
43
- }
44
- }
45
- }, WpDrawer: v, InIcons: E };
46
- }
47
- });
48
- export {
49
- H as default
50
- };