@azzas/azzas-tracker-web 2.0.0-preview.21 → 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 +17 -15
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +17 -15
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +17 -15
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +10 -8
- package/package.json +1 -1
package/dist/mod.global.js
CHANGED
|
@@ -1971,26 +1971,28 @@ var AzzasTracker = (() => {
|
|
|
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
|
}
|