impact-nova 1.7.13 → 1.7.15
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 +85 -78
- package/dist/components/ui/data-table/data-table-saved-views.js +261 -223
- package/dist/components/ui/notification-panel/notification-item.js +2 -2
- package/dist/components/ui/types/data-table-saved-views.types.d.ts +2 -2
- package/dist/i18n/defaultMessages.d.ts +2 -0
- package/dist/i18n/defaultMessages.js +1 -0
- 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/dist/icons/assets/bookmarkFilled.svg.js +2 -2
- package/dist/icons/assets/infoCircleFilled.svg.js +5 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +257 -255
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as f, jsxs as re } from "react/jsx-runtime";
|
|
2
2
|
import { lazy as oe, useRef as _, useState as v, useCallback as y, useMemo as b, useEffect as le, Suspense as ie } from "react";
|
|
3
|
-
import { ModuleRegistry as ae, AllCommunityModule as ue, ValidationModule as
|
|
4
|
-
import { AllEnterpriseModule as
|
|
3
|
+
import { ModuleRegistry as ae, AllCommunityModule as ue, ValidationModule as ce } from "ag-grid-community";
|
|
4
|
+
import { AllEnterpriseModule as se } from "ag-grid-enterprise";
|
|
5
5
|
import { AgGridReact as de } from "ag-grid-react";
|
|
6
6
|
import { customAgGridTheme as me } from "./theme.js";
|
|
7
7
|
import { CustomHeader as pe } from "./headers/custom-header.js";
|
|
@@ -10,11 +10,11 @@ import { GridHeaderContext as ge } from "./headers/context/grid-header-context.j
|
|
|
10
10
|
import { convertToAgGridFilterModel as he, getMultiFilterIndices as Ce, convertFromAgGridFilterModel as ve } from "./headers/utils/filter-utils.js";
|
|
11
11
|
import { ColumnSettingsMenu as ye } from "./headers/column-menu/column-settings-menu.js";
|
|
12
12
|
import { AG_GRID_VALUE_FORMATTERS as be } from "./value-formatters.js";
|
|
13
|
-
import { resolveValueFormatter as
|
|
13
|
+
import { resolveValueFormatter as Fe, applyValueFormatter as xe } from "./cell-renderers/cell-renderer-utils.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
const Me = oe(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
16
|
-
ae.registerModules([ue,
|
|
17
|
-
const
|
|
16
|
+
ae.registerModules([ue, se, ce]);
|
|
17
|
+
const w = "", W = (a) => {
|
|
18
18
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) {
|
|
19
19
|
navigator.clipboard.writeText(a).catch(() => K(a));
|
|
20
20
|
return;
|
|
@@ -22,24 +22,24 @@ const D = "", W = (a) => {
|
|
|
22
22
|
K(a);
|
|
23
23
|
}, K = (a) => {
|
|
24
24
|
if (typeof document > "u") return;
|
|
25
|
-
const
|
|
26
|
-
|
|
25
|
+
const r = document.createElement("textarea");
|
|
26
|
+
r.value = a, 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);
|
|
27
27
|
try {
|
|
28
|
-
|
|
28
|
+
r.select(), document.execCommand("copy");
|
|
29
29
|
} finally {
|
|
30
|
-
document.body.removeChild(
|
|
30
|
+
document.body.removeChild(r);
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
function Ve({
|
|
34
34
|
children: a,
|
|
35
|
-
defaultColDef:
|
|
36
|
-
defaultColGroupDef:
|
|
37
|
-
columnDefs:
|
|
35
|
+
defaultColDef: r,
|
|
36
|
+
defaultColGroupDef: c,
|
|
37
|
+
columnDefs: F,
|
|
38
38
|
valueFormatters: h,
|
|
39
39
|
onGridReady: C,
|
|
40
40
|
...i
|
|
41
41
|
}) {
|
|
42
|
-
const o = _(null),
|
|
42
|
+
const o = _(null), g = _(null), [x, G] = v(null), [D, M] = v(!1), [R, j] = v(null), [U, I] = v(!1), [O, P] = v(null), [$, N] = v(null), L = y((e) => {
|
|
43
43
|
if (!o.current) return;
|
|
44
44
|
const t = he(e);
|
|
45
45
|
o.current.setFilterModel(t), o.current.onFilterChanged();
|
|
@@ -55,10 +55,10 @@ function Ve({
|
|
|
55
55
|
o.current.setGridOption("context", { ...e, activeSearchColumnId: null }), o.current.refreshHeader();
|
|
56
56
|
},
|
|
57
57
|
openAdvancedFilter: (e) => {
|
|
58
|
-
|
|
58
|
+
j(e || null), M(!0);
|
|
59
59
|
},
|
|
60
60
|
closeAdvancedFilter: () => {
|
|
61
|
-
M(!1),
|
|
61
|
+
M(!1), j(null);
|
|
62
62
|
},
|
|
63
63
|
applyAdvancedFilter: (e) => {
|
|
64
64
|
L(e);
|
|
@@ -71,51 +71,58 @@ function Ve({
|
|
|
71
71
|
},
|
|
72
72
|
activeMenuColumnId: O
|
|
73
73
|
}), [L, O]), q = y((e) => {
|
|
74
|
-
o.current = e.api,
|
|
74
|
+
o.current = e.api, G(e.api);
|
|
75
75
|
const t = e.api.getGridOption("context") || {};
|
|
76
76
|
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), C && C(e);
|
|
77
77
|
}, [C]);
|
|
78
78
|
le(() => {
|
|
79
|
-
const e =
|
|
79
|
+
const e = g.current;
|
|
80
80
|
if (!e) return;
|
|
81
|
-
const t = (
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
if (!
|
|
85
|
-
const u =
|
|
81
|
+
const t = (n) => {
|
|
82
|
+
if (n.key !== "Enter" && n.key !== " ") return;
|
|
83
|
+
const s = n.target;
|
|
84
|
+
if (!s.classList.contains("ag-cell") && !s.classList.contains("ag-header-cell")) return;
|
|
85
|
+
const u = s.querySelector(
|
|
86
86
|
'button, [role="checkbox"], [role="switch"], [role="combobox"], [role="button"], [role="link"], a, input, select, textarea, .cursor-pointer'
|
|
87
87
|
);
|
|
88
|
-
u && (
|
|
88
|
+
u && (n.preventDefault(), n.stopPropagation(), u.click(), u.focus());
|
|
89
89
|
};
|
|
90
90
|
return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
|
|
91
91
|
}, []);
|
|
92
92
|
const z = b(() => ({
|
|
93
93
|
headerComponent: pe,
|
|
94
|
-
|
|
94
|
+
// Default cell renderer wraps text in a span so display:flex centering
|
|
95
|
+
// and text-overflow:ellipsis both work (ellipsis doesn't work on
|
|
96
|
+
// anonymous flex text nodes, but works on flex child elements).
|
|
97
|
+
cellRenderer: (e) => {
|
|
98
|
+
const t = e.valueFormatted ?? (e.value != null ? String(e.value) : "");
|
|
99
|
+
return /* @__PURE__ */ f("span", { className: "truncate block w-full", children: t });
|
|
100
|
+
},
|
|
101
|
+
...r,
|
|
95
102
|
suppressHeaderKeyboardEvent: (e) => {
|
|
96
|
-
const { event: t } = e,
|
|
97
|
-
if (
|
|
103
|
+
const { event: t } = e, n = t.target;
|
|
104
|
+
if (n.tagName === "INPUT" || n.tagName === "TEXTAREA")
|
|
98
105
|
return !(t.key === "Enter" || t.key === "Escape" || t.key === "Tab");
|
|
99
106
|
if (t.key === "Enter" || t.key === " ") {
|
|
100
|
-
const u =
|
|
107
|
+
const u = n.closest(".ag-header-cell");
|
|
101
108
|
if (u) {
|
|
102
109
|
const m = u.querySelector('[role="checkbox"], button, [role="switch"], input');
|
|
103
110
|
if (m)
|
|
104
111
|
return t.preventDefault(), m.click(), !0;
|
|
105
112
|
}
|
|
106
113
|
}
|
|
107
|
-
return
|
|
114
|
+
return r?.suppressHeaderKeyboardEvent?.(e) ?? !1;
|
|
108
115
|
},
|
|
109
116
|
headerComponentParams: {
|
|
110
|
-
...
|
|
117
|
+
...r?.headerComponentParams
|
|
111
118
|
}
|
|
112
|
-
}), [
|
|
119
|
+
}), [r]), J = b(() => ({
|
|
113
120
|
headerGroupComponent: fe,
|
|
114
|
-
...
|
|
121
|
+
...c,
|
|
115
122
|
headerGroupComponentParams: {
|
|
116
|
-
...
|
|
123
|
+
...c?.headerGroupComponentParams
|
|
117
124
|
}
|
|
118
|
-
}), [
|
|
125
|
+
}), [c]), X = b(() => ({
|
|
119
126
|
...be,
|
|
120
127
|
// Always available - value formatters
|
|
121
128
|
...i.components,
|
|
@@ -124,8 +131,8 @@ function Ve({
|
|
|
124
131
|
// Optional custom formatters override defaults
|
|
125
132
|
}), [h, i.components]), B = y((e) => {
|
|
126
133
|
if (e.value !== null && e.value !== void 0 && typeof e.value == "object") {
|
|
127
|
-
const t = Object.entries(e.value).map(([,
|
|
128
|
-
return t.length === 0 ? "" : t.length === 1 ? t[0] : t.join(
|
|
134
|
+
const t = Object.entries(e.value).map(([, n]) => n && typeof n == "object" && "value" in n ? n.value : typeof n != "object" && typeof n < "u" ? n : null).filter((n) => n != null);
|
|
135
|
+
return t.length === 0 ? "" : t.length === 1 ? t[0] : t.join(w);
|
|
129
136
|
}
|
|
130
137
|
return e.value;
|
|
131
138
|
}, []), Q = y((e) => {
|
|
@@ -141,45 +148,45 @@ function Ve({
|
|
|
141
148
|
return e.value;
|
|
142
149
|
}, []), Y = y((e) => {
|
|
143
150
|
const t = e?.data ?? "";
|
|
144
|
-
if (!t.includes(
|
|
151
|
+
if (!t.includes(w)) {
|
|
145
152
|
W(t);
|
|
146
153
|
return;
|
|
147
154
|
}
|
|
148
|
-
const
|
|
155
|
+
const n = [], s = t.split(`
|
|
149
156
|
`);
|
|
150
|
-
for (let u = 0; u <
|
|
151
|
-
const m =
|
|
152
|
-
if (m.length === 0 && u ===
|
|
153
|
-
|
|
157
|
+
for (let u = 0; u < s.length; u++) {
|
|
158
|
+
const m = s[u];
|
|
159
|
+
if (m.length === 0 && u === s.length - 1) {
|
|
160
|
+
n.push("");
|
|
154
161
|
continue;
|
|
155
162
|
}
|
|
156
|
-
const d = m.split(" ").map((l) => l.split(
|
|
163
|
+
const d = m.split(" ").map((l) => l.split(w)), S = Math.max(1, ...d.map((l) => l.length));
|
|
157
164
|
if (S === 1) {
|
|
158
|
-
|
|
165
|
+
n.push(m);
|
|
159
166
|
continue;
|
|
160
167
|
}
|
|
161
168
|
for (let l = 0; l < S; l++) {
|
|
162
|
-
const
|
|
163
|
-
|
|
169
|
+
const k = d.map((p) => p.length === 1 ? p[0] : p[l] ?? "");
|
|
170
|
+
n.push(k.join(" "));
|
|
164
171
|
}
|
|
165
172
|
}
|
|
166
|
-
W(
|
|
173
|
+
W(n.join(`
|
|
167
174
|
`));
|
|
168
175
|
}, []), A = y((e) => {
|
|
169
176
|
const t = e.value;
|
|
170
177
|
if (t == null) return "";
|
|
171
178
|
if (typeof t != "object") return String(t);
|
|
172
|
-
const
|
|
179
|
+
const s = e.column?.getColDef?.()?.cellRendererParams ?? null, u = s?.splits, m = s?.valueFormatter ?? null, H = e.node?.data ?? null, d = [];
|
|
173
180
|
for (const [S, l] of Object.entries(t)) {
|
|
174
181
|
if (l && typeof l == "object" && "value" in l) {
|
|
175
|
-
const
|
|
182
|
+
const k = l, p = k.value;
|
|
176
183
|
if (p == null) continue;
|
|
177
|
-
const te = u?.find((
|
|
178
|
-
|
|
184
|
+
const te = u?.find((ne) => ne.field?.split(".").pop() === S), V = Fe(
|
|
185
|
+
k,
|
|
179
186
|
H,
|
|
180
187
|
te?.valueFormatter ?? null,
|
|
181
188
|
m
|
|
182
|
-
), T = V ?
|
|
189
|
+
), T = V ? xe(V, p) : String(p);
|
|
183
190
|
T != null && d.push(String(T));
|
|
184
191
|
continue;
|
|
185
192
|
}
|
|
@@ -194,13 +201,13 @@ function Ve({
|
|
|
194
201
|
processCellCallback: A,
|
|
195
202
|
...i.defaultExcelExportParams ?? {}
|
|
196
203
|
}), [A, i.defaultExcelExportParams]);
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ re(ge.Provider, { value: E, children: [
|
|
205
|
+
/* @__PURE__ */ f("div", { ref: g, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ f(
|
|
199
206
|
de,
|
|
200
207
|
{
|
|
201
208
|
theme: me,
|
|
202
209
|
defaultColDef: z,
|
|
203
|
-
columnDefs:
|
|
210
|
+
columnDefs: F,
|
|
204
211
|
cellSelection: !0,
|
|
205
212
|
defaultColGroupDef: J,
|
|
206
213
|
onGridReady: q,
|
|
@@ -240,22 +247,22 @@ function Ve({
|
|
|
240
247
|
}
|
|
241
248
|
) }),
|
|
242
249
|
a,
|
|
243
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ f(
|
|
244
251
|
Ee,
|
|
245
252
|
{
|
|
246
|
-
isOpen:
|
|
253
|
+
isOpen: D,
|
|
247
254
|
columnId: R,
|
|
248
|
-
gridApi:
|
|
255
|
+
gridApi: x,
|
|
249
256
|
onClose: E.closeAdvancedFilter,
|
|
250
257
|
onApply: E.applyAdvancedFilter
|
|
251
258
|
}
|
|
252
259
|
),
|
|
253
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ f(
|
|
254
261
|
Ae,
|
|
255
262
|
{
|
|
256
263
|
isOpen: U,
|
|
257
264
|
columnId: O,
|
|
258
|
-
gridApi:
|
|
265
|
+
gridApi: x,
|
|
259
266
|
anchor: $,
|
|
260
267
|
onClose: E.closeMenu
|
|
261
268
|
}
|
|
@@ -264,45 +271,45 @@ function Ve({
|
|
|
264
271
|
}
|
|
265
272
|
function Ee({
|
|
266
273
|
isOpen: a,
|
|
267
|
-
columnId:
|
|
268
|
-
gridApi:
|
|
269
|
-
onClose:
|
|
274
|
+
columnId: r,
|
|
275
|
+
gridApi: c,
|
|
276
|
+
onClose: F,
|
|
270
277
|
onApply: h
|
|
271
278
|
}) {
|
|
272
|
-
if (!a || !
|
|
273
|
-
const C =
|
|
279
|
+
if (!a || !r || !c) return null;
|
|
280
|
+
const C = c.getColumn(r);
|
|
274
281
|
if (!C) return null;
|
|
275
|
-
const i = C.getColDef(), o = i.headerComponentParams,
|
|
276
|
-
return /* @__PURE__ */
|
|
282
|
+
const i = C.getColDef(), o = i.headerComponentParams, g = Ce(i), x = g.text !== -1 || g.number !== -1 || g.date !== -1, G = g.set !== -1, M = i.filter === "agMultiColumnFilter" && (x || G) ? "multi" : i.filter === "agNumberColumnFilter" ? "number" : i.filter === "agDateColumnFilter" ? "date" : i.filter === "agSetColumnFilter" || o?.selectOptions ? "select" : "text", R = ve(c.getFilterModel());
|
|
283
|
+
return /* @__PURE__ */ f(ie, { fallback: null, children: /* @__PURE__ */ f(
|
|
277
284
|
Me,
|
|
278
285
|
{
|
|
279
286
|
isOpen: a,
|
|
280
|
-
onClose:
|
|
287
|
+
onClose: F,
|
|
281
288
|
onApply: h,
|
|
282
|
-
columnId:
|
|
283
|
-
columnLabel: i.headerName ||
|
|
289
|
+
columnId: r,
|
|
290
|
+
columnLabel: i.headerName || r,
|
|
284
291
|
columnType: M,
|
|
285
292
|
selectOptions: o?.selectOptions,
|
|
286
293
|
isMultiSelect: o?.isMultiSelect,
|
|
287
294
|
initialModel: R,
|
|
288
|
-
api:
|
|
295
|
+
api: c
|
|
289
296
|
}
|
|
290
297
|
) });
|
|
291
298
|
}
|
|
292
299
|
function Ae({
|
|
293
300
|
isOpen: a,
|
|
294
|
-
columnId:
|
|
295
|
-
gridApi:
|
|
296
|
-
anchor:
|
|
301
|
+
columnId: r,
|
|
302
|
+
gridApi: c,
|
|
303
|
+
anchor: F,
|
|
297
304
|
onClose: h
|
|
298
305
|
}) {
|
|
299
|
-
return !a || !
|
|
306
|
+
return !a || !r || !c ? null : /* @__PURE__ */ f(
|
|
300
307
|
ye,
|
|
301
308
|
{
|
|
302
309
|
isOpen: a,
|
|
303
|
-
columnId:
|
|
304
|
-
gridApi:
|
|
305
|
-
anchor:
|
|
310
|
+
columnId: r,
|
|
311
|
+
gridApi: c,
|
|
312
|
+
anchor: F,
|
|
306
313
|
onClose: h
|
|
307
314
|
}
|
|
308
315
|
);
|