@useinsider/guido 3.20.0 → 3.20.1-beta.07e0277

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 (113) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +11 -10
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +114 -103
  5. package/dist/components/organisms/AutoSaveController.vue2.js +19 -9
  6. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  7. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
  8. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  9. package/dist/components/organisms/header/EditorActions.vue2.js +57 -72
  10. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  11. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
  12. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  13. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  14. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  15. package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
  16. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  17. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  18. package/dist/components/organisms/header/RightSlot.vue.js +11 -10
  19. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  20. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  21. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  22. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
  23. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  24. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  25. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
  26. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  27. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +60 -35
  28. package/dist/composables/useAccessibilityApi.js +51 -0
  29. package/dist/composables/useCustomInterfaceAppearance.js +42 -41
  30. package/dist/composables/useLegacyStrategyConversion.js +16 -16
  31. package/dist/composables/useStripo.js +4 -3
  32. package/dist/config/compiler/itemsCompilerRules.js +21 -5
  33. package/dist/config/compiler/utils/itemsCompilerUtils.js +64 -17
  34. package/dist/config/i18n/en/labels.json.js +36 -4
  35. package/dist/config/i18n/en/tooltips.json.js +2 -1
  36. package/dist/config/migrator/itemsBlockMigrator.js +112 -108
  37. package/dist/extensions/Blocks/Items/block.js +76 -64
  38. package/dist/extensions/Blocks/Items/constants/cardWidth.js +20 -0
  39. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +1 -1
  40. package/dist/extensions/Blocks/Recommendation/block.js +51 -44
  41. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +103 -91
  42. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +308 -218
  43. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +209 -203
  44. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +232 -186
  45. package/dist/extensions/Blocks/Recommendation/utils/blockRefresh.js +19 -0
  46. package/dist/extensions/Blocks/Recommendation/utils/blockUrlConfig.js +25 -0
  47. package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +72 -70
  48. package/dist/extensions/Blocks/Recommendation/utils/compositionKeys.js +69 -60
  49. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +63 -27
  50. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +39 -20
  51. package/dist/guido.css +1 -1
  52. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +271 -192
  53. package/dist/package.json.js +1 -1
  54. package/dist/sprite.svg +10 -0
  55. package/dist/src/@types/config/schemas.d.ts +2 -0
  56. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +19 -1
  57. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  58. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -19
  59. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -19
  60. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  61. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  62. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  63. package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
  64. package/dist/src/composables/useActionsApi.d.ts +2 -2
  65. package/dist/src/composables/useConfig.d.ts +2 -0
  66. package/dist/src/config/compiler/utils/itemsCompilerUtils.d.ts +10 -0
  67. package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +1 -0
  68. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +8 -0
  69. package/dist/src/extensions/Blocks/Items/block.d.ts +5 -0
  70. package/dist/src/extensions/Blocks/Items/constants/cardWidth.d.ts +12 -0
  71. package/dist/src/extensions/Blocks/Items/controls/index.d.ts +40 -0
  72. package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +1 -0
  73. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +2 -0
  74. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +1 -0
  75. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +11 -0
  76. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +3 -0
  77. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +7 -0
  78. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +2 -0
  79. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +20 -3
  80. package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +7 -0
  81. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +7 -0
  82. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +7 -0
  83. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +7 -0
  84. package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +7 -0
  85. package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +7 -0
  86. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +26 -6
  87. package/dist/src/extensions/Blocks/Recommendation/utils/blockRefresh.d.ts +17 -0
  88. package/dist/src/extensions/Blocks/Recommendation/utils/blockUrlConfig.d.ts +4 -0
  89. package/dist/src/extensions/Blocks/Recommendation/utils/compositionKeys.d.ts +4 -0
  90. package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +10 -1
  91. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +7 -0
  92. package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +1 -0
  93. package/dist/src/extensions/Blocks/controlFactories.d.ts +22 -0
  94. package/dist/src/stores/autosave.d.ts +73 -1
  95. package/dist/src/stores/config.d.ts +20 -0
  96. package/dist/src/stores/editor.d.ts +109 -0
  97. package/dist/src/stores/onboarding.d.ts +966 -35
  98. package/dist/src/stores/version-history.d.ts +1 -1
  99. package/dist/src/utils/liquidProtection.d.ts +3 -0
  100. package/dist/src/utils/timeUtil.d.ts +5 -8
  101. package/dist/static/styles/components/accessibility.css.js +234 -0
  102. package/dist/static/styles/components/button.css.js +5 -0
  103. package/dist/static/styles/variables.css.js +2 -0
  104. package/dist/stores/autosave.js +12 -7
  105. package/dist/stores/editor.js +8 -3
  106. package/dist/stores/onboarding.js +48 -22
  107. package/dist/utils/liquidProtection.js +5 -0
  108. package/dist/utils/templatePreparation.js +61 -85
  109. package/dist/utils/timeUtil.js +6 -17
  110. package/package.json +3 -3
  111. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  112. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  113. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,83 +1,68 @@
1
- import { defineComponent as I, computed as c, ref as u } from "vue";
2
- import { useActionsApi as P } from "../../../composables/useActionsApi.js";
3
- import { useConfig as W } from "../../../composables/useConfig.js";
4
- import { useExport as j } from "../../../composables/useExport.js";
5
- import { useTestEmailClick as G } from "../../../composables/useGuidoActions.js";
6
- import { useHtmlCompiler as J } from "../../../composables/useHtmlCompiler.js";
7
- import { useSave as K } from "../../../composables/useSave.js";
8
- import { useSaveValidation as N } from "../../../composables/useSaveValidation.js";
9
- import { useSaveValidationRollout as Q } from "../../../composables/useSaveValidationRollout.js";
10
- import { useToaster as U } from "../../../composables/useToaster.js";
11
- import { useTranslations as X } from "../../../composables/useTranslations.js";
12
- import { useVersionHistoryApi as Y } from "../../../composables/useVersionHistoryApi.js";
13
- import { useLiquidValidator as Z } from "../../../composables/validators/useLiquidValidator.js";
14
- import { ToasterTypeOptions as $ } from "../../../enums/toaster.js";
15
- import { useConfigStore as tt } from "../../../stores/config.js";
16
- import { useEditorStore as ot } from "../../../stores/editor.js";
17
- import { useSaveValidationStore as et } from "../../../stores/save-validation.js";
18
- import { useTemplateStore as rt } from "../../../stores/template.js";
19
- import { getTooltipOptions as it } from "../../../utils/tooltipUtils.js";
20
- import { InButtonV2 as st } from "@useinsider/design-system-vue";
21
- import { storeToRefs as at } from "pinia";
22
- import nt from "./MigrationConfirmModal.vue.js";
23
- const bt = /* @__PURE__ */ I({
1
+ import { defineComponent as F, computed as x, ref as A } from "vue";
2
+ import { useActionsApi as H } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as O } from "../../../composables/useConfig.js";
4
+ import { useTestEmailClick as R } from "../../../composables/useGuidoActions.js";
5
+ import { useHtmlCompiler as B } from "../../../composables/useHtmlCompiler.js";
6
+ import { useSave as z } from "../../../composables/useSave.js";
7
+ import { useSaveValidation as D } from "../../../composables/useSaveValidation.js";
8
+ import { useSaveValidationRollout as I } from "../../../composables/useSaveValidationRollout.js";
9
+ import { useToaster as W } from "../../../composables/useToaster.js";
10
+ import { useTranslations as j } from "../../../composables/useTranslations.js";
11
+ import { useLiquidValidator as G } from "../../../composables/validators/useLiquidValidator.js";
12
+ import { ToasterTypeOptions as J } from "../../../enums/toaster.js";
13
+ import { useAutosaveStore as K } from "../../../stores/autosave.js";
14
+ import { useConfigStore as N } from "../../../stores/config.js";
15
+ import { useEditorStore as P } from "../../../stores/editor.js";
16
+ import { useSaveValidationStore as Q } from "../../../stores/save-validation.js";
17
+ import { useTemplateStore as U } from "../../../stores/template.js";
18
+ import { getTooltipOptions as X } from "../../../utils/tooltipUtils.js";
19
+ import { InButtonV2 as Y } from "@useinsider/design-system-vue";
20
+ import { storeToRefs as Z } from "pinia";
21
+ import $ from "./EditorActionsMenu.vue.js";
22
+ import tt from "./MigrationConfirmModal.vue.js";
23
+ const Vt = /* @__PURE__ */ F({
24
24
  __name: "EditorActions",
25
- setup(lt, { expose: k }) {
26
- const { config: p, isFeatureEnabled: f } = W(), { exportHtml: d } = j(), { save: v } = K(), { validateCurrentTemplate: y } = N(), { isEnabled: i } = Q(), { showToaster: S, handleError: s } = U(), { openVersionHistory: g, closeVersionHistory: h } = Y(), { getCompiledEmail: T } = P(), { compileHtml: w } = J(), { validateLiquidSyntax: E } = Z(), V = tt(), o = ot(), H = et(), x = rt(), { hasMigrations: C } = at(x), r = X(), F = c(() => i.value && V.allowSaveWithErrors ? r("email-editor.save-and-continue") : "Save"), a = u(!1), n = u(!1), _ = u(), l = G(), q = () => {
27
- if (o.isVersionHistoryOpen) {
28
- h();
29
- return;
30
- }
31
- g();
32
- }, B = async () => {
33
- a.value = !0, await d(), a.value = !1;
34
- }, L = () => {
35
- o.isSaveAsTemplateDrawerOpen = !0;
36
- }, R = c(() => o.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), D = c(
37
- () => {
38
- var t, e;
39
- return ((e = (t = p.value) == null ? void 0 : t.features) == null ? void 0 : e.versionHistory) && !o.isPreviewModeOpen;
40
- }
41
- ), A = async (t) => {
42
- n.value = !0, t || (o.loadingStatus = !0);
43
- let e;
25
+ setup(ot, { expose: L }) {
26
+ const { config: M, isFeatureEnabled: r } = O(), { save: u } = z(), { validateCurrentTemplate: c } = D(), { isEnabled: i } = I(), { showToaster: f, handleError: s } = W(), { getCompiledEmail: d } = H(), { compileHtml: p } = B(), { validateLiquidSyntax: v } = G(), S = N(), e = P(), g = Q(), h = U(), y = K(), { hasMigrations: T } = Z(h), b = x(() => r("liquidSyntax") || r("autosave") && y.hasStatusLabel), a = j(), k = x(() => i.value && S.allowSaveWithErrors ? a("email-editor.save-and-continue") : "Save"), n = A(!1), E = A(), l = R(), w = async (t) => {
27
+ n.value = !0, t || (e.loadingStatus = !0);
28
+ let o;
44
29
  try {
45
- e = await v(t);
46
- } catch (b) {
47
- s(b, "Failed to save template");
30
+ o = await u(t);
31
+ } catch (_) {
32
+ s(_, "Failed to save template");
48
33
  } finally {
49
- n.value = !1, !t && !e && (o.loadingStatus = !1);
34
+ n.value = !1, !t && !o && (e.loadingStatus = !1);
50
35
  }
51
- return e;
52
- }, O = (t) => {
53
- var e;
54
- if (!t && C.value) {
55
- (e = _.value) == null || e.open();
36
+ return o;
37
+ }, C = (t) => {
38
+ var o;
39
+ if (!t && T.value) {
40
+ (o = E.value) == null || o.open();
56
41
  return;
57
42
  }
58
- return A(t);
43
+ return w(t);
59
44
  }, m = async () => {
60
- o.loadingStatus = !0;
45
+ e.loadingStatus = !0;
61
46
  try {
62
- return await y();
47
+ return await c();
63
48
  } catch (t) {
64
49
  return console.warn("Test-path validation failed; sending without the drawer.", t), [];
65
50
  } finally {
66
- o.loadingStatus = !1;
51
+ e.loadingStatus = !1;
67
52
  }
68
- }, M = async () => {
53
+ }, V = async () => {
69
54
  const t = await m();
70
- t.length && H.open(t, "test");
71
- }, z = async () => {
55
+ t.length && g.open(t, "test");
56
+ }, q = async () => {
72
57
  if (i.value) {
73
58
  if ((await m()).length) {
74
- S({
75
- type: $.Error,
76
- message: r("email-editor.validation-errors-found"),
59
+ f({
60
+ type: J.Error,
61
+ message: a("email-editor.validation-errors-found"),
77
62
  actionButton: {
78
- text: r("email-editor.check-errors"),
63
+ text: a("email-editor.check-errors"),
79
64
  onClick: () => {
80
- M();
65
+ V();
81
66
  }
82
67
  },
83
68
  autoHide: !1
@@ -87,26 +72,26 @@ const bt = /* @__PURE__ */ I({
87
72
  l();
88
73
  return;
89
74
  }
90
- if (f("liquidSyntax")) {
91
- o.loadingStatus = !0;
75
+ if (r("liquidSyntax")) {
76
+ e.loadingStatus = !0;
92
77
  try {
93
- const { html: t } = await T({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: e } = w(t);
94
- if (!await E(e))
78
+ const { html: t } = await d({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = p(t);
79
+ if (!await v(o))
95
80
  return;
96
81
  } catch (t) {
97
82
  s(t, "Failed to prepare test email");
98
83
  return;
99
84
  } finally {
100
- o.loadingStatus = !1;
85
+ e.loadingStatus = !1;
101
86
  }
102
87
  }
103
88
  l();
104
89
  };
105
- return k({
106
- handleSave: O
107
- }), { __sfc: !0, config: p, isFeatureEnabled: f, exportHtml: d, save: v, validateCurrentTemplate: y, isEnabled: i, showToaster: S, handleError: s, openVersionHistory: g, closeVersionHistory: h, getCompiledEmail: T, compileHtml: w, validateLiquidSyntax: E, configStore: V, editorStore: o, saveValidationStore: H, templateStore: x, hasMigrations: C, trans: r, saveLabel: F, isExporting: a, isSaving: n, migrationModalRef: _, testEmailClick: l, handleVersionHistory: q, handleExport: B, handleSaveAs: L, versionHistoryTooltipText: R, isVersionHistoryButtonVisible: D, executeSave: A, handleSave: O, collectTestErrors: m, openTestErrors: M, handleTestEmail: z, getTooltipOptions: it, InButtonV2: st, MigrationConfirmModal: nt };
90
+ return L({
91
+ handleSave: C
92
+ }), { __sfc: !0, config: M, isFeatureEnabled: r, save: u, validateCurrentTemplate: c, isEnabled: i, showToaster: f, handleError: s, getCompiledEmail: d, compileHtml: p, validateLiquidSyntax: v, configStore: S, editorStore: e, saveValidationStore: g, templateStore: h, autosaveStore: y, hasMigrations: T, hasContentOnTheLeft: b, trans: a, saveLabel: k, isSaving: n, migrationModalRef: E, testEmailClick: l, executeSave: w, handleSave: C, collectTestErrors: m, openTestErrors: V, handleTestEmail: q, getTooltipOptions: X, InButtonV2: Y, EditorActionsMenu: $, MigrationConfirmModal: tt };
108
93
  }
109
94
  });
110
95
  export {
111
- bt as default
96
+ Vt as default
112
97
  };
@@ -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
  };
@@ -10,7 +10,7 @@ var a = function() {
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "b8f24f34"
13
+ "9d988e4b"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,40 +1,45 @@
1
- import { defineComponent as m, computed as p, ref as d } from "vue";
2
- import { useConfig as k } from "../../../composables/useConfig.js";
3
- import { useBack as B } from "../../../composables/useGuidoActions.js";
4
- import { usePreviewMode as b } from "../../../composables/usePreviewMode.js";
5
- import { useTranslations as v } from "../../../composables/useTranslations.js";
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 y } from "../../../stores/editor.js";
8
- import { InButtonV2 as w } from "@useinsider/design-system-vue";
9
- import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
10
- const D = /* @__PURE__ */ m({
8
+ import { useEditorStore as g } from "../../../stores/editor.js";
9
+ import { InButtonV2 as O } from "@useinsider/design-system-vue";
10
+ import { useDebounceFn as w } from "../../../node_modules/@vueuse/shared/index.js";
11
+ const F = /* @__PURE__ */ p({
11
12
  __name: "LeftSlot",
12
- setup(C) {
13
- const e = y(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), l = p(() => {
14
- var u, f;
15
- return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (f = (u = t.value) == null ? void 0 : u.ui) != null && f.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
16
- }), r = d(!1), a = () => {
13
+ setup(M) {
14
+ const e = g(), s = y(), { closeVersionHistory: r } = _(), { closePreviewMode: n } = v(), { closeAccessibilityTestingMode: c } = k(), o = A(), { config: t } = B(), m = d(() => {
15
+ var l, f;
16
+ return e.isVersionHistoryOpen || e.isPreviewModeOpen || e.isAccessibilityTestingOpen ? o("email-editor.back-to-editor") : (f = (l = t.value) == null ? void 0 : l.ui) != null && f.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
17
+ }), i = b(!1), a = () => {
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
- }, c = V(async () => {
30
+ s();
31
+ }, u = w(async () => {
27
32
  try {
28
33
  await a();
29
34
  } finally {
30
- r.value = !1;
35
+ i.value = !1;
31
36
  }
32
37
  }, 500);
33
- return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: l, isBackButtonDisabled: r, executeBackAction: a, debouncedBackAction: c, handleBackClick: () => {
34
- r.value = !0, c();
35
- }, InButtonV2: w };
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 };
36
41
  }
37
42
  });
38
43
  export {
39
- D as default
44
+ F as default
40
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";
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(
1
+ import i from "./RightSlot.vue2.js";
2
+ /* empty css */
3
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
+ var e = this, o = e._self._c, t = e._self._setupProxy;
6
+ return o("div", { staticClass: "d-f a-i-c right-slot" }, [t.editorStore.isNormalMode ? o(t.AutoSaveStatus) : e._e(), t.isLiquidEnabled && t.editorStore.isNormalMode ? o(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.editorStore.isNormalMode ? o(t.EditorActions) : t.editorStore.isVersionHistoryOpen ? o(t.RestoreButton) : e._e()], 1);
7
+ }, a = [], d = /* @__PURE__ */ r(
8
+ i,
7
9
  s,
8
- r,
9
10
  a,
10
11
  !1,
11
12
  null,
12
- null
13
+ "77451c9a"
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,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 e, computed as s } from "vue";
2
+ import { useConfig as n } from "../../../composables/useConfig.js";
3
+ import { useTranslations as m } 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 a from "./AutoSaveStatus.vue.js";
7
+ import f from "./EditorActions.vue.js";
8
+ import d from "./version-history/RestoreButton.vue.js";
9
+ const q = /* @__PURE__ */ e({
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(c) {
12
+ const { isFeatureEnabled: o } = n(), t = m(), r = p(), i = s(() => o("liquidSyntax"));
13
+ return { __sfc: !0, isFeatureEnabled: o, trans: t, editorStore: r, isLiquidEnabled: i, InChips: u, AutoSaveStatus: a, EditorActions: f, RestoreButton: d };
19
14
  }
20
15
  });
21
16
  export {
22
- T as default
17
+ q 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-no-image-v2", 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
+ "391019bc"
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
+ };