@azzas/azzas-tracker-web 2.0.1-preview.0 → 2.0.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 +23 -20
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +23 -20
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +23 -20
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +10 -9
- package/package.json +1 -1
package/dist/mod.vtex.global.js
CHANGED
|
@@ -2170,11 +2170,16 @@ 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
|
+
"checkout": "https://secure.carolbassi.com.br"
|
|
2176
|
+
},
|
|
2173
2177
|
"bynv": {
|
|
2174
2178
|
"store": "https://bynv.myvtex.com"
|
|
2175
2179
|
},
|
|
2176
2180
|
"lojafabula": {
|
|
2177
|
-
"store": "https://lojafabula.myvtex.com"
|
|
2181
|
+
"store": "https://lojafabula.myvtex.com",
|
|
2182
|
+
"checkout": "https://secure.lojafabula.com.br"
|
|
2178
2183
|
}
|
|
2179
2184
|
};
|
|
2180
2185
|
// src/params/legacy/index.ts
|
|
@@ -2659,13 +2664,9 @@ var AzzasTracker = function() {
|
|
|
2659
2664
|
if (context === null || context === void 0 ? void 0 : context.items) return context.items;
|
|
2660
2665
|
if (context === null || context === void 0 ? void 0 : context.products) {
|
|
2661
2666
|
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 = /^[^_]+_/;
|
|
2667
|
+
var _ref, _ref1, _item_isVariantOf_name, _ref2, _ref3, _item_groupRefId, _getItemCategory5, _getItemCategory23, _ref4, _ref5, _ref6, _resizeVtexImage2, _ref7, _ref8;
|
|
2668
|
+
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
2669
|
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
2670
|
return {
|
|
2670
2671
|
quantity: 1,
|
|
2671
2672
|
index: (_ref = item === null || item === void 0 ? void 0 : item.index) !== null && _ref !== void 0 ? _ref : 0,
|
|
@@ -2673,12 +2674,12 @@ var AzzasTracker = function() {
|
|
|
2673
2674
|
item_name: (_item_isVariantOf_name = item.isVariantOf.name) !== null && _item_isVariantOf_name !== void 0 ? _item_isVariantOf_name : null,
|
|
2674
2675
|
price: (_ref2 = (_item_offers1 = item.offers) === null || _item_offers1 === void 0 ? void 0 : _item_offers1.lowPrice) !== null && _ref2 !== void 0 ? _ref2 : null,
|
|
2675
2676
|
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(
|
|
2677
|
+
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
2678
|
// cor
|
|
2678
2679
|
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
2680
|
// tamanho
|
|
2680
2681
|
item_shipping_tier: "",
|
|
2681
|
-
item_ref:
|
|
2682
|
+
item_ref: (_item_groupRefId = item.groupRefId) !== null && _item_groupRefId !== void 0 ? _item_groupRefId : null,
|
|
2682
2683
|
item_category: (_getItemCategory5 = getItemCategory5(item)) !== null && _getItemCategory5 !== void 0 ? _getItemCategory5 : null,
|
|
2683
2684
|
item_category2: (_getItemCategory23 = getItemCategory23(item)) !== null && _getItemCategory23 !== void 0 ? _getItemCategory23 : null,
|
|
2684
2685
|
item_id: (_ref4 = item === null || item === void 0 ? void 0 : item.id) !== null && _ref4 !== void 0 ? _ref4 : null,
|