@useinsider/guido 3.8.1-beta.95947aa → 3.8.1-beta.bc12f34

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 (43) hide show
  1. package/dist/@types/config/schemas.js +70 -66
  2. package/dist/composables/usePreviewMode.js +15 -14
  3. package/dist/composables/useRecommendationPreview.js +100 -0
  4. package/dist/config/compiler/recommendationCompilerRules.js +1 -1
  5. package/dist/config/compiler/utils/recommendationCompilerUtils.js +88 -80
  6. package/dist/config/migrator/recommendation/htmlBuilder.js +53 -52
  7. package/dist/config/migrator/recommendation/settingsMapper.js +38 -33
  8. package/dist/extensions/Blocks/Recommendation/block.js +61 -45
  9. package/dist/extensions/Blocks/Recommendation/canvasPreview.css.js +16 -0
  10. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +41 -32
  11. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +353 -289
  12. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +99 -87
  13. package/dist/extensions/Blocks/Recommendation/controls/main/pricePlacement.js +133 -0
  14. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +154 -152
  15. package/dist/extensions/Blocks/Recommendation/extension.js +30 -29
  16. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +21 -7
  17. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +64 -4
  18. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +3 -1
  19. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +130 -96
  20. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +43 -54
  21. package/dist/extensions/Blocks/Recommendation/templates/index.js +17 -14
  22. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +86 -80
  23. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +31 -40
  24. package/dist/extensions/Blocks/Recommendation/templates/utils.js +155 -102
  25. package/dist/src/@types/config/schemas.d.ts +16 -0
  26. package/dist/src/composables/useConfig.d.ts +4 -0
  27. package/dist/src/composables/useRecommendationPreview.d.ts +10 -0
  28. package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +1 -1
  29. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  30. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +29 -3
  31. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -1
  32. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -1
  33. package/dist/src/extensions/Blocks/Recommendation/controls/main/pricePlacement.d.ts +59 -0
  34. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -0
  35. package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +13 -1
  36. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
  37. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +1 -1
  38. package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +10 -1
  39. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
  40. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +51 -1
  41. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +15 -0
  42. package/dist/src/stores/config.d.ts +36 -0
  43. package/package.json +1 -1
@@ -1,70 +1,75 @@
1
1
  import { CURRENT_CONFIG_VERSION as s, DEFAULT_CURRENCY as i } from "../../../extensions/Blocks/Recommendation/constants/defaultConfig.js";
2
- import { DEFAULT_CARDS_IN_ROW as m, DEFAULT_MOBILE_ROW_SPACING as p, DEFAULT_MOBILE_COLUMN_SPACING as f, DEFAULT_ROW_SPACING as S, DEFAULT_COLUMN_SPACING as d, DEFAULT_MOBILE_CARDS_IN_ROW as u } from "../../../extensions/Blocks/Recommendation/constants/layout.js";
3
- import { mapLegacyStrategy as c } from "../../../extensions/Blocks/Recommendation/utils/legacyStrategyMap.js";
4
- function l(t) {
2
+ import { DEFAULT_CARDS_IN_ROW as m, DEFAULT_MOBILE_ROW_SPACING as p, DEFAULT_MOBILE_COLUMN_SPACING as d, DEFAULT_ROW_SPACING as f, DEFAULT_COLUMN_SPACING as S, DEFAULT_MOBILE_CARDS_IN_ROW as a } from "../../../extensions/Blocks/Recommendation/constants/layout.js";
3
+ import { mapLegacyStrategy as l } from "../../../extensions/Blocks/Recommendation/utils/legacyStrategyMap.js";
4
+ function c(t) {
5
5
  return t === "0" || t === 0 ? "before" : "after";
6
6
  }
7
- function _(t) {
7
+ function I(t) {
8
8
  if (typeof t == "number" && Number.isFinite(t))
9
9
  return t;
10
10
  if (typeof t == "string") {
11
- const n = parseInt(t);
12
- if (!Number.isNaN(n))
13
- return n;
11
+ const o = parseInt(t);
12
+ if (!Number.isNaN(o))
13
+ return o;
14
14
  }
15
15
  return i.decimalCount;
16
16
  }
17
- function I(t) {
17
+ function _(t) {
18
18
  return t === "." || t === "," || t === " " || t === "" ? t : ",";
19
19
  }
20
- function A(t) {
20
+ function N(t) {
21
21
  return t === "." || t === "," || t === " " ? t : ".";
22
22
  }
23
- function N(t) {
23
+ function A(t) {
24
24
  if (!t || typeof t != "object")
25
25
  return { ...i };
26
- const n = t, o = n.value ?? n.name ?? i.code, r = n.symbol ?? o;
26
+ const o = t, n = o.value ?? o.name ?? i.code, r = o.symbol ?? n;
27
27
  return {
28
- code: o,
28
+ code: n,
29
29
  symbol: r,
30
- alignment: l(n.alignment),
31
- decimalCount: _(n.decimalCount),
32
- decimalSeparator: A(n.decimalSeparator),
33
- thousandSeparator: I(n.thousandSeparator)
30
+ alignment: c(o.alignment),
31
+ decimalCount: I(o.decimalCount),
32
+ decimalSeparator: N(o.decimalSeparator),
33
+ thousandSeparator: _(o.thousandSeparator)
34
34
  };
35
35
  }
36
- function R(t) {
36
+ function L(t) {
37
37
  return t === "horizontal" || t === "list" ? "list" : "grid";
38
38
  }
39
- function b(t) {
40
- return c(t) || "mostPopular";
39
+ function R(t) {
40
+ return l(t) || "mostPopular";
41
41
  }
42
- function D(t, n, o) {
43
- const r = n.rowCount ?? t.cardsInRow ?? m, a = n.totalCount ?? (typeof t.size == "string" ? parseInt(t.size) : t.size) ?? 6;
42
+ function U(t, o, n) {
43
+ const r = o.rowCount ?? t.cardsInRow ?? m, u = o.totalCount ?? (typeof t.size == "string" ? parseInt(t.size) : t.size) ?? 6;
44
44
  return {
45
- recommendationId: o,
46
- strategy: b(t.strategy),
45
+ recommendationId: n,
46
+ strategy: R(t.strategy),
47
47
  productIds: (t.productIds ?? []).map((e) => String(e)),
48
- size: String(a),
48
+ size: String(u),
49
49
  shuffleProducts: !!t.shuffleProducts,
50
50
  language: t.language ?? "en_US",
51
- currency: N(t.currencySettings),
51
+ currency: A(t.currencySettings),
52
52
  filters: (t.filters ?? []).map((e) => ({ ...e })),
53
- layout: R(t.orientation ?? n.orientation),
53
+ layout: L(t.orientation ?? o.orientation),
54
54
  cardsInRow: r,
55
- mobileCardsInRow: u,
55
+ mobileCardsInRow: a,
56
56
  mobileLayoutEnabled: !1,
57
- previousMobileCardsInRow: u,
58
- columnSpacing: d,
59
- rowSpacing: S,
60
- mobileColumnSpacing: f,
57
+ previousMobileCardsInRow: a,
58
+ columnSpacing: S,
59
+ rowSpacing: f,
60
+ mobileColumnSpacing: d,
61
61
  mobileRowSpacing: p,
62
62
  omnibusPrice: { textBefore: "", textAfter: "" },
63
63
  omnibusDiscount: { textBefore: "", textAfter: "" },
64
+ // Preserve the legacy price-placement toggles. Absent legacy keys map to
65
+ // `false`, matching the legacy default (prices inline, original price not
66
+ // gated). New Guido blocks default differently (see DEFAULT_NODE_CONFIG).
67
+ priceMovedToNextLine: !!t.isPriceMovedToNextLine,
68
+ priceHideIfSameAsDiscounted: !!t.isPriceDeletedForZeroSale,
64
69
  configVersion: s
65
70
  };
66
71
  }
67
72
  export {
68
- N as mapCurrency,
69
- D as mapSettings
73
+ A as mapCurrency,
74
+ U as mapSettings
70
75
  };
@@ -1,34 +1,34 @@
1
- var k = Object.defineProperty;
2
- var B = (a, r, t) => r in a ? k(a, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[r] = t;
3
- var d = (a, r, t) => B(a, typeof r != "symbol" ? r + "" : r, t);
1
+ var B = Object.defineProperty;
2
+ var D = (a, c, t) => c in a ? B(a, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[c] = t;
3
+ var h = (a, c, t) => D(a, typeof c != "symbol" ? c + "" : c, t);
4
4
  import { BlockId as R } from "../../../enums/block.js";
5
5
  import { getMigrationBannerHtml as y } from "../../../utils/migrationBannerHtml.js";
6
- import { Block as D, BlockCompositionType as C, ModificationDescription as h } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- import { regenerateMobileProductRows as b } from "./controls/main/utils.js";
8
- import { ensureMobileCssRulesExist as p, setMobileLayoutOptOut as f, hasMobileLayoutOptOut as A } from "./controls/mobileLayout/cssRules.js";
9
- import { RecommendationConfigService as c } from "./services/configService.js";
10
- import { useRecommendationExtensionStore as g } from "./store/recommendation.js";
11
- import { getDefaultTemplate as E } from "./templates/grid/template.js";
6
+ import { Block as b, BlockCompositionType as A, ModificationDescription as g } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ import { regenerateMobileProductRows as C } from "./controls/main/utils.js";
8
+ import { ensureMobileCssRulesExist as p, setMobileLayoutOptOut as f, hasMobileLayoutOptOut as E } from "./controls/mobileLayout/cssRules.js";
9
+ import { RecommendationConfigService as s } from "./services/configService.js";
10
+ import { useRecommendationExtensionStore as d } from "./store/recommendation.js";
11
+ import { getDefaultTemplate as S } from "./templates/grid/template.js";
12
12
  import { useRecommendationBlockWarning as M } from "./useRecommendationBlockWarning.js";
13
- const I = R.Recommendation, m = "recommendation-block-v2", u = "recommendation-id";
14
- let _ = !1;
15
- class H extends D {
13
+ const _ = R.Recommendation, m = "recommendation-block-v2", u = "recommendation-id", I = "hide-price";
14
+ let k = !1;
15
+ class P extends b {
16
16
  constructor() {
17
17
  super();
18
18
  /**
19
19
  * Stores the ID generated in getTemplate() so onCreated() can reuse it.
20
20
  * This avoids generating a new (different) ID in onCreated().
21
21
  */
22
- d(this, "_pendingBlockId", null);
22
+ h(this, "_pendingBlockId", null);
23
23
  }
24
24
  getId() {
25
- return I;
25
+ return _;
26
26
  }
27
27
  getIcon() {
28
28
  return "recommendation-icon";
29
29
  }
30
30
  getBlockCompositionType() {
31
- return C.CONTAINER;
31
+ return A.CONTAINER;
32
32
  }
33
33
  getName() {
34
34
  return this.api.translate("Recommendation Block");
@@ -40,7 +40,7 @@ class H extends D {
40
40
  }
41
41
  getSettingsPanelTitleHtml() {
42
42
  return y(
43
- I,
43
+ _,
44
44
  this.api.translate("Recommendation Block"),
45
45
  this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.")
46
46
  );
@@ -48,11 +48,8 @@ class H extends D {
48
48
  allowInnerBlocksDND() {
49
49
  return !1;
50
50
  }
51
- // A saved module carries its config in the esd-config blob, restored on
52
- // re-drop by migrateFromDataAttributes; per-element styles ride the
53
- // preserved inner HTML. (onCreated early-returns for re-drops, never clobbers.)
54
51
  canBeSavedAsModule() {
55
- return !0;
52
+ return !1;
56
53
  }
57
54
  /**
58
55
  * Returns the template HTML for a new recommendation block.
@@ -63,7 +60,7 @@ class H extends D {
63
60
  */
64
61
  getTemplate() {
65
62
  const t = this._generateNextId();
66
- return this._pendingBlockId = t, E(t);
63
+ return this._pendingBlockId = t, S(t);
67
64
  }
68
65
  /**
69
66
  * Called when a new block is dropped into the template
@@ -86,20 +83,20 @@ class H extends D {
86
83
  }
87
84
  const i = this._pendingBlockId ?? this._generateNextId();
88
85
  this._pendingBlockId = null, this._assignRecommendationId(t, i);
89
- const { config: n, wasFreshDrop: o } = c.initializeConfig(
86
+ const { config: n, wasFreshDrop: o } = s.initializeConfig(
90
87
  this.api,
91
88
  t,
92
89
  { recommendationId: i }
93
- ), s = g();
94
- if (s.setCurrentBlock(i), o) {
90
+ ), r = d();
91
+ if (r.setCurrentBlock(i), this._stampHidePrice(t, n.priceHideIfSameAsDiscounted), o) {
95
92
  p(this.api);
96
93
  const l = this._getBlockElement(t);
97
- l && (f(this.api, l, !0), b({
94
+ l && (f(this.api, l, !0), C({
98
95
  currentNode: t,
99
96
  documentModifier: this.api.getDocumentModifier()
100
97
  }));
101
98
  }
102
- s.patchCurrentBlockConfig({ language: n.language }, { triggerRefetch: !1 }), this._warnIfMultipleBlocks();
99
+ r.patchCurrentBlockConfig({ language: n.language }, { triggerRefetch: !1 }), this._warnIfMultipleBlocks();
103
100
  }
104
101
  /**
105
102
  * Called when the document changes or template is loaded
@@ -112,20 +109,20 @@ class H extends D {
112
109
  if (!(!t || !("getNodeConfig" in t))) {
113
110
  if (!this._getRecommendationId(t)) {
114
111
  const e = this._generateNextId();
115
- this._assignRecommendationId(t, e), c.hasConfig(t) && c.updateConfig(
112
+ this._assignRecommendationId(t, e), s.hasConfig(t) && s.updateConfig(
116
113
  this.api,
117
114
  t,
118
115
  { recommendationId: e },
119
116
  "Assign recommendation ID to legacy block"
120
117
  );
121
118
  }
122
- this._healLingeringDuplicate(t), c.needsMigration(t) && this._migrateFromLegacy(t);
119
+ this._healLingeringDuplicate(t), s.needsMigration(t) && this._migrateFromLegacy(t), this._healHidePriceAttr(t);
123
120
  try {
124
- _ || (p(this.api), _ = !0);
125
- const e = c.getConfig(t), i = this._getBlockElement(t);
121
+ k || (p(this.api), k = !0);
122
+ const e = s.getConfig(t), i = this._getBlockElement(t);
126
123
  if (i) {
127
124
  const n = !e.mobileLayoutEnabled;
128
- A(i) !== n && f(this.api, i, n);
125
+ E(i) !== n && f(this.api, i, n);
129
126
  }
130
127
  } catch {
131
128
  }
@@ -139,7 +136,7 @@ class H extends D {
139
136
  */
140
137
  onDelete(t) {
141
138
  const e = this._getRecommendationId(t);
142
- e && g().removeBlockState(e);
139
+ e && d().removeBlockState(e);
143
140
  }
144
141
  /**
145
142
  * Warns (dark advisory toaster) when the design holds more than one live
@@ -169,8 +166,8 @@ class H extends D {
169
166
  const e = this.api.getDocumentRoot();
170
167
  e && "querySelectorAll" in e && e.querySelectorAll(`.${m}`).forEach((n) => {
171
168
  if ("getAttribute" in n) {
172
- const o = n.getAttribute(u), s = o ? parseInt(o) : 0;
173
- s > t && (t = s);
169
+ const o = n.getAttribute(u), r = o ? parseInt(o) : 0;
170
+ r > t && (t = r);
174
171
  }
175
172
  });
176
173
  } catch {
@@ -204,13 +201,13 @@ class H extends D {
204
201
  const o = this._getBlockElement(t);
205
202
  if (!o)
206
203
  return;
207
- let s = -1;
204
+ let r = -1;
208
205
  for (let l = 0; l < n.length; l++)
209
206
  if (n[l] === o) {
210
- s = l;
207
+ r = l;
211
208
  break;
212
209
  }
213
- if (s <= 0)
210
+ if (r <= 0)
214
211
  return;
215
212
  this._reassignDuplicateId(t, e);
216
213
  } catch {
@@ -230,7 +227,7 @@ class H extends D {
230
227
  }
231
228
  /** Assigns a fresh id to a duplicated block and syncs DOM, node config and store. */
232
229
  _handleDuplicate(t, e) {
233
- const i = this._reassignDuplicateId(t, e), n = g();
230
+ const i = this._reassignDuplicateId(t, e), n = d();
234
231
  n.cloneBlockState(e, i), n.setCurrentBlock(i), this._warnIfMultipleBlocks();
235
232
  }
236
233
  /**
@@ -246,7 +243,7 @@ class H extends D {
246
243
  */
247
244
  _reassignDuplicateId(t, e) {
248
245
  const i = this._generateNextId(), n = this._getBlockElement(t);
249
- return this._assignRecommendationId(t, i), n && this._reassignInstanceClass(n, e, i), c.hasConfig(t) && c.updateConfig(
246
+ return this._assignRecommendationId(t, i), n && this._reassignInstanceClass(n, e, i), s.hasConfig(t) && s.updateConfig(
250
247
  this.api,
251
248
  t,
252
249
  { recommendationId: i },
@@ -263,8 +260,8 @@ class H extends D {
263
260
  _reassignInstanceClass(t, e, i) {
264
261
  if (!("getAttribute" in t))
265
262
  return;
266
- const n = `ins-recommendation-v3-block-${e}`, o = `ins-recommendation-v3-block-${i}`, s = this.api.getDocumentModifier();
267
- s.modifyHtml(t).removeClass(n).setClass(o), s.apply(new h(
263
+ const n = `ins-recommendation-v3-block-${e}`, o = `ins-recommendation-v3-block-${i}`, r = this.api.getDocumentModifier();
264
+ r.modifyHtml(t).removeClass(n).setClass(o), r.apply(new g(
268
265
  `Reassign recommendation instance class ${n} -> ${o}`
269
266
  ));
270
267
  }
@@ -279,7 +276,26 @@ class H extends D {
279
276
  if (!i)
280
277
  return;
281
278
  const n = this.api.getDocumentModifier();
282
- n.modifyHtml(i).setAttribute(u, e.toString()), n.apply(new h(`Assign recommendation ID ${e}`));
279
+ n.modifyHtml(i).setAttribute(u, e.toString()), n.apply(new g(`Assign recommendation ID ${e}`));
280
+ }
281
+ /**
282
+ * Stamps the `hide-price` attribute (read by email-service at send time) on
283
+ * the block element from the config flag.
284
+ */
285
+ _stampHidePrice(t, e) {
286
+ const i = this._getBlockElement(t);
287
+ i && this.api.getDocumentModifier().modifyHtml(i).setAttribute(I, String(e)).apply(new g("Stamp hide-price"));
288
+ }
289
+ /**
290
+ * Stamps `hide-price` from config only when the block lacks the attribute —
291
+ * heals templates saved before this feature without dirtying current ones.
292
+ */
293
+ _healHidePriceAttr(t) {
294
+ const e = this._getBlockElement(t);
295
+ if (!e || !("getAttribute" in e) || e.getAttribute(I) !== null)
296
+ return;
297
+ const { priceHideIfSameAsDiscounted: i } = s.getConfig(t);
298
+ this._stampHidePrice(t, i);
283
299
  }
284
300
  /**
285
301
  * Gets the recommendation-id from a block node
@@ -309,10 +325,10 @@ class H extends D {
309
325
  * Migrate configuration from legacy format
310
326
  */
311
327
  _migrateFromLegacy(t) {
312
- c.migrateFromDataAttributes(this.api, t);
328
+ s.migrateFromDataAttributes(this.api, t);
313
329
  }
314
330
  }
315
331
  export {
316
- I as BLOCK_ID,
317
- H as RecommendationBlock
332
+ _ as BLOCK_ID,
333
+ P as RecommendationBlock
318
334
  };
@@ -0,0 +1,16 @@
1
+ const e = `/*
2
+ * Editor-canvas-only styles (ExtensionBuilder.withPreviewStyles).
3
+ * Never reaches the exported email HTML — send-time behavior stays in email-service.
4
+ */
5
+
6
+ /* Hide-if-same: mirror the email-service rule in the canvas. The block-level
7
+ \`hide-price\` attr is the toggle; \`data-same-price\` is stamped per old-price
8
+ cell by the renderers / in-place price updates. Hiding the <p> (not the td)
9
+ keeps inline price columns from collapsing, matching the preview look. */
10
+ .recommendation-block-v2[hide-price="true"] .product-old-price[data-same-price="true"] p {
11
+ display: none;
12
+ }
13
+ `;
14
+ export {
15
+ e as default
16
+ };
@@ -1,34 +1,34 @@
1
- import { DEFAULT_COLUMN_SPACING as R, DEFAULT_ROW_SPACING as U, DEFAULT_MOBILE_ROW_SPACING as i, DEFAULT_MOBILE_COLUMN_SPACING as s, DEFAULT_MOBILE_CARDS_IN_ROW as o, DEFAULT_CARDS_IN_ROW as C } from "./layout.js";
2
- import { ATTR_PRODUCT_IMAGE as _, ATTR_PRODUCT_NAME as e, ATTR_PRODUCT_OLD_PRICE as t, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as r, ATTR_PRODUCT_OMNIBUS_DISCOUNT as I, ATTR_PRODUCT_BUTTON as n } from "./selectors.js";
3
- const O = {
1
+ import { DEFAULT_COLUMN_SPACING as n, DEFAULT_ROW_SPACING as s, DEFAULT_MOBILE_ROW_SPACING as R, DEFAULT_MOBILE_COLUMN_SPACING as U, DEFAULT_MOBILE_CARDS_IN_ROW as e, DEFAULT_CARDS_IN_ROW as C } from "./layout.js";
2
+ import { ATTR_PRODUCT_IMAGE as o, ATTR_PRODUCT_NAME as t, ATTR_PRODUCT_OLD_PRICE as _, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as r, ATTR_PRODUCT_OMNIBUS_DISCOUNT as i, ATTR_PRODUCT_BUTTON as I } from "./selectors.js";
3
+ const D = {
4
4
  code: "USD",
5
5
  symbol: "USD",
6
6
  alignment: "after",
7
7
  decimalCount: 2,
8
8
  decimalSeparator: ".",
9
9
  thousandSeparator: ","
10
- }, D = {
10
+ }, O = {
11
11
  textBefore: "",
12
12
  textAfter: ""
13
- }, A = {
13
+ }, a = {
14
14
  textBefore: "",
15
15
  textAfter: ""
16
- }, a = [
17
- _,
18
- e,
16
+ }, A = [
17
+ o,
19
18
  t,
19
+ _,
20
20
  T,
21
21
  r,
22
- I,
23
- n
24
- ], E = {
25
- [_]: !0,
26
- [e]: !0,
27
- [T]: !0,
22
+ i,
23
+ I
24
+ ], c = {
25
+ [o]: !0,
28
26
  [t]: !0,
27
+ [T]: !0,
28
+ [_]: !0,
29
29
  [r]: !1,
30
- [I]: !1,
31
- [n]: !0
30
+ [i]: !1,
31
+ [I]: !0
32
32
  }, l = {
33
33
  // Settings
34
34
  strategy: "mostPopular",
@@ -36,36 +36,45 @@ const O = {
36
36
  size: "6",
37
37
  shuffleProducts: !1,
38
38
  language: "en_US",
39
- currency: O,
39
+ currency: D,
40
40
  filters: [],
41
41
  // Layout
42
42
  layout: "grid",
43
43
  cardsInRow: C,
44
- mobileCardsInRow: o,
44
+ mobileCardsInRow: e,
45
45
  mobileLayoutEnabled: !1,
46
- previousMobileCardsInRow: o,
47
- columnSpacing: R,
48
- rowSpacing: U,
49
- mobileColumnSpacing: s,
50
- mobileRowSpacing: i,
46
+ previousMobileCardsInRow: e,
47
+ columnSpacing: n,
48
+ rowSpacing: s,
49
+ mobileColumnSpacing: U,
50
+ mobileRowSpacing: R,
51
51
  // Composition
52
- composition: a,
53
- visibility: E,
52
+ composition: A,
53
+ visibility: c,
54
54
  // Element settings
55
- omnibusPrice: D,
56
- omnibusDiscount: A,
55
+ omnibusPrice: O,
56
+ omnibusDiscount: a,
57
57
  textTrimming: !1,
58
+ // Price placement (block-level, affects all cards)
59
+ // Default ON = current stacked look, so existing templates are unaffected.
60
+ priceMovedToNextLine: !0,
61
+ // Default OFF: the original price always shows; the user opts in to hide it
62
+ // when it equals the sale price. Mirrors email-service's `hide-price` default
63
+ // of "false" (the actual hiding happens server-side at send).
64
+ priceHideIfSameAsDiscounted: !1,
58
65
  // Meta
66
+ // Version NOT bumped: mergeWithDefaults() backfills the two new fields from
67
+ // defaults, so no data transform (and no needsMigration trigger) is required.
59
68
  configVersion: 1,
60
69
  recommendationId: 0
61
70
  }, N = [11, 12], m = 1;
62
71
  export {
63
72
  m as CURRENT_CONFIG_VERSION,
64
- a as DEFAULT_COMPOSITION,
65
- O as DEFAULT_CURRENCY,
73
+ A as DEFAULT_COMPOSITION,
74
+ D as DEFAULT_CURRENCY,
66
75
  l as DEFAULT_NODE_CONFIG,
67
- A as DEFAULT_OMNIBUS_DISCOUNT,
68
- D as DEFAULT_OMNIBUS_PRICE,
69
- E as DEFAULT_VISIBILITY,
76
+ a as DEFAULT_OMNIBUS_DISCOUNT,
77
+ O as DEFAULT_OMNIBUS_PRICE,
78
+ c as DEFAULT_VISIBILITY,
70
79
  N as EXCLUDED_ALGORITHM_IDS
71
80
  };