@useinsider/guido 3.15.0 → 3.16.0-beta.0faee0c

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 (81) hide show
  1. package/dist/@types/config/schemas.js +108 -92
  2. package/dist/components/Guido.vue.js +1 -1
  3. package/dist/components/Guido.vue2.js +78 -75
  4. package/dist/composables/useActionsApi.js +30 -22
  5. package/dist/composables/useEmailTemplateApplier.js +25 -23
  6. package/dist/composables/useHtmlValidator.js +108 -106
  7. package/dist/composables/useStripo.js +30 -29
  8. package/dist/composables/useTimerClone.js +21 -19
  9. package/dist/config/i18n/en/labels.json.js +7 -3
  10. package/dist/config/migrator/checkboxMigrator.js +20 -19
  11. package/dist/config/migrator/radioButtonMigrator.js +26 -25
  12. package/dist/config/migrator/recommendation/compositionMapper.js +26 -23
  13. package/dist/config/migrator/recommendation/htmlBuilder.js +156 -155
  14. package/dist/extensions/Blocks/Checkbox/constants/controlIds.js +4 -0
  15. package/dist/extensions/Blocks/Checkbox/constants/selectors.js +6 -0
  16. package/dist/extensions/Blocks/Checkbox/controls/blockBackground/index.js +10 -0
  17. package/dist/extensions/Blocks/Checkbox/extension.js +6 -5
  18. package/dist/extensions/Blocks/Checkbox/settingsPanel.js +15 -14
  19. package/dist/extensions/Blocks/Checkbox/template.js +10 -9
  20. package/dist/extensions/Blocks/Items/block.js +44 -42
  21. package/dist/extensions/Blocks/Items/template.js +86 -86
  22. package/dist/extensions/Blocks/RadioButton/constants/controlIds.js +4 -0
  23. package/dist/extensions/Blocks/RadioButton/constants/selectors.js +6 -0
  24. package/dist/extensions/Blocks/RadioButton/controls/blockBackground/index.js +10 -0
  25. package/dist/extensions/Blocks/RadioButton/extension.js +5 -4
  26. package/dist/extensions/Blocks/RadioButton/settingsPanel.js +12 -11
  27. package/dist/extensions/Blocks/RadioButton/template.js +16 -9
  28. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +18 -15
  29. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +5 -9
  30. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +363 -322
  31. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +8 -8
  32. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +271 -231
  33. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +98 -113
  34. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +21 -0
  35. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +16 -16
  36. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +16 -16
  37. package/dist/extensions/Blocks/Recommendation/templates/utils.js +120 -120
  38. package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +55 -54
  39. package/dist/extensions/Blocks/Recommendation/utils/compositionKeys.js +89 -0
  40. package/dist/extensions/Blocks/common-control.js +42 -35
  41. package/dist/extensions/Blocks/controlFactories.js +117 -115
  42. package/dist/guido.css +1 -1
  43. package/dist/library.js +11 -7
  44. package/dist/node_modules/valibot/dist/index.js +230 -216
  45. package/dist/public/trackingIds.js +8 -0
  46. package/dist/src/@types/config/schemas.d.ts +20 -0
  47. package/dist/src/composables/useActionsApi.d.ts +1 -1
  48. package/dist/src/composables/useConfig.d.ts +4 -0
  49. package/dist/src/composables/useHtmlValidator.d.ts +3 -2
  50. package/dist/src/config/migrator/recommendation/types.d.ts +1 -0
  51. package/dist/src/extensions/Blocks/Checkbox/constants/controlIds.d.ts +7 -0
  52. package/dist/src/extensions/Blocks/Checkbox/constants/index.d.ts +10 -0
  53. package/dist/src/extensions/Blocks/Checkbox/constants/selectors.d.ts +16 -0
  54. package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +14 -0
  55. package/dist/src/extensions/Blocks/RadioButton/constants/controlIds.d.ts +7 -0
  56. package/dist/src/extensions/Blocks/RadioButton/constants/index.d.ts +10 -0
  57. package/dist/src/extensions/Blocks/RadioButton/constants/selectors.d.ts +16 -0
  58. package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +14 -0
  59. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  60. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +6 -0
  61. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +27 -5
  62. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +4 -2
  63. package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +5 -0
  64. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +12 -11
  65. package/dist/src/extensions/Blocks/Recommendation/utils/compositionKeys.d.ts +47 -0
  66. package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +7 -0
  67. package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +10 -0
  68. package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +16 -0
  69. package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +14 -0
  70. package/dist/src/extensions/Blocks/common-control.d.ts +3 -1
  71. package/dist/src/library.d.ts +1 -0
  72. package/dist/src/public/trackingIds.d.ts +9 -0
  73. package/dist/src/stores/config.d.ts +36 -0
  74. package/dist/src/stores/editor.d.ts +25 -0
  75. package/dist/src/utils/linkTrackingIds.d.ts +30 -0
  76. package/dist/stores/editor.js +4 -1
  77. package/dist/stores/onboarding.js +11 -7
  78. package/dist/utils/linkTrackingIds.js +56 -0
  79. package/dist/utils/pairProductVariables.js +105 -99
  80. package/dist/utils/templatePreparation.js +72 -61
  81. package/package.json +5 -1
@@ -1,17 +1,17 @@
1
1
  import { escapeHtml as m } from "../../../utils/htmlEscape.js";
2
2
  import { BlockType as R, BlockAttr as S } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
3
  import { ItemsBlockId as O } from "./enums/controlEnums.js";
4
- import { productPairs as h, templateFirstLine as Y } from "./enums/productEnums.js";
5
- import { ItemInCartOptions as q, SETTINGS_ENUMS as N, DefaultConfigValues as k } from "./enums/settingsEnums.js";
6
- import j from "./layouts/horizontal.html.js";
7
- import f from "./layouts/vertical.html.js";
8
- import { deriveItemNumber as J, escapeReplacement as G } from "./utils/nodeConfigUtils.js";
9
- let [X] = h.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [F] = h.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [x] = h.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [L] = h.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [V] = h.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
10
- const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCase().startsWith(e.toLowerCase())).join("; ").replace(/;\s*$/, ""), U = (s) => D(s, "text-align"), y = (s, e) => {
11
- const l = new RegExp(`${e}\\s*:\\s*([^;]+)`, "i"), a = s.match(l);
4
+ import { productPairs as h, templateFirstLine as q } from "./enums/productEnums.js";
5
+ import { ItemInCartOptions as j, SETTINGS_ENUMS as N, DefaultConfigValues as M } from "./enums/settingsEnums.js";
6
+ import C from "./layouts/horizontal.html.js";
7
+ import J from "./layouts/vertical.html.js";
8
+ import { deriveItemNumber as Z, escapeReplacement as g } from "./utils/nodeConfigUtils.js";
9
+ let [v] = h.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [F] = h.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [x] = h.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [L] = h.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [X] = h.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
10
+ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCase().startsWith(e.toLowerCase())).join("; ").replace(/;\s*$/, ""), k = (s) => U(s, "text-align"), y = (s, e) => {
11
+ const r = new RegExp(`${e}\\s*:\\s*([^;]+)`, "i"), a = s.match(r);
12
12
  return a ? a[1].trim() : null;
13
- }, w = (s) => `<tr>${s}</tr>`, Z = (s, e, l, a) => {
14
- const i = l || k.productImageHeight, d = (a == null ? void 0 : a.imageVisible) === !1 ? "display: none; " : "";
13
+ }, w = (s) => `<tr>${s}</tr>`, f = (s, e, r, a) => {
14
+ const i = r || M.productImageHeight, d = (a == null ? void 0 : a.imageVisible) === !1 ? "display: none; " : "";
15
15
  return w(`
16
16
  <td class="esd-block-image document-node-component default-block-component selectable ng-star-inserted"
17
17
  align="center"
@@ -26,7 +26,7 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
26
26
  href="#!">
27
27
  <img class="adapt-img document-node-component ng-star-inserted"
28
28
  style="object-fit: contain;"
29
- src="${X}"
29
+ src="${v}"
30
30
  alt="${F}"
31
31
  width="${i}"
32
32
  height="${i}">
@@ -35,18 +35,18 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
35
35
  `);
36
36
  }, tt = (s, e) => `
37
37
  <${R.BLOCK_IMAGE}
38
- ${S.BLOCK_IMAGE.src}="${X}"
38
+ ${S.BLOCK_IMAGE.src}="${v}"
39
39
  ${S.BLOCK_IMAGE.alt}="${F}"
40
40
  ${S.BLOCK_IMAGE.href}="#!"
41
- ${S.BLOCK_IMAGE.width}="${k.productImageWidth}"
42
- ${S.BLOCK_IMAGE.height}="${k.productImageWidth}"
41
+ ${S.BLOCK_IMAGE.width}="${M.productImageWidth}"
42
+ ${S.BLOCK_IMAGE.height}="${M.productImageWidth}"
43
43
  esd-extension-block-id="${O.IMAGE}"
44
44
  data-slot-1
45
45
  product-attr="imageSrc"
46
46
  data-type="${s}"
47
47
  data-number="${e}"
48
48
  />
49
- `, et = (s, e, l, a) => {
49
+ `, et = (s, e, r, a) => {
50
50
  const i = `
51
51
  word-wrap: break-word;
52
52
  white-space: nowrap;
@@ -56,15 +56,15 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
56
56
  max-width: 100%;
57
57
  `;
58
58
  if (e) {
59
- const d = y(l || "", "text-align") || "center", n = U(l || i), c = y(n, "font-weight"), r = y(n, "font-style"), p = c === "bold" || c === "700", t = r === "italic", o = D(
60
- D(
61
- D(n, "font-weight"),
59
+ const d = y(r || "", "text-align") || "center", n = k(r || i), c = y(n, "font-weight"), l = y(n, "font-style"), o = c === "bold" || c === "700", t = l === "italic", p = U(
60
+ U(
61
+ U(n, "font-weight"),
62
62
  "font-style"
63
63
  ),
64
64
  "text-decoration"
65
- ), T = (a == null ? void 0 : a.nameVisible) === !1 ? "display: none;" : "display: table-cell;", _ = o ? ` style="${m(o)}"` : "";
66
- let $ = F;
67
- return p && ($ = `<strong>${$}</strong>`), t && ($ = `<em>${$}</em>`), w(`
65
+ ), T = (a == null ? void 0 : a.nameVisible) === !1 ? "display: none;" : "display: table-cell;", _ = p ? ` style="${m(p)}"` : "";
66
+ let E = F;
67
+ return o && (E = `<strong>${E}</strong>`), t && (E = `<em>${E}</em>`), w(`
68
68
  <td class="esd-block-text es-p10"
69
69
  align="${d}"
70
70
  width="100%"
@@ -76,7 +76,7 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
76
76
  path="1"
77
77
  product-attr="name"
78
78
  data-slot-2${_}>
79
- ${$}
79
+ ${E}
80
80
  </p>
81
81
  </td>
82
82
  `);
@@ -97,15 +97,15 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
97
97
  </p>
98
98
  </${R.BLOCK_TEXT}>
99
99
  `;
100
- }, at = (s, e, l, a, i, d, n, c, r, p) => {
100
+ }, at = (s, e, r, a, i, d, n, c, l, o) => {
101
101
  let t = x;
102
102
  if (a && a.trim()) {
103
- const E = `${a.trim()}`;
104
- t = (i || "0") === "1" ? `${x}&nbsp;${E}` : `${E}&nbsp;${x}`;
103
+ const $ = `${a.trim()}`;
104
+ t = (i || "0") === "1" ? `${x}&nbsp;${$}` : `${$}&nbsp;${x}`;
105
105
  }
106
- const o = i === "1" ? "after" : "before", T = `data-formated="${l ? "true" : "false"}"`, _ = `data-curency="${o}"`, $ = a ? `data-currency_symbol="${a}"` : "", u = `data-single_price="${c ? "true" : "false"}"`, I = r === N.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
106
+ const p = i === "1" ? "after" : "before", T = `data-formated="${r ? "true" : "false"}"`, _ = `data-curency="${p}"`, E = a ? `data-currency_symbol="${a}"` : "", u = `data-single_price="${c ? "true" : "false"}"`, I = l === N.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
107
107
  if (d) {
108
- const b = U(n || "color: #060606; white-space: nowrap; font-size: 20px;"), A = p ? "" : ' style="display: none;"';
108
+ const b = k(n || "color: #060606; white-space: nowrap; font-size: 20px;"), A = o ? "" : ' style="display: none;"';
109
109
  return w(`
110
110
  <td class="esd-block-text items-block-price${I}"
111
111
  align="center"
@@ -119,7 +119,7 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
119
119
  data-number="${e}"
120
120
  ${T}
121
121
  ${_}
122
- ${$}
122
+ ${E}
123
123
  ${u}
124
124
  style="${m(b)}">
125
125
  ${t}
@@ -149,20 +149,20 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
149
149
  </p>
150
150
  </${R.BLOCK_TEXT}>
151
151
  `;
152
- }, st = (s, e, l, a, i, d, n = !0, c, r, p) => {
152
+ }, st = (s, e, r, a, i, d, n = !0, c, l, o) => {
153
153
  let t = L;
154
154
  if (a && a.trim()) {
155
- const E = `${a.trim()}`;
156
- t = (i || "0") === "1" ? `${L}&nbsp;${E}` : `${E}&nbsp;${L}`;
155
+ const $ = `${a.trim()}`;
156
+ t = (i || "0") === "1" ? `${L}&nbsp;${$}` : `${$}&nbsp;${L}`;
157
157
  }
158
- const o = i === "1" ? "after" : "before", T = `data-formated="${l ? "true" : "false"}"`, _ = `data-curency="${o}"`, $ = n ? "" : ' style="display: none;"', u = `data-single_price="${r ? "true" : "false"}"`, I = p === N.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
158
+ const p = i === "1" ? "after" : "before", T = `data-formated="${r ? "true" : "false"}"`, _ = `data-curency="${p}"`, E = n ? "" : ' style="display: none;"', u = `data-single_price="${l ? "true" : "false"}"`, I = o === N.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
159
159
  if (d) {
160
- const b = U(c || "color: #cc0000; white-space: nowrap; font-size: 19px;");
160
+ const b = k(c || "color: #cc0000; white-space: nowrap; font-size: 19px;");
161
161
  return w(`
162
162
  <td class="esd-block-text items-block-price${I}"
163
163
  esd-extension-block-id="${O.ORIGINAL_PRICE}"
164
164
  width="100%"
165
- align="center"${$}>
165
+ align="center"${E}>
166
166
  <p
167
167
  product-attr="originalPrice"
168
168
  contenteditable="false"
@@ -203,10 +203,10 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
203
203
  </p>
204
204
  </${R.BLOCK_TEXT}>
205
205
  `;
206
- }, lt = (s = !0, e, l) => {
206
+ }, lt = (s = !0, e, r) => {
207
207
  const a = s ? "" : 'style="display: none;"';
208
208
  if (e) {
209
- const i = "font-size: 14px;", d = y(l || "", "text-align") || "center", n = U(l || i);
209
+ const i = "font-size: 14px;", d = y(r || "", "text-align") || "center", n = k(r || i);
210
210
  return w(`
211
211
  <td class="esd-block-text es-p10 document-node-component default-block-component selectable"
212
212
  width="100%" align="${d}"
@@ -218,7 +218,7 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
218
218
  width="100%"
219
219
  path="1"
220
220
  style="${m(n)}">
221
- ${V}
221
+ ${X}
222
222
  </p>
223
223
  </td>
224
224
  `);
@@ -236,26 +236,26 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
236
236
  data-slot-3
237
237
  contenteditable="false"
238
238
  width="100%">
239
- ${V}
239
+ ${X}
240
240
  </p>
241
241
  </${R.BLOCK_TEXT}>
242
242
  `;
243
- }, rt = (s, e, l = "Buy", a, i, d = !0, n = !0) => {
243
+ }, rt = (s, e, r = "Buy", a, i, d = !0, n = !0) => {
244
244
  if (a) {
245
- const c = y(i || "", "background") || y(i || "", "background-color"), r = c ? `border-width: 0px; background: ${c};` : "border-width: 0px;", p = d ? "es-fw" : "es-il", t = (i || "").replace("border-width: 0;", "");
245
+ const c = y(i || "", "background") || y(i || "", "background-color"), l = c ? `border-width: 0px; background: ${c};` : "border-width: 0px;", o = d ? "es-fw" : "es-il", t = (i || "").replace("border-width: 0;", "");
246
246
  return w(`
247
247
  <td class="esd-block-button ins-button default-block-component selectable"
248
- align="center" width="100%" name="buy-button" caption="${l}"
248
+ align="center" width="100%" name="buy-button" caption="${r}"
249
249
  esd-extension-block-id="${O.BUTTON}"
250
250
  product-attr="button" data-slot-6="" data-type="${s}" data-number="${e}"
251
251
  ${n ? "" : ' style="display: none;"'}>
252
- <span class="es-button-border ${p}" style="${m(r)}">
252
+ <span class="es-button-border ${o}" style="${m(l)}">
253
253
  <a
254
254
  class="es-button"
255
255
  href="#!"
256
256
  target="_blank"
257
257
  style="${m(t)} padding: 5px 12px;">
258
- ${l}
258
+ ${r}
259
259
  </a>
260
260
  </span>
261
261
  </td>
@@ -266,27 +266,27 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
266
266
  width="100%"
267
267
  class="ins-button"
268
268
  name="buy-button"
269
- caption="${l}"
269
+ caption="${r}"
270
270
  align="center"
271
271
  esd-extension-block-id="${O.BUTTON}"
272
272
  product-attr="button"
273
273
  data-slot-6
274
274
  data-type="${s}"
275
275
  data-number="${e}"
276
- >${l}
276
+ >${r}
277
277
  </${R.BLOCK_BUTTON}>
278
278
  `;
279
- }, ct = (s, e, l, a = !0, i = !0) => {
280
- const d = e === N.ORIENTATION.VERTICAL, n = l === "horizontal";
279
+ }, ct = (s, e, r, a = !0, i = !0) => {
280
+ const d = e === N.ORIENTATION.VERTICAL, n = r === "horizontal";
281
281
  if (d) {
282
- const c = !n, r = c || !i ? "100%" : "50%", p = c || !a ? "100%" : "50%";
282
+ const c = !n, l = c || !i ? "100%" : "50%", o = c || !a ? "100%" : "50%";
283
283
  let t = s.replace(
284
284
  /<td\s+[^>]*class="([^"]*product-price-class[^"]*)"[^>]*>/gi,
285
- (o) => o.replace(/width="[^"]*"/gi, `width="${r}"`).replace(/width:\s*[^;]+;/gi, `width: ${r};`)
285
+ (p) => p.replace(/width="[^"]*"/gi, `width="${l}"`).replace(/width:\s*[^;]+;/gi, `width: ${l};`)
286
286
  );
287
287
  return t = t.replace(
288
288
  /<td\s+[^>]*class="([^"]*product-original-price-class[^"]*)"[^>]*>/gi,
289
- (o) => o.replace(/width="[^"]*"/gi, `width="${p}"`).replace(/width:\s*[^;]+;/gi, `width: ${p};`)
289
+ (p) => p.replace(/width="[^"]*"/gi, `width="${o}"`).replace(/width:\s*[^;]+;/gi, `width: ${o};`)
290
290
  ), t;
291
291
  }
292
292
  return n ? s : s.replace(
@@ -298,74 +298,74 @@ const D = (s, e) => s.split(";").map((l) => l.trim()).filter((l) => !l.toLowerCa
298
298
  );
299
299
  }, it = (s) => s ? `<td align="center"
300
300
  esd-extension-block-id="items-block"
301
- class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` : Y, K = (s, e, l, a, i, d, n, c, r, p, t, o, T, _ = "horizontal", $, u, P, I) => {
302
- const A = `${`data-type="${e}" data-number="${l}"`} data-orientation="${a}"`, M = r == null ? void 0 : r["data-product_image_control_image-height"], B = d ? Z(e, l, M, t) : tt(e, l), W = (t == null ? void 0 : t.buttonLabel) || "Buy", z = (t == null ? void 0 : t.buttonFullWidth) !== void 0 ? t.buttonFullWidth : !0, Q = e === N.ITEMS_TYPE.BROWSED_ITEMS ? !1 : t == null ? void 0 : t.quantityControlEnabled, H = (t == null ? void 0 : t.buttonVisible) !== void 0 ? t.buttonVisible : (r == null ? void 0 : r["data-product_button_control_enabled"]) !== "false", g = (t == null ? void 0 : t.priceVisible) !== void 0 ? t.priceVisible : (r == null ? void 0 : r["data-product_price_control_enabled"]) !== "false", v = (t == null ? void 0 : t.originalPriceVisible) !== void 0 ? t.originalPriceVisible : (r == null ? void 0 : r["data-product_original_price_control_enabled"]) !== "false", C = s.replace("{-{-TEMPLATE_FIRST_LINE-}-}", it(d)).replace("{-{-PRODUCT_IMAGE-}-}", B).replace("{-{-PRODUCT_NAME-}-}", et(e, d, o, t)).replaceAll(
301
+ class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` : q, B = (s, e, r, a, i, d, n, c, l, o, t, p, T, _ = "horizontal", E, u, P, I) => {
302
+ const $ = o !== void 0 ? ` data-nodup="${o}"` : "", A = `${`data-type="${e}" data-number="${r}"`} data-orientation="${a}"${$}`, D = l == null ? void 0 : l["data-product_image_control_image-height"], V = d ? f(e, r, D, t) : tt(e, r), W = (t == null ? void 0 : t.buttonLabel) || "Buy", z = (t == null ? void 0 : t.buttonFullWidth) !== void 0 ? t.buttonFullWidth : !0, H = e === N.ITEMS_TYPE.BROWSED_ITEMS ? !1 : t == null ? void 0 : t.quantityControlEnabled, Q = (t == null ? void 0 : t.buttonVisible) !== void 0 ? t.buttonVisible : (l == null ? void 0 : l["data-product_button_control_enabled"]) !== "false", G = (t == null ? void 0 : t.priceVisible) !== void 0 ? t.priceVisible : (l == null ? void 0 : l["data-product_price_control_enabled"]) !== "false", K = (t == null ? void 0 : t.originalPriceVisible) !== void 0 ? t.originalPriceVisible : (l == null ? void 0 : l["data-product_original_price_control_enabled"]) !== "false", Y = s.replace("{-{-TEMPLATE_FIRST_LINE-}-}", it(d)).replace("{-{-PRODUCT_IMAGE-}-}", V).replace("{-{-PRODUCT_NAME-}-}", et(e, d, p, t)).replaceAll(
303
303
  "{-{-PRODUCT_PRICE-}-}",
304
- G(at(
304
+ g(at(
305
305
  e,
306
- l,
306
+ r,
307
307
  i,
308
308
  n,
309
309
  c,
310
310
  d,
311
- $,
311
+ E,
312
312
  I,
313
313
  a,
314
- g
314
+ G
315
315
  ))
316
316
  ).replaceAll(
317
317
  "{-{-PRODUCT_ORIGINAL_PRICE-}-}",
318
- G(st(
318
+ g(st(
319
319
  e,
320
- l,
320
+ r,
321
321
  i,
322
322
  n,
323
323
  c,
324
324
  d,
325
- v,
325
+ K,
326
326
  u,
327
327
  I,
328
328
  a
329
329
  ))
330
- ).replace("{-{-PRODUCT_QUANTITY-}-}", lt(Q, d, P)).replace(
330
+ ).replace("{-{-PRODUCT_QUANTITY-}-}", lt(H, d, P)).replace(
331
331
  "{-{-PRODUCT_BUTTON-}-}",
332
- rt(e, l, W, d, T, z, H)
332
+ rt(e, r, W, d, T, z, Q)
333
333
  ).replace(
334
334
  /<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
335
335
  `<td$1 ${A}>`
336
336
  );
337
337
  return ct(
338
- C,
338
+ Y,
339
339
  a,
340
340
  _,
341
- g,
342
- v
341
+ G,
342
+ K
343
343
  );
344
344
  };
345
345
  function It({
346
346
  orientation: s,
347
347
  itemsType: e = N.ITEMS_TYPE.CART_ITEMS,
348
- itemId: l,
348
+ itemId: r,
349
349
  currencySymbol: a,
350
350
  currencyLocation: i,
351
351
  migrate: d = !1,
352
352
  formattedPrice: n = !0,
353
353
  configBlockAttributes: c,
354
- nodeConfig: r,
355
- nameStyles: p,
354
+ nodeConfig: l,
355
+ nameStyles: o,
356
356
  buttonStyles: t,
357
- priceStyles: o,
357
+ priceStyles: p,
358
358
  originalPriceStyles: T,
359
359
  quantityStyles: _,
360
- priceOrientation: $
360
+ priceOrientation: E
361
361
  }) {
362
- const u = q[e].findIndex((M) => M.value === l), P = J(l, e), I = (r == null ? void 0 : r.priceSinglePrice) ?? (c == null ? void 0 : c["data-product_price_control_single_price"]) === "1" ?? !1;
363
- X = h.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[u >= 0 ? u : 0], F = h.PAIRS_FOR_EXTENSION.name[e].DEFAULT[u >= 0 ? u : 0];
364
- const E = h.PAIRS_FOR_EXTENSION.price[e], b = h.PAIRS_FOR_EXTENSION.originalPrice[e];
365
- I ? (x = n ? E.DEFAULT_SINGLE_PRICE_FORMATTED : E.DEFAULT_SINGLE_PRICE, L = n ? b.DEFAULT_SINGLE_PRICE_FORMATTED : b.DEFAULT_SINGLE_PRICE) : (x = n ? E.DEFAULT_PRICE_FORMATTED : E.DEFAULT_PRICE, L = n ? b.DEFAULT_PRICE_FORMATTED : b.DEFAULT_PRICE), V = h.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT;
366
- const A = $ || (r == null ? void 0 : r.priceOrientation) || "horizontal";
367
- return s === N.ORIENTATION.VERTICAL ? K(
368
- f,
362
+ const u = j[e].findIndex((V) => V.value === r), P = Z(r, e), I = (l == null ? void 0 : l.priceSinglePrice) ?? (c == null ? void 0 : c["data-product_price_control_single_price"]) === "1" ?? !1;
363
+ v = h.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[u >= 0 ? u : 0], F = h.PAIRS_FOR_EXTENSION.name[e].DEFAULT[u >= 0 ? u : 0];
364
+ const $ = h.PAIRS_FOR_EXTENSION.price[e], b = h.PAIRS_FOR_EXTENSION.originalPrice[e];
365
+ I ? (x = n ? $.DEFAULT_SINGLE_PRICE_FORMATTED : $.DEFAULT_SINGLE_PRICE, L = n ? b.DEFAULT_SINGLE_PRICE_FORMATTED : b.DEFAULT_SINGLE_PRICE) : (x = n ? $.DEFAULT_PRICE_FORMATTED : $.DEFAULT_PRICE, L = n ? b.DEFAULT_PRICE_FORMATTED : b.DEFAULT_PRICE), X = h.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT;
366
+ const A = E || (l == null ? void 0 : l.priceOrientation) || "horizontal", D = (l == null ? void 0 : l.priceHideDiscount) ?? M.productPriceHideDiscountControlValue === "1";
367
+ return s === N.ORIENTATION.VERTICAL ? B(
368
+ J,
369
369
  e,
370
370
  P,
371
371
  s,
@@ -374,18 +374,18 @@ function It({
374
374
  a,
375
375
  i,
376
376
  c,
377
- void 0,
377
+ String(D),
378
378
  // nodup
379
- r,
380
- p,
379
+ l,
380
+ o,
381
381
  t,
382
382
  A,
383
- o,
383
+ p,
384
384
  T,
385
385
  _,
386
386
  I
387
- ) : K(
388
- j,
387
+ ) : B(
388
+ C,
389
389
  e,
390
390
  P,
391
391
  s,
@@ -394,13 +394,13 @@ function It({
394
394
  a,
395
395
  i,
396
396
  c,
397
- void 0,
397
+ String(D),
398
398
  // nodup
399
- r,
400
- p,
399
+ l,
400
+ o,
401
401
  t,
402
402
  A,
403
- o,
403
+ p,
404
404
  T,
405
405
  _,
406
406
  I
@@ -0,0 +1,4 @@
1
+ var r = /* @__PURE__ */ ((o) => (o.BLOCK_BACKGROUND = "radio-button-block-background-color-control", o))(r || {});
2
+ export {
3
+ r as RadioButtonControlId
4
+ };
@@ -0,0 +1,6 @@
1
+ const O = "radio-button-block", _ = "radio-button-v2", o = `.${_}`;
2
+ export {
3
+ o as BLOCK_ROOT_SELECTOR,
4
+ O as CSS_CLASS_RADIO_BUTTON_BLOCK,
5
+ _ as CSS_CLASS_RADIO_BUTTON_BLOCK_V2
6
+ };
@@ -0,0 +1,10 @@
1
+ import { createBlockBackgroundColorControl as o } from "../../../controlFactories.js";
2
+ import { RadioButtonControlId as r } from "../../constants/controlIds.js";
3
+ import { BLOCK_ROOT_SELECTOR as t } from "../../constants/selectors.js";
4
+ const c = o(
5
+ r.BLOCK_BACKGROUND,
6
+ t
7
+ );
8
+ export {
9
+ c as RadioButtonBlockBackgroundControl
10
+ };
@@ -1,9 +1,10 @@
1
1
  import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { RadioButtonCustomBlock as t } from "./block.js";
3
3
  import { RadioButtonControl as i } from "./control.js";
4
- import { RadioButtonIconsRegistry as n } from "./iconsRegistry.js";
5
- import { RadioButtonBlockSettingsPanel as r } from "./settingsPanel.js";
6
- const l = new o().addBlock(t).withSettingsPanelRegistry(r).addControl(i).withIconsRegistry(n).build();
4
+ import { RadioButtonBlockBackgroundControl as n } from "./controls/blockBackground/index.js";
5
+ import { RadioButtonIconsRegistry as r } from "./iconsRegistry.js";
6
+ import { RadioButtonBlockSettingsPanel as d } from "./settingsPanel.js";
7
+ const u = new o().addBlock(t).withSettingsPanelRegistry(d).addControl(i).addControl(n).withIconsRegistry(r).build();
7
8
  export {
8
- l as default
9
+ u as default
9
10
  };
@@ -1,26 +1,27 @@
1
- import { SettingsPanelRegistry as r, SettingsPanelTab as t, SettingsTab as o, ContainerControls as e, TextControls as s } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { BLOCK_ID as T } from "./block.js";
3
- import { CONTROL_BLOCK_ID as i } from "./control.js";
4
- class a extends r {
5
- registerBlockControls(n) {
6
- n[T] = [
1
+ import { SettingsPanelRegistry as r, SettingsPanelTab as t, SettingsTab as o, ContainerControls as n } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { BLOCK_ID as i } from "./block.js";
3
+ import { RadioButtonControlId as s } from "./constants/controlIds.js";
4
+ import { CONTROL_BLOCK_ID as S } from "./control.js";
5
+ class B extends r {
6
+ registerBlockControls(e) {
7
+ e[i] = [
7
8
  new t(
8
9
  o.SETTINGS,
9
10
  [
10
- i,
11
- e.EXTERNAL_INDENTS,
12
- e.DISPLAY_CONDITIONS
11
+ S,
12
+ n.EXTERNAL_INDENTS,
13
+ n.DISPLAY_CONDITIONS
13
14
  ]
14
15
  ),
15
16
  new t(
16
17
  o.STYLES,
17
18
  [
18
- s.TEXT_BLOCK_BACKGROUND_COLOR
19
+ s.BLOCK_BACKGROUND
19
20
  ]
20
21
  )
21
22
  ];
22
23
  }
23
24
  }
24
25
  export {
25
- a as RadioButtonBlockSettingsPanel
26
+ B as RadioButtonBlockSettingsPanel
26
27
  };
@@ -1,11 +1,18 @@
1
1
  import { BlockType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { CSS_CLASS_RADIO_BUTTON_BLOCK as d, CSS_CLASS_RADIO_BUTTON_BLOCK_V2 as i } from "./constants/selectors.js";
2
3
  const e = {
3
4
  TITLE: "This is a title text",
4
5
  DESCRIPTION: "This is a description text",
5
6
  YES: "Yes",
6
7
  NO: "No"
7
- }, d = `
8
- <td align="left" class="radio-button-block radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
8
+ }, l = `
9
+ <td
10
+ align="left"
11
+ class="
12
+ ${d}
13
+ ${i}
14
+ esd-block-radio es-p10t es-p10b es-p30r es-p30l"
15
+ >
9
16
  <table cellpadding="0" cellspacing="0" role="presentation" width="100%">
10
17
  <tbody>
11
18
  <tr>
@@ -75,14 +82,14 @@ const e = {
75
82
  </tbody>
76
83
  </table>
77
84
  </td>
78
- `, l = `
85
+ `, n = `
79
86
  <td
80
87
  align="left"
81
88
  esd-extension-block-id="radio-button-block"
82
89
  esd-handler-name="esd-extension-RadioButtonBlock"
83
90
  class="
84
- radio-button-block
85
- radio-button-v2
91
+ ${d}
92
+ ${i}
86
93
  esd-block-ra
87
94
  esd-radio-button-block
88
95
  esd-extension-block
@@ -149,10 +156,10 @@ const e = {
149
156
  </table>
150
157
  </td>
151
158
  `;
152
- function a() {
153
- return d.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`).replace("{-{-YES-}-}", `<p path="1">${e.YES}</p>`).replace("{-{-NO-}-}", `<p path="1">${e.NO}</p>`);
159
+ function p() {
160
+ return l.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`).replace("{-{-YES-}-}", `<p path="1">${e.YES}</p>`).replace("{-{-NO-}-}", `<p path="1">${e.NO}</p>`);
154
161
  }
155
162
  export {
156
- l as default,
157
- a as getDefaultTemplate
163
+ n as default,
164
+ p as getDefaultTemplate
158
165
  };
@@ -1,11 +1,11 @@
1
- const c = ".recommendation-block-v2", t = ".ins-recommendation-product-container", o = ".ins-recommendation-desktop-container", n = ".ins-recommendation-mobile-container", _ = ".ins-recommendation-mobile-row", r = "reco-v3-button", R = "ins-skip-compile", e = {
1
+ const t = ".recommendation-block-v2", c = ".ins-recommendation-product-container", o = ".ins-recommendation-desktop-container", n = ".ins-recommendation-mobile-container", _ = ".ins-recommendation-mobile-row", R = "reco-v3-button", r = "ins-skip-compile", e = {
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
- }, O = "productImage", s = "productName", E = "productPrice", i = "productOldPrice", A = "productOmnibusPrice", C = "productOmnibusDiscount", u = "productButton", I = "customAttr:", S = "data-custom-attributes", m = "product-attr", U = "product_attribute.", T = /* @__PURE__ */ new Set([
8
+ }, O = "productImage", A = "productName", s = "productPrice", E = "productOldPrice", i = "productOmnibusPrice", C = "productOmnibusDiscount", u = "productButton", a = "customAttr:", I = "data-custom-attributes", S = "data-card-composition", m = "product-attr", U = ".recommendation-attribute-row", d = "data-attribute-type", N = "product_attribute.", T = /* @__PURE__ */ new Set([
9
9
  "name",
10
10
  // productName
11
11
  "price",
@@ -20,31 +20,34 @@ const c = ".recommendation-block-v2", t = ".ins-recommendation-product-container
20
20
  // productOmnibusPrice
21
21
  "omnibus_discount"
22
22
  // productOmnibusDiscount
23
- ]), a = /* @__PURE__ */ new Set([
23
+ ]), P = /* @__PURE__ */ new Set([
24
24
  ...T,
25
25
  "currency",
26
26
  "discount"
27
27
  ]);
28
28
  export {
29
- I as ATTR_CUSTOM_PREFIX,
30
- S as ATTR_DATA_CUSTOM_ATTRIBUTES,
29
+ a as ATTR_CUSTOM_PREFIX,
30
+ d as ATTR_DATA_ATTRIBUTE_TYPE,
31
+ S as ATTR_DATA_CARD_COMPOSITION,
32
+ I as ATTR_DATA_CUSTOM_ATTRIBUTES,
31
33
  m as ATTR_PRODUCT_ATTR,
32
34
  u as ATTR_PRODUCT_BUTTON,
33
35
  O as ATTR_PRODUCT_IMAGE,
34
- s as ATTR_PRODUCT_NAME,
35
- i as ATTR_PRODUCT_OLD_PRICE,
36
+ A as ATTR_PRODUCT_NAME,
37
+ E as ATTR_PRODUCT_OLD_PRICE,
36
38
  C as ATTR_PRODUCT_OMNIBUS_DISCOUNT,
37
- A as ATTR_PRODUCT_OMNIBUS_PRICE,
38
- E as ATTR_PRODUCT_PRICE,
39
- c as BLOCK_ROOT_SELECTOR,
39
+ i as ATTR_PRODUCT_OMNIBUS_PRICE,
40
+ s as ATTR_PRODUCT_PRICE,
41
+ t as BLOCK_ROOT_SELECTOR,
40
42
  T as BUILT_IN_DEFAULT_ATTRIBUTES,
41
- t as CONTAINER_SELECTOR,
42
- r as CSS_CLASS_RECO_BUTTON,
43
- R as CSS_CLASS_SKIP_COMPILE,
43
+ c as CONTAINER_SELECTOR,
44
+ R as CSS_CLASS_RECO_BUTTON,
45
+ r as CSS_CLASS_SKIP_COMPILE,
44
46
  e as CURRENCY_ATTR,
45
47
  o as DESKTOP_CONTAINER_SELECTOR,
46
48
  n as MOBILE_CONTAINER_SELECTOR,
47
49
  _ as MOBILE_ROW_SELECTOR,
48
- U as PRODUCT_ATTRIBUTE_PREFIX,
49
- a as RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES
50
+ N as PRODUCT_ATTRIBUTE_PREFIX,
51
+ P as RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES,
52
+ U as SELECTOR_ATTRIBUTE_ROW
50
53
  };
@@ -1,7 +1,7 @@
1
1
  import { ModificationDescription as d } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { CommonControl as s } from "../../../common-control.js";
3
3
  import { getCurrentLayout as l } from "../main/utils.js";
4
- const i = "recommendation-card-background-color-control", e = {
4
+ const u = "recommendation-card-background-color-control", e = {
5
5
  CARD_BACKGROUND_COLOR: "cardBackgroundColor"
6
6
  }, a = {
7
7
  GRID: ".product-card-segment",
@@ -9,17 +9,13 @@ const i = "recommendation-card-background-color-control", e = {
9
9
  };
10
10
  class _ extends s {
11
11
  getId() {
12
- return i;
12
+ return u;
13
13
  }
14
14
  getTemplate() {
15
- return `
16
- <div class="card-bg-control-container">
17
- ${this._GuTwoColumns([
15
+ return this._GuTwoColumns([
18
16
  this._GuLabel({ text: this.api.translate("Card Background Color") }),
19
17
  this._GuColorPicker(e.CARD_BACKGROUND_COLOR)
20
- ])}
21
- </div>
22
- `;
18
+ ]);
23
19
  }
24
20
  onRender() {
25
21
  this._setFormValues(), this._listenToFormUpdates();
@@ -75,6 +71,6 @@ class _ extends s {
75
71
  }
76
72
  }
77
73
  export {
78
- i as CARD_BACKGROUND_COLOR_CONTROL_ID,
74
+ u as CARD_BACKGROUND_COLOR_CONTROL_ID,
79
75
  _ as CardBackgroundColorControl
80
76
  };