@trackunit/filters-asset-filter-definitions 1.19.39 → 1.19.42
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 -4
- package/index.esm.js +4 -4
- package/package.json +18 -18
- package/src/shared/RecentSearchesFooter.d.ts +3 -2
package/index.cjs.js
CHANGED
|
@@ -4725,12 +4725,12 @@ const ClearItemButton = ({ onClick }) => {
|
|
|
4725
4725
|
* @param {RecentSearchesFooterProps} props - The props for the ClearAllFooter component
|
|
4726
4726
|
* @returns {ReactElement} RecentSearchesFooter component
|
|
4727
4727
|
*/
|
|
4728
|
-
const RecentSearchesFooter = ({ count,
|
|
4728
|
+
const RecentSearchesFooter = ({ count, onClickClearAll }) => {
|
|
4729
4729
|
const [t] = useTranslation();
|
|
4730
4730
|
if (count === 0) {
|
|
4731
4731
|
return null;
|
|
4732
4732
|
}
|
|
4733
|
-
return (jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-x-2 border-t-2 border-neutral-300 px-2 py-0.5", children: [jsxRuntime.jsx(reactComponents.Text, { className: "py-0.5", size: "small", subtle: true, children: t("filters.shared.recentSearches") }), count > 1 ? (jsxRuntime.jsx(reactComponents.Button, { onClick:
|
|
4733
|
+
return (jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-x-2 border-t-2 border-neutral-300 px-2 py-0.5", children: [jsxRuntime.jsx(reactComponents.Text, { className: "py-0.5", size: "small", subtle: true, children: t("filters.shared.recentSearches") }), count > 1 ? (jsxRuntime.jsx(reactComponents.Button, { onClick: onClickClearAll, size: "small", variant: "ghost", children: t("filters.shared.clearAll") })) : null] }));
|
|
4734
4734
|
};
|
|
4735
4735
|
|
|
4736
4736
|
const MAX_RECENT_SEARCHES$1 = 20;
|
|
@@ -4801,7 +4801,7 @@ const RentalContractReferenceCodeDescriptionFilterView = ({ filterBarActions, fi
|
|
|
4801
4801
|
}, selected: option === filterValue, suffix: jsxRuntime.jsx(ClearItemButton, { onClick: e => {
|
|
4802
4802
|
e.stopPropagation();
|
|
4803
4803
|
setRecentSearches(prev => prev.filter(r => r !== option));
|
|
4804
|
-
} }) }, `${option}-${index}`))) }), jsxRuntime.jsx(RecentSearchesFooter, { count: recentSearches.length,
|
|
4804
|
+
} }) }, `${option}-${index}`))) }), jsxRuntime.jsx(RecentSearchesFooter, { count: recentSearches.length, onClickClearAll: () => setRecentSearches([]) })] })) : (jsxRuntime.jsx("p", { className: "py-2 text-center text-sm text-neutral-400", children: t("filters.shared.noHistory") })) })] }));
|
|
4805
4805
|
};
|
|
4806
4806
|
/**
|
|
4807
4807
|
* Rental contract reference code description filter definition
|
|
@@ -4977,7 +4977,7 @@ const SearchFilterInline = ({ filterBarActions, filterState, filterDefinition, l
|
|
|
4977
4977
|
}, selected: option === filterValue, suffix: jsxRuntime.jsx(ClearItemButton, { onClick: e => {
|
|
4978
4978
|
e.stopPropagation();
|
|
4979
4979
|
setRecentSearches(prev => prev.filter(r => r !== option));
|
|
4980
|
-
} }) }, `${option}-${index}`))) }) }), jsxRuntime.jsx(RecentSearchesFooter, { count: recentSearches.length,
|
|
4980
|
+
} }) }, `${option}-${index}`))) }) }), jsxRuntime.jsx(RecentSearchesFooter, { count: recentSearches.length, onClickClearAll: () => setRecentSearches([]) })] })) : (jsxRuntime.jsx("p", { className: "py-2 text-center text-sm text-neutral-400", children: t("filters.shared.noHistory") })) }) }) })] }));
|
|
4981
4981
|
};
|
|
4982
4982
|
/**
|
|
4983
4983
|
* Search filter definition
|
package/index.esm.js
CHANGED
|
@@ -4723,12 +4723,12 @@ const ClearItemButton = ({ onClick }) => {
|
|
|
4723
4723
|
* @param {RecentSearchesFooterProps} props - The props for the ClearAllFooter component
|
|
4724
4724
|
* @returns {ReactElement} RecentSearchesFooter component
|
|
4725
4725
|
*/
|
|
4726
|
-
const RecentSearchesFooter = ({ count,
|
|
4726
|
+
const RecentSearchesFooter = ({ count, onClickClearAll }) => {
|
|
4727
4727
|
const [t] = useTranslation();
|
|
4728
4728
|
if (count === 0) {
|
|
4729
4729
|
return null;
|
|
4730
4730
|
}
|
|
4731
|
-
return (jsxs("div", { className: "flex items-baseline justify-between gap-x-2 border-t-2 border-neutral-300 px-2 py-0.5", children: [jsx(Text, { className: "py-0.5", size: "small", subtle: true, children: t("filters.shared.recentSearches") }), count > 1 ? (jsx(Button, { onClick:
|
|
4731
|
+
return (jsxs("div", { className: "flex items-baseline justify-between gap-x-2 border-t-2 border-neutral-300 px-2 py-0.5", children: [jsx(Text, { className: "py-0.5", size: "small", subtle: true, children: t("filters.shared.recentSearches") }), count > 1 ? (jsx(Button, { onClick: onClickClearAll, size: "small", variant: "ghost", children: t("filters.shared.clearAll") })) : null] }));
|
|
4732
4732
|
};
|
|
4733
4733
|
|
|
4734
4734
|
const MAX_RECENT_SEARCHES$1 = 20;
|
|
@@ -4799,7 +4799,7 @@ const RentalContractReferenceCodeDescriptionFilterView = ({ filterBarActions, fi
|
|
|
4799
4799
|
}, selected: option === filterValue, suffix: jsx(ClearItemButton, { onClick: e => {
|
|
4800
4800
|
e.stopPropagation();
|
|
4801
4801
|
setRecentSearches(prev => prev.filter(r => r !== option));
|
|
4802
|
-
} }) }, `${option}-${index}`))) }), jsx(RecentSearchesFooter, { count: recentSearches.length,
|
|
4802
|
+
} }) }, `${option}-${index}`))) }), jsx(RecentSearchesFooter, { count: recentSearches.length, onClickClearAll: () => setRecentSearches([]) })] })) : (jsx("p", { className: "py-2 text-center text-sm text-neutral-400", children: t("filters.shared.noHistory") })) })] }));
|
|
4803
4803
|
};
|
|
4804
4804
|
/**
|
|
4805
4805
|
* Rental contract reference code description filter definition
|
|
@@ -4975,7 +4975,7 @@ const SearchFilterInline = ({ filterBarActions, filterState, filterDefinition, l
|
|
|
4975
4975
|
}, selected: option === filterValue, suffix: jsx(ClearItemButton, { onClick: e => {
|
|
4976
4976
|
e.stopPropagation();
|
|
4977
4977
|
setRecentSearches(prev => prev.filter(r => r !== option));
|
|
4978
|
-
} }) }, `${option}-${index}`))) }) }), jsx(RecentSearchesFooter, { count: recentSearches.length,
|
|
4978
|
+
} }) }, `${option}-${index}`))) }) }), jsx(RecentSearchesFooter, { count: recentSearches.length, onClickClearAll: () => setRecentSearches([]) })] })) : (jsx("p", { className: "py-2 text-center text-sm text-neutral-400", children: t("filters.shared.noHistory") })) }) }) })] }));
|
|
4979
4979
|
};
|
|
4980
4980
|
/**
|
|
4981
4981
|
* Search filter definition
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-asset-filter-definitions",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.42",
|
|
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.12.
|
|
19
|
-
"@trackunit/filters-filter-bar": "1.14.
|
|
20
|
-
"@trackunit/react-core-hooks": "1.12.
|
|
21
|
-
"@trackunit/react-filter-components": "1.13.
|
|
22
|
-
"@trackunit/react-form-components": "1.14.
|
|
23
|
-
"@trackunit/filters-graphql-hook": "1.17.
|
|
24
|
-
"@trackunit/utilization-indicator": "1.13.
|
|
25
|
-
"@trackunit/geo-json-utils": "1.11.
|
|
26
|
-
"@trackunit/react-components": "1.17.
|
|
27
|
-
"@trackunit/shared-utils": "1.13.
|
|
28
|
-
"@trackunit/translations-machine-type": "1.12.
|
|
29
|
-
"@trackunit/criticality-indicator": "1.13.
|
|
30
|
-
"@trackunit/iris-app-api": "1.14.
|
|
31
|
-
"@trackunit/react-core-contexts-test": "1.12.
|
|
32
|
-
"@trackunit/i18n-library-translation": "1.12.
|
|
33
|
-
"@trackunit/iris-app-runtime-core-api": "1.12.
|
|
34
|
-
"@trackunit/react-graphql-hooks": "1.14.
|
|
18
|
+
"@trackunit/iris-app-build-utilities": "1.12.49",
|
|
19
|
+
"@trackunit/filters-filter-bar": "1.14.34",
|
|
20
|
+
"@trackunit/react-core-hooks": "1.12.28",
|
|
21
|
+
"@trackunit/react-filter-components": "1.13.32",
|
|
22
|
+
"@trackunit/react-form-components": "1.14.29",
|
|
23
|
+
"@trackunit/filters-graphql-hook": "1.17.35",
|
|
24
|
+
"@trackunit/utilization-indicator": "1.13.29",
|
|
25
|
+
"@trackunit/geo-json-utils": "1.11.44",
|
|
26
|
+
"@trackunit/react-components": "1.17.26",
|
|
27
|
+
"@trackunit/shared-utils": "1.13.44",
|
|
28
|
+
"@trackunit/translations-machine-type": "1.12.37",
|
|
29
|
+
"@trackunit/criticality-indicator": "1.13.29",
|
|
30
|
+
"@trackunit/iris-app-api": "1.14.44",
|
|
31
|
+
"@trackunit/react-core-contexts-test": "1.12.26",
|
|
32
|
+
"@trackunit/i18n-library-translation": "1.12.29",
|
|
33
|
+
"@trackunit/iris-app-runtime-core-api": "1.12.25",
|
|
34
|
+
"@trackunit/react-graphql-hooks": "1.14.29"
|
|
35
35
|
},
|
|
36
36
|
"module": "./index.esm.js",
|
|
37
37
|
"main": "./index.cjs.js",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { MouseEventHandler } from "react";
|
|
1
2
|
type RecentSearchesFooterProps = {
|
|
2
|
-
|
|
3
|
+
onClickClearAll: MouseEventHandler<HTMLElement>;
|
|
3
4
|
count: number;
|
|
4
5
|
};
|
|
5
6
|
/**
|
|
@@ -8,5 +9,5 @@ type RecentSearchesFooterProps = {
|
|
|
8
9
|
* @param {RecentSearchesFooterProps} props - The props for the ClearAllFooter component
|
|
9
10
|
* @returns {ReactElement} RecentSearchesFooter component
|
|
10
11
|
*/
|
|
11
|
-
export declare const RecentSearchesFooter: ({ count,
|
|
12
|
+
export declare const RecentSearchesFooter: ({ count, onClickClearAll }: RecentSearchesFooterProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
13
|
export {};
|