@trackunit/filters-filter-bar 1.7.70 → 1.7.72

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.
Files changed (3) hide show
  1. package/index.cjs.js +2 -11
  2. package/index.esm.js +2 -11
  3. package/package.json +13 -13
package/index.cjs.js CHANGED
@@ -1442,7 +1442,6 @@ const hasValue = (value) => {
1442
1442
  if (value === undefined || value === null) {
1443
1443
  return false;
1444
1444
  }
1445
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1446
1445
  if (typeof value === "object" && Object.keys(value).length === 0) {
1447
1446
  return false;
1448
1447
  }
@@ -1464,8 +1463,7 @@ const isNotRightType = (filterDefinition, foundFilter) => {
1464
1463
  */
1465
1464
  const isMinMaxFilterValue = (value) => {
1466
1465
  return value
1467
- ? // eslint-disable-next-line local-rules/prefer-custom-object-keys
1468
- typeof value === "object" && (Object.keys(value).includes("min") || Object.keys(value).includes("max"))
1466
+ ? typeof value === "object" && (Object.keys(value).includes("min") || Object.keys(value).includes("max"))
1469
1467
  : false;
1470
1468
  };
1471
1469
  /**
@@ -1473,8 +1471,7 @@ const isMinMaxFilterValue = (value) => {
1473
1471
  */
1474
1472
  const isDateRangeValue = (value) => {
1475
1473
  return value
1476
- ? // eslint-disable-next-line local-rules/prefer-custom-object-keys
1477
- typeof value === "object" && (Object.keys(value).includes("from") || Object.keys(value).includes("to"))
1474
+ ? typeof value === "object" && (Object.keys(value).includes("from") || Object.keys(value).includes("to"))
1478
1475
  : false;
1479
1476
  };
1480
1477
  /**
@@ -1502,7 +1499,6 @@ const isStringArrayFilterValue = (value) => {
1502
1499
  *
1503
1500
  */
1504
1501
  const isBooleanValue = (value) => {
1505
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1506
1502
  return value ? typeof value === "object" && Object.keys(value).includes("booleanValue") : false;
1507
1503
  };
1508
1504
  /**
@@ -1511,9 +1507,7 @@ const isBooleanValue = (value) => {
1511
1507
  const isValueName = (value) => {
1512
1508
  return (typeof value === "object" &&
1513
1509
  value !== null &&
1514
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1515
1510
  Object.keys(value).includes("name") &&
1516
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1517
1511
  Object.keys(value).includes("value"));
1518
1512
  };
1519
1513
  /**
@@ -1533,7 +1527,6 @@ const isValueNameArray = (value) => {
1533
1527
  const validateFilter = ({ values, filterDefinitions, }) => {
1534
1528
  const stateKeys = [];
1535
1529
  let inBadState = false;
1536
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1537
1530
  for (const key of Object.keys(values)) {
1538
1531
  if (filterDefinitions.find(filterDefinition => filterDefinition.filterKey === key)) {
1539
1532
  stateKeys.push(key);
@@ -1605,7 +1598,6 @@ const useFilterBarActions = ({ name, filterBarConfig, filterBarDefinition, setFi
1605
1598
  appliedFilterKeys() {
1606
1599
  const initialStateEmptyValues = JSON.parse(JSON.stringify(initialState ? initialState : {}));
1607
1600
  const currentFilters = JSON.parse(JSON.stringify(filterBarConfig.values));
1608
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1609
1601
  return Object.keys(currentFilters)
1610
1602
  .filter(filterKey => {
1611
1603
  const isFilterValueEqualToInitialStateValue = dequal.dequal(currentFilters[filterKey], initialStateEmptyValues[filterKey]);
@@ -1865,7 +1857,6 @@ const useFilterBarPersistence = ({ name, setValue, loadData: inputLoadData, save
1865
1857
  const saveData = react.useCallback((filterBarConfig, filterBarDefinitions) => {
1866
1858
  const newValues = Object.assign({}, lastSavedState || {});
1867
1859
  if (filterBarConfig.values) {
1868
- // eslint-disable-next-line local-rules/prefer-custom-object-entries
1869
1860
  Object.entries(filterBarConfig.values).forEach(([key, value]) => {
1870
1861
  const typedKey = key;
1871
1862
  const definition = sharedUtils.objectValues(filterBarDefinitions).find(def => def.filterKey === typedKey);
package/index.esm.js CHANGED
@@ -1440,7 +1440,6 @@ const hasValue = (value) => {
1440
1440
  if (value === undefined || value === null) {
1441
1441
  return false;
1442
1442
  }
1443
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1444
1443
  if (typeof value === "object" && Object.keys(value).length === 0) {
1445
1444
  return false;
1446
1445
  }
@@ -1462,8 +1461,7 @@ const isNotRightType = (filterDefinition, foundFilter) => {
1462
1461
  */
1463
1462
  const isMinMaxFilterValue = (value) => {
1464
1463
  return value
1465
- ? // eslint-disable-next-line local-rules/prefer-custom-object-keys
1466
- typeof value === "object" && (Object.keys(value).includes("min") || Object.keys(value).includes("max"))
1464
+ ? typeof value === "object" && (Object.keys(value).includes("min") || Object.keys(value).includes("max"))
1467
1465
  : false;
1468
1466
  };
1469
1467
  /**
@@ -1471,8 +1469,7 @@ const isMinMaxFilterValue = (value) => {
1471
1469
  */
1472
1470
  const isDateRangeValue = (value) => {
1473
1471
  return value
1474
- ? // eslint-disable-next-line local-rules/prefer-custom-object-keys
1475
- typeof value === "object" && (Object.keys(value).includes("from") || Object.keys(value).includes("to"))
1472
+ ? typeof value === "object" && (Object.keys(value).includes("from") || Object.keys(value).includes("to"))
1476
1473
  : false;
1477
1474
  };
1478
1475
  /**
@@ -1500,7 +1497,6 @@ const isStringArrayFilterValue = (value) => {
1500
1497
  *
1501
1498
  */
1502
1499
  const isBooleanValue = (value) => {
1503
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1504
1500
  return value ? typeof value === "object" && Object.keys(value).includes("booleanValue") : false;
1505
1501
  };
1506
1502
  /**
@@ -1509,9 +1505,7 @@ const isBooleanValue = (value) => {
1509
1505
  const isValueName = (value) => {
1510
1506
  return (typeof value === "object" &&
1511
1507
  value !== null &&
1512
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1513
1508
  Object.keys(value).includes("name") &&
1514
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1515
1509
  Object.keys(value).includes("value"));
1516
1510
  };
1517
1511
  /**
@@ -1531,7 +1525,6 @@ const isValueNameArray = (value) => {
1531
1525
  const validateFilter = ({ values, filterDefinitions, }) => {
1532
1526
  const stateKeys = [];
1533
1527
  let inBadState = false;
1534
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1535
1528
  for (const key of Object.keys(values)) {
1536
1529
  if (filterDefinitions.find(filterDefinition => filterDefinition.filterKey === key)) {
1537
1530
  stateKeys.push(key);
@@ -1603,7 +1596,6 @@ const useFilterBarActions = ({ name, filterBarConfig, filterBarDefinition, setFi
1603
1596
  appliedFilterKeys() {
1604
1597
  const initialStateEmptyValues = JSON.parse(JSON.stringify(initialState ? initialState : {}));
1605
1598
  const currentFilters = JSON.parse(JSON.stringify(filterBarConfig.values));
1606
- // eslint-disable-next-line local-rules/prefer-custom-object-keys
1607
1599
  return Object.keys(currentFilters)
1608
1600
  .filter(filterKey => {
1609
1601
  const isFilterValueEqualToInitialStateValue = dequal(currentFilters[filterKey], initialStateEmptyValues[filterKey]);
@@ -1863,7 +1855,6 @@ const useFilterBarPersistence = ({ name, setValue, loadData: inputLoadData, save
1863
1855
  const saveData = useCallback((filterBarConfig, filterBarDefinitions) => {
1864
1856
  const newValues = Object.assign({}, lastSavedState || {});
1865
1857
  if (filterBarConfig.values) {
1866
- // eslint-disable-next-line local-rules/prefer-custom-object-entries
1867
1858
  Object.entries(filterBarConfig.values).forEach(([key, value]) => {
1868
1859
  const typedKey = key;
1869
1860
  const definition = objectValues(filterBarDefinitions).find(def => def.filterKey === typedKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/filters-filter-bar",
3
- "version": "1.7.70",
3
+ "version": "1.7.72",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -14,18 +14,18 @@
14
14
  "tailwind-merge": "^2.0.0",
15
15
  "string-ts": "^2.0.0",
16
16
  "zod": "^3.23.8",
17
- "@trackunit/iris-app-api": "1.6.40",
18
- "@trackunit/react-core-hooks": "1.6.43",
19
- "@trackunit/react-filter-components": "1.6.63",
20
- "@trackunit/react-date-and-time-components": "1.9.63",
21
- "@trackunit/shared-utils": "1.8.40",
22
- "@trackunit/react-form-components": "1.7.28",
23
- "@trackunit/react-core-contexts-api": "1.7.41",
24
- "@trackunit/geo-json-utils": "1.6.40",
25
- "@trackunit/i18n-library-translation": "1.6.44",
26
- "@trackunit/css-class-variance-utilities": "1.6.40",
27
- "@trackunit/react-components": "1.8.12",
28
- "@trackunit/react-test-setup": "1.3.40"
17
+ "@trackunit/iris-app-api": "1.6.42",
18
+ "@trackunit/react-core-hooks": "1.6.45",
19
+ "@trackunit/react-filter-components": "1.6.65",
20
+ "@trackunit/react-date-and-time-components": "1.9.65",
21
+ "@trackunit/shared-utils": "1.8.42",
22
+ "@trackunit/react-form-components": "1.7.30",
23
+ "@trackunit/react-core-contexts-api": "1.7.43",
24
+ "@trackunit/geo-json-utils": "1.6.42",
25
+ "@trackunit/i18n-library-translation": "1.6.46",
26
+ "@trackunit/css-class-variance-utilities": "1.6.42",
27
+ "@trackunit/react-components": "1.8.14",
28
+ "@trackunit/react-test-setup": "1.3.42"
29
29
  },
30
30
  "module": "./index.esm.js",
31
31
  "main": "./index.cjs.js",