impact-ui 4.0.1-alpha.7 → 4.0.1-alpha.9

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,4 +1,4 @@
1
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : {};
2
2
  function getDefaultExportFromCjs(x) {
3
3
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
4
  }
@@ -1,4 +1,4 @@
1
- var reactIs = { exports: {} };
1
+ var dist = {};
2
2
  export {
3
- reactIs as __module
3
+ dist as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var dist = {};
1
+ var callBind = { exports: {} };
2
2
  export {
3
- dist as __exports
3
+ callBind as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var callBind = { exports: {} };
1
+ var isSymbol = { exports: {} };
2
2
  export {
3
- callBind as __module
3
+ isSymbol as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var isSymbol = { exports: {} };
1
+ var reactIs = { exports: {} };
2
2
  export {
3
- isSymbol as __module
3
+ reactIs as __module
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AgGridHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Table/AgGridHeader.tsx"],"names":[],"mappings":"AAwBA,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,oBAA2B,EAC3B,GAAG,IAAI,EACR;;;;;;;;;;CAAA,kDA04BA;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"AgGridHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Table/AgGridHeader.tsx"],"names":[],"mappings":"AAwBA,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,oBAA2B,EAC3B,GAAG,IAAI,EACR;;;;;;;;;;CAAA,kDAm5BA;AAED,eAAe,YAAY,CAAC"}
@@ -174,23 +174,27 @@ function AgGridHeader({
174
174
  }, []);
175
175
  const prevSearchValueRef = useRef(void 0);
176
176
  const handleSearchChange = (value) => {
177
- var _a2;
177
+ var _a2, _b2, _c2, _d2, _e2;
178
178
  const isEmptyValue = (val) => val === null || val === void 0 || val === "" || Array.isArray(val) && val.length === 0;
179
179
  const normalizedValue = isEmptyValue(value) ? null : value;
180
180
  const normalizedPrev = isEmptyValue(prevSearchValueRef.current) ? null : prevSearchValueRef.current;
181
181
  const currentValue = typeof normalizedValue === "object" && normalizedValue !== null ? JSON.stringify(normalizedValue) : normalizedValue;
182
182
  const prevValue = typeof normalizedPrev === "object" && normalizedPrev !== null ? JSON.stringify(normalizedPrev) : normalizedPrev;
183
183
  if (currentValue === prevValue) {
184
- return;
184
+ const colId = (_a2 = rest.column) == null ? void 0 : _a2.colId;
185
+ const hasExistingFilter = Boolean(colId && ((_d2 = (_c2 = (_b2 = rest.api) == null ? void 0 : _b2.getFilterModel) == null ? void 0 : _c2.call(_b2)) == null ? void 0 : _d2[colId]));
186
+ if (!(normalizedValue === null && hasExistingFilter)) {
187
+ return;
188
+ }
185
189
  }
186
190
  prevSearchValueRef.current = value;
187
191
  if (handleInlineSearch) {
188
192
  handleInlineSearch == null ? void 0 : handleInlineSearch(value);
189
- (_a2 = rest.onFilterChanged) == null ? void 0 : _a2.call(rest, rest);
193
+ (_e2 = rest.onFilterChanged) == null ? void 0 : _e2.call(rest, rest);
190
194
  return;
191
195
  }
192
196
  setTimeout(() => {
193
- var _a3, _b2, _c2, _d2;
197
+ var _a3, _b3, _c3, _d3;
194
198
  try {
195
199
  const { inputValue, filterType } = parseSearchValue(value);
196
200
  applyFilterToGrid(inputValue, filterType);
@@ -204,8 +208,8 @@ function AgGridHeader({
204
208
  rest.setInitialFilters,
205
209
  getOptionFromDropdownValue
206
210
  );
207
- (_c2 = (_b2 = rest.api) == null ? void 0 : _b2.onFilterChanged) == null ? void 0 : _c2.call(_b2);
208
- (_d2 = rest.onFilterChanged) == null ? void 0 : _d2.call(rest, rest);
211
+ (_c3 = (_b3 = rest.api) == null ? void 0 : _b3.onFilterChanged) == null ? void 0 : _c3.call(_b3);
212
+ (_d3 = rest.onFilterChanged) == null ? void 0 : _d3.call(rest, rest);
209
213
  } catch (error) {
210
214
  console.warn("Error during filter operation:", error);
211
215
  }