@trackunit/filters-asset-filter-definitions 0.0.201 → 0.0.203
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 +2 -2
- package/index.esm.js +3 -3
- package/package.json +2 -2
- package/src/generated/graphql-api/graphql.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -2173,7 +2173,7 @@ const SearchFiltersView = (props) => {
|
|
|
2173
2173
|
const { location: { pathname }, } = reactRouter.useRouterState();
|
|
2174
2174
|
const navigate = reactRouter.useNavigate();
|
|
2175
2175
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions, { onResetFilter: () => {
|
|
2176
|
-
navigate({ to: pathname,
|
|
2176
|
+
navigate({ to: pathname, replace: true });
|
|
2177
2177
|
} })), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: props.value })] }));
|
|
2178
2178
|
};
|
|
2179
2179
|
/**
|
|
@@ -2600,7 +2600,7 @@ const useSetFilterStateFromUrl = ({ setters }) => {
|
|
|
2600
2600
|
return { search };
|
|
2601
2601
|
};
|
|
2602
2602
|
const handleSearchParamAsFilter = (searchParamName, filterName, search, zodSchema, setter) => {
|
|
2603
|
-
if (
|
|
2603
|
+
if (sharedUtils.objectKeys(search).includes(searchParamName)) {
|
|
2604
2604
|
// eslint-disable-next-line local-rules/no-typescript-assertion, @typescript-eslint/no-explicit-any
|
|
2605
2605
|
const foundParam = search[searchParamName];
|
|
2606
2606
|
try {
|
package/index.esm.js
CHANGED
|
@@ -11,7 +11,7 @@ import { useMachineTypeTranslations } from '@trackunit/translations-machine-type
|
|
|
11
11
|
import { CriticalityIndicator } from '@trackunit/criticality-indicator';
|
|
12
12
|
import { useAnalytics } from '@trackunit/react-core-hooks';
|
|
13
13
|
import { RadioGroup, RadioItem } from '@trackunit/react-form-components';
|
|
14
|
-
import { hourIntervals, enumFromValue } from '@trackunit/shared-utils';
|
|
14
|
+
import { hourIntervals, enumFromValue, objectKeys } from '@trackunit/shared-utils';
|
|
15
15
|
import { useRouterState, useNavigate, useSearch } from '@tanstack/react-router';
|
|
16
16
|
import * as Sentry from '@sentry/browser';
|
|
17
17
|
import { z } from 'zod';
|
|
@@ -2149,7 +2149,7 @@ const SearchFiltersView = (props) => {
|
|
|
2149
2149
|
const { location: { pathname }, } = useRouterState();
|
|
2150
2150
|
const navigate = useNavigate();
|
|
2151
2151
|
return (jsxs(Fragment, { children: [jsx(FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions, { onResetFilter: () => {
|
|
2152
|
-
navigate({ to: pathname,
|
|
2152
|
+
navigate({ to: pathname, replace: true });
|
|
2153
2153
|
} })), jsx(FilterBody, { limitSize: true, children: props.value })] }));
|
|
2154
2154
|
};
|
|
2155
2155
|
/**
|
|
@@ -2576,7 +2576,7 @@ const useSetFilterStateFromUrl = ({ setters }) => {
|
|
|
2576
2576
|
return { search };
|
|
2577
2577
|
};
|
|
2578
2578
|
const handleSearchParamAsFilter = (searchParamName, filterName, search, zodSchema, setter) => {
|
|
2579
|
-
if (
|
|
2579
|
+
if (objectKeys(search).includes(searchParamName)) {
|
|
2580
2580
|
// eslint-disable-next-line local-rules/no-typescript-assertion, @typescript-eslint/no-explicit-any
|
|
2581
2581
|
const foundParam = search[searchParamName];
|
|
2582
2582
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-asset-filter-definitions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.203",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"zod": "3.22.4",
|
|
31
31
|
"@trackunit/i18n-library-translation": "*",
|
|
32
32
|
"jest-fetch-mock": "^3.0.3",
|
|
33
|
-
"@tanstack/react-router": "1.
|
|
33
|
+
"@tanstack/react-router": "1.31.6"
|
|
34
34
|
},
|
|
35
35
|
"module": "./index.esm.js",
|
|
36
36
|
"main": "./index.cjs.js"
|
|
@@ -138,6 +138,7 @@ export declare const assetType: {
|
|
|
138
138
|
readonly MACHINE: "MACHINE";
|
|
139
139
|
readonly OTHER: "OTHER";
|
|
140
140
|
readonly TOOL: "TOOL";
|
|
141
|
+
readonly VEHICLE: "VEHICLE";
|
|
141
142
|
};
|
|
142
143
|
export type AssetType = (typeof assetType)[keyof typeof assetType];
|
|
143
144
|
export declare const customFieldOwnerType: {
|