@megha-ui/react 1.2.416 → 1.2.418

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.
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
13
  import { useState, useEffect, useRef, useMemo, } from "react";
3
14
  import * as XLSX from "xlsx";
@@ -135,8 +146,6 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
135
146
  return filterValue.includes(cellValue);
136
147
  })
137
148
  : true);
138
- console.log(searchQueries, "searchQueries");
139
- console.log(filterColumns);
140
149
  _filteredData = _filteredData.filter((item) => searchOp === "and"
141
150
  ? filterColumns.every((column) => {
142
151
  var _a, _b, _c;
@@ -149,7 +158,6 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
149
158
  const regex = createRegexFromWildcard(query);
150
159
  return regex.test(value);
151
160
  }
152
- console.log({ query, value, column, searchQueries });
153
161
  switch ((_c = searchQueries[column.key]) === null || _c === void 0 ? void 0 : _c.type) {
154
162
  case "contains":
155
163
  return value.toLowerCase().includes(query.toLowerCase());
@@ -233,7 +241,7 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
233
241
  case "doesNotContain":
234
242
  return !value.toLowerCase().includes(query.toLowerCase());
235
243
  case "equals":
236
- return !queryData.includes(value.toLowerCase());
244
+ return queryData.includes(value.toLowerCase());
237
245
  case "gt":
238
246
  if (!isNaN(parseFloat(query))) {
239
247
  return parseFloat(value) > parseFloat(query);
@@ -344,6 +352,8 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
344
352
  fixedFilterValues,
345
353
  hideDuplicates,
346
354
  actionsKey,
355
+ fixedColumns,
356
+ searchOp,
347
357
  ]);
348
358
  const recalculate = (_summariseKeys) => {
349
359
  const filteredData = paginate ? paginatedData : sortedData;
@@ -795,8 +805,8 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
795
805
  const handleSearch = (key, value, type) => {
796
806
  setSearchQueries((prev) => (Object.assign(Object.assign({}, prev), { [key]: { text: value, type, operation: "and" } })));
797
807
  setUniqueSearch((prev) => {
798
- delete prev[key];
799
- return prev;
808
+ const _a = prev, _b = key, _removed = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
809
+ return rest;
800
810
  });
801
811
  };
802
812
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.416",
3
+ "version": "1.2.418",
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",