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