impact-nova 2.1.0-alpha.6 → 2.1.0-alpha.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.
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +6 -0
- package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
- package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
- package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +78 -73
- package/dist/components/data/ag-grid-react/headers/custom-header.js +3 -1
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +109 -100
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -2
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +4 -3
- package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
- package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
- package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
- package/dist/components/data/ag-grid-react/theme.js +93 -21
- package/dist/components/data/data-table/column-indicator.d.ts +1 -1
- package/dist/components/data/data-table/column-indicator.js +15 -11
- package/dist/components/data/data-table/data-table-column-def-pin.d.ts +9 -4
- package/dist/components/data/data-table/data-table-column-def-pin.js +38 -38
- package/dist/components/data/data-table/data-table-saved-views.js +37 -37
- package/dist/components/data/data-table/data-table-sheet.js +15 -17
- package/dist/components/data/data-table/data-table.js +62 -57
- package/dist/components/data/data-table/data-table.types.d.ts +7 -1
- package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
- package/dist/components/data/data-table/indicator-legend.js +20 -17
- package/dist/components/data/data-table/pin-switch.js +9 -9
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +133 -130
- package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
- package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
- package/dist/components/data/nested-list/nested-list.js +107 -97
- package/dist/components/data-display/calendar/calendar.d.ts +1 -1
- package/dist/components/data-display/calendar/calendar.js +194 -189
- package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
- package/dist/components/data-display/chart/chart-palette.js +28 -0
- package/dist/components/data-display/chart/chart.js +121 -115
- package/dist/components/data-display/chart/chart.utils.js +9 -6
- package/dist/components/data-display/chart/index.d.ts +1 -0
- package/dist/components/data-display/chart/index.js +15 -9
- package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
- package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
- package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
- package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
- package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
- package/dist/components/data-display/statistics-card/statistics-card.js +127 -146
- package/dist/components/feedback/alert-dialog/alert-dialog.js +15 -15
- package/dist/components/feedback/dialog/dialog.js +3 -3
- package/dist/components/feedback/drawer/drawer.js +32 -32
- package/dist/components/feedback/sheet/sheet.js +8 -8
- package/dist/components/feedback/sheet/sheet.variants.js +1 -1
- package/dist/components/feedback/toast/toast.js +83 -92
- package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
- package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
- package/dist/components/flows/command-palette/command-palette.js +245 -258
- package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
- package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
- package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
- package/dist/components/flows/filter-panel/filter-panel.js +99 -104
- package/dist/components/flows/filter-strip/filter-summary.js +41 -41
- package/dist/components/flows/filter-strip/filter-tag-list.js +48 -48
- package/dist/components/flows/wizard/wizard.js +32 -32
- package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
- package/dist/components/forms/choice-card/choice-card.js +156 -166
- package/dist/components/forms/combobox/combobox.js +70 -70
- package/dist/components/forms/date-picker/date-picker.js +31 -30
- package/dist/components/forms/file-upload/file-upload.js +146 -168
- package/dist/components/forms/prompt/prompt.js +47 -48
- package/dist/components/forms/select/components/SelectAllRow.js +14 -14
- package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
- package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
- package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
- package/dist/components/forms/select/components/SelectMenuPanel.js +8 -8
- package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
- package/dist/components/forms/select/select.d.ts +5 -4
- package/dist/components/forms/select/select.js +123 -120
- package/dist/components/forms/select/select.types.d.ts +95 -204
- package/dist/components/forms/slider/slider.js +17 -17
- package/dist/components/forms/smart-input/smart-input.js +49 -49
- package/dist/components/forms/textarea/textarea.js +25 -25
- package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
- package/dist/components/layout/header/header.d.ts +5 -17
- package/dist/components/layout/header/header.js +113 -116
- package/dist/components/layout/header/header.types.d.ts +3 -0
- package/dist/components/layout/sidebar/sidebar.js +5 -5
- package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
- package/dist/components/primitives/accordion/accordion.js +38 -41
- package/dist/components/primitives/kbd/kbd.variants.js +1 -1
- package/dist/i18n/defaultMessages.d.ts +2 -0
- package/dist/i18n/defaultMessages.js +6 -4
- package/dist/i18n/locales/de.js +2 -0
- package/dist/i18n/locales/es.js +2 -0
- package/dist/i18n/locales/hi.js +2 -0
- package/dist/i18n/locales/kn.js +2 -0
- package/dist/impact-nova-base.scss +8 -5
- package/dist/impact-nova-components.css +2 -2
- package/dist/impact-nova-tokens.scss +346 -189
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +505 -499
- package/dist/lib/primitives/create-component.d.ts +1 -1
- package/dist/lib/primitives/create-component.js +4 -4
- package/dist/lib/primitives/field.js +17 -18
- package/dist/lib/resolve-design-token-color.d.ts +5 -0
- package/dist/lib/resolve-design-token-color.js +12 -0
- package/dist/lib/virtualized/virtualized-list-parts.d.ts +1 -2
- package/dist/lib/virtualized/virtualized-list-parts.js +23 -23
- package/dist/lib/virtualized/virtualized.types.d.ts +10 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
- package/dist/theme/tokens/chart-series-palette.json.js +7 -0
- package/package.json +22 -254
- package/tailwind.config.js +10 -229
|
@@ -10,11 +10,11 @@ import { Select as Pe } from "../../../forms/select/select.js";
|
|
|
10
10
|
import { Popover as Ke, PopoverTrigger as Qe, PopoverContent as Xe, PopoverHeader as Ze, PopoverTitle as $e, PopoverBody as et } from "../../../feedback/popover/popover.js";
|
|
11
11
|
import { useImpactNovaI18n as tt } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
12
12
|
import { useGridHeader as rt } from "./context/grid-header-context.js";
|
|
13
|
-
import { getMultiFilterIndices as
|
|
13
|
+
import { getMultiFilterIndices as H, parseInputPattern as we, mapOperatorToAgGrid as ke } from "./utils/filter-utils.js";
|
|
14
14
|
import { DEFAULT_DATE_DISPLAY_FORMAT as lt, serializeWeek as nt, serializeMonth as at, serializeDate as ot, displayDateToIso as Z } from "./utils/date-utils.js";
|
|
15
15
|
import { useHeaderSearchEditingState as st } from "./use-header-search-editing-state.js";
|
|
16
16
|
const Tt = ({
|
|
17
|
-
column:
|
|
17
|
+
column: P,
|
|
18
18
|
api: x,
|
|
19
19
|
onClose: $,
|
|
20
20
|
handleInlineSearch: ee,
|
|
@@ -32,48 +32,44 @@ const Tt = ({
|
|
|
32
32
|
enableBooleanParsing: Be = !1,
|
|
33
33
|
enableDateParsing: Ie = !1
|
|
34
34
|
}) => {
|
|
35
|
-
const { t: i } = tt(),
|
|
35
|
+
const { t: i } = tt(), l = P.getColDef(), d = P.getColId(), G = l?.filter || "agTextColumnFilter", M = G === "agDateColumnFilter", V = G === "agSetColumnFilter" || Y && Y.length > 0 || l?.cellDataType === "boolean", L = l?.headerComponentParams?.datePickerVariant || "date", z = M && L === "month", B = M && L === "week", c = l?.headerComponentParams?.fiscalConfig, b = l?.headerComponentParams?.dateDisplayFormat || lt, oe = rt(), _ = Le(null), {
|
|
36
36
|
searchText: U,
|
|
37
|
-
dateDisplayString:
|
|
37
|
+
dateDisplayString: I,
|
|
38
38
|
selectedDate: se,
|
|
39
39
|
selectedMonth: ie,
|
|
40
40
|
selectedWeek: ce,
|
|
41
|
-
updateDraft:
|
|
41
|
+
updateDraft: w,
|
|
42
42
|
handleFocus: p,
|
|
43
43
|
handleBlur: h,
|
|
44
44
|
clearEditingOverlay: Oe
|
|
45
45
|
} = st({
|
|
46
46
|
api: x,
|
|
47
47
|
colId: d,
|
|
48
|
-
colDef:
|
|
48
|
+
colDef: l,
|
|
49
49
|
isDateFilter: M,
|
|
50
|
-
isMonthVariant:
|
|
51
|
-
isWeekVariant:
|
|
50
|
+
isMonthVariant: z,
|
|
51
|
+
isWeekVariant: B,
|
|
52
52
|
datePickerVariant: L,
|
|
53
53
|
dateDisplayFormat: b
|
|
54
54
|
}), D = (e, t) => {
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
|
|
55
|
+
const n = (a) => a.replace(/[^0-9.\-+eE]/g, ""), s = (a, R) => {
|
|
56
|
+
const S = we(
|
|
57
|
+
a,
|
|
58
58
|
ze,
|
|
59
59
|
Be,
|
|
60
60
|
Ie
|
|
61
61
|
);
|
|
62
|
-
if (
|
|
63
|
-
input: l,
|
|
64
|
-
filterType: A,
|
|
65
|
-
parsed: P
|
|
66
|
-
}), P.conditions.length === 0) return null;
|
|
62
|
+
if (S.conditions.length === 0) return null;
|
|
67
63
|
const Ce = (u) => {
|
|
68
64
|
let F = ke(u.operator);
|
|
69
|
-
if (
|
|
70
|
-
const Me = parseFloat(
|
|
65
|
+
if (R === "number") {
|
|
66
|
+
const Me = parseFloat(n(u.value));
|
|
71
67
|
return ["contains", "notContains", "startsWith", "endsWith"].includes(
|
|
72
68
|
F
|
|
73
69
|
) && (F = F === "notContains" ? "notEqual" : "equals"), u.operator === "inRange" ? {
|
|
74
70
|
type: F,
|
|
75
|
-
filter: parseFloat(
|
|
76
|
-
filterTo: parseFloat(
|
|
71
|
+
filter: parseFloat(n(u.value)) || 0,
|
|
72
|
+
filterTo: parseFloat(n(u.valueTo || "")) || 0,
|
|
77
73
|
filterType: "number"
|
|
78
74
|
} : isNaN(Me) ? null : { type: F, filter: Me, filterType: "number" };
|
|
79
75
|
}
|
|
@@ -84,18 +80,18 @@ const Tt = ({
|
|
|
84
80
|
filterType: "text"
|
|
85
81
|
};
|
|
86
82
|
};
|
|
87
|
-
let
|
|
88
|
-
if (
|
|
89
|
-
|
|
83
|
+
let A = null;
|
|
84
|
+
if (S.conditions.length === 1)
|
|
85
|
+
A = Ce(S.conditions[0]);
|
|
90
86
|
else {
|
|
91
|
-
const u =
|
|
92
|
-
u.length === 0 ?
|
|
93
|
-
filterType:
|
|
94
|
-
operator:
|
|
87
|
+
const u = S.conditions.map(Ce).filter((F) => F !== null);
|
|
88
|
+
u.length === 0 ? A = null : u.length === 1 ? A = u[0] : A = {
|
|
89
|
+
filterType: R,
|
|
90
|
+
operator: S.logic,
|
|
95
91
|
conditions: u
|
|
96
92
|
};
|
|
97
93
|
}
|
|
98
|
-
return
|
|
94
|
+
return A;
|
|
99
95
|
};
|
|
100
96
|
let o = null;
|
|
101
97
|
if (!(e === null || e === "" || Array.isArray(e) && e.length === 0))
|
|
@@ -105,31 +101,31 @@ const Tt = ({
|
|
|
105
101
|
filterType: "set"
|
|
106
102
|
};
|
|
107
103
|
else if (t === "date")
|
|
108
|
-
if (
|
|
109
|
-
const
|
|
104
|
+
if (B && e && typeof e == "object" && "startDate" in e && "endDate" in e) {
|
|
105
|
+
const a = nt(e);
|
|
110
106
|
o = {
|
|
111
107
|
type: "inRange",
|
|
112
|
-
dateFrom:
|
|
113
|
-
dateTo:
|
|
108
|
+
dateFrom: a.dateFrom,
|
|
109
|
+
dateTo: a.dateTo,
|
|
114
110
|
filterType: "date"
|
|
115
111
|
};
|
|
116
|
-
} else if (
|
|
117
|
-
const
|
|
112
|
+
} else if (z && e && typeof e == "object" && "month" in e && "year" in e) {
|
|
113
|
+
const a = at(e);
|
|
118
114
|
o = {
|
|
119
115
|
type: "inRange",
|
|
120
|
-
dateFrom:
|
|
121
|
-
dateTo:
|
|
116
|
+
dateFrom: a.dateFrom,
|
|
117
|
+
dateTo: a.dateTo,
|
|
122
118
|
filterType: "date"
|
|
123
119
|
};
|
|
124
120
|
} else {
|
|
125
|
-
const
|
|
126
|
-
o =
|
|
121
|
+
const a = e instanceof Date ? ot(e) : null;
|
|
122
|
+
o = a ? { type: "equals", dateFrom: a, filterType: "date" } : null;
|
|
127
123
|
}
|
|
128
124
|
else {
|
|
129
|
-
const
|
|
130
|
-
o = s(String(e),
|
|
125
|
+
const a = l.filter === "agMultiColumnFilter" ? H(l) : null, R = a ? a.text !== -1 ? "text" : "number" : G === "agNumberColumnFilter" ? "number" : "text";
|
|
126
|
+
o = s(String(e), R);
|
|
131
127
|
}
|
|
132
|
-
const f =
|
|
128
|
+
const f = l.filter === "agMultiColumnFilter" ? H(l) : null, T = f ? t === "text" ? f.text !== -1 ? f.text : f.number : t === "set" ? f.set : f.date : 0;
|
|
133
129
|
K(o, T);
|
|
134
130
|
}, J = (e) => {
|
|
135
131
|
if (ee) {
|
|
@@ -139,27 +135,27 @@ const Tt = ({
|
|
|
139
135
|
D(e, M ? "date" : "text");
|
|
140
136
|
}, de = (e) => {
|
|
141
137
|
const t = e.target.value;
|
|
142
|
-
|
|
138
|
+
w({ searchText: t }), J(t);
|
|
143
139
|
}, ue = (e) => {
|
|
144
|
-
|
|
140
|
+
w({ selectedDate: e }), J(e);
|
|
145
141
|
}, fe = (e) => {
|
|
146
|
-
|
|
142
|
+
w({ selectedMonth: e }), D(e || null, "date");
|
|
147
143
|
}, pe = (e) => {
|
|
148
|
-
|
|
144
|
+
w({ selectedWeek: e }), D(e || null, "date");
|
|
149
145
|
}, We = (e) => {
|
|
150
146
|
if (!e.trim()) return null;
|
|
151
147
|
const t = we(e, !1, !1, !1);
|
|
152
148
|
if (t.conditions.length === 0) return null;
|
|
153
|
-
const
|
|
149
|
+
const n = (o) => {
|
|
154
150
|
let v = ke(o.operator);
|
|
155
151
|
if (["contains", "notContains", "startsWith", "endsWith"].includes(
|
|
156
152
|
v
|
|
157
153
|
) && (v = v === "notContains" ? "notEqual" : "equals"), o.operator === "inRange") {
|
|
158
|
-
let T = Z(o.value, b),
|
|
159
|
-
return !T || !
|
|
154
|
+
let T = Z(o.value, b), a = Z(o.valueTo || "", b);
|
|
155
|
+
return !T || !a ? null : (T > a && ([T, a] = [a, T]), {
|
|
160
156
|
type: "inRange",
|
|
161
157
|
dateFrom: T,
|
|
162
|
-
dateTo:
|
|
158
|
+
dateTo: a,
|
|
163
159
|
filterType: "date"
|
|
164
160
|
});
|
|
165
161
|
}
|
|
@@ -171,8 +167,8 @@ const Tt = ({
|
|
|
171
167
|
} : null;
|
|
172
168
|
};
|
|
173
169
|
if (t.conditions.length === 1)
|
|
174
|
-
return
|
|
175
|
-
const s = t.conditions.map(
|
|
170
|
+
return n(t.conditions[0]);
|
|
171
|
+
const s = t.conditions.map(n).filter((o) => o !== null);
|
|
176
172
|
return s.length === 0 ? null : s.length === 1 ? s[0] : {
|
|
177
173
|
filterType: "date",
|
|
178
174
|
operator: t.logic,
|
|
@@ -180,10 +176,10 @@ const Tt = ({
|
|
|
180
176
|
};
|
|
181
177
|
}, K = X(
|
|
182
178
|
(e, t) => {
|
|
183
|
-
const
|
|
184
|
-
if (
|
|
179
|
+
const n = x.getFilterModel(), s = { ...n };
|
|
180
|
+
if (l.filter === "agMultiColumnFilter") {
|
|
185
181
|
if (t === -1) return;
|
|
186
|
-
const o =
|
|
182
|
+
const o = n[d], v = o && o.filterType === "multi" ? [...o.filterModels || []] : Array(l.filterParams?.filters?.length || 1).fill(null);
|
|
187
183
|
v[t] = e, v.every((f) => f === null) ? delete s[d] : s[d] = {
|
|
188
184
|
filterType: "multi",
|
|
189
185
|
filterModels: v
|
|
@@ -192,35 +188,35 @@ const Tt = ({
|
|
|
192
188
|
e ? s[d] = e : delete s[d];
|
|
193
189
|
x.setFilterModel(s), x.onFilterChanged();
|
|
194
190
|
},
|
|
195
|
-
[x, d,
|
|
191
|
+
[x, d, l]
|
|
196
192
|
), he = X(
|
|
197
193
|
(e) => {
|
|
198
|
-
const t =
|
|
194
|
+
const t = l.filter === "agMultiColumnFilter" ? H(l).date : 0;
|
|
199
195
|
K(e, t);
|
|
200
196
|
},
|
|
201
|
-
[
|
|
197
|
+
[l, K]
|
|
202
198
|
), me = (e) => {
|
|
203
199
|
const t = e.target.value.replace(/[^0-9/\-!=><+,~]/g, "");
|
|
204
|
-
if (
|
|
200
|
+
if (w({ dateDisplayString: t }), !t.trim()) {
|
|
205
201
|
he(null);
|
|
206
202
|
return;
|
|
207
203
|
}
|
|
208
|
-
const
|
|
209
|
-
|
|
204
|
+
const n = We(t);
|
|
205
|
+
n && he(n);
|
|
210
206
|
}, Q = () => {
|
|
211
207
|
Oe(), J(""), te && te();
|
|
212
|
-
},
|
|
208
|
+
}, O = (e) => {
|
|
213
209
|
D(e, "set");
|
|
214
|
-
},
|
|
210
|
+
}, W = Y || (l?.cellDataType === "boolean" ? [
|
|
215
211
|
{ label: i("gridHeader.true"), value: "true" },
|
|
216
212
|
{ label: i("gridHeader.false"), value: "false" }
|
|
217
213
|
] : []), ge = X(() => {
|
|
218
214
|
const e = x.getFilterModel()[d];
|
|
219
215
|
if (!e) return [];
|
|
220
216
|
if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
|
|
221
|
-
const
|
|
222
|
-
if (
|
|
223
|
-
const s = e.filterModels[
|
|
217
|
+
const n = H(P.getColDef()).set;
|
|
218
|
+
if (n !== -1) {
|
|
219
|
+
const s = e.filterModels[n];
|
|
224
220
|
if (s?.filterType === "set" && s.values)
|
|
225
221
|
return s.values.filter((o) => o != null);
|
|
226
222
|
}
|
|
@@ -231,29 +227,29 @@ const Tt = ({
|
|
|
231
227
|
return [String(e.filter)];
|
|
232
228
|
}
|
|
233
229
|
return [];
|
|
234
|
-
}, [x, d,
|
|
235
|
-
const e =
|
|
236
|
-
return C ?
|
|
230
|
+
}, [x, d, P]), [E, k] = _e(null), ve = () => {
|
|
231
|
+
const e = E !== null ? E : ge();
|
|
232
|
+
return C ? W.filter((t) => e.includes(t.value)) : W.find((t) => e.includes(t.value)) || null;
|
|
237
233
|
}, ye = (e) => {
|
|
238
234
|
let t = [];
|
|
239
|
-
if (Array.isArray(e) ? t = e.map((
|
|
240
|
-
|
|
235
|
+
if (Array.isArray(e) ? t = e.map((n) => n.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !C) {
|
|
236
|
+
O(t), e && $();
|
|
241
237
|
return;
|
|
242
238
|
}
|
|
243
|
-
|
|
239
|
+
k(t);
|
|
244
240
|
}, Ee = () => {
|
|
245
|
-
|
|
241
|
+
O([]), k([]);
|
|
246
242
|
}, Re = (e) => {
|
|
247
243
|
if (C) {
|
|
248
244
|
if (e !== void 0) {
|
|
249
245
|
let t = [];
|
|
250
|
-
Array.isArray(e) ? t = e.map((
|
|
246
|
+
Array.isArray(e) ? t = e.map((n) => n.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), O(t), k(null);
|
|
251
247
|
return;
|
|
252
248
|
}
|
|
253
|
-
|
|
249
|
+
E !== null && (O(E), k(null));
|
|
254
250
|
}
|
|
255
251
|
}, je = () => {
|
|
256
|
-
|
|
252
|
+
k(ge()), ne && ne();
|
|
257
253
|
}, qe = () => Se ? /* @__PURE__ */ r(
|
|
258
254
|
"svg",
|
|
259
255
|
{
|
|
@@ -265,7 +261,7 @@ const Tt = ({
|
|
|
265
261
|
width: "18",
|
|
266
262
|
height: "18",
|
|
267
263
|
onClick: (e) => {
|
|
268
|
-
e.stopPropagation(), _.current && _.current.blur(), re ? re(
|
|
264
|
+
e.stopPropagation(), _.current && _.current.blur(), re ? re(P) : le ? le(d) : oe && oe.openAdvancedFilter(d);
|
|
269
265
|
},
|
|
270
266
|
children: /* @__PURE__ */ r("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" })
|
|
271
267
|
}
|
|
@@ -276,21 +272,21 @@ const Tt = ({
|
|
|
276
272
|
className: "cursor-pointer shrink-0 text-brand hover:text-brand-strong",
|
|
277
273
|
children: /* @__PURE__ */ r(j, { size: "xs" })
|
|
278
274
|
}
|
|
279
|
-
), N =
|
|
275
|
+
), N = l.filter === "agMultiColumnFilter", m = H(l);
|
|
280
276
|
let g = "text";
|
|
281
277
|
N ? g = m.set !== -1 ? "set" : m.date !== -1 ? "date" : "text" : V ? g = "set" : M && (g = "date");
|
|
282
278
|
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) => {
|
|
283
|
-
const
|
|
284
|
-
return e !== null &&
|
|
279
|
+
const n = t === m.text || t === m.number ? "text" : t === m.set ? "set" : "date";
|
|
280
|
+
return e !== null && n !== g;
|
|
285
281
|
});
|
|
286
282
|
return /* @__PURE__ */ y("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-brand-tint px-1 py-2 ag-header-cell-search-active h-full", children: [
|
|
287
283
|
g === "set" && xe ? /* @__PURE__ */ r(
|
|
288
284
|
Pe,
|
|
289
285
|
{
|
|
290
|
-
options:
|
|
286
|
+
options: W,
|
|
291
287
|
value: ve(),
|
|
292
288
|
onChange: ye,
|
|
293
|
-
isMulti: C !== void 0 ? C :
|
|
289
|
+
isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
|
|
294
290
|
placeholder: i("filter.select"),
|
|
295
291
|
className: "w-full bg-canvas-elevated",
|
|
296
292
|
parentClassName: "flex-1 min-w-0",
|
|
@@ -306,10 +302,10 @@ const Tt = ({
|
|
|
306
302
|
onFocus: p,
|
|
307
303
|
onBlur: h
|
|
308
304
|
}
|
|
309
|
-
) : g === "date" && be ?
|
|
305
|
+
) : g === "date" && be ? I ? /* @__PURE__ */ r(
|
|
310
306
|
q,
|
|
311
307
|
{
|
|
312
|
-
value:
|
|
308
|
+
value: I,
|
|
313
309
|
onChange: me,
|
|
314
310
|
placeholder: i("filter.search"),
|
|
315
311
|
className: "w-full bg-canvas-elevated",
|
|
@@ -327,7 +323,7 @@ const Tt = ({
|
|
|
327
323
|
}
|
|
328
324
|
)
|
|
329
325
|
}
|
|
330
|
-
) :
|
|
326
|
+
) : B ? /* @__PURE__ */ r(
|
|
331
327
|
Ne,
|
|
332
328
|
{
|
|
333
329
|
value: ce || void 0,
|
|
@@ -345,7 +341,7 @@ const Tt = ({
|
|
|
345
341
|
fiscalYearStartMonth: c?.fiscalYearStartMonth,
|
|
346
342
|
weekStartsOn: c?.weekStartsOn
|
|
347
343
|
}
|
|
348
|
-
) :
|
|
344
|
+
) : z ? /* @__PURE__ */ r(
|
|
349
345
|
De,
|
|
350
346
|
{
|
|
351
347
|
value: ie || void 0,
|
|
@@ -440,10 +436,10 @@ const Tt = ({
|
|
|
440
436
|
/* @__PURE__ */ r(
|
|
441
437
|
Pe,
|
|
442
438
|
{
|
|
443
|
-
options:
|
|
439
|
+
options: W,
|
|
444
440
|
value: ve(),
|
|
445
441
|
onChange: ye,
|
|
446
|
-
isMulti: C !== void 0 ? C :
|
|
442
|
+
isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
|
|
447
443
|
placeholder: i("filter.select"),
|
|
448
444
|
className: "w-full bg-canvas-elevated",
|
|
449
445
|
isLoading: ae,
|
|
@@ -454,10 +450,10 @@ const Tt = ({
|
|
|
454
450
|
] }),
|
|
455
451
|
g !== "date" && be && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
|
|
456
452
|
/* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.dateFilter") }),
|
|
457
|
-
|
|
453
|
+
I ? /* @__PURE__ */ r(
|
|
458
454
|
q,
|
|
459
455
|
{
|
|
460
|
-
value:
|
|
456
|
+
value: I,
|
|
461
457
|
onChange: me,
|
|
462
458
|
className: "w-full bg-canvas-elevated",
|
|
463
459
|
onFocus: p,
|
|
@@ -473,7 +469,7 @@ const Tt = ({
|
|
|
473
469
|
}
|
|
474
470
|
)
|
|
475
471
|
}
|
|
476
|
-
) :
|
|
472
|
+
) : B ? /* @__PURE__ */ r(
|
|
477
473
|
Ne,
|
|
478
474
|
{
|
|
479
475
|
value: ce || void 0,
|
|
@@ -488,7 +484,7 @@ const Tt = ({
|
|
|
488
484
|
fiscalYearStartMonth: c?.fiscalYearStartMonth,
|
|
489
485
|
weekStartsOn: c?.weekStartsOn
|
|
490
486
|
}
|
|
491
|
-
) :
|
|
487
|
+
) : z ? /* @__PURE__ */ r(
|
|
492
488
|
De,
|
|
493
489
|
{
|
|
494
490
|
value: ie || void 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgGridWrapperProps } from './ag-grid.types';
|
|
2
2
|
import { subscribeGridApiEvent, subscribeGridApiEvents } from './grid-api-event-subscription';
|
|
3
3
|
export { subscribeGridApiEvent, subscribeGridApiEvents };
|
|
4
|
-
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, autoSizeStrategy, tooltipShowMode, tooltipShowDelay, tooltipHideDelay, tooltipInteraction, ...restProps }: AgGridWrapperProps<TData> & {
|
|
4
|
+
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, autoSizeStrategy, tooltipShowMode, tooltipShowDelay, tooltipHideDelay, tooltipInteraction, themeOverride, ...restProps }: AgGridWrapperProps<TData> & {
|
|
5
5
|
className?: string;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|