@trackunit/filters-filter-bar 1.3.246 → 1.3.248

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
@@ -974,6 +974,18 @@ const TooltipValues = ({ values }) => {
974
974
  return jsxRuntime.jsx(jsxRuntime.Fragment, {});
975
975
  };
976
976
 
977
+ /**
978
+ * Component for displaying a title and values in a tooltip.
979
+ *
980
+ * @param {TooltipLabelProps} props - Component properties.
981
+ * @param {string} props.title - The title of the filter.
982
+ * @param {any} props.displayValues - The filter values to display.
983
+ * @returns {ReactElement} The rendered component showing the title and values.
984
+ */
985
+ const TooltipLabel = ({ title, displayValues }) => {
986
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "text-xs font-medium", children: title }), jsxRuntime.jsx(TooltipValues, { values: displayValues })] }));
987
+ };
988
+
977
989
  /**
978
990
  * Component that displays a tooltip label with filter details.
979
991
  *
@@ -993,7 +1005,7 @@ const SingleFilterTooltipLabel = ({ filterBarConfig, filter, filterKey, }) => {
993
1005
  }
994
1006
  return values;
995
1007
  }, [filter, values]);
996
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "text-xs font-medium", children: title }), jsxRuntime.jsx(TooltipValues, { values: displayValues })] }));
1008
+ return jsxRuntime.jsx(TooltipLabel, { displayValues: displayValues, title: title });
997
1009
  };
998
1010
 
999
1011
  /**
@@ -2164,6 +2176,7 @@ exports.GroupedFiltersList = GroupedFiltersList;
2164
2176
  exports.HierarchicalCheckboxFilter = HierarchicalCheckboxFilter;
2165
2177
  exports.MultipleFilterTooltipLabel = MultipleFilterTooltipLabel;
2166
2178
  exports.ResetFiltersButton = ResetFiltersButton;
2179
+ exports.TooltipLabel = TooltipLabel;
2167
2180
  exports.areaFilterGeoJsonGeometrySchema = areaFilterGeoJsonGeometrySchema;
2168
2181
  exports.isAreaFilterValue = isAreaFilterValue;
2169
2182
  exports.isArrayFilterValue = isArrayFilterValue;
package/index.esm.js CHANGED
@@ -972,6 +972,18 @@ const TooltipValues = ({ values }) => {
972
972
  return jsx(Fragment, {});
973
973
  };
974
974
 
975
+ /**
976
+ * Component for displaying a title and values in a tooltip.
977
+ *
978
+ * @param {TooltipLabelProps} props - Component properties.
979
+ * @param {string} props.title - The title of the filter.
980
+ * @param {any} props.displayValues - The filter values to display.
981
+ * @returns {ReactElement} The rendered component showing the title and values.
982
+ */
983
+ const TooltipLabel = ({ title, displayValues }) => {
984
+ return (jsxs(Fragment, { children: [jsx("div", { className: "text-xs font-medium", children: title }), jsx(TooltipValues, { values: displayValues })] }));
985
+ };
986
+
975
987
  /**
976
988
  * Component that displays a tooltip label with filter details.
977
989
  *
@@ -991,7 +1003,7 @@ const SingleFilterTooltipLabel = ({ filterBarConfig, filter, filterKey, }) => {
991
1003
  }
992
1004
  return values;
993
1005
  }, [filter, values]);
994
- return (jsxs(Fragment, { children: [jsx("div", { className: "text-xs font-medium", children: title }), jsx(TooltipValues, { values: displayValues })] }));
1006
+ return jsx(TooltipLabel, { displayValues: displayValues, title: title });
995
1007
  };
996
1008
 
997
1009
  /**
@@ -2142,4 +2154,4 @@ const mergeFilters = (filterBarDefinition, extraFilters) => {
2142
2154
  */
2143
2155
  setupLibraryTranslations();
2144
2156
 
2145
- export { AppliedFiltersRenderer, DefaultCheckboxFilter, DefaultDateRangeFilter, DefaultMinMaxFilter, DefaultRadioFilter, DynamicFilterList, FilterBar, FilterButtonTooltipLabel, FilterComponent, FilterEvents, FilterHeader, FilterResults, FilterTableComponent, FiltersMenu, FiltersMenuContent, FiltersRenderer, GroupedFiltersList, HierarchicalCheckboxFilter, MultipleFilterTooltipLabel, ResetFiltersButton, areaFilterGeoJsonGeometrySchema, isAreaFilterValue, isArrayFilterValue, isBooleanValue, isDateRangeValue, isMinMaxFilterValue, isStringArrayFilterValue, isValueName, isValueNameArray, mergeFilters, mockFilterBar, toggleFilterValue, useFilterBar, useFilterBarAsync, useFiltersMenu, useSearchParamAsFilter, validateFilter };
2157
+ export { AppliedFiltersRenderer, DefaultCheckboxFilter, DefaultDateRangeFilter, DefaultMinMaxFilter, DefaultRadioFilter, DynamicFilterList, FilterBar, FilterButtonTooltipLabel, FilterComponent, FilterEvents, FilterHeader, FilterResults, FilterTableComponent, FiltersMenu, FiltersMenuContent, FiltersRenderer, GroupedFiltersList, HierarchicalCheckboxFilter, MultipleFilterTooltipLabel, ResetFiltersButton, TooltipLabel, areaFilterGeoJsonGeometrySchema, isAreaFilterValue, isArrayFilterValue, isBooleanValue, isDateRangeValue, isMinMaxFilterValue, isStringArrayFilterValue, isValueName, isValueNameArray, mergeFilters, mockFilterBar, toggleFilterValue, useFilterBar, useFilterBarAsync, useFiltersMenu, useSearchParamAsFilter, validateFilter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/filters-filter-bar",
3
- "version": "1.3.246",
3
+ "version": "1.3.248",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -14,18 +14,18 @@
14
14
  "tailwind-merge": "^2.0.0",
15
15
  "string-ts": "^2.0.0",
16
16
  "zod": "3.23.4",
17
- "@trackunit/iris-app-api": "1.3.153",
18
- "@trackunit/react-core-hooks": "1.3.159",
19
- "@trackunit/react-filter-components": "1.3.200",
20
- "@trackunit/react-date-and-time-components": "1.3.204",
21
- "@trackunit/shared-utils": "1.5.145",
22
- "@trackunit/react-form-components": "1.3.201",
23
- "@trackunit/react-core-contexts-api": "1.4.153",
24
- "@trackunit/geo-json-utils": "1.3.143",
25
- "@trackunit/i18n-library-translation": "1.3.166",
26
- "@trackunit/css-class-variance-utilities": "1.3.145",
27
- "@trackunit/react-components": "1.4.176",
28
- "@trackunit/react-test-setup": "1.0.35"
17
+ "@trackunit/iris-app-api": "1.3.154",
18
+ "@trackunit/react-core-hooks": "1.3.160",
19
+ "@trackunit/react-filter-components": "1.3.202",
20
+ "@trackunit/react-date-and-time-components": "1.3.206",
21
+ "@trackunit/shared-utils": "1.5.146",
22
+ "@trackunit/react-form-components": "1.3.203",
23
+ "@trackunit/react-core-contexts-api": "1.4.154",
24
+ "@trackunit/geo-json-utils": "1.3.144",
25
+ "@trackunit/i18n-library-translation": "1.3.167",
26
+ "@trackunit/css-class-variance-utilities": "1.3.146",
27
+ "@trackunit/react-components": "1.4.178",
28
+ "@trackunit/react-test-setup": "1.0.36"
29
29
  },
30
30
  "module": "./index.esm.js",
31
31
  "main": "./index.cjs.js",
@@ -0,0 +1,16 @@
1
+ import { ReactElement } from "react";
2
+ import { FilterValueType } from "../../types/FilterTypes";
3
+ interface TooltipLabelProps {
4
+ title: string;
5
+ displayValues: FilterValueType;
6
+ }
7
+ /**
8
+ * Component for displaying a title and values in a tooltip.
9
+ *
10
+ * @param {TooltipLabelProps} props - Component properties.
11
+ * @param {string} props.title - The title of the filter.
12
+ * @param {any} props.displayValues - The filter values to display.
13
+ * @returns {ReactElement} The rendered component showing the title and values.
14
+ */
15
+ export declare const TooltipLabel: ({ title, displayValues }: TooltipLabelProps) => ReactElement;
16
+ export {};
@@ -14,6 +14,7 @@ export * from "./components/FiltersMenuContent";
14
14
  export * from "./components/FiltersRenderer";
15
15
  export * from "./components/FilterTableComponent";
16
16
  export * from "./components/FilterTooltips/MultipleFilterTooltipLabel";
17
+ export * from "./components/FilterTooltips/TooltipLabel";
17
18
  export * from "./components/GroupedFiltersList";
18
19
  export * from "./components/HierarchicalCheckboxFilter/HierarchicalCheckboxFilter";
19
20
  export * from "./components/ResetFiltersButton";