@azzas/azzas-tracker-web 2.0.0-preview.20 → 2.0.0-preview.22
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 -17
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +19 -17
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +19 -17
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +12 -10
- package/package.json +1 -1
package/dist/mod.cjs
CHANGED
|
@@ -1579,7 +1579,7 @@ var getItemCategory5 = (item) => {
|
|
|
1579
1579
|
};
|
|
1580
1580
|
var getItemCategory23 = (item) => {
|
|
1581
1581
|
var _a, _b, _c, _d;
|
|
1582
|
-
const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
|
|
1582
|
+
const AVOID_CATEGORIES = /^(outlet|bazar|sale|coleção)$/i;
|
|
1583
1583
|
const categories = (_c = (_b = (_a = item == null ? void 0 : item.similarItems) == null ? void 0 : _a[0]) == null ? void 0 : _b.categories) != null ? _c : [];
|
|
1584
1584
|
const validHierarchy = categories.filter((c) => c && !AVOID_CATEGORIES.test(c));
|
|
1585
1585
|
const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
|
|
@@ -1971,26 +1971,28 @@ var orderFormAdapter = {
|
|
|
1971
1971
|
if (context == null ? void 0 : context.items) return context.items;
|
|
1972
1972
|
if ((context == null ? void 0 : context.orderForm) && (context == null ? void 0 : context.orderForm.items)) {
|
|
1973
1973
|
return getOrderFormItems(context.orderForm).map((item, index) => {
|
|
1974
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t
|
|
1974
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
1975
|
+
const color = context.brand === "carolbassi" ? null : (_c = (_b = (_a = item == null ? void 0 : item.skuName) == null ? void 0 : _a.split(" - ")[0]) == null ? void 0 : _b.split("_").pop()) == null ? void 0 : _c.trim();
|
|
1976
|
+
const size = context.brand === "carolbassi" ? item == null ? void 0 : item.skuName : (_e = (_d = item == null ? void 0 : item.skuName) == null ? void 0 : _d.split(" - ")[1]) == null ? void 0 : _e.trim();
|
|
1975
1977
|
return {
|
|
1976
|
-
quantity: (
|
|
1977
|
-
index: (
|
|
1978
|
-
item_brand: (
|
|
1979
|
-
item_name: (
|
|
1978
|
+
quantity: (_f = item == null ? void 0 : item.quantity) != null ? _f : 1,
|
|
1979
|
+
index: (_h = (_g = context == null ? void 0 : context.orderForm) == null ? void 0 : _g.index) != null ? _h : index + 1,
|
|
1980
|
+
item_brand: (_j = (_i = item.additionalInfo) == null ? void 0 : _i.brandName) != null ? _j : null,
|
|
1981
|
+
item_name: (_k = item == null ? void 0 : item.name.replace(item == null ? void 0 : item.skuName, "").trim()) != null ? _k : null,
|
|
1980
1982
|
price: (item == null ? void 0 : item.sellingPrice) / 100,
|
|
1981
1983
|
discount: ((item == null ? void 0 : item.listPrice) - (item == null ? void 0 : item.sellingPrice)) / 100,
|
|
1982
|
-
item_variant:
|
|
1983
|
-
item_variant2:
|
|
1984
|
+
item_variant: color != null ? color : null,
|
|
1985
|
+
item_variant2: size != null ? size : null,
|
|
1984
1986
|
item_shipping_tier: getItemShippingTier2(context.orderForm, item),
|
|
1985
1987
|
item_ref: (item == null ? void 0 : item.productRefId) || (item == null ? void 0 : item.refId.replace(/_\d+$/, "")) || null,
|
|
1986
|
-
item_category: (
|
|
1987
|
-
item_category2: (
|
|
1988
|
-
item_id: (
|
|
1989
|
-
item_sku: (
|
|
1990
|
-
item_url: (
|
|
1991
|
-
image_url: (
|
|
1992
|
-
seller_id: (
|
|
1993
|
-
item_list_name: (
|
|
1988
|
+
item_category: (_l = getItemCategory7(item)) != null ? _l : null,
|
|
1989
|
+
item_category2: (_m = getItemCategory25(item)) != null ? _m : null,
|
|
1990
|
+
item_id: (_n = item == null ? void 0 : item.productId) != null ? _n : null,
|
|
1991
|
+
item_sku: (_o = item == null ? void 0 : item.id) != null ? _o : null,
|
|
1992
|
+
item_url: (_p = item.detailUrl) != null ? _p : null,
|
|
1993
|
+
image_url: (_q = resizeVtexImage2(item.imageUrl)) != null ? _q : null,
|
|
1994
|
+
seller_id: (_r = item == null ? void 0 : item.seller) != null ? _r : null,
|
|
1995
|
+
item_list_name: (_t = (_s = context == null ? void 0 : context.orderForm) == null ? void 0 : _s.item_list_name) != null ? _t : null
|
|
1994
1996
|
};
|
|
1995
1997
|
});
|
|
1996
1998
|
}
|
|
@@ -2074,7 +2076,7 @@ var orderFormAdapter = {
|
|
|
2074
2076
|
var _a2, _b2;
|
|
2075
2077
|
const selected = (_a2 = item.slas) == null ? void 0 : _a2.find((sla) => sla.id === item.selectedSla);
|
|
2076
2078
|
return total + ((_b2 = selected == null ? void 0 : selected.price) != null ? _b2 : 0);
|
|
2077
|
-
}, 0);
|
|
2079
|
+
}, 0) / 100;
|
|
2078
2080
|
},
|
|
2079
2081
|
shipping_tier: (context) => {
|
|
2080
2082
|
var _a, _b, _c;
|