impact-nova 0.1.10 → 0.1.11

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.
@@ -18,8 +18,6 @@ export interface HeaderSearchInputProps {
18
18
  onSelectSearchChange?: (value: string) => void;
19
19
  onSelectOpen?: () => void;
20
20
  isLoadingSelect?: boolean;
21
- enableSpaceSplitting?: boolean;
22
- enableBooleanParsing?: boolean;
23
21
  }
24
22
  /**
25
23
  * HeaderSearchInput - A single instance input for column filtering.
@@ -27,5 +25,5 @@ export interface HeaderSearchInputProps {
27
25
  * ZERO HOOKS SYNC: This component reads its state directly from AG Grid on mount.
28
26
  * It does not use useEffect to sync with external state, as the Grid API is the source of truth.
29
27
  */
30
- export declare const HeaderSearchInput: ({ column, api, onClose, handleInlineSearch, handleClearSearchInline, onAdvanceSearchClick, toggleAdvanceSearch, advanceSearchEnabled, selectOptions, isMultiSelect, onSelectScrollToBottom, onSelectSearchChange, onSelectOpen, isLoadingSelect, enableSpaceSplitting, enableBooleanParsing, }: HeaderSearchInputProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const HeaderSearchInput: ({ column, api, onClose, handleInlineSearch, handleClearSearchInline, onAdvanceSearchClick, toggleAdvanceSearch, advanceSearchEnabled, selectOptions, isMultiSelect, onSelectScrollToBottom, onSelectSearchChange, onSelectOpen, isLoadingSelect, }: HeaderSearchInputProps) => import("react/jsx-runtime").JSX.Element;
31
29
  export default HeaderSearchInput;
@@ -1,16 +1,16 @@
1
1
  import { jsxs as y, jsx as i } from "react/jsx-runtime";
2
- import { useRef as se, useState as I, useEffect as ae, useCallback as Ae } from "react";
3
- import { Filter as Se } from "lucide-react";
4
- import { cn as we } from "../../../../lib/utils.js";
5
- import { DatePicker as ce } from "../../date-picker/date-picker.js";
6
- import { Input as de } from "../../input.js";
7
- import fe from "../../select/select.js";
8
- import { Popover as Ie, PopoverTrigger as Pe, PopoverContent as qe, PopoverHeader as ze, PopoverTitle as Be, PopoverBody as Ee } from "../../popover.js";
9
- import { Cross as ue } from "../../../../icons/index.js";
10
- import { useGridHeader as He } from "./context/grid-header-context.js";
11
- import { getMultiFilterIndices as C, getDisplayStringFromFilterModel as P, parseInputPattern as Re } from "./utils/filter-utils.js";
12
- import { deserializeDate as M, serializeDate as he } from "./utils/date-utils.js";
13
- const ke = {
2
+ import { useRef as Ce, useState as I, useEffect as Te, useCallback as be } from "react";
3
+ import { Filter as De } from "lucide-react";
4
+ import { cn as Ne } from "../../../../lib/utils.js";
5
+ import { DatePicker as oe } from "../../date-picker/date-picker.js";
6
+ import { Input as ie } from "../../input.js";
7
+ import se from "../../select/select.js";
8
+ import { Popover as Ae, PopoverTrigger as Se, PopoverContent as we, PopoverHeader as Ie, PopoverTitle as Pe, PopoverBody as qe } from "../../popover.js";
9
+ import { Cross as ae } from "../../../../icons/index.js";
10
+ import { useGridHeader as ze } from "./context/grid-header-context.js";
11
+ import { getMultiFilterIndices as C, getDisplayStringFromFilterModel as P, parseInputPattern as Be } from "./utils/filter-utils.js";
12
+ import { deserializeDate as M, serializeDate as ce } from "./utils/date-utils.js";
13
+ const Ee = {
14
14
  contains: "contains",
15
15
  notContains: "notContains",
16
16
  equals: "equals",
@@ -24,7 +24,7 @@ const ke = {
24
24
  inRange: "inRange",
25
25
  empty: "blank",
26
26
  notEmpty: "notBlank"
27
- }, Ze = ({
27
+ }, Ue = ({
28
28
  column: D,
29
29
  api: d,
30
30
  onClose: W,
@@ -32,17 +32,15 @@ const ke = {
32
32
  handleClearSearchInline: G,
33
33
  onAdvanceSearchClick: L,
34
34
  toggleAdvanceSearch: _,
35
- advanceSearchEnabled: me = !1,
35
+ advanceSearchEnabled: de = !1,
36
36
  selectOptions: q,
37
37
  isMultiSelect: v,
38
- onSelectScrollToBottom: pe,
39
- onSelectSearchChange: ge,
38
+ onSelectScrollToBottom: fe,
39
+ onSelectSearchChange: ue,
40
40
  onSelectOpen: V,
41
- isLoadingSelect: J,
42
- enableSpaceSplitting: xe = !1,
43
- enableBooleanParsing: ye = !1
41
+ isLoadingSelect: J
44
42
  }) => {
45
- const c = D.getColDef(), o = D.getColId(), z = c?.filter || "agTextColumnFilter", p = z === "agDateColumnFilter", B = z === "agSetColumnFilter" || q && q.length > 0 || c?.cellDataType === "boolean", K = He(), E = se(null), Q = se(!1), [H, R] = I(() => {
43
+ const c = D.getColDef(), o = D.getColId(), z = c?.filter || "agTextColumnFilter", p = z === "agDateColumnFilter", B = z === "agSetColumnFilter" || q && q.length > 0 || c?.cellDataType === "boolean", K = ze(), E = Ce(null), [H, k] = I(() => {
46
44
  const t = d.getFilterModel()[o];
47
45
  if (!t) return "";
48
46
  if (t.filterType === "multi" && t.filterModels) {
@@ -54,11 +52,7 @@ const ke = {
54
52
  return "";
55
53
  }
56
54
  return p ? "" : P(o, t);
57
- }), [U, u] = I(!1);
58
- ae(() => {
59
- Q.current = U;
60
- }, [U]);
61
- const [X, k] = I(() => {
55
+ }), [he, u] = I(!1), [Q, R] = I(() => {
62
56
  const t = d.getFilterModel()[o];
63
57
  if (t) {
64
58
  if (t.filterType === "multi" && t.filterModels) {
@@ -78,7 +72,7 @@ const ke = {
78
72
  }
79
73
  return null;
80
74
  });
81
- ae(() => {
75
+ Te(() => {
82
76
  const e = () => {
83
77
  const l = d.getFilterModel()[o];
84
78
  let r = "";
@@ -90,7 +84,7 @@ const ke = {
90
84
  r = f ? P(o, f) : "";
91
85
  }
92
86
  } else p || (r = P(o, l));
93
- Q.current || R((n) => n !== r ? r : n);
87
+ he || k((n) => n !== r ? r : n);
94
88
  let m = null;
95
89
  if (l)
96
90
  if (l.filterType === "multi" && l.filterModels) {
@@ -100,30 +94,30 @@ const ke = {
100
94
  a && (m = a.dateFrom ? M(a.dateFrom) : a.filter ? M(a.filter) : null);
101
95
  }
102
96
  } else p && (m = l.dateFrom ? M(l.dateFrom) : l.filter ? M(l.filter) : null);
103
- k((n) => n?.getTime() !== m?.getTime() ? m : n);
97
+ R((n) => n?.getTime() !== m?.getTime() ? m : n);
104
98
  };
105
99
  return d.addEventListener("filterChanged", e), () => {
106
100
  d.removeEventListener("filterChanged", e);
107
101
  };
108
102
  }, [d, o, p]);
109
- const Y = (e, t) => {
103
+ const U = (e, t) => {
110
104
  const r = { ...d.getFilterModel() }, m = (n, a) => {
111
- const f = Re(n, xe, ye);
105
+ const f = Be(n);
112
106
  if (console.log("[HeaderSearchInput] Pattern Debug:", {
113
107
  input: n,
114
108
  filterType: a,
115
109
  parsed: f
116
110
  }), f.conditions.length === 0) return null;
117
111
  const b = (s) => {
118
- let F = ke[s.operator] || "contains";
112
+ let F = Ee[s.operator] || "contains";
119
113
  if (a === "number") {
120
- const ie = parseFloat(s.value);
114
+ const ne = parseFloat(s.value);
121
115
  return ["contains", "notContains", "startsWith", "endsWith"].includes(F) && (F = F === "notContains" ? "notEqual" : "equals"), s.operator === "inRange" ? {
122
116
  type: F,
123
117
  filter: parseFloat(s.value) || 0,
124
118
  filterTo: parseFloat(s.valueTo || "") || 0,
125
119
  filterType: "number"
126
- } : isNaN(ie) ? null : { type: F, filter: ie, filterType: "number" };
120
+ } : isNaN(ne) ? null : { type: F, filter: ne, filterType: "number" };
127
121
  }
128
122
  return {
129
123
  type: F,
@@ -154,7 +148,7 @@ const ke = {
154
148
  if (t === "set")
155
149
  h = { values: Array.isArray(e) ? e : [String(e)], filterType: "set" };
156
150
  else if (t === "date") {
157
- const s = e instanceof Date ? he(e) : null;
151
+ const s = e instanceof Date ? ce(e) : null;
158
152
  h = s ? { type: "equals", dateFrom: s, filterType: "date" } : null;
159
153
  } else {
160
154
  const s = n.text !== -1 ? "text" : "number";
@@ -164,7 +158,7 @@ const ke = {
164
158
  } else if (e === null || e === "" || Array.isArray(e) && e.length === 0)
165
159
  delete r[o];
166
160
  else if (t === "date") {
167
- const n = e instanceof Date ? he(e) : null;
161
+ const n = e instanceof Date ? ce(e) : null;
168
162
  r[o] = n ? { type: "equals", dateFrom: n, filterType: "date" } : null;
169
163
  } else if (t === "set")
170
164
  r[o] = { filterType: "set", values: Array.isArray(e) ? e : [String(e)] };
@@ -181,17 +175,17 @@ const ke = {
181
175
  j(Array.isArray(e) ? e.join(",") : e);
182
176
  return;
183
177
  }
184
- Y(e, p ? "date" : "text");
185
- }, Z = (e) => {
178
+ U(e, p ? "date" : "text");
179
+ }, X = (e) => {
186
180
  const t = e.target.value;
187
- R(t), O(t);
188
- }, $ = (e) => {
189
- k(e), O(e);
190
- }, Fe = () => {
191
- R(""), k(null), O(""), G && G();
181
+ k(t), O(t);
182
+ }, Y = (e) => {
183
+ R(e), O(e);
184
+ }, me = () => {
185
+ k(""), R(null), O(""), G && G();
192
186
  }, A = (e) => {
193
- Y(e, "set");
194
- }, S = q || (c?.cellDataType === "boolean" ? [{ label: "True", value: "true" }, { label: "False", value: "false" }] : []), ee = Ae(() => {
187
+ U(e, "set");
188
+ }, S = q || (c?.cellDataType === "boolean" ? [{ label: "True", value: "true" }, { label: "False", value: "false" }] : []), Z = be(() => {
195
189
  const e = d.getFilterModel()[o];
196
190
  if (!e) return [];
197
191
  if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
@@ -207,19 +201,19 @@ const ke = {
207
201
  return [String(e.filter)];
208
202
  }
209
203
  return [];
210
- }, [d, o, D]), [w, N] = I(null), te = () => {
211
- const e = w !== null ? w : ee();
204
+ }, [d, o, D]), [w, N] = I(null), $ = () => {
205
+ const e = w !== null ? w : Z();
212
206
  return v ? S.filter((t) => e.includes(t.value)) : S.find((t) => e.includes(t.value)) || null;
213
- }, le = (e) => {
207
+ }, ee = (e) => {
214
208
  let t = [];
215
209
  if (Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !v) {
216
210
  A(t), e && W();
217
211
  return;
218
212
  }
219
213
  N(t);
220
- }, Me = () => {
214
+ }, pe = () => {
221
215
  A([]), N([]);
222
- }, ve = (e) => {
216
+ }, ge = (e) => {
223
217
  if (v) {
224
218
  if (e !== void 0) {
225
219
  let t = [];
@@ -228,24 +222,24 @@ const ke = {
228
222
  }
229
223
  w !== null && (A(w), N(null));
230
224
  }
231
- }, Ce = () => {
232
- N(ee()), V && V();
233
- }, Te = () => me ? /* @__PURE__ */ i("svg", { className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6] shrink-0", fill: "currentColor", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", onClick: (e) => {
225
+ }, xe = () => {
226
+ N(Z()), V && V();
227
+ }, ye = () => de ? /* @__PURE__ */ i("svg", { className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6] shrink-0", fill: "currentColor", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", onClick: (e) => {
234
228
  e.stopPropagation(), E.current && E.current.blur(), L ? L(D) : _ ? _(o) : K && K.openAdvancedFilter(o);
235
- }, children: /* @__PURE__ */ i("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, be = () => /* @__PURE__ */ i("button", { onClick: W, className: "cursor-pointer shrink-0 text-[#4259ee] hover:text-[#0f1c76]", children: /* @__PURE__ */ i(ue, { size: 12 }) }), T = c.filter === "agMultiColumnFilter", g = C(c);
229
+ }, children: /* @__PURE__ */ i("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, Fe = () => /* @__PURE__ */ i("button", { onClick: W, className: "cursor-pointer shrink-0 text-[#4259ee] hover:text-[#0f1c76]", children: /* @__PURE__ */ i(ae, { size: 12 }) }), T = c.filter === "agMultiColumnFilter", g = C(c);
236
230
  let x = "text";
237
231
  T ? x = g.set !== -1 ? "set" : g.date !== -1 ? "date" : "text" : B ? x = "set" : p && (x = "date");
238
- const De = T ? g.text !== -1 || g.number !== -1 : !p && !B, re = T ? g.set !== -1 : B, ne = T ? g.date !== -1 : p, Ne = d.getFilterModel()[o], oe = T && Ne?.filterModels?.some((e, t) => {
232
+ const Me = T ? g.text !== -1 || g.number !== -1 : !p && !B, te = T ? g.set !== -1 : B, le = T ? g.date !== -1 : p, ve = d.getFilterModel()[o], re = T && ve?.filterModels?.some((e, t) => {
239
233
  const l = t === g.text || t === g.number ? "text" : t === g.set ? "set" : "date";
240
234
  return e !== null && l !== x;
241
235
  });
242
236
  return /* @__PURE__ */ y("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-[#eceefd] px-1 py-2 ag-header-cell-search-active h-full", children: [
243
- x === "set" && re ? /* @__PURE__ */ i(
244
- fe,
237
+ x === "set" && te ? /* @__PURE__ */ i(
238
+ se,
245
239
  {
246
240
  options: S,
247
- value: te(),
248
- onChange: le,
241
+ value: $(),
242
+ onChange: ee,
249
243
  isMulti: v !== void 0 ? v : c?.cellDataType !== "boolean",
250
244
  placeholder: "Select...",
251
245
  className: "w-full bg-white",
@@ -253,20 +247,20 @@ const ke = {
253
247
  menuWidth: "200px",
254
248
  menuPortalTarget: document.body,
255
249
  autoFocus: !0,
256
- onMenuOpen: Ce,
257
- onMenuClose: ve,
258
- onMenuScrollToBottom: pe,
259
- onInputChange: ge,
260
- onClearAll: Me,
250
+ onMenuOpen: xe,
251
+ onMenuClose: ge,
252
+ onMenuScrollToBottom: fe,
253
+ onInputChange: ue,
254
+ onClearAll: pe,
261
255
  isLoading: J,
262
256
  onFocus: () => u(!0),
263
257
  onBlur: () => u(!1)
264
258
  }
265
- ) : x === "date" && ne ? /* @__PURE__ */ i(
266
- ce,
259
+ ) : x === "date" && le ? /* @__PURE__ */ i(
260
+ oe,
267
261
  {
268
- value: X || void 0,
269
- onChange: (e) => $(e || null),
262
+ value: Q || void 0,
263
+ onChange: (e) => Y(e || null),
270
264
  placeholder: "Select Date",
271
265
  format: "MM-dd-yyyy",
272
266
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
@@ -276,10 +270,10 @@ const ke = {
276
270
  onBlur: () => u(!1)
277
271
  }
278
272
  ) : /* @__PURE__ */ i(
279
- de,
273
+ ie,
280
274
  {
281
275
  value: H,
282
- onChange: Z,
276
+ onChange: X,
283
277
  placeholder: "Search",
284
278
  type: "text",
285
279
  className: "flex-1 bg-white",
@@ -288,26 +282,26 @@ const ke = {
288
282
  onFocus: () => u(!0),
289
283
  onBlur: () => u(!1),
290
284
  suffix: H && /* @__PURE__ */ i("button", { onClick: (e) => {
291
- e.stopPropagation(), Fe();
292
- }, className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6]", children: /* @__PURE__ */ i(ue, { size: 10 }) })
285
+ e.stopPropagation(), me();
286
+ }, className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6]", children: /* @__PURE__ */ i(ae, { size: 10 }) })
293
287
  }
294
288
  ),
295
289
  /* @__PURE__ */ y("div", { className: "flex items-center gap-1.5 shrink-0", children: [
296
- T && /* @__PURE__ */ y(Ie, { children: [
297
- /* @__PURE__ */ i(Pe, { asChild: !0, children: /* @__PURE__ */ y("div", { className: "relative group p-1 hover:bg-[#dbe0fb] rounded-md transition-colors cursor-pointer", children: [
298
- /* @__PURE__ */ i(Se, { size: 16, className: we("text-[#60697D] group-hover:text-[#3649C6]", oe && "text-[#3649C6]") }),
299
- oe && /* @__PURE__ */ i("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-[#4259ee] border border-white shadow-sm" })
290
+ T && /* @__PURE__ */ y(Ae, { children: [
291
+ /* @__PURE__ */ i(Se, { asChild: !0, children: /* @__PURE__ */ y("div", { className: "relative group p-1 hover:bg-[#dbe0fb] rounded-md transition-colors cursor-pointer", children: [
292
+ /* @__PURE__ */ i(De, { size: 16, className: Ne("text-[#60697D] group-hover:text-[#3649C6]", re && "text-[#3649C6]") }),
293
+ re && /* @__PURE__ */ i("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-[#4259ee] border border-white shadow-sm" })
300
294
  ] }) }),
301
- /* @__PURE__ */ y(qe, { align: "end", className: "w-[300px]", children: [
302
- /* @__PURE__ */ i(ze, { children: /* @__PURE__ */ i(Be, { children: "Active Filters" }) }),
303
- /* @__PURE__ */ y(Ee, { className: "flex flex-col gap-4", children: [
304
- x !== "text" && De && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
295
+ /* @__PURE__ */ y(we, { align: "end", className: "w-[300px]", children: [
296
+ /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(Pe, { children: "Active Filters" }) }),
297
+ /* @__PURE__ */ y(qe, { className: "flex flex-col gap-4", children: [
298
+ x !== "text" && Me && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
305
299
  /* @__PURE__ */ i("span", { className: "text-xs font-semibold text-[#60697D]", children: "Text Search" }),
306
300
  /* @__PURE__ */ i(
307
- de,
301
+ ie,
308
302
  {
309
303
  value: H,
310
- onChange: Z,
304
+ onChange: X,
311
305
  placeholder: "Search...",
312
306
  className: "bg-white",
313
307
  onFocus: () => u(!0),
@@ -315,14 +309,14 @@ const ke = {
315
309
  }
316
310
  )
317
311
  ] }),
318
- x !== "set" && re && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
312
+ x !== "set" && te && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
319
313
  /* @__PURE__ */ i("span", { className: "text-xs font-semibold text-[#60697D]", children: "Selection Filter" }),
320
314
  /* @__PURE__ */ i(
321
- fe,
315
+ se,
322
316
  {
323
317
  options: S,
324
- value: te(),
325
- onChange: le,
318
+ value: $(),
319
+ onChange: ee,
326
320
  isMulti: v !== void 0 ? v : c?.cellDataType !== "boolean",
327
321
  placeholder: "Select...",
328
322
  className: "w-full bg-white",
@@ -332,13 +326,13 @@ const ke = {
332
326
  }
333
327
  )
334
328
  ] }),
335
- x !== "date" && ne && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
329
+ x !== "date" && le && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
336
330
  /* @__PURE__ */ i("span", { className: "text-xs font-semibold text-[#60697D]", children: "Date Filter" }),
337
331
  /* @__PURE__ */ i(
338
- ce,
332
+ oe,
339
333
  {
340
- value: X || void 0,
341
- onChange: (e) => $(e || null),
334
+ value: Q || void 0,
335
+ onChange: (e) => Y(e || null),
342
336
  className: "w-full bg-white",
343
337
  onFocus: () => u(!0),
344
338
  onBlur: () => u(!1)
@@ -348,11 +342,11 @@ const ke = {
348
342
  ] })
349
343
  ] })
350
344
  ] }),
351
- Te(),
352
- be()
345
+ ye(),
346
+ Fe()
353
347
  ] })
354
348
  ] });
355
349
  };
356
350
  export {
357
- Ze as HeaderSearchInput
351
+ Ue as HeaderSearchInput
358
352
  };
@@ -42,12 +42,9 @@ export declare function getMultiFilterIndices(colDef: ColDef | undefined): {
42
42
  * - Multiple patterns with AND: `fo+ au` or `fo +au` (plus separated)
43
43
  * - Match all: `*` alone
44
44
  *
45
- * @param input - The search input string
46
- * @param enableSpaceSplitting - If true, spaces split terms into multiple OR conditions. If false (default), preserves phrases like "Pratik Kumar"
47
- * @param enableBooleanParsing - If true, boolean keywords parsed globally (e.g., "yes" → true). If false (default), only with '=' prefix (e.g., "=yes" → true)
48
45
  * @returns ParsedInput with conditions array and logic
49
46
  */
50
- export declare function parseInputPattern(input: string, enableSpaceSplitting?: boolean, enableBooleanParsing?: boolean): ParsedInput;
47
+ export declare function parseInputPattern(input: string): ParsedInput;
51
48
  /**
52
49
  * Convert ParsedInput to AdvancedFilterRule array for a specific column.
53
50
  * Used to sync inline search input with the advanced filter modal.
@@ -1,5 +1,5 @@
1
1
  import { getTodayStr as R, getYesterdayStr as b, getMonthRange as S, getYearRange as W } from "./date-utils.js";
2
- const T = {
2
+ const E = {
3
3
  yes: !0,
4
4
  true: !0,
5
5
  "[x]": !0,
@@ -11,7 +11,7 @@ const T = {
11
11
  "[ ]": !1,
12
12
  inactive: !1,
13
13
  disabled: !1
14
- }, C = {
14
+ }, $ = {
15
15
  jan: 1,
16
16
  january: 1,
17
17
  feb: 2,
@@ -36,20 +36,20 @@ const T = {
36
36
  dec: 12,
37
37
  december: 12
38
38
  };
39
- function w(n) {
40
- const e = n?.filterParams?.filters || [];
39
+ function I(n) {
40
+ const t = n?.filterParams?.filters || [];
41
41
  return {
42
- text: e.findIndex((t) => (typeof t == "string" ? t : t.filter) === "agTextColumnFilter"),
43
- number: e.findIndex((t) => (typeof t == "string" ? t : t.filter) === "agNumberColumnFilter"),
44
- set: e.findIndex((t) => (typeof t == "string" ? t : t.filter) === "agSetColumnFilter"),
45
- date: e.findIndex((t) => (typeof t == "string" ? t : t.filter) === "agDateColumnFilter")
42
+ text: t.findIndex((r) => (typeof r == "string" ? r : r.filter) === "agTextColumnFilter"),
43
+ number: t.findIndex((r) => (typeof r == "string" ? r : r.filter) === "agNumberColumnFilter"),
44
+ set: t.findIndex((r) => (typeof r == "string" ? r : r.filter) === "agSetColumnFilter"),
45
+ date: t.findIndex((r) => (typeof r == "string" ? r : r.filter) === "agDateColumnFilter")
46
46
  };
47
47
  }
48
48
  function p(n) {
49
- const e = n.toLowerCase().trim();
50
- return e === "today" ? R() : e === "yesterday" ? b() : n;
49
+ const t = n.toLowerCase().trim();
50
+ return t === "today" ? R() : t === "yesterday" ? b() : n;
51
51
  }
52
- function v(n, e = !1) {
52
+ function T(n) {
53
53
  const t = n.trim();
54
54
  if (!t)
55
55
  return { operator: "contains", value: "" };
@@ -59,10 +59,8 @@ function v(n, e = !1) {
59
59
  return { operator: "notEqual", value: p(t.slice(2)) };
60
60
  if (t.startsWith("=="))
61
61
  return { operator: "equals", value: p(t.slice(2)) };
62
- if (t.startsWith("=")) {
63
- const r = t.slice(1).trim(), l = r.toLowerCase();
64
- return T[l] !== void 0 ? { operator: "equals", value: String(T[l]) } : { operator: "equals", value: p(r) };
65
- }
62
+ if (t.startsWith("="))
63
+ return { operator: "equals", value: p(t.slice(1)) };
66
64
  if (t.startsWith("!"))
67
65
  return { operator: "notContains", value: p(t.slice(1)) };
68
66
  if (t.startsWith(">="))
@@ -77,99 +75,97 @@ function v(n, e = !1) {
77
75
  return { operator: "endsWith", value: t.slice(1).trim() };
78
76
  if (t.endsWith("*") && t.length > 1 && !t.startsWith("*"))
79
77
  return { operator: "startsWith", value: t.slice(0, -1).trim() };
80
- const a = t.match(/^(\d+(?:\.\d+)?)\s*-\s*(\d+(?:\.\d+)?)$/);
81
- if (a)
82
- return { operator: "inRange", value: a[1], valueTo: a[2] };
83
- const i = t.match(/^(\d{4}-\d{2}-\d{2})\s*-\s*(\d{4}-\d{2}-\d{2})$/);
84
- if (i)
85
- return { operator: "inRange", value: i[1], valueTo: i[2] };
86
- const f = t.toLowerCase();
87
- if (e && T[f] !== void 0)
88
- return { operator: "equals", value: String(T[f]) };
89
- if (f === "today") return { operator: "equals", value: R() };
90
- if (f === "yesterday") return { operator: "equals", value: b() };
78
+ const r = t.match(/^(\d+(?:\.\d+)?)\s*-\s*(\d+(?:\.\d+)?)$/);
79
+ if (r)
80
+ return { operator: "inRange", value: r[1], valueTo: r[2] };
81
+ const o = t.match(/^(\d{4}-\d{2}-\d{2})\s*-\s*(\d{4}-\d{2}-\d{2})$/);
82
+ if (o)
83
+ return { operator: "inRange", value: o[1], valueTo: o[2] };
84
+ const a = t.toLowerCase();
85
+ if (E[a] !== void 0)
86
+ return { operator: "equals", value: String(E[a]) };
87
+ if (a === "today") return { operator: "equals", value: R() };
88
+ if (a === "yesterday") return { operator: "equals", value: b() };
91
89
  if (/^\d{4}$/.test(t)) {
92
- const r = W(Number(t));
93
- return { operator: "inRange", value: r.from, valueTo: r.to };
90
+ const l = W(Number(t));
91
+ return { operator: "inRange", value: l.from, valueTo: l.to };
94
92
  }
95
- const u = t.match(/^([a-zA-Z]+)\s*(\d{4})$/);
96
- if (u) {
97
- const r = C[u[1].toLowerCase()];
98
- if (r) {
99
- const l = S(r, Number(u[2]));
100
- return { operator: "inRange", value: l.from, valueTo: l.to };
93
+ const f = t.match(/^([a-zA-Z]+)\s*(\d{4})$/);
94
+ if (f) {
95
+ const l = $[f[1].toLowerCase()];
96
+ if (l) {
97
+ const e = S(l, Number(f[2]));
98
+ return { operator: "inRange", value: e.from, valueTo: e.to };
101
99
  }
102
100
  }
103
101
  return { operator: "contains", value: t };
104
102
  }
105
- function I(n, e = !1, t = !1) {
103
+ function j(n) {
106
104
  if (!n || n.trim() === "")
107
105
  return { conditions: [], logic: "OR" };
108
- const a = n.trim();
109
- if (a === "*")
106
+ const t = n.trim();
107
+ if (t === "*")
110
108
  return { conditions: [], logic: "OR", matchAll: !0 };
111
- const i = a.includes("+") || a.includes("&"), f = a.includes(",") || a.includes(";");
112
- if (i)
113
- return { conditions: a.split(/\s*[+&]\s*/).filter((o) => !!o.trim()).map((o) => v(o, t)).filter((o) => !!o.value), logic: "AND" };
114
- if (f)
115
- return { conditions: a.split(/\s*[,;]\s*/).filter((o) => !!o.trim()).map((o) => v(o, t)).filter((o) => !!o.value), logic: "OR" };
116
- if (e) {
117
- const r = a.split(/\s+/).filter((l) => !!l.trim());
118
- if (r.length > 1) {
119
- const l = r.map((o) => v(o, t)).filter((o) => !!o.value);
120
- if (l.length > 1)
121
- return { conditions: l, logic: "OR" };
122
- }
109
+ const r = t.includes("+") || t.includes("&"), o = t.includes(",") || t.includes(";");
110
+ if (r)
111
+ return { conditions: t.split(/\s*[+&]\s*/).filter((s) => !!s.trim()).map((s) => T(s)).filter((s) => !!s.value), logic: "AND" };
112
+ if (o)
113
+ return { conditions: t.split(/\s*[,;]\s*/).filter((s) => !!s.trim()).map((s) => T(s)).filter((s) => !!s.value), logic: "OR" };
114
+ const a = t.split(/\s+/).filter((l) => !!l.trim());
115
+ if (a.length > 1) {
116
+ const l = a.map((e) => T(e)).filter((e) => !!e.value);
117
+ if (l.length > 1)
118
+ return { conditions: l, logic: "OR" };
123
119
  }
124
- const u = v(a, t);
125
- return !u.value && u.operator === "contains" ? { conditions: [], logic: "OR" } : { conditions: [u], logic: "OR" };
120
+ const f = T(t);
121
+ return !f.value && f.operator === "contains" ? { conditions: [], logic: "OR" } : { conditions: [f], logic: "OR" };
126
122
  }
127
123
  function m(n) {
128
124
  if (!n) return "";
129
125
  if (Array.isArray(n))
130
- return n.map((e) => m(e)).join(", ");
126
+ return n.map((t) => m(t)).join(", ");
131
127
  if (/^\d{4}-\d{2}-\d{2}/.test(n))
132
128
  try {
133
- const e = new Date(n);
134
- if (!isNaN(e.getTime())) {
135
- const t = String(e.getMonth() + 1).padStart(2, "0"), a = String(e.getDate()).padStart(2, "0");
136
- return `${t}/${a}`;
129
+ const t = new Date(n);
130
+ if (!isNaN(t.getTime())) {
131
+ const r = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0");
132
+ return `${r}/${o}`;
137
133
  }
138
134
  } catch {
139
135
  }
140
136
  return n;
141
137
  }
142
- function $(n) {
143
- const e = m(n.value), t = m(n.valueTo || "");
138
+ function C(n) {
139
+ const t = m(n.value), r = m(n.valueTo || "");
144
140
  switch (n.operator) {
145
141
  case "contains":
146
- return e;
142
+ return t;
147
143
  case "notContains":
148
- return `!${e}`;
144
+ return `!${t}`;
149
145
  case "equals":
150
- return n.columnType === "number" || n.columnType === "date" || n.columnType === "select" ? e : `=${e}`;
146
+ return n.columnType === "number" || n.columnType === "date" || n.columnType === "select" ? t : `=${t}`;
151
147
  case "notEqual":
152
- return `!=${e}`;
148
+ return `!=${t}`;
153
149
  case "startsWith":
154
- return `${e}*`;
150
+ return `${t}*`;
155
151
  case "endsWith":
156
- return `*${e}`;
152
+ return `*${t}`;
157
153
  case "greaterThan":
158
- return `>${e}`;
154
+ return `>${t}`;
159
155
  case "greaterThanOrEqual":
160
- return `≥${e}`;
156
+ return `≥${t}`;
161
157
  case "lessThan":
162
- return `<${e}`;
158
+ return `<${t}`;
163
159
  case "lessThanOrEqual":
164
- return `≤${e}`;
160
+ return `≤${t}`;
165
161
  case "inRange":
166
- return `${e}–${t}`;
162
+ return `${t}–${r}`;
167
163
  case "empty":
168
164
  return "∅";
169
165
  case "notEmpty":
170
166
  return "≠∅";
171
167
  default:
172
- return e;
168
+ return t;
173
169
  }
174
170
  }
175
171
  const M = {
@@ -194,42 +190,42 @@ const M = {
194
190
  lt: "lessThan",
195
191
  lte: "lessThanOrEqual"
196
192
  };
197
- function A(n, e) {
198
- if (!e) return "";
199
- if ("filterType" in e && e.filterType === "multi" && e.filterModels)
200
- return e.filterModels.map((a) => A(n, a)).filter((a) => !!a).join(", ");
201
- if ("filterType" in e && e.filterType === "set" && e.values) {
202
- const i = e.values || [];
203
- return i.length === 0 ? "" : i.length === 1 ? m(i[0]) : `${m(i[0])} (+${i.length - 1})`;
193
+ function A(n, t) {
194
+ if (!t) return "";
195
+ if ("filterType" in t && t.filterType === "multi" && t.filterModels)
196
+ return t.filterModels.map((o) => A(n, o)).filter((o) => !!o).join(", ");
197
+ if ("filterType" in t && t.filterType === "set" && t.values) {
198
+ const a = t.values || [];
199
+ return a.length === 0 ? "" : a.length === 1 ? m(a[0]) : `${m(a[0])} (+${a.length - 1})`;
204
200
  }
205
- if ("conditions" in e && e.conditions && e.operator) {
206
- const a = e.operator === "AND" ? " + " : ", ";
207
- return e.conditions.map((i) => A(n, i)).filter((i) => !!i).join(a);
201
+ if ("conditions" in t && t.conditions && t.operator) {
202
+ const o = t.operator === "AND" ? " + " : ", ";
203
+ return t.conditions.map((a) => A(n, a)).filter((a) => !!a).join(o);
208
204
  }
209
- const t = e;
210
- if ("type" in t && t.type) {
211
- const a = t.type, i = M[a] || a, f = t.filter !== void 0 ? String(t.filter) : t.dateFrom !== void 0 ? String(t.dateFrom) : "", u = t.filterTo !== void 0 ? String(t.filterTo) : t.dateTo !== void 0 ? String(t.dateTo) : void 0;
212
- return $({
213
- operator: i,
205
+ const r = t;
206
+ if ("type" in r && r.type) {
207
+ const o = r.type, a = M[o] || o, f = r.filter !== void 0 ? String(r.filter) : r.dateFrom !== void 0 ? String(r.dateFrom) : "", l = r.filterTo !== void 0 ? String(r.filterTo) : r.dateTo !== void 0 ? String(r.dateTo) : void 0;
208
+ return C({
209
+ operator: a,
214
210
  value: f,
215
- valueTo: u,
211
+ valueTo: l,
216
212
  // Optimization: determine type roughly for '=' vs contains logic
217
- columnType: t.filterType === "number" ? "number" : t.filterType === "date" ? "date" : "text"
213
+ columnType: r.filterType === "number" ? "number" : r.filterType === "date" ? "date" : "text"
218
214
  });
219
215
  }
220
216
  return "";
221
217
  }
222
- function E() {
218
+ function q() {
223
219
  return Math.random().toString(36).substring(2, 11);
224
220
  }
225
- function j(n = "", e) {
226
- const t = e === "number" || e === "date" || e === "select" ? "equals" : "contains";
221
+ function D(n = "", t) {
222
+ const r = t === "number" || t === "date" || t === "select" ? "equals" : "contains";
227
223
  return {
228
- id: E(),
224
+ id: q(),
229
225
  columnId: n,
230
- operator: t,
226
+ operator: r,
231
227
  value: "",
232
- columnType: e
228
+ columnType: t
233
229
  // Store for proper filterType in AG Grid conversion
234
230
  };
235
231
  }
@@ -265,174 +261,174 @@ function h(n) {
265
261
  return "contains";
266
262
  }
267
263
  }
268
- function O(n, e, t) {
269
- return t === "number" ? "number" : t === "date" ? "date" : t === "select" || t === "set" || Array.isArray(e) ? n === "notEqual" || n === "notContains" ? "text" : "set" : typeof e == "string" && /^\d{4}-\d{2}-\d{2}/.test(e) ? "date" : ["greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "inRange"].includes(n) && e && !x(e) && !isNaN(Number(e)) || typeof e == "string" && e && /^-?\d+(\.\d+)?$/.test(e.trim()) ? "number" : "text";
264
+ function O(n, t, r) {
265
+ return r === "number" ? "number" : r === "date" ? "date" : r === "select" || r === "set" || Array.isArray(t) ? n === "notEqual" || n === "notContains" ? "text" : "set" : typeof t == "string" && /^\d{4}-\d{2}-\d{2}/.test(t) ? "date" : ["greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "inRange"].includes(n) && t && !x(t) && !isNaN(Number(t)) || typeof t == "string" && t && /^-?\d+(\.\d+)?$/.test(t.trim()) ? "number" : "text";
270
266
  }
271
267
  function x(n) {
272
268
  return Array.isArray(n);
273
269
  }
274
- function D(n) {
270
+ function w(n) {
275
271
  if (console.log("[AdvancedFilter] convertToAgGridFilterModel input:", n), !n || !n.rules || n.rules.length === 0)
276
272
  return console.log("[AdvancedFilter] No model or empty rules, returning empty"), {};
277
- const e = {}, t = {}, a = (i) => {
278
- "logic" in i ? (i.conditions || []).forEach(a) : i.columnId && (i.value || i.operator === "empty" || i.operator === "notEmpty") && (t[i.columnId] || (t[i.columnId] = []), t[i.columnId].push(i));
273
+ const t = {}, r = {}, o = (a) => {
274
+ "logic" in a ? (a.conditions || []).forEach(o) : a.columnId && (a.value || a.operator === "empty" || a.operator === "notEmpty") && (r[a.columnId] || (r[a.columnId] = []), r[a.columnId].push(a));
279
275
  };
280
- n.rules.forEach(a), console.log("[AdvancedFilter] Rules by column:", t);
281
- for (const [i, f] of Object.entries(t)) {
276
+ n.rules.forEach(o), console.log("[AdvancedFilter] Rules by column:", r);
277
+ for (const [a, f] of Object.entries(r)) {
282
278
  if (f.length === 0) continue;
283
279
  if (f[0].columnType === "multi") {
284
- const r = (s) => s.operator !== "equals" ? !1 : !!(Array.isArray(s.value) || ["select", "multi"].includes(s.columnType)), l = f.filter(r), o = f.filter((s) => !r(s)), c = [null, null];
285
- if (o.length > 0) {
286
- const s = q(o, "text", n.logic);
287
- s && (c[0] = s);
280
+ const e = (i) => i.operator !== "equals" ? !1 : !!(Array.isArray(i.value) || ["select", "multi"].includes(i.columnType)), s = f.filter(e), c = f.filter((i) => !e(i)), u = [null, null];
281
+ if (c.length > 0) {
282
+ const i = v(c, "text", n.logic);
283
+ i && (u[0] = i);
288
284
  }
289
- if (l.length > 0) {
290
- const s = q(l, "set", n.logic);
291
- s && (c[1] = s);
285
+ if (s.length > 0) {
286
+ const i = v(s, "set", n.logic);
287
+ i && (u[1] = i);
292
288
  }
293
- (c[0] || c[1]) && (e[i] = {
289
+ (u[0] || u[1]) && (t[a] = {
294
290
  filterType: "multi",
295
- filterModels: c
291
+ filterModels: u
296
292
  });
297
293
  } else {
298
- const r = q(f, f[0].columnType, n.logic);
299
- r && (e[i] = r);
294
+ const e = v(f, f[0].columnType, n.logic);
295
+ e && (t[a] = e);
300
296
  }
301
297
  }
302
- return console.log("[AdvancedFilter] Converted AG Grid filter model:", e), e;
298
+ return console.log("[AdvancedFilter] Converted AG Grid filter model:", t), t;
303
299
  }
304
- function q(n, e, t = "OR") {
300
+ function v(n, t, r = "OR") {
305
301
  if (n.length === 0) return null;
306
- const a = [];
307
- n.forEach((r) => {
308
- Array.isArray(r.value) && (r.operator === "notEqual" || r.operator === "notContains") ? r.value.forEach((l) => {
309
- a.push({
310
- ...r,
311
- value: l,
312
- id: E()
302
+ const o = [];
303
+ n.forEach((e) => {
304
+ Array.isArray(e.value) && (e.operator === "notEqual" || e.operator === "notContains") ? e.value.forEach((s) => {
305
+ o.push({
306
+ ...e,
307
+ value: s,
308
+ id: q()
313
309
  // Unique ID for each condition
314
310
  });
315
- }) : a.push(r);
311
+ }) : o.push(e);
316
312
  });
317
- const i = a.some((r) => r.operator === "notEqual" || r.operator === "notContains");
318
- if (e === "set" || a.some((r) => Array.isArray(r.value) || r.columnType === "select") && !i) {
319
- const r = /* @__PURE__ */ new Set();
320
- return a.forEach((l) => {
321
- Array.isArray(l.value) ? l.value.forEach((o) => r.add(o)) : l.value && r.add(l.value);
313
+ const a = o.some((e) => e.operator === "notEqual" || e.operator === "notContains");
314
+ if (t === "set" || o.some((e) => Array.isArray(e.value) || e.columnType === "select") && !a) {
315
+ const e = /* @__PURE__ */ new Set();
316
+ return o.forEach((s) => {
317
+ Array.isArray(s.value) ? s.value.forEach((c) => e.add(c)) : s.value && e.add(s.value);
322
318
  }), {
323
319
  filterType: "set",
324
- values: Array.from(r)
320
+ values: Array.from(e)
325
321
  };
326
322
  }
327
- const u = a;
328
- if (u.length === 1) {
329
- const r = u[0], l = O(r.operator, r.value, r.columnType);
330
- if (l === "date" && typeof r.value == "string") {
331
- const c = (s) => {
332
- if (!s || Array.isArray(s)) return null;
333
- if (/^\d{4}-\d{2}-\d{2}$/.test(s)) return s;
323
+ const l = o;
324
+ if (l.length === 1) {
325
+ const e = l[0], s = O(e.operator, e.value, e.columnType);
326
+ if (s === "date" && typeof e.value == "string") {
327
+ const u = (i) => {
328
+ if (!i || Array.isArray(i)) return null;
329
+ if (/^\d{4}-\d{2}-\d{2}$/.test(i)) return i;
334
330
  try {
335
- const d = new Date(s), y = d.getFullYear(), g = String(d.getMonth() + 1).padStart(2, "0"), F = String(d.getDate()).padStart(2, "0");
331
+ const d = new Date(i), y = d.getFullYear(), g = String(d.getMonth() + 1).padStart(2, "0"), F = String(d.getDate()).padStart(2, "0");
336
332
  return `${y}-${g}-${F}`;
337
333
  } catch {
338
- return s;
334
+ return i;
339
335
  }
340
336
  };
341
- return r.operator === "inRange" ? {
337
+ return e.operator === "inRange" ? {
342
338
  type: "inRange",
343
- dateFrom: c(r.value),
344
- dateTo: c(r.valueTo || ""),
339
+ dateFrom: u(e.value),
340
+ dateTo: u(e.valueTo || ""),
345
341
  filterType: "date"
346
342
  } : {
347
- type: h(r.operator),
348
- dateFrom: c(r.value),
343
+ type: h(e.operator),
344
+ dateFrom: u(e.value),
349
345
  filterType: "date"
350
346
  };
351
347
  }
352
- const o = (c) => {
353
- if (Array.isArray(c)) return c;
354
- const s = r.columnType === "number";
355
- return (l === "number" || s) && parseFloat(c) || c;
348
+ const c = (u) => {
349
+ if (Array.isArray(u)) return u;
350
+ const i = e.columnType === "number";
351
+ return (s === "number" || i) && parseFloat(u) || u;
356
352
  };
357
- return r.operator === "inRange" ? {
358
- type: h(r.operator),
359
- filter: o(r.value),
360
- filterTo: o(r.valueTo || ""),
361
- filterType: l
362
- } : r.operator === "empty" || r.operator === "notEmpty" ? {
363
- type: h(r.operator),
353
+ return e.operator === "inRange" ? {
354
+ type: h(e.operator),
355
+ filter: c(e.value),
356
+ filterTo: c(e.valueTo || ""),
357
+ filterType: s
358
+ } : e.operator === "empty" || e.operator === "notEmpty" ? {
359
+ type: h(e.operator),
364
360
  filterType: "text"
365
361
  // Empty checks usually run on text filter or generic
366
362
  } : {
367
- type: h(r.operator),
368
- filter: o(r.value),
369
- filterType: l
363
+ type: h(e.operator),
364
+ filter: c(e.value),
365
+ filterType: s
370
366
  };
371
367
  } else {
372
- let r = "text";
373
- const l = n.map((o) => {
374
- const c = h(o.operator), s = O(o.operator, o.value, o.columnType);
375
- r === "text" && s !== "text" && s !== "set" && (r = s);
376
- const d = (g) => Array.isArray(g) ? g : s === "number" && parseFloat(g) || g;
377
- let y = c;
378
- return s === "number" && (["contains", "startsWith", "endsWith"].includes(c) ? y = "equals" : c === "notContains" && (y = "notEqual")), o.operator === "inRange" ? {
379
- type: c,
380
- filter: d(o.value),
381
- filterTo: d(o.valueTo || ""),
382
- filterType: s
383
- } : o.operator === "empty" || o.operator === "notEmpty" ? {
384
- type: c,
368
+ let e = "text";
369
+ const s = n.map((c) => {
370
+ const u = h(c.operator), i = O(c.operator, c.value, c.columnType);
371
+ e === "text" && i !== "text" && i !== "set" && (e = i);
372
+ const d = (g) => Array.isArray(g) ? g : i === "number" && parseFloat(g) || g;
373
+ let y = u;
374
+ return i === "number" && (["contains", "startsWith", "endsWith"].includes(u) ? y = "equals" : u === "notContains" && (y = "notEqual")), c.operator === "inRange" ? {
375
+ type: u,
376
+ filter: d(c.value),
377
+ filterTo: d(c.valueTo || ""),
378
+ filterType: i
379
+ } : c.operator === "empty" || c.operator === "notEmpty" ? {
380
+ type: u,
385
381
  filterType: "text"
386
382
  } : {
387
383
  type: y,
388
- filter: d(o.value),
389
- filterType: s
384
+ filter: d(c.value),
385
+ filterType: i
390
386
  };
391
387
  });
392
388
  return {
393
- filterType: r,
394
- operator: t,
395
- conditions: l
389
+ filterType: e,
390
+ operator: r,
391
+ conditions: s
396
392
  };
397
393
  }
398
394
  }
399
395
  function k(n) {
400
396
  if (!n || Object.keys(n).length === 0) return null;
401
- const e = [];
402
- for (const [t, a] of Object.entries(n)) {
403
- if (!a) continue;
404
- const i = (u) => {
405
- if (!u) return [];
406
- if ("conditions" in u && u.conditions && u.operator)
407
- return u.conditions.flatMap((s) => i(s));
408
- if ("filterType" in u && u.filterType === "multi" && u.filterModels)
409
- return u.filterModels.flatMap((s) => s ? i(s) : []);
410
- const r = u, l = "type" in r ? r.type : "equals", o = r.filterType === "set" ? "equals" : M[l] || "contains", c = r.filter !== void 0 ? String(r.filter) : r.dateFrom !== void 0 ? String(r.dateFrom) : r.values ? r.values : "";
397
+ const t = [];
398
+ for (const [r, o] of Object.entries(n)) {
399
+ if (!o) continue;
400
+ const a = (l) => {
401
+ if (!l) return [];
402
+ if ("conditions" in l && l.conditions && l.operator)
403
+ return l.conditions.flatMap((i) => a(i));
404
+ if ("filterType" in l && l.filterType === "multi" && l.filterModels)
405
+ return l.filterModels.flatMap((i) => i ? a(i) : []);
406
+ const e = l, s = "type" in e ? e.type : "equals", c = e.filterType === "set" ? "equals" : M[s] || "contains", u = e.filter !== void 0 ? String(e.filter) : e.dateFrom !== void 0 ? String(e.dateFrom) : e.values ? e.values : "";
411
407
  return [{
412
- id: E(),
413
- columnId: t,
414
- operator: o,
415
- value: c,
416
- valueTo: r.filterTo || r.dateTo,
417
- columnType: r.filterType
408
+ id: q(),
409
+ columnId: r,
410
+ operator: c,
411
+ value: u,
412
+ valueTo: e.filterTo || e.dateTo,
413
+ columnType: e.filterType
418
414
  }];
419
- }, f = i(a);
420
- e.push(...f);
415
+ }, f = a(o);
416
+ t.push(...f);
421
417
  }
422
- return e.length === 0 ? null : {
418
+ return t.length === 0 ? null : {
423
419
  logic: "AND",
424
420
  // Default top-level logic
425
- rules: e
421
+ rules: t
426
422
  };
427
423
  }
428
424
  export {
429
425
  k as convertFromAgGridFilterModel,
430
- D as convertToAgGridFilterModel,
431
- j as createEmptyRule,
432
- $ as formatRuleForDisplay,
433
- E as generateFilterId,
426
+ w as convertToAgGridFilterModel,
427
+ D as createEmptyRule,
428
+ C as formatRuleForDisplay,
429
+ q as generateFilterId,
434
430
  A as getDisplayStringFromFilterModel,
435
- w as getMultiFilterIndices,
431
+ I as getMultiFilterIndices,
436
432
  h as mapOperatorToAgGrid,
437
- I as parseInputPattern
433
+ j as parseInputPattern
438
434
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "impact-nova",
4
- "version": "0.1.10",
4
+ "version": "0.1.11",
5
5
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Comprehensive UI component library for scalable, accessible, and performant applications.",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
@@ -9,6 +9,11 @@
9
9
  "types": "./dist/index.d.ts",
10
10
  "license": "MIT",
11
11
  "author": "Impact Analytics",
12
+ "contributors": [
13
+ {
14
+ "name": "Impact Analytics Team"
15
+ }
16
+ ],
12
17
  "keywords": [
13
18
  "react",
14
19
  "react-19",
@@ -17,20 +22,26 @@
17
22
  "ui-library",
18
23
  "tailwind",
19
24
  "tailwindcss",
25
+ "radix",
20
26
  "radix-ui",
21
27
  "typescript",
22
- "vite",
23
28
  "enterprise",
24
29
  "accessibility",
25
30
  "a11y",
26
31
  "ui-components",
27
32
  "react-components",
28
33
  "shadcn",
29
- "headless-ui",
34
+ "shadcn-ui",
30
35
  "ag-grid",
31
36
  "data-table",
32
37
  "charts",
33
38
  "highcharts",
39
+ "impact-nova",
40
+ "impact-ui",
41
+ "impact-analytics",
42
+ "dashboard",
43
+ "b2b",
44
+ "admin-panel",
34
45
  "forms",
35
46
  "navigation",
36
47
  "modal",
@@ -46,8 +57,7 @@
46
57
  "date-picker",
47
58
  "icons",
48
59
  "theme",
49
- "design-tokens",
50
- "impact-nova"
60
+ "design-tokens"
51
61
  ],
52
62
  "repository": {
53
63
  "type": "git",