@useinsider/guido 3.19.0-beta.c604f7d → 3.19.0-beta.cac604e

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 (74) hide show
  1. package/dist/@types/config/schemas.js +104 -92
  2. package/dist/components/Guido.vue.js +8 -8
  3. package/dist/components/Guido.vue2.js +47 -54
  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 +51 -37
  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 -32
  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 +38 -56
  19. package/dist/composables/useActionsApi.js +52 -47
  20. package/dist/composables/useCodeEditorApi.js +23 -9
  21. package/dist/composables/useCustomInterfaceAppearance.js +41 -42
  22. package/dist/composables/useTranslations.js +3 -2
  23. package/dist/composables/useVersionHistoryApi.js +33 -24
  24. package/dist/config/i18n/en/labels.json.js +4 -36
  25. package/dist/config/i18n/en/tooltips.json.js +1 -2
  26. package/dist/extensions/Blocks/Recommendation/block.js +88 -53
  27. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +45 -38
  28. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -49
  29. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +42 -22
  30. package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +26 -0
  31. package/dist/guido.css +1 -1
  32. package/dist/sprite.svg +0 -6
  33. package/dist/src/@types/config/schemas.d.ts +16 -2
  34. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -3
  35. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
  36. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
  37. package/dist/src/composables/useActionsApi.d.ts +2 -2
  38. package/dist/src/composables/useConfig.d.ts +2 -2
  39. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +6 -0
  40. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +5 -0
  41. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  42. package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +27 -0
  43. package/dist/src/stores/config.d.ts +20 -20
  44. package/dist/src/stores/editor.d.ts +0 -109
  45. package/dist/src/stores/onboarding.d.ts +21 -952
  46. package/dist/src/stores/version-history.d.ts +1 -1
  47. package/dist/src/utils/stripoEditorApi.d.ts +4 -0
  48. package/dist/src/utils/timeUtil.d.ts +0 -5
  49. package/dist/static/styles/components/recommendation-strategy.css.js +9 -0
  50. package/dist/static/styles/variables.css.js +0 -2
  51. package/dist/stores/editor.js +4 -7
  52. package/dist/stores/onboarding.js +21 -43
  53. package/dist/stores/unsubscribe.js +3 -3
  54. package/dist/utils/stripoEditorApi.js +11 -0
  55. package/dist/utils/timeUtil.js +17 -6
  56. package/package.json +2 -1
  57. package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
  58. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -25
  59. package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
  60. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -98
  61. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
  62. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
  63. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -22
  64. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
  65. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
  66. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -90
  67. package/dist/composables/useAccessibilityApi.js +0 -35
  68. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +0 -2
  69. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
  70. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
  71. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
  72. package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
  73. package/dist/static/styles/components/accessibility.css.js +0 -234
  74. /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
@@ -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
+ }, c = [], p = /* @__PURE__ */ d(
15
13
  l,
14
+ u,
15
+ c,
16
16
  !1,
17
17
  null,
18
- "4036dff9"
18
+ "c61cc8ea"
19
19
  );
20
- const p = c.exports;
20
+ const v = p.exports;
21
21
  export {
22
- p as default
22
+ v as default
23
23
  };
@@ -1,48 +1,62 @@
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 n, computed as x } 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: w }) {
21
+ const { config: l, isFeatureEnabled: m } = k(), { exportHtml: c } = B(), { save: p } = R(), { openVersionHistory: u, closeVersionHistory: f } = P(), { getCompiledEmail: d } = b(), { compileHtml: v } = L(), { validateLiquidSyntax: y } = j(), { handleError: r } = z(), e = G(), g = J(), { hasMigrations: S } = Q(g), s = I(), i = n(!1), a = n(!1), H = n(), h = D(), _ = () => {
22
+ if (e.isVersionHistoryOpen) {
23
+ f();
24
+ return;
25
+ }
26
+ u();
27
+ }, C = async () => {
28
+ i.value = !0, await c(), i.value = !1;
29
+ }, A = () => {
30
+ e.isSaveAsTemplateDrawerOpen = !0;
31
+ }, M = x(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = x(
32
+ () => {
33
+ var t, o;
34
+ return ((o = (t = l.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
35
+ }
36
+ ), V = 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) {
26
- if (t)
27
- throw i;
28
- r(i, "Failed to save template");
40
+ o = await p(t);
41
+ } catch (T) {
42
+ r(T, "Failed to save template");
29
43
  } finally {
30
44
  a.value = !1, !t && !o && (e.loadingStatus = !1);
31
45
  }
32
46
  return o;
33
- }, v = (t) => {
47
+ }, E = (t) => {
34
48
  var o;
35
- if (!t && c.value) {
36
- (o = p.value) == null || o.open();
49
+ if (!t && S.value) {
50
+ (o = H.value) == null || o.open();
37
51
  return;
38
52
  }
39
- return g(t);
40
- }, _ = async () => {
41
- if (s("liquidSyntax")) {
53
+ return V(t);
54
+ }, F = async () => {
55
+ if (m("liquidSyntax")) {
42
56
  e.loadingStatus = !0;
43
57
  try {
44
- const { html: t } = await m({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = l(t);
45
- if (!await f(o))
58
+ const { html: t } = await d({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = v(t);
59
+ if (!await y(o))
46
60
  return;
47
61
  } catch (t) {
48
62
  r(t, "Failed to prepare test email");
@@ -51,13 +65,13 @@ const ot = /* @__PURE__ */ C({
51
65
  e.loadingStatus = !1;
52
66
  }
53
67
  }
54
- d();
68
+ h();
55
69
  };
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 };
70
+ return w({
71
+ handleSave: E
72
+ }), { __sfc: !0, config: l, isFeatureEnabled: m, exportHtml: c, save: p, openVersionHistory: u, closeVersionHistory: f, getCompiledEmail: d, compileHtml: v, validateLiquidSyntax: y, handleError: r, editorStore: e, templateStore: g, hasMigrations: S, trans: s, isExporting: i, isSaving: a, migrationModalRef: H, testEmailClick: h, handleVersionHistory: _, handleExport: C, handleSaveAs: A, versionHistoryTooltipText: M, isVersionHistoryButtonVisible: O, executeSave: V, handleSave: E, handleTestEmail: F, getTooltipOptions: K, InButtonV2: N, MigrationConfirmModal: U };
59
73
  }
60
74
  });
61
75
  export {
62
- ot as default
76
+ ft as default
63
77
  };
@@ -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
- "15610de9"
13
+ "73199fa4"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,45 +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 y } from "../../../composables/useGuidoActions.js";
5
- import { usePreviewMode as v } 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 = y(), { closeVersionHistory: r } = _(), { closePreviewMode: n } = v(), { closeAccessibilityTestingMode: c } = k(), o = A(), { config: t } = B(), m = d(() => {
15
- var l, f;
16
- return e.isVersionHistoryOpen || e.isPreviewModeOpen || e.isAccessibilityTestingOpen ? o("email-editor.back-to-editor") : (f = (l = t.value) == null ? void 0 : l.ui) != null && f.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
- try {
33
- a();
34
- } finally {
35
- i.value = !1;
36
- }
25
+ i();
26
+ }, a = y(() => {
27
+ c(), r.value = !1;
37
28
  }, 500);
38
- return { __sfc: !0, editorStore: e, handleBack: s, closeVersionHistory: r, closePreviewMode: n, closeAccessibilityTestingMode: c, trans: o, config: t, backButtonLabel: m, isBackButtonDisabled: i, executeBackAction: a, debouncedBackAction: u, handleBackClick: () => {
39
- i.value = !0, u();
40
- }, 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 };
41
32
  }
42
33
  });
43
34
  export {
44
- F as default
35
+ D as default
45
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
  };
@@ -1,18 +1,23 @@
1
- import { defineComponent as m, computed as r } from "vue";
2
- import { useConfig as n } from "../../../composables/useConfig.js";
3
- import { useTranslations as a } from "../../../composables/useTranslations.js";
4
- import { useEditorStore as p } from "../../../stores/editor.js";
5
- import { InChips as u } from "@useinsider/design-system-vue";
6
- import f from "./AutoSaveStatus.vue.js";
7
- import d from "./EditorActions.vue.js";
8
- import c from "./version-history/RestoreButton.vue.js";
9
- const x = /* @__PURE__ */ m({
1
+ import { defineComponent as a, ref as f, computed as p } from "vue";
2
+ import { useConfig as u } from "../../../composables/useConfig.js";
3
+ import { useTranslations as d } from "../../../composables/useTranslations.js";
4
+ import { useEditorStore as l } from "../../../stores/editor.js";
5
+ import { InChips as c } from "@useinsider/design-system-vue";
6
+ import _ from "./AutoSaveToggle.vue.js";
7
+ import S from "./EditorActions.vue.js";
8
+ import g from "./version-history/RestoreButton.vue.js";
9
+ const T = /* @__PURE__ */ a({
10
10
  __name: "RightSlot",
11
- setup(l) {
12
- const { isFeatureEnabled: o } = n(), i = a(), t = p(), e = r(() => o("liquidSyntax")), s = r(() => t.isNormalMode);
13
- return { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: t, isLiquidEnabled: e, isNormalMode: s, InChips: u, AutoSaveStatus: f, EditorActions: d, RestoreButton: c };
11
+ setup(h, { expose: r }) {
12
+ const { isFeatureEnabled: o } = u(), i = d(), n = l(), t = f(null), s = p(() => o("liquidSyntax"));
13
+ return r({
14
+ handleSave: (m) => {
15
+ var e;
16
+ return (e = t.value) == null ? void 0 : e.handleSave(m);
17
+ }
18
+ }), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
14
19
  }
15
20
  });
16
21
  export {
17
- x as default
22
+ T as default
18
23
  };
@@ -1,21 +1,21 @@
1
- import o from "./OnboardingWrapper.vue2.js";
2
- import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var _ = function() {
4
- var n = this, r = n._self._c, t = n._self._setupProxy;
5
- return r("div", n._l(t.visibleOnboardings, function(e) {
6
- return r(e.component, { key: e.type, tag: "component", on: { "onboarding-finished": function(l) {
7
- return t.handleFinished(e.type);
1
+ import t from "./OnboardingWrapper.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var s = function() {
4
+ var n = this, e = n._self._c, r = n._self._setupProxy;
5
+ return e("div", n._l(r.visibleOnboardings, function(o) {
6
+ return e(o.component, { key: o.type, tag: "component", on: { "onboarding-finished": function(p) {
7
+ return r.emit("onboarding-finished");
8
8
  } } });
9
9
  }), 1);
10
- }, i = [], a = /* @__PURE__ */ s(
11
- o,
10
+ }, _ = [], a = /* @__PURE__ */ i(
11
+ t,
12
+ s,
12
13
  _,
13
- i,
14
14
  !1,
15
15
  null,
16
16
  null
17
17
  );
18
- const f = a.exports;
18
+ const d = a.exports;
19
19
  export {
20
- f as default
20
+ d as default
21
21
  };