@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
@@ -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,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
+ };
@@ -1,44 +1,44 @@
1
1
  import p from "../static/assets/icons/filled-arrow-rising.svg.js";
2
2
  import s from "../static/assets/icons/line-change.svg.js";
3
- import a from "../static/assets/icons/line-delete.svg.js";
4
- import f from "../static/assets/icons/line-info.svg.js";
3
+ import f from "../static/assets/icons/line-delete.svg.js";
4
+ import a from "../static/assets/icons/line-info.svg.js";
5
5
  import c from "../static/assets/icons/line-plus.svg.js";
6
6
  import l from "../static/styles/base.css.js";
7
- import C from "../static/styles/components/alert-message.css.js";
8
- import d from "../static/styles/components/amp-block.css.js";
9
- import u from "../static/styles/components/base-input.css.js";
10
- import h from "../static/styles/components/button-group.css.js";
11
- import I from "../static/styles/components/button.css.js";
12
- import g from "../static/styles/components/combobox.css.js";
13
- import w from "../static/styles/components/counter.css.js";
14
- import y from "../static/styles/components/dropdown-menu.css.js";
15
- import A from "../static/styles/components/loader.css.js";
16
- import $ from "../static/styles/components/narrow-panel.css.js";
17
- import b from "../static/styles/components/popup.css.js";
18
- import B from "../static/styles/components/recommendation-strategy.css.js";
19
- import D from "../static/styles/components/skeleton.css.js";
20
- import R from "../static/styles/components/switcher.css.js";
21
- import P from "../static/styles/components/tabs.css.js";
22
- import T from "../static/styles/components/tools.css.js";
23
- import x from "../static/styles/components/version-history.css.js";
24
- import M from "../static/styles/components/wide-panel.css.js";
25
- import O from "../static/styles/variables.css.js";
7
+ import C from "../static/styles/components/accessibility.css.js";
8
+ import d from "../static/styles/components/alert-message.css.js";
9
+ import u from "../static/styles/components/amp-block.css.js";
10
+ import h from "../static/styles/components/base-input.css.js";
11
+ import I from "../static/styles/components/button-group.css.js";
12
+ import g from "../static/styles/components/button.css.js";
13
+ import w from "../static/styles/components/combobox.css.js";
14
+ import y from "../static/styles/components/counter.css.js";
15
+ import A from "../static/styles/components/dropdown-menu.css.js";
16
+ import $ from "../static/styles/components/loader.css.js";
17
+ import b from "../static/styles/components/narrow-panel.css.js";
18
+ import B from "../static/styles/components/popup.css.js";
19
+ import D from "../static/styles/components/recommendation-strategy.css.js";
20
+ import R from "../static/styles/components/skeleton.css.js";
21
+ import P from "../static/styles/components/switcher.css.js";
22
+ import T from "../static/styles/components/tabs.css.js";
23
+ import x from "../static/styles/components/tools.css.js";
24
+ import M from "../static/styles/components/version-history.css.js";
25
+ import O from "../static/styles/components/wide-panel.css.js";
26
+ import V from "../static/styles/variables.css.js";
26
27
  function o(i, r) {
27
28
  return `--guido-icon-${i}: url("data:image/svg+xml,${encodeURIComponent(r.trim())}");`;
28
29
  }
29
- const V = `:host {
30
+ const W = `:host {
30
31
  ${o("line-change", s)}
31
- ${o("line-delete", a)}
32
+ ${o("line-delete", f)}
32
33
  ${o("filled-arrow-rising", p)}
33
- ${o("line-info", f)}
34
+ ${o("line-info", a)}
34
35
  ${o("line-plus", c)}
35
- }`, W = [
36
- O,
37
- // Must be on top
36
+ }`, _ = [
38
37
  V,
38
+ // Must be on top
39
+ W,
39
40
  l,
40
41
  // Must be on top
41
- C,
42
42
  d,
43
43
  u,
44
44
  h,
@@ -49,33 +49,34 @@ const V = `:host {
49
49
  A,
50
50
  $,
51
51
  b,
52
- D,
52
+ B,
53
53
  R,
54
54
  P,
55
55
  T,
56
56
  x,
57
57
  M,
58
- B
59
- // Last: overrides button.css / wide-panel.css defaults
58
+ O,
59
+ D,
60
+ C
60
61
  ].join(`
61
62
 
62
- `), _ = 3e4;
63
+ `), k = 3e4;
63
64
  let e = null;
64
- function k() {
65
- return e || (e = new CSSStyleSheet(), e.replaceSync(W)), e;
65
+ function q() {
66
+ return e || (e = new CSSStyleSheet(), e.replaceSync(_)), e;
66
67
  }
67
- const po = () => ({ importCss: () => {
68
- const r = k(), S = Date.now() + _, n = () => {
69
- var m;
70
- const t = (m = document.querySelector("ui-editor")) == null ? void 0 : m.shadowRoot;
68
+ const fo = () => ({ importCss: () => {
69
+ const r = q(), S = Date.now() + k, m = () => {
70
+ var n;
71
+ const t = (n = document.querySelector("ui-editor")) == null ? void 0 : n.shadowRoot;
71
72
  if (t) {
72
73
  t.adoptedStyleSheets.includes(r) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, r]);
73
74
  return;
74
75
  }
75
- Date.now() < S && requestAnimationFrame(n);
76
+ Date.now() < S && requestAnimationFrame(m);
76
77
  };
77
- n();
78
+ m();
78
79
  } });
79
80
  export {
80
- po as useCustomInterfaceAppearance
81
+ fo as useCustomInterfaceAppearance
81
82
  };
@@ -1,34 +1,34 @@
1
- import { useRecommendation as C } from "./useRecommendation.js";
1
+ import { useRecommendation as S } from "./useRecommendation.js";
2
2
  import { useToaster as I } from "./useToaster.js";
3
3
  import { useTranslations as v } from "./useTranslations.js";
4
4
  import { ToasterTypeOptions as g } from "../enums/toaster.js";
5
5
  import "../extensions/Blocks/Recommendation/constants/selectors.js";
6
6
  import { CURRENT_CONFIG_VERSION as L } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
7
- import { useRecommendationExtensionStore as b } from "../extensions/Blocks/Recommendation/store/recommendation.js";
8
- import { resolveMigrationTarget as k, buildLegacyMigrationPayload as R } from "../extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js";
7
+ import { useRecommendationExtensionStore as R } from "../extensions/Blocks/Recommendation/store/recommendation.js";
8
+ import { resolveMigrationTarget as b, buildLegacyMigrationPayload as k } from "../extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js";
9
9
  import { commitBlockChangeOutsidePanel as T } from "../extensions/Blocks/Recommendation/utils/nodeConfigWriter.js";
10
10
  import { useConfigStore as h } from "../stores/config.js";
11
11
  const F = () => {
12
- const e = b(), r = h(), { buildCampaignUrl: m } = C(), { showToaster: c } = I(), a = v();
12
+ const e = R(), o = h(), { buildCampaignUrl: m } = S(), { showToaster: c } = I(), a = v();
13
13
  return { convertLegacyStrategy: async () => {
14
14
  const t = e.currentRecommendationId;
15
15
  if (t === null || !e.isLegacyStrategyBlock || e.legacyConversionLoading)
16
16
  return "";
17
- const { strategy: d, productIds: y, size: l, strategyId: p, nodeConfigVersion: u } = e.recommendationConfigs, f = { strategyId: p, size: l, nodeConfigVersion: u }, s = k({
18
- campaignId: r.campaignId,
19
- templateLibraryId: r.templateLibraryId
20
- }), S = R({
17
+ const { strategy: d, productIds: y, size: l, strategyId: p, nodeConfigVersion: u } = e.recommendationConfigs, f = { strategyId: p, size: l, nodeConfigVersion: u }, s = b({
18
+ campaignId: o.campaignId,
19
+ templateLibraryId: o.templateLibraryId
20
+ }), C = k({
21
21
  blockId: t,
22
22
  url: m(String(t)),
23
- campaignId: r.campaignId,
24
- variationId: r.variationId,
23
+ campaignId: o.campaignId,
24
+ variationId: o.variationId,
25
25
  strategy: d,
26
26
  productIds: y,
27
27
  target: s
28
28
  });
29
- let o;
29
+ let r;
30
30
  try {
31
- o = await e.convertLegacyStrategy(S, s);
31
+ r = await e.convertLegacyStrategy(C, s);
32
32
  } catch (i) {
33
33
  return console.error("[useLegacyStrategyConversion] migration failed", i), c({
34
34
  type: g.Error,
@@ -40,7 +40,7 @@ const F = () => {
40
40
  }), "";
41
41
  }
42
42
  try {
43
- await e.fetchStrategyProductsForBlock(t);
43
+ await e.fetchRecommendationProductsForBlock(t);
44
44
  } catch (i) {
45
45
  console.error("[useLegacyStrategyConversion] product refetch failed", i);
46
46
  }
@@ -48,16 +48,16 @@ const F = () => {
48
48
  return n ? T(
49
49
  t,
50
50
  {
51
- strategyId: o,
51
+ strategyId: r,
52
52
  size: n.recommendationConfigs.size,
53
53
  configVersion: L
54
54
  },
55
55
  n.recommendationProducts,
56
56
  "Converted legacy recommendation strategy"
57
- ) ? (e.currentRecommendationId === t && e.openLegacyStrategyUpdatedModal(), o) : (console.error("[useLegacyStrategyConversion] node write failed", t), e.revertLegacyConversion(t, f), c({
57
+ ) ? (e.currentRecommendationId === t && e.openLegacyStrategyUpdatedModal(), r) : (console.error("[useLegacyStrategyConversion] node write failed", t), e.revertLegacyConversion(t, f), c({
58
58
  type: g.Error,
59
59
  message: a("email-editor.legacy-strategy-update-failed")
60
- }), "") : o;
60
+ }), "") : r;
61
61
  } };
62
62
  };
63
63
  export {
@@ -31,13 +31,13 @@ const he = () => {
31
31
  n = null;
32
32
  }), n), D = async (r, s, o, a = [], i = !1) => {
33
33
  var y, E, h, C;
34
- const e = k(), { html: d, css: R } = r, { baseBlocks: g, extensions: P } = await V(), S = ((y = c.value) == null ? void 0 : y.displayConditions) ?? !0, U = ((E = c.value) == null ? void 0 : E.modulesDisabled) ?? !1, I = !!d || (((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1), q = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
34
+ const e = k(), { html: d, css: P } = r, { baseBlocks: g, extensions: R } = await V(), S = ((y = c.value) == null ? void 0 : y.displayConditions) ?? !0, U = ((E = c.value) == null ? void 0 : E.modulesDisabled) ?? !1, I = !!d || (((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1), q = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
35
35
  w().importCss(), await window.UIEditor.initEditor(
36
36
  document.querySelector("#guido-editor"),
37
37
  {
38
38
  metadata: s,
39
39
  html: d,
40
- css: R,
40
+ css: P,
41
41
  forceRecreate: I,
42
42
  locale: "en",
43
43
  undoButtonSelector: "#guido__undo-button",
@@ -60,6 +60,7 @@ const he = () => {
60
60
  keepModuleStylesEnabled: !0,
61
61
  displayTitle: !1,
62
62
  displayUTM: !1,
63
+ copyPasteEnabled: !1,
63
64
  selectElementAfterDrop: !0,
64
65
  sameFontSizeForOutlook: !0,
65
66
  allowedScriptSourceDomains: q,
@@ -120,7 +121,7 @@ const he = () => {
120
121
  ".in-modal-v2-wrapper",
121
122
  ".in-toasts-wrapper"
122
123
  ],
123
- extensions: P,
124
+ extensions: R,
124
125
  localePatch: J
125
126
  }
126
127
  );
@@ -1,6 +1,15 @@
1
1
  import { pairProductVariables as o } from "../../utils/pairProductVariables.js";
2
- import { wrapHiddenPriceTdsForOutlook as r, MSO_ITEMS_HIDE_START as e, MSO_ITEMS_HIDE_END as t } from "./utils/itemsCompilerUtils.js";
3
- const a = [
2
+ import { normalizeItemsBlockWidths as r, wrapHiddenPriceTdsForOutlook as t, lockHorizontalItemImageWidths as e, MSO_ITEMS_HIDE_START as s, MSO_ITEMS_HIDE_END as p } from "./utils/itemsCompilerUtils.js";
3
+ const c = [
4
+ {
5
+ id: "normalize-items-block-widths",
6
+ // Runs before the other items rules so they see non-zero widths; not AMP-safe.
7
+ description: "Normalize zero Items card widths in the compiled email",
8
+ type: "custom",
9
+ processor: r,
10
+ priority: 55
11
+ // Before pair-product-variables (60)
12
+ },
4
13
  {
5
14
  id: "pair-product-variables",
6
15
  description: "Replace product default values with template variables",
@@ -16,20 +25,27 @@ const a = [
16
25
  // with safe placeholder comments and collapse them inline for web-engine Outlook.
17
26
  description: "Mark hidden Items price tds for Outlook conditional hiding",
18
27
  type: "custom",
19
- processor: r,
28
+ processor: t,
20
29
  priority: 65
21
30
  // After pair-product-variables (60), before outlook rules (70+)
22
31
  },
32
+ {
33
+ id: "lock-horizontal-item-image-widths",
34
+ description: "Pin horizontal Items thumbnails to their width so narrow rows cannot collapse them",
35
+ type: "custom",
36
+ processor: e,
37
+ priority: 66
38
+ },
23
39
  {
24
40
  id: "swap-items-mso-markers",
25
41
  // Injecting the delicate `<!-- -->` ghost token LAST (after reco minify P99
26
42
  // and reco swap P100) keeps it out of every whitespace/comment-mangling pass.
27
43
  description: "Swap Items MSO markers into [if !mso] conditional comments",
28
44
  type: "custom",
29
- processor: (i) => i.replaceAll(`<!--${e}-->`, "<!--[if !mso]><!-- -->").replaceAll(`<!--${t}-->`, "<!--<![endif]-->"),
45
+ processor: (i) => i.replaceAll(`<!--${s}-->`, "<!--[if !mso]><!-- -->").replaceAll(`<!--${p}-->`, "<!--<![endif]-->"),
30
46
  priority: 101
31
47
  }
32
48
  ];
33
49
  export {
34
- a as itemsCompilerRules
50
+ c as itemsCompilerRules
35
51
  };