@trackunit/filters-asset-filter-definitions 1.6.21 → 1.7.1
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
CHANGED
|
@@ -3515,8 +3515,9 @@ const SiteDepotOwnershipIdsFilterView = (props) => {
|
|
|
3515
3515
|
*
|
|
3516
3516
|
* @returns {ValueNameFilterDefinition} Site depot ownership filter definition
|
|
3517
3517
|
*/
|
|
3518
|
-
const useSiteDepotOwnershipIdsFilter = ({ showInFilterBar, defaultValue } = {
|
|
3518
|
+
const useSiteDepotOwnershipIdsFilter = ({ showInFilterBar, defaultValue, persistValue } = {
|
|
3519
3519
|
showInFilterBar: () => true,
|
|
3520
|
+
persistValue: true,
|
|
3520
3521
|
}) => {
|
|
3521
3522
|
const [t] = useTranslation();
|
|
3522
3523
|
const result = react.useMemo(() => {
|
|
@@ -3527,9 +3528,10 @@ const useSiteDepotOwnershipIdsFilter = ({ showInFilterBar, defaultValue } = {
|
|
|
3527
3528
|
group: "SITES",
|
|
3528
3529
|
title: t("fleetlist.column.siteDepotOwnershipIds"),
|
|
3529
3530
|
showInFilterBar,
|
|
3531
|
+
persistValue,
|
|
3530
3532
|
component: props => jsxRuntime.jsx(SiteDepotOwnershipIdsFilterView, { ...props }),
|
|
3531
3533
|
};
|
|
3532
|
-
}, [showInFilterBar, defaultValue, t]);
|
|
3534
|
+
}, [showInFilterBar, defaultValue, t, persistValue]);
|
|
3533
3535
|
return result;
|
|
3534
3536
|
};
|
|
3535
3537
|
|
|
@@ -3737,9 +3739,10 @@ const SiteTypesFilterView = (props) => {
|
|
|
3737
3739
|
* @param showInFilterBar Function to determine if filter should be shown in filter bar
|
|
3738
3740
|
* @returns {StringArrayFilterDefinition} SiteType filter definition
|
|
3739
3741
|
*/
|
|
3740
|
-
const useSiteTypeFilter = ({ isOnSite, showInFilterBar } = {
|
|
3742
|
+
const useSiteTypeFilter = ({ isOnSite, showInFilterBar, persistValue } = {
|
|
3741
3743
|
showInFilterBar: () => true,
|
|
3742
3744
|
isOnSite: false,
|
|
3745
|
+
persistValue: true,
|
|
3743
3746
|
}) => {
|
|
3744
3747
|
const [t] = useTranslation();
|
|
3745
3748
|
const result = react.useMemo(() => {
|
|
@@ -3747,12 +3750,13 @@ const useSiteTypeFilter = ({ isOnSite, showInFilterBar } = {
|
|
|
3747
3750
|
filterKey: "siteType",
|
|
3748
3751
|
type: "stringArray",
|
|
3749
3752
|
group: "SITES",
|
|
3753
|
+
persistValue,
|
|
3750
3754
|
title: t(isOnSite ? "fleetlist.column.onSiteType" : "fleetlist.column.siteType"),
|
|
3751
3755
|
showInFilterBar: showInFilterBar,
|
|
3752
3756
|
valueAsText: values => values.map(value => t(mapSiteTypeToLabelId(value))),
|
|
3753
3757
|
component: props => jsxRuntime.jsx(SiteTypesFilterView, { ...props }),
|
|
3754
3758
|
};
|
|
3755
|
-
}, [isOnSite, showInFilterBar, t]);
|
|
3759
|
+
}, [isOnSite, showInFilterBar, t, persistValue]);
|
|
3756
3760
|
return result;
|
|
3757
3761
|
};
|
|
3758
3762
|
const mapSiteTypeToLabelId = (type) => {
|
package/index.esm.js
CHANGED
|
@@ -3513,8 +3513,9 @@ const SiteDepotOwnershipIdsFilterView = (props) => {
|
|
|
3513
3513
|
*
|
|
3514
3514
|
* @returns {ValueNameFilterDefinition} Site depot ownership filter definition
|
|
3515
3515
|
*/
|
|
3516
|
-
const useSiteDepotOwnershipIdsFilter = ({ showInFilterBar, defaultValue } = {
|
|
3516
|
+
const useSiteDepotOwnershipIdsFilter = ({ showInFilterBar, defaultValue, persistValue } = {
|
|
3517
3517
|
showInFilterBar: () => true,
|
|
3518
|
+
persistValue: true,
|
|
3518
3519
|
}) => {
|
|
3519
3520
|
const [t] = useTranslation();
|
|
3520
3521
|
const result = useMemo(() => {
|
|
@@ -3525,9 +3526,10 @@ const useSiteDepotOwnershipIdsFilter = ({ showInFilterBar, defaultValue } = {
|
|
|
3525
3526
|
group: "SITES",
|
|
3526
3527
|
title: t("fleetlist.column.siteDepotOwnershipIds"),
|
|
3527
3528
|
showInFilterBar,
|
|
3529
|
+
persistValue,
|
|
3528
3530
|
component: props => jsx(SiteDepotOwnershipIdsFilterView, { ...props }),
|
|
3529
3531
|
};
|
|
3530
|
-
}, [showInFilterBar, defaultValue, t]);
|
|
3532
|
+
}, [showInFilterBar, defaultValue, t, persistValue]);
|
|
3531
3533
|
return result;
|
|
3532
3534
|
};
|
|
3533
3535
|
|
|
@@ -3735,9 +3737,10 @@ const SiteTypesFilterView = (props) => {
|
|
|
3735
3737
|
* @param showInFilterBar Function to determine if filter should be shown in filter bar
|
|
3736
3738
|
* @returns {StringArrayFilterDefinition} SiteType filter definition
|
|
3737
3739
|
*/
|
|
3738
|
-
const useSiteTypeFilter = ({ isOnSite, showInFilterBar } = {
|
|
3740
|
+
const useSiteTypeFilter = ({ isOnSite, showInFilterBar, persistValue } = {
|
|
3739
3741
|
showInFilterBar: () => true,
|
|
3740
3742
|
isOnSite: false,
|
|
3743
|
+
persistValue: true,
|
|
3741
3744
|
}) => {
|
|
3742
3745
|
const [t] = useTranslation();
|
|
3743
3746
|
const result = useMemo(() => {
|
|
@@ -3745,12 +3748,13 @@ const useSiteTypeFilter = ({ isOnSite, showInFilterBar } = {
|
|
|
3745
3748
|
filterKey: "siteType",
|
|
3746
3749
|
type: "stringArray",
|
|
3747
3750
|
group: "SITES",
|
|
3751
|
+
persistValue,
|
|
3748
3752
|
title: t(isOnSite ? "fleetlist.column.onSiteType" : "fleetlist.column.siteType"),
|
|
3749
3753
|
showInFilterBar: showInFilterBar,
|
|
3750
3754
|
valueAsText: values => values.map(value => t(mapSiteTypeToLabelId(value))),
|
|
3751
3755
|
component: props => jsx(SiteTypesFilterView, { ...props }),
|
|
3752
3756
|
};
|
|
3753
|
-
}, [isOnSite, showInFilterBar, t]);
|
|
3757
|
+
}, [isOnSite, showInFilterBar, t, persistValue]);
|
|
3754
3758
|
return result;
|
|
3755
3759
|
};
|
|
3756
3760
|
const mapSiteTypeToLabelId = (type) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-asset-filter-definitions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
"@tanstack/react-router": "1.114.29",
|
|
18
18
|
"string-ts": "^2.0.0",
|
|
19
19
|
"tailwind-merge": "^2.0.0",
|
|
20
|
-
"@trackunit/iris-app-build-utilities": "1.4.
|
|
21
|
-
"@trackunit/filters-filter-bar": "1.5.
|
|
22
|
-
"@trackunit/react-core-hooks": "1.4.
|
|
23
|
-
"@trackunit/react-filter-components": "1.4.
|
|
24
|
-
"@trackunit/react-form-components": "1.4.
|
|
25
|
-
"@trackunit/filters-graphql-hook": "1.
|
|
26
|
-
"@trackunit/utilization-indicator": "1.4.
|
|
27
|
-
"@trackunit/geo-json-utils": "1.4.
|
|
28
|
-
"@trackunit/react-components": "1.5.
|
|
29
|
-
"@trackunit/shared-utils": "1.6.
|
|
30
|
-
"@trackunit/translations-machine-type": "1.4.
|
|
31
|
-
"@trackunit/criticality-indicator": "1.4.
|
|
32
|
-
"@trackunit/iris-app-api": "1.4.
|
|
33
|
-
"@trackunit/react-core-contexts-test": "1.4.
|
|
34
|
-
"@trackunit/i18n-library-translation": "1.4.
|
|
35
|
-
"@trackunit/react-core-contexts-api": "1.5.
|
|
36
|
-
"@trackunit/react-test-setup": "1.1.
|
|
20
|
+
"@trackunit/iris-app-build-utilities": "1.4.10",
|
|
21
|
+
"@trackunit/filters-filter-bar": "1.5.23",
|
|
22
|
+
"@trackunit/react-core-hooks": "1.4.12",
|
|
23
|
+
"@trackunit/react-filter-components": "1.4.23",
|
|
24
|
+
"@trackunit/react-form-components": "1.4.18",
|
|
25
|
+
"@trackunit/filters-graphql-hook": "1.7.0",
|
|
26
|
+
"@trackunit/utilization-indicator": "1.4.16",
|
|
27
|
+
"@trackunit/geo-json-utils": "1.4.10",
|
|
28
|
+
"@trackunit/react-components": "1.5.16",
|
|
29
|
+
"@trackunit/shared-utils": "1.6.10",
|
|
30
|
+
"@trackunit/translations-machine-type": "1.4.12",
|
|
31
|
+
"@trackunit/criticality-indicator": "1.4.16",
|
|
32
|
+
"@trackunit/iris-app-api": "1.4.10",
|
|
33
|
+
"@trackunit/react-core-contexts-test": "1.4.12",
|
|
34
|
+
"@trackunit/i18n-library-translation": "1.4.12",
|
|
35
|
+
"@trackunit/react-core-contexts-api": "1.5.12",
|
|
36
|
+
"@trackunit/react-test-setup": "1.1.10"
|
|
37
37
|
},
|
|
38
38
|
"module": "./index.esm.js",
|
|
39
39
|
"main": "./index.cjs.js",
|
|
@@ -10,11 +10,12 @@ export declare const SiteDepotOwnershipIdsFilterView: (props: FilterViewProps<Ar
|
|
|
10
10
|
interface SiteDepotOwnershipIdsFilterProps {
|
|
11
11
|
showInFilterBar: () => boolean;
|
|
12
12
|
defaultValue?: Array<ValueName>;
|
|
13
|
+
persistValue?: boolean;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Site depot ownership filter definition
|
|
16
17
|
*
|
|
17
18
|
* @returns {ValueNameFilterDefinition} Site depot ownership filter definition
|
|
18
19
|
*/
|
|
19
|
-
export declare const useSiteDepotOwnershipIdsFilter: ({ showInFilterBar, defaultValue }?: SiteDepotOwnershipIdsFilterProps) => ValueNameArrayFilterDefinition;
|
|
20
|
+
export declare const useSiteDepotOwnershipIdsFilter: ({ showInFilterBar, defaultValue, persistValue }?: SiteDepotOwnershipIdsFilterProps) => ValueNameArrayFilterDefinition;
|
|
20
21
|
export {};
|
|
@@ -30,7 +30,8 @@ export declare const sortSiteTypeSummary: (arr: Array<SortSiteTypeSummary>) => S
|
|
|
30
30
|
export declare const SiteTypesFilterView: (props: FilterViewProps<Array<string>>) => ReactElement;
|
|
31
31
|
interface SiteTypeFilterProps {
|
|
32
32
|
showInFilterBar: () => boolean;
|
|
33
|
-
isOnSite
|
|
33
|
+
isOnSite?: boolean;
|
|
34
|
+
persistValue?: boolean;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
37
|
* SiteType filter definition
|
|
@@ -38,5 +39,5 @@ interface SiteTypeFilterProps {
|
|
|
38
39
|
* @param showInFilterBar Function to determine if filter should be shown in filter bar
|
|
39
40
|
* @returns {StringArrayFilterDefinition} SiteType filter definition
|
|
40
41
|
*/
|
|
41
|
-
export declare const useSiteTypeFilter: ({ isOnSite, showInFilterBar }?: SiteTypeFilterProps) => StringArrayFilterDefinition;
|
|
42
|
+
export declare const useSiteTypeFilter: ({ isOnSite, showInFilterBar, persistValue }?: SiteTypeFilterProps) => StringArrayFilterDefinition;
|
|
42
43
|
export {};
|
|
@@ -371,8 +371,6 @@ export declare const fleetDataHealthIssueCategory: {
|
|
|
371
371
|
};
|
|
372
372
|
export type FleetDataHealthIssueCategory = (typeof fleetDataHealthIssueCategory)[keyof typeof fleetDataHealthIssueCategory];
|
|
373
373
|
export declare const fleetDataHealthIssueState: {
|
|
374
|
-
readonly IGNORE: "IGNORE";
|
|
375
|
-
readonly IN_PROGRESS: "IN_PROGRESS";
|
|
376
374
|
readonly OPEN: "OPEN";
|
|
377
375
|
readonly RESOLVED: "RESOLVED";
|
|
378
376
|
};
|