impact-nova 1.8.1 → 1.8.2
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/default-text-cell-renderer.d.ts +6 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/default-text-cell-renderer.js +9 -0
- package/dist/components/ui/ag-grid-react/headers/custom-header-group.d.ts +5 -6
- package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +19 -19
- package/dist/components/ui/ag-grid-react/index.d.ts +1 -1
- package/dist/components/ui/ag-grid-react/index.js +164 -165
- package/dist/components/ui/button-group.d.ts +10 -6
- package/dist/components/ui/button-group.js +1 -2
- package/dist/components/ui/input.js +12 -13
- package/dist/components/ui/smart-input.d.ts +2 -2
- package/dist/components/ui/smart-input.js +52 -51
- package/dist/components/ui/textarea.d.ts +10 -8
- package/dist/components/ui/textarea.js +52 -52
- package/dist/components/ui/types/ag-grid.types.d.ts +5 -0
- package/dist/components/ui/types/button-group.types.d.ts +1 -1
- package/dist/index.js +425 -426
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ICellRendererParams } from 'ag-grid-community';
|
|
2
|
+
/**
|
|
3
|
+
* Lightweight default cell renderer for AgGridWrapper.
|
|
4
|
+
* Stable module-level reference — avoids inline function allocation in defaultColDef.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DefaultTextCellRenderer: import('react').NamedExoticComponent<ICellRendererParams<any, any, any>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { memo as r } from "react";
|
|
3
|
+
const a = r(function(e) {
|
|
4
|
+
const l = e.valueFormatted ?? (e.value != null ? String(e.value) : "");
|
|
5
|
+
return /* @__PURE__ */ t("span", { className: "truncate block w-full", children: l });
|
|
6
|
+
});
|
|
7
|
+
export {
|
|
8
|
+
a as DefaultTextCellRenderer
|
|
9
|
+
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { IHeaderGroupParams } from 'ag-grid-community';
|
|
2
2
|
import { ExtendedHeaderComponentParams } from '../../types/ag-grid.types';
|
|
3
3
|
/**
|
|
4
|
-
* CustomHeaderGroup
|
|
4
|
+
* CustomHeaderGroup — optimized for large column trees.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - Pure render based on props
|
|
6
|
+
* Not wrapped in React.memo: AG Grid mutates `columnGroup` in place on expand/collapse;
|
|
7
|
+
* memo would serve stale `isExpanded` and break collapse. `toggleExpand` reads
|
|
8
|
+
* `columnGroup.isExpanded()` at click time.
|
|
10
9
|
*/
|
|
11
|
-
export declare
|
|
10
|
+
export declare function CustomHeaderGroup(props: IHeaderGroupParams & ExtendedHeaderComponentParams): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default CustomHeaderGroup;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { jsxs as f, jsx as
|
|
1
|
+
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronRight as x } from "../../../../icons/index.js";
|
|
3
3
|
import { cn as g } from "../../../../lib/utils.js";
|
|
4
4
|
import { HeaderInfo as h } from "./components/header-info.js";
|
|
5
|
-
import { TruncatedText as
|
|
6
|
-
import { useGridHeader as
|
|
7
|
-
|
|
5
|
+
import { TruncatedText as E } from "./components/truncated-text.js";
|
|
6
|
+
import { useGridHeader as N } from "./context/grid-header-context.js";
|
|
7
|
+
function H(o) {
|
|
8
8
|
const {
|
|
9
|
-
displayName:
|
|
10
|
-
showInfoIcon:
|
|
9
|
+
displayName: d,
|
|
10
|
+
showInfoIcon: l = !1,
|
|
11
11
|
columnGroup: e,
|
|
12
12
|
setExpanded: a
|
|
13
|
-
} =
|
|
14
|
-
t && t.stopPropagation(), a && e && a(!
|
|
13
|
+
} = o, r = N(), c = e ? e.isExpanded() : !1, s = e ? e.isExpandable() : !1, p = (t) => {
|
|
14
|
+
t && t.stopPropagation(), a && e && a(!e.isExpanded());
|
|
15
15
|
}, m = (t) => {
|
|
16
16
|
if (t.preventDefault(), t.stopPropagation(), r && e) {
|
|
17
17
|
const u = e.getGroupId() || "group";
|
|
18
18
|
r.openMenu(u, t.currentTarget, "group");
|
|
19
19
|
}
|
|
20
|
-
},
|
|
21
|
-
return !
|
|
20
|
+
}, i = d || "";
|
|
21
|
+
return !i && l === !1 ? null : /* @__PURE__ */ f(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
24
|
className: "ag-header-group-cell-label ag-sticky-label flex items-center h-full cursor-pointer select-none",
|
|
25
|
-
onClick:
|
|
25
|
+
onClick: s ? p : void 0,
|
|
26
26
|
onContextMenu: m,
|
|
27
27
|
role: "presentation",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
29
|
+
/* @__PURE__ */ n(
|
|
30
|
+
E,
|
|
31
31
|
{
|
|
32
|
-
text:
|
|
32
|
+
text: i,
|
|
33
33
|
className: "ag-header-group-text font-bold text-content"
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
36
|
+
/* @__PURE__ */ n(h, { ...o, className: "ml-1" }),
|
|
37
|
+
s && /* @__PURE__ */ n("span", { className: g(
|
|
38
38
|
"ag-header-icon ag-header-expand-icon ml-[6px] flex items-center justify-center transition-transform duration-200",
|
|
39
|
-
|
|
40
|
-
), children: /* @__PURE__ */
|
|
39
|
+
c ? "ag-header-expand-icon-expanded rotate-180" : "ag-header-expand-icon-collapsed"
|
|
40
|
+
), children: /* @__PURE__ */ n(x, { size: 16, className: "text-content-tertiary" }) })
|
|
41
41
|
]
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
45
|
export {
|
|
46
46
|
H as CustomHeaderGroup
|
|
47
47
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgGridWrapperProps } from '../types/ag-grid.types';
|
|
2
|
-
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, ...restProps }: AgGridWrapperProps<TData> & {
|
|
2
|
+
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, ensureDomOrder, ...restProps }: AgGridWrapperProps<TData> & {
|
|
3
3
|
className?: string;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default AgGridWrapper;
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
1
|
+
import { jsxs as ne, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as oe, useRef as b, useState as T, useCallback as v, useMemo as h, useEffect as le, Suspense as ie } from "react";
|
|
3
|
+
import { ModuleRegistry as se, AllCommunityModule as ue, ValidationModule as ce } from "ag-grid-community";
|
|
4
|
+
import { AllEnterpriseModule as ae } from "ag-grid-enterprise";
|
|
5
|
+
import { AgGridReact as de } from "ag-grid-react";
|
|
6
|
+
import { customAgGridTheme as pe } from "./theme.js";
|
|
7
|
+
import { CustomHeader as fe } from "./headers/custom-header.js";
|
|
8
|
+
import { CustomHeaderGroup as me } from "./headers/custom-header-group.js";
|
|
9
|
+
import { DefaultTextCellRenderer as ge } from "./cell-renderers/default-text-cell-renderer.js";
|
|
10
|
+
import { GridHeaderContext as he } from "./headers/context/grid-header-context.js";
|
|
11
|
+
import { convertToAgGridFilterModel as Ce, getMultiFilterIndices as ve, convertFromAgGridFilterModel as ye } from "./headers/utils/filter-utils.js";
|
|
12
|
+
import { ColumnSettingsMenu as be } from "./headers/column-menu/column-settings-menu.js";
|
|
13
|
+
import { AG_GRID_VALUE_FORMATTERS as xe } from "./value-formatters.js";
|
|
13
14
|
/* empty css */
|
|
14
|
-
const
|
|
15
|
-
|
|
15
|
+
const Fe = oe(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
16
|
+
se.registerModules([ue, ae, ce]);
|
|
16
17
|
const x = "", I = "", H = (s) => {
|
|
17
18
|
if (!s) return;
|
|
18
|
-
const
|
|
19
|
-
if (Array.isArray(
|
|
19
|
+
const n = s.cellRendererParams?.splits;
|
|
20
|
+
if (Array.isArray(n) && n.length > 0) return n;
|
|
20
21
|
const l = s.cellEditorParams?.splits;
|
|
21
22
|
if (Array.isArray(l) && l.length > 0) return l;
|
|
22
|
-
}, _ = (s,
|
|
23
|
+
}, _ = (s, n) => {
|
|
23
24
|
const l = [];
|
|
24
|
-
for (const g of
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
25
|
+
for (const g of n) {
|
|
26
|
+
const m = g?.field?.split(".").pop();
|
|
27
|
+
if (!m) {
|
|
27
28
|
l.push("");
|
|
28
29
|
continue;
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
31
|
+
const c = s[m];
|
|
32
|
+
if (c == null) {
|
|
32
33
|
l.push("");
|
|
33
34
|
continue;
|
|
34
35
|
}
|
|
35
|
-
if (typeof
|
|
36
|
-
const
|
|
37
|
-
l.push(
|
|
36
|
+
if (typeof c == "object" && "value" in c) {
|
|
37
|
+
const a = c.value;
|
|
38
|
+
l.push(a == null ? "" : String(a));
|
|
38
39
|
continue;
|
|
39
40
|
}
|
|
40
|
-
if (typeof
|
|
41
|
-
l.push(String(
|
|
41
|
+
if (typeof c != "object") {
|
|
42
|
+
l.push(String(c));
|
|
42
43
|
continue;
|
|
43
44
|
}
|
|
44
45
|
l.push("");
|
|
@@ -52,24 +53,25 @@ const x = "", I = "", H = (s) => {
|
|
|
52
53
|
K(s);
|
|
53
54
|
}, K = (s) => {
|
|
54
55
|
if (typeof document > "u") return;
|
|
55
|
-
const
|
|
56
|
-
|
|
56
|
+
const n = document.createElement("textarea");
|
|
57
|
+
n.value = s, n.setAttribute("readonly", ""), n.style.position = "fixed", n.style.top = "0", n.style.left = "0", n.style.opacity = "0", n.style.pointerEvents = "none", document.body.appendChild(n);
|
|
57
58
|
try {
|
|
58
|
-
|
|
59
|
+
n.select(), document.execCommand("copy");
|
|
59
60
|
} finally {
|
|
60
|
-
document.body.removeChild(
|
|
61
|
+
document.body.removeChild(n);
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
|
-
function
|
|
64
|
+
function He({
|
|
64
65
|
children: s,
|
|
65
|
-
defaultColDef:
|
|
66
|
+
defaultColDef: n,
|
|
66
67
|
defaultColGroupDef: l,
|
|
67
68
|
columnDefs: g,
|
|
68
|
-
valueFormatters:
|
|
69
|
-
onGridReady:
|
|
70
|
-
|
|
69
|
+
valueFormatters: m,
|
|
70
|
+
onGridReady: c,
|
|
71
|
+
ensureDomOrder: a = !0,
|
|
72
|
+
...p
|
|
71
73
|
}) {
|
|
72
|
-
const
|
|
74
|
+
const u = b(null), F = b(null), [M, P] = T(null), [w, E] = T(!1), [W, D] = T(null), [U, L] = T(!1), S = b(null), O = b(null), A = b(null), $ = v(() => [], []), q = h(() => ({
|
|
73
75
|
numericColumn: {
|
|
74
76
|
cellClass: "ag-right-aligned-cell",
|
|
75
77
|
headerClass: "ag-right-aligned-header",
|
|
@@ -90,115 +92,112 @@ function De({
|
|
|
90
92
|
dateColumn: {
|
|
91
93
|
filter: "agDateColumnFilter"
|
|
92
94
|
}
|
|
93
|
-
}), []),
|
|
95
|
+
}), []), R = h(() => ({
|
|
94
96
|
openSearch: (e) => {
|
|
95
|
-
if (!
|
|
96
|
-
const t =
|
|
97
|
-
|
|
97
|
+
if (!u.current) return;
|
|
98
|
+
const t = u.current.getGridOption("context") || {};
|
|
99
|
+
u.current.setGridOption("context", { ...t, activeSearchColumnId: e }), u.current.refreshHeader();
|
|
98
100
|
},
|
|
99
101
|
closeSearch: () => {
|
|
100
|
-
if (!
|
|
101
|
-
const e =
|
|
102
|
-
|
|
102
|
+
if (!u.current) return;
|
|
103
|
+
const e = u.current.getGridOption("context") || {};
|
|
104
|
+
u.current.setGridOption("context", { ...e, activeSearchColumnId: null }), u.current.refreshHeader();
|
|
103
105
|
},
|
|
104
106
|
openAdvancedFilter: (e) => {
|
|
105
|
-
D(e || null),
|
|
107
|
+
D(e || null), E(!0);
|
|
106
108
|
},
|
|
107
109
|
closeAdvancedFilter: () => {
|
|
108
|
-
|
|
110
|
+
E(!1), D(null);
|
|
109
111
|
},
|
|
110
112
|
applyAdvancedFilter: (e) => {
|
|
111
|
-
if (!
|
|
112
|
-
const t =
|
|
113
|
-
|
|
113
|
+
if (!u.current) return;
|
|
114
|
+
const t = Ce(e);
|
|
115
|
+
u.current.setFilterModel(t), u.current.onFilterChanged(), u.current.refreshHeader();
|
|
114
116
|
},
|
|
115
117
|
openMenu: (e, t, o = "column") => {
|
|
116
|
-
S.current = e,
|
|
118
|
+
S.current = e, O.current = t, A.current = o, L(!0);
|
|
117
119
|
},
|
|
118
120
|
closeMenu: () => {
|
|
119
|
-
S.current = null,
|
|
121
|
+
S.current = null, O.current = null, A.current = null, L(!1);
|
|
120
122
|
},
|
|
121
123
|
// Getters read from refs - O(1) per header, no memory allocation
|
|
122
124
|
get activeMenuColumnId() {
|
|
123
125
|
return S.current;
|
|
124
126
|
},
|
|
125
127
|
get activeMenuVariant() {
|
|
126
|
-
return
|
|
128
|
+
return A.current;
|
|
127
129
|
}
|
|
128
|
-
}), []),
|
|
129
|
-
|
|
130
|
+
}), []), z = v((e) => {
|
|
131
|
+
u.current = e.api, P(e.api);
|
|
130
132
|
const t = e.api.getGridOption("context") || {};
|
|
131
|
-
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }),
|
|
132
|
-
}, [
|
|
133
|
-
|
|
134
|
-
const e =
|
|
133
|
+
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), c && c(e);
|
|
134
|
+
}, [c]);
|
|
135
|
+
le(() => {
|
|
136
|
+
const e = F.current;
|
|
135
137
|
if (!e) return;
|
|
136
138
|
const t = (o) => {
|
|
137
139
|
if (o.key !== "Enter" && o.key !== " ") return;
|
|
138
140
|
const i = o.target;
|
|
139
141
|
if (!i.classList.contains("ag-cell") && !i.classList.contains("ag-header-cell")) return;
|
|
140
|
-
const
|
|
142
|
+
const r = i.querySelector(
|
|
141
143
|
'button, [role="checkbox"], [role="switch"], [role="combobox"], [role="button"], [role="link"], a, input, select, textarea, .cursor-pointer'
|
|
142
144
|
);
|
|
143
|
-
|
|
145
|
+
r && (o.preventDefault(), o.stopPropagation(), r.click(), r.focus());
|
|
144
146
|
};
|
|
145
147
|
return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
|
|
146
148
|
}, []);
|
|
147
|
-
const
|
|
148
|
-
headerComponent:
|
|
149
|
+
const J = h(() => ({
|
|
150
|
+
headerComponent: fe,
|
|
149
151
|
// Default cell renderer wraps text in a span so display:flex centering
|
|
150
152
|
// and text-overflow:ellipsis both work (ellipsis doesn't work on
|
|
151
153
|
// anonymous flex text nodes, but works on flex child elements).
|
|
152
|
-
cellRenderer:
|
|
153
|
-
|
|
154
|
-
return /* @__PURE__ */ m("span", { className: "truncate block w-full", children: t });
|
|
155
|
-
},
|
|
156
|
-
...r,
|
|
154
|
+
cellRenderer: ge,
|
|
155
|
+
...n,
|
|
157
156
|
suppressHeaderKeyboardEvent: (e) => {
|
|
158
157
|
const { event: t } = e, o = t.target;
|
|
159
158
|
if (o.tagName === "INPUT" || o.tagName === "TEXTAREA")
|
|
160
159
|
return !(t.key === "Escape" || t.key === "Tab");
|
|
161
160
|
if (t.key === "Enter" || t.key === " ") {
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
const d =
|
|
161
|
+
const r = o.closest(".ag-header-cell");
|
|
162
|
+
if (r) {
|
|
163
|
+
const d = r.querySelector('[role="checkbox"], button, [role="switch"], input');
|
|
165
164
|
if (d)
|
|
166
165
|
return t.preventDefault(), d.click(), !0;
|
|
167
166
|
}
|
|
168
167
|
}
|
|
169
|
-
return
|
|
168
|
+
return n?.suppressHeaderKeyboardEvent?.(e) ?? !1;
|
|
170
169
|
},
|
|
171
170
|
headerComponentParams: {
|
|
172
|
-
...
|
|
171
|
+
...n?.headerComponentParams
|
|
173
172
|
}
|
|
174
|
-
}), [
|
|
175
|
-
headerGroupComponent:
|
|
173
|
+
}), [n]), X = h(() => ({
|
|
174
|
+
headerGroupComponent: me,
|
|
176
175
|
...l,
|
|
177
176
|
headerGroupComponentParams: {
|
|
178
177
|
...l?.headerGroupComponentParams
|
|
179
178
|
}
|
|
180
|
-
}), [l]),
|
|
181
|
-
...
|
|
179
|
+
}), [l]), B = h(() => ({
|
|
180
|
+
...xe,
|
|
182
181
|
// Always available - value formatters
|
|
183
|
-
...
|
|
182
|
+
...p.components,
|
|
184
183
|
// User components override
|
|
185
|
-
...
|
|
184
|
+
...m
|
|
186
185
|
// Optional custom formatters override defaults
|
|
187
|
-
}), [
|
|
186
|
+
}), [m, p.components]), Q = v((e) => {
|
|
188
187
|
const t = e.value;
|
|
189
188
|
if (t == null || typeof t != "object") return t;
|
|
190
189
|
const o = H(e.column?.getColDef());
|
|
191
190
|
if (o && o.length > 0) {
|
|
192
|
-
const
|
|
191
|
+
const r = _(t, o);
|
|
193
192
|
if (o.length === 1) {
|
|
194
193
|
const d = o[0]?.field?.split(".").pop(), y = d ? t[d] : void 0;
|
|
195
|
-
return y && typeof y == "object" && "value" in y ? y.value ?? "" :
|
|
194
|
+
return y && typeof y == "object" && "value" in y ? y.value ?? "" : r[0];
|
|
196
195
|
}
|
|
197
|
-
return I +
|
|
196
|
+
return I + r.join(x);
|
|
198
197
|
}
|
|
199
|
-
const i = Object.entries(t).map(([,
|
|
198
|
+
const i = 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);
|
|
200
199
|
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(x);
|
|
201
|
-
}, []),
|
|
200
|
+
}, []), Y = v((e) => {
|
|
202
201
|
if (typeof e.value == "string") {
|
|
203
202
|
const t = e.value.trim();
|
|
204
203
|
if (t.startsWith("{") || t.startsWith("["))
|
|
@@ -209,7 +208,7 @@ function De({
|
|
|
209
208
|
}
|
|
210
209
|
}
|
|
211
210
|
return e.value;
|
|
212
|
-
}, []),
|
|
211
|
+
}, []), Z = v((e) => {
|
|
213
212
|
const t = e?.data ?? "";
|
|
214
213
|
if (!t.includes(x) && !t.includes(I)) {
|
|
215
214
|
V(t);
|
|
@@ -217,150 +216,150 @@ function De({
|
|
|
217
216
|
}
|
|
218
217
|
const o = [], i = t.split(`
|
|
219
218
|
`);
|
|
220
|
-
for (let
|
|
221
|
-
const d = i[
|
|
222
|
-
if (d.length === 0 &&
|
|
219
|
+
for (let r = 0; r < i.length; r++) {
|
|
220
|
+
const d = i[r];
|
|
221
|
+
if (d.length === 0 && r === i.length - 1) {
|
|
223
222
|
o.push("");
|
|
224
223
|
continue;
|
|
225
224
|
}
|
|
226
|
-
const
|
|
225
|
+
const j = d.split(" ").map((f) => f.startsWith(I) ? { isSplit: !0, slots: f.slice(1).split(x) } : { isSplit: !1, slots: f.split(x) }), N = Math.max(1, ...j.map((f) => f.slots.length));
|
|
227
226
|
if (N === 1) {
|
|
228
|
-
o.push(
|
|
227
|
+
o.push(j.map((f) => f.slots[0] ?? "").join(" "));
|
|
229
228
|
continue;
|
|
230
229
|
}
|
|
231
|
-
for (let
|
|
232
|
-
const
|
|
233
|
-
o.push(
|
|
230
|
+
for (let f = 0; f < N; f++) {
|
|
231
|
+
const re = j.map((k) => !k.isSplit && k.slots.length === 1 ? k.slots[0] : k.slots[f] ?? "");
|
|
232
|
+
o.push(re.join(" "));
|
|
234
233
|
}
|
|
235
234
|
}
|
|
236
235
|
V(o.join(`
|
|
237
236
|
`));
|
|
238
|
-
}, []),
|
|
237
|
+
}, []), G = v((e) => {
|
|
239
238
|
const t = e.value;
|
|
240
239
|
if (t == null) return "";
|
|
241
240
|
if (typeof t != "object") return String(t);
|
|
242
241
|
const o = H(e.column?.getColDef());
|
|
243
242
|
if (o && o.length > 0) {
|
|
244
|
-
const
|
|
245
|
-
return o.length === 1 ?
|
|
243
|
+
const r = _(t, o);
|
|
244
|
+
return o.length === 1 ? r[0] : r.join(`
|
|
246
245
|
`);
|
|
247
246
|
}
|
|
248
247
|
const i = [];
|
|
249
|
-
for (const
|
|
250
|
-
if (
|
|
251
|
-
const d =
|
|
248
|
+
for (const r of Object.values(t)) {
|
|
249
|
+
if (r && typeof r == "object" && "value" in r) {
|
|
250
|
+
const d = r.value;
|
|
252
251
|
if (d == null) continue;
|
|
253
252
|
i.push(String(d));
|
|
254
253
|
continue;
|
|
255
254
|
}
|
|
256
|
-
|
|
255
|
+
r != null && typeof r != "object" && i.push(String(r));
|
|
257
256
|
}
|
|
258
257
|
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(`
|
|
259
258
|
`);
|
|
260
|
-
}, []),
|
|
261
|
-
processCellCallback:
|
|
262
|
-
...
|
|
263
|
-
}), [
|
|
264
|
-
processCellCallback:
|
|
265
|
-
...
|
|
266
|
-
}), [
|
|
267
|
-
return /* @__PURE__ */ ne(
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
|
|
259
|
+
}, []), ee = h(() => ({
|
|
260
|
+
processCellCallback: G,
|
|
261
|
+
...p.defaultCsvExportParams ?? {}
|
|
262
|
+
}), [G, p.defaultCsvExportParams]), te = h(() => ({
|
|
263
|
+
processCellCallback: G,
|
|
264
|
+
...p.defaultExcelExportParams ?? {}
|
|
265
|
+
}), [G, p.defaultExcelExportParams]);
|
|
266
|
+
return /* @__PURE__ */ ne(he.Provider, { value: R, children: [
|
|
267
|
+
/* @__PURE__ */ C("div", { ref: F, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ C(
|
|
268
|
+
de,
|
|
270
269
|
{
|
|
271
|
-
theme:
|
|
272
|
-
defaultColDef:
|
|
270
|
+
theme: pe,
|
|
271
|
+
defaultColDef: J,
|
|
273
272
|
columnDefs: g,
|
|
274
273
|
cellSelection: !0,
|
|
275
|
-
defaultColGroupDef:
|
|
276
|
-
onGridReady:
|
|
277
|
-
components:
|
|
278
|
-
processCellForClipboard:
|
|
279
|
-
processCellFromClipboard:
|
|
280
|
-
sendToClipboard:
|
|
281
|
-
ensureDomOrder:
|
|
274
|
+
defaultColGroupDef: X,
|
|
275
|
+
onGridReady: z,
|
|
276
|
+
components: B,
|
|
277
|
+
processCellForClipboard: Q,
|
|
278
|
+
processCellFromClipboard: Y,
|
|
279
|
+
sendToClipboard: Z,
|
|
280
|
+
ensureDomOrder: a,
|
|
282
281
|
suppressHeaderFocus: !1,
|
|
283
282
|
suppressFocusAfterRefresh: !0,
|
|
284
283
|
suppressGroupRowsSticky: !0,
|
|
285
|
-
columnTypes:
|
|
286
|
-
...
|
|
287
|
-
defaultCsvExportParams:
|
|
288
|
-
defaultExcelExportParams:
|
|
289
|
-
getMainMenuItems:
|
|
284
|
+
columnTypes: q,
|
|
285
|
+
...p,
|
|
286
|
+
defaultCsvExportParams: ee,
|
|
287
|
+
defaultExcelExportParams: te,
|
|
288
|
+
getMainMenuItems: $
|
|
290
289
|
}
|
|
291
290
|
) }),
|
|
292
291
|
s,
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
|
|
292
|
+
/* @__PURE__ */ C(
|
|
293
|
+
Me,
|
|
295
294
|
{
|
|
296
|
-
isOpen:
|
|
297
|
-
columnId:
|
|
298
|
-
gridApi:
|
|
299
|
-
onClose:
|
|
300
|
-
onApply:
|
|
295
|
+
isOpen: w,
|
|
296
|
+
columnId: W,
|
|
297
|
+
gridApi: M,
|
|
298
|
+
onClose: R.closeAdvancedFilter,
|
|
299
|
+
onApply: R.applyAdvancedFilter
|
|
301
300
|
}
|
|
302
301
|
),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
|
|
302
|
+
/* @__PURE__ */ C(
|
|
303
|
+
Ee,
|
|
305
304
|
{
|
|
306
|
-
isOpen:
|
|
305
|
+
isOpen: U,
|
|
307
306
|
columnId: S.current,
|
|
308
|
-
gridApi:
|
|
309
|
-
anchor:
|
|
310
|
-
variant:
|
|
311
|
-
onClose:
|
|
307
|
+
gridApi: M,
|
|
308
|
+
anchor: O.current,
|
|
309
|
+
variant: A.current,
|
|
310
|
+
onClose: R.closeMenu
|
|
312
311
|
}
|
|
313
312
|
)
|
|
314
313
|
] });
|
|
315
314
|
}
|
|
316
|
-
function
|
|
315
|
+
function Me({
|
|
317
316
|
isOpen: s,
|
|
318
|
-
columnId:
|
|
317
|
+
columnId: n,
|
|
319
318
|
gridApi: l,
|
|
320
319
|
onClose: g,
|
|
321
|
-
onApply:
|
|
320
|
+
onApply: m
|
|
322
321
|
}) {
|
|
323
|
-
if (!s || !
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
326
|
-
const
|
|
327
|
-
return /* @__PURE__ */
|
|
328
|
-
|
|
322
|
+
if (!s || !n || !l) return null;
|
|
323
|
+
const c = l.getColumn(n);
|
|
324
|
+
if (!c) return null;
|
|
325
|
+
const a = c.getColDef(), p = a.headerComponentParams, u = ve(a), F = u.text !== -1 || u.number !== -1 || u.date !== -1, M = u.set !== -1, w = a.filter === "agMultiColumnFilter" && (F || M) ? "multi" : a.filter === "agNumberColumnFilter" ? "number" : a.filter === "agDateColumnFilter" ? "date" : a.filter === "agSetColumnFilter" || p?.selectOptions ? "select" : "text", E = ye(l.getFilterModel());
|
|
326
|
+
return /* @__PURE__ */ C(ie, { fallback: null, children: /* @__PURE__ */ C(
|
|
327
|
+
Fe,
|
|
329
328
|
{
|
|
330
329
|
isOpen: s,
|
|
331
330
|
onClose: g,
|
|
332
|
-
onApply:
|
|
333
|
-
columnId:
|
|
334
|
-
columnLabel:
|
|
335
|
-
columnType:
|
|
336
|
-
selectOptions:
|
|
337
|
-
isMultiSelect:
|
|
338
|
-
initialModel:
|
|
331
|
+
onApply: m,
|
|
332
|
+
columnId: n,
|
|
333
|
+
columnLabel: a.headerName || n,
|
|
334
|
+
columnType: w,
|
|
335
|
+
selectOptions: p?.selectOptions,
|
|
336
|
+
isMultiSelect: p?.isMultiSelect,
|
|
337
|
+
initialModel: E,
|
|
339
338
|
api: l
|
|
340
339
|
}
|
|
341
340
|
) });
|
|
342
341
|
}
|
|
343
|
-
function
|
|
342
|
+
function Ee({
|
|
344
343
|
isOpen: s,
|
|
345
|
-
columnId:
|
|
344
|
+
columnId: n,
|
|
346
345
|
gridApi: l,
|
|
347
346
|
anchor: g,
|
|
348
|
-
variant:
|
|
349
|
-
onClose:
|
|
347
|
+
variant: m,
|
|
348
|
+
onClose: c
|
|
350
349
|
}) {
|
|
351
|
-
return !s || !
|
|
352
|
-
|
|
350
|
+
return !s || !n || !l ? null : /* @__PURE__ */ C(
|
|
351
|
+
be,
|
|
353
352
|
{
|
|
354
353
|
isOpen: s,
|
|
355
|
-
columnId:
|
|
354
|
+
columnId: n,
|
|
356
355
|
gridApi: l,
|
|
357
356
|
anchor: g,
|
|
358
|
-
variant:
|
|
359
|
-
onClose:
|
|
357
|
+
variant: m || "column",
|
|
358
|
+
onClose: c
|
|
360
359
|
}
|
|
361
360
|
);
|
|
362
361
|
}
|
|
363
362
|
export {
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
He as AgGridWrapper,
|
|
364
|
+
He as default
|
|
366
365
|
};
|