@azzas/azzas-tracker-web 2.0.2-preview.0 → 2.0.2-preview.2
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 +12 -11
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +12 -11
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +12 -11
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +19 -12
- package/package.json +1 -1
package/dist/mod.cjs
CHANGED
|
@@ -1610,7 +1610,7 @@ var reservaAdapter = {
|
|
|
1610
1610
|
discount: Math.round((Number(listPrice) - Number((_j = item == null ? void 0 : item.offers) == null ? void 0 : _j.lowPrice)) * 100) / 100,
|
|
1611
1611
|
item_variant: ((_l = (_k = item == null ? void 0 : item.name) == null ? void 0 : _k.split(" - ")[0]) == null ? void 0 : _l.replace(/^[^_]+_/, "").replace(/_/g, " ")) || null,
|
|
1612
1612
|
// cor
|
|
1613
|
-
item_variant2: (_n = (_m = item == null ? void 0 : item.name) == null ? void 0 : _m.split(" - ")[1]) != null ? _n : null,
|
|
1613
|
+
item_variant2: (_n = (_m = item == null ? void 0 : item.name) == null ? void 0 : _m.split(" - ")[1].toUpperCase()) != null ? _n : null,
|
|
1614
1614
|
// tamanho
|
|
1615
1615
|
item_shipping_tier: "",
|
|
1616
1616
|
item_ref: (_o = item.groupRefId) != null ? _o : null,
|
|
@@ -1656,18 +1656,19 @@ var reservaAdapter = {
|
|
|
1656
1656
|
return null;
|
|
1657
1657
|
},
|
|
1658
1658
|
available_grid: (context) => {
|
|
1659
|
+
var _a;
|
|
1659
1660
|
if (context == null ? void 0 : context.available_grid) return context.available_grid;
|
|
1660
|
-
if (context == null ? void 0 : context.products)
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1661
|
+
if (!((_a = context == null ? void 0 : context.products) == null ? void 0 : _a.length)) return null;
|
|
1662
|
+
const sizes = context.products.flatMap((p) => {
|
|
1663
|
+
var _a2, _b, _c, _d;
|
|
1664
|
+
const { productGroupID, skuVariants } = (_a2 = p == null ? void 0 : p.isVariantOf) != null ? _a2 : {};
|
|
1665
|
+
const currentColor = (_b = p == null ? void 0 : p.similarItems) == null ? void 0 : _b.find((i) => (i == null ? void 0 : i.productId) === productGroupID);
|
|
1666
|
+
const variantIDs = (_c = skuVariants == null ? void 0 : skuVariants.allVariantProducts) == null ? void 0 : _c.map((v) => v == null ? void 0 : v.productID);
|
|
1667
|
+
return ((_d = currentColor == null ? void 0 : currentColor.sizes) != null ? _d : []).flatMap(
|
|
1668
|
+
(entry) => (entry == null ? void 0 : entry.isAvailable) && (entry == null ? void 0 : entry.size) && (!(variantIDs == null ? void 0 : variantIDs.length) || variantIDs.includes(entry.skuId)) ? [entry.size] : []
|
|
1666
1669
|
);
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
}
|
|
1670
|
-
return null;
|
|
1670
|
+
});
|
|
1671
|
+
return sortSizes(sizes).join(",").trim() || null;
|
|
1671
1672
|
}
|
|
1672
1673
|
};
|
|
1673
1674
|
|