impact-nova 1.3.0 → 1.5.2

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.
Files changed (117) hide show
  1. package/README.md +49 -0
  2. package/dist/components/layout/dashboard-layout.d.ts +15 -1
  3. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
  4. package/dist/components/ui/accordion.js +38 -34
  5. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
  6. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
  7. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
  11. package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
  12. package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
  13. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
  14. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
  15. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
  16. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
  17. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
  18. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
  19. package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
  20. package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
  21. package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
  22. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
  23. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
  24. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
  25. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
  26. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
  27. package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
  28. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
  29. package/dist/components/ui/alert.js +62 -58
  30. package/dist/components/ui/breadcrumb.js +81 -74
  31. package/dist/components/ui/calendar.js +354 -354
  32. package/dist/components/ui/chart/chart.js +63 -62
  33. package/dist/components/ui/chips.js +42 -38
  34. package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
  35. package/dist/components/ui/command-palette/command-palette-context.js +110 -0
  36. package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
  37. package/dist/components/ui/command-palette/command-palette.js +402 -0
  38. package/dist/components/ui/command-palette/index.d.ts +23 -0
  39. package/dist/components/ui/command-palette/index.js +44 -0
  40. package/dist/components/ui/command-palette/kbd.d.ts +28 -0
  41. package/dist/components/ui/command-palette/kbd.js +52 -0
  42. package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
  43. package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
  44. package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
  45. package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
  46. package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
  47. package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
  48. package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
  49. package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
  50. package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
  51. package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
  52. package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
  53. package/dist/components/ui/command-palette/use-shortcut.js +49 -0
  54. package/dist/components/ui/command-palette/utils.d.ts +119 -0
  55. package/dist/components/ui/command-palette/utils.js +248 -0
  56. package/dist/components/ui/data-table/data-table-column-list.js +87 -86
  57. package/dist/components/ui/data-table/data-table-format-options.js +45 -44
  58. package/dist/components/ui/data-table/data-table-view-options.js +39 -38
  59. package/dist/components/ui/date-picker/date-picker.js +89 -87
  60. package/dist/components/ui/date-picker/date-range-picker.js +140 -138
  61. package/dist/components/ui/date-picker/month-picker.js +82 -81
  62. package/dist/components/ui/date-picker/month-range-picker.js +108 -105
  63. package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
  64. package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
  65. package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
  66. package/dist/components/ui/date-picker/week-picker.js +117 -115
  67. package/dist/components/ui/date-picker/week-range-picker.js +166 -164
  68. package/dist/components/ui/dialog.js +78 -73
  69. package/dist/components/ui/drawer.js +71 -66
  70. package/dist/components/ui/file-upload.js +131 -127
  71. package/dist/components/ui/filter-panel/filter-panel.js +98 -94
  72. package/dist/components/ui/filter-strip/filter-strip.js +95 -91
  73. package/dist/components/ui/filter-strip/filter-summary.js +91 -90
  74. package/dist/components/ui/header.js +57 -53
  75. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
  76. package/dist/components/ui/loader.js +17 -16
  77. package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
  78. package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
  79. package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
  80. package/dist/components/ui/nested-list/nested-list.js +184 -182
  81. package/dist/components/ui/notification-panel/notification-panel.js +60 -53
  82. package/dist/components/ui/popover.js +45 -40
  83. package/dist/components/ui/prompt.js +90 -86
  84. package/dist/components/ui/select/select.js +206 -209
  85. package/dist/components/ui/sheet.d.ts +1 -0
  86. package/dist/components/ui/sheet.js +50 -48
  87. package/dist/components/ui/sidebar.js +273 -267
  88. package/dist/components/ui/stepper.js +75 -63
  89. package/dist/components/ui/tag.js +48 -44
  90. package/dist/components/ui/toast.js +46 -41
  91. package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
  92. package/dist/i18n/ImpactNovaI18nContext.js +76 -0
  93. package/dist/i18n/defaultMessages.d.ts +231 -0
  94. package/dist/i18n/defaultMessages.js +206 -0
  95. package/dist/i18n/getDateFnsLocale.d.ts +11 -0
  96. package/dist/i18n/getDateFnsLocale.js +21 -0
  97. package/dist/i18n/index.d.ts +5 -0
  98. package/dist/i18n/locales/de.d.ts +2 -0
  99. package/dist/i18n/locales/de.js +206 -0
  100. package/dist/i18n/locales/es.d.ts +2 -0
  101. package/dist/i18n/locales/es.js +206 -0
  102. package/dist/i18n/locales/hi.d.ts +2 -0
  103. package/dist/i18n/locales/hi.js +206 -0
  104. package/dist/i18n/locales/index.d.ts +4 -0
  105. package/dist/i18n/locales/kn.d.ts +2 -0
  106. package/dist/i18n/locales/kn.js +206 -0
  107. package/dist/icons/assets/boxAdd.svg.js +5 -0
  108. package/dist/icons/assets/boxed.svg.js +5 -0
  109. package/dist/icons/assets/trolley.svg.js +5 -0
  110. package/dist/icons/assets/unlocked.svg.js +5 -0
  111. package/dist/icons/index.d.ts +4 -0
  112. package/dist/icons/index.js +179 -171
  113. package/dist/impact-nova.css +1 -1
  114. package/dist/index.d.ts +4 -0
  115. package/dist/index.js +232 -172
  116. package/package.json +36 -4
  117. package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
@@ -1,16 +1,17 @@
1
- import { jsxs as F, jsx as s } from "react/jsx-runtime";
2
- import { useRef as ce, useState as z, useEffect as de, useCallback as Pe } from "react";
3
- import { Filter as we } from "lucide-react";
4
- import { cn as ze } from "../../../../lib/utils.js";
1
+ import { jsxs as M, jsx as s } from "react/jsx-runtime";
2
+ import { useRef as ce, useState as S, useEffect as fe, useCallback as He } from "react";
3
+ import { Filter as ze } from "lucide-react";
4
+ import { cn as Se } from "../../../../lib/utils.js";
5
5
  import { DatePicker as ue } from "../../date-picker/date-picker.js";
6
- import { Input as fe } from "../../input.js";
6
+ import { Input as me } from "../../input.js";
7
7
  import he from "../../select/select.js";
8
- import { Popover as qe, PopoverTrigger as Ee, PopoverContent as Be, PopoverHeader as He, PopoverTitle as Re, PopoverBody as ke } from "../../popover.js";
9
- import { Cross as me } from "../../../../icons/index.js";
10
- import { useGridHeader as Oe } from "./context/grid-header-context.js";
11
- import { getMultiFilterIndices as b, getDisplayStringFromFilterModel as q, parseInputPattern as We } from "./utils/filter-utils.js";
12
- import { deserializeDate as v, serializeDate as pe } from "./utils/date-utils.js";
13
- const je = {
8
+ import { Popover as qe, PopoverTrigger as Ee, PopoverContent as Be, PopoverHeader as Re, PopoverTitle as ke, PopoverBody as Oe } from "../../popover.js";
9
+ import { Cross as pe } from "../../../../icons/index.js";
10
+ import { useGridHeader as We } from "./context/grid-header-context.js";
11
+ import { getMultiFilterIndices as D, getDisplayStringFromFilterModel as q, parseInputPattern as je } from "./utils/filter-utils.js";
12
+ import { deserializeDate as C, serializeDate as ge } from "./utils/date-utils.js";
13
+ import { useImpactNovaI18n as Ge } from "../../../../i18n/ImpactNovaI18nContext.js";
14
+ const Le = {
14
15
  contains: "contains",
15
16
  notContains: "notContains",
16
17
  equals: "equals",
@@ -24,180 +25,180 @@ const je = {
24
25
  inRange: "inRange",
25
26
  empty: "blank",
26
27
  notEmpty: "notBlank"
27
- }, tt = ({
28
- column: A,
29
- api: c,
30
- onClose: G,
31
- handleInlineSearch: L,
32
- handleClearSearchInline: _,
33
- onAdvanceSearchClick: V,
34
- toggleAdvanceSearch: J,
35
- advanceSearchEnabled: ge = !1,
28
+ }, nt = ({
29
+ column: I,
30
+ api: d,
31
+ onClose: L,
32
+ handleInlineSearch: _,
33
+ handleClearSearchInline: V,
34
+ onAdvanceSearchClick: J,
35
+ toggleAdvanceSearch: K,
36
+ advanceSearchEnabled: xe = !1,
36
37
  selectOptions: E,
37
- isMultiSelect: C,
38
- onSelectScrollToBottom: xe,
39
- onSelectSearchChange: ye,
40
- onSelectOpen: K,
41
- isLoadingSelect: Q,
42
- enableSpaceSplitting: Fe = !1,
43
- enableBooleanParsing: Me = !1,
44
- enableDateParsing: ve = !1
38
+ isMultiSelect: b,
39
+ onSelectScrollToBottom: ye,
40
+ onSelectSearchChange: Fe,
41
+ onSelectOpen: Q,
42
+ isLoadingSelect: U,
43
+ enableSpaceSplitting: Me = !1,
44
+ enableBooleanParsing: ve = !1,
45
+ enableDateParsing: Ce = !1
45
46
  }) => {
46
- const a = A.getColDef(), o = A.getColId(), B = a?.filter || "agTextColumnFilter", g = B === "agDateColumnFilter", H = B === "agSetColumnFilter" || E && E.length > 0 || a?.cellDataType === "boolean", U = Oe(), R = ce(null), X = ce(!1), [k, O] = z(() => {
47
- const t = c.getFilterModel()[o];
47
+ const { t: p } = Ge(), a = I.getColDef(), o = I.getColId(), B = a?.filter || "agTextColumnFilter", x = B === "agDateColumnFilter", R = B === "agSetColumnFilter" || E && E.length > 0 || a?.cellDataType === "boolean", X = We(), k = ce(null), Y = ce(!1), [O, W] = S(() => {
48
+ const t = d.getFilterModel()[o];
48
49
  if (!t) return "";
49
50
  if (t.filterType === "multi" && t.filterModels) {
50
- const l = b(a), r = l.text !== -1 ? l.text : l.number;
51
+ const l = D(a), r = l.text !== -1 ? l.text : l.number;
51
52
  if (r !== -1) {
52
- const h = t.filterModels[r];
53
- if (h) return q(o, h);
53
+ const m = t.filterModels[r];
54
+ if (m) return q(o, m);
54
55
  }
55
56
  return "";
56
57
  }
57
- return g ? "" : q(o, t);
58
- }), [Y, f] = z(!1);
59
- de(() => {
60
- X.current = Y;
61
- }, [Y]);
62
- const [Z, W] = z(() => {
63
- const t = c.getFilterModel()[o];
58
+ return x ? "" : q(o, t);
59
+ }), [Z, u] = S(!1);
60
+ fe(() => {
61
+ Y.current = Z;
62
+ }, [Z]);
63
+ const [$, j] = S(() => {
64
+ const t = d.getFilterModel()[o];
64
65
  if (t) {
65
66
  if (t.filterType === "multi" && t.filterModels) {
66
- const { date: l } = b(a);
67
+ const { date: l } = D(a);
67
68
  if (l !== -1) {
68
69
  const r = t.filterModels[l];
69
70
  if (r) {
70
- if (r.dateFrom) return v(r.dateFrom);
71
- if (r.filter) return v(r.filter);
71
+ if (r.dateFrom) return C(r.dateFrom);
72
+ if (r.filter) return C(r.filter);
72
73
  }
73
74
  }
74
75
  }
75
- if (g) {
76
- if (t.dateFrom) return v(t.dateFrom);
77
- if (t.filter) return v(t.filter);
76
+ if (x) {
77
+ if (t.dateFrom) return C(t.dateFrom);
78
+ if (t.filter) return C(t.filter);
78
79
  }
79
80
  }
80
81
  return null;
81
82
  });
82
- de(() => {
83
+ fe(() => {
83
84
  const e = () => {
84
- const l = c.getFilterModel()[o];
85
+ const l = d.getFilterModel()[o];
85
86
  let r = "";
86
87
  if (l)
87
88
  if (l.filterType === "multi" && l.filterModels) {
88
- const i = b(a), n = i.text !== -1 ? i.text : i.number;
89
+ const i = D(a), n = i.text !== -1 ? i.text : i.number;
89
90
  if (n !== -1) {
90
- const d = l.filterModels[n];
91
- r = d ? q(o, d) : "";
91
+ const c = l.filterModels[n];
92
+ r = c ? q(o, c) : "";
92
93
  }
93
- } else g || (r = q(o, l));
94
- X.current || O((i) => i !== r ? r : i);
95
- let h = null;
94
+ } else x || (r = q(o, l));
95
+ Y.current || W((i) => i !== r ? r : i);
96
+ let m = null;
96
97
  if (l)
97
98
  if (l.filterType === "multi" && l.filterModels) {
98
- const { date: i } = b(a);
99
+ const { date: i } = D(a);
99
100
  if (i !== -1) {
100
101
  const n = l.filterModels[i];
101
- n && (h = n.dateFrom ? v(n.dateFrom) : n.filter ? v(n.filter) : null);
102
+ n && (m = n.dateFrom ? C(n.dateFrom) : n.filter ? C(n.filter) : null);
102
103
  }
103
- } else g && (h = l.dateFrom ? v(l.dateFrom) : l.filter ? v(l.filter) : null);
104
- W((i) => i?.getTime() !== h?.getTime() ? h : i);
104
+ } else x && (m = l.dateFrom ? C(l.dateFrom) : l.filter ? C(l.filter) : null);
105
+ j((i) => i?.getTime() !== m?.getTime() ? m : i);
105
106
  };
106
- return c.addEventListener("filterChanged", e), () => {
107
- c.removeEventListener("filterChanged", e);
107
+ return d.addEventListener("filterChanged", e), () => {
108
+ d.removeEventListener("filterChanged", e);
108
109
  };
109
- }, [c, o, g]);
110
- const $ = (e, t) => {
111
- const r = { ...c.getFilterModel() }, h = (n) => n.replace(/[^0-9.\-+eE]/g, ""), i = (n, d) => {
112
- const N = d === "number" ? h(n) : n, p = We(N, Fe, Me, ve);
110
+ }, [d, o, x]);
111
+ const ee = (e, t) => {
112
+ const r = { ...d.getFilterModel() }, m = (n) => n.replace(/[^0-9.\-+eE]/g, ""), i = (n, c) => {
113
+ const A = c === "number" ? m(n) : n, g = je(A, Me, ve, Ce);
113
114
  if (console.log("[HeaderSearchInput] Pattern Debug:", {
114
115
  input: n,
115
- sanitizedInput: N,
116
- filterType: d,
117
- parsed: p
118
- }), p.conditions.length === 0) return null;
119
- const T = (m) => {
120
- let M = je[m.operator] || "contains";
121
- if (d === "number") {
122
- const ae = parseFloat(h(m.value));
123
- return ["contains", "notContains", "startsWith", "endsWith"].includes(M) && (M = M === "notContains" ? "notEqual" : "equals"), m.operator === "inRange" ? {
124
- type: M,
125
- filter: parseFloat(h(m.value)) || 0,
126
- filterTo: parseFloat(h(m.valueTo || "")) || 0,
116
+ sanitizedInput: A,
117
+ filterType: c,
118
+ parsed: g
119
+ }), g.conditions.length === 0) return null;
120
+ const T = (h) => {
121
+ let v = Le[h.operator] || "contains";
122
+ if (c === "number") {
123
+ const de = parseFloat(m(h.value));
124
+ return ["contains", "notContains", "startsWith", "endsWith"].includes(v) && (v = v === "notContains" ? "notEqual" : "equals"), h.operator === "inRange" ? {
125
+ type: v,
126
+ filter: parseFloat(m(h.value)) || 0,
127
+ filterTo: parseFloat(m(h.valueTo || "")) || 0,
127
128
  filterType: "number"
128
- } : isNaN(ae) ? null : { type: M, filter: ae, filterType: "number" };
129
+ } : isNaN(de) ? null : { type: v, filter: de, filterType: "number" };
129
130
  }
130
131
  return {
131
- type: M,
132
- filter: m.value,
133
- filterTo: m.valueTo,
132
+ type: v,
133
+ filter: h.value,
134
+ filterTo: h.valueTo,
134
135
  filterType: "text"
135
136
  };
136
137
  };
137
- let u = null;
138
- if (p.conditions.length === 1)
139
- u = T(p.conditions[0]);
138
+ let f = null;
139
+ if (g.conditions.length === 1)
140
+ f = T(g.conditions[0]);
140
141
  else {
141
- const m = p.conditions.map(T).filter((M) => M !== null);
142
- m.length === 0 ? u = null : m.length === 1 ? u = m[0] : u = {
143
- filterType: d,
144
- operator: p.logic,
145
- conditions: m
142
+ const h = g.conditions.map(T).filter((v) => v !== null);
143
+ h.length === 0 ? f = null : h.length === 1 ? f = h[0] : f = {
144
+ filterType: c,
145
+ operator: g.logic,
146
+ conditions: h
146
147
  };
147
148
  }
148
- return console.log("[HeaderSearchInput] Resulting Model:", u), u;
149
+ return console.log("[HeaderSearchInput] Resulting Model:", f), f;
149
150
  };
150
151
  if (a.filter === "agMultiColumnFilter") {
151
- const n = b(a), d = t === "text" ? n.text !== -1 ? n.text : n.number : t === "set" ? n.set : n.date;
152
- if (d === -1) return;
153
- const N = c.getFilterModel()[o], p = N && N.filterType === "multi" ? [...N.filterModels || []] : Array(a.filterParams?.filters?.length || 1).fill(null);
152
+ const n = D(a), c = t === "text" ? n.text !== -1 ? n.text : n.number : t === "set" ? n.set : n.date;
153
+ if (c === -1) return;
154
+ const A = d.getFilterModel()[o], g = A && A.filterType === "multi" ? [...A.filterModels || []] : Array(a.filterParams?.filters?.length || 1).fill(null);
154
155
  let T = null;
155
156
  if (e !== null && e !== "" && (!Array.isArray(e) || e.length > 0))
156
157
  if (t === "set")
157
158
  T = { values: Array.isArray(e) ? e : [String(e)], filterType: "set" };
158
159
  else if (t === "date") {
159
- const u = e instanceof Date ? pe(e) : null;
160
- T = u ? { type: "equals", dateFrom: u, filterType: "date" } : null;
160
+ const f = e instanceof Date ? ge(e) : null;
161
+ T = f ? { type: "equals", dateFrom: f, filterType: "date" } : null;
161
162
  } else {
162
- const u = n.text !== -1 ? "text" : "number";
163
- T = i(String(e), u);
163
+ const f = n.text !== -1 ? "text" : "number";
164
+ T = i(String(e), f);
164
165
  }
165
- p[d] = T, p.every((u) => u === null) ? delete r[o] : r[o] = { filterType: "multi", filterModels: p };
166
+ g[c] = T, g.every((f) => f === null) ? delete r[o] : r[o] = { filterType: "multi", filterModels: g };
166
167
  } else if (e === null || e === "" || Array.isArray(e) && e.length === 0)
167
168
  delete r[o];
168
169
  else if (t === "date") {
169
- const n = e instanceof Date ? pe(e) : null;
170
+ const n = e instanceof Date ? ge(e) : null;
170
171
  r[o] = n ? { type: "equals", dateFrom: n, filterType: "date" } : null;
171
172
  } else if (t === "set")
172
173
  r[o] = { filterType: "set", values: Array.isArray(e) ? e : [String(e)] };
173
174
  else {
174
- const n = B === "agNumberColumnFilter" ? "number" : "text", d = i(String(e), n);
175
- d ? r[o] = d : delete r[o];
175
+ const n = B === "agNumberColumnFilter" ? "number" : "text", c = i(String(e), n);
176
+ c ? r[o] = c : delete r[o];
176
177
  }
177
178
  console.log("[HeaderSearchInput] Final Model Applied:", {
178
179
  column: o,
179
180
  model: r[o]
180
- }), c.setFilterModel(r), c.onFilterChanged();
181
- }, j = (e) => {
182
- if (L) {
183
- L(Array.isArray(e) ? e.join(",") : e);
181
+ }), d.setFilterModel(r), d.onFilterChanged();
182
+ }, G = (e) => {
183
+ if (_) {
184
+ _(Array.isArray(e) ? e.join(",") : e);
184
185
  return;
185
186
  }
186
- $(e, g ? "date" : "text");
187
- }, ee = (e) => {
188
- const t = e.target.value;
189
- O(t), j(t);
187
+ ee(e, x ? "date" : "text");
190
188
  }, te = (e) => {
191
- W(e), j(e);
192
- }, Ce = () => {
193
- O(""), W(null), j(""), _ && _();
194
- }, I = (e) => {
195
- $(e, "set");
196
- }, P = E || (a?.cellDataType === "boolean" ? [{ label: "True", value: "true" }, { label: "False", value: "false" }] : []), le = Pe(() => {
197
- const e = c.getFilterModel()[o];
189
+ const t = e.target.value;
190
+ W(t), G(t);
191
+ }, le = (e) => {
192
+ j(e), G(e);
193
+ }, be = () => {
194
+ W(""), j(null), G(""), V && V();
195
+ }, w = (e) => {
196
+ ee(e, "set");
197
+ }, H = E || (a?.cellDataType === "boolean" ? [{ label: p("gridHeader.true"), value: "true" }, { label: p("gridHeader.false"), value: "false" }] : []), re = He(() => {
198
+ const e = d.getFilterModel()[o];
198
199
  if (!e) return [];
199
200
  if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
200
- const l = b(A.getColDef()).set;
201
+ const l = D(I.getColDef()).set;
201
202
  if (l !== -1) {
202
203
  const r = e.filterModels[l];
203
204
  if (r?.filterType === "set" && r.values) return r.values;
@@ -209,152 +210,152 @@ const je = {
209
210
  return [String(e.filter)];
210
211
  }
211
212
  return [];
212
- }, [c, o, A]), [w, S] = z(null), re = () => {
213
- const e = w !== null ? w : le();
214
- return C ? P.filter((t) => e.includes(t.value)) : P.find((t) => e.includes(t.value)) || null;
215
- }, ne = (e) => {
213
+ }, [d, o, I]), [z, P] = S(null), ne = () => {
214
+ const e = z !== null ? z : re();
215
+ return b ? H.filter((t) => e.includes(t.value)) : H.find((t) => e.includes(t.value)) || null;
216
+ }, oe = (e) => {
216
217
  let t = [];
217
- if (Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !C) {
218
- I(t), e && G();
218
+ if (Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !b) {
219
+ w(t), e && L();
219
220
  return;
220
221
  }
221
- S(t);
222
+ P(t);
222
223
  }, Te = () => {
223
- I([]), S([]);
224
- }, be = (e) => {
225
- if (C) {
224
+ w([]), P([]);
225
+ }, De = (e) => {
226
+ if (b) {
226
227
  if (e !== void 0) {
227
228
  let t = [];
228
- Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), I(t), S(null);
229
+ Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), w(t), P(null);
229
230
  return;
230
231
  }
231
- w !== null && (I(w), S(null));
232
+ z !== null && (w(z), P(null));
232
233
  }
233
- }, De = () => {
234
- S(le()), K && K();
235
- }, Ne = () => ge ? /* @__PURE__ */ s("svg", { className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6] shrink-0", fill: "currentColor", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", onClick: (e) => {
236
- e.stopPropagation(), R.current && R.current.blur(), V ? V(A) : J ? J(o) : U && U.openAdvancedFilter(o);
237
- }, children: /* @__PURE__ */ s("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, Ae = () => /* @__PURE__ */ s("button", { onClick: G, className: "cursor-pointer shrink-0 text-[#4259ee] hover:text-[#0f1c76]", children: /* @__PURE__ */ s(me, { size: "xs" }) }), D = a.filter === "agMultiColumnFilter", x = b(a);
238
- let y = "text";
239
- D ? y = x.set !== -1 ? "set" : x.date !== -1 ? "date" : "text" : H ? y = "set" : g && (y = "date");
240
- const Se = D ? x.text !== -1 || x.number !== -1 : !g && !H, oe = D ? x.set !== -1 : H, se = D ? x.date !== -1 : g, Ie = c.getFilterModel()[o], ie = D && Ie?.filterModels?.some((e, t) => {
241
- const l = t === x.text || t === x.number ? "text" : t === x.set ? "set" : "date";
242
- return e !== null && l !== y;
234
+ }, Ne = () => {
235
+ P(re()), Q && Q();
236
+ }, Ae = () => xe ? /* @__PURE__ */ s("svg", { className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6] shrink-0", fill: "currentColor", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", onClick: (e) => {
237
+ e.stopPropagation(), k.current && k.current.blur(), J ? J(I) : K ? K(o) : X && X.openAdvancedFilter(o);
238
+ }, children: /* @__PURE__ */ s("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, Ie = () => /* @__PURE__ */ s("button", { onClick: L, className: "cursor-pointer shrink-0 text-[#4259ee] hover:text-[#0f1c76]", children: /* @__PURE__ */ s(pe, { size: "xs" }) }), N = a.filter === "agMultiColumnFilter", y = D(a);
239
+ let F = "text";
240
+ N ? F = y.set !== -1 ? "set" : y.date !== -1 ? "date" : "text" : R ? F = "set" : x && (F = "date");
241
+ const Pe = N ? y.text !== -1 || y.number !== -1 : !x && !R, se = N ? y.set !== -1 : R, ie = N ? y.date !== -1 : x, we = d.getFilterModel()[o], ae = N && we?.filterModels?.some((e, t) => {
242
+ const l = t === y.text || t === y.number ? "text" : t === y.set ? "set" : "date";
243
+ return e !== null && l !== F;
243
244
  });
244
- return /* @__PURE__ */ F("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-[#eceefd] px-1 py-2 ag-header-cell-search-active h-full", children: [
245
- y === "set" && oe ? /* @__PURE__ */ s(
245
+ return /* @__PURE__ */ M("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-[#eceefd] px-1 py-2 ag-header-cell-search-active h-full", children: [
246
+ F === "set" && se ? /* @__PURE__ */ s(
246
247
  he,
247
248
  {
248
- options: P,
249
- value: re(),
250
- onChange: ne,
251
- isMulti: C !== void 0 ? C : a?.cellDataType !== "boolean",
252
- placeholder: "Select...",
249
+ options: H,
250
+ value: ne(),
251
+ onChange: oe,
252
+ isMulti: b !== void 0 ? b : a?.cellDataType !== "boolean",
253
+ placeholder: p("filter.select"),
253
254
  className: "w-full bg-white",
254
255
  parentClassName: "flex-1 min-w-0",
255
256
  menuWidth: "200px",
256
257
  menuPortalTarget: document.body,
257
258
  autoFocus: !0,
258
- onMenuOpen: De,
259
- onMenuClose: be,
260
- onMenuScrollToBottom: xe,
261
- onInputChange: ye,
259
+ onMenuOpen: Ne,
260
+ onMenuClose: De,
261
+ onMenuScrollToBottom: ye,
262
+ onInputChange: Fe,
262
263
  onClearAll: Te,
263
- isLoading: Q,
264
- onFocus: () => f(!0),
265
- onBlur: () => f(!1)
264
+ isLoading: U,
265
+ onFocus: () => u(!0),
266
+ onBlur: () => u(!1)
266
267
  }
267
- ) : y === "date" && se ? /* @__PURE__ */ s(
268
+ ) : F === "date" && ie ? /* @__PURE__ */ s(
268
269
  ue,
269
270
  {
270
- value: Z || void 0,
271
- onChange: (e) => te(e || null),
272
- placeholder: "Select Date",
271
+ value: $ || void 0,
272
+ onChange: (e) => le(e || null),
273
+ placeholder: p("filter.selectDate"),
273
274
  format: "MM-dd-yyyy",
274
275
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
275
276
  maxDate: /* @__PURE__ */ new Date("2100-12-31"),
276
277
  className: "w-full bg-white",
277
- onFocus: () => f(!0),
278
- onBlur: () => f(!1)
278
+ onFocus: () => u(!0),
279
+ onBlur: () => u(!1)
279
280
  }
280
281
  ) : /* @__PURE__ */ s(
281
- fe,
282
+ me,
282
283
  {
283
- value: k,
284
- onChange: ee,
285
- placeholder: "Search",
284
+ value: O,
285
+ onChange: te,
286
+ placeholder: p("filter.search"),
286
287
  type: "text",
287
288
  className: "flex-1 bg-white",
288
289
  autoFocus: !0,
289
- ref: R,
290
- onFocus: () => f(!0),
291
- onBlur: () => f(!1),
292
- suffix: k && /* @__PURE__ */ s("button", { onClick: (e) => {
293
- e.stopPropagation(), Ce();
294
- }, className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6]", children: /* @__PURE__ */ s(me, { size: "xs" }) })
290
+ ref: k,
291
+ onFocus: () => u(!0),
292
+ onBlur: () => u(!1),
293
+ suffix: O && /* @__PURE__ */ s("button", { onClick: (e) => {
294
+ e.stopPropagation(), be();
295
+ }, className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6]", children: /* @__PURE__ */ s(pe, { size: "xs" }) })
295
296
  }
296
297
  ),
297
- /* @__PURE__ */ F("div", { className: "flex items-center gap-1.5 shrink-0", children: [
298
- D && /* @__PURE__ */ F(qe, { children: [
299
- /* @__PURE__ */ s(Ee, { asChild: !0, children: /* @__PURE__ */ F("div", { className: "relative group p-1 hover:bg-[#dbe0fb] rounded-md transition-colors cursor-pointer", children: [
300
- /* @__PURE__ */ s(we, { size: "md", className: ze("text-[#60697D] group-hover:text-[#3649C6]", ie && "text-[#3649C6]") }),
301
- ie && /* @__PURE__ */ s("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-[#4259ee] border border-white shadow-sm" })
298
+ /* @__PURE__ */ M("div", { className: "flex items-center gap-1.5 shrink-0", children: [
299
+ N && /* @__PURE__ */ M(qe, { children: [
300
+ /* @__PURE__ */ s(Ee, { asChild: !0, children: /* @__PURE__ */ M("div", { className: "relative group p-1 hover:bg-[#dbe0fb] rounded-md transition-colors cursor-pointer", children: [
301
+ /* @__PURE__ */ s(ze, { size: "md", className: Se("text-[#60697D] group-hover:text-[#3649C6]", ae && "text-[#3649C6]") }),
302
+ ae && /* @__PURE__ */ s("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-[#4259ee] border border-white shadow-sm" })
302
303
  ] }) }),
303
- /* @__PURE__ */ F(Be, { align: "end", className: "w-[300px]", children: [
304
- /* @__PURE__ */ s(He, { children: /* @__PURE__ */ s(Re, { children: "Active Filters" }) }),
305
- /* @__PURE__ */ F(ke, { className: "flex flex-col gap-4", children: [
306
- y !== "text" && Se && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
307
- /* @__PURE__ */ s("span", { className: "text-xs font-semibold text-[#60697D]", children: "Text Search" }),
304
+ /* @__PURE__ */ M(Be, { align: "end", className: "w-[300px]", children: [
305
+ /* @__PURE__ */ s(Re, { children: /* @__PURE__ */ s(ke, { children: p("gridHeader.activeFilters") }) }),
306
+ /* @__PURE__ */ M(Oe, { className: "flex flex-col gap-4", children: [
307
+ F !== "text" && Pe && /* @__PURE__ */ M("div", { className: "flex flex-col gap-1.5", children: [
308
+ /* @__PURE__ */ s("span", { className: "text-xs font-semibold text-[#60697D]", children: p("gridHeader.textSearch") }),
308
309
  /* @__PURE__ */ s(
309
- fe,
310
+ me,
310
311
  {
311
- value: k,
312
- onChange: ee,
313
- placeholder: "Search...",
312
+ value: O,
313
+ onChange: te,
314
+ placeholder: p("filter.searchPlaceholder"),
314
315
  className: "bg-white",
315
- onFocus: () => f(!0),
316
- onBlur: () => f(!1)
316
+ onFocus: () => u(!0),
317
+ onBlur: () => u(!1)
317
318
  }
318
319
  )
319
320
  ] }),
320
- y !== "set" && oe && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
321
- /* @__PURE__ */ s("span", { className: "text-xs font-semibold text-[#60697D]", children: "Selection Filter" }),
321
+ F !== "set" && se && /* @__PURE__ */ M("div", { className: "flex flex-col gap-1.5", children: [
322
+ /* @__PURE__ */ s("span", { className: "text-xs font-semibold text-[#60697D]", children: p("gridHeader.selectionFilter") }),
322
323
  /* @__PURE__ */ s(
323
324
  he,
324
325
  {
325
- options: P,
326
- value: re(),
327
- onChange: ne,
328
- isMulti: C !== void 0 ? C : a?.cellDataType !== "boolean",
329
- placeholder: "Select...",
326
+ options: H,
327
+ value: ne(),
328
+ onChange: oe,
329
+ isMulti: b !== void 0 ? b : a?.cellDataType !== "boolean",
330
+ placeholder: p("filter.select"),
330
331
  className: "w-full bg-white",
331
- isLoading: Q,
332
- onFocus: () => f(!0),
333
- onBlur: () => f(!1)
332
+ isLoading: U,
333
+ onFocus: () => u(!0),
334
+ onBlur: () => u(!1)
334
335
  }
335
336
  )
336
337
  ] }),
337
- y !== "date" && se && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
338
- /* @__PURE__ */ s("span", { className: "text-xs font-semibold text-[#60697D]", children: "Date Filter" }),
338
+ F !== "date" && ie && /* @__PURE__ */ M("div", { className: "flex flex-col gap-1.5", children: [
339
+ /* @__PURE__ */ s("span", { className: "text-xs font-semibold text-[#60697D]", children: p("gridHeader.dateFilter") }),
339
340
  /* @__PURE__ */ s(
340
341
  ue,
341
342
  {
342
- value: Z || void 0,
343
- onChange: (e) => te(e || null),
343
+ value: $ || void 0,
344
+ onChange: (e) => le(e || null),
344
345
  className: "w-full bg-white",
345
- onFocus: () => f(!0),
346
- onBlur: () => f(!1)
346
+ onFocus: () => u(!0),
347
+ onBlur: () => u(!1)
347
348
  }
348
349
  )
349
350
  ] })
350
351
  ] })
351
352
  ] })
352
353
  ] }),
353
- Ne(),
354
- Ae()
354
+ Ae(),
355
+ Ie()
355
356
  ] })
356
357
  ] });
357
358
  };
358
359
  export {
359
- tt as HeaderSearchInput
360
+ nt as HeaderSearchInput
360
361
  };