@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.cjs CHANGED
@@ -1071,7 +1071,7 @@ var PROD_DOMAINS = {
1071
1071
  "store": "https://www.animale.com.br",
1072
1072
  "checkout": "https://secure.animale.com.br"
1073
1073
  },
1074
- "farm": {
1074
+ "lojafarm": {
1075
1075
  "store": "https://lojafarm.myvtex.com"
1076
1076
  },
1077
1077
  "mariafilo": {
@@ -1089,7 +1089,7 @@ var PROD_DOMAINS = {
1089
1089
  "bynv": {
1090
1090
  "store": "https://bynv.myvtex.com"
1091
1091
  },
1092
- "fabula": {
1092
+ "lojafabula": {
1093
1093
  "store": "https://lojafabula.myvtex.com"
1094
1094
  }
1095
1095
  };
@@ -1393,9 +1393,6 @@ var metaAdapters = {
1393
1393
  creative_slot: (context) => {
1394
1394
  return context.meta.creative_slot || null;
1395
1395
  },
1396
- size: (context) => {
1397
- return context.size || null;
1398
- },
1399
1396
  item_ref: (context) => {
1400
1397
  return context.itemRef || null;
1401
1398
  },
@@ -1416,27 +1413,13 @@ var metaAdapters = {
1416
1413
  },
1417
1414
  ordering: (context) => {
1418
1415
  return context.meta.ordering || null;
1416
+ },
1417
+ size: (context) => {
1418
+ return context.meta.size || null;
1419
1419
  }
1420
1420
  };
1421
1421
 
1422
- // src/params/adapters/deco/utils.ts
1423
- var getItemCategory3 = (item) => {
1424
- var _a;
1425
- const value = item == null ? void 0 : item.category;
1426
- if (!value) return "Cole\xE7\xE3o";
1427
- const text = Array.isArray(value) ? value.join(" ") : String(value);
1428
- const match = (_a = text.match(/outlet|bazar|sale/i)) == null ? void 0 : _a[0].toLowerCase();
1429
- return match != null ? match : "Cole\xE7\xE3o";
1430
- };
1431
- var getItemCategory22 = (item) => {
1432
- var _a, _b, _c, _d;
1433
- const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
1434
- const categories = (_b = (_a = item.category) == null ? void 0 : _a.split(">")) != null ? _b : [];
1435
- const last = (_c = categories[categories.length - 1]) != null ? _c : "";
1436
- const validHierarchy = last.split("/").filter((c) => c && !AVOID_CATEGORIES.test(c));
1437
- const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
1438
- return capitalize(deepest);
1439
- };
1422
+ // src/core/farm.ts
1440
1423
  var BRAND_CODES2 = {
1441
1424
  farm: "farmrio",
1442
1425
  "farm etc": "farmetc",
@@ -1469,6 +1452,25 @@ function normalizeBrand2(input) {
1469
1452
  return uniqueSortedCodes.length > 0 ? uniqueSortedCodes.join("_") : null;
1470
1453
  }
1471
1454
 
1455
+ // src/params/adapters/deco/utils.ts
1456
+ var getItemCategory3 = (item) => {
1457
+ var _a;
1458
+ const value = item == null ? void 0 : item.category;
1459
+ if (!value) return "Cole\xE7\xE3o";
1460
+ const text = Array.isArray(value) ? value.join(" ") : String(value);
1461
+ const match = (_a = text.match(/outlet|bazar|sale/i)) == null ? void 0 : _a[0].toLowerCase();
1462
+ return match != null ? match : "Cole\xE7\xE3o";
1463
+ };
1464
+ var getItemCategory22 = (item) => {
1465
+ var _a, _b, _c, _d;
1466
+ const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
1467
+ const categories = (_b = (_a = item.category) == null ? void 0 : _a.split(">")) != null ? _b : [];
1468
+ const last = (_c = categories[categories.length - 1]) != null ? _c : "";
1469
+ const validHierarchy = last.split("/").filter((c) => c && !AVOID_CATEGORIES.test(c));
1470
+ const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
1471
+ return capitalize(deepest);
1472
+ };
1473
+
1472
1474
  // src/params/adapters/deco/index.ts
1473
1475
  var IN_STOCK_SCHEMA = "https://schema.org/InStock";
1474
1476
  var LIST_PRICE_SCHEMA = "https://schema.org/ListPrice";
@@ -1795,9 +1797,14 @@ var pickupAdapter = {
1795
1797
  }
1796
1798
  return null;
1797
1799
  },
1800
+ brand: (context, config2) => {
1801
+ if (config2 == null ? void 0 : config2.brand) return config2.brand;
1802
+ if (context == null ? void 0 : context.brand) return context.brand;
1803
+ return null;
1804
+ },
1798
1805
  zipcode: (context) => {
1799
1806
  var _a;
1800
- return (_a = context.zipcode) != null ? _a : null;
1807
+ return (_a = context.meta.zipcode) != null ? _a : null;
1801
1808
  }
1802
1809
  };
1803
1810
 
@@ -1915,7 +1922,7 @@ var orderFormAdapter = {
1915
1922
  },
1916
1923
  zipcode: (context) => {
1917
1924
  var _a;
1918
- return (_a = context.zipcode) != null ? _a : null;
1925
+ return (_a = context.meta.zipcode) != null ? _a : null;
1919
1926
  },
1920
1927
  flag_pickup: (context) => {
1921
1928
  var _a;