@useinsider/guido 3.16.0 → 3.17.0-beta.58179dc
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/composables/useRecommendation.js +20 -19
- package/dist/composables/useStripo.js +30 -29
- package/dist/config/migrator/index.js +9 -8
- package/dist/config/migrator/itemsBlockMigrator.js +1 -1
- package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
- package/dist/config/migrator/recommendation/extractors.js +29 -24
- package/dist/config/migrator/recommendation/htmlBuilder.js +116 -130
- package/dist/config/migrator/recommendationMigrator.js +18 -15
- package/dist/config/migrator/recommendationTitleMigrator.js +119 -0
- package/dist/enums/recommendation.js +17 -17
- package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -45
- package/dist/extensions/Blocks/Recommendation/block.js +49 -20
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +23 -22
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +34 -28
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +306 -238
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +37 -26
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +29 -28
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +1 -0
- package/dist/extensions/Blocks/Recommendation/controls/title/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +31 -29
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +23 -4
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +13 -12
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
- package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +33 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +85 -107
- package/dist/extensions/Blocks/Recommendation/utils/legacyTitle.js +20 -0
- package/dist/extensions/Blocks/Recommendation/utils/productIds.js +6 -0
- package/dist/src/config/migrator/recommendation/extractors.d.ts +8 -0
- package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +2 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +86 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyTitle.d.ts +20 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/productIds.d.ts +6 -0
- package/dist/static/styles/customEditorStyle.css.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var f = (s, t, e) => t in s ? R(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var a = (s, t, e) => f(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { RecommendationBlockId as d } from "../../extensions/Blocks/Recommendation/constants/blockIds.js";
|
|
5
|
+
import { BLOCK_ROOT_SELECTOR as u, CSS_CLASS_SKIP_COMPILE as m, ATTR_DATA_ATTRIBUTE_TYPE as S, ATTR_RECOMMENDATION_TITLE as l, CONTAINER_SELECTOR as E, CSS_CLASS_TITLE_CELL as c, CSS_CLASS_SPACER as C, CSS_CLASS_ATTRIBUTE_ROW as A, ATTR_DATA_VISIBILITY as L } from "../../extensions/Blocks/Recommendation/constants/selectors.js";
|
|
6
|
+
const p = u.slice(1), g = `${u}:not(.${m})`, O = `[${S}="${l}"]`, h = "td.esd-block-text", _ = "table.container > tbody", T = "esd-ext-config";
|
|
7
|
+
class y {
|
|
8
|
+
constructor() {
|
|
9
|
+
a(this, "parser");
|
|
10
|
+
this.parser = new DOMParser();
|
|
11
|
+
}
|
|
12
|
+
migrate(t) {
|
|
13
|
+
try {
|
|
14
|
+
if (!t.includes(p))
|
|
15
|
+
return t;
|
|
16
|
+
const e = this.parser.parseFromString(t, "text/html");
|
|
17
|
+
return Array.from(e.querySelectorAll(g)).reduce(
|
|
18
|
+
(n, o) => this._migrateBlock(o) || n,
|
|
19
|
+
!1
|
|
20
|
+
) ? e.documentElement.outerHTML : t;
|
|
21
|
+
} catch (e) {
|
|
22
|
+
return console.error("RecommendationTitleMigrator failed:", e), t;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Migrates one block. Returns `true` when the block was changed. */
|
|
26
|
+
_migrateBlock(t) {
|
|
27
|
+
if (t.querySelector(O) || this._hasRecordedTitleState(t))
|
|
28
|
+
return !1;
|
|
29
|
+
const e = this._findTitleCell(t), i = e !== null && (e.textContent ?? "").trim().length > 0;
|
|
30
|
+
return i ? this._tagExistingTitle(t, e) : this._removeTitleRemnants(t, e), this._writeVisibility(t, i), !0;
|
|
31
|
+
}
|
|
32
|
+
/** The only `esd-block-text` cell outside the product containers is the title. */
|
|
33
|
+
_findTitleCell(t) {
|
|
34
|
+
return Array.from(t.querySelectorAll(h)).find((e) => !e.closest(E) && this._isTitlePosition(t, e)) ?? null;
|
|
35
|
+
}
|
|
36
|
+
_isTitlePosition(t, e) {
|
|
37
|
+
var r;
|
|
38
|
+
const i = this._wrapperRowOf(t, e);
|
|
39
|
+
return e.classList.contains(c) || i !== null && i === ((r = i.parentElement) == null ? void 0 : r.firstElementChild);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Stamps the attribute-row tagging onto the title's wrapper row and the spacer
|
|
43
|
+
* below it, so one toggle governs the pair and the compiler drops both when off.
|
|
44
|
+
*/
|
|
45
|
+
_tagExistingTitle(t, e) {
|
|
46
|
+
e.classList.add(c), e.setAttribute("esd-extension-block-id", d.TITLE);
|
|
47
|
+
const i = this._wrapperRowOf(t, e);
|
|
48
|
+
if (!i)
|
|
49
|
+
return;
|
|
50
|
+
this._tagRow(i);
|
|
51
|
+
const r = i.nextElementSibling;
|
|
52
|
+
r && this._isSpacerRow(r) && this._tagRow(r);
|
|
53
|
+
}
|
|
54
|
+
/** The `<tr>` inside `table.container > tbody` that wraps the title's own table. */
|
|
55
|
+
_wrapperRowOf(t, e) {
|
|
56
|
+
if (!e)
|
|
57
|
+
return null;
|
|
58
|
+
const i = t.querySelector(_);
|
|
59
|
+
return Array.from((i == null ? void 0 : i.children) ?? []).find((r) => r.contains(e)) ?? null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Direct children only — a product-container row holds spacer cells further down,
|
|
63
|
+
* and `querySelector` would happily reach them. (`:scope >` is unsupported in happy-dom.)
|
|
64
|
+
*/
|
|
65
|
+
_isSpacerRow(t) {
|
|
66
|
+
return Array.from(t.children).some((e) => e.classList.contains(C));
|
|
67
|
+
}
|
|
68
|
+
_tagRow(t) {
|
|
69
|
+
t.classList.add(A), t.setAttribute(S, l), t.setAttribute(L, "1");
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A deleted title leaves nothing to tag — the toggle re-injects the markup only
|
|
73
|
+
* when the user switches it back on. Its leftovers (an emptied wrapper row, the
|
|
74
|
+
* spacer that trailed it) would otherwise render as blank padding on top.
|
|
75
|
+
*/
|
|
76
|
+
_removeTitleRemnants(t, e) {
|
|
77
|
+
var o;
|
|
78
|
+
const i = this._wrapperRowOf(t, e), r = i == null ? void 0 : i.nextElementSibling;
|
|
79
|
+
if (r && this._isSpacerRow(r) && r.remove(), i) {
|
|
80
|
+
i.remove();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const n = (o = t.querySelector(_)) == null ? void 0 : o.firstElementChild;
|
|
84
|
+
n && this._isSpacerRow(n) && n.remove();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Mirrors the resolved state into the persisted config blob, so a saved module
|
|
88
|
+
* whose `data-*` attributes Stripo strips on re-drop still restores the toggle.
|
|
89
|
+
*/
|
|
90
|
+
_writeVisibility(t, e) {
|
|
91
|
+
const i = this._readConfig(t);
|
|
92
|
+
if (!i)
|
|
93
|
+
return;
|
|
94
|
+
const r = typeof i.visibility == "object" && i.visibility !== null ? i.visibility : {};
|
|
95
|
+
i.visibility = { ...r, [l]: e }, t.setAttribute(T, JSON.stringify(i));
|
|
96
|
+
}
|
|
97
|
+
_hasRecordedTitleState(t) {
|
|
98
|
+
var i;
|
|
99
|
+
const e = (i = this._readConfig(t)) == null ? void 0 : i.visibility;
|
|
100
|
+
return typeof e == "object" && e !== null && l in e;
|
|
101
|
+
}
|
|
102
|
+
_readConfig(t) {
|
|
103
|
+
const e = t.getAttribute(T);
|
|
104
|
+
if (!e)
|
|
105
|
+
return null;
|
|
106
|
+
try {
|
|
107
|
+
const i = JSON.parse(e);
|
|
108
|
+
return typeof i == "object" && i !== null ? i : null;
|
|
109
|
+
} catch {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function v(s) {
|
|
115
|
+
return new y().migrate(s);
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
v as migrateRecommendationTitle
|
|
119
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const e = 20,
|
|
1
|
+
const e = 20, t = 320, s = "vertical", m = {
|
|
2
2
|
CART_ABANDONMENT: {
|
|
3
|
-
ins_apr_img_1: "https://
|
|
4
|
-
ins_apr_img_2: "https://
|
|
5
|
-
ins_apr_img_3: "https://
|
|
6
|
-
ins_apr_img_4: "https://
|
|
3
|
+
ins_apr_img_1: "https://web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_1.png",
|
|
4
|
+
ins_apr_img_2: "https://web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_2.png",
|
|
5
|
+
ins_apr_img_3: "https://web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_3.png",
|
|
6
|
+
ins_apr_img_4: "https://web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_4.png"
|
|
7
7
|
},
|
|
8
8
|
BROWSE_ABANDONMENT: {
|
|
9
|
-
browsed_item_img_1: "https://
|
|
10
|
-
browsed_item_img_2: "https://
|
|
11
|
-
browsed_item_img_3: "https://
|
|
12
|
-
browsed_item_img_4: "https://
|
|
9
|
+
browsed_item_img_1: "https://web-image.useinsider.com/email-assets/dummyImages/browsed_item_img_1.jpg",
|
|
10
|
+
browsed_item_img_2: "https://web-image.useinsider.com/email-assets/dummyImages/browsed_item_img_2.jpg",
|
|
11
|
+
browsed_item_img_3: "https://web-image.useinsider.com/email-assets/dummyImages/browsed_item_img_3.jpg",
|
|
12
|
+
browsed_item_img_4: "https://web-image.useinsider.com/email-assets/dummyImages/browsed_item_img_4.jpg"
|
|
13
13
|
}
|
|
14
14
|
}, i = {
|
|
15
15
|
DISCOUNT: "discount",
|
|
@@ -23,7 +23,7 @@ const e = 20, s = 320, t = "vertical", m = {
|
|
|
23
23
|
},
|
|
24
24
|
ELSE: "{% else %}",
|
|
25
25
|
END_IF: "{% endif %}"
|
|
26
|
-
},
|
|
26
|
+
}, n = {
|
|
27
27
|
ID: /recommendation-id="(.*?)"/gi,
|
|
28
28
|
ATTRIBUTE_PARAGRAPH: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)"[^>]*>[\S\s]*?<\/p>/gm,
|
|
29
29
|
ATTRIBUTE_PARAGRAPH_START_TAG: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)"[^>]*>/gm,
|
|
@@ -31,9 +31,9 @@ const e = 20, s = 320, t = "vertical", m = {
|
|
|
31
31
|
CUSTOM_FIELD: /{{(?:reco_)?[0-9]+_[0-8]_(discount|omnibus_discount|omnibus_price)}}/gm,
|
|
32
32
|
CUSTOM_FIELD_INDEXES_PART: /{{(?:reco_)?[0-9]+_[0-8]_/gm,
|
|
33
33
|
CUSTOM_FIELD_NAME_PART: /_(discount|omnibus_discount|omnibus_price)}}/gm
|
|
34
|
-
}, n = {
|
|
35
|
-
PARAGRAPH_END_TAG: "</p>"
|
|
36
34
|
}, o = {
|
|
35
|
+
PARAGRAPH_END_TAG: "</p>"
|
|
36
|
+
}, a = {
|
|
37
37
|
REGULAR_NAME_HEIGHT: ".ext-product-name.ins-vertical p { height:90px!important;",
|
|
38
38
|
TRIMMED_NAME_HEIGHT: ".ext-product-name.ins-vertical p { height:18px!important;",
|
|
39
39
|
ELLIPSIS: "text-overflow:ellipsis!important; white-space:nowrap!important;",
|
|
@@ -47,11 +47,11 @@ const e = 20, s = 320, t = "vertical", m = {
|
|
|
47
47
|
export {
|
|
48
48
|
i as ATTRIBUTES,
|
|
49
49
|
_ as CONDITIONS,
|
|
50
|
-
|
|
50
|
+
a as CSS,
|
|
51
51
|
m as DUMMY_IMAGE_MAPPINGS,
|
|
52
52
|
e as DefaultPadding,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
o as HTML,
|
|
54
|
+
t as MinDeviceViewport,
|
|
55
|
+
n as REGEX,
|
|
56
|
+
s as VerticalOrientation
|
|
57
57
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import E from "../../../../node_modules/lodash-es/flatMap.js";
|
|
2
|
+
import s from "../../../../node_modules/lodash-es/range.js";
|
|
3
|
+
const t = '<td align="center" class="ins-product-td items-block items-block-v2">', r = { PAIRS_FOR_EXTENSION: {
|
|
4
4
|
imageSrc: {
|
|
5
5
|
CART_ITEMS: {
|
|
6
6
|
ATTR: "ins_apr_img",
|
|
7
7
|
DEFAULT: [
|
|
8
|
-
"https://
|
|
9
|
-
"https://
|
|
10
|
-
"https://
|
|
11
|
-
"https://
|
|
12
|
-
"https://
|
|
13
|
-
"https://
|
|
14
|
-
"https://
|
|
15
|
-
"https://
|
|
8
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_1.jpeg",
|
|
9
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_2.webp",
|
|
10
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_3.jpeg",
|
|
11
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_4.jpeg",
|
|
12
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_5.jpeg",
|
|
13
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_6.jpeg",
|
|
14
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_7.jpeg",
|
|
15
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_8.jpeg"
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
BROWSED_ITEMS: {
|
|
19
19
|
ATTR: "browsed_item_img",
|
|
20
20
|
DEFAULT: [
|
|
21
|
-
"https://
|
|
22
|
-
"https://
|
|
23
|
-
"https://
|
|
24
|
-
"https://
|
|
25
|
-
"https://
|
|
26
|
-
"https://
|
|
27
|
-
"https://
|
|
28
|
-
"https://
|
|
21
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_1.jpeg",
|
|
22
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_2.webp",
|
|
23
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_3.jpeg",
|
|
24
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_4.jpeg",
|
|
25
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_5.jpeg",
|
|
26
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_6.jpeg",
|
|
27
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_7.jpeg",
|
|
28
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_8.jpeg"
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
31
|
PURCHASED_ITEMS: {
|
|
32
32
|
ATTR: "purchased_item_img",
|
|
33
33
|
DEFAULT: [
|
|
34
|
-
"https://
|
|
35
|
-
"https://
|
|
36
|
-
"https://
|
|
37
|
-
"https://
|
|
38
|
-
"https://
|
|
39
|
-
"https://
|
|
40
|
-
"https://
|
|
41
|
-
"https://
|
|
34
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_1.jpeg",
|
|
35
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_2.webp",
|
|
36
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_3.jpeg",
|
|
37
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_4.jpeg",
|
|
38
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_5.jpeg",
|
|
39
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_6.jpeg",
|
|
40
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_7.jpeg",
|
|
41
|
+
"https://web-image.useinsider.com/email-assets/dummyImages/products/ins_apr_img_8.jpeg"
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
44
|
},
|
|
@@ -211,27 +211,27 @@ const T = '<td align="center" class="ins-product-td items-block items-block-v2">
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
} };
|
|
214
|
-
function
|
|
215
|
-
return
|
|
214
|
+
function a(e, i = 8) {
|
|
215
|
+
return s(1, i + 1).map((_) => `${e}_${_}`);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
const { PAIRS_FOR_EXTENSION: e } =
|
|
219
|
-
return
|
|
217
|
+
function R() {
|
|
218
|
+
const { PAIRS_FOR_EXTENSION: e } = r, i = [];
|
|
219
|
+
return i.push(
|
|
220
220
|
e.imageSrc.CART_ITEMS.ATTR,
|
|
221
221
|
e.imageSrc.BROWSED_ITEMS.ATTR,
|
|
222
222
|
e.imageSrc.PURCHASED_ITEMS.ATTR
|
|
223
|
-
),
|
|
223
|
+
), i.push(
|
|
224
224
|
e.name.CART_ITEMS.ATTR,
|
|
225
225
|
e.name.CART_ITEMS.HREF,
|
|
226
226
|
e.name.BROWSED_ITEMS.ATTR,
|
|
227
227
|
e.name.BROWSED_ITEMS.HREF,
|
|
228
228
|
e.name.PURCHASED_ITEMS.ATTR,
|
|
229
229
|
e.name.PURCHASED_ITEMS.HREF
|
|
230
|
-
),
|
|
230
|
+
), i.push(
|
|
231
231
|
e.quantity.CART_ITEMS.ATTR,
|
|
232
232
|
e.quantity.BROWSED_ITEMS.ATTR,
|
|
233
233
|
e.quantity.PURCHASED_ITEMS.ATTR
|
|
234
|
-
),
|
|
234
|
+
), i.push(
|
|
235
235
|
e.price.CART_ITEMS.PRICE,
|
|
236
236
|
e.price.CART_ITEMS.PRICE_FORMATTED,
|
|
237
237
|
e.price.CART_ITEMS.SINGLE_PRICE,
|
|
@@ -247,7 +247,7 @@ function r() {
|
|
|
247
247
|
e.price.PURCHASED_ITEMS.SINGLE_PRICE,
|
|
248
248
|
e.price.PURCHASED_ITEMS.SINGLE_PRICE_FORMATTED,
|
|
249
249
|
e.price.PURCHASED_ITEMS.CURRENCY
|
|
250
|
-
),
|
|
250
|
+
), i.push(
|
|
251
251
|
e.originalPrice.CART_ITEMS.PRICE,
|
|
252
252
|
e.originalPrice.CART_ITEMS.PRICE_FORMATTED,
|
|
253
253
|
e.originalPrice.CART_ITEMS.SINGLE_PRICE,
|
|
@@ -263,22 +263,22 @@ function r() {
|
|
|
263
263
|
e.originalPrice.PURCHASED_ITEMS.SINGLE_PRICE,
|
|
264
264
|
e.originalPrice.PURCHASED_ITEMS.SINGLE_PRICE_FORMATTED,
|
|
265
265
|
e.originalPrice.PURCHASED_ITEMS.CURRENCY
|
|
266
|
-
),
|
|
266
|
+
), i.push(
|
|
267
267
|
e.button.CART_ITEMS.HREF,
|
|
268
268
|
e.button.BROWSED_ITEMS.HREF,
|
|
269
269
|
e.button.PURCHASED_ITEMS.HREF
|
|
270
|
-
),
|
|
270
|
+
), i.push(
|
|
271
271
|
e.itemLink.CART_ITEMS.HREF,
|
|
272
272
|
e.itemLink.BROWSED_ITEMS.HREF,
|
|
273
273
|
e.itemLink.PURCHASED_ITEMS.HREF
|
|
274
|
-
),
|
|
274
|
+
), i;
|
|
275
275
|
}
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
(e) =>
|
|
276
|
+
const p = E(
|
|
277
|
+
R(),
|
|
278
|
+
(e) => a(e)
|
|
279
279
|
);
|
|
280
280
|
export {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
p as itemsBlockDynamicVariables,
|
|
282
|
+
r as productPairs,
|
|
283
|
+
t as templateFirstLine
|
|
284
284
|
};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var h = (a, c, t) =>
|
|
4
|
-
import { BlockId as
|
|
5
|
-
import { getMigrationBannerHtml as
|
|
6
|
-
import { Block as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
var A = Object.defineProperty;
|
|
2
|
+
var C = (a, c, t) => c in a ? A(a, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[c] = t;
|
|
3
|
+
var h = (a, c, t) => C(a, typeof c != "symbol" ? c + "" : c, t);
|
|
4
|
+
import { BlockId as y } from "../../../enums/block.js";
|
|
5
|
+
import { getMigrationBannerHtml as R } from "../../../utils/migrationBannerHtml.js";
|
|
6
|
+
import { Block as B, BlockCompositionType as E, ModificationDescription as g } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
+
import { RecommendationBlockId as T } from "./constants/blockIds.js";
|
|
8
|
+
import { CSS_CLASS_SKIP_COMPILE as D, SELECTOR_TITLE_CELL as b, CSS_CLASS_TITLE_CELL as S, CSS_CLASS_ATTRIBUTE_ROW as L, ATTR_DATA_ATTRIBUTE_TYPE as M, ATTR_RECOMMENDATION_TITLE as O, ATTR_DATA_VISIBILITY as N } from "./constants/selectors.js";
|
|
9
|
+
import { regenerateMobileProductRows as w } from "./controls/main/utils.js";
|
|
10
|
+
import { ensureMobileCssRulesExist as p, setMobileLayoutOptOut as f, hasMobileLayoutOptOut as H } from "./controls/mobileLayout/cssRules.js";
|
|
9
11
|
import { RecommendationConfigService as s } from "./services/configService.js";
|
|
10
12
|
import { useRecommendationExtensionStore as d } from "./store/recommendation.js";
|
|
11
|
-
import { getDefaultTemplate as
|
|
12
|
-
import { useRecommendationBlockWarning as
|
|
13
|
-
|
|
13
|
+
import { getDefaultTemplate as x } from "./templates/grid/template.js";
|
|
14
|
+
import { useRecommendationBlockWarning as $ } from "./useRecommendationBlockWarning.js";
|
|
15
|
+
import { findLegacyTitle as P } from "./utils/legacyTitle.js";
|
|
16
|
+
const _ = y.Recommendation, m = "recommendation-block-v2", u = "recommendation-id", I = "hide-price";
|
|
14
17
|
let k = !1;
|
|
15
|
-
class
|
|
18
|
+
class X extends B {
|
|
16
19
|
constructor() {
|
|
17
20
|
super();
|
|
18
21
|
/**
|
|
@@ -28,7 +31,7 @@ class P extends b {
|
|
|
28
31
|
return "recommendation-icon";
|
|
29
32
|
}
|
|
30
33
|
getBlockCompositionType() {
|
|
31
|
-
return
|
|
34
|
+
return E.CONTAINER;
|
|
32
35
|
}
|
|
33
36
|
getName() {
|
|
34
37
|
return this.api.translate("Recommendation Block");
|
|
@@ -39,7 +42,7 @@ class P extends b {
|
|
|
39
42
|
);
|
|
40
43
|
}
|
|
41
44
|
getSettingsPanelTitleHtml() {
|
|
42
|
-
return
|
|
45
|
+
return R(
|
|
43
46
|
_,
|
|
44
47
|
this.api.translate("Recommendation Block"),
|
|
45
48
|
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.")
|
|
@@ -63,7 +66,7 @@ class P extends b {
|
|
|
63
66
|
*/
|
|
64
67
|
getTemplate() {
|
|
65
68
|
const t = this._generateNextId();
|
|
66
|
-
return this._pendingBlockId = t,
|
|
69
|
+
return this._pendingBlockId = t, x(t);
|
|
67
70
|
}
|
|
68
71
|
/**
|
|
69
72
|
* Called when a new block is dropped into the template
|
|
@@ -94,7 +97,7 @@ class P extends b {
|
|
|
94
97
|
if (r.setCurrentBlock(i), this._stampHidePrice(t, n.priceHideIfSameAsDiscounted), o) {
|
|
95
98
|
p(this.api);
|
|
96
99
|
const l = this._getBlockElement(t);
|
|
97
|
-
l && (f(this.api, l, !0),
|
|
100
|
+
l && (f(this.api, l, !0), w({
|
|
98
101
|
currentNode: t,
|
|
99
102
|
documentModifier: this.api.getDocumentModifier()
|
|
100
103
|
}));
|
|
@@ -119,18 +122,44 @@ class P extends b {
|
|
|
119
122
|
"Assign recommendation ID to legacy block"
|
|
120
123
|
);
|
|
121
124
|
}
|
|
122
|
-
this._healLingeringDuplicate(t), s.needsMigration(t) && this._migrateFromLegacy(t), this._healHidePriceAttr(t);
|
|
125
|
+
this._healLingeringDuplicate(t), s.needsMigration(t) && this._migrateFromLegacy(t), this._healHidePriceAttr(t), this._healLegacyTitle(t);
|
|
123
126
|
try {
|
|
124
127
|
k || (p(this.api), k = !0);
|
|
125
128
|
const e = s.getConfig(t), i = this._getBlockElement(t);
|
|
126
129
|
if (i) {
|
|
127
130
|
const n = !e.mobileLayoutEnabled;
|
|
128
|
-
|
|
131
|
+
H(i) !== n && f(this.api, i, n);
|
|
129
132
|
}
|
|
130
133
|
} catch {
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Adopts the plain text cell a pre-SD-147795 block used as its title.
|
|
139
|
+
*
|
|
140
|
+
* `recommendationTitleMigrator` tags that cell before the document is handed
|
|
141
|
+
* to Stripo, but Stripo serves a template it already holds in its own storage
|
|
142
|
+
* (`forceRecreate: false`) and drops the HTML we pass, so for an already-saved
|
|
143
|
+
* campaign the tagging only ever lands here. Without it the title is an
|
|
144
|
+
* ordinary text block: Card Composition reads the toggle as off while the
|
|
145
|
+
* title is on screen, switching it on prepends a second title, and the cell
|
|
146
|
+
* keeps the generic delete/duplicate node actions the CSS hides by class.
|
|
147
|
+
*
|
|
148
|
+
* Partner-managed blocks are left alone, the same exclusion the migrator makes.
|
|
149
|
+
* @param node - The block node that may still carry an untagged title
|
|
150
|
+
*/
|
|
151
|
+
_healLegacyTitle(t) {
|
|
152
|
+
const e = this._getBlockElement(t);
|
|
153
|
+
if (!e || !("querySelector" in e) || !("hasClass" in e) || e.hasClass(D) || e.querySelector(b))
|
|
154
|
+
return;
|
|
155
|
+
const i = P(e);
|
|
156
|
+
if (!i)
|
|
157
|
+
return;
|
|
158
|
+
const n = this.api.getDocumentModifier();
|
|
159
|
+
n.modifyHtml(i.cell).setClass(S).setAttribute("esd-extension-block-id", T.TITLE), i.rows.forEach((o) => {
|
|
160
|
+
n.modifyHtml(o).setClass(L).setAttribute(M, O).setAttribute(N, "1");
|
|
161
|
+
}), n.apply(new g("Adopt legacy recommendation title"));
|
|
162
|
+
}
|
|
134
163
|
/**
|
|
135
164
|
* Called when a block is deleted from the template
|
|
136
165
|
*
|
|
@@ -155,7 +184,7 @@ class P extends b {
|
|
|
155
184
|
*/
|
|
156
185
|
_warnIfMultipleBlocks() {
|
|
157
186
|
try {
|
|
158
|
-
|
|
187
|
+
$().warnIfMultipleBlocks(this.api.getDocumentRootHtmlNode());
|
|
159
188
|
} catch {
|
|
160
189
|
}
|
|
161
190
|
}
|
|
@@ -333,5 +362,5 @@ class P extends b {
|
|
|
333
362
|
}
|
|
334
363
|
export {
|
|
335
364
|
_ as BLOCK_ID,
|
|
336
|
-
|
|
365
|
+
X as RecommendationBlock
|
|
337
366
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var b = /* @__PURE__ */ ((r) => (r.BUTTON = "recommendation-block-button", r.NAME = "recommendation-block-name", r.PRICE = "recommendation-block-price", r.OLD_PRICE = "recommendation-block-old-price", r.OMNIBUS_PRICE = "recommendation-block-omnibus-price", r.OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount", r.IMAGE = "recommendation-block-image", r.CUSTOM_ATTRIBUTE = "recommendation-block-custom-attribute", r))(b || {});
|
|
1
|
+
var b = /* @__PURE__ */ ((r) => (r.BUTTON = "recommendation-block-button", r.NAME = "recommendation-block-name", r.PRICE = "recommendation-block-price", r.OLD_PRICE = "recommendation-block-old-price", r.OMNIBUS_PRICE = "recommendation-block-omnibus-price", r.OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount", r.IMAGE = "recommendation-block-image", r.CUSTOM_ATTRIBUTE = "recommendation-block-custom-attribute", r.TITLE = "recommendation-block-title", r))(b || {});
|
|
2
2
|
export {
|
|
3
3
|
b as RecommendationBlockId
|
|
4
4
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var o = /* @__PURE__ */ ((c) => (c.BLOCK_BACKGROUND = "recommendation-block-background-color-control", c.BUTTON_ALIGN = "recommendation-block-button-align-control", c.BUTTON_BORDER = "recommendation-block-button-border-control", c.BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control", c.BUTTON_COLOR = "recommendation-block-button-color-control", c.BUTTON_FIT_TO_CONTENT = "recommendation-block-button-fit-to-content-control", c.BUTTON_FONT_FAMILY = "recommendation-block-button-font-family-control", c.BUTTON_MARGINS = "recommendation-block-button-margins-control", c.BUTTON_PADDINGS = "recommendation-block-button-paddings-control", c.BUTTON_TEXT = "recommendation-block-button-text-control", c.BUTTON_TEXT_SIZE = "recommendation-block-button-text-size-control", c.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "recommendation-block-button-text-style-and-font-color-control", c.NAME_ALIGN = "recommendation-block-name-align-control", c.NAME_BACKGROUND = "recommendation-block-name-background-control", c.NAME_COLOR = "recommendation-block-name-color-control", c.NAME_FONT_FAMILY = "recommendation-block-name-font-family-control", c.NAME_PADDINGS = "recommendation-block-name-paddings-control", c.NAME_SIZE = "recommendation-block-name-size-control", c.NAME_STYLE = "recommendation-block-name-style-control", c.NAME_TEXT_TRIM = "recommendation-block-name-text-trim-control", c.PRICE_ALIGN = "recommendation-block-price-align-control", c.PRICE_BACKGROUND = "recommendation-block-price-background-control", c.PRICE_COLOR = "recommendation-block-price-color-control", c.PRICE_FONT_FAMILY = "recommendation-block-price-font-family-control", c.PRICE_PADDINGS = "recommendation-block-price-paddings-control", c.PRICE_SIZE = "recommendation-block-price-size-control", c.PRICE_STYLE = "recommendation-block-price-style-control", c.OLD_PRICE_ALIGN = "recommendation-block-old-price-align-control", c.OLD_PRICE_BACKGROUND = "recommendation-block-old-price-background-control", c.OLD_PRICE_COLOR = "recommendation-block-old-price-color-control", c.OLD_PRICE_FONT_FAMILY = "recommendation-block-old-price-font-family-control", c.OLD_PRICE_PADDINGS = "recommendation-block-old-price-paddings-control", c.OLD_PRICE_SIZE = "recommendation-block-old-price-size-control", c.OLD_PRICE_STYLE = "recommendation-block-old-price-style-control", c.OMNIBUS_PRICE_ALIGN = "recommendation-block-omnibus-price-align-control", c.OMNIBUS_PRICE_BACKGROUND = "recommendation-block-omnibus-price-background-control", c.OMNIBUS_PRICE_COLOR = "recommendation-block-omnibus-price-color-control", c.OMNIBUS_PRICE_FONT_FAMILY = "recommendation-block-omnibus-price-font-family-control", c.OMNIBUS_PRICE_PADDINGS = "recommendation-block-omnibus-price-paddings-control", c.OMNIBUS_PRICE_SIZE = "recommendation-block-omnibus-price-size-control", c.OMNIBUS_PRICE_STYLE = "recommendation-block-omnibus-price-style-control", c.OMNIBUS_PRICE_TEXT_BEFORE = "recommendation-block-omnibus-price-text-before-control", c.OMNIBUS_PRICE_TEXT_AFTER = "recommendation-block-omnibus-price-text-after-control", c.OMNIBUS_DISCOUNT_ALIGN = "recommendation-block-omnibus-discount-align-control", c.OMNIBUS_DISCOUNT_BACKGROUND = "recommendation-block-omnibus-discount-background-control", c.OMNIBUS_DISCOUNT_COLOR = "recommendation-block-omnibus-discount-color-control", c.OMNIBUS_DISCOUNT_FONT_FAMILY = "recommendation-block-omnibus-discount-font-family-control", c.OMNIBUS_DISCOUNT_PADDINGS = "recommendation-block-omnibus-discount-paddings-control", c.OMNIBUS_DISCOUNT_SIZE = "recommendation-block-omnibus-discount-size-control", c.OMNIBUS_DISCOUNT_STYLE = "recommendation-block-omnibus-discount-style-control", c.OMNIBUS_DISCOUNT_TEXT_BEFORE = "recommendation-block-omnibus-discount-text-before-control", c.OMNIBUS_DISCOUNT_TEXT_AFTER = "recommendation-block-omnibus-discount-text-after-control", c.IMAGE_SIZE = "recommendation-block-image-size-control", c.IMAGE_MARGINS = "recommendation-block-image-margins-control", c.CUSTOM_ATTR_ALIGN = "recommendation-block-custom-attr-align-control", c.CUSTOM_ATTR_BACKGROUND = "recommendation-block-custom-attr-background-control", c.CUSTOM_ATTR_COLOR = "recommendation-block-custom-attr-color-control", c.CUSTOM_ATTR_FONT_FAMILY = "recommendation-block-custom-attr-font-family-control", c.CUSTOM_ATTR_PADDINGS = "recommendation-block-custom-attr-paddings-control", c.CUSTOM_ATTR_SIZE = "recommendation-block-custom-attr-size-control", c.CUSTOM_ATTR_STYLE = "recommendation-block-custom-attr-style-control", c.CUSTOM_ATTR_TEXT_TRIM = "recommendation-block-custom-attr-text-trim-control", c.SYNC_INFO_MESSAGE = "recommendation-block-sync-info-message", c))(o || {});
|
|
1
|
+
var o = /* @__PURE__ */ ((c) => (c.BLOCK_BACKGROUND = "recommendation-block-background-color-control", c.BUTTON_ALIGN = "recommendation-block-button-align-control", c.BUTTON_BORDER = "recommendation-block-button-border-control", c.BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control", c.BUTTON_COLOR = "recommendation-block-button-color-control", c.BUTTON_FIT_TO_CONTENT = "recommendation-block-button-fit-to-content-control", c.BUTTON_FONT_FAMILY = "recommendation-block-button-font-family-control", c.BUTTON_MARGINS = "recommendation-block-button-margins-control", c.BUTTON_PADDINGS = "recommendation-block-button-paddings-control", c.BUTTON_TEXT = "recommendation-block-button-text-control", c.BUTTON_TEXT_SIZE = "recommendation-block-button-text-size-control", c.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "recommendation-block-button-text-style-and-font-color-control", c.NAME_ALIGN = "recommendation-block-name-align-control", c.NAME_BACKGROUND = "recommendation-block-name-background-control", c.NAME_COLOR = "recommendation-block-name-color-control", c.NAME_FONT_FAMILY = "recommendation-block-name-font-family-control", c.NAME_PADDINGS = "recommendation-block-name-paddings-control", c.NAME_SIZE = "recommendation-block-name-size-control", c.NAME_STYLE = "recommendation-block-name-style-control", c.NAME_TEXT_TRIM = "recommendation-block-name-text-trim-control", c.PRICE_ALIGN = "recommendation-block-price-align-control", c.PRICE_BACKGROUND = "recommendation-block-price-background-control", c.PRICE_COLOR = "recommendation-block-price-color-control", c.PRICE_FONT_FAMILY = "recommendation-block-price-font-family-control", c.PRICE_PADDINGS = "recommendation-block-price-paddings-control", c.PRICE_SIZE = "recommendation-block-price-size-control", c.PRICE_STYLE = "recommendation-block-price-style-control", c.OLD_PRICE_ALIGN = "recommendation-block-old-price-align-control", c.OLD_PRICE_BACKGROUND = "recommendation-block-old-price-background-control", c.OLD_PRICE_COLOR = "recommendation-block-old-price-color-control", c.OLD_PRICE_FONT_FAMILY = "recommendation-block-old-price-font-family-control", c.OLD_PRICE_PADDINGS = "recommendation-block-old-price-paddings-control", c.OLD_PRICE_SIZE = "recommendation-block-old-price-size-control", c.OLD_PRICE_STYLE = "recommendation-block-old-price-style-control", c.OMNIBUS_PRICE_ALIGN = "recommendation-block-omnibus-price-align-control", c.OMNIBUS_PRICE_BACKGROUND = "recommendation-block-omnibus-price-background-control", c.OMNIBUS_PRICE_COLOR = "recommendation-block-omnibus-price-color-control", c.OMNIBUS_PRICE_FONT_FAMILY = "recommendation-block-omnibus-price-font-family-control", c.OMNIBUS_PRICE_PADDINGS = "recommendation-block-omnibus-price-paddings-control", c.OMNIBUS_PRICE_SIZE = "recommendation-block-omnibus-price-size-control", c.OMNIBUS_PRICE_STYLE = "recommendation-block-omnibus-price-style-control", c.OMNIBUS_PRICE_TEXT_BEFORE = "recommendation-block-omnibus-price-text-before-control", c.OMNIBUS_PRICE_TEXT_AFTER = "recommendation-block-omnibus-price-text-after-control", c.OMNIBUS_DISCOUNT_ALIGN = "recommendation-block-omnibus-discount-align-control", c.OMNIBUS_DISCOUNT_BACKGROUND = "recommendation-block-omnibus-discount-background-control", c.OMNIBUS_DISCOUNT_COLOR = "recommendation-block-omnibus-discount-color-control", c.OMNIBUS_DISCOUNT_FONT_FAMILY = "recommendation-block-omnibus-discount-font-family-control", c.OMNIBUS_DISCOUNT_PADDINGS = "recommendation-block-omnibus-discount-paddings-control", c.OMNIBUS_DISCOUNT_SIZE = "recommendation-block-omnibus-discount-size-control", c.OMNIBUS_DISCOUNT_STYLE = "recommendation-block-omnibus-discount-style-control", c.OMNIBUS_DISCOUNT_TEXT_BEFORE = "recommendation-block-omnibus-discount-text-before-control", c.OMNIBUS_DISCOUNT_TEXT_AFTER = "recommendation-block-omnibus-discount-text-after-control", c.IMAGE_SIZE = "recommendation-block-image-size-control", c.IMAGE_MARGINS = "recommendation-block-image-margins-control", c.CUSTOM_ATTR_ALIGN = "recommendation-block-custom-attr-align-control", c.CUSTOM_ATTR_BACKGROUND = "recommendation-block-custom-attr-background-control", c.CUSTOM_ATTR_COLOR = "recommendation-block-custom-attr-color-control", c.CUSTOM_ATTR_FONT_FAMILY = "recommendation-block-custom-attr-font-family-control", c.CUSTOM_ATTR_PADDINGS = "recommendation-block-custom-attr-paddings-control", c.CUSTOM_ATTR_SIZE = "recommendation-block-custom-attr-size-control", c.CUSTOM_ATTR_STYLE = "recommendation-block-custom-attr-style-control", c.CUSTOM_ATTR_TEXT_TRIM = "recommendation-block-custom-attr-text-trim-control", c.TITLE_ALIGN = "recommendation-block-title-align-control", c.TITLE_BACKGROUND = "recommendation-block-title-background-control", c.TITLE_COLOR = "recommendation-block-title-color-control", c.TITLE_FONT_FAMILY = "recommendation-block-title-font-family-control", c.TITLE_PADDINGS = "recommendation-block-title-paddings-control", c.TITLE_SIZE = "recommendation-block-title-size-control", c.TITLE_STYLE = "recommendation-block-title-style-control", c.SYNC_INFO_MESSAGE = "recommendation-block-sync-info-message", c))(o || {});
|
|
2
2
|
export {
|
|
3
3
|
o as RecommendationControlId
|
|
4
4
|
};
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { DEFAULT_COLUMN_SPACING as n, DEFAULT_ROW_SPACING as
|
|
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
|
|
3
|
-
const
|
|
1
|
+
import { DEFAULT_COLUMN_SPACING as n, DEFAULT_ROW_SPACING as R, DEFAULT_MOBILE_ROW_SPACING as s, DEFAULT_MOBILE_COLUMN_SPACING as O, DEFAULT_MOBILE_CARDS_IN_ROW as e, DEFAULT_CARDS_IN_ROW as U } 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, ATTR_RECOMMENDATION_TITLE as A } from "./selectors.js";
|
|
3
|
+
const C = {
|
|
4
4
|
code: "USD",
|
|
5
5
|
symbol: "USD",
|
|
6
6
|
alignment: "after",
|
|
7
7
|
decimalCount: 2,
|
|
8
8
|
decimalSeparator: ".",
|
|
9
9
|
thousandSeparator: ","
|
|
10
|
-
},
|
|
10
|
+
}, D = {
|
|
11
11
|
textBefore: "",
|
|
12
12
|
textAfter: ""
|
|
13
13
|
}, a = {
|
|
14
14
|
textBefore: "",
|
|
15
15
|
textAfter: ""
|
|
16
|
-
},
|
|
16
|
+
}, E = [
|
|
17
17
|
o,
|
|
18
18
|
t,
|
|
19
19
|
_,
|
|
20
20
|
T,
|
|
21
21
|
r,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
I,
|
|
23
|
+
i
|
|
24
24
|
], c = {
|
|
25
|
+
[A]: !0,
|
|
25
26
|
[o]: !0,
|
|
26
27
|
[t]: !0,
|
|
27
28
|
[T]: !0,
|
|
28
29
|
[_]: !0,
|
|
29
30
|
[r]: !1,
|
|
30
|
-
[
|
|
31
|
-
[
|
|
31
|
+
[I]: !1,
|
|
32
|
+
[i]: !0
|
|
32
33
|
}, l = {
|
|
33
34
|
// Settings
|
|
34
35
|
strategy: "mostPopular",
|
|
@@ -36,23 +37,23 @@ const D = {
|
|
|
36
37
|
size: "6",
|
|
37
38
|
shuffleProducts: !1,
|
|
38
39
|
language: "en_US",
|
|
39
|
-
currency:
|
|
40
|
+
currency: C,
|
|
40
41
|
filters: [],
|
|
41
42
|
// Layout
|
|
42
43
|
layout: "grid",
|
|
43
|
-
cardsInRow:
|
|
44
|
+
cardsInRow: U,
|
|
44
45
|
mobileCardsInRow: e,
|
|
45
46
|
mobileLayoutEnabled: !1,
|
|
46
47
|
previousMobileCardsInRow: e,
|
|
47
48
|
columnSpacing: n,
|
|
48
|
-
rowSpacing:
|
|
49
|
-
mobileColumnSpacing:
|
|
50
|
-
mobileRowSpacing:
|
|
49
|
+
rowSpacing: R,
|
|
50
|
+
mobileColumnSpacing: O,
|
|
51
|
+
mobileRowSpacing: s,
|
|
51
52
|
// Composition
|
|
52
|
-
composition:
|
|
53
|
+
composition: E,
|
|
53
54
|
visibility: c,
|
|
54
55
|
// Element settings
|
|
55
|
-
omnibusPrice:
|
|
56
|
+
omnibusPrice: D,
|
|
56
57
|
omnibusDiscount: a,
|
|
57
58
|
textTrimming: !1,
|
|
58
59
|
// Price placement (block-level, affects all cards)
|
|
@@ -67,14 +68,14 @@ const D = {
|
|
|
67
68
|
// defaults, so no data transform (and no needsMigration trigger) is required.
|
|
68
69
|
configVersion: 1,
|
|
69
70
|
recommendationId: 0
|
|
70
|
-
},
|
|
71
|
+
}, u = [11, 12], L = 1;
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
L as CURRENT_CONFIG_VERSION,
|
|
74
|
+
E as DEFAULT_COMPOSITION,
|
|
75
|
+
C as DEFAULT_CURRENCY,
|
|
75
76
|
l as DEFAULT_NODE_CONFIG,
|
|
76
77
|
a as DEFAULT_OMNIBUS_DISCOUNT,
|
|
77
|
-
|
|
78
|
+
D as DEFAULT_OMNIBUS_PRICE,
|
|
78
79
|
c as DEFAULT_VISIBILITY,
|
|
79
|
-
|
|
80
|
+
u as EXCLUDED_ALGORITHM_IDS
|
|
80
81
|
};
|