@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.js CHANGED
@@ -1942,26 +1942,28 @@ var orderFormAdapter = {
1942
1942
  if (context == null ? void 0 : context.items) return context.items;
1943
1943
  if ((context == null ? void 0 : context.orderForm) && (context == null ? void 0 : context.orderForm.items)) {
1944
1944
  return getOrderFormItems(context.orderForm).map((item, index) => {
1945
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
1945
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
1946
+ 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();
1947
+ 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();
1946
1948
  return {
1947
- quantity: (_a = item == null ? void 0 : item.quantity) != null ? _a : 1,
1948
- index: (_c = (_b = context == null ? void 0 : context.orderForm) == null ? void 0 : _b.index) != null ? _c : index + 1,
1949
- item_brand: (_e = (_d = item.additionalInfo) == null ? void 0 : _d.brandName) != null ? _e : null,
1950
- item_name: (_f = item == null ? void 0 : item.name.replace(item == null ? void 0 : item.skuName, "").trim()) != null ? _f : null,
1949
+ quantity: (_f = item == null ? void 0 : item.quantity) != null ? _f : 1,
1950
+ index: (_h = (_g = context == null ? void 0 : context.orderForm) == null ? void 0 : _g.index) != null ? _h : index + 1,
1951
+ item_brand: (_j = (_i = item.additionalInfo) == null ? void 0 : _i.brandName) != null ? _j : null,
1952
+ item_name: (_k = item == null ? void 0 : item.name.replace(item == null ? void 0 : item.skuName, "").trim()) != null ? _k : null,
1951
1953
  price: (item == null ? void 0 : item.sellingPrice) / 100,
1952
1954
  discount: ((item == null ? void 0 : item.listPrice) - (item == null ? void 0 : item.sellingPrice)) / 100,
1953
- item_variant: (_j = (_i = (_h = (_g = item == null ? void 0 : item.skuName) == null ? void 0 : _g.split(" - ")[0]) == null ? void 0 : _h.split("_").pop()) == null ? void 0 : _i.trim()) != null ? _j : null,
1954
- item_variant2: (_m = (_l = (_k = item == null ? void 0 : item.skuName) == null ? void 0 : _k.split(" - ")[1]) == null ? void 0 : _l.trim()) != null ? _m : null,
1955
+ item_variant: color != null ? color : null,
1956
+ item_variant2: size != null ? size : null,
1955
1957
  item_shipping_tier: getItemShippingTier2(context.orderForm, item),
1956
1958
  item_ref: (item == null ? void 0 : item.productRefId) || (item == null ? void 0 : item.refId.replace(/_\d+$/, "")) || null,
1957
- item_category: (_n = getItemCategory7(item)) != null ? _n : null,
1958
- item_category2: (_o = getItemCategory25(item)) != null ? _o : null,
1959
- item_id: (_p = item == null ? void 0 : item.productId) != null ? _p : null,
1960
- item_sku: (_q = item == null ? void 0 : item.id) != null ? _q : null,
1961
- item_url: (_r = item.detailUrl) != null ? _r : null,
1962
- image_url: (_s = resizeVtexImage2(item.imageUrl)) != null ? _s : null,
1963
- seller_id: (_t = item == null ? void 0 : item.seller) != null ? _t : null,
1964
- item_list_name: (_v = (_u = context == null ? void 0 : context.orderForm) == null ? void 0 : _u.item_list_name) != null ? _v : null
1959
+ item_category: (_l = getItemCategory7(item)) != null ? _l : null,
1960
+ item_category2: (_m = getItemCategory25(item)) != null ? _m : null,
1961
+ item_id: (_n = item == null ? void 0 : item.productId) != null ? _n : null,
1962
+ item_sku: (_o = item == null ? void 0 : item.id) != null ? _o : null,
1963
+ item_url: (_p = item.detailUrl) != null ? _p : null,
1964
+ image_url: (_q = resizeVtexImage2(item.imageUrl)) != null ? _q : null,
1965
+ seller_id: (_r = item == null ? void 0 : item.seller) != null ? _r : null,
1966
+ item_list_name: (_t = (_s = context == null ? void 0 : context.orderForm) == null ? void 0 : _s.item_list_name) != null ? _t : null
1965
1967
  };
1966
1968
  });
1967
1969
  }