@hpcc-js/dgrid2 3.2.0 → 3.2.1
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/index.js +773 -847
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +30 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +14 -8
- package/src/hooks.ts +1 -1
- package/src/reactTable.tsx +1 -2
- package/src/table.ts +7 -2
- package/types/reactTable.d.ts +1 -1
- package/types/table.d.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -2,754 +2,678 @@
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
5
|
+
import require$$0$1, { forwardRef, createContext, useState, useCallback, useRef, useMemo, useImperativeHandle, useContext, useEffect, useLayoutEffect as useLayoutEffect$1, memo, useId, createElement } from "react";
|
|
6
|
+
import require$$0, { flushSync } from "react-dom";
|
|
5
7
|
import { format, timeParse, timeFormat, HTMLWidget } from "@hpcc-js/common";
|
|
6
8
|
const PKG_NAME = "@hpcc-js/dgrid2", PKG_VERSION = "3.1.1", BUILD_VERSION = "3.2.1";
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
function _$1(l2, u2, t2) {
|
|
16
|
-
var i2, o2, r2, f2 = {};
|
|
17
|
-
for (r2 in u2) r2 == "key" ? i2 = u2[r2] : r2 == "ref" ? o2 = u2[r2] : f2[r2] = u2[r2];
|
|
18
|
-
if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), typeof l2 == "function" && l2.defaultProps != null) for (r2 in l2.defaultProps) f2[r2] === void 0 && (f2[r2] = l2.defaultProps[r2]);
|
|
19
|
-
return g$2(l2, f2, i2, o2, null);
|
|
20
|
-
}
|
|
21
|
-
function g$2(n2, t2, i2, o2, r2) {
|
|
22
|
-
var f2 = { type: n2, props: t2, key: i2, ref: o2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: r2 ?? ++u$2, __i: -1, __u: 0 };
|
|
23
|
-
return r2 == null && l$1.vnode != null && l$1.vnode(f2), f2;
|
|
24
|
-
}
|
|
25
|
-
function m$1() {
|
|
26
|
-
return { current: null };
|
|
27
|
-
}
|
|
28
|
-
function b(n2) {
|
|
29
|
-
return n2.children;
|
|
30
|
-
}
|
|
31
|
-
function k$2(n2, l2) {
|
|
32
|
-
this.props = n2, this.context = l2;
|
|
33
|
-
}
|
|
34
|
-
function x$2(n2, l2) {
|
|
35
|
-
if (l2 == null) return n2.__ ? x$2(n2.__, n2.__i + 1) : null;
|
|
36
|
-
for (var u2; l2 < n2.__k.length; l2++) if ((u2 = n2.__k[l2]) != null && u2.__e != null) return u2.__e;
|
|
37
|
-
return typeof n2.type == "function" ? x$2(n2) : null;
|
|
38
|
-
}
|
|
39
|
-
function C$2(n2) {
|
|
40
|
-
var l2, u2;
|
|
41
|
-
if ((n2 = n2.__) != null && n2.__c != null) {
|
|
42
|
-
for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++) if ((u2 = n2.__k[l2]) != null && u2.__e != null) {
|
|
43
|
-
n2.__e = n2.__c.base = u2.__e;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
return C$2(n2);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function S(n2) {
|
|
50
|
-
(!n2.__d && (n2.__d = !0) && i$1.push(n2) && !M$1.__r++ || o$1 !== l$1.debounceRendering) && ((o$1 = l$1.debounceRendering) || r$2)(M$1);
|
|
51
|
-
}
|
|
52
|
-
function M$1() {
|
|
53
|
-
var n2, u2, t2, o2, r2, e2, c2, s2;
|
|
54
|
-
for (i$1.sort(f$2); n2 = i$1.shift(); ) n2.__d && (u2 = i$1.length, o2 = void 0, e2 = (r2 = (t2 = n2).__v).__e, c2 = [], s2 = [], t2.__P && ((o2 = d$1({}, r2)).__v = r2.__v + 1, l$1.vnode && l$1.vnode(o2), O$1(t2.__P, o2, r2, t2.__n, t2.__P.namespaceURI, 32 & r2.__u ? [e2] : null, c2, e2 ?? x$2(r2), !!(32 & r2.__u), s2), o2.__v = r2.__v, o2.__.__k[o2.__i] = o2, j$2(c2, o2, s2), o2.__e != e2 && C$2(o2)), i$1.length > u2 && i$1.sort(f$2));
|
|
55
|
-
M$1.__r = 0;
|
|
56
|
-
}
|
|
57
|
-
function P$2(n2, l2, u2, t2, i2, o2, r2, f2, e2, c2, s2) {
|
|
58
|
-
var a2, p2, y2, d2, w2, _2 = t2 && t2.__k || v$1, g2 = l2.length;
|
|
59
|
-
for (u2.__d = e2, $$1(u2, l2, _2), e2 = u2.__d, a2 = 0; a2 < g2; a2++) (y2 = u2.__k[a2]) != null && (p2 = y2.__i === -1 ? h$1 : _2[y2.__i] || h$1, y2.__i = a2, O$1(n2, y2, p2, i2, o2, r2, f2, e2, c2, s2), d2 = y2.__e, y2.ref && p2.ref != y2.ref && (p2.ref && E$1(p2.ref, null, y2), s2.push(y2.ref, y2.__c || d2, y2)), w2 == null && d2 != null && (w2 = d2), 65536 & y2.__u || p2.__k === y2.__k ? e2 = I$1(y2, e2, n2) : typeof y2.type == "function" && y2.__d !== void 0 ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609);
|
|
60
|
-
u2.__d = e2, u2.__e = w2;
|
|
61
|
-
}
|
|
62
|
-
function $$1(n2, l2, u2) {
|
|
63
|
-
var t2, i2, o2, r2, f2, e2 = l2.length, c2 = u2.length, s2 = c2, a2 = 0;
|
|
64
|
-
for (n2.__k = [], t2 = 0; t2 < e2; t2++) (i2 = l2[t2]) != null && typeof i2 != "boolean" && typeof i2 != "function" ? (r2 = t2 + a2, (i2 = n2.__k[t2] = typeof i2 == "string" || typeof i2 == "number" || typeof i2 == "bigint" || i2.constructor == String ? g$2(null, i2, null, null, null) : y$1(i2) ? g$2(b, { children: i2 }, null, null, null) : i2.constructor === void 0 && i2.__b > 0 ? g$2(i2.type, i2.props, i2.key, i2.ref ? i2.ref : null, i2.__v) : i2).__ = n2, i2.__b = n2.__b + 1, o2 = null, (f2 = i2.__i = L$1(i2, u2, r2, s2)) !== -1 && (s2--, (o2 = u2[f2]) && (o2.__u |= 131072)), o2 == null || o2.__v === null ? (f2 == -1 && a2--, typeof i2.type != "function" && (i2.__u |= 65536)) : f2 !== r2 && (f2 == r2 - 1 ? a2-- : f2 == r2 + 1 ? a2++ : (f2 > r2 ? a2-- : a2++, i2.__u |= 65536))) : i2 = n2.__k[t2] = null;
|
|
65
|
-
if (s2) for (t2 = 0; t2 < c2; t2++) (o2 = u2[t2]) != null && !(131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x$2(o2)), N$1(o2, o2));
|
|
66
|
-
}
|
|
67
|
-
function I$1(n2, l2, u2) {
|
|
68
|
-
var t2, i2;
|
|
69
|
-
if (typeof n2.type == "function") {
|
|
70
|
-
for (t2 = n2.__k, i2 = 0; t2 && i2 < t2.length; i2++) t2[i2] && (t2[i2].__ = n2, l2 = I$1(t2[i2], l2, u2));
|
|
71
|
-
return l2;
|
|
72
|
-
}
|
|
73
|
-
n2.__e != l2 && (l2 && n2.type && !u2.contains(l2) && (l2 = x$2(n2)), u2.insertBefore(n2.__e, l2 || null), l2 = n2.__e);
|
|
74
|
-
do
|
|
75
|
-
l2 = l2 && l2.nextSibling;
|
|
76
|
-
while (l2 != null && l2.nodeType === 8);
|
|
77
|
-
return l2;
|
|
78
|
-
}
|
|
79
|
-
function H$1(n2, l2) {
|
|
80
|
-
return l2 = l2 || [], n2 == null || typeof n2 == "boolean" || (y$1(n2) ? n2.some(function(n3) {
|
|
81
|
-
H$1(n3, l2);
|
|
82
|
-
}) : l2.push(n2)), l2;
|
|
83
|
-
}
|
|
84
|
-
function L$1(n2, l2, u2, t2) {
|
|
85
|
-
var i2 = n2.key, o2 = n2.type, r2 = u2 - 1, f2 = u2 + 1, e2 = l2[u2];
|
|
86
|
-
if (e2 === null || e2 && i2 == e2.key && o2 === e2.type && !(131072 & e2.__u)) return u2;
|
|
87
|
-
if ((typeof o2 != "function" || o2 === b || i2) && t2 > (e2 != null && !(131072 & e2.__u) ? 1 : 0)) for (; r2 >= 0 || f2 < l2.length; ) {
|
|
88
|
-
if (r2 >= 0) {
|
|
89
|
-
if ((e2 = l2[r2]) && !(131072 & e2.__u) && i2 == e2.key && o2 === e2.type) return r2;
|
|
90
|
-
r2--;
|
|
91
|
-
}
|
|
92
|
-
if (f2 < l2.length) {
|
|
93
|
-
if ((e2 = l2[f2]) && !(131072 & e2.__u) && i2 == e2.key && o2 === e2.type) return f2;
|
|
94
|
-
f2++;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return -1;
|
|
98
|
-
}
|
|
99
|
-
function T$2(n2, l2, u2) {
|
|
100
|
-
l2[0] === "-" ? n2.setProperty(l2, u2 ?? "") : n2[l2] = u2 == null ? "" : typeof u2 != "number" || p$1.test(l2) ? u2 : u2 + "px";
|
|
101
|
-
}
|
|
102
|
-
function A$2(n2, l2, u2, t2, i2) {
|
|
103
|
-
var o2;
|
|
104
|
-
n: if (l2 === "style") if (typeof u2 == "string") n2.style.cssText = u2;
|
|
9
|
+
var client = {}, hasRequiredClient;
|
|
10
|
+
function requireClient() {
|
|
11
|
+
if (hasRequiredClient) return client;
|
|
12
|
+
hasRequiredClient = 1;
|
|
13
|
+
var m = require$$0;
|
|
14
|
+
if (process.env.NODE_ENV === "production")
|
|
15
|
+
client.createRoot = m.createRoot, client.hydrateRoot = m.hydrateRoot;
|
|
105
16
|
else {
|
|
106
|
-
|
|
107
|
-
|
|
17
|
+
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
18
|
+
client.createRoot = function(c, o) {
|
|
19
|
+
i.usingClientEntryPoint = !0;
|
|
20
|
+
try {
|
|
21
|
+
return m.createRoot(c, o);
|
|
22
|
+
} finally {
|
|
23
|
+
i.usingClientEntryPoint = !1;
|
|
24
|
+
}
|
|
25
|
+
}, client.hydrateRoot = function(c, h, o) {
|
|
26
|
+
i.usingClientEntryPoint = !0;
|
|
27
|
+
try {
|
|
28
|
+
return m.hydrateRoot(c, h, o);
|
|
29
|
+
} finally {
|
|
30
|
+
i.usingClientEntryPoint = !1;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
108
33
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
34
|
+
return client;
|
|
35
|
+
}
|
|
36
|
+
var clientExports = requireClient(), jsxRuntime = { exports: {} }, reactJsxRuntime_production_min = {};
|
|
37
|
+
/**
|
|
38
|
+
* @license React
|
|
39
|
+
* react-jsx-runtime.production.min.js
|
|
40
|
+
*
|
|
41
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the MIT license found in the
|
|
44
|
+
* LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/
|
|
46
|
+
var hasRequiredReactJsxRuntime_production_min;
|
|
47
|
+
function requireReactJsxRuntime_production_min() {
|
|
48
|
+
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
49
|
+
hasRequiredReactJsxRuntime_production_min = 1;
|
|
50
|
+
var f = require$$0$1, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
51
|
+
function q(c, a, g) {
|
|
52
|
+
var b, d = {}, e = null, h = null;
|
|
53
|
+
g !== void 0 && (e = "" + g), a.key !== void 0 && (e = "" + a.key), a.ref !== void 0 && (h = a.ref);
|
|
54
|
+
for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
55
|
+
if (c && c.defaultProps) for (b in a = c.defaultProps, a) d[b] === void 0 && (d[b] = a[b]);
|
|
56
|
+
return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
|
|
57
|
+
}
|
|
58
|
+
return reactJsxRuntime_production_min.Fragment = l, reactJsxRuntime_production_min.jsx = q, reactJsxRuntime_production_min.jsxs = q, reactJsxRuntime_production_min;
|
|
59
|
+
}
|
|
60
|
+
var reactJsxRuntime_development = {};
|
|
61
|
+
/**
|
|
62
|
+
* @license React
|
|
63
|
+
* react-jsx-runtime.development.js
|
|
64
|
+
*
|
|
65
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the MIT license found in the
|
|
68
|
+
* LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/
|
|
70
|
+
var hasRequiredReactJsxRuntime_development;
|
|
71
|
+
function requireReactJsxRuntime_development() {
|
|
72
|
+
return hasRequiredReactJsxRuntime_development || (hasRequiredReactJsxRuntime_development = 1, process.env.NODE_ENV !== "production" && function() {
|
|
73
|
+
var React = require$$0$1, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
74
|
+
function getIteratorFn(maybeIterable) {
|
|
75
|
+
if (maybeIterable === null || typeof maybeIterable != "object")
|
|
76
|
+
return null;
|
|
77
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
78
|
+
return typeof maybeIterator == "function" ? maybeIterator : null;
|
|
116
79
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (u2.t == null) u2.t = e$1++;
|
|
125
|
-
else if (u2.t < t2.u) return;
|
|
126
|
-
return l$1.event && (u2 = l$1.event(u2)), "handleEvent" in t2 ? t2.handleEvent(u2) : t2(u2);
|
|
80
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
81
|
+
function error(format2) {
|
|
82
|
+
{
|
|
83
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++)
|
|
84
|
+
args[_key2 - 1] = arguments[_key2];
|
|
85
|
+
printWarning("error", format2, args);
|
|
86
|
+
}
|
|
127
87
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
else {
|
|
137
|
-
if (x2 && T2.getDerivedStateFromProps == null && m2 !== p2 && h2.componentWillReceiveProps != null && h2.componentWillReceiveProps(m2, S2), !h2.__e && (h2.shouldComponentUpdate != null && h2.shouldComponentUpdate(m2, h2.__s, S2) === !1 || u2.__v === t2.__v)) {
|
|
138
|
-
for (u2.__v !== t2.__v && (h2.props = m2, h2.state = h2.__s, h2.__d = !1), u2.__e = t2.__e, u2.__k = t2.__k, u2.__k.some(function(n3) {
|
|
139
|
-
n3 && (n3.__ = u2);
|
|
140
|
-
}), M2 = 0; M2 < h2._sb.length; M2++) h2.__h.push(h2._sb[M2]);
|
|
141
|
-
h2._sb = [], h2.__h.length && f2.push(h2);
|
|
142
|
-
break n;
|
|
88
|
+
function printWarning(level, format2, args) {
|
|
89
|
+
{
|
|
90
|
+
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame, stack = ReactDebugCurrentFrame2.getStackAddendum();
|
|
91
|
+
stack !== "" && (format2 += "%s", args = args.concat([stack]));
|
|
92
|
+
var argsWithFormat = args.map(function(item) {
|
|
93
|
+
return String(item);
|
|
94
|
+
});
|
|
95
|
+
argsWithFormat.unshift("Warning: " + format2), Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
143
96
|
}
|
|
144
|
-
h2.componentWillUpdate != null && h2.componentWillUpdate(m2, h2.__s, S2), x2 && h2.componentDidUpdate != null && h2.__h.push(function() {
|
|
145
|
-
h2.componentDidUpdate(p2, w2, _2);
|
|
146
|
-
});
|
|
147
97
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if (u2.__v = null, c2 || r2 != null) {
|
|
157
|
-
for (u2.__u |= c2 ? 160 : 128; e2 && e2.nodeType === 8 && e2.nextSibling; ) e2 = e2.nextSibling;
|
|
158
|
-
r2[r2.indexOf(e2)] = null, u2.__e = e2;
|
|
159
|
-
} else u2.__e = t2.__e, u2.__k = t2.__k;
|
|
160
|
-
l$1.__e(n3, u2, t2);
|
|
161
|
-
}
|
|
162
|
-
else r2 == null && u2.__v === t2.__v ? (u2.__k = t2.__k, u2.__e = t2.__e) : u2.__e = z$2(t2.__e, u2, t2, i2, o2, r2, f2, c2, s2);
|
|
163
|
-
(a2 = l$1.diffed) && a2(u2);
|
|
164
|
-
}
|
|
165
|
-
function j$2(n2, u2, t2) {
|
|
166
|
-
u2.__d = void 0;
|
|
167
|
-
for (var i2 = 0; i2 < t2.length; i2++) E$1(t2[i2], t2[++i2], t2[++i2]);
|
|
168
|
-
l$1.__c && l$1.__c(u2, n2), n2.some(function(u3) {
|
|
169
|
-
try {
|
|
170
|
-
n2 = u3.__h, u3.__h = [], n2.some(function(n3) {
|
|
171
|
-
n3.call(u3);
|
|
172
|
-
});
|
|
173
|
-
} catch (n3) {
|
|
174
|
-
l$1.__e(n3, u3.__v);
|
|
98
|
+
var enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, REACT_MODULE_REFERENCE;
|
|
99
|
+
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
100
|
+
function isValidElementType(type) {
|
|
101
|
+
return !!(typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
102
|
+
// types supported by any Flight configuration anywhere since
|
|
103
|
+
// we don't know which Flight build this will end up being used
|
|
104
|
+
// with.
|
|
105
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0));
|
|
175
106
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
u2 = _2, f2[a2] = null;
|
|
183
|
-
break;
|
|
107
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
108
|
+
var displayName = outerType.displayName;
|
|
109
|
+
if (displayName)
|
|
110
|
+
return displayName;
|
|
111
|
+
var functionName = innerType.displayName || innerType.name || "";
|
|
112
|
+
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
184
113
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
114
|
+
function getContextName(type) {
|
|
115
|
+
return type.displayName || "Context";
|
|
116
|
+
}
|
|
117
|
+
function getComponentNameFromType(type) {
|
|
118
|
+
if (type == null)
|
|
119
|
+
return null;
|
|
120
|
+
if (typeof type.tag == "number" && error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof type == "function")
|
|
121
|
+
return type.displayName || type.name || null;
|
|
122
|
+
if (typeof type == "string")
|
|
123
|
+
return type;
|
|
124
|
+
switch (type) {
|
|
125
|
+
case REACT_FRAGMENT_TYPE:
|
|
126
|
+
return "Fragment";
|
|
127
|
+
case REACT_PORTAL_TYPE:
|
|
128
|
+
return "Portal";
|
|
129
|
+
case REACT_PROFILER_TYPE:
|
|
130
|
+
return "Profiler";
|
|
131
|
+
case REACT_STRICT_MODE_TYPE:
|
|
132
|
+
return "StrictMode";
|
|
133
|
+
case REACT_SUSPENSE_TYPE:
|
|
134
|
+
return "Suspense";
|
|
135
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
136
|
+
return "SuspenseList";
|
|
198
137
|
}
|
|
138
|
+
if (typeof type == "object")
|
|
139
|
+
switch (type.$$typeof) {
|
|
140
|
+
case REACT_CONTEXT_TYPE:
|
|
141
|
+
var context = type;
|
|
142
|
+
return getContextName(context) + ".Consumer";
|
|
143
|
+
case REACT_PROVIDER_TYPE:
|
|
144
|
+
var provider = type;
|
|
145
|
+
return getContextName(provider._context) + ".Provider";
|
|
146
|
+
case REACT_FORWARD_REF_TYPE:
|
|
147
|
+
return getWrappedName(type, type.render, "ForwardRef");
|
|
148
|
+
case REACT_MEMO_TYPE:
|
|
149
|
+
var outerName = type.displayName || null;
|
|
150
|
+
return outerName !== null ? outerName : getComponentNameFromType(type.type) || "Memo";
|
|
151
|
+
case REACT_LAZY_TYPE: {
|
|
152
|
+
var lazyComponent = type, payload = lazyComponent._payload, init = lazyComponent._init;
|
|
153
|
+
try {
|
|
154
|
+
return getComponentNameFromType(init(payload));
|
|
155
|
+
} catch {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
199
161
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
l$1.__e(n3, u2);
|
|
224
|
-
}
|
|
225
|
-
i2.base = i2.__P = null;
|
|
226
|
-
}
|
|
227
|
-
if (i2 = n2.__k) for (o2 = 0; o2 < i2.length; o2++) i2[o2] && N$1(i2[o2], u2, t2 || typeof n2.type != "function");
|
|
228
|
-
t2 || w$2(n2.__e), n2.__c = n2.__ = n2.__e = n2.__d = void 0;
|
|
229
|
-
}
|
|
230
|
-
function V$1(n2, l2, u2) {
|
|
231
|
-
return this.constructor(n2, u2);
|
|
232
|
-
}
|
|
233
|
-
function q$2(u2, t2, i2) {
|
|
234
|
-
var o2, r2, f2, e2;
|
|
235
|
-
l$1.__ && l$1.__(u2, t2), r2 = (o2 = typeof i2 == "function") ? null : i2 && i2.__k || t2.__k, f2 = [], e2 = [], O$1(t2, u2 = (!o2 && i2 || t2).__k = _$1(b, null, [u2]), r2 || h$1, h$1, t2.namespaceURI, !o2 && i2 ? [i2] : r2 ? null : t2.firstChild ? n.call(t2.childNodes) : null, f2, !o2 && i2 ? i2 : r2 ? r2.__e : t2.firstChild, o2, e2), j$2(f2, u2, e2);
|
|
236
|
-
}
|
|
237
|
-
function B$2(n2, l2) {
|
|
238
|
-
q$2(n2, l2, B$2);
|
|
239
|
-
}
|
|
240
|
-
function D$2(l2, u2, t2) {
|
|
241
|
-
var i2, o2, r2, f2, e2 = d$1({}, l2.props);
|
|
242
|
-
for (r2 in l2.type && l2.type.defaultProps && (f2 = l2.type.defaultProps), u2) r2 == "key" ? i2 = u2[r2] : r2 == "ref" ? o2 = u2[r2] : e2[r2] = u2[r2] === void 0 && f2 !== void 0 ? f2[r2] : u2[r2];
|
|
243
|
-
return arguments.length > 2 && (e2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), g$2(l2.type, e2, i2 || l2.key, o2 || l2.ref, null);
|
|
244
|
-
}
|
|
245
|
-
function G$1(n2, l2) {
|
|
246
|
-
var u2 = { __c: l2 = "__cC" + a$1++, __: n2, Consumer: function(n3, l3) {
|
|
247
|
-
return n3.children(l3);
|
|
248
|
-
}, Provider: function(n3) {
|
|
249
|
-
var u3, t2;
|
|
250
|
-
return this.getChildContext || (u3 = /* @__PURE__ */ new Set(), (t2 = {})[l2] = this, this.getChildContext = function() {
|
|
251
|
-
return t2;
|
|
252
|
-
}, this.componentWillUnmount = function() {
|
|
253
|
-
u3 = null;
|
|
254
|
-
}, this.shouldComponentUpdate = function(n4) {
|
|
255
|
-
this.props.value !== n4.value && u3.forEach(function(n5) {
|
|
256
|
-
n5.__e = !0, S(n5);
|
|
257
|
-
});
|
|
258
|
-
}, this.sub = function(n4) {
|
|
259
|
-
u3.add(n4);
|
|
260
|
-
var l3 = n4.componentWillUnmount;
|
|
261
|
-
n4.componentWillUnmount = function() {
|
|
262
|
-
u3 && u3.delete(n4), l3 && l3.call(n4);
|
|
263
|
-
};
|
|
264
|
-
}), n3.children;
|
|
265
|
-
} };
|
|
266
|
-
return u2.Provider.__ = u2.Consumer.contextType = u2;
|
|
267
|
-
}
|
|
268
|
-
n = v$1.slice, l$1 = { __e: function(n2, l2, u2, t2) {
|
|
269
|
-
for (var i2, o2, r2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try {
|
|
270
|
-
if ((o2 = i2.constructor) && o2.getDerivedStateFromError != null && (i2.setState(o2.getDerivedStateFromError(n2)), r2 = i2.__d), i2.componentDidCatch != null && (i2.componentDidCatch(n2, t2 || {}), r2 = i2.__d), r2) return i2.__E = i2;
|
|
271
|
-
} catch (l3) {
|
|
272
|
-
n2 = l3;
|
|
273
|
-
}
|
|
274
|
-
throw n2;
|
|
275
|
-
} }, u$2 = 0, k$2.prototype.setState = function(n2, l2) {
|
|
276
|
-
var u2;
|
|
277
|
-
u2 = this.__s != null && this.__s !== this.state ? this.__s : this.__s = d$1({}, this.state), typeof n2 == "function" && (n2 = n2(d$1({}, u2), this.props)), n2 && d$1(u2, n2), n2 != null && this.__v && (l2 && this._sb.push(l2), S(this));
|
|
278
|
-
}, k$2.prototype.forceUpdate = function(n2) {
|
|
279
|
-
this.__v && (this.__e = !0, n2 && this.__h.push(n2), S(this));
|
|
280
|
-
}, k$2.prototype.render = b, i$1 = [], r$2 = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$2 = function(n2, l2) {
|
|
281
|
-
return n2.__v.__b - l2.__v.__b;
|
|
282
|
-
}, M$1.__r = 0, e$1 = 0, c$1 = F$2(!1), s$1 = F$2(!0), a$1 = 0;
|
|
283
|
-
var f$1 = 0;
|
|
284
|
-
function u$1(e2, t2, n2, o2, i2, u2) {
|
|
285
|
-
t2 || (t2 = {});
|
|
286
|
-
var a2, c2, l2 = t2;
|
|
287
|
-
"ref" in t2 && (a2 = t2.ref, delete t2.ref);
|
|
288
|
-
var p2 = { type: e2, props: l2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --f$1, __i: -1, __u: 0, __source: i2, __self: u2 };
|
|
289
|
-
if (typeof e2 == "function" && (a2 = e2.defaultProps)) for (c2 in a2) l2[c2] === void 0 && (l2[c2] = a2[c2]);
|
|
290
|
-
return l$1.vnode && l$1.vnode(p2), p2;
|
|
291
|
-
}
|
|
292
|
-
var t, r$1, u, i, o = 0, f = [], c = l$1, e = c.__b, a = c.__r, v = c.diffed, l = c.__c, m = c.unmount, s = c.__;
|
|
293
|
-
function d(n2, t2) {
|
|
294
|
-
c.__h && c.__h(r$1, n2, o || t2), o = 0;
|
|
295
|
-
var u2 = r$1.__H || (r$1.__H = { __: [], __h: [] });
|
|
296
|
-
return n2 >= u2.__.length && u2.__.push({}), u2.__[n2];
|
|
297
|
-
}
|
|
298
|
-
function h(n2) {
|
|
299
|
-
return o = 1, p(D$1, n2);
|
|
300
|
-
}
|
|
301
|
-
function p(n2, u2, i2) {
|
|
302
|
-
var o2 = d(t++, 2);
|
|
303
|
-
if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : D$1(void 0, u2), function(n3) {
|
|
304
|
-
var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3);
|
|
305
|
-
t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
|
|
306
|
-
}], o2.__c = r$1, !r$1.u)) {
|
|
307
|
-
var f2 = function(n3, t2, r2) {
|
|
308
|
-
if (!o2.__c.__H) return !0;
|
|
309
|
-
var u3 = o2.__c.__H.__.filter(function(n4) {
|
|
310
|
-
return !!n4.__c;
|
|
311
|
-
});
|
|
312
|
-
if (u3.every(function(n4) {
|
|
313
|
-
return !n4.__N;
|
|
314
|
-
})) return !c2 || c2.call(this, n3, t2, r2);
|
|
315
|
-
var i3 = o2.__c.props !== n3;
|
|
316
|
-
return u3.forEach(function(n4) {
|
|
317
|
-
if (n4.__N) {
|
|
318
|
-
var t3 = n4.__[0];
|
|
319
|
-
n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = !0);
|
|
162
|
+
var assign = Object.assign, disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
|
|
163
|
+
function disabledLog() {
|
|
164
|
+
}
|
|
165
|
+
disabledLog.__reactDisabledLog = !0;
|
|
166
|
+
function disableLogs() {
|
|
167
|
+
{
|
|
168
|
+
if (disabledDepth === 0) {
|
|
169
|
+
prevLog = console.log, prevInfo = console.info, prevWarn = console.warn, prevError = console.error, prevGroup = console.group, prevGroupCollapsed = console.groupCollapsed, prevGroupEnd = console.groupEnd;
|
|
170
|
+
var props = {
|
|
171
|
+
configurable: !0,
|
|
172
|
+
enumerable: !0,
|
|
173
|
+
value: disabledLog,
|
|
174
|
+
writable: !0
|
|
175
|
+
};
|
|
176
|
+
Object.defineProperties(console, {
|
|
177
|
+
info: props,
|
|
178
|
+
log: props,
|
|
179
|
+
warn: props,
|
|
180
|
+
error: props,
|
|
181
|
+
group: props,
|
|
182
|
+
groupCollapsed: props,
|
|
183
|
+
groupEnd: props
|
|
184
|
+
});
|
|
320
185
|
}
|
|
321
|
-
|
|
322
|
-
};
|
|
323
|
-
r$1.u = !0;
|
|
324
|
-
var c2 = r$1.shouldComponentUpdate, e2 = r$1.componentWillUpdate;
|
|
325
|
-
r$1.componentWillUpdate = function(n3, t2, r2) {
|
|
326
|
-
if (this.__e) {
|
|
327
|
-
var u3 = c2;
|
|
328
|
-
c2 = void 0, f2(n3, t2, r2), c2 = u3;
|
|
186
|
+
disabledDepth++;
|
|
329
187
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
}, t2);
|
|
365
|
-
}
|
|
366
|
-
function x$1(n2) {
|
|
367
|
-
var u2 = r$1.context[n2.__c], i2 = d(t++, 9);
|
|
368
|
-
return i2.c = n2, u2 ? (i2.__ == null && (i2.__ = !0, u2.sub(r$1)), u2.props.value) : n2.__;
|
|
369
|
-
}
|
|
370
|
-
function P$1(n2, t2) {
|
|
371
|
-
c.useDebugValue && c.useDebugValue(t2 ? t2(n2) : n2);
|
|
372
|
-
}
|
|
373
|
-
function g$1() {
|
|
374
|
-
var n2 = d(t++, 11);
|
|
375
|
-
if (!n2.__) {
|
|
376
|
-
for (var u2 = r$1.__v; u2 !== null && !u2.__m && u2.__ !== null; ) u2 = u2.__;
|
|
377
|
-
var i2 = u2.__m || (u2.__m = [0, 0]);
|
|
378
|
-
n2.__ = "P" + i2[0] + "-" + i2[1]++;
|
|
379
|
-
}
|
|
380
|
-
return n2.__;
|
|
381
|
-
}
|
|
382
|
-
function j$1() {
|
|
383
|
-
for (var n2; n2 = f.shift(); ) if (n2.__P && n2.__H) try {
|
|
384
|
-
n2.__H.__h.forEach(z$1), n2.__H.__h.forEach(B$1), n2.__H.__h = [];
|
|
385
|
-
} catch (t2) {
|
|
386
|
-
n2.__H.__h = [], c.__e(t2, n2.__v);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
c.__b = function(n2) {
|
|
390
|
-
r$1 = null, e && e(n2);
|
|
391
|
-
}, c.__ = function(n2, t2) {
|
|
392
|
-
n2 && t2.__k && t2.__k.__m && (n2.__m = t2.__k.__m), s && s(n2, t2);
|
|
393
|
-
}, c.__r = function(n2) {
|
|
394
|
-
a && a(n2), t = 0;
|
|
395
|
-
var i2 = (r$1 = n2.__c).__H;
|
|
396
|
-
i2 && (u === r$1 ? (i2.__h = [], r$1.__h = [], i2.__.forEach(function(n3) {
|
|
397
|
-
n3.__N && (n3.__ = n3.__N), n3.i = n3.__N = void 0;
|
|
398
|
-
})) : (i2.__h.forEach(z$1), i2.__h.forEach(B$1), i2.__h = [], t = 0)), u = r$1;
|
|
399
|
-
}, c.diffed = function(n2) {
|
|
400
|
-
v && v(n2);
|
|
401
|
-
var t2 = n2.__c;
|
|
402
|
-
t2 && t2.__H && (t2.__H.__h.length && (f.push(t2) !== 1 && i === c.requestAnimationFrame || ((i = c.requestAnimationFrame) || w$1)(j$1)), t2.__H.__.forEach(function(n3) {
|
|
403
|
-
n3.i && (n3.__H = n3.i), n3.i = void 0;
|
|
404
|
-
})), u = r$1 = null;
|
|
405
|
-
}, c.__c = function(n2, t2) {
|
|
406
|
-
t2.some(function(n3) {
|
|
407
|
-
try {
|
|
408
|
-
n3.__h.forEach(z$1), n3.__h = n3.__h.filter(function(n4) {
|
|
409
|
-
return !n4.__ || B$1(n4);
|
|
410
|
-
});
|
|
411
|
-
} catch (r2) {
|
|
412
|
-
t2.some(function(n4) {
|
|
413
|
-
n4.__h && (n4.__h = []);
|
|
414
|
-
}), t2 = [], c.__e(r2, n3.__v);
|
|
415
|
-
}
|
|
416
|
-
}), l && l(n2, t2);
|
|
417
|
-
}, c.unmount = function(n2) {
|
|
418
|
-
m && m(n2);
|
|
419
|
-
var t2, r2 = n2.__c;
|
|
420
|
-
r2 && r2.__H && (r2.__H.__.forEach(function(n3) {
|
|
421
|
-
try {
|
|
422
|
-
z$1(n3);
|
|
423
|
-
} catch (n4) {
|
|
424
|
-
t2 = n4;
|
|
425
|
-
}
|
|
426
|
-
}), r2.__H = void 0, t2 && c.__e(t2, r2.__v));
|
|
427
|
-
};
|
|
428
|
-
var k$1 = typeof requestAnimationFrame == "function";
|
|
429
|
-
function w$1(n2) {
|
|
430
|
-
var t2, r2 = function() {
|
|
431
|
-
clearTimeout(u2), k$1 && cancelAnimationFrame(t2), setTimeout(n2);
|
|
432
|
-
}, u2 = setTimeout(r2, 100);
|
|
433
|
-
k$1 && (t2 = requestAnimationFrame(r2));
|
|
434
|
-
}
|
|
435
|
-
function z$1(n2) {
|
|
436
|
-
var t2 = r$1, u2 = n2.__c;
|
|
437
|
-
typeof u2 == "function" && (n2.__c = void 0, u2()), r$1 = t2;
|
|
438
|
-
}
|
|
439
|
-
function B$1(n2) {
|
|
440
|
-
var t2 = r$1;
|
|
441
|
-
n2.__c = n2.__(), r$1 = t2;
|
|
442
|
-
}
|
|
443
|
-
function C$1(n2, t2) {
|
|
444
|
-
return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) {
|
|
445
|
-
return t3 !== n2[r2];
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
function D$1(n2, t2) {
|
|
449
|
-
return typeof t2 == "function" ? t2(n2) : t2;
|
|
450
|
-
}
|
|
451
|
-
function g(n2, t2) {
|
|
452
|
-
for (var e2 in n2) if (e2 !== "__source" && !(e2 in t2)) return !0;
|
|
453
|
-
for (var r2 in t2) if (r2 !== "__source" && n2[r2] !== t2[r2]) return !0;
|
|
454
|
-
return !1;
|
|
455
|
-
}
|
|
456
|
-
function E(n2, t2) {
|
|
457
|
-
var e2 = t2(), r2 = h({ t: { __: e2, u: t2 } }), u2 = r2[0].t, o2 = r2[1];
|
|
458
|
-
return _(function() {
|
|
459
|
-
u2.__ = e2, u2.u = t2, C(u2) && o2({ t: u2 });
|
|
460
|
-
}, [n2, e2, t2]), y(function() {
|
|
461
|
-
return C(u2) && o2({ t: u2 }), n2(function() {
|
|
462
|
-
C(u2) && o2({ t: u2 });
|
|
463
|
-
});
|
|
464
|
-
}, [n2]), e2;
|
|
465
|
-
}
|
|
466
|
-
function C(n2) {
|
|
467
|
-
var t2, e2, r2 = n2.u, u2 = n2.__;
|
|
468
|
-
try {
|
|
469
|
-
var o2 = r2();
|
|
470
|
-
return !((t2 = u2) === (e2 = o2) && (t2 !== 0 || 1 / t2 == 1 / e2) || t2 != t2 && e2 != e2);
|
|
471
|
-
} catch {
|
|
472
|
-
return !0;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
function x(n2) {
|
|
476
|
-
n2();
|
|
477
|
-
}
|
|
478
|
-
function R(n2) {
|
|
479
|
-
return n2;
|
|
480
|
-
}
|
|
481
|
-
function w() {
|
|
482
|
-
return [!1, x];
|
|
483
|
-
}
|
|
484
|
-
var k = _;
|
|
485
|
-
function I(n2, t2) {
|
|
486
|
-
this.props = n2, this.context = t2;
|
|
487
|
-
}
|
|
488
|
-
function N(n2, e2) {
|
|
489
|
-
function r2(n3) {
|
|
490
|
-
var t2 = this.props.ref, r3 = t2 == n3.ref;
|
|
491
|
-
return !r3 && t2 && (t2.call ? t2(null) : t2.current = null), e2 ? !e2(this.props, n3) || !r3 : g(this.props, n3);
|
|
492
|
-
}
|
|
493
|
-
function u2(e3) {
|
|
494
|
-
return this.shouldComponentUpdate = r2, _$1(n2, e3);
|
|
495
|
-
}
|
|
496
|
-
return u2.displayName = "Memo(" + (n2.displayName || n2.name) + ")", u2.prototype.isReactComponent = !0, u2.__f = !0, u2;
|
|
497
|
-
}
|
|
498
|
-
(I.prototype = new k$2()).isPureReactComponent = !0, I.prototype.shouldComponentUpdate = function(n2, t2) {
|
|
499
|
-
return g(this.props, n2) || g(this.state, t2);
|
|
500
|
-
};
|
|
501
|
-
var M = l$1.__b;
|
|
502
|
-
l$1.__b = function(n2) {
|
|
503
|
-
n2.type && n2.type.__f && n2.ref && (n2.props.ref = n2.ref, n2.ref = null), M && M(n2);
|
|
504
|
-
};
|
|
505
|
-
var T = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
506
|
-
function A(n2) {
|
|
507
|
-
function t2(t3) {
|
|
508
|
-
if (!("ref" in t3)) return n2(t3, null);
|
|
509
|
-
var e2 = t3.ref;
|
|
510
|
-
delete t3.ref;
|
|
511
|
-
var r2 = n2(t3, e2);
|
|
512
|
-
return t3.ref = e2, r2;
|
|
513
|
-
}
|
|
514
|
-
return t2.$$typeof = T, t2.render = t2, t2.prototype.isReactComponent = t2.__f = !0, t2.displayName = "ForwardRef(" + (n2.displayName || n2.name) + ")", t2;
|
|
515
|
-
}
|
|
516
|
-
var D = function(n2, t2) {
|
|
517
|
-
return n2 == null ? null : H$1(H$1(n2).map(t2));
|
|
518
|
-
}, L = { map: D, forEach: D, count: function(n2) {
|
|
519
|
-
return n2 ? H$1(n2).length : 0;
|
|
520
|
-
}, only: function(n2) {
|
|
521
|
-
var t2 = H$1(n2);
|
|
522
|
-
if (t2.length !== 1) throw "Children.only";
|
|
523
|
-
return t2[0];
|
|
524
|
-
}, toArray: H$1 }, O = l$1.__e;
|
|
525
|
-
l$1.__e = function(n2, t2, e2, r2) {
|
|
526
|
-
if (n2.then) {
|
|
527
|
-
for (var u2, o2 = t2; o2 = o2.__; ) if ((u2 = o2.__c) && u2.__c) return t2.__e == null && (t2.__e = e2.__e, t2.__k = e2.__k), u2.__c(n2, t2);
|
|
528
|
-
}
|
|
529
|
-
O(n2, t2, e2, r2);
|
|
530
|
-
};
|
|
531
|
-
var F = l$1.unmount;
|
|
532
|
-
function U(n2, t2, e2) {
|
|
533
|
-
return n2 && (n2.__c && n2.__c.__H && (n2.__c.__H.__.forEach(function(n3) {
|
|
534
|
-
typeof n3.__c == "function" && n3.__c();
|
|
535
|
-
}), n2.__c.__H = null), (n2 = function(n3, t3) {
|
|
536
|
-
for (var e3 in t3) n3[e3] = t3[e3];
|
|
537
|
-
return n3;
|
|
538
|
-
}({}, n2)).__c != null && (n2.__c.__P === e2 && (n2.__c.__P = t2), n2.__c = null), n2.__k = n2.__k && n2.__k.map(function(n3) {
|
|
539
|
-
return U(n3, t2, e2);
|
|
540
|
-
})), n2;
|
|
541
|
-
}
|
|
542
|
-
function V(n2, t2, e2) {
|
|
543
|
-
return n2 && e2 && (n2.__v = null, n2.__k = n2.__k && n2.__k.map(function(n3) {
|
|
544
|
-
return V(n3, t2, e2);
|
|
545
|
-
}), n2.__c && n2.__c.__P === t2 && (n2.__e && e2.appendChild(n2.__e), n2.__c.__e = !0, n2.__c.__P = e2)), n2;
|
|
546
|
-
}
|
|
547
|
-
function W() {
|
|
548
|
-
this.__u = 0, this.o = null, this.__b = null;
|
|
549
|
-
}
|
|
550
|
-
function P(n2) {
|
|
551
|
-
var t2 = n2.__.__c;
|
|
552
|
-
return t2 && t2.__a && t2.__a(n2);
|
|
553
|
-
}
|
|
554
|
-
function j(n2) {
|
|
555
|
-
var e2, r2, u2;
|
|
556
|
-
function o2(o3) {
|
|
557
|
-
if (e2 || (e2 = n2()).then(function(n3) {
|
|
558
|
-
r2 = n3.default || n3;
|
|
559
|
-
}, function(n3) {
|
|
560
|
-
u2 = n3;
|
|
561
|
-
}), u2) throw u2;
|
|
562
|
-
if (!r2) throw e2;
|
|
563
|
-
return _$1(r2, o3);
|
|
564
|
-
}
|
|
565
|
-
return o2.displayName = "Lazy", o2.__f = !0, o2;
|
|
566
|
-
}
|
|
567
|
-
function z() {
|
|
568
|
-
this.i = null, this.l = null;
|
|
569
|
-
}
|
|
570
|
-
l$1.unmount = function(n2) {
|
|
571
|
-
var t2 = n2.__c;
|
|
572
|
-
t2 && t2.__R && t2.__R(), t2 && 32 & n2.__u && (n2.type = null), F && F(n2);
|
|
573
|
-
}, (W.prototype = new k$2()).__c = function(n2, t2) {
|
|
574
|
-
var e2 = t2.__c, r2 = this;
|
|
575
|
-
r2.o == null && (r2.o = []), r2.o.push(e2);
|
|
576
|
-
var u2 = P(r2.__v), o2 = !1, i2 = function() {
|
|
577
|
-
o2 || (o2 = !0, e2.__R = null, u2 ? u2(c2) : c2());
|
|
578
|
-
};
|
|
579
|
-
e2.__R = i2;
|
|
580
|
-
var c2 = function() {
|
|
581
|
-
if (!--r2.__u) {
|
|
582
|
-
if (r2.state.__a) {
|
|
583
|
-
var n3 = r2.state.__a;
|
|
584
|
-
r2.__v.__k[0] = V(n3, n3.__c.__P, n3.__c.__O);
|
|
188
|
+
}
|
|
189
|
+
function reenableLogs() {
|
|
190
|
+
{
|
|
191
|
+
if (disabledDepth--, disabledDepth === 0) {
|
|
192
|
+
var props = {
|
|
193
|
+
configurable: !0,
|
|
194
|
+
enumerable: !0,
|
|
195
|
+
writable: !0
|
|
196
|
+
};
|
|
197
|
+
Object.defineProperties(console, {
|
|
198
|
+
log: assign({}, props, {
|
|
199
|
+
value: prevLog
|
|
200
|
+
}),
|
|
201
|
+
info: assign({}, props, {
|
|
202
|
+
value: prevInfo
|
|
203
|
+
}),
|
|
204
|
+
warn: assign({}, props, {
|
|
205
|
+
value: prevWarn
|
|
206
|
+
}),
|
|
207
|
+
error: assign({}, props, {
|
|
208
|
+
value: prevError
|
|
209
|
+
}),
|
|
210
|
+
group: assign({}, props, {
|
|
211
|
+
value: prevGroup
|
|
212
|
+
}),
|
|
213
|
+
groupCollapsed: assign({}, props, {
|
|
214
|
+
value: prevGroupCollapsed
|
|
215
|
+
}),
|
|
216
|
+
groupEnd: assign({}, props, {
|
|
217
|
+
value: prevGroupEnd
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
disabledDepth < 0 && error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
585
222
|
}
|
|
586
|
-
var t3;
|
|
587
|
-
for (r2.setState({ __a: r2.__b = null }); t3 = r2.o.pop(); ) t3.forceUpdate();
|
|
588
223
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
224
|
+
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, prefix;
|
|
225
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
226
|
+
{
|
|
227
|
+
if (prefix === void 0)
|
|
228
|
+
try {
|
|
229
|
+
throw Error();
|
|
230
|
+
} catch (x) {
|
|
231
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
232
|
+
prefix = match && match[1] || "";
|
|
233
|
+
}
|
|
234
|
+
return `
|
|
235
|
+
` + prefix + name;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
var reentry = !1, componentFrameCache;
|
|
239
|
+
{
|
|
240
|
+
var PossiblyWeakMap = typeof WeakMap == "function" ? WeakMap : Map;
|
|
241
|
+
componentFrameCache = new PossiblyWeakMap();
|
|
242
|
+
}
|
|
243
|
+
function describeNativeComponentFrame(fn, construct) {
|
|
244
|
+
if (!fn || reentry)
|
|
245
|
+
return "";
|
|
246
|
+
{
|
|
247
|
+
var frame = componentFrameCache.get(fn);
|
|
248
|
+
if (frame !== void 0)
|
|
249
|
+
return frame;
|
|
250
|
+
}
|
|
251
|
+
var control;
|
|
252
|
+
reentry = !0;
|
|
253
|
+
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
254
|
+
Error.prepareStackTrace = void 0;
|
|
255
|
+
var previousDispatcher;
|
|
256
|
+
previousDispatcher = ReactCurrentDispatcher.current, ReactCurrentDispatcher.current = null, disableLogs();
|
|
257
|
+
try {
|
|
258
|
+
if (construct) {
|
|
259
|
+
var Fake = function() {
|
|
260
|
+
throw Error();
|
|
261
|
+
};
|
|
262
|
+
if (Object.defineProperty(Fake.prototype, "props", {
|
|
263
|
+
set: function() {
|
|
264
|
+
throw Error();
|
|
265
|
+
}
|
|
266
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
267
|
+
try {
|
|
268
|
+
Reflect.construct(Fake, []);
|
|
269
|
+
} catch (x) {
|
|
270
|
+
control = x;
|
|
271
|
+
}
|
|
272
|
+
Reflect.construct(fn, [], Fake);
|
|
273
|
+
} else {
|
|
274
|
+
try {
|
|
275
|
+
Fake.call();
|
|
276
|
+
} catch (x) {
|
|
277
|
+
control = x;
|
|
278
|
+
}
|
|
279
|
+
fn.call(Fake.prototype);
|
|
280
|
+
}
|
|
281
|
+
} else {
|
|
282
|
+
try {
|
|
283
|
+
throw Error();
|
|
284
|
+
} catch (x) {
|
|
285
|
+
control = x;
|
|
286
|
+
}
|
|
287
|
+
fn();
|
|
288
|
+
}
|
|
289
|
+
} catch (sample) {
|
|
290
|
+
if (sample && control && typeof sample.stack == "string") {
|
|
291
|
+
for (var sampleLines = sample.stack.split(`
|
|
292
|
+
`), controlLines = control.stack.split(`
|
|
293
|
+
`), s = sampleLines.length - 1, c = controlLines.length - 1; s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]; )
|
|
294
|
+
c--;
|
|
295
|
+
for (; s >= 1 && c >= 0; s--, c--)
|
|
296
|
+
if (sampleLines[s] !== controlLines[c]) {
|
|
297
|
+
if (s !== 1 || c !== 1)
|
|
298
|
+
do
|
|
299
|
+
if (s--, c--, c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
300
|
+
var _frame = `
|
|
301
|
+
` + sampleLines[s].replace(" at new ", " at ");
|
|
302
|
+
return fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName)), typeof fn == "function" && componentFrameCache.set(fn, _frame), _frame;
|
|
303
|
+
}
|
|
304
|
+
while (s >= 1 && c >= 0);
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
} finally {
|
|
309
|
+
reentry = !1, ReactCurrentDispatcher.current = previousDispatcher, reenableLogs(), Error.prepareStackTrace = previousPrepareStackTrace;
|
|
310
|
+
}
|
|
311
|
+
var name = fn ? fn.displayName || fn.name : "", syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
|
312
|
+
return typeof fn == "function" && componentFrameCache.set(fn, syntheticFrame), syntheticFrame;
|
|
313
|
+
}
|
|
314
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
315
|
+
return describeNativeComponentFrame(fn, !1);
|
|
316
|
+
}
|
|
317
|
+
function shouldConstruct(Component) {
|
|
318
|
+
var prototype = Component.prototype;
|
|
319
|
+
return !!(prototype && prototype.isReactComponent);
|
|
320
|
+
}
|
|
321
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
322
|
+
if (type == null)
|
|
323
|
+
return "";
|
|
324
|
+
if (typeof type == "function")
|
|
325
|
+
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
326
|
+
if (typeof type == "string")
|
|
327
|
+
return describeBuiltInComponentFrame(type);
|
|
328
|
+
switch (type) {
|
|
329
|
+
case REACT_SUSPENSE_TYPE:
|
|
330
|
+
return describeBuiltInComponentFrame("Suspense");
|
|
331
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
332
|
+
return describeBuiltInComponentFrame("SuspenseList");
|
|
333
|
+
}
|
|
334
|
+
if (typeof type == "object")
|
|
335
|
+
switch (type.$$typeof) {
|
|
336
|
+
case REACT_FORWARD_REF_TYPE:
|
|
337
|
+
return describeFunctionComponentFrame(type.render);
|
|
338
|
+
case REACT_MEMO_TYPE:
|
|
339
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
340
|
+
case REACT_LAZY_TYPE: {
|
|
341
|
+
var lazyComponent = type, payload = lazyComponent._payload, init = lazyComponent._init;
|
|
342
|
+
try {
|
|
343
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
344
|
+
} catch {
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return "";
|
|
349
|
+
}
|
|
350
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty, loggedTypeFailures = {}, ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
351
|
+
function setCurrentlyValidatingElement(element) {
|
|
352
|
+
if (element) {
|
|
353
|
+
var owner = element._owner, stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
354
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
355
|
+
} else
|
|
356
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
357
|
+
}
|
|
358
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
359
|
+
{
|
|
360
|
+
var has = Function.call.bind(hasOwnProperty);
|
|
361
|
+
for (var typeSpecName in typeSpecs)
|
|
362
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
363
|
+
var error$1 = void 0;
|
|
364
|
+
try {
|
|
365
|
+
if (typeof typeSpecs[typeSpecName] != "function") {
|
|
366
|
+
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
367
|
+
throw err.name = "Invariant Violation", err;
|
|
368
|
+
}
|
|
369
|
+
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
370
|
+
} catch (ex) {
|
|
371
|
+
error$1 = ex;
|
|
372
|
+
}
|
|
373
|
+
error$1 && !(error$1 instanceof Error) && (setCurrentlyValidatingElement(element), error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1), setCurrentlyValidatingElement(null)), error$1 instanceof Error && !(error$1.message in loggedTypeFailures) && (loggedTypeFailures[error$1.message] = !0, setCurrentlyValidatingElement(element), error("Failed %s type: %s", location, error$1.message), setCurrentlyValidatingElement(null));
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
var isArrayImpl = Array.isArray;
|
|
378
|
+
function isArray(a) {
|
|
379
|
+
return isArrayImpl(a);
|
|
380
|
+
}
|
|
381
|
+
function typeName(value) {
|
|
382
|
+
{
|
|
383
|
+
var hasToStringTag = typeof Symbol == "function" && Symbol.toStringTag, type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
384
|
+
return type;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function willCoercionThrow(value) {
|
|
388
|
+
try {
|
|
389
|
+
return testStringCoercion(value), !1;
|
|
390
|
+
} catch {
|
|
391
|
+
return !0;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
function testStringCoercion(value) {
|
|
395
|
+
return "" + value;
|
|
396
|
+
}
|
|
397
|
+
function checkKeyStringCoercion(value) {
|
|
398
|
+
if (willCoercionThrow(value))
|
|
399
|
+
return error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)), testStringCoercion(value);
|
|
400
|
+
}
|
|
401
|
+
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, RESERVED_PROPS = {
|
|
402
|
+
key: !0,
|
|
403
|
+
ref: !0,
|
|
404
|
+
__self: !0,
|
|
405
|
+
__source: !0
|
|
406
|
+
}, specialPropKeyWarningShown, specialPropRefWarningShown;
|
|
407
|
+
function hasValidRef(config) {
|
|
408
|
+
if (hasOwnProperty.call(config, "ref")) {
|
|
409
|
+
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
410
|
+
if (getter && getter.isReactWarning)
|
|
411
|
+
return !1;
|
|
412
|
+
}
|
|
413
|
+
return config.ref !== void 0;
|
|
414
|
+
}
|
|
415
|
+
function hasValidKey(config) {
|
|
416
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
417
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
418
|
+
if (getter && getter.isReactWarning)
|
|
419
|
+
return !1;
|
|
420
|
+
}
|
|
421
|
+
return config.key !== void 0;
|
|
422
|
+
}
|
|
423
|
+
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
424
|
+
typeof config.ref == "string" && ReactCurrentOwner.current;
|
|
425
|
+
}
|
|
426
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
427
|
+
{
|
|
428
|
+
var warnAboutAccessingKey = function() {
|
|
429
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, error("%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://reactjs.org/link/special-props)", displayName));
|
|
430
|
+
};
|
|
431
|
+
warnAboutAccessingKey.isReactWarning = !0, Object.defineProperty(props, "key", {
|
|
432
|
+
get: warnAboutAccessingKey,
|
|
433
|
+
configurable: !0
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
function defineRefPropWarningGetter(props, displayName) {
|
|
438
|
+
{
|
|
439
|
+
var warnAboutAccessingRef = function() {
|
|
440
|
+
specialPropRefWarningShown || (specialPropRefWarningShown = !0, error("%s: `ref` 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://reactjs.org/link/special-props)", displayName));
|
|
441
|
+
};
|
|
442
|
+
warnAboutAccessingRef.isReactWarning = !0, Object.defineProperty(props, "ref", {
|
|
443
|
+
get: warnAboutAccessingRef,
|
|
444
|
+
configurable: !0
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
449
|
+
var element = {
|
|
450
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
451
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
452
|
+
// Built-in properties that belong on the element
|
|
453
|
+
type,
|
|
454
|
+
key,
|
|
455
|
+
ref,
|
|
456
|
+
props,
|
|
457
|
+
// Record the component responsible for creating this element.
|
|
458
|
+
_owner: owner
|
|
459
|
+
};
|
|
460
|
+
return element._store = {}, Object.defineProperty(element._store, "validated", {
|
|
461
|
+
configurable: !1,
|
|
462
|
+
enumerable: !1,
|
|
463
|
+
writable: !0,
|
|
464
|
+
value: !1
|
|
465
|
+
}), Object.defineProperty(element, "_self", {
|
|
466
|
+
configurable: !1,
|
|
467
|
+
enumerable: !1,
|
|
468
|
+
writable: !1,
|
|
469
|
+
value: self
|
|
470
|
+
}), Object.defineProperty(element, "_source", {
|
|
471
|
+
configurable: !1,
|
|
472
|
+
enumerable: !1,
|
|
473
|
+
writable: !1,
|
|
474
|
+
value: source
|
|
475
|
+
}), Object.freeze && (Object.freeze(element.props), Object.freeze(element)), element;
|
|
639
476
|
};
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
},
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
};
|
|
657
|
-
function X(n2, t2, e2) {
|
|
658
|
-
return t2.__k == null && (t2.textContent = ""), q$2(n2, t2), typeof e2 == "function" && e2(), n2 ? n2.__c : null;
|
|
659
|
-
}
|
|
660
|
-
function nn(n2, t2, e2) {
|
|
661
|
-
return B$2(n2, t2), typeof e2 == "function" && e2(), n2 ? n2.__c : null;
|
|
662
|
-
}
|
|
663
|
-
k$2.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t2) {
|
|
664
|
-
Object.defineProperty(k$2.prototype, t2, { configurable: !0, get: function() {
|
|
665
|
-
return this["UNSAFE_" + t2];
|
|
666
|
-
}, set: function(n2) {
|
|
667
|
-
Object.defineProperty(this, t2, { configurable: !0, writable: !0, value: n2 });
|
|
668
|
-
} });
|
|
669
|
-
});
|
|
670
|
-
var tn = l$1.event;
|
|
671
|
-
function en() {
|
|
672
|
-
}
|
|
673
|
-
function rn() {
|
|
674
|
-
return this.cancelBubble;
|
|
675
|
-
}
|
|
676
|
-
function un() {
|
|
677
|
-
return this.defaultPrevented;
|
|
678
|
-
}
|
|
679
|
-
l$1.event = function(n2) {
|
|
680
|
-
return tn && (n2 = tn(n2)), n2.persist = en, n2.isPropagationStopped = rn, n2.isDefaultPrevented = un, n2.nativeEvent = n2;
|
|
681
|
-
};
|
|
682
|
-
var on, cn = { enumerable: !1, configurable: !0, get: function() {
|
|
683
|
-
return this.class;
|
|
684
|
-
} }, fn = l$1.vnode;
|
|
685
|
-
l$1.vnode = function(n2) {
|
|
686
|
-
typeof n2.type == "string" && function(n3) {
|
|
687
|
-
var t2 = n3.props, e2 = n3.type, u2 = {}, o2 = e2.indexOf("-") === -1;
|
|
688
|
-
for (var i2 in t2) {
|
|
689
|
-
var c2 = t2[i2];
|
|
690
|
-
if (!(i2 === "value" && "defaultValue" in t2 && c2 == null || K && i2 === "children" && e2 === "noscript" || i2 === "class" || i2 === "className")) {
|
|
691
|
-
var f2 = i2.toLowerCase();
|
|
692
|
-
i2 === "defaultValue" && "value" in t2 && t2.value == null ? i2 = "value" : i2 === "download" && c2 === !0 ? c2 = "" : f2 === "translate" && c2 === "no" ? c2 = !1 : f2[0] === "o" && f2[1] === "n" ? f2 === "ondoubleclick" ? i2 = "ondblclick" : f2 !== "onchange" || e2 !== "input" && e2 !== "textarea" || Q(t2.type) ? f2 === "onfocus" ? i2 = "onfocusin" : f2 === "onblur" ? i2 = "onfocusout" : G.test(i2) && (i2 = f2) : f2 = i2 = "oninput" : o2 && q.test(i2) ? i2 = i2.replace(J, "-$&").toLowerCase() : c2 === null && (c2 = void 0), f2 === "oninput" && u2[i2 = f2] && (i2 = "oninputCapture"), u2[i2] = c2;
|
|
477
|
+
function jsxDEV(type, config, maybeKey, source, self) {
|
|
478
|
+
{
|
|
479
|
+
var propName, props = {}, key = null, ref = null;
|
|
480
|
+
maybeKey !== void 0 && (checkKeyStringCoercion(maybeKey), key = "" + maybeKey), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), hasValidRef(config) && (ref = config.ref, warnIfStringRefCannotBeAutoConverted(config, self));
|
|
481
|
+
for (propName in config)
|
|
482
|
+
hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName) && (props[propName] = config[propName]);
|
|
483
|
+
if (type && type.defaultProps) {
|
|
484
|
+
var defaultProps = type.defaultProps;
|
|
485
|
+
for (propName in defaultProps)
|
|
486
|
+
props[propName] === void 0 && (props[propName] = defaultProps[propName]);
|
|
487
|
+
}
|
|
488
|
+
if (key || ref) {
|
|
489
|
+
var displayName = typeof type == "function" ? type.displayName || type.name || "Unknown" : type;
|
|
490
|
+
key && defineKeyPropWarningGetter(props, displayName), ref && defineRefPropWarningGetter(props, displayName);
|
|
491
|
+
}
|
|
492
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
693
493
|
}
|
|
694
494
|
}
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}
|
|
724
|
-
function
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
495
|
+
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
496
|
+
function setCurrentlyValidatingElement$1(element) {
|
|
497
|
+
if (element) {
|
|
498
|
+
var owner = element._owner, stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
499
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
500
|
+
} else
|
|
501
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
502
|
+
}
|
|
503
|
+
var propTypesMisspellWarningShown;
|
|
504
|
+
propTypesMisspellWarningShown = !1;
|
|
505
|
+
function isValidElement(object) {
|
|
506
|
+
return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
507
|
+
}
|
|
508
|
+
function getDeclarationErrorAddendum() {
|
|
509
|
+
{
|
|
510
|
+
if (ReactCurrentOwner$1.current) {
|
|
511
|
+
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
512
|
+
if (name)
|
|
513
|
+
return `
|
|
514
|
+
|
|
515
|
+
Check the render method of \`` + name + "`.";
|
|
516
|
+
}
|
|
517
|
+
return "";
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
function getSourceInfoErrorAddendum(source) {
|
|
521
|
+
return "";
|
|
522
|
+
}
|
|
523
|
+
var ownerHasKeyUseWarning = {};
|
|
524
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
525
|
+
{
|
|
526
|
+
var info = getDeclarationErrorAddendum();
|
|
527
|
+
if (!info) {
|
|
528
|
+
var parentName = typeof parentType == "string" ? parentType : parentType.displayName || parentType.name;
|
|
529
|
+
parentName && (info = `
|
|
530
|
+
|
|
531
|
+
Check the top-level render call using <` + parentName + ">.");
|
|
532
|
+
}
|
|
533
|
+
return info;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
function validateExplicitKey(element, parentType) {
|
|
537
|
+
{
|
|
538
|
+
if (!element._store || element._store.validated || element.key != null)
|
|
539
|
+
return;
|
|
540
|
+
element._store.validated = !0;
|
|
541
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
542
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo])
|
|
543
|
+
return;
|
|
544
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = !0;
|
|
545
|
+
var childOwner = "";
|
|
546
|
+
element && element._owner && element._owner !== ReactCurrentOwner$1.current && (childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."), setCurrentlyValidatingElement$1(element), error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner), setCurrentlyValidatingElement$1(null);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
function validateChildKeys(node, parentType) {
|
|
550
|
+
{
|
|
551
|
+
if (typeof node != "object")
|
|
552
|
+
return;
|
|
553
|
+
if (isArray(node))
|
|
554
|
+
for (var i = 0; i < node.length; i++) {
|
|
555
|
+
var child = node[i];
|
|
556
|
+
isValidElement(child) && validateExplicitKey(child, parentType);
|
|
557
|
+
}
|
|
558
|
+
else if (isValidElement(node))
|
|
559
|
+
node._store && (node._store.validated = !0);
|
|
560
|
+
else if (node) {
|
|
561
|
+
var iteratorFn = getIteratorFn(node);
|
|
562
|
+
if (typeof iteratorFn == "function" && iteratorFn !== node.entries)
|
|
563
|
+
for (var iterator = iteratorFn.call(node), step; !(step = iterator.next()).done; )
|
|
564
|
+
isValidElement(step.value) && validateExplicitKey(step.value, parentType);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
function validatePropTypes(element) {
|
|
569
|
+
{
|
|
570
|
+
var type = element.type;
|
|
571
|
+
if (type == null || typeof type == "string")
|
|
572
|
+
return;
|
|
573
|
+
var propTypes;
|
|
574
|
+
if (typeof type == "function")
|
|
575
|
+
propTypes = type.propTypes;
|
|
576
|
+
else if (typeof type == "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
577
|
+
// Inner props are checked in the reconciler.
|
|
578
|
+
type.$$typeof === REACT_MEMO_TYPE))
|
|
579
|
+
propTypes = type.propTypes;
|
|
580
|
+
else
|
|
581
|
+
return;
|
|
582
|
+
if (propTypes) {
|
|
583
|
+
var name = getComponentNameFromType(type);
|
|
584
|
+
checkPropTypes(propTypes, element.props, "prop", name, element);
|
|
585
|
+
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
586
|
+
propTypesMisspellWarningShown = !0;
|
|
587
|
+
var _name = getComponentNameFromType(type);
|
|
588
|
+
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
589
|
+
}
|
|
590
|
+
typeof type.getDefaultProps == "function" && !type.getDefaultProps.isReactClassApproved && error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
function validateFragmentProps(fragment) {
|
|
594
|
+
{
|
|
595
|
+
for (var keys = Object.keys(fragment.props), i = 0; i < keys.length; i++) {
|
|
596
|
+
var key = keys[i];
|
|
597
|
+
if (key !== "children" && key !== "key") {
|
|
598
|
+
setCurrentlyValidatingElement$1(fragment), error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key), setCurrentlyValidatingElement$1(null);
|
|
599
|
+
break;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
fragment.ref !== null && (setCurrentlyValidatingElement$1(fragment), error("Invalid attribute `ref` supplied to `React.Fragment`."), setCurrentlyValidatingElement$1(null));
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
var didWarnAboutKeySpread = {};
|
|
606
|
+
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
607
|
+
{
|
|
608
|
+
var validType = isValidElementType(type);
|
|
609
|
+
if (!validType) {
|
|
610
|
+
var info = "";
|
|
611
|
+
(type === void 0 || typeof type == "object" && type !== null && Object.keys(type).length === 0) && (info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
612
|
+
var sourceInfo = getSourceInfoErrorAddendum();
|
|
613
|
+
sourceInfo ? info += sourceInfo : info += getDeclarationErrorAddendum();
|
|
614
|
+
var typeString;
|
|
615
|
+
type === null ? typeString = "null" : isArray(type) ? typeString = "array" : type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE ? (typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", info = " Did you accidentally export a JSX literal instead of a component?") : typeString = typeof type, error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
616
|
+
}
|
|
617
|
+
var element = jsxDEV(type, props, key, source, self);
|
|
618
|
+
if (element == null)
|
|
619
|
+
return element;
|
|
620
|
+
if (validType) {
|
|
621
|
+
var children = props.children;
|
|
622
|
+
if (children !== void 0)
|
|
623
|
+
if (isStaticChildren)
|
|
624
|
+
if (isArray(children)) {
|
|
625
|
+
for (var i = 0; i < children.length; i++)
|
|
626
|
+
validateChildKeys(children[i], type);
|
|
627
|
+
Object.freeze && Object.freeze(children);
|
|
628
|
+
} else
|
|
629
|
+
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
630
|
+
else
|
|
631
|
+
validateChildKeys(children, type);
|
|
632
|
+
}
|
|
633
|
+
if (hasOwnProperty.call(props, "key")) {
|
|
634
|
+
var componentName = getComponentNameFromType(type), keys = Object.keys(props).filter(function(k) {
|
|
635
|
+
return k !== "key";
|
|
636
|
+
}), beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
637
|
+
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
638
|
+
var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
|
|
639
|
+
error(`A props object containing a "key" prop is being spread into JSX:
|
|
640
|
+
let props = %s;
|
|
641
|
+
<%s {...props} />
|
|
642
|
+
React keys must be passed directly to JSX without using spread:
|
|
643
|
+
let props = %s;
|
|
644
|
+
<%s key={someKey} {...props} />`, beforeExample, componentName, afterExample, componentName), didWarnAboutKeySpread[componentName + beforeExample] = !0;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
return type === REACT_FRAGMENT_TYPE ? validateFragmentProps(element) : validatePropTypes(element), element;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
function jsxWithValidationStatic(type, props, key) {
|
|
651
|
+
return jsxWithValidation(type, props, key, !0);
|
|
652
|
+
}
|
|
653
|
+
function jsxWithValidationDynamic(type, props, key) {
|
|
654
|
+
return jsxWithValidation(type, props, key, !1);
|
|
655
|
+
}
|
|
656
|
+
var jsx = jsxWithValidationDynamic, jsxs = jsxWithValidationStatic;
|
|
657
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE, reactJsxRuntime_development.jsx = jsx, reactJsxRuntime_development.jsxs = jsxs;
|
|
658
|
+
}()), reactJsxRuntime_development;
|
|
659
|
+
}
|
|
660
|
+
var hasRequiredJsxRuntime;
|
|
661
|
+
function requireJsxRuntime() {
|
|
662
|
+
return hasRequiredJsxRuntime || (hasRequiredJsxRuntime = 1, process.env.NODE_ENV === "production" ? jsxRuntime.exports = requireReactJsxRuntime_production_min() : jsxRuntime.exports = requireReactJsxRuntime_development()), jsxRuntime.exports;
|
|
663
|
+
}
|
|
664
|
+
var jsxRuntimeExports = requireJsxRuntime();
|
|
665
|
+
function r(e) {
|
|
666
|
+
var t, f, n = "";
|
|
667
|
+
if (typeof e == "string" || typeof e == "number") n += e;
|
|
668
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
669
|
+
var o = e.length;
|
|
670
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
671
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
672
|
+
return n;
|
|
749
673
|
}
|
|
750
674
|
function clsx() {
|
|
751
|
-
for (var
|
|
752
|
-
return
|
|
675
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
676
|
+
return n;
|
|
753
677
|
}
|
|
754
678
|
function getColSpan(column, lastFrozenColumnIndex, args) {
|
|
755
679
|
const colSpan = typeof column.colSpan == "function" ? column.colSpan(args) : 1;
|
|
@@ -779,8 +703,8 @@ function createCellEvent(event) {
|
|
|
779
703
|
return Object.setPrototypeOf(cellEvent, Object.getPrototypeOf(event)), cellEvent;
|
|
780
704
|
}
|
|
781
705
|
const nonInputKeys = /* @__PURE__ */ new Set(["Unidentified", "Alt", "AltGraph", "CapsLock", "Control", "Fn", "FnLock", "Meta", "NumLock", "ScrollLock", "Shift", "Tab", "ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp", "End", "Home", "PageDown", "PageUp", "Insert", "ContextMenu", "Escape", "Pause", "Play", "PrintScreen", "F1", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"]);
|
|
782
|
-
function isCtrlKeyHeldDown(
|
|
783
|
-
return (
|
|
706
|
+
function isCtrlKeyHeldDown(e) {
|
|
707
|
+
return (e.ctrlKey || e.metaKey) && e.key !== "Control";
|
|
784
708
|
}
|
|
785
709
|
function isDefaultCellInput(event) {
|
|
786
710
|
return isCtrlKeyHeldDown(event) && event.keyCode !== 86 ? !1 : !nonInputKeys.has(event.key);
|
|
@@ -799,7 +723,7 @@ function renderMeasuringCells(viewportColumns) {
|
|
|
799
723
|
idx,
|
|
800
724
|
minWidth,
|
|
801
725
|
maxWidth
|
|
802
|
-
}) => /* @__PURE__ */
|
|
726
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
803
727
|
className: measuringCellClassname,
|
|
804
728
|
style: {
|
|
805
729
|
gridColumnStart: idx + 1,
|
|
@@ -1000,10 +924,10 @@ function renderCheckbox({
|
|
|
1000
924
|
indeterminate,
|
|
1001
925
|
...props
|
|
1002
926
|
}) {
|
|
1003
|
-
function handleChange(
|
|
1004
|
-
onChange(
|
|
927
|
+
function handleChange(e) {
|
|
928
|
+
onChange(e.target.checked, e.nativeEvent.shiftKey);
|
|
1005
929
|
}
|
|
1006
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("input", {
|
|
1007
931
|
ref: (el) => {
|
|
1008
932
|
el && (el.indeterminate = indeterminate === !0);
|
|
1009
933
|
},
|
|
@@ -1020,9 +944,9 @@ function renderValue(props) {
|
|
|
1020
944
|
return null;
|
|
1021
945
|
}
|
|
1022
946
|
}
|
|
1023
|
-
const DataGridDefaultRenderersContext = /* @__PURE__ */
|
|
947
|
+
const DataGridDefaultRenderersContext = /* @__PURE__ */ createContext(void 0), DataGridDefaultRenderersProvider = DataGridDefaultRenderersContext.Provider;
|
|
1024
948
|
function useDefaultRenderers() {
|
|
1025
|
-
return
|
|
949
|
+
return useContext(DataGridDefaultRenderersContext);
|
|
1026
950
|
}
|
|
1027
951
|
function SelectCellFormatter({
|
|
1028
952
|
value,
|
|
@@ -1044,9 +968,9 @@ function SelectCellFormatter({
|
|
|
1044
968
|
onChange
|
|
1045
969
|
});
|
|
1046
970
|
}
|
|
1047
|
-
const RowSelectionContext = /* @__PURE__ */
|
|
971
|
+
const RowSelectionContext = /* @__PURE__ */ createContext(void 0), RowSelectionProvider = RowSelectionContext.Provider, RowSelectionChangeContext = /* @__PURE__ */ createContext(void 0), RowSelectionChangeProvider = RowSelectionChangeContext.Provider;
|
|
1048
972
|
function useRowSelection() {
|
|
1049
|
-
const rowSelectionContext =
|
|
973
|
+
const rowSelectionContext = useContext(RowSelectionContext), rowSelectionChangeContext = useContext(RowSelectionChangeContext);
|
|
1050
974
|
if (rowSelectionContext === void 0 || rowSelectionChangeContext === void 0)
|
|
1051
975
|
throw new Error("useRowSelection must be used within DataGrid cells");
|
|
1052
976
|
return {
|
|
@@ -1055,9 +979,9 @@ function useRowSelection() {
|
|
|
1055
979
|
onRowSelectionChange: rowSelectionChangeContext
|
|
1056
980
|
};
|
|
1057
981
|
}
|
|
1058
|
-
const HeaderRowSelectionContext = /* @__PURE__ */
|
|
982
|
+
const HeaderRowSelectionContext = /* @__PURE__ */ createContext(void 0), HeaderRowSelectionProvider = HeaderRowSelectionContext.Provider, HeaderRowSelectionChangeContext = /* @__PURE__ */ createContext(void 0), HeaderRowSelectionChangeProvider = HeaderRowSelectionChangeContext.Provider;
|
|
1059
983
|
function useHeaderRowSelection() {
|
|
1060
|
-
const headerRowSelectionContext =
|
|
984
|
+
const headerRowSelectionContext = useContext(HeaderRowSelectionContext), headerRowSelectionChangeContext = useContext(HeaderRowSelectionChangeContext);
|
|
1061
985
|
if (headerRowSelectionContext === void 0 || headerRowSelectionChangeContext === void 0)
|
|
1062
986
|
throw new Error("useHeaderRowSelection must be used within DataGrid cells");
|
|
1063
987
|
return {
|
|
@@ -1073,7 +997,7 @@ function HeaderRenderer(props) {
|
|
|
1073
997
|
isRowSelected,
|
|
1074
998
|
onRowSelectionChange
|
|
1075
999
|
} = useHeaderRowSelection();
|
|
1076
|
-
return /* @__PURE__ */
|
|
1000
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SelectCellFormatter, {
|
|
1077
1001
|
"aria-label": "Select All",
|
|
1078
1002
|
tabIndex: props.tabIndex,
|
|
1079
1003
|
indeterminate: isIndeterminate,
|
|
@@ -1091,7 +1015,7 @@ function SelectFormatter(props) {
|
|
|
1091
1015
|
isRowSelected,
|
|
1092
1016
|
onRowSelectionChange
|
|
1093
1017
|
} = useRowSelection();
|
|
1094
|
-
return /* @__PURE__ */
|
|
1018
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SelectCellFormatter, {
|
|
1095
1019
|
"aria-label": "Select",
|
|
1096
1020
|
tabIndex: props.tabIndex,
|
|
1097
1021
|
disabled: isRowSelectionDisabled,
|
|
@@ -1110,7 +1034,7 @@ function SelectGroupFormatter(props) {
|
|
|
1110
1034
|
isRowSelected,
|
|
1111
1035
|
onRowSelectionChange
|
|
1112
1036
|
} = useRowSelection();
|
|
1113
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SelectCellFormatter, {
|
|
1114
1038
|
"aria-label": "Select Group",
|
|
1115
1039
|
tabIndex: props.tabIndex,
|
|
1116
1040
|
value: isRowSelected,
|
|
@@ -1133,17 +1057,17 @@ const SelectColumn = {
|
|
|
1133
1057
|
sortable: !1,
|
|
1134
1058
|
frozen: !0,
|
|
1135
1059
|
renderHeaderCell(props) {
|
|
1136
|
-
return /* @__PURE__ */
|
|
1060
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderRenderer, {
|
|
1137
1061
|
...props
|
|
1138
1062
|
});
|
|
1139
1063
|
},
|
|
1140
1064
|
renderCell(props) {
|
|
1141
|
-
return /* @__PURE__ */
|
|
1065
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SelectFormatter, {
|
|
1142
1066
|
...props
|
|
1143
1067
|
});
|
|
1144
1068
|
},
|
|
1145
1069
|
renderGroupCell(props) {
|
|
1146
|
-
return /* @__PURE__ */
|
|
1070
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SelectGroupFormatter, {
|
|
1147
1071
|
...props
|
|
1148
1072
|
});
|
|
1149
1073
|
}
|
|
@@ -1161,7 +1085,7 @@ function useCalculatedColumns({
|
|
|
1161
1085
|
colSpanColumns,
|
|
1162
1086
|
lastFrozenColumnIndex,
|
|
1163
1087
|
headerRowsCount
|
|
1164
|
-
} =
|
|
1088
|
+
} = useMemo(() => {
|
|
1165
1089
|
let lastFrozenColumnIndex2 = -1, headerRowsCount2 = 1;
|
|
1166
1090
|
const columns2 = [];
|
|
1167
1091
|
collectColumns(rawColumns, 1);
|
|
@@ -1217,7 +1141,7 @@ function useCalculatedColumns({
|
|
|
1217
1141
|
layoutCssVars,
|
|
1218
1142
|
totalFrozenColumnWidth,
|
|
1219
1143
|
columnMetrics
|
|
1220
|
-
} =
|
|
1144
|
+
} = useMemo(() => {
|
|
1221
1145
|
const columnMetrics2 = /* @__PURE__ */ new Map();
|
|
1222
1146
|
let left = 0, totalFrozenColumnWidth2 = 0;
|
|
1223
1147
|
const templateColumns2 = [];
|
|
@@ -1233,8 +1157,8 @@ function useCalculatedColumns({
|
|
|
1233
1157
|
totalFrozenColumnWidth2 = columnMetric.left + columnMetric.width;
|
|
1234
1158
|
}
|
|
1235
1159
|
const layoutCssVars2 = {};
|
|
1236
|
-
for (let
|
|
1237
|
-
const column = columns[
|
|
1160
|
+
for (let i = 0; i <= lastFrozenColumnIndex; i++) {
|
|
1161
|
+
const column = columns[i];
|
|
1238
1162
|
layoutCssVars2[`--rdg-frozen-left-${column.idx}`] = `${columnMetrics2.get(column).left}px`;
|
|
1239
1163
|
}
|
|
1240
1164
|
return {
|
|
@@ -1243,7 +1167,7 @@ function useCalculatedColumns({
|
|
|
1243
1167
|
totalFrozenColumnWidth: totalFrozenColumnWidth2,
|
|
1244
1168
|
columnMetrics: columnMetrics2
|
|
1245
1169
|
};
|
|
1246
|
-
}, [getColumnWidth, columns, lastFrozenColumnIndex]), [colOverscanStartIdx, colOverscanEndIdx] =
|
|
1170
|
+
}, [getColumnWidth, columns, lastFrozenColumnIndex]), [colOverscanStartIdx, colOverscanEndIdx] = useMemo(() => {
|
|
1247
1171
|
if (!enableVirtualization)
|
|
1248
1172
|
return [0, columns.length - 1];
|
|
1249
1173
|
const viewportLeft = scrollLeft + totalFrozenColumnWidth, viewportRight = scrollLeft + viewportWidth, lastColIdx = columns.length - 1, firstUnfrozenColumnIdx = min(lastFrozenColumnIndex + 1, lastColIdx);
|
|
@@ -1292,9 +1216,9 @@ function updateColumnParent(column, index, level) {
|
|
|
1292
1216
|
parent.idx === -1 && (parent.idx = index), parent.colSpan += 1, updateColumnParent(parent, index, level - 1);
|
|
1293
1217
|
}
|
|
1294
1218
|
}
|
|
1295
|
-
const useLayoutEffect = typeof window > "u" ?
|
|
1219
|
+
const useLayoutEffect = typeof window > "u" ? useEffect : useLayoutEffect$1;
|
|
1296
1220
|
function useColumnWidths(columns, viewportColumns, templateColumns, gridRef, gridWidth, resizedColumnWidths, measuredColumnWidths, setResizedColumnWidths, setMeasuredColumnWidths, onColumnResize) {
|
|
1297
|
-
const prevGridWidthRef =
|
|
1221
|
+
const prevGridWidthRef = useRef(gridWidth), columnsCanFlex = columns.length === viewportColumns.length, ignorePreviouslyMeasuredColumns = columnsCanFlex && gridWidth !== prevGridWidthRef.current, newTemplateColumns = [...templateColumns], columnsToMeasure = [];
|
|
1298
1222
|
for (const {
|
|
1299
1223
|
key,
|
|
1300
1224
|
idx,
|
|
@@ -1331,7 +1255,7 @@ function useColumnWidths(columns, viewportColumns, templateColumns, gridRef, gri
|
|
|
1331
1255
|
} else columnsCanFlex && typeof width == "string" && !resizedColumnWidths.has(key) && (newTemplateColumns2[idx] = width, columnsToMeasure2.push(key));
|
|
1332
1256
|
gridRef.current.style.gridTemplateColumns = newTemplateColumns2.join(" ");
|
|
1333
1257
|
const measuredWidth = typeof nextWidth == "number" ? nextWidth : measureColumnWidth(gridRef, resizingKey);
|
|
1334
|
-
|
|
1258
|
+
flushSync(() => {
|
|
1335
1259
|
setResizedColumnWidths((resizedColumnWidths2) => {
|
|
1336
1260
|
const newResizedColumnWidths = new Map(resizedColumnWidths2);
|
|
1337
1261
|
return newResizedColumnWidths.set(resizingKey, measuredWidth), newResizedColumnWidths;
|
|
@@ -1349,7 +1273,7 @@ function measureColumnWidth(gridRef, key) {
|
|
|
1349
1273
|
return measuringCell == null ? void 0 : measuringCell.getBoundingClientRect().width;
|
|
1350
1274
|
}
|
|
1351
1275
|
function useGridDimensions() {
|
|
1352
|
-
const gridRef =
|
|
1276
|
+
const gridRef = useRef(null), [inlineSize, setInlineSize] = useState(1), [blockSize, setBlockSize] = useState(1), [horizontalScrollbarHeight, setHorizontalScrollbarHeight] = useState(0);
|
|
1353
1277
|
return useLayoutEffect(() => {
|
|
1354
1278
|
const {
|
|
1355
1279
|
ResizeObserver
|
|
@@ -1370,7 +1294,7 @@ function useGridDimensions() {
|
|
|
1370
1294
|
clientHeight: clientHeight2,
|
|
1371
1295
|
offsetHeight: offsetHeight2
|
|
1372
1296
|
} = gridRef.current;
|
|
1373
|
-
|
|
1297
|
+
flushSync(() => {
|
|
1374
1298
|
setInlineSize(size.inlineSize), setBlockSize(size.blockSize), setHorizontalScrollbarHeight(offsetHeight2 - clientHeight2);
|
|
1375
1299
|
});
|
|
1376
1300
|
});
|
|
@@ -1379,18 +1303,18 @@ function useGridDimensions() {
|
|
|
1379
1303
|
};
|
|
1380
1304
|
}, []), [gridRef, inlineSize, blockSize, horizontalScrollbarHeight];
|
|
1381
1305
|
}
|
|
1382
|
-
function useLatestFunc(
|
|
1383
|
-
const ref =
|
|
1384
|
-
|
|
1385
|
-
ref.current =
|
|
1306
|
+
function useLatestFunc(fn) {
|
|
1307
|
+
const ref = useRef(fn);
|
|
1308
|
+
useEffect(() => {
|
|
1309
|
+
ref.current = fn;
|
|
1386
1310
|
});
|
|
1387
|
-
const callbackFn =
|
|
1311
|
+
const callbackFn = useCallback((...args) => {
|
|
1388
1312
|
ref.current(...args);
|
|
1389
1313
|
}, []);
|
|
1390
|
-
return
|
|
1314
|
+
return fn && callbackFn;
|
|
1391
1315
|
}
|
|
1392
1316
|
function useRovingTabIndex(isSelected) {
|
|
1393
|
-
const [isChildFocused, setIsChildFocused] =
|
|
1317
|
+
const [isChildFocused, setIsChildFocused] = useState(!1);
|
|
1394
1318
|
isChildFocused && !isSelected && setIsChildFocused(!1);
|
|
1395
1319
|
function onFocus(event) {
|
|
1396
1320
|
event.target !== event.currentTarget && setIsChildFocused(!0);
|
|
@@ -1413,7 +1337,7 @@ function useViewportColumns({
|
|
|
1413
1337
|
rowOverscanStartIdx,
|
|
1414
1338
|
rowOverscanEndIdx
|
|
1415
1339
|
}) {
|
|
1416
|
-
const startIdx =
|
|
1340
|
+
const startIdx = useMemo(() => {
|
|
1417
1341
|
if (colOverscanStartIdx === 0) return 0;
|
|
1418
1342
|
let startIdx2 = colOverscanStartIdx;
|
|
1419
1343
|
const updateStartIdx = (colIdx, colSpan) => colSpan !== void 0 && colIdx + colSpan > colOverscanStartIdx ? (startIdx2 = colIdx, !0) : !1;
|
|
@@ -1450,7 +1374,7 @@ function useViewportColumns({
|
|
|
1450
1374
|
}
|
|
1451
1375
|
return startIdx2;
|
|
1452
1376
|
}, [rowOverscanStartIdx, rowOverscanEndIdx, rows, topSummaryRows, bottomSummaryRows, colOverscanStartIdx, lastFrozenColumnIndex, colSpanColumns]);
|
|
1453
|
-
return
|
|
1377
|
+
return useMemo(() => {
|
|
1454
1378
|
const viewportColumns = [];
|
|
1455
1379
|
for (let colIdx = 0; colIdx <= colOverscanEndIdx; colIdx++) {
|
|
1456
1380
|
const column = columns[colIdx];
|
|
@@ -1472,7 +1396,7 @@ function useViewportRows({
|
|
|
1472
1396
|
getRowTop,
|
|
1473
1397
|
getRowHeight,
|
|
1474
1398
|
findRowIdx
|
|
1475
|
-
} =
|
|
1399
|
+
} = useMemo(() => {
|
|
1476
1400
|
if (typeof rowHeight == "number")
|
|
1477
1401
|
return {
|
|
1478
1402
|
totalRowHeight: rowHeight * rows.length,
|
|
@@ -1562,17 +1486,17 @@ function DragHandle({
|
|
|
1562
1486
|
}
|
|
1563
1487
|
function updateRows(startRowIdx, endRowIdx) {
|
|
1564
1488
|
const sourceRow = rows[rowIdx], updatedRows = [...rows], indexes = [];
|
|
1565
|
-
for (let
|
|
1489
|
+
for (let i = startRowIdx; i < endRowIdx; i++)
|
|
1566
1490
|
if (isCellEditable({
|
|
1567
|
-
rowIdx:
|
|
1491
|
+
rowIdx: i,
|
|
1568
1492
|
idx
|
|
1569
1493
|
})) {
|
|
1570
1494
|
const updatedRow = onFill({
|
|
1571
1495
|
columnKey: column.key,
|
|
1572
1496
|
sourceRow,
|
|
1573
|
-
targetRow: rows[
|
|
1497
|
+
targetRow: rows[i]
|
|
1574
1498
|
});
|
|
1575
|
-
updatedRow !== rows[
|
|
1499
|
+
updatedRow !== rows[i] && (updatedRows[i] = updatedRow, indexes.push(i));
|
|
1576
1500
|
}
|
|
1577
1501
|
indexes.length > 0 && (onRowsChange == null || onRowsChange(updatedRows, {
|
|
1578
1502
|
indexes,
|
|
@@ -1596,7 +1520,7 @@ function DragHandle({
|
|
|
1596
1520
|
insetInlineStart: insetInlineStart ? `calc(${insetInlineStart} + ${columnWidth}px + var(--rdg-drag-handle-size) * -0.5 - 1px)` : void 0
|
|
1597
1521
|
};
|
|
1598
1522
|
}
|
|
1599
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
1600
1524
|
style: getStyle(),
|
|
1601
1525
|
className: clsx(cellDragHandleClassname, column.frozen && cellDragHandleFrozenClassname),
|
|
1602
1526
|
onClick,
|
|
@@ -1616,10 +1540,10 @@ function EditCell({
|
|
|
1616
1540
|
navigate
|
|
1617
1541
|
}) {
|
|
1618
1542
|
var _a, _b, _c;
|
|
1619
|
-
const frameRequestRef =
|
|
1543
|
+
const frameRequestRef = useRef(void 0), commitOnOutsideClick = ((_a = column.editorOptions) == null ? void 0 : _a.commitOnOutsideClick) !== !1, commitOnOutsideMouseDown = useLatestFunc(() => {
|
|
1620
1544
|
onClose(!0, !1);
|
|
1621
1545
|
});
|
|
1622
|
-
|
|
1546
|
+
useEffect(() => {
|
|
1623
1547
|
if (!commitOnOutsideClick) return;
|
|
1624
1548
|
function onWindowCaptureMouseDown() {
|
|
1625
1549
|
frameRequestRef.current = requestAnimationFrame(commitOnOutsideMouseDown);
|
|
@@ -1660,7 +1584,7 @@ function EditCell({
|
|
|
1660
1584
|
const {
|
|
1661
1585
|
cellClass
|
|
1662
1586
|
} = column, className = getCellClassname(column, "rdg-editor-container", typeof cellClass == "function" ? cellClass(row2) : cellClass, !((_b = column.editorOptions) != null && _b.displayCellContent) && cellEditing);
|
|
1663
|
-
return /* @__PURE__ */
|
|
1587
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
1664
1588
|
role: "gridcell",
|
|
1665
1589
|
"aria-colindex": column.idx + 1,
|
|
1666
1590
|
"aria-colspan": colSpan,
|
|
@@ -1669,7 +1593,7 @@ function EditCell({
|
|
|
1669
1593
|
style: getCellStyle(column, colSpan),
|
|
1670
1594
|
onKeyDown: handleKeyDown,
|
|
1671
1595
|
onMouseDownCapture: cancelFrameRequest,
|
|
1672
|
-
children: column.renderEditCell != null && /* @__PURE__ */
|
|
1596
|
+
children: column.renderEditCell != null && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
1673
1597
|
children: [column.renderEditCell({
|
|
1674
1598
|
column,
|
|
1675
1599
|
row: row2,
|
|
@@ -1705,7 +1629,7 @@ function GroupedColumnHeaderCell({
|
|
|
1705
1629
|
rowIdx
|
|
1706
1630
|
});
|
|
1707
1631
|
}
|
|
1708
|
-
return /* @__PURE__ */
|
|
1632
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
1709
1633
|
role: "columnheader",
|
|
1710
1634
|
"aria-colindex": index,
|
|
1711
1635
|
"aria-colspan": colSpan,
|
|
@@ -1729,7 +1653,7 @@ function renderHeaderCell({
|
|
|
1729
1653
|
sortDirection,
|
|
1730
1654
|
priority
|
|
1731
1655
|
}) {
|
|
1732
|
-
return column.sortable ? /* @__PURE__ */
|
|
1656
|
+
return column.sortable ? /* @__PURE__ */ jsxRuntimeExports.jsx(SortableHeaderCell, {
|
|
1733
1657
|
sortDirection,
|
|
1734
1658
|
priority,
|
|
1735
1659
|
children: column.name
|
|
@@ -1741,12 +1665,12 @@ function SortableHeaderCell({
|
|
|
1741
1665
|
children
|
|
1742
1666
|
}) {
|
|
1743
1667
|
const renderSortStatus2 = useDefaultRenderers().renderSortStatus;
|
|
1744
|
-
return /* @__PURE__ */
|
|
1668
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
1745
1669
|
className: headerSortCellClassname,
|
|
1746
|
-
children: [/* @__PURE__ */
|
|
1670
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
1747
1671
|
className: headerSortNameClassname,
|
|
1748
1672
|
children
|
|
1749
|
-
}), /* @__PURE__ */
|
|
1673
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
1750
1674
|
children: renderSortStatus2({
|
|
1751
1675
|
sortDirection,
|
|
1752
1676
|
priority
|
|
@@ -1769,7 +1693,7 @@ function HeaderCell({
|
|
|
1769
1693
|
direction,
|
|
1770
1694
|
dragDropKey
|
|
1771
1695
|
}) {
|
|
1772
|
-
const [isDragging, setIsDragging] =
|
|
1696
|
+
const [isDragging, setIsDragging] = useState(!1), [isOver, setIsOver] = useState(!1), isRtl = direction === "rtl", rowSpan = getHeaderCellRowSpan(column, rowIdx), {
|
|
1773
1697
|
tabIndex,
|
|
1774
1698
|
childTabIndex,
|
|
1775
1699
|
onFocus
|
|
@@ -1875,7 +1799,7 @@ function HeaderCell({
|
|
|
1875
1799
|
onDragEnter,
|
|
1876
1800
|
onDragLeave,
|
|
1877
1801
|
onDrop
|
|
1878
|
-
}), /* @__PURE__ */
|
|
1802
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
1879
1803
|
role: "columnheader",
|
|
1880
1804
|
"aria-colindex": column.idx + 1,
|
|
1881
1805
|
"aria-colspan": colSpan,
|
|
@@ -1897,7 +1821,7 @@ function HeaderCell({
|
|
|
1897
1821
|
sortDirection,
|
|
1898
1822
|
priority,
|
|
1899
1823
|
tabIndex: childTabIndex
|
|
1900
|
-
}), resizable && /* @__PURE__ */
|
|
1824
|
+
}), resizable && /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
1901
1825
|
className: resizeHandleClassname,
|
|
1902
1826
|
onClick: stopPropagation,
|
|
1903
1827
|
onPointerDown
|
|
@@ -1922,12 +1846,12 @@ function HeaderRow({
|
|
|
1922
1846
|
shouldFocusGrid,
|
|
1923
1847
|
direction
|
|
1924
1848
|
}) {
|
|
1925
|
-
const dragDropKey =
|
|
1849
|
+
const dragDropKey = useId(), cells = [];
|
|
1926
1850
|
for (let index = 0; index < columns.length; index++) {
|
|
1927
1851
|
const column = columns[index], colSpan = getColSpan(column, lastFrozenColumnIndex, {
|
|
1928
1852
|
type: "HEADER"
|
|
1929
1853
|
});
|
|
1930
|
-
colSpan !== void 0 && (index += colSpan - 1), cells.push(/* @__PURE__ */
|
|
1854
|
+
colSpan !== void 0 && (index += colSpan - 1), cells.push(/* @__PURE__ */ jsxRuntimeExports.jsx(HeaderCell, {
|
|
1931
1855
|
column,
|
|
1932
1856
|
colSpan,
|
|
1933
1857
|
rowIdx,
|
|
@@ -1942,14 +1866,14 @@ function HeaderRow({
|
|
|
1942
1866
|
dragDropKey
|
|
1943
1867
|
}, column.key));
|
|
1944
1868
|
}
|
|
1945
|
-
return /* @__PURE__ */
|
|
1869
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
1946
1870
|
role: "row",
|
|
1947
1871
|
"aria-rowindex": rowIdx,
|
|
1948
1872
|
className: clsx(headerRowClassname, selectedCellIdx === -1 && rowSelectedClassname),
|
|
1949
1873
|
children: cells
|
|
1950
1874
|
});
|
|
1951
1875
|
}
|
|
1952
|
-
const HeaderRow$1 = /* @__PURE__ */
|
|
1876
|
+
const HeaderRow$1 = /* @__PURE__ */ memo(HeaderRow);
|
|
1953
1877
|
function GroupedColumnHeaderRow({
|
|
1954
1878
|
rowIdx,
|
|
1955
1879
|
level,
|
|
@@ -1970,7 +1894,7 @@ function GroupedColumnHeaderRow({
|
|
|
1970
1894
|
const {
|
|
1971
1895
|
idx
|
|
1972
1896
|
} = parent;
|
|
1973
|
-
cells.push(/* @__PURE__ */
|
|
1897
|
+
cells.push(/* @__PURE__ */ jsxRuntimeExports.jsx(GroupedColumnHeaderCell, {
|
|
1974
1898
|
column: parent,
|
|
1975
1899
|
rowIdx,
|
|
1976
1900
|
isCellSelected: selectedCellIdx === idx,
|
|
@@ -1979,14 +1903,14 @@ function GroupedColumnHeaderRow({
|
|
|
1979
1903
|
}
|
|
1980
1904
|
}
|
|
1981
1905
|
}
|
|
1982
|
-
return /* @__PURE__ */
|
|
1906
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
1983
1907
|
role: "row",
|
|
1984
1908
|
"aria-rowindex": rowIdx,
|
|
1985
1909
|
className: headerRowClassname,
|
|
1986
1910
|
children: cells
|
|
1987
1911
|
});
|
|
1988
1912
|
}
|
|
1989
|
-
const GroupedColumnHeaderRow$1 = /* @__PURE__ */
|
|
1913
|
+
const GroupedColumnHeaderRow$1 = /* @__PURE__ */ memo(GroupedColumnHeaderRow), cellCopied = "c6ra8a37-0-0-beta-47", cellCopiedClassname = `rdg-cell-copied ${cellCopied}`, cellDraggedOver = "cq910m07-0-0-beta-47", cellDraggedOverClassname = `rdg-cell-dragged-over ${cellDraggedOver}`;
|
|
1990
1914
|
function Cell({
|
|
1991
1915
|
column,
|
|
1992
1916
|
colSpan,
|
|
@@ -2051,7 +1975,7 @@ function Cell({
|
|
|
2051
1975
|
function handleRowChange(newRow) {
|
|
2052
1976
|
onRowChange(column, newRow);
|
|
2053
1977
|
}
|
|
2054
|
-
return /* @__PURE__ */
|
|
1978
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
2055
1979
|
role: "gridcell",
|
|
2056
1980
|
"aria-colindex": column.idx + 1,
|
|
2057
1981
|
"aria-colspan": colSpan,
|
|
@@ -2075,7 +1999,7 @@ function Cell({
|
|
|
2075
1999
|
})
|
|
2076
2000
|
});
|
|
2077
2001
|
}
|
|
2078
|
-
const Cell$1 = /* @__PURE__ */
|
|
2002
|
+
const Cell$1 = /* @__PURE__ */ memo(Cell);
|
|
2079
2003
|
function Row({
|
|
2080
2004
|
className,
|
|
2081
2005
|
rowIdx,
|
|
@@ -2116,7 +2040,7 @@ function Row({
|
|
|
2116
2040
|
});
|
|
2117
2041
|
colSpan !== void 0 && (index += colSpan - 1);
|
|
2118
2042
|
const isCellSelected = selectedCellIdx === idx;
|
|
2119
|
-
isCellSelected && selectedCellEditor ? cells.push(selectedCellEditor) : cells.push(/* @__PURE__ */
|
|
2043
|
+
isCellSelected && selectedCellEditor ? cells.push(selectedCellEditor) : cells.push(/* @__PURE__ */ jsxRuntimeExports.jsx(Cell$1, {
|
|
2120
2044
|
column,
|
|
2121
2045
|
colSpan,
|
|
2122
2046
|
row: row2,
|
|
@@ -2131,13 +2055,13 @@ function Row({
|
|
|
2131
2055
|
selectCell
|
|
2132
2056
|
}, column.key));
|
|
2133
2057
|
}
|
|
2134
|
-
const selectionValue =
|
|
2058
|
+
const selectionValue = useMemo(() => ({
|
|
2135
2059
|
isRowSelected,
|
|
2136
2060
|
isRowSelectionDisabled
|
|
2137
2061
|
}), [isRowSelectionDisabled, isRowSelected]);
|
|
2138
|
-
return /* @__PURE__ */
|
|
2062
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RowSelectionProvider, {
|
|
2139
2063
|
value: selectionValue,
|
|
2140
|
-
children: /* @__PURE__ */
|
|
2064
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
2141
2065
|
role: "row",
|
|
2142
2066
|
ref,
|
|
2143
2067
|
className,
|
|
@@ -2148,9 +2072,9 @@ function Row({
|
|
|
2148
2072
|
})
|
|
2149
2073
|
});
|
|
2150
2074
|
}
|
|
2151
|
-
const RowComponent = /* @__PURE__ */
|
|
2075
|
+
const RowComponent = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef(Row));
|
|
2152
2076
|
function defaultRenderRow(key, props) {
|
|
2153
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RowComponent, {
|
|
2154
2078
|
...props
|
|
2155
2079
|
}, key);
|
|
2156
2080
|
}
|
|
@@ -2162,7 +2086,7 @@ function ScrollToCell({
|
|
|
2162
2086
|
gridElement,
|
|
2163
2087
|
setScrollToCellPosition
|
|
2164
2088
|
}) {
|
|
2165
|
-
const ref =
|
|
2089
|
+
const ref = useRef(null);
|
|
2166
2090
|
return useLayoutEffect(() => {
|
|
2167
2091
|
scrollIntoView(ref.current);
|
|
2168
2092
|
}), useLayoutEffect(() => {
|
|
@@ -2176,7 +2100,7 @@ function ScrollToCell({
|
|
|
2176
2100
|
return observer.observe(ref.current), () => {
|
|
2177
2101
|
observer.disconnect();
|
|
2178
2102
|
};
|
|
2179
|
-
}, [gridElement, setScrollToCellPosition]), /* @__PURE__ */
|
|
2103
|
+
}, [gridElement, setScrollToCellPosition]), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
2180
2104
|
ref,
|
|
2181
2105
|
style: {
|
|
2182
2106
|
gridColumn: idx === void 0 ? "1/-1" : idx + 1,
|
|
@@ -2189,7 +2113,7 @@ function renderSortStatus({
|
|
|
2189
2113
|
sortDirection,
|
|
2190
2114
|
priority
|
|
2191
2115
|
}) {
|
|
2192
|
-
return /* @__PURE__ */
|
|
2116
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
2193
2117
|
children: [renderSortIcon({
|
|
2194
2118
|
sortDirection
|
|
2195
2119
|
}), renderSortPriority({
|
|
@@ -2200,13 +2124,13 @@ function renderSortStatus({
|
|
|
2200
2124
|
function renderSortIcon({
|
|
2201
2125
|
sortDirection
|
|
2202
2126
|
}) {
|
|
2203
|
-
return sortDirection === void 0 ? null : /* @__PURE__ */
|
|
2127
|
+
return sortDirection === void 0 ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("svg", {
|
|
2204
2128
|
viewBox: "0 0 12 8",
|
|
2205
2129
|
width: "12",
|
|
2206
2130
|
height: "8",
|
|
2207
2131
|
className: arrowClassname,
|
|
2208
2132
|
"aria-hidden": !0,
|
|
2209
|
-
children: /* @__PURE__ */
|
|
2133
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
2210
2134
|
d: sortDirection === "ASC" ? "M0 8 6 0 12 8" : "M0 0 6 8 12 0"
|
|
2211
2135
|
})
|
|
2212
2136
|
});
|
|
@@ -2239,7 +2163,7 @@ function SummaryCell({
|
|
|
2239
2163
|
idx: column.idx
|
|
2240
2164
|
});
|
|
2241
2165
|
}
|
|
2242
|
-
return /* @__PURE__ */
|
|
2166
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
2243
2167
|
role: "gridcell",
|
|
2244
2168
|
"aria-colindex": column.idx + 1,
|
|
2245
2169
|
"aria-colspan": colSpan,
|
|
@@ -2256,7 +2180,7 @@ function SummaryCell({
|
|
|
2256
2180
|
})
|
|
2257
2181
|
});
|
|
2258
2182
|
}
|
|
2259
|
-
const SummaryCell$1 = /* @__PURE__ */
|
|
2183
|
+
const SummaryCell$1 = /* @__PURE__ */ memo(SummaryCell), summaryRow = "skuhp557-0-0-beta-47", topSummaryRow = "tf8l5ub7-0-0-beta-47", summaryRowClassname = `rdg-summary-row ${summaryRow}`;
|
|
2260
2184
|
function SummaryRow({
|
|
2261
2185
|
rowIdx,
|
|
2262
2186
|
gridRowStart,
|
|
@@ -2278,7 +2202,7 @@ function SummaryRow({
|
|
|
2278
2202
|
});
|
|
2279
2203
|
colSpan !== void 0 && (index += colSpan - 1);
|
|
2280
2204
|
const isCellSelected = selectedCellIdx === column.idx;
|
|
2281
|
-
cells.push(/* @__PURE__ */
|
|
2205
|
+
cells.push(/* @__PURE__ */ jsxRuntimeExports.jsx(SummaryCell$1, {
|
|
2282
2206
|
column,
|
|
2283
2207
|
colSpan,
|
|
2284
2208
|
row: row2,
|
|
@@ -2287,7 +2211,7 @@ function SummaryRow({
|
|
|
2287
2211
|
selectCell
|
|
2288
2212
|
}, column.key));
|
|
2289
2213
|
}
|
|
2290
|
-
return /* @__PURE__ */
|
|
2214
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
2291
2215
|
role: "row",
|
|
2292
2216
|
"aria-rowindex": ariaRowIndex,
|
|
2293
2217
|
className: clsx(rowClassname, `rdg-row-${rowIdx % 2 === 0 ? "even" : "odd"}`, summaryRowClassname, isTop ? `${topSummaryRowClassname} ${topSummaryRow}` : bottomSummaryRowClassname, selectedCellIdx === -1 && rowSelectedClassname),
|
|
@@ -2299,7 +2223,7 @@ function SummaryRow({
|
|
|
2299
2223
|
children: cells
|
|
2300
2224
|
});
|
|
2301
2225
|
}
|
|
2302
|
-
const SummaryRow$1 = /* @__PURE__ */
|
|
2226
|
+
const SummaryRow$1 = /* @__PURE__ */ memo(SummaryRow);
|
|
2303
2227
|
function DataGrid(props, ref) {
|
|
2304
2228
|
const {
|
|
2305
2229
|
columns: rawColumns,
|
|
@@ -2340,7 +2264,7 @@ function DataGrid(props, ref) {
|
|
|
2340
2264
|
"aria-describedby": ariaDescribedBy,
|
|
2341
2265
|
"aria-rowcount": rawAriaRowCount,
|
|
2342
2266
|
"data-testid": testId
|
|
2343
|
-
} = props, defaultRenderers = useDefaultRenderers(), role = rawRole ?? "grid", rowHeight = rawRowHeight ?? 35, headerRowHeight = rawHeaderRowHeight ?? (typeof rowHeight == "number" ? rowHeight : 35), summaryRowHeight = rawSummaryRowHeight ?? (typeof rowHeight == "number" ? rowHeight : 35), renderRow = (renderers == null ? void 0 : renderers.renderRow) ?? (defaultRenderers == null ? void 0 : defaultRenderers.renderRow) ?? defaultRenderRow, renderSortStatus$1 = (renderers == null ? void 0 : renderers.renderSortStatus) ?? (defaultRenderers == null ? void 0 : defaultRenderers.renderSortStatus) ?? renderSortStatus, renderCheckbox$1 = (renderers == null ? void 0 : renderers.renderCheckbox) ?? (defaultRenderers == null ? void 0 : defaultRenderers.renderCheckbox) ?? renderCheckbox, noRowsFallback = (renderers == null ? void 0 : renderers.noRowsFallback) ?? (defaultRenderers == null ? void 0 : defaultRenderers.noRowsFallback), enableVirtualization = rawEnableVirtualization ?? !0, direction = rawDirection ?? "ltr", [scrollTop, setScrollTop] =
|
|
2267
|
+
} = props, defaultRenderers = useDefaultRenderers(), role = rawRole ?? "grid", rowHeight = rawRowHeight ?? 35, headerRowHeight = rawHeaderRowHeight ?? (typeof rowHeight == "number" ? rowHeight : 35), summaryRowHeight = rawSummaryRowHeight ?? (typeof rowHeight == "number" ? rowHeight : 35), renderRow = (renderers == null ? void 0 : renderers.renderRow) ?? (defaultRenderers == null ? void 0 : defaultRenderers.renderRow) ?? defaultRenderRow, renderSortStatus$1 = (renderers == null ? void 0 : renderers.renderSortStatus) ?? (defaultRenderers == null ? void 0 : defaultRenderers.renderSortStatus) ?? renderSortStatus, renderCheckbox$1 = (renderers == null ? void 0 : renderers.renderCheckbox) ?? (defaultRenderers == null ? void 0 : defaultRenderers.renderCheckbox) ?? renderCheckbox, noRowsFallback = (renderers == null ? void 0 : renderers.noRowsFallback) ?? (defaultRenderers == null ? void 0 : defaultRenderers.noRowsFallback), enableVirtualization = rawEnableVirtualization ?? !0, direction = rawDirection ?? "ltr", [scrollTop, setScrollTop] = useState(0), [scrollLeft, setScrollLeft] = useState(0), [resizedColumnWidths, setResizedColumnWidths] = useState(() => /* @__PURE__ */ new Map()), [measuredColumnWidths, setMeasuredColumnWidths] = useState(() => /* @__PURE__ */ new Map()), [copiedCell, setCopiedCell] = useState(null), [isDragging, setDragging] = useState(!1), [draggedOverRowIdx, setOverRowIdx] = useState(void 0), [scrollToPosition, setScrollToPosition] = useState(null), getColumnWidth = useCallback((column) => resizedColumnWidths.get(column.key) ?? measuredColumnWidths.get(column.key) ?? column.width, [measuredColumnWidths, resizedColumnWidths]), [gridRef, gridWidth, gridHeight, horizontalScrollbarHeight] = useGridDimensions(), {
|
|
2344
2268
|
columns,
|
|
2345
2269
|
colSpanColumns,
|
|
2346
2270
|
lastFrozenColumnIndex,
|
|
@@ -2357,14 +2281,14 @@ function DataGrid(props, ref) {
|
|
|
2357
2281
|
scrollLeft,
|
|
2358
2282
|
viewportWidth: gridWidth,
|
|
2359
2283
|
enableVirtualization
|
|
2360
|
-
}), topSummaryRowsCount = (topSummaryRows == null ? void 0 : topSummaryRows.length) ?? 0, bottomSummaryRowsCount = (bottomSummaryRows == null ? void 0 : bottomSummaryRows.length) ?? 0, summaryRowsCount = topSummaryRowsCount + bottomSummaryRowsCount, headerAndTopSummaryRowsCount = headerRowsCount + topSummaryRowsCount, groupedColumnHeaderRowsCount = headerRowsCount - 1, minRowIdx = -headerAndTopSummaryRowsCount, mainHeaderRowIdx = minRowIdx + groupedColumnHeaderRowsCount, maxRowIdx = rows.length + bottomSummaryRowsCount - 1, [selectedPosition, setSelectedPosition] =
|
|
2284
|
+
}), topSummaryRowsCount = (topSummaryRows == null ? void 0 : topSummaryRows.length) ?? 0, bottomSummaryRowsCount = (bottomSummaryRows == null ? void 0 : bottomSummaryRows.length) ?? 0, summaryRowsCount = topSummaryRowsCount + bottomSummaryRowsCount, headerAndTopSummaryRowsCount = headerRowsCount + topSummaryRowsCount, groupedColumnHeaderRowsCount = headerRowsCount - 1, minRowIdx = -headerAndTopSummaryRowsCount, mainHeaderRowIdx = minRowIdx + groupedColumnHeaderRowsCount, maxRowIdx = rows.length + bottomSummaryRowsCount - 1, [selectedPosition, setSelectedPosition] = useState(() => ({
|
|
2361
2285
|
idx: -1,
|
|
2362
2286
|
rowIdx: minRowIdx - 1,
|
|
2363
2287
|
mode: "SELECT"
|
|
2364
|
-
})), prevSelectedPosition =
|
|
2288
|
+
})), prevSelectedPosition = useRef(selectedPosition), latestDraggedOverRowIdx = useRef(draggedOverRowIdx), lastSelectedRowIdx = useRef(-1), focusSinkRef = useRef(null), shouldFocusCellRef = useRef(!1), isTreeGrid = role === "treegrid", headerRowsHeight = headerRowsCount * headerRowHeight, summaryRowsHeight = summaryRowsCount * summaryRowHeight, clientHeight = gridHeight - headerRowsHeight - summaryRowsHeight, isSelectable = selectedRows != null && onSelectedRowsChange != null, isRtl = direction === "rtl", leftKey = isRtl ? "ArrowRight" : "ArrowLeft", rightKey = isRtl ? "ArrowLeft" : "ArrowRight", ariaRowCount = rawAriaRowCount ?? headerRowsCount + rows.length + summaryRowsCount, defaultGridComponents = useMemo(() => ({
|
|
2365
2289
|
renderCheckbox: renderCheckbox$1,
|
|
2366
2290
|
renderSortStatus: renderSortStatus$1
|
|
2367
|
-
}), [renderCheckbox$1, renderSortStatus$1]), headerSelectionValue =
|
|
2291
|
+
}), [renderCheckbox$1, renderSortStatus$1]), headerSelectionValue = useMemo(() => {
|
|
2368
2292
|
let hasSelectedRow = !1, hasUnselectedRow = !1;
|
|
2369
2293
|
if (rowKeyGetter != null && selectedRows != null && selectedRows.size > 0) {
|
|
2370
2294
|
for (const row2 of rows)
|
|
@@ -2421,7 +2345,7 @@ function DataGrid(props, ref) {
|
|
|
2421
2345
|
}), scrollIntoView(focusSinkRef.current));
|
|
2422
2346
|
}), useLayoutEffect(() => {
|
|
2423
2347
|
shouldFocusCellRef.current && (shouldFocusCellRef.current = !1, focusCellOrCellContent());
|
|
2424
|
-
}),
|
|
2348
|
+
}), useImperativeHandle(ref, () => ({
|
|
2425
2349
|
element: gridRef.current,
|
|
2426
2350
|
scrollToCell({
|
|
2427
2351
|
idx,
|
|
@@ -2435,7 +2359,7 @@ function DataGrid(props, ref) {
|
|
|
2435
2359
|
},
|
|
2436
2360
|
selectCell
|
|
2437
2361
|
}));
|
|
2438
|
-
const setDraggedOverRowIdx =
|
|
2362
|
+
const setDraggedOverRowIdx = useCallback((rowIdx) => {
|
|
2439
2363
|
setOverRowIdx(rowIdx), latestDraggedOverRowIdx.current = rowIdx;
|
|
2440
2364
|
}, []);
|
|
2441
2365
|
function selectHeaderRow(args) {
|
|
@@ -2461,8 +2385,8 @@ function DataGrid(props, ref) {
|
|
|
2461
2385
|
const newSelectedRows = new Set(selectedRows), rowKey = rowKeyGetter(row2), previousRowIdx = lastSelectedRowIdx.current, rowIdx = rows.indexOf(row2);
|
|
2462
2386
|
if (lastSelectedRowIdx.current = rowIdx, checked ? newSelectedRows.add(rowKey) : newSelectedRows.delete(rowKey), isShiftClick && previousRowIdx !== -1 && previousRowIdx !== rowIdx && previousRowIdx < rows.length) {
|
|
2463
2387
|
const step = sign(rowIdx - previousRowIdx);
|
|
2464
|
-
for (let
|
|
2465
|
-
const row3 = rows[
|
|
2388
|
+
for (let i = previousRowIdx + step; i !== rowIdx; i += step) {
|
|
2389
|
+
const row3 = rows[i];
|
|
2466
2390
|
(isRowSelectionDisabled == null ? void 0 : isRowSelectionDisabled(row3)) !== !0 && (checked ? newSelectedRows.add(rowKeyGetter(row3)) : newSelectedRows.delete(rowKeyGetter(row3)));
|
|
2467
2391
|
}
|
|
2468
2392
|
}
|
|
@@ -2528,7 +2452,7 @@ function DataGrid(props, ref) {
|
|
|
2528
2452
|
scrollTop: scrollTop2,
|
|
2529
2453
|
scrollLeft: scrollLeft2
|
|
2530
2454
|
} = event.currentTarget;
|
|
2531
|
-
|
|
2455
|
+
flushSync(() => {
|
|
2532
2456
|
setScrollTop(scrollTop2), setScrollLeft(abs(scrollLeft2));
|
|
2533
2457
|
}), onScroll == null || onScroll(event);
|
|
2534
2458
|
}
|
|
@@ -2778,7 +2702,7 @@ function DataGrid(props, ref) {
|
|
|
2778
2702
|
if (column.renderEditCell == null || column.editable === !1)
|
|
2779
2703
|
return;
|
|
2780
2704
|
const columnWidth = getColumnWidth(column);
|
|
2781
|
-
return /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(DragHandle, {
|
|
2782
2706
|
gridRowStart: headerAndTopSummaryRowsCount + rowIdx + 1,
|
|
2783
2707
|
rows,
|
|
2784
2708
|
column,
|
|
@@ -2813,14 +2737,14 @@ function DataGrid(props, ref) {
|
|
|
2813
2737
|
mode: "SELECT"
|
|
2814
2738
|
}));
|
|
2815
2739
|
}, onRowChange = (row3, commitChanges, shouldFocusCell) => {
|
|
2816
|
-
commitChanges ?
|
|
2740
|
+
commitChanges ? flushSync(() => {
|
|
2817
2741
|
updateRow(column, selectedPosition.rowIdx, row3), closeEditor(shouldFocusCell);
|
|
2818
2742
|
}) : setSelectedPosition((position) => ({
|
|
2819
2743
|
...position,
|
|
2820
2744
|
row: row3
|
|
2821
2745
|
}));
|
|
2822
2746
|
};
|
|
2823
|
-
return rows[selectedPosition.rowIdx] !== selectedPosition.originalRow && closeEditor(!1), /* @__PURE__ */
|
|
2747
|
+
return rows[selectedPosition.rowIdx] !== selectedPosition.originalRow && closeEditor(!1), /* @__PURE__ */ jsxRuntimeExports.jsx(EditCell, {
|
|
2824
2748
|
column,
|
|
2825
2749
|
colSpan,
|
|
2826
2750
|
row: row2,
|
|
@@ -2860,7 +2784,7 @@ function DataGrid(props, ref) {
|
|
|
2860
2784
|
onCellContextMenu: onCellContextMenuLatest,
|
|
2861
2785
|
rowClass,
|
|
2862
2786
|
gridRowStart,
|
|
2863
|
-
copiedCellIdx: copiedCell !== null && copiedCell.row === row2 ? columns.findIndex((
|
|
2787
|
+
copiedCellIdx: copiedCell !== null && copiedCell.row === row2 ? columns.findIndex((c) => c.key === copiedCell.columnKey) : void 0,
|
|
2864
2788
|
selectedCellIdx: selectedRowIdx === rowIdx ? selectedIdx : void 0,
|
|
2865
2789
|
draggedOverCellIdx: getDraggedOverCellIdx(rowIdx),
|
|
2866
2790
|
setDraggedOverRowIdx: isDragging ? setDraggedOverRowIdx : void 0,
|
|
@@ -2880,7 +2804,7 @@ function DataGrid(props, ref) {
|
|
|
2880
2804
|
let templateRows = `repeat(${headerRowsCount}, ${headerRowHeight}px)`;
|
|
2881
2805
|
topSummaryRowsCount > 0 && (templateRows += ` repeat(${topSummaryRowsCount}, ${summaryRowHeight}px)`), rows.length > 0 && (templateRows += gridTemplateRows), bottomSummaryRowsCount > 0 && (templateRows += ` repeat(${bottomSummaryRowsCount}, ${summaryRowHeight}px)`);
|
|
2882
2806
|
const isGroupRowFocused = selectedPosition.idx === -1 && selectedPosition.rowIdx !== minRowIdx - 1;
|
|
2883
|
-
return /* @__PURE__ */
|
|
2807
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
2884
2808
|
role,
|
|
2885
2809
|
"aria-label": ariaLabel,
|
|
2886
2810
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -2904,21 +2828,21 @@ function DataGrid(props, ref) {
|
|
|
2904
2828
|
onScroll: handleScroll,
|
|
2905
2829
|
onKeyDown: handleKeyDown,
|
|
2906
2830
|
"data-testid": testId,
|
|
2907
|
-
children: [/* @__PURE__ */
|
|
2831
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(DataGridDefaultRenderersProvider, {
|
|
2908
2832
|
value: defaultGridComponents,
|
|
2909
|
-
children: [/* @__PURE__ */
|
|
2833
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(HeaderRowSelectionChangeProvider, {
|
|
2910
2834
|
value: selectHeaderRowLatest,
|
|
2911
|
-
children: /* @__PURE__ */
|
|
2835
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(HeaderRowSelectionProvider, {
|
|
2912
2836
|
value: headerSelectionValue,
|
|
2913
2837
|
children: [Array.from({
|
|
2914
2838
|
length: groupedColumnHeaderRowsCount
|
|
2915
|
-
}, (
|
|
2839
|
+
}, (_, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(GroupedColumnHeaderRow$1, {
|
|
2916
2840
|
rowIdx: index + 1,
|
|
2917
2841
|
level: -groupedColumnHeaderRowsCount + index,
|
|
2918
2842
|
columns: getRowViewportColumns(minRowIdx + index),
|
|
2919
2843
|
selectedCellIdx: selectedPosition.rowIdx === minRowIdx + index ? selectedPosition.idx : void 0,
|
|
2920
2844
|
selectCell: selectHeaderCellLatest
|
|
2921
|
-
}, index)), /* @__PURE__ */
|
|
2845
|
+
}, index)), /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderRow$1, {
|
|
2922
2846
|
rowIdx: headerRowsCount,
|
|
2923
2847
|
columns: getRowViewportColumns(mainHeaderRowIdx),
|
|
2924
2848
|
onColumnResize: handleColumnResizeLatest,
|
|
@@ -2932,10 +2856,10 @@ function DataGrid(props, ref) {
|
|
|
2932
2856
|
direction
|
|
2933
2857
|
})]
|
|
2934
2858
|
})
|
|
2935
|
-
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /* @__PURE__ */
|
|
2859
|
+
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
2936
2860
|
children: [topSummaryRows == null ? void 0 : topSummaryRows.map((row2, rowIdx) => {
|
|
2937
2861
|
const gridRowStart = headerRowsCount + 1 + rowIdx, summaryRowIdx = mainHeaderRowIdx + 1 + rowIdx, isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx, top = headerRowsHeight + summaryRowHeight * rowIdx;
|
|
2938
|
-
return /* @__PURE__ */
|
|
2862
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SummaryRow$1, {
|
|
2939
2863
|
"aria-rowindex": gridRowStart,
|
|
2940
2864
|
rowIdx: summaryRowIdx,
|
|
2941
2865
|
gridRowStart,
|
|
@@ -2948,12 +2872,12 @@ function DataGrid(props, ref) {
|
|
|
2948
2872
|
isTop: !0,
|
|
2949
2873
|
selectCell: selectCellLatest
|
|
2950
2874
|
}, rowIdx);
|
|
2951
|
-
}), /* @__PURE__ */
|
|
2875
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(RowSelectionChangeProvider, {
|
|
2952
2876
|
value: selectRowLatest,
|
|
2953
2877
|
children: getViewportRows()
|
|
2954
2878
|
}), bottomSummaryRows == null ? void 0 : bottomSummaryRows.map((row2, rowIdx) => {
|
|
2955
2879
|
const gridRowStart = headerAndTopSummaryRowsCount + rows.length + rowIdx + 1, summaryRowIdx = rows.length + rowIdx, isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx, top = clientHeight > totalRowHeight ? gridHeight - summaryRowHeight * (bottomSummaryRows.length - rowIdx) : void 0, bottom = top === void 0 ? summaryRowHeight * (bottomSummaryRows.length - 1 - rowIdx) : void 0;
|
|
2956
|
-
return /* @__PURE__ */
|
|
2880
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SummaryRow$1, {
|
|
2957
2881
|
"aria-rowindex": ariaRowCount - bottomSummaryRowsCount + rowIdx + 1,
|
|
2958
2882
|
rowIdx: summaryRowIdx,
|
|
2959
2883
|
gridRowStart,
|
|
@@ -2968,14 +2892,14 @@ function DataGrid(props, ref) {
|
|
|
2968
2892
|
}, rowIdx);
|
|
2969
2893
|
})]
|
|
2970
2894
|
})]
|
|
2971
|
-
}), renderDragHandle(), renderMeasuringCells(viewportColumns), isTreeGrid && /* @__PURE__ */
|
|
2895
|
+
}), renderDragHandle(), renderMeasuringCells(viewportColumns), isTreeGrid && /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
2972
2896
|
ref: focusSinkRef,
|
|
2973
2897
|
tabIndex: isGroupRowFocused ? 0 : -1,
|
|
2974
2898
|
className: clsx(focusSinkClassname, isGroupRowFocused && [rowSelected, lastFrozenColumnIndex !== -1 && rowSelectedWithFrozenCell], !isRowIdxWithinViewportBounds(selectedPosition.rowIdx) && focusSinkHeaderAndSummaryClassname),
|
|
2975
2899
|
style: {
|
|
2976
2900
|
gridRowStart: selectedPosition.rowIdx + headerAndTopSummaryRowsCount + 1
|
|
2977
2901
|
}
|
|
2978
|
-
}), scrollToPosition !== null && /* @__PURE__ */
|
|
2902
|
+
}), scrollToPosition !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollToCell, {
|
|
2979
2903
|
scrollToPosition,
|
|
2980
2904
|
setScrollToCellPosition: setScrollToPosition,
|
|
2981
2905
|
gridElement: gridRef.current
|
|
@@ -2988,23 +2912,23 @@ function getCellToScroll(gridEl) {
|
|
|
2988
2912
|
function isSamePosition(p1, p2) {
|
|
2989
2913
|
return p1.idx === p2.idx && p1.rowIdx === p2.rowIdx;
|
|
2990
2914
|
}
|
|
2991
|
-
const DataGrid$1 = /* @__PURE__ */
|
|
2915
|
+
const DataGrid$1 = /* @__PURE__ */ forwardRef(DataGrid);
|
|
2992
2916
|
function useData(widget) {
|
|
2993
|
-
const columns =
|
|
2917
|
+
const columns = require$$0$1.useMemo(() => widget.columns(), [widget, widget.dataChecksum()]), data = require$$0$1.useMemo(() => widget.data(), [widget, widget.dataChecksum()]);
|
|
2994
2918
|
return [columns, data];
|
|
2995
2919
|
}
|
|
2996
2920
|
function copyAndSort(items, attribute, descending) {
|
|
2997
2921
|
const key = attribute;
|
|
2998
|
-
return [...items].sort((
|
|
2922
|
+
return [...items].sort((a, b) => a[key] < b[key] ? descending ? 1 : -1 : a[key] > b[key] ? descending ? -1 : 1 : 0);
|
|
2999
2923
|
}
|
|
3000
2924
|
const EmptyRowsRenderer = ({
|
|
3001
2925
|
message
|
|
3002
|
-
}) => /* @__PURE__ */
|
|
2926
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { textAlign: "center", gridColumn: "1/-1" }, children: message }), ReactTable = ({
|
|
3003
2927
|
table,
|
|
3004
2928
|
sort
|
|
3005
2929
|
}) => {
|
|
3006
|
-
const [columns, data] = useData(table), multiSelect = table.multiSelect(), columnTypes = table.columnTypes(), columnPatterns = table.columnPatterns(), columnFormats = table.columnFormats(), [listColumns, setListColumns] =
|
|
3007
|
-
|
|
2930
|
+
const [columns, data] = useData(table), multiSelect = table.multiSelect(), columnTypes = table.columnTypes(), columnPatterns = table.columnPatterns(), columnFormats = table.columnFormats(), [listColumns, setListColumns] = useState([]), [sortColumn, setSortColumn] = useState(), [rows, setRows] = useState([]), [selectedRows, setSelectedRows] = useState(/* @__PURE__ */ new Set());
|
|
2931
|
+
useEffect(() => {
|
|
3008
2932
|
setListColumns([
|
|
3009
2933
|
...multiSelect ? [SelectColumn] : [],
|
|
3010
2934
|
...columns.map((column) => {
|
|
@@ -3015,7 +2939,7 @@ const EmptyRowsRenderer = ({
|
|
|
3015
2939
|
__hpcc_pattern = columnPatterns[column] !== void 0 ? timeParse(columnPatterns[column]) : void 0, __hpcc_format = columnFormats[column] !== void 0 ? timeFormat(columnFormats[column]) : void 0;
|
|
3016
2940
|
break;
|
|
3017
2941
|
case "number":
|
|
3018
|
-
formatter = (props) => /* @__PURE__ */
|
|
2942
|
+
formatter = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { textAlign: "right" }, children: props.row[props.column.key] });
|
|
3019
2943
|
// eslint-disable-next-line no-fallthrough
|
|
3020
2944
|
default:
|
|
3021
2945
|
__hpcc_format = columnFormats[column] !== void 0 ? format(columnFormats[column]) : void 0;
|
|
@@ -3033,15 +2957,15 @@ const EmptyRowsRenderer = ({
|
|
|
3033
2957
|
})
|
|
3034
2958
|
]);
|
|
3035
2959
|
}, [columnFormats, columnPatterns, columnTypes, columns, multiSelect]);
|
|
3036
|
-
const onSortColumnsChange =
|
|
2960
|
+
const onSortColumnsChange = useCallback((sortColumns) => {
|
|
3037
2961
|
const futureSortColumn = sortColumns.slice(-1)[0], sorted = futureSortColumn !== void 0, isSortedDescending = (futureSortColumn == null ? void 0 : futureSortColumn.direction) === "DESC";
|
|
3038
2962
|
setSortColumn(futureSortColumn), setRows(copyAndSort(rows, sorted ? futureSortColumn.columnKey : "key", sorted ? isSortedDescending : !1));
|
|
3039
|
-
}, [rows]), rowKeyGetter =
|
|
2963
|
+
}, [rows]), rowKeyGetter = useCallback((row2) => row2.key, []), onSelectedRowsChange = useCallback((selectedRows2) => {
|
|
3040
2964
|
setSelectedRows(selectedRows2);
|
|
3041
|
-
}, []), onCellClick =
|
|
2965
|
+
}, []), onCellClick = useCallback((row2, column) => {
|
|
3042
2966
|
table.onRowClickCallback(row2, column.key);
|
|
3043
2967
|
}, [table]);
|
|
3044
|
-
return
|
|
2968
|
+
return useEffect(() => {
|
|
3045
2969
|
let items = data.map((row2, index) => {
|
|
3046
2970
|
const retVal = {
|
|
3047
2971
|
key: index
|
|
@@ -3052,7 +2976,7 @@ const EmptyRowsRenderer = ({
|
|
|
3052
2976
|
}), retVal;
|
|
3053
2977
|
});
|
|
3054
2978
|
sort != null && sort.attribute && (items = copyAndSort(items, sort.attribute, sort.descending)), setRows(items);
|
|
3055
|
-
}, [listColumns, data, sort]), /* @__PURE__ */
|
|
2979
|
+
}, [listColumns, data, sort]), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3056
2980
|
DataGrid$1,
|
|
3057
2981
|
{
|
|
3058
2982
|
columns: listColumns,
|
|
@@ -3060,7 +2984,7 @@ const EmptyRowsRenderer = ({
|
|
|
3060
2984
|
rows,
|
|
3061
2985
|
rowKeyGetter,
|
|
3062
2986
|
rowHeight: 20,
|
|
3063
|
-
renderers: { noRowsFallback: /* @__PURE__ */
|
|
2987
|
+
renderers: { noRowsFallback: /* @__PURE__ */ jsxRuntimeExports.jsx(EmptyRowsRenderer, { message: table.noDataMessage() }) },
|
|
3064
2988
|
className: table.darkMode() ? "rdg-dark" : "rdg-light",
|
|
3065
2989
|
sortColumns: sortColumn ? [sortColumn] : [],
|
|
3066
2990
|
onSortColumnsChange,
|
|
@@ -3078,6 +3002,8 @@ class Table extends HTMLWidget {
|
|
|
3078
3002
|
constructor() {
|
|
3079
3003
|
super();
|
|
3080
3004
|
__publicField(this, "_div");
|
|
3005
|
+
__publicField(this, "_root");
|
|
3006
|
+
__publicField(this, "_component");
|
|
3081
3007
|
__publicField(this, "_prevRow");
|
|
3082
3008
|
__publicField(this, "_prevColumn");
|
|
3083
3009
|
}
|
|
@@ -3094,10 +3020,10 @@ class Table extends HTMLWidget {
|
|
|
3094
3020
|
this._prevRow && JSON.stringify(this._prevRow) !== JSON.stringify(row2) && this.click(this._prevRow, this._prevColumn ?? "", !1), row2 && this.click(row2, column, !0), this._prevRow = row2, this._prevColumn = column;
|
|
3095
3021
|
}
|
|
3096
3022
|
enter(domNode, element) {
|
|
3097
|
-
super.enter(domNode, element), this._div = element.append("div").style("display", "grid");
|
|
3023
|
+
super.enter(domNode, element), this._div = element.append("div").style("display", "grid"), this._root = clientExports.createRoot(this._div.node(), { identifierPrefix: this.id() }), this._component = createElement(ReactTable, { table: this });
|
|
3098
3024
|
}
|
|
3099
3025
|
update(domNode, element) {
|
|
3100
|
-
super.update(domNode, element), this._div.style("width", this.width() + "px"), this._div.style("height", this.height() + "px"),
|
|
3026
|
+
super.update(domNode, element), this._div.style("width", this.width() + "px"), this._div.style("height", this.height() + "px"), this._root.render(this._component);
|
|
3101
3027
|
}
|
|
3102
3028
|
exit(domNode, element) {
|
|
3103
3029
|
this._div.remove(), super.exit(domNode, element);
|