@trackunit/filters-filter-bar 2.1.9 → 2.1.11
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/index.cjs.js +4 -0
- package/index.esm.js +4 -0
- package/package.json +12 -12
package/index.cjs.js
CHANGED
|
@@ -2064,6 +2064,8 @@ const useFilterBarPersistence = ({ name, setValue, refreshData, isDefaultValue,
|
|
|
2064
2064
|
});
|
|
2065
2065
|
const storageKey = reactComponents.useStorageKey(`filter-${name}`, clientSideUserId);
|
|
2066
2066
|
const getFromLocalStorage = react.useCallback(() => {
|
|
2067
|
+
// TODO: migrate to useLocalStorage hook — this file was exempted when the no-direct-storage-access rule was introduced
|
|
2068
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2067
2069
|
return localStorage.getItem(storageKey);
|
|
2068
2070
|
}, [storageKey]);
|
|
2069
2071
|
const lastName = react.useRef(name);
|
|
@@ -2090,6 +2092,7 @@ const useFilterBarPersistence = ({ name, setValue, refreshData, isDefaultValue,
|
|
|
2090
2092
|
inputSaveData(newValues);
|
|
2091
2093
|
}
|
|
2092
2094
|
else {
|
|
2095
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2093
2096
|
localStorage.setItem(storageKey, reactComponents.storageSerializer.serialize(toPersist));
|
|
2094
2097
|
const urlObject = getFilterValuesToUrl(newValues, sharedUtils.objectValues(filterBarDefinitions), false, isDefaultValue);
|
|
2095
2098
|
updateSearchParam(encode(urlObject));
|
|
@@ -2099,6 +2102,7 @@ const useFilterBarPersistence = ({ name, setValue, refreshData, isDefaultValue,
|
|
|
2099
2102
|
const loadFromLocalStorage = react.useCallback(() => {
|
|
2100
2103
|
let storedFilters = null;
|
|
2101
2104
|
if (lastName.current !== name) {
|
|
2105
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2102
2106
|
storedFilters = localStorage.getItem(storageKey) || "{}";
|
|
2103
2107
|
lastName.current = name;
|
|
2104
2108
|
}
|
package/index.esm.js
CHANGED
|
@@ -2062,6 +2062,8 @@ const useFilterBarPersistence = ({ name, setValue, refreshData, isDefaultValue,
|
|
|
2062
2062
|
});
|
|
2063
2063
|
const storageKey = useStorageKey(`filter-${name}`, clientSideUserId);
|
|
2064
2064
|
const getFromLocalStorage = useCallback(() => {
|
|
2065
|
+
// TODO: migrate to useLocalStorage hook — this file was exempted when the no-direct-storage-access rule was introduced
|
|
2066
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2065
2067
|
return localStorage.getItem(storageKey);
|
|
2066
2068
|
}, [storageKey]);
|
|
2067
2069
|
const lastName = useRef(name);
|
|
@@ -2088,6 +2090,7 @@ const useFilterBarPersistence = ({ name, setValue, refreshData, isDefaultValue,
|
|
|
2088
2090
|
inputSaveData(newValues);
|
|
2089
2091
|
}
|
|
2090
2092
|
else {
|
|
2093
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2091
2094
|
localStorage.setItem(storageKey, storageSerializer.serialize(toPersist));
|
|
2092
2095
|
const urlObject = getFilterValuesToUrl(newValues, objectValues(filterBarDefinitions), false, isDefaultValue);
|
|
2093
2096
|
updateSearchParam(encode(urlObject));
|
|
@@ -2097,6 +2100,7 @@ const useFilterBarPersistence = ({ name, setValue, refreshData, isDefaultValue,
|
|
|
2097
2100
|
const loadFromLocalStorage = useCallback(() => {
|
|
2098
2101
|
let storedFilters = null;
|
|
2099
2102
|
if (lastName.current !== name) {
|
|
2103
|
+
// eslint-disable-next-line no-restricted-globals
|
|
2100
2104
|
storedFilters = localStorage.getItem(storageKey) || "{}";
|
|
2101
2105
|
lastName.current = name;
|
|
2102
2106
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-filter-bar",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"tailwind-merge": "^2.0.0",
|
|
12
12
|
"string-ts": "^2.0.0",
|
|
13
13
|
"zod": "^3.25.76",
|
|
14
|
-
"@trackunit/iris-app-api": "2.0.
|
|
15
|
-
"@trackunit/react-core-hooks": "1.17.
|
|
16
|
-
"@trackunit/react-filter-components": "2.1.
|
|
17
|
-
"@trackunit/react-date-and-time-components": "2.1.
|
|
18
|
-
"@trackunit/shared-utils": "1.15.
|
|
19
|
-
"@trackunit/react-form-components": "2.1.
|
|
20
|
-
"@trackunit/iris-app-runtime-core-api": "1.16.
|
|
21
|
-
"@trackunit/geo-json-utils": "1.14.
|
|
22
|
-
"@trackunit/i18n-library-translation": "2.0.
|
|
23
|
-
"@trackunit/css-class-variance-utilities": "1.13.
|
|
24
|
-
"@trackunit/react-components": "2.1.
|
|
14
|
+
"@trackunit/iris-app-api": "2.0.11",
|
|
15
|
+
"@trackunit/react-core-hooks": "1.17.23",
|
|
16
|
+
"@trackunit/react-filter-components": "2.1.11",
|
|
17
|
+
"@trackunit/react-date-and-time-components": "2.1.11",
|
|
18
|
+
"@trackunit/shared-utils": "1.15.19",
|
|
19
|
+
"@trackunit/react-form-components": "2.1.10",
|
|
20
|
+
"@trackunit/iris-app-runtime-core-api": "1.16.19",
|
|
21
|
+
"@trackunit/geo-json-utils": "1.14.19",
|
|
22
|
+
"@trackunit/i18n-library-translation": "2.0.11",
|
|
23
|
+
"@trackunit/css-class-variance-utilities": "1.13.19",
|
|
24
|
+
"@trackunit/react-components": "2.1.9"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@apollo/client": "^3.13.8",
|