@azzas/azzas-tracker-web 2.0.2-preview.5 → 2.0.2-preview.6
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 +16 -12
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +16 -12
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +16 -12
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +7 -3
- package/package.json +1 -1
package/dist/mod.cjs
CHANGED
|
@@ -1131,6 +1131,10 @@ var PROD_DOMAINS = {
|
|
|
1131
1131
|
"lojafabula": {
|
|
1132
1132
|
"store": "https://lojafabula.myvtex.com",
|
|
1133
1133
|
"checkout": "https://secure.lojafabula.com.br"
|
|
1134
|
+
},
|
|
1135
|
+
"lojausereserva": {
|
|
1136
|
+
"store": "https://lojausereserva.myvtex.com",
|
|
1137
|
+
"checkout": "https://lojausereserva.myvtex.com"
|
|
1134
1138
|
}
|
|
1135
1139
|
};
|
|
1136
1140
|
async function getUserInfo(context) {
|
|
@@ -1973,7 +1977,7 @@ var getItemCategory7 = (item) => {
|
|
|
1973
1977
|
};
|
|
1974
1978
|
var getItemCategory25 = (item) => {
|
|
1975
1979
|
var _a, _b;
|
|
1976
|
-
const AVOID_CATEGORIES = /outlet|bazar|sale/i;
|
|
1980
|
+
const AVOID_CATEGORIES = /outlet|bazar|sale|coleção|promoção/i;
|
|
1977
1981
|
const categories = Object.values((_a = item == null ? void 0 : item.productCategories) != null ? _a : {});
|
|
1978
1982
|
const validHierarchy = categories.map((c) => c.trim()).filter((c) => c && !AVOID_CATEGORIES.test(c));
|
|
1979
1983
|
const deepest = (_b = validHierarchy[validHierarchy.length - 1]) != null ? _b : "";
|
|
@@ -2012,28 +2016,28 @@ var orderFormAdapter = {
|
|
|
2012
2016
|
if (context == null ? void 0 : context.items) return context.items;
|
|
2013
2017
|
if ((context == null ? void 0 : context.orderForm) && (context == null ? void 0 : context.orderForm.items)) {
|
|
2014
2018
|
return getOrderFormItems(context.orderForm).map((item, index) => {
|
|
2015
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
2019
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
2016
2020
|
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();
|
|
2017
2021
|
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();
|
|
2018
2022
|
return {
|
|
2019
2023
|
quantity: (_f = item == null ? void 0 : item.quantity) != null ? _f : 1,
|
|
2020
2024
|
index: (_h = (_g = context == null ? void 0 : context.orderForm) == null ? void 0 : _g.index) != null ? _h : index + 1,
|
|
2021
|
-
item_brand: (_j = (_i = item.additionalInfo) == null ? void 0 : _i.brandName)
|
|
2022
|
-
item_name: (
|
|
2025
|
+
item_brand: (_k = (_j = (_i = item.additionalInfo) == null ? void 0 : _i.brandName) == null ? void 0 : _j.toLowerCase()) != null ? _k : null,
|
|
2026
|
+
item_name: (_l = item == null ? void 0 : item.name.replace(item == null ? void 0 : item.skuName, "").trim()) != null ? _l : null,
|
|
2023
2027
|
price: (item == null ? void 0 : item.sellingPrice) / 100,
|
|
2024
2028
|
discount: ((item == null ? void 0 : item.listPrice) - (item == null ? void 0 : item.sellingPrice)) / 100,
|
|
2025
2029
|
item_variant: color != null ? color : null,
|
|
2026
2030
|
item_variant2: size != null ? size : null,
|
|
2027
2031
|
item_shipping_tier: getItemShippingTier2(context.orderForm, item),
|
|
2028
2032
|
item_ref: (item == null ? void 0 : item.productRefId) || (item == null ? void 0 : item.refId.replace(/_\d+$/, "")) || null,
|
|
2029
|
-
item_category: (
|
|
2030
|
-
item_category2: (
|
|
2031
|
-
item_id: (
|
|
2032
|
-
item_sku: (
|
|
2033
|
-
item_url: (
|
|
2034
|
-
image_url: (
|
|
2035
|
-
seller_id: (
|
|
2036
|
-
item_list_name: (
|
|
2033
|
+
item_category: (_m = getItemCategory7(item)) != null ? _m : null,
|
|
2034
|
+
item_category2: (_n = getItemCategory25(item)) != null ? _n : null,
|
|
2035
|
+
item_id: (_o = item == null ? void 0 : item.productId) != null ? _o : null,
|
|
2036
|
+
item_sku: (_p = item == null ? void 0 : item.id) != null ? _p : null,
|
|
2037
|
+
item_url: (_q = item.detailUrl) != null ? _q : null,
|
|
2038
|
+
image_url: (_r = resizeVtexImage2(item.imageUrl)) != null ? _r : null,
|
|
2039
|
+
seller_id: (_s = item == null ? void 0 : item.seller) != null ? _s : null,
|
|
2040
|
+
item_list_name: (_u = (_t = context == null ? void 0 : context.orderForm) == null ? void 0 : _t.item_list_name) != null ? _u : null
|
|
2037
2041
|
};
|
|
2038
2042
|
});
|
|
2039
2043
|
}
|