impact-nova 1.7.30 → 1.7.31

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,17 +1,18 @@
1
- import { jsxs as F, jsx as i } from "react/jsx-runtime";
2
- import { useRef as de, useState as q, useEffect as ce, useCallback as He } from "react";
3
- import { Filter as Se } from "lucide-react";
4
- import { cn as qe } from "../../../../lib/utils.js";
5
- import { DatePicker as fe } from "../../date-picker/date-picker.js";
6
- import { Input as ue } from "../../input.js";
7
- import me from "../../select/select.js";
8
- import { Popover as ze, PopoverTrigger as Ee, PopoverContent as we, PopoverHeader as Be, PopoverTitle as Re, PopoverBody as ke } from "../../popover.js";
9
- import { Cross as he } from "../../../../icons/index.js";
10
- import { useGridHeader as Oe } from "./context/grid-header-context.js";
11
- import { getMultiFilterIndices as C, getDisplayStringFromFilterModel as z, parseInputPattern as We } from "./utils/filter-utils.js";
12
- import { deserializeDate as M, serializeDate as pe } from "./utils/date-utils.js";
13
- import { useImpactNovaI18n as je } from "../../../../i18n/ImpactNovaI18nContext.js";
14
- const Ge = {
1
+ import { jsxs as M, jsx as a } from "react/jsx-runtime";
2
+ import { useRef as he, useState as w, useEffect as pe, useCallback as Re } from "react";
3
+ import { Filter as je } from "lucide-react";
4
+ import { cn as Oe } from "../../../../lib/utils.js";
5
+ import { DatePicker as ge } from "../../date-picker/date-picker.js";
6
+ import { MonthPicker as ye } from "../../date-picker/month-picker.js";
7
+ import { Input as Fe } from "../../input.js";
8
+ import xe from "../../select/select.js";
9
+ import { Popover as We, PopoverTrigger as Ve, PopoverContent as Ge, PopoverHeader as Le, PopoverTitle as _e, PopoverBody as Je } from "../../popover.js";
10
+ import { Cross as Me } from "../../../../icons/index.js";
11
+ import { useGridHeader as Ke } from "./context/grid-header-context.js";
12
+ import { getMultiFilterIndices as v, getDisplayStringFromFilterModel as q, parseInputPattern as Qe } from "./utils/filter-utils.js";
13
+ import { deserializeDate as C, deserializeMonth as E, serializeMonth as ve, serializeDate as be } from "./utils/date-utils.js";
14
+ import { useImpactNovaI18n as Ue } from "../../../../i18n/ImpactNovaI18nContext.js";
15
+ const Xe = {
15
16
  contains: "contains",
16
17
  notContains: "notContains",
17
18
  equals: "equals",
@@ -25,110 +26,138 @@ const Ge = {
25
26
  inRange: "inRange",
26
27
  empty: "blank",
27
28
  notEmpty: "notBlank"
28
- }, lt = ({
29
- column: A,
30
- api: c,
31
- onClose: G,
32
- handleInlineSearch: L,
33
- handleClearSearchInline: _,
34
- onAdvanceSearchClick: V,
35
- toggleAdvanceSearch: J,
36
- advanceSearchEnabled: ge = !1,
37
- selectOptions: E,
38
- isMultiSelect: T,
39
- onSelectScrollToBottom: ye,
40
- onSelectSearchChange: ve,
41
- onSelectOpen: K,
42
- isLoadingSelect: Q,
43
- enableSpaceSplitting: xe = !1,
44
- enableBooleanParsing: Fe = !1,
45
- enableDateParsing: be = !1
29
+ }, ut = ({
30
+ column: I,
31
+ api: u,
32
+ onClose: J,
33
+ handleInlineSearch: K,
34
+ handleClearSearchInline: Q,
35
+ onAdvanceSearchClick: U,
36
+ toggleAdvanceSearch: X,
37
+ advanceSearchEnabled: Te = !1,
38
+ selectOptions: k,
39
+ isMultiSelect: D,
40
+ onSelectScrollToBottom: Ce,
41
+ onSelectSearchChange: De,
42
+ onSelectOpen: Y,
43
+ isLoadingSelect: Z,
44
+ enableSpaceSplitting: Ne = !1,
45
+ enableBooleanParsing: Pe = !1,
46
+ enableDateParsing: Ie = !1
46
47
  }) => {
47
- const { t: m } = je(), d = A.getColDef(), o = A.getColId(), w = d?.filter || "agTextColumnFilter", y = w === "agDateColumnFilter", B = w === "agSetColumnFilter" || E && E.length > 0 || d?.cellDataType === "boolean", U = Oe(), R = de(null), X = de(!1), [k, O] = q(() => {
48
- const t = c.getFilterModel()[o];
48
+ const { t: m } = Ue(), c = I.getColDef(), o = I.getColId(), R = c?.filter || "agTextColumnFilter", h = R === "agDateColumnFilter", j = R === "agSetColumnFilter" || k && k.length > 0 || c?.cellDataType === "boolean", Ae = c?.headerComponentParams?.datePickerVariant || "date", b = h && Ae === "month", $ = Ke(), O = he(null), ee = he(!1), [W, V] = w(() => {
49
+ const t = u.getFilterModel()[o];
49
50
  if (!t) return "";
50
51
  if (t.filterType === "multi" && t.filterModels) {
51
- const r = C(d), l = r.text !== -1 ? r.text : r.number;
52
- if (l !== -1) {
53
- const h = t.filterModels[l];
54
- if (h) return z(o, h);
52
+ const l = v(c), r = l.text !== -1 ? l.text : l.number;
53
+ if (r !== -1) {
54
+ const i = t.filterModels[r];
55
+ if (i) return q(o, i);
55
56
  }
56
57
  return "";
57
58
  }
58
- return y ? "" : z(o, t);
59
- }), [Y, f] = q(!1);
60
- ce(() => {
61
- X.current = Y;
62
- }, [Y]);
63
- const [Z, W] = q(() => {
64
- const t = c.getFilterModel()[o];
59
+ return h ? "" : q(o, t);
60
+ }), [te, f] = w(!1);
61
+ pe(() => {
62
+ ee.current = te;
63
+ }, [te]);
64
+ const [le, G] = w(() => {
65
+ if (b) return null;
66
+ const t = u.getFilterModel()[o];
65
67
  if (t) {
66
68
  if (t.filterType === "multi" && t.filterModels) {
67
- const { date: r } = C(d);
68
- if (r !== -1) {
69
- const l = t.filterModels[r];
70
- if (l) {
71
- if (l.dateFrom) return M(l.dateFrom);
72
- if (l.filter) return M(l.filter);
69
+ const { date: l } = v(c);
70
+ if (l !== -1) {
71
+ const r = t.filterModels[l];
72
+ if (r) {
73
+ if (r.dateFrom) return C(r.dateFrom);
74
+ if (r.filter) return C(r.filter);
73
75
  }
74
76
  }
75
77
  }
76
- if (y) {
77
- if (t.dateFrom) return M(t.dateFrom);
78
- if (t.filter) return M(t.filter);
78
+ if (h) {
79
+ if (t.dateFrom) return C(t.dateFrom);
80
+ if (t.filter) return C(t.filter);
81
+ }
82
+ }
83
+ return null;
84
+ }), [re, L] = w(() => {
85
+ if (!b) return null;
86
+ const t = u.getFilterModel()[o];
87
+ if (t) {
88
+ if (t.filterType === "multi" && t.filterModels) {
89
+ const { date: l } = v(c);
90
+ if (l !== -1) {
91
+ const r = t.filterModels[l];
92
+ if (r?.dateFrom) return E(r.dateFrom);
93
+ }
79
94
  }
95
+ if (h && t.dateFrom)
96
+ return E(t.dateFrom);
80
97
  }
81
98
  return null;
82
99
  });
83
- ce(() => {
100
+ pe(() => {
84
101
  const e = () => {
85
- const r = c.getFilterModel()[o];
86
- let l = "";
87
- if (r)
88
- if (r.filterType === "multi" && r.filterModels) {
89
- const a = C(d), n = a.text !== -1 ? a.text : a.number;
90
- if (n !== -1) {
91
- const u = r.filterModels[n];
92
- l = u ? z(o, u) : "";
102
+ const l = u.getFilterModel()[o];
103
+ let r = "";
104
+ if (l)
105
+ if (l.filterType === "multi" && l.filterModels) {
106
+ const i = v(c), d = i.text !== -1 ? i.text : i.number;
107
+ if (d !== -1) {
108
+ const n = l.filterModels[d];
109
+ r = n ? q(o, n) : "";
93
110
  }
94
- } else y || (l = z(o, r));
95
- X.current || O((a) => a !== l ? l : a);
96
- let h = null;
97
- if (r)
98
- if (r.filterType === "multi" && r.filterModels) {
99
- const { date: a } = C(d);
100
- if (a !== -1) {
101
- const n = r.filterModels[a];
102
- n && (h = n.dateFrom ? M(n.dateFrom) : n.filter ? M(n.filter) : null);
103
- }
104
- } else y && (h = r.dateFrom ? M(r.dateFrom) : r.filter ? M(r.filter) : null);
105
- W((a) => a?.getTime() !== h?.getTime() ? h : a);
111
+ } else h || (r = q(o, l));
112
+ if (ee.current || V((i) => i !== r ? r : i), b) {
113
+ let i = null;
114
+ if (l)
115
+ if (l.filterType === "multi" && l.filterModels) {
116
+ const { date: d } = v(c);
117
+ if (d !== -1) {
118
+ const n = l.filterModels[d];
119
+ n?.dateFrom && (i = E(n.dateFrom));
120
+ }
121
+ } else h && l.dateFrom && (i = E(l.dateFrom));
122
+ L((d) => d === null && i === null ? d : d?.month !== i?.month || d?.year !== i?.year ? i : d);
123
+ } else {
124
+ let i = null;
125
+ if (l)
126
+ if (l.filterType === "multi" && l.filterModels) {
127
+ const { date: d } = v(c);
128
+ if (d !== -1) {
129
+ const n = l.filterModels[d];
130
+ n && (i = n.dateFrom ? C(n.dateFrom) : n.filter ? C(n.filter) : null);
131
+ }
132
+ } else h && (i = l.dateFrom ? C(l.dateFrom) : l.filter ? C(l.filter) : null);
133
+ G((d) => d?.getTime() !== i?.getTime() ? i : d);
134
+ }
106
135
  };
107
- return c.addEventListener("filterChanged", e), () => {
108
- c.removeEventListener("filterChanged", e);
136
+ return u.addEventListener("filterChanged", e), () => {
137
+ u.removeEventListener("filterChanged", e);
109
138
  };
110
- }, [c, o, y]);
111
- const $ = (e, t) => {
112
- const l = { ...c.getFilterModel() }, h = (n) => n.replace(/[^0-9.\-+eE]/g, ""), a = (n, u) => {
113
- const g = We(n, xe, Fe, be);
139
+ }, [u, o, h, b]);
140
+ const H = (e, t) => {
141
+ const r = { ...u.getFilterModel() }, i = (n) => n.replace(/[^0-9.\-+eE]/g, ""), d = (n, x) => {
142
+ const g = Qe(n, Ne, Pe, Ie);
114
143
  if (console.log("[HeaderSearchInput] Pattern Debug:", {
115
144
  input: n,
116
- filterType: u,
145
+ filterType: x,
117
146
  parsed: g
118
147
  }), g.conditions.length === 0) return null;
119
- const N = (s) => {
120
- let b = Ge[s.operator] || "contains";
121
- if (u === "number") {
122
- const ae = parseFloat(h(s.value));
123
- return ["contains", "notContains", "startsWith", "endsWith"].includes(b) && (b = b === "notContains" ? "notEqual" : "equals"), s.operator === "inRange" ? {
124
- type: b,
125
- filter: parseFloat(h(s.value)) || 0,
126
- filterTo: parseFloat(h(s.valueTo || "")) || 0,
148
+ const P = (s) => {
149
+ let T = Xe[s.operator] || "contains";
150
+ if (x === "number") {
151
+ const me = parseFloat(i(s.value));
152
+ return ["contains", "notContains", "startsWith", "endsWith"].includes(T) && (T = T === "notContains" ? "notEqual" : "equals"), s.operator === "inRange" ? {
153
+ type: T,
154
+ filter: parseFloat(i(s.value)) || 0,
155
+ filterTo: parseFloat(i(s.valueTo || "")) || 0,
127
156
  filterType: "number"
128
- } : isNaN(ae) ? null : { type: b, filter: ae, filterType: "number" };
157
+ } : isNaN(me) ? null : { type: T, filter: me, filterType: "number" };
129
158
  }
130
159
  return {
131
- type: b,
160
+ type: T,
132
161
  filter: s.value,
133
162
  filterTo: s.valueTo,
134
163
  filterType: "text"
@@ -136,71 +165,83 @@ const Ge = {
136
165
  };
137
166
  let p = null;
138
167
  if (g.conditions.length === 1)
139
- p = N(g.conditions[0]);
168
+ p = P(g.conditions[0]);
140
169
  else {
141
- const s = g.conditions.map(N).filter((b) => b !== null);
170
+ const s = g.conditions.map(P).filter((T) => T !== null);
142
171
  s.length === 0 ? p = null : s.length === 1 ? p = s[0] : p = {
143
- filterType: u,
172
+ filterType: x,
144
173
  operator: g.logic,
145
174
  conditions: s
146
175
  };
147
176
  }
148
177
  return console.log("[HeaderSearchInput] Resulting Model:", p), p;
149
178
  };
150
- if (d.filter === "agMultiColumnFilter") {
151
- const n = C(d), u = t === "text" ? n.text !== -1 ? n.text : n.number : t === "set" ? n.set : n.date;
152
- if (u === -1) return;
153
- const g = c.getFilterModel()[o], N = g && g.filterType === "multi" ? [...g.filterModels || []] : Array(d.filterParams?.filters?.length || 1).fill(null);
179
+ if (c.filter === "agMultiColumnFilter") {
180
+ const n = v(c), x = t === "text" ? n.text !== -1 ? n.text : n.number : t === "set" ? n.set : n.date;
181
+ if (x === -1) return;
182
+ const g = u.getFilterModel()[o], P = g && g.filterType === "multi" ? [...g.filterModels || []] : Array(c.filterParams?.filters?.length || 1).fill(null);
154
183
  let p = null;
155
184
  if (e !== null && e !== "" && (!Array.isArray(e) || e.length > 0))
156
185
  if (t === "set")
157
186
  p = { values: Array.isArray(e) ? e : [String(e)], filterType: "set" };
158
- else if (t === "date") {
159
- const s = e instanceof Date ? pe(e) : null;
160
- p = s ? { type: "equals", dateFrom: s, filterType: "date" } : null;
161
- } else {
187
+ else if (t === "date")
188
+ if (b && e && typeof e == "object" && "month" in e && "year" in e) {
189
+ const s = ve(e);
190
+ p = { type: "inRange", dateFrom: s.dateFrom, dateTo: s.dateTo, filterType: "date" };
191
+ } else {
192
+ const s = e instanceof Date ? be(e) : null;
193
+ p = s ? { type: "equals", dateFrom: s, filterType: "date" } : null;
194
+ }
195
+ else {
162
196
  const s = n.text !== -1 ? "text" : "number";
163
- p = a(String(e), s);
197
+ p = d(String(e), s);
164
198
  }
165
- N[u] = p, N.every((s) => s === null) ? delete l[o] : l[o] = { filterType: "multi", filterModels: N };
199
+ P[x] = p, P.every((s) => s === null) ? delete r[o] : r[o] = { filterType: "multi", filterModels: P };
166
200
  } else if (e === null || e === "" || Array.isArray(e) && e.length === 0)
167
- delete l[o];
168
- else if (t === "date") {
169
- const n = e instanceof Date ? pe(e) : null;
170
- l[o] = n ? { type: "equals", dateFrom: n, filterType: "date" } : null;
171
- } else if (t === "set")
172
- l[o] = { filterType: "set", values: Array.isArray(e) ? e : [String(e)] };
201
+ delete r[o];
202
+ else if (t === "date")
203
+ if (b && e && typeof e == "object" && "month" in e && "year" in e) {
204
+ const n = ve(e);
205
+ r[o] = { type: "inRange", dateFrom: n.dateFrom, dateTo: n.dateTo, filterType: "date" };
206
+ } else {
207
+ const n = e instanceof Date ? be(e) : null;
208
+ r[o] = n ? { type: "equals", dateFrom: n, filterType: "date" } : null;
209
+ }
210
+ else if (t === "set")
211
+ r[o] = { filterType: "set", values: Array.isArray(e) ? e : [String(e)] };
173
212
  else {
174
- const n = w === "agNumberColumnFilter" ? "number" : "text", u = a(String(e), n);
175
- u ? l[o] = u : delete l[o];
213
+ const n = R === "agNumberColumnFilter" ? "number" : "text", x = d(String(e), n);
214
+ x ? r[o] = x : delete r[o];
176
215
  }
177
216
  console.log("[HeaderSearchInput] Final Model Applied:", {
178
217
  column: o,
179
- model: l[o]
180
- }), c.setFilterModel(l), c.onFilterChanged();
181
- }, j = (e) => {
182
- if (L) {
183
- L(Array.isArray(e) ? e.join(",") : e);
218
+ model: r[o]
219
+ }), u.setFilterModel(r), u.onFilterChanged();
220
+ }, _ = (e) => {
221
+ if (K) {
222
+ K(Array.isArray(e) ? e.join(",") : e);
184
223
  return;
185
224
  }
186
- $(e, y ? "date" : "text");
187
- }, ee = (e) => {
225
+ H(e, h ? "date" : "text");
226
+ }, ne = (e) => {
188
227
  const t = e.target.value;
189
- O(t), j(t);
190
- }, te = (e) => {
191
- W(e), j(e);
192
- }, Me = () => {
193
- O(""), W(null), j(""), _ && _();
194
- }, P = (e) => {
195
- $(e, "set");
196
- }, H = E || (d?.cellDataType === "boolean" ? [{ label: m("gridHeader.true"), value: "true" }, { label: m("gridHeader.false"), value: "false" }] : []), re = He(() => {
197
- const e = c.getFilterModel()[o];
228
+ V(t), _(t);
229
+ }, oe = (e) => {
230
+ G(e), _(e);
231
+ }, ie = (e) => {
232
+ L(e), H(e || null, "date");
233
+ }, we = () => {
234
+ V(""), G(null), L(null), _(""), Q && Q();
235
+ }, z = (e) => {
236
+ H(e, "set");
237
+ }, S = k || (c?.cellDataType === "boolean" ? [{ label: m("gridHeader.true"), value: "true" }, { label: m("gridHeader.false"), value: "false" }] : []), se = Re(() => {
238
+ const e = u.getFilterModel()[o];
198
239
  if (!e) return [];
199
240
  if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
200
- const r = C(A.getColDef()).set;
201
- if (r !== -1) {
202
- const l = e.filterModels[r];
203
- if (l?.filterType === "set" && l.values) return l.values;
241
+ const l = v(I.getColDef()).set;
242
+ if (l !== -1) {
243
+ const r = e.filterModels[l];
244
+ if (r?.filterType === "set" && r.values) return r.values;
204
245
  }
205
246
  } else {
206
247
  if (e.filterType === "set" && "values" in e)
@@ -209,66 +250,79 @@ const Ge = {
209
250
  return [String(e.filter)];
210
251
  }
211
252
  return [];
212
- }, [c, o, A]), [S, I] = q(null), le = () => {
213
- const e = S !== null ? S : re();
214
- return T ? H.filter((t) => e.includes(t.value)) : H.find((t) => e.includes(t.value)) || null;
215
- }, ne = (e) => {
253
+ }, [u, o, I]), [B, A] = w(null), ae = () => {
254
+ const e = B !== null ? B : se();
255
+ return D ? S.filter((t) => e.includes(t.value)) : S.find((t) => e.includes(t.value)) || null;
256
+ }, de = (e) => {
216
257
  let t = [];
217
- if (Array.isArray(e) ? t = e.map((r) => r.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !T) {
218
- P(t), e && G();
258
+ if (Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !D) {
259
+ z(t), e && J();
219
260
  return;
220
261
  }
221
- I(t);
222
- }, Te = () => {
223
- P([]), I([]);
224
- }, Ce = (e) => {
225
- if (T) {
262
+ A(t);
263
+ }, He = () => {
264
+ z([]), A([]);
265
+ }, ze = (e) => {
266
+ if (D) {
226
267
  if (e !== void 0) {
227
268
  let t = [];
228
- Array.isArray(e) ? t = e.map((r) => r.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), P(t), I(null);
269
+ Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), z(t), A(null);
229
270
  return;
230
271
  }
231
- S !== null && (P(S), I(null));
272
+ B !== null && (z(B), A(null));
232
273
  }
233
- }, De = () => {
234
- I(re()), K && K();
235
- }, Ne = () => ge ? /* @__PURE__ */ i("svg", { className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover shrink-0", fill: "currentColor", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", onClick: (e) => {
236
- e.stopPropagation(), R.current && R.current.blur(), V ? V(A) : J ? J(o) : U && U.openAdvancedFilter(o);
237
- }, children: /* @__PURE__ */ i("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, Ae = () => /* @__PURE__ */ i("button", { onClick: G, className: "cursor-pointer shrink-0 text-brand hover:text-brand-strong", children: /* @__PURE__ */ i(he, { size: "xs" }) }), D = d.filter === "agMultiColumnFilter", v = C(d);
238
- let x = "text";
239
- D ? x = v.set !== -1 ? "set" : v.date !== -1 ? "date" : "text" : B ? x = "set" : y && (x = "date");
240
- const Ie = D ? v.text !== -1 || v.number !== -1 : !y && !B, oe = D ? v.set !== -1 : B, ie = D ? v.date !== -1 : y, Pe = c.getFilterModel()[o], se = D && Pe?.filterModels?.some((e, t) => {
241
- const r = t === v.text || t === v.number ? "text" : t === v.set ? "set" : "date";
242
- return e !== null && r !== x;
274
+ }, Se = () => {
275
+ A(se()), Y && Y();
276
+ }, Be = () => Te ? /* @__PURE__ */ a("svg", { className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover shrink-0", fill: "currentColor", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", onClick: (e) => {
277
+ e.stopPropagation(), O.current && O.current.blur(), U ? U(I) : X ? X(o) : $ && $.openAdvancedFilter(o);
278
+ }, children: /* @__PURE__ */ a("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, qe = () => /* @__PURE__ */ a("button", { onClick: J, className: "cursor-pointer shrink-0 text-brand hover:text-brand-strong", children: /* @__PURE__ */ a(Me, { size: "xs" }) }), N = c.filter === "agMultiColumnFilter", y = v(c);
279
+ let F = "text";
280
+ N ? F = y.set !== -1 ? "set" : y.date !== -1 ? "date" : "text" : j ? F = "set" : h && (F = "date");
281
+ const Ee = N ? y.text !== -1 || y.number !== -1 : !h && !j, ce = N ? y.set !== -1 : j, fe = N ? y.date !== -1 : h, ke = u.getFilterModel()[o], ue = N && ke?.filterModels?.some((e, t) => {
282
+ const l = t === y.text || t === y.number ? "text" : t === y.set ? "set" : "date";
283
+ return e !== null && l !== F;
243
284
  });
244
- return /* @__PURE__ */ F("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-brand-tint px-1 py-2 ag-header-cell-search-active h-full", children: [
245
- x === "set" && oe ? /* @__PURE__ */ i(
246
- me,
285
+ return /* @__PURE__ */ M("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-brand-tint px-1 py-2 ag-header-cell-search-active h-full", children: [
286
+ F === "set" && ce ? /* @__PURE__ */ a(
287
+ xe,
247
288
  {
248
- options: H,
249
- value: le(),
250
- onChange: ne,
251
- isMulti: T !== void 0 ? T : d?.cellDataType !== "boolean",
289
+ options: S,
290
+ value: ae(),
291
+ onChange: de,
292
+ isMulti: D !== void 0 ? D : c?.cellDataType !== "boolean",
252
293
  placeholder: m("filter.select"),
253
294
  className: "w-full bg-canvas-elevated",
254
295
  parentClassName: "flex-1 min-w-0",
255
296
  menuWidth: "200px",
256
297
  menuPortalTarget: document.body,
257
298
  autoFocus: !0,
258
- onMenuOpen: De,
259
- onMenuClose: Ce,
260
- onMenuScrollToBottom: ye,
261
- onInputChange: ve,
262
- onClearAll: Te,
263
- isLoading: Q,
299
+ onMenuOpen: Se,
300
+ onMenuClose: ze,
301
+ onMenuScrollToBottom: Ce,
302
+ onInputChange: De,
303
+ onClearAll: He,
304
+ isLoading: Z,
305
+ onFocus: () => f(!0),
306
+ onBlur: () => f(!1)
307
+ }
308
+ ) : F === "date" && fe ? b ? /* @__PURE__ */ a(
309
+ ye,
310
+ {
311
+ value: re || void 0,
312
+ onChange: (e) => ie(e || null),
313
+ placeholder: m("filter.selectMonth"),
314
+ minDate: /* @__PURE__ */ new Date("2000-01-01"),
315
+ maxDate: /* @__PURE__ */ new Date("2100-12-31"),
316
+ className: "w-full bg-canvas-elevated",
317
+ showFooter: !1,
264
318
  onFocus: () => f(!0),
265
319
  onBlur: () => f(!1)
266
320
  }
267
- ) : x === "date" && ie ? /* @__PURE__ */ i(
268
- fe,
321
+ ) : /* @__PURE__ */ a(
322
+ ge,
269
323
  {
270
- value: Z || void 0,
271
- onChange: (e) => te(e || null),
324
+ value: le || void 0,
325
+ onChange: (e) => oe(e || null),
272
326
  placeholder: m("filter.selectDate"),
273
327
  format: "MM-dd-yyyy",
274
328
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
@@ -277,38 +331,38 @@ const Ge = {
277
331
  onFocus: () => f(!0),
278
332
  onBlur: () => f(!1)
279
333
  }
280
- ) : /* @__PURE__ */ i(
281
- ue,
334
+ ) : /* @__PURE__ */ a(
335
+ Fe,
282
336
  {
283
- value: k,
284
- onChange: ee,
337
+ value: W,
338
+ onChange: ne,
285
339
  placeholder: m("filter.search"),
286
340
  type: "text",
287
341
  autoFocus: !0,
288
- ref: R,
342
+ ref: O,
289
343
  onFocus: () => f(!0),
290
344
  onBlur: () => f(!1),
291
- suffix: k && /* @__PURE__ */ i("button", { onClick: (e) => {
292
- e.stopPropagation(), Me();
293
- }, className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover", children: /* @__PURE__ */ i(he, { size: "xs" }) })
345
+ suffix: W && /* @__PURE__ */ a("button", { onClick: (e) => {
346
+ e.stopPropagation(), we();
347
+ }, className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover", children: /* @__PURE__ */ a(Me, { size: "xs" }) })
294
348
  }
295
349
  ),
296
- /* @__PURE__ */ F("div", { className: "flex items-center gap-1.5 shrink-0", children: [
297
- D && /* @__PURE__ */ F(ze, { children: [
298
- /* @__PURE__ */ i(Ee, { asChild: !0, children: /* @__PURE__ */ F("div", { className: "relative group p-1 hover:bg-brand-tint rounded-md transition-colors cursor-pointer", children: [
299
- /* @__PURE__ */ i(Se, { size: "md", className: qe("text-content-tertiary group-hover:text-brand-variant-hover", se && "text-brand-variant-hover") }),
300
- se && /* @__PURE__ */ i("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-brand border border-white shadow-sm" })
350
+ /* @__PURE__ */ M("div", { className: "flex items-center gap-1.5 shrink-0", children: [
351
+ N && /* @__PURE__ */ M(We, { children: [
352
+ /* @__PURE__ */ a(Ve, { asChild: !0, children: /* @__PURE__ */ M("div", { className: "relative group p-1 hover:bg-brand-tint rounded-md transition-colors cursor-pointer", children: [
353
+ /* @__PURE__ */ a(je, { size: "md", className: Oe("text-content-tertiary group-hover:text-brand-variant-hover", ue && "text-brand-variant-hover") }),
354
+ ue && /* @__PURE__ */ a("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-brand border border-white shadow-sm" })
301
355
  ] }) }),
302
- /* @__PURE__ */ F(we, { align: "end", className: "w-[300px]", children: [
303
- /* @__PURE__ */ i(Be, { children: /* @__PURE__ */ i(Re, { children: m("gridHeader.activeFilters") }) }),
304
- /* @__PURE__ */ F(ke, { className: "flex flex-col gap-4", children: [
305
- x !== "text" && Ie && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
306
- /* @__PURE__ */ i("span", { className: "text-xs font-semibold text-content-tertiary", children: m("gridHeader.textSearch") }),
307
- /* @__PURE__ */ i(
308
- ue,
356
+ /* @__PURE__ */ M(Ge, { align: "end", className: "w-[300px]", children: [
357
+ /* @__PURE__ */ a(Le, { children: /* @__PURE__ */ a(_e, { children: m("gridHeader.activeFilters") }) }),
358
+ /* @__PURE__ */ M(Je, { className: "flex flex-col gap-4", children: [
359
+ F !== "text" && Ee && /* @__PURE__ */ M("div", { className: "flex flex-col gap-1.5", children: [
360
+ /* @__PURE__ */ a("span", { className: "text-xs font-semibold text-content-tertiary", children: m("gridHeader.textSearch") }),
361
+ /* @__PURE__ */ a(
362
+ Fe,
309
363
  {
310
- value: k,
311
- onChange: ee,
364
+ value: W,
365
+ onChange: ne,
312
366
  placeholder: m("filter.searchPlaceholder"),
313
367
  className: "bg-canvas-elevated",
314
368
  onFocus: () => f(!0),
@@ -316,30 +370,40 @@ const Ge = {
316
370
  }
317
371
  )
318
372
  ] }),
319
- x !== "set" && oe && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
320
- /* @__PURE__ */ i("span", { className: "text-xs font-semibold text-content-tertiary", children: m("gridHeader.selectionFilter") }),
321
- /* @__PURE__ */ i(
322
- me,
373
+ F !== "set" && ce && /* @__PURE__ */ M("div", { className: "flex flex-col gap-1.5", children: [
374
+ /* @__PURE__ */ a("span", { className: "text-xs font-semibold text-content-tertiary", children: m("gridHeader.selectionFilter") }),
375
+ /* @__PURE__ */ a(
376
+ xe,
323
377
  {
324
- options: H,
325
- value: le(),
326
- onChange: ne,
327
- isMulti: T !== void 0 ? T : d?.cellDataType !== "boolean",
378
+ options: S,
379
+ value: ae(),
380
+ onChange: de,
381
+ isMulti: D !== void 0 ? D : c?.cellDataType !== "boolean",
328
382
  placeholder: m("filter.select"),
329
383
  className: "w-full bg-canvas-elevated",
330
- isLoading: Q,
384
+ isLoading: Z,
331
385
  onFocus: () => f(!0),
332
386
  onBlur: () => f(!1)
333
387
  }
334
388
  )
335
389
  ] }),
336
- x !== "date" && ie && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
337
- /* @__PURE__ */ i("span", { className: "text-xs font-semibold text-content-tertiary", children: m("gridHeader.dateFilter") }),
338
- /* @__PURE__ */ i(
339
- fe,
390
+ F !== "date" && fe && /* @__PURE__ */ M("div", { className: "flex flex-col gap-1.5", children: [
391
+ /* @__PURE__ */ a("span", { className: "text-xs font-semibold text-content-tertiary", children: m("gridHeader.dateFilter") }),
392
+ b ? /* @__PURE__ */ a(
393
+ ye,
394
+ {
395
+ value: re || void 0,
396
+ onChange: (e) => ie(e || null),
397
+ className: "w-full bg-canvas-elevated",
398
+ showFooter: !1,
399
+ onFocus: () => f(!0),
400
+ onBlur: () => f(!1)
401
+ }
402
+ ) : /* @__PURE__ */ a(
403
+ ge,
340
404
  {
341
- value: Z || void 0,
342
- onChange: (e) => te(e || null),
405
+ value: le || void 0,
406
+ onChange: (e) => oe(e || null),
343
407
  className: "w-full bg-canvas-elevated",
344
408
  onFocus: () => f(!0),
345
409
  onBlur: () => f(!1)
@@ -349,11 +413,11 @@ const Ge = {
349
413
  ] })
350
414
  ] })
351
415
  ] }),
352
- Ne(),
353
- Ae()
416
+ Be(),
417
+ qe()
354
418
  ] })
355
419
  ] });
356
420
  };
357
421
  export {
358
- lt as HeaderSearchInput
422
+ ut as HeaderSearchInput
359
423
  };