@useinsider/guido 3.11.0-beta.04c9b87 → 3.11.0-beta.181af4d

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 (42) hide show
  1. package/dist/@types/config/schemas.js +16 -14
  2. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  3. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +21 -0
  4. package/dist/components/organisms/header/EditorActions.vue.js +11 -11
  5. package/dist/components/organisms/header/EditorActions.vue2.js +34 -50
  6. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  7. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +39 -0
  8. package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
  9. package/dist/components/organisms/header/HeaderWrapper.vue2.js +2 -0
  10. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  11. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  12. package/dist/components/organisms/header/RightSlot.vue.js +8 -8
  13. package/dist/components/organisms/header/RightSlot.vue2.js +15 -15
  14. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  15. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  16. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +24 -0
  17. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  18. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
  19. package/dist/composables/useAccessibilityApi.js +31 -0
  20. package/dist/config/i18n/en/labels.json.js +17 -0
  21. package/dist/guido.css +1 -1
  22. package/dist/node_modules/@vueuse/core/index.js +102 -0
  23. package/dist/node_modules/@vueuse/shared/index.js +40 -28
  24. package/dist/src/@types/config/schemas.d.ts +4 -0
  25. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  26. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  27. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  28. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  29. package/dist/src/composables/useActionsApi.d.ts +2 -2
  30. package/dist/src/composables/useConfig.d.ts +2 -0
  31. package/dist/src/stores/config.d.ts +18 -0
  32. package/dist/src/stores/editor.d.ts +105 -0
  33. package/dist/src/stores/version-history.d.ts +1 -1
  34. package/dist/src/utils/timeUtil.d.ts +10 -0
  35. package/dist/stores/editor.js +5 -1
  36. package/dist/utils/timeUtil.js +6 -17
  37. package/package.json +5 -1
  38. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  39. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  40. package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
  41. package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
  42. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
- import { object as a, number as s, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as h, boolean as o, array as c, record as k, literal as i, looseObject as y, variant as g, union as f, unknown as n } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as a, number as s, optional as e, string as t, picklist as i, pipe as p, minLength as b, custom as y, boolean as o, array as c, record as h, literal as l, looseObject as k, variant as g, union as f, unknown as n } from "../../node_modules/valibot/dist/index.js";
3
3
  const d = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -38,7 +38,7 @@ const d = {
38
38
  ),
39
39
  /** Product type identifier */
40
40
  productType: e(
41
- l([
41
+ i([
42
42
  r.EMAIL,
43
43
  r.ARCHITECT,
44
44
  r.UNSUBSCRIBE_PAGES
@@ -47,7 +47,7 @@ const d = {
47
47
  ),
48
48
  /** Message type (promotional or transactional) */
49
49
  messageType: e(
50
- l([d.PROMOTIONAL, d.TRANSACTIONAL]),
50
+ i([d.PROMOTIONAL, d.TRANSACTIONAL]),
51
51
  d.PROMOTIONAL
52
52
  ),
53
53
  /** Display name for the current user */
@@ -68,7 +68,7 @@ const d = {
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), I = y({
71
+ }), I = k({
72
72
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
73
73
  id: e(s()),
74
74
  /** Decimal places for price display (legacy data may use string or number) */
@@ -121,7 +121,7 @@ const d = {
121
121
  * strategy, currency, locale, and layout data.
122
122
  */
123
123
  recommendationConfigs: e(
124
- k(t(), I),
124
+ h(t(), I),
125
125
  {}
126
126
  )
127
127
  }), P = a({
@@ -183,8 +183,10 @@ const d = {
183
183
  /** Enable Liquid template syntax */
184
184
  liquidSyntax: e(o(), !1),
185
185
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
186
- autosave: e(o(), !1)
187
- }), N = l([
186
+ autosave: e(o(), !1),
187
+ /** Enable the Stripo Accessibility Checker control in the editor toolbar. */
188
+ accessibilityTesting: e(o(), !1)
189
+ }), N = i([
188
190
  "amp-accordion",
189
191
  "amp-carousel",
190
192
  "amp-form-controls",
@@ -198,7 +200,7 @@ const d = {
198
200
  "text-block",
199
201
  "timer-block",
200
202
  "video-block"
201
- ]), D = l([
203
+ ]), D = i([
202
204
  "dynamic-content",
203
205
  "checkbox-block",
204
206
  "radio-button-block",
@@ -226,7 +228,7 @@ const d = {
226
228
  priority: s()
227
229
  }), F = a({
228
230
  ...m.entries,
229
- type: i("replace"),
231
+ type: l("replace"),
230
232
  /** String to search for */
231
233
  search: t(),
232
234
  /** Replacement string */
@@ -235,7 +237,7 @@ const d = {
235
237
  replaceAll: e(o())
236
238
  }), U = a({
237
239
  ...m.entries,
238
- type: i("regex"),
240
+ type: l("regex"),
239
241
  /** Regex pattern string */
240
242
  pattern: t(),
241
243
  /** Replacement string (supports $1, $2, etc.) */
@@ -244,14 +246,14 @@ const d = {
244
246
  flags: e(t())
245
247
  }), B = a({
246
248
  ...m.entries,
247
- type: i("remove"),
249
+ type: l("remove"),
248
250
  /** Strings or patterns to remove */
249
251
  targets: c(t())
250
252
  }), w = a({
251
253
  ...m.entries,
252
- type: i("custom"),
254
+ type: l("custom"),
253
255
  /** Custom processor function */
254
- processor: h(
256
+ processor: y(
255
257
  (u) => typeof u == "function",
256
258
  "processor must be a function"
257
259
  )
@@ -271,7 +273,7 @@ const d = {
271
273
  * Return false to cancel the save operation.
272
274
  */
273
275
  externalValidation: e(
274
- h(
276
+ y(
275
277
  (u) => typeof u == "function",
276
278
  "externalValidation must be a function"
277
279
  )
@@ -0,0 +1,17 @@
1
+ import e from "./AutoSaveStatus.vue2.js";
2
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var n = function() {
4
+ var s = this, t = s._self._c, a = s._self._setupProxy;
5
+ return a.isFeatureEnabled("autosave") ? t("div", { staticClass: "d-f a-i-c mr-3 auto-save-status" }, [a.autosaveStore.status === a.AUTOSAVE_STATUS.SAVING ? t("span", { staticClass: "d-f a-i-c f-s-1" }, [t(a.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), t("span", { staticClass: "ml-1 t-c-53" }, [s._v(s._s(a.trans("newsletter.saving")))])], 1) : a.savedLabel ? t("span", { staticClass: "f-s-1 t-c-53" }, [s._v(s._s(a.savedLabel))]) : s._e()]) : s._e();
6
+ }, _ = [], o = /* @__PURE__ */ r(
7
+ e,
8
+ n,
9
+ _,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const u = o.exports;
15
+ export {
16
+ u as default
17
+ };
@@ -0,0 +1,21 @@
1
+ import { defineComponent as i, computed as u } from "vue";
2
+ import { useConfig as d } from "../../../composables/useConfig.js";
3
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
4
+ import { useAutosaveStore as f, AUTOSAVE_STATUS as o } from "../../../stores/autosave.js";
5
+ import { autoSaveTimestamp as S } from "../../../utils/timeUtil.js";
6
+ import { InLoading as c } from "@useinsider/design-system-vue";
7
+ const g = /* @__PURE__ */ i({
8
+ __name: "AutoSaveStatus",
9
+ setup(v) {
10
+ const { isFeatureEnabled: a } = d(), t = f(), e = p(), s = u(() => {
11
+ if (t.status !== o.SAVED || !t.lastSavedAt)
12
+ return "";
13
+ const { isToday: r, time: m, date: n } = S(t.lastSavedAt);
14
+ return r ? e("email-editor.autosaved-at-today", { time: m }) : e("email-editor.autosaved-at-date", { date: n });
15
+ });
16
+ return { __sfc: !0, isFeatureEnabled: a, autosaveStore: t, trans: e, savedLabel: s, AUTOSAVE_STATUS: o, InLoading: c };
17
+ }
18
+ });
19
+ export {
20
+ g as default
21
+ };
@@ -1,21 +1,21 @@
1
- import l from "./EditorActions.vue2.js";
1
+ import r from "./EditorActions.vue2.js";
2
2
  /* empty css */
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) {
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var l = function() {
5
+ var i, s;
6
+ var e = this, o = e._self._c, t = e._self._setupProxy;
7
+ return o("div", { staticClass: "d-f a-i-c editor-actions" }, [(s = (i = t.config) == null ? void 0 : i.features) != null && s.testMessage && !t.editorStore.isPreviewModeOpen ? o(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 } }) : e._e(), t.editorStore.isPreviewModeOpen ? e._e() : o(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? e._e() : o(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(n) {
8
8
  return t.handleSave(!1);
9
- } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
9
+ } } }), o(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
10
10
  return t.executeSave(!1);
11
11
  } } })], 1);
12
- }, p = [], c = /* @__PURE__ */ d(
12
+ }, d = [], c = /* @__PURE__ */ a(
13
+ r,
13
14
  l,
14
- u,
15
- p,
15
+ d,
16
16
  !1,
17
17
  null,
18
- "82128f7d"
18
+ "d51fb931"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {
@@ -1,66 +1,50 @@
1
- import { defineComponent as O, ref as n, computed as h } from "vue";
2
- import { useActionsApi as q } from "../../../composables/useActionsApi.js";
3
- import { useConfig as b } from "../../../composables/useConfig.js";
4
- import { useExport as k } from "../../../composables/useExport.js";
5
- import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
6
- import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
7
- import { useSave as F } from "../../../composables/useSave.js";
8
- import { useTranslations as L } from "../../../composables/useTranslations.js";
9
- import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
10
- import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
11
- import { useEditorStore as I } from "../../../stores/editor.js";
12
- import { useTemplateStore as P } from "../../../stores/template.js";
13
- import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
14
- import { InButtonV2 as G } from "@useinsider/design-system-vue";
15
- import { storeToRefs as J } from "pinia";
16
- import K from "./MigrationConfirmModal.vue.js";
17
- const ut = /* @__PURE__ */ O({
1
+ import { defineComponent as C, ref as g } from "vue";
2
+ import { useActionsApi as y } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as T } from "../../../composables/useConfig.js";
4
+ import { useTestEmailClick as M } from "../../../composables/useGuidoActions.js";
5
+ import { useHtmlCompiler as h } from "../../../composables/useHtmlCompiler.js";
6
+ import { useSave as x } from "../../../composables/useSave.js";
7
+ import { useTranslations as A } from "../../../composables/useTranslations.js";
8
+ import { useLiquidValidator as V } from "../../../composables/validators/useLiquidValidator.js";
9
+ import { useEditorStore as q } from "../../../stores/editor.js";
10
+ import { useTemplateStore as w } from "../../../stores/template.js";
11
+ import { getTooltipOptions as H } from "../../../utils/tooltipUtils.js";
12
+ import { InButtonV2 as k } from "@useinsider/design-system-vue";
13
+ import { storeToRefs as F } from "pinia";
14
+ import L from "./EditorActionsMenu.vue.js";
15
+ import R from "./MigrationConfirmModal.vue.js";
16
+ const Z = /* @__PURE__ */ C({
18
17
  __name: "EditorActions",
19
- setup(N, { expose: x }) {
20
- const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), e = I(), y = P(), { hasMigrations: g } = J(y), s = L(), i = n(!1), r = n(!1), S = n(), H = B(), T = () => {
21
- if (e.isVersionHistoryOpen) {
22
- p();
23
- return;
24
- }
25
- c();
26
- }, w = async () => {
27
- i.value = !0, await m(), i.value = !1;
28
- }, _ = () => {
29
- e.isSaveAsTemplateDrawerOpen = !0;
30
- }, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
31
- () => {
32
- var t, o;
33
- return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
34
- }
35
- ), V = async (t) => {
36
- r.value = !0, t || (e.loadingStatus = !0);
37
- const o = await u(t);
38
- return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
39
- }, E = (t) => {
18
+ setup(b, { expose: v }) {
19
+ const { config: S, isFeatureEnabled: a } = T(), { save: r } = x(), { getCompiledEmail: s } = y(), { compileHtml: n } = h(), { validateLiquidSyntax: m } = V(), e = q(), l = w(), { hasMigrations: f } = F(l), E = A(), i = g(!1), u = g(), c = M(), p = async (t) => {
20
+ i.value = !0, t || (e.loadingStatus = !0);
21
+ const o = await r(t);
22
+ return i.value = !1, !t && !o && (e.loadingStatus = !1), o;
23
+ }, d = (t) => {
40
24
  var o;
41
- if (!t && g.value) {
42
- (o = S.value) == null || o.open();
25
+ if (!t && f.value) {
26
+ (o = u.value) == null || o.open();
43
27
  return;
44
28
  }
45
- return V(t);
46
- }, M = async () => {
47
- if (l("liquidSyntax")) {
29
+ return p(t);
30
+ }, _ = async () => {
31
+ if (a("liquidSyntax")) {
48
32
  e.loadingStatus = !0;
49
33
  try {
50
- const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
51
- if (!await v(o))
34
+ const { html: t } = await s({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = n(t);
35
+ if (!await m(o))
52
36
  return;
53
37
  } finally {
54
38
  e.loadingStatus = !1;
55
39
  }
56
40
  }
57
- H();
41
+ c();
58
42
  };
59
- return x({
60
- handleSave: E
61
- }), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: e, templateStore: y, hasMigrations: g, trans: s, isExporting: i, isSaving: r, migrationModalRef: S, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
43
+ return v({
44
+ handleSave: d
45
+ }), { __sfc: !0, config: S, isFeatureEnabled: a, save: r, getCompiledEmail: s, compileHtml: n, validateLiquidSyntax: m, editorStore: e, templateStore: l, hasMigrations: f, trans: E, isSaving: i, migrationModalRef: u, testEmailClick: c, executeSave: p, handleSave: d, handleTestEmail: _, getTooltipOptions: H, InButtonV2: k, EditorActionsMenu: L, MigrationConfirmModal: R };
62
46
  }
63
47
  });
64
48
  export {
65
- ut as default
49
+ Z as default
66
50
  };
@@ -0,0 +1,20 @@
1
+ import i from "./EditorActionsMenu.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var o = function() {
5
+ var s = this, e = s._self._c, t = s._self._setupProxy;
6
+ return e("div", { ref: "root", staticClass: "editor-actions-menu p-r" }, [e(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.isOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(l) {
7
+ t.isOpen = !t.isOpen;
8
+ } } }), t.isOpen ? e("div", { staticClass: "editor-actions-menu__panel p-a" }, [t.isAutosaveVisible ? [e("p", { staticClass: "editor-actions-menu__section f-s-1 t-c-55" }, [s._v(" " + s._s(t.trans("email-editor.preferences")) + " ")]), e("div", { staticClass: "editor-actions-menu__row editor-actions-menu__row_static d-f a-i-c j-c-s-b" }, [e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("email-editor.auto-save")))]), e(t.InToggle, { attrs: { id: "guido__kebab-autosave-toggle", name: "guido-kebab-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggleAutosave } })], 1), e("div", { staticClass: "editor-actions-menu__divider" })] : s._e(), e("p", { staticClass: "editor-actions-menu__section f-s-1 t-c-55" }, [s._v(" " + s._s(t.trans("email-editor.actions")) + " ")]), t.isVersionHistoryVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-version-history", type: "button", disabled: t.editorStore.isVersionHistoryButtonDisabled }, on: { click: t.handleVersionHistory } }, [e(t.InIcons, { staticClass: "mr-2", attrs: { name: "line-architect-version-history", size: "16" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("newsletter.version-history")))])], 1) : s._e(), t.isAccessibilityVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-accessibility", type: "button", disabled: t.editorStore.loadingStatus }, on: { click: t.handleAccessibility } }, [e(t.InIcons, { staticClass: "mr-2", attrs: { name: "line-menu-access-area", size: "16" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("email-editor.accessibility-test")))])], 1) : s._e(), t.isSaveAsVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-save-as", type: "button", disabled: t.editorStore.isSaveAsButtonDisabled }, on: { click: t.handleSaveAs } }, [e(t.InIcons, { staticClass: "mr-2", attrs: { name: "line-newsletter-save-as-template", size: "16" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("newsletter.save-templates")))])], 1) : s._e(), e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-export", type: "button", disabled: t.isExporting || t.editorStore.isExportButtonDisabled }, on: { click: t.handleExport } }, [e(t.InIcons, { staticClass: "mr-2", attrs: { name: "line-export", size: "16" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("newsletter.export")))])], 1)], 2) : s._e()], 1);
9
+ }, n = [], r = /* @__PURE__ */ a(
10
+ i,
11
+ o,
12
+ n,
13
+ !1,
14
+ null,
15
+ "287a74e3"
16
+ );
17
+ const b = r.exports;
18
+ export {
19
+ b as default
20
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent as O, ref as c, computed as t } from "vue";
2
+ import { useAccessibilityApi as x } from "../../../composables/useAccessibilityApi.js";
3
+ import { useConfig as h } from "../../../composables/useConfig.js";
4
+ import { useExport as I } from "../../../composables/useExport.js";
5
+ import { useTranslations as B } from "../../../composables/useTranslations.js";
6
+ import { useVersionHistoryApi as C } from "../../../composables/useVersionHistoryApi.js";
7
+ import { useAutosaveStore as w } from "../../../stores/autosave.js";
8
+ import { useEditorStore as M } from "../../../stores/editor.js";
9
+ import { getTooltipOptions as k } from "../../../utils/tooltipUtils.js";
10
+ import { InToggle as D, InIcons as F, InButtonV2 as j } from "@useinsider/design-system-vue";
11
+ import { onClickOutside as q } from "../../../node_modules/@vueuse/core/index.js";
12
+ const Y = /* @__PURE__ */ O({
13
+ __name: "EditorActionsMenu",
14
+ setup(z) {
15
+ const { config: i, isFeatureEnabled: n } = h(), { exportHtml: l } = I(), { openVersionHistory: p, closeVersionHistory: u } = C(), { toggleAccessibilityTestingMode: m } = x(), r = M(), f = w(), d = B(), v = c(!1), a = c(!1), A = c(null), y = t(() => n("autosave")), g = t(() => {
16
+ var o, e;
17
+ return !!((e = (o = i.value) == null ? void 0 : o.features) != null && e.versionHistory);
18
+ }), V = t(() => n("accessibilityTesting")), b = t(() => {
19
+ var o, e;
20
+ return !!((e = (o = i.value) == null ? void 0 : o.features) != null && e.saveAsTemplate);
21
+ }), s = () => {
22
+ v.value = !1;
23
+ }, H = () => {
24
+ r.isVersionHistoryOpen ? u() : p(), s();
25
+ }, _ = () => {
26
+ m(), s();
27
+ }, S = () => {
28
+ r.isSaveAsTemplateDrawerOpen = !0, s();
29
+ }, T = async () => {
30
+ a.value = !0, await l(), a.value = !1, s();
31
+ }, E = (o) => {
32
+ f.isOn = o;
33
+ };
34
+ return q(A, s), { __sfc: !0, config: i, isFeatureEnabled: n, exportHtml: l, openVersionHistory: p, closeVersionHistory: u, toggleAccessibilityTestingMode: m, editorStore: r, autosaveStore: f, trans: d, isOpen: v, isExporting: a, root: A, isAutosaveVisible: y, isVersionHistoryVisible: g, isAccessibilityVisible: V, isSaveAsVisible: b, close: s, handleVersionHistory: H, handleAccessibility: _, handleSaveAs: S, handleExport: T, toggleAutosave: E, getTooltipOptions: k, InButtonV2: j, InIcons: F, InToggle: D };
35
+ }
36
+ });
37
+ export {
38
+ Y as default
39
+ };
@@ -10,9 +10,9 @@ var s = function() {
10
10
  d,
11
11
  !1,
12
12
  null,
13
- "5c02dcc7"
13
+ "d11dd577"
14
14
  );
15
- const p = i.exports;
15
+ const c = i.exports;
16
16
  export {
17
- p as default
17
+ c as default
18
18
  };
@@ -8,6 +8,8 @@ const c = /* @__PURE__ */ n({
8
8
  setup(l, { expose: r }) {
9
9
  const e = m(null);
10
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.
11
13
  handleSave: (t) => {
12
14
  var o;
13
15
  return (o = e.value) == null ? void 0 : o.handleSave(t);
@@ -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,11 +1,11 @@
1
- import s from "./RightSlot.vue2.js";
2
- import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- 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,
8
- r,
1
+ import i from "./RightSlot.vue2.js";
2
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var o = function() {
4
+ var s = this, e = s._self._c, t = s._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ? s._e() : e(t.AutoSaveStatus), 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") } }) : s._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
6
+ }, a = [], n = /* @__PURE__ */ r(
7
+ i,
8
+ o,
9
9
  a,
10
10
  !1,
11
11
  null,
@@ -1,23 +1,23 @@
1
- import { defineComponent as a, ref as f, computed as p } from "vue";
2
- import { useConfig as u } from "../../../composables/useConfig.js";
1
+ import { defineComponent as a, ref as u, computed as f } from "vue";
2
+ import { useConfig as p } from "../../../composables/useConfig.js";
3
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({
4
+ import { useEditorStore as c } from "../../../stores/editor.js";
5
+ import { InChips as l } from "@useinsider/design-system-vue";
6
+ import S from "./AutoSaveStatus.vue.js";
7
+ import _ from "./EditorActions.vue.js";
8
+ import h from "./version-history/RestoreButton.vue.js";
9
+ const y = /* @__PURE__ */ a({
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({
11
+ setup(v, { expose: e }) {
12
+ const { isFeatureEnabled: o } = p(), i = d(), n = c(), t = u(null), s = f(() => o("liquidSyntax"));
13
+ return e({
14
14
  handleSave: (m) => {
15
- var e;
16
- return (e = t.value) == null ? void 0 : e.handleSave(m);
15
+ var r;
16
+ return (r = t.value) == null ? void 0 : r.handleSave(m);
17
17
  }
18
- }), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
18
+ }), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: l, AutoSaveStatus: S, EditorActions: _, RestoreButton: h };
19
19
  }
20
20
  });
21
21
  export {
22
- T as default
22
+ y as default
23
23
  };
@@ -0,0 +1,18 @@
1
+ import o from "./AccessibilityToolbar.vue2.js";
2
+ /* empty css */
3
+ import s from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
+ var i = this, e = i._self._c, t = i._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("div", { staticClass: "accessibility-toolbar__divider" }), e(t.ColorVisionSelect), e(t.InSegments, { staticClass: "ml-2", attrs: { id: "guido__a11y-view-selection", "with-icon": "", "segment-list": t.segmentList, selected: t.editorStore.editorVisualMode }, on: { click: t.handleView } })], 1);
7
+ }, l = [], d = /* @__PURE__ */ s(
8
+ o,
9
+ a,
10
+ l,
11
+ !1,
12
+ null,
13
+ "e222d603"
14
+ );
15
+ const g = d.exports;
16
+ export {
17
+ g 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,24 @@
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 e = this, t = e._self._c, s = e._self._setupProxy;
6
+ return t("div", { ref: "root", staticClass: "color-vision-select p-r" }, [t("button", { staticClass: "color-vision-select__trigger d-f a-i-c", attrs: { id: "guido__a11y-color-vision-trigger", type: "button", disabled: s.editorStore.loadingStatus }, on: { click: function(o) {
7
+ s.isOpen = !s.isOpen;
8
+ } } }, [t(s.InIcons, { staticClass: "mr-2", attrs: { name: "line-show-on", size: "16" } }), t("span", { staticClass: "color-vision-select__label f-s-2" }, [e._v(e._s(s.selectedLabel))]), t(s.InIcons, { staticClass: "ml-2", attrs: { name: "line-chevron-small-down", size: "16" } })], 1), s.isOpen ? t("div", { staticClass: "color-vision-select__menu p-a" }, e._l(s.OPTIONS, function(o) {
9
+ return t("button", { key: o.value || "none", staticClass: "color-vision-select__option d-f f-d-c", class: { "color-vision-select__option_selected": o.value === s.editorStore.colorVisionDeficiency }, attrs: { type: "button" }, on: { click: function(_) {
10
+ return s.select(o.value);
11
+ } } }, [t("span", { staticClass: "color-vision-select__option-label f-s-2" }, [e._v(e._s(s.trans(o.labelKey)))]), o.descriptionKey ? t("span", { staticClass: "color-vision-select__option-description f-s-1 t-c-55" }, [e._v(" " + e._s(s.trans(o.descriptionKey)) + " ")]) : e._e()]);
12
+ }), 0) : e._e()]);
13
+ }, c = [], r = /* @__PURE__ */ n(
14
+ i,
15
+ l,
16
+ c,
17
+ !1,
18
+ null,
19
+ "383f6378"
20
+ );
21
+ const p = r.exports;
22
+ export {
23
+ p as default
24
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as p, ref as c, computed as m } from "vue";
2
+ import { useAccessibilityApi as u } from "../../../../composables/useAccessibilityApi.js";
3
+ import { useTranslations as v } from "../../../../composables/useTranslations.js";
4
+ import { useEditorStore as f } from "../../../../stores/editor.js";
5
+ import { InIcons as y } from "@useinsider/design-system-vue";
6
+ import { onClickOutside as K } from "../../../../node_modules/@vueuse/core/index.js";
7
+ const V = /* @__PURE__ */ p({
8
+ __name: "ColorVisionSelect",
9
+ setup(b) {
10
+ const e = [
11
+ {
12
+ value: "",
13
+ labelKey: "email-editor.cvd-none"
14
+ },
15
+ {
16
+ value: "protanopia",
17
+ labelKey: "email-editor.cvd-protanopia",
18
+ descriptionKey: "email-editor.cvd-protanopia-description"
19
+ },
20
+ {
21
+ value: "deuteranopia",
22
+ labelKey: "email-editor.cvd-deuteranopia",
23
+ descriptionKey: "email-editor.cvd-deuteranopia-description"
24
+ },
25
+ {
26
+ value: "tritanopia",
27
+ labelKey: "email-editor.cvd-tritanopia",
28
+ descriptionKey: "email-editor.cvd-tritanopia-description"
29
+ },
30
+ {
31
+ value: "achromatopsia",
32
+ labelKey: "email-editor.cvd-achromatopsia",
33
+ descriptionKey: "email-editor.cvd-achromatopsia-description"
34
+ }
35
+ ], t = f(), a = v(), { setColorVisionDeficiency: r } = u(), o = c(!1), n = c(null), s = m(() => {
36
+ const i = e.find((d) => d.value === t.colorVisionDeficiency) ?? e[0];
37
+ return a(i.labelKey);
38
+ }), l = (i) => {
39
+ r(i), o.value = !1;
40
+ };
41
+ return K(n, () => {
42
+ o.value = !1;
43
+ }), { __sfc: !0, OPTIONS: e, editorStore: t, trans: a, setColorVisionDeficiency: r, isOpen: o, root: n, selectedLabel: s, select: l, InIcons: y };
44
+ }
45
+ });
46
+ export {
47
+ V as default
48
+ };