impact-nova 1.7.17 → 1.7.18
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/index.js +215 -170
- package/dist/components/ui/data-table/data-table-context.d.ts +1 -1
- package/dist/components/ui/data-table/data-table-format-options.js +9 -5
- package/dist/components/ui/data-table/data-table.js +12 -11
- package/dist/i18n/defaultMessages.d.ts +1 -0
- package/dist/i18n/defaultMessages.js +11 -10
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/kn.js +1 -0
- package/package.json +1 -1
|
@@ -1,113 +1,144 @@
|
|
|
1
|
-
import { jsx 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 { GridHeaderContext as
|
|
10
|
-
import { convertToAgGridFilterModel as
|
|
11
|
-
import { ColumnSettingsMenu as
|
|
12
|
-
import { AG_GRID_VALUE_FORMATTERS as
|
|
1
|
+
import { jsx as m, jsxs as ne } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as re, useRef as H, useState as C, useCallback as v, useMemo as y, useEffect as oe, Suspense as le } from "react";
|
|
3
|
+
import { ModuleRegistry as ie, AllCommunityModule as se, ValidationModule as ue } from "ag-grid-community";
|
|
4
|
+
import { AllEnterpriseModule as ce } from "ag-grid-enterprise";
|
|
5
|
+
import { AgGridReact as ae } from "ag-grid-react";
|
|
6
|
+
import { customAgGridTheme as de } from "./theme.js";
|
|
7
|
+
import { CustomHeader as pe } from "./headers/custom-header.js";
|
|
8
|
+
import { CustomHeaderGroup as fe } from "./headers/custom-header-group.js";
|
|
9
|
+
import { GridHeaderContext as me } from "./headers/context/grid-header-context.js";
|
|
10
|
+
import { convertToAgGridFilterModel as ge, getMultiFilterIndices as he, convertFromAgGridFilterModel as Ce } from "./headers/utils/filter-utils.js";
|
|
11
|
+
import { ColumnSettingsMenu as ve } from "./headers/column-menu/column-settings-menu.js";
|
|
12
|
+
import { AG_GRID_VALUE_FORMATTERS as ye } from "./value-formatters.js";
|
|
13
13
|
/* empty css */
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const
|
|
14
|
+
const be = re(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
15
|
+
ie.registerModules([se, ce, ue]);
|
|
16
|
+
const x = "", w = "", _ = (s) => {
|
|
17
|
+
if (!s) return;
|
|
18
|
+
const r = s.cellRendererParams?.splits;
|
|
19
|
+
if (Array.isArray(r) && r.length > 0) return r;
|
|
20
|
+
const l = s.cellEditorParams?.splits;
|
|
21
|
+
if (Array.isArray(l) && l.length > 0) return l;
|
|
22
|
+
}, K = (s, r) => {
|
|
23
|
+
const l = [];
|
|
24
|
+
for (const g of r) {
|
|
25
|
+
const f = g?.field?.split(".").pop();
|
|
26
|
+
if (!f) {
|
|
27
|
+
l.push("");
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const a = s[f];
|
|
31
|
+
if (a == null) {
|
|
32
|
+
l.push("");
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (typeof a == "object" && "value" in a) {
|
|
36
|
+
const u = a.value;
|
|
37
|
+
l.push(u == null ? "" : String(u));
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (typeof a != "object") {
|
|
41
|
+
l.push(String(a));
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
l.push("");
|
|
45
|
+
}
|
|
46
|
+
return l;
|
|
47
|
+
}, W = (s) => {
|
|
17
48
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) {
|
|
18
|
-
navigator.clipboard.writeText(
|
|
49
|
+
navigator.clipboard.writeText(s).catch(() => V(s));
|
|
19
50
|
return;
|
|
20
51
|
}
|
|
21
|
-
|
|
22
|
-
},
|
|
52
|
+
V(s);
|
|
53
|
+
}, V = (s) => {
|
|
23
54
|
if (typeof document > "u") return;
|
|
24
55
|
const r = document.createElement("textarea");
|
|
25
|
-
r.value =
|
|
56
|
+
r.value = s, r.setAttribute("readonly", ""), r.style.position = "fixed", r.style.top = "0", r.style.left = "0", r.style.opacity = "0", r.style.pointerEvents = "none", document.body.appendChild(r);
|
|
26
57
|
try {
|
|
27
58
|
r.select(), document.execCommand("copy");
|
|
28
59
|
} finally {
|
|
29
60
|
document.body.removeChild(r);
|
|
30
61
|
}
|
|
31
62
|
};
|
|
32
|
-
function
|
|
33
|
-
children:
|
|
63
|
+
function De({
|
|
64
|
+
children: s,
|
|
34
65
|
defaultColDef: r,
|
|
35
|
-
defaultColGroupDef:
|
|
36
|
-
columnDefs:
|
|
37
|
-
valueFormatters:
|
|
38
|
-
onGridReady:
|
|
39
|
-
...
|
|
66
|
+
defaultColGroupDef: l,
|
|
67
|
+
columnDefs: g,
|
|
68
|
+
valueFormatters: f,
|
|
69
|
+
onGridReady: a,
|
|
70
|
+
...u
|
|
40
71
|
}) {
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
43
|
-
const t =
|
|
44
|
-
|
|
45
|
-
}, []),
|
|
72
|
+
const c = H(null), h = H(null), [F, k] = C(null), [O, E] = C(!1), [G, T] = C(null), [U, I] = C(!1), [j, P] = C(null), [$, D] = C(null), L = v((e) => {
|
|
73
|
+
if (!c.current) return;
|
|
74
|
+
const t = ge(e);
|
|
75
|
+
c.current.setFilterModel(t), c.current.onFilterChanged();
|
|
76
|
+
}, []), S = y(() => ({
|
|
46
77
|
openSearch: (e) => {
|
|
47
|
-
if (!
|
|
48
|
-
const t =
|
|
49
|
-
|
|
78
|
+
if (!c.current) return;
|
|
79
|
+
const t = c.current.getGridOption("context") || {};
|
|
80
|
+
c.current.setGridOption("context", { ...t, activeSearchColumnId: e }), c.current.refreshHeader();
|
|
50
81
|
},
|
|
51
82
|
closeSearch: () => {
|
|
52
|
-
if (!
|
|
53
|
-
const e =
|
|
54
|
-
|
|
83
|
+
if (!c.current) return;
|
|
84
|
+
const e = c.current.getGridOption("context") || {};
|
|
85
|
+
c.current.setGridOption("context", { ...e, activeSearchColumnId: null }), c.current.refreshHeader();
|
|
55
86
|
},
|
|
56
87
|
openAdvancedFilter: (e) => {
|
|
57
|
-
|
|
88
|
+
T(e || null), E(!0);
|
|
58
89
|
},
|
|
59
90
|
closeAdvancedFilter: () => {
|
|
60
|
-
|
|
91
|
+
E(!1), T(null);
|
|
61
92
|
},
|
|
62
93
|
applyAdvancedFilter: (e) => {
|
|
63
|
-
|
|
94
|
+
L(e);
|
|
64
95
|
},
|
|
65
96
|
openMenu: (e, t) => {
|
|
66
|
-
|
|
97
|
+
P(e), D(t), I(!0);
|
|
67
98
|
},
|
|
68
99
|
closeMenu: () => {
|
|
69
|
-
|
|
100
|
+
I(!1), P(null), D(null);
|
|
70
101
|
},
|
|
71
|
-
activeMenuColumnId:
|
|
72
|
-
}), [
|
|
73
|
-
|
|
102
|
+
activeMenuColumnId: j
|
|
103
|
+
}), [L, j]), q = v((e) => {
|
|
104
|
+
c.current = e.api, k(e.api);
|
|
74
105
|
const t = e.api.getGridOption("context") || {};
|
|
75
|
-
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }),
|
|
76
|
-
}, [
|
|
77
|
-
|
|
78
|
-
const e =
|
|
106
|
+
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), a && a(e);
|
|
107
|
+
}, [a]);
|
|
108
|
+
oe(() => {
|
|
109
|
+
const e = h.current;
|
|
79
110
|
if (!e) return;
|
|
80
|
-
const t = (
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
if (!
|
|
84
|
-
const
|
|
111
|
+
const t = (o) => {
|
|
112
|
+
if (o.key !== "Enter" && o.key !== " ") return;
|
|
113
|
+
const i = o.target;
|
|
114
|
+
if (!i.classList.contains("ag-cell") && !i.classList.contains("ag-header-cell")) return;
|
|
115
|
+
const n = i.querySelector(
|
|
85
116
|
'button, [role="checkbox"], [role="switch"], [role="combobox"], [role="button"], [role="link"], a, input, select, textarea, .cursor-pointer'
|
|
86
117
|
);
|
|
87
|
-
|
|
118
|
+
n && (o.preventDefault(), o.stopPropagation(), n.click(), n.focus());
|
|
88
119
|
};
|
|
89
120
|
return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
|
|
90
121
|
}, []);
|
|
91
|
-
const
|
|
92
|
-
headerComponent:
|
|
122
|
+
const z = y(() => ({
|
|
123
|
+
headerComponent: pe,
|
|
93
124
|
// Default cell renderer wraps text in a span so display:flex centering
|
|
94
125
|
// and text-overflow:ellipsis both work (ellipsis doesn't work on
|
|
95
126
|
// anonymous flex text nodes, but works on flex child elements).
|
|
96
127
|
cellRenderer: (e) => {
|
|
97
128
|
const t = e.valueFormatted ?? (e.value != null ? String(e.value) : "");
|
|
98
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ m("span", { className: "truncate block w-full", children: t });
|
|
99
130
|
},
|
|
100
131
|
...r,
|
|
101
132
|
suppressHeaderKeyboardEvent: (e) => {
|
|
102
|
-
const { event: t } = e,
|
|
103
|
-
if (
|
|
133
|
+
const { event: t } = e, o = t.target;
|
|
134
|
+
if (o.tagName === "INPUT" || o.tagName === "TEXTAREA")
|
|
104
135
|
return !(t.key === "Enter" || t.key === "Escape" || t.key === "Tab");
|
|
105
136
|
if (t.key === "Enter" || t.key === " ") {
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
110
|
-
return t.preventDefault(),
|
|
137
|
+
const n = o.closest(".ag-header-cell");
|
|
138
|
+
if (n) {
|
|
139
|
+
const d = n.querySelector('[role="checkbox"], button, [role="switch"], input');
|
|
140
|
+
if (d)
|
|
141
|
+
return t.preventDefault(), d.click(), !0;
|
|
111
142
|
}
|
|
112
143
|
}
|
|
113
144
|
return r?.suppressHeaderKeyboardEvent?.(e) ?? !1;
|
|
@@ -115,26 +146,34 @@ function je({
|
|
|
115
146
|
headerComponentParams: {
|
|
116
147
|
...r?.headerComponentParams
|
|
117
148
|
}
|
|
118
|
-
}), [r]),
|
|
119
|
-
headerGroupComponent:
|
|
120
|
-
...
|
|
149
|
+
}), [r]), J = y(() => ({
|
|
150
|
+
headerGroupComponent: fe,
|
|
151
|
+
...l,
|
|
121
152
|
headerGroupComponentParams: {
|
|
122
|
-
...
|
|
153
|
+
...l?.headerGroupComponentParams
|
|
123
154
|
}
|
|
124
|
-
}), [
|
|
125
|
-
...
|
|
155
|
+
}), [l]), X = y(() => ({
|
|
156
|
+
...ye,
|
|
126
157
|
// Always available - value formatters
|
|
127
|
-
...
|
|
158
|
+
...u.components,
|
|
128
159
|
// User components override
|
|
129
|
-
...
|
|
160
|
+
...f
|
|
130
161
|
// Optional custom formatters override defaults
|
|
131
|
-
}), [
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
162
|
+
}), [f, u.components]), B = v((e) => {
|
|
163
|
+
const t = e.value;
|
|
164
|
+
if (t == null || typeof t != "object") return t;
|
|
165
|
+
const o = _(e.column?.getColDef());
|
|
166
|
+
if (o && o.length > 0) {
|
|
167
|
+
const n = K(t, o);
|
|
168
|
+
if (o.length === 1) {
|
|
169
|
+
const d = o[0]?.field?.split(".").pop(), b = d ? t[d] : void 0;
|
|
170
|
+
return b && typeof b == "object" && "value" in b ? b.value ?? "" : n[0];
|
|
171
|
+
}
|
|
172
|
+
return w + n.join(x);
|
|
135
173
|
}
|
|
136
|
-
|
|
137
|
-
|
|
174
|
+
const i = Object.entries(t).map(([, n]) => n && typeof n == "object" && "value" in n ? n.value : typeof n != "object" && typeof n < "u" ? n : null).filter((n) => n != null);
|
|
175
|
+
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(x);
|
|
176
|
+
}, []), Q = v((e) => {
|
|
138
177
|
if (typeof e.value == "string") {
|
|
139
178
|
const t = e.value.trim();
|
|
140
179
|
if (t.startsWith("{") || t.startsWith("["))
|
|
@@ -145,69 +184,75 @@ function je({
|
|
|
145
184
|
}
|
|
146
185
|
}
|
|
147
186
|
return e.value;
|
|
148
|
-
}, []),
|
|
187
|
+
}, []), Y = v((e) => {
|
|
149
188
|
const t = e?.data ?? "";
|
|
150
|
-
if (!t.includes(
|
|
151
|
-
|
|
189
|
+
if (!t.includes(x) && !t.includes(w)) {
|
|
190
|
+
W(t);
|
|
152
191
|
return;
|
|
153
192
|
}
|
|
154
|
-
const
|
|
193
|
+
const o = [], i = t.split(`
|
|
155
194
|
`);
|
|
156
|
-
for (let
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
159
|
-
|
|
195
|
+
for (let n = 0; n < i.length; n++) {
|
|
196
|
+
const d = i[n];
|
|
197
|
+
if (d.length === 0 && n === i.length - 1) {
|
|
198
|
+
o.push("");
|
|
160
199
|
continue;
|
|
161
200
|
}
|
|
162
|
-
const
|
|
201
|
+
const A = d.split(" ").map((p) => p.startsWith(w) ? { isSplit: !0, slots: p.slice(1).split(x) } : { isSplit: !1, slots: p.split(x) }), N = Math.max(1, ...A.map((p) => p.slots.length));
|
|
163
202
|
if (N === 1) {
|
|
164
|
-
|
|
203
|
+
o.push(A.map((p) => p.slots[0] ?? "").join(" "));
|
|
165
204
|
continue;
|
|
166
205
|
}
|
|
167
|
-
for (let
|
|
168
|
-
const
|
|
169
|
-
|
|
206
|
+
for (let p = 0; p < N; p++) {
|
|
207
|
+
const te = A.map((R) => !R.isSplit && R.slots.length === 1 ? R.slots[0] : R.slots[p] ?? "");
|
|
208
|
+
o.push(te.join(" "));
|
|
170
209
|
}
|
|
171
210
|
}
|
|
172
|
-
|
|
211
|
+
W(o.join(`
|
|
173
212
|
`));
|
|
174
|
-
}, []), M =
|
|
213
|
+
}, []), M = v((e) => {
|
|
175
214
|
const t = e.value;
|
|
176
215
|
if (t == null) return "";
|
|
177
216
|
if (typeof t != "object") return String(t);
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
217
|
+
const o = _(e.column?.getColDef());
|
|
218
|
+
if (o && o.length > 0) {
|
|
219
|
+
const n = K(t, o);
|
|
220
|
+
return o.length === 1 ? n[0] : n.join(`
|
|
221
|
+
`);
|
|
222
|
+
}
|
|
223
|
+
const i = [];
|
|
224
|
+
for (const n of Object.values(t)) {
|
|
225
|
+
if (n && typeof n == "object" && "value" in n) {
|
|
226
|
+
const d = n.value;
|
|
227
|
+
if (d == null) continue;
|
|
228
|
+
i.push(String(d));
|
|
184
229
|
continue;
|
|
185
230
|
}
|
|
186
|
-
|
|
231
|
+
n != null && typeof n != "object" && i.push(String(n));
|
|
187
232
|
}
|
|
188
|
-
return
|
|
233
|
+
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(`
|
|
189
234
|
`);
|
|
190
|
-
}, []),
|
|
235
|
+
}, []), Z = y(() => ({
|
|
191
236
|
processCellCallback: M,
|
|
192
|
-
...
|
|
193
|
-
}), [M,
|
|
237
|
+
...u.defaultCsvExportParams ?? {}
|
|
238
|
+
}), [M, u.defaultCsvExportParams]), ee = y(() => ({
|
|
194
239
|
processCellCallback: M,
|
|
195
|
-
...
|
|
196
|
-
}), [M,
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
|
|
240
|
+
...u.defaultExcelExportParams ?? {}
|
|
241
|
+
}), [M, u.defaultExcelExportParams]);
|
|
242
|
+
return /* @__PURE__ */ ne(me.Provider, { value: S, children: [
|
|
243
|
+
/* @__PURE__ */ m("div", { ref: h, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ m(
|
|
244
|
+
ae,
|
|
200
245
|
{
|
|
201
|
-
theme:
|
|
202
|
-
defaultColDef:
|
|
203
|
-
columnDefs:
|
|
246
|
+
theme: de,
|
|
247
|
+
defaultColDef: z,
|
|
248
|
+
columnDefs: g,
|
|
204
249
|
cellSelection: !0,
|
|
205
|
-
defaultColGroupDef:
|
|
206
|
-
onGridReady:
|
|
207
|
-
components:
|
|
208
|
-
processCellForClipboard:
|
|
209
|
-
processCellFromClipboard:
|
|
210
|
-
sendToClipboard:
|
|
250
|
+
defaultColGroupDef: J,
|
|
251
|
+
onGridReady: q,
|
|
252
|
+
components: X,
|
|
253
|
+
processCellForClipboard: B,
|
|
254
|
+
processCellFromClipboard: Q,
|
|
255
|
+
sendToClipboard: Y,
|
|
211
256
|
ensureDomOrder: !0,
|
|
212
257
|
suppressHeaderFocus: !1,
|
|
213
258
|
suppressFocusAfterRefresh: !0,
|
|
@@ -234,80 +279,80 @@ function je({
|
|
|
234
279
|
filter: "agDateColumnFilter"
|
|
235
280
|
}
|
|
236
281
|
},
|
|
237
|
-
...
|
|
238
|
-
defaultCsvExportParams:
|
|
239
|
-
defaultExcelExportParams:
|
|
282
|
+
...u,
|
|
283
|
+
defaultCsvExportParams: Z,
|
|
284
|
+
defaultExcelExportParams: ee
|
|
240
285
|
}
|
|
241
286
|
) }),
|
|
242
|
-
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
|
|
287
|
+
s,
|
|
288
|
+
/* @__PURE__ */ m(
|
|
289
|
+
xe,
|
|
245
290
|
{
|
|
246
|
-
isOpen:
|
|
247
|
-
columnId:
|
|
248
|
-
gridApi:
|
|
249
|
-
onClose:
|
|
250
|
-
onApply:
|
|
291
|
+
isOpen: O,
|
|
292
|
+
columnId: G,
|
|
293
|
+
gridApi: F,
|
|
294
|
+
onClose: S.closeAdvancedFilter,
|
|
295
|
+
onApply: S.applyAdvancedFilter
|
|
251
296
|
}
|
|
252
297
|
),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
|
|
298
|
+
/* @__PURE__ */ m(
|
|
299
|
+
Fe,
|
|
255
300
|
{
|
|
256
|
-
isOpen:
|
|
257
|
-
columnId:
|
|
258
|
-
gridApi:
|
|
259
|
-
anchor:
|
|
260
|
-
onClose:
|
|
301
|
+
isOpen: U,
|
|
302
|
+
columnId: j,
|
|
303
|
+
gridApi: F,
|
|
304
|
+
anchor: $,
|
|
305
|
+
onClose: S.closeMenu
|
|
261
306
|
}
|
|
262
307
|
)
|
|
263
308
|
] });
|
|
264
309
|
}
|
|
265
|
-
function
|
|
266
|
-
isOpen:
|
|
310
|
+
function xe({
|
|
311
|
+
isOpen: s,
|
|
267
312
|
columnId: r,
|
|
268
|
-
gridApi:
|
|
269
|
-
onClose:
|
|
270
|
-
onApply:
|
|
313
|
+
gridApi: l,
|
|
314
|
+
onClose: g,
|
|
315
|
+
onApply: f
|
|
271
316
|
}) {
|
|
272
|
-
if (!
|
|
273
|
-
const
|
|
274
|
-
if (!
|
|
275
|
-
const
|
|
276
|
-
return /* @__PURE__ */
|
|
277
|
-
|
|
317
|
+
if (!s || !r || !l) return null;
|
|
318
|
+
const a = l.getColumn(r);
|
|
319
|
+
if (!a) return null;
|
|
320
|
+
const u = a.getColDef(), c = u.headerComponentParams, h = he(u), F = h.text !== -1 || h.number !== -1 || h.date !== -1, k = h.set !== -1, E = u.filter === "agMultiColumnFilter" && (F || k) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || c?.selectOptions ? "select" : "text", G = Ce(l.getFilterModel());
|
|
321
|
+
return /* @__PURE__ */ m(le, { fallback: null, children: /* @__PURE__ */ m(
|
|
322
|
+
be,
|
|
278
323
|
{
|
|
279
|
-
isOpen:
|
|
280
|
-
onClose:
|
|
281
|
-
onApply:
|
|
324
|
+
isOpen: s,
|
|
325
|
+
onClose: g,
|
|
326
|
+
onApply: f,
|
|
282
327
|
columnId: r,
|
|
283
|
-
columnLabel:
|
|
284
|
-
columnType:
|
|
285
|
-
selectOptions:
|
|
286
|
-
isMultiSelect:
|
|
287
|
-
initialModel:
|
|
288
|
-
api:
|
|
328
|
+
columnLabel: u.headerName || r,
|
|
329
|
+
columnType: E,
|
|
330
|
+
selectOptions: c?.selectOptions,
|
|
331
|
+
isMultiSelect: c?.isMultiSelect,
|
|
332
|
+
initialModel: G,
|
|
333
|
+
api: l
|
|
289
334
|
}
|
|
290
335
|
) });
|
|
291
336
|
}
|
|
292
|
-
function
|
|
293
|
-
isOpen:
|
|
337
|
+
function Fe({
|
|
338
|
+
isOpen: s,
|
|
294
339
|
columnId: r,
|
|
295
|
-
gridApi:
|
|
296
|
-
anchor:
|
|
297
|
-
onClose:
|
|
340
|
+
gridApi: l,
|
|
341
|
+
anchor: g,
|
|
342
|
+
onClose: f
|
|
298
343
|
}) {
|
|
299
|
-
return !
|
|
300
|
-
|
|
344
|
+
return !s || !r || !l ? null : /* @__PURE__ */ m(
|
|
345
|
+
ve,
|
|
301
346
|
{
|
|
302
|
-
isOpen:
|
|
347
|
+
isOpen: s,
|
|
303
348
|
columnId: r,
|
|
304
|
-
gridApi:
|
|
305
|
-
anchor:
|
|
306
|
-
onClose:
|
|
349
|
+
gridApi: l,
|
|
350
|
+
anchor: g,
|
|
351
|
+
onClose: f
|
|
307
352
|
}
|
|
308
353
|
);
|
|
309
354
|
}
|
|
310
355
|
export {
|
|
311
|
-
|
|
312
|
-
|
|
356
|
+
De as AgGridWrapper,
|
|
357
|
+
De as default
|
|
313
358
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GridApi } from 'ag-grid-community';
|
|
2
2
|
export type DataTableFontSize = 'small' | 'medium' | 'large';
|
|
3
|
-
export type DataTableNumericFormat = 'full' | 'k' | 'm' | 'b';
|
|
3
|
+
export type DataTableNumericFormat = 'full' | 'k' | 'm' | 'b' | 'precision';
|
|
4
4
|
export type DataTableRowHeight = 'default' | 'compact' | 'comfort';
|
|
5
5
|
export interface DataTableContextValue {
|
|
6
6
|
gridApi: GridApi | null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { useDataTable as d } from "./data-table-context.js";
|
|
4
|
-
import { RadioGroup as
|
|
4
|
+
import { RadioGroup as i, RadioGroupItem as l } from "../radio-group.js";
|
|
5
5
|
import { Label as n } from "../label.js";
|
|
6
6
|
import { useImpactNovaI18n as x } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
7
7
|
const b = () => {
|
|
8
8
|
const { t: a } = x(), {
|
|
9
9
|
fontSize: c,
|
|
10
|
-
setFontSize:
|
|
10
|
+
setFontSize: o,
|
|
11
11
|
numericFormat: m,
|
|
12
12
|
setNumericFormat: s
|
|
13
13
|
} = d();
|
|
@@ -15,11 +15,11 @@ const b = () => {
|
|
|
15
15
|
/* @__PURE__ */ t("div", { className: "space-y-1", children: [
|
|
16
16
|
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-content-icon", children: a("dataTable.fontSize") }),
|
|
17
17
|
/* @__PURE__ */ t(
|
|
18
|
-
|
|
18
|
+
i,
|
|
19
19
|
{
|
|
20
20
|
value: c,
|
|
21
21
|
orientation: "vertical",
|
|
22
|
-
onValueChange: (r) =>
|
|
22
|
+
onValueChange: (r) => o(r),
|
|
23
23
|
className: "flex flex-col",
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
@@ -41,7 +41,7 @@ const b = () => {
|
|
|
41
41
|
/* @__PURE__ */ t("div", { className: "space-y-1", children: [
|
|
42
42
|
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-content-icon", children: a("dataTable.numericValues") }),
|
|
43
43
|
/* @__PURE__ */ t(
|
|
44
|
-
|
|
44
|
+
i,
|
|
45
45
|
{
|
|
46
46
|
value: m,
|
|
47
47
|
orientation: "vertical",
|
|
@@ -63,6 +63,10 @@ const b = () => {
|
|
|
63
63
|
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
64
64
|
/* @__PURE__ */ e(l, { value: "b", id: "num-b" }),
|
|
65
65
|
/* @__PURE__ */ e(n, { htmlFor: "num-b", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericB") })
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
68
|
+
/* @__PURE__ */ e(l, { value: "precision", id: "num-precision" }),
|
|
69
|
+
/* @__PURE__ */ e(n, { htmlFor: "num-precision", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericPrecision") })
|
|
66
70
|
] })
|
|
67
71
|
]
|
|
68
72
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, jsxs as D } from "react/jsx-runtime";
|
|
2
|
-
import { useState as l, useRef as O, useCallback as H, useMemo as b, useEffect as
|
|
2
|
+
import { useState as l, useRef as O, useCallback as H, useMemo as b, useEffect as y, memo as E } from "react";
|
|
3
3
|
import { AgGridWrapper as F } from "../ag-grid-react/index.js";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as _ } from "../../../lib/utils.js";
|
|
5
5
|
import { DataTableContext as N, DataTableSheetPortalContext as M, useDataTable as z, useDataTableSheetPortal as I } from "./data-table-context.js";
|
|
6
6
|
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as j } from "./data-table-constants.js";
|
|
7
7
|
import { AG_GRID_VALUE_FORMATTERS as k } from "../ag-grid-react/value-formatters.js";
|
|
@@ -64,7 +64,7 @@ const w = {
|
|
|
64
64
|
"div",
|
|
65
65
|
{
|
|
66
66
|
"data-component": "data-table",
|
|
67
|
-
className:
|
|
67
|
+
className: _("flex flex-col w-full min-h-0 rounded-[inherit]", e),
|
|
68
68
|
style: {
|
|
69
69
|
"--ag-font-size": a,
|
|
70
70
|
"--ag-row-height": R
|
|
@@ -72,11 +72,12 @@ const w = {
|
|
|
72
72
|
children: o
|
|
73
73
|
}
|
|
74
74
|
) }) });
|
|
75
|
-
},
|
|
75
|
+
}, A = {
|
|
76
76
|
full: "full_no",
|
|
77
77
|
k: "thou",
|
|
78
78
|
m: "mil",
|
|
79
|
-
b: "bil"
|
|
79
|
+
b: "bil",
|
|
80
|
+
precision: "full_no"
|
|
80
81
|
}, L = E(function() {
|
|
81
82
|
const { setSheetTarget: e, scopedSheetOpen: t } = I();
|
|
82
83
|
return /* @__PURE__ */ i(
|
|
@@ -104,16 +105,16 @@ function J(o) {
|
|
|
104
105
|
...f
|
|
105
106
|
} = o, g = w[t], S = h ?? g, m = b(() => P(d), [d]), x = b(() => ({
|
|
106
107
|
...c,
|
|
107
|
-
formatType:
|
|
108
|
+
formatType: A[n]
|
|
108
109
|
}), [c, n]);
|
|
109
|
-
|
|
110
|
+
y(() => {
|
|
110
111
|
r?.resetRowHeights();
|
|
111
|
-
}, [t, r]),
|
|
112
|
+
}, [t, r]), y(() => {
|
|
112
113
|
if (r) {
|
|
113
114
|
const a = r.getGridOption("context") || {};
|
|
114
115
|
r.setGridOption("context", {
|
|
115
116
|
...a,
|
|
116
|
-
formatType:
|
|
117
|
+
formatType: A[n]
|
|
117
118
|
}), r.refreshCells({ force: !0 });
|
|
118
119
|
}
|
|
119
120
|
}, [n, r]);
|
|
@@ -123,7 +124,7 @@ function J(o) {
|
|
|
123
124
|
return /* @__PURE__ */ D(
|
|
124
125
|
"div",
|
|
125
126
|
{
|
|
126
|
-
className:
|
|
127
|
+
className: _(
|
|
127
128
|
"relative flex-1 min-h-0 w-full bg-canvas-elevated rounded-b-[inherit] grid-rounded-bottom",
|
|
128
129
|
p
|
|
129
130
|
),
|
|
@@ -147,7 +148,7 @@ function J(o) {
|
|
|
147
148
|
const K = ({
|
|
148
149
|
children: o,
|
|
149
150
|
className: e
|
|
150
|
-
}) => /* @__PURE__ */ i("div", { "data-component": "data-table-toolbar", className:
|
|
151
|
+
}) => /* @__PURE__ */ i("div", { "data-component": "data-table-toolbar", className: _("flex items-center justify-between px-4 py-3 shrink-0 bg-canvas-elevated rounded-t-[inherit]", e), children: o });
|
|
151
152
|
export {
|
|
152
153
|
q as DataTable,
|
|
153
154
|
J as DataTableContent,
|
|
@@ -116,6 +116,7 @@ export interface DataTableMessages {
|
|
|
116
116
|
numericK: string;
|
|
117
117
|
numericM: string;
|
|
118
118
|
numericB: string;
|
|
119
|
+
numericPrecision: string;
|
|
119
120
|
/** Saved table views (toolbar / settings sheet) */
|
|
120
121
|
savedViewsNotApplicable: string;
|
|
121
122
|
savedViewsOpenMenu: string;
|
|
@@ -100,6 +100,7 @@ const e = {
|
|
|
100
100
|
numericK: "In K (Thousands)",
|
|
101
101
|
numericM: "In M (Millions)",
|
|
102
102
|
numericB: "In B (Billions)",
|
|
103
|
+
numericPrecision: "Full precision (decimals)",
|
|
103
104
|
savedViewsNotApplicable: "Not applicable",
|
|
104
105
|
savedViewsOpenMenu: "Open saved views",
|
|
105
106
|
savedViewsTitle: "Saved views",
|
|
@@ -119,7 +120,7 @@ const e = {
|
|
|
119
120
|
savedViewsDeleteConfirmTitle: "Delete saved view?",
|
|
120
121
|
savedViewsDeleteConfirmDescription: 'This will permanently delete "{{viewName}}". You cannot undo this action.',
|
|
121
122
|
savedViewsDeleteConfirmButton: "Delete"
|
|
122
|
-
},
|
|
123
|
+
}, i = {
|
|
123
124
|
close: "Close",
|
|
124
125
|
breadcrumb: "breadcrumb",
|
|
125
126
|
remove: "Remove",
|
|
@@ -131,7 +132,7 @@ const e = {
|
|
|
131
132
|
toggle: "Toggle",
|
|
132
133
|
more: "More",
|
|
133
134
|
loading: "Loading"
|
|
134
|
-
},
|
|
135
|
+
}, r = {
|
|
135
136
|
cancel: "Cancel",
|
|
136
137
|
confirm: "Confirm"
|
|
137
138
|
}, c = {
|
|
@@ -160,13 +161,13 @@ const e = {
|
|
|
160
161
|
}, m = {
|
|
161
162
|
scrollLeft: "Scroll left",
|
|
162
163
|
scrollRight: "Scroll right"
|
|
163
|
-
},
|
|
164
|
+
}, p = {
|
|
164
165
|
viewMore: "View More",
|
|
165
166
|
viewLess: "View Less",
|
|
166
167
|
logout: "Logout"
|
|
167
|
-
},
|
|
168
|
+
}, f = {
|
|
168
169
|
stepOfTotal: "Step {{current}} of {{total}}"
|
|
169
|
-
},
|
|
170
|
+
}, h = {
|
|
170
171
|
title: "Advanced Filter",
|
|
171
172
|
currentColumn: "Current Column",
|
|
172
173
|
allFilters: "All Filters",
|
|
@@ -217,16 +218,16 @@ const e = {
|
|
|
217
218
|
select: o,
|
|
218
219
|
nestedList: s,
|
|
219
220
|
dataTable: n,
|
|
220
|
-
aria:
|
|
221
|
-
prompt:
|
|
221
|
+
aria: i,
|
|
222
|
+
prompt: r,
|
|
222
223
|
filterStrip: c,
|
|
223
224
|
filterPanel: d,
|
|
224
|
-
advancedFilter:
|
|
225
|
+
advancedFilter: h,
|
|
225
226
|
gridHeader: S,
|
|
226
227
|
notificationPanel: u,
|
|
227
228
|
horizontalScroller: m,
|
|
228
|
-
sidebar:
|
|
229
|
-
stepper:
|
|
229
|
+
sidebar: p,
|
|
230
|
+
stepper: f
|
|
230
231
|
};
|
|
231
232
|
export {
|
|
232
233
|
v as defaultMessages
|
package/dist/i18n/locales/de.js
CHANGED
|
@@ -106,6 +106,7 @@ const e = {
|
|
|
106
106
|
numericK: "In T (Tausender)",
|
|
107
107
|
numericM: "In M (Millionen)",
|
|
108
108
|
numericB: "In Mrd (Milliarden)",
|
|
109
|
+
numericPrecision: "Volle Präzision (Dezimalstellen)",
|
|
109
110
|
savedViewsNotApplicable: "Nicht zutreffend",
|
|
110
111
|
savedViewsOpenMenu: "Gespeicherte Ansichten öffnen",
|
|
111
112
|
savedViewsTitle: "Gespeicherte Ansichten",
|
package/dist/i18n/locales/es.js
CHANGED
|
@@ -106,6 +106,7 @@ const e = {
|
|
|
106
106
|
numericK: "En K (miles)",
|
|
107
107
|
numericM: "En M (millones)",
|
|
108
108
|
numericB: "En B (miles de millones)",
|
|
109
|
+
numericPrecision: "Precisión completa (decimales)",
|
|
109
110
|
savedViewsNotApplicable: "No aplica",
|
|
110
111
|
savedViewsOpenMenu: "Abrir vistas guardadas",
|
|
111
112
|
savedViewsTitle: "Vistas guardadas",
|
package/dist/i18n/locales/hi.js
CHANGED
|
@@ -106,6 +106,7 @@ const e = {
|
|
|
106
106
|
numericK: "हज़ार में (K)",
|
|
107
107
|
numericM: "मिलियन में (M)",
|
|
108
108
|
numericB: "बिलियन में (B)",
|
|
109
|
+
numericPrecision: "पूर्ण परिशुद्धता (दशमलव)",
|
|
109
110
|
savedViewsNotApplicable: "लागू नहीं",
|
|
110
111
|
savedViewsOpenMenu: "सहेजे गए व्यू खोलें",
|
|
111
112
|
savedViewsTitle: "सहेजे गए व्यू",
|
package/dist/i18n/locales/kn.js
CHANGED
|
@@ -106,6 +106,7 @@ const e = {
|
|
|
106
106
|
numericK: "ಸಾವಿರದಲ್ಲಿ (K)",
|
|
107
107
|
numericM: "ಮಿಲಿಯನ್ನಲ್ಲಿ (M)",
|
|
108
108
|
numericB: "ಬಿಲಿಯನ್ನಲ್ಲಿ (B)",
|
|
109
|
+
numericPrecision: "ಪೂರ್ಣ ನಿಖರತೆ (ದಶಮಾಂಶಗಳು)",
|
|
109
110
|
savedViewsNotApplicable: "ಅನ್ವಯಿಸುವುದಿಲ್ಲ",
|
|
110
111
|
savedViewsOpenMenu: "ಉಳಿಸಿದ ವೀಕ್ಷಣೆಗಳನ್ನು ತೆರೆಯಿರಿ",
|
|
111
112
|
savedViewsTitle: "ಉಳಿಸಿದ ವೀಕ್ಷಣೆಗಳು",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impact-nova",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.18",
|
|
4
4
|
"description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|