@azzas/azzas-tracker-web 2.0.0-preview.7 → 2.0.0-preview.9

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.js CHANGED
@@ -1042,7 +1042,7 @@ var PROD_DOMAINS = {
1042
1042
  "store": "https://www.animale.com.br",
1043
1043
  "checkout": "https://secure.animale.com.br"
1044
1044
  },
1045
- "farm": {
1045
+ "lojafarm": {
1046
1046
  "store": "https://lojafarm.myvtex.com"
1047
1047
  },
1048
1048
  "mariafilo": {
@@ -1060,7 +1060,7 @@ var PROD_DOMAINS = {
1060
1060
  "bynv": {
1061
1061
  "store": "https://bynv.myvtex.com"
1062
1062
  },
1063
- "fabula": {
1063
+ "lojafabula": {
1064
1064
  "store": "https://lojafabula.myvtex.com"
1065
1065
  }
1066
1066
  };
@@ -1364,9 +1364,6 @@ var metaAdapters = {
1364
1364
  creative_slot: (context) => {
1365
1365
  return context.meta.creative_slot || null;
1366
1366
  },
1367
- size: (context) => {
1368
- return context.size || null;
1369
- },
1370
1367
  item_ref: (context) => {
1371
1368
  return context.itemRef || null;
1372
1369
  },
@@ -1387,27 +1384,13 @@ var metaAdapters = {
1387
1384
  },
1388
1385
  ordering: (context) => {
1389
1386
  return context.meta.ordering || null;
1387
+ },
1388
+ size: (context) => {
1389
+ return context.meta.size || null;
1390
1390
  }
1391
1391
  };
1392
1392
 
1393
- // src/params/adapters/deco/utils.ts
1394
- var getItemCategory3 = (item) => {
1395
- var _a;
1396
- const value = item == null ? void 0 : item.category;
1397
- if (!value) return "Cole\xE7\xE3o";
1398
- const text = Array.isArray(value) ? value.join(" ") : String(value);
1399
- const match = (_a = text.match(/outlet|bazar|sale/i)) == null ? void 0 : _a[0].toLowerCase();
1400
- return match != null ? match : "Cole\xE7\xE3o";
1401
- };
1402
- var getItemCategory22 = (item) => {
1403
- var _a, _b, _c, _d;
1404
- const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
1405
- const categories = (_b = (_a = item.category) == null ? void 0 : _a.split(">")) != null ? _b : [];
1406
- const last = (_c = categories[categories.length - 1]) != null ? _c : "";
1407
- const validHierarchy = last.split("/").filter((c) => c && !AVOID_CATEGORIES.test(c));
1408
- const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
1409
- return capitalize(deepest);
1410
- };
1393
+ // src/core/farm.ts
1411
1394
  var BRAND_CODES2 = {
1412
1395
  farm: "farmrio",
1413
1396
  "farm etc": "farmetc",
@@ -1440,6 +1423,25 @@ function normalizeBrand2(input) {
1440
1423
  return uniqueSortedCodes.length > 0 ? uniqueSortedCodes.join("_") : null;
1441
1424
  }
1442
1425
 
1426
+ // src/params/adapters/deco/utils.ts
1427
+ var getItemCategory3 = (item) => {
1428
+ var _a;
1429
+ const value = item == null ? void 0 : item.category;
1430
+ if (!value) return "Cole\xE7\xE3o";
1431
+ const text = Array.isArray(value) ? value.join(" ") : String(value);
1432
+ const match = (_a = text.match(/outlet|bazar|sale/i)) == null ? void 0 : _a[0].toLowerCase();
1433
+ return match != null ? match : "Cole\xE7\xE3o";
1434
+ };
1435
+ var getItemCategory22 = (item) => {
1436
+ var _a, _b, _c, _d;
1437
+ const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
1438
+ const categories = (_b = (_a = item.category) == null ? void 0 : _a.split(">")) != null ? _b : [];
1439
+ const last = (_c = categories[categories.length - 1]) != null ? _c : "";
1440
+ const validHierarchy = last.split("/").filter((c) => c && !AVOID_CATEGORIES.test(c));
1441
+ const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
1442
+ return capitalize(deepest);
1443
+ };
1444
+
1443
1445
  // src/params/adapters/deco/index.ts
1444
1446
  var IN_STOCK_SCHEMA = "https://schema.org/InStock";
1445
1447
  var LIST_PRICE_SCHEMA = "https://schema.org/ListPrice";
@@ -1766,9 +1768,14 @@ var pickupAdapter = {
1766
1768
  }
1767
1769
  return null;
1768
1770
  },
1771
+ brand: (context, config2) => {
1772
+ if (config2 == null ? void 0 : config2.brand) return config2.brand;
1773
+ if (context == null ? void 0 : context.brand) return context.brand;
1774
+ return null;
1775
+ },
1769
1776
  zipcode: (context) => {
1770
1777
  var _a;
1771
- return (_a = context.zipcode) != null ? _a : null;
1778
+ return (_a = context.meta.zipcode) != null ? _a : null;
1772
1779
  }
1773
1780
  };
1774
1781
 
@@ -1886,7 +1893,7 @@ var orderFormAdapter = {
1886
1893
  },
1887
1894
  zipcode: (context) => {
1888
1895
  var _a;
1889
- return (_a = context.zipcode) != null ? _a : null;
1896
+ return (_a = context.meta.zipcode) != null ? _a : null;
1890
1897
  },
1891
1898
  flag_pickup: (context) => {
1892
1899
  var _a;