@object-ui/plugin-aggrid 0.4.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/CHANGELOG.md +28 -0
- package/LICENSE +21 -0
- package/README.md +504 -0
- package/dist/AgGridImpl-DKkq6v1B.js +171 -0
- package/dist/index-B6NPAFZx.js +504 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.umd.cjs +6 -0
- package/dist/src/AgGridImpl.d.ts +31 -0
- package/dist/src/index.d.ts +39 -0
- package/dist/src/types.d.ts +91 -0
- package/package.json +56 -0
- package/src/AgGridImpl.tsx +316 -0
- package/src/index.test.ts +139 -0
- package/src/index.tsx +305 -0
- package/src/types.ts +128 -0
- package/tsconfig.json +17 -0
- package/vite.config.ts +50 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { j as u } from "./index-B6NPAFZx.js";
|
|
2
|
+
import { useRef as J, useMemo as p, useCallback as i } from "react";
|
|
3
|
+
import { AgGridReact as K } from "ag-grid-react";
|
|
4
|
+
function Y({
|
|
5
|
+
rowData: f = [],
|
|
6
|
+
columnDefs: c = [],
|
|
7
|
+
gridOptions: v = {},
|
|
8
|
+
pagination: x = !1,
|
|
9
|
+
paginationPageSize: P = 10,
|
|
10
|
+
domLayout: A = "normal",
|
|
11
|
+
animateRows: b = !0,
|
|
12
|
+
rowSelection: S,
|
|
13
|
+
theme: H = "quartz",
|
|
14
|
+
height: d = 500,
|
|
15
|
+
className: O = "",
|
|
16
|
+
editable: m = !1,
|
|
17
|
+
editType: j,
|
|
18
|
+
singleClickEdit: y = !1,
|
|
19
|
+
stopEditingWhenCellsLoseFocus: R = !0,
|
|
20
|
+
exportConfig: o,
|
|
21
|
+
statusBar: g,
|
|
22
|
+
callbacks: t,
|
|
23
|
+
columnConfig: a,
|
|
24
|
+
enableRangeSelection: z = !1,
|
|
25
|
+
enableCharts: E = !1,
|
|
26
|
+
contextMenu: l
|
|
27
|
+
}) {
|
|
28
|
+
const n = J(null), h = p(() => {
|
|
29
|
+
if (!g?.enabled) return;
|
|
30
|
+
const e = g.aggregations || ["count", "sum", "avg"], s = [];
|
|
31
|
+
return e.includes("count") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["count"] } }), e.includes("sum") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["sum"] } }), e.includes("avg") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["avg"] } }), e.includes("min") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["min"] } }), e.includes("max") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["max"] } }), s;
|
|
32
|
+
}, [g]), C = i(() => {
|
|
33
|
+
if (!n.current?.api) return;
|
|
34
|
+
const e = {
|
|
35
|
+
fileName: o?.fileName || "export.csv",
|
|
36
|
+
skipColumnHeaders: o?.skipColumnHeaders || !1,
|
|
37
|
+
allColumns: o?.allColumns || !1,
|
|
38
|
+
onlySelected: o?.onlySelected || !1
|
|
39
|
+
};
|
|
40
|
+
if (n.current.api.exportDataAsCsv(e), t?.onExport) {
|
|
41
|
+
const s = o?.onlySelected ? n.current.api.getSelectedRows() : f;
|
|
42
|
+
t.onExport(s || [], "csv");
|
|
43
|
+
}
|
|
44
|
+
}, [o, t, f]), N = i((e) => {
|
|
45
|
+
if (!l?.enabled) return [];
|
|
46
|
+
const s = [];
|
|
47
|
+
return (l.items || ["copy", "copyWithHeaders", "separator", "export"]).forEach((r) => {
|
|
48
|
+
r === "export" ? s.push({
|
|
49
|
+
name: "Export CSV",
|
|
50
|
+
icon: "<span>📥</span>",
|
|
51
|
+
action: () => C()
|
|
52
|
+
}) : r === "autoSizeAll" ? s.push({
|
|
53
|
+
name: "Auto-size All Columns",
|
|
54
|
+
action: () => {
|
|
55
|
+
n.current?.api && n.current.api.autoSizeAllColumns();
|
|
56
|
+
}
|
|
57
|
+
}) : r === "resetColumns" ? s.push({
|
|
58
|
+
name: "Reset Columns",
|
|
59
|
+
action: () => {
|
|
60
|
+
n.current?.api && n.current.api.resetColumnState();
|
|
61
|
+
}
|
|
62
|
+
}) : s.push(r);
|
|
63
|
+
}), l.customItems && (s.length > 0 && s.push("separator"), l.customItems.forEach((r) => {
|
|
64
|
+
s.push({
|
|
65
|
+
name: r.name,
|
|
66
|
+
disabled: r.disabled,
|
|
67
|
+
action: () => {
|
|
68
|
+
t?.onContextMenuAction && t.onContextMenuAction(r.action, e.node?.data);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
})), s;
|
|
72
|
+
}, [l, C, t]), V = i((e) => {
|
|
73
|
+
t?.onCellClicked?.(e);
|
|
74
|
+
}, [t]), F = i((e) => {
|
|
75
|
+
t?.onRowClicked?.(e);
|
|
76
|
+
}, [t]), I = i((e) => {
|
|
77
|
+
t?.onSelectionChanged?.(e);
|
|
78
|
+
}, [t]), w = i((e) => {
|
|
79
|
+
t?.onCellValueChanged?.(e);
|
|
80
|
+
}, [t]), G = i((e) => {
|
|
81
|
+
n.current = e;
|
|
82
|
+
}, []), $ = p(() => c ? c.map((e) => {
|
|
83
|
+
const s = { ...e };
|
|
84
|
+
return m && e.editable !== !1 && (s.editable = !0), a && (a.resizable !== void 0 && e.resizable === void 0 && (s.resizable = a.resizable), a.sortable !== void 0 && e.sortable === void 0 && (s.sortable = a.sortable), a.filterable !== void 0 && e.filter === void 0 && (s.filter = a.filterable)), s;
|
|
85
|
+
}) : [], [c, m, a]), q = p(() => ({
|
|
86
|
+
...v,
|
|
87
|
+
pagination: x,
|
|
88
|
+
paginationPageSize: P,
|
|
89
|
+
domLayout: A,
|
|
90
|
+
animateRows: b,
|
|
91
|
+
rowSelection: S,
|
|
92
|
+
editType: j,
|
|
93
|
+
singleClickEdit: y,
|
|
94
|
+
stopEditingWhenCellsLoseFocus: R,
|
|
95
|
+
statusBar: h ? { statusPanels: h } : void 0,
|
|
96
|
+
enableRangeSelection: z,
|
|
97
|
+
enableCharts: E,
|
|
98
|
+
getContextMenuItems: l?.enabled ? N : void 0,
|
|
99
|
+
// Default options for better UX
|
|
100
|
+
suppressCellFocus: !m,
|
|
101
|
+
enableCellTextSelection: !0,
|
|
102
|
+
ensureDomOrder: !0,
|
|
103
|
+
// Event handlers
|
|
104
|
+
onCellClicked: V,
|
|
105
|
+
onRowClicked: F,
|
|
106
|
+
onSelectionChanged: I,
|
|
107
|
+
onCellValueChanged: w,
|
|
108
|
+
onGridReady: G
|
|
109
|
+
}), [
|
|
110
|
+
v,
|
|
111
|
+
x,
|
|
112
|
+
P,
|
|
113
|
+
A,
|
|
114
|
+
b,
|
|
115
|
+
S,
|
|
116
|
+
j,
|
|
117
|
+
y,
|
|
118
|
+
R,
|
|
119
|
+
h,
|
|
120
|
+
z,
|
|
121
|
+
E,
|
|
122
|
+
l,
|
|
123
|
+
N,
|
|
124
|
+
m,
|
|
125
|
+
V,
|
|
126
|
+
F,
|
|
127
|
+
I,
|
|
128
|
+
w,
|
|
129
|
+
G
|
|
130
|
+
]), B = p(() => ({
|
|
131
|
+
height: typeof d == "number" ? `${d}px` : d,
|
|
132
|
+
width: "100%"
|
|
133
|
+
}), [d]), D = [
|
|
134
|
+
`ag-theme-${H}`,
|
|
135
|
+
"rounded-xl",
|
|
136
|
+
"border",
|
|
137
|
+
"border-border",
|
|
138
|
+
"overflow-hidden",
|
|
139
|
+
"shadow-lg",
|
|
140
|
+
O
|
|
141
|
+
].filter(Boolean).join(" ");
|
|
142
|
+
return /* @__PURE__ */ u.jsxs("div", { className: "ag-grid-container", children: [
|
|
143
|
+
o?.enabled && /* @__PURE__ */ u.jsx("div", { className: "mb-2 flex gap-2", children: /* @__PURE__ */ u.jsx(
|
|
144
|
+
"button",
|
|
145
|
+
{
|
|
146
|
+
onClick: C,
|
|
147
|
+
className: "px-3 py-1.5 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors",
|
|
148
|
+
children: "Export CSV"
|
|
149
|
+
}
|
|
150
|
+
) }),
|
|
151
|
+
/* @__PURE__ */ u.jsx(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
className: D,
|
|
155
|
+
style: B,
|
|
156
|
+
children: /* @__PURE__ */ u.jsx(
|
|
157
|
+
K,
|
|
158
|
+
{
|
|
159
|
+
ref: n,
|
|
160
|
+
rowData: f,
|
|
161
|
+
columnDefs: $,
|
|
162
|
+
gridOptions: q
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
] });
|
|
168
|
+
}
|
|
169
|
+
export {
|
|
170
|
+
Y as default
|
|
171
|
+
};
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import L, { Suspense as ae } from "react";
|
|
2
|
+
import { ComponentRegistry as te } from "@object-ui/core";
|
|
3
|
+
import { Skeleton as ne } from "@object-ui/components";
|
|
4
|
+
var E = { exports: {} }, m = {};
|
|
5
|
+
var V;
|
|
6
|
+
function le() {
|
|
7
|
+
if (V) return m;
|
|
8
|
+
V = 1;
|
|
9
|
+
var a = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
+
function s(c, o, i) {
|
|
11
|
+
var d = null;
|
|
12
|
+
if (i !== void 0 && (d = "" + i), o.key !== void 0 && (d = "" + o.key), "key" in o) {
|
|
13
|
+
i = {};
|
|
14
|
+
for (var f in o)
|
|
15
|
+
f !== "key" && (i[f] = o[f]);
|
|
16
|
+
} else i = o;
|
|
17
|
+
return o = i.ref, {
|
|
18
|
+
$$typeof: a,
|
|
19
|
+
type: c,
|
|
20
|
+
key: d,
|
|
21
|
+
ref: o !== void 0 ? o : null,
|
|
22
|
+
props: i
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return m.Fragment = b, m.jsx = s, m.jsxs = s, m;
|
|
26
|
+
}
|
|
27
|
+
var p = {};
|
|
28
|
+
var Y;
|
|
29
|
+
function oe() {
|
|
30
|
+
return Y || (Y = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
+
function a(e) {
|
|
32
|
+
if (e == null) return null;
|
|
33
|
+
if (typeof e == "function")
|
|
34
|
+
return e.$$typeof === K ? null : e.displayName || e.name || null;
|
|
35
|
+
if (typeof e == "string") return e;
|
|
36
|
+
switch (e) {
|
|
37
|
+
case R:
|
|
38
|
+
return "Fragment";
|
|
39
|
+
case q:
|
|
40
|
+
return "Profiler";
|
|
41
|
+
case J:
|
|
42
|
+
return "StrictMode";
|
|
43
|
+
case X:
|
|
44
|
+
return "Suspense";
|
|
45
|
+
case H:
|
|
46
|
+
return "SuspenseList";
|
|
47
|
+
case Z:
|
|
48
|
+
return "Activity";
|
|
49
|
+
}
|
|
50
|
+
if (typeof e == "object")
|
|
51
|
+
switch (typeof e.tag == "number" && console.error(
|
|
52
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
+
), e.$$typeof) {
|
|
54
|
+
case I:
|
|
55
|
+
return "Portal";
|
|
56
|
+
case U:
|
|
57
|
+
return e.displayName || "Context";
|
|
58
|
+
case W:
|
|
59
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
60
|
+
case B:
|
|
61
|
+
var r = e.render;
|
|
62
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
63
|
+
case Q:
|
|
64
|
+
return r = e.displayName || null, r !== null ? r : a(e.type) || "Memo";
|
|
65
|
+
case k:
|
|
66
|
+
r = e._payload, e = e._init;
|
|
67
|
+
try {
|
|
68
|
+
return a(e(r));
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
function b(e) {
|
|
75
|
+
return "" + e;
|
|
76
|
+
}
|
|
77
|
+
function s(e) {
|
|
78
|
+
try {
|
|
79
|
+
b(e);
|
|
80
|
+
var r = !1;
|
|
81
|
+
} catch {
|
|
82
|
+
r = !0;
|
|
83
|
+
}
|
|
84
|
+
if (r) {
|
|
85
|
+
r = console;
|
|
86
|
+
var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
87
|
+
return t.call(
|
|
88
|
+
r,
|
|
89
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
+
n
|
|
91
|
+
), b(e);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function c(e) {
|
|
95
|
+
if (e === R) return "<>";
|
|
96
|
+
if (typeof e == "object" && e !== null && e.$$typeof === k)
|
|
97
|
+
return "<...>";
|
|
98
|
+
try {
|
|
99
|
+
var r = a(e);
|
|
100
|
+
return r ? "<" + r + ">" : "<...>";
|
|
101
|
+
} catch {
|
|
102
|
+
return "<...>";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function o() {
|
|
106
|
+
var e = _.A;
|
|
107
|
+
return e === null ? null : e.getOwner();
|
|
108
|
+
}
|
|
109
|
+
function i() {
|
|
110
|
+
return Error("react-stack-top-frame");
|
|
111
|
+
}
|
|
112
|
+
function d(e) {
|
|
113
|
+
if (N.call(e, "key")) {
|
|
114
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
115
|
+
if (r && r.isReactWarning) return !1;
|
|
116
|
+
}
|
|
117
|
+
return e.key !== void 0;
|
|
118
|
+
}
|
|
119
|
+
function f(e, r) {
|
|
120
|
+
function t() {
|
|
121
|
+
h || (h = !0, console.error(
|
|
122
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
123
|
+
r
|
|
124
|
+
));
|
|
125
|
+
}
|
|
126
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
127
|
+
get: t,
|
|
128
|
+
configurable: !0
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function G() {
|
|
132
|
+
var e = a(this.type);
|
|
133
|
+
return P[e] || (P[e] = !0, console.error(
|
|
134
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
136
|
+
}
|
|
137
|
+
function $(e, r, t, n, v, S) {
|
|
138
|
+
var l = t.ref;
|
|
139
|
+
return e = {
|
|
140
|
+
$$typeof: x,
|
|
141
|
+
type: e,
|
|
142
|
+
key: r,
|
|
143
|
+
props: t,
|
|
144
|
+
_owner: n
|
|
145
|
+
}, (l !== void 0 ? l : null) !== null ? Object.defineProperty(e, "ref", {
|
|
146
|
+
enumerable: !1,
|
|
147
|
+
get: G
|
|
148
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
149
|
+
configurable: !1,
|
|
150
|
+
enumerable: !1,
|
|
151
|
+
writable: !0,
|
|
152
|
+
value: 0
|
|
153
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
154
|
+
configurable: !1,
|
|
155
|
+
enumerable: !1,
|
|
156
|
+
writable: !0,
|
|
157
|
+
value: null
|
|
158
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
159
|
+
configurable: !1,
|
|
160
|
+
enumerable: !1,
|
|
161
|
+
writable: !0,
|
|
162
|
+
value: v
|
|
163
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
164
|
+
configurable: !1,
|
|
165
|
+
enumerable: !1,
|
|
166
|
+
writable: !0,
|
|
167
|
+
value: S
|
|
168
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
169
|
+
}
|
|
170
|
+
function w(e, r, t, n, v, S) {
|
|
171
|
+
var l = r.children;
|
|
172
|
+
if (l !== void 0)
|
|
173
|
+
if (n)
|
|
174
|
+
if (ee(l)) {
|
|
175
|
+
for (n = 0; n < l.length; n++)
|
|
176
|
+
A(l[n]);
|
|
177
|
+
Object.freeze && Object.freeze(l);
|
|
178
|
+
} else
|
|
179
|
+
console.error(
|
|
180
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
|
+
);
|
|
182
|
+
else A(l);
|
|
183
|
+
if (N.call(r, "key")) {
|
|
184
|
+
l = a(e);
|
|
185
|
+
var u = Object.keys(r).filter(function(re) {
|
|
186
|
+
return re !== "key";
|
|
187
|
+
});
|
|
188
|
+
n = 0 < u.length ? "{key: someKey, " + u.join(": ..., ") + ": ...}" : "{key: someKey}", M[l + n] || (u = 0 < u.length ? "{" + u.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
190
|
+
let props = %s;
|
|
191
|
+
<%s {...props} />
|
|
192
|
+
React keys must be passed directly to JSX without using spread:
|
|
193
|
+
let props = %s;
|
|
194
|
+
<%s key={someKey} {...props} />`,
|
|
195
|
+
n,
|
|
196
|
+
l,
|
|
197
|
+
u,
|
|
198
|
+
l
|
|
199
|
+
), M[l + n] = !0);
|
|
200
|
+
}
|
|
201
|
+
if (l = null, t !== void 0 && (s(t), l = "" + t), d(r) && (s(r.key), l = "" + r.key), "key" in r) {
|
|
202
|
+
t = {};
|
|
203
|
+
for (var T in r)
|
|
204
|
+
T !== "key" && (t[T] = r[T]);
|
|
205
|
+
} else t = r;
|
|
206
|
+
return l && f(
|
|
207
|
+
t,
|
|
208
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
209
|
+
), $(
|
|
210
|
+
e,
|
|
211
|
+
l,
|
|
212
|
+
t,
|
|
213
|
+
o(),
|
|
214
|
+
v,
|
|
215
|
+
S
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
function A(e) {
|
|
219
|
+
O(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === k && (e._payload.status === "fulfilled" ? O(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
220
|
+
}
|
|
221
|
+
function O(e) {
|
|
222
|
+
return typeof e == "object" && e !== null && e.$$typeof === x;
|
|
223
|
+
}
|
|
224
|
+
var g = L, x = /* @__PURE__ */ Symbol.for("react.transitional.element"), I = /* @__PURE__ */ Symbol.for("react.portal"), R = /* @__PURE__ */ Symbol.for("react.fragment"), J = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), W = /* @__PURE__ */ Symbol.for("react.consumer"), U = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), X = /* @__PURE__ */ Symbol.for("react.suspense"), H = /* @__PURE__ */ Symbol.for("react.suspense_list"), Q = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), Z = /* @__PURE__ */ Symbol.for("react.activity"), K = /* @__PURE__ */ Symbol.for("react.client.reference"), _ = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, ee = Array.isArray, y = console.createTask ? console.createTask : function() {
|
|
225
|
+
return null;
|
|
226
|
+
};
|
|
227
|
+
g = {
|
|
228
|
+
react_stack_bottom_frame: function(e) {
|
|
229
|
+
return e();
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
var h, P = {}, j = g.react_stack_bottom_frame.bind(
|
|
233
|
+
g,
|
|
234
|
+
i
|
|
235
|
+
)(), D = y(c(i)), M = {};
|
|
236
|
+
p.Fragment = R, p.jsx = function(e, r, t) {
|
|
237
|
+
var n = 1e4 > _.recentlyCreatedOwnerStacks++;
|
|
238
|
+
return w(
|
|
239
|
+
e,
|
|
240
|
+
r,
|
|
241
|
+
t,
|
|
242
|
+
!1,
|
|
243
|
+
n ? Error("react-stack-top-frame") : j,
|
|
244
|
+
n ? y(c(e)) : D
|
|
245
|
+
);
|
|
246
|
+
}, p.jsxs = function(e, r, t) {
|
|
247
|
+
var n = 1e4 > _.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return w(
|
|
249
|
+
e,
|
|
250
|
+
r,
|
|
251
|
+
t,
|
|
252
|
+
!0,
|
|
253
|
+
n ? Error("react-stack-top-frame") : j,
|
|
254
|
+
n ? y(c(e)) : D
|
|
255
|
+
);
|
|
256
|
+
};
|
|
257
|
+
})()), p;
|
|
258
|
+
}
|
|
259
|
+
var F;
|
|
260
|
+
function ie() {
|
|
261
|
+
return F || (F = 1, process.env.NODE_ENV === "production" ? E.exports = le() : E.exports = oe()), E.exports;
|
|
262
|
+
}
|
|
263
|
+
var C = ie();
|
|
264
|
+
const ue = L.lazy(() => import("./AgGridImpl-DKkq6v1B.js")), z = ({ schema: a }) => /* @__PURE__ */ C.jsx(ae, { fallback: /* @__PURE__ */ C.jsx(ne, { className: "w-full h-[500px]" }), children: /* @__PURE__ */ C.jsx(
|
|
265
|
+
ue,
|
|
266
|
+
{
|
|
267
|
+
rowData: a.rowData,
|
|
268
|
+
columnDefs: a.columnDefs,
|
|
269
|
+
gridOptions: a.gridOptions,
|
|
270
|
+
pagination: a.pagination,
|
|
271
|
+
paginationPageSize: a.paginationPageSize,
|
|
272
|
+
domLayout: a.domLayout,
|
|
273
|
+
animateRows: a.animateRows,
|
|
274
|
+
rowSelection: a.rowSelection,
|
|
275
|
+
theme: a.theme,
|
|
276
|
+
height: a.height,
|
|
277
|
+
className: a.className,
|
|
278
|
+
editable: a.editable,
|
|
279
|
+
editType: a.editType,
|
|
280
|
+
singleClickEdit: a.singleClickEdit,
|
|
281
|
+
stopEditingWhenCellsLoseFocus: a.stopEditingWhenCellsLoseFocus,
|
|
282
|
+
exportConfig: a.exportConfig,
|
|
283
|
+
statusBar: a.statusBar,
|
|
284
|
+
callbacks: a.callbacks,
|
|
285
|
+
columnConfig: a.columnConfig,
|
|
286
|
+
enableRangeSelection: a.enableRangeSelection,
|
|
287
|
+
enableCharts: a.enableCharts,
|
|
288
|
+
contextMenu: a.contextMenu
|
|
289
|
+
}
|
|
290
|
+
) });
|
|
291
|
+
te.register(
|
|
292
|
+
"aggrid",
|
|
293
|
+
z,
|
|
294
|
+
{
|
|
295
|
+
label: "AG Grid",
|
|
296
|
+
icon: "Table",
|
|
297
|
+
category: "plugin",
|
|
298
|
+
inputs: [
|
|
299
|
+
{
|
|
300
|
+
name: "rowData",
|
|
301
|
+
type: "array",
|
|
302
|
+
label: "Row Data",
|
|
303
|
+
description: "Array of objects to display in the grid",
|
|
304
|
+
required: !0
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: "columnDefs",
|
|
308
|
+
type: "array",
|
|
309
|
+
label: "Column Definitions",
|
|
310
|
+
description: "Array of column definitions",
|
|
311
|
+
required: !0
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: "pagination",
|
|
315
|
+
type: "boolean",
|
|
316
|
+
label: "Enable Pagination",
|
|
317
|
+
defaultValue: !1
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: "paginationPageSize",
|
|
321
|
+
type: "number",
|
|
322
|
+
label: "Page Size",
|
|
323
|
+
defaultValue: 10,
|
|
324
|
+
description: "Number of rows per page when pagination is enabled"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: "theme",
|
|
328
|
+
type: "enum",
|
|
329
|
+
label: "Theme",
|
|
330
|
+
enum: [
|
|
331
|
+
{ label: "Quartz", value: "quartz" },
|
|
332
|
+
{ label: "Alpine", value: "alpine" },
|
|
333
|
+
{ label: "Balham", value: "balham" },
|
|
334
|
+
{ label: "Material", value: "material" }
|
|
335
|
+
],
|
|
336
|
+
defaultValue: "quartz"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: "rowSelection",
|
|
340
|
+
type: "enum",
|
|
341
|
+
label: "Row Selection",
|
|
342
|
+
enum: [
|
|
343
|
+
{ label: "None", value: void 0 },
|
|
344
|
+
{ label: "Single", value: "single" },
|
|
345
|
+
{ label: "Multiple", value: "multiple" }
|
|
346
|
+
],
|
|
347
|
+
defaultValue: void 0,
|
|
348
|
+
advanced: !0
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "domLayout",
|
|
352
|
+
type: "enum",
|
|
353
|
+
label: "DOM Layout",
|
|
354
|
+
enum: [
|
|
355
|
+
{ label: "Normal", value: "normal" },
|
|
356
|
+
{ label: "Auto Height", value: "autoHeight" },
|
|
357
|
+
{ label: "Print", value: "print" }
|
|
358
|
+
],
|
|
359
|
+
defaultValue: "normal",
|
|
360
|
+
advanced: !0
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
name: "animateRows",
|
|
364
|
+
type: "boolean",
|
|
365
|
+
label: "Animate Rows",
|
|
366
|
+
defaultValue: !0,
|
|
367
|
+
advanced: !0
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
name: "height",
|
|
371
|
+
type: "number",
|
|
372
|
+
label: "Height (px)",
|
|
373
|
+
defaultValue: 500
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
name: "editable",
|
|
377
|
+
type: "boolean",
|
|
378
|
+
label: "Enable Editing",
|
|
379
|
+
defaultValue: !1,
|
|
380
|
+
description: "Allow cells to be edited inline",
|
|
381
|
+
advanced: !0
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
name: "singleClickEdit",
|
|
385
|
+
type: "boolean",
|
|
386
|
+
label: "Single Click Edit",
|
|
387
|
+
defaultValue: !1,
|
|
388
|
+
description: "Start editing on single click instead of double click",
|
|
389
|
+
advanced: !0
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: "exportConfig",
|
|
393
|
+
type: "code",
|
|
394
|
+
label: "Export Config (JSON)",
|
|
395
|
+
description: 'Configure CSV export: { enabled: true, fileName: "data.csv" }',
|
|
396
|
+
advanced: !0
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
name: "statusBar",
|
|
400
|
+
type: "code",
|
|
401
|
+
label: "Status Bar Config (JSON)",
|
|
402
|
+
description: 'Configure status bar: { enabled: true, aggregations: ["count", "sum", "avg"] }',
|
|
403
|
+
advanced: !0
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
name: "callbacks",
|
|
407
|
+
type: "code",
|
|
408
|
+
label: "Event Callbacks (JSON)",
|
|
409
|
+
description: "Event handlers for cell clicks, selection changes, etc.",
|
|
410
|
+
advanced: !0
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: "columnConfig",
|
|
414
|
+
type: "code",
|
|
415
|
+
label: "Column Config (JSON)",
|
|
416
|
+
description: "Global column settings: { resizable: true, sortable: true, filterable: true }",
|
|
417
|
+
advanced: !0
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: "enableRangeSelection",
|
|
421
|
+
type: "boolean",
|
|
422
|
+
label: "Enable Range Selection",
|
|
423
|
+
defaultValue: !1,
|
|
424
|
+
description: "Allow selecting ranges of cells (like Excel)",
|
|
425
|
+
advanced: !0
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: "enableCharts",
|
|
429
|
+
type: "boolean",
|
|
430
|
+
label: "Enable Charts",
|
|
431
|
+
defaultValue: !1,
|
|
432
|
+
description: "Enable integrated charting (requires AG Grid Enterprise)",
|
|
433
|
+
advanced: !0
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
name: "contextMenu",
|
|
437
|
+
type: "code",
|
|
438
|
+
label: "Context Menu Config (JSON)",
|
|
439
|
+
description: 'Configure right-click menu: { enabled: true, items: ["copy", "export"] }',
|
|
440
|
+
advanced: !0
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
name: "gridOptions",
|
|
444
|
+
type: "code",
|
|
445
|
+
label: "Grid Options (JSON)",
|
|
446
|
+
description: "Advanced AG Grid options",
|
|
447
|
+
advanced: !0
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
name: "className",
|
|
451
|
+
type: "string",
|
|
452
|
+
label: "CSS Class"
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
defaultProps: {
|
|
456
|
+
rowData: [
|
|
457
|
+
{ make: "Tesla", model: "Model Y", price: 64950, electric: !0 },
|
|
458
|
+
{ make: "Ford", model: "F-Series", price: 33850, electric: !1 },
|
|
459
|
+
{ make: "Toyota", model: "Corolla", price: 29600, electric: !1 },
|
|
460
|
+
{ make: "Mercedes", model: "EQA", price: 48890, electric: !0 },
|
|
461
|
+
{ make: "Fiat", model: "500", price: 15774, electric: !1 },
|
|
462
|
+
{ make: "Nissan", model: "Juke", price: 20675, electric: !1 },
|
|
463
|
+
{ make: "Vauxhall", model: "Corsa", price: 18460, electric: !1 },
|
|
464
|
+
{ make: "Volvo", model: "XC90", price: 72835, electric: !1 },
|
|
465
|
+
{ make: "Mercedes", model: "GLA", price: 47825, electric: !1 },
|
|
466
|
+
{ make: "Ford", model: "Puma", price: 27420, electric: !1 },
|
|
467
|
+
{ make: "Volkswagen", model: "Golf", price: 28850, electric: !1 },
|
|
468
|
+
{ make: "Kia", model: "Sportage", price: 31095, electric: !1 }
|
|
469
|
+
],
|
|
470
|
+
columnDefs: [
|
|
471
|
+
{ field: "make", headerName: "Make", sortable: !0, filter: !0 },
|
|
472
|
+
{ field: "model", headerName: "Model", sortable: !0, filter: !0 },
|
|
473
|
+
{
|
|
474
|
+
field: "price",
|
|
475
|
+
headerName: "Price",
|
|
476
|
+
sortable: !0,
|
|
477
|
+
filter: "number",
|
|
478
|
+
valueFormatter: (a) => a.value != null ? "$" + a.value.toLocaleString() : ""
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
field: "electric",
|
|
482
|
+
headerName: "Electric",
|
|
483
|
+
sortable: !0,
|
|
484
|
+
filter: !0,
|
|
485
|
+
cellRenderer: (a) => a.value === !0 ? "âš¡ Yes" : "No"
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
pagination: !0,
|
|
489
|
+
paginationPageSize: 10,
|
|
490
|
+
theme: "quartz",
|
|
491
|
+
height: 500,
|
|
492
|
+
animateRows: !0,
|
|
493
|
+
domLayout: "normal"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
);
|
|
497
|
+
const fe = {
|
|
498
|
+
aggrid: z
|
|
499
|
+
};
|
|
500
|
+
export {
|
|
501
|
+
z as A,
|
|
502
|
+
fe as a,
|
|
503
|
+
C as j
|
|
504
|
+
};
|