@pravinrd/awesome-grid 0.2.2 → 0.2.3
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-lib/index.cjs +6 -7
- package/dist-lib/index.js +544 -609
- package/package.json +2 -5
- package/dist-lib/html2canvas.esm-CUkZERmf.cjs +0 -22
- package/dist-lib/html2canvas.esm-Dmi1NfiH.js +0 -4871
- package/dist-lib/index.es-DQYViHdZ.js +0 -6682
- package/dist-lib/index.es-DSWSDLnm.cjs +0 -18
- package/dist-lib/jspdf.es.min-C0D3oDUy.cjs +0 -193
- package/dist-lib/jspdf.es.min-DVZuwoNv.js +0 -9965
- package/dist-lib/jspdf.plugin.autotable-A1eGW8GI.cjs +0 -2
- package/dist-lib/jspdf.plugin.autotable-D7eVZU2H.js +0 -1084
- package/dist-lib/purify.es-BpFm6ZGf.js +0 -553
- package/dist-lib/purify.es-Cv8QDpGd.cjs +0 -2
package/dist-lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Mt, { useRef as ae, useState as y, useDeferredValue as
|
|
2
|
-
var
|
|
1
|
+
import Mt, { useRef as ae, useState as y, useDeferredValue as Dt, useTransition as Pt, useMemo as H, useEffect as $, useCallback as _e, useLayoutEffect as ut } from "react";
|
|
2
|
+
var Be = { exports: {} }, Se = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.js
|
|
@@ -10,22 +10,22 @@ var Fe = { exports: {} }, Se = {};
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
var dt;
|
|
13
|
-
function
|
|
13
|
+
function It() {
|
|
14
14
|
if (dt) return Se;
|
|
15
15
|
dt = 1;
|
|
16
|
-
var
|
|
17
|
-
function v(O,
|
|
16
|
+
var c = Symbol.for("react.transitional.element"), x = Symbol.for("react.fragment");
|
|
17
|
+
function v(O, k, N) {
|
|
18
18
|
var z = null;
|
|
19
|
-
if (N !== void 0 && (z = "" + N),
|
|
19
|
+
if (N !== void 0 && (z = "" + N), k.key !== void 0 && (z = "" + k.key), "key" in k) {
|
|
20
20
|
N = {};
|
|
21
|
-
for (var Y in
|
|
22
|
-
Y !== "key" && (N[Y] =
|
|
23
|
-
} else N =
|
|
24
|
-
return
|
|
25
|
-
$$typeof:
|
|
21
|
+
for (var Y in k)
|
|
22
|
+
Y !== "key" && (N[Y] = k[Y]);
|
|
23
|
+
} else N = k;
|
|
24
|
+
return k = N.ref, {
|
|
25
|
+
$$typeof: c,
|
|
26
26
|
type: O,
|
|
27
27
|
key: z,
|
|
28
|
-
ref:
|
|
28
|
+
ref: k !== void 0 ? k : null,
|
|
29
29
|
props: N
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -42,166 +42,166 @@ var Ce = {};
|
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
44
|
var ht;
|
|
45
|
-
function
|
|
45
|
+
function $t() {
|
|
46
46
|
return ht || (ht = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
47
|
-
function
|
|
48
|
-
if (
|
|
49
|
-
if (typeof
|
|
50
|
-
return
|
|
51
|
-
if (typeof
|
|
52
|
-
switch (
|
|
47
|
+
function c(n) {
|
|
48
|
+
if (n == null) return null;
|
|
49
|
+
if (typeof n == "function")
|
|
50
|
+
return n.$$typeof === j ? null : n.displayName || n.name || null;
|
|
51
|
+
if (typeof n == "string") return n;
|
|
52
|
+
switch (n) {
|
|
53
53
|
case be:
|
|
54
54
|
return "Fragment";
|
|
55
|
-
case
|
|
55
|
+
case ze:
|
|
56
56
|
return "Profiler";
|
|
57
|
-
case
|
|
57
|
+
case p:
|
|
58
58
|
return "StrictMode";
|
|
59
59
|
case xe:
|
|
60
60
|
return "Suspense";
|
|
61
61
|
case X:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case Ge:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
|
-
if (typeof
|
|
67
|
-
switch (typeof
|
|
66
|
+
if (typeof n == "object")
|
|
67
|
+
switch (typeof n.tag == "number" && console.error(
|
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
),
|
|
69
|
+
), n.$$typeof) {
|
|
70
70
|
case ie:
|
|
71
71
|
return "Portal";
|
|
72
|
-
case
|
|
73
|
-
return
|
|
74
|
-
case
|
|
75
|
-
return (
|
|
72
|
+
case ee:
|
|
73
|
+
return n.displayName || "Context";
|
|
74
|
+
case F:
|
|
75
|
+
return (n._context.displayName || "Context") + ".Consumer";
|
|
76
76
|
case ye:
|
|
77
|
-
var
|
|
78
|
-
return
|
|
77
|
+
var i = n.render;
|
|
78
|
+
return n = n.displayName, n || (n = i.displayName || i.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
|
|
79
79
|
case G:
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
|
|
80
|
+
return i = n.displayName || null, i !== null ? i : c(n.type) || "Memo";
|
|
81
|
+
case te:
|
|
82
|
+
i = n._payload, n = n._init;
|
|
83
83
|
try {
|
|
84
|
-
return
|
|
84
|
+
return c(n(i));
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
function x(
|
|
91
|
-
return "" +
|
|
90
|
+
function x(n) {
|
|
91
|
+
return "" + n;
|
|
92
92
|
}
|
|
93
|
-
function v(
|
|
93
|
+
function v(n) {
|
|
94
94
|
try {
|
|
95
|
-
x(
|
|
96
|
-
var
|
|
95
|
+
x(n);
|
|
96
|
+
var i = !1;
|
|
97
97
|
} catch {
|
|
98
|
-
|
|
98
|
+
i = !0;
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
return
|
|
104
|
-
|
|
100
|
+
if (i) {
|
|
101
|
+
i = console;
|
|
102
|
+
var g = i.error, _ = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
103
|
+
return g.call(
|
|
104
|
+
i,
|
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
106
|
_
|
|
107
|
-
), x(
|
|
107
|
+
), x(n);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function O(
|
|
111
|
-
if (
|
|
112
|
-
if (typeof
|
|
110
|
+
function O(n) {
|
|
111
|
+
if (n === be) return "<>";
|
|
112
|
+
if (typeof n == "object" && n !== null && n.$$typeof === te)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
|
-
var
|
|
116
|
-
return
|
|
115
|
+
var i = c(n);
|
|
116
|
+
return i ? "<" + i + ">" : "<...>";
|
|
117
117
|
} catch {
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
var
|
|
123
|
-
return
|
|
121
|
+
function k() {
|
|
122
|
+
var n = ve.A;
|
|
123
|
+
return n === null ? null : n.getOwner();
|
|
124
124
|
}
|
|
125
125
|
function N() {
|
|
126
126
|
return Error("react-stack-top-frame");
|
|
127
127
|
}
|
|
128
|
-
function z(
|
|
129
|
-
if (Oe.call(
|
|
130
|
-
var
|
|
131
|
-
if (
|
|
128
|
+
function z(n) {
|
|
129
|
+
if (Oe.call(n, "key")) {
|
|
130
|
+
var i = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
131
|
+
if (i && i.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return n.key !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function Y(
|
|
136
|
-
function
|
|
137
|
-
|
|
135
|
+
function Y(n, i) {
|
|
136
|
+
function g() {
|
|
137
|
+
re || (re = !0, console.error(
|
|
138
138
|
"%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)",
|
|
139
|
-
|
|
139
|
+
i
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
g.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
143
|
+
get: g,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
var
|
|
149
|
-
return ce[
|
|
147
|
+
function we() {
|
|
148
|
+
var n = c(this.type);
|
|
149
|
+
return ce[n] || (ce[n] = !0, console.error(
|
|
150
150
|
"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."
|
|
151
|
-
)),
|
|
151
|
+
)), n = this.props.ref, n !== void 0 ? n : null;
|
|
152
152
|
}
|
|
153
|
-
function se(
|
|
154
|
-
var
|
|
155
|
-
return
|
|
153
|
+
function se(n, i, g, _, L, de) {
|
|
154
|
+
var w = g.ref;
|
|
155
|
+
return n = {
|
|
156
156
|
$$typeof: Ee,
|
|
157
|
-
type:
|
|
158
|
-
key:
|
|
159
|
-
props:
|
|
157
|
+
type: n,
|
|
158
|
+
key: i,
|
|
159
|
+
props: g,
|
|
160
160
|
_owner: _
|
|
161
|
-
}, (
|
|
161
|
+
}, (w !== void 0 ? w : null) !== null ? Object.defineProperty(n, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
|
-
get:
|
|
164
|
-
}) : Object.defineProperty(
|
|
163
|
+
get: we
|
|
164
|
+
}) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
168
|
value: 0
|
|
169
|
-
}), Object.defineProperty(
|
|
169
|
+
}), Object.defineProperty(n, "_debugInfo", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
writable: !0,
|
|
173
173
|
value: null
|
|
174
|
-
}), Object.defineProperty(
|
|
174
|
+
}), Object.defineProperty(n, "_debugStack", {
|
|
175
175
|
configurable: !1,
|
|
176
176
|
enumerable: !1,
|
|
177
177
|
writable: !0,
|
|
178
|
-
value:
|
|
179
|
-
}), Object.defineProperty(
|
|
178
|
+
value: L
|
|
179
|
+
}), Object.defineProperty(n, "_debugTask", {
|
|
180
180
|
configurable: !1,
|
|
181
181
|
enumerable: !1,
|
|
182
182
|
writable: !0,
|
|
183
183
|
value: de
|
|
184
|
-
}), Object.freeze && (Object.freeze(
|
|
184
|
+
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
186
|
+
function Q(n, i, g, _, L, de) {
|
|
187
|
+
var w = i.children;
|
|
188
|
+
if (w !== void 0)
|
|
189
189
|
if (_)
|
|
190
|
-
if (Ae(
|
|
191
|
-
for (_ = 0; _ <
|
|
192
|
-
le(
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
190
|
+
if (Ae(w)) {
|
|
191
|
+
for (_ = 0; _ < w.length; _++)
|
|
192
|
+
le(w[_]);
|
|
193
|
+
Object.freeze && Object.freeze(w);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else le(
|
|
199
|
-
if (Oe.call(
|
|
200
|
-
|
|
201
|
-
var
|
|
198
|
+
else le(w);
|
|
199
|
+
if (Oe.call(i, "key")) {
|
|
200
|
+
w = c(n);
|
|
201
|
+
var S = Object.keys(i).filter(function(U) {
|
|
202
202
|
return U !== "key";
|
|
203
203
|
});
|
|
204
|
-
_ = 0 <
|
|
204
|
+
_ = 0 < S.length ? "{key: someKey, " + S.join(": ..., ") + ": ...}" : "{key: someKey}", ne[w + _] || (S = 0 < S.length ? "{" + S.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
@@ -209,146 +209,145 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
211
|
_,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
),
|
|
212
|
+
w,
|
|
213
|
+
S,
|
|
214
|
+
w
|
|
215
|
+
), ne[w + _] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
for (var ke in
|
|
220
|
-
ke !== "key" && (
|
|
221
|
-
} else
|
|
222
|
-
return
|
|
223
|
-
|
|
224
|
-
typeof
|
|
217
|
+
if (w = null, g !== void 0 && (v(g), w = "" + g), z(i) && (v(i.key), w = "" + i.key), "key" in i) {
|
|
218
|
+
g = {};
|
|
219
|
+
for (var ke in i)
|
|
220
|
+
ke !== "key" && (g[ke] = i[ke]);
|
|
221
|
+
} else g = i;
|
|
222
|
+
return w && Y(
|
|
223
|
+
g,
|
|
224
|
+
typeof n == "function" ? n.displayName || n.name || "Unknown" : n
|
|
225
225
|
), se(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
n,
|
|
227
|
+
w,
|
|
228
|
+
g,
|
|
229
|
+
k(),
|
|
230
|
+
L,
|
|
231
231
|
de
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
function le(
|
|
235
|
-
|
|
234
|
+
function le(n) {
|
|
235
|
+
Te(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === te && (n._payload.status === "fulfilled" ? Te(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return typeof
|
|
237
|
+
function Te(n) {
|
|
238
|
+
return typeof n == "object" && n !== null && n.$$typeof === Ee;
|
|
239
239
|
}
|
|
240
|
-
var J = Mt, Ee = Symbol.for("react.transitional.element"), ie = Symbol.for("react.portal"), be = Symbol.for("react.fragment"),
|
|
240
|
+
var J = Mt, Ee = Symbol.for("react.transitional.element"), ie = Symbol.for("react.portal"), be = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), ze = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), ee = Symbol.for("react.context"), ye = Symbol.for("react.forward_ref"), xe = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), G = Symbol.for("react.memo"), te = Symbol.for("react.lazy"), Ge = Symbol.for("react.activity"), j = Symbol.for("react.client.reference"), ve = J.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Oe = Object.prototype.hasOwnProperty, Ae = Array.isArray, T = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
243
|
J = {
|
|
244
|
-
react_stack_bottom_frame: function(
|
|
245
|
-
return
|
|
244
|
+
react_stack_bottom_frame: function(n) {
|
|
245
|
+
return n();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var
|
|
248
|
+
var re, ce = {}, ue = J.react_stack_bottom_frame.bind(
|
|
249
249
|
J,
|
|
250
250
|
N
|
|
251
|
-
)(), V =
|
|
252
|
-
Ce.Fragment = be, Ce.jsx = function(
|
|
251
|
+
)(), V = T(O(N)), ne = {};
|
|
252
|
+
Ce.Fragment = be, Ce.jsx = function(n, i, g) {
|
|
253
253
|
var _ = 1e4 > ve.recentlyCreatedOwnerStacks++;
|
|
254
|
-
return
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
return Q(
|
|
255
|
+
n,
|
|
256
|
+
i,
|
|
257
|
+
g,
|
|
258
258
|
!1,
|
|
259
259
|
_ ? Error("react-stack-top-frame") : ue,
|
|
260
|
-
_ ?
|
|
260
|
+
_ ? T(O(n)) : V
|
|
261
261
|
);
|
|
262
|
-
}, Ce.jsxs = function(
|
|
262
|
+
}, Ce.jsxs = function(n, i, g) {
|
|
263
263
|
var _ = 1e4 > ve.recentlyCreatedOwnerStacks++;
|
|
264
|
-
return
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
return Q(
|
|
265
|
+
n,
|
|
266
|
+
i,
|
|
267
|
+
g,
|
|
268
268
|
!0,
|
|
269
269
|
_ ? Error("react-stack-top-frame") : ue,
|
|
270
|
-
_ ?
|
|
270
|
+
_ ? T(O(n)) : V
|
|
271
271
|
);
|
|
272
272
|
};
|
|
273
273
|
})()), Ce;
|
|
274
274
|
}
|
|
275
275
|
var mt;
|
|
276
|
-
function
|
|
277
|
-
return mt || (mt = 1, process.env.NODE_ENV === "production" ?
|
|
276
|
+
function Lt() {
|
|
277
|
+
return mt || (mt = 1, process.env.NODE_ENV === "production" ? Be.exports = It() : Be.exports = $t()), Be.exports;
|
|
278
278
|
}
|
|
279
|
-
var r =
|
|
280
|
-
const
|
|
281
|
-
container:
|
|
279
|
+
var r = Lt();
|
|
280
|
+
const Bt = "_container_dihwe_1", Wt = "_themeLight_dihwe_10", Ft = "_themeDark_dihwe_29", zt = "_themePurple_dihwe_48", Gt = "_headerRow_dihwe_67", Vt = "_flexRow_dihwe_76", Ut = "_toolbarGroup_dihwe_82", Ht = "_dropdown_dihwe_86", Yt = "_buttonBase_dihwe_90", Jt = "_buttonPrimary_dihwe_101", Xt = "_buttonDanger_dihwe_111", qt = "_buttonMuted_dihwe_121", Kt = "_dropdownToggle_dihwe_142", Zt = "_dropdownMenu_dihwe_147", Qt = "_dropdownMenuOpen_dihwe_163", er = "_menuItemButton_dihwe_167", tr = "_labelMuted_dihwe_185", rr = "_selectSmall_dihwe_190", nr = "_selectAuto_dihwe_199", or = "_switchRow_dihwe_203", ar = "_groupingSummary_dihwe_210", sr = "_relative_dihwe_217", lr = "_overlay_dihwe_221", ir = "_overlayInner_dihwe_229", cr = "_spinner_dihwe_236", ur = "_tableWrap_dihwe_252", dr = "_tableWrapAll_dihwe_256", hr = "_table_dihwe_252", mr = "_tableHead_dihwe_278", pr = "_thCellTop_dihwe_282", gr = "_thCellFilter_dihwe_290", fr = "_thInner_dihwe_297", _r = "_resizeHandle_dihwe_303", wr = "_sortButton_dihwe_328", br = "_iconMuted_dihwe_338", yr = "_inlineGroup_dihwe_342", xr = "_input_dihwe_350", vr = "_rowInteractive_dihwe_362", kr = "_groupRow_dihwe_375", Nr = "_groupRowAnimated_dihwe_382", jr = "_groupChildRow_dihwe_386", Sr = "_groupToggle_dihwe_390", Cr = "_groupMeta_dihwe_430", Rr = "_checkbox_dihwe_438", Tr = "_tfoot_dihwe_447", Er = "_textCenter_dihwe_455", Or = "_paginationWrap_dihwe_459", Ar = "_pagination_dihwe_459", Mr = "_pageButton_dihwe_473", Dr = "_pageButtonActive_dihwe_488", Pr = "_backdrop_dihwe_494", Ir = "_drawer_dihwe_500", $r = "_drawerTitle_dihwe_515", Lr = "_drawerSection_dihwe_521", Br = "_drawerSubtitle_dihwe_527", Wr = "_sectionToggle_dihwe_534", Fr = "_sectionBody_dihwe_547", zr = "_drawerRow_dihwe_551", Gr = "_spacerAuto_dihwe_558", Vr = "_successText_dihwe_562", Ur = "_srOnly_dihwe_570", a = {
|
|
281
|
+
container: Bt,
|
|
282
282
|
themeLight: Wt,
|
|
283
|
-
themeDark:
|
|
284
|
-
themePurple:
|
|
285
|
-
headerRow:
|
|
286
|
-
flexRow:
|
|
287
|
-
toolbarGroup:
|
|
288
|
-
dropdown:
|
|
289
|
-
buttonBase:
|
|
290
|
-
buttonPrimary:
|
|
291
|
-
buttonDanger:
|
|
292
|
-
buttonMuted:
|
|
293
|
-
dropdownToggle:
|
|
294
|
-
dropdownMenu:
|
|
295
|
-
dropdownMenuOpen:
|
|
296
|
-
menuItemButton:
|
|
297
|
-
labelMuted:
|
|
298
|
-
selectSmall:
|
|
299
|
-
selectAuto:
|
|
300
|
-
switchRow:
|
|
301
|
-
groupingSummary:
|
|
302
|
-
relative:
|
|
303
|
-
overlay:
|
|
304
|
-
overlayInner:
|
|
305
|
-
spinner:
|
|
306
|
-
tableWrap:
|
|
307
|
-
tableWrapAll:
|
|
308
|
-
table:
|
|
309
|
-
tableHead:
|
|
310
|
-
thCellTop:
|
|
311
|
-
thCellFilter:
|
|
312
|
-
thInner:
|
|
283
|
+
themeDark: Ft,
|
|
284
|
+
themePurple: zt,
|
|
285
|
+
headerRow: Gt,
|
|
286
|
+
flexRow: Vt,
|
|
287
|
+
toolbarGroup: Ut,
|
|
288
|
+
dropdown: Ht,
|
|
289
|
+
buttonBase: Yt,
|
|
290
|
+
buttonPrimary: Jt,
|
|
291
|
+
buttonDanger: Xt,
|
|
292
|
+
buttonMuted: qt,
|
|
293
|
+
dropdownToggle: Kt,
|
|
294
|
+
dropdownMenu: Zt,
|
|
295
|
+
dropdownMenuOpen: Qt,
|
|
296
|
+
menuItemButton: er,
|
|
297
|
+
labelMuted: tr,
|
|
298
|
+
selectSmall: rr,
|
|
299
|
+
selectAuto: nr,
|
|
300
|
+
switchRow: or,
|
|
301
|
+
groupingSummary: ar,
|
|
302
|
+
relative: sr,
|
|
303
|
+
overlay: lr,
|
|
304
|
+
overlayInner: ir,
|
|
305
|
+
spinner: cr,
|
|
306
|
+
tableWrap: ur,
|
|
307
|
+
tableWrapAll: dr,
|
|
308
|
+
table: hr,
|
|
309
|
+
tableHead: mr,
|
|
310
|
+
thCellTop: pr,
|
|
311
|
+
thCellFilter: gr,
|
|
312
|
+
thInner: fr,
|
|
313
313
|
resizeHandle: _r,
|
|
314
|
-
sortButton:
|
|
315
|
-
iconMuted:
|
|
316
|
-
inlineGroup:
|
|
317
|
-
input:
|
|
318
|
-
rowInteractive:
|
|
319
|
-
groupRow:
|
|
314
|
+
sortButton: wr,
|
|
315
|
+
iconMuted: br,
|
|
316
|
+
inlineGroup: yr,
|
|
317
|
+
input: xr,
|
|
318
|
+
rowInteractive: vr,
|
|
319
|
+
groupRow: kr,
|
|
320
320
|
groupRowAnimated: Nr,
|
|
321
|
-
groupChildRow:
|
|
322
|
-
groupToggle:
|
|
323
|
-
groupMeta:
|
|
321
|
+
groupChildRow: jr,
|
|
322
|
+
groupToggle: Sr,
|
|
323
|
+
groupMeta: Cr,
|
|
324
324
|
checkbox: Rr,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
const [v, O] = y(!1), j = ae(null);
|
|
325
|
+
tfoot: Tr,
|
|
326
|
+
textCenter: Er,
|
|
327
|
+
paginationWrap: Or,
|
|
328
|
+
pagination: Ar,
|
|
329
|
+
pageButton: Mr,
|
|
330
|
+
pageButtonActive: Dr,
|
|
331
|
+
backdrop: Pr,
|
|
332
|
+
drawer: Ir,
|
|
333
|
+
drawerTitle: $r,
|
|
334
|
+
drawerSection: Lr,
|
|
335
|
+
drawerSubtitle: Br,
|
|
336
|
+
sectionToggle: Wr,
|
|
337
|
+
sectionBody: Fr,
|
|
338
|
+
drawerRow: zr,
|
|
339
|
+
spacerAuto: Gr,
|
|
340
|
+
successText: Vr,
|
|
341
|
+
srOnly: Ur
|
|
342
|
+
}, E = (...c) => c.filter(Boolean).join(" ");
|
|
343
|
+
function pt({ label: c, children: x }) {
|
|
344
|
+
const [v, O] = y(!1), k = ae(null);
|
|
346
345
|
return $(() => {
|
|
347
346
|
const N = (z) => {
|
|
348
|
-
|
|
347
|
+
k.current && !k.current.contains(z.target) && O(!1);
|
|
349
348
|
};
|
|
350
349
|
return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
351
|
-
}, []), /* @__PURE__ */ r.jsxs("div", { className: a.dropdown, ref:
|
|
350
|
+
}, []), /* @__PURE__ */ r.jsxs("div", { className: a.dropdown, ref: k, children: [
|
|
352
351
|
/* @__PURE__ */ r.jsx(
|
|
353
352
|
"button",
|
|
354
353
|
{
|
|
@@ -361,7 +360,7 @@ function pt({ label: u, children: x }) {
|
|
|
361
360
|
"aria-haspopup": "menu",
|
|
362
361
|
"aria-expanded": v,
|
|
363
362
|
onClick: () => O(!v),
|
|
364
|
-
children:
|
|
363
|
+
children: c
|
|
365
364
|
}
|
|
366
365
|
),
|
|
367
366
|
/* @__PURE__ */ r.jsx(
|
|
@@ -375,37 +374,37 @@ function pt({ label: u, children: x }) {
|
|
|
375
374
|
)
|
|
376
375
|
] });
|
|
377
376
|
}
|
|
378
|
-
const
|
|
379
|
-
const O = (
|
|
380
|
-
return O.font = x, O.measureText(
|
|
381
|
-
},
|
|
382
|
-
if (!
|
|
377
|
+
const Je = (c, x = "14px system-ui") => {
|
|
378
|
+
const O = (Je.canvas || (Je.canvas = document.createElement("canvas"))).getContext("2d");
|
|
379
|
+
return O.font = x, O.measureText(c).width;
|
|
380
|
+
}, Re = (c) => c.toLowerCase().replace(/[_\s]+(.)?/g, (x, v) => v ? v.toUpperCase() : "").replace(/^(.)/, (x) => x.toLowerCase()), Hr = (c) => {
|
|
381
|
+
if (!c || typeof c != "object") return c;
|
|
383
382
|
const x = {};
|
|
384
|
-
return Object.keys(
|
|
385
|
-
x[
|
|
383
|
+
return Object.keys(c).forEach((v) => {
|
|
384
|
+
x[Re(v)] = c[v];
|
|
386
385
|
}), x;
|
|
387
|
-
},
|
|
388
|
-
function
|
|
389
|
-
apiEndpoint:
|
|
386
|
+
}, K = 0, We = 38, gt = 10, Yr = [], Fe = 80;
|
|
387
|
+
function Xr({
|
|
388
|
+
apiEndpoint: c,
|
|
390
389
|
rowKey: x,
|
|
391
390
|
theme: v = "light",
|
|
392
|
-
computedColumns: O =
|
|
393
|
-
currency:
|
|
391
|
+
computedColumns: O = Yr,
|
|
392
|
+
currency: k = "INR",
|
|
394
393
|
dateFormat: N = {
|
|
395
394
|
locale: "en-US",
|
|
396
395
|
options: { year: "numeric", month: "2-digit", day: "2-digit" }
|
|
397
396
|
},
|
|
398
397
|
dateSeparator: z = "/",
|
|
399
398
|
pageSizeOptions: Y = [50, 100, 500, 1e3, 0],
|
|
400
|
-
defaultPageSize:
|
|
399
|
+
defaultPageSize: we
|
|
401
400
|
}) {
|
|
402
|
-
const se = ae(!1),
|
|
401
|
+
const se = ae(!1), Q = ae(!1), le = ae(!1), Te = 50, [J, Ee] = y(!0), [ie, be] = y([]), [p, ze] = y([]), [F, ee] = y([]), [ye, xe] = y(!1), [X, G] = y(1), te = Array.isArray(Y) && Y.length > 0 ? Y : [50, 100, 500, 1e3, 0], Ge = we !== void 0 && te.includes(we) ? we : te[0] || 50, [j, ve] = y(Ge), [Oe, Ae] = y(!1), [T, re] = y([]), [ce, ue] = y({}), [V, ne] = y([]), [n, i] = y(() => {
|
|
403
402
|
const e = String(v || "light").toLowerCase();
|
|
404
403
|
return e === "dark" || e === "purple" ? e : "light";
|
|
405
|
-
}), [
|
|
404
|
+
}), [g, _] = y({
|
|
406
405
|
groupBy: !1,
|
|
407
406
|
aggregates: !1
|
|
408
|
-
}), [
|
|
407
|
+
}), [L, de] = y({}), w = Dt(L), [S, ke] = y({ key: null, direction: "asc" }), [U, Ne] = y([]), [Me, De] = y({}), [ft, M] = Pt(), Xe = ae(null), [_t, wt] = y(0), Pe = ae(null), [qe, Ke] = y(0), [Ze, bt] = y(0), he = ae(null), [yt, Qe] = y(() => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(max-width: 767.98px)").matches), Ve = String(k || "INR").toUpperCase() === "USD" ? "USD" : "INR", et = Ve === "USD" ? "en-US" : "en-IN", tt = N?.locale || "en-US", rt = H(
|
|
409
408
|
() => N?.options || {
|
|
410
409
|
year: "numeric",
|
|
411
410
|
month: "2-digit",
|
|
@@ -414,489 +413,432 @@ function Kr({
|
|
|
414
413
|
[N]
|
|
415
414
|
);
|
|
416
415
|
$(() => {
|
|
417
|
-
|
|
418
|
-
}, [
|
|
416
|
+
j > 100 && xe(!0);
|
|
417
|
+
}, [j]), $(() => {
|
|
419
418
|
let e = !0;
|
|
420
419
|
const t = new AbortController();
|
|
421
420
|
return (async () => {
|
|
422
421
|
try {
|
|
423
422
|
xe(!0);
|
|
424
|
-
const
|
|
423
|
+
const o = new URLSearchParams({
|
|
425
424
|
page: String(X),
|
|
426
|
-
pageSize: String(
|
|
427
|
-
}), s = await fetch(`${
|
|
425
|
+
pageSize: String(j)
|
|
426
|
+
}), s = await fetch(`${c}?${o.toString()}`, {
|
|
428
427
|
signal: t.signal
|
|
429
428
|
});
|
|
430
429
|
if (!s.ok)
|
|
431
430
|
throw new Error(`Request failed: ${s.status} ${s.statusText}`);
|
|
432
431
|
const l = await s.json();
|
|
433
432
|
if (!e) return;
|
|
434
|
-
const
|
|
435
|
-
key:
|
|
433
|
+
const d = (Array.isArray(l?.data) ? l.data : []).map((m) => Hr(m)), f = l?.columns || [], b = O.filter((m) => m && m.key && typeof m.formula == "function").map((m) => ({
|
|
434
|
+
key: Re(m.key),
|
|
436
435
|
label: m.label || m.key,
|
|
437
436
|
formula: m.formula
|
|
438
|
-
})), h =
|
|
439
|
-
const
|
|
437
|
+
})), h = f.map((m) => {
|
|
438
|
+
const R = typeof m == "string" ? m : m.key;
|
|
440
439
|
return {
|
|
441
|
-
key:
|
|
442
|
-
label: m.label ||
|
|
440
|
+
key: Re(R),
|
|
441
|
+
label: m.label || R.replace(/_/g, " ").replace(/\b\w/g, (W) => W.toUpperCase())
|
|
443
442
|
};
|
|
444
|
-
}),
|
|
443
|
+
}), C = [
|
|
445
444
|
...h,
|
|
446
|
-
...
|
|
447
|
-
], A =
|
|
448
|
-
const
|
|
449
|
-
return
|
|
445
|
+
...b.filter((m) => !h.some((R) => R.key === m.key)).map(({ key: m, label: R }) => ({ key: m, label: R }))
|
|
446
|
+
], A = d.map((m) => {
|
|
447
|
+
const R = { ...m };
|
|
448
|
+
return b.forEach((W) => {
|
|
450
449
|
try {
|
|
451
|
-
|
|
450
|
+
R[W.key] = W.formula(m);
|
|
452
451
|
} catch (fe) {
|
|
453
|
-
|
|
452
|
+
R[W.key] = "", console.error(`Failed computed column formula for '${W.key}'`, fe);
|
|
454
453
|
}
|
|
455
|
-
}),
|
|
454
|
+
}), R;
|
|
456
455
|
});
|
|
457
|
-
if (be(A),
|
|
458
|
-
const m =
|
|
459
|
-
|
|
456
|
+
if (be(A), ze(C), !se.current) {
|
|
457
|
+
const m = C.map((R) => R.key);
|
|
458
|
+
ee(m), Ne(m), se.current = !0;
|
|
460
459
|
}
|
|
461
|
-
} catch (
|
|
462
|
-
if (
|
|
463
|
-
console.error("Failed to load grid data",
|
|
460
|
+
} catch (o) {
|
|
461
|
+
if (o?.name === "AbortError") return;
|
|
462
|
+
console.error("Failed to load grid data", o);
|
|
464
463
|
} finally {
|
|
465
464
|
e && xe(!1);
|
|
466
465
|
}
|
|
467
466
|
})(), () => {
|
|
468
467
|
e = !1, t.abort();
|
|
469
468
|
};
|
|
470
|
-
}, [
|
|
471
|
-
if (
|
|
472
|
-
const e =
|
|
473
|
-
|
|
469
|
+
}, [c, X, j, O]), $(() => {
|
|
470
|
+
if (p.length > 0 && F.length === 0) {
|
|
471
|
+
const e = p.map((t) => t.key);
|
|
472
|
+
ee(e), Ne(e), se.current = !0;
|
|
474
473
|
}
|
|
475
|
-
}, [
|
|
476
|
-
if (!
|
|
477
|
-
const e =
|
|
478
|
-
|
|
479
|
-
const
|
|
480
|
-
return [...
|
|
481
|
-
}),
|
|
474
|
+
}, [p, F]), $(() => {
|
|
475
|
+
if (!p.length) return;
|
|
476
|
+
const e = p.map((t) => t.key);
|
|
477
|
+
Ne((t) => {
|
|
478
|
+
const o = t.filter((l) => e.includes(l)), s = e.filter((l) => !o.includes(l));
|
|
479
|
+
return [...o, ...s];
|
|
480
|
+
}), ee((t) => {
|
|
482
481
|
if (!t.length) return e;
|
|
483
|
-
const
|
|
484
|
-
return [...
|
|
482
|
+
const o = t.filter((l) => e.includes(l)), s = e.filter((l) => !o.includes(l));
|
|
483
|
+
return [...o, ...s];
|
|
485
484
|
});
|
|
486
|
-
}, [
|
|
487
|
-
if (!
|
|
488
|
-
const e = new Set(
|
|
489
|
-
|
|
490
|
-
}, [
|
|
485
|
+
}, [p]), $(() => {
|
|
486
|
+
if (!p.length) return;
|
|
487
|
+
const e = new Set(p.map((t) => t.key));
|
|
488
|
+
re((t) => t.filter((o) => e.has(o)));
|
|
489
|
+
}, [p]), $(() => {
|
|
491
490
|
const e = () => G(1);
|
|
492
491
|
return window.addEventListener("refreshTable", e), () => window.removeEventListener("refreshTable", e);
|
|
493
492
|
}, []), $(() => {
|
|
494
|
-
if (!
|
|
495
|
-
|
|
496
|
-
const e = localStorage.getItem(`columnOrder_${
|
|
497
|
-
if (e && (
|
|
498
|
-
|
|
493
|
+
if (!c) return;
|
|
494
|
+
Q.current = !1, le.current = !1;
|
|
495
|
+
const e = localStorage.getItem(`columnOrder_${c}`), t = localStorage.getItem(`visibleColumns_${c}`), o = localStorage.getItem(`groupByColumns_${c}`), s = localStorage.getItem(`totalColumns_${c}`), l = localStorage.getItem(`theme_${c}`), u = localStorage.getItem(`columnWidths_${c}`);
|
|
496
|
+
if (e && (Ne(JSON.parse(e)), se.current = !0), t && ee(JSON.parse(t)), o && re(JSON.parse(o)), s && (ne(JSON.parse(s)), Q.current = !0), u && De(JSON.parse(u)), l === "light" || l === "dark" || l === "purple")
|
|
497
|
+
i(l);
|
|
499
498
|
else {
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
499
|
+
const d = String(v || "light").toLowerCase();
|
|
500
|
+
i(
|
|
501
|
+
d === "dark" || d === "purple" ? d : "light"
|
|
503
502
|
);
|
|
504
503
|
}
|
|
505
504
|
le.current = !0;
|
|
506
|
-
}, [
|
|
507
|
-
|
|
508
|
-
`columnOrder_${
|
|
505
|
+
}, [c, v]), $(() => {
|
|
506
|
+
c && le.current && (U.length > 0 && localStorage.setItem(
|
|
507
|
+
`columnOrder_${c}`,
|
|
509
508
|
JSON.stringify(U)
|
|
510
|
-
),
|
|
511
|
-
`visibleColumns_${
|
|
512
|
-
JSON.stringify(
|
|
509
|
+
), F.length > 0 && localStorage.setItem(
|
|
510
|
+
`visibleColumns_${c}`,
|
|
511
|
+
JSON.stringify(F)
|
|
513
512
|
), localStorage.setItem(
|
|
514
|
-
`groupByColumns_${
|
|
515
|
-
JSON.stringify(
|
|
513
|
+
`groupByColumns_${c}`,
|
|
514
|
+
JSON.stringify(T)
|
|
516
515
|
), localStorage.setItem(
|
|
517
|
-
`totalColumns_${
|
|
516
|
+
`totalColumns_${c}`,
|
|
518
517
|
JSON.stringify(V)
|
|
519
|
-
), localStorage.setItem(`theme_${
|
|
520
|
-
`columnWidths_${
|
|
521
|
-
JSON.stringify(
|
|
518
|
+
), localStorage.setItem(`theme_${c}`, n), localStorage.setItem(
|
|
519
|
+
`columnWidths_${c}`,
|
|
520
|
+
JSON.stringify(Me)
|
|
522
521
|
));
|
|
523
522
|
}, [
|
|
524
|
-
|
|
523
|
+
c,
|
|
525
524
|
U,
|
|
526
|
-
|
|
527
|
-
|
|
525
|
+
F,
|
|
526
|
+
T,
|
|
528
527
|
V,
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
n,
|
|
529
|
+
Me
|
|
531
530
|
]);
|
|
532
|
-
const
|
|
531
|
+
const oe = (e, t) => e[t] ?? "", me = _e(
|
|
533
532
|
(e) => {
|
|
534
533
|
const t = Number(e);
|
|
535
|
-
return Number.isNaN(t) ? "" : new Intl.NumberFormat(
|
|
534
|
+
return Number.isNaN(t) ? "" : new Intl.NumberFormat(et, {
|
|
536
535
|
style: "currency",
|
|
537
|
-
currency:
|
|
536
|
+
currency: Ve,
|
|
538
537
|
maximumFractionDigits: 2
|
|
539
538
|
}).format(t);
|
|
540
539
|
},
|
|
541
|
-
[
|
|
542
|
-
), xt =
|
|
540
|
+
[et, Ve]
|
|
541
|
+
), xt = _e(
|
|
543
542
|
(e) => {
|
|
544
543
|
const t = new Date(e);
|
|
545
|
-
return Number.isNaN(t.getTime()) ? e ?? "" : new Intl.DateTimeFormat(
|
|
544
|
+
return Number.isNaN(t.getTime()) ? e ?? "" : new Intl.DateTimeFormat(tt, rt).formatToParts(t).filter((s) => s.type === "year" || s.type === "month" || s.type === "day").map((s) => s.value).join(z);
|
|
546
545
|
},
|
|
547
|
-
[
|
|
548
|
-
),
|
|
546
|
+
[tt, rt, z]
|
|
547
|
+
), q = _e(
|
|
549
548
|
(e) => {
|
|
550
549
|
const t = ie[0]?.[e];
|
|
551
550
|
return t == null ? "text" : isNaN(Number(t)) ? isNaN(Date.parse(t)) ? "text" : "date" : "number";
|
|
552
551
|
},
|
|
553
552
|
[ie]
|
|
554
|
-
),
|
|
553
|
+
), nt = (e) => {
|
|
555
554
|
const t = new Date(e);
|
|
556
555
|
return Number.isNaN(t.getTime()) ? null : `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(
|
|
557
556
|
t.getDate()
|
|
558
557
|
).padStart(2, "0")}`;
|
|
559
|
-
}, Ie = H(() =>
|
|
558
|
+
}, Ie = H(() => p.filter((e) => q(e.key) === "number"), [p, q]);
|
|
560
559
|
$(() => {
|
|
561
|
-
if (!
|
|
560
|
+
if (!p.length) return;
|
|
562
561
|
const e = Ie.map((t) => t.key);
|
|
563
562
|
if (!e.length) {
|
|
564
|
-
|
|
563
|
+
ne([]);
|
|
565
564
|
return;
|
|
566
565
|
}
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
return
|
|
566
|
+
ne((t) => {
|
|
567
|
+
const o = new Set(e);
|
|
568
|
+
return Q.current ? t.filter((s) => o.has(s)) : (Q.current = !0, e);
|
|
570
569
|
});
|
|
571
|
-
}, [
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
de((
|
|
575
|
-
...
|
|
576
|
-
[e]: { ...
|
|
570
|
+
}, [p.length, Ie]);
|
|
571
|
+
const je = (e, t) => {
|
|
572
|
+
M(() => {
|
|
573
|
+
de((o) => ({
|
|
574
|
+
...o,
|
|
575
|
+
[e]: { ...o[e], ...t }
|
|
577
576
|
})), G(1);
|
|
578
577
|
});
|
|
579
578
|
}, vt = () => {
|
|
580
|
-
|
|
579
|
+
M(() => {
|
|
581
580
|
de({}), G(1);
|
|
582
581
|
});
|
|
583
|
-
},
|
|
584
|
-
(e) => Object.entries(
|
|
585
|
-
if (!(
|
|
586
|
-
const l =
|
|
587
|
-
if (
|
|
588
|
-
const
|
|
589
|
-
return Number.isNaN(
|
|
582
|
+
}, Ue = H(() => ie.filter(
|
|
583
|
+
(e) => Object.entries(w).every(([t, o]) => {
|
|
584
|
+
if (!(o?.value !== void 0 && o?.value !== null && String(o.value).trim() !== "")) return !0;
|
|
585
|
+
const l = oe(e, t);
|
|
586
|
+
if (o.type === "number") {
|
|
587
|
+
const u = Number(l), d = Number(o.value), f = o.op || "=";
|
|
588
|
+
return Number.isNaN(u) || Number.isNaN(d) ? !0 : f === "=" ? u === d : f === ">" ? u > d : f === "<" ? u < d : f === "!=" ? u !== d : !0;
|
|
590
589
|
}
|
|
591
|
-
if (
|
|
592
|
-
const
|
|
593
|
-
return !
|
|
590
|
+
if (o.type === "date") {
|
|
591
|
+
const u = nt(l), d = nt(o.value), f = o.op || "=";
|
|
592
|
+
return !u || !d ? !0 : f === "=" ? u === d : f === ">" ? u > d : f === "<" ? u < d : f === "!=" ? u !== d : !0;
|
|
594
593
|
}
|
|
595
|
-
return String(l).toLowerCase().includes(String(
|
|
594
|
+
return String(l).toLowerCase().includes(String(o.value).toLowerCase());
|
|
596
595
|
})
|
|
597
|
-
), [ie,
|
|
598
|
-
|
|
596
|
+
), [ie, w]), kt = (e) => {
|
|
597
|
+
M(() => {
|
|
599
598
|
ke((t) => ({
|
|
600
599
|
key: e,
|
|
601
600
|
direction: t.key === e && t.direction === "asc" ? "desc" : "asc"
|
|
602
601
|
}));
|
|
603
602
|
});
|
|
604
603
|
}, D = H(() => {
|
|
605
|
-
if (!
|
|
606
|
-
const e =
|
|
607
|
-
return [...
|
|
608
|
-
const s =
|
|
609
|
-
return
|
|
604
|
+
if (!S.key) return Ue;
|
|
605
|
+
const e = q(S.key);
|
|
606
|
+
return [...Ue].sort((t, o) => {
|
|
607
|
+
const s = oe(t, S.key), l = oe(o, S.key), u = e === "date" ? new Date(s).getTime() : isNaN(Number(s)) ? s : Number(s), d = e === "date" ? new Date(l).getTime() : isNaN(Number(l)) ? l : Number(l);
|
|
608
|
+
return u < d ? S.direction === "asc" ? -1 : 1 : u > d ? S.direction === "asc" ? 1 : -1 : 0;
|
|
610
609
|
});
|
|
611
|
-
}, [
|
|
610
|
+
}, [Ue, S, q]), $e = H(() => {
|
|
612
611
|
if (!J) return null;
|
|
613
612
|
const e = {};
|
|
614
|
-
return
|
|
615
|
-
|
|
616
|
-
(
|
|
613
|
+
return p.forEach((t) => {
|
|
614
|
+
q(t.key) === "number" && V.includes(t.key) && (e[t.key] = D.reduce(
|
|
615
|
+
(o, s) => o + Number(s[t.key] || 0),
|
|
617
616
|
0
|
|
618
617
|
));
|
|
619
618
|
}), e;
|
|
620
|
-
}, [J, D,
|
|
621
|
-
if (
|
|
619
|
+
}, [J, D, p, q, V]), Le = j === K ? D.length : Math.min(j, Te), He = j === K ? 1 : Math.ceil(D.length / Le), Z = H(() => {
|
|
620
|
+
if (j === K) return D;
|
|
622
621
|
const e = (X - 1) * Le;
|
|
623
622
|
return D.slice(e, e + Le);
|
|
624
|
-
}, [D, X,
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
(t) => t.includes(e) ? t.filter((
|
|
623
|
+
}, [D, X, j, Le]), P = T.length > 0, B = !P && j === K && !yt, Nt = (e) => {
|
|
624
|
+
M(() => {
|
|
625
|
+
re(
|
|
626
|
+
(t) => t.includes(e) ? t.filter((o) => o !== e) : [...t, e]
|
|
628
627
|
), ue({}), G(1);
|
|
629
628
|
});
|
|
630
|
-
},
|
|
629
|
+
}, jt = (e) => {
|
|
631
630
|
ue((t) => ({
|
|
632
631
|
...t,
|
|
633
632
|
[e]: !t[e]
|
|
634
633
|
}));
|
|
635
634
|
}, St = (e) => {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
(t) => t.includes(e) ? t.filter((
|
|
635
|
+
M(() => {
|
|
636
|
+
ne(
|
|
637
|
+
(t) => t.includes(e) ? t.filter((o) => o !== e) : [...t, e]
|
|
639
638
|
);
|
|
640
639
|
});
|
|
641
|
-
},
|
|
640
|
+
}, ot = _e(
|
|
642
641
|
(e) => {
|
|
643
642
|
const t = {};
|
|
644
|
-
return V.forEach((
|
|
645
|
-
const s = e.map((
|
|
643
|
+
return V.forEach((o) => {
|
|
644
|
+
const s = e.map((b) => Number(b[o])).filter((b) => !Number.isNaN(b));
|
|
646
645
|
if (!s.length) return;
|
|
647
|
-
const l = s.reduce((
|
|
648
|
-
t[
|
|
646
|
+
const l = s.reduce((b, h) => b + h, 0), u = Math.min(...s), d = Math.max(...s), f = l / s.length;
|
|
647
|
+
t[o] = {
|
|
649
648
|
count: s.length,
|
|
650
649
|
sum: l,
|
|
651
|
-
avg:
|
|
652
|
-
min:
|
|
653
|
-
max:
|
|
650
|
+
avg: f,
|
|
651
|
+
min: u,
|
|
652
|
+
max: d
|
|
654
653
|
};
|
|
655
654
|
}), t;
|
|
656
655
|
},
|
|
657
656
|
[V]
|
|
658
|
-
),
|
|
659
|
-
if (!
|
|
660
|
-
const e = [], t = D,
|
|
661
|
-
const
|
|
662
|
-
s.forEach((
|
|
663
|
-
const h =
|
|
664
|
-
|
|
665
|
-
}), Array.from(
|
|
666
|
-
const A = `${
|
|
657
|
+
), Ye = H(() => {
|
|
658
|
+
if (!P) return [];
|
|
659
|
+
const e = [], t = D, o = (s, l, u) => {
|
|
660
|
+
const d = T[l], f = /* @__PURE__ */ new Map();
|
|
661
|
+
s.forEach((b) => {
|
|
662
|
+
const h = oe(b, d), C = h == null || h === "" ? "(Blank)" : String(h);
|
|
663
|
+
f.has(C) || f.set(C, []), f.get(C).push(b);
|
|
664
|
+
}), Array.from(f.entries()).forEach(([b, h], C) => {
|
|
665
|
+
const A = `${u}${d}:${b}:${C}`;
|
|
667
666
|
if (e.push({
|
|
668
667
|
type: "group",
|
|
669
668
|
id: A,
|
|
670
|
-
groupKey:
|
|
671
|
-
groupValue:
|
|
669
|
+
groupKey: d,
|
|
670
|
+
groupValue: b,
|
|
672
671
|
level: l,
|
|
673
672
|
count: h.length,
|
|
674
|
-
aggregates:
|
|
673
|
+
aggregates: ot(h)
|
|
675
674
|
}), !ce[A]) {
|
|
676
|
-
if (l <
|
|
677
|
-
|
|
675
|
+
if (l < T.length - 1) {
|
|
676
|
+
o(h, l + 1, `${A}|`);
|
|
678
677
|
return;
|
|
679
678
|
}
|
|
680
|
-
h.forEach((m,
|
|
681
|
-
const W = m[
|
|
679
|
+
h.forEach((m, R) => {
|
|
680
|
+
const W = m[Re(x)] ?? m[x] ?? R;
|
|
682
681
|
e.push({
|
|
683
682
|
type: "row",
|
|
684
|
-
id: `${A}|row:${W}:${
|
|
683
|
+
id: `${A}|row:${W}:${R}`,
|
|
685
684
|
row: m
|
|
686
685
|
});
|
|
687
686
|
});
|
|
688
687
|
}
|
|
689
688
|
});
|
|
690
689
|
};
|
|
691
|
-
return
|
|
690
|
+
return o(t, 0, ""), e;
|
|
692
691
|
}, [
|
|
693
|
-
|
|
692
|
+
P,
|
|
694
693
|
D,
|
|
695
|
-
|
|
694
|
+
T,
|
|
696
695
|
ce,
|
|
697
|
-
|
|
696
|
+
ot,
|
|
698
697
|
x
|
|
699
|
-
]), Ct =
|
|
698
|
+
]), Ct = _e(
|
|
700
699
|
(e) => {
|
|
701
|
-
|
|
700
|
+
B && Ke(e.currentTarget.scrollTop);
|
|
702
701
|
},
|
|
703
|
-
[
|
|
702
|
+
[B]
|
|
704
703
|
);
|
|
705
704
|
ut(() => {
|
|
706
|
-
if (!
|
|
705
|
+
if (!B) return;
|
|
707
706
|
const e = Pe.current;
|
|
708
707
|
if (!e) return;
|
|
709
708
|
const t = () => bt(e.clientHeight || 0);
|
|
710
709
|
return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
711
|
-
}, [
|
|
712
|
-
|
|
713
|
-
}, [
|
|
710
|
+
}, [B]), $(() => {
|
|
711
|
+
Ke(0), Pe.current && (Pe.current.scrollTop = 0);
|
|
712
|
+
}, [B, D.length]);
|
|
714
713
|
const pe = H(() => {
|
|
715
|
-
if (!
|
|
714
|
+
if (!B)
|
|
716
715
|
return {
|
|
717
716
|
start: 0,
|
|
718
|
-
end:
|
|
719
|
-
rows:
|
|
717
|
+
end: Z.length,
|
|
718
|
+
rows: Z,
|
|
720
719
|
topSpacer: 0,
|
|
721
720
|
bottomSpacer: 0
|
|
722
721
|
};
|
|
723
|
-
const e =
|
|
722
|
+
const e = Z.length, t = Math.ceil((Ze || 1) / We), o = Math.max(
|
|
724
723
|
0,
|
|
725
|
-
Math.floor(
|
|
724
|
+
Math.floor(qe / We) - gt
|
|
726
725
|
), s = Math.min(
|
|
727
726
|
e,
|
|
728
|
-
|
|
727
|
+
o + t + gt * 2
|
|
729
728
|
);
|
|
730
729
|
return {
|
|
731
|
-
start:
|
|
730
|
+
start: o,
|
|
732
731
|
end: s,
|
|
733
|
-
rows:
|
|
734
|
-
topSpacer:
|
|
732
|
+
rows: Z.slice(o, s),
|
|
733
|
+
topSpacer: o * We,
|
|
735
734
|
bottomSpacer: Math.max(0, (e - s) * We)
|
|
736
735
|
};
|
|
737
|
-
}, [
|
|
738
|
-
(e) => Object.entries(e || {}).map(([t,
|
|
739
|
-
[
|
|
740
|
-
),
|
|
736
|
+
}, [B, Z, qe, Ze]), at = _e(
|
|
737
|
+
(e) => Object.entries(e || {}).map(([t, o]) => `${p.find((l) => l.key === t)?.label || t}: Σ ${me(o.sum)} | Avg ${me(o.avg)} | Min ${me(o.min)} | Max ${me(o.max)}`),
|
|
738
|
+
[p, me]
|
|
739
|
+
), Rt = () => {
|
|
741
740
|
try {
|
|
742
|
-
const e =
|
|
743
|
-
(h) =>
|
|
741
|
+
const e = I.filter(
|
|
742
|
+
(h) => F.includes(h.key)
|
|
744
743
|
), t = (h) => {
|
|
745
744
|
const A = String(h ?? "").replace(/"/g, '""');
|
|
746
745
|
return /[",\n\r]/.test(A) ? `"${A}"` : A;
|
|
747
|
-
},
|
|
746
|
+
}, o = P ? Ye.map((h) => {
|
|
748
747
|
if (h.type === "group") {
|
|
749
|
-
const m =
|
|
748
|
+
const m = p.find((fe) => fe.key === h.groupKey)?.label || h.groupKey, R = at(h.aggregates).join(" || "), W = {};
|
|
750
749
|
return e.forEach((fe, ct) => {
|
|
751
750
|
if (ct === 0) {
|
|
752
751
|
W[fe.key] = `GROUP ${m}: ${h.groupValue} (${h.count})`;
|
|
753
752
|
return;
|
|
754
753
|
}
|
|
755
|
-
W[fe.key] = ct === 1 ?
|
|
754
|
+
W[fe.key] = ct === 1 ? R : "";
|
|
756
755
|
}), W;
|
|
757
756
|
}
|
|
758
|
-
const
|
|
757
|
+
const C = {}, A = h.row;
|
|
759
758
|
return e.forEach((m) => {
|
|
760
|
-
|
|
761
|
-
}),
|
|
759
|
+
C[m.key] = oe(A, m.key);
|
|
760
|
+
}), C;
|
|
762
761
|
}) : D.map((h) => {
|
|
763
|
-
const
|
|
762
|
+
const C = {};
|
|
764
763
|
return e.forEach((A) => {
|
|
765
|
-
|
|
766
|
-
}),
|
|
767
|
-
}), s = e.map((h) => t(h.label)).join(","), l =
|
|
768
|
-
(h) => e.map((
|
|
764
|
+
C[A.key] = oe(h, A.key);
|
|
765
|
+
}), C;
|
|
766
|
+
}), s = e.map((h) => t(h.label)).join(","), l = o.map(
|
|
767
|
+
(h) => e.map((C) => t(h[C.key])).join(",")
|
|
769
768
|
).join(`\r
|
|
770
|
-
`),
|
|
771
|
-
${l}`,
|
|
772
|
-
|
|
769
|
+
`), u = `\uFEFF${s}\r
|
|
770
|
+
${l}`, d = new Blob([u], { type: "text/csv;charset=utf-8;" }), f = URL.createObjectURL(d), b = document.createElement("a");
|
|
771
|
+
b.href = f, b.download = "TableData.csv", document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(f);
|
|
773
772
|
} catch (e) {
|
|
774
773
|
console.error("Failed to export CSV", e);
|
|
775
774
|
}
|
|
776
|
-
}, Rt = () => {
|
|
777
|
-
(async () => {
|
|
778
|
-
const [{ default: e }, { default: t }] = await Promise.all([
|
|
779
|
-
import("./jspdf.es.min-DVZuwoNv.js").then((i) => i.j),
|
|
780
|
-
import("./jspdf.plugin.autotable-D7eVZU2H.js")
|
|
781
|
-
]), n = new e({
|
|
782
|
-
orientation: "landscape",
|
|
783
|
-
// better for wide tables
|
|
784
|
-
unit: "pt",
|
|
785
|
-
format: "A4"
|
|
786
|
-
}), s = P.filter((i) => L.includes(i.key)), l = [s.map((i) => i.label)], d = M ? Be.map((i) => {
|
|
787
|
-
if (i.type === "group") {
|
|
788
|
-
const p = g.find((k) => k.key === i.groupKey)?.label || i.groupKey, w = Je(i.aggregates);
|
|
789
|
-
return [
|
|
790
|
-
{
|
|
791
|
-
content: [
|
|
792
|
-
`GROUP ${p}: ${i.groupValue} (${i.count})`,
|
|
793
|
-
...w
|
|
794
|
-
].join(`
|
|
795
|
-
`),
|
|
796
|
-
colSpan: Math.max(1, s.length),
|
|
797
|
-
styles: {
|
|
798
|
-
fontStyle: "bold",
|
|
799
|
-
fillColor: [235, 240, 250],
|
|
800
|
-
textColor: [20, 40, 80],
|
|
801
|
-
overflow: "linebreak",
|
|
802
|
-
cellWidth: "wrap"
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
];
|
|
806
|
-
}
|
|
807
|
-
return s.map((p) => String(q(i.row, p.key) ?? ""));
|
|
808
|
-
}) : D.map(
|
|
809
|
-
(i) => s.map((p) => String(q(i, p.key) ?? ""))
|
|
810
|
-
);
|
|
811
|
-
t(n, {
|
|
812
|
-
head: l,
|
|
813
|
-
body: d,
|
|
814
|
-
styles: {
|
|
815
|
-
fontSize: 9,
|
|
816
|
-
cellPadding: 4,
|
|
817
|
-
halign: "left",
|
|
818
|
-
valign: "middle"
|
|
819
|
-
},
|
|
820
|
-
headStyles: {
|
|
821
|
-
fillColor: [22, 160, 133],
|
|
822
|
-
textColor: [255, 255, 255],
|
|
823
|
-
fontStyle: "bold"
|
|
824
|
-
},
|
|
825
|
-
margin: { top: 40 },
|
|
826
|
-
didDrawPage: (i) => {
|
|
827
|
-
n.setFontSize(12), n.text("Table Data Export", i.settings.margin.left, 30);
|
|
828
|
-
}
|
|
829
|
-
}), n.save("TableData.pdf");
|
|
830
|
-
})().catch((e) => {
|
|
831
|
-
console.error("Failed to export PDF", e);
|
|
832
|
-
});
|
|
833
775
|
}, st = (e, t) => {
|
|
834
776
|
e.dataTransfer.setData("colKey", t);
|
|
835
777
|
}, lt = (e, t) => {
|
|
836
|
-
const
|
|
837
|
-
!
|
|
838
|
-
|
|
839
|
-
const l = [...s],
|
|
840
|
-
return l.splice(
|
|
778
|
+
const o = e.dataTransfer.getData("colKey");
|
|
779
|
+
!o || o === t || M(() => {
|
|
780
|
+
Ne((s) => {
|
|
781
|
+
const l = [...s], u = l.indexOf(o), d = l.indexOf(t);
|
|
782
|
+
return l.splice(u, 1), l.splice(d, 0, o), l;
|
|
841
783
|
});
|
|
842
784
|
});
|
|
843
|
-
}, it = (e) => e.preventDefault(),
|
|
785
|
+
}, it = (e) => e.preventDefault(), I = H(() => U.map((e) => p.find((t) => t.key === e)).filter((e) => e && F.includes(e.key)), [p, U, F]), ge = H(() => {
|
|
844
786
|
const s = "14px system-ui", l = {};
|
|
845
|
-
return
|
|
846
|
-
const
|
|
787
|
+
return I.forEach((u) => {
|
|
788
|
+
const d = Je(u.label, s), f = Math.min(
|
|
847
789
|
320,
|
|
848
|
-
Math.max(
|
|
790
|
+
Math.max(Fe, d + 32 + 48)
|
|
849
791
|
);
|
|
850
|
-
l[
|
|
851
|
-
|
|
852
|
-
|
|
792
|
+
l[u.key] = Math.max(
|
|
793
|
+
Fe,
|
|
794
|
+
Me[u.key] ?? f
|
|
853
795
|
);
|
|
854
796
|
}), l;
|
|
855
|
-
}, [
|
|
797
|
+
}, [I, Me]);
|
|
856
798
|
$(() => {
|
|
857
|
-
if (!
|
|
858
|
-
const e = new Set(
|
|
859
|
-
|
|
860
|
-
const
|
|
799
|
+
if (!p.length) return;
|
|
800
|
+
const e = new Set(p.map((t) => t.key));
|
|
801
|
+
De((t) => {
|
|
802
|
+
const o = {};
|
|
861
803
|
return Object.entries(t).forEach(([s, l]) => {
|
|
862
|
-
e.has(s) && (
|
|
863
|
-
}),
|
|
804
|
+
e.has(s) && (o[s] = l);
|
|
805
|
+
}), o;
|
|
864
806
|
});
|
|
865
|
-
}, [
|
|
866
|
-
const
|
|
807
|
+
}, [p]);
|
|
808
|
+
const Tt = (e, t) => {
|
|
867
809
|
if (e.preventDefault(), e.stopPropagation(), e.button !== void 0 && e.button !== 0) return;
|
|
868
|
-
const
|
|
869
|
-
he.current = { key: t, startX:
|
|
870
|
-
const l = (
|
|
810
|
+
const o = e.clientX, s = ge[t] || Fe;
|
|
811
|
+
he.current = { key: t, startX: o, startWidth: s }, document.body.style.cursor = "col-resize";
|
|
812
|
+
const l = (d) => {
|
|
871
813
|
if (!he.current) return;
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
he.current.startWidth +
|
|
814
|
+
const f = d.clientX - he.current.startX, b = Math.max(
|
|
815
|
+
Fe,
|
|
816
|
+
he.current.startWidth + f
|
|
875
817
|
);
|
|
876
|
-
|
|
818
|
+
De((h) => ({
|
|
877
819
|
...h,
|
|
878
|
-
[he.current.key]:
|
|
820
|
+
[he.current.key]: b
|
|
879
821
|
}));
|
|
880
|
-
},
|
|
881
|
-
he.current = null, document.body.style.cursor = "", window.removeEventListener("pointermove", l), window.removeEventListener("pointerup",
|
|
822
|
+
}, u = () => {
|
|
823
|
+
he.current = null, document.body.style.cursor = "", window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u);
|
|
882
824
|
};
|
|
883
|
-
window.addEventListener("pointermove", l), window.addEventListener("pointerup",
|
|
884
|
-
},
|
|
885
|
-
e.preventDefault(), e.stopPropagation(),
|
|
886
|
-
const s = { ...
|
|
825
|
+
window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
|
|
826
|
+
}, Et = (e, t) => {
|
|
827
|
+
e.preventDefault(), e.stopPropagation(), De((o) => {
|
|
828
|
+
const s = { ...o };
|
|
887
829
|
return delete s[t], s;
|
|
888
830
|
});
|
|
889
|
-
},
|
|
831
|
+
}, Ot = ye || ft, At = n === "dark" ? a.themeDark : n === "purple" ? a.themePurple : a.themeLight;
|
|
890
832
|
return ut(() => {
|
|
891
833
|
const e = () => {
|
|
892
|
-
|
|
834
|
+
wt(Xe.current?.offsetHeight || 0);
|
|
893
835
|
};
|
|
894
836
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
895
|
-
}, [
|
|
837
|
+
}, [I.length]), $(() => {
|
|
896
838
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
897
|
-
const e = window.matchMedia("(max-width: 767.98px)"), t = (
|
|
898
|
-
return
|
|
899
|
-
}, []), /* @__PURE__ */ r.jsxs("div", { className: E(a.container,
|
|
839
|
+
const e = window.matchMedia("(max-width: 767.98px)"), t = (o) => Qe(o.matches);
|
|
840
|
+
return Qe(e.matches), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
841
|
+
}, []), /* @__PURE__ */ r.jsxs("div", { className: E(a.container, At), children: [
|
|
900
842
|
/* @__PURE__ */ r.jsxs("div", { className: a.headerRow, children: [
|
|
901
843
|
/* @__PURE__ */ r.jsxs("div", { className: E(a.flexRow, a.toolbarGroup), children: [
|
|
902
844
|
/* @__PURE__ */ r.jsx("label", { className: a.labelMuted, children: "Rows:" }),
|
|
@@ -904,11 +846,11 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
904
846
|
"select",
|
|
905
847
|
{
|
|
906
848
|
className: E(a.selectSmall, a.selectAuto),
|
|
907
|
-
value:
|
|
908
|
-
onChange: (e) =>
|
|
849
|
+
value: j,
|
|
850
|
+
onChange: (e) => M(() => {
|
|
909
851
|
ve(Number(e.target.value)), G(1);
|
|
910
852
|
}),
|
|
911
|
-
children:
|
|
853
|
+
children: te.map((e) => /* @__PURE__ */ r.jsx("option", { value: e, children: e === K ? "All" : e }, e))
|
|
912
854
|
}
|
|
913
855
|
),
|
|
914
856
|
/* @__PURE__ */ r.jsxs("div", { className: a.switchRow, children: [
|
|
@@ -918,7 +860,7 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
918
860
|
className: a.checkbox,
|
|
919
861
|
type: "checkbox",
|
|
920
862
|
checked: J,
|
|
921
|
-
onChange: (e) =>
|
|
863
|
+
onChange: (e) => M(() => Ee(e.target.checked))
|
|
922
864
|
}
|
|
923
865
|
),
|
|
924
866
|
/* @__PURE__ */ r.jsx("label", { className: a.labelMuted, children: "Show Totals" })
|
|
@@ -927,15 +869,15 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
927
869
|
/* @__PURE__ */ r.jsxs("span", { className: a.labelMuted, children: [
|
|
928
870
|
"Group By:",
|
|
929
871
|
" ",
|
|
930
|
-
|
|
872
|
+
T.length ? T.map((e) => p.find((t) => t.key === e)?.label || e).join(" > ") : "None"
|
|
931
873
|
] }),
|
|
932
|
-
|
|
874
|
+
T.length > 0 && /* @__PURE__ */ r.jsx(
|
|
933
875
|
"button",
|
|
934
876
|
{
|
|
935
877
|
className: E(a.buttonBase, a.buttonMuted),
|
|
936
878
|
onClick: () => {
|
|
937
|
-
|
|
938
|
-
|
|
879
|
+
M(() => {
|
|
880
|
+
re([]), ue({});
|
|
939
881
|
});
|
|
940
882
|
},
|
|
941
883
|
children: "Clear Groups"
|
|
@@ -948,7 +890,7 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
948
890
|
"button",
|
|
949
891
|
{
|
|
950
892
|
className: E(a.buttonBase, a.buttonDanger),
|
|
951
|
-
disabled: !Object.values(
|
|
893
|
+
disabled: !Object.values(L).some((e) => e?.value),
|
|
952
894
|
onClick: vt,
|
|
953
895
|
children: [
|
|
954
896
|
"✕",
|
|
@@ -957,24 +899,17 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
957
899
|
]
|
|
958
900
|
}
|
|
959
901
|
),
|
|
960
|
-
/* @__PURE__ */ r.
|
|
902
|
+
/* @__PURE__ */ r.jsx(
|
|
961
903
|
pt,
|
|
962
904
|
{
|
|
963
905
|
label: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
964
906
|
"⬇",
|
|
965
907
|
" Export"
|
|
966
908
|
] }),
|
|
967
|
-
children: [
|
|
968
|
-
/* @__PURE__ */ r.jsx("
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
] }) }),
|
|
972
|
-
/* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs("button", { className: a.menuItemButton, onClick: Rt, children: [
|
|
973
|
-
/* @__PURE__ */ r.jsx("span", { className: a.dangerText, children: "PDF" }),
|
|
974
|
-
" ",
|
|
975
|
-
"Export to PDF"
|
|
976
|
-
] }) })
|
|
977
|
-
]
|
|
909
|
+
children: /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs("button", { className: a.menuItemButton, onClick: Rt, children: [
|
|
910
|
+
/* @__PURE__ */ r.jsx("span", { className: a.successText, children: "CSV" }),
|
|
911
|
+
" Export to CSV"
|
|
912
|
+
] }) })
|
|
978
913
|
}
|
|
979
914
|
),
|
|
980
915
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -1001,7 +936,7 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1001
936
|
"button",
|
|
1002
937
|
{
|
|
1003
938
|
className: a.menuItemButton,
|
|
1004
|
-
onClick: () =>
|
|
939
|
+
onClick: () => i("light"),
|
|
1005
940
|
children: "Light"
|
|
1006
941
|
}
|
|
1007
942
|
) }),
|
|
@@ -1009,7 +944,7 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1009
944
|
"button",
|
|
1010
945
|
{
|
|
1011
946
|
className: a.menuItemButton,
|
|
1012
|
-
onClick: () =>
|
|
947
|
+
onClick: () => i("dark"),
|
|
1013
948
|
children: "Dark"
|
|
1014
949
|
}
|
|
1015
950
|
) }),
|
|
@@ -1017,7 +952,7 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1017
952
|
"button",
|
|
1018
953
|
{
|
|
1019
954
|
className: a.menuItemButton,
|
|
1020
|
-
onClick: () =>
|
|
955
|
+
onClick: () => i("purple"),
|
|
1021
956
|
children: "Purple"
|
|
1022
957
|
}
|
|
1023
958
|
) })
|
|
@@ -1028,7 +963,7 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1028
963
|
] }),
|
|
1029
964
|
/* @__PURE__ */ r.jsxs("div", { className: a.relative, children: [
|
|
1030
965
|
/* @__PURE__ */ r.jsx("div", { className: a.srOnly, "aria-live": "polite", children: ye ? "Loading table data" : "Table updated" }),
|
|
1031
|
-
|
|
966
|
+
Ot && /* @__PURE__ */ r.jsx("div", { className: a.overlay, children: /* @__PURE__ */ r.jsxs(
|
|
1032
967
|
"div",
|
|
1033
968
|
{
|
|
1034
969
|
className: a.overlayInner,
|
|
@@ -1044,10 +979,10 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1044
979
|
{
|
|
1045
980
|
className: E(
|
|
1046
981
|
a.tableWrap,
|
|
1047
|
-
|
|
982
|
+
j === K && a.tableWrapAll
|
|
1048
983
|
),
|
|
1049
984
|
ref: Pe,
|
|
1050
|
-
style:
|
|
985
|
+
style: j === K ? { maxHeight: "70vh", overflowY: "auto" } : {},
|
|
1051
986
|
onScroll: Ct,
|
|
1052
987
|
children: /* @__PURE__ */ r.jsxs(
|
|
1053
988
|
"table",
|
|
@@ -1055,17 +990,17 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1055
990
|
className: a.table,
|
|
1056
991
|
style: { tableLayout: "fixed" },
|
|
1057
992
|
role: "grid",
|
|
1058
|
-
"aria-rowcount":
|
|
1059
|
-
"aria-colcount":
|
|
993
|
+
"aria-rowcount": P ? Ye.length : Z.length,
|
|
994
|
+
"aria-colcount": I.length,
|
|
1060
995
|
children: [
|
|
1061
996
|
/* @__PURE__ */ r.jsxs("thead", { className: a.tableHead, children: [
|
|
1062
|
-
/* @__PURE__ */ r.jsx("tr", { ref:
|
|
1063
|
-
const t =
|
|
997
|
+
/* @__PURE__ */ r.jsx("tr", { ref: Xe, children: I.map((e) => {
|
|
998
|
+
const t = S.key === e.key, o = t ? S.direction === "asc" ? "↑" : "↓" : "⇅";
|
|
1064
999
|
return /* @__PURE__ */ r.jsxs(
|
|
1065
1000
|
"th",
|
|
1066
1001
|
{
|
|
1067
1002
|
scope: "col",
|
|
1068
|
-
"aria-sort": t ?
|
|
1003
|
+
"aria-sort": t ? S.direction === "asc" ? "ascending" : "descending" : "none",
|
|
1069
1004
|
draggable: !0,
|
|
1070
1005
|
onDragStart: (s) => st(s, e.key),
|
|
1071
1006
|
onDragOver: it,
|
|
@@ -1086,7 +1021,7 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1086
1021
|
e.label,
|
|
1087
1022
|
/* @__PURE__ */ r.jsxs("span", { className: a.iconMuted, children: [
|
|
1088
1023
|
" ",
|
|
1089
|
-
|
|
1024
|
+
o
|
|
1090
1025
|
] })
|
|
1091
1026
|
]
|
|
1092
1027
|
}
|
|
@@ -1099,8 +1034,8 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1099
1034
|
"aria-orientation": "vertical",
|
|
1100
1035
|
"aria-label": `Resize ${e.label} column`,
|
|
1101
1036
|
tabIndex: 0,
|
|
1102
|
-
onPointerDown: (s) =>
|
|
1103
|
-
onDoubleClick: (s) =>
|
|
1037
|
+
onPointerDown: (s) => Tt(s, e.key),
|
|
1038
|
+
onDoubleClick: (s) => Et(s, e.key)
|
|
1104
1039
|
}
|
|
1105
1040
|
)
|
|
1106
1041
|
]
|
|
@@ -1108,20 +1043,20 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1108
1043
|
e.key
|
|
1109
1044
|
);
|
|
1110
1045
|
}) }),
|
|
1111
|
-
/* @__PURE__ */ r.jsx("tr", { children:
|
|
1046
|
+
/* @__PURE__ */ r.jsx("tr", { children: I.map((e) => /* @__PURE__ */ r.jsx(
|
|
1112
1047
|
"th",
|
|
1113
1048
|
{
|
|
1114
1049
|
style: {
|
|
1115
|
-
top:
|
|
1050
|
+
top: _t
|
|
1116
1051
|
},
|
|
1117
1052
|
className: a.thCellFilter,
|
|
1118
|
-
children:
|
|
1053
|
+
children: q(e.key) === "number" ? /* @__PURE__ */ r.jsxs("div", { className: a.inlineGroup, children: [
|
|
1119
1054
|
/* @__PURE__ */ r.jsxs(
|
|
1120
1055
|
"select",
|
|
1121
1056
|
{
|
|
1122
1057
|
className: E(a.selectSmall, a.selectAuto),
|
|
1123
|
-
value:
|
|
1124
|
-
onChange: (t) =>
|
|
1058
|
+
value: L[e.key]?.op || "=",
|
|
1059
|
+
onChange: (t) => je(e.key, {
|
|
1125
1060
|
type: "number",
|
|
1126
1061
|
op: t.target.value
|
|
1127
1062
|
}),
|
|
@@ -1138,20 +1073,20 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1138
1073
|
{
|
|
1139
1074
|
type: "number",
|
|
1140
1075
|
className: a.input,
|
|
1141
|
-
value:
|
|
1142
|
-
onChange: (t) =>
|
|
1076
|
+
value: L[e.key]?.value || "",
|
|
1077
|
+
onChange: (t) => je(e.key, {
|
|
1143
1078
|
type: "number",
|
|
1144
1079
|
value: t.target.value
|
|
1145
1080
|
})
|
|
1146
1081
|
}
|
|
1147
1082
|
)
|
|
1148
|
-
] }) :
|
|
1083
|
+
] }) : q(e.key) === "date" ? /* @__PURE__ */ r.jsxs("div", { className: a.inlineGroup, children: [
|
|
1149
1084
|
/* @__PURE__ */ r.jsxs(
|
|
1150
1085
|
"select",
|
|
1151
1086
|
{
|
|
1152
1087
|
className: E(a.selectSmall, a.selectAuto),
|
|
1153
|
-
value:
|
|
1154
|
-
onChange: (t) =>
|
|
1088
|
+
value: L[e.key]?.op || "=",
|
|
1089
|
+
onChange: (t) => je(e.key, {
|
|
1155
1090
|
type: "date",
|
|
1156
1091
|
op: t.target.value
|
|
1157
1092
|
}),
|
|
@@ -1168,8 +1103,8 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1168
1103
|
{
|
|
1169
1104
|
type: "date",
|
|
1170
1105
|
className: a.input,
|
|
1171
|
-
value:
|
|
1172
|
-
onChange: (t) =>
|
|
1106
|
+
value: L[e.key]?.value || "",
|
|
1107
|
+
onChange: (t) => je(e.key, {
|
|
1173
1108
|
type: "date",
|
|
1174
1109
|
value: t.target.value
|
|
1175
1110
|
})
|
|
@@ -1181,8 +1116,8 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1181
1116
|
type: "text",
|
|
1182
1117
|
className: a.input,
|
|
1183
1118
|
placeholder: "Filter...",
|
|
1184
|
-
value:
|
|
1185
|
-
onChange: (t) =>
|
|
1119
|
+
value: L[e.key]?.value || "",
|
|
1120
|
+
onChange: (t) => je(e.key, {
|
|
1186
1121
|
type: "text",
|
|
1187
1122
|
value: t.target.value
|
|
1188
1123
|
})
|
|
@@ -1193,27 +1128,27 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1193
1128
|
)) })
|
|
1194
1129
|
] }),
|
|
1195
1130
|
/* @__PURE__ */ r.jsxs("tbody", { children: [
|
|
1196
|
-
|
|
1131
|
+
B && pe.topSpacer > 0 && /* @__PURE__ */ r.jsx("tr", { "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1197
1132
|
"td",
|
|
1198
1133
|
{
|
|
1199
|
-
colSpan:
|
|
1134
|
+
colSpan: I.length,
|
|
1200
1135
|
style: { height: `${pe.topSpacer}px`, padding: 0 }
|
|
1201
1136
|
}
|
|
1202
1137
|
) }),
|
|
1203
|
-
(
|
|
1204
|
-
if (
|
|
1205
|
-
const
|
|
1206
|
-
return /* @__PURE__ */ r.jsx("tr", { className: E(a.groupRow, a.groupRowAnimated), children: /* @__PURE__ */ r.jsx("td", { colSpan:
|
|
1138
|
+
(P ? Ye : B ? pe.rows : Z).map((e) => {
|
|
1139
|
+
if (P && e.type === "group") {
|
|
1140
|
+
const o = p.find((u) => u.key === e.groupKey)?.label || e.groupKey, s = !!ce[e.id], l = at(e.aggregates).join(" || ");
|
|
1141
|
+
return /* @__PURE__ */ r.jsx("tr", { className: E(a.groupRow, a.groupRowAnimated), children: /* @__PURE__ */ r.jsx("td", { colSpan: I.length, children: /* @__PURE__ */ r.jsxs(
|
|
1207
1142
|
"button",
|
|
1208
1143
|
{
|
|
1209
1144
|
type: "button",
|
|
1210
1145
|
className: a.groupToggle,
|
|
1211
|
-
onClick: () =>
|
|
1146
|
+
onClick: () => jt(e.id),
|
|
1212
1147
|
children: [
|
|
1213
1148
|
/* @__PURE__ */ r.jsxs("span", { style: { paddingLeft: `${e.level * 18}px` }, children: [
|
|
1214
1149
|
s ? "▶" : "▼",
|
|
1215
1150
|
" ",
|
|
1216
|
-
|
|
1151
|
+
o,
|
|
1217
1152
|
": ",
|
|
1218
1153
|
e.groupValue,
|
|
1219
1154
|
" (",
|
|
@@ -1228,22 +1163,22 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1228
1163
|
}
|
|
1229
1164
|
) }) }, e.id);
|
|
1230
1165
|
}
|
|
1231
|
-
const t =
|
|
1166
|
+
const t = P ? e.row : e;
|
|
1232
1167
|
return /* @__PURE__ */ r.jsx(
|
|
1233
1168
|
"tr",
|
|
1234
1169
|
{
|
|
1235
1170
|
className: E(
|
|
1236
1171
|
a.rowInteractive,
|
|
1237
|
-
|
|
1172
|
+
P && a.groupChildRow
|
|
1238
1173
|
),
|
|
1239
1174
|
tabIndex: 0,
|
|
1240
|
-
children:
|
|
1241
|
-
const s =
|
|
1175
|
+
children: I.map((o) => {
|
|
1176
|
+
const s = oe(t, o.key);
|
|
1242
1177
|
return typeof s == "boolean" ? /* @__PURE__ */ r.jsx(
|
|
1243
1178
|
"td",
|
|
1244
1179
|
{
|
|
1245
|
-
"data-label":
|
|
1246
|
-
style: { width: ge[
|
|
1180
|
+
"data-label": o.label,
|
|
1181
|
+
style: { width: ge[o.key] },
|
|
1247
1182
|
children: /* @__PURE__ */ r.jsx(
|
|
1248
1183
|
"input",
|
|
1249
1184
|
{
|
|
@@ -1254,40 +1189,40 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1254
1189
|
}
|
|
1255
1190
|
)
|
|
1256
1191
|
},
|
|
1257
|
-
|
|
1258
|
-
) :
|
|
1192
|
+
o.key
|
|
1193
|
+
) : q(o.key) === "date" ? /* @__PURE__ */ r.jsx(
|
|
1259
1194
|
"td",
|
|
1260
1195
|
{
|
|
1261
|
-
"data-label":
|
|
1262
|
-
style: { width: ge[
|
|
1196
|
+
"data-label": o.label,
|
|
1197
|
+
style: { width: ge[o.key] },
|
|
1263
1198
|
children: xt(s)
|
|
1264
1199
|
},
|
|
1265
|
-
|
|
1200
|
+
o.key
|
|
1266
1201
|
) : /* @__PURE__ */ r.jsx(
|
|
1267
1202
|
"td",
|
|
1268
1203
|
{
|
|
1269
|
-
"data-label":
|
|
1270
|
-
style: { width: ge[
|
|
1204
|
+
"data-label": o.label,
|
|
1205
|
+
style: { width: ge[o.key] },
|
|
1271
1206
|
children: s
|
|
1272
1207
|
},
|
|
1273
|
-
|
|
1208
|
+
o.key
|
|
1274
1209
|
);
|
|
1275
1210
|
})
|
|
1276
1211
|
},
|
|
1277
|
-
|
|
1212
|
+
P ? e.id : t[Re(x)] ?? t[x]
|
|
1278
1213
|
);
|
|
1279
1214
|
}),
|
|
1280
|
-
|
|
1215
|
+
B && pe.bottomSpacer > 0 && /* @__PURE__ */ r.jsx("tr", { "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1281
1216
|
"td",
|
|
1282
1217
|
{
|
|
1283
|
-
colSpan:
|
|
1218
|
+
colSpan: I.length,
|
|
1284
1219
|
style: { height: `${pe.bottomSpacer}px`, padding: 0 }
|
|
1285
1220
|
}
|
|
1286
1221
|
) })
|
|
1287
1222
|
] }),
|
|
1288
1223
|
J && $e && Object.keys($e).length > 0 && /* @__PURE__ */ r.jsxs("tfoot", { className: a.tfoot, children: [
|
|
1289
|
-
/* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx("td", { colSpan:
|
|
1290
|
-
/* @__PURE__ */ r.jsx("tr", { children:
|
|
1224
|
+
/* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx("td", { colSpan: I.length, className: a.textCenter, children: "Totals" }) }),
|
|
1225
|
+
/* @__PURE__ */ r.jsx("tr", { children: I.map((e) => /* @__PURE__ */ r.jsx(
|
|
1291
1226
|
"td",
|
|
1292
1227
|
{
|
|
1293
1228
|
"data-label": e.label,
|
|
@@ -1303,24 +1238,24 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1303
1238
|
}
|
|
1304
1239
|
)
|
|
1305
1240
|
] }),
|
|
1306
|
-
!
|
|
1241
|
+
!P && j !== K && He > 1 && /* @__PURE__ */ r.jsx("div", { className: a.paginationWrap, children: /* @__PURE__ */ r.jsxs("ul", { className: a.pagination, children: [
|
|
1307
1242
|
/* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
1308
1243
|
"button",
|
|
1309
1244
|
{
|
|
1310
1245
|
className: a.pageButton,
|
|
1311
1246
|
disabled: X === 1,
|
|
1312
|
-
onClick: () =>
|
|
1247
|
+
onClick: () => M(() => G((e) => e - 1)),
|
|
1313
1248
|
children: "Prev"
|
|
1314
1249
|
}
|
|
1315
1250
|
) }),
|
|
1316
|
-
Array.from({ length:
|
|
1251
|
+
Array.from({ length: He }, (e, t) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
1317
1252
|
"button",
|
|
1318
1253
|
{
|
|
1319
1254
|
className: E(
|
|
1320
1255
|
a.pageButton,
|
|
1321
1256
|
X === t + 1 && a.pageButtonActive
|
|
1322
1257
|
),
|
|
1323
|
-
onClick: () =>
|
|
1258
|
+
onClick: () => M(() => G(t + 1)),
|
|
1324
1259
|
children: t + 1
|
|
1325
1260
|
}
|
|
1326
1261
|
) }, t)),
|
|
@@ -1328,30 +1263,30 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1328
1263
|
"button",
|
|
1329
1264
|
{
|
|
1330
1265
|
className: a.pageButton,
|
|
1331
|
-
disabled: X ===
|
|
1332
|
-
onClick: () =>
|
|
1266
|
+
disabled: X === He,
|
|
1267
|
+
onClick: () => M(() => G((e) => e + 1)),
|
|
1333
1268
|
children: "Next"
|
|
1334
1269
|
}
|
|
1335
1270
|
) })
|
|
1336
1271
|
] }) }),
|
|
1337
|
-
!
|
|
1272
|
+
!P && j === K && /* @__PURE__ */ r.jsxs("div", { className: a.labelMuted, children: [
|
|
1338
1273
|
"Showing",
|
|
1339
1274
|
" ",
|
|
1340
|
-
(
|
|
1275
|
+
(B ? pe.end : Z.length).toLocaleString(),
|
|
1341
1276
|
" of",
|
|
1342
1277
|
" ",
|
|
1343
1278
|
D.length.toLocaleString(),
|
|
1344
1279
|
" rows",
|
|
1345
|
-
|
|
1280
|
+
B ? " (virtualized)" : ""
|
|
1346
1281
|
] }),
|
|
1347
|
-
|
|
1282
|
+
P && /* @__PURE__ */ r.jsxs("div", { className: a.labelMuted, children: [
|
|
1348
1283
|
"Grouped view: ",
|
|
1349
1284
|
D.length.toLocaleString(),
|
|
1350
1285
|
" rows across",
|
|
1351
1286
|
" ",
|
|
1352
|
-
|
|
1287
|
+
T.length,
|
|
1353
1288
|
" level",
|
|
1354
|
-
|
|
1289
|
+
T.length > 1 ? "s" : ""
|
|
1355
1290
|
] }),
|
|
1356
1291
|
Oe && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1357
1292
|
/* @__PURE__ */ r.jsx("div", { className: a.backdrop, onClick: () => Ae(!1) }),
|
|
@@ -1359,25 +1294,25 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1359
1294
|
/* @__PURE__ */ r.jsx("h6", { className: a.drawerTitle, children: "Column Settings" }),
|
|
1360
1295
|
/* @__PURE__ */ r.jsx("h6", { className: a.drawerSubtitle, children: "Visible Columns" }),
|
|
1361
1296
|
U.map((e) => {
|
|
1362
|
-
const t =
|
|
1297
|
+
const t = p.find((o) => o.key === e);
|
|
1363
1298
|
return t ? /* @__PURE__ */ r.jsxs(
|
|
1364
1299
|
"div",
|
|
1365
1300
|
{
|
|
1366
1301
|
className: a.drawerRow,
|
|
1367
1302
|
draggable: !0,
|
|
1368
|
-
onDragStart: (
|
|
1303
|
+
onDragStart: (o) => st(o, t.key),
|
|
1369
1304
|
onDragOver: it,
|
|
1370
|
-
onDrop: (
|
|
1305
|
+
onDrop: (o) => lt(o, t.key),
|
|
1371
1306
|
children: [
|
|
1372
1307
|
/* @__PURE__ */ r.jsx(
|
|
1373
1308
|
"input",
|
|
1374
1309
|
{
|
|
1375
1310
|
type: "checkbox",
|
|
1376
1311
|
className: a.checkbox,
|
|
1377
|
-
checked:
|
|
1378
|
-
onChange: () =>
|
|
1379
|
-
() =>
|
|
1380
|
-
(
|
|
1312
|
+
checked: F.includes(t.key),
|
|
1313
|
+
onChange: () => M(
|
|
1314
|
+
() => ee(
|
|
1315
|
+
(o) => o.includes(t.key) ? o.filter((s) => s !== t.key) : [...o, t.key]
|
|
1381
1316
|
)
|
|
1382
1317
|
)
|
|
1383
1318
|
}
|
|
@@ -1395,27 +1330,27 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1395
1330
|
{
|
|
1396
1331
|
type: "button",
|
|
1397
1332
|
className: a.sectionToggle,
|
|
1398
|
-
"aria-expanded":
|
|
1333
|
+
"aria-expanded": g.groupBy,
|
|
1399
1334
|
onClick: () => _((e) => ({
|
|
1400
1335
|
...e,
|
|
1401
1336
|
groupBy: !e.groupBy
|
|
1402
1337
|
})),
|
|
1403
1338
|
children: [
|
|
1404
1339
|
/* @__PURE__ */ r.jsx("span", { children: "Group By Columns" }),
|
|
1405
|
-
/* @__PURE__ */ r.jsx("span", { className: a.iconMuted, children:
|
|
1340
|
+
/* @__PURE__ */ r.jsx("span", { className: a.iconMuted, children: g.groupBy ? "▲" : "▼" })
|
|
1406
1341
|
]
|
|
1407
1342
|
}
|
|
1408
1343
|
),
|
|
1409
|
-
|
|
1410
|
-
const t =
|
|
1344
|
+
g.groupBy && /* @__PURE__ */ r.jsx("div", { className: a.sectionBody, children: U.map((e) => {
|
|
1345
|
+
const t = p.find((o) => o.key === e);
|
|
1411
1346
|
return t ? /* @__PURE__ */ r.jsxs("div", { className: a.drawerRow, children: [
|
|
1412
1347
|
/* @__PURE__ */ r.jsx(
|
|
1413
1348
|
"input",
|
|
1414
1349
|
{
|
|
1415
1350
|
type: "checkbox",
|
|
1416
1351
|
className: a.checkbox,
|
|
1417
|
-
checked:
|
|
1418
|
-
onChange: () =>
|
|
1352
|
+
checked: T.includes(t.key),
|
|
1353
|
+
onChange: () => Nt(t.key)
|
|
1419
1354
|
}
|
|
1420
1355
|
),
|
|
1421
1356
|
/* @__PURE__ */ r.jsx("label", { children: t.label })
|
|
@@ -1428,21 +1363,21 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1428
1363
|
{
|
|
1429
1364
|
type: "button",
|
|
1430
1365
|
className: a.sectionToggle,
|
|
1431
|
-
"aria-expanded":
|
|
1366
|
+
"aria-expanded": g.aggregates,
|
|
1432
1367
|
onClick: () => _((e) => ({
|
|
1433
1368
|
...e,
|
|
1434
1369
|
aggregates: !e.aggregates
|
|
1435
1370
|
})),
|
|
1436
1371
|
children: [
|
|
1437
1372
|
/* @__PURE__ */ r.jsx("span", { children: "Show Total/Aggregate For" }),
|
|
1438
|
-
/* @__PURE__ */ r.jsx("span", { className: a.iconMuted, children:
|
|
1373
|
+
/* @__PURE__ */ r.jsx("span", { className: a.iconMuted, children: g.aggregates ? "▲" : "▼" })
|
|
1439
1374
|
]
|
|
1440
1375
|
}
|
|
1441
1376
|
),
|
|
1442
|
-
|
|
1377
|
+
g.aggregates && /* @__PURE__ */ r.jsxs("div", { className: a.sectionBody, children: [
|
|
1443
1378
|
Ie.length === 0 && /* @__PURE__ */ r.jsx("div", { className: a.labelMuted, children: "No numeric columns available." }),
|
|
1444
1379
|
U.map((e) => {
|
|
1445
|
-
const t = Ie.find((
|
|
1380
|
+
const t = Ie.find((o) => o.key === e);
|
|
1446
1381
|
return t ? /* @__PURE__ */ r.jsxs("div", { className: a.drawerRow, children: [
|
|
1447
1382
|
/* @__PURE__ */ r.jsx(
|
|
1448
1383
|
"input",
|
|
@@ -1463,5 +1398,5 @@ ${l}`, i = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = URL.createObj
|
|
|
1463
1398
|
] });
|
|
1464
1399
|
}
|
|
1465
1400
|
export {
|
|
1466
|
-
|
|
1401
|
+
Xr as AwesomeGrid
|
|
1467
1402
|
};
|