@useinsider/guido 3.18.1-beta.d931f79 → 3.18.1-beta.db1e41e

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.
@@ -15,7 +15,7 @@ var a = function() {
15
15
  n,
16
16
  !1,
17
17
  null,
18
- "6c26ded2"
18
+ "b447f626"
19
19
  );
20
20
  const y = i.exports;
21
21
  export {
@@ -1,47 +1,46 @@
1
- import { defineComponent as I, defineAsyncComponent as S, ref as T, computed as l, watch as h } from "vue";
1
+ import { defineComponent as E, defineAsyncComponent as y, ref as f, computed as c, watch as O } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useToaster as A } from "../../../../composables/useToaster.js";
4
- import { useTranslations as C } from "../../../../composables/useTranslations.js";
5
- import { DOTTED_DATE_LOCALE as B } from "../../../../enums/date.js";
6
- import { URLS as b } from "../../../../enums/extensions/recommendationBlock.js";
3
+ import { useToaster as h } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as A } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as I } from "../../../../enums/date.js";
6
+ import { URLS as C } from "../../../../enums/extensions/recommendationBlock.js";
7
7
  import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as k } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { commitStrategyDetach as N } from "../../../../extensions/Blocks/Recommendation/utils/strategyDetach.js";
10
- import R from "./StrategyInfoBoxContent.vue.js";
11
- import { formatShortDate as P } from "../../../../utils/dateUtil.js";
12
- import { asText as _ } from "../../../../utils/genericUtil.js";
13
- import { escapeHtml as U } from "../../../../utils/htmlEscape.js";
14
- import { InSkeleton as L } from "@useinsider/design-system-vue";
15
- const rt = /* @__PURE__ */ I({
8
+ import { useRecommendationExtensionStore as B } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import b from "./StrategyInfoBoxContent.vue.js";
10
+ import { formatShortDate as N } from "../../../../utils/dateUtil.js";
11
+ import { asText as S } from "../../../../utils/genericUtil.js";
12
+ import { escapeHtml as k } from "../../../../utils/htmlEscape.js";
13
+ import { InSkeleton as P } from "@useinsider/design-system-vue";
14
+ const Y = /* @__PURE__ */ E({
16
15
  __name: "AssignStrategyDrawer",
17
- setup(M) {
18
- const g = () => import("@useinsider/design-system-organisms"), d = (t, r) => ({
19
- render: (o) => o(L, { props: { sizing: { width: t, height: r } } })
20
- }), D = S({
16
+ setup(R) {
17
+ const g = () => import("@useinsider/design-system-organisms"), d = (t, e) => ({
18
+ render: (a) => a(P, { props: { sizing: { width: t, height: e } } })
19
+ }), T = y({
21
20
  loader: async () => (await g()).OrgStrategyDetailModal,
22
21
  loadingComponent: d(480, 240),
23
22
  delay: 0
24
- }), v = S({
23
+ }), _ = y({
25
24
  loader: async () => (await g()).OrgStrategyDropdown
26
- }), n = "guido-edit-strategy-", s = C(), e = k(), { showToaster: i } = A(), a = T(null), c = T(!1), w = l(() => e.assignStrategyDrawerStatus ? s("email-editor.assign-strategy-description", { url: b.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
- h(() => e.assignStrategyDrawerStatus, (t) => {
25
+ }), n = "guido-edit-strategy-", s = A(), r = B(), { showToaster: i } = h(), o = f(null), l = f(!1), D = c(() => r.assignStrategyDrawerStatus ? s("email-editor.assign-strategy-description", { url: C.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
26
+ O(() => r.assignStrategyDrawerStatus, (t) => {
28
27
  if (!t)
29
28
  return;
30
- const { strategyId: r } = e.recommendationConfigs;
31
- a.value = r || null, c.value = !1, e.fetchStrategies().catch(() => {
29
+ const { strategyId: e } = r.recommendationConfigs;
30
+ o.value = e || null, l.value = !1, r.fetchStrategies().catch(() => {
32
31
  i({
33
32
  type: m.Error,
34
33
  message: s("discovery-strategy.error-description")
35
34
  });
36
35
  });
37
36
  });
38
- const u = (t) => {
39
- const r = _(t.updated_at || t.created_at);
40
- if (!r)
37
+ const p = (t) => {
38
+ const e = S(t.updated_at || t.created_at);
39
+ if (!e)
41
40
  return "";
42
- const o = P(r, B);
43
- return s("recommendation-strategy.last-updated-on", { value: o });
44
- }, x = l(() => e.strategies.map((t) => ({
41
+ const a = N(e, I);
42
+ return s("recommendation-strategy.last-updated-on", { value: a });
43
+ }, v = c(() => r.strategies.map((t) => ({
45
44
  text: t.name,
46
45
  value: t.strategy_id,
47
46
  infoBoxProps: {
@@ -49,10 +48,10 @@ const rt = /* @__PURE__ */ I({
49
48
  theme: "light",
50
49
  variant: "information",
51
50
  className: "assign-strategy-info-box",
52
- titleText: U(_(t.name)),
51
+ titleText: k(S(t.name)),
53
52
  descriptionStatus: !0,
54
- descriptionText: u(t),
55
- slot: R,
53
+ descriptionText: p(t),
54
+ slot: b,
56
55
  slotProps: { strategy: t },
57
56
  // The info box drops the option's value/text, so the id is the only channel
58
57
  // that can carry the strategy back to the click handler.
@@ -65,19 +64,14 @@ const rt = /* @__PURE__ */ I({
65
64
  icon: "line-open-website"
66
65
  }]
67
66
  }
68
- }))), E = (t) => {
69
- var f;
70
- const r = (f = t == null ? void 0 : t.id) != null && f.startsWith(n) ? t.id.slice(n.length) : "";
71
- if (!r)
72
- return;
73
- const o = e.currentRecommendationId;
74
- String(a.value ?? "") === r && (a.value = null);
75
- const y = e.recommendationConfigs.strategyId === r;
76
- y && e.removeStrategy(), e.openStrategyEdit(r), y && o !== null && N(o);
77
- }, p = l(() => {
78
- const t = e.strategies.find((r) => String(r.strategy_id) === String(a.value ?? ""));
67
+ }))), w = (t) => {
68
+ var a;
69
+ const e = (a = t == null ? void 0 : t.id) != null && a.startsWith(n) ? t.id.slice(n.length) : "";
70
+ e && (String(o.value ?? "") === e && (o.value = null), r.recommendationConfigs.strategyId === e && r.removeStrategy(), r.openStrategyEdit(e));
71
+ }, u = c(() => {
72
+ const t = r.strategies.find((e) => String(e.strategy_id) === String(o.value ?? ""));
79
73
  return t ? { ...t, fallback_config: null } : null;
80
- }), O = l(() => ({
74
+ }), x = c(() => ({
81
75
  primaryButton: {
82
76
  styling: "solid",
83
77
  type: "primary",
@@ -89,36 +83,36 @@ const rt = /* @__PURE__ */ I({
89
83
  labelText: s("products.cancel")
90
84
  }
91
85
  }));
92
- return { __sfc: !0, loadOrganisms: g, skeleton: d, OrgStrategyDetailModal: D, OrgStrategyDropdown: v, EDIT_BUTTON_ID_PREFIX: n, trans: s, store: e, showToaster: i, selectedStrategyId: a, showSelectionError: c, drawerDescription: w, lastUpdatedText: u, strategyOptions: x, onInfoBoxButtonClick: E, selectedStrategy: p, footerButtonGroupOptions: O, closeDrawer: () => {
93
- e.closeAssignStrategyDrawer();
86
+ return { __sfc: !0, loadOrganisms: g, skeleton: d, OrgStrategyDetailModal: T, OrgStrategyDropdown: _, EDIT_BUTTON_ID_PREFIX: n, trans: s, store: r, showToaster: i, selectedStrategyId: o, showSelectionError: l, drawerDescription: D, lastUpdatedText: p, strategyOptions: v, onInfoBoxButtonClick: w, selectedStrategy: u, footerButtonGroupOptions: x, closeDrawer: () => {
87
+ r.closeAssignStrategyDrawer();
94
88
  }, assignStrategy: async () => {
95
- const t = p.value;
89
+ const t = u.value;
96
90
  if (!t) {
97
- c.value = !0;
91
+ l.value = !0;
98
92
  return;
99
93
  }
100
- let r = "";
94
+ let e = "";
101
95
  try {
102
- r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
103
- } catch (o) {
104
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", o);
96
+ e = await r.resolveStrategyUrlTemplate(t, r.recommendationConfigs.currencySettings.value);
97
+ } catch (a) {
98
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
105
99
  }
106
- if (!r) {
100
+ if (!e) {
107
101
  i({
108
102
  type: m.Error,
109
103
  message: s("email-editor.strategy-assign-failed", { strategyName: t.name })
110
104
  });
111
105
  return;
112
106
  }
113
- e.assignStrategy(t), i({
107
+ r.assignStrategy(t), i({
114
108
  type: m.Success,
115
109
  message: s("email-editor.strategy-assigned-success", { strategyName: t.name })
116
- }), e.closeAssignStrategyDrawer();
110
+ }), r.closeAssignStrategyDrawer();
117
111
  }, onSelect: (t) => {
118
- a.value = t.value, c.value = !1;
112
+ o.value = t.value, l.value = !1;
119
113
  } };
120
114
  }
121
115
  });
122
116
  export {
123
- rt as default
117
+ Y as default
124
118
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as l, computed as a } from "vue";
2
- import d from "../../../wrappers/WpModal.vue.js";
3
- import { useToaster as g } from "../../../../composables/useToaster.js";
4
- import { useTranslations as y } from "../../../../composables/useTranslations.js";
5
- import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
6
- import { useRecommendationExtensionStore as f } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
- import { commitStrategyDetach as _ } from "../../../../extensions/Blocks/Recommendation/utils/strategyDetach.js";
8
- import { escapeHtml as T } from "../../../../utils/htmlEscape.js";
9
- const C = /* @__PURE__ */ l({
1
+ import { defineComponent as u, computed as n } from "vue";
2
+ import y from "../../../wrappers/WpModal.vue.js";
3
+ import { useToaster as f } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as _ } from "../../../../composables/useTranslations.js";
5
+ import { ToasterTypeOptions as v } from "../../../../enums/toaster.js";
6
+ import { useRecommendationExtensionStore as T } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
+ import { commitBlockChangeOutsidePanel as h } from "../../../../extensions/Blocks/Recommendation/utils/nodeConfigWriter.js";
8
+ import { escapeHtml as R } from "../../../../utils/htmlEscape.js";
9
+ const P = /* @__PURE__ */ u({
10
10
  __name: "RemoveStrategyModal",
11
- setup(v) {
12
- const t = y(), e = f(), { showToaster: n } = g(), i = a(() => ({
11
+ setup(S) {
12
+ const t = _(), e = T(), { showToaster: a } = f(), i = n(() => ({
13
13
  cancelOrBackButton: {
14
14
  type: "secondary",
15
15
  labelText: t("products.cancel"),
@@ -19,25 +19,39 @@ const C = /* @__PURE__ */ l({
19
19
  type: "danger",
20
20
  labelText: t("discovery-strategy.remove")
21
21
  }
22
- })), m = a(() => {
22
+ })), m = n(() => {
23
23
  var o;
24
- const { strategyId: s } = e.recommendationConfigs;
25
- return ((o = e.assignedStrategy) == null ? void 0 : o.name) || `#${s}`;
26
- }), r = "__STRATEGY_NAME__", p = a(() => t("email-editor.remove-strategy-confirm-message", { strategyName: r }).split(r)), c = () => {
24
+ const { strategyId: r } = e.recommendationConfigs;
25
+ return ((o = e.assignedStrategy) == null ? void 0 : o.name) || `#${r}`;
26
+ }), s = "__STRATEGY_NAME__", d = n(() => t("email-editor.remove-strategy-confirm-message", { strategyName: s }).split(s)), c = () => {
27
27
  e.closeRemoveStrategyModal();
28
28
  };
29
- return { __sfc: !0, trans: t, store: e, showToaster: n, footerButtonOptions: i, strategyName: m, NAME_TOKEN: r, messageParts: p, close: c, handleConfirm: async () => {
30
- const s = m.value, o = e.currentRecommendationId;
31
- e.removeStrategy(), c(), n({
32
- type: u.Success,
29
+ return { __sfc: !0, trans: t, store: e, showToaster: a, footerButtonOptions: i, strategyName: m, NAME_TOKEN: s, messageParts: d, close: c, handleConfirm: async () => {
30
+ const r = m.value, o = e.currentRecommendationId;
31
+ e.removeStrategy(), c();
32
+ const { strategyId: l, size: g } = e.recommendationConfigs;
33
+ if (a({
34
+ type: v.Success,
33
35
  // The toast renders through a sanitizing v-html, so the name is escaped first.
34
36
  message: t("email-editor.strategy-removed-success", {
35
- strategyName: `<b>${T(s)}</b>`
37
+ strategyName: `<b>${R(r)}</b>`
36
38
  })
37
- }), o !== null && await _(o);
38
- }, WpModal: d };
39
+ }), o !== null) {
40
+ try {
41
+ await e.fetchRecommendationProducts();
42
+ } catch (p) {
43
+ console.error("[RemoveStrategyModal] product refetch failed", p);
44
+ }
45
+ h(
46
+ o,
47
+ { strategyId: l, size: g },
48
+ e.recommendationProducts,
49
+ "Removed recommendation strategy"
50
+ );
51
+ }
52
+ }, WpModal: y };
39
53
  }
40
54
  });
41
55
  export {
42
- C as default
56
+ P as default
43
57
  };
@@ -1,9 +1,9 @@
1
1
  import p from "../static/assets/icons/line-change.svg.js";
2
2
  import s from "../static/assets/icons/line-delete.svg.js";
3
3
  import a from "../static/assets/icons/line-plus.svg.js";
4
- import f from "../static/styles/base.css.js";
5
- import C from "../static/styles/components/alert-message.css.js";
6
- import c from "../static/styles/components/amp-block.css.js";
4
+ import c from "../static/styles/base.css.js";
5
+ import f from "../static/styles/components/alert-message.css.js";
6
+ import C from "../static/styles/components/amp-block.css.js";
7
7
  import l from "../static/styles/components/base-input.css.js";
8
8
  import d from "../static/styles/components/button-group.css.js";
9
9
  import u from "../static/styles/components/button.css.js";
@@ -14,28 +14,27 @@ import y from "../static/styles/components/loader.css.js";
14
14
  import I from "../static/styles/components/narrow-panel.css.js";
15
15
  import A from "../static/styles/components/popup.css.js";
16
16
  import b from "../static/styles/components/recommendation-strategy.css.js";
17
- import B from "../static/styles/components/skeleton.css.js";
18
- import D from "../static/styles/components/switcher.css.js";
19
- import $ from "../static/styles/components/tabs.css.js";
20
- import P from "../static/styles/components/tools.css.js";
21
- import R from "../static/styles/components/version-history.css.js";
22
- import T from "../static/styles/components/wide-panel.css.js";
23
- import x from "../static/styles/variables.css.js";
17
+ import B from "../static/styles/components/switcher.css.js";
18
+ import D from "../static/styles/components/tabs.css.js";
19
+ import $ from "../static/styles/components/tools.css.js";
20
+ import P from "../static/styles/components/version-history.css.js";
21
+ import R from "../static/styles/components/wide-panel.css.js";
22
+ import T from "../static/styles/variables.css.js";
24
23
  function r(S, o) {
25
24
  return `--guido-icon-${S}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
26
25
  }
27
- const M = `:host {
26
+ const x = `:host {
28
27
  ${r("line-change", p)}
29
28
  ${r("line-delete", s)}
30
29
  ${r("line-plus", a)}
31
- }`, O = [
30
+ }`, M = [
31
+ T,
32
+ // Must be on top
32
33
  x,
34
+ c,
33
35
  // Must be on top
34
- M,
35
36
  f,
36
- // Must be on top
37
37
  C,
38
- c,
39
38
  l,
40
39
  d,
41
40
  u,
@@ -50,18 +49,17 @@ const M = `:host {
50
49
  $,
51
50
  P,
52
51
  R,
53
- T,
54
52
  b
55
53
  // Last: overrides button.css / wide-panel.css defaults
56
54
  ].join(`
57
55
 
58
- `), V = 3e4;
56
+ `), O = 3e4;
59
57
  let e = null;
60
- function W() {
61
- return e || (e = new CSSStyleSheet(), e.replaceSync(O)), e;
58
+ function V() {
59
+ return e || (e = new CSSStyleSheet(), e.replaceSync(M)), e;
62
60
  }
63
- const So = () => ({ importCss: () => {
64
- const o = W(), i = Date.now() + V, m = () => {
61
+ const eo = () => ({ importCss: () => {
62
+ const o = V(), i = Date.now() + O, m = () => {
65
63
  var n;
66
64
  const t = (n = document.querySelector("ui-editor")) == null ? void 0 : n.shadowRoot;
67
65
  if (t) {
@@ -73,5 +71,5 @@ const So = () => ({ importCss: () => {
73
71
  m();
74
72
  } });
75
73
  export {
76
- So as useCustomInterfaceAppearance
74
+ eo as useCustomInterfaceAppearance
77
75
  };
@@ -1,23 +1,23 @@
1
1
  import { getRecommendationFeedSourceMaps as y, URLS as I } from "../enums/extensions/recommendationBlock.js";
2
2
  import { MinDeviceViewport as C, DefaultPadding as R } from "../enums/recommendation.js";
3
- import { useRecommendationExtensionStore as g } from "../extensions/Blocks/Recommendation/store/recommendation.js";
3
+ import { useRecommendationExtensionStore as f } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
4
  import { generateCompleteFilterQuery as b } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
5
  import { getPartnerRecommendationParams as h } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
6
6
  import { sanitizeProductIds as x } from "../extensions/Blocks/Recommendation/utils/productIds.js";
7
7
  import { useConfigStore as P } from "../stores/config.js";
8
8
  const B = () => ({
9
9
  calculateCardWidth: ({
10
- mobileLeftPadding: s,
10
+ mobileLeftPadding: a,
11
11
  mobileRightPadding: c,
12
- cardsInRow: o,
13
- unresponsive: a
12
+ cardsInRow: i,
13
+ unresponsive: n
14
14
  }) => {
15
- const i = a ? o : 1, e = s + c + (i - 1) * R;
16
- return (C - e) / i;
15
+ const o = n ? i : 1, e = a + c + (o - 1) * R;
16
+ return (C - e) / o;
17
17
  },
18
- getRecommendationCampaignData: (s) => {
19
- const c = g(), o = Number(s), a = c.blockStates[o];
20
- if (!a)
18
+ getRecommendationCampaignData: (a) => {
19
+ const c = f(), i = Number(a), n = c.blockStates[i];
20
+ if (!n)
21
21
  return {
22
22
  textTrimming: !1,
23
23
  orientation: "vertical",
@@ -30,59 +30,57 @@ const B = () => ({
30
30
  discountBeforeTextValue: "",
31
31
  discountAfterTextValue: ""
32
32
  };
33
- const { recommendationConfigs: i } = a, e = i.orientation === "grid" ? "vertical" : "horizontal";
33
+ const { recommendationConfigs: o } = n, e = o.orientation === "grid" ? "vertical" : "horizontal";
34
34
  return {
35
- textTrimming: i.textTrimming,
35
+ textTrimming: o.textTrimming,
36
36
  orientation: e,
37
37
  mobileLeftPadding: 0,
38
38
  mobileRightPadding: 0,
39
- cardsInRow: i.cardsInRow,
40
- unresponsive: i.unresponsive,
39
+ cardsInRow: o.cardsInRow,
40
+ unresponsive: o.unresponsive,
41
41
  priceBeforeTextValue: "",
42
42
  priceAfterTextValue: "",
43
43
  discountBeforeTextValue: "",
44
44
  discountAfterTextValue: ""
45
45
  };
46
46
  },
47
- buildCampaignUrl: (s, c) => {
47
+ buildCampaignUrl: (a, c) => {
48
48
  var l;
49
- const o = g(), a = P(), i = Number(s);
49
+ const i = f(), n = P(), o = Number(a);
50
50
  let e;
51
51
  if (c)
52
52
  e = c;
53
53
  else {
54
- const r = o.blockStates[i];
55
- if (!r)
54
+ const s = i.blockStates[o];
55
+ if (!s)
56
56
  return "";
57
- const { recommendationConfigs: n } = r;
57
+ const { recommendationConfigs: r } = s;
58
58
  e = {
59
- strategy: n.strategy,
60
- strategyId: n.strategyId,
61
- language: n.language,
62
- currencyCode: n.currencySettings.value,
63
- size: n.size,
64
- productIds: n.productIds,
65
- filters: n.filters,
66
- shuffleProducts: n.shuffleProducts
59
+ strategy: r.strategy,
60
+ strategyId: r.strategyId,
61
+ language: r.language,
62
+ currencyCode: r.currencySettings.value,
63
+ size: r.size,
64
+ productIds: r.productIds,
65
+ filters: r.filters,
66
+ shuffleProducts: r.shuffleProducts
67
67
  };
68
68
  }
69
- if (e.strategyId && a.isFeatureEnabled("reusableRecommendationStrategy"))
70
- return o.recommendationCampaignUrls[s] = {
69
+ if (e.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy"))
70
+ return i.recommendationCampaignUrls[a] = {
71
71
  strategyId: e.strategyId,
72
72
  locale: e.language,
73
73
  currency: e.currencyCode
74
74
  }, "";
75
- const d = ((l = y().find((r) => r.key === e.strategy)) == null ? void 0 : l.path) || "";
76
- if (!d) {
77
- const r = { ...o.recommendationCampaignUrls };
78
- return delete r[s], o.recommendationCampaignUrls = r, "";
79
- }
75
+ const d = ((l = y().find((s) => s.key === e.strategy)) == null ? void 0 : l.path) || "";
76
+ if (!d)
77
+ return delete i.recommendationCampaignUrls[a], "";
80
78
  const t = new URLSearchParams();
81
- t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", a.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", a.variationId), e.strategy === "manualMerchandising" ? t.set("productId", x(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
82
- const f = e.filters.filter((r) => r.isValid), m = b(f);
83
- m && t.set("filter", m), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(h(a.partnerName, e.strategy)).forEach(([r, n]) => t.set(r, n));
84
- const p = decodeURIComponent(t.toString()), u = `${I.RECOMMENDATION_API_URL}/v2/${d}?${p}`;
85
- return o.recommendationCampaignUrls[s] = u, u;
79
+ t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", n.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", n.variationId), e.strategy === "manualMerchandising" ? t.set("productId", x(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
80
+ const g = e.filters.filter((s) => s.isValid), u = b(g);
81
+ u && t.set("filter", u), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(h(n.partnerName, e.strategy)).forEach(([s, r]) => t.set(s, r));
82
+ const p = decodeURIComponent(t.toString()), m = `${I.RECOMMENDATION_API_URL}/v2/${d}?${p}`;
83
+ return i.recommendationCampaignUrls[a] = m, m;
86
84
  }
87
85
  });
88
86
  export {
@@ -10,7 +10,7 @@ const o = {
10
10
  RECOMMENDATION_STRATEGY_CREATE_PATH: "/discovery/recommendation-strategies/create?isEmail=true"
11
11
  }, d = (e) => {
12
12
  const { RECOMMENDATION_STRATEGIES_PANEL_PATH: r } = o;
13
- return `${r}/${e}/edit?isEmail=true`;
13
+ return `${r}/${e}/edit`;
14
14
  }, m = {
15
15
  CLIENT_ID: "clientId"
16
16
  }, p = () => {
@@ -84,7 +84,7 @@ const o = {
84
84
  { text: "dot(.)", value: "." },
85
85
  { text: "comma(,)", value: "," },
86
86
  { text: "space( )", value: " " }
87
- ], E = [
87
+ ], b = [
88
88
  { text: "0", value: "0" },
89
89
  { text: "1", value: "1" },
90
90
  { text: "2", value: "2" },
@@ -113,7 +113,7 @@ const o = {
113
113
  ], c = [
114
114
  { text: "true", value: "==" },
115
115
  { text: "false", value: "!=" }
116
- ], b = (e) => {
116
+ ], g = (e) => {
117
117
  if (!e)
118
118
  return t;
119
119
  switch (e) {
@@ -136,10 +136,10 @@ export {
136
136
  v as PriceAttributes,
137
137
  m as QUERY_PARAMS,
138
138
  o as URLS,
139
- E as currencyDecimalCounts,
139
+ b as currencyDecimalCounts,
140
140
  h as currencyLocationMaps,
141
141
  x as currencyOperators,
142
- b as getOperatorOptions,
142
+ g as getOperatorOptions,
143
143
  p as getRecommendationFeedSourceMaps,
144
144
  s as operatorOptionsForArrayOfStrings,
145
145
  c as operatorOptionsForBooleans,
@@ -1,13 +1,13 @@
1
- import { DEFAULT_COLUMN_SPACING as i, DEFAULT_ROW_SPACING as s, DEFAULT_MOBILE_ROW_SPACING as n, DEFAULT_MOBILE_COLUMN_SPACING as O, DEFAULT_MOBILE_CARDS_IN_ROW as e, DEFAULT_CARDS_IN_ROW as C } from "./layout.js";
2
- import { ATTR_PRODUCT_IMAGE as o, ATTR_PRODUCT_NAME as t, ATTR_PRODUCT_OLD_PRICE as _, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as I, ATTR_PRODUCT_OMNIBUS_DISCOUNT as R, ATTR_PRODUCT_BUTTON as r, ATTR_RECOMMENDATION_TITLE as E } from "./selectors.js";
3
- const U = 1, u = 2, m = 2, A = {
1
+ import { DEFAULT_COLUMN_SPACING as R, DEFAULT_ROW_SPACING as s, DEFAULT_MOBILE_ROW_SPACING as n, DEFAULT_MOBILE_COLUMN_SPACING as O, DEFAULT_MOBILE_CARDS_IN_ROW as e, DEFAULT_CARDS_IN_ROW as C } from "./layout.js";
2
+ import { ATTR_PRODUCT_IMAGE as o, ATTR_PRODUCT_NAME as t, ATTR_PRODUCT_OLD_PRICE as _, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as r, ATTR_PRODUCT_OMNIBUS_DISCOUNT as I, ATTR_PRODUCT_BUTTON as i, ATTR_RECOMMENDATION_TITLE as U } from "./selectors.js";
3
+ const A = 1, u = 2, D = {
4
4
  code: "USD",
5
5
  symbol: "USD",
6
6
  alignment: "after",
7
7
  decimalCount: 2,
8
8
  decimalSeparator: ".",
9
9
  thousandSeparator: ","
10
- }, D = {
10
+ }, E = {
11
11
  textBefore: "",
12
12
  textAfter: ""
13
13
  }, a = {
@@ -18,26 +18,26 @@ const U = 1, u = 2, m = 2, A = {
18
18
  t,
19
19
  _,
20
20
  T,
21
+ r,
21
22
  I,
22
- R,
23
- r
23
+ i
24
24
  ], N = {
25
- [E]: !0,
25
+ [U]: !0,
26
26
  [o]: !0,
27
27
  [t]: !0,
28
28
  [T]: !0,
29
29
  [_]: !0,
30
+ [r]: !1,
30
31
  [I]: !1,
31
- [R]: !1,
32
- [r]: !0
33
- }, L = {
32
+ [i]: !0
33
+ }, m = {
34
34
  // Settings
35
35
  strategy: "mostPopular",
36
36
  productIds: [],
37
37
  size: "6",
38
38
  shuffleProducts: !1,
39
39
  language: "en_US",
40
- currency: A,
40
+ currency: D,
41
41
  filters: [],
42
42
  strategyId: "",
43
43
  // Layout
@@ -46,7 +46,7 @@ const U = 1, u = 2, m = 2, A = {
46
46
  mobileCardsInRow: e,
47
47
  mobileLayoutEnabled: !1,
48
48
  previousMobileCardsInRow: e,
49
- columnSpacing: i,
49
+ columnSpacing: R,
50
50
  rowSpacing: s,
51
51
  mobileColumnSpacing: O,
52
52
  mobileRowSpacing: n,
@@ -55,7 +55,7 @@ const U = 1, u = 2, m = 2, A = {
55
55
  visibility: N,
56
56
  previousTitleHtml: "",
57
57
  // Element settings
58
- omnibusPrice: D,
58
+ omnibusPrice: E,
59
59
  omnibusDiscount: a,
60
60
  textTrimming: !1,
61
61
  // Price placement (block-level, affects all cards)
@@ -66,18 +66,17 @@ const U = 1, u = 2, m = 2, A = {
66
66
  // of "false" (the actual hiding happens server-side at send).
67
67
  priceHideIfSameAsDiscounted: !1,
68
68
  // Meta
69
- configVersion: U,
69
+ configVersion: A,
70
70
  recommendationId: 0
71
- }, P = [11, 12];
71
+ }, L = [11, 12];
72
72
  export {
73
73
  u as CURRENT_CONFIG_VERSION,
74
74
  c as DEFAULT_COMPOSITION,
75
- A as DEFAULT_CURRENCY,
76
- L as DEFAULT_NODE_CONFIG,
75
+ D as DEFAULT_CURRENCY,
76
+ m as DEFAULT_NODE_CONFIG,
77
77
  a as DEFAULT_OMNIBUS_DISCOUNT,
78
- D as DEFAULT_OMNIBUS_PRICE,
78
+ E as DEFAULT_OMNIBUS_PRICE,
79
79
  N as DEFAULT_VISIBILITY,
80
- P as EXCLUDED_ALGORITHM_IDS,
81
- U as PRE_RRS_CONFIG_VERSION,
82
- m as RRS_CONFIG_VERSION
80
+ L as EXCLUDED_ALGORITHM_IDS,
81
+ A as PRE_RRS_CONFIG_VERSION
83
82
  };
@@ -4,7 +4,7 @@ var r = (g, c, t) => C(g, typeof c != "symbol" ? c + "" : c, t);
4
4
  import { useConfig as p } from "../../../../../composables/useConfig.js";
5
5
  import { ModificationDescription as y } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
6
6
  import { CommonControl as N } from "../../../common-control.js";
7
- import { RRS_CONFIG_VERSION as _, DEFAULT_NODE_CONFIG as a } from "../../constants/defaultConfig.js";
7
+ import { CURRENT_CONFIG_VERSION as _, DEFAULT_NODE_CONFIG as a } from "../../constants/defaultConfig.js";
8
8
  import { RECOMMENDATION_ID_ATTR as I } from "../../constants/selectors.js";
9
9
  import { RecommendationConfigService as l } from "../../services/configService.js";
10
10
  import { useRecommendationExtensionStore as R } from "../../store/recommendation.js";
@@ -4,7 +4,7 @@ var r = (o, n, t) => S(o, typeof n != "symbol" ? n + "" : n, t);
4
4
  import { ACADEMY_LINKS as _ } from "../../../../../enums/academy.js";
5
5
  import { useOnboardingStore as f } from "../../../../../stores/onboarding.js";
6
6
  import { CommonControl as v } from "../../../common-control.js";
7
- import { RRS_CONFIG_VERSION as b } from "../../constants/defaultConfig.js";
7
+ import { CURRENT_CONFIG_VERSION as b } from "../../constants/defaultConfig.js";
8
8
  import { RecommendationConfigService as h } from "../../services/configService.js";
9
9
  import { useRecommendationExtensionStore as C } from "../../store/recommendation.js";
10
10
  const k = "recommendation-strategy-control";