@useinsider/guido 3.18.1-beta.9b8b7ac → 3.18.1-beta.c5d7fb4

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 (49) hide show
  1. package/dist/@types/config/schemas.js +3 -1
  2. package/dist/components/Guido.vue.js +4 -4
  3. package/dist/components/Guido.vue2.js +55 -53
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +82 -57
  6. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
  7. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
  8. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +24 -22
  9. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +28 -24
  10. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
  11. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
  12. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  13. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +46 -0
  14. package/dist/composables/useCustomInterfaceAppearance.js +46 -42
  15. package/dist/composables/useLegacyStrategyConversion.js +54 -0
  16. package/dist/composables/usePreviewMode.js +8 -11
  17. package/dist/config/compiler/htmlCompilerRules.js +6 -14
  18. package/dist/enums/extensions/recommendationBlock.js +2 -1
  19. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +70 -69
  20. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -28
  21. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +45 -44
  22. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +104 -58
  23. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +58 -0
  24. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
  25. package/dist/guido.css +1 -1
  26. package/dist/services/recommendationApi.js +61 -52
  27. package/dist/src/@types/config/schemas.d.ts +4 -0
  28. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
  29. package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
  30. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
  31. package/dist/src/composables/useConfig.d.ts +2 -0
  32. package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
  33. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -0
  34. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
  35. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +4 -0
  36. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +54 -1
  37. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +39 -0
  38. package/dist/src/services/recommendationApi.d.ts +2 -1
  39. package/dist/src/stores/config.d.ts +160 -0
  40. package/dist/src/stores/onboarding.d.ts +808 -10
  41. package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
  42. package/dist/static/assets/icons/line-info.svg.js +5 -0
  43. package/dist/static/styles/components/recommendation-strategy.css.js +70 -5
  44. package/dist/static/styles/customEditorStyle.css.js +0 -8
  45. package/dist/stores/config.js +66 -59
  46. package/dist/stores/onboarding.js +46 -36
  47. package/package.json +1 -1
  48. package/dist/src/utils/preventMobileWordOverflow.d.ts +0 -12
  49. package/dist/utils/preventMobileWordOverflow.js +0 -15
@@ -1,26 +1,30 @@
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 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({
13
15
  __name: "OnboardingWrapper",
14
16
  emits: ["onboarding-finished"],
15
- setup(H, { emit: f }) {
16
- const o = _(), r = P(), s = A(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
17
- { type: "newVersionPopup", component: y },
18
- { type: "genericOnboarding", component: v },
19
- { type: "textBlockOnboarding", component: S },
20
- { type: "versionHistoryOnboarding", component: h },
21
- { type: "ampOnboarding", component: u },
22
- { type: "itemsOnboarding", component: l }
23
- ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
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)));
24
28
  return O(async () => {
25
29
  await o.fetchUserModalState();
26
30
  }), t(
@@ -29,7 +33,7 @@ const G = /* @__PURE__ */ b({
29
33
  n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
30
34
  }
31
35
  ), t(
32
- () => s.emailFormat,
36
+ () => a.emailFormat,
33
37
  (n, i) => {
34
38
  i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
35
39
  }
@@ -38,9 +42,9 @@ const G = /* @__PURE__ */ b({
38
42
  (n) => {
39
43
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
40
44
  }
41
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
45
+ ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
42
46
  }
43
47
  });
44
48
  export {
45
- G as default
49
+ U as default
46
50
  };
@@ -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, a, i;
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": (a = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : a.right, "top-position": (i = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : i.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
+ "1f4a4044"
17
+ );
18
+ const S = _.exports;
19
+ export {
20
+ S as default
21
+ };
@@ -0,0 +1,46 @@
1
+ import { defineComponent as c, computed as g, watch as b } from "vue";
2
+ import { useRibbonOffset as p } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as u } from "../../../composables/useTranslations.js";
4
+ import { ACADEMY_LINKS as l } from "../../../enums/academy.js";
5
+ import { useOnboardingStore as f } from "../../../stores/onboarding.js";
6
+ import { InOnboard as O } from "@useinsider/design-system-vue";
7
+ const B = /* @__PURE__ */ c({
8
+ __name: "RecommendationStrategyOnboarding",
9
+ setup(_) {
10
+ const e = "recommendationStrategyOnboarding", n = u(), t = f(), { getTopPosition: i } = p(), r = `<a href="${l.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${n("action-builder.visit-academy")}</a>`, a = () => [
11
+ {
12
+ classes: "guido-recommendation-strategy-onboarding",
13
+ // Sits in the gap left of the settings panel and points at the strategy section, which
14
+ // starts 208px down: the panel header and its tab row are fixed chrome above it.
15
+ right: "426px",
16
+ top: i(208),
17
+ position: "Right Top",
18
+ title: n("email-editor.onboarding-recommendation-strategy-title"),
19
+ description: n("email-editor.onboarding-recommendation-strategy-description", {
20
+ academyLink: r
21
+ }),
22
+ imageSource: "",
23
+ backButtonClick: () => {
24
+ },
25
+ nextButtonType: "text",
26
+ nextButtonText: n("action-builder.ok"),
27
+ nextButtonClick: () => {
28
+ t.close(e);
29
+ }
30
+ }
31
+ ], m = g(() => t.onboardings.recommendationStrategyOnboarding.config.length > 0 && t.onboardings.recommendationStrategyOnboarding.isActive), d = () => {
32
+ var o, s;
33
+ (s = (o = t.getRecommendationStrategyCurrentCard) == null ? void 0 : o.nextButtonClick) == null || s.call(o);
34
+ };
35
+ return b(
36
+ () => t.isActive(e),
37
+ (o) => {
38
+ o && t.setConfig(e, a());
39
+ },
40
+ { immediate: !0 }
41
+ ), { __sfc: !0, ONBOARDING_TYPE: e, trans: n, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: m, handleNext: d, InOnboard: O };
42
+ }
43
+ });
44
+ export {
45
+ B as default
46
+ };
@@ -1,67 +1,71 @@
1
- import S from "../static/assets/icons/line-change.svg.js";
2
- import i from "../static/assets/icons/line-delete.svg.js";
3
- import n from "../static/assets/icons/line-plus.svg.js";
4
- import p from "../static/styles/base.css.js";
5
- import s from "../static/styles/components/alert-message.css.js";
6
- import C from "../static/styles/components/amp-block.css.js";
7
- import a from "../static/styles/components/base-input.css.js";
8
- import f from "../static/styles/components/button-group.css.js";
9
- import c from "../static/styles/components/button.css.js";
10
- import u from "../static/styles/components/combobox.css.js";
11
- import l from "../static/styles/components/counter.css.js";
12
- import d from "../static/styles/components/dropdown-menu.css.js";
1
+ import i from "../static/assets/icons/filled-arrow-rising.svg.js";
2
+ import n from "../static/assets/icons/line-change.svg.js";
3
+ import S from "../static/assets/icons/line-delete.svg.js";
4
+ import p from "../static/assets/icons/line-info.svg.js";
5
+ import s from "../static/assets/icons/line-plus.svg.js";
6
+ import f from "../static/styles/base.css.js";
7
+ import C from "../static/styles/components/alert-message.css.js";
8
+ import a from "../static/styles/components/amp-block.css.js";
9
+ import c from "../static/styles/components/base-input.css.js";
10
+ import l from "../static/styles/components/button-group.css.js";
11
+ import u from "../static/styles/components/button.css.js";
12
+ import d from "../static/styles/components/combobox.css.js";
13
+ import I from "../static/styles/components/counter.css.js";
14
+ import g from "../static/styles/components/dropdown-menu.css.js";
13
15
  import h from "../static/styles/components/loader.css.js";
14
- import g from "../static/styles/components/narrow-panel.css.js";
15
- import I from "../static/styles/components/popup.css.js";
16
- import w from "../static/styles/components/recommendation-strategy.css.js";
17
- import y from "../static/styles/components/switcher.css.js";
18
- import b from "../static/styles/components/tabs.css.js";
19
- import B from "../static/styles/components/tools.css.js";
20
- import $ from "../static/styles/components/version-history.css.js";
21
- import P from "../static/styles/components/wide-panel.css.js";
16
+ import w from "../static/styles/components/narrow-panel.css.js";
17
+ import $ from "../static/styles/components/popup.css.js";
18
+ import y from "../static/styles/components/recommendation-strategy.css.js";
19
+ import b from "../static/styles/components/switcher.css.js";
20
+ import B from "../static/styles/components/tabs.css.js";
21
+ import A from "../static/styles/components/tools.css.js";
22
+ import P from "../static/styles/components/version-history.css.js";
23
+ import R from "../static/styles/components/wide-panel.css.js";
22
24
  import x from "../static/styles/variables.css.js";
23
- function r(t, o) {
24
- return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
25
+ function o(t, r) {
26
+ return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(r.trim())}");`;
25
27
  }
26
- const A = `:host {
27
- ${r("line-change", S)}
28
- ${r("line-delete", i)}
29
- ${r("line-plus", n)}
30
- }`, R = [
28
+ const V = `:host {
29
+ ${o("line-change", n)}
30
+ ${o("line-delete", S)}
31
+ ${o("filled-arrow-rising", i)}
32
+ ${o("line-info", p)}
33
+ ${o("line-plus", s)}
34
+ }`, D = [
31
35
  x,
32
36
  // Must be on top
33
- A,
34
- p,
37
+ V,
38
+ f,
35
39
  // Must be on top
36
- s,
37
40
  C,
38
41
  a,
39
- f,
40
42
  c,
41
- u,
42
43
  l,
44
+ u,
43
45
  d,
44
- h,
45
- g,
46
46
  I,
47
- y,
47
+ g,
48
+ h,
49
+ w,
50
+ $,
48
51
  b,
49
52
  B,
50
- $,
53
+ A,
51
54
  P,
52
- w
55
+ R,
56
+ y
53
57
  // Last: overrides button.css / wide-panel.css defaults
54
58
  ].join(`
55
59
 
56
- `), Y = () => ({ importCss: () => {
57
- const o = new CSSStyleSheet();
58
- o.replaceSync(R);
60
+ `), ro = () => ({ importCss: () => {
61
+ const r = new CSSStyleSheet();
62
+ r.replaceSync(D);
59
63
  const e = document.querySelector("ui-editor");
60
64
  if (!e)
61
65
  return;
62
66
  const m = e.shadowRoot;
63
- m && (m.adoptedStyleSheets = [o]);
67
+ m && (m.adoptedStyleSheets = [r]);
64
68
  } });
65
69
  export {
66
- Y as useCustomInterfaceAppearance
70
+ ro as useCustomInterfaceAppearance
67
71
  };
@@ -0,0 +1,54 @@
1
+ import { useRecommendation as f } from "./useRecommendation.js";
2
+ import { useToaster as p } from "./useToaster.js";
3
+ import { useTranslations as S } from "./useTranslations.js";
4
+ import { ToasterTypeOptions as C } from "../enums/toaster.js";
5
+ import "../extensions/Blocks/Recommendation/constants/selectors.js";
6
+ import { CURRENT_CONFIG_VERSION as I } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
7
+ import { useRecommendationExtensionStore as L } from "../extensions/Blocks/Recommendation/store/recommendation.js";
8
+ import { buildLegacyMigrationPayload as v } from "../extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js";
9
+ import { commitBlockChangeOutsidePanel as R } from "../extensions/Blocks/Recommendation/utils/nodeConfigWriter.js";
10
+ import { useConfigStore as b } from "../stores/config.js";
11
+ const F = () => {
12
+ const t = L(), n = b(), { buildCampaignUrl: c } = f(), { showToaster: s } = p(), m = S();
13
+ return { convertLegacyStrategy: async () => {
14
+ const o = t.currentRecommendationId;
15
+ if (o === null || !t.isLegacyStrategyBlock || t.legacyConversionLoading)
16
+ return "";
17
+ const { strategy: g, productIds: d, filters: y } = t.recommendationConfigs, l = v({
18
+ blockId: o,
19
+ url: c(String(o)),
20
+ campaignId: n.campaignId,
21
+ variationId: n.variationId,
22
+ strategy: g,
23
+ productIds: d,
24
+ filters: y,
25
+ attributes: t.getFilterList
26
+ });
27
+ let e;
28
+ try {
29
+ e = await t.convertLegacyStrategy(l);
30
+ } catch (r) {
31
+ return console.error("[useLegacyStrategyConversion] migration failed", r), s({
32
+ type: C.Error,
33
+ message: m("email-editor.legacy-strategy-update-failed")
34
+ }), "";
35
+ }
36
+ const a = t.currentRecommendationId === o;
37
+ if (a)
38
+ try {
39
+ await t.fetchRecommendationProducts();
40
+ } catch (r) {
41
+ console.error("[useLegacyStrategyConversion] product refetch failed", r);
42
+ }
43
+ const i = t.blockStates[o], { size: u } = i.recommendationConfigs;
44
+ return R(
45
+ o,
46
+ { strategyId: e, size: u, configVersion: I },
47
+ i.recommendationProducts,
48
+ "Converted legacy recommendation strategy"
49
+ ), a && t.openLegacyStrategyUpdatedModal(), e;
50
+ } };
51
+ };
52
+ export {
53
+ F as useLegacyStrategyConversion
54
+ };
@@ -1,12 +1,11 @@
1
1
  import { useEditorStore as n } from "../stores/editor.js";
2
2
  import { usePreviewStore as p } from "../stores/preview.js";
3
- import { preventMobileWordOverflow as c } from "../utils/preventMobileWordOverflow.js";
4
- import { useActionsApi as u } from "./useActionsApi.js";
5
- import { useCodeEditorApi as v } from "./useCodeEditorApi.js";
6
- import { useHtmlCompiler as w } from "./useHtmlCompiler.js";
7
- import { useRecommendationPreview as f } from "./useRecommendationPreview.js";
8
- const z = () => {
9
- const t = n(), e = p(), { closeCodeEditor: a } = v(), { getPreviewData: m, getCompiledEmail: s } = u(), { compileHtml: l } = w(), { substituteRecommendationPreview: r } = f(), i = () => {
3
+ import { useActionsApi as c } from "./useActionsApi.js";
4
+ import { useCodeEditorApi as u } from "./useCodeEditorApi.js";
5
+ import { useHtmlCompiler as v } from "./useHtmlCompiler.js";
6
+ import { useRecommendationPreview as w } from "./useRecommendationPreview.js";
7
+ const C = () => {
8
+ const t = n(), e = p(), { closeCodeEditor: a } = u(), { getPreviewData: m, getCompiledEmail: s } = c(), { compileHtml: l } = v(), { substituteRecommendationPreview: r } = w(), i = () => {
10
9
  t.isPreviewModeOpen = !1, e.$reset();
11
10
  };
12
11
  return {
@@ -22,9 +21,7 @@ const z = () => {
22
21
  m(),
23
22
  s({ minimize: !0, resetDataSavedFlag: !1 })
24
23
  ]);
25
- e.templateHtml = c(
26
- r(o.html || "")
27
- ), e.ampHtml = r(o.ampHtml || ""), e.ampErrors = o.ampErrors || [], e.setEmailFormat(o.ampHtml ? "AMP" : "html"), e.emailSizeKB = l(d.html).estimatedSizeKB, e.isLoaded = !0;
24
+ e.templateHtml = r(o.html || ""), e.ampHtml = r(o.ampHtml || ""), e.ampErrors = o.ampErrors || [], e.setEmailFormat(o.ampHtml ? "AMP" : "html"), e.emailSizeKB = l(d.html).estimatedSizeKB, e.isLoaded = !0;
28
25
  } catch (o) {
29
26
  console.error("Failed to load preview data:", o), i();
30
27
  } finally {
@@ -35,5 +32,5 @@ const z = () => {
35
32
  };
36
33
  };
37
34
  export {
38
- z as usePreviewMode
35
+ C as usePreviewMode
39
36
  };
@@ -1,6 +1,5 @@
1
- import { preventMobileWordOverflow as c } from "../../utils/preventMobileWordOverflow.js";
2
- import { stripFontTags as l } from "../../utils/stripFontTags.js";
3
- const f = [
1
+ import { stripFontTags as p } from "../../utils/stripFontTags.js";
2
+ const d = [
4
3
  {
5
4
  id: "fix-url-encoding-start",
6
5
  description: "Replace {%22 with %7B%22 to fix URL encoding",
@@ -55,18 +54,11 @@ const f = [
55
54
  replaceAll: !0,
56
55
  priority: 14
57
56
  },
58
- {
59
- id: "prevent-mobile-word-overflow",
60
- description: "SD-151345: let long words break on mobile so non-responsive containers keep their own width.",
61
- type: "custom",
62
- processor: (e) => c(e),
63
- priority: 15
64
- },
65
57
  {
66
58
  id: "strip-font-tags",
67
59
  description: 'Unwrap browser-translate-injected <font dir="auto"> tags, keeping inner content; other <font> elements are left intact.',
68
60
  type: "custom",
69
- processor: (e) => l(e),
61
+ processor: (e) => p(e),
70
62
  priority: 15
71
63
  },
72
64
  {
@@ -165,8 +157,8 @@ const f = [
165
157
  processor: (e) => {
166
158
  const t = (i) => i.toString(16).padStart(2, "0");
167
159
  return e.replace(/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/gi, (i, o, n, r) => {
168
- const [s, a, p] = [Number(o), Number(n), Number(r)];
169
- return s > 255 || a > 255 || p > 255 ? i : `#${t(s)}${t(a)}${t(p)}`;
160
+ const [s, a, c] = [Number(o), Number(n), Number(r)];
161
+ return s > 255 || a > 255 || c > 255 ? i : `#${t(s)}${t(a)}${t(c)}`;
170
162
  }).replace(/#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3\b/gi, "#$1$2$3");
171
163
  },
172
164
  priority: 44
@@ -208,5 +200,5 @@ const f = [
208
200
  }
209
201
  ];
210
202
  export {
211
- f as defaultHtmlCompilerRules
203
+ d as defaultHtmlCompilerRules
212
204
  };
@@ -4,7 +4,8 @@ const l = {
4
4
  // Relative path → same-origin as the embedding inone dashboard.
5
5
  PRODUCT_ATTRIBUTES_PATH: "/product-attributes/get-attributes",
6
6
  RECOMMENDATION_STRATEGIES_PATH: "/api/recommendation-strategies",
7
- RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies"
7
+ RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies",
8
+ NEWSLETTER_RECOMMENDATIONS_PATH: "/newsletter/recommendations"
8
9
  }, c = {
9
10
  CLIENT_ID: "clientId"
10
11
  }, d = () => {