@trackunit/filters-filter-bar 1.3.210 → 1.3.211
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 +290 -253
- package/index.esm.js +293 -258
- package/package.json +13 -13
- package/src/lib/FilterBar.d.ts +1 -1
- package/src/lib/components/AppliedFiltersRenderer.d.ts +8 -0
- package/src/lib/components/FilterTooltips/MultipleFilterTooltipLabel.d.ts +2 -2
- package/src/lib/components/FilterTooltips/SingleFilterTooltipLabel.d.ts +2 -2
- package/src/lib/components/index.d.ts +2 -0
- package/src/lib/hooks/mockFilterBar.d.ts +3 -42
- package/src/lib/types/FilterTypes.d.ts +9 -2
package/src/lib/FilterBar.d.ts
CHANGED
|
@@ -34,5 +34,5 @@ interface FilterBarProps<TFilterBarDefinition extends FilterBarDefinition> {
|
|
|
34
34
|
/**
|
|
35
35
|
* The FilterBar component serves as a wrapper for managing filters.
|
|
36
36
|
*/
|
|
37
|
-
export declare const FilterBar: <TFilterBarDefinition extends FilterBarDefinition>({ hiddenFilters, className, filterBarDefinition, filterBarConfig, compact,
|
|
37
|
+
export declare const FilterBar: <TFilterBarDefinition extends FilterBarDefinition>({ hiddenFilters, className, filterBarDefinition, filterBarConfig, compact, allowShowFiltersDirectly, title, }: FilterBarProps<TFilterBarDefinition>) => import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FilterBarConfig, FilterBarDefinition, FilterDefinition, FilterMapActions, FilterMapGetter } from "../types/FilterTypes";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export declare const AppliedFiltersRenderer: <TFilterBarDefinition extends FilterBarDefinition>({ appliedFilters, filterBarConfig, }: {
|
|
6
|
+
appliedFilters: FilterDefinition[];
|
|
7
|
+
filterBarConfig: FilterBarConfig<TFilterBarDefinition> & FilterMapActions & FilterMapGetter;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,5 +16,5 @@ interface MultipleFilterTooltipLabelProps<TFilterBarDefinition extends FilterBar
|
|
|
16
16
|
* @param {string[]} [props.filterKeys] An optional list of filter keys to filter the currently applied filters.
|
|
17
17
|
* @returns {ReactElement | string} Returns a element or string for the tooltip displaying applied filters.
|
|
18
18
|
*/
|
|
19
|
-
declare const MultipleFilterTooltipLabel: <TFilterBarDefinition extends FilterBarDefinition>({ filterBarConfig, filterKeys, filters, }: MultipleFilterTooltipLabelProps<TFilterBarDefinition>) => ReactElement | string;
|
|
20
|
-
export
|
|
19
|
+
export declare const MultipleFilterTooltipLabel: <TFilterBarDefinition extends FilterBarDefinition>({ filterBarConfig, filterKeys, filters, }: MultipleFilterTooltipLabelProps<TFilterBarDefinition>) => ReactElement | string;
|
|
20
|
+
export {};
|
|
@@ -15,5 +15,5 @@ interface SingleFilterTooltipLabelProps<TFilterBarDefinition extends FilterBarDe
|
|
|
15
15
|
* @param {string} props.filterKey - The key identifying the filter.
|
|
16
16
|
* @returns {ReactElement} The rendered tooltip label and applied filter values.
|
|
17
17
|
*/
|
|
18
|
-
declare const SingleFilterTooltipLabel: <TFilterBarDefinition extends FilterBarDefinition>({ filterBarConfig, filter, filterKey, }: SingleFilterTooltipLabelProps<TFilterBarDefinition>) => ReactElement;
|
|
19
|
-
export
|
|
18
|
+
export declare const SingleFilterTooltipLabel: <TFilterBarDefinition extends FilterBarDefinition>({ filterBarConfig, filter, filterKey, }: SingleFilterTooltipLabelProps<TFilterBarDefinition>) => ReactElement;
|
|
19
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./AppliedFiltersRenderer";
|
|
1
2
|
export * from "./DefaultCheckboxFilter";
|
|
2
3
|
export * from "./DefaultDateRangeFilter";
|
|
3
4
|
export * from "./DefaultFilterTypes";
|
|
@@ -12,6 +13,7 @@ export * from "./FiltersMenu";
|
|
|
12
13
|
export * from "./FiltersMenuContent";
|
|
13
14
|
export * from "./FiltersRenderer";
|
|
14
15
|
export * from "./FilterTableComponent";
|
|
16
|
+
export * from "./FilterTooltips/MultipleFilterTooltipLabel";
|
|
15
17
|
export * from "./GroupedFiltersList";
|
|
16
18
|
export * from "./HierarchicalCheckboxFilter/HierarchicalCheckboxFilter";
|
|
17
19
|
export * from "./ResetFiltersButton";
|
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
appliedFilterKeys: () => never[];
|
|
5
|
-
arrayIncludesValue: (args?: any) => any;
|
|
6
|
-
getFilterTitle: (args?: any) => any;
|
|
7
|
-
getFilterBarName: (args?: any) => any;
|
|
8
|
-
initialState: {
|
|
9
|
-
customerType: never[];
|
|
10
|
-
};
|
|
11
|
-
name: string;
|
|
12
|
-
objectArrayIncludesValue: (args?: any) => any;
|
|
13
|
-
resetFiltersToInitialState: (args?: any) => any;
|
|
14
|
-
resetIndividualFilterToInitialState: (args?: any) => any;
|
|
15
|
-
updateStarredFilters: (args?: any) => any;
|
|
16
|
-
setArrayObjectValue: (args?: any) => any;
|
|
17
|
-
setArrayValue: (args?: any) => any;
|
|
18
|
-
setBooleanValue: (args?: any) => any;
|
|
19
|
-
setArea: (args?: any) => any;
|
|
20
|
-
setDateRange: (args?: any) => any;
|
|
21
|
-
setMinMaxValue: (args?: any) => any;
|
|
22
|
-
setNumberValue: (args?: any) => any;
|
|
23
|
-
setStringValue: (args?: any) => any;
|
|
24
|
-
toggleArrayObjectValue: (args?: any) => any;
|
|
25
|
-
toggleArrayValue: (args?: any) => any;
|
|
26
|
-
values: {
|
|
27
|
-
customerType: never[];
|
|
28
|
-
};
|
|
29
|
-
starredFilterKeys: never[];
|
|
30
|
-
getValuesByKey: (args?: any) => any;
|
|
31
|
-
setters: {
|
|
32
|
-
setCriticality: (args?: any) => any;
|
|
33
|
-
setServicePlan: (args?: any) => any;
|
|
34
|
-
};
|
|
35
|
-
objectIncludesValue: (args?: any) => any;
|
|
36
|
-
setObjectValue: (args?: any) => any;
|
|
37
|
-
toggleObjectValue: (args?: any) => any;
|
|
38
|
-
};
|
|
39
|
-
filterBarDefinition: {};
|
|
40
|
-
name: string;
|
|
41
|
-
onValuesChange: (args?: any) => any;
|
|
42
|
-
};
|
|
1
|
+
import { FilterBarDefinition } from "../types/FilterTypes";
|
|
2
|
+
import { FilterBarHook } from "./useFilterBar";
|
|
3
|
+
export declare const mockFilterBar: FilterBarHook<FilterBarDefinition>;
|
|
@@ -16,7 +16,11 @@ export type MinMaxFilterValue = {
|
|
|
16
16
|
};
|
|
17
17
|
export declare const areaFilterGeoJsonGeometrySchema: z.ZodUnion<[z.ZodObject<{
|
|
18
18
|
type: z.ZodLiteral<"Polygon">;
|
|
19
|
-
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber
|
|
19
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber /**
|
|
20
|
+
* The Group the filter will be shown under in the ui.
|
|
21
|
+
*
|
|
22
|
+
* @default "OTHER"
|
|
23
|
+
*/, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
20
24
|
}, "strict", z.ZodTypeAny, {
|
|
21
25
|
type: "Polygon";
|
|
22
26
|
coordinates: [number, number][][];
|
|
@@ -25,7 +29,9 @@ export declare const areaFilterGeoJsonGeometrySchema: z.ZodUnion<[z.ZodObject<{
|
|
|
25
29
|
coordinates: [number, number][][];
|
|
26
30
|
}>, z.ZodObject<{
|
|
27
31
|
type: z.ZodLiteral<"MultiPolygon">;
|
|
28
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects
|
|
32
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects /**
|
|
33
|
+
* A boolean that determines if the filter should be generated.
|
|
34
|
+
*/<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
|
|
29
35
|
}, "strict", z.ZodTypeAny, {
|
|
30
36
|
type: "MultiPolygon";
|
|
31
37
|
coordinates: [number, number][][][];
|
|
@@ -59,6 +65,7 @@ export type FilterMapGetter = {
|
|
|
59
65
|
objectArrayIncludesValue: (key: string, value: string) => boolean;
|
|
60
66
|
objectIncludesValue: (key: string, value: string) => boolean;
|
|
61
67
|
getValuesByKey: (key: string) => FilterValueType;
|
|
68
|
+
hasDefaultValue: (key: string) => boolean;
|
|
62
69
|
arrayIncludesValue: (key: string, value: string | boolean) => boolean;
|
|
63
70
|
appliedFilterKeys: () => (keyof FilterBarDefinition)[];
|
|
64
71
|
isFilterIncludedByKey(key: string): boolean;
|