@megha-ui/react 1.3.106 → 1.3.108

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.
@@ -404,7 +404,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
404
404
  const _groupedKeys = groupedKeys.length > 0
405
405
  ? groupedKeys
406
406
  : [{ groupedKey: "", groupedValue: columnKey }];
407
- console.log("Using grouped keys:", _groupedKeys);
408
407
  _groupedKeys.forEach((grouped) => {
409
408
  const { groupedKey, groupedValue } = grouped;
410
409
  const filterValue = _groupedKeys.length > 1 ? groupedValue : "";
@@ -408,6 +408,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
408
408
  let searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
409
409
  defaultSearchOperation ||
410
410
  "contains";
411
+ console.log({ input });
411
412
  if (input.includes("to")) {
412
413
  searchType = "between";
413
414
  }
@@ -694,16 +695,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
694
695
  }, onChange: (e) => {
695
696
  var _a, _b;
696
697
  const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
697
- const input = e.target.value;
698
- const searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
699
- defaultSearchOperation ||
700
- "contains";
701
- onSearch(currentKey, input, searchType);
702
- }, onBlur: (e) => {
703
- var _a, _b;
704
- const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
705
- const raw = e.target.value;
706
- const input = raw.replace(/\?/g, "%");
698
+ const input = e.target.value.replace(/\?/g, "%");
707
699
  let searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
708
700
  defaultSearchOperation ||
709
701
  "contains";
@@ -724,8 +716,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
724
716
  else if (!startsWithPercent && endsWithPercent) {
725
717
  searchType = "startsWith";
726
718
  }
727
- else if (startsWithPercent &&
728
- !endsWithPercent) {
719
+ else if (startsWithPercent && !endsWithPercent) {
729
720
  searchType = "endsWith";
730
721
  }
731
722
  }
@@ -837,13 +828,6 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
837
828
  : (column === null || column === void 0 ? void 0 : column.dataType) === "date"
838
829
  ? dateTypeSearch.includes(item.value)
839
830
  : textTypeSearch.includes(item.value));
840
- console.log(colSearchOptions.find((item) => {
841
- var _a, _b;
842
- return item.value ===
843
- (((_b = searchQueries[(_a = column === null || column === void 0 ? void 0 : column.key) !== null && _a !== void 0 ? _a : ""]) === null || _b === void 0 ? void 0 : _b.type) ||
844
- defaultSearchOperation ||
845
- "contains");
846
- }));
847
831
  return (_jsx("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} column index-${column.key}`, style: Object.assign(Object.assign({}, cellStyle), { padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", wordBreak: widthMode === "auto" ? "break-all" : "unset", backgroundColor: "var(--row-header-bg)", borderTop: headerTopBorder, borderBottom: headerBottomBorder, flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, position: "sticky", top: 0, zIndex: 1 }), onMouseMove: (e) => handleMouseMove(e), onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: !actionsKey.split(",").includes(column.key) && (_jsxs(_Fragment, { children: [resizable && (_jsx("div", { style: {
848
832
  position: "absolute",
849
833
  width: "1px",
@@ -1115,19 +1099,10 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
1115
1099
  alignItems: "center",
1116
1100
  }, children: [_jsx(TextInput, { onFocus: () => setActiveSearchColumn(column.key), onChange: (e) => {
1117
1101
  var _a;
1118
- const input = e.target.value;
1119
- const searchType = ((_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.type) ||
1120
- defaultSearchOperation ||
1121
- "contains";
1122
- onSearch(column.key, input, searchType);
1123
- }, onBlur: (e) => {
1124
- var _a;
1125
- const raw = e.target.value;
1126
- const input = raw.replace(/\?/g, "%");
1102
+ const input = e.target.value.replace(/\?/g, "%");
1127
1103
  let searchType = ((_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.type) ||
1128
1104
  defaultSearchOperation ||
1129
1105
  "contains";
1130
- console.log({ input });
1131
1106
  if (input.includes("to")) {
1132
1107
  searchType = "between";
1133
1108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.106",
3
+ "version": "1.3.108",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",