impact-nova 2.6.1 → 2.6.3

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