@azzas/azzas-tracker-web 2.0.2 → 2.0.3-preview.1

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.
@@ -3243,7 +3243,7 @@ var AzzasTracker = function() {
3243
3243
  if (context === null || context === void 0 ? void 0 : context.items) return context.items;
3244
3244
  if ((context === null || context === void 0 ? void 0 : context.orderForm) && (context === null || context === void 0 ? void 0 : context.orderForm.items)) {
3245
3245
  return getOrderFormItems(context.orderForm).map(function(item, index) {
3246
- var _ref, _ref1, _ref2, _ref3, _getItemCategory7, _getItemCategory25, _ref4, _ref5, _item_detailUrl, _resizeVtexImage2, _ref6, _ref7;
3246
+ var _ref, _ref1, _ref2, _ref3, _ref4, _getItemCategory7, _getItemCategory25, _ref5, _ref6, _item_detailUrl, _resizeVtexImage2, _ref7, _ref8;
3247
3247
  var _item_skuName_split__split_pop, _item_skuName_split_, _item_skuName, _item_skuName_split_1, _item_skuName1, _context_orderForm, _item_additionalInfo_brandName, _item_additionalInfo, _context_orderForm1;
3248
3248
  var color = context.brand === "carolbassi" ? null : item === null || item === void 0 ? void 0 : (_item_skuName = item.skuName) === null || _item_skuName === void 0 ? void 0 : (_item_skuName_split_ = _item_skuName.split(" - ")[0]) === null || _item_skuName_split_ === void 0 ? void 0 : (_item_skuName_split__split_pop = _item_skuName_split_.split("_").pop()) === null || _item_skuName_split__split_pop === void 0 ? void 0 : _item_skuName_split__split_pop.trim();
3249
3249
  var size = context.brand === "carolbassi" ? item === null || item === void 0 ? void 0 : item.skuName : item === null || item === void 0 ? void 0 : (_item_skuName1 = item.skuName) === null || _item_skuName1 === void 0 ? void 0 : (_item_skuName_split_1 = _item_skuName1.split(" - ")[1]) === null || _item_skuName_split_1 === void 0 ? void 0 : _item_skuName_split_1.trim();
@@ -3255,17 +3255,17 @@ var AzzasTracker = function() {
3255
3255
  price: (item === null || item === void 0 ? void 0 : item.sellingPrice) / 100,
3256
3256
  discount: ((item === null || item === void 0 ? void 0 : item.listPrice) - (item === null || item === void 0 ? void 0 : item.sellingPrice)) / 100,
3257
3257
  item_variant: color !== null && color !== void 0 ? color : null,
3258
- item_variant2: size !== null && size !== void 0 ? size : null,
3258
+ item_variant2: (_ref4 = size === null || size === void 0 ? void 0 : size.toUpperCase()) !== null && _ref4 !== void 0 ? _ref4 : null,
3259
3259
  item_shipping_tier: getItemShippingTier2(context.orderForm, item),
3260
3260
  item_ref: (item === null || item === void 0 ? void 0 : item.productRefId) || (item === null || item === void 0 ? void 0 : item.refId.replace(/_\d+$/, "")) || null,
3261
3261
  item_category: (_getItemCategory7 = getItemCategory7(item)) !== null && _getItemCategory7 !== void 0 ? _getItemCategory7 : null,
3262
3262
  item_category2: (_getItemCategory25 = getItemCategory25(item)) !== null && _getItemCategory25 !== void 0 ? _getItemCategory25 : null,
3263
- item_id: (_ref4 = item === null || item === void 0 ? void 0 : item.productId) !== null && _ref4 !== void 0 ? _ref4 : null,
3264
- item_sku: (_ref5 = item === null || item === void 0 ? void 0 : item.id) !== null && _ref5 !== void 0 ? _ref5 : null,
3263
+ item_id: (_ref5 = item === null || item === void 0 ? void 0 : item.productId) !== null && _ref5 !== void 0 ? _ref5 : null,
3264
+ item_sku: (_ref6 = item === null || item === void 0 ? void 0 : item.id) !== null && _ref6 !== void 0 ? _ref6 : null,
3265
3265
  item_url: (_item_detailUrl = item.detailUrl) !== null && _item_detailUrl !== void 0 ? _item_detailUrl : null,
3266
3266
  image_url: (_resizeVtexImage2 = resizeVtexImage2(item.imageUrl)) !== null && _resizeVtexImage2 !== void 0 ? _resizeVtexImage2 : null,
3267
- seller_id: (_ref6 = item === null || item === void 0 ? void 0 : item.seller) !== null && _ref6 !== void 0 ? _ref6 : null,
3268
- item_list_name: (_ref7 = context === null || context === void 0 ? void 0 : (_context_orderForm1 = context.orderForm) === null || _context_orderForm1 === void 0 ? void 0 : _context_orderForm1.item_list_name) !== null && _ref7 !== void 0 ? _ref7 : null
3267
+ seller_id: (_ref7 = item === null || item === void 0 ? void 0 : item.seller) !== null && _ref7 !== void 0 ? _ref7 : null,
3268
+ item_list_name: (_ref8 = context === null || context === void 0 ? void 0 : (_context_orderForm1 = context.orderForm) === null || _context_orderForm1 === void 0 ? void 0 : _context_orderForm1.item_list_name) !== null && _ref8 !== void 0 ? _ref8 : null
3269
3269
  };
3270
3270
  });
3271
3271
  }
@@ -3441,7 +3441,7 @@ var AzzasTracker = function() {
3441
3441
  return context.appliedCoupon || (context === null || context === void 0 ? void 0 : (_context_orderForm = context.orderForm) === null || _context_orderForm === void 0 ? void 0 : (_context_orderForm_marketingData = _context_orderForm.marketingData) === null || _context_orderForm_marketingData === void 0 ? void 0 : _context_orderForm_marketingData.coupon) || null;
3442
3442
  },
3443
3443
  seller_cod_name: function(context) {
3444
- return context.appliedSellerCodName || (context === null || context === void 0 ? void 0 : context.orderForm.marketingData.utmiCampaign) || null;
3444
+ return context.appliedSellerCodName || null;
3445
3445
  }
3446
3446
  });
3447
3447
  // src/core/promotion.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azzas/azzas-tracker-web",
3
- "version": "2.0.2",
3
+ "version": "2.0.3-preview.1",
4
4
  "type": "module",
5
5
  "main": "./dist/mod.cjs",
6
6
  "module": "./dist/mod.js",