@useinsider/guido 3.19.0-beta.4b9be3a → 3.19.0-beta.575d19c

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 (120) hide show
  1. package/README.md +21 -3
  2. package/dist/@types/config/schemas.js +76 -67
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +94 -91
  5. package/dist/components/organisms/AutoSaveController.vue2.js +18 -8
  6. package/dist/components/organisms/base/Toaster.vue2.js +13 -12
  7. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
  8. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +78 -57
  9. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
  10. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
  11. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +28 -42
  12. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  13. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
  14. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  15. package/dist/components/organisms/header/EditorActions.vue2.js +35 -53
  16. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  17. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
  18. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  19. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  20. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  21. package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
  22. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  23. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  24. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  25. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  26. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  27. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  28. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
  29. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  30. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  31. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
  32. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  33. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +56 -34
  34. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
  35. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
  36. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  37. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
  38. package/dist/composables/useAccessibilityApi.js +45 -0
  39. package/dist/composables/useActionsApi.js +44 -43
  40. package/dist/composables/useCodeEditorApi.js +23 -9
  41. package/dist/composables/useCortexBlueprintBridge.js +54 -120
  42. package/dist/composables/useCustomInterfaceAppearance.js +67 -52
  43. package/dist/composables/useEmailTemplateApplier.js +51 -96
  44. package/dist/composables/useHtmlValidator.js +87 -82
  45. package/dist/composables/useLegacyStrategyConversion.js +61 -0
  46. package/dist/composables/useRecommendation.js +40 -35
  47. package/dist/composables/useStripo.js +30 -30
  48. package/dist/composables/useToaster.js +14 -20
  49. package/dist/composables/useTranslations.js +3 -2
  50. package/dist/composables/useVersionHistoryApi.js +33 -24
  51. package/dist/config/i18n/en/labels.json.js +36 -4
  52. package/dist/config/i18n/en/tooltips.json.js +2 -1
  53. package/dist/enums/extensions/recommendationBlock.js +49 -33
  54. package/dist/extensions/Blocks/Recommendation/block.js +61 -42
  55. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
  56. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +100 -94
  57. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +130 -55
  58. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  59. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +273 -92
  60. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
  61. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
  62. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
  63. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
  64. package/dist/guido.css +1 -1
  65. package/dist/services/recommendationApi.js +46 -37
  66. package/dist/sprite.svg +6 -0
  67. package/dist/src/@types/config/schemas.d.ts +18 -0
  68. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
  69. package/dist/src/components/organisms/header/AutoSaveStatus.vue.d.ts +2 -0
  70. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  71. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  72. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
  73. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  74. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  75. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  76. package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
  77. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
  78. package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
  79. package/dist/src/composables/useActionsApi.d.ts +2 -2
  80. package/dist/src/composables/useConfig.d.ts +6 -0
  81. package/dist/src/composables/useCortexBlueprintBridge.d.ts +3 -4
  82. package/dist/src/composables/useEmailTemplateApplier.d.ts +5 -26
  83. package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
  84. package/dist/src/enums/extensions/recommendationBlock.d.ts +7 -1
  85. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  86. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  87. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  88. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  89. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +10 -0
  90. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
  91. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +162 -1
  92. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
  93. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
  94. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
  95. package/dist/src/services/recommendationApi.d.ts +2 -1
  96. package/dist/src/stores/config.d.ts +342 -0
  97. package/dist/src/stores/editor.d.ts +109 -0
  98. package/dist/src/stores/guido-email-editor.d.ts +10 -32
  99. package/dist/src/stores/onboarding.d.ts +1865 -136
  100. package/dist/src/stores/version-history.d.ts +1 -1
  101. package/dist/src/utils/stripoEditorApi.d.ts +4 -0
  102. package/dist/src/utils/timeUtil.d.ts +5 -0
  103. package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
  104. package/dist/static/assets/icons/line-info.svg.js +5 -0
  105. package/dist/static/styles/components/accessibility.css.js +234 -0
  106. package/dist/static/styles/components/recommendation-strategy.css.js +104 -9
  107. package/dist/static/styles/components/skeleton.css.js +23 -0
  108. package/dist/static/styles/variables.css.js +2 -0
  109. package/dist/stores/config.js +74 -60
  110. package/dist/stores/editor.js +7 -4
  111. package/dist/stores/guido-email-editor.js +1 -3
  112. package/dist/stores/onboarding.js +79 -47
  113. package/dist/stores/unsubscribe.js +3 -3
  114. package/dist/utils/stripoEditorApi.js +11 -0
  115. package/dist/utils/templatePreparation.js +55 -55
  116. package/dist/utils/timeUtil.js +6 -17
  117. package/package.json +1 -1
  118. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  119. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  120. /package/dist/src/components/organisms/{header/AutoSaveToggle.vue.d.ts → extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts} +0 -0
@@ -1,17 +1,18 @@
1
- import s from "./RightSlot.vue2.js";
1
+ import i from "./RightSlot.vue2.js";
2
+ /* empty css */
2
3
  import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
4
  var r = function() {
4
- var i = this, e = i._self._c, t = i._self._setupProxy;
5
- return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ? i._e() : e(t.AutoSaveToggle), t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-1", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : i._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
6
- }, a = [], n = /* @__PURE__ */ o(
7
- s,
5
+ var e = this, s = e._self._c, t = e._self._setupProxy;
6
+ return s("div", { staticClass: "d-f a-i-c right-slot" }, [t.isNormalMode ? s(t.AutoSaveStatus) : e._e(), t.isLiquidEnabled && t.isNormalMode ? s(t.InChips, { attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : e._e(), t.isNormalMode ? s(t.EditorActions) : t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton) : e._e()], 1);
7
+ }, a = [], l = /* @__PURE__ */ o(
8
+ i,
8
9
  r,
9
10
  a,
10
11
  !1,
11
12
  null,
12
- null
13
+ "efc32e0d"
13
14
  );
14
- const u = n.exports;
15
+ const c = l.exports;
15
16
  export {
16
- u as default
17
+ c as default
17
18
  };
@@ -1,23 +1,18 @@
1
- import { defineComponent as a, ref as f, computed as p } from "vue";
2
- import { useConfig as u } from "../../../composables/useConfig.js";
3
- import { useTranslations as d } from "../../../composables/useTranslations.js";
4
- import { useEditorStore as l } from "../../../stores/editor.js";
5
- import { InChips as c } from "@useinsider/design-system-vue";
6
- import _ from "./AutoSaveToggle.vue.js";
7
- import S from "./EditorActions.vue.js";
8
- import g from "./version-history/RestoreButton.vue.js";
9
- const T = /* @__PURE__ */ a({
1
+ import { defineComponent as m, computed as r } from "vue";
2
+ import { useConfig as n } from "../../../composables/useConfig.js";
3
+ import { useTranslations as a } from "../../../composables/useTranslations.js";
4
+ import { useEditorStore as p } from "../../../stores/editor.js";
5
+ import { InChips as u } from "@useinsider/design-system-vue";
6
+ import f from "./AutoSaveStatus.vue.js";
7
+ import d from "./EditorActions.vue.js";
8
+ import c from "./version-history/RestoreButton.vue.js";
9
+ const x = /* @__PURE__ */ m({
10
10
  __name: "RightSlot",
11
- setup(h, { expose: r }) {
12
- const { isFeatureEnabled: o } = u(), i = d(), n = l(), t = f(null), s = p(() => o("liquidSyntax"));
13
- return r({
14
- handleSave: (m) => {
15
- var e;
16
- return (e = t.value) == null ? void 0 : e.handleSave(m);
17
- }
18
- }), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
11
+ setup(l) {
12
+ const { isFeatureEnabled: o } = n(), i = a(), t = p(), e = r(() => o("liquidSyntax")), s = r(() => t.isNormalMode);
13
+ return { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: t, isLiquidEnabled: e, isNormalMode: s, InChips: u, AutoSaveStatus: f, EditorActions: d, RestoreButton: c };
19
14
  }
20
15
  });
21
16
  export {
22
- T as default
17
+ x as default
23
18
  };
@@ -0,0 +1,18 @@
1
+ import i from "./AccessibilityToolbar.vue2.js";
2
+ /* empty css */
3
+ import s from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
+ var o = this, e = o._self._c, t = o._self._setupProxy;
6
+ return e("div", { staticClass: "d-f a-i-c accessibility-toolbar" }, [e(t.InButtonV2, { attrs: { id: "guido__a11y-no-images", "data-testid": "Accessibility No Images", "left-icon": "line-image", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.editorStore.imagesHidden, "tooltip-options": t.getTooltipOptions("guido__a11y-no-images"), "tooltip-text": t.imagesTooltip }, on: { click: t.toggleImages } }), e(t.InButtonV2, { attrs: { id: "guido__a11y-code", "data-testid": "Accessibility Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__a11y-code"), "tooltip-text": t.trans("newsletter.html-editor") }, on: { click: t.toggleCodeEditor } }), e(t.ColorVisionSelect), e(t.InSegments, { attrs: { id: "guido__a11y-view-selection", "with-icon": "", disable: t.editorStore.loadingStatus, "segment-list": t.segmentList, selected: t.editorStore.editorVisualMode }, on: { click: t.handleView } })], 1);
7
+ }, l = [], d = /* @__PURE__ */ s(
8
+ i,
9
+ a,
10
+ l,
11
+ !1,
12
+ null,
13
+ "c389d28f"
14
+ );
15
+ const _ = d.exports;
16
+ export {
17
+ _ as default
18
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as d, computed as n } from "vue";
2
+ import { useAccessibilityApi as c } from "../../../../composables/useAccessibilityApi.js";
3
+ import { useTranslations as g } from "../../../../composables/useTranslations.js";
4
+ import { useEditorStore as u } from "../../../../stores/editor.js";
5
+ import { getTooltipOptions as e } from "../../../../utils/tooltipUtils.js";
6
+ import { InSegments as _, InButtonV2 as f } from "@useinsider/design-system-vue";
7
+ import w from "./ColorVisionSelect.vue.js";
8
+ const A = /* @__PURE__ */ d({
9
+ __name: "AccessibilityToolbar",
10
+ setup(b) {
11
+ const t = u(), o = g(), {
12
+ toggleImages: r,
13
+ toggleCodeEditor: m,
14
+ switchToDesktopPreview: i,
15
+ switchToMobilePreview: s
16
+ } = c(), l = n(() => [
17
+ {
18
+ text: "",
19
+ icon: "line-desktop",
20
+ value: "desktop",
21
+ tooltipText: o("newsletter.desktop"),
22
+ tooltipOptions: e("guido__a11y-view-desktop")
23
+ },
24
+ {
25
+ text: "",
26
+ icon: "line-menu-mobileapp",
27
+ value: "mobile",
28
+ tooltipText: o("newsletter.mobile"),
29
+ tooltipOptions: e("guido__a11y-view-mobile")
30
+ }
31
+ ]), p = n(() => t.imagesHidden ? o("email-editor.a11y-show-images") : o("email-editor.a11y-hide-images"));
32
+ return { __sfc: !0, editorStore: t, trans: o, toggleImages: r, toggleCodeEditor: m, switchToDesktopPreview: i, switchToMobilePreview: s, segmentList: l, imagesTooltip: p, handleView: (a) => a === "mobile" ? s() : i(), getTooltipOptions: e, InButtonV2: f, InSegments: _, ColorVisionSelect: w };
33
+ }
34
+ });
35
+ export {
36
+ A as default
37
+ };
@@ -0,0 +1,22 @@
1
+ import i from "./ColorVisionSelect.vue2.js";
2
+ /* empty css */
3
+ import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var l = function() {
5
+ var o = this, e = o._self._c, t = o._self._setupProxy;
6
+ return e("div", { staticClass: "color-vision-select p-r" }, [e(t.InButtonV2, { attrs: { id: "guido__a11y-color-vision-trigger", "left-icon": "line-show-on", "right-icon": "line-chevron-small-down", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text": t.selectedOption.text }, on: { click: function(s) {
7
+ t.isOpen = !t.isOpen;
8
+ } } }), e(t.InDropdownMenu, { staticClass: "color-vision-select__dropdown", attrs: { id: "guido__a11y-color-vision-menu", "is-wrapped-description": "", "box-width": "basedOnLongestItem", "static-position": "bottom left", "dynamic-position": !1, "max-height": 400, options: t.options, "pre-selected-values": [t.selectedOption], "select-all-option-status": !1, status: t.isOpen }, on: { clickOutside: function(s) {
9
+ t.isOpen = !1;
10
+ }, optionClick: t.select } })], 1);
11
+ }, r = [], a = /* @__PURE__ */ n(
12
+ i,
13
+ l,
14
+ r,
15
+ !1,
16
+ null,
17
+ "64cb50da"
18
+ );
19
+ const u = a.exports;
20
+ export {
21
+ u as default
22
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as d, ref as p, computed as c } from "vue";
2
+ import { useAccessibilityApi as m } from "../../../../composables/useAccessibilityApi.js";
3
+ import { useTranslations as u } from "../../../../composables/useTranslations.js";
4
+ import { useEditorStore as v } from "../../../../stores/editor.js";
5
+ import { InDropdownMenu as f, InButtonV2 as y } from "@useinsider/design-system-vue";
6
+ const C = /* @__PURE__ */ d({
7
+ __name: "ColorVisionSelect",
8
+ setup(K) {
9
+ const i = "none", a = [
10
+ {
11
+ value: i,
12
+ labelKey: "email-editor.cvd-none"
13
+ },
14
+ {
15
+ value: "protanopia",
16
+ labelKey: "email-editor.cvd-protanopia",
17
+ descriptionKey: "email-editor.cvd-protanopia-description"
18
+ },
19
+ {
20
+ value: "deuteranopia",
21
+ labelKey: "email-editor.cvd-deuteranopia",
22
+ descriptionKey: "email-editor.cvd-deuteranopia-description"
23
+ },
24
+ {
25
+ value: "tritanopia",
26
+ labelKey: "email-editor.cvd-tritanopia",
27
+ descriptionKey: "email-editor.cvd-tritanopia-description"
28
+ },
29
+ {
30
+ value: "achromatopsia",
31
+ labelKey: "email-editor.cvd-achromatopsia",
32
+ descriptionKey: "email-editor.cvd-achromatopsia-description"
33
+ }
34
+ ], r = v(), o = u(), { setColorVisionDeficiency: n } = m(), s = p(!1), t = c(() => a.map((e) => ({
35
+ text: o(e.labelKey),
36
+ value: e.value,
37
+ ...e.descriptionKey ? { description: o(e.descriptionKey) } : {}
38
+ }))), l = c(
39
+ () => t.value.find((e) => e.value === (r.colorVisionDeficiency || i)) ?? t.value[0]
40
+ );
41
+ return { __sfc: !0, NONE: i, OPTIONS: a, editorStore: r, trans: o, setColorVisionDeficiency: n, isOpen: s, options: t, selectedOption: l, select: ({ value: e }) => {
42
+ n(e === i ? "" : e), s.value = !1;
43
+ }, InButtonV2: y, InDropdownMenu: f };
44
+ }
45
+ });
46
+ export {
47
+ C as default
48
+ };
@@ -0,0 +1,19 @@
1
+ import i from "./EditorTabBarOnboarding.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
+ var r, n;
6
+ var t = this, e = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? e(o.InOnboard, { key: "guido__tab-bar-onboard", staticClass: "w-21-s p-a z-11", class: (r = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : r.classes, attrs: { id: o.CARD_ID, "is-multiple-page": "", visible: "", "image-source": "", title: "", "pages-config": o.onboardingStore.onboardings.editorTabBarOnboarding.config, "pointer-position": (n = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : n.position, "right-position": o.placement.right, "top-position": o.placement.top }, on: { backButtonClick: o.handleBack, close: o.finish, nextButtonClick: o.handleNext } }) : t._e();
8
+ }, c = [], d = /* @__PURE__ */ a(
9
+ i,
10
+ s,
11
+ c,
12
+ !1,
13
+ null,
14
+ "42f02a1f"
15
+ );
16
+ const g = d.exports;
17
+ export {
18
+ g as default
19
+ };
@@ -0,0 +1,90 @@
1
+ import { defineComponent as M, ref as q, computed as P, watch as N, nextTick as A } from "vue";
2
+ import { useConfig as D } from "../../../composables/useConfig.js";
3
+ import { useRibbonOffset as F } from "../../../composables/useRibbonOffset.js";
4
+ import { useTranslations as G } from "../../../composables/useTranslations.js";
5
+ import { useOnboardingStore as K } from "../../../stores/onboarding.js";
6
+ import { InOnboard as $ } from "@useinsider/design-system-vue";
7
+ const Q = /* @__PURE__ */ M({
8
+ __name: "EditorTabBarOnboarding",
9
+ setup(H) {
10
+ const r = "editorTabBarOnboarding", m = "guido__tab-bar-onboard", a = G(), o = K(), { isFeatureEnabled: B } = D(), { getTopPosition: x } = F(), f = () => o.next(r), k = () => o.previous(r), T = () => void o.close(r), _ = 4, C = 17, c = "#guido__kebab-button", u = ".editor-actions-menu__dropdown", d = (t, e, n) => ({
11
+ classes: "guido-tab-bar-onboarding",
12
+ position: "Right Top",
13
+ title: a(t),
14
+ description: a(e),
15
+ imageSource: "",
16
+ backButtonType: "text",
17
+ backButtonText: a("action-builder.back"),
18
+ backButtonClick: k,
19
+ nextButtonType: "text",
20
+ nextButtonText: a("action-builder.next"),
21
+ nextButtonClick: f,
22
+ ...n
23
+ }), b = { backButtonType: void 0, backButtonText: void 0, backButtonClick: () => {
24
+ } }, O = () => B("autosave") ? [{
25
+ card: d("email-editor.onboarding-autosave-title", "email-editor.onboarding-autosave-description", {
26
+ pinsMenu: !0
27
+ }),
28
+ edge: u,
29
+ target: '[data-attr-value="guido__kebab-autosave"]'
30
+ }] : [], v = () => [
31
+ {
32
+ card: d("email-editor.onboarding-kebab-title", "email-editor.onboarding-kebab-description", b),
33
+ edge: c,
34
+ target: c
35
+ },
36
+ ...O(),
37
+ {
38
+ card: d("email-editor.onboarding-accessibility-title", "email-editor.onboarding-accessibility-description", {
39
+ nextButtonText: a("action-builder.ok"),
40
+ nextButtonClick: T,
41
+ pinsMenu: !0
42
+ }),
43
+ edge: u,
44
+ target: '[data-attr-value="guido__kebab-accessibility"]'
45
+ }
46
+ ], h = (t, e) => {
47
+ if (e <= 0 || e >= t.length)
48
+ return { steps: t, offset: 0 };
49
+ const [n, ...i] = t.slice(e);
50
+ return { steps: [{ ...n, card: { ...n.card, ...b } }, ...i], offset: e };
51
+ }, g = () => ({ top: x(56), right: "150px" });
52
+ let s = [];
53
+ const l = q(g()), p = async () => {
54
+ var R;
55
+ await A();
56
+ const t = s[o.onboardings.editorTabBarOnboarding.cardIndex], e = (R = document.getElementById(m)) == null ? void 0 : R.offsetParent, n = (t && document.querySelector(t.edge)) ?? document.querySelector(c), i = (t && document.querySelector(t.target)) ?? document.querySelector(c);
57
+ if (!e || !n || !i) {
58
+ l.value = g();
59
+ return;
60
+ }
61
+ const y = e.getBoundingClientRect(), E = i.getBoundingClientRect();
62
+ l.value = {
63
+ top: `${Math.round(E.top + E.height / 2 - y.top - C)}px`,
64
+ right: `${Math.round(y.right - n.getBoundingClientRect().left - _)}px`
65
+ };
66
+ }, S = P(
67
+ () => o.onboardings.editorTabBarOnboarding.config.length > 0 && o.onboardings.editorTabBarOnboarding.isActive
68
+ ), I = () => {
69
+ var t, e;
70
+ (e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
71
+ }, w = () => {
72
+ var t, e;
73
+ (e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
74
+ };
75
+ return N(
76
+ () => o.onboardings.editorTabBarOnboarding.isActive,
77
+ async (t) => {
78
+ if (!t)
79
+ return;
80
+ await A();
81
+ const { cardOffset: e } = o.onboardings.editorTabBarOnboarding, n = h(v(), e);
82
+ ({ steps: s } = n), o.setConfig(r, s.map((i) => i.card), n.offset), await p();
83
+ },
84
+ { immediate: !0 }
85
+ ), N(() => o.onboardings.editorTabBarOnboarding.cardIndex, p), { __sfc: !0, ONBOARDING: r, CARD_ID: m, trans: a, onboardingStore: o, isFeatureEnabled: B, getTopPosition: x, goNext: f, goBack: k, finish: T, ANCHOR_GAP: _, POINTER_CENTER: C, KEBAB: c, MENU: u, card: d, NO_BACK: b, autoSaveStep: O, buildSteps: v, resumeFrom: h, designFallback: g, steps: s, placement: l, place: p, isVisible: S, handleNext: I, handleBack: w, InOnboard: $ };
86
+ }
87
+ });
88
+ export {
89
+ Q as default
90
+ };
@@ -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,46 +1,68 @@
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 y, computed as r, onMounted as S, watch as e, ref as h } from "vue";
2
+ import w from "./AMPOnboarding.vue.js";
3
+ import T from "./EditorTabBarOnboarding.vue.js";
4
+ import P from "./GenericOnboarding.vue.js";
5
+ import B from "./ItemsOnboarding.vue.js";
6
+ import A from "./NewVersionPopup.vue.js";
7
+ import M from "./RecommendationLegacyStrategyOnboarding.vue.js";
8
+ import _ from "./RecommendationStrategyOnboarding.vue.js";
9
+ import H from "./TextBlockOnboarding.vue.js";
10
+ import F from "./VersionHistoryOnboarding.vue.js";
11
+ import { useConfig as V } from "../../../composables/useConfig.js";
12
+ import { usePartner as C } from "../../../composables/usePartner.js";
13
+ import { useEditorStore as x } from "../../../stores/editor.js";
14
+ import { useOnboardingStore as E } from "../../../stores/onboarding.js";
15
+ import { usePreviewStore as N } from "../../../stores/preview.js";
16
+ const Z = /* @__PURE__ */ y({
13
17
  __name: "OnboardingWrapper",
14
18
  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 () => {
19
+ setup(R, { emit: p }) {
20
+ const o = E(), i = x(), c = N(), { isTestPartner: b } = C(), { isFeatureEnabled: g } = V(), a = r(() => i.isStripoInitialized), s = r(() => b()), O = [
21
+ { type: "newVersionPopup", component: A },
22
+ { type: "genericOnboarding", component: P },
23
+ { type: "textBlockOnboarding", component: H },
24
+ { type: "versionHistoryOnboarding", component: F },
25
+ { type: "ampOnboarding", component: w },
26
+ { type: "itemsOnboarding", component: B },
27
+ { type: "editorTabBarOnboarding", component: T },
28
+ { type: "recommendationStrategyOnboarding", component: _ },
29
+ { type: "recommendationLegacyStrategyOnboarding", component: M }
30
+ ], f = (n) => s.value || !a.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), l = r(() => O.filter((n) => f(n.type)));
31
+ S(async () => {
25
32
  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");
33
+ }), e(
34
+ () => i.isVersionHistoryOpen,
35
+ (n, t) => {
36
+ n && !t && (o.isActive("editorTabBarOnboarding") && o.closeForSession("editorTabBarOnboarding"), o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding")), !n && t && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
30
37
  }
31
- ), t(
32
- () => s.emailFormat,
33
- (n, i) => {
34
- i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
38
+ ), e(
39
+ () => c.emailFormat,
40
+ (n, t) => {
41
+ t !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
35
42
  }
36
- ), t(
37
- () => r.isPreviewModeOpen,
43
+ ), e(
44
+ () => i.isPreviewModeOpen,
38
45
  (n) => {
39
46
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
40
47
  }
41
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
48
+ );
49
+ const d = h(!1), v = (n) => {
50
+ n === "newVersionPopup" && (d.value = !0), p("onboarding-finished");
51
+ }, m = r(() => i.isNormalMode && !i.isPreviewModeOpen), u = r(() => a.value && o.isFetched && g("accessibilityTesting") && !s.value && m.value && !(o.shouldShowOnboarding("newVersionPopup") && !d.value) && !o.isOnboardingActive() && !o.closedThisSession.includes("editorTabBarOnboarding") && o.shouldShowOnboarding("editorTabBarOnboarding"));
52
+ return e(
53
+ u,
54
+ (n) => {
55
+ n && o.start("editorTabBarOnboarding");
56
+ },
57
+ { immediate: !0 }
58
+ ), e(
59
+ m,
60
+ (n) => {
61
+ !n && o.isActive("editorTabBarOnboarding") && o.closeForSession("editorTabBarOnboarding");
62
+ }
63
+ ), { __sfc: !0, emit: p, onboardingStore: o, editorStore: i, previewStore: c, isTestPartner: b, isFeatureEnabled: g, isStripoReady: a, isTestPartnerActive: s, onboardingConfigs: O, shouldShow: f, visibleOnboardings: l, isNewVersionPopupClosed: d, handleFinished: v, isTourAnchored: m, canStartTabBarTour: u };
42
64
  }
43
65
  });
44
66
  export {
45
- G as default
67
+ Z as default
46
68
  };
@@ -0,0 +1,21 @@
1
+ import s from "./RecommendationLegacyStrategyOnboarding.vue2.js";
2
+ /* empty css */
3
+ import c from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var d = function() {
5
+ var t, n, r, a, i;
6
+ var o = this, g = o._self._c, e = o._self._setupProxy;
7
+ return e.isVisible ? g(e.InOnboard, { key: "guido__recommendation-legacy-strategy-onboard", staticClass: "w-21-s p-a z-11", class: (t = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : t.classes, attrs: { id: "guido__recommendation-legacy-strategy-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "left-position": (n = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : n.left, "pages-config": e.onboardingStore.onboardings.recommendationLegacyStrategyOnboarding.config, "pointer-position": (r = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : r.position, "right-position": (a = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : a.right, "top-position": (i = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : i.top }, on: { close: function(p) {
8
+ return e.onboardingStore.close(e.ONBOARDING_TYPE);
9
+ }, nextButtonClick: e.handleNext } }) : o._e();
10
+ }, m = [], l = /* @__PURE__ */ c(
11
+ s,
12
+ d,
13
+ m,
14
+ !1,
15
+ null,
16
+ "19d8cb42"
17
+ );
18
+ const f = l.exports;
19
+ export {
20
+ f as default
21
+ };
@@ -0,0 +1,46 @@
1
+ import { defineComponent as d, computed as g, watch as l } from "vue";
2
+ import { useRibbonOffset as b } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
4
+ import { ACADEMY_LINKS as u } from "../../../enums/academy.js";
5
+ import { useOnboardingStore as y } from "../../../stores/onboarding.js";
6
+ import { InOnboard as f } from "@useinsider/design-system-vue";
7
+ const A = /* @__PURE__ */ d({
8
+ __name: "RecommendationLegacyStrategyOnboarding",
9
+ setup(O) {
10
+ const n = "recommendationLegacyStrategyOnboarding", o = p(), t = y(), { getTopPosition: i } = b(), r = `<a href="${u.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${o("action-builder.visit-academy")}</a>`, a = () => [
11
+ {
12
+ classes: "guido-recommendation-legacy-strategy-onboarding",
13
+ right: "40px",
14
+ top: i(485),
15
+ position: "Top Right",
16
+ title: o("email-editor.onboarding-recommendation-strategy-legacy-title"),
17
+ description: o("email-editor.onboarding-recommendation-strategy-legacy-description", {
18
+ academyLink: r
19
+ }),
20
+ imageSource: "",
21
+ backButtonClick: () => {
22
+ },
23
+ nextButtonType: "text",
24
+ nextButtonText: o("action-builder.ok"),
25
+ nextButtonClick: () => {
26
+ t.close(n);
27
+ }
28
+ }
29
+ ], s = g(
30
+ () => t.onboardings.recommendationLegacyStrategyOnboarding.config.length > 0 && t.onboardings.recommendationLegacyStrategyOnboarding.isActive
31
+ ), m = () => {
32
+ var e, c;
33
+ (c = (e = t.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : e.nextButtonClick) == null || c.call(e);
34
+ };
35
+ return l(
36
+ () => t.isActive(n),
37
+ (e) => {
38
+ e && t.setConfig(n, a());
39
+ },
40
+ { immediate: !0 }
41
+ ), { __sfc: !0, ONBOARDING_TYPE: n, trans: o, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: s, handleNext: m, InOnboard: f };
42
+ }
43
+ });
44
+ export {
45
+ A as default
46
+ };
@@ -0,0 +1,21 @@
1
+ import d from "./RecommendationStrategyOnboarding.vue2.js";
2
+ /* empty css */
3
+ import g from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var m = function() {
5
+ var e, n, r, i, a;
6
+ var t = this, s = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? s(o.InOnboard, { key: "guido__recommendation-strategy-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__recommendation-strategy-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "left-position": (n = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : n.left, "pages-config": o.onboardingStore.onboardings.recommendationStrategyOnboarding.config, "pointer-position": (r = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : r.position, "right-position": (i = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : i.right, "top-position": (a = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : a.top }, on: { close: function(p) {
8
+ return o.onboardingStore.close(o.ONBOARDING_TYPE);
9
+ }, nextButtonClick: o.handleNext } }) : t._e();
10
+ }, c = [], _ = /* @__PURE__ */ g(
11
+ d,
12
+ m,
13
+ c,
14
+ !1,
15
+ null,
16
+ "ec2027ff"
17
+ );
18
+ const S = _.exports;
19
+ export {
20
+ S as default
21
+ };
@@ -0,0 +1,47 @@
1
+ import { defineComponent as g, computed as p, watch as b } from "vue";
2
+ import { useRibbonOffset as u } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as l } from "../../../composables/useTranslations.js";
4
+ import { ACADEMY_LINKS as f } from "../../../enums/academy.js";
5
+ import { useRecommendationExtensionStore as O } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
6
+ import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
7
+ import { InOnboard as y } from "@useinsider/design-system-vue";
8
+ const h = /* @__PURE__ */ g({
9
+ __name: "RecommendationStrategyOnboarding",
10
+ setup(C) {
11
+ const n = "recommendationStrategyOnboarding", e = l(), t = _(), i = O(), { getTopPosition: r } = u(), a = `<a href="${f.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${e("action-builder.visit-academy")}</a>`, m = () => [
12
+ {
13
+ classes: "guido-recommendation-strategy-onboarding",
14
+ // Sits in the gap left of the settings panel and points at the strategy section, which
15
+ // starts 208px down: the panel header and its tab row are fixed chrome above it.
16
+ right: "426px",
17
+ top: r(208),
18
+ position: "Right Top",
19
+ title: e("email-editor.onboarding-recommendation-strategy-title"),
20
+ description: e("email-editor.onboarding-recommendation-strategy-description", {
21
+ academyLink: a
22
+ }),
23
+ imageSource: "",
24
+ backButtonClick: () => {
25
+ },
26
+ nextButtonType: "text",
27
+ nextButtonText: e("action-builder.ok"),
28
+ nextButtonClick: () => {
29
+ t.close(n);
30
+ }
31
+ }
32
+ ], c = p(() => i.strategyPanelOpen && t.onboardings.recommendationStrategyOnboarding.config.length > 0 && t.onboardings.recommendationStrategyOnboarding.isActive), d = () => {
33
+ var o, s;
34
+ (s = (o = t.getRecommendationStrategyCurrentCard) == null ? void 0 : o.nextButtonClick) == null || s.call(o);
35
+ };
36
+ return b(
37
+ () => t.isActive(n),
38
+ (o) => {
39
+ o && t.setConfig(n, m());
40
+ },
41
+ { immediate: !0 }
42
+ ), { __sfc: !0, ONBOARDING_TYPE: n, trans: e, onboardingStore: t, recommendationStore: i, getTopPosition: r, academyLink: a, buildOnboardingCards: m, isVisible: c, handleNext: d, InOnboard: y };
43
+ }
44
+ });
45
+ export {
46
+ h as default
47
+ };
@@ -0,0 +1,45 @@
1
+ import { ToasterTypeOptions as p } from "../enums/toaster.js";
2
+ import { useEditorStore as T } from "../stores/editor.js";
3
+ import { findEditorApi as g, EDITOR_NOT_READY_MESSAGE as m } from "../utils/stripoEditorApi.js";
4
+ import { useToaster as y } from "./useToaster.js";
5
+ const I = () => {
6
+ const e = T(), { showToaster: d } = y(), s = (i) => {
7
+ var l;
8
+ const o = (l = g()) == null ? void 0 : l.accessibilityApi;
9
+ if (!o) {
10
+ d({ type: p.Error, message: m });
11
+ return;
12
+ }
13
+ i(o);
14
+ }, t = () => s((i) => {
15
+ i.openAccessibilityTestingMode(), e.isAccessibilityTestingOpen = !0;
16
+ }), c = () => {
17
+ var i;
18
+ try {
19
+ (i = g()) == null || i.accessibilityApi.closeAccessibilityTestingMode();
20
+ } finally {
21
+ e.isAccessibilityTestingOpen = !1, e.imagesHidden = !1, e.colorVisionDeficiency = "";
22
+ }
23
+ }, a = () => e.isAccessibilityTestingOpen ? c() : t(), n = () => s((i) => {
24
+ i.showImages(), e.imagesHidden = !1;
25
+ }), r = () => s((i) => {
26
+ i.hideImages(), e.imagesHidden = !0;
27
+ });
28
+ return {
29
+ openAccessibilityTestingMode: t,
30
+ closeAccessibilityTestingMode: c,
31
+ toggleAccessibilityTestingMode: a,
32
+ showImages: n,
33
+ hideImages: r,
34
+ toggleImages: () => e.imagesHidden ? n() : r(),
35
+ setColorVisionDeficiency: (i) => s((o) => {
36
+ o.setColorVisionDeficiency(i), e.colorVisionDeficiency = i;
37
+ }),
38
+ switchToDesktopPreview: () => s((i) => i.switchToDesktopPreview()),
39
+ switchToMobilePreview: () => s((i) => i.switchToMobilePreview()),
40
+ toggleCodeEditor: () => s((i) => i.emitToggleCodeEditor())
41
+ };
42
+ };
43
+ export {
44
+ I as useAccessibilityApi
45
+ };