@azzas/azzas-tracker-web 2.0.0-preview.22 → 2.0.0-preview.23

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.
@@ -2659,8 +2659,8 @@ var AzzasTracker = function() {
2659
2659
  if (context === null || context === void 0 ? void 0 : context.items) return context.items;
2660
2660
  if (context === null || context === void 0 ? void 0 : context.products) {
2661
2661
  return context.products.map(function(item) {
2662
- var _ref, _ref1, _item_name, _ref2, _ref3, _getItemCategory5, _getItemCategory23, _ref4, _ref5, _ref6, _resizeVtexImage2, _ref7, _ref8;
2663
- var _item_offers_offers, _item_offers, _item_additionalProperty_find_value, _item_additionalProperty_find, _item_additionalProperty, _item_brand_name, _item_brand, _item_offers1, _item_offers2, _item_name_split_, _item_name1, _item_name2, _item_seo, _item_image, _item_offers_offers__seller, _item_offers_offers_, _item_offers_offers1, _item_offers3;
2662
+ var _ref, _ref1, _item_isVariantOf_name, _ref2, _ref3, _getItemCategory5, _getItemCategory23, _ref4, _ref5, _ref6, _resizeVtexImage2, _ref7, _ref8;
2663
+ var _item_offers_offers, _item_offers, _item_additionalProperty_find_value, _item_additionalProperty_find, _item_additionalProperty, _item_brand_name, _item_brand, _item_offers1, _item_offers2, _item_name_split_, _item_name, _item_name1, _item_seo, _item_image, _item_offers_offers__seller, _item_offers_offers_, _item_offers_offers1, _item_offers3;
2664
2664
  var COLOR_REGEX = /^[^_]+_/;
2665
2665
  var listPrice = item === null || item === void 0 ? void 0 : (_item_offers = item.offers) === null || _item_offers === void 0 ? void 0 : (_item_offers_offers = _item_offers.offers) === null || _item_offers_offers === void 0 ? void 0 : _item_offers_offers[0].listPrice;
2666
2666
  var refIdValue = (_item_additionalProperty = item.additionalProperty) === null || _item_additionalProperty === void 0 ? void 0 : (_item_additionalProperty_find = _item_additionalProperty.find(function(i) {
@@ -2670,12 +2670,12 @@ var AzzasTracker = function() {
2670
2670
  quantity: 1,
2671
2671
  index: (_ref = item === null || item === void 0 ? void 0 : item.index) !== null && _ref !== void 0 ? _ref : 0,
2672
2672
  item_brand: (_ref1 = (_item_brand = item.brand) === null || _item_brand === void 0 ? void 0 : (_item_brand_name = _item_brand.name) === null || _item_brand_name === void 0 ? void 0 : _item_brand_name.toLowerCase()) !== null && _ref1 !== void 0 ? _ref1 : null,
2673
- item_name: (_item_name = item.name) !== null && _item_name !== void 0 ? _item_name : null,
2673
+ item_name: (_item_isVariantOf_name = item.isVariantOf.name) !== null && _item_isVariantOf_name !== void 0 ? _item_isVariantOf_name : null,
2674
2674
  price: (_ref2 = (_item_offers1 = item.offers) === null || _item_offers1 === void 0 ? void 0 : _item_offers1.lowPrice) !== null && _ref2 !== void 0 ? _ref2 : null,
2675
2675
  discount: Math.round((Number(listPrice) - Number(item === null || item === void 0 ? void 0 : (_item_offers2 = item.offers) === null || _item_offers2 === void 0 ? void 0 : _item_offers2.lowPrice)) * 100) / 100,
2676
- item_variant: (item === null || item === void 0 ? void 0 : (_item_name1 = item.name) === null || _item_name1 === void 0 ? void 0 : (_item_name_split_ = _item_name1.split(" - ")[0]) === null || _item_name_split_ === void 0 ? void 0 : _item_name_split_.replace(COLOR_REGEX, "").replace(/_/g, " ")) || null,
2676
+ item_variant: (item === null || item === void 0 ? void 0 : (_item_name = item.name) === null || _item_name === void 0 ? void 0 : (_item_name_split_ = _item_name.split(" - ")[0]) === null || _item_name_split_ === void 0 ? void 0 : _item_name_split_.replace(COLOR_REGEX, "").replace(/_/g, " ")) || null,
2677
2677
  // cor
2678
- item_variant2: (_ref3 = item === null || item === void 0 ? void 0 : (_item_name2 = item.name) === null || _item_name2 === void 0 ? void 0 : _item_name2.split(" - ")[1]) !== null && _ref3 !== void 0 ? _ref3 : null,
2678
+ item_variant2: (_ref3 = item === null || item === void 0 ? void 0 : (_item_name1 = item.name) === null || _item_name1 === void 0 ? void 0 : _item_name1.split(" - ")[1]) !== null && _ref3 !== void 0 ? _ref3 : null,
2679
2679
  // tamanho
2680
2680
  item_shipping_tier: "",
2681
2681
  item_ref: refIdValue !== null && refIdValue !== void 0 ? refIdValue : null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azzas/azzas-tracker-web",
3
- "version": "2.0.0-preview.22",
3
+ "version": "2.0.0-preview.23",
4
4
  "type": "module",
5
5
  "main": "./dist/mod.cjs",
6
6
  "module": "./dist/mod.js",