@azzas/azzas-tracker-web 2.0.0-preview.6 → 2.0.0-preview.8
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 +31 -23
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.d.cts +47 -19
- package/dist/mod.d.ts +47 -19
- package/dist/mod.global.js +31 -23
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +31 -23
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +19 -12
- package/package.json +1 -1
package/dist/mod.vtex.global.js
CHANGED
|
@@ -2439,9 +2439,6 @@ var AzzasTracker = function() {
|
|
|
2439
2439
|
// src/params/adapters/meta/index.ts
|
|
2440
2440
|
var metaAdapters = {
|
|
2441
2441
|
user_info: getUserInfo,
|
|
2442
|
-
// brand: (context: MetaBrandContext) => {
|
|
2443
|
-
// return context.meta.brand || null;
|
|
2444
|
-
// },
|
|
2445
2442
|
content_type: function(context) {
|
|
2446
2443
|
return context.meta.content_type || null;
|
|
2447
2444
|
},
|
|
@@ -2502,6 +2499,12 @@ var AzzasTracker = function() {
|
|
|
2502
2499
|
return context.meta.ordering || null;
|
|
2503
2500
|
}
|
|
2504
2501
|
};
|
|
2502
|
+
// src/core/farm.ts
|
|
2503
|
+
var BRAND_CODES2 = {
|
|
2504
|
+
farm: "farmrio",
|
|
2505
|
+
"farm etc": "farmetc",
|
|
2506
|
+
"farm rio": "farmrio"
|
|
2507
|
+
};
|
|
2505
2508
|
// src/params/adapters/deco/utils.ts
|
|
2506
2509
|
var getItemCategory3 = function(item) {
|
|
2507
2510
|
var _text_match;
|
|
@@ -2523,11 +2526,6 @@ var AzzasTracker = function() {
|
|
|
2523
2526
|
var deepest = (_validHierarchy_ = validHierarchy[validHierarchy.length - 1]) !== null && _validHierarchy_ !== void 0 ? _validHierarchy_ : "";
|
|
2524
2527
|
return capitalize(deepest);
|
|
2525
2528
|
};
|
|
2526
|
-
var BRAND_CODES2 = {
|
|
2527
|
-
farm: "farmrio",
|
|
2528
|
-
"farm etc": "farmetc",
|
|
2529
|
-
"farm rio": "farmrio"
|
|
2530
|
-
};
|
|
2531
2529
|
// src/params/adapters/deco/index.ts
|
|
2532
2530
|
var IN_STOCK_SCHEMA = "https://schema.org/InStock";
|
|
2533
2531
|
var LIST_PRICE_SCHEMA = "https://schema.org/ListPrice";
|
|
@@ -2573,6 +2571,7 @@ var AzzasTracker = function() {
|
|
|
2573
2571
|
},
|
|
2574
2572
|
brand: function(context, config2) {
|
|
2575
2573
|
if (config2 === null || config2 === void 0 ? void 0 : config2.brand) return config2.brand;
|
|
2574
|
+
if (context === null || context === void 0 ? void 0 : context.brand) return context.brand;
|
|
2576
2575
|
if (context === null || context === void 0 ? void 0 : context.products) {
|
|
2577
2576
|
return normalizeBrand2(context.products.map(function(p) {
|
|
2578
2577
|
var _p_brand;
|
|
@@ -2722,6 +2721,7 @@ var AzzasTracker = function() {
|
|
|
2722
2721
|
},
|
|
2723
2722
|
brand: function(context, config2) {
|
|
2724
2723
|
if (config2 === null || config2 === void 0 ? void 0 : config2.brand) return config2.brand;
|
|
2724
|
+
if (context === null || context === void 0 ? void 0 : context.brand) return context.brand;
|
|
2725
2725
|
if (context === null || context === void 0 ? void 0 : context.products) {
|
|
2726
2726
|
return context.products.map(function(p) {
|
|
2727
2727
|
return p.brand;
|
|
@@ -2796,6 +2796,7 @@ var AzzasTracker = function() {
|
|
|
2796
2796
|
},
|
|
2797
2797
|
brand: function(context, config2) {
|
|
2798
2798
|
if (config2 === null || config2 === void 0 ? void 0 : config2.brand) return config2.brand;
|
|
2799
|
+
if (context === null || context === void 0 ? void 0 : context.brand) return context.brand;
|
|
2799
2800
|
if (context === null || context === void 0 ? void 0 : context.products) {
|
|
2800
2801
|
return context.products.map(function(p) {
|
|
2801
2802
|
return p.brand.name;
|
|
@@ -2893,9 +2894,14 @@ var AzzasTracker = function() {
|
|
|
2893
2894
|
}
|
|
2894
2895
|
return null;
|
|
2895
2896
|
},
|
|
2897
|
+
brand: function(context, config2) {
|
|
2898
|
+
if (config2 === null || config2 === void 0 ? void 0 : config2.brand) return config2.brand;
|
|
2899
|
+
if (context === null || context === void 0 ? void 0 : context.brand) return context.brand;
|
|
2900
|
+
return null;
|
|
2901
|
+
},
|
|
2896
2902
|
zipcode: function(context) {
|
|
2897
|
-
var
|
|
2898
|
-
return (
|
|
2903
|
+
var _context_meta_zipcode;
|
|
2904
|
+
return (_context_meta_zipcode = context.meta.zipcode) !== null && _context_meta_zipcode !== void 0 ? _context_meta_zipcode : null;
|
|
2899
2905
|
}
|
|
2900
2906
|
});
|
|
2901
2907
|
// src/params/adapters/orderForm/utils.ts
|
|
@@ -2960,6 +2966,7 @@ var AzzasTracker = function() {
|
|
|
2960
2966
|
brand: function(context, config2) {
|
|
2961
2967
|
var _context_orderForm;
|
|
2962
2968
|
if (config2 === null || config2 === void 0 ? void 0 : config2.brand) return config2.brand;
|
|
2969
|
+
if (context === null || context === void 0 ? void 0 : context.brand) return context.brand;
|
|
2963
2970
|
if (!(context === null || context === void 0 ? void 0 : (_context_orderForm = context.orderForm) === null || _context_orderForm === void 0 ? void 0 : _context_orderForm.items)) return null;
|
|
2964
2971
|
var brands = getOrderFormItems(context.orderForm).map(function(item) {
|
|
2965
2972
|
return item.additionalInfo.brandName;
|
|
@@ -3027,8 +3034,8 @@ var AzzasTracker = function() {
|
|
|
3027
3034
|
}).join(" | ");
|
|
3028
3035
|
},
|
|
3029
3036
|
zipcode: function(context) {
|
|
3030
|
-
var
|
|
3031
|
-
return (
|
|
3037
|
+
var _context_meta_zipcode;
|
|
3038
|
+
return (_context_meta_zipcode = context.meta.zipcode) !== null && _context_meta_zipcode !== void 0 ? _context_meta_zipcode : null;
|
|
3032
3039
|
},
|
|
3033
3040
|
flag_pickup: function(context) {
|
|
3034
3041
|
var _orderForm_shippingData;
|