@useinsider/guido 3.7.2-beta.3cec1a4 → 3.7.2-beta.b4556ad

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 (31) hide show
  1. package/dist/extensions/Blocks/Recommendation/block.js +1 -4
  2. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +135 -152
  3. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +24 -26
  4. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +24 -33
  5. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +28 -34
  6. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +285 -332
  7. package/dist/extensions/Blocks/Recommendation/extension.js +6 -5
  8. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +3 -2
  9. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +142 -173
  10. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +56 -30
  11. package/dist/extensions/Blocks/Recommendation/templates/index.js +29 -8
  12. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +132 -105
  13. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +44 -23
  14. package/dist/extensions/Blocks/Recommendation/templates/utils.js +96 -53
  15. package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +207 -0
  16. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +24 -19
  17. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +20 -16
  18. package/dist/extensions/Blocks/controlFactories.js +159 -133
  19. package/dist/src/extensions/Blocks/Items/controls/index.d.ts +1 -1
  20. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +1 -1
  21. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +20 -47
  22. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
  23. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +1 -1
  24. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -2
  25. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +158 -11
  26. package/dist/src/extensions/Blocks/Recommendation/utils/captureStyleTemplates.d.ts +85 -0
  27. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +15 -0
  28. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +20 -9
  29. package/dist/src/extensions/Blocks/controlFactories.d.ts +11 -1
  30. package/package.json +1 -1
  31. package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +0 -113
@@ -1,8 +1,8 @@
1
1
  var C = Object.defineProperty;
2
- var p = (d, c, t) => c in d ? C(d, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[c] = t;
3
- var s = (d, c, t) => p(d, typeof c != "symbol" ? c + "" : c, t);
2
+ var p = (d, a, t) => a in d ? C(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
3
+ var s = (d, a, t) => p(d, typeof a != "symbol" ? a + "" : a, t);
4
4
  import { CommonControl as g } from "../../../common-control.js";
5
- import { DEFAULT_NODE_CONFIG as a } from "../../constants/defaultConfig.js";
5
+ import { DEFAULT_NODE_CONFIG as l } from "../../constants/defaultConfig.js";
6
6
  import { RecommendationConfigService as h } from "../../services/configService.js";
7
7
  import { useRecommendationExtensionStore as y } from "../../store/recommendation.js";
8
8
  import { AlgorithmControl as R } from "./algorithm.js";
@@ -16,13 +16,13 @@ import { LAYOUT_ORIENTATION_CONTROL_ID as rt } from "./layoutOrientation.js";
16
16
  import { LocaleControl as _ } from "./locale.js";
17
17
  import { LOCALE_CONTROL_ID as it } from "./locale.js";
18
18
  import { ProductCountControl as O } from "./productCount.js";
19
- import { PRODUCT_COUNT_CONTROL_ID as at } from "./productCount.js";
19
+ import { PRODUCT_COUNT_CONTROL_ID as lt } from "./productCount.js";
20
20
  import { ProductLayoutControl as T } from "./productLayout.js";
21
- import { PRODUCT_LAYOUT_CONTROL_ID as lt } from "./productLayout.js";
21
+ import { PRODUCT_LAYOUT_CONTROL_ID as ct } from "./productLayout.js";
22
22
  import { ShuffleControl as S } from "./shuffle.js";
23
23
  import { SHUFFLE_CONTROL_ID as dt } from "./shuffle.js";
24
24
  import { setCurrencyAttributes as L, getBlockElement as P, updateProductContentInPlace as k, regenerateProductRowsWithStyles as D } from "./utils.js";
25
- import { adjustProductsToSize as mt, formatProductPrice as ft, getCardComposition as Ct, getCurrentLayout as pt, reapplySpacing as gt, regenerateMobileProductRows as yt, regenerateProductRows as Rt, updatePricesInPlace as bt, updateSingleProductContent as Nt } from "./utils.js";
25
+ import { adjustProductsToSize as mt, formatProductPrice as ft, getCardComposition as Ct, getCurrentLayout as pt, regenerateMobileProductRows as gt, updatePricesInPlace as yt, updateSingleProductContent as Rt } from "./utils.js";
26
26
  import { useDebounceFn as m } from "../../../../../node_modules/@vueuse/shared/index.js";
27
27
  const E = "recommendation-id", w = "ui-elements-recommendation-block";
28
28
  class K extends g {
@@ -241,26 +241,26 @@ class K extends g {
241
241
  return;
242
242
  const t = h.getConfig(this.currentNode), e = {};
243
243
  let o = null, r = null, n = null;
244
- if (t.currency.code === a.currency.code) {
244
+ if (t.currency.code === l.currency.code) {
245
245
  const { currencyList: i } = this.store;
246
246
  i.length > 0 && (i.some(
247
- (u) => u.value === `price.${a.currency.code}`
247
+ (u) => u.value === `price.${l.currency.code}`
248
248
  ) || (o = i[0].value.replace("price.", ""), e.currency = {
249
- ...a.currency,
249
+ ...l.currency,
250
250
  code: o,
251
251
  symbol: o
252
252
  }));
253
253
  }
254
- if (t.strategy === a.strategy) {
254
+ if (t.strategy === l.strategy) {
255
255
  const i = this.store.getActivePredictiveAlgorithms;
256
256
  i.length > 0 && (i.some(
257
- (u) => u.value === a.strategy
257
+ (u) => u.value === l.strategy
258
258
  ) || (r = i[0].value, e.strategy = r));
259
259
  }
260
- if (t.language === a.language) {
260
+ if (t.language === l.language) {
261
261
  const i = this.store.getLanguages;
262
262
  i.length > 0 && (i.some(
263
- (u) => u.value === a.language
263
+ (u) => u.value === l.language
264
264
  ) || (n = i[0].value, e.language = n));
265
265
  }
266
266
  !o && !r && !n || (h.updateConfig(
@@ -278,10 +278,10 @@ class K extends g {
278
278
  name: o,
279
279
  value: o,
280
280
  symbol: o,
281
- alignment: a.currency.alignment === "before" ? "0" : "1",
282
- decimalCount: a.currency.decimalCount.toString(),
283
- decimalSeparator: a.currency.decimalSeparator,
284
- thousandSeparator: a.currency.thousandSeparator
281
+ alignment: l.currency.alignment === "before" ? "0" : "1",
282
+ decimalCount: l.currency.decimalCount.toString(),
283
+ decimalSeparator: l.currency.decimalSeparator,
284
+ thousandSeparator: l.currency.thousandSeparator
285
285
  }
286
286
  } : {},
287
287
  ...r ? { strategy: r } : {},
@@ -325,8 +325,8 @@ class K extends g {
325
325
  }
326
326
  const i = t.$state.configVersion;
327
327
  i !== o && (o = i, this._persistFiltersToNodeConfig(), this._debouncedFetchProducts());
328
- const l = t.recommendationProducts, u = l !== e, f = Array.isArray(l) && l.length > 0;
329
- u && f && (e = l, this._debouncedRegenerateWithProducts());
328
+ const c = t.recommendationProducts, u = c !== e, f = Array.isArray(c) && c.length > 0;
329
+ u && f && (e = c, this._debouncedRegenerateWithProducts());
330
330
  });
331
331
  }
332
332
  /**
@@ -357,8 +357,8 @@ export {
357
357
  it as LOCALE_CONTROL_ID,
358
358
  I as LayoutOrientationControl,
359
359
  _ as LocaleControl,
360
- at as PRODUCT_COUNT_CONTROL_ID,
361
- lt as PRODUCT_LAYOUT_CONTROL_ID,
360
+ lt as PRODUCT_COUNT_CONTROL_ID,
361
+ ct as PRODUCT_LAYOUT_CONTROL_ID,
362
362
  O as ProductCountControl,
363
363
  T as ProductLayoutControl,
364
364
  K as RecommendationBlockControl,
@@ -369,12 +369,10 @@ export {
369
369
  P as getBlockElement,
370
370
  Ct as getCardComposition,
371
371
  pt as getCurrentLayout,
372
- gt as reapplySpacing,
373
- yt as regenerateMobileProductRows,
374
- Rt as regenerateProductRows,
372
+ gt as regenerateMobileProductRows,
375
373
  D as regenerateProductRowsWithStyles,
376
374
  L as setCurrencyAttributes,
377
- bt as updatePricesInPlace,
375
+ yt as updatePricesInPlace,
378
376
  k as updateProductContentInPlace,
379
- Nt as updateSingleProductContent
377
+ Rt as updateSingleProductContent
380
378
  };
@@ -1,62 +1,53 @@
1
- var p = Object.defineProperty;
2
- var A = (o, e, t) => e in o ? p(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var r = (o, e, t) => A(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { ModificationDescription as h } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- import { CommonControl as N } from "../../../common-control.js";
6
- import { ATTR_DATA_CUSTOM_ATTRIBUTES as L } from "../../constants/selectors.js";
7
- import { LAYOUT_OPTIONS as T, DEFAULT_MOBILE_ROW_SPACING as m, DEFAULT_MOBILE_COLUMN_SPACING as d, DEFAULT_ROW_SPACING as l, DEFAULT_COLUMN_SPACING as g } from "../../constants/layout.js";
1
+ var A = Object.defineProperty;
2
+ var p = (e, o, t) => o in e ? A(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
3
+ var r = (e, o, t) => p(e, typeof o != "symbol" ? o + "" : o, t);
4
+ import { ModificationDescription as O } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { CommonControl as L } from "../../../common-control.js";
6
+ import { ATTR_DATA_CUSTOM_ATTRIBUTES as T } from "../../constants/selectors.js";
7
+ import { LAYOUT_OPTIONS as h, DEFAULT_MOBILE_ROW_SPACING as m, DEFAULT_MOBILE_COLUMN_SPACING as d, DEFAULT_ROW_SPACING as l, DEFAULT_COLUMN_SPACING as C } from "../../constants/layout.js";
8
8
  import { DEFAULT_COMPOSITION as _ } from "../../constants/defaultConfig.js";
9
9
  import { RecommendationConfigService as s } from "../../services/configService.js";
10
- import { useRecommendationExtensionStore as f } from "../../store/recommendation.js";
11
- import { getCurrentLayout as C, getBlockElement as I, regenerateProductRowsWithStyles as S } from "./utils.js";
12
- const U = "recommendation-layout-orientation-control", O = "recommendationInfoBannerTest", a = {
10
+ import { useRecommendationExtensionStore as N } from "../../store/recommendation.js";
11
+ import { getCurrentLayout as g, getBlockElement as f, regenerateProductRowsWithStyles as S } from "./utils.js";
12
+ const I = "recommendation-layout-orientation-control", a = {
13
13
  LAYOUT: "layout"
14
- }, y = "data-card-composition", n = {
14
+ }, U = "data-card-composition", n = {
15
15
  LAYOUT: "data-layout",
16
16
  COLUMN_SPACING: "data-column-spacing",
17
17
  ROW_SPACING: "data-row-spacing",
18
18
  MOBILE_COLUMN_SPACING: "data-mobile-column-spacing",
19
19
  MOBILE_ROW_SPACING: "data-mobile-row-spacing"
20
20
  };
21
- class Y extends N {
21
+ class w extends L {
22
22
  constructor() {
23
23
  super(...arguments);
24
- r(this, "store", f());
24
+ r(this, "store", N());
25
25
  r(this, "isChangingLayout", !1);
26
26
  }
27
27
  getId() {
28
- return U;
28
+ return I;
29
29
  }
30
30
  getTemplate() {
31
31
  return `
32
32
  <div class="layout-control-container">
33
- ${this._GuOnPageMessage({ name: O })}
34
-
35
33
  ${this._GuTwoColumns([
36
34
  this._GuLabel({ text: this.api.translate("Layout Orientation") }),
37
35
  this._GuRadioButton({
38
36
  name: a.LAYOUT,
39
- buttons: T
37
+ buttons: h
40
38
  })
41
39
  ])}
42
40
  </div>
43
41
  `;
44
42
  }
45
43
  onRender() {
46
- this._setInfoMessageValue(
47
- O,
48
- this.api.translate(
49
- `Note that updating the Layout Orientation, Number of Products,
50
- Products in One Row and Mobile Layout Optimization settings
51
- resets the style of your Recommendation block.`
52
- )
53
- ), this._setFormValues(), this._listenToFormUpdates();
44
+ this._setFormValues(), this._listenToFormUpdates();
54
45
  }
55
46
  onTemplateNodeUpdated(t) {
56
47
  super.onTemplateNodeUpdated(t), this._setFormValues();
57
48
  }
58
49
  _setFormValues() {
59
- const u = s.getConfig(this.currentNode).layout || C(this.currentNode);
50
+ const u = s.getConfig(this.currentNode).layout || g(this.currentNode);
60
51
  this.api.updateValues({
61
52
  [a.LAYOUT]: u
62
53
  });
@@ -66,9 +57,9 @@ class Y extends N {
66
57
  * Updates node config, data attribute and regenerates product rows
67
58
  */
68
59
  _onLayoutChange(t) {
69
- if (this.isChangingLayout || !this.currentNode || (s.getConfig(this.currentNode).layout || C(this.currentNode)) === t)
60
+ if (this.isChangingLayout || !this.currentNode || (s.getConfig(this.currentNode).layout || g(this.currentNode)) === t)
70
61
  return;
71
- const c = I(this.currentNode);
62
+ const c = f(this.currentNode);
72
63
  if (c) {
73
64
  this.isChangingLayout = !0;
74
65
  try {
@@ -77,15 +68,15 @@ class Y extends N {
77
68
  this.currentNode,
78
69
  {
79
70
  layout: t,
80
- columnSpacing: g,
71
+ columnSpacing: C,
81
72
  rowSpacing: l,
82
73
  mobileColumnSpacing: d,
83
74
  mobileRowSpacing: m
84
75
  },
85
76
  `Changed layout to ${t}`
86
77
  ), this.store.patchCurrentBlockConfig({ orientation: t });
87
- const i = this.api.getDocumentModifier().modifyHtml(c).setAttribute(n.LAYOUT, t).setAttribute(n.COLUMN_SPACING, g.toString()).setAttribute(n.ROW_SPACING, l.toString()).setAttribute(n.MOBILE_COLUMN_SPACING, d.toString()).setAttribute(n.MOBILE_ROW_SPACING, m.toString());
88
- t === "list" ? (i.setClass("es-m-p0"), i.setClass("ins-recommendation-list-layout")) : (i.removeClass("es-m-p0"), i.removeClass("ins-recommendation-list-layout")), i.setAttribute(y, _.join(",")).setAttribute(L, "[]"), i.apply(new h(`Update layout to ${t}`)), this._regenerateProductRows(t);
78
+ const i = this.api.getDocumentModifier().modifyHtml(c).setAttribute(n.LAYOUT, t).setAttribute(n.COLUMN_SPACING, C.toString()).setAttribute(n.ROW_SPACING, l.toString()).setAttribute(n.MOBILE_COLUMN_SPACING, d.toString()).setAttribute(n.MOBILE_ROW_SPACING, m.toString());
79
+ t === "list" ? (i.setClass("es-m-p0"), i.setClass("ins-recommendation-list-layout")) : (i.removeClass("es-m-p0"), i.removeClass("ins-recommendation-list-layout")), i.setAttribute(U, _.join(",")).setAttribute(T, "[]"), i.apply(new O(`Update layout to ${t}`)), this._regenerateProductRows(t);
89
80
  } finally {
90
81
  this.isChangingLayout = !1;
91
82
  }
@@ -111,6 +102,6 @@ class Y extends N {
111
102
  }
112
103
  }
113
104
  export {
114
- U as LAYOUT_ORIENTATION_CONTROL_ID,
115
- Y as LayoutOrientationControl
105
+ I as LAYOUT_ORIENTATION_CONTROL_ID,
106
+ w as LayoutOrientationControl
116
107
  };
@@ -1,15 +1,15 @@
1
1
  var E = Object.defineProperty;
2
2
  var f = (a, n, t) => n in a ? E(a, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[n] = t;
3
3
  var c = (a, n, t) => f(a, typeof n != "symbol" ? n + "" : n, t);
4
- import { EditorStatePropertyType as O, PreviewDeviceMode as N, UEAttr as T } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- import { CommonControl as M } from "../../../common-control.js";
6
- import { MAX_PRODUCTS_PER_ROW as m, MAX_MOBILE_PRODUCTS_PER_ROW as P, DEFAULT_MOBILE_CARDS_IN_ROW as l, DEFAULT_COLUMN_SPACING as w, DEFAULT_MOBILE_COLUMN_SPACING as y } from "../../constants/layout.js";
4
+ import { EditorStatePropertyType as O, PreviewDeviceMode as T, UEAttr as N } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { CommonControl as P } from "../../../common-control.js";
6
+ import { MAX_PRODUCTS_PER_ROW as m, MAX_MOBILE_PRODUCTS_PER_ROW as M, DEFAULT_MOBILE_CARDS_IN_ROW as l } from "../../constants/layout.js";
7
7
  import { RecommendationConfigService as s } from "../../services/configService.js";
8
- import { useRecommendationExtensionStore as D } from "../../store/recommendation.js";
9
- import { setMobileLayoutOptOut as C, ensureMobileCssRulesExist as L } from "../mobileLayout/cssRules.js";
10
- import { getCurrentLayout as U, getBlockElement as A, adjustProductsToSize as b, regenerateProductRowsWithStyles as g, regenerateMobileProductRows as I } from "./utils.js";
11
- import { useDebounceFn as B } from "../../../../../node_modules/@vueuse/shared/index.js";
12
- const S = "recommendation-product-layout-control", e = {
8
+ import { useRecommendationExtensionStore as w } from "../../store/recommendation.js";
9
+ import { setMobileLayoutOptOut as C, ensureMobileCssRulesExist as b } from "../mobileLayout/cssRules.js";
10
+ import { getCurrentLayout as y, getBlockElement as D, adjustProductsToSize as L, regenerateProductRowsWithStyles as g, regenerateMobileProductRows as I } from "./utils.js";
11
+ import { useDebounceFn as U } from "../../../../../node_modules/@vueuse/shared/index.js";
12
+ const B = "recommendation-product-layout-control", e = {
13
13
  // "Products in One Row" — shown when toggle is OFF
14
14
  PRODUCT_IN_ROW: "cardsInRow",
15
15
  PRODUCT_IN_ROW_LABEL: "cardsInRowLabel",
@@ -23,19 +23,19 @@ const S = "recommendation-product-layout-control", e = {
23
23
  MOBILE_LAYOUT_TOGGLE: "mobileLayoutEnabled",
24
24
  MOBILE_LAYOUT_LABEL: "mobileLayoutLabel"
25
25
  };
26
- class v extends M {
26
+ class v extends P {
27
27
  constructor() {
28
28
  super(...arguments);
29
29
  // Store is used for backward compatibility with product fetching and regeneration
30
- c(this, "store", D());
30
+ c(this, "store", w());
31
31
  c(this, "storeUnsubscription", () => {
32
32
  });
33
- c(this, "_debouncedRegenerateProductRows", B(() => {
33
+ c(this, "_debouncedRegenerateProductRows", U(() => {
34
34
  this._regenerateProductRows();
35
35
  }, 500));
36
36
  }
37
37
  getId() {
38
- return S;
38
+ return B;
39
39
  }
40
40
  getTemplate() {
41
41
  return `
@@ -57,7 +57,7 @@ class v extends M {
57
57
  }),
58
58
  this._GuCounter({
59
59
  name: e.MOBILE_CARDS_IN_ROW,
60
- maxValue: P
60
+ maxValue: M
61
61
  }),
62
62
  this._GuLabel({
63
63
  text: this.api.translate("Mobile Layout Optimization"),
@@ -95,7 +95,7 @@ class v extends M {
95
95
  * Returns true when the editor preview is in mobile mode.
96
96
  */
97
97
  _isMobilePreview() {
98
- return this.api.getEditorState()[O.previewDeviceMode] === N.MOBILE;
98
+ return this.api.getEditorState()[O.previewDeviceMode] === T.MOBILE;
99
99
  }
100
100
  /**
101
101
  * Updates counter visibility based on layout, mobileLayoutEnabled, and editor preview mode.
@@ -110,7 +110,7 @@ class v extends M {
110
110
  */
111
111
  _updateProductsInRowVisibility() {
112
112
  var p;
113
- const t = s.getConfig(this.currentNode), o = (t.layout || U(this.currentNode)) === "grid", { mobileLayoutEnabled: r } = t, u = this._isMobilePreview();
113
+ const t = s.getConfig(this.currentNode), o = (t.layout || y(this.currentNode)) === "grid", { mobileLayoutEnabled: r } = t, u = this._isMobilePreview();
114
114
  this.api.setVisibility(e.MOBILE_LAYOUT_TOGGLE, o), this.api.setVisibility(e.MOBILE_LAYOUT_LABEL, o);
115
115
  const d = o && !r, _ = o && r && !u, h = o && r && u;
116
116
  this.api.setVisibility(e.PRODUCT_IN_ROW, d), this.api.setVisibility(e.PRODUCT_IN_ROW_LABEL, d), this.api.setVisibility(e.PRODUCT_IN_ROW_DESKTOP, _), this.api.setVisibility(e.PRODUCT_IN_ROW_DESKTOP_LABEL, _), this.api.setVisibility(e.MOBILE_CARDS_IN_ROW, h), this.api.setVisibility(e.MOBILE_CARDS_IN_ROW_LABEL, h);
@@ -125,7 +125,7 @@ class v extends M {
125
125
  const t = s.getConfig(this.currentNode);
126
126
  this.api.setUIEAttribute(
127
127
  e.MOBILE_LAYOUT_TOGGLE,
128
- T.SELECTPICKER.items,
128
+ N.SELECTPICKER.items,
129
129
  t.mobileLayoutEnabled
130
130
  );
131
131
  }
@@ -140,7 +140,7 @@ class v extends M {
140
140
  const i = s.getConfig(this.currentNode);
141
141
  if (i.mobileLayoutEnabled === t)
142
142
  return;
143
- const o = A(this.currentNode);
143
+ const o = D(this.currentNode);
144
144
  if (t) {
145
145
  const r = i.previousMobileCardsInRow || l;
146
146
  s.updateConfig(
@@ -157,8 +157,8 @@ class v extends M {
157
157
  mobileCardsInRow: r
158
158
  },
159
159
  { triggerRefetch: !1 }
160
- ), o && C(this.api, o, !1), L(this.api);
161
- const u = parseInt(i.size) || 6, d = b(this.store.recommendationProducts, u);
160
+ ), o && C(this.api, o, !1), b(this.api);
161
+ const u = parseInt(i.size) || 6, d = L(this.store.recommendationProducts, u);
162
162
  g({
163
163
  currentNode: this.currentNode,
164
164
  documentModifier: this.api.getDocumentModifier(),
@@ -189,35 +189,29 @@ class v extends M {
189
189
  this._setFormValues(), this._updateProductsInRowVisibility();
190
190
  }
191
191
  _onProductsInRowChange(t) {
192
- if (!this.currentNode || s.getConfig(this.currentNode).cardsInRow === t)
193
- return;
194
- const o = t === 1 ? 0 : w;
195
- s.updateConfig(
192
+ !this.currentNode || s.getConfig(this.currentNode).cardsInRow === t || (s.updateConfig(
196
193
  this.api,
197
194
  this.currentNode,
198
- { cardsInRow: t, columnSpacing: o },
195
+ { cardsInRow: t },
199
196
  `Changed products per row to ${t}`
200
- ), this.store.patchCurrentBlockConfig({ cardsInRow: t }, { triggerRefetch: !1 }), this._debouncedRegenerateProductRows();
197
+ ), this.store.patchCurrentBlockConfig({ cardsInRow: t }, { triggerRefetch: !1 }), this._debouncedRegenerateProductRows());
201
198
  }
202
199
  _onMobileCardsInRowChange(t) {
203
- if (!this.currentNode || s.getConfig(this.currentNode).mobileCardsInRow === t)
204
- return;
205
- const o = t === 1 ? 0 : y;
206
- s.updateConfig(
200
+ !this.currentNode || s.getConfig(this.currentNode).mobileCardsInRow === t || (s.updateConfig(
207
201
  this.api,
208
202
  this.currentNode,
209
- { mobileCardsInRow: t, mobileColumnSpacing: o },
203
+ { mobileCardsInRow: t },
210
204
  `Changed mobile products per row to ${t}`
211
- ), L(this.api), this.store.patchCurrentBlockConfig(
205
+ ), b(this.api), this.store.patchCurrentBlockConfig(
212
206
  { mobileCardsInRow: t },
213
207
  { triggerRefetch: !1 }
214
208
  ), I({
215
209
  currentNode: this.currentNode,
216
210
  documentModifier: this.api.getDocumentModifier()
217
- });
211
+ }));
218
212
  }
219
213
  _regenerateProductRows() {
220
- const t = s.getConfig(this.currentNode), i = parseInt(t.size) || 6, o = b(this.store.recommendationProducts, i);
214
+ const t = s.getConfig(this.currentNode), i = parseInt(t.size) || 6, o = L(this.store.recommendationProducts, i);
221
215
  g({
222
216
  currentNode: this.currentNode,
223
217
  documentModifier: this.api.getDocumentModifier(),
@@ -261,6 +255,6 @@ class v extends M {
261
255
  }
262
256
  }
263
257
  export {
264
- S as PRODUCT_LAYOUT_CONTROL_ID,
258
+ B as PRODUCT_LAYOUT_CONTROL_ID,
265
259
  v as ProductLayoutControl
266
260
  };