@useinsider/guido 3.22.0 → 3.23.0-beta.1939f5d

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 (138) hide show
  1. package/README.md +45 -4
  2. package/dist/@types/config/schemas.js +25 -22
  3. package/dist/components/Guido.vue.js +2 -2
  4. package/dist/components/Guido.vue2.js +128 -103
  5. package/dist/components/organisms/AutoSaveController.vue2.js +20 -10
  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 +58 -73
  10. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  11. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +99 -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/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js +17 -0
  29. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue2.js +30 -0
  30. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +11 -11
  31. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +9 -9
  32. package/dist/composables/useAccessibilityApi.js +51 -0
  33. package/dist/composables/useCustomInterfaceAppearance.js +42 -41
  34. package/dist/composables/useEditorOpenMetrics.js +167 -0
  35. package/dist/composables/useModuleRepair.js +32 -23
  36. package/dist/composables/useStripo.js +93 -82
  37. package/dist/config/compiler/utils/recommendationCompilerUtils.js +22 -22
  38. package/dist/config/i18n/en/labels.json.js +36 -4
  39. package/dist/config/i18n/en/tooltips.json.js +2 -1
  40. package/dist/config/migrator/index.js +10 -9
  41. package/dist/config/migrator/legacyUnsubscribeTextMigrator.js +16 -0
  42. package/dist/config/migrator/recommendation/compositionMapper.js +56 -49
  43. package/dist/config/migrator/recommendation/extractors.js +100 -40
  44. package/dist/config/migrator/recommendation/htmlBuilder.js +285 -207
  45. package/dist/config/migrator/recommendation/settingsMapper.js +37 -36
  46. package/dist/config/migrator/recommendation/themeMapper.js +53 -41
  47. package/dist/config/migrator/recommendationMigrator.js +68 -61
  48. package/dist/enums/academy.js +2 -1
  49. package/dist/extensions/Blocks/Items/controls/button/link.js +14 -17
  50. package/dist/extensions/Blocks/Items/controls/cardComposition.js +14 -17
  51. package/dist/extensions/Blocks/Items/controls/image/link.js +14 -17
  52. package/dist/extensions/Blocks/Items/controls/name/trimming.js +9 -10
  53. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +24 -25
  54. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +12 -13
  55. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +29 -30
  56. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +15 -16
  57. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +25 -26
  58. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +27 -28
  59. package/dist/extensions/Blocks/Items/controls/settingsControl.js +75 -80
  60. package/dist/extensions/Blocks/Recommendation/block.js +33 -24
  61. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +3 -3
  62. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +27 -26
  63. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +13 -13
  64. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +165 -175
  65. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +5 -5
  66. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +8 -8
  67. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +15 -15
  68. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +12 -12
  69. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +10 -10
  70. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +1 -1
  71. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +23 -22
  72. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +19 -18
  73. package/dist/extensions/Blocks/Recommendation/templates/utils.js +82 -91
  74. package/dist/extensions/Blocks/Recommendation/utils/inlinePriceOrder.js +12 -0
  75. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +3 -2
  76. package/dist/extensions/Blocks/common-control.js +62 -55
  77. package/dist/guido.css +1 -1
  78. package/dist/library.js +12 -10
  79. package/dist/package.json.js +6 -4
  80. package/dist/public/prefetchRuntime.js +4 -0
  81. package/dist/sprite.svg +10 -0
  82. package/dist/src/@types/config/schemas.d.ts +6 -0
  83. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +19 -1
  84. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  85. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -19
  86. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -19
  87. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  88. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  89. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  90. package/dist/src/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.d.ts +2 -0
  91. package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
  92. package/dist/src/composables/useActionsApi.d.ts +2 -2
  93. package/dist/src/composables/useConfig.d.ts +4 -0
  94. package/dist/src/composables/useEditorOpenMetrics.d.ts +27 -0
  95. package/dist/src/composables/useModuleRepair.d.ts +2 -11
  96. package/dist/src/composables/useStripo.d.ts +2 -1
  97. package/dist/src/config/migrator/legacyUnsubscribeTextMigrator.d.ts +1 -0
  98. package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +3 -1
  99. package/dist/src/config/migrator/recommendation/extractors.d.ts +35 -6
  100. package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +3 -1
  101. package/dist/src/config/migrator/recommendation/themeMapper.d.ts +3 -1
  102. package/dist/src/config/migrator/recommendation/types.d.ts +11 -1
  103. package/dist/src/enums/academy.d.ts +1 -0
  104. package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -1
  105. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +1 -0
  106. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +5 -10
  107. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +1 -13
  108. package/dist/src/extensions/Blocks/Recommendation/utils/inlinePriceOrder.d.ts +9 -0
  109. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +2 -19
  110. package/dist/src/extensions/Blocks/common-control.d.ts +2 -0
  111. package/dist/src/library.d.ts +1 -0
  112. package/dist/src/public/prefetchRuntime.d.ts +1 -0
  113. package/dist/src/stores/autosave.d.ts +73 -1
  114. package/dist/src/stores/config.d.ts +40 -0
  115. package/dist/src/stores/editor.d.ts +136 -0
  116. package/dist/src/stores/onboarding.d.ts +966 -35
  117. package/dist/src/stores/unsubscribe.d.ts +10 -0
  118. package/dist/src/stores/version-history.d.ts +1 -1
  119. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +10 -0
  120. package/dist/src/utils/runtimePrefetch.d.ts +4 -0
  121. package/dist/src/utils/stripoRuntime.d.ts +3 -0
  122. package/dist/src/utils/templatePreparation.d.ts +1 -1
  123. package/dist/src/utils/timeUtil.d.ts +5 -8
  124. package/dist/static/stripo-runtime-manifest.json.js +9 -0
  125. package/dist/static/styles/components/accessibility.css.js +234 -0
  126. package/dist/static/styles/variables.css.js +2 -0
  127. package/dist/stores/autosave.js +12 -7
  128. package/dist/stores/editor.js +9 -3
  129. package/dist/stores/onboarding.js +48 -22
  130. package/dist/stores/unsubscribe.js +33 -29
  131. package/dist/utils/legacyUnsubscribeConversion.js +49 -0
  132. package/dist/utils/runtimePrefetch.js +26 -0
  133. package/dist/utils/stripoRuntime.js +13 -0
  134. package/dist/utils/timeUtil.js +6 -17
  135. package/package.json +8 -3
  136. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  137. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  138. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -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
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as d, ref as p, computed as c } from "vue";
2
+ import { useAccessibilityApi as m } from "../../../../composables/useAccessibilityApi.js";
3
+ import { useTranslations as u } from "../../../../composables/useTranslations.js";
4
+ import { useEditorStore as v } from "../../../../stores/editor.js";
5
+ import { InDropdownMenu as f, InButtonV2 as y } from "@useinsider/design-system-vue";
6
+ const C = /* @__PURE__ */ d({
7
+ __name: "ColorVisionSelect",
8
+ setup(K) {
9
+ const i = "none", a = [
10
+ {
11
+ value: i,
12
+ labelKey: "email-editor.cvd-none"
13
+ },
14
+ {
15
+ value: "protanopia",
16
+ labelKey: "email-editor.cvd-protanopia",
17
+ descriptionKey: "email-editor.cvd-protanopia-description"
18
+ },
19
+ {
20
+ value: "deuteranopia",
21
+ labelKey: "email-editor.cvd-deuteranopia",
22
+ descriptionKey: "email-editor.cvd-deuteranopia-description"
23
+ },
24
+ {
25
+ value: "tritanopia",
26
+ labelKey: "email-editor.cvd-tritanopia",
27
+ descriptionKey: "email-editor.cvd-tritanopia-description"
28
+ },
29
+ {
30
+ value: "achromatopsia",
31
+ labelKey: "email-editor.cvd-achromatopsia",
32
+ descriptionKey: "email-editor.cvd-achromatopsia-description"
33
+ }
34
+ ], r = v(), o = u(), { setColorVisionDeficiency: n } = m(), s = p(!1), t = c(() => a.map((e) => ({
35
+ text: o(e.labelKey),
36
+ value: e.value,
37
+ ...e.descriptionKey ? { description: o(e.descriptionKey) } : {}
38
+ }))), l = c(
39
+ () => t.value.find((e) => e.value === (r.colorVisionDeficiency || i)) ?? t.value[0]
40
+ );
41
+ return { __sfc: !0, NONE: i, OPTIONS: a, editorStore: r, trans: o, setColorVisionDeficiency: n, isOpen: s, options: t, selectedOption: l, select: ({ value: e }) => {
42
+ n(e === i ? "" : e), s.value = !1;
43
+ }, InButtonV2: y, InDropdownMenu: f };
44
+ }
45
+ });
46
+ export {
47
+ C as default
48
+ };
@@ -0,0 +1,19 @@
1
+ import i from "./EditorTabBarOnboarding.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
+ var r, n;
6
+ var t = this, e = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? e(o.InOnboard, { key: "guido__tab-bar-onboard", staticClass: "w-21-s p-a z-11", class: (r = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : r.classes, attrs: { id: o.CARD_ID, "is-multiple-page": "", visible: "", "image-source": "", title: "", "pages-config": o.onboardingStore.onboardings.editorTabBarOnboarding.config, "pointer-position": (n = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : n.position, "right-position": o.placement.right, "top-position": o.placement.top }, on: { backButtonClick: o.handleBack, close: o.finish, nextButtonClick: o.handleNext } }) : t._e();
8
+ }, c = [], d = /* @__PURE__ */ a(
9
+ i,
10
+ s,
11
+ c,
12
+ !1,
13
+ null,
14
+ "219b4f7c"
15
+ );
16
+ const g = d.exports;
17
+ export {
18
+ g as default
19
+ };
@@ -0,0 +1,90 @@
1
+ import { defineComponent as M, ref as q, computed as P, watch as I, nextTick as N } from "vue";
2
+ import { useConfig as D } from "../../../composables/useConfig.js";
3
+ import { useRibbonOffset as F } from "../../../composables/useRibbonOffset.js";
4
+ import { useTranslations as G } from "../../../composables/useTranslations.js";
5
+ import { useOnboardingStore as K } from "../../../stores/onboarding.js";
6
+ import { InOnboard as $ } from "@useinsider/design-system-vue";
7
+ const Q = /* @__PURE__ */ M({
8
+ __name: "EditorTabBarOnboarding",
9
+ setup(H) {
10
+ const r = "editorTabBarOnboarding", B = "guido__tab-bar-onboard", i = G(), o = K(), { isFeatureEnabled: x } = D(), { getTopPosition: f } = F(), k = () => o.next(r), T = () => o.previous(r), _ = () => void o.close(r), C = 4, O = 17, d = "#guido__kebab-button", b = ".editor-actions-menu__dropdown", c = (t, e, n) => ({
11
+ classes: "guido-tab-bar-onboarding",
12
+ position: "Right Top",
13
+ title: i(t),
14
+ description: i(e),
15
+ imageSource: "",
16
+ backButtonType: "text",
17
+ backButtonText: i("action-builder.back"),
18
+ backButtonClick: T,
19
+ nextButtonType: "text",
20
+ nextButtonText: i("action-builder.next"),
21
+ nextButtonClick: k,
22
+ ...n
23
+ }), g = { backButtonType: void 0, backButtonText: void 0, backButtonClick: () => {
24
+ } }, v = () => x("autosave") ? [{
25
+ card: c("email-editor.onboarding-autosave-title", "email-editor.onboarding-autosave-description", {
26
+ pinsMenu: !0
27
+ }),
28
+ edge: b,
29
+ target: '[data-attr-value="guido__kebab-autosave"]'
30
+ }] : [], h = () => [
31
+ {
32
+ card: c("email-editor.onboarding-kebab-title", "email-editor.onboarding-kebab-description", g),
33
+ edge: d,
34
+ target: d
35
+ },
36
+ ...v(),
37
+ {
38
+ card: c("email-editor.onboarding-accessibility-title", "email-editor.onboarding-accessibility-description", {
39
+ nextButtonText: i("action-builder.ok"),
40
+ nextButtonClick: _,
41
+ pinsMenu: !0
42
+ }),
43
+ edge: b,
44
+ target: '[data-attr-value="guido__kebab-accessibility"]'
45
+ }
46
+ ], y = (t, e) => {
47
+ if (e <= 0 || e >= t.length)
48
+ return { steps: t, offset: 0 };
49
+ const [n, ...a] = t.slice(e);
50
+ return { steps: [{ ...n, card: { ...n.card, ...g } }, ...a], offset: e };
51
+ }, l = () => ({ top: f(56), right: "150px" });
52
+ let s = [];
53
+ const p = q(l()), m = async () => {
54
+ var R;
55
+ await N();
56
+ const t = s[o.onboardings.editorTabBarOnboarding.cardIndex], e = (R = document.getElementById(B)) == null ? void 0 : R.offsetParent, n = (t && document.querySelector(t.edge)) ?? document.querySelector(d), a = (t && document.querySelector(t.target)) ?? document.querySelector(d);
57
+ if (!e || !n || !a) {
58
+ p.value = l();
59
+ return;
60
+ }
61
+ const u = e.getBoundingClientRect(), E = a.getBoundingClientRect();
62
+ p.value = {
63
+ top: `${Math.round(E.top + E.height / 2 - u.top - O)}px`,
64
+ right: `${Math.round(u.right - n.getBoundingClientRect().left - C)}px`
65
+ };
66
+ }, A = P(
67
+ () => o.onboardings.editorTabBarOnboarding.config.length > 0 && o.onboardings.editorTabBarOnboarding.isActive
68
+ ), S = () => {
69
+ var t, e;
70
+ (e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
71
+ }, w = () => {
72
+ var t, e;
73
+ (e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
74
+ };
75
+ return I(
76
+ () => o.onboardings.editorTabBarOnboarding.isActive,
77
+ async (t) => {
78
+ if (!t)
79
+ return;
80
+ await N();
81
+ const { cardOffset: e, cardIndex: n } = o.onboardings.editorTabBarOnboarding, a = y(h(), e + n);
82
+ ({ steps: s } = a), o.resetCardIndex(r), o.setConfig(r, s.map((u) => u.card), a.offset), await m();
83
+ },
84
+ { immediate: !0 }
85
+ ), I(() => o.onboardings.editorTabBarOnboarding.cardIndex, m), { __sfc: !0, ONBOARDING: r, CARD_ID: B, trans: i, onboardingStore: o, isFeatureEnabled: x, getTopPosition: f, goNext: k, goBack: T, finish: _, ANCHOR_GAP: C, POINTER_CENTER: O, KEBAB: d, MENU: b, card: c, NO_BACK: g, autoSaveStep: v, buildSteps: h, resumeFrom: y, designFallback: l, steps: s, placement: p, place: m, isVisible: A, handleNext: S, handleBack: w, InOnboard: $ };
86
+ }
87
+ });
88
+ export {
89
+ Q as default
90
+ };
@@ -1,21 +1,21 @@
1
- import t from "./OnboardingWrapper.vue2.js";
2
- import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var s = function() {
4
- var n = this, e = n._self._c, r = n._self._setupProxy;
5
- return e("div", n._l(r.visibleOnboardings, function(o) {
6
- return e(o.component, { key: o.type, tag: "component", on: { "onboarding-finished": function(p) {
7
- return r.emit("onboarding-finished");
1
+ import o from "./OnboardingWrapper.vue2.js";
2
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var _ = function() {
4
+ var n = this, r = n._self._c, t = n._self._setupProxy;
5
+ return r("div", n._l(t.visibleOnboardings, function(e) {
6
+ return r(e.component, { key: e.type, tag: "component", on: { "onboarding-finished": function(l) {
7
+ return t.handleFinished(e.type);
8
8
  } } });
9
9
  }), 1);
10
- }, _ = [], a = /* @__PURE__ */ i(
11
- t,
12
- s,
10
+ }, i = [], a = /* @__PURE__ */ s(
11
+ o,
13
12
  _,
13
+ i,
14
14
  !1,
15
15
  null,
16
16
  null
17
17
  );
18
- const d = a.exports;
18
+ const f = a.exports;
19
19
  export {
20
- d as default
20
+ f as default
21
21
  };
@@ -1,50 +1,75 @@
1
- import { defineComponent as f, computed as e, onMounted as O, watch as t } from "vue";
2
- import y from "./AMPOnboarding.vue.js";
3
- import u from "./GenericOnboarding.vue.js";
4
- import v from "./ItemsOnboarding.vue.js";
5
- import S from "./NewVersionPopup.vue.js";
6
- import l from "./RecommendationLegacyStrategyOnboarding.vue.js";
7
- import h from "./RecommendationStrategyOnboarding.vue.js";
8
- import w from "./TextBlockOnboarding.vue.js";
9
- import P from "./VersionHistoryOnboarding.vue.js";
10
- import { usePartner as _ } from "../../../composables/usePartner.js";
11
- import { useEditorStore as A } from "../../../stores/editor.js";
12
- import { useOnboardingStore as H } from "../../../stores/onboarding.js";
13
- import { usePreviewStore as M } from "../../../stores/preview.js";
14
- const U = /* @__PURE__ */ f({
1
+ import { defineComponent as S, computed as e, onMounted as h, watch as t, ref as T } from "vue";
2
+ import w from "./AMPOnboarding.vue.js";
3
+ import P from "./EditorTabBarOnboarding.vue.js";
4
+ import B from "./GenericOnboarding.vue.js";
5
+ import A from "./ItemsOnboarding.vue.js";
6
+ import M from "./NewVersionPopup.vue.js";
7
+ import _ from "./RecommendationLegacyStrategyOnboarding.vue.js";
8
+ import H from "./RecommendationStrategyOnboarding.vue.js";
9
+ import F from "./TextBlockOnboarding.vue.js";
10
+ import V from "./VersionHistoryOnboarding.vue.js";
11
+ import { useConfig as x } from "../../../composables/useConfig.js";
12
+ import { usePartner as C } from "../../../composables/usePartner.js";
13
+ import { useEditorStore as E } from "../../../stores/editor.js";
14
+ import { useOnboardingStore as I } from "../../../stores/onboarding.js";
15
+ import { usePreviewStore as N } from "../../../stores/preview.js";
16
+ const $ = /* @__PURE__ */ S({
15
17
  __name: "OnboardingWrapper",
16
18
  emits: ["onboarding-finished"],
17
- setup(x, { emit: g }) {
18
- const o = H(), r = A(), a = M(), { isTestPartner: s } = _(), m = e(() => r.isStripoInitialized), p = e(() => s()), d = [
19
- { type: "newVersionPopup", component: S },
20
- { type: "genericOnboarding", component: u },
21
- { type: "textBlockOnboarding", component: w },
22
- { type: "versionHistoryOnboarding", component: P },
23
- { type: "ampOnboarding", component: y },
24
- { type: "itemsOnboarding", component: v },
25
- { type: "recommendationStrategyOnboarding", component: h },
26
- { type: "recommendationLegacyStrategyOnboarding", component: l }
27
- ], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), b = e(() => d.filter((n) => c(n.type)));
28
- return O(async () => {
19
+ setup(R, { emit: p }) {
20
+ const o = I(), i = E(), b = N(), { isTestPartner: m } = C(), { isFeatureEnabled: g } = x(), a = e(() => i.isStripoInitialized), s = e(() => m()), O = [
21
+ { type: "newVersionPopup", component: M },
22
+ { type: "genericOnboarding", component: B },
23
+ { type: "textBlockOnboarding", component: F },
24
+ { type: "versionHistoryOnboarding", component: V },
25
+ { type: "ampOnboarding", component: w },
26
+ { type: "itemsOnboarding", component: A },
27
+ { type: "editorTabBarOnboarding", component: P },
28
+ { type: "recommendationStrategyOnboarding", component: H },
29
+ { type: "recommendationLegacyStrategyOnboarding", component: _ }
30
+ ], f = (n) => s.value || !a.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), l = e(() => O.filter((n) => f(n.type)));
31
+ h(async () => {
29
32
  await o.fetchUserModalState();
30
33
  }), t(
31
- () => r.isVersionHistoryOpen,
32
- (n, i) => {
33
- n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
34
+ () => i.isVersionHistoryOpen,
35
+ (n, r) => {
36
+ n && !r && (o.isActive("editorTabBarOnboarding") && o.closeForSession("editorTabBarOnboarding"), o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding")), !n && r && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
34
37
  }
35
38
  ), t(
36
- () => a.emailFormat,
37
- (n, i) => {
38
- i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
39
+ () => b.emailFormat,
40
+ (n, r) => {
41
+ r !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
39
42
  }
40
43
  ), t(
41
- () => r.isPreviewModeOpen,
44
+ () => i.isPreviewModeOpen,
42
45
  (n) => {
43
46
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
44
47
  }
45
- ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
48
+ );
49
+ const d = T(!1), v = (n) => {
50
+ n === "newVersionPopup" && (d.value = !0), p("onboarding-finished");
51
+ }, c = e(() => i.isNormalMode && !i.isPreviewModeOpen), u = e(() => a.value && o.isFetched && g("accessibilityTesting") && !s.value && c.value && !(o.shouldShowOnboarding("newVersionPopup") && !d.value) && !o.isOnboardingActive() && !o.closedThisSession.includes("editorTabBarOnboarding") && o.shouldShowOnboarding("editorTabBarOnboarding"));
52
+ return t(
53
+ u,
54
+ (n) => {
55
+ n && o.start("editorTabBarOnboarding");
56
+ },
57
+ { immediate: !0 }
58
+ ), t(
59
+ c,
60
+ (n) => {
61
+ if (!n && o.isActive("editorTabBarOnboarding")) {
62
+ const { cardIndex: r, config: y } = o.onboardings.editorTabBarOnboarding;
63
+ if (i.isAccessibilityTestingOpen && r === y.length - 1) {
64
+ o.close("editorTabBarOnboarding");
65
+ return;
66
+ }
67
+ o.closeForSession("editorTabBarOnboarding");
68
+ }
69
+ }
70
+ ), { __sfc: !0, emit: p, onboardingStore: o, editorStore: i, previewStore: b, isTestPartner: m, isFeatureEnabled: g, isStripoReady: a, isTestPartnerActive: s, onboardingConfigs: O, shouldShow: f, visibleOnboardings: l, isNewVersionPopupClosed: d, handleFinished: v, isTourAnchored: c, canStartTabBarTour: u };
46
71
  }
47
72
  });
48
73
  export {
49
- U as default
74
+ $ as default
50
75
  };
@@ -0,0 +1,17 @@
1
+ import s from "./LegacyUnsubscribeConvertedModal.vue2.js";
2
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var o = this, t = o._self._c, e = o._self._setupProxy;
5
+ return e.isVisible ? t(e.WpModal, { attrs: { id: "guido__legacy-unsubscribe-converted-modal", state: "warning", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("email-editor.legacy-unsubscribe-converted-modal-title") }, on: { close: e.close, "primary-action": e.close, "secondary-action": e.openAcademy } }, [t("p", [o._v(o._s(e.trans("email-editor.legacy-unsubscribe-converted-modal-message")))])]) : o._e();
6
+ }, a = [], c = /* @__PURE__ */ n(
7
+ s,
8
+ r,
9
+ a,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const d = c.exports;
15
+ export {
16
+ d as default
17
+ };
@@ -0,0 +1,30 @@
1
+ import { defineComponent as n, computed as t } from "vue";
2
+ import i from "../../wrappers/WpModal.vue.js";
3
+ import { useTranslations as a } from "../../../composables/useTranslations.js";
4
+ import { ACADEMY_LINKS as c } from "../../../enums/academy.js";
5
+ import { useEditorStore as p } from "../../../stores/editor.js";
6
+ const L = /* @__PURE__ */ n({
7
+ __name: "LegacyUnsubscribeConvertedModal",
8
+ setup(d) {
9
+ const o = a(), e = p(), r = t(
10
+ () => e.isLegacyUnsubscribeModalRequested && e.isStripoInitialized
11
+ ), s = t(() => ({
12
+ secondaryButton: {
13
+ type: "subtle-primary",
14
+ labelText: o("email-editor.legacy-unsubscribe-converted-modal-visit-academy")
15
+ },
16
+ primaryButton: {
17
+ type: "primary",
18
+ labelText: o("action-builder.ok")
19
+ }
20
+ }));
21
+ return { __sfc: !0, trans: o, editorStore: e, isVisible: r, footerButtonOptions: s, close: () => {
22
+ e.isLegacyUnsubscribeModalRequested = !1;
23
+ }, openAcademy: () => {
24
+ window.open(c.LEGACY_UNSUBSCRIBE_MODULE, "_blank", "noopener,noreferrer");
25
+ }, WpModal: i };
26
+ }
27
+ });
28
+ export {
29
+ L as default
30
+ };
@@ -1,22 +1,22 @@
1
1
  import a from "./UnsubscribePageSelection.vue2.js";
2
2
  /* empty css */
3
3
  import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var o = function() {
5
- var r = this, e = r._self._c, t = r._self._setupProxy;
6
- return e(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", size: "large", "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.pageSelectionDrawerStatus, "title-text": t.trans("newsletter.select-a-template") }, on: { cancelOrBackButtonEvent: t.handleBack, onCloseEvent: t.handleClose, primaryButtonEvent: t.handleSave }, scopedSlots: r._u([{ key: "headerBottomSlot", fn: function() {
7
- return [e(t.UnsubscribeBreadcrumb, { staticClass: "px-5 py-3" })];
8
- }, proxy: !0 }]) }, [e("div", { staticClass: "d-g templates-wrapper" }, r._l(t.unsubscribeStore.getTemplatesByActiveType, function(s) {
9
- return e("div", { key: s.id, staticClass: "template-wrapper", on: { click: function(u) {
10
- return t.selectTemplate(s.id);
11
- } } }, [e(t.InContainer, { staticClass: "template-container o-h", class: { selected: t.unsubscribeStore.getSelectedTemplateByActiveType === s.id }, attrs: { border: t.getBorderClass(s.id) } }, [e("div", { staticClass: "w-1 h-1 d-f j-c-c a-i-c" }, [e("img", { staticClass: "w-1 h-1 thumbnail o-h", attrs: { alt: s.name, src: s.thumbnail } })])]), e("div", { staticClass: "mt-1 f-s-1" }, [r._v(" " + r._s(s.name) + " ")])], 1);
4
+ var i = function() {
5
+ var r = this, t = r._self._c, e = r._self._setupProxy;
6
+ return t(e.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", size: "large", "footer-button-group-options": e.footerButtonGroupOptions, status: e.unsubscribeStore.pageSelectionDrawerStatus, "title-text": e.trans("newsletter.select-a-template") }, on: { cancelOrBackButtonEvent: e.handleBack, onCloseEvent: e.handleClose, primaryButtonEvent: e.handleSave }, scopedSlots: r._u([{ key: "headerBottomSlot", fn: function() {
7
+ return [t(e.UnsubscribeBreadcrumb, { staticClass: "px-5 py-3" })];
8
+ }, proxy: !0 }]) }, [t("div", { staticClass: "d-g templates-wrapper" }, r._l(e.unsubscribeStore.getTemplatesByActiveType, function(s) {
9
+ return t("div", { key: s.id, staticClass: "template-wrapper", on: { click: function(u) {
10
+ return e.selectTemplate(s.id);
11
+ } } }, [t(e.InContainer, { staticClass: "template-container o-h p-r", class: { selected: e.unsubscribeStore.getSelectedTemplateByActiveType === s.id }, attrs: { border: e.getBorderClass(s.id) } }, [t("div", { staticClass: "w-1 h-1 d-f j-c-c a-i-c" }, [t("img", { staticClass: "w-1 h-1 thumbnail o-h", attrs: { alt: s.name, src: s.thumbnail } })]), s.isDefault ? t(e.InChips, { staticClass: "p-a t-3 r-3", attrs: { id: "guido__unsubscribe-default-chip", type: "neutral", value: "default", "close-button": !1, interactive: !1, text: e.trans("unsubscription-preference.default") } }) : r._e()], 1), t("div", { staticClass: "mt-1 f-s-1" }, [r._v(" " + r._s(s.name) + " ")])], 1);
12
12
  }), 0)]);
13
- }, i = [], c = /* @__PURE__ */ n(
13
+ }, o = [], c = /* @__PURE__ */ n(
14
14
  a,
15
- o,
16
15
  i,
16
+ o,
17
17
  !1,
18
18
  null,
19
- "91a26acd"
19
+ "eaf8e461"
20
20
  );
21
21
  const _ = c.exports;
22
22
  export {
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as y, ref as T, computed as a, watch as v } from "vue";
2
2
  import w from "../../wrappers/WpDrawer.vue.js";
3
- import { useToaster as B } from "../../../composables/useToaster.js";
4
- import { useTranslations as C } from "../../../composables/useTranslations.js";
3
+ import { useToaster as C } from "../../../composables/useToaster.js";
4
+ import { useTranslations as B } from "../../../composables/useTranslations.js";
5
5
  import { ToasterTypeOptions as h } from "../../../enums/toaster.js";
6
6
  import { useEditorStore as P } from "../../../stores/editor.js";
7
7
  import { useUnsubscribeStore as U } from "../../../stores/unsubscribe.js";
8
- import { InContainer as _ } from "@useinsider/design-system-vue";
9
- import I from "./UnsubscribeBreadcrumb.vue.js";
10
- const N = /* @__PURE__ */ y({
8
+ import { InContainer as I, InChips as _ } from "@useinsider/design-system-vue";
9
+ import x from "./UnsubscribeBreadcrumb.vue.js";
10
+ const W = /* @__PURE__ */ y({
11
11
  __name: "UnsubscribePageSelection",
12
- setup(x) {
13
- const s = C(), e = U(), r = P(), { showToaster: c } = B(), o = T(!1), i = a(() => e.isActiveTypeLastInCollection ? o.value ? s("unsubscription-preference.applying-changes") : s("statistics.apply") : s("products.select-and-continue")), l = a(() => e.pageSelectionUpdateStatus && e.isActiveTypeFirstInCollection ? s("products.cancel") : s("newsletter.back")), p = a(() => ({
12
+ setup(A) {
13
+ const s = B(), e = U(), r = P(), { showToaster: c } = C(), o = T(!1), i = a(() => e.isActiveTypeLastInCollection ? o.value ? s("unsubscription-preference.applying-changes") : s("statistics.apply") : s("products.select-and-continue")), l = a(() => e.pageSelectionUpdateStatus && e.isActiveTypeFirstInCollection ? s("products.cancel") : s("newsletter.back")), p = a(() => ({
14
14
  primaryButton: {
15
15
  styling: "solid",
16
16
  type: "primary",
@@ -63,9 +63,9 @@ const N = /* @__PURE__ */ y({
63
63
  };
64
64
  return v(() => e.pageSelectionDrawerStatus, (t) => {
65
65
  t && e.pageSelectionUpdateStatus && e.fetchTemplates();
66
- }), { __sfc: !0, trans: s, unsubscribeStore: e, editorStore: r, showToaster: c, isApplying: o, getPrimaryButtonText: i, getCancelOrBackButtonText: l, footerButtonGroupOptions: p, getBorderClass: d, closeModal: n, handleClose: m, handleBack: b, handleSave: f, selectTemplate: g, WpDrawer: w, InContainer: _, UnsubscribeBreadcrumb: I };
66
+ }), { __sfc: !0, trans: s, unsubscribeStore: e, editorStore: r, showToaster: c, isApplying: o, getPrimaryButtonText: i, getCancelOrBackButtonText: l, footerButtonGroupOptions: p, getBorderClass: d, closeModal: n, handleClose: m, handleBack: b, handleSave: f, selectTemplate: g, WpDrawer: w, InChips: _, InContainer: I, UnsubscribeBreadcrumb: x };
67
67
  }
68
68
  });
69
69
  export {
70
- N as default
70
+ W as default
71
71
  };
@@ -0,0 +1,51 @@
1
+ import { ToasterTypeOptions as p } from "../enums/toaster.js";
2
+ import { useEditorStore as m } from "../stores/editor.js";
3
+ import { findEditorApi as d, EDITOR_NOT_READY_MESSAGE as A } from "../utils/stripoEditorApi.js";
4
+ import { useToaster as b } from "./useToaster.js";
5
+ const C = () => {
6
+ const e = m(), { showToaster: a, handleError: t } = b(), s = (i) => {
7
+ var g;
8
+ const o = (g = d()) == null ? void 0 : g.accessibilityApi;
9
+ if (!o) {
10
+ a({ type: p.Error, message: A });
11
+ return;
12
+ }
13
+ try {
14
+ i(o);
15
+ } catch (y) {
16
+ t(y, "Accessibility Test action failed");
17
+ }
18
+ }, c = () => s((i) => {
19
+ i.openAccessibilityTestingMode(), e.isAccessibilityTestingOpen = !0;
20
+ }), r = () => {
21
+ var i;
22
+ try {
23
+ (i = d()) == null || i.accessibilityApi.closeAccessibilityTestingMode();
24
+ } catch (o) {
25
+ t(o, "Failed to exit Accessibility Test");
26
+ } finally {
27
+ e.isAccessibilityTestingOpen = !1, e.imagesHidden = !1, e.colorVisionDeficiency = "";
28
+ }
29
+ }, T = () => e.isAccessibilityTestingOpen ? r() : c(), n = () => s((i) => {
30
+ i.showImages(), e.imagesHidden = !1;
31
+ }), l = () => s((i) => {
32
+ i.hideImages(), e.imagesHidden = !0;
33
+ });
34
+ return {
35
+ openAccessibilityTestingMode: c,
36
+ closeAccessibilityTestingMode: r,
37
+ toggleAccessibilityTestingMode: T,
38
+ showImages: n,
39
+ hideImages: l,
40
+ toggleImages: () => e.imagesHidden ? n() : l(),
41
+ setColorVisionDeficiency: (i) => s((o) => {
42
+ o.setColorVisionDeficiency(i), e.colorVisionDeficiency = i;
43
+ }),
44
+ switchToDesktopPreview: () => s((i) => i.switchToDesktopPreview()),
45
+ switchToMobilePreview: () => s((i) => i.switchToMobilePreview()),
46
+ toggleCodeEditor: () => s((i) => i.emitToggleCodeEditor())
47
+ };
48
+ };
49
+ export {
50
+ C as useAccessibilityApi
51
+ };