@useinsider/guido 3.9.0-beta.69ecfd1 → 3.9.0-beta.7168aa8

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.
@@ -1,181 +1,189 @@
1
- import { useConfig as _ } from "../../../composables/useConfig.js";
2
- import { useRecommendation as g } from "../../../composables/useRecommendation.js";
3
- import { CSS_CLASS_RECO_BUTTON as q } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
4
- import { useRecommendationExtensionStore as C } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import { isIgnoredRecommendationBlock as w } from "./recommendationIgnoreUtils.js";
6
- function b(e, n, t, o, c = "") {
7
- const i = `{{${c}${e}_${n}_${t}}}`, r = `{{${c}${e}_${n}_currency}}`;
8
- return o === "before" ? `${r} ${i}` : `${i} ${r}`;
1
+ import { useConfig as q } from "../../../composables/useConfig.js";
2
+ import { useRecommendation as C } from "../../../composables/useRecommendation.js";
3
+ import { CSS_CLASS_RECO_BUTTON as E } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
4
+ import { useRecommendationExtensionStore as w } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ import { isIgnoredRecommendationBlock as P } from "./recommendationIgnoreUtils.js";
6
+ function f(t, o, e, n, s = "") {
7
+ const i = `{{${s}${t}_${o}_${e}}}`, r = `{{${s}${t}_${o}_currency}}`;
8
+ return n === "before" ? `${r} ${i}` : `${i} ${r}`;
9
9
  }
10
- function m(e) {
11
- let n = e;
12
- for (; n.children.length === 1; )
13
- [n] = n.children;
14
- return n;
10
+ function m(t) {
11
+ let o = t;
12
+ for (; o.children.length === 1; )
13
+ [o] = o.children;
14
+ return o;
15
15
  }
16
- function h(e, n, t, o, c, i) {
17
- switch (n) {
16
+ function h(t, o, e, n, s, i) {
17
+ switch (o) {
18
18
  case "productImage": {
19
- const r = e.querySelector("img");
20
- r && (r.setAttribute("src", `{{${i}${t}_${o}_image_url}}`), r.setAttribute("alt", `{{${i}${t}_${o}_name}}`));
21
- const s = e.querySelector("a");
22
- s && (s.setAttribute("href", `{{${i}${t}_${o}_url}}`), s.classList.add(q));
19
+ const r = t.querySelector("img");
20
+ r && (r.setAttribute("src", `{{${i}${e}_${n}_image_url}}`), r.setAttribute("alt", `{{${i}${e}_${n}_name}}`));
21
+ const c = t.querySelector("a");
22
+ c && (c.setAttribute("href", `{{${i}${e}_${n}_url}}`), c.classList.add(E));
23
23
  break;
24
24
  }
25
25
  case "productName": {
26
- const r = e.querySelector("p");
27
- r && (m(r).textContent = `{{${i}${t}_${o}_name}}`);
26
+ const r = t.querySelector("p");
27
+ r && (m(r).textContent = `{{${i}${e}_${n}_name}}`);
28
28
  break;
29
29
  }
30
30
  case "productPrice": {
31
- const r = e.querySelector(".product-price p") ?? e.querySelector("p");
32
- r && (m(r).textContent = b(
33
- t,
34
- o,
31
+ const r = t.querySelector(".product-price p") ?? t.querySelector("p");
32
+ r && (m(r).textContent = f(
33
+ e,
34
+ n,
35
35
  "price",
36
- c,
36
+ s,
37
37
  i
38
38
  ));
39
- const s = e.querySelector(".product-old-price p");
40
- s && (m(s).textContent = b(
41
- t,
42
- o,
39
+ const c = t.querySelector(".product-old-price p");
40
+ c && (m(c).textContent = f(
41
+ e,
42
+ n,
43
43
  "original_price",
44
- c,
44
+ s,
45
45
  i
46
46
  ));
47
47
  break;
48
48
  }
49
49
  case "productOldPrice": {
50
- const r = e.querySelector("p");
51
- r && (m(r).textContent = b(
52
- t,
53
- o,
50
+ const r = t.querySelector("p");
51
+ r && (m(r).textContent = f(
52
+ e,
53
+ n,
54
54
  "original_price",
55
- c,
55
+ s,
56
56
  i
57
57
  ));
58
58
  break;
59
59
  }
60
60
  case "productButton": {
61
- const r = e.querySelector("a");
62
- r && r.setAttribute("href", `{{${i}${t}_${o}_url}}`);
61
+ const r = t.querySelector("a");
62
+ r && r.setAttribute("href", `{{${i}${e}_${n}_url}}`);
63
63
  break;
64
64
  }
65
65
  case "productOmnibusPrice": {
66
- const r = e.querySelector(".omnibus-price-value");
66
+ const r = t.querySelector(".omnibus-price-value");
67
67
  if (r) {
68
- r.textContent = `{{${i}${t}_${o}_omnibus_price}}`;
69
- const s = r.closest("p");
70
- s && (s.setAttribute("product-attr", "omnibus_price"), s.setAttribute("composition", "true"));
68
+ r.textContent = `{{${i}${e}_${n}_omnibus_price}}`;
69
+ const c = r.closest("p");
70
+ c && (c.setAttribute("product-attr", "omnibus_price"), c.setAttribute("composition", "true"));
71
71
  }
72
72
  break;
73
73
  }
74
74
  case "productOmnibusDiscount": {
75
- const r = e.querySelector(".omnibus-discount-value");
75
+ const r = t.querySelector(".omnibus-discount-value");
76
76
  if (r) {
77
- r.textContent = `{{${i}${t}_${o}_omnibus_discount}}`;
78
- const s = r.closest("p");
79
- s && (s.setAttribute("product-attr", "omnibus_discount"), s.setAttribute("composition", "true"));
77
+ r.textContent = `{{${i}${e}_${n}_omnibus_discount}}`;
78
+ const c = r.closest("p");
79
+ c && (c.setAttribute("product-attr", "omnibus_discount"), c.setAttribute("composition", "true"));
80
80
  }
81
81
  break;
82
82
  }
83
83
  default: {
84
- const r = e.getAttribute("product-attr") ? e : e.querySelector("[product-attr]");
84
+ const r = t.getAttribute("product-attr") ? t : t.querySelector("[product-attr]");
85
85
  if (r) {
86
- const s = r.getAttribute("product-attr"), a = r.querySelector("p");
87
- a && (m(a).textContent = `{{${i}${t}_${o}_${s}}}`);
86
+ const c = r.getAttribute("product-attr"), l = r.querySelector("p");
87
+ l && (m(l).textContent = `{{${i}${e}_${n}_${c}}}`);
88
88
  }
89
89
  break;
90
90
  }
91
91
  }
92
92
  }
93
- function E(e, n, t, o) {
94
- e.querySelectorAll(".recommendation-product-row").forEach((i, r) => {
95
- i.querySelectorAll("[data-attribute-type]").forEach((a) => {
96
- const u = a.getAttribute("data-attribute-type") || "", p = a.querySelectorAll(".attribute-cell");
97
- p.length > 0 ? p.forEach((l) => {
98
- h(l, u, n, r, t, o);
99
- }) : h(a, u, n, r, t, o);
93
+ function R(t, o, e, n) {
94
+ t.querySelectorAll(".recommendation-product-row").forEach((i, r) => {
95
+ i.querySelectorAll("[data-attribute-type]").forEach((l) => {
96
+ const u = l.getAttribute("data-attribute-type") || "", p = l.querySelectorAll(".attribute-cell");
97
+ p.length > 0 ? p.forEach((a) => {
98
+ h(a, u, o, r, e, n);
99
+ }) : h(l, u, o, r, e, n);
100
100
  });
101
101
  });
102
102
  }
103
- function P(e, n, t, o) {
104
- const c = e.querySelectorAll(".recommendation-product-row");
105
- if (!c.length)
103
+ function W(t, o, e, n) {
104
+ const s = t.querySelectorAll(".recommendation-product-row");
105
+ if (!s.length)
106
106
  return;
107
- const [i] = c, r = i.querySelector("[data-attribute-type]"), s = r ? r.querySelectorAll(".attribute-cell").length : 1;
108
- c.forEach((a, u) => {
109
- a.querySelectorAll("[data-attribute-type]").forEach((l) => {
110
- const d = l.getAttribute("data-attribute-type") || "";
111
- l.querySelectorAll(".attribute-cell").forEach((A, $) => {
112
- const S = u * s + $;
113
- h(A, d, n, S, t, o);
107
+ const [i] = s, r = i.querySelector("[data-attribute-type]"), c = r ? r.querySelectorAll(".attribute-cell").length : 1;
108
+ s.forEach((l, u) => {
109
+ l.querySelectorAll("[data-attribute-type]").forEach((a) => {
110
+ const d = a.getAttribute("data-attribute-type") || "";
111
+ a.querySelectorAll(".attribute-cell").forEach((S, _) => {
112
+ const g = u * c + _;
113
+ h(S, d, o, g, e, n);
114
114
  });
115
115
  });
116
116
  });
117
117
  }
118
- function R(e, n, t, o) {
119
- e.querySelectorAll(".ins-recommendation-product-container").forEach((i) => {
120
- P(i, n, t, o);
118
+ function v(t, o, e, n) {
119
+ t.querySelectorAll(".ins-recommendation-product-container").forEach((i) => {
120
+ W(i, o, e, n);
121
121
  });
122
122
  }
123
- function O(e, n, t) {
124
- const o = e.getAttribute("data-layout") || "grid", c = e.getAttribute("currency-alignment") || "after";
125
- o === "list" ? E(e, n, c, t) : R(e, n, c, t);
123
+ function O(t, o, e) {
124
+ const n = t.getAttribute("data-layout") || "grid", s = t.getAttribute("currency-alignment") || "after";
125
+ n === "list" ? R(t, o, s, e) : v(t, o, s, e);
126
126
  }
127
- function y(e, n, t) {
128
- const o = new RegExp(`${n}\\s*:\\s*(\\d+)\\s*px`, "i"), c = e.match(o);
129
- return c ? parseInt(c[1]) : t;
127
+ function b(t, o, e) {
128
+ const n = new RegExp(`${o}\\s*:\\s*(\\d+)\\s*px`, "i"), s = t.match(n);
129
+ return s ? parseInt(s[1]) : e;
130
130
  }
131
- function T(e, n) {
132
- let t = e.parentElement;
133
- for (; t && t !== n; ) {
134
- if (t.tagName === "TD") {
135
- const o = t.getAttribute("width");
136
- if (o && o.endsWith("%") && parseFloat(o) < 100)
137
- return t;
138
- }
139
- t = t.parentElement;
131
+ function A(t) {
132
+ const o = t.trim();
133
+ return o.endsWith("%") ? parseFloat(o) < 100 : /^\d+(?:\.\d+)?(?:px)?$/.test(o) && parseInt(o) > 0;
134
+ }
135
+ function $(t) {
136
+ const o = t.getAttribute("width");
137
+ if (o && A(o))
138
+ return o.trim();
139
+ const e = (t.getAttribute("style") || "").match(/(?:^|[;\s])width\s*:\s*(\d+(?:\.\d+)?(?:px|%))/i);
140
+ return e && A(e[1]) ? e[1] : null;
141
+ }
142
+ function T(t, o) {
143
+ let e = t.parentElement;
144
+ for (; e && e !== o; ) {
145
+ if (e.tagName === "TD" && $(e))
146
+ return e;
147
+ e = e.parentElement;
140
148
  }
141
149
  return null;
142
150
  }
143
- function v(e) {
144
- const n = e.getAttribute("style") || "", t = y(n, "width", 600), o = y(n, "padding", 0) * 2, c = Math.max(0, t - o);
145
- c !== 0 && e.querySelectorAll("img.adapt-img").forEach((i) => {
151
+ function M(t) {
152
+ const o = t.getAttribute("style") || "", e = b(o, "width", 600), n = b(o, "padding", 0) * 2, s = Math.max(0, e - n);
153
+ s !== 0 && t.querySelectorAll("img.adapt-img").forEach((i) => {
146
154
  if (i.hasAttribute("width"))
147
155
  return;
148
- const r = T(i, e);
156
+ const r = T(i, t);
149
157
  if (!r)
150
158
  return;
151
- const s = r.getAttribute("width"), a = parseFloat(s), u = y(r.getAttribute("style") || "", "padding", 0) * 2, p = Math.floor(c * a / 100), l = Math.max(1, p - u);
152
- i.setAttribute("width", String(l));
153
- const d = i.getAttribute("style") || "";
154
- if (!/\bwidth\s*:\s*\d/i.test(d)) {
155
- const f = d && !d.trim().endsWith(";") ? "; " : "";
156
- i.setAttribute("style", `${d}${f}width: ${l}px`);
159
+ const c = $(r), l = b(r.getAttribute("style") || "", "padding", 0) * 2, u = c.endsWith("%") ? Math.floor(s * parseFloat(c) / 100) : parseInt(c), p = Math.max(1, u - l);
160
+ i.setAttribute("width", String(p));
161
+ const a = i.getAttribute("style") || "";
162
+ if (!/\bwidth\s*:\s*\d/i.test(a)) {
163
+ const d = a && !a.trim().endsWith(";") ? "; " : "";
164
+ i.setAttribute("style", `${a}${d}width: ${p}px`);
157
165
  }
158
166
  });
159
167
  }
160
- function W(e, n) {
161
- const t = e.match(/<!DOCTYPE[^>]*>/i);
162
- return (t ? `${t[0]}
163
- ` : "") + n.documentElement.outerHTML;
168
+ function B(t, o) {
169
+ const e = t.match(/<!DOCTYPE[^>]*>/i);
170
+ return (e ? `${e[0]}
171
+ ` : "") + o.documentElement.outerHTML;
164
172
  }
165
- function F(e) {
166
- const n = e.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), t = new DOMParser().parseFromString(n, "text/html"), o = t.querySelectorAll(".recommendation-block-v2");
167
- if (!o.length)
168
- return e;
169
- const { buildCampaignUrl: c } = g(), i = C();
173
+ function G(t) {
174
+ const o = t.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), e = new DOMParser().parseFromString(o, "text/html"), n = e.querySelectorAll(".recommendation-block-v2");
175
+ if (!n.length)
176
+ return t;
177
+ const { buildCampaignUrl: s } = C(), i = w();
170
178
  i.recommendationCampaignUrls = {};
171
- const { isFeatureEnabled: r } = _(), s = r("liquidSyntax") ? "reco_" : "";
172
- return o.forEach((u) => {
173
- var l, d;
179
+ const { isFeatureEnabled: r } = q(), c = r("liquidSyntax") ? "reco_" : "";
180
+ return n.forEach((u) => {
181
+ var a, d;
174
182
  const p = u.getAttribute("recommendation-id");
175
- p && ((l = u.parentNode) == null || l.insertBefore(t.createComment("REC_START"), u), (d = u.parentNode) == null || d.insertBefore(t.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((f) => f.remove()), c(p), w(u) || O(u, p, s), v(u));
176
- }), W(n, t).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
183
+ p && ((a = u.parentNode) == null || a.insertBefore(e.createComment("REC_START"), u), (d = u.parentNode) == null || d.insertBefore(e.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((y) => y.remove()), s(p), P(u) || O(u, p, c), M(u));
184
+ }), B(o, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
177
185
  }
178
186
  export {
179
- b as formatPriceVariable,
180
- F as prepareRecommendationBlocks
187
+ f as formatPriceVariable,
188
+ G as prepareRecommendationBlocks
181
189
  };
@@ -1,12 +1,15 @@
1
1
  const e = {
2
2
  transactional: 2
3
- }, o = 2, t = 13, s = {
3
+ }, s = 2, a = 13, t = "https://email-static.useinsider.com", o = `${t}/templates/campaign/default.html`, l = `${t}/templates/campaign/default.css`, E = {
4
4
  SAVED_MODULES: "savedModules",
5
5
  DEFAULT_MODULES: "defaultModules"
6
6
  };
7
7
  export {
8
- o as EditorType,
9
- t as MAX_DEFAULT_TEMPLATE_ID,
10
- s as ModuleFolderDefaults,
8
+ l as BLANK_TEMPLATE_CSS_URL,
9
+ o as BLANK_TEMPLATE_HTML_URL,
10
+ t as EMAIL_STATIC_BASE_URL,
11
+ s as EditorType,
12
+ a as MAX_DEFAULT_TEMPLATE_ID,
13
+ E as ModuleFolderDefaults,
11
14
  e as TemplateTypes
12
15
  };
@@ -1,23 +1,23 @@
1
- var d = Object.defineProperty;
2
- var h = (o, r, t) => r in o ? d(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t;
3
- var c = (o, r, t) => h(o, typeof r != "symbol" ? r + "" : r, t);
4
- import { UEAttr as u } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- import { CommonControl as m } from "../../../common-control.js";
1
+ var c = Object.defineProperty;
2
+ var l = (s, o, t) => o in s ? c(s, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[o] = t;
3
+ var a = (s, o, t) => l(s, typeof o != "symbol" ? o + "" : o, t);
4
+ import { UEAttr as h } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { CommonControl as d } from "../../../common-control.js";
6
6
  import { RecommendationConfigService as n } from "../../services/configService.js";
7
- import { useRecommendationExtensionStore as g } from "../../store/recommendation.js";
8
- import { mapLegacyStrategy as p } from "../../utils/legacyStrategyMap.js";
9
- const C = "recommendation-algorithm-control", i = {
7
+ import { useRecommendationExtensionStore as m } from "../../store/recommendation.js";
8
+ import { mapLegacyStrategy as g } from "../../utils/legacyStrategyMap.js";
9
+ const u = "recommendation-algorithm-control", i = {
10
10
  ALGORITHM: "strategy",
11
11
  PRODUCT_IDS: "productIds"
12
12
  };
13
- class R extends m {
13
+ class R extends d {
14
14
  constructor() {
15
15
  super(...arguments);
16
16
  // Store is used ONLY for API-fetched data (algorithms list), not for config
17
- c(this, "store", g());
17
+ a(this, "store", m());
18
18
  }
19
19
  getId() {
20
- return C;
20
+ return u;
21
21
  }
22
22
  getTemplate() {
23
23
  return `
@@ -30,10 +30,10 @@ class R extends m {
30
30
  options: this.store.getActivePredictiveAlgorithms
31
31
  }),
32
32
  this._GuLabel({ text: this.api.translate("Product Ids"), name: `${i.PRODUCT_IDS}_label` }),
33
- this._GuMultiSelect({
33
+ this._GuTextInput({
34
34
  name: i.PRODUCT_IDS,
35
35
  placeholder: this.api.translate("Enter Product Ids"),
36
- className: "product-ids-multiselect"
36
+ className: "es-180w"
37
37
  })
38
38
  ])}
39
39
  </div>
@@ -46,19 +46,11 @@ class R extends m {
46
46
  super.onTemplateNodeUpdated(t), this._initializeSelectItems(), this._setFormValues();
47
47
  }
48
48
  _setFormValues() {
49
- const t = n.getConfig(this.currentNode), e = p(t.strategy) ?? t.strategy;
49
+ const t = n.getConfig(this.currentNode), e = g(t.strategy) ?? t.strategy;
50
50
  this._setProductIdsVisibility(e), this.api.updateValues({
51
51
  [i.ALGORITHM]: e,
52
- // MULTIPLE_SELECT consumes a string[] directly (was a comma-joined string).
53
- [i.PRODUCT_IDS]: t.productIds
54
- }), this._clearProductIdsDraft();
55
- }
56
- // Stripo reuses one control instance across blocks and updateValues only
57
- // rebinds the committed chips — clear any un-committed draft text on switch,
58
- // but not while focused (the user is mid-typing in the current block).
59
- _clearProductIdsDraft() {
60
- const t = this.getContainer(), e = t == null ? void 0 : t.querySelector(".product-ids-multiselect .multiple-input");
61
- e && e.value !== "" && (t == null ? void 0 : t.activeElement) !== e && (e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })));
52
+ [i.PRODUCT_IDS]: t.productIds.join(",")
53
+ });
62
54
  }
63
55
  _initializeSelectItems() {
64
56
  var e;
@@ -67,16 +59,16 @@ class R extends m {
67
59
  try {
68
60
  this.api.setUIEAttribute(
69
61
  i.ALGORITHM,
70
- u.SELECTPICKER.items,
62
+ h.SELECTPICKER.items,
71
63
  t
72
64
  );
73
- } catch (s) {
74
- console.warn("[AlgorithmControl] Failed to set algorithm options:", s);
65
+ } catch (r) {
66
+ console.warn("[AlgorithmControl] Failed to set algorithm options:", r);
75
67
  }
76
68
  }
77
69
  _setProductIdsVisibility(t) {
78
- const s = (t ?? n.getConfig(this.currentNode).strategy) === "manualMerchandising";
79
- this.api.setVisibility(i.PRODUCT_IDS, s), this.api.setVisibility(`${i.PRODUCT_IDS}_label`, s);
70
+ const r = (t ?? n.getConfig(this.currentNode).strategy) === "manualMerchandising";
71
+ this.api.setVisibility(i.PRODUCT_IDS, r), this.api.setVisibility(`${i.PRODUCT_IDS}_label`, r);
80
72
  }
81
73
  _onAlgorithmChange(t) {
82
74
  !this.currentNode || n.getConfig(this.currentNode).strategy === t || (n.updateConfig(
@@ -89,13 +81,13 @@ class R extends m {
89
81
  _onProductIdsChange(t) {
90
82
  if (!this.currentNode)
91
83
  return;
92
- const e = [...new Set((t ?? []).map((a) => String(a).trim()).filter(Boolean))], s = n.getConfig(this.currentNode).productIds;
93
- s.length === e.length && s.every((a, l) => a === e[l]) || (n.updateConfig(
84
+ const e = t.split(",").map((r) => r.trim()).filter(Boolean);
85
+ n.updateConfig(
94
86
  this.api,
95
87
  this.currentNode,
96
88
  { productIds: e },
97
89
  "Updated product IDs"
98
- ), this.store.patchCurrentBlockConfig({ productIds: e }));
90
+ ), this.store.patchCurrentBlockConfig({ productIds: e });
99
91
  }
100
92
  _listenToFormUpdates() {
101
93
  this.api.onValueChanged(i.ALGORITHM, (t) => {
@@ -106,6 +98,6 @@ class R extends m {
106
98
  }
107
99
  }
108
100
  export {
109
- C as ALGORITHM_CONTROL_ID,
101
+ u as ALGORITHM_CONTROL_ID,
110
102
  R as AlgorithmControl
111
103
  };
@@ -1,18 +1,16 @@
1
1
  const n = `/* Utils */
2
- .es-180w {
3
- width: 180px;
4
- }
2
+ .es-180w { width: 180px; }
5
3
 
6
4
  /* Recommendation Controls - Main settings panel separators */
7
- .recommendation-controls-container>div {
5
+ .recommendation-controls-container > div {
8
6
  border-bottom: 1px solid #eee;
9
7
  }
10
8
 
11
- .recommendation-controls-container>div:first-child {
9
+ .recommendation-controls-container > div:first-child {
12
10
  padding-top: 0;
13
11
  }
14
12
 
15
- .recommendation-controls-container>div:last-child {
13
+ .recommendation-controls-container > div:last-child {
16
14
  border-bottom: none;
17
15
  }
18
16
 
@@ -291,62 +289,6 @@ ue-orderable.orderable-disabled .droppable-icon {
291
289
  font-weight: 400;
292
290
  line-height: 16px;
293
291
  }
294
-
295
- /* product ID multiselect — initial */
296
- .product-ids-multiselect {
297
- background-color: var(--guido-color-gray-0);
298
- border: 1px solid var(--guido-color-gray-300);
299
- width: 180px;
300
- }
301
-
302
- /* product ID multiselect — hover */
303
- .product-ids-multiselect:hover {
304
- border-color: var(--guido-color-primary-500);
305
- background-color: var(--guido-color-gray-0) !important;
306
- }
307
-
308
- /* product ID multiselect — selected (.on) */
309
- .product-ids-multiselect.on,
310
- .product-ids-multiselect.on:hover {
311
- border-color: var(--guido-color-primary-500);
312
- box-shadow: 0 0 0 3px var(--guido-color-primary-200) !important;
313
- background-color: var(--guido-color-gray-0) !important;
314
- }
315
-
316
- .product-ids-multiselect .multiple-wrapper .multiple-item {
317
- display: flex;
318
- align-items: center;
319
- border-radius: 4px;
320
- border: 1px solid var(--guido-color-primary-200);
321
- background-color: var(--guido-color-primary-0);
322
- font-size: 13px;
323
- color: var(--guido-color-primary-500);
324
- line-height: 16px;
325
- box-shadow: none;
326
- padding: 0 4px;
327
- }
328
-
329
- /* Close (×): always visible, moved to the right, split off by a left border (Figma).
330
- Label is a text node (can't be ordered) so the icon gets order:1 to sit after it;
331
- Stripo toggles visibility inline on hover, hence !important to keep it shown. */
332
- .product-ids-multiselect .multiple-wrapper .multiple-item .multiple-item-remove-icon {
333
- visibility: visible !important;
334
- opacity: 1;
335
- position: static !important;
336
- order: 1;
337
- margin-left: 4px;
338
- border-left: 1px solid var(--guido-color-primary-200);
339
- color: var(--guido-color-primary-500);
340
- cursor: pointer;
341
- width: 16px;
342
- height: 16px;
343
- padding: 4px 0 4px 3px;
344
- }
345
-
346
- .product-ids-multiselect .multiple-wrapper .multiple-item:hover {
347
- background-color: var(--guido-color-primary-0);
348
- padding: 0 4px;
349
- }
350
292
  `;
351
293
  export {
352
294
  n as default
@@ -1,5 +1,5 @@
1
- import { ATTR_PRODUCT_IMAGE as p, ATTR_PRODUCT_BUTTON as C, ATTR_PRODUCT_OLD_PRICE as f, ATTR_PRODUCT_PRICE as m } from "../../constants/selectors.js";
2
- import { buildSpacer as I, DEFAULT_CARD_COMPOSITION as g, buildElementRenderer as E, buildCellOptions as a, resolveInlinePriceOrder as w, DEFAULT_CARD_VISIBILITY as y } from "../utils.js";
1
+ import { ATTR_PRODUCT_IMAGE as p, ATTR_PRODUCT_BUTTON as C, ATTR_PRODUCT_OLD_PRICE as A, ATTR_PRODUCT_PRICE as m } from "../../constants/selectors.js";
2
+ import { buildSpacer as I, DEFAULT_CARD_COMPOSITION as g, buildElementRenderer as E, buildCellOptions as i, resolveInlinePriceOrder as w, DEFAULT_CARD_VISIBILITY as y } from "../utils.js";
3
3
  import { listElementRenderer as L, renderInlineListPriceRow as O } from "./elementRenderer.js";
4
4
  const S = "0 5px";
5
5
  function U(l, r, n) {
@@ -27,40 +27,40 @@ const N = `
27
27
  </td>
28
28
  </tr>
29
29
  `;
30
- function $(l, r = g, n = {}, e = {}) {
30
+ function x(l, r = g, n = {}, e = {}) {
31
31
  const {
32
32
  cellPadding: o = S,
33
33
  cardBackgroundColor: d,
34
34
  visibility: c,
35
- priceInline: i = !1
36
- } = e, u = d ? ` style="background-color: ${d};"` : "", s = E(L, r, n), P = s[p](l, a(p, e)), R = w(r), T = `
35
+ priceInline: a = !1
36
+ } = e, u = d ? ` style="table-layout: fixed; background-color: ${d};"` : ' style="table-layout: fixed;"', s = E(L, r, n), P = s[p](l, i(p, e)), R = w(r), T = `
37
37
  <td class="product-info-cell" valign="middle" style="padding: 15px;">
38
38
  <table cellpadding="0" cellspacing="0" role="presentation" width="100%" style="table-layout: fixed;">
39
39
  <tbody>
40
- ${r.filter((t) => t !== p && t !== C).filter((t) => !(i && t === R.skip)).filter((t) => s[t]).map((t) => {
41
- const b = (c == null ? void 0 : c[t]) ?? y[t] ?? !0, A = i && t === R.anchor ? O(
40
+ ${r.filter((t) => t !== p && t !== C).filter((t) => !(a && t === R.skip)).filter((t) => s[t]).map((t) => {
41
+ const b = (c == null ? void 0 : c[t]) ?? y[t] ?? !0, f = a && t === R.anchor ? O(
42
42
  l,
43
43
  R.originalFirst,
44
- a(m, e),
45
- a(f, e)
46
- ) : s[t](l, a(t, e));
47
- return U(A, t, b);
44
+ i(m, e),
45
+ i(A, e)
46
+ ) : s[t](l, i(t, e));
47
+ return U(f, t, b);
48
48
  }).join(`
49
49
  `)}
50
50
  </tbody>
51
51
  </table>
52
52
  </td>
53
- `, _ = s[C](l, a(C, e)), D = P + T + _;
53
+ `, _ = s[C](l, i(C, e)), D = P + T + _;
54
54
  return N.replace("{-{-CARD_PADDING-}-}", o).replace("{-{-WRAPPER_STYLE-}-}", u).replace("{-{-PRODUCT_CONTENT-}-}", D);
55
55
  }
56
56
  function W(l, r, n = {}, e = {}) {
57
57
  const o = I(e.rowSpacingPx);
58
58
  return l.map((d, c) => {
59
- const i = $(d, r, n, e);
60
- return c > 0 ? o + i : i;
59
+ const a = x(d, r, n, e);
60
+ return c > 0 ? o + a : a;
61
61
  }).join("");
62
62
  }
63
63
  export {
64
- $ as getListProductCard,
64
+ x as getListProductCard,
65
65
  W as prepareProductRows
66
66
  };