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

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 (64) hide show
  1. package/dist/@types/config/schemas.js +21 -20
  2. package/dist/components/Guido.vue.js +8 -8
  3. package/dist/components/Guido.vue2.js +72 -71
  4. package/dist/components/organisms/AutoSaveController.vue2.js +10 -8
  5. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  6. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
  7. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  8. package/dist/components/organisms/header/EditorActions.vue2.js +36 -52
  9. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  10. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
  11. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  12. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  13. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  14. package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
  15. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  16. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  17. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  18. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  19. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  20. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  21. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
  22. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  23. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  24. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
  25. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  26. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +56 -38
  27. package/dist/composables/useAccessibilityApi.js +35 -0
  28. package/dist/composables/useActionsApi.js +20 -24
  29. package/dist/composables/useCortexBlueprintBridge.js +54 -122
  30. package/dist/composables/useCustomInterfaceAppearance.js +42 -41
  31. package/dist/composables/useEmailTemplateApplier.js +52 -108
  32. package/dist/config/i18n/en/labels.json.js +36 -4
  33. package/dist/config/i18n/en/tooltips.json.js +2 -1
  34. package/dist/guido.css +1 -1
  35. package/dist/sprite.svg +6 -0
  36. package/dist/src/@types/config/schemas.d.ts +2 -0
  37. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
  38. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  40. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
  41. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  42. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  43. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  44. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  45. package/dist/src/composables/useActionsApi.d.ts +2 -2
  46. package/dist/src/composables/useConfig.d.ts +2 -0
  47. package/dist/src/composables/useCortexBlueprintBridge.d.ts +3 -2
  48. package/dist/src/composables/useEmailTemplateApplier.d.ts +5 -18
  49. package/dist/src/stores/config.d.ts +20 -0
  50. package/dist/src/stores/editor.d.ts +109 -0
  51. package/dist/src/stores/guido-email-editor.d.ts +10 -20
  52. package/dist/src/stores/onboarding.d.ts +952 -21
  53. package/dist/src/stores/version-history.d.ts +1 -1
  54. package/dist/src/utils/timeUtil.d.ts +5 -0
  55. package/dist/static/styles/components/accessibility.css.js +234 -0
  56. package/dist/static/styles/variables.css.js +2 -0
  57. package/dist/stores/editor.js +7 -4
  58. package/dist/stores/guido-email-editor.js +1 -3
  59. package/dist/stores/onboarding.js +43 -21
  60. package/dist/utils/timeUtil.js +6 -17
  61. package/package.json +1 -1
  62. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  63. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  64. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -0,0 +1,20 @@
1
+ import i from "./EditorActionsMenu.vue2.js";
2
+ /* empty css */
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
+ var e = this, o = e._self._c, t = e._self._setupProxy;
6
+ return o("div", { staticClass: "editor-actions-menu p-r" }, [o(t.InButtonV2, { attrs: { id: "guido__kebab-button", "data-testid": "Editor Actions Menu", "left-icon": "line-more-vertical", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.isPanelOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(d) {
7
+ t.isOpen = !t.isOpen;
8
+ } } }), o(t.InDropdownMenu, { staticClass: "editor-actions-menu__dropdown", attrs: { id: "guido__kebab-menu", "box-width": "basedOnLongestItem", "static-position": "bottom right", "dynamic-position": !1, "max-height": 400, options: t.options, "select-all-option-status": !1, status: t.isPanelOpen }, on: { clickOutside: t.close, optionClick: t.handleOptionClick } })], 1);
9
+ }, a = [], r = /* @__PURE__ */ s(
10
+ i,
11
+ n,
12
+ a,
13
+ !1,
14
+ null,
15
+ "d0e6b57a"
16
+ );
17
+ const _ = r.exports;
18
+ export {
19
+ _ as default
20
+ };
@@ -0,0 +1,98 @@
1
+ import { defineComponent as D, ref as C, computed as i, watch as L } from "vue";
2
+ import { useAccessibilityApi as R } from "../../../composables/useAccessibilityApi.js";
3
+ import { useConfig as Y } from "../../../composables/useConfig.js";
4
+ import { useExport as F } from "../../../composables/useExport.js";
5
+ import { useTranslations as N } from "../../../composables/useTranslations.js";
6
+ import { useVersionHistoryApi as U } from "../../../composables/useVersionHistoryApi.js";
7
+ import { useAutosaveStore as X } from "../../../stores/autosave.js";
8
+ import { useEditorStore as j } from "../../../stores/editor.js";
9
+ import { useOnboardingStore as q } from "../../../stores/onboarding.js";
10
+ import { getTooltipOptions as z } from "../../../utils/tooltipUtils.js";
11
+ import { InToggle as G, InDropdownMenu as J, InButtonV2 as K } from "@useinsider/design-system-vue";
12
+ const ce = /* @__PURE__ */ D({
13
+ __name: "EditorActionsMenu",
14
+ setup(Q) {
15
+ const c = "guido__kebab-autosave", u = "guido__kebab-version-history", d = "guido__kebab-accessibility", p = "guido__kebab-save-as", v = "guido__kebab-export", { config: m, isFeatureEnabled: b } = Y(), { exportHtml: y } = F(), { openVersionHistory: A, closeVersionHistory: S } = U(), { toggleAccessibilityTestingMode: _ } = R(), e = j(), a = X(), f = q(), o = N(), g = C(!1), M = i(() => g.value || f.isEditorActionsMenuPinned), r = C(!1), O = i(() => b("autosave")), x = i(
16
+ () => {
17
+ var t, s;
18
+ return !!((s = (t = m.value) == null ? void 0 : t.features) != null && s.versionHistory) && !e.isPreviewModeOpen;
19
+ }
20
+ ), h = i(
21
+ () => b("accessibilityTesting") && !e.isPreviewModeOpen
22
+ ), V = i(() => {
23
+ var t, s;
24
+ return !!((s = (t = m.value) == null ? void 0 : t.features) != null && s.saveAsTemplate);
25
+ }), E = i(() => O.value ? [
26
+ { categoryText: o("email-editor.preferences") },
27
+ {
28
+ text: o("email-editor.auto-save"),
29
+ value: c,
30
+ disable: e.loadingStatus,
31
+ rightSlotComponent: G,
32
+ rightSlotProps: {
33
+ id: "guido__kebab-autosave-toggle",
34
+ name: "guido-kebab-autosave-toggle",
35
+ class: "p-e-n",
36
+ checked: a.isOn,
37
+ disable: e.loadingStatus
38
+ }
39
+ },
40
+ { divider: "solid" }
41
+ ] : []), T = i(() => [
42
+ { categoryText: o("email-editor.actions") },
43
+ ...x.value ? [{
44
+ text: o("newsletter.version-history"),
45
+ value: u,
46
+ iconLeft: "line-architect-version-history",
47
+ disable: e.isVersionHistoryButtonDisabled
48
+ }] : [],
49
+ ...h.value ? [{
50
+ text: o("email-editor.accessibility-test"),
51
+ value: d,
52
+ iconLeft: "line-accessibility",
53
+ disable: e.loadingStatus
54
+ }] : [],
55
+ ...V.value ? [{
56
+ text: o("newsletter.save-templates"),
57
+ value: p,
58
+ iconLeft: "line-newsletter-save-as-template",
59
+ disable: e.isSaveAsButtonDisabled
60
+ }] : [],
61
+ {
62
+ text: o("email-editor.export-html"),
63
+ value: v,
64
+ iconLeft: "line-export",
65
+ disable: r.value || e.isExportButtonDisabled
66
+ }
67
+ ]), P = i(() => [...E.value, ...T.value]), n = () => {
68
+ g.value = !1;
69
+ };
70
+ L(() => f.isEditorActionsMenuPinned, (t) => {
71
+ t || n();
72
+ });
73
+ const k = () => {
74
+ a.isOn = !a.isOn;
75
+ }, w = () => {
76
+ e.isVersionHistoryOpen ? S() : A(), n();
77
+ }, H = () => {
78
+ _(), n();
79
+ }, I = () => {
80
+ e.isSaveAsTemplateDrawerOpen = !0, n();
81
+ }, B = async () => {
82
+ r.value = !0, await y(), r.value = !1, n();
83
+ }, l = {
84
+ [c]: k,
85
+ [u]: w,
86
+ [d]: H,
87
+ [p]: I,
88
+ [v]: B
89
+ };
90
+ return { __sfc: !0, AUTOSAVE: c, VERSION_HISTORY: u, ACCESSIBILITY: d, SAVE_AS: p, EXPORT: v, config: m, isFeatureEnabled: b, exportHtml: y, openVersionHistory: A, closeVersionHistory: S, toggleAccessibilityTestingMode: _, editorStore: e, autosaveStore: a, onboardingStore: f, trans: o, isOpen: g, isPanelOpen: M, isExporting: r, isAutosaveVisible: O, isVersionHistoryVisible: x, isAccessibilityVisible: h, isSaveAsVisible: V, preferenceOptions: E, actionOptions: T, options: P, close: n, toggleAutosave: k, handleVersionHistory: w, handleAccessibility: H, handleSaveAs: I, handleExport: B, optionHandlers: l, handleOptionClick: ({ value: t }) => {
91
+ var s;
92
+ return (s = l[t]) == null ? void 0 : s.call(l);
93
+ }, getTooltipOptions: z, InButtonV2: K, InDropdownMenu: J };
94
+ }
95
+ });
96
+ export {
97
+ ce as default
98
+ };
@@ -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, { ref: "rightSlotRef" })], 1)]);
7
- }, d = [], i = /* @__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)], 1)]);
7
+ }, n = [], d = /* @__PURE__ */ a(
8
8
  o,
9
9
  s,
10
- d,
10
+ n,
11
11
  !1,
12
12
  null,
13
- "d11dd577"
13
+ "3c713746"
14
14
  );
15
- const c = i.exports;
15
+ const f = d.exports;
16
16
  export {
17
- c as default
17
+ f as default
18
18
  };
@@ -1,22 +1,14 @@
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({
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({
7
7
  __name: "HeaderWrapper",
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 };
8
+ setup(p) {
9
+ return { __sfc: !0, InContainer: r, LeftSlot: t, MiddleSlot: e, RightSlot: m };
18
10
  }
19
11
  });
20
12
  export {
21
- c as default
13
+ s as default
22
14
  };
@@ -1,16 +1,16 @@
1
1
  import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
3
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = 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__ */ a(
7
+ }, i = [], r = /* @__PURE__ */ n(
8
8
  o,
9
- n,
9
+ a,
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "73199fa4"
13
+ "15610de9"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,36 +1,45 @@
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";
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";
6
7
  import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
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({
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({
11
12
  __name: "LeftSlot",
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 = () => {
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 = () => {
17
18
  if (e.isVersionHistoryOpen) {
18
- n();
19
+ r();
19
20
  return;
20
21
  }
21
22
  if (e.isPreviewModeOpen) {
22
- s();
23
+ n();
23
24
  return;
24
25
  }
25
- i();
26
- }, a = y(() => {
27
- c(), r.value = !1;
26
+ if (e.isAccessibilityTestingOpen) {
27
+ c();
28
+ return;
29
+ }
30
+ s();
31
+ }, u = M(() => {
32
+ try {
33
+ a();
34
+ } finally {
35
+ i.value = !1;
36
+ }
28
37
  }, 500);
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 };
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 };
32
41
  }
33
42
  });
34
43
  export {
35
- D as default
44
+ F as default
36
45
  };
@@ -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, 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);
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);
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 c = n.exports;
14
+ const _ = n.exports;
15
15
  export {
16
- c as default
16
+ _ as default
17
17
  };
@@ -2,15 +2,16 @@ 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 "./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({
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({
9
10
  __name: "MiddleSlot",
10
- setup(s) {
11
- return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, EditorToolbar: e, VersionHistory: m, VersionHistoryViewOptions: p };
11
+ setup(f) {
12
+ return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, AccessibilityToolbar: e, EditorToolbar: m, VersionHistory: p, VersionHistoryViewOptions: s };
12
13
  }
13
14
  });
14
15
  export {
15
- S as default
16
+ y as default
16
17
  };
@@ -1,17 +1,18 @@
1
- import s from "./RightSlot.vue2.js";
1
+ import i from "./RightSlot.vue2.js";
2
+ /* empty css */
2
3
  import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
4
  var r = function() {
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,
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,
8
9
  r,
9
10
  a,
10
11
  !1,
11
12
  null,
12
- null
13
+ "efc32e0d"
13
14
  );
14
- const u = n.exports;
15
+ const c = l.exports;
15
16
  export {
16
- u as default
17
+ c as default
17
18
  };
@@ -1,23 +1,18 @@
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({
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({
10
10
  __name: "RightSlot",
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 };
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 };
19
14
  }
20
15
  });
21
16
  export {
22
- T as default
17
+ x as default
23
18
  };
@@ -0,0 +1,18 @@
1
+ import i from "./AccessibilityToolbar.vue2.js";
2
+ /* empty css */
3
+ import s from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
+ var o = this, e = o._self._c, t = o._self._setupProxy;
6
+ return e("div", { staticClass: "d-f a-i-c accessibility-toolbar" }, [e(t.InButtonV2, { attrs: { id: "guido__a11y-no-images", "data-testid": "Accessibility No Images", "left-icon": "line-image", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.editorStore.imagesHidden, "tooltip-options": t.getTooltipOptions("guido__a11y-no-images"), "tooltip-text": t.imagesTooltip }, on: { click: t.toggleImages } }), e(t.InButtonV2, { attrs: { id: "guido__a11y-code", "data-testid": "Accessibility Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__a11y-code"), "tooltip-text": t.trans("newsletter.html-editor") }, on: { click: t.toggleCodeEditor } }), e(t.ColorVisionSelect), e(t.InSegments, { attrs: { id: "guido__a11y-view-selection", "with-icon": "", disable: t.editorStore.loadingStatus, "segment-list": t.segmentList, selected: t.editorStore.editorVisualMode }, on: { click: t.handleView } })], 1);
7
+ }, l = [], d = /* @__PURE__ */ s(
8
+ i,
9
+ a,
10
+ l,
11
+ !1,
12
+ null,
13
+ "c389d28f"
14
+ );
15
+ const _ = d.exports;
16
+ export {
17
+ _ as default
18
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as d, computed as n } from "vue";
2
+ import { useAccessibilityApi as c } from "../../../../composables/useAccessibilityApi.js";
3
+ import { useTranslations as g } from "../../../../composables/useTranslations.js";
4
+ import { useEditorStore as u } from "../../../../stores/editor.js";
5
+ import { getTooltipOptions as e } from "../../../../utils/tooltipUtils.js";
6
+ import { InSegments as _, InButtonV2 as f } from "@useinsider/design-system-vue";
7
+ import w from "./ColorVisionSelect.vue.js";
8
+ const A = /* @__PURE__ */ d({
9
+ __name: "AccessibilityToolbar",
10
+ setup(b) {
11
+ const t = u(), o = g(), {
12
+ toggleImages: r,
13
+ toggleCodeEditor: m,
14
+ switchToDesktopPreview: i,
15
+ switchToMobilePreview: s
16
+ } = c(), l = n(() => [
17
+ {
18
+ text: "",
19
+ icon: "line-desktop",
20
+ value: "desktop",
21
+ tooltipText: o("newsletter.desktop"),
22
+ tooltipOptions: e("guido__a11y-view-desktop")
23
+ },
24
+ {
25
+ text: "",
26
+ icon: "line-menu-mobileapp",
27
+ value: "mobile",
28
+ tooltipText: o("newsletter.mobile"),
29
+ tooltipOptions: e("guido__a11y-view-mobile")
30
+ }
31
+ ]), p = n(() => t.imagesHidden ? o("email-editor.a11y-show-images") : o("email-editor.a11y-hide-images"));
32
+ return { __sfc: !0, editorStore: t, trans: o, toggleImages: r, toggleCodeEditor: m, switchToDesktopPreview: i, switchToMobilePreview: s, segmentList: l, imagesTooltip: p, handleView: (a) => a === "mobile" ? s() : i(), getTooltipOptions: e, InButtonV2: f, InSegments: _, ColorVisionSelect: w };
33
+ }
34
+ });
35
+ export {
36
+ A as default
37
+ };
@@ -0,0 +1,22 @@
1
+ import i from "./ColorVisionSelect.vue2.js";
2
+ /* empty css */
3
+ import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var l = function() {
5
+ var o = this, e = o._self._c, t = o._self._setupProxy;
6
+ return e("div", { staticClass: "color-vision-select p-r" }, [e(t.InButtonV2, { attrs: { id: "guido__a11y-color-vision-trigger", "left-icon": "line-show-on", "right-icon": "line-chevron-small-down", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text": t.selectedOption.text }, on: { click: function(s) {
7
+ t.isOpen = !t.isOpen;
8
+ } } }), e(t.InDropdownMenu, { staticClass: "color-vision-select__dropdown", attrs: { id: "guido__a11y-color-vision-menu", "is-wrapped-description": "", "box-width": "basedOnLongestItem", "static-position": "bottom left", "dynamic-position": !1, "max-height": 400, options: t.options, "pre-selected-values": [t.selectedOption], "select-all-option-status": !1, status: t.isOpen }, on: { clickOutside: function(s) {
9
+ t.isOpen = !1;
10
+ }, optionClick: t.select } })], 1);
11
+ }, r = [], a = /* @__PURE__ */ n(
12
+ i,
13
+ l,
14
+ r,
15
+ !1,
16
+ null,
17
+ "64cb50da"
18
+ );
19
+ const u = a.exports;
20
+ export {
21
+ u as default
22
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as d, ref as p, computed as c } from "vue";
2
+ import { useAccessibilityApi as m } from "../../../../composables/useAccessibilityApi.js";
3
+ import { useTranslations as u } from "../../../../composables/useTranslations.js";
4
+ import { useEditorStore as v } from "../../../../stores/editor.js";
5
+ import { InDropdownMenu as f, InButtonV2 as y } from "@useinsider/design-system-vue";
6
+ const C = /* @__PURE__ */ d({
7
+ __name: "ColorVisionSelect",
8
+ setup(K) {
9
+ const i = "none", a = [
10
+ {
11
+ value: i,
12
+ labelKey: "email-editor.cvd-none"
13
+ },
14
+ {
15
+ value: "protanopia",
16
+ labelKey: "email-editor.cvd-protanopia",
17
+ descriptionKey: "email-editor.cvd-protanopia-description"
18
+ },
19
+ {
20
+ value: "deuteranopia",
21
+ labelKey: "email-editor.cvd-deuteranopia",
22
+ descriptionKey: "email-editor.cvd-deuteranopia-description"
23
+ },
24
+ {
25
+ value: "tritanopia",
26
+ labelKey: "email-editor.cvd-tritanopia",
27
+ descriptionKey: "email-editor.cvd-tritanopia-description"
28
+ },
29
+ {
30
+ value: "achromatopsia",
31
+ labelKey: "email-editor.cvd-achromatopsia",
32
+ descriptionKey: "email-editor.cvd-achromatopsia-description"
33
+ }
34
+ ], r = v(), o = u(), { setColorVisionDeficiency: n } = m(), s = p(!1), t = c(() => a.map((e) => ({
35
+ text: o(e.labelKey),
36
+ value: e.value,
37
+ ...e.descriptionKey ? { description: o(e.descriptionKey) } : {}
38
+ }))), l = c(
39
+ () => t.value.find((e) => e.value === (r.colorVisionDeficiency || i)) ?? t.value[0]
40
+ );
41
+ return { __sfc: !0, NONE: i, OPTIONS: a, editorStore: r, trans: o, setColorVisionDeficiency: n, isOpen: s, options: t, selectedOption: l, select: ({ value: e }) => {
42
+ n(e === i ? "" : e), s.value = !1;
43
+ }, InButtonV2: y, InDropdownMenu: f };
44
+ }
45
+ });
46
+ export {
47
+ C as default
48
+ };
@@ -0,0 +1,19 @@
1
+ import i from "./EditorTabBarOnboarding.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
+ var r, n;
6
+ var t = this, e = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? e(o.InOnboard, { key: "guido__tab-bar-onboard", staticClass: "w-21-s p-a z-11", class: (r = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : r.classes, attrs: { id: o.CARD_ID, "is-multiple-page": "", visible: "", "image-source": "", title: "", "pages-config": o.onboardingStore.onboardings.editorTabBarOnboarding.config, "pointer-position": (n = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : n.position, "right-position": o.placement.right, "top-position": o.placement.top }, on: { backButtonClick: o.handleBack, close: o.finish, nextButtonClick: o.handleNext } }) : t._e();
8
+ }, c = [], d = /* @__PURE__ */ a(
9
+ i,
10
+ s,
11
+ c,
12
+ !1,
13
+ null,
14
+ "42f02a1f"
15
+ );
16
+ const g = d.exports;
17
+ export {
18
+ g as default
19
+ };
@@ -0,0 +1,90 @@
1
+ import { defineComponent as M, ref as q, computed as P, watch as N, nextTick as A } from "vue";
2
+ import { useConfig as D } from "../../../composables/useConfig.js";
3
+ import { useRibbonOffset as F } from "../../../composables/useRibbonOffset.js";
4
+ import { useTranslations as G } from "../../../composables/useTranslations.js";
5
+ import { useOnboardingStore as K } from "../../../stores/onboarding.js";
6
+ import { InOnboard as $ } from "@useinsider/design-system-vue";
7
+ const Q = /* @__PURE__ */ M({
8
+ __name: "EditorTabBarOnboarding",
9
+ setup(H) {
10
+ const r = "editorTabBarOnboarding", m = "guido__tab-bar-onboard", a = G(), o = K(), { isFeatureEnabled: B } = D(), { getTopPosition: x } = F(), f = () => o.next(r), k = () => o.previous(r), T = () => void o.close(r), _ = 4, C = 17, c = "#guido__kebab-button", u = ".editor-actions-menu__dropdown", d = (t, e, n) => ({
11
+ classes: "guido-tab-bar-onboarding",
12
+ position: "Right Top",
13
+ title: a(t),
14
+ description: a(e),
15
+ imageSource: "",
16
+ backButtonType: "text",
17
+ backButtonText: a("action-builder.back"),
18
+ backButtonClick: k,
19
+ nextButtonType: "text",
20
+ nextButtonText: a("action-builder.next"),
21
+ nextButtonClick: f,
22
+ ...n
23
+ }), b = { backButtonType: void 0, backButtonText: void 0, backButtonClick: () => {
24
+ } }, O = () => B("autosave") ? [{
25
+ card: d("email-editor.onboarding-autosave-title", "email-editor.onboarding-autosave-description", {
26
+ pinsMenu: !0
27
+ }),
28
+ edge: u,
29
+ target: '[data-attr-value="guido__kebab-autosave"]'
30
+ }] : [], v = () => [
31
+ {
32
+ card: d("email-editor.onboarding-kebab-title", "email-editor.onboarding-kebab-description", b),
33
+ edge: c,
34
+ target: c
35
+ },
36
+ ...O(),
37
+ {
38
+ card: d("email-editor.onboarding-accessibility-title", "email-editor.onboarding-accessibility-description", {
39
+ nextButtonText: a("action-builder.ok"),
40
+ nextButtonClick: T,
41
+ pinsMenu: !0
42
+ }),
43
+ edge: u,
44
+ target: '[data-attr-value="guido__kebab-accessibility"]'
45
+ }
46
+ ], h = (t, e) => {
47
+ if (e <= 0 || e >= t.length)
48
+ return { steps: t, offset: 0 };
49
+ const [n, ...i] = t.slice(e);
50
+ return { steps: [{ ...n, card: { ...n.card, ...b } }, ...i], offset: e };
51
+ }, g = () => ({ top: x(56), right: "150px" });
52
+ let s = [];
53
+ const l = q(g()), p = async () => {
54
+ var R;
55
+ await A();
56
+ const t = s[o.onboardings.editorTabBarOnboarding.cardIndex], e = (R = document.getElementById(m)) == null ? void 0 : R.offsetParent, n = (t && document.querySelector(t.edge)) ?? document.querySelector(c), i = (t && document.querySelector(t.target)) ?? document.querySelector(c);
57
+ if (!e || !n || !i) {
58
+ l.value = g();
59
+ return;
60
+ }
61
+ const y = e.getBoundingClientRect(), E = i.getBoundingClientRect();
62
+ l.value = {
63
+ top: `${Math.round(E.top + E.height / 2 - y.top - C)}px`,
64
+ right: `${Math.round(y.right - n.getBoundingClientRect().left - _)}px`
65
+ };
66
+ }, S = P(
67
+ () => o.onboardings.editorTabBarOnboarding.config.length > 0 && o.onboardings.editorTabBarOnboarding.isActive
68
+ ), I = () => {
69
+ var t, e;
70
+ (e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
71
+ }, w = () => {
72
+ var t, e;
73
+ (e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
74
+ };
75
+ return N(
76
+ () => o.onboardings.editorTabBarOnboarding.isActive,
77
+ async (t) => {
78
+ if (!t)
79
+ return;
80
+ await A();
81
+ const { cardOffset: e } = o.onboardings.editorTabBarOnboarding, n = h(v(), e);
82
+ ({ steps: s } = n), o.setConfig(r, s.map((i) => i.card), n.offset), await p();
83
+ },
84
+ { immediate: !0 }
85
+ ), N(() => o.onboardings.editorTabBarOnboarding.cardIndex, p), { __sfc: !0, ONBOARDING: r, CARD_ID: m, trans: a, onboardingStore: o, isFeatureEnabled: B, getTopPosition: x, goNext: f, goBack: k, finish: T, ANCHOR_GAP: _, POINTER_CENTER: C, KEBAB: c, MENU: u, card: d, NO_BACK: b, autoSaveStep: O, buildSteps: v, resumeFrom: h, designFallback: g, steps: s, placement: l, place: p, isVisible: S, handleNext: I, handleBack: w, InOnboard: $ };
86
+ }
87
+ });
88
+ export {
89
+ Q as default
90
+ };