@useinsider/guido 3.7.2-beta.0bf502c → 3.7.2-beta.13c9a35
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.
- package/dist/@types/config/schemas.js +70 -66
- package/dist/composables/usePreviewMode.js +15 -14
- package/dist/composables/useRecommendationPreview.js +100 -0
- package/dist/composables/useStripo.js +54 -68
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +90 -82
- package/dist/config/i18n/en/toasters.json.js +0 -1
- package/dist/config/migrator/recommendation/htmlBuilder.js +59 -58
- package/dist/config/migrator/recommendation/settingsMapper.js +38 -33
- package/dist/extensions/Blocks/Recommendation/block.js +60 -41
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +41 -32
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +369 -288
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +96 -84
- package/dist/extensions/Blocks/Recommendation/controls/main/pricePlacement.js +133 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +82 -80
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +21 -7
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +64 -4
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +7 -5
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +101 -72
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +31 -30
- package/dist/extensions/Blocks/Recommendation/templates/index.js +9 -7
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +74 -59
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +21 -21
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +88 -57
- package/dist/src/@types/config/schemas.d.ts +16 -0
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useRecommendationPreview.d.ts +10 -0
- package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +29 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/pricePlacement.d.ts +59 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -2
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +33 -1
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +15 -0
- package/dist/src/stores/config.d.ts +36 -0
- 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
|
|
3
|
-
import { mapLegacyStrategy as
|
|
4
|
-
function
|
|
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
|
|
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
|
|
12
|
-
if (!Number.isNaN(
|
|
13
|
-
return
|
|
11
|
+
const o = parseInt(t);
|
|
12
|
+
if (!Number.isNaN(o))
|
|
13
|
+
return o;
|
|
14
14
|
}
|
|
15
15
|
return i.decimalCount;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function _(t) {
|
|
18
18
|
return t === "." || t === "," || t === " " || t === "" ? t : ",";
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function N(t) {
|
|
21
21
|
return t === "." || t === "," || t === " " ? t : ".";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function A(t) {
|
|
24
24
|
if (!t || typeof t != "object")
|
|
25
25
|
return { ...i };
|
|
26
|
-
const
|
|
26
|
+
const o = t, n = o.value ?? o.name ?? i.code, r = o.symbol ?? n;
|
|
27
27
|
return {
|
|
28
|
-
code:
|
|
28
|
+
code: n,
|
|
29
29
|
symbol: r,
|
|
30
|
-
alignment:
|
|
31
|
-
decimalCount:
|
|
32
|
-
decimalSeparator:
|
|
33
|
-
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
|
|
36
|
+
function L(t) {
|
|
37
37
|
return t === "horizontal" || t === "list" ? "list" : "grid";
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
function R(t) {
|
|
40
|
+
return l(t) || "mostPopular";
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const r =
|
|
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:
|
|
46
|
-
strategy:
|
|
45
|
+
recommendationId: n,
|
|
46
|
+
strategy: R(t.strategy),
|
|
47
47
|
productIds: (t.productIds ?? []).map((e) => String(e)),
|
|
48
|
-
size: String(
|
|
48
|
+
size: String(u),
|
|
49
49
|
shuffleProducts: !!t.shuffleProducts,
|
|
50
50
|
language: t.language ?? "en_US",
|
|
51
|
-
currency:
|
|
51
|
+
currency: A(t.currencySettings),
|
|
52
52
|
filters: (t.filters ?? []).map((e) => ({ ...e })),
|
|
53
|
-
layout:
|
|
53
|
+
layout: L(t.orientation ?? o.orientation),
|
|
54
54
|
cardsInRow: r,
|
|
55
|
-
mobileCardsInRow:
|
|
55
|
+
mobileCardsInRow: a,
|
|
56
56
|
mobileLayoutEnabled: !1,
|
|
57
|
-
previousMobileCardsInRow:
|
|
58
|
-
columnSpacing:
|
|
59
|
-
rowSpacing:
|
|
60
|
-
mobileColumnSpacing:
|
|
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
|
-
|
|
69
|
-
|
|
73
|
+
A as mapCurrency,
|
|
74
|
+
U as mapSettings
|
|
70
75
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
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
|
|
7
|
-
import { regenerateMobileProductRows as
|
|
8
|
-
import { ensureMobileCssRulesExist as p, setMobileLayoutOptOut as f, hasMobileLayoutOptOut as
|
|
9
|
-
import { RecommendationConfigService as
|
|
10
|
-
import { useRecommendationExtensionStore as
|
|
11
|
-
import { getDefaultTemplate as
|
|
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
|
|
14
|
-
let
|
|
15
|
-
class
|
|
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
|
-
|
|
22
|
+
h(this, "_pendingBlockId", null);
|
|
23
23
|
}
|
|
24
24
|
getId() {
|
|
25
|
-
return
|
|
25
|
+
return _;
|
|
26
26
|
}
|
|
27
27
|
getIcon() {
|
|
28
28
|
return "recommendation-icon";
|
|
29
29
|
}
|
|
30
30
|
getBlockCompositionType() {
|
|
31
|
-
return
|
|
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
|
-
|
|
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
|
);
|
|
@@ -60,7 +60,7 @@ class H extends D {
|
|
|
60
60
|
*/
|
|
61
61
|
getTemplate() {
|
|
62
62
|
const t = this._generateNextId();
|
|
63
|
-
return this._pendingBlockId = t,
|
|
63
|
+
return this._pendingBlockId = t, S(t);
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Called when a new block is dropped into the template
|
|
@@ -83,20 +83,20 @@ class H extends D {
|
|
|
83
83
|
}
|
|
84
84
|
const i = this._pendingBlockId ?? this._generateNextId();
|
|
85
85
|
this._pendingBlockId = null, this._assignRecommendationId(t, i);
|
|
86
|
-
const { config: n, wasFreshDrop: o } =
|
|
86
|
+
const { config: n, wasFreshDrop: o } = s.initializeConfig(
|
|
87
87
|
this.api,
|
|
88
88
|
t,
|
|
89
89
|
{ recommendationId: i }
|
|
90
|
-
),
|
|
91
|
-
if (
|
|
90
|
+
), r = d();
|
|
91
|
+
if (r.setCurrentBlock(i), this._stampHidePrice(t, n.priceHideIfSameAsDiscounted), o) {
|
|
92
92
|
p(this.api);
|
|
93
93
|
const l = this._getBlockElement(t);
|
|
94
|
-
l && (f(this.api, l, !0),
|
|
94
|
+
l && (f(this.api, l, !0), C({
|
|
95
95
|
currentNode: t,
|
|
96
96
|
documentModifier: this.api.getDocumentModifier()
|
|
97
97
|
}));
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
r.patchCurrentBlockConfig({ language: n.language }, { triggerRefetch: !1 }), this._warnIfMultipleBlocks();
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* Called when the document changes or template is loaded
|
|
@@ -109,20 +109,20 @@ class H extends D {
|
|
|
109
109
|
if (!(!t || !("getNodeConfig" in t))) {
|
|
110
110
|
if (!this._getRecommendationId(t)) {
|
|
111
111
|
const e = this._generateNextId();
|
|
112
|
-
this._assignRecommendationId(t, e),
|
|
112
|
+
this._assignRecommendationId(t, e), s.hasConfig(t) && s.updateConfig(
|
|
113
113
|
this.api,
|
|
114
114
|
t,
|
|
115
115
|
{ recommendationId: e },
|
|
116
116
|
"Assign recommendation ID to legacy block"
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
-
this._healLingeringDuplicate(t),
|
|
119
|
+
this._healLingeringDuplicate(t), s.needsMigration(t) && this._migrateFromLegacy(t), this._healHidePriceAttr(t);
|
|
120
120
|
try {
|
|
121
|
-
|
|
122
|
-
const e =
|
|
121
|
+
k || (p(this.api), k = !0);
|
|
122
|
+
const e = s.getConfig(t), i = this._getBlockElement(t);
|
|
123
123
|
if (i) {
|
|
124
124
|
const n = !e.mobileLayoutEnabled;
|
|
125
|
-
|
|
125
|
+
E(i) !== n && f(this.api, i, n);
|
|
126
126
|
}
|
|
127
127
|
} catch {
|
|
128
128
|
}
|
|
@@ -136,7 +136,7 @@ class H extends D {
|
|
|
136
136
|
*/
|
|
137
137
|
onDelete(t) {
|
|
138
138
|
const e = this._getRecommendationId(t);
|
|
139
|
-
e &&
|
|
139
|
+
e && d().removeBlockState(e);
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
142
|
* Warns (dark advisory toaster) when the design holds more than one live
|
|
@@ -166,8 +166,8 @@ class H extends D {
|
|
|
166
166
|
const e = this.api.getDocumentRoot();
|
|
167
167
|
e && "querySelectorAll" in e && e.querySelectorAll(`.${m}`).forEach((n) => {
|
|
168
168
|
if ("getAttribute" in n) {
|
|
169
|
-
const o = n.getAttribute(u),
|
|
170
|
-
|
|
169
|
+
const o = n.getAttribute(u), r = o ? parseInt(o) : 0;
|
|
170
|
+
r > t && (t = r);
|
|
171
171
|
}
|
|
172
172
|
});
|
|
173
173
|
} catch {
|
|
@@ -201,13 +201,13 @@ class H extends D {
|
|
|
201
201
|
const o = this._getBlockElement(t);
|
|
202
202
|
if (!o)
|
|
203
203
|
return;
|
|
204
|
-
let
|
|
204
|
+
let r = -1;
|
|
205
205
|
for (let l = 0; l < n.length; l++)
|
|
206
206
|
if (n[l] === o) {
|
|
207
|
-
|
|
207
|
+
r = l;
|
|
208
208
|
break;
|
|
209
209
|
}
|
|
210
|
-
if (
|
|
210
|
+
if (r <= 0)
|
|
211
211
|
return;
|
|
212
212
|
this._reassignDuplicateId(t, e);
|
|
213
213
|
} catch {
|
|
@@ -227,7 +227,7 @@ class H extends D {
|
|
|
227
227
|
}
|
|
228
228
|
/** Assigns a fresh id to a duplicated block and syncs DOM, node config and store. */
|
|
229
229
|
_handleDuplicate(t, e) {
|
|
230
|
-
const i = this._reassignDuplicateId(t, e), n =
|
|
230
|
+
const i = this._reassignDuplicateId(t, e), n = d();
|
|
231
231
|
n.cloneBlockState(e, i), n.setCurrentBlock(i), this._warnIfMultipleBlocks();
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
@@ -243,7 +243,7 @@ class H extends D {
|
|
|
243
243
|
*/
|
|
244
244
|
_reassignDuplicateId(t, e) {
|
|
245
245
|
const i = this._generateNextId(), n = this._getBlockElement(t);
|
|
246
|
-
return this._assignRecommendationId(t, i), n && this._reassignInstanceClass(n, e, i),
|
|
246
|
+
return this._assignRecommendationId(t, i), n && this._reassignInstanceClass(n, e, i), s.hasConfig(t) && s.updateConfig(
|
|
247
247
|
this.api,
|
|
248
248
|
t,
|
|
249
249
|
{ recommendationId: i },
|
|
@@ -260,8 +260,8 @@ class H extends D {
|
|
|
260
260
|
_reassignInstanceClass(t, e, i) {
|
|
261
261
|
if (!("getAttribute" in t))
|
|
262
262
|
return;
|
|
263
|
-
const n = `ins-recommendation-v3-block-${e}`, o = `ins-recommendation-v3-block-${i}`,
|
|
264
|
-
|
|
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(
|
|
265
265
|
`Reassign recommendation instance class ${n} -> ${o}`
|
|
266
266
|
));
|
|
267
267
|
}
|
|
@@ -276,7 +276,26 @@ class H extends D {
|
|
|
276
276
|
if (!i)
|
|
277
277
|
return;
|
|
278
278
|
const n = this.api.getDocumentModifier();
|
|
279
|
-
n.modifyHtml(i).setAttribute(u, e.toString()), n.apply(new
|
|
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);
|
|
280
299
|
}
|
|
281
300
|
/**
|
|
282
301
|
* Gets the recommendation-id from a block node
|
|
@@ -306,10 +325,10 @@ class H extends D {
|
|
|
306
325
|
* Migrate configuration from legacy format
|
|
307
326
|
*/
|
|
308
327
|
_migrateFromLegacy(t) {
|
|
309
|
-
|
|
328
|
+
s.migrateFromDataAttributes(this.api, t);
|
|
310
329
|
}
|
|
311
330
|
}
|
|
312
331
|
export {
|
|
313
|
-
|
|
314
|
-
|
|
332
|
+
_ as BLOCK_ID,
|
|
333
|
+
P as RecommendationBlock
|
|
315
334
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { DEFAULT_COLUMN_SPACING as
|
|
2
|
-
import { ATTR_PRODUCT_IMAGE as
|
|
3
|
-
const
|
|
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
|
-
},
|
|
10
|
+
}, O = {
|
|
11
11
|
textBefore: "",
|
|
12
12
|
textAfter: ""
|
|
13
|
-
},
|
|
13
|
+
}, a = {
|
|
14
14
|
textBefore: "",
|
|
15
15
|
textAfter: ""
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
e,
|
|
16
|
+
}, A = [
|
|
17
|
+
o,
|
|
19
18
|
t,
|
|
19
|
+
_,
|
|
20
20
|
T,
|
|
21
21
|
r,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
],
|
|
25
|
-
[
|
|
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
|
-
[
|
|
31
|
-
[
|
|
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:
|
|
39
|
+
currency: D,
|
|
40
40
|
filters: [],
|
|
41
41
|
// Layout
|
|
42
42
|
layout: "grid",
|
|
43
43
|
cardsInRow: C,
|
|
44
|
-
mobileCardsInRow:
|
|
44
|
+
mobileCardsInRow: e,
|
|
45
45
|
mobileLayoutEnabled: !1,
|
|
46
|
-
previousMobileCardsInRow:
|
|
47
|
-
columnSpacing:
|
|
48
|
-
rowSpacing:
|
|
49
|
-
mobileColumnSpacing:
|
|
50
|
-
mobileRowSpacing:
|
|
46
|
+
previousMobileCardsInRow: e,
|
|
47
|
+
columnSpacing: n,
|
|
48
|
+
rowSpacing: s,
|
|
49
|
+
mobileColumnSpacing: U,
|
|
50
|
+
mobileRowSpacing: R,
|
|
51
51
|
// Composition
|
|
52
|
-
composition:
|
|
53
|
-
visibility:
|
|
52
|
+
composition: A,
|
|
53
|
+
visibility: c,
|
|
54
54
|
// Element settings
|
|
55
|
-
omnibusPrice:
|
|
56
|
-
omnibusDiscount:
|
|
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
|
-
|
|
65
|
-
|
|
73
|
+
A as DEFAULT_COMPOSITION,
|
|
74
|
+
D as DEFAULT_CURRENCY,
|
|
66
75
|
l as DEFAULT_NODE_CONFIG,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
};
|