@useinsider/guido 3.18.2-beta.9be830c → 3.18.2-beta.a904ffc

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/dist/@types/config/schemas.js +13 -15
  2. package/dist/components/Guido.vue.js +7 -7
  3. package/dist/components/Guido.vue2.js +2 -2
  4. package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
  5. package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
  6. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
  7. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  8. package/dist/components/organisms/header/EditorActions.vue2.js +52 -36
  9. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  10. package/dist/components/organisms/header/HeaderWrapper.vue2.js +17 -9
  11. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  12. package/dist/components/organisms/header/LeftSlot.vue2.js +23 -28
  13. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  14. package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
  15. package/dist/components/organisms/header/RightSlot.vue.js +8 -9
  16. package/dist/components/organisms/header/RightSlot.vue2.js +18 -13
  17. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  18. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +36 -54
  19. package/dist/composables/useCustomInterfaceAppearance.js +28 -31
  20. package/dist/config/i18n/en/labels.json.js +4 -36
  21. package/dist/config/i18n/en/tooltips.json.js +1 -2
  22. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +4 -4
  23. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +6 -3
  24. package/dist/guido.css +1 -1
  25. package/dist/node_modules/@vueuse/shared/index.js +28 -40
  26. package/dist/sprite.svg +0 -6
  27. package/dist/src/@types/config/schemas.d.ts +0 -4
  28. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -3
  29. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
  30. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
  31. package/dist/src/composables/useActionsApi.d.ts +2 -2
  32. package/dist/src/composables/useConfig.d.ts +0 -2
  33. package/dist/src/stores/config.d.ts +0 -18
  34. package/dist/src/stores/editor.d.ts +0 -107
  35. package/dist/src/stores/onboarding.d.ts +1 -552
  36. package/dist/src/stores/version-history.d.ts +1 -1
  37. package/dist/src/utils/timeUtil.d.ts +0 -10
  38. package/dist/static/styles/variables.css.js +0 -2
  39. package/dist/stores/editor.js +4 -13
  40. package/dist/stores/onboarding.js +18 -39
  41. package/dist/utils/timeUtil.js +17 -7
  42. package/package.json +5 -5
  43. package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
  44. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -27
  45. package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
  46. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -48
  47. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
  48. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
  49. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -24
  50. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
  51. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
  52. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -82
  53. package/dist/composables/useAccessibilityApi.js +0 -35
  54. package/dist/node_modules/@vueuse/core/index.js +0 -102
  55. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +0 -2
  56. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
  57. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
  58. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
  59. package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
  60. package/dist/static/styles/components/accessibility.css.js +0 -282
  61. /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { ModuleFolderDefaults as S } 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 h, 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 y, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
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";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -68,22 +68,22 @@ const p = {
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), f = I(() => g({
71
+ }), S = I(() => g({
72
72
  text: e(t()),
73
73
  // eslint-disable-next-line camelcase -- backend field name
74
74
  tag_text: e(t()),
75
75
  value: e(t()),
76
- children: e(c(f)),
76
+ children: e(c(S)),
77
77
  // eslint-disable-next-line camelcase -- backend field name
78
- select_items: e(c(f))
78
+ select_items: e(c(S))
79
79
  })), N = k(
80
80
  t(),
81
- R(c(f), [])
81
+ R(c(S), [])
82
82
  ), P = g({
83
83
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
84
84
  id: e(n()),
85
85
  /** Decimal places for price display (legacy data may use string or number) */
86
- decimalCount: e(y([t(), n()])),
86
+ decimalCount: e(h([t(), n()])),
87
87
  /** Pinned product IDs (empty array when filter-driven) */
88
88
  productIds: e(c(r())),
89
89
  /** Whether the block requested live products at send time */
@@ -117,7 +117,7 @@ const p = {
117
117
  /** Block type marker used by some legacy variants */
118
118
  blockType: e(t()),
119
119
  /** Size variant marker (legacy data may use string or number) */
120
- size: e(y([t(), n()])),
120
+ size: e(h([t(), n()])),
121
121
  /** Vertical responsiveness flag (legacy size=1 variants) */
122
122
  verticalResponsiveness: e(o()),
123
123
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
@@ -189,9 +189,9 @@ const p = {
189
189
  /** Email header settings */
190
190
  emailHeader: e(D, { senderName: "", subject: "" }),
191
191
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
192
- savedModulesFolderName: e(t(), S.SAVED_MODULES),
192
+ savedModulesFolderName: e(t(), f.SAVED_MODULES),
193
193
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
194
- defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
194
+ defaultModulesFolderName: e(t(), f.DEFAULT_MODULES)
195
195
  }), F = a({
196
196
  /** Whether to show the header bar */
197
197
  showHeader: e(o(), !0),
@@ -216,8 +216,6 @@ const p = {
216
216
  liquidSyntax: e(o(), !1),
217
217
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
218
218
  autosave: e(o(), !1),
219
- /** Enable the Stripo Accessibility Checker control in the editor toolbar. */
220
- accessibilityTesting: e(o(), !1),
221
219
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
222
220
  allowlistEnabled: e(o(), !1),
223
221
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
@@ -290,7 +288,7 @@ const p = {
290
288
  ...d.entries,
291
289
  type: u("custom"),
292
290
  /** Custom processor function */
293
- processor: h(
291
+ processor: y(
294
292
  (s) => typeof s == "function",
295
293
  "processor must be a function"
296
294
  )
@@ -310,7 +308,7 @@ const p = {
310
308
  * Return false to cancel the save operation.
311
309
  */
312
310
  externalValidation: e(
313
- h(
311
+ y(
314
312
  (s) => typeof s == "function",
315
313
  "externalValidation must be a function"
316
314
  )
@@ -346,7 +344,7 @@ export {
346
344
  G as CustomRuleSchema,
347
345
  B as DefaultBlockTypeSchema,
348
346
  N as DynamicContentListSchema,
349
- f as DynamicContentNodeSchema,
347
+ S as DynamicContentNodeSchema,
350
348
  E as DynamicContentSchema,
351
349
  O as EditorSchema,
352
350
  D as EmailHeaderSchema,
@@ -1,20 +1,20 @@
1
- import a from "./Guido.vue2.js";
1
+ import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
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), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), 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.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : o._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : o._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
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(_) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
9
  }, s = [], n = /* @__PURE__ */ i(
10
- a,
10
+ o,
11
11
  t,
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "b9259e0d"
15
+ "050dfa52"
16
16
  );
17
- const c = n.exports;
17
+ const f = n.exports;
18
18
  export {
19
- c as default
19
+ f as default
20
20
  };
@@ -45,7 +45,7 @@ const et = /* @__PURE__ */ ne({
45
45
  a.ready && o.init(a.config);
46
46
  const c = H(), Q = De(), m = u(() => c.hasChanges), { isTestPartner: X } = me(), w = () => {
47
47
  var t;
48
- return (t = h.value) == null ? void 0 : t.saveSilent();
48
+ return (t = h.value) == null ? void 0 : t.handleSave(!0);
49
49
  }, C = (t) => {
50
50
  c.loadingStatus = t;
51
51
  };
@@ -154,7 +154,7 @@ const et = /* @__PURE__ */ ne({
154
154
  hasChanges: m,
155
155
  saveSilent: w,
156
156
  setLoading: C
157
- }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, autoSaveControllerRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore: Q, hasChanges: m, isTestPartner: X, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: k, runExclusive: T, beginMount: F, isCurrentMount: I, mountGeneration: g, getDefaultTemplate: M, cloneTimersOnSave: R, hasTimerBlocks: L, noHeader: Y, isRrsEnabled: Z, hasAssignedStrategy: ee, insertDynamicContent: B, closeDynamicContent: A, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: fe, Toaster: ye, FilterSelectionDrawer: ge, HeaderWrapper: ve, LoadingWrapper: Se, SaveAsTemplateDrawer: be, UnsubscribeWrapper: he };
157
+ }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore: Q, hasChanges: m, isTestPartner: X, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: k, runExclusive: T, beginMount: F, isCurrentMount: I, mountGeneration: g, getDefaultTemplate: M, cloneTimersOnSave: R, hasTimerBlocks: L, noHeader: Y, isRrsEnabled: Z, hasAssignedStrategy: ee, insertDynamicContent: B, closeDynamicContent: A, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: fe, Toaster: ye, FilterSelectionDrawer: ge, HeaderWrapper: ve, LoadingWrapper: Se, SaveAsTemplateDrawer: be, UnsubscribeWrapper: he };
158
158
  }
159
159
  });
160
160
  export {
@@ -1,15 +1,13 @@
1
- import { defineComponent as r } from "vue";
2
- import { useAutoSave as s } from "../../composables/useAutoSave.js";
3
- import { useSave as a } from "../../composables/useSave.js";
4
- const p = /* @__PURE__ */ r({
1
+ import { defineComponent as t } from "vue";
2
+ import { useAutoSave as r } from "../../composables/useAutoSave.js";
3
+ import { useSave as s } from "../../composables/useSave.js";
4
+ const f = /* @__PURE__ */ t({
5
5
  __name: "AutoSaveController",
6
- setup(n, { expose: t }) {
7
- const { save: e } = a(), o = () => e(!1, !0);
8
- return s(o), t({
9
- saveSilent: () => e(!0)
10
- }), { __sfc: !0, save: e, backgroundSave: o };
6
+ setup(a) {
7
+ const { save: e } = s(), o = () => e(!1, !0);
8
+ return r(o), { __sfc: !0, save: e, backgroundSave: o };
11
9
  }
12
10
  });
13
11
  export {
14
- p as default
12
+ f as default
15
13
  };
@@ -0,0 +1,22 @@
1
+ import o from "./AutoSaveToggle.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
+ var e = this, a = e._self._c, t = e._self._setupProxy;
6
+ return t.isFeatureEnabled("autosave") ? a("div", { staticClass: "d-f a-i-c mr-3 auto-save-toggle", on: { mouseenter: function(s) {
7
+ t.isHovered = !0;
8
+ }, mouseleave: function(s) {
9
+ t.isHovered = !1;
10
+ } } }, [a(t.InToggle, { attrs: { id: "guido__autosave-toggle", name: "guido-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggle } }), a("span", { staticClass: "ml-2 auto-save-toggle__label t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.auto-save")) + " ")]), t.autosaveStore.status === t.AUTOSAVE_STATUS.SAVING ? a("span", { staticClass: "ml-2 d-f a-i-c f-s-1" }, [a(t.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), a("span", { staticClass: "ml-1 t-c-53" }, [e._v(" " + e._s(t.trans("newsletter.saving")) + " ")])], 1) : t.lastSavedLabel ? a("span", { staticClass: "ml-2 f-s-1 t-c-53" }, [e._v(" " + e._s(t.lastSavedLabel) + " ")]) : e._e(), t.isHovered ? a(t.InInfoBox, { staticClass: "auto-save-toggle__info-box", attrs: { id: "guido__autosave-info-box", size: "small", variant: "information", "description-text": t.trans("email-editor.auto-save-description"), "title-text": t.trans("email-editor.auto-save-title") } }) : e._e()], 1) : e._e();
11
+ }, l = [], r = /* @__PURE__ */ i(
12
+ o,
13
+ n,
14
+ l,
15
+ !1,
16
+ null,
17
+ "2c964af4"
18
+ );
19
+ const d = r.exports;
20
+ export {
21
+ d as default
22
+ };
@@ -0,0 +1,19 @@
1
+ import { defineComponent as i, ref as f, computed as u } from "vue";
2
+ import { useConfig as l } from "../../../composables/useConfig.js";
3
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
4
+ import { useAutosaveStore as c, AUTOSAVE_STATUS as t } from "../../../stores/autosave.js";
5
+ import { useEditorStore as S } from "../../../stores/editor.js";
6
+ import { formatLocalTime as d } from "../../../utils/timeUtil.js";
7
+ import { InToggle as g, InLoading as _, InInfoBox as A } from "@useinsider/design-system-vue";
8
+ const U = /* @__PURE__ */ i({
9
+ __name: "AutoSaveToggle",
10
+ setup(v) {
11
+ const { isFeatureEnabled: e } = l(), r = S(), o = c(), s = p(), n = f(!1), a = u(() => o.status !== t.SAVED || !o.lastSavedAt ? "" : d(o.lastSavedAt));
12
+ return { __sfc: !0, isFeatureEnabled: e, editorStore: r, autosaveStore: o, trans: s, isHovered: n, lastSavedLabel: a, toggle: (m) => {
13
+ o.isOn = m;
14
+ }, AUTOSAVE_STATUS: t, InInfoBox: A, InLoading: _, InToggle: g };
15
+ }
16
+ });
17
+ export {
18
+ U as default
19
+ };
@@ -1,23 +1,23 @@
1
- import r from "./EditorActions.vue2.js";
1
+ import l from "./EditorActions.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var d = function() {
5
- var o, s;
6
- var i = this, e = i._self._c, t = i._self._setupProxy;
7
- return e("div", { staticClass: "d-f a-i-c editor-actions" }, [t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), (s = (o = t.config) == null ? void 0 : o.features) != null && s.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 } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(n) {
3
+ import d from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var u = function() {
5
+ var s, i, n, a;
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) {
8
8
  return t.handleSave(!1);
9
- } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
9
+ } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
10
10
  return t.executeSave(!1);
11
11
  } } })], 1);
12
- }, l = [], c = /* @__PURE__ */ a(
13
- r,
14
- d,
12
+ }, p = [], c = /* @__PURE__ */ d(
15
13
  l,
14
+ u,
15
+ p,
16
16
  !1,
17
17
  null,
18
- "29f710cf"
18
+ "1ca6baf0"
19
19
  );
20
- const p = c.exports;
20
+ const v = c.exports;
21
21
  export {
22
- p as default
22
+ v as default
23
23
  };
@@ -1,48 +1,64 @@
1
- import { defineComponent as C, ref as S } from "vue";
2
- import { useActionsApi as T } from "../../../composables/useActionsApi.js";
3
- import { useConfig as M } from "../../../composables/useConfig.js";
4
- import { useTestEmailClick as w } from "../../../composables/useGuidoActions.js";
5
- import { useHtmlCompiler as x } from "../../../composables/useHtmlCompiler.js";
6
- import { useSave as A } from "../../../composables/useSave.js";
7
- import { useToaster as F } from "../../../composables/useToaster.js";
8
- import { useTranslations as V } from "../../../composables/useTranslations.js";
9
- import { useLiquidValidator as q } from "../../../composables/validators/useLiquidValidator.js";
10
- import { useEditorStore as H } from "../../../stores/editor.js";
11
- import { useTemplateStore as k } from "../../../stores/template.js";
12
- import { getTooltipOptions as L } from "../../../utils/tooltipUtils.js";
13
- import { InButtonV2 as R } from "@useinsider/design-system-vue";
14
- import { storeToRefs as b } from "pinia";
15
- import z from "./EditorActionsMenu.vue.js";
16
- import B from "./MigrationConfirmModal.vue.js";
17
- const ot = /* @__PURE__ */ C({
1
+ import { defineComponent as q, ref as l, computed as w } from "vue";
2
+ import { useActionsApi as b } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as k } from "../../../composables/useConfig.js";
4
+ import { useExport as B } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as D } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as L } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as R } from "../../../composables/useSave.js";
8
+ import { useToaster as z } from "../../../composables/useToaster.js";
9
+ import { useTranslations as I } from "../../../composables/useTranslations.js";
10
+ import { useVersionHistoryApi as P } from "../../../composables/useVersionHistoryApi.js";
11
+ import { useLiquidValidator as j } from "../../../composables/validators/useLiquidValidator.js";
12
+ import { useEditorStore as G } from "../../../stores/editor.js";
13
+ import { useTemplateStore as J } from "../../../stores/template.js";
14
+ import { getTooltipOptions as K } from "../../../utils/tooltipUtils.js";
15
+ import { InButtonV2 as N } from "@useinsider/design-system-vue";
16
+ import { storeToRefs as Q } from "pinia";
17
+ import U from "./MigrationConfirmModal.vue.js";
18
+ const ft = /* @__PURE__ */ q({
18
19
  __name: "EditorActions",
19
- setup(D, { expose: E }) {
20
- const { config: h, isFeatureEnabled: s } = M(), { save: n } = A(), { getCompiledEmail: m } = T(), { compileHtml: l } = x(), { validateLiquidSyntax: f } = q(), { handleError: r } = F(), e = H(), u = k(), { hasMigrations: c } = b(u), y = V(), a = S(!1), p = S(), d = w(), g = async (t) => {
20
+ setup(W, { expose: x }) {
21
+ const { config: m, isFeatureEnabled: c } = k(), { exportHtml: p } = B(), { save: u } = R(), { openVersionHistory: f, closeVersionHistory: d } = P(), { getCompiledEmail: v } = b(), { compileHtml: y } = L(), { validateLiquidSyntax: g } = j(), { handleError: r } = z(), e = G(), h = J(), { hasMigrations: H } = Q(h), s = I(), i = l(!1), a = l(!1), S = l(), V = D(), _ = () => {
22
+ if (e.isVersionHistoryOpen) {
23
+ d();
24
+ return;
25
+ }
26
+ f();
27
+ }, C = async () => {
28
+ i.value = !0, await p(), i.value = !1;
29
+ }, A = () => {
30
+ e.isSaveAsTemplateDrawerOpen = !0;
31
+ }, M = w(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = w(
32
+ () => {
33
+ var t, o;
34
+ return ((o = (t = m.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
35
+ }
36
+ ), E = async (t) => {
21
37
  a.value = !0, t || (e.loadingStatus = !0);
22
38
  let o;
23
39
  try {
24
- o = await n(t);
25
- } catch (i) {
40
+ o = await u(t);
41
+ } catch (n) {
26
42
  if (t)
27
- throw i;
28
- r(i, "Failed to save template");
43
+ throw n;
44
+ r(n, "Failed to save template");
29
45
  } finally {
30
46
  a.value = !1, !t && !o && (e.loadingStatus = !1);
31
47
  }
32
48
  return o;
33
- }, v = (t) => {
49
+ }, T = (t) => {
34
50
  var o;
35
- if (!t && c.value) {
36
- (o = p.value) == null || o.open();
51
+ if (!t && H.value) {
52
+ (o = S.value) == null || o.open();
37
53
  return;
38
54
  }
39
- return g(t);
40
- }, _ = async () => {
41
- if (s("liquidSyntax")) {
55
+ return E(t);
56
+ }, F = async () => {
57
+ if (c("liquidSyntax")) {
42
58
  e.loadingStatus = !0;
43
59
  try {
44
- const { html: t } = await m({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = l(t);
45
- if (!await f(o))
60
+ const { html: t } = await v({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = y(t);
61
+ if (!await g(o))
46
62
  return;
47
63
  } catch (t) {
48
64
  r(t, "Failed to prepare test email");
@@ -51,13 +67,13 @@ const ot = /* @__PURE__ */ C({
51
67
  e.loadingStatus = !1;
52
68
  }
53
69
  }
54
- d();
70
+ V();
55
71
  };
56
- return E({
57
- handleSave: v
58
- }), { __sfc: !0, config: h, isFeatureEnabled: s, save: n, getCompiledEmail: m, compileHtml: l, validateLiquidSyntax: f, handleError: r, editorStore: e, templateStore: u, hasMigrations: c, trans: y, isSaving: a, migrationModalRef: p, testEmailClick: d, executeSave: g, handleSave: v, handleTestEmail: _, getTooltipOptions: L, InButtonV2: R, EditorActionsMenu: z, MigrationConfirmModal: B };
72
+ return x({
73
+ handleSave: T
74
+ }), { __sfc: !0, config: m, isFeatureEnabled: c, exportHtml: p, save: u, openVersionHistory: f, closeVersionHistory: d, getCompiledEmail: v, compileHtml: y, validateLiquidSyntax: g, handleError: r, editorStore: e, templateStore: h, hasMigrations: H, trans: s, isExporting: i, isSaving: a, migrationModalRef: S, testEmailClick: V, handleVersionHistory: _, handleExport: C, handleSaveAs: A, versionHistoryTooltipText: M, isVersionHistoryButtonVisible: O, executeSave: E, handleSave: T, handleTestEmail: F, getTooltipOptions: K, InButtonV2: N, MigrationConfirmModal: U };
59
75
  }
60
76
  });
61
77
  export {
62
- ot as default
78
+ ft as default
63
79
  };
@@ -3,16 +3,16 @@ import o from "./HeaderWrapper.vue2.js";
3
3
  import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var s = function() {
5
5
  var t = this, r = t._self._c, e = t._self._setupProxy;
6
- return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
7
- }, n = [], d = /* @__PURE__ */ a(
6
+ return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
7
+ }, d = [], i = /* @__PURE__ */ a(
8
8
  o,
9
9
  s,
10
- n,
10
+ d,
11
11
  !1,
12
12
  null,
13
- "3c713746"
13
+ "d11dd577"
14
14
  );
15
- const f = d.exports;
15
+ const c = i.exports;
16
16
  export {
17
- f as default
17
+ c as default
18
18
  };
@@ -1,14 +1,22 @@
1
- import { defineComponent as o } from "vue";
2
- import { InContainer as r } from "@useinsider/design-system-vue";
3
- import t from "./LeftSlot.vue.js";
4
- import e from "./MiddleSlot.vue.js";
5
- import m from "./RightSlot.vue.js";
6
- const s = /* @__PURE__ */ o({
1
+ import { defineComponent as n, ref as m } from "vue";
2
+ import { InContainer as a } from "@useinsider/design-system-vue";
3
+ import f from "./LeftSlot.vue.js";
4
+ import p from "./MiddleSlot.vue.js";
5
+ import i from "./RightSlot.vue.js";
6
+ const c = /* @__PURE__ */ n({
7
7
  __name: "HeaderWrapper",
8
- setup(p) {
9
- return { __sfc: !0, InContainer: r, LeftSlot: t, MiddleSlot: e, RightSlot: m };
8
+ setup(l, { expose: r }) {
9
+ const e = m(null);
10
+ return r({
11
+ // Stryker disable next-line OptionalChaining: RightSlot is always rendered (no
12
+ // v-if), so rightSlotRef.value is never null and `?.` cannot short-circuit.
13
+ handleSave: (t) => {
14
+ var o;
15
+ return (o = e.value) == null ? void 0 : o.handleSave(t);
16
+ }
17
+ }), { __sfc: !0, rightSlotRef: e, InContainer: a, LeftSlot: f, MiddleSlot: p, RightSlot: i };
10
18
  }
11
19
  });
12
20
  export {
13
- s as default
21
+ c as default
14
22
  };
@@ -1,16 +1,16 @@
1
1
  import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
- import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var a = function() {
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
5
  var e = this, s = e._self._c, t = e._self._setupProxy;
6
6
  return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "ghost", type: "secondary", "disabled-status": t.isBackButtonDisabled, "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } })], 1);
7
- }, i = [], r = /* @__PURE__ */ n(
7
+ }, i = [], r = /* @__PURE__ */ a(
8
8
  o,
9
- a,
9
+ n,
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "2f127fb6"
13
+ "73199fa4"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,41 +1,36 @@
1
- import { defineComponent as p, computed as d, ref as b } from "vue";
2
- import { useAccessibilityApi as k } from "../../../composables/useAccessibilityApi.js";
3
- import { useConfig as B } from "../../../composables/useConfig.js";
4
- import { useBack as v } from "../../../composables/useGuidoActions.js";
5
- import { usePreviewMode as y } from "../../../composables/usePreviewMode.js";
6
- import { useTranslations as A } from "../../../composables/useTranslations.js";
1
+ import { defineComponent as l, computed as p, ref as d } from "vue";
2
+ import { useConfig as k } from "../../../composables/useConfig.js";
3
+ import { useBack as B } from "../../../composables/useGuidoActions.js";
4
+ import { usePreviewMode as b } from "../../../composables/usePreviewMode.js";
5
+ import { useTranslations as v } from "../../../composables/useTranslations.js";
7
6
  import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
8
- import { useEditorStore as g } from "../../../stores/editor.js";
9
- import { InButtonV2 as O } from "@useinsider/design-system-vue";
10
- import { useDebounceFn as M } from "../../../node_modules/@vueuse/shared/index.js";
11
- const F = /* @__PURE__ */ p({
7
+ import { useEditorStore as V } from "../../../stores/editor.js";
8
+ import { InButtonV2 as w } from "@useinsider/design-system-vue";
9
+ import { useDebounceFn as y } from "../../../node_modules/@vueuse/shared/index.js";
10
+ const D = /* @__PURE__ */ l({
12
11
  __name: "LeftSlot",
13
- setup(V) {
14
- const e = g(), s = v(), { closeVersionHistory: r } = _(), { closePreviewMode: n } = y(), { closeAccessibilityTestingMode: c } = k(), o = A(), { config: t } = B(), f = d(() => {
15
- var l, m;
16
- return e.isVersionHistoryOpen || e.isPreviewModeOpen || e.isAccessibilityTestingOpen ? o("email-editor.back-to-editor") : (m = (l = t.value) == null ? void 0 : l.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
17
- }), i = b(!1), a = () => {
12
+ setup(C) {
13
+ const e = V(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), f = p(() => {
14
+ var u, m;
15
+ return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (m = (u = t.value) == null ? void 0 : u.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
16
+ }), r = d(!1), c = () => {
18
17
  if (e.isVersionHistoryOpen) {
19
- r();
20
- return;
21
- }
22
- if (e.isPreviewModeOpen) {
23
18
  n();
24
19
  return;
25
20
  }
26
- if (e.isAccessibilityTestingOpen) {
27
- c();
21
+ if (e.isPreviewModeOpen) {
22
+ s();
28
23
  return;
29
24
  }
30
- s();
31
- }, u = M(() => {
32
- a(), i.value = !1;
25
+ i();
26
+ }, a = y(() => {
27
+ c(), r.value = !1;
33
28
  }, 500);
34
- return { __sfc: !0, editorStore: e, handleBack: s, closeVersionHistory: r, closePreviewMode: n, closeAccessibilityTestingMode: c, trans: o, config: t, backButtonLabel: f, isBackButtonDisabled: i, executeBackAction: a, debouncedBackAction: u, handleBackClick: () => {
35
- i.value = !0, u();
36
- }, InButtonV2: O };
29
+ return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: f, isBackButtonDisabled: r, executeBackAction: c, debouncedBackAction: a, handleBackClick: () => {
30
+ r.value = !0, a();
31
+ }, InButtonV2: w };
37
32
  }
38
33
  });
39
34
  export {
40
- F as default
35
+ D as default
41
36
  };
@@ -1,8 +1,8 @@
1
1
  import r from "./MiddleSlot.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var t = function() {
4
- var o = this, i = o._self._c, e = o._self._setupProxy;
5
- return i("div", { staticClass: "d-f a-i-c" }, [e.editorStore.isVersionHistoryOpen ? i("div", { staticClass: "d-f" }, [i(e.VersionHistory), i(e.VersionHistoryViewOptions)], 1) : e.editorStore.isPreviewModeOpen ? i("div", { staticClass: "d-f" }, [i(e.EmailSizeIndicator), i(e.AmpToggle)], 1) : e.editorStore.isAccessibilityTestingOpen ? i(e.AccessibilityToolbar) : o._e(), i(e.EditorToolbar, { directives: [{ name: "show", rawName: "v-show", value: e.editorStore.isEditorToolbarVisible, expression: "editorStore.isEditorToolbarVisible" }] })], 1);
4
+ var o = this, e = o._self._c, i = o._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [i.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(i.VersionHistory), e(i.VersionHistoryViewOptions)], 1) : i.editorStore.isPreviewModeOpen ? e("div", { staticClass: "d-f" }, [e(i.EmailSizeIndicator), e(i.AmpToggle)], 1) : o._e(), e(i.EditorToolbar, { directives: [{ name: "show", rawName: "v-show", value: i.editorStore.isEditorToolbarVisible, expression: "editorStore.isEditorToolbarVisible" }] })], 1);
6
6
  }, a = [], n = /* @__PURE__ */ s(
7
7
  r,
8
8
  t,
@@ -11,7 +11,7 @@ var t = function() {
11
11
  null,
12
12
  null
13
13
  );
14
- const _ = n.exports;
14
+ const c = n.exports;
15
15
  export {
16
- _ as default
16
+ c as default
17
17
  };
@@ -2,16 +2,15 @@ import { defineComponent as o } from "vue";
2
2
  import r from "../email-preview/amp/AmpToggle.vue.js";
3
3
  import t from "../email-preview/desktop-preview/EmailSizeIndicator.vue.js";
4
4
  import { useEditorStore as i } from "../../../stores/editor.js";
5
- import e from "./accessibility/AccessibilityToolbar.vue.js";
6
- import m from "./EditorToolbar.vue.js";
7
- import p from "./version-history/VersionHistory.vue.js";
8
- import s from "./version-history/ViewOptions.vue.js";
9
- const y = /* @__PURE__ */ o({
5
+ import e from "./EditorToolbar.vue.js";
6
+ import m from "./version-history/VersionHistory.vue.js";
7
+ import p from "./version-history/ViewOptions.vue.js";
8
+ const S = /* @__PURE__ */ o({
10
9
  __name: "MiddleSlot",
11
- setup(f) {
12
- return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, AccessibilityToolbar: e, EditorToolbar: m, VersionHistory: p, VersionHistoryViewOptions: s };
10
+ setup(s) {
11
+ return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, EditorToolbar: e, VersionHistory: m, VersionHistoryViewOptions: p };
13
12
  }
14
13
  });
15
14
  export {
16
- y as default
15
+ S as default
17
16
  };
@@ -1,18 +1,17 @@
1
- import i from "./RightSlot.vue2.js";
2
- /* empty css */
1
+ import s from "./RightSlot.vue2.js";
3
2
  import o from "../../../_virtual/_plugin-vue2_normalizer.js";
4
3
  var r = function() {
5
- var e = this, s = e._self._c, t = e._self._setupProxy;
6
- return s("div", { staticClass: "d-f a-i-c right-slot" }, [t.isNormalMode ? s(t.AutoSaveStatus) : e._e(), t.isLiquidEnabled && t.isNormalMode ? s(t.InChips, { attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : e._e(), t.isNormalMode ? s(t.EditorActions) : t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton) : e._e()], 1);
7
- }, a = [], l = /* @__PURE__ */ o(
8
- i,
4
+ var i = this, e = i._self._c, t = i._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ? i._e() : e(t.AutoSaveToggle), t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-1", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : i._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
6
+ }, a = [], n = /* @__PURE__ */ o(
7
+ s,
9
8
  r,
10
9
  a,
11
10
  !1,
12
11
  null,
13
- "efc32e0d"
12
+ null
14
13
  );
15
- const c = l.exports;
14
+ const u = n.exports;
16
15
  export {
17
- c as default
16
+ u as default
18
17
  };