@megha-ui/react 1.2.169 → 1.2.171

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.
Files changed (43) hide show
  1. package/dist/components/block/index.js +3 -5
  2. package/dist/components/button/index.js +3 -5
  3. package/dist/components/button/types/borderStyle.js +1 -2
  4. package/dist/components/button/types/cursorType.js +1 -2
  5. package/dist/components/card/index.js +7 -9
  6. package/dist/components/checkbox/index.js +7 -9
  7. package/dist/components/date-input/index.js +6 -8
  8. package/dist/components/dropdown/index.js +42 -47
  9. package/dist/components/grid/hooks/useBulkSelect.js +6 -10
  10. package/dist/components/grid/hooks/usePagination.js +6 -10
  11. package/dist/components/grid/hooks/useResizeObserver.js +3 -5
  12. package/dist/components/grid/hooks/useSearch.js +3 -7
  13. package/dist/components/grid/hooks/useSort.js +4 -8
  14. package/dist/components/grid/hooks/useVisibleData.js +6 -10
  15. package/dist/components/grid/index.js +149 -188
  16. package/dist/components/grid/types/grid.d.ts +1 -0
  17. package/dist/components/grid/types/grid.js +1 -2
  18. package/dist/components/grid/utils/SummariseDetails.js +12 -17
  19. package/dist/components/grid/utils/calculatedropdown.js +4 -6
  20. package/dist/components/grid/utils/globalSearchChips.js +11 -16
  21. package/dist/components/grid/utils/gridFilterDropdown.js +22 -27
  22. package/dist/components/grid/utils/gridHeader.js +78 -118
  23. package/dist/components/grid/utils/gridHeaderDropdown.js +4 -6
  24. package/dist/components/grid/utils/gridRow.js +29 -34
  25. package/dist/components/grid/utils/groupedGridDetails.js +17 -22
  26. package/dist/components/grid/utils/groupedRow.js +12 -17
  27. package/dist/components/grid/utils/pagination.js +7 -11
  28. package/dist/components/grid/utils/paginationUtils.js +1 -5
  29. package/dist/components/grid/utils/regexUtils.js +2 -7
  30. package/dist/components/grid/utils/shimmer.js +4 -6
  31. package/dist/components/grid/utils/textFilterDropdown.js +8 -13
  32. package/dist/components/loader/index.js +6 -41
  33. package/dist/components/modal/index.js +11 -13
  34. package/dist/components/tabs/index.js +19 -26
  35. package/dist/components/text/index.js +3 -5
  36. package/dist/components/text/textType.js +1 -2
  37. package/dist/components/text-input/index.js +10 -12
  38. package/dist/components/textarea/index.js +3 -5
  39. package/dist/components/texteditor/index.js +25 -27
  40. package/dist/components/toggle/index.js +4 -6
  41. package/dist/index.js +16 -41
  42. package/dist/services/commonService.js +3 -7
  43. package/package.json +1 -1
@@ -155,6 +155,7 @@ export interface OjasGridProps {
155
155
  }) => void;
156
156
  locale: string;
157
157
  formatOptions?: any;
158
+ exportOptions?: any;
158
159
  }
159
160
  export interface GroupedRowProps {
160
161
  item: any;
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const calculatedropdown_1 = __importDefault(require("./calculatedropdown"));
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import CalculateDropdown from "./calculatedropdown";
8
3
  const SummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, columnWidths, widthMode, summariseDetails, summariseKeys, activeCalculateColor, gridRef, setCalculatePosition, calculatePosition, calculatetextColor = "#aaa", setCalculateVisible, calculateVisible, summariseDisplay, recalculate, groupedData, removedKeys = [], actionsKey, }) => {
9
4
  const handleCalculateSelect = (_columnKey, type) => {
10
5
  let columnKey = _columnKey;
@@ -125,7 +120,7 @@ const SummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, col
125
120
  const columnDetails = details[columnKey];
126
121
  return columnDetails[key];
127
122
  };
128
- return ((0, jsx_runtime_1.jsxs)("div", { style: {
123
+ return (_jsxs("div", { style: {
129
124
  display: "flex",
130
125
  alignItems: "stretch",
131
126
  position: "relative",
@@ -139,28 +134,28 @@ const SummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, col
139
134
  const columnKey = groupedData
140
135
  ? `${groupedData}-${column === null || column === void 0 ? void 0 : column.key}`
141
136
  : column === null || column === void 0 ? void 0 : column.key;
142
- return ((0, jsx_runtime_1.jsxs)("div", { style: Object.assign(Object.assign({}, cellStyle), { position: "relative", width: widthMode === "auto"
137
+ return (_jsxs("div", { style: Object.assign(Object.assign({}, cellStyle), { position: "relative", width: widthMode === "auto"
143
138
  ? "auto"
144
139
  : (column === null || column === void 0 ? void 0 : column.width)
145
140
  ? column === null || column === void 0 ? void 0 : column.width
146
141
  : columnWidths[`column-${_groupBy}`]
147
142
  ? columnWidths[`column-${_groupBy}`]
148
143
  : "fit-content", padding: _groupBy ? "0.5rem" : 0 }), className: `column ${columnKey}-${(_a = summariseDetails[columnKey || ""]) === null || _a === void 0 ? void 0 : _a.type}`, children: [summariseDetails[columnKey || ""] &&
149
- summariseDetails[columnKey || ""].type ? ((0, jsx_runtime_1.jsxs)("div", { style: {
144
+ summariseDetails[columnKey || ""].type ? (_jsxs("div", { style: {
150
145
  display: "flex",
151
146
  alignItems: "center",
152
147
  justifyContent: "space-between",
153
148
  fontSize: "inherit",
154
149
  color: activeCalculateColor,
155
150
  cursor: "pointer",
156
- }, onClick: (e) => handleCalculateClick(e, columnKey || ""), children: [(0, jsx_runtime_1.jsx)("span", { children: summariseDisplay[summariseDetails[columnKey || ""].type] }), (0, jsx_runtime_1.jsx)("span", { children: getCalculateValue(summariseDetails, columnKey || "", summariseDetails[columnKey || ""].type) })] })) : ((0, jsx_runtime_1.jsx)("div", { style: {
151
+ }, onClick: (e) => handleCalculateClick(e, columnKey || ""), children: [_jsx("span", { children: summariseDisplay[summariseDetails[columnKey || ""].type] }), _jsx("span", { children: getCalculateValue(summariseDetails, columnKey || "", summariseDetails[columnKey || ""].type) })] })) : (_jsx("div", { style: {
157
152
  display: "flex",
158
153
  alignItems: "center",
159
154
  justifyContent: "start",
160
155
  fontSize: "inherit",
161
156
  color: calculatetextColor,
162
157
  cursor: "pointer",
163
- }, onClick: (e) => handleCalculateClick(e, columnKey || ""), children: "Summarise" })), calculateVisible === columnKey && ((0, jsx_runtime_1.jsx)(calculatedropdown_1.default, { rowIndex: rowIndex !== null && rowIndex !== void 0 ? rowIndex : -1, options: calculateOptions.filter((item) => (column === null || column === void 0 ? void 0 : column.dataType) === "number"
158
+ }, onClick: (e) => handleCalculateClick(e, columnKey || ""), children: "Summarise" })), calculateVisible === columnKey && (_jsx(CalculateDropdown, { rowIndex: rowIndex !== null && rowIndex !== void 0 ? rowIndex : -1, options: calculateOptions.filter((item) => (column === null || column === void 0 ? void 0 : column.dataType) === "number"
164
159
  ? numberTypeCalcOps.includes(item.value)
165
160
  : (column === null || column === void 0 ? void 0 : column.dataType) === "date"
166
161
  ? dateTypeCalcOps.includes(item.value)
@@ -173,19 +168,19 @@ const SummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, col
173
168
  ? `${groupedData}-${column.key}`
174
169
  : column.key;
175
170
  if (!column.hidden) {
176
- return ((0, jsx_runtime_1.jsxs)("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} ${`column-${column.key}`} ${columnKey}-${(_a = summariseDetails[columnKey]) === null || _a === void 0 ? void 0 : _a.type}`, style: Object.assign(Object.assign({}, cellStyle), { position: "relative", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", width: columnWidths[`column-${column.key}`]
171
+ return (_jsxs("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} ${`column-${column.key}`} ${columnKey}-${(_a = summariseDetails[columnKey]) === null || _a === void 0 ? void 0 : _a.type}`, style: Object.assign(Object.assign({}, cellStyle), { position: "relative", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", width: columnWidths[`column-${column.key}`]
177
172
  ? columnWidths[`column-${column.key}`]
178
173
  : column.width
179
174
  ? column.width
180
175
  : "fit-content", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, background: "inherit" }), children: [summariseDetails[columnKey] &&
181
- summariseDetails[columnKey].type ? ((0, jsx_runtime_1.jsxs)("div", { style: {
176
+ summariseDetails[columnKey].type ? (_jsxs("div", { style: {
182
177
  display: "flex",
183
178
  alignItems: "center",
184
179
  justifyContent: "space-between",
185
180
  fontSize: "inherit",
186
181
  color: activeCalculateColor,
187
182
  cursor: "pointer",
188
- }, onClick: (e) => handleCalculateClick(e, columnKey), children: [(0, jsx_runtime_1.jsx)("span", { children: summariseDisplay[summariseDetails[columnKey].type] }), (0, jsx_runtime_1.jsx)("span", { children: getCalculateValue(summariseDetails, columnKey, summariseDetails[columnKey].type) })] })) : ((0, jsx_runtime_1.jsx)("div", { style: {
183
+ }, onClick: (e) => handleCalculateClick(e, columnKey), children: [_jsx("span", { children: summariseDisplay[summariseDetails[columnKey].type] }), _jsx("span", { children: getCalculateValue(summariseDetails, columnKey, summariseDetails[columnKey].type) })] })) : (_jsx("div", { style: {
189
184
  alignItems: "center",
190
185
  justifyContent: "start",
191
186
  fontSize: "inherit",
@@ -194,7 +189,7 @@ const SummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, col
194
189
  display: actionsKey.split(",").includes(column.key)
195
190
  ? "none"
196
191
  : "flex",
197
- }, onClick: (e) => handleCalculateClick(e, columnKey), children: "Summarise" })), calculateVisible === columnKey && ((0, jsx_runtime_1.jsx)(calculatedropdown_1.default, { rowIndex: rowIndex !== null && rowIndex !== void 0 ? rowIndex : -1, options: calculateOptions.filter((item) => column.dataType === "number" ||
192
+ }, onClick: (e) => handleCalculateClick(e, columnKey), children: "Summarise" })), calculateVisible === columnKey && (_jsx(CalculateDropdown, { rowIndex: rowIndex !== null && rowIndex !== void 0 ? rowIndex : -1, options: calculateOptions.filter((item) => column.dataType === "number" ||
198
193
  column.dataType === "currency"
199
194
  ? numberTypeCalcOps.includes(item.value)
200
195
  : column.dataType === "date"
@@ -203,4 +198,4 @@ const SummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, col
203
198
  }
204
199
  })] }));
205
200
  };
206
- exports.default = SummariseDetails;
201
+ export default SummariseDetails;
@@ -1,8 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
4
2
  const CalculateDropdown = ({ options, onClose, columnKey, }) => {
5
- return ((0, jsx_runtime_1.jsx)("ul", { style: {
3
+ return (_jsx("ul", { style: {
6
4
  position: "absolute",
7
5
  zIndex: 10,
8
6
  bottom: "2.5rem",
@@ -19,11 +17,11 @@ const CalculateDropdown = ({ options, onClose, columnKey, }) => {
19
17
  transform: "translateY(10px)",
20
18
  maxHeight: "20rem",
21
19
  overflow: "auto",
22
- }, onClick: (e) => e.stopPropagation(), children: options.map((option, index) => ((0, jsx_runtime_1.jsx)("li", { style: { padding: "0.25rem 0.75rem", cursor: "pointer" }, onClick: () => {
20
+ }, onClick: (e) => e.stopPropagation(), children: options.map((option, index) => (_jsx("li", { style: { padding: "0.25rem 0.75rem", cursor: "pointer" }, onClick: () => {
23
21
  columnKey &&
24
22
  option.action &&
25
23
  option.action(columnKey, option.value);
26
24
  onClose();
27
25
  }, children: option.label }, index))) }));
28
26
  };
29
- exports.default = CalculateDropdown;
27
+ export default CalculateDropdown;
@@ -1,16 +1,11 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const react_1 = require("react");
8
- const text_input_1 = __importDefault(require("../../text-input"));
9
- const fi_1 = require("react-icons/fi");
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from "react";
3
+ import TextInput from "../../text-input";
4
+ import { FiSearch } from "react-icons/fi";
10
5
  const GlobalSearchChiProps = ({ globalInputSearch, setGlobalInputSearch, chips, setChips, inputValue, setInputValue, expanded, setExpanded, shouldClose = true }) => {
11
- const wrapperRef = (0, react_1.useRef)(null);
12
- const inputDiv = (0, react_1.useRef)(null);
13
- (0, react_1.useEffect)(() => {
6
+ const wrapperRef = useRef(null);
7
+ const inputDiv = useRef(null);
8
+ useEffect(() => {
14
9
  if (globalInputSearch && globalInputSearch.includes(",")) {
15
10
  setChips(globalInputSearch.split(","));
16
11
  }
@@ -29,13 +24,13 @@ const GlobalSearchChiProps = ({ globalInputSearch, setGlobalInputSearch, chips,
29
24
  }
30
25
  }
31
26
  }, [globalInputSearch]);
32
- (0, react_1.useEffect)(() => {
27
+ useEffect(() => {
33
28
  var _a, _b;
34
29
  if (expanded && shouldClose) {
35
30
  (_b = (_a = inputDiv.current) === null || _a === void 0 ? void 0 : _a.querySelector("input")) === null || _b === void 0 ? void 0 : _b.focus();
36
31
  }
37
32
  }, [expanded]);
38
- (0, react_1.useEffect)(() => {
33
+ useEffect(() => {
39
34
  if (!expanded)
40
35
  return;
41
36
  const handleClickOutside = (e) => {
@@ -48,11 +43,11 @@ const GlobalSearchChiProps = ({ globalInputSearch, setGlobalInputSearch, chips,
48
43
  document.addEventListener("mousedown", handleClickOutside);
49
44
  return () => document.removeEventListener("mousedown", handleClickOutside);
50
45
  }, [expanded, chips.length, globalInputSearch, inputValue, shouldClose]);
51
- return ((0, jsx_runtime_1.jsxs)("div", { style: { width: "100%", display: "flex", alignItems: "center", border: expanded ? "1px solid var(--border)" : "none", borderRadius: "0.25rem" }, ref: wrapperRef, children: [(0, jsx_runtime_1.jsx)("div", { onClick: () => setExpanded(true), style: { cursor: "pointer", paddingLeft: "0.5rem" }, children: (0, jsx_runtime_1.jsx)(fi_1.FiSearch, {}) }), (0, jsx_runtime_1.jsx)("div", { ref: inputDiv, style: { flexGrow: 1 }, children: expanded && ((0, jsx_runtime_1.jsx)(text_input_1.default, { value: inputValue, placeholder: "Global search", extraInputStyle: { outline: "none" }, onChange: (e) => setInputValue(e.target.value), border: "none", onKeyDown: (e) => {
46
+ return (_jsxs("div", { style: { width: "100%", display: "flex", alignItems: "center", border: expanded ? "1px solid var(--border)" : "none", borderRadius: "0.25rem" }, ref: wrapperRef, children: [_jsx("div", { onClick: () => setExpanded(true), style: { cursor: "pointer", paddingLeft: "0.5rem" }, children: _jsx(FiSearch, {}) }), _jsx("div", { ref: inputDiv, style: { flexGrow: 1 }, children: expanded && (_jsx(TextInput, { value: inputValue, placeholder: "Global search", extraInputStyle: { outline: "none" }, onChange: (e) => setInputValue(e.target.value), border: "none", onKeyDown: (e) => {
52
47
  if (e.key === "Enter") {
53
48
  setGlobalInputSearch([...new Set([...chips, e.currentTarget.value])].join(","));
54
49
  setInputValue("");
55
50
  }
56
51
  } })) })] }));
57
52
  };
58
- exports.default = GlobalSearchChiProps;
53
+ export default GlobalSearchChiProps;
@@ -1,22 +1,17 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const react_1 = require("react");
8
- const fi_1 = require("react-icons/fi");
9
- const textFilterDropdown_1 = __importDefault(require("./textFilterDropdown"));
10
- const text_input_1 = __importDefault(require("../../text-input"));
11
- const checkbox_1 = __importDefault(require("../../checkbox"));
12
- const commonService_1 = require("../../../services/commonService");
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { FiChevronRight } from "react-icons/fi";
4
+ import TextFilterDropdown from "./textFilterDropdown";
5
+ import TextInput from "../../text-input";
6
+ import Checkbox from "../../checkbox";
7
+ import { formatValue } from "../../../services/commonService";
13
8
  const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, columnKey, searchElement, activeSearchType, textFilterLabel, columnData, checkboxWrapper, onFilter, setUniqueSearch, uniqueSearch, sortingOps, searchable, searchInput, columnIndex, columnType, locale, formatOptions }) => {
14
9
  var _a, _b, _c, _d;
15
- const [isOpen, setIsOpen] = (0, react_1.useState)(false);
16
- const [filterColumnData, setFilterColumnData] = (0, react_1.useState)([]);
17
- const [filterSearch, setFilterSearch] = (0, react_1.useState)("");
18
- const headerDropdown = (0, react_1.useRef)(null);
19
- (0, react_1.useEffect)(() => {
10
+ const [isOpen, setIsOpen] = useState(false);
11
+ const [filterColumnData, setFilterColumnData] = useState([]);
12
+ const [filterSearch, setFilterSearch] = useState("");
13
+ const headerDropdown = useRef(null);
14
+ useEffect(() => {
20
15
  var _a;
21
16
  if (searchElement) {
22
17
  const _searchElement = document.getElementById("search-input");
@@ -26,7 +21,7 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
26
21
  }
27
22
  }
28
23
  }, []);
29
- (0, react_1.useEffect)(() => {
24
+ useEffect(() => {
30
25
  if (typeof uniqueSearch[columnKey] === "undefined") {
31
26
  setUniqueSearch((prev) => (Object.assign(Object.assign({}, prev), { [columnKey]: columnData })));
32
27
  }
@@ -58,31 +53,31 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
58
53
  }
59
54
  onFilter(_uniqueSeach, columnKey);
60
55
  };
61
- return ((0, jsx_runtime_1.jsxs)("div", { style: Object.assign(Object.assign({ position: "absolute", top: "calc(100% + 5px)" }, (columnIndex > 1 ? { right: 0 } : { left: 0 })), { zIndex: headerDropdownIndex ? headerDropdownIndex : 1000, backgroundColor: "white", boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)", listStyleType: "none", padding: "0.35rem 0", width: "max-content", maxWidth: "500px", borderRadius: "0.5rem", margin: 0 }), ref: headerDropdown, onClick: (e) => e.stopPropagation(), children: [searchInput && searchInput, sortingOps, (0, jsx_runtime_1.jsxs)("div", { style: {
56
+ return (_jsxs("div", { style: Object.assign(Object.assign({ position: "absolute", top: "calc(100% + 5px)" }, (columnIndex > 1 ? { right: 0 } : { left: 0 })), { zIndex: headerDropdownIndex ? headerDropdownIndex : 1000, backgroundColor: "white", boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)", listStyleType: "none", padding: "0.35rem 0", width: "max-content", maxWidth: "500px", borderRadius: "0.5rem", margin: 0 }), ref: headerDropdown, onClick: (e) => e.stopPropagation(), children: [searchInput && searchInput, sortingOps, _jsxs("div", { style: {
62
57
  padding: "0.5rem 0.75rem",
63
58
  cursor: "pointer",
64
59
  display: "flex",
65
60
  alignItems: "center",
66
61
  justifyContent: "space-between",
67
- }, onClick: () => setIsOpen((prev) => !prev), children: [(0, jsx_runtime_1.jsx)("span", { children: textFilterLabel }), (0, jsx_runtime_1.jsx)(fi_1.FiChevronRight, {})] }), columnData.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { style: {
62
+ }, onClick: () => setIsOpen((prev) => !prev), children: [_jsx("span", { children: textFilterLabel }), _jsx(FiChevronRight, {})] }), columnData.length > 0 && (_jsxs("div", { style: {
68
63
  width: "100%",
69
64
  maxHeight: 300,
70
65
  overflow: "auto",
71
66
  padding: "0.5rem 0.75rem",
72
- }, children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-2", children: (0, jsx_runtime_1.jsx)(text_input_1.default, { placeholder: `filter`, onChange: (e) => setFilterSearch(e.target.value), value: filterSearch, height: 32, width: "100%", className: "w-full", backgroundColor: "#fff" }) }), filterColumnData.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: {
67
+ }, children: [_jsx("div", { className: "mb-2", children: _jsx(TextInput, { placeholder: `filter`, onChange: (e) => setFilterSearch(e.target.value), value: filterSearch, height: 32, width: "100%", className: "w-full", backgroundColor: "#fff" }) }), filterColumnData.length > 0 && (_jsxs(_Fragment, { children: [_jsxs("div", { style: {
73
68
  cursor: "pointer",
74
69
  display: "flex",
75
70
  alignItems: "center",
76
- }, onClick: () => handleSelect("all", columnKey), children: [(0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: ((_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
71
+ }, onClick: () => handleSelect("all", columnKey), children: [_jsx(Checkbox, { selected: ((_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
77
72
  uniqueSearch[columnKey].every((item) => columnData.includes(item)), indeterminate: ((_b = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
78
- uniqueSearch[columnKey].some((item) => columnData.includes(item)), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }), (0, jsx_runtime_1.jsx)("span", { style: { marginLeft: "0.5rem" }, children: "All" })] }), filterColumnData.map((item) => {
73
+ uniqueSearch[columnKey].some((item) => columnData.includes(item)), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }), _jsx("span", { style: { marginLeft: "0.5rem" }, children: "All" })] }), filterColumnData.map((item) => {
79
74
  var _a;
80
- return ((0, jsx_runtime_1.jsxs)("div", { style: {
75
+ return (_jsxs("div", { style: {
81
76
  cursor: "pointer",
82
77
  display: "flex",
83
78
  alignItems: "center",
84
- }, onClick: () => handleSelect(item, columnKey), children: [(0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: (_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _a === void 0 ? void 0 : _a.includes(item), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }), (0, jsx_runtime_1.jsx)("span", { style: { marginLeft: "0.5rem" }, children: (0, commonService_1.formatValue)(item, columnType, locale, formatOptions) })] }, item));
85
- })] }))] })), isOpen && ((0, jsx_runtime_1.jsx)(textFilterDropdown_1.default, { combined: true, columnIndex: columnIndex, headerDropdownIndex: headerDropdownIndex || 1001, searchOptions: searchOptions, position: position
79
+ }, onClick: () => handleSelect(item, columnKey), children: [_jsx(Checkbox, { selected: (_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _a === void 0 ? void 0 : _a.includes(item), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }), _jsx("span", { style: { marginLeft: "0.5rem" }, children: formatValue(item, columnType, locale, formatOptions) })] }, item));
80
+ })] }))] })), isOpen && (_jsx(TextFilterDropdown, { combined: true, columnIndex: columnIndex, headerDropdownIndex: headerDropdownIndex || 1001, searchOptions: searchOptions, position: position
86
81
  ? {
87
82
  top: position.top,
88
83
  left: ((_c = headerDropdown === null || headerDropdown === void 0 ? void 0 : headerDropdown.current) === null || _c === void 0 ? void 0 : _c.clientWidth)
@@ -91,4 +86,4 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
91
86
  }
92
87
  : { top: 0, left: 0 }, columnKey: columnKey, searchElement: searchElement, activeSearchType: activeSearchType, searchable: searchable }))] }));
93
88
  };
94
- exports.default = GridFilterDropdown;
89
+ export default GridFilterDropdown;