@azzas/azzas-tracker-web 2.0.0 → 2.0.1-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.
- package/dist/mod.cjs +20 -19
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +20 -19
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +20 -19
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +7 -8
- package/package.json +1 -1
package/dist/mod.vtex.global.js
CHANGED
|
@@ -2170,6 +2170,9 @@ var AzzasTracker = function() {
|
|
|
2170
2170
|
"store": "https://lojaoffpremium.myvtex.com",
|
|
2171
2171
|
"checkout": "https://secure.offpremium.com.br"
|
|
2172
2172
|
},
|
|
2173
|
+
"carolbassi": {
|
|
2174
|
+
"store": "https://carolbassi.myvtex.com"
|
|
2175
|
+
},
|
|
2173
2176
|
"bynv": {
|
|
2174
2177
|
"store": "https://bynv.myvtex.com"
|
|
2175
2178
|
},
|
|
@@ -2659,13 +2662,9 @@ var AzzasTracker = function() {
|
|
|
2659
2662
|
if (context === null || context === void 0 ? void 0 : context.items) return context.items;
|
|
2660
2663
|
if (context === null || context === void 0 ? void 0 : context.products) {
|
|
2661
2664
|
return context.products.map(function(item) {
|
|
2662
|
-
var _ref, _ref1, _item_isVariantOf_name, _ref2, _ref3, _getItemCategory5, _getItemCategory23, _ref4, _ref5, _ref6, _resizeVtexImage2, _ref7, _ref8;
|
|
2663
|
-
var _item_offers_offers, _item_offers,
|
|
2664
|
-
var COLOR_REGEX = /^[^_]+_/;
|
|
2665
|
+
var _ref, _ref1, _item_isVariantOf_name, _ref2, _ref3, _item_groupRefId, _getItemCategory5, _getItemCategory23, _ref4, _ref5, _ref6, _resizeVtexImage2, _ref7, _ref8;
|
|
2666
|
+
var _item_offers_offers, _item_offers, _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;
|
|
2665
2667
|
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
|
-
var refIdValue = (_item_additionalProperty = item.additionalProperty) === null || _item_additionalProperty === void 0 ? void 0 : (_item_additionalProperty_find = _item_additionalProperty.find(function(i) {
|
|
2667
|
-
return i.name === "RefId";
|
|
2668
|
-
})) === null || _item_additionalProperty_find === void 0 ? void 0 : (_item_additionalProperty_find_value = _item_additionalProperty_find.value) === null || _item_additionalProperty_find_value === void 0 ? void 0 : _item_additionalProperty_find_value.replace(/_\d+$/, "");
|
|
2669
2668
|
return {
|
|
2670
2669
|
quantity: 1,
|
|
2671
2670
|
index: (_ref = item === null || item === void 0 ? void 0 : item.index) !== null && _ref !== void 0 ? _ref : 0,
|
|
@@ -2673,12 +2672,12 @@ var AzzasTracker = function() {
|
|
|
2673
2672
|
item_name: (_item_isVariantOf_name = item.isVariantOf.name) !== null && _item_isVariantOf_name !== void 0 ? _item_isVariantOf_name : null,
|
|
2674
2673
|
price: (_ref2 = (_item_offers1 = item.offers) === null || _item_offers1 === void 0 ? void 0 : _item_offers1.lowPrice) !== null && _ref2 !== void 0 ? _ref2 : null,
|
|
2675
2674
|
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_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(
|
|
2675
|
+
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(/^[^_]+_/, "").replace(/_/g, " ")) || null,
|
|
2677
2676
|
// cor
|
|
2678
2677
|
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
2678
|
// tamanho
|
|
2680
2679
|
item_shipping_tier: "",
|
|
2681
|
-
item_ref:
|
|
2680
|
+
item_ref: (_item_groupRefId = item.groupRefId) !== null && _item_groupRefId !== void 0 ? _item_groupRefId : null,
|
|
2682
2681
|
item_category: (_getItemCategory5 = getItemCategory5(item)) !== null && _getItemCategory5 !== void 0 ? _getItemCategory5 : null,
|
|
2683
2682
|
item_category2: (_getItemCategory23 = getItemCategory23(item)) !== null && _getItemCategory23 !== void 0 ? _getItemCategory23 : null,
|
|
2684
2683
|
item_id: (_ref4 = item === null || item === void 0 ? void 0 : item.id) !== null && _ref4 !== void 0 ? _ref4 : null,
|