@azzas/azzas-tracker-web 2.0.1-preview.1 → 2.0.2-preview.0
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/mod.cjs +19 -15
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.d.cts +1 -1
- package/dist/mod.d.ts +1 -1
- package/dist/mod.global.js +19 -15
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +19 -15
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +26 -20
- package/package.json +1 -1
package/dist/mod.js
CHANGED
|
@@ -958,8 +958,8 @@ var documentToHash = async (document2) => {
|
|
|
958
958
|
return hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
959
959
|
};
|
|
960
960
|
var SIZE_ORDER = {
|
|
961
|
-
alfabetico: ["PP", "P", "M", "G", "GG", "XG", "XGG", "EG", "EGG", "3G", "4G", "5G"],
|
|
962
|
-
infantil: ["RN", "0-3M", "3-6M", "6-9M", "9-12M", "12-18M", "18-24M", "P", "M", "G", "GG"]
|
|
961
|
+
alfabetico: ["PP", "P", "M", "G", "GG", "GGG", "XG", "XGG", "EG", "EGG", "3G", "4G", "5G"],
|
|
962
|
+
infantil: ["RN", "0-3M", "3-6M", "6-9M", "9-12M", "12-18M", "18-24M", "P", "M", "G", "GG", "GGG"]
|
|
963
963
|
};
|
|
964
964
|
var detectSizeType = (sizes) => {
|
|
965
965
|
if (sizes.every((s) => /^\d+([.,]\d+)?$/.test(s))) return "numerico";
|
|
@@ -1058,13 +1058,15 @@ var PROD_DOMAINS = {
|
|
|
1058
1058
|
"checkout": "https://secure.offpremium.com.br"
|
|
1059
1059
|
},
|
|
1060
1060
|
"carolbassi": {
|
|
1061
|
-
"store": "https://carolbassi.myvtex.com"
|
|
1061
|
+
"store": "https://carolbassi.myvtex.com",
|
|
1062
|
+
"checkout": "https://secure.carolbassi.com.br"
|
|
1062
1063
|
},
|
|
1063
1064
|
"bynv": {
|
|
1064
1065
|
"store": "https://bynv.myvtex.com"
|
|
1065
1066
|
},
|
|
1066
1067
|
"lojafabula": {
|
|
1067
|
-
"store": "https://lojafabula.myvtex.com"
|
|
1068
|
+
"store": "https://lojafabula.myvtex.com",
|
|
1069
|
+
"checkout": "https://secure.lojafabula.com.br"
|
|
1068
1070
|
}
|
|
1069
1071
|
};
|
|
1070
1072
|
async function getUserInfo(context) {
|
|
@@ -1627,13 +1629,12 @@ var reservaAdapter = {
|
|
|
1627
1629
|
available_grid: (context) => {
|
|
1628
1630
|
if (context == null ? void 0 : context.available_grid) return context.available_grid;
|
|
1629
1631
|
if (context == null ? void 0 : context.products) {
|
|
1630
|
-
const sizes = context.products.
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
}).filter((name) => Boolean(name));
|
|
1632
|
+
const sizes = context.products.flatMap(
|
|
1633
|
+
(p) => {
|
|
1634
|
+
var _a, _b, _c, _d, _e;
|
|
1635
|
+
return (_e = (_d = (_c = (_b = (_a = p == null ? void 0 : p.isVariantOf) == null ? void 0 : _a.skuVariants) == null ? void 0 : _b.availableVariations) == null ? void 0 : _c.Tamanho) == null ? void 0 : _d.map((size) => size.value)) != null ? _e : [];
|
|
1636
|
+
}
|
|
1637
|
+
);
|
|
1637
1638
|
const result = sortSizes(sizes).join(",").trim();
|
|
1638
1639
|
return result || null;
|
|
1639
1640
|
}
|
|
@@ -1994,10 +1995,13 @@ var orderFormAdapter = {
|
|
|
1994
1995
|
total_discount: (context) => {
|
|
1995
1996
|
var _a, _b, _c;
|
|
1996
1997
|
if (context == null ? void 0 : context.total_discount) return context.total_discount;
|
|
1997
|
-
|
|
1998
|
-
const
|
|
1999
|
-
|
|
2000
|
-
|
|
1998
|
+
const orderForm = context == null ? void 0 : context.orderForm;
|
|
1999
|
+
const items = orderForm == null ? void 0 : orderForm.items;
|
|
2000
|
+
if (!(items == null ? void 0 : items.length) || typeof (orderForm == null ? void 0 : orderForm.value) !== "number") return null;
|
|
2001
|
+
const itemsFullValue = items.reduce((acc, item) => acc + item.listPrice * item.quantity, 0);
|
|
2002
|
+
const shipping = (_c = (_b = (_a = orderForm == null ? void 0 : orderForm.totalizers) == null ? void 0 : _a.find((t) => t.id === "Shipping")) == null ? void 0 : _b.value) != null ? _c : 0;
|
|
2003
|
+
const derived = itemsFullValue + shipping - orderForm.value;
|
|
2004
|
+
return derived > 0 ? derived / 100 : null;
|
|
2001
2005
|
},
|
|
2002
2006
|
subtotal: (context) => {
|
|
2003
2007
|
var _a, _b;
|