@useinsider/guido 3.20.1-beta.8dc88d5 → 3.20.1-beta.a9397b3

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 (71) hide show
  1. package/README.md +8 -0
  2. package/dist/@types/config/schemas.js +32 -31
  3. package/dist/components/Guido.vue.js +7 -7
  4. package/dist/components/Guido.vue2.js +84 -87
  5. package/dist/components/organisms/AutoSaveController.vue2.js +9 -19
  6. package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
  7. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
  8. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  9. package/dist/components/organisms/header/EditorActions.vue2.js +72 -57
  10. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  11. package/dist/components/organisms/header/HeaderWrapper.vue2.js +17 -9
  12. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  13. package/dist/components/organisms/header/LeftSlot.vue2.js +23 -28
  14. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  15. package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
  16. package/dist/components/organisms/header/RightSlot.vue.js +8 -9
  17. package/dist/components/organisms/header/RightSlot.vue2.js +18 -13
  18. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  19. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +38 -56
  20. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js +17 -0
  21. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue2.js +35 -0
  22. package/dist/composables/useCustomInterfaceAppearance.js +41 -42
  23. package/dist/composables/useModuleRepair.js +40 -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/config/migrator/index.js +12 -11
  27. package/dist/config/migrator/legacyUnsubscribeTextMigrator.js +16 -0
  28. package/dist/enums/academy.js +2 -1
  29. package/dist/guido.css +1 -1
  30. package/dist/sprite.svg +0 -10
  31. package/dist/src/@types/config/schemas.d.ts +4 -2
  32. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -19
  33. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +19 -1
  34. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +19 -1
  35. package/dist/src/composables/useActionsApi.d.ts +2 -2
  36. package/dist/src/composables/useConfig.d.ts +2 -2
  37. package/dist/src/composables/useModuleRepair.d.ts +2 -11
  38. package/dist/src/config/migrator/legacyUnsubscribeTextMigrator.d.ts +1 -0
  39. package/dist/src/enums/academy.d.ts +1 -0
  40. package/dist/src/stores/autosave.d.ts +1 -73
  41. package/dist/src/stores/config.d.ts +20 -20
  42. package/dist/src/stores/editor.d.ts +25 -109
  43. package/dist/src/stores/onboarding.d.ts +21 -952
  44. package/dist/src/stores/version-history.d.ts +1 -1
  45. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +9 -0
  46. package/dist/src/utils/timeUtil.d.ts +0 -5
  47. package/dist/static/styles/variables.css.js +0 -2
  48. package/dist/stores/autosave.js +7 -12
  49. package/dist/stores/editor.js +17 -19
  50. package/dist/stores/onboarding.js +21 -43
  51. package/dist/utils/legacyUnsubscribeConversion.js +86 -0
  52. package/dist/utils/timeUtil.js +17 -6
  53. package/package.json +1 -1
  54. package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
  55. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -25
  56. package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
  57. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -98
  58. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
  59. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
  60. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -22
  61. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
  62. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
  63. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -90
  64. package/dist/composables/useAccessibilityApi.js +0 -45
  65. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
  66. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
  67. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
  68. package/dist/src/composables/useAccessibilityApi.d.ts +0 -13
  69. package/dist/static/styles/components/accessibility.css.js +0 -234
  70. /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
  71. /package/dist/src/components/organisms/{header/EditorActionsMenu.vue.d.ts → unsubscribe/LegacyUnsubscribeConvertedModal.vue.d.ts} +0 -0
@@ -1,23 +1,23 @@
1
- import a from "./EditorActions.vue2.js";
1
+ import l from "./EditorActions.vue2.js";
2
2
  /* empty css */
3
- import r 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 && t.hasContentOnTheLeft ? e("div", { staticClass: "editor-actions__divider" }) : i._e(), (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, { 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(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", "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
- } } }), 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__ */ r(
13
- a,
14
- d,
12
+ }, c = [], p = /* @__PURE__ */ d(
15
13
  l,
14
+ u,
15
+ c,
16
16
  !1,
17
17
  null,
18
- "f36a9d0c"
18
+ "2cccbd44"
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,68 +1,83 @@
1
- import { defineComponent as F, computed as x, ref as A } from "vue";
2
- import { useActionsApi as H } from "../../../composables/useActionsApi.js";
3
- import { useConfig as O } from "../../../composables/useConfig.js";
4
- import { useTestEmailClick as R } from "../../../composables/useGuidoActions.js";
5
- import { useHtmlCompiler as B } from "../../../composables/useHtmlCompiler.js";
6
- import { useSave as z } from "../../../composables/useSave.js";
7
- import { useSaveValidation as D } from "../../../composables/useSaveValidation.js";
8
- import { useSaveValidationRollout as I } from "../../../composables/useSaveValidationRollout.js";
9
- import { useToaster as W } from "../../../composables/useToaster.js";
10
- import { useTranslations as j } from "../../../composables/useTranslations.js";
11
- import { useLiquidValidator as G } from "../../../composables/validators/useLiquidValidator.js";
12
- import { ToasterTypeOptions as J } from "../../../enums/toaster.js";
13
- import { useAutosaveStore as K } from "../../../stores/autosave.js";
14
- import { useConfigStore as N } from "../../../stores/config.js";
15
- import { useEditorStore as P } from "../../../stores/editor.js";
16
- import { useSaveValidationStore as Q } from "../../../stores/save-validation.js";
17
- import { useTemplateStore as U } from "../../../stores/template.js";
18
- import { getTooltipOptions as X } from "../../../utils/tooltipUtils.js";
19
- import { InButtonV2 as Y } from "@useinsider/design-system-vue";
20
- import { storeToRefs as Z } from "pinia";
21
- import $ from "./EditorActionsMenu.vue.js";
22
- import tt from "./MigrationConfirmModal.vue.js";
23
- const Vt = /* @__PURE__ */ F({
1
+ import { defineComponent as I, computed as c, ref as u } from "vue";
2
+ import { useActionsApi as P } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as W } from "../../../composables/useConfig.js";
4
+ import { useExport as j } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as G } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as J } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as K } from "../../../composables/useSave.js";
8
+ import { useSaveValidation as N } from "../../../composables/useSaveValidation.js";
9
+ import { useSaveValidationRollout as Q } from "../../../composables/useSaveValidationRollout.js";
10
+ import { useToaster as U } from "../../../composables/useToaster.js";
11
+ import { useTranslations as X } from "../../../composables/useTranslations.js";
12
+ import { useVersionHistoryApi as Y } from "../../../composables/useVersionHistoryApi.js";
13
+ import { useLiquidValidator as Z } from "../../../composables/validators/useLiquidValidator.js";
14
+ import { ToasterTypeOptions as $ } from "../../../enums/toaster.js";
15
+ import { useConfigStore as tt } from "../../../stores/config.js";
16
+ import { useEditorStore as ot } from "../../../stores/editor.js";
17
+ import { useSaveValidationStore as et } from "../../../stores/save-validation.js";
18
+ import { useTemplateStore as rt } from "../../../stores/template.js";
19
+ import { getTooltipOptions as it } from "../../../utils/tooltipUtils.js";
20
+ import { InButtonV2 as st } from "@useinsider/design-system-vue";
21
+ import { storeToRefs as at } from "pinia";
22
+ import nt from "./MigrationConfirmModal.vue.js";
23
+ const bt = /* @__PURE__ */ I({
24
24
  __name: "EditorActions",
25
- setup(ot, { expose: L }) {
26
- const { config: M, isFeatureEnabled: r } = O(), { save: u } = z(), { validateCurrentTemplate: c } = D(), { isEnabled: i } = I(), { showToaster: f, handleError: s } = W(), { getCompiledEmail: d } = H(), { compileHtml: p } = B(), { validateLiquidSyntax: v } = G(), S = N(), e = P(), g = Q(), h = U(), y = K(), { hasMigrations: T } = Z(h), b = x(() => r("liquidSyntax") || r("autosave") && y.hasStatusLabel), a = j(), k = x(() => i.value && S.allowSaveWithErrors ? a("email-editor.save-and-continue") : "Save"), n = A(!1), E = A(), l = R(), w = async (t) => {
27
- n.value = !0, t || (e.loadingStatus = !0);
28
- let o;
25
+ setup(lt, { expose: k }) {
26
+ const { config: p, isFeatureEnabled: f } = W(), { exportHtml: d } = j(), { save: v } = K(), { validateCurrentTemplate: y } = N(), { isEnabled: i } = Q(), { showToaster: S, handleError: s } = U(), { openVersionHistory: g, closeVersionHistory: h } = Y(), { getCompiledEmail: T } = P(), { compileHtml: w } = J(), { validateLiquidSyntax: E } = Z(), V = tt(), o = ot(), H = et(), x = rt(), { hasMigrations: C } = at(x), r = X(), F = c(() => i.value && V.allowSaveWithErrors ? r("email-editor.save-and-continue") : "Save"), a = u(!1), n = u(!1), _ = u(), l = G(), q = () => {
27
+ if (o.isVersionHistoryOpen) {
28
+ h();
29
+ return;
30
+ }
31
+ g();
32
+ }, B = async () => {
33
+ a.value = !0, await d(), a.value = !1;
34
+ }, L = () => {
35
+ o.isSaveAsTemplateDrawerOpen = !0;
36
+ }, R = c(() => o.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), D = c(
37
+ () => {
38
+ var t, e;
39
+ return ((e = (t = p.value) == null ? void 0 : t.features) == null ? void 0 : e.versionHistory) && !o.isPreviewModeOpen;
40
+ }
41
+ ), A = async (t) => {
42
+ n.value = !0, t || (o.loadingStatus = !0);
43
+ let e;
29
44
  try {
30
- o = await u(t);
31
- } catch (_) {
32
- s(_, "Failed to save template");
45
+ e = await v(t);
46
+ } catch (b) {
47
+ s(b, "Failed to save template");
33
48
  } finally {
34
- n.value = !1, !t && !o && (e.loadingStatus = !1);
49
+ n.value = !1, !t && !e && (o.loadingStatus = !1);
35
50
  }
36
- return o;
37
- }, C = (t) => {
38
- var o;
39
- if (!t && T.value) {
40
- (o = E.value) == null || o.open();
51
+ return e;
52
+ }, O = (t) => {
53
+ var e;
54
+ if (!t && C.value) {
55
+ (e = _.value) == null || e.open();
41
56
  return;
42
57
  }
43
- return w(t);
58
+ return A(t);
44
59
  }, m = async () => {
45
- e.loadingStatus = !0;
60
+ o.loadingStatus = !0;
46
61
  try {
47
- return await c();
62
+ return await y();
48
63
  } catch (t) {
49
64
  return console.warn("Test-path validation failed; sending without the drawer.", t), [];
50
65
  } finally {
51
- e.loadingStatus = !1;
66
+ o.loadingStatus = !1;
52
67
  }
53
- }, V = async () => {
68
+ }, M = async () => {
54
69
  const t = await m();
55
- t.length && g.open(t, "test");
56
- }, q = async () => {
70
+ t.length && H.open(t, "test");
71
+ }, z = async () => {
57
72
  if (i.value) {
58
73
  if ((await m()).length) {
59
- f({
60
- type: J.Error,
61
- message: a("email-editor.validation-errors-found"),
74
+ S({
75
+ type: $.Error,
76
+ message: r("email-editor.validation-errors-found"),
62
77
  actionButton: {
63
- text: a("email-editor.check-errors"),
78
+ text: r("email-editor.check-errors"),
64
79
  onClick: () => {
65
- V();
80
+ M();
66
81
  }
67
82
  },
68
83
  autoHide: !1
@@ -72,26 +87,26 @@ const Vt = /* @__PURE__ */ F({
72
87
  l();
73
88
  return;
74
89
  }
75
- if (r("liquidSyntax")) {
76
- e.loadingStatus = !0;
90
+ if (f("liquidSyntax")) {
91
+ o.loadingStatus = !0;
77
92
  try {
78
- const { html: t } = await d({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = p(t);
79
- if (!await v(o))
93
+ const { html: t } = await T({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: e } = w(t);
94
+ if (!await E(e))
80
95
  return;
81
96
  } catch (t) {
82
97
  s(t, "Failed to prepare test email");
83
98
  return;
84
99
  } finally {
85
- e.loadingStatus = !1;
100
+ o.loadingStatus = !1;
86
101
  }
87
102
  }
88
103
  l();
89
104
  };
90
- return L({
91
- handleSave: C
92
- }), { __sfc: !0, config: M, isFeatureEnabled: r, save: u, validateCurrentTemplate: c, isEnabled: i, showToaster: f, handleError: s, getCompiledEmail: d, compileHtml: p, validateLiquidSyntax: v, configStore: S, editorStore: e, saveValidationStore: g, templateStore: h, autosaveStore: y, hasMigrations: T, hasContentOnTheLeft: b, trans: a, saveLabel: k, isSaving: n, migrationModalRef: E, testEmailClick: l, executeSave: w, handleSave: C, collectTestErrors: m, openTestErrors: V, handleTestEmail: q, getTooltipOptions: X, InButtonV2: Y, EditorActionsMenu: $, MigrationConfirmModal: tt };
105
+ return k({
106
+ handleSave: O
107
+ }), { __sfc: !0, config: p, isFeatureEnabled: f, exportHtml: d, save: v, validateCurrentTemplate: y, isEnabled: i, showToaster: S, handleError: s, openVersionHistory: g, closeVersionHistory: h, getCompiledEmail: T, compileHtml: w, validateLiquidSyntax: E, configStore: V, editorStore: o, saveValidationStore: H, templateStore: x, hasMigrations: C, trans: r, saveLabel: F, isExporting: a, isSaving: n, migrationModalRef: _, testEmailClick: l, handleVersionHistory: q, handleExport: B, handleSaveAs: L, versionHistoryTooltipText: R, isVersionHistoryButtonVisible: D, executeSave: A, handleSave: O, collectTestErrors: m, openTestErrors: M, handleTestEmail: z, getTooltipOptions: it, InButtonV2: st, MigrationConfirmModal: nt };
93
108
  }
94
109
  });
95
110
  export {
96
- Vt as default
111
+ bt as default
97
112
  };
@@ -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
  };
@@ -10,7 +10,7 @@ var a = function() {
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "9d988e4b"
13
+ "b8f24f34"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,45 +1,40 @@
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 m, 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 w } from "../../../node_modules/@vueuse/shared/index.js";
11
- const F = /* @__PURE__ */ p({
7
+ import { useEditorStore as y } from "../../../stores/editor.js";
8
+ import { InButtonV2 as w } from "@useinsider/design-system-vue";
9
+ import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
10
+ const D = /* @__PURE__ */ m({
12
11
  __name: "LeftSlot",
13
- setup(M) {
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 = y(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), l = p(() => {
14
+ var u, f;
15
+ return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (f = (u = t.value) == null ? void 0 : u.ui) != null && f.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
16
+ }), r = d(!1), a = () => {
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 = w(async () => {
25
+ i();
26
+ }, c = V(async () => {
32
27
  try {
33
28
  await a();
34
29
  } finally {
35
- i.value = !1;
30
+ r.value = !1;
36
31
  }
37
32
  }, 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 };
33
+ return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: l, isBackButtonDisabled: r, executeBackAction: a, debouncedBackAction: c, handleBackClick: () => {
34
+ r.value = !0, c();
35
+ }, InButtonV2: w };
41
36
  }
42
37
  });
43
38
  export {
44
- F as default
39
+ D as default
45
40
  };
@@ -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
  };
@@ -1,68 +1,50 @@
1
- import { defineComponent as y, computed as r, onMounted as S, watch as e, ref as h } from "vue";
2
- import w from "./AMPOnboarding.vue.js";
3
- import T from "./EditorTabBarOnboarding.vue.js";
4
- import P from "./GenericOnboarding.vue.js";
5
- import B from "./ItemsOnboarding.vue.js";
6
- import A from "./NewVersionPopup.vue.js";
7
- import M from "./RecommendationLegacyStrategyOnboarding.vue.js";
8
- import _ from "./RecommendationStrategyOnboarding.vue.js";
9
- import H from "./TextBlockOnboarding.vue.js";
10
- import F from "./VersionHistoryOnboarding.vue.js";
11
- import { useConfig as V } from "../../../composables/useConfig.js";
12
- import { usePartner as C } from "../../../composables/usePartner.js";
13
- import { useEditorStore as x } from "../../../stores/editor.js";
14
- import { useOnboardingStore as E } from "../../../stores/onboarding.js";
15
- import { usePreviewStore as N } from "../../../stores/preview.js";
16
- const Z = /* @__PURE__ */ y({
1
+ import { defineComponent as f, computed as e, onMounted as O, watch as t } from "vue";
2
+ import y from "./AMPOnboarding.vue.js";
3
+ import u from "./GenericOnboarding.vue.js";
4
+ import v from "./ItemsOnboarding.vue.js";
5
+ import S from "./NewVersionPopup.vue.js";
6
+ import l from "./RecommendationLegacyStrategyOnboarding.vue.js";
7
+ import h from "./RecommendationStrategyOnboarding.vue.js";
8
+ import w from "./TextBlockOnboarding.vue.js";
9
+ import P from "./VersionHistoryOnboarding.vue.js";
10
+ import { usePartner as _ } from "../../../composables/usePartner.js";
11
+ import { useEditorStore as A } from "../../../stores/editor.js";
12
+ import { useOnboardingStore as H } from "../../../stores/onboarding.js";
13
+ import { usePreviewStore as M } from "../../../stores/preview.js";
14
+ const U = /* @__PURE__ */ f({
17
15
  __name: "OnboardingWrapper",
18
16
  emits: ["onboarding-finished"],
19
- setup(R, { emit: p }) {
20
- const o = E(), i = x(), c = N(), { isTestPartner: b } = C(), { isFeatureEnabled: g } = V(), a = r(() => i.isStripoInitialized), s = r(() => b()), O = [
21
- { type: "newVersionPopup", component: A },
22
- { type: "genericOnboarding", component: P },
23
- { type: "textBlockOnboarding", component: H },
24
- { type: "versionHistoryOnboarding", component: F },
25
- { type: "ampOnboarding", component: w },
26
- { type: "itemsOnboarding", component: B },
27
- { type: "editorTabBarOnboarding", component: T },
28
- { type: "recommendationStrategyOnboarding", component: _ },
29
- { type: "recommendationLegacyStrategyOnboarding", component: M }
30
- ], f = (n) => s.value || !a.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), l = r(() => O.filter((n) => f(n.type)));
31
- S(async () => {
17
+ setup(x, { emit: g }) {
18
+ const o = H(), r = A(), a = M(), { isTestPartner: s } = _(), m = e(() => r.isStripoInitialized), p = e(() => s()), d = [
19
+ { type: "newVersionPopup", component: S },
20
+ { type: "genericOnboarding", component: u },
21
+ { type: "textBlockOnboarding", component: w },
22
+ { type: "versionHistoryOnboarding", component: P },
23
+ { type: "ampOnboarding", component: y },
24
+ { type: "itemsOnboarding", component: v },
25
+ { type: "recommendationStrategyOnboarding", component: h },
26
+ { type: "recommendationLegacyStrategyOnboarding", component: l }
27
+ ], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), b = e(() => d.filter((n) => c(n.type)));
28
+ return O(async () => {
32
29
  await o.fetchUserModalState();
33
- }), e(
34
- () => i.isVersionHistoryOpen,
35
- (n, t) => {
36
- n && !t && (o.isActive("editorTabBarOnboarding") && o.closeForSession("editorTabBarOnboarding"), o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding")), !n && t && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
30
+ }), t(
31
+ () => r.isVersionHistoryOpen,
32
+ (n, i) => {
33
+ n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
37
34
  }
38
- ), e(
39
- () => c.emailFormat,
40
- (n, t) => {
41
- t !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
35
+ ), t(
36
+ () => a.emailFormat,
37
+ (n, i) => {
38
+ i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
42
39
  }
43
- ), e(
44
- () => i.isPreviewModeOpen,
40
+ ), t(
41
+ () => r.isPreviewModeOpen,
45
42
  (n) => {
46
43
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
47
44
  }
48
- );
49
- const d = h(!1), v = (n) => {
50
- n === "newVersionPopup" && (d.value = !0), p("onboarding-finished");
51
- }, m = r(() => i.isNormalMode && !i.isPreviewModeOpen), u = r(() => a.value && o.isFetched && g("accessibilityTesting") && !s.value && m.value && !(o.shouldShowOnboarding("newVersionPopup") && !d.value) && !o.isOnboardingActive() && !o.closedThisSession.includes("editorTabBarOnboarding") && o.shouldShowOnboarding("editorTabBarOnboarding"));
52
- return e(
53
- u,
54
- (n) => {
55
- n && o.start("editorTabBarOnboarding");
56
- },
57
- { immediate: !0 }
58
- ), e(
59
- m,
60
- (n) => {
61
- !n && o.isActive("editorTabBarOnboarding") && o.closeForSession("editorTabBarOnboarding");
62
- }
63
- ), { __sfc: !0, emit: p, onboardingStore: o, editorStore: i, previewStore: c, isTestPartner: b, isFeatureEnabled: g, isStripoReady: a, isTestPartnerActive: s, onboardingConfigs: O, shouldShow: f, visibleOnboardings: l, isNewVersionPopupClosed: d, handleFinished: v, isTourAnchored: m, canStartTabBarTour: u };
45
+ ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
64
46
  }
65
47
  });
66
48
  export {
67
- Z as default
49
+ U as default
68
50
  };