@useinsider/guido 3.17.0-beta.ab974c6 → 3.17.0-beta.bc6e089
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/config/migrator/itemsBlockMigrator.js +204 -156
- package/dist/extensions/Blocks/Items/block.js +49 -105
- package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +24 -25
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +11 -12
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +58 -55
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
- package/dist/extensions/Blocks/Items/template.js +243 -236
- package/dist/src/extensions/Blocks/Items/block.d.ts +0 -29
- package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
- package/dist/utils/pairProductVariables.js +66 -66
- package/package.json +1 -1
- package/dist/extensions/Blocks/Items/constants/currency.js +0 -17
- package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +0 -26
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { ModificationDescription as S, UEAttr as L } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
import { CommonControl as
|
|
2
|
+
import { CommonControl as F } from "../../common-control.js";
|
|
3
|
+
import { reorientBlockCellPadding as D, nameMaxWidthFor as $ } from "../constants/cardLayout.js";
|
|
3
4
|
import { ItemsBlockId as I } from "../enums/controlEnums.js";
|
|
4
|
-
import { productPairs as y, templateFirstLine as
|
|
5
|
-
import { SETTINGS_ENUMS as d, ItemTypeOptions as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getDefaultTemplate as
|
|
9
|
-
import { findNameTextNode as
|
|
10
|
-
import { getItemsBlockConfig as _, setItemsBlockConfig as M, escapeReplacement as
|
|
11
|
-
const
|
|
5
|
+
import { productPairs as y, templateFirstLine as x } from "../enums/productEnums.js";
|
|
6
|
+
import { SETTINGS_ENUMS as d, ItemTypeOptions as H, OrientationOptions as w, ItemInCartOptions as O, DefaultConfigValues as U } from "../enums/settingsEnums.js";
|
|
7
|
+
import q from "../layouts/horizontal.html.js";
|
|
8
|
+
import V from "../layouts/vertical.html.js";
|
|
9
|
+
import { getDefaultTemplate as B, wrapInTableRow as C } from "../template.js";
|
|
10
|
+
import { findNameTextNode as G } from "../utils/nameNode.js";
|
|
11
|
+
import { getItemsBlockConfig as _, setItemsBlockConfig as M, escapeReplacement as P, deriveItemNumber as Y } from "../utils/nodeConfigUtils.js";
|
|
12
|
+
const v = "ui-elements-items-block", u = {
|
|
12
13
|
ITEMS_TYPE: "itemsType",
|
|
13
14
|
ORIENTATION: "orientation",
|
|
14
15
|
ITEM_IDS: "itemIds"
|
|
15
16
|
};
|
|
16
|
-
class
|
|
17
|
+
class ne extends F {
|
|
17
18
|
getId() {
|
|
18
|
-
return
|
|
19
|
+
return v;
|
|
19
20
|
}
|
|
20
21
|
getTemplate() {
|
|
21
22
|
return `
|
|
@@ -29,18 +30,18 @@ class te extends k {
|
|
|
29
30
|
onRender() {
|
|
30
31
|
const e = _(this.currentNode);
|
|
31
32
|
this.api.updateValues({
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
33
|
+
[u.ORIENTATION]: (e == null ? void 0 : e.orientation) ?? d.ORIENTATION.VERTICAL,
|
|
34
|
+
[u.ITEMS_TYPE]: (e == null ? void 0 : e.type) ?? d.ITEMS_TYPE.CART_ITEMS,
|
|
35
|
+
[u.ITEM_IDS]: (e == null ? void 0 : e.itemsSelectValue) ?? ""
|
|
35
36
|
}), this._listenToFormUpdates();
|
|
36
37
|
}
|
|
37
38
|
onTemplateNodeUpdated(e) {
|
|
38
39
|
super.onTemplateNodeUpdated(e), console.debug("Items Block Config", e.getNodeConfig()), this.handleBlockInstanceChange(() => {
|
|
39
40
|
const r = _(this.currentNode);
|
|
40
41
|
this.api.updateValues({
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
42
|
+
[u.ORIENTATION]: (r == null ? void 0 : r.orientation) ?? d.ORIENTATION.VERTICAL,
|
|
43
|
+
[u.ITEMS_TYPE]: (r == null ? void 0 : r.type) ?? d.ITEMS_TYPE.CART_ITEMS,
|
|
44
|
+
[u.ITEM_IDS]: (r == null ? void 0 : r.itemsSelectValue) ?? ""
|
|
44
45
|
}), this._initializeSelectItems();
|
|
45
46
|
});
|
|
46
47
|
}
|
|
@@ -49,10 +50,10 @@ class te extends k {
|
|
|
49
50
|
${this._GuOneColumn([
|
|
50
51
|
this._GuLabel({ text: "Item Type" }),
|
|
51
52
|
this._GuSelect({
|
|
52
|
-
name:
|
|
53
|
+
name: u.ITEMS_TYPE,
|
|
53
54
|
className: "es-100",
|
|
54
55
|
placeholder: "Select Item Type",
|
|
55
|
-
options:
|
|
56
|
+
options: H
|
|
56
57
|
})
|
|
57
58
|
])}
|
|
58
59
|
`;
|
|
@@ -62,8 +63,8 @@ class te extends k {
|
|
|
62
63
|
${this._GuTwoColumns([
|
|
63
64
|
this._GuLabel({ text: "Orientation" }),
|
|
64
65
|
this._GuRadioButton({
|
|
65
|
-
name:
|
|
66
|
-
buttons:
|
|
66
|
+
name: u.ORIENTATION,
|
|
67
|
+
buttons: w
|
|
67
68
|
})
|
|
68
69
|
])}
|
|
69
70
|
`;
|
|
@@ -73,7 +74,7 @@ class te extends k {
|
|
|
73
74
|
${this._GuTwoColumns([
|
|
74
75
|
this._GuLabel({ text: "Item in Cart" }),
|
|
75
76
|
this._GuSelect({
|
|
76
|
-
name:
|
|
77
|
+
name: u.ITEM_IDS,
|
|
77
78
|
className: "es-100",
|
|
78
79
|
placeholder: "Select Item In Cart",
|
|
79
80
|
options: []
|
|
@@ -82,7 +83,7 @@ class te extends k {
|
|
|
82
83
|
`;
|
|
83
84
|
}
|
|
84
85
|
_onOrientationChange(e) {
|
|
85
|
-
this.api.updateValues({ [
|
|
86
|
+
this.api.updateValues({ [u.ORIENTATION]: e });
|
|
86
87
|
const r = this.api.getDocumentModifier();
|
|
87
88
|
M(this.currentNode, this.api, {
|
|
88
89
|
orientation: e,
|
|
@@ -107,7 +108,7 @@ class te extends k {
|
|
|
107
108
|
this._updateImageSrc(c.imageSrc, o), this._updateName(c.name, o), this._updatePrice(c.price, o), this._updateOriginalPrice(c.originalPrice, o), this._updateQuantity(c.quantity, r, o), o.apply(new S("Updated items type"));
|
|
108
109
|
}
|
|
109
110
|
_onItemIdsChange(e) {
|
|
110
|
-
this.api.updateValues({ [
|
|
111
|
+
this.api.updateValues({ [u.ITEM_IDS]: e });
|
|
111
112
|
const r = e, t = e.replace("Url}}", "Image}}"), i = this.api.getDocumentModifier();
|
|
112
113
|
M(this.currentNode, this.api, {
|
|
113
114
|
itemsSelectValue: e,
|
|
@@ -119,38 +120,38 @@ class te extends k {
|
|
|
119
120
|
}
|
|
120
121
|
_initializeSelectItems() {
|
|
121
122
|
this.api.setUIEAttribute(
|
|
122
|
-
|
|
123
|
+
u.ITEMS_TYPE,
|
|
123
124
|
L.SELECTPICKER.items,
|
|
124
|
-
|
|
125
|
+
H
|
|
125
126
|
);
|
|
126
127
|
const e = _(this.currentNode), r = (e == null ? void 0 : e.type) ?? d.ITEMS_TYPE.CART_ITEMS, t = (e == null ? void 0 : e.itemsSelectValue) ?? "";
|
|
127
128
|
this.api.updateValues({
|
|
128
|
-
[
|
|
129
|
+
[u.ITEMS_TYPE]: r
|
|
129
130
|
});
|
|
130
131
|
const i = O[r];
|
|
131
132
|
this.api.setUIEAttribute(
|
|
132
|
-
|
|
133
|
+
u.ITEM_IDS,
|
|
133
134
|
L.SELECTPICKER.items,
|
|
134
135
|
i
|
|
135
136
|
), this.api.updateValues({
|
|
136
|
-
[
|
|
137
|
+
[u.ITEM_IDS]: t
|
|
137
138
|
});
|
|
138
139
|
}
|
|
139
140
|
_listenToFormUpdates() {
|
|
140
141
|
this.api.onValueChanged(
|
|
141
|
-
|
|
142
|
+
u.ITEMS_TYPE,
|
|
142
143
|
(e) => this._onItemsTypeChange(e)
|
|
143
144
|
), this.api.onValueChanged(
|
|
144
|
-
|
|
145
|
+
u.ORIENTATION,
|
|
145
146
|
(e) => this._onOrientationChange(e)
|
|
146
147
|
), this.api.onValueChanged(
|
|
147
|
-
|
|
148
|
+
u.ITEM_IDS,
|
|
148
149
|
(e) => this._onItemIdsChange(e)
|
|
149
150
|
);
|
|
150
151
|
}
|
|
151
152
|
_renderTemplate() {
|
|
152
153
|
const e = _(this.currentNode), r = (e == null ? void 0 : e.orientation) ?? d.ORIENTATION.VERTICAL, t = (e == null ? void 0 : e.type) ?? d.ITEMS_TYPE.CART_ITEMS, i = (e == null ? void 0 : e.itemsSelectValue) ?? "", n = (e == null ? void 0 : e.priceCurrencySymbol) ?? "", s = (e == null ? void 0 : e.priceCurrencyLocation) ?? "0", o = (e == null ? void 0 : e.priceFormatted) ?? !1;
|
|
153
|
-
this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(
|
|
154
|
+
this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(B({
|
|
154
155
|
orientation: r,
|
|
155
156
|
itemsType: t,
|
|
156
157
|
itemId: i,
|
|
@@ -161,11 +162,11 @@ class te extends k {
|
|
|
161
162
|
}
|
|
162
163
|
_getTemplateData(e, r) {
|
|
163
164
|
const t = _(this.currentNode), i = e ?? (t == null ? void 0 : t.type) ?? d.ITEMS_TYPE.CART_ITEMS, n = r ?? (t == null ? void 0 : t.itemsSelectValue) ?? "", s = (t == null ? void 0 : t.priceFormatted) ?? !1, o = (t == null ? void 0 : t.priceSinglePrice) ?? !1, c = O[i].findIndex((h) => h.value === n), a = c > -1 ? c : 0, l = y.PAIRS_FOR_EXTENSION.price[i], T = y.PAIRS_FOR_EXTENSION.originalPrice[i];
|
|
164
|
-
let
|
|
165
|
-
return o ? (
|
|
165
|
+
let m, p;
|
|
166
|
+
return o ? (m = s ? l.DEFAULT_SINGLE_PRICE_FORMATTED : l.DEFAULT_SINGLE_PRICE, p = s ? T.DEFAULT_SINGLE_PRICE_FORMATTED : T.DEFAULT_SINGLE_PRICE) : (m = s ? l.DEFAULT_PRICE_FORMATTED : l.DEFAULT_PRICE, p = s ? T.DEFAULT_PRICE_FORMATTED : T.DEFAULT_PRICE), {
|
|
166
167
|
imageSrc: y.PAIRS_FOR_EXTENSION.imageSrc[i].DEFAULT[a],
|
|
167
168
|
name: y.PAIRS_FOR_EXTENSION.name[i].DEFAULT[a],
|
|
168
|
-
price:
|
|
169
|
+
price: m,
|
|
169
170
|
originalPrice: p,
|
|
170
171
|
quantity: y.PAIRS_FOR_EXTENSION.quantity[i].DEFAULT,
|
|
171
172
|
button: y.PAIRS_FOR_EXTENSION.button[i].DEFAULT_LABEL
|
|
@@ -183,7 +184,7 @@ class te extends k {
|
|
|
183
184
|
return;
|
|
184
185
|
const i = t.getInnerText().trim();
|
|
185
186
|
let n = t.getInnerHTML().trim();
|
|
186
|
-
n = n.replace(i,
|
|
187
|
+
n = n.replace(i, P(e)), r.modifyHtml(t).setInnerHtml(n);
|
|
187
188
|
}
|
|
188
189
|
_updatePrice(e, r) {
|
|
189
190
|
var o;
|
|
@@ -194,7 +195,7 @@ class te extends k {
|
|
|
194
195
|
const a = this._getParagraphFromBlock(c);
|
|
195
196
|
if (!a)
|
|
196
197
|
return;
|
|
197
|
-
const l = a.getInnerHTML().trim() || "", T = a.getInnerText().trim() || "",
|
|
198
|
+
const l = a.getInnerHTML().trim() || "", T = a.getInnerText().trim() || "", m = (n == null ? void 0 : n.trim()) || "", p = this._removeCurrencySymbol(T, m), h = this._replacePriceNumber(p, e), E = this._buildPriceContent(h, m, s), N = l.replace(T, P(E));
|
|
198
199
|
r.modifyHtml(a).setInnerHtml(N);
|
|
199
200
|
});
|
|
200
201
|
}
|
|
@@ -210,7 +211,7 @@ class te extends k {
|
|
|
210
211
|
const l = a.querySelector("s");
|
|
211
212
|
if (!l)
|
|
212
213
|
return;
|
|
213
|
-
const T = l.getInnerHTML().trim() || "",
|
|
214
|
+
const T = l.getInnerHTML().trim() || "", m = l.getInnerText().trim() || "", p = (n == null ? void 0 : n.trim()) || "", h = this._removeCurrencySymbol(m, p), E = this._replacePriceNumber(h, e), N = this._buildPriceContent(E, p, s), R = `<s>${T.replace(m, P(N))}</s>`;
|
|
214
215
|
r.modifyHtml(a).setInnerHtml(R);
|
|
215
216
|
});
|
|
216
217
|
}
|
|
@@ -223,14 +224,14 @@ class te extends k {
|
|
|
223
224
|
if (!l)
|
|
224
225
|
return;
|
|
225
226
|
const T = l.getInnerText().trim();
|
|
226
|
-
let
|
|
227
|
+
let m = l.getInnerHTML().trim();
|
|
227
228
|
function p(E, N, A) {
|
|
228
229
|
return E.replace(
|
|
229
230
|
new RegExp(`(>\\s*)?${N}(\\s*<)?`, "g"),
|
|
230
231
|
`$1${A}$2`
|
|
231
232
|
);
|
|
232
233
|
}
|
|
233
|
-
|
|
234
|
+
m = p(m, T, e), t.modifyHtml(l).setInnerHtml(m), t.modifyHtml(a).setStyle("display", c ? "table-cell" : "none");
|
|
234
235
|
}
|
|
235
236
|
_reOrderTemplate(e) {
|
|
236
237
|
var h, E, N, A, R, b;
|
|
@@ -241,13 +242,15 @@ class te extends k {
|
|
|
241
242
|
)) || [], [s] = i, [o] = n, c = (R = this.currentNode) == null ? void 0 : R.querySelector(`[esd-extension-block-id="${I.QUANTITY}"]`), a = (b = this.currentNode) == null ? void 0 : b.querySelector(`[esd-extension-block-id="${I.BUTTON}"]`);
|
|
242
243
|
if (!r || !t || !s || !o || !c || !a)
|
|
243
244
|
return;
|
|
244
|
-
const l = _(this.currentNode),
|
|
245
|
-
let p =
|
|
245
|
+
const l = _(this.currentNode), m = ((l == null ? void 0 : l.orientation) ?? d.ORIENTATION.VERTICAL) === d.ORIENTATION.VERTICAL;
|
|
246
|
+
let p = m ? V : q;
|
|
246
247
|
setTimeout(() => {
|
|
247
|
-
const f =
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
const f = P(D(s.getOuterHTML(), m)), k = P(
|
|
249
|
+
D(o.getOuterHTML(), m)
|
|
250
|
+
);
|
|
251
|
+
p = p.replace("{-{-TEMPLATE_FIRST_LINE-}-}", m ? x : "").replace("{-{-PRODUCT_IMAGE-}-}", C(r.getOuterHTML())).replace("{-{-PRODUCT_NAME-}-}", C(t.getOuterHTML())).replaceAll("{-{-PRODUCT_PRICE-}-}", C(f)).replaceAll("{-{-PRODUCT_ORIGINAL_PRICE-}-}", C(k)).replace("{-{-PRODUCT_QUANTITY-}-}", C(c.getOuterHTML())).replace("{-{-PRODUCT_BUTTON-}-}", C(a.getOuterHTML())), p = p.trim().replace(x, "").slice(0, -5);
|
|
252
|
+
const g = e ?? this.api.getDocumentModifier();
|
|
253
|
+
g.modifyHtml(r.querySelector("img")).setAttribute("width", U.productImageWidth).setAttribute("height", U.productImageWidth), g.modifyHtml(this.currentNode).setInnerHtml(p), e || g.apply(new S("Reordered template"));
|
|
251
254
|
}, 50);
|
|
252
255
|
}
|
|
253
256
|
_updateDataTypeAttributes(e, r) {
|
|
@@ -262,7 +265,7 @@ class te extends k {
|
|
|
262
265
|
_updateDataNumberAttributes(e, r) {
|
|
263
266
|
if (!this.currentNode)
|
|
264
267
|
return;
|
|
265
|
-
const t = _(this.currentNode), i = (t == null ? void 0 : t.type) ?? d.ITEMS_TYPE.CART_ITEMS, n =
|
|
268
|
+
const t = _(this.currentNode), i = (t == null ? void 0 : t.type) ?? d.ITEMS_TYPE.CART_ITEMS, n = Y(e, i), s = this.currentNode.closest(".ins-product-td");
|
|
266
269
|
s && r.modifyHtml(s).setAttribute("data-number", n), this.currentNode.querySelectorAll("[data-number]").forEach((c) => {
|
|
267
270
|
const a = c;
|
|
268
271
|
r.modifyHtml(a).setAttribute("data-number", n);
|
|
@@ -273,17 +276,17 @@ class te extends k {
|
|
|
273
276
|
this._updateImageSrc(r.imageSrc, t), this._updateName(r.name, t), this._updatePrice(r.price, t), this._updateOriginalPrice(r.originalPrice, t), this._updateQuantity(r.quantity, e, t), t.apply(new S("Refilled template"));
|
|
274
277
|
}
|
|
275
278
|
_recalculateTrimming() {
|
|
276
|
-
var
|
|
279
|
+
var s;
|
|
277
280
|
if (!this.currentNode)
|
|
278
281
|
return;
|
|
279
|
-
const e = (
|
|
282
|
+
const e = (s = this.currentNode) == null ? void 0 : s.querySelector(`[esd-extension-block-id="${I.NAME}"]`);
|
|
280
283
|
if (!e)
|
|
281
284
|
return;
|
|
282
|
-
const r =
|
|
285
|
+
const r = G(e);
|
|
283
286
|
if (!r)
|
|
284
287
|
return;
|
|
285
|
-
const t = _(this.currentNode), i = (t == null ? void 0 : t.nameTrimming) ?? !0;
|
|
286
|
-
this.api.getDocumentModifier().modifyHtml(r).setStyle("overflow", "hidden").setStyle("white-space", i ? "nowrap" : "normal").setStyle("text-overflow", i ? "ellipsis" : "unset").setStyle("max-width",
|
|
288
|
+
const t = _(this.currentNode), i = (t == null ? void 0 : t.nameTrimming) ?? !0, n = $(t == null ? void 0 : t.orientation);
|
|
289
|
+
this.api.getDocumentModifier().modifyHtml(r).setStyle("overflow", "hidden").setStyle("white-space", i ? "nowrap" : "normal").setStyle("text-overflow", i ? "ellipsis" : "unset").setStyle("max-width", n).removeStyle("width").apply(new S("Recalculated trimming after orientation change"));
|
|
287
290
|
}
|
|
288
291
|
_getParagraphFromBlock(e) {
|
|
289
292
|
return e.querySelector("p");
|
|
@@ -315,6 +318,6 @@ class te extends k {
|
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
320
|
export {
|
|
318
|
-
|
|
319
|
-
|
|
321
|
+
v as CONTROL_BLOCK_ID,
|
|
322
|
+
ne as ItemsBlockControl
|
|
320
323
|
};
|
|
@@ -92,15 +92,20 @@ const t = '<td align="center" class="ins-product-td items-block items-block-v2">
|
|
|
92
92
|
quantity: {
|
|
93
93
|
CART_ITEMS: {
|
|
94
94
|
ATTR: "ins_apr_quantity",
|
|
95
|
-
DEFAULT: "3"
|
|
95
|
+
DEFAULT: "3",
|
|
96
|
+
LEGACY_DEFAULTS: []
|
|
96
97
|
},
|
|
97
98
|
BROWSED_ITEMS: {
|
|
98
99
|
ATTR: "browsed_item_quantity",
|
|
99
|
-
DEFAULT: "
|
|
100
|
+
DEFAULT: "1",
|
|
101
|
+
// Was '7' before SD-149368 corrected it; still tokenize the legacy value so
|
|
102
|
+
// already-saved browsed-items templates keep exporting the merge tag, not literal '7'.
|
|
103
|
+
LEGACY_DEFAULTS: ["7"]
|
|
100
104
|
},
|
|
101
105
|
PURCHASED_ITEMS: {
|
|
102
106
|
ATTR: "purchased_item_quantity",
|
|
103
|
-
DEFAULT: "10"
|
|
107
|
+
DEFAULT: "10",
|
|
108
|
+
LEGACY_DEFAULTS: []
|
|
104
109
|
}
|
|
105
110
|
},
|
|
106
111
|
price: {
|
|
@@ -124,8 +129,8 @@ const t = '<td align="center" class="ins-product-td items-block items-block-v2">
|
|
|
124
129
|
CURRENCY: "browsed_item_productcurrency",
|
|
125
130
|
DEFAULT_PRICE: "1249.99",
|
|
126
131
|
DEFAULT_PRICE_FORMATTED: "1,249.99",
|
|
127
|
-
DEFAULT_SINGLE_PRICE: "
|
|
128
|
-
DEFAULT_SINGLE_PRICE_FORMATTED: "
|
|
132
|
+
DEFAULT_SINGLE_PRICE: "1249.99",
|
|
133
|
+
DEFAULT_SINGLE_PRICE_FORMATTED: "1,249.99",
|
|
129
134
|
DEFAULT_CURRENCY: "USD"
|
|
130
135
|
},
|
|
131
136
|
PURCHASED_ITEMS: {
|
|
@@ -162,8 +167,8 @@ const t = '<td align="center" class="ins-product-td items-block items-block-v2">
|
|
|
162
167
|
CURRENCY: "browsed_item_productcurrency",
|
|
163
168
|
DEFAULT_PRICE: "2049.99",
|
|
164
169
|
DEFAULT_PRICE_FORMATTED: "2,049.99",
|
|
165
|
-
DEFAULT_SINGLE_PRICE: "
|
|
166
|
-
DEFAULT_SINGLE_PRICE_FORMATTED: "
|
|
170
|
+
DEFAULT_SINGLE_PRICE: "2049.99",
|
|
171
|
+
DEFAULT_SINGLE_PRICE_FORMATTED: "2,049.99",
|
|
167
172
|
DEFAULT_CURRENCY: "USD"
|
|
168
173
|
},
|
|
169
174
|
PURCHASED_ITEMS: {
|
|
@@ -214,7 +219,7 @@ const t = '<td align="center" class="ins-product-td items-block items-block-v2">
|
|
|
214
219
|
function a(e, i = 8) {
|
|
215
220
|
return s(1, i + 1).map((_) => `${e}_${_}`);
|
|
216
221
|
}
|
|
217
|
-
function
|
|
222
|
+
function T() {
|
|
218
223
|
const { PAIRS_FOR_EXTENSION: e } = r, i = [];
|
|
219
224
|
return i.push(
|
|
220
225
|
e.imageSrc.CART_ITEMS.ATTR,
|
|
@@ -274,7 +279,7 @@ function R() {
|
|
|
274
279
|
), i;
|
|
275
280
|
}
|
|
276
281
|
const p = E(
|
|
277
|
-
|
|
282
|
+
T(),
|
|
278
283
|
(e) => a(e)
|
|
279
284
|
);
|
|
280
285
|
export {
|
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
const t = `{-{-TEMPLATE_FIRST_LINE-}-}
|
|
2
|
-
<table class="es-left ins-product-wrapper ins-product-cart" width="100%" cellspacing="0" cellpadding="0">
|
|
2
|
+
<table class="es-left ins-product-wrapper ins-product-cart" width="100%" cellspacing="0" cellpadding="0" style="width: 100%;">
|
|
3
3
|
<tbody>
|
|
4
4
|
<tr>
|
|
5
5
|
<td style="padding: 16px 9px;">
|
|
6
|
-
<table class="es-left esdev-disable-select" cellspacing="0" cellpadding="0" align="left" width="100%">
|
|
6
|
+
<table class="es-left esdev-disable-select" cellspacing="0" cellpadding="0" align="left" width="100%" style="width: 100%;">
|
|
7
7
|
<tbody>
|
|
8
8
|
<tr>
|
|
9
|
-
<td class="product-image-class es-
|
|
9
|
+
<td class="product-image-class es-p5r" data-slot-1>
|
|
10
10
|
<table width="100%">
|
|
11
11
|
<tbody>
|
|
12
12
|
{-{-PRODUCT_IMAGE-}-}
|
|
13
13
|
</tbody>
|
|
14
14
|
</table>
|
|
15
15
|
</td>
|
|
16
|
-
|
|
16
|
+
<!-- name column cap: keep in sync with NAME_HORIZONTAL_MAX_WIDTH (constants/cardLayout.ts);
|
|
17
|
+
max-width only so a fixed-layout table can still shrink the column in narrow structures -->
|
|
18
|
+
<td class="product-name-class es-p5l es-p5r" data-slot-2 style="max-width: 130px;">
|
|
17
19
|
<table width="100%" style="table-layout: fixed;">
|
|
18
20
|
<tbody>
|
|
19
21
|
{-{-PRODUCT_NAME-}-}
|
|
20
22
|
</tbody>
|
|
21
23
|
</table>
|
|
22
24
|
</td>
|
|
23
|
-
<td class="product-quantity-class es-
|
|
25
|
+
<td class="product-quantity-class es-p5l es-p5r" data-slot-3>
|
|
24
26
|
<table width="100%">
|
|
25
27
|
<tbody>
|
|
26
28
|
{-{-PRODUCT_QUANTITY-}-}
|
|
27
29
|
</tbody>
|
|
28
30
|
</table>
|
|
29
31
|
</td>
|
|
30
|
-
<td class="product-price-class horizontal-price
|
|
32
|
+
<td class="product-price-class horizontal-price" data-slot-4>
|
|
31
33
|
<table width="100%">
|
|
32
34
|
<tbody>
|
|
33
35
|
{-{-PRODUCT_PRICE-}-}
|
|
34
36
|
</tbody>
|
|
35
37
|
</table>
|
|
36
38
|
</td>
|
|
37
|
-
<td class="product-original-price-class horizontal-price
|
|
39
|
+
<td class="product-original-price-class horizontal-price" data-slot-5>
|
|
38
40
|
<table width="100%">
|
|
39
41
|
<tbody>
|
|
40
42
|
{-{-PRODUCT_ORIGINAL_PRICE-}-}
|
|
41
43
|
</tbody>
|
|
42
44
|
</table>
|
|
43
45
|
</td>
|
|
44
|
-
<td class="product-price-container vertical-price
|
|
46
|
+
<td class="product-price-container vertical-price" data-slot-4 style="display: none;">
|
|
45
47
|
<table class="product-price-class" width="100%" data-slot-4>
|
|
46
48
|
<tbody>
|
|
47
49
|
{-{-PRODUCT_PRICE-}-}
|
|
@@ -54,7 +56,7 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
|
|
|
54
56
|
</tbody>
|
|
55
57
|
</table>
|
|
56
58
|
</td>
|
|
57
|
-
<td class="product-button-class es-
|
|
59
|
+
<td class="product-button-class es-p5l" data-slot-6>
|
|
58
60
|
<table width="100%">
|
|
59
61
|
<tbody>
|
|
60
62
|
{-{-PRODUCT_BUTTON-}-}
|