impact-nova 2.0.5 → 2.0.7

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,66 +1,66 @@
1
- import { jsxs as g, jsx as r } from "react/jsx-runtime";
2
- import { useRef as Xe, useState as te, useCallback as re } from "react";
3
- import { Filter as Ze, Cross as Y } from "impact-nova-icons";
1
+ import { jsxs as y, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as Xe, useState as ee, useCallback as te } from "react";
3
+ import { Filter as Ze, Cross as q } from "impact-nova-icons";
4
4
  import { cn as $e } from "../../../../lib/utils.js";
5
5
  import { DatePicker as Se } from "../../date-picker/date-picker.js";
6
6
  import { MonthPicker as Ae } from "../../date-picker/month-picker.js";
7
7
  import { WeekPicker as He } from "../../date-picker/week-picker.js";
8
- import { Input as G } from "../../input.js";
8
+ import { Input as Y } from "../../input.js";
9
9
  import ze from "../../select/select.js";
10
- import { Popover as et, PopoverTrigger as tt, PopoverContent as rt, PopoverHeader as lt, PopoverTitle as nt, PopoverBody as at } from "../../popover.js";
10
+ import { Popover as et, PopoverTrigger as tt, PopoverContent as rt, PopoverHeader as nt, PopoverTitle as lt, PopoverBody as at } from "../../popover.js";
11
11
  import { useGridHeader as ot } from "./context/grid-header-context.js";
12
- import { getMultiFilterIndices as I, parseInputPattern as Be, mapOperatorToAgGrid as Ie } from "./utils/filter-utils.js";
13
- import { DEFAULT_DATE_DISPLAY_FORMAT as st, serializeWeek as it, serializeMonth as ct, serializeDate as dt, displayDateToIso as le } from "./utils/date-utils.js";
12
+ import { getMultiFilterIndices as B, parseInputPattern as Be, mapOperatorToAgGrid as Ie } from "./utils/filter-utils.js";
13
+ import { DEFAULT_DATE_DISPLAY_FORMAT as st, serializeWeek as it, serializeMonth as ct, serializeDate as dt, displayDateToIso as re } from "./utils/date-utils.js";
14
14
  import { deriveHeaderSearchCommittedState as ut } from "./derive-header-search-state.js";
15
15
  import { useImpactNovaI18n as ft } from "../../../../i18n/ImpactNovaI18nContext.js";
16
16
  const kt = ({
17
- column: k,
18
- api: v,
17
+ column: w,
18
+ api: x,
19
19
  onClose: ne,
20
- handleInlineSearch: ae,
21
- handleClearSearchInline: oe,
22
- onAdvanceSearchClick: se,
23
- toggleAdvanceSearch: ie,
20
+ handleInlineSearch: le,
21
+ handleClearSearchInline: ae,
22
+ onAdvanceSearchClick: oe,
23
+ toggleAdvanceSearch: se,
24
24
  advanceSearchEnabled: We = !1,
25
- selectOptions: V,
25
+ selectOptions: G,
26
26
  isMultiSelect: C,
27
27
  onSelectScrollToBottom: Oe,
28
28
  onSelectSearchChange: Re,
29
- onSelectOpen: ce,
30
- isLoadingSelect: de,
29
+ onSelectOpen: ie,
30
+ isLoadingSelect: ce,
31
31
  enableSpaceSplitting: je = !1,
32
32
  enableBooleanParsing: Ee = !1,
33
33
  enableDateParsing: qe = !1
34
34
  }) => {
35
- const { t: i } = ft(), n = k.getColDef(), d = k.getColId(), L = n?.filter || "agTextColumnFilter", M = L === "agDateColumnFilter", _ = L === "agSetColumnFilter" || V && V.length > 0 || n?.cellDataType === "boolean", U = n?.headerComponentParams?.datePickerVariant || "date", W = M && U === "month", O = M && U === "week", c = n?.headerComponentParams?.fiscalConfig, y = n?.headerComponentParams?.dateDisplayFormat || st, ue = ot(), J = Xe(null), fe = ut({
36
- api: v,
35
+ const { t: i } = ft(), l = w.getColDef(), d = w.getColId(), V = l?.filter || "agTextColumnFilter", M = V === "agDateColumnFilter", L = V === "agSetColumnFilter" || G && G.length > 0 || l?.cellDataType === "boolean", _ = l?.headerComponentParams?.datePickerVariant || "date", I = M && _ === "month", W = M && _ === "week", c = l?.headerComponentParams?.fiscalConfig, b = l?.headerComponentParams?.dateDisplayFormat || st, de = ot(), U = Xe(null), ue = ut({
36
+ api: x,
37
37
  colId: d,
38
- colDef: n,
38
+ colDef: l,
39
39
  isDateFilter: M,
40
- isMonthVariant: W,
41
- isWeekVariant: O,
42
- datePickerVariant: U,
43
- dateDisplayFormat: y
44
- }), [K, Q] = te(null), [Ye, D] = te(!1), S = (e) => Ye && K && K[e] !== void 0 ? K[e] : fe[e], X = S("searchText"), R = S("dateDisplayString"), pe = S("selectedDate"), he = S("selectedMonth"), me = S("selectedWeek"), A = (e) => {
45
- Q((t) => ({ ...fe, ...t, ...e }));
46
- }, x = () => D(!0), b = () => {
47
- D(!1), Q(null);
48
- }, N = (e, t) => {
49
- const a = (l) => l.replace(/[^0-9.\-+eE]/g, ""), s = (l, z) => {
50
- const w = Be(
51
- l,
40
+ isMonthVariant: I,
41
+ isWeekVariant: W,
42
+ datePickerVariant: _,
43
+ dateDisplayFormat: b
44
+ }), [J, K] = ee(null), [Ye, fe] = ee(!1), k = (e) => Ye && J && J[e] !== void 0 ? J[e] : ue[e], Q = k("searchText"), O = k("dateDisplayString"), pe = k("selectedDate"), he = k("selectedMonth"), me = k("selectedWeek"), S = (e) => {
45
+ K((t) => ({ ...ue, ...t, ...e }));
46
+ }, p = () => fe(!0), h = () => {
47
+ fe(!1), K(null);
48
+ }, D = (e, t) => {
49
+ const a = (n) => n.replace(/[^0-9.\-+eE]/g, ""), s = (n, H) => {
50
+ const P = Be(
51
+ n,
52
52
  je,
53
53
  Ee,
54
54
  qe
55
55
  );
56
56
  if (console.log("[HeaderSearchInput] Pattern Debug:", {
57
- input: l,
58
- filterType: z,
59
- parsed: w
60
- }), w.conditions.length === 0) return null;
57
+ input: n,
58
+ filterType: H,
59
+ parsed: P
60
+ }), P.conditions.length === 0) return null;
61
61
  const we = (u) => {
62
62
  let F = Ie(u.operator);
63
- if (z === "number") {
63
+ if (H === "number") {
64
64
  const ke = parseFloat(a(u.value));
65
65
  return ["contains", "notContains", "startsWith", "endsWith"].includes(
66
66
  F
@@ -78,18 +78,18 @@ const kt = ({
78
78
  filterType: "text"
79
79
  };
80
80
  };
81
- let B = null;
82
- if (w.conditions.length === 1)
83
- B = we(w.conditions[0]);
81
+ let z = null;
82
+ if (P.conditions.length === 1)
83
+ z = we(P.conditions[0]);
84
84
  else {
85
- const u = w.conditions.map(we).filter((F) => F !== null);
86
- u.length === 0 ? B = null : u.length === 1 ? B = u[0] : B = {
87
- filterType: z,
88
- operator: w.logic,
85
+ const u = P.conditions.map(we).filter((F) => F !== null);
86
+ u.length === 0 ? z = null : u.length === 1 ? z = u[0] : z = {
87
+ filterType: H,
88
+ operator: P.logic,
89
89
  conditions: u
90
90
  };
91
91
  }
92
- return B;
92
+ return z;
93
93
  };
94
94
  let o = null;
95
95
  if (!(e === null || e === "" || Array.isArray(e) && e.length === 0))
@@ -99,67 +99,67 @@ const kt = ({
99
99
  filterType: "set"
100
100
  };
101
101
  else if (t === "date")
102
- if (O && e && typeof e == "object" && "startDate" in e && "endDate" in e) {
103
- const l = it(e);
102
+ if (W && e && typeof e == "object" && "startDate" in e && "endDate" in e) {
103
+ const n = it(e);
104
104
  o = {
105
105
  type: "inRange",
106
- dateFrom: l.dateFrom,
107
- dateTo: l.dateTo,
106
+ dateFrom: n.dateFrom,
107
+ dateTo: n.dateTo,
108
108
  filterType: "date"
109
109
  };
110
- } else if (W && e && typeof e == "object" && "month" in e && "year" in e) {
111
- const l = ct(e);
110
+ } else if (I && e && typeof e == "object" && "month" in e && "year" in e) {
111
+ const n = ct(e);
112
112
  o = {
113
113
  type: "inRange",
114
- dateFrom: l.dateFrom,
115
- dateTo: l.dateTo,
114
+ dateFrom: n.dateFrom,
115
+ dateTo: n.dateTo,
116
116
  filterType: "date"
117
117
  };
118
118
  } else {
119
- const l = e instanceof Date ? dt(e) : null;
120
- o = l ? { type: "equals", dateFrom: l, filterType: "date" } : null;
119
+ const n = e instanceof Date ? dt(e) : null;
120
+ o = n ? { type: "equals", dateFrom: n, filterType: "date" } : null;
121
121
  }
122
122
  else {
123
- const l = n.filter === "agMultiColumnFilter" ? I(n) : null, z = l ? l.text !== -1 ? "text" : "number" : L === "agNumberColumnFilter" ? "number" : "text";
124
- o = s(String(e), z);
123
+ const n = l.filter === "agMultiColumnFilter" ? B(l) : null, H = n ? n.text !== -1 ? "text" : "number" : V === "agNumberColumnFilter" ? "number" : "text";
124
+ o = s(String(e), H);
125
125
  }
126
- const f = n.filter === "agMultiColumnFilter" ? I(n) : null, T = f ? t === "text" ? f.text !== -1 ? f.text : f.number : t === "set" ? f.set : f.date : 0;
127
- $(o, T);
128
- }, Z = (e) => {
129
- if (ae) {
130
- ae(Array.isArray(e) ? e.join(",") : e);
126
+ const f = l.filter === "agMultiColumnFilter" ? B(l) : null, T = f ? t === "text" ? f.text !== -1 ? f.text : f.number : t === "set" ? f.set : f.date : 0;
127
+ Z(o, T);
128
+ }, X = (e) => {
129
+ if (le) {
130
+ le(Array.isArray(e) ? e.join(",") : e);
131
131
  return;
132
132
  }
133
- N(e, M ? "date" : "text");
133
+ D(e, M ? "date" : "text");
134
134
  }, ge = (e) => {
135
135
  const t = e.target.value;
136
- A({ searchText: t }), Z(t);
136
+ S({ searchText: t }), X(t);
137
137
  }, ve = (e) => {
138
- A({ selectedDate: e }), Z(e);
138
+ S({ selectedDate: e }), X(e);
139
139
  }, ye = (e) => {
140
- A({ selectedMonth: e }), N(e || null, "date");
140
+ S({ selectedMonth: e }), D(e || null, "date");
141
141
  }, xe = (e) => {
142
- A({ selectedWeek: e }), N(e || null, "date");
142
+ S({ selectedWeek: e }), D(e || null, "date");
143
143
  }, Ge = (e) => {
144
144
  if (!e.trim()) return null;
145
145
  const t = Be(e, !1, !1, !1);
146
146
  if (t.conditions.length === 0) return null;
147
147
  const a = (o) => {
148
- let m = Ie(o.operator);
148
+ let v = Ie(o.operator);
149
149
  if (["contains", "notContains", "startsWith", "endsWith"].includes(
150
- m
151
- ) && (m = m === "notContains" ? "notEqual" : "equals"), o.operator === "inRange") {
152
- let T = le(o.value, y), l = le(o.valueTo || "", y);
153
- return !T || !l ? null : (T > l && ([T, l] = [l, T]), {
150
+ v
151
+ ) && (v = v === "notContains" ? "notEqual" : "equals"), o.operator === "inRange") {
152
+ let T = re(o.value, b), n = re(o.valueTo || "", b);
153
+ return !T || !n ? null : (T > n && ([T, n] = [n, T]), {
154
154
  type: "inRange",
155
155
  dateFrom: T,
156
- dateTo: l,
156
+ dateTo: n,
157
157
  filterType: "date"
158
158
  });
159
159
  }
160
- const f = le(o.value, y);
160
+ const f = re(o.value, b);
161
161
  return f ? {
162
- type: m,
162
+ type: v,
163
163
  dateFrom: f,
164
164
  filterType: "date"
165
165
  } : null;
@@ -172,47 +172,47 @@ const kt = ({
172
172
  operator: t.logic,
173
173
  conditions: s
174
174
  };
175
- }, $ = re(
175
+ }, Z = te(
176
176
  (e, t) => {
177
- const a = v.getFilterModel(), s = { ...a };
178
- if (n.filter === "agMultiColumnFilter") {
177
+ const a = x.getFilterModel(), s = { ...a };
178
+ if (l.filter === "agMultiColumnFilter") {
179
179
  if (t === -1) return;
180
- const o = a[d], m = o && o.filterType === "multi" ? [...o.filterModels || []] : Array(n.filterParams?.filters?.length || 1).fill(null);
181
- m[t] = e, m.every((f) => f === null) ? delete s[d] : s[d] = {
180
+ const o = a[d], v = o && o.filterType === "multi" ? [...o.filterModels || []] : Array(l.filterParams?.filters?.length || 1).fill(null);
181
+ v[t] = e, v.every((f) => f === null) ? delete s[d] : s[d] = {
182
182
  filterType: "multi",
183
- filterModels: m
183
+ filterModels: v
184
184
  };
185
185
  } else
186
186
  e ? s[d] = e : delete s[d];
187
- v.setFilterModel(s), v.onFilterChanged();
187
+ x.setFilterModel(s), x.onFilterChanged();
188
188
  },
189
- [v, d, n]
190
- ), be = re(
189
+ [x, d, l]
190
+ ), be = te(
191
191
  (e) => {
192
- const t = n.filter === "agMultiColumnFilter" ? I(n).date : 0;
193
- $(e, t);
192
+ const t = l.filter === "agMultiColumnFilter" ? B(l).date : 0;
193
+ Z(e, t);
194
194
  },
195
- [n, $]
195
+ [l, Z]
196
196
  ), Fe = (e) => {
197
197
  const t = e.target.value.replace(/[^0-9/\-!=><+,~]/g, "");
198
- if (A({ dateDisplayString: t }), !t.trim()) {
198
+ if (S({ dateDisplayString: t }), !t.trim()) {
199
199
  be(null);
200
200
  return;
201
201
  }
202
202
  const a = Ge(t);
203
203
  a && be(a);
204
- }, ee = () => {
205
- Q(null), Z(""), oe && oe();
206
- }, j = (e) => {
207
- N(e, "set");
208
- }, E = V || (n?.cellDataType === "boolean" ? [
204
+ }, $ = () => {
205
+ K(null), X(""), ae && ae();
206
+ }, R = (e) => {
207
+ D(e, "set");
208
+ }, j = G || (l?.cellDataType === "boolean" ? [
209
209
  { label: i("gridHeader.true"), value: "true" },
210
210
  { label: i("gridHeader.false"), value: "false" }
211
- ] : []), Ce = re(() => {
212
- const e = v.getFilterModel()[d];
211
+ ] : []), Ce = te(() => {
212
+ const e = x.getFilterModel()[d];
213
213
  if (!e) return [];
214
214
  if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
215
- const a = I(k.getColDef()).set;
215
+ const a = B(w.getColDef()).set;
216
216
  if (a !== -1) {
217
217
  const s = e.filterModels[a];
218
218
  if (s?.filterType === "set" && s.values)
@@ -225,29 +225,29 @@ const kt = ({
225
225
  return [String(e.filter)];
226
226
  }
227
227
  return [];
228
- }, [v, d, k]), [q, H] = te(null), Me = () => {
229
- const e = q !== null ? q : Ce();
230
- return C ? E.filter((t) => e.includes(t.value)) : E.find((t) => e.includes(t.value)) || null;
228
+ }, [x, d, w]), [E, A] = ee(null), Me = () => {
229
+ const e = E !== null ? E : Ce();
230
+ return C ? j.filter((t) => e.includes(t.value)) : j.find((t) => e.includes(t.value)) || null;
231
231
  }, Te = (e) => {
232
232
  let t = [];
233
233
  if (Array.isArray(e) ? t = e.map((a) => a.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !C) {
234
- j(t), e && ne();
234
+ R(t), e && ne();
235
235
  return;
236
236
  }
237
- H(t);
237
+ A(t);
238
238
  }, Ve = () => {
239
- j([]), H([]);
239
+ R([]), A([]);
240
240
  }, Le = (e) => {
241
241
  if (C) {
242
242
  if (e !== void 0) {
243
243
  let t = [];
244
- Array.isArray(e) ? t = e.map((a) => a.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), j(t), H(null);
244
+ Array.isArray(e) ? t = e.map((a) => a.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), R(t), A(null);
245
245
  return;
246
246
  }
247
- q !== null && (j(q), H(null));
247
+ E !== null && (R(E), A(null));
248
248
  }
249
249
  }, _e = () => {
250
- H(Ce()), ce && ce();
250
+ A(Ce()), ie && ie();
251
251
  }, Ue = () => We ? /* @__PURE__ */ r(
252
252
  "svg",
253
253
  {
@@ -259,7 +259,7 @@ const kt = ({
259
259
  width: "18",
260
260
  height: "18",
261
261
  onClick: (e) => {
262
- e.stopPropagation(), J.current && J.current.blur(), se ? se(k) : ie ? ie(d) : ue && ue.openAdvancedFilter(d);
262
+ e.stopPropagation(), U.current && U.current.blur(), oe ? oe(w) : se ? se(d) : de && de.openAdvancedFilter(d);
263
263
  },
264
264
  children: /* @__PURE__ */ r("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" })
265
265
  }
@@ -268,23 +268,23 @@ const kt = ({
268
268
  {
269
269
  onClick: ne,
270
270
  className: "cursor-pointer shrink-0 text-brand hover:text-brand-strong",
271
- children: /* @__PURE__ */ r(Y, { size: "xs" })
271
+ children: /* @__PURE__ */ r(q, { size: "xs" })
272
272
  }
273
- ), P = n.filter === "agMultiColumnFilter", p = I(n);
274
- let h = "text";
275
- P ? h = p.set !== -1 ? "set" : p.date !== -1 ? "date" : "text" : _ ? h = "set" : M && (h = "date");
276
- const Ke = P ? p.text !== -1 || p.number !== -1 : !M && !_, De = P ? p.set !== -1 : _, Ne = P ? p.date !== -1 : M, Qe = v.getFilterModel()[d], Pe = P && Qe?.filterModels?.some((e, t) => {
277
- const a = t === p.text || t === p.number ? "text" : t === p.set ? "set" : "date";
278
- return e !== null && a !== h;
273
+ ), N = l.filter === "agMultiColumnFilter", m = B(l);
274
+ let g = "text";
275
+ N ? g = m.set !== -1 ? "set" : m.date !== -1 ? "date" : "text" : L ? g = "set" : M && (g = "date");
276
+ const Ke = N ? m.text !== -1 || m.number !== -1 : !M && !L, De = N ? m.set !== -1 : L, Ne = N ? m.date !== -1 : M, Qe = x.getFilterModel()[d], Pe = N && Qe?.filterModels?.some((e, t) => {
277
+ const a = t === m.text || t === m.number ? "text" : t === m.set ? "set" : "date";
278
+ return e !== null && a !== g;
279
279
  });
280
- return /* @__PURE__ */ g("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: [
281
- h === "set" && De ? /* @__PURE__ */ r(
280
+ return /* @__PURE__ */ y("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: [
281
+ g === "set" && De ? /* @__PURE__ */ r(
282
282
  ze,
283
283
  {
284
- options: E,
284
+ options: j,
285
285
  value: Me(),
286
286
  onChange: Te,
287
- isMulti: C !== void 0 ? C : n?.cellDataType !== "boolean",
287
+ isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
288
288
  placeholder: i("filter.select"),
289
289
  className: "w-full bg-canvas-elevated",
290
290
  parentClassName: "flex-1 min-w-0",
@@ -296,38 +296,38 @@ const kt = ({
296
296
  onMenuScrollToBottom: Oe,
297
297
  onInputChange: Re,
298
298
  onClearAll: Ve,
299
- isLoading: de,
300
- onFocus: x,
301
- onBlur: b
299
+ isLoading: ce,
300
+ onFocus: p,
301
+ onBlur: h
302
302
  }
303
- ) : h === "date" && Ne ? R ? /* @__PURE__ */ r(
304
- G,
303
+ ) : g === "date" && Ne ? O ? /* @__PURE__ */ r(
304
+ Y,
305
305
  {
306
- value: R,
306
+ value: O,
307
307
  onChange: Fe,
308
308
  placeholder: i("filter.search"),
309
309
  className: "w-full bg-canvas-elevated",
310
310
  autoFocus: !0,
311
- onFocus: x,
312
- onBlur: b,
311
+ onFocus: p,
312
+ onBlur: h,
313
313
  suffix: /* @__PURE__ */ r(
314
314
  "button",
315
315
  {
316
316
  onClick: (e) => {
317
- e.stopPropagation(), ee();
317
+ e.stopPropagation(), $();
318
318
  },
319
319
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
320
- children: /* @__PURE__ */ r(Y, { size: "xs" })
320
+ children: /* @__PURE__ */ r(q, { size: "xs" })
321
321
  }
322
322
  )
323
323
  }
324
- ) : O ? /* @__PURE__ */ r(
324
+ ) : W ? /* @__PURE__ */ r(
325
325
  He,
326
326
  {
327
327
  value: me || void 0,
328
328
  onChange: (e) => xe(e || null),
329
329
  placeholder: i("datePicker.selectWeek"),
330
- format: y,
330
+ format: b,
331
331
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
332
332
  maxDate: /* @__PURE__ */ new Date("2100-12-31"),
333
333
  className: "w-full bg-canvas-elevated",
@@ -339,7 +339,7 @@ const kt = ({
339
339
  fiscalYearStartMonth: c?.fiscalYearStartMonth,
340
340
  weekStartsOn: c?.weekStartsOn
341
341
  }
342
- ) : W ? /* @__PURE__ */ r(
342
+ ) : I ? /* @__PURE__ */ r(
343
343
  Ae,
344
344
  {
345
345
  value: he || void 0,
@@ -349,8 +349,8 @@ const kt = ({
349
349
  maxDate: /* @__PURE__ */ new Date("2100-12-31"),
350
350
  className: "w-full bg-canvas-elevated",
351
351
  showFooter: !1,
352
- onFocus: x,
353
- onBlur: b
352
+ onFocus: p,
353
+ onBlur: h
354
354
  }
355
355
  ) : /* @__PURE__ */ r(
356
356
  Se,
@@ -358,40 +358,40 @@ const kt = ({
358
358
  value: pe || void 0,
359
359
  onChange: (e) => ve(e || null),
360
360
  placeholder: i("filter.selectDate"),
361
- format: y,
361
+ format: b,
362
362
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
363
363
  maxDate: /* @__PURE__ */ new Date("2100-12-31"),
364
364
  className: "w-full bg-canvas-elevated",
365
365
  weekStartsOn: c?.weekStartsOn,
366
- onFocus: x,
367
- onBlur: b
366
+ onFocus: p,
367
+ onBlur: h
368
368
  }
369
369
  ) : /* @__PURE__ */ r(
370
- G,
370
+ Y,
371
371
  {
372
- value: X,
372
+ value: Q,
373
373
  onChange: ge,
374
374
  placeholder: i("filter.search"),
375
375
  type: "text",
376
376
  autoFocus: !0,
377
- ref: J,
378
- onFocus: x,
379
- onBlur: b,
380
- suffix: X && /* @__PURE__ */ r(
377
+ ref: U,
378
+ onFocus: p,
379
+ onBlur: h,
380
+ suffix: Q && /* @__PURE__ */ r(
381
381
  "button",
382
382
  {
383
383
  onClick: (e) => {
384
- e.stopPropagation(), ee();
384
+ e.stopPropagation(), $();
385
385
  },
386
386
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
387
- children: /* @__PURE__ */ r(Y, { size: "xs" })
387
+ children: /* @__PURE__ */ r(q, { size: "xs" })
388
388
  }
389
389
  )
390
390
  }
391
391
  ),
392
- /* @__PURE__ */ g("div", { className: "flex items-center gap-1.5 shrink-0", children: [
393
- P && /* @__PURE__ */ g(et, { children: [
394
- /* @__PURE__ */ r(tt, { asChild: !0, children: /* @__PURE__ */ g(
392
+ /* @__PURE__ */ y("div", { className: "flex items-center gap-1.5 shrink-0", children: [
393
+ N && /* @__PURE__ */ y(et, { children: [
394
+ /* @__PURE__ */ r(tt, { asChild: !0, children: /* @__PURE__ */ y(
395
395
  "button",
396
396
  {
397
397
  type: "button",
@@ -412,67 +412,67 @@ const kt = ({
412
412
  ]
413
413
  }
414
414
  ) }),
415
- /* @__PURE__ */ g(rt, { align: "end", className: "w-[300px]", children: [
416
- /* @__PURE__ */ r(lt, { children: /* @__PURE__ */ r(nt, { children: i("gridHeader.activeFilters") }) }),
417
- /* @__PURE__ */ g(at, { className: "flex flex-col gap-4", children: [
418
- h !== "text" && Ke && /* @__PURE__ */ g("div", { className: "flex flex-col gap-1.5", children: [
415
+ /* @__PURE__ */ y(rt, { align: "end", className: "w-[300px]", children: [
416
+ /* @__PURE__ */ r(nt, { children: /* @__PURE__ */ r(lt, { children: i("gridHeader.activeFilters") }) }),
417
+ /* @__PURE__ */ y(at, { className: "flex flex-col gap-4", children: [
418
+ g !== "text" && Ke && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
419
419
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.textSearch") }),
420
420
  /* @__PURE__ */ r(
421
- G,
421
+ Y,
422
422
  {
423
- value: X,
423
+ value: Q,
424
424
  onChange: ge,
425
425
  placeholder: i("filter.searchPlaceholder"),
426
426
  className: "bg-canvas-elevated",
427
- onFocus: () => D(!0),
428
- onBlur: () => D(!1)
427
+ onFocus: p,
428
+ onBlur: h
429
429
  }
430
430
  )
431
431
  ] }),
432
- h !== "set" && De && /* @__PURE__ */ g("div", { className: "flex flex-col gap-1.5", children: [
432
+ g !== "set" && De && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
433
433
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.selectionFilter") }),
434
434
  /* @__PURE__ */ r(
435
435
  ze,
436
436
  {
437
- options: E,
437
+ options: j,
438
438
  value: Me(),
439
439
  onChange: Te,
440
- isMulti: C !== void 0 ? C : n?.cellDataType !== "boolean",
440
+ isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
441
441
  placeholder: i("filter.select"),
442
442
  className: "w-full bg-canvas-elevated",
443
- isLoading: de,
444
- onFocus: () => D(!0),
445
- onBlur: () => D(!1)
443
+ isLoading: ce,
444
+ onFocus: p,
445
+ onBlur: h
446
446
  }
447
447
  )
448
448
  ] }),
449
- h !== "date" && Ne && /* @__PURE__ */ g("div", { className: "flex flex-col gap-1.5", children: [
449
+ g !== "date" && Ne && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
450
450
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.dateFilter") }),
451
- R ? /* @__PURE__ */ r(
452
- G,
451
+ O ? /* @__PURE__ */ r(
452
+ Y,
453
453
  {
454
- value: R,
454
+ value: O,
455
455
  onChange: Fe,
456
456
  className: "w-full bg-canvas-elevated",
457
- onFocus: x,
458
- onBlur: b,
457
+ onFocus: p,
458
+ onBlur: h,
459
459
  suffix: /* @__PURE__ */ r(
460
460
  "button",
461
461
  {
462
462
  onClick: (e) => {
463
- e.stopPropagation(), ee();
463
+ e.stopPropagation(), $();
464
464
  },
465
465
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
466
- children: /* @__PURE__ */ r(Y, { size: "xs" })
466
+ children: /* @__PURE__ */ r(q, { size: "xs" })
467
467
  }
468
468
  )
469
469
  }
470
- ) : O ? /* @__PURE__ */ r(
470
+ ) : W ? /* @__PURE__ */ r(
471
471
  He,
472
472
  {
473
473
  value: me || void 0,
474
474
  onChange: (e) => xe(e || null),
475
- format: y,
475
+ format: b,
476
476
  className: "w-full bg-canvas-elevated",
477
477
  showFooter: !1,
478
478
  calendarType: c?.calendarType,
@@ -482,26 +482,26 @@ const kt = ({
482
482
  fiscalYearStartMonth: c?.fiscalYearStartMonth,
483
483
  weekStartsOn: c?.weekStartsOn
484
484
  }
485
- ) : W ? /* @__PURE__ */ r(
485
+ ) : I ? /* @__PURE__ */ r(
486
486
  Ae,
487
487
  {
488
488
  value: he || void 0,
489
489
  onChange: (e) => ye(e || null),
490
490
  className: "w-full bg-canvas-elevated",
491
491
  showFooter: !1,
492
- onFocus: x,
493
- onBlur: b
492
+ onFocus: p,
493
+ onBlur: h
494
494
  }
495
495
  ) : /* @__PURE__ */ r(
496
496
  Se,
497
497
  {
498
498
  value: pe || void 0,
499
499
  onChange: (e) => ve(e || null),
500
- format: y,
500
+ format: b,
501
501
  className: "w-full bg-canvas-elevated",
502
502
  weekStartsOn: c?.weekStartsOn,
503
- onFocus: x,
504
- onBlur: b
503
+ onFocus: p,
504
+ onBlur: h
505
505
  }
506
506
  )
507
507
  ] })