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