impact-nova 2.0.7 → 2.0.8

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.
@@ -26,8 +26,8 @@ export interface HeaderSearchInputProps {
26
26
  * HeaderSearchInput - A single instance input for column filtering.
27
27
  *
28
28
  * Grid filter model is the source of truth. While an input is focused, a local
29
- * draft overlays committed values so typing is not interrupted. External filter
30
- * changes re-render via AgGridWrapper `onFilterChanged` `refreshHeader()`.
29
+ * draft overlays committed values so typing is not interrupted. Committed values
30
+ * stay in sync via a local filterChanged subscription while inline search is open.
31
31
  */
32
32
  export declare const HeaderSearchInput: ({ column, api, onClose, handleInlineSearch, handleClearSearchInline, onAdvanceSearchClick, toggleAdvanceSearch, advanceSearchEnabled, selectOptions, isMultiSelect, onSelectScrollToBottom, onSelectSearchChange, onSelectOpen, isLoadingSelect, enableSpaceSplitting, enableBooleanParsing, enableDateParsing, }: HeaderSearchInputProps) => import("react/jsx-runtime").JSX.Element;
33
33
  export default HeaderSearchInput;
@@ -1,67 +1,73 @@
1
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
- import { cn as $e } from "../../../../lib/utils.js";
5
- import { DatePicker as Se } from "../../date-picker/date-picker.js";
6
- import { MonthPicker as Ae } from "../../date-picker/month-picker.js";
7
- import { WeekPicker as He } from "../../date-picker/week-picker.js";
8
- import { Input as Y } from "../../input.js";
9
- import ze from "../../select/select.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
- import { useGridHeader as ot } from "./context/grid-header-context.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
- import { deriveHeaderSearchCommittedState as ut } from "./derive-header-search-state.js";
15
- import { useImpactNovaI18n as ft } from "../../../../i18n/ImpactNovaI18nContext.js";
16
- const kt = ({
2
+ import { useRef as Le, useCallback as X, useState as _e } from "react";
3
+ import { Filter as Ue, Cross as j } from "impact-nova-icons";
4
+ import { cn as Je } from "../../../../lib/utils.js";
5
+ import { DatePicker as Te } from "../../date-picker/date-picker.js";
6
+ import { MonthPicker as De } from "../../date-picker/month-picker.js";
7
+ import { WeekPicker as Ne } from "../../date-picker/week-picker.js";
8
+ import { Input as q } from "../../input.js";
9
+ import Pe from "../../select/select.js";
10
+ import { Popover as Ke, PopoverTrigger as Qe, PopoverContent as Xe, PopoverHeader as Ze, PopoverTitle as $e, PopoverBody as et } from "../../popover.js";
11
+ import { useGridHeader as tt } from "./context/grid-header-context.js";
12
+ import { getMultiFilterIndices as z, parseInputPattern as we, mapOperatorToAgGrid as ke } from "./utils/filter-utils.js";
13
+ import { DEFAULT_DATE_DISPLAY_FORMAT as rt, serializeWeek as lt, serializeMonth as nt, serializeDate as at, displayDateToIso as Z } from "./utils/date-utils.js";
14
+ import { useHeaderSearchEditingState as ot } from "./use-header-search-editing-state.js";
15
+ import { useImpactNovaI18n as st } from "../../../../i18n/ImpactNovaI18nContext.js";
16
+ const Tt = ({
17
17
  column: w,
18
18
  api: x,
19
- onClose: ne,
20
- handleInlineSearch: le,
21
- handleClearSearchInline: ae,
22
- onAdvanceSearchClick: oe,
23
- toggleAdvanceSearch: se,
24
- advanceSearchEnabled: We = !1,
25
- selectOptions: G,
19
+ onClose: $,
20
+ handleInlineSearch: ee,
21
+ handleClearSearchInline: te,
22
+ onAdvanceSearchClick: re,
23
+ toggleAdvanceSearch: le,
24
+ advanceSearchEnabled: Se = !1,
25
+ selectOptions: Y,
26
26
  isMultiSelect: C,
27
- onSelectScrollToBottom: Oe,
28
- onSelectSearchChange: Re,
29
- onSelectOpen: ie,
30
- isLoadingSelect: ce,
31
- enableSpaceSplitting: je = !1,
32
- enableBooleanParsing: Ee = !1,
33
- enableDateParsing: qe = !1
27
+ onSelectScrollToBottom: Ae,
28
+ onSelectSearchChange: He,
29
+ onSelectOpen: ne,
30
+ isLoadingSelect: ae,
31
+ enableSpaceSplitting: ze = !1,
32
+ enableBooleanParsing: Be = !1,
33
+ enableDateParsing: Ie = !1
34
34
  }) => {
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({
35
+ const { t: i } = st(), n = w.getColDef(), d = w.getColId(), G = n?.filter || "agTextColumnFilter", M = G === "agDateColumnFilter", V = G === "agSetColumnFilter" || Y && Y.length > 0 || n?.cellDataType === "boolean", L = n?.headerComponentParams?.datePickerVariant || "date", B = M && L === "month", I = M && L === "week", c = n?.headerComponentParams?.fiscalConfig, b = n?.headerComponentParams?.dateDisplayFormat || rt, oe = tt(), _ = Le(null), {
36
+ searchText: U,
37
+ dateDisplayString: O,
38
+ selectedDate: se,
39
+ selectedMonth: ie,
40
+ selectedWeek: ce,
41
+ updateDraft: k,
42
+ handleFocus: p,
43
+ handleBlur: h,
44
+ clearEditingOverlay: Oe
45
+ } = ot({
36
46
  api: x,
37
47
  colId: d,
38
- colDef: l,
48
+ colDef: n,
39
49
  isDateFilter: M,
40
- isMonthVariant: I,
41
- isWeekVariant: W,
42
- datePickerVariant: _,
50
+ isMonthVariant: B,
51
+ isWeekVariant: I,
52
+ datePickerVariant: L,
43
53
  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
- je,
53
- Ee,
54
- qe
54
+ }), D = (e, t) => {
55
+ const a = (l) => l.replace(/[^0-9.\-+eE]/g, ""), s = (l, A) => {
56
+ const P = we(
57
+ l,
58
+ ze,
59
+ Be,
60
+ Ie
55
61
  );
56
62
  if (console.log("[HeaderSearchInput] Pattern Debug:", {
57
- input: n,
58
- filterType: H,
63
+ input: l,
64
+ filterType: A,
59
65
  parsed: P
60
66
  }), P.conditions.length === 0) return null;
61
- const we = (u) => {
62
- let F = Ie(u.operator);
63
- if (H === "number") {
64
- const ke = parseFloat(a(u.value));
67
+ const Ce = (u) => {
68
+ let F = ke(u.operator);
69
+ if (A === "number") {
70
+ const Me = parseFloat(a(u.value));
65
71
  return ["contains", "notContains", "startsWith", "endsWith"].includes(
66
72
  F
67
73
  ) && (F = F === "notContains" ? "notEqual" : "equals"), u.operator === "inRange" ? {
@@ -69,7 +75,7 @@ const kt = ({
69
75
  filter: parseFloat(a(u.value)) || 0,
70
76
  filterTo: parseFloat(a(u.valueTo || "")) || 0,
71
77
  filterType: "number"
72
- } : isNaN(ke) ? null : { type: F, filter: ke, filterType: "number" };
78
+ } : isNaN(Me) ? null : { type: F, filter: Me, filterType: "number" };
73
79
  }
74
80
  return {
75
81
  type: F,
@@ -78,18 +84,18 @@ const kt = ({
78
84
  filterType: "text"
79
85
  };
80
86
  };
81
- let z = null;
87
+ let H = null;
82
88
  if (P.conditions.length === 1)
83
- z = we(P.conditions[0]);
89
+ H = Ce(P.conditions[0]);
84
90
  else {
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,
91
+ const u = P.conditions.map(Ce).filter((F) => F !== null);
92
+ u.length === 0 ? H = null : u.length === 1 ? H = u[0] : H = {
93
+ filterType: A,
88
94
  operator: P.logic,
89
95
  conditions: u
90
96
  };
91
97
  }
92
- return z;
98
+ return H;
93
99
  };
94
100
  let o = null;
95
101
  if (!(e === null || e === "" || Array.isArray(e) && e.length === 0))
@@ -99,65 +105,65 @@ const kt = ({
99
105
  filterType: "set"
100
106
  };
101
107
  else if (t === "date")
102
- if (W && e && typeof e == "object" && "startDate" in e && "endDate" in e) {
103
- const n = it(e);
108
+ if (I && e && typeof e == "object" && "startDate" in e && "endDate" in e) {
109
+ const l = lt(e);
104
110
  o = {
105
111
  type: "inRange",
106
- dateFrom: n.dateFrom,
107
- dateTo: n.dateTo,
112
+ dateFrom: l.dateFrom,
113
+ dateTo: l.dateTo,
108
114
  filterType: "date"
109
115
  };
110
- } else if (I && e && typeof e == "object" && "month" in e && "year" in e) {
111
- const n = ct(e);
116
+ } else if (B && e && typeof e == "object" && "month" in e && "year" in e) {
117
+ const l = nt(e);
112
118
  o = {
113
119
  type: "inRange",
114
- dateFrom: n.dateFrom,
115
- dateTo: n.dateTo,
120
+ dateFrom: l.dateFrom,
121
+ dateTo: l.dateTo,
116
122
  filterType: "date"
117
123
  };
118
124
  } else {
119
- const n = e instanceof Date ? dt(e) : null;
120
- o = n ? { type: "equals", dateFrom: n, filterType: "date" } : null;
125
+ const l = e instanceof Date ? at(e) : null;
126
+ o = l ? { type: "equals", dateFrom: l, filterType: "date" } : null;
121
127
  }
122
128
  else {
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);
129
+ const l = n.filter === "agMultiColumnFilter" ? z(n) : null, A = l ? l.text !== -1 ? "text" : "number" : G === "agNumberColumnFilter" ? "number" : "text";
130
+ o = s(String(e), A);
125
131
  }
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);
132
+ const f = n.filter === "agMultiColumnFilter" ? z(n) : null, T = f ? t === "text" ? f.text !== -1 ? f.text : f.number : t === "set" ? f.set : f.date : 0;
133
+ K(o, T);
134
+ }, J = (e) => {
135
+ if (ee) {
136
+ ee(Array.isArray(e) ? e.join(",") : e);
131
137
  return;
132
138
  }
133
139
  D(e, M ? "date" : "text");
134
- }, ge = (e) => {
140
+ }, de = (e) => {
135
141
  const t = e.target.value;
136
- S({ searchText: t }), X(t);
137
- }, ve = (e) => {
138
- S({ selectedDate: e }), X(e);
139
- }, ye = (e) => {
140
- S({ selectedMonth: e }), D(e || null, "date");
141
- }, xe = (e) => {
142
- S({ selectedWeek: e }), D(e || null, "date");
143
- }, Ge = (e) => {
142
+ k({ searchText: t }), J(t);
143
+ }, ue = (e) => {
144
+ k({ selectedDate: e }), J(e);
145
+ }, fe = (e) => {
146
+ k({ selectedMonth: e }), D(e || null, "date");
147
+ }, pe = (e) => {
148
+ k({ selectedWeek: e }), D(e || null, "date");
149
+ }, We = (e) => {
144
150
  if (!e.trim()) return null;
145
- const t = Be(e, !1, !1, !1);
151
+ const t = we(e, !1, !1, !1);
146
152
  if (t.conditions.length === 0) return null;
147
153
  const a = (o) => {
148
- let v = Ie(o.operator);
154
+ let v = ke(o.operator);
149
155
  if (["contains", "notContains", "startsWith", "endsWith"].includes(
150
156
  v
151
157
  ) && (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]), {
158
+ let T = Z(o.value, b), l = Z(o.valueTo || "", b);
159
+ return !T || !l ? null : (T > l && ([T, l] = [l, T]), {
154
160
  type: "inRange",
155
161
  dateFrom: T,
156
- dateTo: n,
162
+ dateTo: l,
157
163
  filterType: "date"
158
164
  });
159
165
  }
160
- const f = re(o.value, b);
166
+ const f = Z(o.value, b);
161
167
  return f ? {
162
168
  type: v,
163
169
  dateFrom: f,
@@ -172,12 +178,12 @@ const kt = ({
172
178
  operator: t.logic,
173
179
  conditions: s
174
180
  };
175
- }, Z = te(
181
+ }, K = X(
176
182
  (e, t) => {
177
183
  const a = x.getFilterModel(), s = { ...a };
178
- if (l.filter === "agMultiColumnFilter") {
184
+ if (n.filter === "agMultiColumnFilter") {
179
185
  if (t === -1) return;
180
- const o = a[d], v = o && o.filterType === "multi" ? [...o.filterModels || []] : Array(l.filterParams?.filters?.length || 1).fill(null);
186
+ const o = a[d], v = o && o.filterType === "multi" ? [...o.filterModels || []] : Array(n.filterParams?.filters?.length || 1).fill(null);
181
187
  v[t] = e, v.every((f) => f === null) ? delete s[d] : s[d] = {
182
188
  filterType: "multi",
183
189
  filterModels: v
@@ -186,33 +192,33 @@ const kt = ({
186
192
  e ? s[d] = e : delete s[d];
187
193
  x.setFilterModel(s), x.onFilterChanged();
188
194
  },
189
- [x, d, l]
190
- ), be = te(
195
+ [x, d, n]
196
+ ), he = X(
191
197
  (e) => {
192
- const t = l.filter === "agMultiColumnFilter" ? B(l).date : 0;
193
- Z(e, t);
198
+ const t = n.filter === "agMultiColumnFilter" ? z(n).date : 0;
199
+ K(e, t);
194
200
  },
195
- [l, Z]
196
- ), Fe = (e) => {
201
+ [n, K]
202
+ ), me = (e) => {
197
203
  const t = e.target.value.replace(/[^0-9/\-!=><+,~]/g, "");
198
- if (S({ dateDisplayString: t }), !t.trim()) {
199
- be(null);
204
+ if (k({ dateDisplayString: t }), !t.trim()) {
205
+ he(null);
200
206
  return;
201
207
  }
202
- const a = Ge(t);
203
- a && be(a);
204
- }, $ = () => {
205
- K(null), X(""), ae && ae();
206
- }, R = (e) => {
208
+ const a = We(t);
209
+ a && he(a);
210
+ }, Q = () => {
211
+ Oe(), J(""), te && te();
212
+ }, W = (e) => {
207
213
  D(e, "set");
208
- }, j = G || (l?.cellDataType === "boolean" ? [
214
+ }, E = Y || (n?.cellDataType === "boolean" ? [
209
215
  { label: i("gridHeader.true"), value: "true" },
210
216
  { label: i("gridHeader.false"), value: "false" }
211
- ] : []), Ce = te(() => {
217
+ ] : []), ge = X(() => {
212
218
  const e = x.getFilterModel()[d];
213
219
  if (!e) return [];
214
220
  if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
215
- const a = B(w.getColDef()).set;
221
+ const a = z(w.getColDef()).set;
216
222
  if (a !== -1) {
217
223
  const s = e.filterModels[a];
218
224
  if (s?.filterType === "set" && s.values)
@@ -225,30 +231,30 @@ const kt = ({
225
231
  return [String(e.filter)];
226
232
  }
227
233
  return [];
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
- }, Te = (e) => {
234
+ }, [x, d, w]), [R, S] = _e(null), ve = () => {
235
+ const e = R !== null ? R : ge();
236
+ return C ? E.filter((t) => e.includes(t.value)) : E.find((t) => e.includes(t.value)) || null;
237
+ }, ye = (e) => {
232
238
  let t = [];
233
239
  if (Array.isArray(e) ? t = e.map((a) => a.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !C) {
234
- R(t), e && ne();
240
+ W(t), e && $();
235
241
  return;
236
242
  }
237
- A(t);
238
- }, Ve = () => {
239
- R([]), A([]);
240
- }, Le = (e) => {
243
+ S(t);
244
+ }, Ee = () => {
245
+ W([]), S([]);
246
+ }, Re = (e) => {
241
247
  if (C) {
242
248
  if (e !== void 0) {
243
249
  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 = []), R(t), A(null);
250
+ Array.isArray(e) ? t = e.map((a) => a.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), W(t), S(null);
245
251
  return;
246
252
  }
247
- E !== null && (R(E), A(null));
253
+ R !== null && (W(R), S(null));
248
254
  }
249
- }, _e = () => {
250
- A(Ce()), ie && ie();
251
- }, Ue = () => We ? /* @__PURE__ */ r(
255
+ }, je = () => {
256
+ S(ge()), ne && ne();
257
+ }, qe = () => Se ? /* @__PURE__ */ r(
252
258
  "svg",
253
259
  {
254
260
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover shrink-0",
@@ -259,52 +265,52 @@ const kt = ({
259
265
  width: "18",
260
266
  height: "18",
261
267
  onClick: (e) => {
262
- e.stopPropagation(), U.current && U.current.blur(), oe ? oe(w) : se ? se(d) : de && de.openAdvancedFilter(d);
268
+ e.stopPropagation(), _.current && _.current.blur(), re ? re(w) : le ? le(d) : oe && oe.openAdvancedFilter(d);
263
269
  },
264
270
  children: /* @__PURE__ */ r("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" })
265
271
  }
266
- ) : null, Je = () => /* @__PURE__ */ r(
272
+ ) : null, Ye = () => /* @__PURE__ */ r(
267
273
  "button",
268
274
  {
269
- onClick: ne,
275
+ onClick: $,
270
276
  className: "cursor-pointer shrink-0 text-brand hover:text-brand-strong",
271
- children: /* @__PURE__ */ r(q, { size: "xs" })
277
+ children: /* @__PURE__ */ r(j, { size: "xs" })
272
278
  }
273
- ), N = l.filter === "agMultiColumnFilter", m = B(l);
279
+ ), N = n.filter === "agMultiColumnFilter", m = z(n);
274
280
  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) => {
281
+ N ? g = m.set !== -1 ? "set" : m.date !== -1 ? "date" : "text" : V ? g = "set" : M && (g = "date");
282
+ const Ge = N ? m.text !== -1 || m.number !== -1 : !M && !V, xe = N ? m.set !== -1 : V, be = N ? m.date !== -1 : M, Ve = x.getFilterModel()[d], Fe = N && Ve?.filterModels?.some((e, t) => {
277
283
  const a = t === m.text || t === m.number ? "text" : t === m.set ? "set" : "date";
278
284
  return e !== null && a !== g;
279
285
  });
280
286
  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
- ze,
287
+ g === "set" && xe ? /* @__PURE__ */ r(
288
+ Pe,
283
289
  {
284
- options: j,
285
- value: Me(),
286
- onChange: Te,
287
- isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
290
+ options: E,
291
+ value: ve(),
292
+ onChange: ye,
293
+ isMulti: C !== void 0 ? C : n?.cellDataType !== "boolean",
288
294
  placeholder: i("filter.select"),
289
295
  className: "w-full bg-canvas-elevated",
290
296
  parentClassName: "flex-1 min-w-0",
291
297
  menuWidth: "200px",
292
298
  menuPortalTarget: document.body,
293
299
  autoFocus: !0,
294
- onMenuOpen: _e,
295
- onMenuClose: Le,
296
- onMenuScrollToBottom: Oe,
297
- onInputChange: Re,
298
- onClearAll: Ve,
299
- isLoading: ce,
300
+ onMenuOpen: je,
301
+ onMenuClose: Re,
302
+ onMenuScrollToBottom: Ae,
303
+ onInputChange: He,
304
+ onClearAll: Ee,
305
+ isLoading: ae,
300
306
  onFocus: p,
301
307
  onBlur: h
302
308
  }
303
- ) : g === "date" && Ne ? O ? /* @__PURE__ */ r(
304
- Y,
309
+ ) : g === "date" && be ? O ? /* @__PURE__ */ r(
310
+ q,
305
311
  {
306
312
  value: O,
307
- onChange: Fe,
313
+ onChange: me,
308
314
  placeholder: i("filter.search"),
309
315
  className: "w-full bg-canvas-elevated",
310
316
  autoFocus: !0,
@@ -314,18 +320,18 @@ const kt = ({
314
320
  "button",
315
321
  {
316
322
  onClick: (e) => {
317
- e.stopPropagation(), $();
323
+ e.stopPropagation(), Q();
318
324
  },
319
325
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
320
- children: /* @__PURE__ */ r(q, { size: "xs" })
326
+ children: /* @__PURE__ */ r(j, { size: "xs" })
321
327
  }
322
328
  )
323
329
  }
324
- ) : W ? /* @__PURE__ */ r(
325
- He,
330
+ ) : I ? /* @__PURE__ */ r(
331
+ Ne,
326
332
  {
327
- value: me || void 0,
328
- onChange: (e) => xe(e || null),
333
+ value: ce || void 0,
334
+ onChange: (e) => pe(e || null),
329
335
  placeholder: i("datePicker.selectWeek"),
330
336
  format: b,
331
337
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
@@ -339,11 +345,11 @@ const kt = ({
339
345
  fiscalYearStartMonth: c?.fiscalYearStartMonth,
340
346
  weekStartsOn: c?.weekStartsOn
341
347
  }
342
- ) : I ? /* @__PURE__ */ r(
343
- Ae,
348
+ ) : B ? /* @__PURE__ */ r(
349
+ De,
344
350
  {
345
- value: he || void 0,
346
- onChange: (e) => ye(e || null),
351
+ value: ie || void 0,
352
+ onChange: (e) => fe(e || null),
347
353
  placeholder: i("datePicker.selectMonth"),
348
354
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
349
355
  maxDate: /* @__PURE__ */ new Date("2100-12-31"),
@@ -353,10 +359,10 @@ const kt = ({
353
359
  onBlur: h
354
360
  }
355
361
  ) : /* @__PURE__ */ r(
356
- Se,
362
+ Te,
357
363
  {
358
- value: pe || void 0,
359
- onChange: (e) => ve(e || null),
364
+ value: se || void 0,
365
+ onChange: (e) => ue(e || null),
360
366
  placeholder: i("filter.selectDate"),
361
367
  format: b,
362
368
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
@@ -367,31 +373,31 @@ const kt = ({
367
373
  onBlur: h
368
374
  }
369
375
  ) : /* @__PURE__ */ r(
370
- Y,
376
+ q,
371
377
  {
372
- value: Q,
373
- onChange: ge,
378
+ value: U,
379
+ onChange: de,
374
380
  placeholder: i("filter.search"),
375
381
  type: "text",
376
382
  autoFocus: !0,
377
- ref: U,
383
+ ref: _,
378
384
  onFocus: p,
379
385
  onBlur: h,
380
- suffix: Q && /* @__PURE__ */ r(
386
+ suffix: U && /* @__PURE__ */ r(
381
387
  "button",
382
388
  {
383
389
  onClick: (e) => {
384
- e.stopPropagation(), $();
390
+ e.stopPropagation(), Q();
385
391
  },
386
392
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
387
- children: /* @__PURE__ */ r(q, { size: "xs" })
393
+ children: /* @__PURE__ */ r(j, { size: "xs" })
388
394
  }
389
395
  )
390
396
  }
391
397
  ),
392
398
  /* @__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(
399
+ N && /* @__PURE__ */ y(Ke, { children: [
400
+ /* @__PURE__ */ r(Qe, { asChild: !0, children: /* @__PURE__ */ y(
395
401
  "button",
396
402
  {
397
403
  type: "button",
@@ -399,29 +405,29 @@ const kt = ({
399
405
  className: "relative group p-1 hover:bg-brand-tint rounded-md transition-colors cursor-pointer bg-transparent border-none",
400
406
  children: [
401
407
  /* @__PURE__ */ r(
402
- Ze,
408
+ Ue,
403
409
  {
404
410
  size: "md",
405
- className: $e(
411
+ className: Je(
406
412
  "text-content-tertiary group-hover:text-brand-variant-hover",
407
- Pe && "text-brand-variant-hover"
413
+ Fe && "text-brand-variant-hover"
408
414
  )
409
415
  }
410
416
  ),
411
- Pe && /* @__PURE__ */ r("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-brand border border-white shadow-sm" })
417
+ Fe && /* @__PURE__ */ r("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-brand border border-white shadow-sm" })
412
418
  ]
413
419
  }
414
420
  ) }),
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: [
421
+ /* @__PURE__ */ y(Xe, { align: "end", className: "w-[300px]", children: [
422
+ /* @__PURE__ */ r(Ze, { children: /* @__PURE__ */ r($e, { children: i("gridHeader.activeFilters") }) }),
423
+ /* @__PURE__ */ y(et, { className: "flex flex-col gap-4", children: [
424
+ g !== "text" && Ge && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
419
425
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.textSearch") }),
420
426
  /* @__PURE__ */ r(
421
- Y,
427
+ q,
422
428
  {
423
- value: Q,
424
- onChange: ge,
429
+ value: U,
430
+ onChange: de,
425
431
  placeholder: i("filter.searchPlaceholder"),
426
432
  className: "bg-canvas-elevated",
427
433
  onFocus: p,
@@ -429,30 +435,30 @@ const kt = ({
429
435
  }
430
436
  )
431
437
  ] }),
432
- g !== "set" && De && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
438
+ g !== "set" && xe && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
433
439
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.selectionFilter") }),
434
440
  /* @__PURE__ */ r(
435
- ze,
441
+ Pe,
436
442
  {
437
- options: j,
438
- value: Me(),
439
- onChange: Te,
440
- isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
443
+ options: E,
444
+ value: ve(),
445
+ onChange: ye,
446
+ isMulti: C !== void 0 ? C : n?.cellDataType !== "boolean",
441
447
  placeholder: i("filter.select"),
442
448
  className: "w-full bg-canvas-elevated",
443
- isLoading: ce,
449
+ isLoading: ae,
444
450
  onFocus: p,
445
451
  onBlur: h
446
452
  }
447
453
  )
448
454
  ] }),
449
- g !== "date" && Ne && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
455
+ g !== "date" && be && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
450
456
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.dateFilter") }),
451
457
  O ? /* @__PURE__ */ r(
452
- Y,
458
+ q,
453
459
  {
454
460
  value: O,
455
- onChange: Fe,
461
+ onChange: me,
456
462
  className: "w-full bg-canvas-elevated",
457
463
  onFocus: p,
458
464
  onBlur: h,
@@ -460,18 +466,18 @@ const kt = ({
460
466
  "button",
461
467
  {
462
468
  onClick: (e) => {
463
- e.stopPropagation(), $();
469
+ e.stopPropagation(), Q();
464
470
  },
465
471
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
466
- children: /* @__PURE__ */ r(q, { size: "xs" })
472
+ children: /* @__PURE__ */ r(j, { size: "xs" })
467
473
  }
468
474
  )
469
475
  }
470
- ) : W ? /* @__PURE__ */ r(
471
- He,
476
+ ) : I ? /* @__PURE__ */ r(
477
+ Ne,
472
478
  {
473
- value: me || void 0,
474
- onChange: (e) => xe(e || null),
479
+ value: ce || void 0,
480
+ onChange: (e) => pe(e || null),
475
481
  format: b,
476
482
  className: "w-full bg-canvas-elevated",
477
483
  showFooter: !1,
@@ -482,21 +488,21 @@ const kt = ({
482
488
  fiscalYearStartMonth: c?.fiscalYearStartMonth,
483
489
  weekStartsOn: c?.weekStartsOn
484
490
  }
485
- ) : I ? /* @__PURE__ */ r(
486
- Ae,
491
+ ) : B ? /* @__PURE__ */ r(
492
+ De,
487
493
  {
488
- value: he || void 0,
489
- onChange: (e) => ye(e || null),
494
+ value: ie || void 0,
495
+ onChange: (e) => fe(e || null),
490
496
  className: "w-full bg-canvas-elevated",
491
497
  showFooter: !1,
492
498
  onFocus: p,
493
499
  onBlur: h
494
500
  }
495
501
  ) : /* @__PURE__ */ r(
496
- Se,
502
+ Te,
497
503
  {
498
- value: pe || void 0,
499
- onChange: (e) => ve(e || null),
504
+ value: se || void 0,
505
+ onChange: (e) => ue(e || null),
500
506
  format: b,
501
507
  className: "w-full bg-canvas-elevated",
502
508
  weekStartsOn: c?.weekStartsOn,
@@ -508,11 +514,11 @@ const kt = ({
508
514
  ] })
509
515
  ] })
510
516
  ] }),
511
- Ue(),
512
- Je()
517
+ qe(),
518
+ Ye()
513
519
  ] })
514
520
  ] });
515
521
  };
516
522
  export {
517
- kt as HeaderSearchInput
523
+ Tt as HeaderSearchInput
518
524
  };
@@ -0,0 +1,34 @@
1
+ import { ColDef, GridApi } from 'ag-grid-community';
2
+ import { HeaderSearchCommittedState } from './derive-header-search-state';
3
+ interface UseHeaderSearchEditingStateOptions {
4
+ api: GridApi;
5
+ colId: string;
6
+ colDef: ColDef | undefined;
7
+ isDateFilter: boolean;
8
+ isMonthVariant: boolean;
9
+ isWeekVariant: boolean;
10
+ datePickerVariant: "date" | "month" | "week";
11
+ dateDisplayFormat: string;
12
+ }
13
+ /**
14
+ * Inline header search display state.
15
+ *
16
+ * AG Grid's filter model is the source of truth. While inline search is open,
17
+ * AgGridWrapper skips refreshHeader on filterChanged, so this hook subscribes
18
+ * to filterChanged and keeps a column-scoped snapshot in React state. When the
19
+ * snapshot changes, committed display values are re-derived from the live filter
20
+ * model. While an input is focused, a draft overlays committed values so typing
21
+ * is not interrupted.
22
+ */
23
+ export declare function useHeaderSearchEditingState(options: UseHeaderSearchEditingStateOptions): {
24
+ searchText: string;
25
+ dateDisplayString: string;
26
+ selectedDate: Date;
27
+ selectedMonth: import('../../calendar').MonthSelection;
28
+ selectedWeek: import('../../calendar').WeekSelection;
29
+ updateDraft: (patch: Partial<HeaderSearchCommittedState>) => void;
30
+ handleFocus: () => void;
31
+ handleBlur: () => void;
32
+ clearEditingOverlay: () => void;
33
+ };
34
+ export {};
@@ -0,0 +1,70 @@
1
+ import { useCallback as V, useState as l, useEffect as b, useMemo as v } from "react";
2
+ import { subscribeGridApiEvent as W } from "../grid-api-event-subscription.js";
3
+ import { deriveHeaderSearchCommittedState as H } from "./derive-header-search-state.js";
4
+ function A(D) {
5
+ const {
6
+ api: e,
7
+ colId: r,
8
+ colDef: c,
9
+ isDateFilter: d,
10
+ isMonthVariant: u,
11
+ isWeekVariant: m,
12
+ datePickerVariant: S,
13
+ dateDisplayFormat: f
14
+ } = D, n = V(
15
+ () => JSON.stringify(e.getFilterModel()[r] ?? null),
16
+ [e, r]
17
+ ), [y, g] = l(
18
+ n
19
+ ), [i, o] = l(null), [M, p] = l(!1);
20
+ b(() => W(
21
+ e,
22
+ "filterChanged",
23
+ () => {
24
+ const a = n();
25
+ g(
26
+ (F) => F === a ? F : a
27
+ );
28
+ }
29
+ ), [e, r, n]);
30
+ const h = v(() => H({
31
+ api: e,
32
+ colId: r,
33
+ colDef: c,
34
+ isDateFilter: d,
35
+ isMonthVariant: u,
36
+ isWeekVariant: m,
37
+ datePickerVariant: S,
38
+ dateDisplayFormat: f
39
+ }), [
40
+ e,
41
+ r,
42
+ c,
43
+ d,
44
+ u,
45
+ m,
46
+ S,
47
+ f,
48
+ y
49
+ ]), s = (t) => M && i && i[t] !== void 0 ? i[t] : h[t], k = (t) => {
50
+ o((a) => ({ ...h, ...a, ...t }));
51
+ }, C = () => p(!0), x = () => {
52
+ p(!1), o(null);
53
+ }, E = () => {
54
+ o(null);
55
+ };
56
+ return {
57
+ searchText: s("searchText"),
58
+ dateDisplayString: s("dateDisplayString"),
59
+ selectedDate: s("selectedDate"),
60
+ selectedMonth: s("selectedMonth"),
61
+ selectedWeek: s("selectedWeek"),
62
+ updateDraft: k,
63
+ handleFocus: C,
64
+ handleBlur: x,
65
+ clearEditingOverlay: E
66
+ };
67
+ }
68
+ export {
69
+ A as useHeaderSearchEditingState
70
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as g, jsx as a, Fragment as vt } from "react/jsx-runtime";
2
- import yt, { useState as W, useRef as M, useEffect as C } from "react";
2
+ import yt, { useState as W, useRef as M, useEffect as A } from "react";
3
3
  import * as re from "@radix-ui/react-popover";
4
4
  import { useVirtualizer as wt } from "@tanstack/react-virtual";
5
5
  import St from "./components/LabelWithSequence.js";
@@ -70,10 +70,10 @@ const zt = (Ne) => {
70
70
  onClearAll: Ee,
71
71
  onFocus: ot,
72
72
  onBlur: ct
73
- } = Ne, { t: Y } = Mt(), me = je ?? Y("select.placeholder"), [d, Me] = W(Ue), [q, Z] = W(""), [ze, Le] = W(void 0), pe = M(0), [f, v] = W(_e || (p ? [] : null)), [ut, he] = W(null), J = -2, [O, A] = W(-1), xe = M(!1), ge = M(null), be = M(null), dt = M(null), ee = M(null), j = M(null);
74
- C(() => {
73
+ } = Ne, { t: Y } = Mt(), me = je ?? Y("select.placeholder"), [d, Me] = W(Ue), [q, Z] = W(""), [ze, Le] = W(void 0), pe = M(0), [f, v] = W(_e || (p ? [] : null)), [ut, he] = W(null), J = -2, [O, I] = W(-1), xe = M(!1), ge = M(null), be = M(null), dt = M(null), ee = M(null), j = M(null);
74
+ A(() => {
75
75
  oe !== void 0 && v(oe);
76
- }, [oe]), C(() => {
76
+ }, [oe]), A(() => {
77
77
  if (!(d && $ && G === "menu")) return;
78
78
  let e = !1;
79
79
  const t = () => {
@@ -85,7 +85,7 @@ const zt = (Ne) => {
85
85
  e = !0, clearTimeout(n);
86
86
  };
87
87
  }, [d, $, G]);
88
- const { flatOptions: m, isProcessing: I, totalOptionsCount: $e, workerSelectAll: ft } = It(L, q, {
88
+ const { flatOptions: m, isProcessing: C, totalOptionsCount: $e, workerSelectAll: ft } = It(L, q, {
89
89
  ignoreCase: tt,
90
90
  ignoreAccents: nt,
91
91
  matchFrom: lt,
@@ -107,21 +107,18 @@ const zt = (Ne) => {
107
107
  estimateSize: () => 34,
108
108
  overscan: 5
109
109
  });
110
- C(() => {
110
+ A(() => {
111
111
  if (!d)
112
- A(-1);
112
+ I(-1);
113
113
  else if (xe.current)
114
114
  if (xe.current = !1, $ && G === "menu" && !h)
115
- A(-1);
115
+ I(-1);
116
116
  else {
117
- const e = !T && !I && !_ && p && Q && !h && m.length > 0;
118
- A(e ? J : 0);
117
+ const e = !T && !C && !_ && p && Q && !h && m.length > 0;
118
+ I(e ? J : 0);
119
119
  }
120
- }, [d]), C(() => {
121
- if (!d) {
122
- pe.current = 0, Le(void 0);
123
- return;
124
- }
120
+ }, [d]), A(() => {
121
+ if (pe.current = 0, Le(void 0), !d) return;
125
122
  let e = null, t = null;
126
123
  const n = () => {
127
124
  const l = be.current;
@@ -139,16 +136,16 @@ const zt = (Ne) => {
139
136
  return () => {
140
137
  cancelAnimationFrame(s), t && clearTimeout(t), e?.disconnect();
141
138
  };
142
- }, [d]), C(() => {
143
- O !== -1 && A(0);
144
- }, [q]), C(() => {
139
+ }, [d, T, C]), A(() => {
140
+ O !== -1 && I(0);
141
+ }, [q]), A(() => {
145
142
  if (!d) return;
146
143
  const e = requestAnimationFrame(() => {
147
144
  k.measure();
148
145
  });
149
146
  return () => cancelAnimationFrame(e);
150
- }, [d, k]), C(() => {
151
- if (d && ke && !I && m.length > 0) {
147
+ }, [d, k]), A(() => {
148
+ if (d && ke && !C && m.length > 0) {
152
149
  const e = m.findIndex((t) => p ? V.mode === "exclude" ? !V.set.has(t.value) : V.set.has(t.value) : f?.value === t.value);
153
150
  if (e !== -1) {
154
151
  const t = setTimeout(() => {
@@ -157,15 +154,15 @@ const zt = (Ne) => {
157
154
  return () => clearTimeout(t);
158
155
  }
159
156
  }
160
- }, [d, ke, I, m.length, p, V.mode, V.set, f, k]);
157
+ }, [d, ke, C, m.length, p, V.mode, V.set, f, k]);
161
158
  const K = M(null), Fe = k.getVirtualItems(), ye = Fe[Fe.length - 1], te = yt.useCallback(() => {
162
- T || I || K.current || F && (F(), K.current = setTimeout(() => {
159
+ T || C || K.current || F && (F(), K.current = setTimeout(() => {
163
160
  K.current = null;
164
161
  }, 500));
165
- }, [T, I, F]);
166
- C(() => () => {
162
+ }, [T, C, F]);
163
+ A(() => () => {
167
164
  K.current && (clearTimeout(K.current), K.current = null);
168
- }, []), C(() => {
165
+ }, []), A(() => {
169
166
  if (!d || !ee.current || !F) return;
170
167
  const e = () => {
171
168
  const { scrollTop: n, scrollHeight: s, clientHeight: l } = t;
@@ -178,7 +175,7 @@ const zt = (Ne) => {
178
175
  F,
179
176
  d,
180
177
  te
181
- ]), C(() => {
178
+ ]), A(() => {
182
179
  if (!d || !F || !ye) return;
183
180
  const e = m.length - 1;
184
181
  e < 0 || ye.index < e - 1 || te();
@@ -198,7 +195,7 @@ const zt = (Ne) => {
198
195
  Ae?.(t, n), Z(""), he(null);
199
196
  }
200
197
  };
201
- C(() => {
198
+ A(() => {
202
199
  if (!d) return;
203
200
  const e = (t) => {
204
201
  const n = t.target;
@@ -458,7 +455,7 @@ const zt = (Ne) => {
458
455
  f
459
456
  ), le = (e) => Oe ? Oe(e) : e.label, Ge = () => {
460
457
  const e = [];
461
- return !T && !I && !_ && p && Q && !h && m.length > 0 && e.push(J), m.forEach((n, s) => {
458
+ return !T && !C && !_ && p && Q && !h && m.length > 0 && e.push(J), m.forEach((n, s) => {
462
459
  !n.isGroup && !(w && n.isSubmenuParent) && !n.isDisabled && e.push(s);
463
460
  }), e;
464
461
  }, ht = (e) => {
@@ -481,11 +478,11 @@ const zt = (Ne) => {
481
478
  if (e.key === "ArrowDown") {
482
479
  e.preventDefault();
483
480
  const s = n < t.length - 1 ? n + 1 : 0, l = t[s];
484
- A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
481
+ I(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
485
482
  } else if (e.key === "ArrowUp") {
486
483
  e.preventDefault();
487
484
  const s = n > 0 ? n - 1 : t.length - 1, l = t[s];
488
- A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
485
+ I(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
489
486
  } else if (e.key === "Enter" || e.key === " ") {
490
487
  if (e.preventDefault(), O === J)
491
488
  we();
@@ -496,10 +493,10 @@ const zt = (Ne) => {
496
493
  } else if (e.key === "Escape")
497
494
  e.preventDefault(), E(!1), ge.current?.focus();
498
495
  else if (e.key === "Home")
499
- e.preventDefault(), t.length > 0 && (A(t[0]), t[0] >= 0 && k.scrollToIndex(t[0], { align: "auto" }));
496
+ e.preventDefault(), t.length > 0 && (I(t[0]), t[0] >= 0 && k.scrollToIndex(t[0], { align: "auto" }));
500
497
  else if (e.key === "End" && (e.preventDefault(), t.length > 0)) {
501
498
  const s = t[t.length - 1];
502
- A(s), s >= 0 && k.scrollToIndex(s, { align: "auto" });
499
+ I(s), s >= 0 && k.scrollToIndex(s, { align: "auto" });
503
500
  }
504
501
  }, xt = (e) => {
505
502
  const t = Ge();
@@ -508,11 +505,11 @@ const zt = (Ne) => {
508
505
  if (e.key === "ArrowDown") {
509
506
  e.preventDefault();
510
507
  const s = n < t.length - 1 ? n + 1 : 0, l = t[s];
511
- A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
508
+ I(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
512
509
  } else if (e.key === "ArrowUp") {
513
510
  e.preventDefault();
514
511
  const s = n > 0 ? n - 1 : t.length - 1, l = t[s];
515
- A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
512
+ I(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
516
513
  } else if (e.key === "Enter") {
517
514
  if (e.preventDefault(), O === J)
518
515
  we();
@@ -631,7 +628,7 @@ const zt = (Ne) => {
631
628
  ]
632
629
  }
633
630
  ),
634
- /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !d && (T || I) ? /* @__PURE__ */ a(Nt, { size: "14px" }) : /* @__PURE__ */ g(vt, { children: [
631
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !d && (T || C) ? /* @__PURE__ */ a(Nt, { size: "14px" }) : /* @__PURE__ */ g(vt, { children: [
635
632
  qe && !h && !S && (p && (z(
636
633
  f
637
634
  ) && f.isAllSelected || N(f) && f.length > 0) || !p && f) && /* @__PURE__ */ a(
@@ -742,7 +739,7 @@ const zt = (Ne) => {
742
739
  ] })
743
740
  }
744
741
  ),
745
- !T && !I && !_ && p && Q && !h && m.length > 0 && /* @__PURE__ */ a(
742
+ !T && !C && !_ && p && Q && !h && m.length > 0 && /* @__PURE__ */ a(
746
743
  "div",
747
744
  {
748
745
  className: "pb-1",
@@ -823,7 +820,7 @@ const zt = (Ne) => {
823
820
  children: "Refetch"
824
821
  }
825
822
  )
826
- ] }) : m.length === 0 && !T && !I ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-8 text-sm text-gray-500", children: "No options found" }) : T || I ? /* @__PURE__ */ a("div", { className: "px-1 py-1 space-y-1", children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ g(
823
+ ] }) : m.length === 0 && !T && !C ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-8 text-sm text-gray-500", children: "No options found" }) : T || C ? /* @__PURE__ */ a("div", { className: "px-1 py-1 space-y-1", children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ g(
827
824
  "div",
828
825
  {
829
826
  className: "flex items-center gap-2 px-3 py-2 animate-pulse",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",