@useinsider/guido 3.18.0-beta.19e1253 → 3.18.0-beta.206bb3f

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 (59) hide show
  1. package/dist/@types/config/schemas.js +15 -13
  2. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -15
  3. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +41 -43
  4. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  5. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +27 -0
  6. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  7. package/dist/components/organisms/header/EditorActions.vue2.js +34 -50
  8. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  9. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +43 -0
  10. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
  12. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  13. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  14. package/dist/components/organisms/header/RightSlot.vue.js +7 -6
  15. package/dist/components/organisms/header/RightSlot.vue2.js +17 -15
  16. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  17. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  18. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +24 -0
  19. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  20. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +18 -0
  21. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +81 -0
  22. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -34
  23. package/dist/composables/useAccessibilityApi.js +31 -0
  24. package/dist/composables/useCustomInterfaceAppearance.js +31 -28
  25. package/dist/config/i18n/en/labels.json.js +28 -4
  26. package/dist/config/i18n/en/tooltips.json.js +2 -1
  27. package/dist/enums/extensions/recommendationBlock.js +11 -12
  28. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +20 -19
  29. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +70 -98
  30. package/dist/guido.css +1 -1
  31. package/dist/node_modules/@vueuse/core/index.js +102 -0
  32. package/dist/node_modules/@vueuse/shared/index.js +40 -28
  33. package/dist/package.json.js +1 -1
  34. package/dist/sprite.svg +6 -0
  35. package/dist/src/@types/config/schemas.d.ts +4 -0
  36. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  37. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  38. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  40. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  41. package/dist/src/composables/useActionsApi.d.ts +2 -2
  42. package/dist/src/composables/useConfig.d.ts +2 -0
  43. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
  44. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -18
  45. package/dist/src/stores/config.d.ts +18 -0
  46. package/dist/src/stores/editor.d.ts +76 -0
  47. package/dist/src/stores/onboarding.d.ts +377 -0
  48. package/dist/src/stores/version-history.d.ts +1 -1
  49. package/dist/src/utils/timeUtil.d.ts +10 -0
  50. package/dist/static/styles/components/accessibility.css.js +140 -0
  51. package/dist/static/styles/components/recommendation-strategy.css.js +4 -1
  52. package/dist/static/styles/variables.css.js +1 -0
  53. package/dist/stores/editor.js +4 -1
  54. package/dist/stores/onboarding.js +16 -11
  55. package/dist/utils/timeUtil.js +7 -17
  56. package/package.json +2 -2
  57. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  58. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  59. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,36 +1,41 @@
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 v } from "../../../composables/useGuidoActions.js";
5
+ import { usePreviewMode as y } 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 = v(), { closeVersionHistory: r } = _(), { closePreviewMode: n } = y(), { closeAccessibilityTestingMode: c } = k(), o = A(), { config: t } = B(), f = d(() => {
15
+ var l, m;
16
+ return e.isVersionHistoryOpen || e.isPreviewModeOpen || e.isAccessibilityTestingOpen ? o("email-editor.back-to-editor") : (m = (l = t.value) == null ? void 0 : l.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
17
+ }), i = b(!1), a = () => {
17
18
  if (e.isVersionHistoryOpen) {
18
- n();
19
+ r();
19
20
  return;
20
21
  }
21
22
  if (e.isPreviewModeOpen) {
22
- s();
23
+ n();
24
+ return;
25
+ }
26
+ if (e.isAccessibilityTestingOpen) {
27
+ c();
23
28
  return;
24
29
  }
25
- i();
26
- }, a = y(() => {
27
- c(), r.value = !1;
30
+ s();
31
+ }, u = M(() => {
32
+ a(), i.value = !1;
28
33
  }, 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 };
34
+ return { __sfc: !0, editorStore: e, handleBack: s, closeVersionHistory: r, closePreviewMode: n, closeAccessibilityTestingMode: c, trans: o, config: t, backButtonLabel: f, isBackButtonDisabled: i, executeBackAction: a, debouncedBackAction: u, handleBackClick: () => {
35
+ i.value = !0, u();
36
+ }, InButtonV2: O };
32
37
  }
33
38
  });
34
39
  export {
35
- D as default
40
+ F as default
36
41
  };
@@ -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
1
  import s 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(
5
+ var e = this, i = e._self._c, t = e._self._setupProxy;
6
+ return i("div", { staticClass: "d-f a-i-c right-slot" }, [t.isNormalMode ? i(t.AutoSaveStatus) : e._e(), t.isLiquidEnabled && t.isNormalMode ? i(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 ? i(t.EditorActions, { ref: "editorActionsRef" }) : t.editorStore.isVersionHistoryOpen ? i(t.RestoreButton) : e._e()], 1);
7
+ }, a = [], d = /* @__PURE__ */ o(
7
8
  s,
8
9
  r,
9
10
  a,
10
11
  !1,
11
12
  null,
12
- null
13
+ "1ad38e93"
13
14
  );
14
- const u = n.exports;
15
+ const c = d.exports;
15
16
  export {
16
- u as default
17
+ c as default
17
18
  };
@@ -1,23 +1,25 @@
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 u, ref as f, computed as r } from "vue";
2
+ import { useConfig as c } from "../../../composables/useConfig.js";
3
3
  import { useTranslations as d } from "../../../composables/useTranslations.js";
4
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({
5
+ import { InChips as S } from "@useinsider/design-system-vue";
6
+ import _ from "./AutoSaveStatus.vue.js";
7
+ import h from "./EditorActions.vue.js";
8
+ import v from "./version-history/RestoreButton.vue.js";
9
+ const O = /* @__PURE__ */ u({
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);
11
+ setup(A, { expose: s }) {
12
+ const { isFeatureEnabled: t } = c(), n = d(), o = l(), e = f(null), m = r(() => t("liquidSyntax")), a = r(
13
+ () => !o.isVersionHistoryOpen && !o.isAccessibilityTestingOpen
14
+ );
15
+ return s({
16
+ handleSave: (p) => {
17
+ var i;
18
+ return (i = e.value) == null ? void 0 : i.handleSave(p);
17
19
  }
18
- }), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
20
+ }), { __sfc: !0, isFeatureEnabled: t, trans: n, editorStore: o, editorActionsRef: e, isLiquidEnabled: m, isNormalMode: a, InChips: S, AutoSaveStatus: _, EditorActions: h, RestoreButton: v };
19
21
  }
20
22
  });
21
23
  export {
22
- T as default
24
+ O as default
23
25
  };
@@ -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": "", "segment-list": t.segmentList, selected: t.editorStore.editorVisualMode }, on: { click: t.handleView } })], 1);
7
+ }, l = [], n = /* @__PURE__ */ s(
8
+ i,
9
+ a,
10
+ l,
11
+ !1,
12
+ null,
13
+ "4e1e854b"
14
+ );
15
+ const _ = n.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,24 @@
1
+ import n from "./ColorVisionSelect.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var l = function() {
5
+ var t = this, o = t._self._c, e = t._self._setupProxy;
6
+ return o("div", { ref: "root", staticClass: "color-vision-select p-r" }, [o(e.InButtonV2, { attrs: { id: "guido__a11y-color-vision-trigger", "left-icon": "line-show-on", "right-icon": "line-chevron-small-down", type: "secondary", "disabled-status": e.editorStore.loadingStatus, "label-text": e.selectedLabel }, on: { click: function(s) {
7
+ e.isOpen = !e.isOpen;
8
+ } } }), e.isOpen ? o("div", { staticClass: "color-vision-select__menu p-a" }, t._l(e.OPTIONS, function(s) {
9
+ return o("button", { key: s.value || "none", staticClass: "color-vision-select__option d-f f-d-c", class: { "color-vision-select__option_selected": s.value === e.editorStore.colorVisionDeficiency }, attrs: { type: "button" }, on: { click: function(_) {
10
+ return e.select(s.value);
11
+ } } }, [o("span", { staticClass: "color-vision-select__option-label f-s-2" }, [t._v(t._s(e.trans(s.labelKey)))]), s.descriptionKey ? o("span", { staticClass: "color-vision-select__option-description f-s-1 t-c-53" }, [t._v(" " + t._s(e.trans(s.descriptionKey)) + " ")]) : t._e()]);
12
+ }), 0) : t._e()], 1);
13
+ }, r = [], c = /* @__PURE__ */ i(
14
+ n,
15
+ l,
16
+ r,
17
+ !1,
18
+ null,
19
+ "869e2871"
20
+ );
21
+ const f = c.exports;
22
+ export {
23
+ f 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 { InButtonV2 as y } from "@useinsider/design-system-vue";
6
+ import { onClickOutside as K } from "../../../../node_modules/@vueuse/core/index.js";
7
+ const A = /* @__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), l = m(() => {
36
+ const i = e.find((d) => d.value === t.colorVisionDeficiency) ?? e[0];
37
+ return a(i.labelKey);
38
+ }), s = (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: l, select: s, InButtonV2: y };
44
+ }
45
+ });
46
+ export {
47
+ A as default
48
+ };
@@ -0,0 +1,18 @@
1
+ import b from "./EditorTabBarOnboarding.vue2.js";
2
+ import g from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var l = function() {
4
+ var t, a, n, i, e, s;
5
+ var r = this, d = r._self._c, o = r._self._setupProxy;
6
+ return o.isVisible ? d(o.InOnboard, { key: "guido__tab-bar-onboard", staticClass: "w-21-s p-a z-11", class: (t = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : t.classes, attrs: { id: "guido__tab-bar-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (a = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : a.bottom, "left-position": (n = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : n.left, "pages-config": o.onboardingStore.onboardings.editorTabBarOnboarding.config, "pointer-position": (i = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : i.position, "right-position": (e = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : e.right, "top-position": (s = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: o.finish, nextButtonClick: o.handleNext } }) : r._e();
7
+ }, _ = [], p = /* @__PURE__ */ g(
8
+ b,
9
+ l,
10
+ _,
11
+ !1,
12
+ null,
13
+ null
14
+ );
15
+ const f = p.exports;
16
+ export {
17
+ f as default
18
+ };
@@ -0,0 +1,81 @@
1
+ import { defineComponent as k, computed as T, watch as f, nextTick as C } from "vue";
2
+ import { useConfig as h } from "../../../composables/useConfig.js";
3
+ import { useRibbonOffset as _ } from "../../../composables/useRibbonOffset.js";
4
+ import { useTranslations as O } from "../../../composables/useTranslations.js";
5
+ import { useOnboardingStore as y } from "../../../stores/onboarding.js";
6
+ import { InOnboard as v } from "@useinsider/design-system-vue";
7
+ const I = /* @__PURE__ */ k({
8
+ __name: "EditorTabBarOnboarding",
9
+ setup(R) {
10
+ const e = "editorTabBarOnboarding", o = O(), i = y(), { getTopPosition: a } = _(), { isFeatureEnabled: b } = h(), c = () => i.next(e), s = () => i.previous(e), d = () => void i.close(e), u = 4, r = (t, n) => {
11
+ const p = document.querySelector(t);
12
+ return p ? `${Math.round(window.innerWidth - p.getBoundingClientRect().left - u)}px` : `${n}px`;
13
+ }, g = () => b("autosave") ? [{
14
+ classes: "guido-tab-bar-onboarding",
15
+ // Anchored to the kebab, not to .auto-save-status: the strip renders empty (zero
16
+ // width) until the first save, which is exactly the state this first-boot tour runs
17
+ // in — and the Autosave toggle the card talks about lives inside the kebab anyway.
18
+ right: r("#guido__kebab-button", 150),
19
+ top: a(56),
20
+ position: "Right Top",
21
+ title: o("email-editor.onboarding-autosave-title"),
22
+ description: o("email-editor.onboarding-autosave-description"),
23
+ imageSource: "",
24
+ backButtonType: "text",
25
+ backButtonText: o("action-builder.back"),
26
+ backButtonClick: s,
27
+ nextButtonType: "text",
28
+ nextButtonText: o("action-builder.next"),
29
+ nextButtonClick: c
30
+ }] : [], l = () => [
31
+ {
32
+ classes: "guido-tab-bar-onboarding",
33
+ right: r("#guido__kebab-button", 150),
34
+ top: a(56),
35
+ position: "Right Top",
36
+ title: o("email-editor.onboarding-kebab-title"),
37
+ description: o("email-editor.onboarding-kebab-description"),
38
+ imageSource: "",
39
+ backButtonClick: () => {
40
+ },
41
+ nextButtonType: "text",
42
+ nextButtonText: o("action-builder.next"),
43
+ nextButtonClick: c
44
+ },
45
+ ...g(),
46
+ {
47
+ classes: "guido-tab-bar-onboarding",
48
+ right: r("#guido__kebab-button", 150),
49
+ top: a(56),
50
+ position: "Right Top",
51
+ title: o("email-editor.onboarding-accessibility-title"),
52
+ description: o("email-editor.onboarding-accessibility-description"),
53
+ imageSource: "",
54
+ backButtonType: "text",
55
+ backButtonText: o("action-builder.back"),
56
+ backButtonClick: s,
57
+ nextButtonType: "text",
58
+ nextButtonText: o("action-builder.ok"),
59
+ nextButtonClick: d
60
+ }
61
+ ], x = T(
62
+ () => i.onboardings.editorTabBarOnboarding.config.length > 0 && i.onboardings.editorTabBarOnboarding.isActive
63
+ ), B = () => {
64
+ var t, n;
65
+ (n = (t = i.getEditorTabBarCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
66
+ }, m = () => {
67
+ var t, n;
68
+ (n = (t = i.getEditorTabBarCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
69
+ };
70
+ return f(
71
+ () => i.onboardings.editorTabBarOnboarding.isActive,
72
+ async (t) => {
73
+ t && (await C(), i.setConfig(e, l()));
74
+ },
75
+ { immediate: !0 }
76
+ ), { __sfc: !0, ONBOARDING: e, trans: o, onboardingStore: i, getTopPosition: a, isFeatureEnabled: b, goNext: c, goBack: s, finish: d, ANCHOR_GAP: u, rightOffsetOf: r, autoSaveCard: g, buildOnboardingCards: l, isVisible: x, handleNext: B, handleBack: m, InOnboard: v };
77
+ }
78
+ });
79
+ export {
80
+ I as default
81
+ };
@@ -1,46 +1,55 @@
1
- import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
2
- import u from "./AMPOnboarding.vue.js";
3
- import v from "./GenericOnboarding.vue.js";
4
- import l from "./ItemsOnboarding.vue.js";
5
- import y from "./NewVersionPopup.vue.js";
6
- import S from "./TextBlockOnboarding.vue.js";
7
- import h from "./VersionHistoryOnboarding.vue.js";
8
- import { usePartner as w } from "../../../composables/usePartner.js";
9
- import { useEditorStore as P } from "../../../stores/editor.js";
10
- import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
11
- import { usePreviewStore as A } from "../../../stores/preview.js";
12
- const G = /* @__PURE__ */ b({
1
+ import { defineComponent as O, computed as a, onMounted as u, watch as e } from "vue";
2
+ import l from "./AMPOnboarding.vue.js";
3
+ import v from "./EditorTabBarOnboarding.vue.js";
4
+ import y from "./GenericOnboarding.vue.js";
5
+ import S from "./ItemsOnboarding.vue.js";
6
+ import h from "./NewVersionPopup.vue.js";
7
+ import w from "./TextBlockOnboarding.vue.js";
8
+ import P from "./VersionHistoryOnboarding.vue.js";
9
+ import { useConfig as A } from "../../../composables/useConfig.js";
10
+ import { usePartner as T } from "../../../composables/usePartner.js";
11
+ import { useEditorStore as _ } from "../../../stores/editor.js";
12
+ import { useOnboardingStore as H } from "../../../stores/onboarding.js";
13
+ import { usePreviewStore as B } from "../../../stores/preview.js";
14
+ const j = /* @__PURE__ */ O({
13
15
  __name: "OnboardingWrapper",
14
16
  emits: ["onboarding-finished"],
15
- setup(H, { emit: f }) {
16
- const o = _(), r = P(), s = A(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
17
- { type: "newVersionPopup", component: y },
18
- { type: "genericOnboarding", component: v },
19
- { type: "textBlockOnboarding", component: S },
20
- { type: "versionHistoryOnboarding", component: h },
21
- { type: "ampOnboarding", component: u },
22
- { type: "itemsOnboarding", component: l }
23
- ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
24
- return O(async () => {
17
+ setup(M, { emit: g }) {
18
+ const o = H(), i = _(), d = B(), { isTestPartner: p } = T(), { isFeatureEnabled: m } = A(), t = a(() => i.isStripoInitialized), s = a(() => p()), b = [
19
+ { type: "newVersionPopup", component: h },
20
+ { type: "genericOnboarding", component: y },
21
+ { type: "textBlockOnboarding", component: w },
22
+ { type: "versionHistoryOnboarding", component: P },
23
+ { type: "ampOnboarding", component: l },
24
+ { type: "itemsOnboarding", component: S },
25
+ { type: "editorTabBarOnboarding", component: v }
26
+ ], c = (n) => s.value || !t.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = a(() => b.filter((n) => c(n.type)));
27
+ return u(async () => {
25
28
  await o.fetchUserModalState();
26
- }), t(
27
- () => r.isVersionHistoryOpen,
28
- (n, i) => {
29
- n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
29
+ }), e(
30
+ () => i.isVersionHistoryOpen,
31
+ (n, r) => {
32
+ n && !r && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && r && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
30
33
  }
31
- ), t(
32
- () => s.emailFormat,
33
- (n, i) => {
34
- i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
34
+ ), e(
35
+ () => d.emailFormat,
36
+ (n, r) => {
37
+ r !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
35
38
  }
36
- ), t(
37
- () => r.isPreviewModeOpen,
39
+ ), e(
40
+ () => i.isPreviewModeOpen,
38
41
  (n) => {
39
42
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
40
43
  }
41
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
44
+ ), e(
45
+ t,
46
+ (n) => {
47
+ n && m("accessibilityTesting") && !s.value && !o.isOnboardingActive() && o.shouldShowOnboarding("editorTabBarOnboarding") && o.start("editorTabBarOnboarding");
48
+ },
49
+ { immediate: !0 }
50
+ ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: i, previewStore: d, isTestPartner: p, isFeatureEnabled: m, isStripoReady: t, isTestPartnerActive: s, onboardingConfigs: b, shouldShow: c, visibleOnboardings: f };
42
51
  }
43
52
  });
44
53
  export {
45
- G as default
54
+ j as default
46
55
  };
@@ -0,0 +1,31 @@
1
+ import { useEditorStore as r } from "../stores/editor.js";
2
+ const A = () => {
3
+ const e = r(), i = () => window.StripoEditorApi.accessibilityApi, s = () => {
4
+ i().openAccessibilityTestingMode(), e.isAccessibilityTestingOpen = !0;
5
+ }, o = () => {
6
+ i().closeAccessibilityTestingMode(), e.isAccessibilityTestingOpen = !1, e.imagesHidden = !1, e.colorVisionDeficiency = "";
7
+ }, g = () => e.isAccessibilityTestingOpen ? o() : s(), l = () => i().isAccessibilityTestingModeOpen(), t = () => {
8
+ i().showImages(), e.imagesHidden = !1;
9
+ }, c = () => {
10
+ i().hideImages(), e.imagesHidden = !0;
11
+ };
12
+ return {
13
+ openAccessibilityTestingMode: s,
14
+ closeAccessibilityTestingMode: o,
15
+ toggleAccessibilityTestingMode: g,
16
+ isAccessibilityTestingModeOpen: l,
17
+ showImages: t,
18
+ hideImages: c,
19
+ toggleImages: () => e.imagesHidden ? t() : c(),
20
+ setColorVisionDeficiency: (n) => {
21
+ i().setColorVisionDeficiency(n), e.colorVisionDeficiency = n;
22
+ },
23
+ getColorVisionDeficiency: () => i().getColorVisionDeficiency(),
24
+ switchToDesktopPreview: () => i().switchToDesktopPreview(),
25
+ switchToMobilePreview: () => i().switchToMobilePreview(),
26
+ toggleCodeEditor: () => i().emitToggleCodeEditor()
27
+ };
28
+ };
29
+ export {
30
+ A as useAccessibilityApi
31
+ };