@azzas/azzas-tracker-web 2.0.2-preview.6 → 2.0.3-preview.0
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 +12 -11
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +12 -11
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +12 -11
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +8 -7
- package/package.json +1 -1
package/dist/mod.vtex.global.js
CHANGED
|
@@ -1228,6 +1228,7 @@ var AzzasTracker = function() {
|
|
|
1228
1228
|
];
|
|
1229
1229
|
case 2:
|
|
1230
1230
|
response = _state.sent();
|
|
1231
|
+
console.log("[DT] status info: ", response.status);
|
|
1231
1232
|
if (!(response.status !== 200)) return [
|
|
1232
1233
|
3,
|
|
1233
1234
|
5
|
|
@@ -3242,7 +3243,7 @@ var AzzasTracker = function() {
|
|
|
3242
3243
|
if (context === null || context === void 0 ? void 0 : context.items) return context.items;
|
|
3243
3244
|
if ((context === null || context === void 0 ? void 0 : context.orderForm) && (context === null || context === void 0 ? void 0 : context.orderForm.items)) {
|
|
3244
3245
|
return getOrderFormItems(context.orderForm).map(function(item, index) {
|
|
3245
|
-
var _ref, _ref1, _ref2, _ref3, _getItemCategory7, _getItemCategory25,
|
|
3246
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _getItemCategory7, _getItemCategory25, _ref5, _ref6, _item_detailUrl, _resizeVtexImage2, _ref7, _ref8;
|
|
3246
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;
|
|
3247
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();
|
|
3248
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();
|
|
@@ -3253,18 +3254,18 @@ var AzzasTracker = function() {
|
|
|
3253
3254
|
item_name: (_ref3 = item === null || item === void 0 ? void 0 : item.name.replace(item === null || item === void 0 ? void 0 : item.skuName, "").trim()) !== null && _ref3 !== void 0 ? _ref3 : null,
|
|
3254
3255
|
price: (item === null || item === void 0 ? void 0 : item.sellingPrice) / 100,
|
|
3255
3256
|
discount: ((item === null || item === void 0 ? void 0 : item.listPrice) - (item === null || item === void 0 ? void 0 : item.sellingPrice)) / 100,
|
|
3256
|
-
item_variant: color !== null &&
|
|
3257
|
+
item_variant: (_ref4 = color === null || color === void 0 ? void 0 : color.toUpperCase()) !== null && _ref4 !== void 0 ? _ref4 : null,
|
|
3257
3258
|
item_variant2: size !== null && size !== void 0 ? size : null,
|
|
3258
3259
|
item_shipping_tier: getItemShippingTier2(context.orderForm, item),
|
|
3259
3260
|
item_ref: (item === null || item === void 0 ? void 0 : item.productRefId) || (item === null || item === void 0 ? void 0 : item.refId.replace(/_\d+$/, "")) || null,
|
|
3260
3261
|
item_category: (_getItemCategory7 = getItemCategory7(item)) !== null && _getItemCategory7 !== void 0 ? _getItemCategory7 : null,
|
|
3261
3262
|
item_category2: (_getItemCategory25 = getItemCategory25(item)) !== null && _getItemCategory25 !== void 0 ? _getItemCategory25 : null,
|
|
3262
|
-
item_id: (
|
|
3263
|
-
item_sku: (
|
|
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,
|
|
3264
3265
|
item_url: (_item_detailUrl = item.detailUrl) !== null && _item_detailUrl !== void 0 ? _item_detailUrl : null,
|
|
3265
3266
|
image_url: (_resizeVtexImage2 = resizeVtexImage2(item.imageUrl)) !== null && _resizeVtexImage2 !== void 0 ? _resizeVtexImage2 : null,
|
|
3266
|
-
seller_id: (
|
|
3267
|
-
item_list_name: (
|
|
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
|
|
3268
3269
|
};
|
|
3269
3270
|
});
|
|
3270
3271
|
}
|
|
@@ -3440,7 +3441,7 @@ var AzzasTracker = function() {
|
|
|
3440
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;
|
|
3441
3442
|
},
|
|
3442
3443
|
seller_cod_name: function(context) {
|
|
3443
|
-
return context.appliedSellerCodName ||
|
|
3444
|
+
return context.appliedSellerCodName || null;
|
|
3444
3445
|
}
|
|
3445
3446
|
});
|
|
3446
3447
|
// src/core/promotion.ts
|