@useinsider/guido 3.16.0-beta.9e5f533 → 3.16.0-beta.ca26c4e

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 (33) hide show
  1. package/dist/config/migrator/index.js +8 -9
  2. package/dist/config/migrator/itemsBlockMigrator.js +1 -1
  3. package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
  4. package/dist/config/migrator/recommendation/extractors.js +24 -29
  5. package/dist/config/migrator/recommendation/htmlBuilder.js +130 -116
  6. package/dist/config/migrator/recommendationMigrator.js +15 -18
  7. package/dist/enums/recommendation.js +17 -17
  8. package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -45
  9. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
  10. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  11. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +22 -23
  12. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +26 -29
  13. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +152 -203
  14. package/dist/extensions/Blocks/Recommendation/extension.js +29 -31
  15. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +4 -23
  16. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
  17. package/dist/extensions/Blocks/Recommendation/templates/utils.js +107 -85
  18. package/dist/src/config/migrator/recommendation/extractors.d.ts +0 -8
  19. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +1 -2
  20. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +0 -7
  21. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -1
  22. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  23. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -4
  24. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +0 -7
  25. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -1
  26. package/dist/static/styles/customEditorStyle.css.js +1 -3
  27. package/package.json +1 -1
  28. package/dist/config/migrator/recommendationTitleMigrator.js +0 -112
  29. package/dist/extensions/Blocks/Recommendation/controls/title/index.js +0 -44
  30. package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +0 -33
  31. package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +0 -1
  32. package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +0 -86
  33. package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +0 -13
@@ -5,24 +5,23 @@ import { RecommendationBlockControl as i } from "./controls/main/index.js";
5
5
  import "./constants/selectors.js";
6
6
  import "./store/recommendation.js";
7
7
  import "./utils/captureStyleTemplates.js";
8
- import { TitleControls as e } from "./controls/title/index.js";
9
- import { NameControls as l } from "./controls/name/index.js";
10
- import { PriceControls as s } from "./controls/price/index.js";
11
- import { OldPriceControls as p } from "./controls/oldPrice/index.js";
12
- import { OmnibusPriceControls as a } from "./controls/omnibusPrice/index.js";
13
- import { OmnibusDiscountControls as c } from "./controls/omnibusDiscount/index.js";
14
- import { ButtonControls as C } from "./controls/button/index.js";
15
- import { ImageControls as f } from "./controls/image/index.js";
16
- import { CustomAttributeControls as d } from "./controls/customAttribute/index.js";
17
- import { SpacingControl as u } from "./controls/spacing/index.js";
18
- import { BlockBackgroundColorControl as g } from "./controls/blockBackground/index.js";
19
- import { CardBackgroundColorControl as y } from "./controls/cardBackground/index.js";
20
- import { RecommendationCardCompositionControl as B } from "./controls/cardComposition/index.js";
21
- import { SyncInfoMessageControl as P } from "./controls/syncInfoMessage.js";
22
- import { RecommendationIconsRegistry as R } from "./iconsRegistry.js";
23
- import S from "./recommendation.css.js";
24
- import { SettingsPanel as k } from "./settingsPanel.js";
25
- const w = [
8
+ import { NameControls as e } from "./controls/name/index.js";
9
+ import { PriceControls as l } from "./controls/price/index.js";
10
+ import { OldPriceControls as s } from "./controls/oldPrice/index.js";
11
+ import { OmnibusPriceControls as p } from "./controls/omnibusPrice/index.js";
12
+ import { OmnibusDiscountControls as a } from "./controls/omnibusDiscount/index.js";
13
+ import { ButtonControls as c } from "./controls/button/index.js";
14
+ import { ImageControls as C } from "./controls/image/index.js";
15
+ import { CustomAttributeControls as f } from "./controls/customAttribute/index.js";
16
+ import { SpacingControl as d } from "./controls/spacing/index.js";
17
+ import { BlockBackgroundColorControl as u } from "./controls/blockBackground/index.js";
18
+ import { CardBackgroundColorControl as g } from "./controls/cardBackground/index.js";
19
+ import { RecommendationCardCompositionControl as y } from "./controls/cardComposition/index.js";
20
+ import { SyncInfoMessageControl as B } from "./controls/syncInfoMessage.js";
21
+ import { RecommendationIconsRegistry as P } from "./iconsRegistry.js";
22
+ import R from "./recommendation.css.js";
23
+ import { SettingsPanel as S } from "./settingsPanel.js";
24
+ const k = [
26
25
  e,
27
26
  l,
28
27
  s,
@@ -30,22 +29,21 @@ const w = [
30
29
  a,
31
30
  c,
32
31
  C,
33
- f,
34
- d
35
- ], b = [
32
+ f
33
+ ], w = [
36
34
  i,
35
+ u,
37
36
  g,
37
+ d,
38
38
  y,
39
- u,
40
- B,
41
- P
42
- ], v = [
43
- ...b,
44
- ...w.flatMap((o) => Object.values(o))
45
- ], Y = v.reduce(
39
+ B
40
+ ], b = [
41
+ ...w,
42
+ ...k.flatMap((o) => Object.values(o))
43
+ ], W = b.reduce(
46
44
  (o, r) => o.addControl(r),
47
- new t().addBlock(m).withSettingsPanelRegistry(k)
48
- ).addStyles(S).withPreviewStyles(n).withIconsRegistry(R).build();
45
+ new t().addBlock(m).withSettingsPanelRegistry(S)
46
+ ).addStyles(R).withPreviewStyles(n).withIconsRegistry(P).build();
49
47
  export {
50
- Y as default
48
+ W as default
51
49
  };
@@ -3,10 +3,9 @@ import { BLOCK_ID as R } from "./block.js";
3
3
  import { RecommendationBlockId as S } from "./constants/blockIds.js";
4
4
  import { RecommendationControlId as T } from "./constants/controlIds.js";
5
5
  import "./constants/selectors.js";
6
- import { CONTROL_BLOCK_ID as L } from "./controls/main/index.js";
6
+ import { CONTROL_BLOCK_ID as U } from "./controls/main/index.js";
7
7
  import "./store/recommendation.js";
8
8
  import "./utils/captureStyleTemplates.js";
9
- import "./controls/title/index.js";
10
9
  import "./controls/name/index.js";
11
10
  import "./controls/price/index.js";
12
11
  import "./controls/oldPrice/index.js";
@@ -16,7 +15,7 @@ import "./controls/button/index.js";
16
15
  import "./controls/image/index.js";
17
16
  import { SPACING_CONTROL_ID as A } from "./controls/spacing/index.js";
18
17
  import "./controls/blockBackground/index.js";
19
- import { CARD_BACKGROUND_COLOR_CONTROL_ID as U } from "./controls/cardBackground/index.js";
18
+ import { CARD_BACKGROUND_COLOR_CONTROL_ID as L } from "./controls/cardBackground/index.js";
20
19
  import { COMPOSITION_CONTROL_BLOCK_ID as D } from "./controls/cardComposition/index.js";
21
20
  import { SYNC_INFO_MESSAGE_CONTROL_ID as N } from "./controls/syncInfoMessage.js";
22
21
  class s extends E {
@@ -25,7 +24,7 @@ class s extends E {
25
24
  new _(
26
25
  I.SETTINGS,
27
26
  [
28
- L,
27
+ U,
29
28
  C.EXTERNAL_INDENTS
30
29
  ]
31
30
  ),
@@ -33,7 +32,7 @@ class s extends E {
33
32
  I.STYLES,
34
33
  [
35
34
  T.BLOCK_BACKGROUND,
36
- U,
35
+ L,
37
36
  A
38
37
  ]
39
38
  ),
@@ -43,24 +42,6 @@ class s extends E {
43
42
  D
44
43
  ]
45
44
  ).withLabel(this.api.translate("Card Composition"))
46
- ], O[S.TITLE] = [
47
- new _(
48
- I.SETTINGS,
49
- [
50
- T.TITLE_STYLE,
51
- T.TITLE_ALIGN,
52
- T.TITLE_PADDINGS
53
- ]
54
- ),
55
- new _(
56
- I.STYLES,
57
- [
58
- T.TITLE_BACKGROUND,
59
- T.TITLE_FONT_FAMILY,
60
- T.TITLE_SIZE,
61
- T.TITLE_COLOR
62
- ]
63
- )
64
45
  ], O[S.NAME] = [
65
46
  new _(
66
47
  I.SETTINGS,
@@ -1,6 +1,6 @@
1
1
  import { ATTR_PRODUCT_PRICE as f, ATTR_PRODUCT_OLD_PRICE as O } from "../../constants/selectors.js";
2
2
  import { DEFAULT_PRODUCTS_PER_ROW as w } from "../../constants/layout.js";
3
- import { createBlockTemplate as A, getDefaultProducts as g, DEFAULTS as U, buildSpacer as h, DEFAULT_CARD_COMPOSITION as Y, buildElementRenderer as B, resolveInlinePriceOrder as F, buildCellOptions as I, DEFAULT_CARD_VISIBILITY as W } from "../utils.js";
3
+ import { getDefaultProducts as A, DEFAULTS as g, createBlockTemplate as U, buildSpacer as h, DEFAULT_CARD_COMPOSITION as Y, buildElementRenderer as B, resolveInlinePriceOrder as F, buildCellOptions as I, DEFAULT_CARD_VISIBILITY as W } from "../utils.js";
4
4
  import { DEFAULT_CELL_PADDING as k, renderInlineGridPriceCell as H, buildFillerCell as x, gridElementRenderer as y } from "./elementRenderer.js";
5
5
  const G = `
6
6
  <tr class="recommendation-product-row">
@@ -69,8 +69,8 @@ function M(t, r, o, e = {}, c = {}) {
69
69
  );
70
70
  }
71
71
  function Q(t) {
72
- const r = t ? `ins-recommendation-v3-block-${t}` : void 0, o = A("grid", r), e = g(), c = M(e, w);
73
- return o.replace("{-{-TITLE-}-}", U.TITLE).replace("{-{-PRODUCT_ROWS-}-}", c).replace("{-{-MOBILE_PRODUCT_ROWS-}-}", "");
72
+ const r = t ? `ins-recommendation-v3-block-${t}` : void 0, o = U("grid", r), e = A(), c = M(e, w);
73
+ return o.replace("{-{-TITLE-}-}", g.TITLE).replace("{-{-PRODUCT_ROWS-}-}", c).replace("{-{-MOBILE_PRODUCT_ROWS-}-}", "");
74
74
  }
75
75
  export {
76
76
  Q as getDefaultTemplate,
@@ -1,9 +1,8 @@
1
- import { ATTR_PRODUCT_PRICE as l, ATTR_PRODUCT_OLD_PRICE as a, ATTR_CUSTOM_PREFIX as T, ATTR_PRODUCT_IMAGE as b, ATTR_PRODUCT_NAME as _, ATTR_PRODUCT_OMNIBUS_PRICE as C, ATTR_PRODUCT_OMNIBUS_DISCOUNT as A, ATTR_PRODUCT_BUTTON as p, PRODUCT_ATTRIBUTE_PREFIX as I } from "../constants/selectors.js";
1
+ import { ATTR_PRODUCT_PRICE as l, ATTR_PRODUCT_OLD_PRICE as a, ATTR_CUSTOM_PREFIX as T, ATTR_PRODUCT_IMAGE as m, ATTR_PRODUCT_NAME as C, ATTR_PRODUCT_OMNIBUS_PRICE as _, ATTR_PRODUCT_OMNIBUS_DISCOUNT as p, ATTR_PRODUCT_BUTTON as y, PRODUCT_ATTRIBUTE_PREFIX as I } from "../constants/selectors.js";
2
2
  import { useRecommendationExtensionStore as L } from "../store/recommendation.js";
3
- import { compositionKeyToProductAttr as y, isDefaultProductAttr as f, bareAttributeName as S, findFilterByBareName as $, productAttrToCompositionKey as P } from "../utils/compositionKeys.js";
3
+ import { compositionKeyToProductAttr as A, isDefaultProductAttr as b, bareAttributeName as S, findFilterByBareName as $, productAttrToCompositionKey as h } from "../utils/compositionKeys.js";
4
4
  import { formatPrice as B } from "../utils/priceFormatter.js";
5
- import { buildTitleRows as k } from "./titleRows.js";
6
- function x() {
5
+ function k() {
7
6
  const t = L(), { currencySettings: e } = t.recommendationConfigs;
8
7
  return {
9
8
  code: e.value,
@@ -14,17 +13,17 @@ function x() {
14
13
  thousandSeparator: e.thousandSeparator
15
14
  };
16
15
  }
17
- function m(t, e = "price") {
18
- const o = x(), n = t[e], c = (n == null ? void 0 : n[o.code]) ?? Object.values(n ?? {})[0] ?? 0;
16
+ function f(t, e = "price") {
17
+ const o = k(), n = t[e], c = (n == null ? void 0 : n[o.code]) ?? Object.values(n ?? {})[0] ?? 0;
19
18
  return B({
20
19
  price: c,
21
20
  currency: o
22
21
  });
23
22
  }
24
23
  function q(t) {
25
- return m(t, "price") === m(t, "original_price");
24
+ return f(t, "price") === f(t, "original_price");
26
25
  }
27
- function N(t) {
26
+ function x(t) {
28
27
  return t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
29
28
  }
30
29
  function J(t) {
@@ -35,114 +34,115 @@ function J(t) {
35
34
  skip: n ? l : a
36
35
  };
37
36
  }
38
- function F(t) {
37
+ function N(t) {
39
38
  const e = Array.isArray(t) ? t[t.length - 1] : t;
40
39
  if (typeof e == "string")
41
40
  return e;
42
41
  if (typeof e == "number")
43
42
  return String(e);
44
43
  }
45
- function v(t, e) {
44
+ function w(t, e) {
46
45
  var o;
47
46
  return ((o = $(t, e)) == null ? void 0 : o.type) === "defaultAttribute";
48
47
  }
49
- function w(t, e) {
50
- return v(t, e) ? t : `${I}${t}`;
48
+ function F(t, e) {
49
+ return w(t, e) ? t : `${I}${t}`;
51
50
  }
52
51
  function Q(t) {
53
- return P(t);
52
+ return h(t);
54
53
  }
55
- const M = Symbol("customCellHtml");
54
+ const v = Symbol("customCellHtml");
56
55
  function Z(t, e, o = {}) {
57
- const n = t[M];
56
+ const n = t[v];
58
57
  if (!n)
59
58
  return { ...t };
60
59
  const c = { ...t };
61
- return e.filter((i) => i.startsWith(T) && !c[i]).forEach((i) => {
62
- const s = y(i), r = f(s) ? w(s, o) : s, u = S(r), h = N(u), D = f(r);
63
- c[i] = (d, U) => {
60
+ return e.filter((s) => s.startsWith(T) && !c[s]).forEach((s) => {
61
+ const i = A(s), r = b(i) ? F(i, o) : i, u = S(r), R = x(u), D = b(r);
62
+ c[s] = (d, U) => {
64
63
  var g;
65
- const O = D ? d[u] : (g = d.product_attributes) == null ? void 0 : g[u], E = F(O) ?? h;
66
- return n(r, E, U);
64
+ const E = D ? d[u] : (g = d.product_attributes) == null ? void 0 : g[u], O = N(E) ?? R;
65
+ return n(r, O, U);
67
66
  };
68
67
  }), c;
69
68
  }
70
69
  function tt(t, e, o = []) {
71
- const n = t.startsWith(T) ? P(S(y(t))) : t, i = n !== t && !o.includes(n) ? n : t, s = (r) => (r == null ? void 0 : r[t]) ?? (r == null ? void 0 : r[i]);
70
+ const n = t.startsWith(T) ? h(S(A(t))) : t, s = n !== t && !o.includes(n) ? n : t, i = (r) => (r == null ? void 0 : r[t]) ?? (r == null ? void 0 : r[s]);
72
71
  return {
73
72
  cellPadding: e.cellPadding,
74
73
  cardBackgroundColor: e.cardBackgroundColor,
75
- cellBackgroundColor: s(e.cellBackgroundColors),
76
- cellAlignment: s(e.cellAlignments),
77
- cellClasses: s(e.cellClasses),
78
- omnibusText: s(e.omnibusTexts),
79
- styleTemplate: s(e.styleTemplates)
74
+ cellBackgroundColor: i(e.cellBackgroundColors),
75
+ cellAlignment: i(e.cellAlignments),
76
+ cellClasses: i(e.cellClasses),
77
+ omnibusText: i(e.omnibusTexts),
78
+ styleTemplate: i(e.styleTemplates)
80
79
  };
81
80
  }
82
81
  const et = {
83
82
  TITLE: "You May Also Like!"
84
83
  }, ot = [
85
- b,
86
- _,
84
+ m,
85
+ C,
87
86
  a,
88
87
  l,
89
- C,
90
- A,
91
- p
88
+ _,
89
+ p,
90
+ y
92
91
  ], nt = {
93
- [b]: !0,
94
- [_]: !0,
92
+ [m]: !0,
93
+ [C]: !0,
95
94
  [l]: !0,
96
95
  [a]: !0,
97
- [C]: !1,
98
- [A]: !1,
99
- [p]: !0
100
- }, W = 10;
101
- function rt(t = W) {
96
+ [_]: !1,
97
+ [p]: !1,
98
+ [y]: !0
99
+ }, M = 10;
100
+ function W(t = M) {
102
101
  return `
103
102
  <tr>
104
103
  <td class="spacer" style="height: ${t}px;"></td>
105
104
  </tr>
106
105
  `;
107
106
  }
108
- function H(t, e) {
107
+ const H = W();
108
+ function V(t, e) {
109
109
  return e ? e.pStyle ?? "" : t;
110
110
  }
111
- function it(t, e, o) {
112
- const n = H(e.pStyle, o), c = o ? o.openTags ?? "" : e.openTags, i = o ? o.closeTags ?? "" : e.closeTags;
113
- return `<p contenteditable="false" style="${n}">${c}${t}${i}</p>`;
111
+ function rt(t, e, o) {
112
+ const n = V(e.pStyle, o), c = o ? o.openTags ?? "" : e.openTags, s = o ? o.closeTags ?? "" : e.closeTags;
113
+ return `<p contenteditable="false" style="${n}">${c}${t}${s}</p>`;
114
114
  }
115
115
  function st(t, e) {
116
116
  const o = [];
117
117
  return t && o.push(t), e && o.push(`background-color: ${e};`), o.join(" ");
118
118
  }
119
- function V(t) {
119
+ function Y(t) {
120
120
  return t ? ` background-color: ${t};` : "";
121
121
  }
122
- function ct(t) {
123
- const e = V(t);
122
+ function it(t) {
123
+ const e = Y(t);
124
124
  return e ? ` style="${e.trim()}"` : "";
125
125
  }
126
- function lt(t, e = "") {
126
+ function ct(t, e = "") {
127
127
  return {
128
128
  before: (t == null ? void 0 : t.before) ?? e,
129
129
  after: (t == null ? void 0 : t.after) ?? ""
130
130
  };
131
131
  }
132
- function at(t, e) {
132
+ function lt(t, e) {
133
133
  return `${(e == null ? void 0 : e.openTags) ?? ""}${t}${(e == null ? void 0 : e.closeTags) ?? ""}`;
134
134
  }
135
- function ut(t) {
135
+ function at(t) {
136
136
  return t != null && t.buttonFitToContainer ? "es-button-border es-fw" : "es-button-border";
137
137
  }
138
- const dt = "display: block; max-width: 100%; height: auto;", gt = "border-width: 1px; background: rgb(217, 234, 211); border-color: rgb(106, 168, 79);", ft = "color: rgb(56, 118, 29); background: rgb(217, 234, 211); font-family: arial, 'helvetica neue', helvetica, sans-serif; font-size: 16px; font-weight: normal; line-height: 120%; mso-border-alt: 10px solid rgb(217, 234, 211); mso-padding-alt: 0;", R = "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png";
139
- function mt(t) {
140
- return !t || typeof t != "string" || t.trim() === "" ? R : t.startsWith("http://") ? t.replace("http://", "https://") : t;
138
+ const ut = "display: block; max-width: 100%; height: auto;", dt = "border-width: 1px; background: rgb(217, 234, 211); border-color: rgb(106, 168, 79);", gt = "color: rgb(56, 118, 29); background: rgb(217, 234, 211); font-family: arial, 'helvetica neue', helvetica, sans-serif; font-size: 16px; font-weight: normal; line-height: 120%; mso-border-alt: 10px solid rgb(217, 234, 211); mso-padding-alt: 0;", P = "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png";
139
+ function bt(t) {
140
+ return !t || typeof t != "string" || t.trim() === "" ? P : t.startsWith("http://") ? t.replace("http://", "https://") : t;
141
141
  }
142
- function Y(t) {
142
+ function G(t) {
143
143
  return {
144
144
  name: "Product Name",
145
- image_url: R,
145
+ image_url: P,
146
146
  price: { USD: 18 },
147
147
  original_price: { USD: 20 },
148
148
  discount: { USD: 2 },
@@ -154,20 +154,19 @@ function Y(t) {
154
154
  category: []
155
155
  };
156
156
  }
157
- function Tt(t = 6) {
157
+ function ft(t = 6) {
158
158
  return Array.from(
159
159
  { length: t },
160
- (e, o) => Y(String(o + 1))
160
+ (e, o) => G(String(o + 1))
161
161
  );
162
162
  }
163
- function bt(t = "grid", e) {
163
+ function Tt(t = "grid", e) {
164
164
  const o = t === "list" ? `
165
- data-layout="list"` : "", n = e ? ` ${e}` : "", i = `recommendation-block-v2 esd-block-recommendation-v3-block es-p20${t === "list" ? " es-m-p0 ins-recommendation-list-layout" : ""}${n}`, s = t === "list" ? "" : `
166
- {-{-MOBILE_PRODUCT_ROWS-}-}`, r = t === "list" ? ' style="display: none;"' : "";
165
+ data-layout="list"` : "", n = e ? ` ${e}` : "";
167
166
  return `
168
167
  <td
169
168
  align="left"
170
- class="${i}"${o}>
169
+ class="${`recommendation-block-v2 esd-block-recommendation-v3-block es-p20${t === "list" ? " es-m-p0 ins-recommendation-list-layout" : ""}${n}`}"${o}>
171
170
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
172
171
  <tr>
173
172
  <td align="center">
@@ -178,7 +177,28 @@ function bt(t = "grid", e) {
178
177
  cellspacing="0"
179
178
  border="0">
180
179
  <tbody>
181
- ${k()}
180
+ <tr>
181
+ <td>
182
+ <table
183
+ width="100%"
184
+ cellpadding="0"
185
+ cellspacing="0"
186
+ border="0">
187
+ <tbody>
188
+ <tr>
189
+ <td
190
+ class="esd-block-text es-p10t es-p10b es-p20l es-p20r"
191
+ align="center">
192
+ <p style="font-size: 28px; color: #333333;">
193
+ <strong>{-{-TITLE-}-}</strong>
194
+ </p>
195
+ </td>
196
+ </tr>
197
+ </tbody>
198
+ </table>
199
+ </td>
200
+ </tr>
201
+ ${H}
182
202
  <tr>
183
203
  <td>
184
204
  <table
@@ -193,7 +213,7 @@ function bt(t = "grid", e) {
193
213
  </table>
194
214
  </td>
195
215
  </tr>
196
- <tr class="ins-recommendation-mobile-row"${r}>
216
+ <tr class="ins-recommendation-mobile-row"${t === "list" ? ' style="display: none;"' : ""}>
197
217
  <td>
198
218
  <table
199
219
  class="ins-recommendation-product-container
@@ -203,7 +223,8 @@ function bt(t = "grid", e) {
203
223
  cellspacing="0"
204
224
  border="0"
205
225
  style="display: none;"
206
- >${s}
226
+ >${t === "list" ? "" : `
227
+ {-{-MOBILE_PRODUCT_ROWS-}-}`}
207
228
  </table>
208
229
  </td>
209
230
  </tr>
@@ -216,36 +237,37 @@ function bt(t = "grid", e) {
216
237
  `;
217
238
  }
218
239
  export {
219
- M as CUSTOM_CELL_HTML,
240
+ v as CUSTOM_CELL_HTML,
220
241
  et as DEFAULTS,
221
- ft as DEFAULT_BUTTON_ANCHOR_STYLE,
222
- gt as DEFAULT_BUTTON_BORDER_STYLE,
242
+ gt as DEFAULT_BUTTON_ANCHOR_STYLE,
243
+ dt as DEFAULT_BUTTON_BORDER_STYLE,
223
244
  ot as DEFAULT_CARD_COMPOSITION,
224
245
  nt as DEFAULT_CARD_VISIBILITY,
225
- dt as DEFAULT_IMG_STYLE,
226
- W as DEFAULT_ROW_SPACING_PX,
227
- R as PLACEHOLDER_IMAGE,
228
- V as bgColorFragment,
246
+ ut as DEFAULT_IMG_STYLE,
247
+ M as DEFAULT_ROW_SPACING_PX,
248
+ P as PLACEHOLDER_IMAGE,
249
+ Y as bgColorFragment,
229
250
  tt as buildCellOptions,
230
251
  Z as buildElementRenderer,
231
- rt as buildSpacer,
232
- ct as cellBgStyleAttr,
233
- bt as createBlockTemplate,
234
- m as formatProductPrice,
235
- x as getCurrentCurrencyConfig,
236
- Tt as getDefaultProducts,
237
- v as isDefaultAttribute,
252
+ W as buildSpacer,
253
+ it as cellBgStyleAttr,
254
+ Tt as createBlockTemplate,
255
+ f as formatProductPrice,
256
+ k as getCurrentCurrencyConfig,
257
+ ft as getDefaultProducts,
258
+ w as isDefaultAttribute,
238
259
  q as isSamePrice,
239
- at as renderButtonLabel,
240
- it as renderStyledParagraph,
241
- ut as resolveButtonBorderClass,
260
+ lt as renderButtonLabel,
261
+ rt as renderStyledParagraph,
262
+ at as resolveButtonBorderClass,
242
263
  J as resolveInlinePriceOrder,
243
- lt as resolveOmnibusText,
244
- H as resolvePStyle,
245
- w as resolveProductAttrValue,
264
+ ct as resolveOmnibusText,
265
+ V as resolvePStyle,
266
+ F as resolveProductAttrValue,
246
267
  st as resolveSegmentBgStyle,
247
- mt as sanitizeImageUrl,
268
+ bt as sanitizeImageUrl,
269
+ H as spacer,
248
270
  Q as toCustomCompositionKey,
249
- N as toDisplayName,
250
- F as toDisplayableAttributeValue
271
+ x as toDisplayName,
272
+ N as toDisplayableAttributeValue
251
273
  };
@@ -1,12 +1,4 @@
1
1
  export declare function extractTitleText(block: Element): string;
2
- /**
3
- * Fallback for legacy configs that carry no `p_recommendation_title` variable:
4
- * the rendered HTML decides. A missing or `display: none` title container means
5
- * the user never saw a title, so the migrated block keeps it toggled off.
6
- * @param block - The legacy recommendation block element
7
- * @returns True when the legacy block renders a visible title
8
- */
9
- export declare function hasVisibleTitle(block: Element): boolean;
10
2
  /**
11
3
  * Card background lives on either the block (`bgcolor`/`style`) or per-card
12
4
  * cells (`.product-card`). Returns empty string when no background is set —
@@ -10,6 +10,5 @@ export declare enum RecommendationBlockId {
10
10
  OMNIBUS_PRICE = "recommendation-block-omnibus-price",
11
11
  OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount",
12
12
  IMAGE = "recommendation-block-image",
13
- CUSTOM_ATTRIBUTE = "recommendation-block-custom-attribute",
14
- TITLE = "recommendation-block-title"
13
+ CUSTOM_ATTRIBUTE = "recommendation-block-custom-attribute"
15
14
  }
@@ -65,12 +65,5 @@ export declare enum RecommendationControlId {
65
65
  CUSTOM_ATTR_SIZE = "recommendation-block-custom-attr-size-control",
66
66
  CUSTOM_ATTR_STYLE = "recommendation-block-custom-attr-style-control",
67
67
  CUSTOM_ATTR_TEXT_TRIM = "recommendation-block-custom-attr-text-trim-control",
68
- TITLE_ALIGN = "recommendation-block-title-align-control",
69
- TITLE_BACKGROUND = "recommendation-block-title-background-control",
70
- TITLE_COLOR = "recommendation-block-title-color-control",
71
- TITLE_FONT_FAMILY = "recommendation-block-title-font-family-control",
72
- TITLE_PADDINGS = "recommendation-block-title-paddings-control",
73
- TITLE_SIZE = "recommendation-block-title-size-control",
74
- TITLE_STYLE = "recommendation-block-title-style-control",
75
68
  SYNC_INFO_MESSAGE = "recommendation-block-sync-info-message"
76
69
  }
@@ -32,7 +32,6 @@ export declare const DEFAULT_COMPOSITION: string[];
32
32
  /**
33
33
  * Default visibility settings for card elements
34
34
  * Omnibus elements are hidden by default (not all regions require them)
35
- * The block-level title is visible on a fresh drop.
36
35
  */
37
36
  export declare const DEFAULT_VISIBILITY: Record<string, boolean>;
38
37
  /**
@@ -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, CSS_CLASS_RECO_BUTTON, CSS_CLASS_SKIP_COMPILE, RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES, 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_RECOMMENDATION_TITLE, SELECTOR_TITLE_CELL, ATTR_CUSTOM_PREFIX, ATTR_DATA_CARD_COMPOSITION, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, SELECTOR_ATTRIBUTE_ROW, ATTR_DATA_ATTRIBUTE_TYPE, PRODUCT_ATTRIBUTE_PREFIX, 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, CSS_CLASS_SKIP_COMPILE, RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES, 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_CARD_COMPOSITION, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, SELECTOR_ATTRIBUTE_ROW, ATTR_DATA_ATTRIBUTE_TYPE, PRODUCT_ATTRIBUTE_PREFIX, 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';
@@ -58,10 +58,6 @@ export declare const ATTR_PRODUCT_OLD_PRICE = "productOldPrice";
58
58
  export declare const ATTR_PRODUCT_OMNIBUS_PRICE = "productOmnibusPrice";
59
59
  export declare const ATTR_PRODUCT_OMNIBUS_DISCOUNT = "productOmnibusDiscount";
60
60
  export declare const ATTR_PRODUCT_BUTTON = "productButton";
61
- export declare const ATTR_RECOMMENDATION_TITLE = "recommendationTitle";
62
- export declare const CSS_CLASS_TITLE_CELL = "ins-recommendation-title";
63
- /** Title cell — the only `esd-block-text` living outside the product containers. */
64
- export declare const SELECTOR_TITLE_CELL = ".ins-recommendation-title";
65
61
  /**
66
62
  * Custom attribute constants
67
63
  * Used for dynamically added product attributes in Card Composition
@@ -33,8 +33,6 @@ export declare class RecommendationCardCompositionControl extends CommonControl
33
33
  private _normalizeComposition;
34
34
  private _readCustomAttributesFromNode;
35
35
  private _readVisibilityFromRows;
36
- private _withTitlePresence;
37
- private _hasTitle;
38
36
  private _getDefaultVisibilities;
39
37
  private _extractVisibilityFromRows;
40
38
  private _parseVisibilityValue;
@@ -189,11 +187,6 @@ export declare class RecommendationCardCompositionControl extends CommonControl
189
187
  */
190
188
  private _buildCompositionHtml;
191
189
  private _applyVisibilityToBlock;
192
- private _applyTitleVisibilityToBlock;
193
- private _findTitleRows;
194
- private _findTitleContainerBody;
195
- private _readInnerHtml;
196
- private _defaultTitleParagraph;
197
190
  /**
198
191
  * Finds the composition array index for the Nth custom attribute (0-based).
199
192
  * Scans left-to-right, counting only entries with the custom prefix.
@@ -11,7 +11,6 @@
11
11
  */
12
12
  export { RecommendationBlockControl, CONTROL_BLOCK_ID, AlgorithmControl, ALGORITHM_CONTROL_ID, LocaleControl, LOCALE_CONTROL_ID, CurrencyControl, CURRENCY_CONTROL_ID, ProductCountControl, PRODUCT_COUNT_CONTROL_ID, ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID, FiltersControl, FILTERS_CONTROL_ID, ShuffleControl, SHUFFLE_CONTROL_ID, LayoutOrientationControl, LAYOUT_ORIENTATION_CONTROL_ID, PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID, } from './main';
13
13
  export * from './main/utils';
14
- export { TitleControls } from './title';
15
14
  export { NameControls } from './name';
16
15
  export { PriceControls } from './price';
17
16
  export { OldPriceControls } from './oldPrice';
@@ -43,9 +43,7 @@ const n = `.esd-x,
43
43
  .recommendation-block-v2 .product-omnibus-discount ue-node-actions,
44
44
  .recommendation-block-v2 .product-omnibus-discount ue-node-panel,
45
45
  .recommendation-block-v2 .product-button ue-node-actions,
46
- .recommendation-block-v2 .product-button ue-node-panel,
47
- .recommendation-block-v2 .ins-recommendation-title ue-node-actions,
48
- .recommendation-block-v2 .ins-recommendation-title ue-node-panel {
46
+ .recommendation-block-v2 .product-button ue-node-panel {
49
47
  display: none !important;
50
48
  }
51
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.16.0-beta.9e5f533",
3
+ "version": "3.16.0-beta.ca26c4e",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",