@useinsider/guido 3.17.0-beta.6cedc6c → 3.17.0-beta.7c9fc24

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 (86) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +28 -26
  3. package/dist/components/Guido.vue.js +8 -8
  4. package/dist/components/Guido.vue2.js +50 -48
  5. package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
  6. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue.js +6 -6
  7. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +40 -35
  8. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  9. package/dist/components/organisms/header/EditorActions.vue2.js +74 -43
  10. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -12
  12. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
  13. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +48 -0
  14. package/dist/components/wrappers/WpDrawer.vue.js +9 -7
  15. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  16. package/dist/composables/useHtmlCompiler.js +37 -26
  17. package/dist/composables/useHtmlValidator.js +2 -0
  18. package/dist/composables/useSave.js +84 -41
  19. package/dist/composables/useSaveValidation.js +279 -0
  20. package/dist/composables/useSaveValidationRollout.js +9 -0
  21. package/dist/composables/useStripo.js +14 -14
  22. package/dist/composables/validators/useCouponBlockValidator.js +24 -21
  23. package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
  24. package/dist/config/i18n/en/labels.json.js +1 -1
  25. package/dist/config/migrator/index.js +9 -8
  26. package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
  27. package/dist/config/migrator/recommendation/extractors.js +29 -24
  28. package/dist/config/migrator/recommendation/htmlBuilder.js +116 -130
  29. package/dist/config/migrator/recommendationMigrator.js +30 -25
  30. package/dist/config/migrator/recommendationTitleMigrator.js +119 -0
  31. package/dist/enums/save-validation.js +4 -0
  32. package/dist/extensions/Blocks/Recommendation/block.js +12 -11
  33. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
  34. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  35. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +24 -22
  36. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +35 -28
  37. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +329 -257
  38. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +107 -105
  39. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +1 -0
  40. package/dist/extensions/Blocks/Recommendation/controls/title/index.js +44 -0
  41. package/dist/extensions/Blocks/Recommendation/extension.js +31 -29
  42. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +23 -4
  43. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +41 -34
  44. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
  45. package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +33 -0
  46. package/dist/extensions/Blocks/Recommendation/templates/utils.js +85 -107
  47. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +9 -9
  48. package/dist/guido.css +1 -1
  49. package/dist/src/@types/config/schemas.d.ts +4 -0
  50. package/dist/src/@types/save-validation.d.ts +19 -0
  51. package/dist/src/components/Guido.vue.d.ts +17 -1
  52. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
  53. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
  54. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
  55. package/dist/src/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +2 -0
  56. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
  57. package/dist/src/composables/useConfig.d.ts +2 -0
  58. package/dist/src/composables/useHtmlValidator.d.ts +21 -0
  59. package/dist/src/composables/useSave.d.ts +6 -1
  60. package/dist/src/composables/useSaveValidation.d.ts +6 -0
  61. package/dist/src/composables/useSaveValidationRollout.d.ts +3 -0
  62. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  63. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
  64. package/dist/src/config/migrator/recommendation/extractors.d.ts +8 -0
  65. package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +5 -0
  66. package/dist/src/enums/save-validation.d.ts +27 -0
  67. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +2 -1
  68. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +7 -0
  69. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  70. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  71. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +12 -0
  72. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +11 -0
  73. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  74. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +1 -0
  75. package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +86 -0
  76. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +5 -0
  77. package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +13 -0
  78. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  79. package/dist/src/stores/config.d.ts +30 -0
  80. package/dist/src/stores/save-validation.d.ts +22 -0
  81. package/dist/src/utils/templatePreparation.d.ts +30 -0
  82. package/dist/static/styles/customEditorStyle.css.js +3 -1
  83. package/dist/stores/config.js +39 -22
  84. package/dist/stores/save-validation.js +30 -0
  85. package/dist/utils/templatePreparation.js +28 -25
  86. package/package.json +1 -1
package/README.md CHANGED
@@ -162,6 +162,7 @@ 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).
165
166
  reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
166
167
  },
167
168
 
@@ -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
- }), M = a({
33
+ }), E = 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
- }), E = a({
57
+ }), M = 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
- })), N = k(
79
+ })), v = k(
80
80
  t(),
81
81
  R(c(S), [])
82
- ), P = g({
82
+ ), N = 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
- }), v = a({
127
+ }), P = 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(), P),
135
+ k(t(), N),
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(E),
145
+ c(M),
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(N, {}),
154
+ dynamicContentList: e(v, {}),
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(v, {})
176
+ migration: e(P, {})
177
177
  }), D = a({
178
178
  /** Sender display name */
179
179
  senderName: e(t(), ""),
@@ -220,8 +220,10 @@ 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),
223
225
  reusableRecommendationStrategy: e(o(), !1)
224
- }), B = i([
226
+ }), w = i([
225
227
  "amp-accordion",
226
228
  "amp-carousel",
227
229
  "amp-form-controls",
@@ -235,7 +237,7 @@ const p = {
235
237
  "text-block",
236
238
  "timer-block",
237
239
  "video-block"
238
- ]), w = i([
240
+ ]), B = i([
239
241
  "dynamic-content",
240
242
  "checkbox-block",
241
243
  "radio-button-block",
@@ -246,12 +248,12 @@ const p = {
246
248
  ]), H = a({
247
249
  /** Default blocks to exclude from the editor */
248
250
  excludeDefaults: e(
249
- c(B),
251
+ c(w),
250
252
  []
251
253
  ),
252
254
  /** Custom blocks to include in the editor */
253
255
  includeCustoms: e(
254
- c(w),
256
+ c(B),
255
257
  []
256
258
  )
257
259
  }), d = a({
@@ -302,7 +304,7 @@ const p = {
302
304
  customRules: e(c(V), []),
303
305
  /** Skip default compiler rules */
304
306
  ignoreDefaultRules: e(o(), !1)
305
- }), Z = a({
307
+ }), W = a({
306
308
  /**
307
309
  * External validation handler called before save completes.
308
310
  * Return false to cancel the save operation.
@@ -313,12 +315,12 @@ const p = {
313
315
  "externalValidation must be a function"
314
316
  )
315
317
  )
316
- }), Q = a({
318
+ }), K = a({
317
319
  // Required sections
318
320
  /** Identity configuration (required) */
319
321
  identity: A,
320
322
  /** Partner configuration (required) */
321
- partner: M,
323
+ partner: E,
322
324
  // Optional sections (with defaults)
323
325
  /** Template content and presets */
324
326
  template: e(x, {}),
@@ -333,33 +335,33 @@ const p = {
333
335
  /** Compiler configuration */
334
336
  compiler: e(z, {}),
335
337
  /** Callbacks and event handlers */
336
- callbacks: e(Z, {})
338
+ callbacks: e(W, {})
337
339
  });
338
340
  export {
339
341
  H as BlocksSchema,
340
- Z as CallbacksSchema,
342
+ W as CallbacksSchema,
341
343
  V as CompilerRuleSchema,
342
344
  z as CompilerSchema,
343
- w as CustomBlockTypeSchema,
345
+ B as CustomBlockTypeSchema,
344
346
  G as CustomRuleSchema,
345
- B as DefaultBlockTypeSchema,
346
- N as DynamicContentListSchema,
347
+ w as DefaultBlockTypeSchema,
348
+ v as DynamicContentListSchema,
347
349
  S as DynamicContentNodeSchema,
348
- E as DynamicContentSchema,
350
+ M as DynamicContentSchema,
349
351
  O as EditorSchema,
350
352
  D as EmailHeaderSchema,
351
353
  L as FallbackFontSchema,
352
354
  U as FeaturesSchema,
353
- Q as GuidoConfigSchema,
355
+ K as GuidoConfigSchema,
354
356
  A as IdentitySchema,
355
- P as LegacyRecommendationConfigSchema,
357
+ N as LegacyRecommendationConfigSchema,
356
358
  p as MessageType,
357
- M as PartnerSchema,
359
+ E as PartnerSchema,
358
360
  l as ProductType,
359
361
  j as RegexRuleSchema,
360
362
  q as RemoveRuleSchema,
361
363
  _ as ReplaceRuleSchema,
362
- v as TemplateMigrationSchema,
364
+ P as TemplateMigrationSchema,
363
365
  x as TemplateSchema,
364
366
  F as UISchema
365
367
  };
@@ -1,20 +1,20 @@
1
- import o from "./Guido.vue2.js";
1
+ import i from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import i from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import o 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.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.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), 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__ */ i(
10
- o,
9
+ }, s = [], n = /* @__PURE__ */ o(
10
+ i,
11
11
  t,
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "5c588dc5"
15
+ "2db79b8f"
16
16
  );
17
- const v = n.exports;
17
+ const c = n.exports;
18
18
  export {
19
- v as default
19
+ c as default
20
20
  };
@@ -1,30 +1,32 @@
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";
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";
8
9
  import { migrate as _ } from "../config/migrator/index.js";
9
10
  import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
11
+ import { RIBBON_SELECTOR as me } from "../enums/onboarding.js";
11
12
  import { useRecommendationExtensionStore as O } from "../extensions/Blocks/Recommendation/store/recommendation.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";
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";
22
24
  import { useEditorStore as P } from "../stores/editor.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";
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";
26
28
  import { readTrackFloor as W } from "../utils/linkTrackingIds.js";
27
- const je = /* @__PURE__ */ Z({
29
+ const Ze = /* @__PURE__ */ ee({
28
30
  __name: "Guido",
29
31
  props: {
30
32
  config: null,
@@ -34,21 +36,21 @@ const je = /* @__PURE__ */ Z({
34
36
  setup(x, { expose: G, emit: r }) {
35
37
  const a = x, H = l(
36
38
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
37
- ), $ = l(
39
+ ), V = l(
38
40
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
39
- ), z = l(
41
+ ), $ = l(
40
42
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
41
- ), q = l(
43
+ ), z = l(
42
44
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
43
- ), h = A(), p = A(), f = Se(), b = Ee(), o = ve();
45
+ ), b = A(), p = A(), f = Ee(), h = Ce(), o = he();
44
46
  a.ready && o.init(a.config);
45
- const c = P(), K = he(), m = u(() => c.hasChanges), { isTestPartner: V } = se(), E = () => {
47
+ const c = P(), q = we(), m = u(() => c.hasChanges), { isTestPartner: K } = ae(), { isEnabled: j } = ie(), E = () => {
46
48
  var t;
47
- return (t = h.value) == null ? void 0 : t.handleSave(!0);
49
+ return (t = b.value) == null ? void 0 : t.handleSave(!0);
48
50
  }, w = (t) => {
49
51
  c.loadingStatus = t;
50
52
  };
51
- oe(), re();
53
+ ne(), se();
52
54
  const y = () => {
53
55
  var t, e;
54
56
  return {
@@ -59,13 +61,13 @@ const je = /* @__PURE__ */ Z({
59
61
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
60
62
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
61
63
  };
62
- }, { initPlugin: C, preloadRuntime: D } = ae(), { getDefaultTemplate: k } = ge(), { cloneTimersOnSave: T, hasTimerBlocks: F } = ie(), j = u(() => {
64
+ }, { initPlugin: D, preloadRuntime: C } = ce(), { getDefaultTemplate: k } = be(), { cloneTimersOnSave: T, hasTimerBlocks: F } = de(), J = u(() => {
63
65
  var t;
64
66
  return !((t = o.ui) != null && t.showHeader);
65
- }), J = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), Q = u(
67
+ }), Q = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), X = u(
66
68
  () => !!O().recommendationConfigs.strategyId
67
69
  );
68
- ne({
70
+ re({
69
71
  onBack: () => {
70
72
  console.debug("guido:back"), r("back");
71
73
  },
@@ -80,9 +82,9 @@ const je = /* @__PURE__ */ Z({
80
82
  console.debug("guido:test-email:click"), r("test-email:click");
81
83
  }
82
84
  });
83
- const I = (t) => {
85
+ const R = (t) => {
84
86
  console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
85
- }, R = () => {
87
+ }, I = () => {
86
88
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
87
89
  };
88
90
  U(() => m.value, () => {
@@ -95,38 +97,38 @@ const je = /* @__PURE__ */ Z({
95
97
  let i = null;
96
98
  const v = () => {
97
99
  var e;
98
- const t = document.querySelector(ce);
100
+ const t = document.querySelector(me);
99
101
  (e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
100
102
  }, S = async () => {
101
103
  var t;
102
104
  try {
103
105
  o.initialized || o.init(a.config), c.templateId = o.templateId;
104
106
  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) || [];
105
- b.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
107
+ h.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
106
108
  const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, B = o.isFeatureEnabled("linkTrackingIds");
107
109
  let n = {
108
110
  html: s && await _(s, M),
109
111
  css: d
110
112
  };
111
113
  n.html || (n = await k(), n.html = await _(n.html, M));
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 = {
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 = {
115
117
  preselectedDynamicContentList: L,
116
118
  onReady: () => {
117
119
  console.debug("guido:ready"), r("ready");
118
120
  }
119
121
  };
120
- await C(n, y(), Y), f.selectedDynamicContentList = L;
122
+ await D(n, y(), Z), f.selectedDynamicContentList = L;
121
123
  } catch (e) {
122
124
  console.error("Failed to initialize Stripo editor:", e);
123
125
  }
124
126
  };
125
- return ee(async () => {
127
+ return te(async () => {
126
128
  var e;
127
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), be().$reset(), v();
129
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), De().$reset(), v();
128
130
  const t = (e = p.value) == null ? void 0 : e.parentElement;
129
- if (t && (i = new ResizeObserver(v), i.observe(t)), D(), a.ready)
131
+ if (t && (i = new ResizeObserver(v), i.observe(t)), C(), a.ready)
130
132
  await S();
131
133
  else {
132
134
  const s = U(() => a.ready, (d) => {
@@ -134,7 +136,7 @@ const je = /* @__PURE__ */ Z({
134
136
  });
135
137
  }
136
138
  document.addEventListener("dynamic-content:open", g);
137
- }), te(() => {
139
+ }), oe(() => {
138
140
  i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g);
139
141
  try {
140
142
  window.UIEditor.removeEditor();
@@ -144,15 +146,15 @@ const je = /* @__PURE__ */ Z({
144
146
  o.reset();
145
147
  }), G({
146
148
  dynamicContent: {
147
- insert: I,
148
- close: R
149
+ insert: R,
150
+ close: I
149
151
  },
150
152
  hasChanges: m,
151
153
  saveSilent: E,
152
154
  setLoading: w
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 };
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 };
154
156
  }
155
157
  });
156
158
  export {
157
- je as default
159
+ Ze as default
158
160
  };
@@ -1,13 +1,14 @@
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({
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({
5
6
  __name: "AutoSaveController",
6
- setup(a) {
7
- const { save: e } = s(), o = () => e(!1, !0);
8
- return r(o), { __sfc: !0, save: e, backgroundSave: o };
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 };
9
10
  }
10
11
  });
11
12
  export {
12
- f as default
13
+ v as default
13
14
  };
@@ -1,17 +1,17 @@
1
- import r from "./RemoveStrategyModal.vue2.js";
2
- import s from "../../../../_virtual/_plugin-vue2_normalizer.js";
1
+ import s from "./RemoveStrategyModal.vue2.js";
2
+ import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var a = function() {
4
4
  var t = this, o = t._self._c, e = t._self._setupProxy;
5
- return e.store.removeStrategyModalStatus ? o(e.WpModal, { attrs: { id: "guido__remove-strategy-modal", size: "X-small", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("email-editor.remove-strategy-confirm-title") }, on: { close: e.close, "primary-action": e.handleConfirm, "secondary-action": e.close } }, [o("p", [t._v(t._s(e.trans("email-editor.remove-strategy-confirm-message", { strategyName: e.strategyName })))])]) : t._e();
6
- }, n = [], i = /* @__PURE__ */ s(
7
- r,
5
+ return e.store.removeStrategyModalStatus ? o(e.WpModal, { attrs: { id: "guido__remove-strategy-modal", size: "small", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("email-editor.remove-strategy-confirm-title") }, on: { close: e.close, "primary-action": e.handleConfirm, "secondary-action": e.close } }, [o("p", [t._v(t._s(e.messageParts[0])), o("b", [t._v(t._s(e.strategyName))]), t._v(t._s(e.messageParts[1]))])]) : t._e();
6
+ }, n = [], _ = /* @__PURE__ */ r(
7
+ s,
8
8
  a,
9
9
  n,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const c = i.exports;
14
+ const c = _.exports;
15
15
  export {
16
16
  c as default
17
17
  };
@@ -1,52 +1,57 @@
1
- import { defineComponent as p, computed as m } from "vue";
2
- import u from "../../../wrappers/WpModal.vue.js";
3
- import { useToaster as y } from "../../../../composables/useToaster.js";
4
- import { useTranslations as f } from "../../../../composables/useTranslations.js";
5
- import { ToasterTypeOptions as g } from "../../../../enums/toaster.js";
6
- import { useRecommendationExtensionStore as v } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
1
+ import { defineComponent as u, computed as n } from "vue";
2
+ import y from "../../../wrappers/WpModal.vue.js";
3
+ import { useToaster as f } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as _ } from "../../../../composables/useTranslations.js";
5
+ import { ToasterTypeOptions as v } from "../../../../enums/toaster.js";
6
+ import { useRecommendationExtensionStore as T } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
7
  import { commitBlockChangeOutsidePanel as h } from "../../../../extensions/Blocks/Recommendation/utils/nodeConfigWriter.js";
8
- const O = /* @__PURE__ */ p({
8
+ import { escapeHtml as R } from "../../../../utils/htmlEscape.js";
9
+ const P = /* @__PURE__ */ u({
9
10
  __name: "RemoveStrategyModal",
10
- setup(_) {
11
- const o = f(), e = v(), { showToaster: n } = y(), c = m(() => ({
11
+ setup(S) {
12
+ const t = _(), e = T(), { showToaster: a } = f(), i = n(() => ({
12
13
  cancelOrBackButton: {
13
14
  type: "secondary",
14
- labelText: o("products.cancel"),
15
+ labelText: t("products.cancel"),
15
16
  styling: "ghost"
16
17
  },
17
18
  primaryButton: {
18
19
  type: "danger",
19
- labelText: o("discovery-strategy.remove")
20
+ labelText: t("discovery-strategy.remove")
20
21
  }
21
- })), s = m(() => {
22
- var t;
22
+ })), m = n(() => {
23
+ var o;
23
24
  const { strategyId: r } = e.recommendationConfigs;
24
- return ((t = e.assignedStrategy) == null ? void 0 : t.name) || `#${r}`;
25
- }), a = () => {
25
+ return ((o = e.assignedStrategy) == null ? void 0 : o.name) || `#${r}`;
26
+ }), s = "__STRATEGY_NAME__", d = n(() => t("email-editor.remove-strategy-confirm-message", { strategyName: s }).split(s)), c = () => {
26
27
  e.closeRemoveStrategyModal();
27
28
  };
28
- return { __sfc: !0, trans: o, store: e, showToaster: n, footerButtonOptions: c, strategyName: s, close: a, handleConfirm: async () => {
29
- const r = s.value, t = e.currentRecommendationId;
30
- if (e.removeStrategy(), a(), n({
31
- type: g.Success,
32
- message: o("email-editor.strategy-removed-success", { strategyName: r })
33
- }), t === null)
34
- return;
35
- try {
36
- await e.fetchRecommendationProducts();
37
- } catch (l) {
38
- console.error("[RemoveStrategyModal] product refetch failed", l);
29
+ return { __sfc: !0, trans: t, store: e, showToaster: a, footerButtonOptions: i, strategyName: m, NAME_TOKEN: s, messageParts: d, close: c, handleConfirm: async () => {
30
+ const r = m.value, o = e.currentRecommendationId;
31
+ e.removeStrategy(), c();
32
+ const { strategyId: l, size: g } = e.recommendationConfigs;
33
+ if (a({
34
+ type: v.Success,
35
+ // The toast renders through a sanitizing v-html, so the name is escaped first.
36
+ message: t("email-editor.strategy-removed-success", {
37
+ strategyName: `<b>${R(r)}</b>`
38
+ })
39
+ }), o !== null) {
40
+ try {
41
+ await e.fetchRecommendationProducts();
42
+ } catch (p) {
43
+ console.error("[RemoveStrategyModal] product refetch failed", p);
44
+ }
45
+ h(
46
+ o,
47
+ { strategyId: l, size: g },
48
+ e.recommendationProducts,
49
+ "Removed recommendation strategy"
50
+ );
39
51
  }
40
- const { strategyId: i, size: d } = e.recommendationConfigs;
41
- h(
42
- t,
43
- { strategyId: i, size: d },
44
- e.recommendationProducts,
45
- "Removed recommendation strategy"
46
- );
47
- }, WpModal: u };
52
+ }, WpModal: y };
48
53
  }
49
54
  });
50
55
  export {
51
- O as default
56
+ P as default
52
57
  };
@@ -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", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "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", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "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
- "6e711fd7"
18
+ "eedf7416"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {