impact-nova 1.9.0-alpha.2 → 2.0.0
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/cell-renderers/percent-progress-display-renderer.js +4 -4
- package/dist/components/ui/ag-grid-react/index.d.ts +2 -1
- package/dist/components/ui/ag-grid-react/index.js +136 -129
- package/dist/components/ui/ag-grid-react/refreshGridAutoSizeStrategy.d.ts +7 -0
- package/dist/components/ui/ag-grid-react/refreshGridAutoSizeStrategy.js +30 -0
- package/dist/components/ui/ag-grid-react/useGridAutoSizeStrategyOnResize.d.ts +7 -0
- package/dist/components/ui/ag-grid-react/useGridAutoSizeStrategyOnResize.js +33 -0
- package/dist/components/ui/empty-container/emptyStateIllustrations.d.ts +15 -31
- package/dist/components/ui/empty-container/emptyStateIllustrations.js +32 -21
- package/dist/components/ui/empty-container/illustrations/empty-state-1.d.ts +3 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-1.js +7 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-2.d.ts +3 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-2.js +7 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-3.d.ts +3 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-3.js +7 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-4.d.ts +3 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-4.js +7 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-5.d.ts +3 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-5.js +7 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-6.d.ts +3 -0
- package/dist/components/ui/empty-container/illustrations/empty-state-6.js +7 -0
- package/dist/components/ui/empty-container.js +60 -53
- package/dist/components/ui/progress-bar.js +4 -0
- package/dist/i18n/locales/index.js +10 -0
- package/dist/index.d.ts +0 -56
- package/dist/index.js +153 -153
- package/dist/lib/virtualized/index.js +18 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/migration.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 +8 -1
package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as c, jsxs as V } from "react/jsx-runtime";
|
|
2
2
|
import { Badge as j } from "../../badge.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Progress as w } from "../../progress.js";
|
|
4
|
+
import { cn as $ } from "../../../../lib/utils.js";
|
|
5
5
|
function E(e) {
|
|
6
6
|
return e && typeof e == "object" && "value" in e ? e.value : e;
|
|
7
7
|
}
|
|
@@ -28,7 +28,7 @@ const _ = (e) => {
|
|
|
28
28
|
className: `w-full h-full flex items-center ag-cell-inner-padding ${b ?? ""} ${n ? "opacity-60 cursor-not-allowed" : t ? "in-ag-editable-cell-highlight" : ""}`,
|
|
29
29
|
children: /* @__PURE__ */ V("div", { className: "flex w-full min-w-0 items-center gap-2", children: [
|
|
30
30
|
/* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ c(
|
|
31
|
-
|
|
31
|
+
w,
|
|
32
32
|
{
|
|
33
33
|
label: !1,
|
|
34
34
|
variant: N,
|
|
@@ -47,7 +47,7 @@ const _ = (e) => {
|
|
|
47
47
|
color: x,
|
|
48
48
|
shape: p,
|
|
49
49
|
size: "sm",
|
|
50
|
-
className:
|
|
50
|
+
className: $("shrink-0 tabular-nums leading-none", !i && "text-content-empty"),
|
|
51
51
|
children: M
|
|
52
52
|
}
|
|
53
53
|
)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AgGridWrapperProps } from '../types/ag-grid.types';
|
|
2
|
-
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, ...restProps }: AgGridWrapperProps<TData> & {
|
|
2
|
+
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, autoSizeStrategy, ...restProps }: AgGridWrapperProps<TData> & {
|
|
3
3
|
className?: string;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default AgGridWrapper;
|
|
6
|
+
export { refreshGridAutoSizeStrategy } from './refreshGridAutoSizeStrategy';
|
|
6
7
|
export { subscribeGridApiEvent, subscribeGridApiEvents } from './grid-api-event-subscription';
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { ModuleRegistry as
|
|
4
|
-
import { AllEnterpriseModule as
|
|
5
|
-
import { AgGridReact as
|
|
6
|
-
import { customAgGridTheme as
|
|
7
|
-
import { CustomHeader as
|
|
8
|
-
import { CustomHeaderGroup as
|
|
9
|
-
import { DefaultTextCellRenderer as
|
|
10
|
-
import { GridHeaderContext as
|
|
11
|
-
import { convertToAgGridFilterModel as
|
|
12
|
-
import { ColumnSettingsMenu as
|
|
13
|
-
import { AG_GRID_VALUE_FORMATTERS as
|
|
1
|
+
import { jsxs as fe, jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as me, useRef as F, useState as T, useCallback as f, useMemo as y, useEffect as ge, Suspense as he } from "react";
|
|
3
|
+
import { ModuleRegistry as Ce, AllCommunityModule as ye, ValidationModule as ve } from "ag-grid-community";
|
|
4
|
+
import { AllEnterpriseModule as be } from "ag-grid-enterprise";
|
|
5
|
+
import { AgGridReact as xe } from "ag-grid-react";
|
|
6
|
+
import { customAgGridTheme as Fe } from "./theme.js";
|
|
7
|
+
import { CustomHeader as Se } from "./headers/custom-header.js";
|
|
8
|
+
import { CustomHeaderGroup as Me } from "./headers/custom-header-group.js";
|
|
9
|
+
import { DefaultTextCellRenderer as Ee } from "./cell-renderers/default-text-cell-renderer.js";
|
|
10
|
+
import { GridHeaderContext as Ae } from "./headers/context/grid-header-context.js";
|
|
11
|
+
import { convertToAgGridFilterModel as Ge, getMultiFilterIndices as Re, convertFromAgGridFilterModel as ke } from "./headers/utils/filter-utils.js";
|
|
12
|
+
import { ColumnSettingsMenu as je } from "./headers/column-menu/column-settings-menu.js";
|
|
13
|
+
import { AG_GRID_VALUE_FORMATTERS as Te } from "./value-formatters.js";
|
|
14
|
+
import { useGridAutoSizeStrategyOnResize as we } from "./useGridAutoSizeStrategyOnResize.js";
|
|
14
15
|
/* empty css */
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
import { refreshGridAutoSizeStrategy as et } from "./refreshGridAutoSizeStrategy.js";
|
|
17
|
+
import { subscribeGridApiEvent as rt, subscribeGridApiEvents as nt } from "./grid-api-event-subscription.js";
|
|
18
|
+
const Pe = me(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
19
|
+
Ce.registerModules([ye, be, ve]);
|
|
20
|
+
const S = "", H = "";
|
|
21
|
+
function U(i) {
|
|
20
22
|
return i.getColumns()?.some((n) => n.getColDef().headerCheckboxSelection) ?? !1;
|
|
21
23
|
}
|
|
22
|
-
const
|
|
24
|
+
const W = (i) => {
|
|
23
25
|
if (!i) return;
|
|
24
26
|
const n = i.cellRendererParams?.splits;
|
|
25
27
|
if (Array.isArray(n) && n.length > 0) return n;
|
|
26
28
|
const l = i.cellEditorParams?.splits;
|
|
27
29
|
if (Array.isArray(l) && l.length > 0) return l;
|
|
28
|
-
},
|
|
30
|
+
}, z = (i, n) => {
|
|
29
31
|
const l = [];
|
|
30
32
|
for (const h of n) {
|
|
31
33
|
const m = h?.field?.split(".").pop();
|
|
@@ -33,18 +35,18 @@ const U = (i) => {
|
|
|
33
35
|
l.push("");
|
|
34
36
|
continue;
|
|
35
37
|
}
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
+
const a = i[m];
|
|
39
|
+
if (a == null) {
|
|
38
40
|
l.push("");
|
|
39
41
|
continue;
|
|
40
42
|
}
|
|
41
|
-
if (typeof
|
|
42
|
-
const c =
|
|
43
|
+
if (typeof a == "object" && "value" in a) {
|
|
44
|
+
const c = a.value;
|
|
43
45
|
l.push(c == null ? "" : String(c));
|
|
44
46
|
continue;
|
|
45
47
|
}
|
|
46
|
-
if (typeof
|
|
47
|
-
l.push(String(
|
|
48
|
+
if (typeof a != "object") {
|
|
49
|
+
l.push(String(a));
|
|
48
50
|
continue;
|
|
49
51
|
}
|
|
50
52
|
l.push("");
|
|
@@ -66,21 +68,24 @@ const U = (i) => {
|
|
|
66
68
|
document.body.removeChild(n);
|
|
67
69
|
}
|
|
68
70
|
};
|
|
69
|
-
function
|
|
71
|
+
function Qe({
|
|
70
72
|
children: i,
|
|
71
73
|
defaultColDef: n,
|
|
72
74
|
defaultColGroupDef: l,
|
|
73
75
|
columnDefs: h,
|
|
74
76
|
valueFormatters: m,
|
|
75
|
-
onGridReady:
|
|
77
|
+
onGridReady: a,
|
|
76
78
|
onGridPreDestroyed: c,
|
|
77
79
|
onFilterChanged: b,
|
|
78
80
|
onSelectionChanged: C,
|
|
79
81
|
onModelUpdated: M,
|
|
80
|
-
ensureDomOrder:
|
|
82
|
+
ensureDomOrder: w = !0,
|
|
83
|
+
autoSizeStrategy: P,
|
|
81
84
|
...g
|
|
82
85
|
}) {
|
|
83
|
-
const
|
|
86
|
+
const u = F(null), I = F(null), [D, L] = T(null);
|
|
87
|
+
we(D, I, P);
|
|
88
|
+
const [J, N] = T(!1), [X, _] = T(null), [B, V] = T(!1), E = F(null), O = F(null), A = F(null), Q = f(() => [], []), Y = y(() => ({
|
|
84
89
|
numericColumn: {
|
|
85
90
|
cellClass: "ag-right-aligned-cell",
|
|
86
91
|
headerClass: "ag-right-aligned-header",
|
|
@@ -103,66 +108,66 @@ function Je({
|
|
|
103
108
|
}
|
|
104
109
|
}), []), G = y(() => ({
|
|
105
110
|
openSearch: (e) => {
|
|
106
|
-
if (!
|
|
107
|
-
const t =
|
|
108
|
-
|
|
111
|
+
if (!u.current) return;
|
|
112
|
+
const t = u.current.getGridOption("context") || {};
|
|
113
|
+
u.current.setGridOption("context", { ...t, activeSearchColumnId: e }), u.current.refreshHeader();
|
|
109
114
|
},
|
|
110
115
|
closeSearch: () => {
|
|
111
|
-
if (!
|
|
112
|
-
const e =
|
|
113
|
-
|
|
116
|
+
if (!u.current) return;
|
|
117
|
+
const e = u.current.getGridOption("context") || {};
|
|
118
|
+
u.current.setGridOption("context", { ...e, activeSearchColumnId: null }), u.current.refreshHeader();
|
|
114
119
|
},
|
|
115
120
|
openAdvancedFilter: (e) => {
|
|
116
|
-
|
|
121
|
+
_(e || null), N(!0);
|
|
117
122
|
},
|
|
118
123
|
closeAdvancedFilter: () => {
|
|
119
|
-
|
|
124
|
+
N(!1), _(null);
|
|
120
125
|
},
|
|
121
126
|
applyAdvancedFilter: (e) => {
|
|
122
|
-
if (!
|
|
123
|
-
const t =
|
|
124
|
-
|
|
127
|
+
if (!u.current) return;
|
|
128
|
+
const t = Ge(e);
|
|
129
|
+
u.current.setFilterModel(t), u.current.onFilterChanged(), u.current.refreshHeader();
|
|
125
130
|
},
|
|
126
131
|
openMenu: (e, t, o = "column") => {
|
|
127
|
-
|
|
132
|
+
E.current = e, O.current = t, A.current = o, V(!0);
|
|
128
133
|
},
|
|
129
134
|
closeMenu: () => {
|
|
130
|
-
|
|
135
|
+
E.current = null, O.current = null, A.current = null, V(!1);
|
|
131
136
|
},
|
|
132
137
|
// Getters read from refs - O(1) per header, no memory allocation
|
|
133
138
|
get activeMenuColumnId() {
|
|
134
|
-
return
|
|
139
|
+
return E.current;
|
|
135
140
|
},
|
|
136
141
|
get activeMenuVariant() {
|
|
137
|
-
return
|
|
142
|
+
return A.current;
|
|
138
143
|
}
|
|
139
|
-
}), []),
|
|
140
|
-
|
|
144
|
+
}), []), Z = f((e) => {
|
|
145
|
+
u.current = e.api, L(e.api);
|
|
141
146
|
const t = e.api.getGridOption("context") || {};
|
|
142
|
-
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }),
|
|
143
|
-
}, [
|
|
147
|
+
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), a && a(e);
|
|
148
|
+
}, [a]), ee = f(
|
|
144
149
|
(e) => {
|
|
145
|
-
|
|
150
|
+
u.current = null, L(null), c?.(e);
|
|
146
151
|
},
|
|
147
152
|
[c]
|
|
148
|
-
),
|
|
153
|
+
), te = f(
|
|
149
154
|
(e) => {
|
|
150
155
|
e.api.refreshHeader(), b?.(e);
|
|
151
156
|
},
|
|
152
157
|
[b]
|
|
153
|
-
),
|
|
158
|
+
), re = f(
|
|
154
159
|
(e) => {
|
|
155
|
-
|
|
160
|
+
U(e.api) && e.api.refreshHeader(), C?.(e);
|
|
156
161
|
},
|
|
157
162
|
[C]
|
|
158
|
-
),
|
|
163
|
+
), ne = f(
|
|
159
164
|
(e) => {
|
|
160
|
-
e.api.getGridOption("rowModelType") !== "serverSide" &&
|
|
165
|
+
e.api.getGridOption("rowModelType") !== "serverSide" && U(e.api) && e.api.refreshHeader(), M?.(e);
|
|
161
166
|
},
|
|
162
167
|
[M]
|
|
163
168
|
);
|
|
164
|
-
|
|
165
|
-
const e =
|
|
169
|
+
ge(() => {
|
|
170
|
+
const e = I.current;
|
|
166
171
|
if (!e) return;
|
|
167
172
|
const t = (o) => {
|
|
168
173
|
if (o.key !== "Enter" && o.key !== " ") return;
|
|
@@ -175,12 +180,12 @@ function Je({
|
|
|
175
180
|
};
|
|
176
181
|
return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
|
|
177
182
|
}, []);
|
|
178
|
-
const
|
|
179
|
-
headerComponent:
|
|
183
|
+
const oe = y(() => ({
|
|
184
|
+
headerComponent: Se,
|
|
180
185
|
// Default cell renderer wraps text in a span so display:flex centering
|
|
181
186
|
// and text-overflow:ellipsis both work (ellipsis doesn't work on
|
|
182
187
|
// anonymous flex text nodes, but works on flex child elements).
|
|
183
|
-
cellRenderer:
|
|
188
|
+
cellRenderer: Ee,
|
|
184
189
|
...n,
|
|
185
190
|
suppressHeaderKeyboardEvent: (e) => {
|
|
186
191
|
const { event: t } = e, o = t.target;
|
|
@@ -199,34 +204,34 @@ function Je({
|
|
|
199
204
|
headerComponentParams: {
|
|
200
205
|
...n?.headerComponentParams
|
|
201
206
|
}
|
|
202
|
-
}), [n]),
|
|
203
|
-
headerGroupComponent:
|
|
207
|
+
}), [n]), le = y(() => ({
|
|
208
|
+
headerGroupComponent: Me,
|
|
204
209
|
...l,
|
|
205
210
|
headerGroupComponentParams: {
|
|
206
211
|
...l?.headerGroupComponentParams
|
|
207
212
|
}
|
|
208
|
-
}), [l]),
|
|
209
|
-
...
|
|
213
|
+
}), [l]), ie = y(() => ({
|
|
214
|
+
...Te,
|
|
210
215
|
// Always available - value formatters
|
|
211
216
|
...g.components,
|
|
212
217
|
// User components override
|
|
213
218
|
...m
|
|
214
219
|
// Optional custom formatters override defaults
|
|
215
|
-
}), [m, g.components]),
|
|
220
|
+
}), [m, g.components]), se = f((e) => {
|
|
216
221
|
const t = e.value;
|
|
217
222
|
if (t == null || typeof t != "object") return t;
|
|
218
|
-
const o =
|
|
223
|
+
const o = W(e.column?.getColDef());
|
|
219
224
|
if (o && o.length > 0) {
|
|
220
|
-
const r =
|
|
225
|
+
const r = z(t, o);
|
|
221
226
|
if (o.length === 1) {
|
|
222
227
|
const d = o[0]?.field?.split(".").pop(), x = d ? t[d] : void 0;
|
|
223
228
|
return x && typeof x == "object" && "value" in x ? x.value ?? "" : r[0];
|
|
224
229
|
}
|
|
225
|
-
return
|
|
230
|
+
return H + r.join(S);
|
|
226
231
|
}
|
|
227
232
|
const s = Object.entries(t).map(([, r]) => r && typeof r == "object" && "value" in r ? r.value : typeof r != "object" && typeof r < "u" ? r : null).filter((r) => r != null);
|
|
228
233
|
return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(S);
|
|
229
|
-
}, []),
|
|
234
|
+
}, []), ue = f((e) => {
|
|
230
235
|
if (typeof e.value == "string") {
|
|
231
236
|
const t = e.value.trim();
|
|
232
237
|
if (t.startsWith("{") || t.startsWith("["))
|
|
@@ -239,7 +244,7 @@ function Je({
|
|
|
239
244
|
return e.value;
|
|
240
245
|
}, []), ae = f((e) => {
|
|
241
246
|
const t = e?.data ?? "";
|
|
242
|
-
if (!t.includes(S) && !t.includes(
|
|
247
|
+
if (!t.includes(S) && !t.includes(H)) {
|
|
243
248
|
$(t);
|
|
244
249
|
return;
|
|
245
250
|
}
|
|
@@ -251,25 +256,25 @@ function Je({
|
|
|
251
256
|
o.push("");
|
|
252
257
|
continue;
|
|
253
258
|
}
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
o.push(
|
|
259
|
+
const k = d.split(" ").map((p) => p.startsWith(H) ? { isSplit: !0, slots: p.slice(1).split(S) } : { isSplit: !1, slots: p.split(S) }), K = Math.max(1, ...k.map((p) => p.slots.length));
|
|
260
|
+
if (K === 1) {
|
|
261
|
+
o.push(k.map((p) => p.slots[0] ?? "").join(" "));
|
|
257
262
|
continue;
|
|
258
263
|
}
|
|
259
|
-
for (let p = 0; p <
|
|
260
|
-
const
|
|
261
|
-
o.push(
|
|
264
|
+
for (let p = 0; p < K; p++) {
|
|
265
|
+
const pe = k.map((j) => !j.isSplit && j.slots.length === 1 ? j.slots[0] : j.slots[p] ?? "");
|
|
266
|
+
o.push(pe.join(" "));
|
|
262
267
|
}
|
|
263
268
|
}
|
|
264
269
|
$(o.join(`
|
|
265
270
|
`));
|
|
266
|
-
}, []),
|
|
271
|
+
}, []), R = f((e) => {
|
|
267
272
|
const t = e.value;
|
|
268
273
|
if (t == null) return "";
|
|
269
274
|
if (typeof t != "object") return String(t);
|
|
270
|
-
const o =
|
|
275
|
+
const o = W(e.column?.getColDef());
|
|
271
276
|
if (o && o.length > 0) {
|
|
272
|
-
const r =
|
|
277
|
+
const r = z(t, o);
|
|
273
278
|
return o.length === 1 ? r[0] : r.join(`
|
|
274
279
|
`);
|
|
275
280
|
}
|
|
@@ -285,67 +290,68 @@ function Je({
|
|
|
285
290
|
}
|
|
286
291
|
return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(`
|
|
287
292
|
`);
|
|
288
|
-
}, []),
|
|
289
|
-
processCellCallback:
|
|
293
|
+
}, []), ce = y(() => ({
|
|
294
|
+
processCellCallback: R,
|
|
290
295
|
...g.defaultCsvExportParams ?? {}
|
|
291
|
-
}), [
|
|
292
|
-
processCellCallback:
|
|
296
|
+
}), [R, g.defaultCsvExportParams]), de = y(() => ({
|
|
297
|
+
processCellCallback: R,
|
|
293
298
|
...g.defaultExcelExportParams ?? {}
|
|
294
|
-
}), [
|
|
295
|
-
return /* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */ v("div", { ref:
|
|
297
|
-
|
|
299
|
+
}), [R, g.defaultExcelExportParams]);
|
|
300
|
+
return /* @__PURE__ */ fe(Ae.Provider, { value: G, children: [
|
|
301
|
+
/* @__PURE__ */ v("div", { ref: I, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ v(
|
|
302
|
+
xe,
|
|
298
303
|
{
|
|
299
|
-
theme:
|
|
300
|
-
defaultColDef:
|
|
304
|
+
theme: Fe,
|
|
305
|
+
defaultColDef: oe,
|
|
301
306
|
columnDefs: h,
|
|
302
307
|
cellSelection: !0,
|
|
303
|
-
defaultColGroupDef:
|
|
304
|
-
onGridReady:
|
|
305
|
-
onGridPreDestroyed:
|
|
306
|
-
onFilterChanged:
|
|
307
|
-
onSelectionChanged:
|
|
308
|
-
onModelUpdated:
|
|
309
|
-
components:
|
|
310
|
-
processCellForClipboard:
|
|
311
|
-
processCellFromClipboard:
|
|
308
|
+
defaultColGroupDef: le,
|
|
309
|
+
onGridReady: Z,
|
|
310
|
+
onGridPreDestroyed: ee,
|
|
311
|
+
onFilterChanged: te,
|
|
312
|
+
onSelectionChanged: re,
|
|
313
|
+
onModelUpdated: ne,
|
|
314
|
+
components: ie,
|
|
315
|
+
processCellForClipboard: se,
|
|
316
|
+
processCellFromClipboard: ue,
|
|
312
317
|
sendToClipboard: ae,
|
|
313
|
-
ensureDomOrder:
|
|
318
|
+
ensureDomOrder: w,
|
|
314
319
|
suppressHeaderFocus: !1,
|
|
315
320
|
suppressFocusAfterRefresh: !0,
|
|
316
321
|
suppressGroupRowsSticky: !0,
|
|
317
|
-
columnTypes:
|
|
322
|
+
columnTypes: Y,
|
|
323
|
+
autoSizeStrategy: P,
|
|
318
324
|
...g,
|
|
319
|
-
defaultCsvExportParams:
|
|
320
|
-
defaultExcelExportParams:
|
|
321
|
-
getMainMenuItems:
|
|
325
|
+
defaultCsvExportParams: ce,
|
|
326
|
+
defaultExcelExportParams: de,
|
|
327
|
+
getMainMenuItems: Q
|
|
322
328
|
}
|
|
323
329
|
) }),
|
|
324
330
|
i,
|
|
325
331
|
/* @__PURE__ */ v(
|
|
326
|
-
|
|
332
|
+
Ie,
|
|
327
333
|
{
|
|
328
|
-
isOpen:
|
|
329
|
-
columnId:
|
|
330
|
-
gridApi:
|
|
334
|
+
isOpen: J,
|
|
335
|
+
columnId: X,
|
|
336
|
+
gridApi: D,
|
|
331
337
|
onClose: G.closeAdvancedFilter,
|
|
332
338
|
onApply: G.applyAdvancedFilter
|
|
333
339
|
}
|
|
334
340
|
),
|
|
335
341
|
/* @__PURE__ */ v(
|
|
336
|
-
|
|
342
|
+
De,
|
|
337
343
|
{
|
|
338
|
-
isOpen:
|
|
339
|
-
columnId:
|
|
340
|
-
gridApi:
|
|
341
|
-
anchor:
|
|
342
|
-
variant:
|
|
344
|
+
isOpen: B,
|
|
345
|
+
columnId: E.current,
|
|
346
|
+
gridApi: D,
|
|
347
|
+
anchor: O.current,
|
|
348
|
+
variant: A.current,
|
|
343
349
|
onClose: G.closeMenu
|
|
344
350
|
}
|
|
345
351
|
)
|
|
346
352
|
] });
|
|
347
353
|
}
|
|
348
|
-
function
|
|
354
|
+
function Ie({
|
|
349
355
|
isOpen: i,
|
|
350
356
|
columnId: n,
|
|
351
357
|
gridApi: l,
|
|
@@ -353,48 +359,49 @@ function we({
|
|
|
353
359
|
onApply: m
|
|
354
360
|
}) {
|
|
355
361
|
if (!i || !n || !l) return null;
|
|
356
|
-
const
|
|
357
|
-
if (!
|
|
358
|
-
const c =
|
|
359
|
-
return /* @__PURE__ */ v(
|
|
360
|
-
|
|
362
|
+
const a = l.getColumn(n);
|
|
363
|
+
if (!a) return null;
|
|
364
|
+
const c = a.getColDef(), b = c.headerComponentParams, C = Re(c), M = C.text !== -1 || C.number !== -1 || C.date !== -1, w = C.set !== -1, g = c.filter === "agMultiColumnFilter" && (M || w) ? "multi" : c.filter === "agNumberColumnFilter" ? "number" : c.filter === "agDateColumnFilter" ? "date" : c.filter === "agSetColumnFilter" || b?.selectOptions ? "select" : "text", u = ke(l.getFilterModel());
|
|
365
|
+
return /* @__PURE__ */ v(he, { fallback: null, children: /* @__PURE__ */ v(
|
|
366
|
+
Pe,
|
|
361
367
|
{
|
|
362
368
|
isOpen: i,
|
|
363
369
|
onClose: h,
|
|
364
370
|
onApply: m,
|
|
365
371
|
columnId: n,
|
|
366
372
|
columnLabel: c.headerName || n,
|
|
367
|
-
columnType:
|
|
373
|
+
columnType: g,
|
|
368
374
|
selectOptions: b?.selectOptions,
|
|
369
375
|
isMultiSelect: b?.isMultiSelect,
|
|
370
|
-
initialModel:
|
|
376
|
+
initialModel: u,
|
|
371
377
|
api: l
|
|
372
378
|
}
|
|
373
379
|
) });
|
|
374
380
|
}
|
|
375
|
-
function
|
|
381
|
+
function De({
|
|
376
382
|
isOpen: i,
|
|
377
383
|
columnId: n,
|
|
378
384
|
gridApi: l,
|
|
379
385
|
anchor: h,
|
|
380
386
|
variant: m,
|
|
381
|
-
onClose:
|
|
387
|
+
onClose: a
|
|
382
388
|
}) {
|
|
383
389
|
return !i || !n || !l ? null : /* @__PURE__ */ v(
|
|
384
|
-
|
|
390
|
+
je,
|
|
385
391
|
{
|
|
386
392
|
isOpen: i,
|
|
387
393
|
columnId: n,
|
|
388
394
|
gridApi: l,
|
|
389
395
|
anchor: h,
|
|
390
396
|
variant: m || "column",
|
|
391
|
-
onClose:
|
|
397
|
+
onClose: a
|
|
392
398
|
}
|
|
393
399
|
);
|
|
394
400
|
}
|
|
395
401
|
export {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
402
|
+
Qe as AgGridWrapper,
|
|
403
|
+
Qe as default,
|
|
404
|
+
et as refreshGridAutoSizeStrategy,
|
|
405
|
+
rt as subscribeGridApiEvent,
|
|
406
|
+
nt as subscribeGridApiEvents
|
|
400
407
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GridApi } from 'ag-grid-community';
|
|
2
|
+
/**
|
|
3
|
+
* Re-run the grid's configured `autoSizeStrategy` after the container width changes.
|
|
4
|
+
* Accordion panels, tabs, and deferred layout can leave columns sized against a
|
|
5
|
+
* stale width when `scaleUpToFitGridWidth` is enabled.
|
|
6
|
+
*/
|
|
7
|
+
export declare function refreshGridAutoSizeStrategy(api: GridApi): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function o(i) {
|
|
2
|
+
if (i.isDestroyed())
|
|
3
|
+
return;
|
|
4
|
+
const t = i.getGridOption("autoSizeStrategy");
|
|
5
|
+
if (!t)
|
|
6
|
+
return;
|
|
7
|
+
if (t.type === "fitGridWidth") {
|
|
8
|
+
i.sizeColumnsToFit({
|
|
9
|
+
defaultMinWidth: t.defaultMinWidth,
|
|
10
|
+
defaultMaxWidth: t.defaultMaxWidth,
|
|
11
|
+
columnLimits: t.columnLimits?.map((e) => ({
|
|
12
|
+
key: e.colId,
|
|
13
|
+
minWidth: e.minWidth,
|
|
14
|
+
maxWidth: e.maxWidth
|
|
15
|
+
}))
|
|
16
|
+
});
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (t.type === "fitProvidedWidth") {
|
|
20
|
+
i.sizeColumnsToFit(t.width);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const d = (e) => {
|
|
24
|
+
i.setGridOption("autoSizeStrategy", e);
|
|
25
|
+
};
|
|
26
|
+
d(void 0), d(t);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
o as refreshGridAutoSizeStrategy
|
|
30
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { AutoSizeStrategy, GridApi } from 'ag-grid-community';
|
|
3
|
+
/**
|
|
4
|
+
* Keeps `autoSizeStrategy` in sync when the grid container width changes
|
|
5
|
+
* (accordion expand, viewport expand, responsive layout, etc.).
|
|
6
|
+
*/
|
|
7
|
+
export declare function useGridAutoSizeStrategyOnResize(gridApi: GridApi | null, containerRef: RefObject<HTMLElement | null>, autoSizeStrategy: AutoSizeStrategy | undefined): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useEffect as a } from "react";
|
|
2
|
+
import { subscribeGridApiEvents as l } from "./grid-api-event-subscription.js";
|
|
3
|
+
import { refreshGridAutoSizeStrategy as f } from "./refreshGridAutoSizeStrategy.js";
|
|
4
|
+
function v(e, s, o) {
|
|
5
|
+
a(() => {
|
|
6
|
+
if (!e || !o)
|
|
7
|
+
return;
|
|
8
|
+
const t = s.current;
|
|
9
|
+
if (!t)
|
|
10
|
+
return;
|
|
11
|
+
let n = 0, r = 0;
|
|
12
|
+
const c = () => {
|
|
13
|
+
cancelAnimationFrame(r), r = requestAnimationFrame(() => {
|
|
14
|
+
e.isDestroyed() || f(e);
|
|
15
|
+
});
|
|
16
|
+
}, m = new ResizeObserver(() => {
|
|
17
|
+
const i = t.clientWidth;
|
|
18
|
+
i <= 0 || i === n || (n = i, c());
|
|
19
|
+
});
|
|
20
|
+
n = t.clientWidth, m.observe(t);
|
|
21
|
+
const u = l(
|
|
22
|
+
e,
|
|
23
|
+
["columnVisible", "displayedColumnsChanged"],
|
|
24
|
+
c
|
|
25
|
+
);
|
|
26
|
+
return () => {
|
|
27
|
+
cancelAnimationFrame(r), m.disconnect(), u();
|
|
28
|
+
};
|
|
29
|
+
}, [e, s, o]);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
v as useGridAutoSizeStrategyOnResize
|
|
33
|
+
};
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
readonly Component: import('impact-nova-icons').ImageComponent;
|
|
17
|
-
readonly width: 225;
|
|
18
|
-
readonly height: 150;
|
|
19
|
-
}, {
|
|
20
|
-
readonly Component: import('impact-nova-icons').ImageComponent;
|
|
21
|
-
readonly width: 250;
|
|
22
|
-
readonly height: 180;
|
|
23
|
-
}, {
|
|
24
|
-
readonly Component: import('impact-nova-icons').ImageComponent;
|
|
25
|
-
readonly width: 225;
|
|
26
|
-
readonly height: 150;
|
|
27
|
-
}, {
|
|
28
|
-
readonly Component: import('impact-nova-icons').ImageComponent;
|
|
29
|
-
readonly width: 225;
|
|
30
|
-
readonly height: 150;
|
|
31
|
-
}];
|
|
1
|
+
import { ImageComponent } from 'impact-nova-icons';
|
|
2
|
+
export interface EmptyStateImageEntry {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
load: () => Promise<{
|
|
6
|
+
Component: ImageComponent;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
export declare const EMPTY_STATE_IMAGES: EmptyStateImageEntry[];
|
|
10
|
+
export { default as EmptyState1 } from './illustrations/empty-state-1';
|
|
11
|
+
export { default as EmptyState2 } from './illustrations/empty-state-2';
|
|
12
|
+
export { default as EmptyState3 } from './illustrations/empty-state-3';
|
|
13
|
+
export { default as EmptyState4 } from './illustrations/empty-state-4';
|
|
14
|
+
export { default as EmptyState5 } from './illustrations/empty-state-5';
|
|
15
|
+
export { default as EmptyState6 } from './illustrations/empty-state-6';
|