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