@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.js CHANGED
@@ -1102,6 +1102,10 @@ var PROD_DOMAINS = {
1102
1102
  "lojafabula": {
1103
1103
  "store": "https://lojafabula.myvtex.com",
1104
1104
  "checkout": "https://secure.lojafabula.com.br"
1105
+ },
1106
+ "lojausereserva": {
1107
+ "store": "https://lojausereserva.myvtex.com",
1108
+ "checkout": "https://lojausereserva.myvtex.com"
1105
1109
  }
1106
1110
  };
1107
1111
  async function getUserInfo(context) {
@@ -1944,7 +1948,7 @@ var getItemCategory7 = (item) => {
1944
1948
  };
1945
1949
  var getItemCategory25 = (item) => {
1946
1950
  var _a, _b;
1947
- const AVOID_CATEGORIES = /outlet|bazar|sale/i;
1951
+ const AVOID_CATEGORIES = /outlet|bazar|sale|coleção|promoção/i;
1948
1952
  const categories = Object.values((_a = item == null ? void 0 : item.productCategories) != null ? _a : {});
1949
1953
  const validHierarchy = categories.map((c) => c.trim()).filter((c) => c && !AVOID_CATEGORIES.test(c));
1950
1954
  const deepest = (_b = validHierarchy[validHierarchy.length - 1]) != null ? _b : "";
@@ -1983,28 +1987,28 @@ var orderFormAdapter = {
1983
1987
  if (context == null ? void 0 : context.items) return context.items;
1984
1988
  if ((context == null ? void 0 : context.orderForm) && (context == null ? void 0 : context.orderForm.items)) {
1985
1989
  return getOrderFormItems(context.orderForm).map((item, index) => {
1986
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
1990
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
1987
1991
  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();
1988
1992
  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();
1989
1993
  return {
1990
1994
  quantity: (_f = item == null ? void 0 : item.quantity) != null ? _f : 1,
1991
1995
  index: (_h = (_g = context == null ? void 0 : context.orderForm) == null ? void 0 : _g.index) != null ? _h : index + 1,
1992
- item_brand: (_j = (_i = item.additionalInfo) == null ? void 0 : _i.brandName) != null ? _j : null,
1993
- item_name: (_k = item == null ? void 0 : item.name.replace(item == null ? void 0 : item.skuName, "").trim()) != null ? _k : null,
1996
+ item_brand: (_k = (_j = (_i = item.additionalInfo) == null ? void 0 : _i.brandName) == null ? void 0 : _j.toLowerCase()) != null ? _k : null,
1997
+ item_name: (_l = item == null ? void 0 : item.name.replace(item == null ? void 0 : item.skuName, "").trim()) != null ? _l : null,
1994
1998
  price: (item == null ? void 0 : item.sellingPrice) / 100,
1995
1999
  discount: ((item == null ? void 0 : item.listPrice) - (item == null ? void 0 : item.sellingPrice)) / 100,
1996
2000
  item_variant: color != null ? color : null,
1997
2001
  item_variant2: size != null ? size : null,
1998
2002
  item_shipping_tier: getItemShippingTier2(context.orderForm, item),
1999
2003
  item_ref: (item == null ? void 0 : item.productRefId) || (item == null ? void 0 : item.refId.replace(/_\d+$/, "")) || null,
2000
- item_category: (_l = getItemCategory7(item)) != null ? _l : null,
2001
- item_category2: (_m = getItemCategory25(item)) != null ? _m : null,
2002
- item_id: (_n = item == null ? void 0 : item.productId) != null ? _n : null,
2003
- item_sku: (_o = item == null ? void 0 : item.id) != null ? _o : null,
2004
- item_url: (_p = item.detailUrl) != null ? _p : null,
2005
- image_url: (_q = resizeVtexImage2(item.imageUrl)) != null ? _q : null,
2006
- seller_id: (_r = item == null ? void 0 : item.seller) != null ? _r : null,
2007
- item_list_name: (_t = (_s = context == null ? void 0 : context.orderForm) == null ? void 0 : _s.item_list_name) != null ? _t : null
2004
+ item_category: (_m = getItemCategory7(item)) != null ? _m : null,
2005
+ item_category2: (_n = getItemCategory25(item)) != null ? _n : null,
2006
+ item_id: (_o = item == null ? void 0 : item.productId) != null ? _o : null,
2007
+ item_sku: (_p = item == null ? void 0 : item.id) != null ? _p : null,
2008
+ item_url: (_q = item.detailUrl) != null ? _q : null,
2009
+ image_url: (_r = resizeVtexImage2(item.imageUrl)) != null ? _r : null,
2010
+ seller_id: (_s = item == null ? void 0 : item.seller) != null ? _s : null,
2011
+ item_list_name: (_u = (_t = context == null ? void 0 : context.orderForm) == null ? void 0 : _t.item_list_name) != null ? _u : null
2008
2012
  };
2009
2013
  });
2010
2014
  }