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