@trackunit/filters-asset-filter-definitions 1.11.82 → 1.11.84
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 +5 -5
- package/index.esm.js +2 -2
- package/package.json +18 -18
package/index.cjs.js
CHANGED
|
@@ -2402,7 +2402,7 @@ const usePlacesSearch = ({ localStorageKey = SHARED_LOCATIONS_LOCAL_STORAGE_KEY,
|
|
|
2402
2402
|
key: localStorageKey,
|
|
2403
2403
|
schema: placesArraySchema,
|
|
2404
2404
|
}), [localStorageKey]);
|
|
2405
|
-
const [recentPlaces, setRecentPlaces] =
|
|
2405
|
+
const [recentPlaces, setRecentPlaces] = reactComponents.useLocalStorage(localStorageProps);
|
|
2406
2406
|
const debouncedSearchString = reactComponents.useDebounce(searchString);
|
|
2407
2407
|
const isRecentPlace = react.useCallback((placeId) => {
|
|
2408
2408
|
return recentPlaces.some(r => r.placeId === placeId);
|
|
@@ -3706,7 +3706,7 @@ const RentalContractReferenceCodeDescriptionFilterView = ({ filterBarActions, fi
|
|
|
3706
3706
|
const [t] = useTranslation();
|
|
3707
3707
|
const filterValue = filterDefinition?.filterKey ? String(filterState.values[filterDefinition.filterKey]) : undefined;
|
|
3708
3708
|
const [searchString, setSearchString] = react.useState(filterValue ?? "");
|
|
3709
|
-
const previousFilterValue =
|
|
3709
|
+
const previousFilterValue = reactComponents.usePrevious(filterValue);
|
|
3710
3710
|
const { clientSideUserId } = reactCoreHooks.useCurrentUser();
|
|
3711
3711
|
reactComponents.useDebounce(searchString, {
|
|
3712
3712
|
delay: 500,
|
|
@@ -3728,7 +3728,7 @@ const RentalContractReferenceCodeDescriptionFilterView = ({ filterBarActions, fi
|
|
|
3728
3728
|
key: `${localStorageKey}-${filterDefinition?.filterKey}-free-text-filter-recent-searches-${clientSideUserId}`,
|
|
3729
3729
|
schema: zod.z.array(zod.z.string()),
|
|
3730
3730
|
}), [localStorageKey, filterDefinition?.filterKey, clientSideUserId]);
|
|
3731
|
-
const [recentSearches, setRecentSearches] =
|
|
3731
|
+
const [recentSearches, setRecentSearches] = reactComponents.useLocalStorage(localStorageProps);
|
|
3732
3732
|
const apply = react.useCallback(({ value, setRecent = true }) => {
|
|
3733
3733
|
if (setRecent !== false) {
|
|
3734
3734
|
setRecentSearches(prev => {
|
|
@@ -3857,7 +3857,7 @@ const SearchFilterInline = ({ filterBarActions, filterState, filterDefinition, l
|
|
|
3857
3857
|
const { geometry, ref: searchElementRef } = reactComponents.useMeasure();
|
|
3858
3858
|
const filterValue = filterDefinition?.filterKey ? String(filterState.values[filterDefinition.filterKey]) : undefined;
|
|
3859
3859
|
const [searchString, setSearchString] = react.useState(filterValue ?? "");
|
|
3860
|
-
const previousFilterValue =
|
|
3860
|
+
const previousFilterValue = reactComponents.usePrevious(filterValue);
|
|
3861
3861
|
const { clientSideUserId } = reactCoreHooks.useCurrentUser();
|
|
3862
3862
|
reactComponents.useDebounce(searchString, {
|
|
3863
3863
|
delay: 500,
|
|
@@ -3880,7 +3880,7 @@ const SearchFilterInline = ({ filterBarActions, filterState, filterDefinition, l
|
|
|
3880
3880
|
key: `${localStorageKey}-${filterDefinition?.filterKey}-free-text-filter-recent-searches-${clientSideUserId}`,
|
|
3881
3881
|
schema: searchStringSchema,
|
|
3882
3882
|
}), [localStorageKey, filterDefinition?.filterKey, clientSideUserId]);
|
|
3883
|
-
const [recentSearches, setRecentSearches] =
|
|
3883
|
+
const [recentSearches, setRecentSearches] = reactComponents.useLocalStorage(localStorageProps);
|
|
3884
3884
|
const apply = react.useCallback(({ value, wasPreviousSearch = false, setRecent = true }) => {
|
|
3885
3885
|
if (setRecent !== false) {
|
|
3886
3886
|
setRecentSearches(prev => {
|
package/index.esm.js
CHANGED
|
@@ -5,12 +5,12 @@ import { DefaultCheckboxFilter, FilterEvents, FilterHeader, FilterResults, Hiera
|
|
|
5
5
|
import { useActiveAssetFilters, useAssetQueryFilters } from '@trackunit/filters-graphql-hook';
|
|
6
6
|
import { useQuery } from '@trackunit/react-graphql-hooks';
|
|
7
7
|
import { useMemo, useState, useCallback, useEffect } from 'react';
|
|
8
|
-
import { useAnalytics,
|
|
8
|
+
import { useAnalytics, useCurrentUser } from '@trackunit/react-core-hooks';
|
|
9
9
|
import { FilterBody, RadioFilterItem } from '@trackunit/react-filter-components';
|
|
10
10
|
import { RadioGroup, RadioItem, Search } from '@trackunit/react-form-components';
|
|
11
11
|
import { ActivityIndicator } from '@trackunit/utilization-indicator';
|
|
12
12
|
import { geoJsonPolygonSchema, geoJsonPointSchema, geoJsonMultiPolygonSchema, geoJsonBboxSchema, getBboxFromGeoJsonPolygon, getPolygonFromBbox } from '@trackunit/geo-json-utils';
|
|
13
|
-
import { Tooltip, IconButton, Icon, Text, Button, useDebounce, MenuItem, useMeasure, Popover, PopoverTrigger, PopoverContent, MenuList } from '@trackunit/react-components';
|
|
13
|
+
import { Tooltip, IconButton, Icon, Text, Button, useLocalStorage, useDebounce, usePrevious, MenuItem, useMeasure, Popover, PopoverTrigger, PopoverContent, MenuList } from '@trackunit/react-components';
|
|
14
14
|
import { titleCase, lowerCase } from 'string-ts';
|
|
15
15
|
import { z } from 'zod';
|
|
16
16
|
import { objectValues, hourIntervals, enumFromValue } from '@trackunit/shared-utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-asset-filter-definitions",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.84",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
"zod": "^3.23.8",
|
|
16
16
|
"string-ts": "^2.0.0",
|
|
17
17
|
"tailwind-merge": "^2.0.0",
|
|
18
|
-
"@trackunit/iris-app-build-utilities": "1.7.
|
|
19
|
-
"@trackunit/filters-filter-bar": "1.8.
|
|
20
|
-
"@trackunit/react-core-hooks": "1.7.
|
|
21
|
-
"@trackunit/react-filter-components": "1.7.
|
|
22
|
-
"@trackunit/react-form-components": "1.8.
|
|
23
|
-
"@trackunit/filters-graphql-hook": "1.11.
|
|
24
|
-
"@trackunit/utilization-indicator": "1.7.
|
|
25
|
-
"@trackunit/geo-json-utils": "1.7.
|
|
26
|
-
"@trackunit/react-components": "1.10.
|
|
27
|
-
"@trackunit/shared-utils": "1.9.
|
|
28
|
-
"@trackunit/translations-machine-type": "1.7.
|
|
29
|
-
"@trackunit/criticality-indicator": "1.7.
|
|
30
|
-
"@trackunit/iris-app-api": "1.9.
|
|
31
|
-
"@trackunit/react-core-contexts-test": "1.7.
|
|
32
|
-
"@trackunit/i18n-library-translation": "1.7.
|
|
33
|
-
"@trackunit/iris-app-runtime-core-api": "1.7.
|
|
34
|
-
"@trackunit/react-graphql-hooks": "1.7.
|
|
18
|
+
"@trackunit/iris-app-build-utilities": "1.7.84",
|
|
19
|
+
"@trackunit/filters-filter-bar": "1.8.134",
|
|
20
|
+
"@trackunit/react-core-hooks": "1.7.95",
|
|
21
|
+
"@trackunit/react-filter-components": "1.7.128",
|
|
22
|
+
"@trackunit/react-form-components": "1.8.125",
|
|
23
|
+
"@trackunit/filters-graphql-hook": "1.11.77",
|
|
24
|
+
"@trackunit/utilization-indicator": "1.7.117",
|
|
25
|
+
"@trackunit/geo-json-utils": "1.7.81",
|
|
26
|
+
"@trackunit/react-components": "1.10.56",
|
|
27
|
+
"@trackunit/shared-utils": "1.9.81",
|
|
28
|
+
"@trackunit/translations-machine-type": "1.7.111",
|
|
29
|
+
"@trackunit/criticality-indicator": "1.7.117",
|
|
30
|
+
"@trackunit/iris-app-api": "1.9.19",
|
|
31
|
+
"@trackunit/react-core-contexts-test": "1.7.95",
|
|
32
|
+
"@trackunit/i18n-library-translation": "1.7.99",
|
|
33
|
+
"@trackunit/iris-app-runtime-core-api": "1.7.91",
|
|
34
|
+
"@trackunit/react-graphql-hooks": "1.7.118"
|
|
35
35
|
},
|
|
36
36
|
"module": "./index.esm.js",
|
|
37
37
|
"main": "./index.cjs.js",
|