@useinsider/guido 3.4.0-beta.5d19726 → 3.4.1-beta.00eb92e

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 (28) hide show
  1. package/README.md +2 -0
  2. package/dist/composables/useActionsApi.js +9 -5
  3. package/dist/composables/useSave.js +13 -14
  4. package/dist/config/compiler/recommendationCompilerRules.js +31 -19
  5. package/dist/config/compiler/utils/recommendationCompilerUtils.js +17 -16
  6. package/dist/config/migrator/checkboxMigrator.js +20 -69
  7. package/dist/config/migrator/itemsBlockMigrator.js +28 -18
  8. package/dist/config/migrator/radioButtonMigrator.js +36 -91
  9. package/dist/config/migrator/recommendation/htmlBuilder.js +73 -73
  10. package/dist/config/migrator/textBlockMigration.js +65 -0
  11. package/dist/extensions/Blocks/Recommendation/block.js +9 -6
  12. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +12 -11
  13. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +23 -23
  14. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +22 -22
  15. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +3 -3
  16. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +9 -9
  17. package/dist/src/composables/useActionsApi.d.ts +1 -1
  18. package/dist/src/config/migrator/textBlockMigration.d.ts +24 -0
  19. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +1 -0
  20. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  21. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +6 -0
  22. package/dist/src/stores/config.test.d.ts +1 -0
  23. package/dist/src/vitest.setup.d.ts +0 -0
  24. package/dist/static/styles/components/wide-panel.css.js +5 -0
  25. package/dist/stores/config.js +24 -23
  26. package/dist/utils/templatePreparation.js +51 -43
  27. package/package.json +3 -2
  28. /package/dist/src/extensions/Blocks/Recommendation/{validation/requiredFields.test.d.ts → utils/filterUtil.test.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  var k = Object.defineProperty;
2
- var _ = (r, n, t) => n in r ? k(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
- var g = (r, n, t) => _(r, typeof n != "symbol" ? n + "" : n, t);
4
- import { BlockId as B } from "../../../enums/block.js";
2
+ var B = (r, n, t) => n in r ? k(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
+ var g = (r, n, t) => B(r, typeof n != "symbol" ? n + "" : n, t);
4
+ import { BlockId as _ } from "../../../enums/block.js";
5
5
  import { getMigrationBannerHtml as b } from "../../../utils/migrationBannerHtml.js";
6
6
  import { Block as R, BlockCompositionType as y, ModificationDescription as C } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
7
  import { regenerateMobileProductRows as A } from "./controls/main/utils.js";
@@ -9,9 +9,9 @@ import { ensureMobileCssRulesExist as d, setMobileLayoutOptOut as p, hasMobileLa
9
9
  import { RecommendationConfigService as s } from "./services/configService.js";
10
10
  import { useRecommendationExtensionStore as f } from "./store/recommendation.js";
11
11
  import { getDefaultTemplate as E } from "./templates/grid/template.js";
12
- const h = B.Recommendation, l = "recommendation-block-v2", m = "recommendation-id";
12
+ const h = _.Recommendation, l = "recommendation-block-v2", m = "recommendation-id";
13
13
  let I = !1;
14
- class v extends R {
14
+ class q extends R {
15
15
  constructor() {
16
16
  super();
17
17
  /**
@@ -47,6 +47,9 @@ class v extends R {
47
47
  allowInnerBlocksDND() {
48
48
  return !1;
49
49
  }
50
+ canBeSavedAsModule() {
51
+ return !1;
52
+ }
50
53
  /**
51
54
  * Returns the template HTML for a new recommendation block.
52
55
  * Generates a unique recommendation ID and embeds the instance class
@@ -190,5 +193,5 @@ class v extends R {
190
193
  }
191
194
  export {
192
195
  h as BLOCK_ID,
193
- v as RecommendationBlock
196
+ q as RecommendationBlock
194
197
  };
@@ -1,11 +1,11 @@
1
- const T = ".recommendation-block-v2", c = ".ins-recommendation-product-container", o = ".ins-recommendation-desktop-container", n = ".ins-recommendation-mobile-container", t = ".ins-recommendation-mobile-row", r = {
1
+ const T = ".recommendation-block-v2", c = ".ins-recommendation-product-container", o = ".ins-recommendation-desktop-container", n = ".ins-recommendation-mobile-container", t = ".ins-recommendation-mobile-row", r = "reco-v3-button", _ = {
2
2
  CURRENCY: "currency",
3
3
  SYMBOL: "currency-symbol",
4
4
  ALIGNMENT: "currency-alignment",
5
5
  THOUSAND_SEPARATOR: "currency-thousand-separator",
6
6
  DECIMAL_SEPARATOR: "currency-decimal-separator",
7
7
  DECIMAL_COUNT: "currency-decimal-count"
8
- }, R = "productImage", _ = "productName", e = "productPrice", O = "productOldPrice", s = "productOmnibusPrice", i = "productOmnibusDiscount", E = "productButton", A = "customAttr:", C = "data-custom-attributes", u = "product-attr", m = /* @__PURE__ */ new Set([
8
+ }, R = "productImage", e = "productName", O = "productPrice", s = "productOldPrice", i = "productOmnibusPrice", C = "productOmnibusDiscount", E = "productButton", A = "customAttr:", u = "data-custom-attributes", m = "product-attr", a = /* @__PURE__ */ new Set([
9
9
  "name",
10
10
  // productName
11
11
  "price",
@@ -23,19 +23,20 @@ const T = ".recommendation-block-v2", c = ".ins-recommendation-product-container
23
23
  ]);
24
24
  export {
25
25
  A as ATTR_CUSTOM_PREFIX,
26
- C as ATTR_DATA_CUSTOM_ATTRIBUTES,
27
- u as ATTR_PRODUCT_ATTR,
26
+ u as ATTR_DATA_CUSTOM_ATTRIBUTES,
27
+ m as ATTR_PRODUCT_ATTR,
28
28
  E as ATTR_PRODUCT_BUTTON,
29
29
  R as ATTR_PRODUCT_IMAGE,
30
- _ as ATTR_PRODUCT_NAME,
31
- O as ATTR_PRODUCT_OLD_PRICE,
32
- i as ATTR_PRODUCT_OMNIBUS_DISCOUNT,
33
- s as ATTR_PRODUCT_OMNIBUS_PRICE,
34
- e as ATTR_PRODUCT_PRICE,
30
+ e as ATTR_PRODUCT_NAME,
31
+ s as ATTR_PRODUCT_OLD_PRICE,
32
+ C as ATTR_PRODUCT_OMNIBUS_DISCOUNT,
33
+ i as ATTR_PRODUCT_OMNIBUS_PRICE,
34
+ O as ATTR_PRODUCT_PRICE,
35
35
  T as BLOCK_ROOT_SELECTOR,
36
- m as BUILT_IN_DEFAULT_ATTRIBUTES,
36
+ a as BUILT_IN_DEFAULT_ATTRIBUTES,
37
37
  c as CONTAINER_SELECTOR,
38
- r as CURRENCY_ATTR,
38
+ r as CSS_CLASS_RECO_BUTTON,
39
+ _ as CURRENCY_ATTR,
39
40
  o as DESKTOP_CONTAINER_SELECTOR,
40
41
  n as MOBILE_CONTAINER_SELECTOR,
41
42
  t as MOBILE_ROW_SELECTOR
@@ -1,11 +1,11 @@
1
1
  import { RecommendationBlockId as s } from "../../constants/blockIds.js";
2
- import { ATTR_PRODUCT_ATTR as b, ATTR_PRODUCT_BUTTON as u, ATTR_PRODUCT_OMNIBUS_DISCOUNT as m, ATTR_PRODUCT_OMNIBUS_PRICE as h, ATTR_PRODUCT_OLD_PRICE as y, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_NAME as f, ATTR_PRODUCT_IMAGE as x } from "../../constants/selectors.js";
3
- import { useRecommendationExtensionStore as _ } from "../../store/recommendation.js";
4
- import { formatPrice as $ } from "../../utils/priceFormatter.js";
5
- import { CUSTOM_CELL_HTML as C, sanitizeImageUrl as R } from "../utils.js";
2
+ import { ATTR_PRODUCT_ATTR as u, CSS_CLASS_RECO_BUTTON as p, ATTR_PRODUCT_BUTTON as m, ATTR_PRODUCT_OMNIBUS_DISCOUNT as h, ATTR_PRODUCT_OMNIBUS_PRICE as y, ATTR_PRODUCT_OLD_PRICE as T, ATTR_PRODUCT_PRICE as f, ATTR_PRODUCT_NAME as _, ATTR_PRODUCT_IMAGE as x } from "../../constants/selectors.js";
3
+ import { useRecommendationExtensionStore as $ } from "../../store/recommendation.js";
4
+ import { formatPrice as C } from "../../utils/priceFormatter.js";
5
+ import { CUSTOM_CELL_HTML as R, sanitizeImageUrl as O } from "../utils.js";
6
6
  const a = "0 5px", l = "attribute-cell";
7
- function p() {
8
- const t = _(), { currencySettings: e } = t.recommendationConfigs;
7
+ function g() {
8
+ const t = $(), { currencySettings: e } = t.recommendationConfigs;
9
9
  return {
10
10
  code: e.value,
11
11
  symbol: e.symbol,
@@ -16,13 +16,13 @@ function p() {
16
16
  };
17
17
  }
18
18
  function i(t, e = "price") {
19
- const o = p(), n = t[e], d = (n == null ? void 0 : n[o.code]) ?? Object.values(n ?? {})[0] ?? 0;
20
- return $({
19
+ const o = g(), n = t[e], d = (n == null ? void 0 : n[o.code]) ?? Object.values(n ?? {})[0] ?? 0;
20
+ return C({
21
21
  price: d,
22
22
  currency: o
23
23
  });
24
24
  }
25
- const I = {
25
+ const S = {
26
26
  [x]: (t) => `
27
27
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
28
28
  <table
@@ -38,9 +38,9 @@ const I = {
38
38
  class="esd-block-image product-image"
39
39
  align="center"
40
40
  esd-extension-block-id="${s.IMAGE}">
41
- <a target="_blank" href="${t.url}">
41
+ <a target="_blank" href="${t.url}" class="${p}">
42
42
  <img
43
- src="${R(t.image_url)}"
43
+ src="${O(t.image_url)}"
44
44
  alt="${t.name}"
45
45
  style="display: block; max-width: 100%; height: auto;"
46
46
  class="adapt-img">
@@ -51,7 +51,7 @@ const I = {
51
51
  </table>
52
52
  </td>
53
53
  `,
54
- [f]: (t) => `
54
+ [_]: (t) => `
55
55
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="middle">
56
56
  <table
57
57
  class="product-card-segment"
@@ -76,7 +76,7 @@ const I = {
76
76
  </table>
77
77
  </td>
78
78
  `,
79
- [T]: (t) => `
79
+ [f]: (t) => `
80
80
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
81
81
  <table
82
82
  class="product-card-segment"
@@ -100,7 +100,7 @@ const I = {
100
100
  </table>
101
101
  </td>
102
102
  `,
103
- [y]: (t) => `
103
+ [T]: (t) => `
104
104
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
105
105
  <table
106
106
  class="product-card-segment"
@@ -124,7 +124,7 @@ const I = {
124
124
  </table>
125
125
  </td>
126
126
  `,
127
- [h]: (t) => `
127
+ [y]: (t) => `
128
128
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
129
129
  <table
130
130
  class="product-card-segment"
@@ -152,9 +152,9 @@ const I = {
152
152
  </table>
153
153
  </td>
154
154
  `,
155
- [m]: (t) => {
155
+ [h]: (t) => {
156
156
  var r, c;
157
- const e = p(), o = ((r = t.original_price) == null ? void 0 : r[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, n = ((c = t.price) == null ? void 0 : c[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, d = o > 0 ? Math.round((o - n) / o * 100) : 0, g = d > 0 ? `-${d}%` : "0%";
157
+ const e = g(), o = ((r = t.original_price) == null ? void 0 : r[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, n = ((c = t.price) == null ? void 0 : c[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, d = o > 0 ? Math.round((o - n) / o * 100) : 0, b = d > 0 ? `-${d}%` : "0%";
158
158
  return `
159
159
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
160
160
  <table
@@ -174,7 +174,7 @@ const I = {
174
174
  esd-extension-block-id="${s.OMNIBUS_DISCOUNT}">
175
175
  <p contenteditable="false" style="font-size: 12px; color: #666666;">
176
176
  <span class="omnibus-text-before"></span>
177
- <span class="omnibus-discount-value">${g}</span>
177
+ <span class="omnibus-discount-value">${b}</span>
178
178
  <span class="omnibus-text-after"></span>
179
179
  </p>
180
180
  </td>
@@ -184,7 +184,7 @@ const I = {
184
184
  </td>
185
185
  `;
186
186
  },
187
- [u]: () => `
187
+ [m]: () => `
188
188
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
189
189
  <table
190
190
  class="product-card-segment"
@@ -208,7 +208,7 @@ const I = {
208
208
  ">
209
209
  <a
210
210
  href="#"
211
- class="es-button buy-button"
211
+ class="es-button ${p}"
212
212
  target="_blank"
213
213
  style="
214
214
  color: rgb(56, 118, 29);
@@ -236,7 +236,7 @@ const I = {
236
236
  * @param productAttrValue - Resolved product-attr value (e.g., "brand" for default, "product_attribute.rating_star" for custom)
237
237
  * @param content - Display content for the cell
238
238
  */
239
- [C]: (t, e) => `
239
+ [R]: (t, e) => `
240
240
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="middle">
241
241
  <table
242
242
  class="product-card-segment"
@@ -249,7 +249,7 @@ const I = {
249
249
  <tbody>
250
250
  <tr valign="top">
251
251
  <td
252
- ${b}="${t}"
252
+ ${u}="${t}"
253
253
  class="esd-block-text product-custom-attribute es-p0t es-p0b es-p15l es-p15r"
254
254
  align="center"
255
255
  esd-extension-block-id="${s.CUSTOM_ATTRIBUTE}">
@@ -264,5 +264,5 @@ const I = {
264
264
  export {
265
265
  l as ATTRIBUTE_CELL_CLASS,
266
266
  a as DEFAULT_CELL_PADDING,
267
- I as gridElementRenderer
267
+ S as gridElementRenderer
268
268
  };
@@ -1,10 +1,10 @@
1
1
  import { RecommendationBlockId as o } from "../../constants/blockIds.js";
2
- import { ATTR_PRODUCT_ATTR as m, ATTR_PRODUCT_BUTTON as c, ATTR_PRODUCT_IMAGE as d, ATTR_PRODUCT_OMNIBUS_DISCOUNT as u, ATTR_PRODUCT_OMNIBUS_PRICE as g, ATTR_PRODUCT_OLD_PRICE as f, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_NAME as x } from "../../constants/selectors.js";
3
- import { useRecommendationExtensionStore as _ } from "../../store/recommendation.js";
2
+ import { ATTR_PRODUCT_ATTR as u, ATTR_PRODUCT_BUTTON as c, CSS_CLASS_RECO_BUTTON as d, ATTR_PRODUCT_IMAGE as p, ATTR_PRODUCT_OMNIBUS_DISCOUNT as g, ATTR_PRODUCT_OMNIBUS_PRICE as f, ATTR_PRODUCT_OLD_PRICE as T, ATTR_PRODUCT_PRICE as x, ATTR_PRODUCT_NAME as _ } from "../../constants/selectors.js";
3
+ import { useRecommendationExtensionStore as C } from "../../store/recommendation.js";
4
4
  import { formatPrice as R } from "../../utils/priceFormatter.js";
5
- import { CUSTOM_CELL_HTML as y, sanitizeImageUrl as C } from "../utils.js";
6
- function p() {
7
- const t = _(), { currencySettings: e } = t.recommendationConfigs;
5
+ import { CUSTOM_CELL_HTML as O, sanitizeImageUrl as $ } from "../utils.js";
6
+ function b() {
7
+ const t = C(), { currencySettings: e } = t.recommendationConfigs;
8
8
  return {
9
9
  code: e.value,
10
10
  symbol: e.symbol,
@@ -15,29 +15,29 @@ function p() {
15
15
  };
16
16
  }
17
17
  function s(t, e = "price") {
18
- const n = p(), a = t[e], r = (a == null ? void 0 : a[n.code]) ?? Object.values(a ?? {})[0] ?? 0;
18
+ const n = b(), a = t[e], r = (a == null ? void 0 : a[n.code]) ?? Object.values(a ?? {})[0] ?? 0;
19
19
  return R({
20
20
  price: r,
21
21
  currency: n
22
22
  });
23
23
  }
24
- const U = {
24
+ const I = {
25
25
  /**
26
26
  * Image cell - left column (120px fixed width)
27
27
  * Has recommendation-attribute-row class and data attributes for Card Composition control
28
28
  */
29
- [d]: (t) => `
29
+ [p]: (t) => `
30
30
  <td
31
31
  width="120"
32
32
  class="esd-block-image product-image-cell recommendation-attribute-row es-p5"
33
33
  esd-extension-block-id="${o.IMAGE}"
34
- data-attribute-type="${d}"
34
+ data-attribute-type="${p}"
35
35
  data-visibility="1"
36
36
  align="center"
37
37
  valign="middle">
38
- <a target="_blank" href="${t.url}">
38
+ <a target="_blank" href="${t.url}" class="${d}">
39
39
  <img
40
- src="${C(t.image_url)}"
40
+ src="${$(t.image_url)}"
41
41
  alt="${t.name}"
42
42
  style="display: block; max-width: 100%; height: auto;"
43
43
  class="adapt-img product-image">
@@ -47,7 +47,7 @@ const U = {
47
47
  /**
48
48
  * Name element - row for info cell table
49
49
  */
50
- [x]: (t) => `
50
+ [_]: (t) => `
51
51
  <tr>
52
52
  <td
53
53
  class="esd-block-text product-name"
@@ -62,7 +62,7 @@ const U = {
62
62
  /**
63
63
  * Price element - row for info cell table
64
64
  */
65
- [T]: (t) => `
65
+ [x]: (t) => `
66
66
  <tr>
67
67
  <td
68
68
  class="esd-block-text product-price"
@@ -77,7 +77,7 @@ const U = {
77
77
  /**
78
78
  * Old price element - row for info cell table
79
79
  */
80
- [f]: (t) => `
80
+ [T]: (t) => `
81
81
  <tr>
82
82
  <td
83
83
  class="esd-block-text product-old-price"
@@ -94,7 +94,7 @@ const U = {
94
94
  /**
95
95
  * Omnibus price element - row for info cell table
96
96
  */
97
- [g]: (t) => `
97
+ [f]: (t) => `
98
98
  <tr>
99
99
  <td
100
100
  class="esd-block-text product-omnibus-price"
@@ -113,9 +113,9 @@ const U = {
113
113
  /**
114
114
  * Omnibus discount element - row for info cell table
115
115
  */
116
- [u]: (t) => {
116
+ [g]: (t) => {
117
117
  var i, l;
118
- const e = p(), n = ((i = t.original_price) == null ? void 0 : i[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, a = ((l = t.price) == null ? void 0 : l[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, r = n > 0 ? Math.round((n - a) / n * 100) : 0, b = r > 0 ? `-${r}%` : "0%";
118
+ const e = b(), n = ((i = t.original_price) == null ? void 0 : i[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, a = ((l = t.price) == null ? void 0 : l[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, r = n > 0 ? Math.round((n - a) / n * 100) : 0, m = r > 0 ? `-${r}%` : "0%";
119
119
  return `
120
120
  <tr>
121
121
  <td
@@ -126,7 +126,7 @@ const U = {
126
126
  align="left">
127
127
  <p contenteditable="false" style="font-size: 12px; color: #666666; margin: 0;">
128
128
  <span class="omnibus-text-before"></span>
129
- <span class="omnibus-discount-value">${b}</span>
129
+ <span class="omnibus-discount-value">${m}</span>
130
130
  <span class="omnibus-text-after"></span>
131
131
  </p>
132
132
  </td>
@@ -156,7 +156,7 @@ const U = {
156
156
  <a
157
157
  href="${t.url}"
158
158
  target="_blank"
159
- class="es-button buy-button"
159
+ class="es-button ${d}"
160
160
  style="
161
161
  color: rgb(56, 118, 29);
162
162
  background: rgb(217, 234, 211);
@@ -179,10 +179,10 @@ const U = {
179
179
  * @param productAttrValue - Resolved product-attr value (e.g., "brand" for default, "product_attribute.rating_star" for custom)
180
180
  * @param content - Display content for the cell
181
181
  */
182
- [y]: (t, e) => `
182
+ [O]: (t, e) => `
183
183
  <tr>
184
184
  <td
185
- ${m}="${t}"
185
+ ${u}="${t}"
186
186
  class="esd-block-text product-custom-attribute"
187
187
  esd-extension-block-id="${o.CUSTOM_ATTRIBUTE}"
188
188
  align="left">
@@ -192,5 +192,5 @@ const U = {
192
192
  `
193
193
  };
194
194
  export {
195
- U as listElementRenderer
195
+ I as listElementRenderer
196
196
  };
@@ -14,7 +14,7 @@ function y(t) {
14
14
  return "";
15
15
  const o = t.sort((r, e) => r.filterNumber - e.filterNumber), u = o.map((r) => {
16
16
  const e = r.operator === l, a = e ? "=" : r.operator, c = e ? f(r.value).join(l) : r.value;
17
- return `[${r.attribute}][${a}][${c}]`;
17
+ return `[${r.attribute}][${encodeURIComponent(a)}][${c}]`;
18
18
  }), [i, ...p] = u;
19
19
  let n = i;
20
20
  for (let r = 0; r < p.length; r++) {
@@ -23,7 +23,7 @@ function y(t) {
23
23
  }
24
24
  return `(${n})`;
25
25
  }
26
- function Q(t) {
26
+ function g(t) {
27
27
  if (!t || t.length === 0)
28
28
  return "";
29
29
  const o = t.reduce((r, e) => (r[e.filterGroup] || (r[e.filterGroup] = []), r[e.filterGroup].push(e), r), {}), u = Object.keys(o).map(Number).sort((r, e) => r - e), i = u.map((r) => {
@@ -38,7 +38,7 @@ function Q(t) {
38
38
  return s.trim();
39
39
  }
40
40
  export {
41
- Q as generateCompleteFilterQuery,
41
+ g as generateCompleteFilterQuery,
42
42
  f as parseTagList,
43
43
  m as safeDecodeURIComponent
44
44
  };
@@ -1,4 +1,4 @@
1
- const l = [
1
+ const o = [
2
2
  {
3
3
  key: "locale",
4
4
  getValue: (e) => e.language,
@@ -9,9 +9,9 @@ const l = [
9
9
  getValue: (e) => e.currencySettings.value,
10
10
  getAvailableOptions: (e) => e.currencyList.map((n) => n.text)
11
11
  }
12
- ], u = "newsletter.recommendation-fill-required-fields";
13
- function o(e, n) {
14
- return l.filter((t) => {
12
+ ], l = "newsletter.recommendation-fill-required-fields";
13
+ function u(e, n) {
14
+ return o.filter((t) => {
15
15
  var a;
16
16
  if (t.condition && !t.condition(e))
17
17
  return !1;
@@ -19,15 +19,15 @@ function o(e, n) {
19
19
  if (!i)
20
20
  return !0;
21
21
  const r = (a = t.getAvailableOptions) == null ? void 0 : a.call(t, n);
22
- return r === void 0 || r.length === 0 ? !1 : !r.includes(i);
22
+ return r !== void 0 && !r.includes(i);
23
23
  }).map((t) => t.key);
24
24
  }
25
25
  function s(e, n) {
26
- return o(e, n).length === 0;
26
+ return u(e, n).length === 0;
27
27
  }
28
28
  export {
29
- l as REQUIRED_RECOMMENDATION_FIELDS,
30
- u as RecommendationRequiredFieldsKey,
31
- o as getInvalidFields,
29
+ o as REQUIRED_RECOMMENDATION_FIELDS,
30
+ l as RecommendationRequiredFieldsKey,
31
+ u as getInvalidFields,
32
32
  s as isConfigValid
33
33
  };
@@ -7,5 +7,5 @@ export declare const useActionsApi: () => {
7
7
  getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
8
8
  updateTimerInClonedTemplate: () => Promise<string | null>;
9
9
  updateHtmlAndCss: (html: string, css: string) => void;
10
- editorSave: () => Promise<void>;
10
+ editorSave: () => Promise<boolean>;
11
11
  };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Shared text-block migration helpers used by both `radioButtonMigrator` and
3
+ * `checkboxMigrator`. Extracts a legacy v1 `.ins-title` / `.ins-description`
4
+ * cell into a paragraph descriptor and rebuilds it as a v2 `esd-block-text`
5
+ * cell — preserving every <p>, every inline tag (<u>, <a>, <br>, <strong>,
6
+ * <em>) and re-encoding bold/italic detection as canonical tags.
7
+ */
8
+ export type InsCellClass = 'ins-title' | 'ins-description' | 'ins-subscribe' | 'ins-unsubscribe';
9
+ type ParagraphContent = {
10
+ innerHtml: string;
11
+ isBold: boolean;
12
+ isItalic: boolean;
13
+ styles: string;
14
+ };
15
+ export type TextContent = {
16
+ paragraphs: ParagraphContent[];
17
+ align: string;
18
+ };
19
+ export type ExtractedTextContent = TextContent & {
20
+ containerClass: string;
21
+ };
22
+ export declare function extractTextFromElement(parent: Element, className: InsCellClass): ExtractedTextContent;
23
+ export declare function buildTextBlock(content: TextContent, extraClass?: string): string;
24
+ export {};
@@ -23,6 +23,7 @@ export declare class RecommendationBlock extends Block {
23
23
  getDescription(): string;
24
24
  getSettingsPanelTitleHtml(): string;
25
25
  allowInnerBlocksDND(): boolean;
26
+ canBeSavedAsModule(): boolean;
26
27
  /**
27
28
  * Returns the template HTML for a new recommendation block.
28
29
  * Generates a unique recommendation ID and embeds the instance class
@@ -8,6 +8,6 @@
8
8
  */
9
9
  export { RecommendationBlockId } from './blockIds';
10
10
  export { RecommendationControlId } from './controlIds';
11
- export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
11
+ export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
12
12
  export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
13
13
  export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
@@ -17,6 +17,12 @@ export declare const DESKTOP_CONTAINER_SELECTOR = ".ins-recommendation-desktop-c
17
17
  export declare const MOBILE_CONTAINER_SELECTOR = ".ins-recommendation-mobile-container";
18
18
  /** Mobile row wrapper — the <tr> that wraps the mobile container <td>/<table> */
19
19
  export declare const MOBILE_ROW_SELECTOR = ".ins-recommendation-mobile-row";
20
+ /**
21
+ * Stable class on the recommendation product button anchor. Survives export
22
+ * and is the anchor selector the compiler uses to swap `href` with the
23
+ * `{{cId_pIdx_url}}` template variable.
24
+ */
25
+ export declare const CSS_CLASS_RECO_BUTTON = "reco-v3-button";
20
26
  /**
21
27
  * Currency HTML attributes set on the block element
22
28
  * These are read by the HTML compiler at runtime to format prices
@@ -0,0 +1 @@
1
+ export {};
File without changes
@@ -11,6 +11,11 @@ ue-description a {
11
11
  display: none;
12
12
  }
13
13
 
14
+ /* Override the rule above for the Gmail Promotions switcher docs link — remove with DT-28355. */
15
+ ue-lock-container.e2e-promotions-switcher ue-description a {
16
+ display: unset;
17
+ }
18
+
14
19
  .label {
15
20
  font-size: 13px;
16
21
  color: var(--guido-color-gray-800);
@@ -1,8 +1,8 @@
1
1
  import "../@types/config/schemas.js";
2
2
  import "../@types/config/defaults.js";
3
- import { parseConfig as n } from "../@types/config/validator.js";
4
- import { defineStore as o } from "pinia";
5
- const s = o("guido-config", {
3
+ import { parseConfig as o } from "../@types/config/validator.js";
4
+ import { defineStore as r } from "pinia";
5
+ const f = r("guido-config", {
6
6
  state: () => ({
7
7
  initialized: !1,
8
8
  config: null
@@ -75,64 +75,65 @@ const s = o("guido-config", {
75
75
  * Get the template ID
76
76
  */
77
77
  templateId: (i) => {
78
- var e;
79
- return ((e = i.config) == null ? void 0 : e.identity.templateId) ?? "";
78
+ var e, t;
79
+ return ((t = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : t.templateId) ?? "";
80
80
  },
81
81
  /**
82
82
  * Get the user ID
83
83
  */
84
84
  userId: (i) => {
85
- var e;
86
- return ((e = i.config) == null ? void 0 : e.identity.userId) ?? "";
85
+ var e, t;
86
+ return ((t = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : t.userId) ?? "";
87
87
  },
88
88
  /**
89
89
  * Get the variation ID
90
90
  */
91
91
  variationId: (i) => {
92
- var e;
93
- return ((e = i.config) == null ? void 0 : e.identity.variationId) ?? "";
92
+ var e, t;
93
+ return ((t = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : t.variationId) ?? "";
94
94
  },
95
95
  /**
96
96
  * Get the partner name
97
97
  */
98
98
  partnerName: (i) => {
99
- var e;
100
- return ((e = i.config) == null ? void 0 : e.partner.name) ?? "";
99
+ var e, t;
100
+ return ((t = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : t.name) ?? "";
101
101
  },
102
102
  /**
103
103
  * Get the product type
104
104
  */
105
105
  productType: (i) => {
106
- var e;
107
- return ((e = i.config) == null ? void 0 : e.partner.productType) ?? 60;
106
+ var e, t;
107
+ return ((t = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : t.productType) ?? 60;
108
108
  },
109
109
  /**
110
110
  * Get the message type
111
111
  */
112
112
  messageType: (i) => {
113
- var e;
114
- return ((e = i.config) == null ? void 0 : e.partner.messageType) ?? 1;
113
+ var e, t;
114
+ return ((t = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : t.messageType) ?? 1;
115
115
  },
116
116
  /**
117
117
  * Get the username
118
118
  */
119
119
  username: (i) => {
120
- var e;
121
- return ((e = i.config) == null ? void 0 : e.partner.username) ?? "Guido User";
120
+ var e, t;
121
+ return ((t = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : t.username) ?? "Guido User";
122
122
  },
123
123
  /**
124
124
  * Check if header should be shown
125
125
  */
126
126
  showHeader: (i) => {
127
- var e;
128
- return ((e = i.config) == null ? void 0 : e.ui.showHeader) ?? !0;
127
+ var e, t;
128
+ return ((t = (e = i.config) == null ? void 0 : e.ui) == null ? void 0 : t.showHeader) ?? !0;
129
129
  },
130
130
  /**
131
131
  * Check if a specific feature is enabled
132
132
  */
133
+ // eslint-disable-next-line @stylistic/max-len
133
134
  isFeatureEnabled: (i) => (e) => {
134
- var t;
135
- return ((t = i.config) == null ? void 0 : t.features[e]) ?? !0;
135
+ var t, n;
136
+ return ((n = (t = i.config) == null ? void 0 : t.features) == null ? void 0 : n[e]) ?? !0;
136
137
  }
137
138
  },
138
139
  actions: {
@@ -140,7 +141,7 @@ const s = o("guido-config", {
140
141
  * Initialize the config store with validated configuration
141
142
  */
142
143
  init(i) {
143
- const e = n(i);
144
+ const e = o(i);
144
145
  this.config = e, this.initialized = !0;
145
146
  },
146
147
  /**
@@ -152,5 +153,5 @@ const s = o("guido-config", {
152
153
  }
153
154
  });
154
155
  export {
155
- s as useConfigStore
156
+ f as useConfigStore
156
157
  };