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