@useinsider/guido 3.17.0-beta.e6704da → 3.17.0-beta.ea65303

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 (75) hide show
  1. package/README.md +1 -1
  2. package/dist/@types/config/schemas.js +31 -35
  3. package/dist/components/Guido.vue.js +5 -5
  4. package/dist/components/Guido.vue2.js +77 -77
  5. package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
  6. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  7. package/dist/components/organisms/header/EditorActions.vue2.js +74 -43
  8. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -12
  10. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
  11. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +48 -0
  12. package/dist/components/wrappers/WpDrawer.vue.js +9 -7
  13. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  14. package/dist/composables/useCustomInterfaceAppearance.js +16 -19
  15. package/dist/composables/useHtmlCompiler.js +37 -26
  16. package/dist/composables/useHtmlValidator.js +2 -0
  17. package/dist/composables/useRecommendation.js +34 -41
  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/validators/useCouponBlockValidator.js +24 -21
  22. package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
  23. package/dist/config/migrator/recommendationMigrator.js +4 -6
  24. package/dist/enums/academy.js +1 -2
  25. package/dist/enums/date.js +3 -4
  26. package/dist/enums/extensions/recommendationBlock.js +23 -25
  27. package/dist/enums/save-validation.js +4 -0
  28. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +11 -13
  29. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +95 -96
  30. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +154 -156
  31. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +82 -223
  32. package/dist/extensions/Blocks/common-control.js +19 -22
  33. package/dist/guido.css +1 -1
  34. package/dist/services/recommendationApi.js +29 -78
  35. package/dist/src/@types/config/schemas.d.ts +4 -12
  36. package/dist/src/@types/save-validation.d.ts +19 -0
  37. package/dist/src/components/Guido.vue.d.ts +17 -1
  38. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
  39. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
  40. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
  41. package/dist/src/components/organisms/{extensions/recommendation/AssignStrategyDrawer.vue.d.ts → validation/ValidationErrorDrawer.vue.d.ts} +0 -1
  42. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
  43. package/dist/src/composables/useConfig.d.ts +2 -2
  44. package/dist/src/composables/useHtmlValidator.d.ts +21 -0
  45. package/dist/src/composables/useRecommendation.d.ts +0 -1
  46. package/dist/src/composables/useSave.d.ts +6 -1
  47. package/dist/src/composables/useSaveValidation.d.ts +6 -0
  48. package/dist/src/composables/useSaveValidationRollout.d.ts +3 -0
  49. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  50. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
  51. package/dist/src/enums/academy.d.ts +0 -1
  52. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  53. package/dist/src/enums/save-validation.d.ts +27 -0
  54. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -14
  55. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +15 -214
  56. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -6
  57. package/dist/src/extensions/Blocks/common-control.d.ts +1 -4
  58. package/dist/src/services/recommendationApi.d.ts +1 -4
  59. package/dist/src/stores/config.d.ts +30 -18
  60. package/dist/src/stores/save-validation.d.ts +22 -0
  61. package/dist/src/utils/templatePreparation.d.ts +30 -0
  62. package/dist/stores/config.js +39 -22
  63. package/dist/stores/save-validation.js +30 -0
  64. package/dist/utils/dateUtil.js +10 -23
  65. package/dist/utils/templatePreparation.js +50 -50
  66. package/package.json +1 -2
  67. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +0 -18
  68. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +0 -70
  69. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +0 -20
  70. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +0 -55
  71. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -141
  72. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +0 -24
  73. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -29
  74. package/dist/src/mock/api/recommendation-strategies.d.ts +0 -43
  75. package/dist/static/styles/components/recommendation-strategy.css.js +0 -171
package/README.md CHANGED
@@ -162,7 +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
- reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
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
166
  },
167
167
 
168
168
  // Optional: Callbacks
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as y, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as k, boolean as o, array as c, transform as C, record as y, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -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 = y(
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
+ y(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,13 +220,9 @@ 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
- /**
224
- * Assign a Reusable Recommendation Strategy (RRS) to recommendation blocks instead of
225
- * per-block algorithm settings. Hides Algorithm, Filters, Shuffle and Number of Products
226
- * (they live on the strategy) and adds the Assign Strategy flow.
227
- */
228
- reusableRecommendationStrategy: e(o(), !1)
229
- }), B = i([
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
+ }), w = i([
230
226
  "amp-accordion",
231
227
  "amp-carousel",
232
228
  "amp-form-controls",
@@ -240,7 +236,7 @@ const p = {
240
236
  "text-block",
241
237
  "timer-block",
242
238
  "video-block"
243
- ]), w = i([
239
+ ]), B = i([
244
240
  "dynamic-content",
245
241
  "checkbox-block",
246
242
  "radio-button-block",
@@ -251,12 +247,12 @@ const p = {
251
247
  ]), H = a({
252
248
  /** Default blocks to exclude from the editor */
253
249
  excludeDefaults: e(
254
- c(B),
250
+ c(w),
255
251
  []
256
252
  ),
257
253
  /** Custom blocks to include in the editor */
258
254
  includeCustoms: e(
259
- c(w),
255
+ c(B),
260
256
  []
261
257
  )
262
258
  }), d = a({
@@ -293,7 +289,7 @@ const p = {
293
289
  ...d.entries,
294
290
  type: u("custom"),
295
291
  /** Custom processor function */
296
- processor: y(
292
+ processor: k(
297
293
  (s) => typeof s == "function",
298
294
  "processor must be a function"
299
295
  )
@@ -307,23 +303,23 @@ const p = {
307
303
  customRules: e(c(V), []),
308
304
  /** Skip default compiler rules */
309
305
  ignoreDefaultRules: e(o(), !1)
310
- }), Z = a({
306
+ }), W = a({
311
307
  /**
312
308
  * External validation handler called before save completes.
313
309
  * Return false to cancel the save operation.
314
310
  */
315
311
  externalValidation: e(
316
- y(
312
+ k(
317
313
  (s) => typeof s == "function",
318
314
  "externalValidation must be a function"
319
315
  )
320
316
  )
321
- }), Q = a({
317
+ }), K = a({
322
318
  // Required sections
323
319
  /** Identity configuration (required) */
324
320
  identity: A,
325
321
  /** Partner configuration (required) */
326
- partner: M,
322
+ partner: E,
327
323
  // Optional sections (with defaults)
328
324
  /** Template content and presets */
329
325
  template: e(x, {}),
@@ -338,33 +334,33 @@ const p = {
338
334
  /** Compiler configuration */
339
335
  compiler: e(z, {}),
340
336
  /** Callbacks and event handlers */
341
- callbacks: e(Z, {})
337
+ callbacks: e(W, {})
342
338
  });
343
339
  export {
344
340
  H as BlocksSchema,
345
- Z as CallbacksSchema,
341
+ W as CallbacksSchema,
346
342
  V as CompilerRuleSchema,
347
343
  z as CompilerSchema,
348
- w as CustomBlockTypeSchema,
344
+ B as CustomBlockTypeSchema,
349
345
  G as CustomRuleSchema,
350
- B as DefaultBlockTypeSchema,
351
- N as DynamicContentListSchema,
346
+ w as DefaultBlockTypeSchema,
347
+ v as DynamicContentListSchema,
352
348
  S as DynamicContentNodeSchema,
353
- E as DynamicContentSchema,
349
+ M as DynamicContentSchema,
354
350
  O as EditorSchema,
355
351
  D as EmailHeaderSchema,
356
352
  L as FallbackFontSchema,
357
353
  U as FeaturesSchema,
358
- Q as GuidoConfigSchema,
354
+ K as GuidoConfigSchema,
359
355
  A as IdentitySchema,
360
- P as LegacyRecommendationConfigSchema,
356
+ N as LegacyRecommendationConfigSchema,
361
357
  p as MessageType,
362
- M as PartnerSchema,
358
+ E as PartnerSchema,
363
359
  l as ProductType,
364
360
  j as RegexRuleSchema,
365
361
  q as RemoveRuleSchema,
366
362
  _ as ReplaceRuleSchema,
367
- v as TemplateMigrationSchema,
363
+ P as TemplateMigrationSchema,
368
364
  x as TemplateSchema,
369
365
  F as UISchema
370
366
  };
@@ -3,18 +3,18 @@ import a from "./Guido.vue2.js";
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.configStore.isFeatureEnabled("reusableRecommendationStrategy") ? r(e.AssignStrategyDrawer) : o._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : o._e(), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, n = [], s = /* @__PURE__ */ i(
9
+ }, n = [], d = /* @__PURE__ */ i(
10
10
  a,
11
11
  t,
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "f258bc9e"
15
+ "f02fdde0"
16
16
  );
17
- const l = s.exports;
17
+ const c = d.exports;
18
18
  export {
19
- l as default
19
+ c as default
20
20
  };
@@ -1,30 +1,32 @@
1
- import { defineComponent as J, defineAsyncComponent as g, ref as B, computed as U, watch as _, onMounted as Q, onUnmounted as X } from "vue";
1
+ import { defineComponent as J, defineAsyncComponent as M, ref as B, computed as U, watch as _, onMounted as Q, onUnmounted as X } from "vue";
2
2
  import { useCortexBlueprintBridge as Y } from "../composables/useCortexBlueprintBridge.js";
3
3
  import { provideGuidoActions as Z } from "../composables/useGuidoActions.js";
4
4
  import { useGuidoStateBridge as ee } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as te } from "../composables/usePartner.js";
6
- import { useStripo as oe } from "../composables/useStripo.js";
7
- import { useTimerClone as ne } from "../composables/useTimerClone.js";
8
- import { migrate as A } from "../config/migrator/index.js";
9
- import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as re } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as se } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import ae from "./organisms/AutoSaveController.vue.js";
13
- import ie from "./organisms/base/Toaster.vue.js";
14
- import ce from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import de from "./organisms/header/HeaderWrapper.vue.js";
16
- import me from "./organisms/LoadingWrapper.vue.js";
17
- import le from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import ue from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as pe } from "../services/stripoApi.js";
20
- import { useConfigStore as fe } from "../stores/config.js";
21
- import { useDynamicContentStore as ye } from "../stores/dynamic-content.js";
22
- import { useEditorStore as O } from "../stores/editor.js";
23
- import { usePreviewStore as ve } from "../stores/preview.js";
24
- import { useTemplateStore as ge } from "../stores/template.js";
25
- import { useUnsubscribeStore as Se } from "../stores/unsubscribe.js";
26
- import { readTrackFloor as P } from "../utils/linkTrackingIds.js";
27
- const qe = /* @__PURE__ */ J({
5
+ import { usePartner as oe } from "../composables/usePartner.js";
6
+ import { useSaveValidationRollout as te } from "../composables/useSaveValidationRollout.js";
7
+ import { useStripo as ne } from "../composables/useStripo.js";
8
+ import { useTimerClone as re } from "../composables/useTimerClone.js";
9
+ import { migrate as N } from "../config/migrator/index.js";
10
+ import { ModuleFolderDefaults as O } from "../enums/defaults.js";
11
+ import { RIBBON_SELECTOR as se } from "../enums/onboarding.js";
12
+ import { useRecommendationExtensionStore as ae } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
+ import ie from "./organisms/AutoSaveController.vue.js";
14
+ import ce from "./organisms/base/Toaster.vue.js";
15
+ import de from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
+ import me from "./organisms/header/HeaderWrapper.vue.js";
17
+ import le from "./organisms/LoadingWrapper.vue.js";
18
+ import ue from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
+ import pe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
+ import fe from "./organisms/validation/ValidationErrorDrawer.vue.js";
21
+ import { useStripoApi as ve } from "../services/stripoApi.js";
22
+ import { useConfigStore as ye } from "../stores/config.js";
23
+ import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
24
+ import { useEditorStore as P } from "../stores/editor.js";
25
+ import { usePreviewStore as he } from "../stores/preview.js";
26
+ import { useTemplateStore as be } from "../stores/template.js";
27
+ import { useUnsubscribeStore as ge } from "../stores/unsubscribe.js";
28
+ import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
29
+ const Je = /* @__PURE__ */ J({
28
30
  __name: "Guido",
29
31
  props: {
30
32
  config: null,
@@ -32,34 +34,32 @@ const qe = /* @__PURE__ */ J({
32
34
  },
33
35
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
34
36
  setup(W, { expose: x, emit: r }) {
35
- const a = W, G = g(
37
+ const a = W, G = M(
36
38
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
37
- ), H = g(
39
+ ), H = M(
38
40
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
39
- ), $ = g(
40
- () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
41
- ), S = B(), l = B(), u = ye(), h = Se(), o = fe();
42
- a.ready && o.init(a.config);
43
- const c = O(), z = ve(), m = U(() => c.hasChanges), { isTestPartner: q } = te(), b = () => {
44
- var t;
45
- return (t = S.value) == null ? void 0 : t.handleSave(!0);
46
- }, E = (t) => {
47
- c.loadingStatus = t;
41
+ ), S = B(), l = B(), u = Se(), h = ge(), t = ye();
42
+ a.ready && t.init(a.config);
43
+ const c = P(), V = he(), m = U(() => c.hasChanges), { isTestPartner: $ } = oe(), { isEnabled: z } = te(), b = () => {
44
+ var o;
45
+ return (o = S.value) == null ? void 0 : o.handleSave(!0);
46
+ }, g = (o) => {
47
+ c.loadingStatus = o;
48
48
  };
49
49
  Y(), ee();
50
50
  const p = () => {
51
- var t, e;
51
+ var o, e;
52
52
  return {
53
- emailId: o.templateId,
54
- userId: o.userId,
55
- username: o.username,
56
- partnerName: o.partnerName,
57
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
58
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
53
+ emailId: t.templateId,
54
+ userId: t.userId,
55
+ username: t.username,
56
+ partnerName: t.partnerName,
57
+ savedModulesFolderName: ((o = t.editor) == null ? void 0 : o.savedModulesFolderName) || O.SAVED_MODULES,
58
+ defaultModulesFolderName: ((e = t.editor) == null ? void 0 : e.defaultModulesFolderName) || O.DEFAULT_MODULES
59
59
  };
60
- }, { initPlugin: w, preloadRuntime: D } = oe(), { getDefaultTemplate: C } = pe(), { cloneTimersOnSave: k, hasTimerBlocks: T } = ne(), K = U(() => {
61
- var t;
62
- return !((t = o.ui) != null && t.showHeader);
60
+ }, { initPlugin: E, preloadRuntime: w } = ne(), { getDefaultTemplate: D } = ve(), { cloneTimersOnSave: C, hasTimerBlocks: k } = re(), q = U(() => {
61
+ var o;
62
+ return !((o = t.ui) != null && o.showHeader);
63
63
  });
64
64
  Z({
65
65
  onBack: () => {
@@ -68,65 +68,65 @@ const qe = /* @__PURE__ */ J({
68
68
  onSaveStart: () => {
69
69
  console.debug("guido:save:start"), r("save:start");
70
70
  },
71
- onSaveComplete: (t) => {
72
- const e = { ...t, metadata: p() };
71
+ onSaveComplete: (o) => {
72
+ const e = { ...o, metadata: p() };
73
73
  console.debug("guido:save:complete", e), r("save:complete", e);
74
74
  },
75
75
  onTestEmailClick: () => {
76
76
  console.debug("guido:test-email:click"), r("test-email:click");
77
77
  }
78
78
  });
79
- const F = (t) => {
80
- console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
81
- }, I = () => {
79
+ const T = (o) => {
80
+ console.debug("dynamic-content:close", o), u.setSelectedDynamicContent(o), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: o }));
81
+ }, F = () => {
82
82
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
83
83
  };
84
84
  _(() => m.value, () => {
85
85
  r("on-change", m.value);
86
86
  });
87
- const f = (t) => {
88
- const e = t, { attribute: s, position: d } = e.detail;
87
+ const f = (o) => {
88
+ const e = o, { attribute: s, position: d } = e.detail;
89
89
  console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
90
90
  };
91
91
  let i = null;
92
- const y = () => {
92
+ const v = () => {
93
93
  var e;
94
- const t = document.querySelector(re);
95
- (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
96
- }, v = async () => {
97
- var t;
94
+ const o = document.querySelector(se);
95
+ (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(o == null ? void 0 : o.offsetHeight) ?? 0}px`);
96
+ }, y = async () => {
97
+ var o;
98
98
  try {
99
- o.initialized || o.init(a.config), c.templateId = o.templateId;
100
- 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) || [];
99
+ t.initialized || t.init(a.config), c.templateId = t.templateId;
100
+ const e = t.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", I = (e == null ? void 0 : e.preselectedDynamicContent) || [];
101
101
  h.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
102
- const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, R = o.isFeatureEnabled("linkTrackingIds");
102
+ const L = ((o = e == null ? void 0 : e.migration) == null ? void 0 : o.recommendationConfigs) ?? {}, R = t.isFeatureEnabled("linkTrackingIds");
103
103
  let n = {
104
- html: s && await A(s, M),
104
+ html: s && await N(s, L),
105
105
  css: d
106
106
  };
107
- n.html || (n = await C(), n.html = await A(n.html, M));
108
- const V = R ? P(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
109
- T(n.html) && (n.html = await k(n.html)), R && (c.trackIdSessionFloor = Math.max(V, P(n.html)));
107
+ n.html || (n = await D(), n.html = await N(n.html, L));
108
+ const K = R ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
109
+ k(n.html) && (n.html = await C(n.html)), R && (c.trackIdSessionFloor = Math.max(K, A(n.html)));
110
110
  const j = {
111
- preselectedDynamicContentList: L,
111
+ preselectedDynamicContentList: I,
112
112
  onReady: () => {
113
113
  console.debug("guido:ready"), r("ready");
114
114
  }
115
115
  };
116
- await w(n, p(), j), u.selectedDynamicContentList = L;
116
+ await E(n, p(), j), u.selectedDynamicContentList = I;
117
117
  } catch (e) {
118
118
  console.error("Failed to initialize Stripo editor:", e);
119
119
  }
120
120
  };
121
121
  return Q(async () => {
122
122
  var e;
123
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), se().$reset(), O().$reset(), ge().$reset(), y();
124
- const t = (e = l.value) == null ? void 0 : e.parentElement;
125
- if (t && (i = new ResizeObserver(y), i.observe(t)), D(), a.ready)
126
- await v();
123
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ae().$reset(), P().$reset(), be().$reset(), v();
124
+ const o = (e = l.value) == null ? void 0 : e.parentElement;
125
+ if (o && (i = new ResizeObserver(v), i.observe(o)), w(), a.ready)
126
+ await y();
127
127
  else {
128
128
  const s = _(() => a.ready, (d) => {
129
- d && (s(), v());
129
+ d && (s(), y());
130
130
  });
131
131
  }
132
132
  document.addEventListener("dynamic-content:open", f);
@@ -137,18 +137,18 @@ const qe = /* @__PURE__ */ J({
137
137
  } catch {
138
138
  console.debug("Failed to remove Stripo editor: No editor found");
139
139
  }
140
- o.reset();
140
+ t.reset();
141
141
  }), x({
142
142
  dynamicContent: {
143
- insert: F,
144
- close: I
143
+ insert: T,
144
+ close: F
145
145
  },
146
146
  hasChanges: m,
147
147
  saveSilent: b,
148
- setLoading: E
149
- }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, AssignStrategyDrawer: $, headerWrapperRef: S, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: h, props: a, configStore: o, editorStore: c, previewStore: z, hasChanges: m, isTestPartner: q, saveSilent: b, setLoading: E, emit: r, buildMetadata: p, initPlugin: w, preloadRuntime: D, getDefaultTemplate: C, cloneTimersOnSave: k, hasTimerBlocks: T, noHeader: K, insertDynamicContent: F, closeDynamicContent: I, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: ae, Toaster: ie, FilterSelectionDrawer: ce, HeaderWrapper: de, LoadingWrapper: me, SaveAsTemplateDrawer: le, UnsubscribeWrapper: ue };
148
+ setLoading: g
149
+ }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: S, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: h, props: a, configStore: t, editorStore: c, previewStore: V, hasChanges: m, isTestPartner: $, isSaveValidationEnabled: z, saveSilent: b, setLoading: g, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: D, cloneTimersOnSave: C, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: v, startEditor: y, AutoSaveController: ie, Toaster: ce, FilterSelectionDrawer: de, HeaderWrapper: me, LoadingWrapper: le, SaveAsTemplateDrawer: ue, UnsubscribeWrapper: pe, ValidationErrorDrawer: fe };
150
150
  }
151
151
  });
152
152
  export {
153
- qe as default
153
+ Je as default
154
154
  };
@@ -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
  };
@@ -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 {