@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.cjs +17 -15
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +17 -15
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +17 -15
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +10 -8
- package/package.json +1 -1
package/dist/mod.vtex.global.js
CHANGED
|
@@ -3088,8 +3088,10 @@ var AzzasTracker = function() {
|
|
|
3088
3088
|
if (context === null || context === void 0 ? void 0 : context.items) return context.items;
|
|
3089
3089
|
if ((context === null || context === void 0 ? void 0 : context.orderForm) && (context === null || context === void 0 ? void 0 : context.orderForm.items)) {
|
|
3090
3090
|
return getOrderFormItems(context.orderForm).map(function(item, index) {
|
|
3091
|
-
var _ref, _ref1, _ref2, _ref3,
|
|
3092
|
-
var
|
|
3091
|
+
var _ref, _ref1, _ref2, _ref3, _getItemCategory7, _getItemCategory25, _ref4, _ref5, _item_detailUrl, _resizeVtexImage2, _ref6, _ref7;
|
|
3092
|
+
var _item_skuName_split__split_pop, _item_skuName_split_, _item_skuName, _item_skuName_split_1, _item_skuName1, _context_orderForm, _item_additionalInfo, _context_orderForm1;
|
|
3093
|
+
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();
|
|
3094
|
+
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();
|
|
3093
3095
|
return {
|
|
3094
3096
|
quantity: (_ref = item === null || item === void 0 ? void 0 : item.quantity) !== null && _ref !== void 0 ? _ref : 1,
|
|
3095
3097
|
index: (_ref1 = context === null || context === void 0 ? void 0 : (_context_orderForm = context.orderForm) === null || _context_orderForm === void 0 ? void 0 : _context_orderForm.index) !== null && _ref1 !== void 0 ? _ref1 : index + 1,
|
|
@@ -3097,18 +3099,18 @@ var AzzasTracker = function() {
|
|
|
3097
3099
|
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,
|
|
3098
3100
|
price: (item === null || item === void 0 ? void 0 : item.sellingPrice) / 100,
|
|
3099
3101
|
discount: ((item === null || item === void 0 ? void 0 : item.listPrice) - (item === null || item === void 0 ? void 0 : item.sellingPrice)) / 100,
|
|
3100
|
-
item_variant:
|
|
3101
|
-
item_variant2:
|
|
3102
|
+
item_variant: color !== null && color !== void 0 ? color : null,
|
|
3103
|
+
item_variant2: size !== null && size !== void 0 ? size : null,
|
|
3102
3104
|
item_shipping_tier: getItemShippingTier2(context.orderForm, item),
|
|
3103
3105
|
item_ref: (item === null || item === void 0 ? void 0 : item.productRefId) || (item === null || item === void 0 ? void 0 : item.refId.replace(/_\d+$/, "")) || null,
|
|
3104
3106
|
item_category: (_getItemCategory7 = getItemCategory7(item)) !== null && _getItemCategory7 !== void 0 ? _getItemCategory7 : null,
|
|
3105
3107
|
item_category2: (_getItemCategory25 = getItemCategory25(item)) !== null && _getItemCategory25 !== void 0 ? _getItemCategory25 : null,
|
|
3106
|
-
item_id: (
|
|
3107
|
-
item_sku: (
|
|
3108
|
+
item_id: (_ref4 = item === null || item === void 0 ? void 0 : item.productId) !== null && _ref4 !== void 0 ? _ref4 : null,
|
|
3109
|
+
item_sku: (_ref5 = item === null || item === void 0 ? void 0 : item.id) !== null && _ref5 !== void 0 ? _ref5 : null,
|
|
3108
3110
|
item_url: (_item_detailUrl = item.detailUrl) !== null && _item_detailUrl !== void 0 ? _item_detailUrl : null,
|
|
3109
3111
|
image_url: (_resizeVtexImage2 = resizeVtexImage2(item.imageUrl)) !== null && _resizeVtexImage2 !== void 0 ? _resizeVtexImage2 : null,
|
|
3110
|
-
seller_id: (
|
|
3111
|
-
item_list_name: (
|
|
3112
|
+
seller_id: (_ref6 = item === null || item === void 0 ? void 0 : item.seller) !== null && _ref6 !== void 0 ? _ref6 : null,
|
|
3113
|
+
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
|
|
3112
3114
|
};
|
|
3113
3115
|
});
|
|
3114
3116
|
}
|