@sheetxl/studio-mui 0.4.9 → 0.4.11
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/browser/cjs/B29yIlf_FSHx9q3M.cjs +7 -0
- package/browser/cjs/B783moVfFT70yQuK.cjs +7 -0
- package/browser/cjs/BCtVyhxIZSUPH_Z4.cjs +7 -0
- package/browser/cjs/BE6O6K7i1mHBC3et.cjs +7 -0
- package/browser/cjs/BQ-G2ABc3FYN-D50.cjs +7 -0
- package/browser/cjs/BabvaPi1dUIPt5AG.cjs +7 -0
- package/browser/cjs/BbvcxaJzfy7H6xfa.cjs +7 -0
- package/browser/cjs/Bhh0dqxUzzOzHWMc.cjs +7 -0
- package/browser/cjs/CH50hiw_7LBSC6dR.cjs +7 -0
- package/browser/cjs/Cfb0T6htsh82UPK-.cjs +7 -0
- package/browser/cjs/CisYglNTHGrj9oMH.cjs +7 -0
- package/browser/cjs/Clbakb5VUTDTlofM.cjs +7 -0
- package/browser/cjs/D7xmeRe-f7IifEKc.cjs +7 -0
- package/browser/cjs/DCV-6w2JGk_faE3x.cjs +7 -0
- package/browser/cjs/DY2PuDSgw0TrB5-_.cjs +7 -0
- package/browser/cjs/Df5v6knUJ4dqHmmo.cjs +7 -0
- package/browser/cjs/DyzVC_iq7ceqC2fj.cjs +7 -0
- package/browser/cjs/QB_8kWYEsfOH_HwK.cjs +7 -0
- package/browser/cjs/aOmlMJRAkQEF59EX.cjs +7 -0
- package/browser/cjs/index.cjs +10 -4
- package/browser/cjs/li-J7BWV6WUzY5aq.cjs +7 -0
- package/browser/cjs/u0WmWLGlCwhnhL9i.cjs +7 -0
- package/browser/cjs/uoBAuXnlUz8scSA1.cjs +7 -0
- package/browser/cjs/xp2ZII-PuLk9tHK3.cjs +7 -0
- package/browser/cjs/xq-CJbsvm7BQO8lK.cjs +7 -0
- package/browser/esm/12Ttun7hzbiInyVr.mjs +7 -0
- package/browser/esm/7jSMnphGrNRPUa_S.mjs +7 -0
- package/browser/esm/AnCmK-idMDJ2vI8H.mjs +7 -0
- package/browser/esm/B-Ut_yUCD9THCz0T.mjs +7 -0
- package/browser/esm/BTD5k7gtFcqDwslB.mjs +7 -0
- package/browser/esm/BVRUNnRvnt7aVCDD.mjs +7 -0
- package/browser/esm/BauTkiamxm0HDt6M.mjs +7 -0
- package/browser/esm/BcIp2mxLBfjUBE0q.mjs +7 -0
- package/browser/esm/Bi_0z0hyhFuz5Ta3.mjs +7 -0
- package/browser/esm/BkDEdK7zOlsoUKCZ.mjs +7 -0
- package/browser/esm/BpGexBYtmHbTIJz2.mjs +7 -0
- package/browser/esm/CJawFB555VEY-Vge.mjs +7 -0
- package/browser/esm/CWogLlWYHiL4W6CH.mjs +7 -0
- package/browser/esm/Cr46Bo9bGoz0LbWq.mjs +7 -0
- package/browser/esm/Csk8rXNpaXmf5g7O.mjs +7 -0
- package/browser/esm/Cu-5HDPN8B0qE77-.mjs +7 -0
- package/browser/esm/CzgR8PxJ_89IC4Mr.mjs +7 -0
- package/browser/esm/DMUXpRbV3ahdB1lN.mjs +7 -0
- package/browser/esm/DiIX5KzrWnbDWjGE.mjs +7 -0
- package/browser/esm/Djo2IS-ivmVSrO3v.mjs +7 -0
- package/browser/esm/Hy95ExHvIFgzxQb-.mjs +7 -0
- package/browser/esm/Z1_72ZY8rW2Mc3g_.mjs +7 -0
- package/browser/esm/_ZR9nT54xwy-C6ow.mjs +7 -0
- package/browser/esm/csxyptiqbJZO0pQA.mjs +7 -0
- package/browser/esm/index.mjs +8 -82
- package/licenses/dependencies.txt +145 -145
- package/node/esm/{CsbP0EYKOHobzZCu.mjs → 8THCZRGNmI2nPqMR.mjs} +2 -2
- package/node/esm/{CGiJgZJFY-YsXWCX.mjs → BDm0y2dv7wLZhYj1.mjs} +1 -1
- package/node/esm/{CijBL1IDWaxPgQ_E.mjs → BPylexVHXa-t0sqJ.mjs} +6 -6
- package/node/esm/{B7xzqWxB07TdXnmo.mjs → BQYQg7lfqFbWaf8x.mjs} +2 -2
- package/node/esm/{BUVA6vYXyFFnBCMg.mjs → BSUbQzac78SXiAJe.mjs} +1 -1
- package/node/esm/{qewbqty13W1sKrMC.mjs → BeNXnrWMr5S34Oxb.mjs} +1 -1
- package/node/esm/{BfuG4JD3t3n1uOci.mjs → C6jxZQrvMLctjLZM.mjs} +4 -4
- package/node/esm/{Dn38s6pH3QNvdk-x.mjs → CCZepFZNn1pIXrnd.mjs} +1 -1
- package/node/esm/{9iDXWtTOWeDVslQL.mjs → CXSwyUs6BuNGCic0.mjs} +13 -13
- package/node/esm/{Dq49h62ihEYk_8VR.mjs → CaV6SH-PMyHlXUhx.mjs} +1 -1
- package/node/esm/{B18g9zjzyR9YL3Mv.mjs → D481dAOp77EZbV5s.mjs} +2 -2
- package/node/esm/{DWKLdf_rn5dajRBA.mjs → DHj9iDuBImdwscIb.mjs} +25 -25
- package/node/esm/{uY021f9cZSWYX0--.mjs → DIGsHHDexzj0uG_T.mjs} +5 -5
- package/node/esm/{Cr5l_3AqPbv4mke9.mjs → DLiw-2C_tqGgJIQ6.mjs} +2 -2
- package/node/esm/{CG1T0Z1roNRSVlal.mjs → DNJVdt9TbBsUE8Jm.mjs} +1 -1
- package/node/esm/{DGTK2YeARR5cTnft.mjs → DaCmut490aSCGvX8.mjs} +1 -1
- package/node/esm/{C7t1ZHhSDgJnZ4Da.mjs → Dd2OFQJQyYp6bAeP.mjs} +1 -1
- package/node/esm/{DHmVr6jRLzt6lD1x.mjs → DkpAjhQeaZn_Ipxg.mjs} +2 -2
- package/node/esm/{DODhKM0Qeycx3Hvp.mjs → DyMCnCG9LzH5Mgw0.mjs} +2 -2
- package/node/esm/{v4fR5lIq2IqY_Clq.mjs → RV-AvxVzzFKWjYFM.mjs} +38 -38
- package/node/esm/{tur4cwLbnCn69JK-.mjs → Ui3_6RhrEZQDOXwg.mjs} +8 -8
- package/node/esm/index.mjs +5373 -5075
- package/node/esm/{CILOMzOF30-XSZqR.mjs → qI75rORek8T0-Kpf.mjs} +2 -2
- package/package.json +8 -8
- package/types/index.d.ts +24 -0
- package/browser/cjs/02LSJ7jnb-ovS7ex.cjs +0 -15
- package/browser/cjs/BDDJIe6JwgEYEtda.cjs +0 -6
- package/browser/cjs/BGh6tEDK_1MFKfMU.cjs +0 -145
- package/browser/cjs/BSRDKlVOTYHfOAF_.cjs +0 -11
- package/browser/cjs/Bn0BSzVk_S-rvDwk.cjs +0 -6
- package/browser/cjs/Bzf8jKmmZl374mof.cjs +0 -6
- package/browser/cjs/C20NTPRE5_ExESDZ.cjs +0 -6
- package/browser/cjs/C5i9hklL-WNb8J_q.cjs +0 -42
- package/browser/cjs/CLxYxjd0yz1LCTB-.cjs +0 -6
- package/browser/cjs/CUo2iW5IL6UZJNWT.cjs +0 -6
- package/browser/cjs/C_QWbWVBVc6YJ4Q3.cjs +0 -16
- package/browser/cjs/CeeZxww7wpF45vvp.cjs +0 -6
- package/browser/cjs/CekKZCV1J1HUFIqO.cjs +0 -6
- package/browser/cjs/CgD0b2zJD8zElhuz.cjs +0 -6
- package/browser/cjs/CqwEnIUDMxWw5DX1.cjs +0 -87
- package/browser/cjs/CwOKyPq_H2afJacv.cjs +0 -7
- package/browser/cjs/D32t9wiFoNX7WVEo.cjs +0 -161
- package/browser/cjs/DILF3GzsMdg-Y2wu.cjs +0 -11
- package/browser/cjs/Dr-PR7J1T91UjrPL.cjs +0 -12
- package/browser/cjs/DyR0_iZAINpjodWL.cjs +0 -12
- package/browser/cjs/LWuNxqu9MyiniH_g.cjs +0 -18
- package/browser/cjs/O8r9K4Qh6Pgd6rXU.cjs +0 -7
- package/browser/cjs/jbTHHxJODyD10jVH.cjs +0 -6
- package/browser/cjs/n-4XaX3pkXUEEQ5u.cjs +0 -6
- package/browser/cjs/qQGaIq5VhlZJU-xf.cjs +0 -6
- package/browser/esm/AmErN6xXU01K_bEs.mjs +0 -3803
- package/browser/esm/B08nVBuOXar7x7in.mjs +0 -1703
- package/browser/esm/B8xKZIF9fvamlvW5.mjs +0 -1467
- package/browser/esm/BGWd79IfMfoHoO6g.mjs +0 -392
- package/browser/esm/BT8vduOS21nsJ6EQ.mjs +0 -1366
- package/browser/esm/Bz6NqTbktTH8Df6_.mjs +0 -2251
- package/browser/esm/CDRALHzsBIsRPM5g.mjs +0 -153
- package/browser/esm/CIH1rBtL9lK5ku-N.mjs +0 -13391
- package/browser/esm/CVJee4uHPTdpZGEH.mjs +0 -46
- package/browser/esm/CXUv64T9mbQbJGgM.mjs +0 -48
- package/browser/esm/Ca5nvvpeuP6Wsv5P.mjs +0 -43
- package/browser/esm/CelDYTh0f7McDj4o.mjs +0 -44
- package/browser/esm/DHlS6l8ZPDMN2cwP.mjs +0 -1672
- package/browser/esm/DXKQ9TZdaT7ytR1S.mjs +0 -640
- package/browser/esm/D_FJwwe-bsDiDGBV.mjs +0 -2410
- package/browser/esm/DduyjhwDREaxXNzm.mjs +0 -59
- package/browser/esm/DffuCp_514AjqJLT.mjs +0 -864
- package/browser/esm/DgC_oaBYpwh1mBi_.mjs +0 -25
- package/browser/esm/Dl-SlJoaP7EFX-GR.mjs +0 -52
- package/browser/esm/DpTSO921EQ7L_abP.mjs +0 -52
- package/browser/esm/Dr5y4zmj1js9FjzE.mjs +0 -1352
- package/browser/esm/DuoEo0hJBssfAmB4.mjs +0 -84
- package/browser/esm/jIv4VNLAAFANZjhN.mjs +0 -424
- package/browser/esm/wysWhT4-jO-uukUH.mjs +0 -23
- package/browser/esm/zZaxvhjZK5N3yZkw.mjs +0 -19947
- package/node/esm/BBWRiJSBxt6O1CfK.mjs +0 -312
|
@@ -1,2251 +0,0 @@
|
|
|
1
|
-
import { jsxs as Ee, jsx as W } from "react/jsx-runtime";
|
|
2
|
-
import { Box as ue, TextField as Qt, InputAdornment as eo, IconButton as to, FormControlLabel as oo, Checkbox as no, Typography as ro, TableCell as We, DialogContent as io } from "@mui/material";
|
|
3
|
-
import { an as lo, ao as He, ap as so, aq as ao, ar as co, as as uo, at as U, au as ho, Y as fo, a4 as St, a5 as de, a as Se, av as po, a6 as mo } from "./zZaxvhjZK5N3yZkw.mjs";
|
|
4
|
-
import * as x from "react";
|
|
5
|
-
import yt, { cloneElement as go, useState as he, useMemo as vo, useEffect as De } from "react";
|
|
6
|
-
import { Close as _o } from "@mui/icons-material";
|
|
7
|
-
import { c as N } from "./DffuCp_514AjqJLT.mjs";
|
|
8
|
-
import So, { internal_serializeStyles as K, internal_mutateStyles as yo } from "@mui/styled-engine";
|
|
9
|
-
import { alpha as fe } from "@mui/system";
|
|
10
|
-
/**
|
|
11
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
|
|
12
|
-
*
|
|
13
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
14
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
15
|
-
*/
|
|
16
|
-
const wo = lo();
|
|
17
|
-
function ye(o) {
|
|
18
|
-
return o !== "ownerState" && o !== "theme" && o !== "sx" && o !== "as";
|
|
19
|
-
}
|
|
20
|
-
function q(o, e) {
|
|
21
|
-
return e && o && typeof o == "object" && o.styles && !o.styles.startsWith("@layer") && (o.styles = `@layer ${e}{${String(o.styles)}}`), o;
|
|
22
|
-
}
|
|
23
|
-
function Co(o) {
|
|
24
|
-
return o ? (e, t) => t[o] : null;
|
|
25
|
-
}
|
|
26
|
-
function ge(o, e, t) {
|
|
27
|
-
const n = typeof e == "function" ? e(o) : e;
|
|
28
|
-
if (Array.isArray(n)) return n.flatMap((r) => ge(o, r, t));
|
|
29
|
-
if (Array.isArray(n?.variants)) {
|
|
30
|
-
let r;
|
|
31
|
-
if (n.isProcessed) r = t ? q(n.style, t) : n.style;
|
|
32
|
-
else {
|
|
33
|
-
const { variants: l, ...i } = n;
|
|
34
|
-
r = t ? q(K(i), t) : i;
|
|
35
|
-
}
|
|
36
|
-
return wt(o, n.variants, [r], t);
|
|
37
|
-
}
|
|
38
|
-
return n?.isProcessed ? t ? q(K(n.style), t) : n.style : t ? q(K(n), t) : n;
|
|
39
|
-
}
|
|
40
|
-
function wt(o, e, t = [], n = void 0) {
|
|
41
|
-
let r;
|
|
42
|
-
e: for (let l = 0; l < e.length; l += 1) {
|
|
43
|
-
const i = e[l];
|
|
44
|
-
if (typeof i.props == "function") {
|
|
45
|
-
if (r ??= { ...o, ...o.ownerState, ownerState: o.ownerState }, !i.props(r)) continue;
|
|
46
|
-
} else for (const a in i.props) if (o[a] !== i.props[a] && o.ownerState?.[a] !== i.props[a]) continue e;
|
|
47
|
-
typeof i.style == "function" ? (r ??= { ...o, ...o.ownerState, ownerState: o.ownerState }, t.push(n ? q(K(i.style(r)), n) : i.style(r))) : t.push(n ? q(K(i.style), n) : i.style);
|
|
48
|
-
}
|
|
49
|
-
return t;
|
|
50
|
-
}
|
|
51
|
-
function xo(o) {
|
|
52
|
-
return o && o.charAt(0).toLowerCase() + o.slice(1);
|
|
53
|
-
}
|
|
54
|
-
const Ro = function(o = {}) {
|
|
55
|
-
const { themeId: e, defaultTheme: t = wo, rootShouldForwardProp: n = ye, slotShouldForwardProp: r = ye } = o;
|
|
56
|
-
function l(i) {
|
|
57
|
-
(function(a, s, c) {
|
|
58
|
-
a.theme = function(u) {
|
|
59
|
-
for (const d in u) return !1;
|
|
60
|
-
return !0;
|
|
61
|
-
}(a.theme) ? c : a.theme[s] || a.theme;
|
|
62
|
-
})(i, e, t);
|
|
63
|
-
}
|
|
64
|
-
return (i, a = {}) => {
|
|
65
|
-
yo(i, (C) => C.filter((R) => R !== He));
|
|
66
|
-
const { name: s, slot: c, skipVariantsResolver: u, skipSx: d, overridesResolver: f = Co(xo(c)), ...h } = a, g = s && s.startsWith("Mui") || c ? "components" : "custom", v = u !== void 0 ? u : c && c !== "Root" && c !== "root" || !1, _ = d || !1;
|
|
67
|
-
let S = ye;
|
|
68
|
-
c === "Root" || c === "root" ? S = n : c ? S = r : function(C) {
|
|
69
|
-
return typeof C == "string" && C.charCodeAt(0) > 96;
|
|
70
|
-
}(i) && (S = void 0);
|
|
71
|
-
const m = So(i, { shouldForwardProp: S, label: void 0, ...h }), y = (C) => {
|
|
72
|
-
if (C.__emotion_real === C) return C;
|
|
73
|
-
if (typeof C == "function") return function(R) {
|
|
74
|
-
return ge(R, C, R.theme.modularCssLayers ? g : void 0);
|
|
75
|
-
};
|
|
76
|
-
if (so(C)) {
|
|
77
|
-
const R = function(z) {
|
|
78
|
-
const { variants: b, ...I } = z, O = { variants: b, style: K(I), isProcessed: !0 };
|
|
79
|
-
return O.style === I || b && b.forEach((T) => {
|
|
80
|
-
typeof T.style != "function" && (T.style = K(T.style));
|
|
81
|
-
}), O;
|
|
82
|
-
}(C);
|
|
83
|
-
return function(z) {
|
|
84
|
-
return R.variants ? ge(z, R, z.theme.modularCssLayers ? g : void 0) : z.theme.modularCssLayers ? q(R.style, g) : R.style;
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return C;
|
|
88
|
-
}, w = (...C) => {
|
|
89
|
-
const R = [], z = C.map(y), b = [];
|
|
90
|
-
if (R.push(l), s && f && b.push(function(T) {
|
|
91
|
-
const L = T.theme, k = L.components?.[s]?.styleOverrides;
|
|
92
|
-
if (!k) return null;
|
|
93
|
-
const E = {};
|
|
94
|
-
for (const J in k) E[J] = ge(T, k[J], T.theme.modularCssLayers ? "theme" : void 0);
|
|
95
|
-
return f(T, E);
|
|
96
|
-
}), s && !v && b.push(function(T) {
|
|
97
|
-
const L = T.theme, k = L?.components?.[s]?.variants;
|
|
98
|
-
return k ? wt(T, k, [], T.theme.modularCssLayers ? "theme" : void 0) : null;
|
|
99
|
-
}), _ || b.push(He), Array.isArray(z[0])) {
|
|
100
|
-
const T = z.shift(), L = new Array(R.length).fill(""), k = new Array(b.length).fill("");
|
|
101
|
-
let E;
|
|
102
|
-
E = [...L, ...T, ...k], E.raw = [...L, ...T.raw, ...k], R.unshift(E);
|
|
103
|
-
}
|
|
104
|
-
const I = [...R, ...z, ...b], O = m(...I);
|
|
105
|
-
return i.muiName && (O.muiName = i.muiName), O;
|
|
106
|
-
};
|
|
107
|
-
return m.withConfig && (w.withConfig = m.withConfig), w;
|
|
108
|
-
};
|
|
109
|
-
}({ themeId: ao, defaultTheme: co, rootShouldForwardProp: (o) => /* @__PURE__ */ function(e) {
|
|
110
|
-
return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
|
|
111
|
-
}(o) && o !== "classes" });
|
|
112
|
-
function G(o, e) {
|
|
113
|
-
if (!(o instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
114
|
-
}
|
|
115
|
-
function $(o) {
|
|
116
|
-
return $ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
117
|
-
return typeof e;
|
|
118
|
-
} : function(e) {
|
|
119
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
120
|
-
}, $(o);
|
|
121
|
-
}
|
|
122
|
-
function Ct(o) {
|
|
123
|
-
var e = function(t, n) {
|
|
124
|
-
if ($(t) != "object" || !t) return t;
|
|
125
|
-
var r = t[Symbol.toPrimitive];
|
|
126
|
-
if (r !== void 0) {
|
|
127
|
-
var l = r.call(t, n);
|
|
128
|
-
if ($(l) != "object") return l;
|
|
129
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
130
|
-
}
|
|
131
|
-
return String(t);
|
|
132
|
-
}(o, "string");
|
|
133
|
-
return $(e) == "symbol" ? e : e + "";
|
|
134
|
-
}
|
|
135
|
-
function je(o, e) {
|
|
136
|
-
for (var t = 0; t < e.length; t++) {
|
|
137
|
-
var n = e[t];
|
|
138
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, Ct(n.key), n);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
function A(o, e, t) {
|
|
142
|
-
return e && je(o.prototype, e), t && je(o, t), Object.defineProperty(o, "prototype", { writable: !1 }), o;
|
|
143
|
-
}
|
|
144
|
-
function H(o, e) {
|
|
145
|
-
if (e && ($(e) == "object" || typeof e == "function")) return e;
|
|
146
|
-
if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
147
|
-
return function(t) {
|
|
148
|
-
if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
149
|
-
return t;
|
|
150
|
-
}(o);
|
|
151
|
-
}
|
|
152
|
-
function P(o) {
|
|
153
|
-
return P = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
154
|
-
return e.__proto__ || Object.getPrototypeOf(e);
|
|
155
|
-
}, P(o);
|
|
156
|
-
}
|
|
157
|
-
function D(o, e) {
|
|
158
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
159
|
-
o.prototype = Object.create(e && e.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), Object.defineProperty(o, "prototype", { writable: !1 }), e && uo(o, e);
|
|
160
|
-
}
|
|
161
|
-
function p(o, e, t) {
|
|
162
|
-
return (e = Ct(e)) in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
|
|
163
|
-
}
|
|
164
|
-
function xt() {
|
|
165
|
-
var o = this.constructor.getDerivedStateFromProps(this.props, this.state);
|
|
166
|
-
o != null && this.setState(o);
|
|
167
|
-
}
|
|
168
|
-
function Rt(o) {
|
|
169
|
-
this.setState(function(e) {
|
|
170
|
-
var t = this.constructor.getDerivedStateFromProps(o, e);
|
|
171
|
-
return t ?? null;
|
|
172
|
-
}.bind(this));
|
|
173
|
-
}
|
|
174
|
-
function bt(o, e) {
|
|
175
|
-
try {
|
|
176
|
-
var t = this.props, n = this.state;
|
|
177
|
-
this.props = o, this.state = e, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(t, n);
|
|
178
|
-
} finally {
|
|
179
|
-
this.props = t, this.state = n;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
function ce(o) {
|
|
183
|
-
var e = o.prototype;
|
|
184
|
-
if (!e || !e.isReactComponent) throw new Error("Can only polyfill class components");
|
|
185
|
-
if (typeof o.getDerivedStateFromProps != "function" && typeof e.getSnapshotBeforeUpdate != "function") return o;
|
|
186
|
-
var t = null, n = null, r = null;
|
|
187
|
-
if (typeof e.componentWillMount == "function" ? t = "componentWillMount" : typeof e.UNSAFE_componentWillMount == "function" && (t = "UNSAFE_componentWillMount"), typeof e.componentWillReceiveProps == "function" ? n = "componentWillReceiveProps" : typeof e.UNSAFE_componentWillReceiveProps == "function" && (n = "UNSAFE_componentWillReceiveProps"), typeof e.componentWillUpdate == "function" ? r = "componentWillUpdate" : typeof e.UNSAFE_componentWillUpdate == "function" && (r = "UNSAFE_componentWillUpdate"), t !== null || n !== null || r !== null) {
|
|
188
|
-
var l = o.displayName || o.name, i = typeof o.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
|
|
189
|
-
throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
190
|
-
|
|
191
|
-
` + l + " uses " + i + " but also contains the following legacy lifecycles:" + (t !== null ? `
|
|
192
|
-
` + t : "") + (n !== null ? `
|
|
193
|
-
` + n : "") + (r !== null ? `
|
|
194
|
-
` + r : "") + `
|
|
195
|
-
|
|
196
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
197
|
-
https://fb.me/react-async-component-lifecycle-hooks`);
|
|
198
|
-
}
|
|
199
|
-
if (typeof o.getDerivedStateFromProps == "function" && (e.componentWillMount = xt, e.componentWillReceiveProps = Rt), typeof e.getSnapshotBeforeUpdate == "function") {
|
|
200
|
-
if (typeof e.componentDidUpdate != "function") throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");
|
|
201
|
-
e.componentWillUpdate = bt;
|
|
202
|
-
var a = e.componentDidUpdate;
|
|
203
|
-
e.componentDidUpdate = function(s, c, u) {
|
|
204
|
-
var d = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : u;
|
|
205
|
-
a.call(this, s, c, d);
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
return o;
|
|
209
|
-
}
|
|
210
|
-
function Fe(o, e) {
|
|
211
|
-
var t = Object.keys(o);
|
|
212
|
-
if (Object.getOwnPropertySymbols) {
|
|
213
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
214
|
-
e && (n = n.filter(function(r) {
|
|
215
|
-
return Object.getOwnPropertyDescriptor(o, r).enumerable;
|
|
216
|
-
})), t.push.apply(t, n);
|
|
217
|
-
}
|
|
218
|
-
return t;
|
|
219
|
-
}
|
|
220
|
-
function Ne(o) {
|
|
221
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
222
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
223
|
-
e % 2 ? Fe(Object(t), !0).forEach(function(n) {
|
|
224
|
-
p(o, n, t[n]);
|
|
225
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Fe(Object(t)).forEach(function(n) {
|
|
226
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
return o;
|
|
230
|
-
}
|
|
231
|
-
function Tt() {
|
|
232
|
-
try {
|
|
233
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
234
|
-
}));
|
|
235
|
-
} catch {
|
|
236
|
-
}
|
|
237
|
-
return (Tt = function() {
|
|
238
|
-
return !!o;
|
|
239
|
-
})();
|
|
240
|
-
}
|
|
241
|
-
xt.__suppressDeprecationWarning = !0, Rt.__suppressDeprecationWarning = !0, bt.__suppressDeprecationWarning = !0;
|
|
242
|
-
var Be = function() {
|
|
243
|
-
function o() {
|
|
244
|
-
var e, t, n, r;
|
|
245
|
-
G(this, o);
|
|
246
|
-
for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
|
|
247
|
-
return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Tt() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "state", { scrollToColumn: 0, scrollToRow: 0, instanceProps: { prevScrollToColumn: 0, prevScrollToRow: 0 } }), p(e, "_columnStartIndex", 0), p(e, "_columnStopIndex", 0), p(e, "_rowStartIndex", 0), p(e, "_rowStopIndex", 0), p(e, "_onKeyDown", function(s) {
|
|
248
|
-
var c = e.props, u = c.columnCount, d = c.disabled, f = c.mode, h = c.rowCount;
|
|
249
|
-
if (!d) {
|
|
250
|
-
var g = e._getScrollState(), v = g.scrollToColumn, _ = g.scrollToRow, S = e._getScrollState(), m = S.scrollToColumn, y = S.scrollToRow;
|
|
251
|
-
switch (s.key) {
|
|
252
|
-
case "ArrowDown":
|
|
253
|
-
y = Math.min(f === "cells" ? y + 1 : e._rowStopIndex + 1, h - 1);
|
|
254
|
-
break;
|
|
255
|
-
case "ArrowLeft":
|
|
256
|
-
m = Math.max(f === "cells" ? m - 1 : e._columnStartIndex - 1, 0);
|
|
257
|
-
break;
|
|
258
|
-
case "ArrowRight":
|
|
259
|
-
m = Math.min(f === "cells" ? m + 1 : e._columnStopIndex + 1, u - 1);
|
|
260
|
-
break;
|
|
261
|
-
case "ArrowUp":
|
|
262
|
-
y = Math.max(f === "cells" ? y - 1 : e._rowStartIndex - 1, 0);
|
|
263
|
-
}
|
|
264
|
-
m === v && y === _ || (s.preventDefault(), e._updateScrollState({ scrollToColumn: m, scrollToRow: y }));
|
|
265
|
-
}
|
|
266
|
-
}), p(e, "_onSectionRendered", function(s) {
|
|
267
|
-
var c = s.columnStartIndex, u = s.columnStopIndex, d = s.rowStartIndex, f = s.rowStopIndex;
|
|
268
|
-
e._columnStartIndex = c, e._columnStopIndex = u, e._rowStartIndex = d, e._rowStopIndex = f;
|
|
269
|
-
}), e;
|
|
270
|
-
}
|
|
271
|
-
return D(o, x.PureComponent), A(o, [{ key: "setScrollIndexes", value: function(e) {
|
|
272
|
-
var t = e.scrollToColumn, n = e.scrollToRow;
|
|
273
|
-
this.setState({ scrollToRow: n, scrollToColumn: t });
|
|
274
|
-
} }, { key: "render", value: function() {
|
|
275
|
-
var e = this.props, t = e.className, n = e.children, r = this._getScrollState(), l = r.scrollToColumn, i = r.scrollToRow;
|
|
276
|
-
return x.createElement("div", { className: t, onKeyDown: this._onKeyDown }, n({ onSectionRendered: this._onSectionRendered, scrollToColumn: l, scrollToRow: i }));
|
|
277
|
-
} }, { key: "_getScrollState", value: function() {
|
|
278
|
-
return this.props.isControlled ? this.props : this.state;
|
|
279
|
-
} }, { key: "_updateScrollState", value: function(e) {
|
|
280
|
-
var t = e.scrollToColumn, n = e.scrollToRow, r = this.props, l = r.isControlled, i = r.onScrollToChange;
|
|
281
|
-
typeof i == "function" && i({ scrollToColumn: t, scrollToRow: n }), l || this.setState({ scrollToColumn: t, scrollToRow: n });
|
|
282
|
-
} }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
|
|
283
|
-
return e.isControlled ? {} : e.scrollToColumn !== t.instanceProps.prevScrollToColumn || e.scrollToRow !== t.instanceProps.prevScrollToRow ? Ne(Ne({}, t), {}, { scrollToColumn: e.scrollToColumn, scrollToRow: e.scrollToRow, instanceProps: { prevScrollToColumn: e.scrollToColumn, prevScrollToRow: e.scrollToRow } }) : {};
|
|
284
|
-
} }]);
|
|
285
|
-
}();
|
|
286
|
-
function zt(o, e) {
|
|
287
|
-
var t, n = (t = e !== void 0 ? e : typeof window < "u" ? window : typeof self < "u" ? self : global).document !== void 0 && t.document.attachEvent;
|
|
288
|
-
if (!n) {
|
|
289
|
-
var r = function() {
|
|
290
|
-
var m = t.requestAnimationFrame || t.mozRequestAnimationFrame || t.webkitRequestAnimationFrame || function(y) {
|
|
291
|
-
return t.setTimeout(y, 20);
|
|
292
|
-
};
|
|
293
|
-
return function(y) {
|
|
294
|
-
return m(y);
|
|
295
|
-
};
|
|
296
|
-
}(), l = function() {
|
|
297
|
-
var m = t.cancelAnimationFrame || t.mozCancelAnimationFrame || t.webkitCancelAnimationFrame || t.clearTimeout;
|
|
298
|
-
return function(y) {
|
|
299
|
-
return m(y);
|
|
300
|
-
};
|
|
301
|
-
}(), i = function(m) {
|
|
302
|
-
var y = m.__resizeTriggers__, w = y.firstElementChild, C = y.lastElementChild, R = w.firstElementChild;
|
|
303
|
-
C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight, R.style.width = w.offsetWidth + 1 + "px", R.style.height = w.offsetHeight + 1 + "px", w.scrollLeft = w.scrollWidth, w.scrollTop = w.scrollHeight;
|
|
304
|
-
}, a = function(m) {
|
|
305
|
-
if (!(m.target.className && typeof m.target.className.indexOf == "function" && m.target.className.indexOf("contract-trigger") < 0 && m.target.className.indexOf("expand-trigger") < 0)) {
|
|
306
|
-
var y = this;
|
|
307
|
-
i(this), this.__resizeRAF__ && l(this.__resizeRAF__), this.__resizeRAF__ = r(function() {
|
|
308
|
-
(function(w) {
|
|
309
|
-
return w.offsetWidth != w.__resizeLast__.width || w.offsetHeight != w.__resizeLast__.height;
|
|
310
|
-
})(y) && (y.__resizeLast__.width = y.offsetWidth, y.__resizeLast__.height = y.offsetHeight, y.__resizeListeners__.forEach(function(w) {
|
|
311
|
-
w.call(y, m);
|
|
312
|
-
}));
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
}, s = !1, c = "", u = "animationstart", d = "Webkit Moz O ms".split(" "), f = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), h = t.document.createElement("fakeelement");
|
|
316
|
-
if (h.style.animationName !== void 0 && (s = !0), s === !1) {
|
|
317
|
-
for (var g = 0; g < d.length; g++) if (h.style[d[g] + "AnimationName"] !== void 0) {
|
|
318
|
-
c = "-" + d[g].toLowerCase() + "-", u = f[g], s = !0;
|
|
319
|
-
break;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
var v = "resizeanim", _ = "@" + c + "keyframes " + v + " { from { opacity: 0; } to { opacity: 0; } } ", S = c + "animation: 1ms " + v + "; ";
|
|
323
|
-
}
|
|
324
|
-
return { addResizeListener: function(m, y) {
|
|
325
|
-
if (n) m.attachEvent("onresize", y);
|
|
326
|
-
else {
|
|
327
|
-
if (!m.__resizeTriggers__) {
|
|
328
|
-
var w = m.ownerDocument, C = t.getComputedStyle(m);
|
|
329
|
-
C && C.position == "static" && (m.style.position = "relative"), function(b) {
|
|
330
|
-
if (!b.getElementById("detectElementResize")) {
|
|
331
|
-
var I = (_ || "") + ".resize-triggers { " + (S || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', O = b.head || b.getElementsByTagName("head")[0], T = b.createElement("style");
|
|
332
|
-
T.id = "detectElementResize", T.type = "text/css", o != null && T.setAttribute("nonce", o), T.styleSheet ? T.styleSheet.cssText = I : T.appendChild(b.createTextNode(I)), O.appendChild(T);
|
|
333
|
-
}
|
|
334
|
-
}(w), m.__resizeLast__ = {}, m.__resizeListeners__ = [], (m.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
|
|
335
|
-
var R = w.createElement("div");
|
|
336
|
-
R.className = "expand-trigger", R.appendChild(w.createElement("div"));
|
|
337
|
-
var z = w.createElement("div");
|
|
338
|
-
z.className = "contract-trigger", m.__resizeTriggers__.appendChild(R), m.__resizeTriggers__.appendChild(z), m.appendChild(m.__resizeTriggers__), i(m), m.addEventListener("scroll", a, !0), u && (m.__resizeTriggers__.__animationListener__ = function(b) {
|
|
339
|
-
b.animationName == v && i(m);
|
|
340
|
-
}, m.__resizeTriggers__.addEventListener(u, m.__resizeTriggers__.__animationListener__));
|
|
341
|
-
}
|
|
342
|
-
m.__resizeListeners__.push(y);
|
|
343
|
-
}
|
|
344
|
-
}, removeResizeListener: function(m, y) {
|
|
345
|
-
if (n) m.detachEvent("onresize", y);
|
|
346
|
-
else if (m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(y), 1), !m.__resizeListeners__.length) {
|
|
347
|
-
m.removeEventListener("scroll", a, !0), m.__resizeTriggers__.__animationListener__ && (m.__resizeTriggers__.removeEventListener(u, m.__resizeTriggers__.__animationListener__), m.__resizeTriggers__.__animationListener__ = null);
|
|
348
|
-
try {
|
|
349
|
-
m.__resizeTriggers__ = !m.removeChild(m.__resizeTriggers__);
|
|
350
|
-
} catch {
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
} };
|
|
354
|
-
}
|
|
355
|
-
function Ue(o, e) {
|
|
356
|
-
var t = Object.keys(o);
|
|
357
|
-
if (Object.getOwnPropertySymbols) {
|
|
358
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
359
|
-
e && (n = n.filter(function(r) {
|
|
360
|
-
return Object.getOwnPropertyDescriptor(o, r).enumerable;
|
|
361
|
-
})), t.push.apply(t, n);
|
|
362
|
-
}
|
|
363
|
-
return t;
|
|
364
|
-
}
|
|
365
|
-
function Ve(o) {
|
|
366
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
367
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
368
|
-
e % 2 ? Ue(Object(t), !0).forEach(function(n) {
|
|
369
|
-
p(o, n, t[n]);
|
|
370
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Ue(Object(t)).forEach(function(n) {
|
|
371
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
return o;
|
|
375
|
-
}
|
|
376
|
-
function It() {
|
|
377
|
-
try {
|
|
378
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
379
|
-
}));
|
|
380
|
-
} catch {
|
|
381
|
-
}
|
|
382
|
-
return (It = function() {
|
|
383
|
-
return !!o;
|
|
384
|
-
})();
|
|
385
|
-
}
|
|
386
|
-
p(Be, "defaultProps", { disabled: !1, isControlled: !1, mode: "edges", scrollToColumn: 0, scrollToRow: 0 }), ce(Be);
|
|
387
|
-
var Pt = function() {
|
|
388
|
-
function o() {
|
|
389
|
-
var e, t, n, r;
|
|
390
|
-
G(this, o);
|
|
391
|
-
for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
|
|
392
|
-
return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, It() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "state", { height: e.props.defaultHeight || 0, width: e.props.defaultWidth || 0 }), p(e, "_parentNode", void 0), p(e, "_autoSizer", void 0), p(e, "_window", void 0), p(e, "_detectElementResize", void 0), p(e, "_onResize", function() {
|
|
393
|
-
var s = e.props, c = s.disableHeight, u = s.disableWidth, d = s.onResize;
|
|
394
|
-
if (e._parentNode) {
|
|
395
|
-
var f = e._parentNode.offsetHeight || 0, h = e._parentNode.offsetWidth || 0, g = (e._window || window).getComputedStyle(e._parentNode) || {}, v = parseInt(g.paddingLeft, 10) || 0, _ = parseInt(g.paddingRight, 10) || 0, S = parseInt(g.paddingTop, 10) || 0, m = parseInt(g.paddingBottom, 10) || 0, y = f - S - m, w = h - v - _;
|
|
396
|
-
(!c && e.state.height !== y || !u && e.state.width !== w) && (e.setState({ height: f - S - m, width: h - v - _ }), d({ height: f, width: h }));
|
|
397
|
-
}
|
|
398
|
-
}), p(e, "_setRef", function(s) {
|
|
399
|
-
e._autoSizer = s;
|
|
400
|
-
}), e;
|
|
401
|
-
}
|
|
402
|
-
return D(o, x.Component), A(o, [{ key: "componentDidMount", value: function() {
|
|
403
|
-
var e = this.props.nonce;
|
|
404
|
-
this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._window = this._autoSizer.parentNode.ownerDocument.defaultView, this._detectElementResize = zt(e, this._window), this._detectElementResize.addResizeListener(this._parentNode, this._onResize), this._onResize());
|
|
405
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
406
|
-
this._detectElementResize && this._parentNode && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
|
|
407
|
-
} }, { key: "render", value: function() {
|
|
408
|
-
var e = this.props, t = e.children, n = e.className, r = e.disableHeight, l = e.disableWidth, i = e.style, a = this.state, s = a.height, c = a.width, u = { overflow: "visible" }, d = {};
|
|
409
|
-
return r || (u.height = 0, d.height = s), l || (u.width = 0, d.width = c), x.createElement("div", { className: n, ref: this._setRef, style: Ve(Ve({}, u), i) }, t(d));
|
|
410
|
-
} }]);
|
|
411
|
-
}();
|
|
412
|
-
function Ot() {
|
|
413
|
-
try {
|
|
414
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
415
|
-
}));
|
|
416
|
-
} catch {
|
|
417
|
-
}
|
|
418
|
-
return (Ot = function() {
|
|
419
|
-
return !!o;
|
|
420
|
-
})();
|
|
421
|
-
}
|
|
422
|
-
p(Pt, "defaultProps", { onResize: function() {
|
|
423
|
-
}, disableHeight: !1, disableWidth: !1, style: {} });
|
|
424
|
-
var bo = function() {
|
|
425
|
-
function o() {
|
|
426
|
-
var e, t, n, r;
|
|
427
|
-
G(this, o);
|
|
428
|
-
for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
|
|
429
|
-
return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Ot() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "_child", x.createRef()), p(e, "_measure", function() {
|
|
430
|
-
var s = e.props, c = s.cache, u = s.columnIndex, d = u === void 0 ? 0 : u, f = s.parent, h = s.rowIndex, g = h === void 0 ? e.props.index || 0 : h, v = e._getCellMeasurements(), _ = v.height, S = v.width;
|
|
431
|
-
_ === c.getHeight(g, d) && S === c.getWidth(g, d) || (c.set(g, d, S, _), f && typeof f.recomputeGridSize == "function" && f.recomputeGridSize({ columnIndex: d, rowIndex: g }));
|
|
432
|
-
}), p(e, "_registerChild", function(s) {
|
|
433
|
-
!s || s instanceof Element || console.warn("CellMeasurer registerChild expects to be passed Element or null"), e._child.current = s, s && e._maybeMeasureCell();
|
|
434
|
-
}), e;
|
|
435
|
-
}
|
|
436
|
-
return D(o, x.PureComponent), A(o, [{ key: "componentDidMount", value: function() {
|
|
437
|
-
this._maybeMeasureCell();
|
|
438
|
-
} }, { key: "componentDidUpdate", value: function() {
|
|
439
|
-
this._maybeMeasureCell();
|
|
440
|
-
} }, { key: "render", value: function() {
|
|
441
|
-
var e = this, t = this.props.children, n = typeof t == "function" ? t({ measure: this._measure, registerChild: this._registerChild }) : t;
|
|
442
|
-
return n === null ? n : go(n, { ref: function(r) {
|
|
443
|
-
typeof n.ref == "function" ? n.ref(r) : n.ref && (n.ref.current = r), e._child.current = r;
|
|
444
|
-
} });
|
|
445
|
-
} }, { key: "_getCellMeasurements", value: function() {
|
|
446
|
-
var e = this.props.cache, t = this._child.current;
|
|
447
|
-
if (t && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
|
|
448
|
-
var n = t.style.width, r = t.style.height;
|
|
449
|
-
e.hasFixedWidth() || (t.style.width = "auto"), e.hasFixedHeight() || (t.style.height = "auto");
|
|
450
|
-
var l = Math.ceil(t.offsetHeight), i = Math.ceil(t.offsetWidth);
|
|
451
|
-
return n && (t.style.width = n), r && (t.style.height = r), { height: l, width: i };
|
|
452
|
-
}
|
|
453
|
-
return { height: 0, width: 0 };
|
|
454
|
-
} }, { key: "_maybeMeasureCell", value: function() {
|
|
455
|
-
var e = this.props, t = e.cache, n = e.columnIndex, r = n === void 0 ? 0 : n, l = e.parent, i = e.rowIndex, a = i === void 0 ? this.props.index || 0 : i;
|
|
456
|
-
if (!t.has(a, r)) {
|
|
457
|
-
var s = this._getCellMeasurements(), c = s.height, u = s.width;
|
|
458
|
-
t.set(a, r, u, c), l && typeof l.invalidateCellSizeAfterRender == "function" && l.invalidateCellSizeAfterRender({ columnIndex: r, rowIndex: a });
|
|
459
|
-
}
|
|
460
|
-
} }]);
|
|
461
|
-
}();
|
|
462
|
-
function Q() {
|
|
463
|
-
var o = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0], e = {};
|
|
464
|
-
return function(t) {
|
|
465
|
-
var n = t.callback, r = t.indices, l = Object.keys(r), i = !o || l.every(function(s) {
|
|
466
|
-
var c = r[s];
|
|
467
|
-
return Array.isArray(c) ? c.length > 0 : c >= 0;
|
|
468
|
-
}), a = l.length !== Object.keys(e).length || l.some(function(s) {
|
|
469
|
-
var c = e[s], u = r[s];
|
|
470
|
-
return Array.isArray(u) ? c.join(",") !== u.join(",") : c !== u;
|
|
471
|
-
});
|
|
472
|
-
e = r, i && a && n(r);
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
p(bo, "__internalCellMeasurerFlag", !1);
|
|
476
|
-
const To = !(typeof window > "u" || !window.document || !window.document.createElement);
|
|
477
|
-
var pe;
|
|
478
|
-
function be(o) {
|
|
479
|
-
if ((!pe && pe !== 0 || o) && To) {
|
|
480
|
-
var e = document.createElement("div");
|
|
481
|
-
e.style.position = "absolute", e.style.top = "-9999px", e.style.width = "50px", e.style.height = "50px", e.style.overflow = "scroll", document.body.appendChild(e), pe = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
482
|
-
}
|
|
483
|
-
return pe;
|
|
484
|
-
}
|
|
485
|
-
function qe(o, e) {
|
|
486
|
-
var t = Object.keys(o);
|
|
487
|
-
if (Object.getOwnPropertySymbols) {
|
|
488
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
489
|
-
e && (n = n.filter(function(r) {
|
|
490
|
-
return Object.getOwnPropertyDescriptor(o, r).enumerable;
|
|
491
|
-
})), t.push.apply(t, n);
|
|
492
|
-
}
|
|
493
|
-
return t;
|
|
494
|
-
}
|
|
495
|
-
function Ke(o) {
|
|
496
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
497
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
498
|
-
e % 2 ? qe(Object(t), !0).forEach(function(n) {
|
|
499
|
-
p(o, n, t[n]);
|
|
500
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : qe(Object(t)).forEach(function(n) {
|
|
501
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
return o;
|
|
505
|
-
}
|
|
506
|
-
function kt() {
|
|
507
|
-
try {
|
|
508
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
509
|
-
}));
|
|
510
|
-
} catch {
|
|
511
|
-
}
|
|
512
|
-
return (kt = function() {
|
|
513
|
-
return !!o;
|
|
514
|
-
})();
|
|
515
|
-
}
|
|
516
|
-
var zo = "observed", te = "requested", ve = function() {
|
|
517
|
-
function o() {
|
|
518
|
-
var e, t, n, r;
|
|
519
|
-
G(this, o);
|
|
520
|
-
for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
|
|
521
|
-
return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, kt() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "state", { isScrolling: !1, scrollLeft: 0, scrollTop: 0 }), p(e, "_calculateSizeAndPositionDataOnNextUpdate", !1), p(e, "_onSectionRenderedMemoizer", Q()), p(e, "_onScrollMemoizer", Q(!1)), p(e, "_invokeOnSectionRenderedHelper", function() {
|
|
522
|
-
var s = e.props, c = s.cellLayoutManager, u = s.onSectionRendered;
|
|
523
|
-
e._onSectionRenderedMemoizer({ callback: u, indices: { indices: c.getLastRenderedIndices() } });
|
|
524
|
-
}), p(e, "_setScrollingContainerRef", function(s) {
|
|
525
|
-
e._scrollingContainer = s;
|
|
526
|
-
}), p(e, "_updateScrollPositionForScrollToCell", function() {
|
|
527
|
-
var s = e.props, c = s.cellLayoutManager, u = s.height, d = s.scrollToAlignment, f = s.scrollToCell, h = s.width, g = e.state, v = g.scrollLeft, _ = g.scrollTop;
|
|
528
|
-
if (f >= 0) {
|
|
529
|
-
var S = c.getScrollPositionForCell({ align: d, cellIndex: f, height: u, scrollLeft: v, scrollTop: _, width: h });
|
|
530
|
-
S.scrollLeft === v && S.scrollTop === _ || e._setScrollPosition(S);
|
|
531
|
-
}
|
|
532
|
-
}), p(e, "_onScroll", function(s) {
|
|
533
|
-
if (s.target === e._scrollingContainer) {
|
|
534
|
-
e._enablePointerEventsAfterDelay();
|
|
535
|
-
var c = e.props, u = c.cellLayoutManager, d = c.height, f = c.isScrollingChange, h = c.width, g = e._scrollbarSize, v = u.getTotalSize(), _ = v.height, S = v.width, m = Math.max(0, Math.min(S - h + g, s.target.scrollLeft)), y = Math.max(0, Math.min(_ - d + g, s.target.scrollTop));
|
|
536
|
-
if (e.state.scrollLeft !== m || e.state.scrollTop !== y) {
|
|
537
|
-
var w = s.cancelable ? zo : te;
|
|
538
|
-
e.state.isScrolling || f(!0), e.setState({ isScrolling: !0, scrollLeft: m, scrollPositionChangeReason: w, scrollTop: y });
|
|
539
|
-
}
|
|
540
|
-
e._invokeOnScrollMemoizer({ scrollLeft: m, scrollTop: y, totalWidth: S, totalHeight: _ });
|
|
541
|
-
}
|
|
542
|
-
}), e._scrollbarSize = be(), e._scrollbarSize === void 0 ? (e._scrollbarSizeMeasured = !1, e._scrollbarSize = 0) : e._scrollbarSizeMeasured = !0, e;
|
|
543
|
-
}
|
|
544
|
-
return D(o, x.PureComponent), A(o, [{ key: "recomputeCellSizesAndPositions", value: function() {
|
|
545
|
-
this._calculateSizeAndPositionDataOnNextUpdate = !0, this.forceUpdate();
|
|
546
|
-
} }, { key: "componentDidMount", value: function() {
|
|
547
|
-
var e = this.props, t = e.cellLayoutManager, n = e.scrollLeft, r = e.scrollToCell, l = e.scrollTop;
|
|
548
|
-
this._scrollbarSizeMeasured || (this._scrollbarSize = be(), this._scrollbarSizeMeasured = !0, this.setState({})), r >= 0 ? this._updateScrollPositionForScrollToCell() : (n >= 0 || l >= 0) && this._setScrollPosition({ scrollLeft: n, scrollTop: l }), this._invokeOnSectionRenderedHelper();
|
|
549
|
-
var i = t.getTotalSize(), a = i.height, s = i.width;
|
|
550
|
-
this._invokeOnScrollMemoizer({ scrollLeft: n || 0, scrollTop: l || 0, totalHeight: a, totalWidth: s });
|
|
551
|
-
} }, { key: "componentDidUpdate", value: function(e, t) {
|
|
552
|
-
var n = this.props, r = n.height, l = n.scrollToAlignment, i = n.scrollToCell, a = n.width, s = this.state, c = s.scrollLeft, u = s.scrollPositionChangeReason, d = s.scrollTop;
|
|
553
|
-
u === te && (c >= 0 && c !== t.scrollLeft && c !== this._scrollingContainer.scrollLeft && (this._scrollingContainer.scrollLeft = c), d >= 0 && d !== t.scrollTop && d !== this._scrollingContainer.scrollTop && (this._scrollingContainer.scrollTop = d)), r === e.height && l === e.scrollToAlignment && i === e.scrollToCell && a === e.width || this._updateScrollPositionForScrollToCell(), this._invokeOnSectionRenderedHelper();
|
|
554
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
555
|
-
this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId);
|
|
556
|
-
} }, { key: "render", value: function() {
|
|
557
|
-
var e = this.props, t = e.autoHeight, n = e.cellCount, r = e.cellLayoutManager, l = e.className, i = e.height, a = e.horizontalOverscanSize, s = e.id, c = e.noContentRenderer, u = e.style, d = e.verticalOverscanSize, f = e.width, h = this.state, g = h.isScrolling, v = h.scrollLeft, _ = h.scrollTop;
|
|
558
|
-
(this._lastRenderedCellCount !== n || this._lastRenderedCellLayoutManager !== r || this._calculateSizeAndPositionDataOnNextUpdate) && (this._lastRenderedCellCount = n, this._lastRenderedCellLayoutManager = r, this._calculateSizeAndPositionDataOnNextUpdate = !1, r.calculateSizeAndPositionData());
|
|
559
|
-
var S = r.getTotalSize(), m = S.height, y = S.width, w = Math.max(0, v - a), C = Math.max(0, _ - d), R = Math.min(y, v + f + a), z = Math.min(m, _ + i + d), b = i > 0 && f > 0 ? r.cellRenderers({ height: z - C, isScrolling: g, width: R - w, x: w, y: C }) : [], I = { boxSizing: "border-box", direction: "ltr", height: t ? "auto" : i, position: "relative", WebkitOverflowScrolling: "touch", width: f, willChange: "transform" }, O = m > i ? this._scrollbarSize : 0, T = y > f ? this._scrollbarSize : 0;
|
|
560
|
-
return I.overflowX = y + O <= f ? "hidden" : "auto", I.overflowY = m + T <= i ? "hidden" : "auto", x.createElement("div", { ref: this._setScrollingContainerRef, "aria-label": this.props["aria-label"], className: N("ReactVirtualized__Collection", l), id: s, onScroll: this._onScroll, role: "grid", style: Ke(Ke({}, I), u), tabIndex: 0 }, n > 0 && x.createElement("div", { className: "ReactVirtualized__Collection__innerScrollContainer", style: { height: m, maxHeight: m, maxWidth: y, overflow: "hidden", pointerEvents: g ? "none" : "", width: y } }, b), n === 0 && c());
|
|
561
|
-
} }, { key: "_enablePointerEventsAfterDelay", value: function() {
|
|
562
|
-
var e = this;
|
|
563
|
-
this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId), this._disablePointerEventsTimeoutId = setTimeout(function() {
|
|
564
|
-
(0, e.props.isScrollingChange)(!1), e._disablePointerEventsTimeoutId = null, e.setState({ isScrolling: !1 });
|
|
565
|
-
}, 150);
|
|
566
|
-
} }, { key: "_invokeOnScrollMemoizer", value: function(e) {
|
|
567
|
-
var t = this, n = e.scrollLeft, r = e.scrollTop, l = e.totalHeight, i = e.totalWidth;
|
|
568
|
-
this._onScrollMemoizer({ callback: function(a) {
|
|
569
|
-
var s = a.scrollLeft, c = a.scrollTop, u = t.props, d = u.height;
|
|
570
|
-
(0, u.onScroll)({ clientHeight: d, clientWidth: u.width, scrollHeight: l, scrollLeft: s, scrollTop: c, scrollWidth: i });
|
|
571
|
-
}, indices: { scrollLeft: n, scrollTop: r } });
|
|
572
|
-
} }, { key: "_setScrollPosition", value: function(e) {
|
|
573
|
-
var t = e.scrollLeft, n = e.scrollTop, r = { scrollPositionChangeReason: te };
|
|
574
|
-
t >= 0 && (r.scrollLeft = t), n >= 0 && (r.scrollTop = n), (t >= 0 && t !== this.state.scrollLeft || n >= 0 && n !== this.state.scrollTop) && this.setState(r);
|
|
575
|
-
} }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
|
|
576
|
-
return e.cellCount !== 0 || t.scrollLeft === 0 && t.scrollTop === 0 ? e.scrollLeft !== t.scrollLeft || e.scrollTop !== t.scrollTop ? { scrollLeft: e.scrollLeft != null ? e.scrollLeft : t.scrollLeft, scrollTop: e.scrollTop != null ? e.scrollTop : t.scrollTop, scrollPositionChangeReason: te } : null : { scrollLeft: 0, scrollTop: 0, scrollPositionChangeReason: te };
|
|
577
|
-
} }]);
|
|
578
|
-
}();
|
|
579
|
-
p(ve, "defaultProps", { "aria-label": "grid", horizontalOverscanSize: 0, noContentRenderer: function() {
|
|
580
|
-
return null;
|
|
581
|
-
}, onScroll: function() {
|
|
582
|
-
return null;
|
|
583
|
-
}, onSectionRendered: function() {
|
|
584
|
-
return null;
|
|
585
|
-
}, scrollToAlignment: "auto", scrollToCell: -1, style: {}, verticalOverscanSize: 0 }), ve.propTypes = {}, ce(ve);
|
|
586
|
-
var Io = function() {
|
|
587
|
-
return A(function o(e) {
|
|
588
|
-
var t = e.height, n = e.width, r = e.x, l = e.y;
|
|
589
|
-
G(this, o), this.height = t, this.width = n, this.x = r, this.y = l, this._indexMap = {}, this._indices = [];
|
|
590
|
-
}, [{ key: "addCellIndex", value: function(o) {
|
|
591
|
-
var e = o.index;
|
|
592
|
-
this._indexMap[e] || (this._indexMap[e] = !0, this._indices.push(e));
|
|
593
|
-
} }, { key: "getCellIndices", value: function() {
|
|
594
|
-
return this._indices;
|
|
595
|
-
} }, { key: "toString", value: function() {
|
|
596
|
-
return "".concat(this.x, ",").concat(this.y, " ").concat(this.width, "x").concat(this.height);
|
|
597
|
-
} }]);
|
|
598
|
-
}(), Po = function() {
|
|
599
|
-
return A(function o() {
|
|
600
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 100;
|
|
601
|
-
G(this, o), this._sectionSize = e, this._cellMetadata = [], this._sections = {};
|
|
602
|
-
}, [{ key: "getCellIndices", value: function(o) {
|
|
603
|
-
var e = o.height, t = o.width, n = o.x, r = o.y, l = {};
|
|
604
|
-
return this.getSections({ height: e, width: t, x: n, y: r }).forEach(function(i) {
|
|
605
|
-
return i.getCellIndices().forEach(function(a) {
|
|
606
|
-
l[a] = a;
|
|
607
|
-
});
|
|
608
|
-
}), Object.keys(l).map(function(i) {
|
|
609
|
-
return l[i];
|
|
610
|
-
});
|
|
611
|
-
} }, { key: "getCellMetadata", value: function(o) {
|
|
612
|
-
var e = o.index;
|
|
613
|
-
return this._cellMetadata[e];
|
|
614
|
-
} }, { key: "getSections", value: function(o) {
|
|
615
|
-
for (var e = o.height, t = o.width, n = o.x, r = o.y, l = Math.floor(n / this._sectionSize), i = Math.floor((n + t - 1) / this._sectionSize), a = Math.floor(r / this._sectionSize), s = Math.floor((r + e - 1) / this._sectionSize), c = [], u = l; u <= i; u++) for (var d = a; d <= s; d++) {
|
|
616
|
-
var f = "".concat(u, ".").concat(d);
|
|
617
|
-
this._sections[f] || (this._sections[f] = new Io({ height: this._sectionSize, width: this._sectionSize, x: u * this._sectionSize, y: d * this._sectionSize })), c.push(this._sections[f]);
|
|
618
|
-
}
|
|
619
|
-
return c;
|
|
620
|
-
} }, { key: "getTotalSectionCount", value: function() {
|
|
621
|
-
return Object.keys(this._sections).length;
|
|
622
|
-
} }, { key: "toString", value: function() {
|
|
623
|
-
var o = this;
|
|
624
|
-
return Object.keys(this._sections).map(function(e) {
|
|
625
|
-
return o._sections[e].toString();
|
|
626
|
-
});
|
|
627
|
-
} }, { key: "registerCell", value: function(o) {
|
|
628
|
-
var e = o.cellMetadatum, t = o.index;
|
|
629
|
-
this._cellMetadata[t] = e, this.getSections(e).forEach(function(n) {
|
|
630
|
-
return n.addCellIndex({ index: t });
|
|
631
|
-
});
|
|
632
|
-
} }]);
|
|
633
|
-
}();
|
|
634
|
-
function $e(o) {
|
|
635
|
-
var e = o.align, t = e === void 0 ? "auto" : e, n = o.cellOffset, r = o.cellSize, l = o.containerSize, i = o.currentOffset, a = n, s = a - l + r;
|
|
636
|
-
switch (t) {
|
|
637
|
-
case "start":
|
|
638
|
-
return a;
|
|
639
|
-
case "end":
|
|
640
|
-
return s;
|
|
641
|
-
case "center":
|
|
642
|
-
return a - (l - r) / 2;
|
|
643
|
-
default:
|
|
644
|
-
return Math.max(s, Math.min(a, i));
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
function Mt() {
|
|
648
|
-
try {
|
|
649
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
650
|
-
}));
|
|
651
|
-
} catch {
|
|
652
|
-
}
|
|
653
|
-
return (Mt = function() {
|
|
654
|
-
return !!o;
|
|
655
|
-
})();
|
|
656
|
-
}
|
|
657
|
-
var Xe = function() {
|
|
658
|
-
function o(e, t) {
|
|
659
|
-
var n, r, l, i;
|
|
660
|
-
return G(this, o), r = this, i = [e, t], l = P(l = o), (n = H(r, Mt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i)))._cellMetadata = [], n._lastRenderedCellIndices = [], n._cellCache = [], n._isScrollingChange = n._isScrollingChange.bind(n), n._setCollectionViewRef = n._setCollectionViewRef.bind(n), n;
|
|
661
|
-
}
|
|
662
|
-
return D(o, x.PureComponent), A(o, [{ key: "forceUpdate", value: function() {
|
|
663
|
-
this._collectionView !== void 0 && this._collectionView.forceUpdate();
|
|
664
|
-
} }, { key: "recomputeCellSizesAndPositions", value: function() {
|
|
665
|
-
this._cellCache = [], this._collectionView.recomputeCellSizesAndPositions();
|
|
666
|
-
} }, { key: "render", value: function() {
|
|
667
|
-
var e = U({}, (function(t) {
|
|
668
|
-
if (t == null) throw new TypeError("Cannot destructure " + t);
|
|
669
|
-
}(this.props), this.props));
|
|
670
|
-
return x.createElement(ve, U({ cellLayoutManager: this, isScrollingChange: this._isScrollingChange, ref: this._setCollectionViewRef }, e));
|
|
671
|
-
} }, { key: "calculateSizeAndPositionData", value: function() {
|
|
672
|
-
var e = this.props, t = function(n) {
|
|
673
|
-
for (var r = n.cellCount, l = n.cellSizeAndPositionGetter, i = n.sectionSize, a = [], s = new Po(i), c = 0, u = 0, d = 0; d < r; d++) {
|
|
674
|
-
var f = l({ index: d });
|
|
675
|
-
if (f.height == null || isNaN(f.height) || f.width == null || isNaN(f.width) || f.x == null || isNaN(f.x) || f.y == null || isNaN(f.y)) throw Error("Invalid metadata returned for cell ".concat(d, `:
|
|
676
|
-
x:`).concat(f.x, ", y:").concat(f.y, ", width:").concat(f.width, ", height:").concat(f.height));
|
|
677
|
-
c = Math.max(c, f.y + f.height), u = Math.max(u, f.x + f.width), a[d] = f, s.registerCell({ cellMetadatum: f, index: d });
|
|
678
|
-
}
|
|
679
|
-
return { cellMetadata: a, height: c, sectionManager: s, width: u };
|
|
680
|
-
}({ cellCount: e.cellCount, cellSizeAndPositionGetter: e.cellSizeAndPositionGetter, sectionSize: e.sectionSize });
|
|
681
|
-
this._cellMetadata = t.cellMetadata, this._sectionManager = t.sectionManager, this._height = t.height, this._width = t.width;
|
|
682
|
-
} }, { key: "getLastRenderedIndices", value: function() {
|
|
683
|
-
return this._lastRenderedCellIndices;
|
|
684
|
-
} }, { key: "getScrollPositionForCell", value: function(e) {
|
|
685
|
-
var t = e.align, n = e.cellIndex, r = e.height, l = e.scrollLeft, i = e.scrollTop, a = e.width, s = this.props.cellCount;
|
|
686
|
-
if (n >= 0 && n < s) {
|
|
687
|
-
var c = this._cellMetadata[n];
|
|
688
|
-
l = $e({ align: t, cellOffset: c.x, cellSize: c.width, containerSize: a, currentOffset: l }), i = $e({ align: t, cellOffset: c.y, cellSize: c.height, containerSize: r, currentOffset: i });
|
|
689
|
-
}
|
|
690
|
-
return { scrollLeft: l, scrollTop: i };
|
|
691
|
-
} }, { key: "getTotalSize", value: function() {
|
|
692
|
-
return { height: this._height, width: this._width };
|
|
693
|
-
} }, { key: "cellRenderers", value: function(e) {
|
|
694
|
-
var t = this, n = e.height, r = e.isScrolling, l = e.width, i = e.x, a = e.y, s = this.props, c = s.cellGroupRenderer, u = s.cellRenderer;
|
|
695
|
-
return this._lastRenderedCellIndices = this._sectionManager.getCellIndices({ height: n, width: l, x: i, y: a }), c({ cellCache: this._cellCache, cellRenderer: u, cellSizeAndPositionGetter: function(d) {
|
|
696
|
-
var f = d.index;
|
|
697
|
-
return t._sectionManager.getCellMetadata({ index: f });
|
|
698
|
-
}, indices: this._lastRenderedCellIndices, isScrolling: r });
|
|
699
|
-
} }, { key: "_isScrollingChange", value: function(e) {
|
|
700
|
-
e || (this._cellCache = []);
|
|
701
|
-
} }, { key: "_setCollectionViewRef", value: function(e) {
|
|
702
|
-
this._collectionView = e;
|
|
703
|
-
} }]);
|
|
704
|
-
}();
|
|
705
|
-
function Lt() {
|
|
706
|
-
try {
|
|
707
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
708
|
-
}));
|
|
709
|
-
} catch {
|
|
710
|
-
}
|
|
711
|
-
return (Lt = function() {
|
|
712
|
-
return !!o;
|
|
713
|
-
})();
|
|
714
|
-
}
|
|
715
|
-
function Ye(o) {
|
|
716
|
-
var e = o.cellCount, t = o.cellSize, n = o.computeMetadataCallback, r = o.computeMetadataCallbackProps, l = o.nextCellsCount, i = o.nextCellSize, a = o.nextScrollToIndex, s = o.scrollToIndex, c = o.updateScrollOffsetForScrollToIndex;
|
|
717
|
-
e === l && (typeof t != "number" && typeof i != "number" || t === i) || (n(r), s >= 0 && s === a && c());
|
|
718
|
-
}
|
|
719
|
-
function ne(o, e) {
|
|
720
|
-
if (o == null) return {};
|
|
721
|
-
var t, n, r = ho(o, e);
|
|
722
|
-
if (Object.getOwnPropertySymbols) {
|
|
723
|
-
var l = Object.getOwnPropertySymbols(o);
|
|
724
|
-
for (n = 0; n < l.length; n++) t = l[n], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(o, t) && (r[t] = o[t]);
|
|
725
|
-
}
|
|
726
|
-
return r;
|
|
727
|
-
}
|
|
728
|
-
p(Xe, "defaultProps", { "aria-label": "grid", cellGroupRenderer: function(o) {
|
|
729
|
-
var e = o.cellCache, t = o.cellRenderer, n = o.cellSizeAndPositionGetter, r = o.indices, l = o.isScrolling;
|
|
730
|
-
return r.map(function(i) {
|
|
731
|
-
var a = n({ index: i }), s = { index: i, isScrolling: l, key: i, style: { height: a.height, left: a.x, position: "absolute", top: a.y, width: a.width } };
|
|
732
|
-
return l ? (i in e || (e[i] = t(s)), e[i]) : t(s);
|
|
733
|
-
}).filter(function(i) {
|
|
734
|
-
return !!i;
|
|
735
|
-
});
|
|
736
|
-
} }), Xe.propTypes = {}, function() {
|
|
737
|
-
function o(e, t) {
|
|
738
|
-
var n, r, l, i;
|
|
739
|
-
return G(this, o), r = this, i = [e, t], l = P(l = o), (n = H(r, Lt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i)))._registerChild = n._registerChild.bind(n), n;
|
|
740
|
-
}
|
|
741
|
-
return D(o, x.PureComponent), A(o, [{ key: "componentDidUpdate", value: function(e) {
|
|
742
|
-
var t = this.props, n = t.columnMaxWidth, r = t.columnMinWidth, l = t.columnCount, i = t.width;
|
|
743
|
-
n === e.columnMaxWidth && r === e.columnMinWidth && l === e.columnCount && i === e.width || this._registeredChild && this._registeredChild.recomputeGridSize();
|
|
744
|
-
} }, { key: "render", value: function() {
|
|
745
|
-
var e = this.props, t = e.children, n = e.columnMaxWidth, r = e.columnMinWidth, l = e.columnCount, i = e.width, a = r || 1, s = n ? Math.min(n, i) : i, c = i / l;
|
|
746
|
-
return c = Math.max(a, c), c = Math.min(s, c), c = Math.floor(c), t({ adjustedWidth: Math.min(i, c * l), columnWidth: c, getColumnWidth: function() {
|
|
747
|
-
return c;
|
|
748
|
-
}, registerChild: this._registerChild });
|
|
749
|
-
} }, { key: "_registerChild", value: function(e) {
|
|
750
|
-
if (e && typeof e.recomputeGridSize != "function") throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");
|
|
751
|
-
this._registeredChild = e, this._registeredChild && this._registeredChild.recomputeGridSize();
|
|
752
|
-
} }]);
|
|
753
|
-
}().propTypes = {};
|
|
754
|
-
var F, Oo = function() {
|
|
755
|
-
return A(function o(e) {
|
|
756
|
-
var t = e.cellCount, n = e.cellSizeGetter, r = e.estimatedCellSize;
|
|
757
|
-
G(this, o), p(this, "_cellSizeAndPositionData", {}), p(this, "_lastMeasuredIndex", -1), p(this, "_lastBatchedIndex", -1), p(this, "_cellCount", void 0), p(this, "_cellSizeGetter", void 0), p(this, "_estimatedCellSize", void 0), this._cellSizeGetter = n, this._cellCount = t, this._estimatedCellSize = r;
|
|
758
|
-
}, [{ key: "areOffsetsAdjusted", value: function() {
|
|
759
|
-
return !1;
|
|
760
|
-
} }, { key: "configure", value: function(o) {
|
|
761
|
-
var e = o.cellCount, t = o.estimatedCellSize, n = o.cellSizeGetter;
|
|
762
|
-
this._cellCount = e, this._estimatedCellSize = t, this._cellSizeGetter = n;
|
|
763
|
-
} }, { key: "getCellCount", value: function() {
|
|
764
|
-
return this._cellCount;
|
|
765
|
-
} }, { key: "getEstimatedCellSize", value: function() {
|
|
766
|
-
return this._estimatedCellSize;
|
|
767
|
-
} }, { key: "getLastMeasuredIndex", value: function() {
|
|
768
|
-
return this._lastMeasuredIndex;
|
|
769
|
-
} }, { key: "getOffsetAdjustment", value: function() {
|
|
770
|
-
return 0;
|
|
771
|
-
} }, { key: "getSizeAndPositionOfCell", value: function(o) {
|
|
772
|
-
if (o < 0 || o >= this._cellCount) throw Error("Requested index ".concat(o, " is outside of range 0..").concat(this._cellCount));
|
|
773
|
-
if (o > this._lastMeasuredIndex) for (var e = this.getSizeAndPositionOfLastMeasuredCell(), t = e.offset + e.size, n = this._lastMeasuredIndex + 1; n <= o; n++) {
|
|
774
|
-
var r = this._cellSizeGetter({ index: n });
|
|
775
|
-
if (r === void 0 || isNaN(r)) throw Error("Invalid size returned for cell ".concat(n, " of value ").concat(r));
|
|
776
|
-
r === null ? (this._cellSizeAndPositionData[n] = { offset: t, size: 0 }, this._lastBatchedIndex = o) : (this._cellSizeAndPositionData[n] = { offset: t, size: r }, t += r, this._lastMeasuredIndex = o);
|
|
777
|
-
}
|
|
778
|
-
return this._cellSizeAndPositionData[o];
|
|
779
|
-
} }, { key: "getSizeAndPositionOfLastMeasuredCell", value: function() {
|
|
780
|
-
return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : { offset: 0, size: 0 };
|
|
781
|
-
} }, { key: "getTotalSize", value: function() {
|
|
782
|
-
var o = this.getSizeAndPositionOfLastMeasuredCell();
|
|
783
|
-
return o.offset + o.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;
|
|
784
|
-
} }, { key: "getUpdatedOffsetForIndex", value: function(o) {
|
|
785
|
-
var e = o.align, t = e === void 0 ? "auto" : e, n = o.containerSize, r = o.currentOffset, l = o.targetIndex;
|
|
786
|
-
if (n <= 0) return 0;
|
|
787
|
-
var i, a = this.getSizeAndPositionOfCell(l), s = a.offset, c = s - n + a.size;
|
|
788
|
-
switch (t) {
|
|
789
|
-
case "start":
|
|
790
|
-
i = s;
|
|
791
|
-
break;
|
|
792
|
-
case "end":
|
|
793
|
-
i = c;
|
|
794
|
-
break;
|
|
795
|
-
case "center":
|
|
796
|
-
i = s - (n - a.size) / 2;
|
|
797
|
-
break;
|
|
798
|
-
default:
|
|
799
|
-
i = Math.max(c, Math.min(s, r));
|
|
800
|
-
}
|
|
801
|
-
var u = this.getTotalSize();
|
|
802
|
-
return Math.max(0, Math.min(u - n, i));
|
|
803
|
-
} }, { key: "getVisibleCellRange", value: function(o) {
|
|
804
|
-
var e = o.containerSize, t = o.offset;
|
|
805
|
-
if (this.getTotalSize() === 0) return {};
|
|
806
|
-
var n = t + e, r = this._findNearestCell(t), l = this.getSizeAndPositionOfCell(r);
|
|
807
|
-
t = l.offset + l.size;
|
|
808
|
-
for (var i = r; t < n && i < this._cellCount - 1; ) i++, t += this.getSizeAndPositionOfCell(i).size;
|
|
809
|
-
return { start: r, stop: i };
|
|
810
|
-
} }, { key: "resetCell", value: function(o) {
|
|
811
|
-
this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, o - 1);
|
|
812
|
-
} }, { key: "_binarySearch", value: function(o, e, t) {
|
|
813
|
-
for (; e <= o; ) {
|
|
814
|
-
var n = e + Math.floor((o - e) / 2), r = this.getSizeAndPositionOfCell(n).offset;
|
|
815
|
-
if (r === t) return n;
|
|
816
|
-
r < t ? e = n + 1 : r > t && (o = n - 1);
|
|
817
|
-
}
|
|
818
|
-
return e > 0 ? e - 1 : 0;
|
|
819
|
-
} }, { key: "_exponentialSearch", value: function(o, e) {
|
|
820
|
-
for (var t = 1; o < this._cellCount && this.getSizeAndPositionOfCell(o).offset < e; ) o += t, t *= 2;
|
|
821
|
-
return this._binarySearch(Math.min(o, this._cellCount - 1), Math.floor(o / 2), e);
|
|
822
|
-
} }, { key: "_findNearestCell", value: function(o) {
|
|
823
|
-
if (isNaN(o)) throw Error("Invalid offset ".concat(o, " specified"));
|
|
824
|
-
o = Math.max(0, o);
|
|
825
|
-
var e = this.getSizeAndPositionOfLastMeasuredCell(), t = Math.max(0, this._lastMeasuredIndex);
|
|
826
|
-
return e.offset >= o ? this._binarySearch(t, 0, o) : this._exponentialSearch(t, o);
|
|
827
|
-
} }]);
|
|
828
|
-
}(), ko = function() {
|
|
829
|
-
return typeof window < "u" && window.chrome ? 16777100 : 15e5;
|
|
830
|
-
}, Mo = ["maxScrollSize"], Je = function() {
|
|
831
|
-
return A(function o(e) {
|
|
832
|
-
var t = e.maxScrollSize, n = t === void 0 ? ko() : t, r = ne(e, Mo);
|
|
833
|
-
G(this, o), p(this, "_cellSizeAndPositionManager", void 0), p(this, "_maxScrollSize", void 0), this._cellSizeAndPositionManager = new Oo(r), this._maxScrollSize = n;
|
|
834
|
-
}, [{ key: "areOffsetsAdjusted", value: function() {
|
|
835
|
-
return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;
|
|
836
|
-
} }, { key: "configure", value: function(o) {
|
|
837
|
-
this._cellSizeAndPositionManager.configure(o);
|
|
838
|
-
} }, { key: "getCellCount", value: function() {
|
|
839
|
-
return this._cellSizeAndPositionManager.getCellCount();
|
|
840
|
-
} }, { key: "getEstimatedCellSize", value: function() {
|
|
841
|
-
return this._cellSizeAndPositionManager.getEstimatedCellSize();
|
|
842
|
-
} }, { key: "getLastMeasuredIndex", value: function() {
|
|
843
|
-
return this._cellSizeAndPositionManager.getLastMeasuredIndex();
|
|
844
|
-
} }, { key: "getOffsetAdjustment", value: function(o) {
|
|
845
|
-
var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize(), l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: r });
|
|
846
|
-
return Math.round(l * (r - n));
|
|
847
|
-
} }, { key: "getSizeAndPositionOfCell", value: function(o) {
|
|
848
|
-
return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(o);
|
|
849
|
-
} }, { key: "getSizeAndPositionOfLastMeasuredCell", value: function() {
|
|
850
|
-
return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
|
|
851
|
-
} }, { key: "getTotalSize", value: function() {
|
|
852
|
-
return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());
|
|
853
|
-
} }, { key: "getUpdatedOffsetForIndex", value: function(o) {
|
|
854
|
-
var e = o.align, t = e === void 0 ? "auto" : e, n = o.containerSize, r = o.currentOffset, l = o.targetIndex;
|
|
855
|
-
r = this._safeOffsetToOffset({ containerSize: n, offset: r });
|
|
856
|
-
var i = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({ align: t, containerSize: n, currentOffset: r, targetIndex: l });
|
|
857
|
-
return this._offsetToSafeOffset({ containerSize: n, offset: i });
|
|
858
|
-
} }, { key: "getVisibleCellRange", value: function(o) {
|
|
859
|
-
var e = o.containerSize, t = o.offset;
|
|
860
|
-
return t = this._safeOffsetToOffset({ containerSize: e, offset: t }), this._cellSizeAndPositionManager.getVisibleCellRange({ containerSize: e, offset: t });
|
|
861
|
-
} }, { key: "resetCell", value: function(o) {
|
|
862
|
-
this._cellSizeAndPositionManager.resetCell(o);
|
|
863
|
-
} }, { key: "_getOffsetPercentage", value: function(o) {
|
|
864
|
-
var e = o.containerSize, t = o.offset, n = o.totalSize;
|
|
865
|
-
return n <= e ? 0 : t / (n - e);
|
|
866
|
-
} }, { key: "_offsetToSafeOffset", value: function(o) {
|
|
867
|
-
var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize();
|
|
868
|
-
if (n === r) return t;
|
|
869
|
-
var l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: n });
|
|
870
|
-
return Math.round(l * (r - e));
|
|
871
|
-
} }, { key: "_safeOffsetToOffset", value: function(o) {
|
|
872
|
-
var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize();
|
|
873
|
-
if (n === r) return t;
|
|
874
|
-
var l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: r });
|
|
875
|
-
return Math.round(l * (n - e));
|
|
876
|
-
} }]);
|
|
877
|
-
}();
|
|
878
|
-
function Ze(o) {
|
|
879
|
-
var e = o.cellSize, t = o.cellSizeAndPositionManager, n = o.previousCellsCount, r = o.previousCellSize, l = o.previousScrollToAlignment, i = o.previousScrollToIndex, a = o.previousSize, s = o.scrollOffset, c = o.scrollToAlignment, u = o.scrollToIndex, d = o.size, f = o.sizeJustIncreasedFromZero, h = o.updateScrollIndexCallback, g = t.getCellCount(), v = u >= 0 && u < g;
|
|
880
|
-
v && (d !== a || f || !r || typeof e == "number" && e !== r || c !== l || u !== i) ? h(u) : !v && g > 0 && (d < a || g < n) && s > t.getTotalSize() - d && h(g - 1);
|
|
881
|
-
}
|
|
882
|
-
var Lo = (F = typeof window < "u" ? window : typeof self < "u" ? self : {}).requestAnimationFrame || F.webkitRequestAnimationFrame || F.mozRequestAnimationFrame || F.oRequestAnimationFrame || F.msRequestAnimationFrame || function(o) {
|
|
883
|
-
return F.setTimeout(o, 1e3 / 60);
|
|
884
|
-
}, Go = F.cancelAnimationFrame || F.webkitCancelAnimationFrame || F.mozCancelAnimationFrame || F.oCancelAnimationFrame || F.msCancelAnimationFrame || function(o) {
|
|
885
|
-
F.clearTimeout(o);
|
|
886
|
-
}, Qe = Lo, Ao = Go, ee = function(o) {
|
|
887
|
-
return Ao(o.id);
|
|
888
|
-
}, Le = function(o, e) {
|
|
889
|
-
var t;
|
|
890
|
-
Promise.resolve().then(function() {
|
|
891
|
-
t = Date.now();
|
|
892
|
-
});
|
|
893
|
-
var n = function() {
|
|
894
|
-
Date.now() - t >= e ? o.call() : r.id = Qe(n);
|
|
895
|
-
}, r = { id: Qe(n) };
|
|
896
|
-
return r;
|
|
897
|
-
};
|
|
898
|
-
function et(o, e) {
|
|
899
|
-
var t = Object.keys(o);
|
|
900
|
-
if (Object.getOwnPropertySymbols) {
|
|
901
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
902
|
-
e && (n = n.filter(function(r) {
|
|
903
|
-
return Object.getOwnPropertyDescriptor(o, r).enumerable;
|
|
904
|
-
})), t.push.apply(t, n);
|
|
905
|
-
}
|
|
906
|
-
return t;
|
|
907
|
-
}
|
|
908
|
-
function j(o) {
|
|
909
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
910
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
911
|
-
e % 2 ? et(Object(t), !0).forEach(function(n) {
|
|
912
|
-
p(o, n, t[n]);
|
|
913
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : et(Object(t)).forEach(function(n) {
|
|
914
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
return o;
|
|
918
|
-
}
|
|
919
|
-
function Gt() {
|
|
920
|
-
try {
|
|
921
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
922
|
-
}));
|
|
923
|
-
} catch {
|
|
924
|
-
}
|
|
925
|
-
return (Gt = function() {
|
|
926
|
-
return !!o;
|
|
927
|
-
})();
|
|
928
|
-
}
|
|
929
|
-
var Eo = "observed", tt = "requested", V = function() {
|
|
930
|
-
function o(e) {
|
|
931
|
-
var t, n, r, l;
|
|
932
|
-
G(this, o), n = this, l = [e], r = P(r = o), p(t = H(n, Gt() ? Reflect.construct(r, l || [], P(n).constructor) : r.apply(n, l)), "_onGridRenderedMemoizer", Q()), p(t, "_onScrollMemoizer", Q(!1)), p(t, "_deferredInvalidateColumnIndex", null), p(t, "_deferredInvalidateRowIndex", null), p(t, "_recomputeScrollLeftFlag", !1), p(t, "_recomputeScrollTopFlag", !1), p(t, "_horizontalScrollBarSize", 0), p(t, "_verticalScrollBarSize", 0), p(t, "_scrollbarPresenceChanged", !1), p(t, "_scrollingContainer", void 0), p(t, "_childrenToDisplay", void 0), p(t, "_columnStartIndex", void 0), p(t, "_columnStopIndex", void 0), p(t, "_rowStartIndex", void 0), p(t, "_rowStopIndex", void 0), p(t, "_renderedColumnStartIndex", 0), p(t, "_renderedColumnStopIndex", 0), p(t, "_renderedRowStartIndex", 0), p(t, "_renderedRowStopIndex", 0), p(t, "_initialScrollTop", void 0), p(t, "_initialScrollLeft", void 0), p(t, "_disablePointerEventsTimeoutId", void 0), p(t, "_styleCache", {}), p(t, "_cellCache", {}), p(t, "_debounceScrollEndedCallback", function() {
|
|
933
|
-
t._disablePointerEventsTimeoutId = null, t.setState({ isScrolling: !1, needToResetStyleCache: !1 });
|
|
934
|
-
}), p(t, "_invokeOnGridRenderedHelper", function() {
|
|
935
|
-
var s = t.props.onSectionRendered;
|
|
936
|
-
t._onGridRenderedMemoizer({ callback: s, indices: { columnOverscanStartIndex: t._columnStartIndex, columnOverscanStopIndex: t._columnStopIndex, columnStartIndex: t._renderedColumnStartIndex, columnStopIndex: t._renderedColumnStopIndex, rowOverscanStartIndex: t._rowStartIndex, rowOverscanStopIndex: t._rowStopIndex, rowStartIndex: t._renderedRowStartIndex, rowStopIndex: t._renderedRowStopIndex } });
|
|
937
|
-
}), p(t, "_setScrollingContainerRef", function(s) {
|
|
938
|
-
t._scrollingContainer = s, typeof t.props.elementRef == "function" ? t.props.elementRef(s) : $(t.props.elementRef) === "object" && (t.props.elementRef.current = s);
|
|
939
|
-
}), p(t, "_onScroll", function(s) {
|
|
940
|
-
s.target === t._scrollingContainer && t.handleScrollEvent(s.target);
|
|
941
|
-
});
|
|
942
|
-
var i = new Je({ cellCount: e.columnCount, cellSizeGetter: function(s) {
|
|
943
|
-
return o._wrapSizeGetter(e.columnWidth)(s);
|
|
944
|
-
}, estimatedCellSize: o._getEstimatedColumnSize(e) }), a = new Je({ cellCount: e.rowCount, cellSizeGetter: function(s) {
|
|
945
|
-
return o._wrapSizeGetter(e.rowHeight)(s);
|
|
946
|
-
}, estimatedCellSize: o._getEstimatedRowSize(e) });
|
|
947
|
-
return t.state = { instanceProps: { columnSizeAndPositionManager: i, rowSizeAndPositionManager: a, prevColumnWidth: e.columnWidth, prevRowHeight: e.rowHeight, prevColumnCount: e.columnCount, prevRowCount: e.rowCount, prevIsScrolling: e.isScrolling === !0, prevScrollToColumn: e.scrollToColumn, prevScrollToRow: e.scrollToRow, scrollbarSize: 0, scrollbarSizeMeasured: !1 }, isScrolling: !1, scrollDirectionHorizontal: 1, scrollDirectionVertical: 1, scrollLeft: 0, scrollTop: 0, scrollPositionChangeReason: null, needToResetStyleCache: !1 }, e.scrollToRow > 0 && (t._initialScrollTop = t._getCalculatedScrollTop(e, t.state)), e.scrollToColumn > 0 && (t._initialScrollLeft = t._getCalculatedScrollLeft(e, t.state)), t;
|
|
948
|
-
}
|
|
949
|
-
return D(o, x.PureComponent), A(o, [{ key: "getOffsetForCell", value: function() {
|
|
950
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.alignment, n = t === void 0 ? this.props.scrollToAlignment : t, r = e.columnIndex, l = r === void 0 ? this.props.scrollToColumn : r, i = e.rowIndex, a = i === void 0 ? this.props.scrollToRow : i, s = j(j({}, this.props), {}, { scrollToAlignment: n, scrollToColumn: l, scrollToRow: a });
|
|
951
|
-
return { scrollLeft: this._getCalculatedScrollLeft(s), scrollTop: this._getCalculatedScrollTop(s) };
|
|
952
|
-
} }, { key: "getTotalRowsHeight", value: function() {
|
|
953
|
-
return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();
|
|
954
|
-
} }, { key: "getTotalColumnsWidth", value: function() {
|
|
955
|
-
return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();
|
|
956
|
-
} }, { key: "handleScrollEvent", value: function(e) {
|
|
957
|
-
var t = e.scrollLeft, n = t === void 0 ? 0 : t, r = e.scrollTop, l = r === void 0 ? 0 : r;
|
|
958
|
-
if (!(l < 0)) {
|
|
959
|
-
this._debounceScrollEnded();
|
|
960
|
-
var i = this.props, a = i.autoHeight, s = i.autoWidth, c = i.height, u = i.width, d = this.state.instanceProps, f = d.scrollbarSize, h = d.rowSizeAndPositionManager.getTotalSize(), g = d.columnSizeAndPositionManager.getTotalSize(), v = Math.min(Math.max(0, g - u + f), n), _ = Math.min(Math.max(0, h - c + f), l);
|
|
961
|
-
if (this.state.scrollLeft !== v || this.state.scrollTop !== _) {
|
|
962
|
-
var S = { isScrolling: !0, scrollDirectionHorizontal: v !== this.state.scrollLeft ? v > this.state.scrollLeft ? 1 : -1 : this.state.scrollDirectionHorizontal, scrollDirectionVertical: _ !== this.state.scrollTop ? _ > this.state.scrollTop ? 1 : -1 : this.state.scrollDirectionVertical, scrollPositionChangeReason: Eo };
|
|
963
|
-
a || (S.scrollTop = _), s || (S.scrollLeft = v), S.needToResetStyleCache = !1, this.setState(S);
|
|
964
|
-
}
|
|
965
|
-
this._invokeOnScrollMemoizer({ scrollLeft: v, scrollTop: _, totalColumnsWidth: g, totalRowsHeight: h });
|
|
966
|
-
}
|
|
967
|
-
} }, { key: "invalidateCellSizeAfterRender", value: function(e) {
|
|
968
|
-
var t = e.columnIndex, n = e.rowIndex;
|
|
969
|
-
this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex == "number" ? Math.min(this._deferredInvalidateColumnIndex, t) : t, this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex == "number" ? Math.min(this._deferredInvalidateRowIndex, n) : n;
|
|
970
|
-
} }, { key: "measureAllCells", value: function() {
|
|
971
|
-
var e = this.props, t = e.columnCount, n = e.rowCount, r = this.state.instanceProps;
|
|
972
|
-
r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t - 1), r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n - 1);
|
|
973
|
-
} }, { key: "recomputeGridSize", value: function() {
|
|
974
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r, i = this.props, a = i.scrollToColumn, s = i.scrollToRow, c = this.state.instanceProps;
|
|
975
|
-
c.columnSizeAndPositionManager.resetCell(n), c.rowSizeAndPositionManager.resetCell(l), this._recomputeScrollLeftFlag = a >= 0 && (this.state.scrollDirectionHorizontal === 1 ? n <= a : n >= a), this._recomputeScrollTopFlag = s >= 0 && (this.state.scrollDirectionVertical === 1 ? l <= s : l >= s), this._styleCache = {}, this._cellCache = {}, this.forceUpdate();
|
|
976
|
-
} }, { key: "scrollToCell", value: function(e) {
|
|
977
|
-
var t = e.columnIndex, n = e.rowIndex, r = this.props.columnCount, l = this.props;
|
|
978
|
-
r > 1 && t !== void 0 && this._updateScrollLeftForScrollToColumn(j(j({}, l), {}, { scrollToColumn: t })), n !== void 0 && this._updateScrollTopForScrollToRow(j(j({}, l), {}, { scrollToRow: n }));
|
|
979
|
-
} }, { key: "componentDidMount", value: function() {
|
|
980
|
-
var e = this.props, t = e.getScrollbarSize, n = e.height, r = e.scrollLeft, l = e.scrollToColumn, i = e.scrollTop, a = e.scrollToRow, s = e.width, c = this.state.instanceProps;
|
|
981
|
-
if (this._initialScrollTop = 0, this._initialScrollLeft = 0, this._handleInvalidatedGridSize(), c.scrollbarSizeMeasured || this.setState(function(f) {
|
|
982
|
-
var h = j(j({}, f), {}, { needToResetStyleCache: !1 });
|
|
983
|
-
return h.instanceProps.scrollbarSize = t(), h.instanceProps.scrollbarSizeMeasured = !0, h;
|
|
984
|
-
}), typeof r == "number" && r >= 0 || typeof i == "number" && i >= 0) {
|
|
985
|
-
var u = o._getScrollToPositionStateUpdate({ prevState: this.state, scrollLeft: r, scrollTop: i });
|
|
986
|
-
u && (u.needToResetStyleCache = !1, this.setState(u));
|
|
987
|
-
}
|
|
988
|
-
this._scrollingContainer && (this._scrollingContainer.scrollLeft !== this.state.scrollLeft && (this._scrollingContainer.scrollLeft = this.state.scrollLeft), this._scrollingContainer.scrollTop !== this.state.scrollTop && (this._scrollingContainer.scrollTop = this.state.scrollTop));
|
|
989
|
-
var d = n > 0 && s > 0;
|
|
990
|
-
l >= 0 && d && this._updateScrollLeftForScrollToColumn(), a >= 0 && d && this._updateScrollTopForScrollToRow(), this._invokeOnGridRenderedHelper(), this._invokeOnScrollMemoizer({ scrollLeft: r || 0, scrollTop: i || 0, totalColumnsWidth: c.columnSizeAndPositionManager.getTotalSize(), totalRowsHeight: c.rowSizeAndPositionManager.getTotalSize() }), this._maybeCallOnScrollbarPresenceChange();
|
|
991
|
-
} }, { key: "componentDidUpdate", value: function(e, t) {
|
|
992
|
-
var n = this, r = this.props, l = r.autoHeight, i = r.autoWidth, a = r.columnCount, s = r.height, c = r.rowCount, u = r.scrollToAlignment, d = r.scrollToColumn, f = r.scrollToRow, h = r.width, g = this.state, v = g.scrollLeft, _ = g.scrollPositionChangeReason, S = g.scrollTop, m = g.instanceProps;
|
|
993
|
-
this._handleInvalidatedGridSize();
|
|
994
|
-
var y = a > 0 && e.columnCount === 0 || c > 0 && e.rowCount === 0;
|
|
995
|
-
_ === tt && (!i && v >= 0 && (v !== this._scrollingContainer.scrollLeft || y) && (this._scrollingContainer.scrollLeft = v), !l && S >= 0 && (S !== this._scrollingContainer.scrollTop || y) && (this._scrollingContainer.scrollTop = S));
|
|
996
|
-
var w = (e.width === 0 || e.height === 0) && s > 0 && h > 0;
|
|
997
|
-
if (this._recomputeScrollLeftFlag ? (this._recomputeScrollLeftFlag = !1, this._updateScrollLeftForScrollToColumn(this.props)) : Ze({ cellSizeAndPositionManager: m.columnSizeAndPositionManager, previousCellsCount: e.columnCount, previousCellSize: e.columnWidth, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToColumn, previousSize: e.width, scrollOffset: v, scrollToAlignment: u, scrollToIndex: d, size: h, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
|
|
998
|
-
return n._updateScrollLeftForScrollToColumn(n.props);
|
|
999
|
-
} }), this._recomputeScrollTopFlag ? (this._recomputeScrollTopFlag = !1, this._updateScrollTopForScrollToRow(this.props)) : Ze({ cellSizeAndPositionManager: m.rowSizeAndPositionManager, previousCellsCount: e.rowCount, previousCellSize: e.rowHeight, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToRow, previousSize: e.height, scrollOffset: S, scrollToAlignment: u, scrollToIndex: f, size: s, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
|
|
1000
|
-
return n._updateScrollTopForScrollToRow(n.props);
|
|
1001
|
-
} }), this._invokeOnGridRenderedHelper(), v !== t.scrollLeft || S !== t.scrollTop) {
|
|
1002
|
-
var C = m.rowSizeAndPositionManager.getTotalSize(), R = m.columnSizeAndPositionManager.getTotalSize();
|
|
1003
|
-
this._invokeOnScrollMemoizer({ scrollLeft: v, scrollTop: S, totalColumnsWidth: R, totalRowsHeight: C });
|
|
1004
|
-
}
|
|
1005
|
-
this._maybeCallOnScrollbarPresenceChange();
|
|
1006
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
1007
|
-
this._disablePointerEventsTimeoutId && ee(this._disablePointerEventsTimeoutId);
|
|
1008
|
-
} }, { key: "render", value: function() {
|
|
1009
|
-
var e = this.props, t = e.autoContainerWidth, n = e.autoHeight, r = e.autoWidth, l = e.className, i = e.containerProps, a = e.containerRole, s = e.containerStyle, c = e.height, u = e.id, d = e.noContentRenderer, f = e.role, h = e.style, g = e.tabIndex, v = e.width, _ = this.state, S = _.instanceProps, m = _.needToResetStyleCache, y = this._isScrolling(), w = { boxSizing: "border-box", direction: "ltr", height: n ? "auto" : c, position: "relative", width: r ? "auto" : v, WebkitOverflowScrolling: "touch", willChange: "transform" };
|
|
1010
|
-
m && (this._styleCache = {}), this.state.isScrolling || this._resetStyleCache(), this._calculateChildrenToRender(this.props, this.state);
|
|
1011
|
-
var C = S.columnSizeAndPositionManager.getTotalSize(), R = S.rowSizeAndPositionManager.getTotalSize(), z = R > c ? S.scrollbarSize : 0, b = C > v ? S.scrollbarSize : 0;
|
|
1012
|
-
b === this._horizontalScrollBarSize && z === this._verticalScrollBarSize || (this._horizontalScrollBarSize = b, this._verticalScrollBarSize = z, this._scrollbarPresenceChanged = !0), w.overflowX = C + z <= v ? "hidden" : "auto", w.overflowY = R + b <= c ? "hidden" : "auto";
|
|
1013
|
-
var I = this._childrenToDisplay, O = I.length === 0 && c > 0 && v > 0;
|
|
1014
|
-
return x.createElement("div", U({ ref: this._setScrollingContainerRef }, i, { "aria-label": this.props["aria-label"], "aria-readonly": this.props["aria-readonly"], className: N("ReactVirtualized__Grid", l), id: u, onScroll: this._onScroll, role: f, style: j(j({}, w), h), tabIndex: g }), I.length > 0 && x.createElement("div", { className: "ReactVirtualized__Grid__innerScrollContainer", role: a, style: j({ width: t ? "auto" : C, height: R, maxWidth: C, maxHeight: R, overflow: "hidden", pointerEvents: y ? "none" : "", position: "relative" }, s) }, I), O && d());
|
|
1015
|
-
} }, { key: "_calculateChildrenToRender", value: function() {
|
|
1016
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = e.cellRenderer, r = e.cellRangeRenderer, l = e.columnCount, i = e.deferredMeasurementCache, a = e.height, s = e.overscanColumnCount, c = e.overscanIndicesGetter, u = e.overscanRowCount, d = e.rowCount, f = e.width, h = e.isScrollingOptOut, g = t.scrollDirectionHorizontal, v = t.scrollDirectionVertical, _ = t.instanceProps, S = this._initialScrollTop > 0 ? this._initialScrollTop : t.scrollTop, m = this._initialScrollLeft > 0 ? this._initialScrollLeft : t.scrollLeft, y = this._isScrolling(e, t);
|
|
1017
|
-
if (this._childrenToDisplay = [], a > 0 && f > 0) {
|
|
1018
|
-
var w = _.columnSizeAndPositionManager.getVisibleCellRange({ containerSize: f, offset: m }), C = _.rowSizeAndPositionManager.getVisibleCellRange({ containerSize: a, offset: S }), R = _.columnSizeAndPositionManager.getOffsetAdjustment({ containerSize: f, offset: m }), z = _.rowSizeAndPositionManager.getOffsetAdjustment({ containerSize: a, offset: S });
|
|
1019
|
-
this._renderedColumnStartIndex = w.start, this._renderedColumnStopIndex = w.stop, this._renderedRowStartIndex = C.start, this._renderedRowStopIndex = C.stop;
|
|
1020
|
-
var b = c({ direction: "horizontal", cellCount: l, overscanCellsCount: s, scrollDirection: g, startIndex: typeof w.start == "number" ? w.start : 0, stopIndex: typeof w.stop == "number" ? w.stop : -1 }), I = c({ direction: "vertical", cellCount: d, overscanCellsCount: u, scrollDirection: v, startIndex: typeof C.start == "number" ? C.start : 0, stopIndex: typeof C.stop == "number" ? C.stop : -1 }), O = b.overscanStartIndex, T = b.overscanStopIndex, L = I.overscanStartIndex, k = I.overscanStopIndex;
|
|
1021
|
-
if (i) {
|
|
1022
|
-
if (!i.hasFixedHeight()) {
|
|
1023
|
-
for (var E = L; E <= k; E++) if (!i.has(E, 0)) {
|
|
1024
|
-
O = 0, T = l - 1;
|
|
1025
|
-
break;
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
if (!i.hasFixedWidth()) {
|
|
1029
|
-
for (var J = O; J <= T; J++) if (!i.has(0, J)) {
|
|
1030
|
-
L = 0, k = d - 1;
|
|
1031
|
-
break;
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
this._childrenToDisplay = r({ cellCache: this._cellCache, cellRenderer: n, columnSizeAndPositionManager: _.columnSizeAndPositionManager, columnStartIndex: O, columnStopIndex: T, deferredMeasurementCache: i, horizontalOffsetAdjustment: R, isScrolling: y, isScrollingOptOut: h, parent: this, rowSizeAndPositionManager: _.rowSizeAndPositionManager, rowStartIndex: L, rowStopIndex: k, scrollLeft: m, scrollTop: S, styleCache: this._styleCache, verticalOffsetAdjustment: z, visibleColumnIndices: w, visibleRowIndices: C }), this._columnStartIndex = O, this._columnStopIndex = T, this._rowStartIndex = L, this._rowStopIndex = k;
|
|
1036
|
-
}
|
|
1037
|
-
} }, { key: "_debounceScrollEnded", value: function() {
|
|
1038
|
-
var e = this.props.scrollingResetTimeInterval;
|
|
1039
|
-
this._disablePointerEventsTimeoutId && ee(this._disablePointerEventsTimeoutId), this._disablePointerEventsTimeoutId = Le(this._debounceScrollEndedCallback, e);
|
|
1040
|
-
} }, { key: "_handleInvalidatedGridSize", value: function() {
|
|
1041
|
-
if (typeof this._deferredInvalidateColumnIndex == "number" && typeof this._deferredInvalidateRowIndex == "number") {
|
|
1042
|
-
var e = this._deferredInvalidateColumnIndex, t = this._deferredInvalidateRowIndex;
|
|
1043
|
-
this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null, this.recomputeGridSize({ columnIndex: e, rowIndex: t });
|
|
1044
|
-
}
|
|
1045
|
-
} }, { key: "_invokeOnScrollMemoizer", value: function(e) {
|
|
1046
|
-
var t = this, n = e.scrollLeft, r = e.scrollTop, l = e.totalColumnsWidth, i = e.totalRowsHeight;
|
|
1047
|
-
this._onScrollMemoizer({ callback: function(a) {
|
|
1048
|
-
var s = a.scrollLeft, c = a.scrollTop, u = t.props, d = u.height;
|
|
1049
|
-
(0, u.onScroll)({ clientHeight: d, clientWidth: u.width, scrollHeight: i, scrollLeft: s, scrollTop: c, scrollWidth: l });
|
|
1050
|
-
}, indices: { scrollLeft: n, scrollTop: r } });
|
|
1051
|
-
} }, { key: "_isScrolling", value: function() {
|
|
1052
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
|
|
1053
|
-
return Object.hasOwnProperty.call(e, "isScrolling") ? !!e.isScrolling : !!t.isScrolling;
|
|
1054
|
-
} }, { key: "_maybeCallOnScrollbarPresenceChange", value: function() {
|
|
1055
|
-
if (this._scrollbarPresenceChanged) {
|
|
1056
|
-
var e = this.props.onScrollbarPresenceChange;
|
|
1057
|
-
this._scrollbarPresenceChanged = !1, e({ horizontal: this._horizontalScrollBarSize > 0, size: this.state.instanceProps.scrollbarSize, vertical: this._verticalScrollBarSize > 0 });
|
|
1058
|
-
}
|
|
1059
|
-
} }, { key: "scrollToPosition", value: function(e) {
|
|
1060
|
-
var t = e.scrollLeft, n = e.scrollTop, r = o._getScrollToPositionStateUpdate({ prevState: this.state, scrollLeft: t, scrollTop: n });
|
|
1061
|
-
r && (r.needToResetStyleCache = !1, this.setState(r));
|
|
1062
|
-
} }, { key: "_getCalculatedScrollLeft", value: function() {
|
|
1063
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
|
|
1064
|
-
return o._getCalculatedScrollLeft(e, t);
|
|
1065
|
-
} }, { key: "_updateScrollLeftForScrollToColumn", value: function() {
|
|
1066
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = o._getScrollLeftForScrollToColumnStateUpdate(e, t);
|
|
1067
|
-
n && (n.needToResetStyleCache = !1, this.setState(n));
|
|
1068
|
-
} }, { key: "_getCalculatedScrollTop", value: function() {
|
|
1069
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
|
|
1070
|
-
return o._getCalculatedScrollTop(e, t);
|
|
1071
|
-
} }, { key: "_resetStyleCache", value: function() {
|
|
1072
|
-
var e = this._styleCache, t = this._cellCache, n = this.props.isScrollingOptOut;
|
|
1073
|
-
this._cellCache = {}, this._styleCache = {};
|
|
1074
|
-
for (var r = this._rowStartIndex; r <= this._rowStopIndex; r++) for (var l = this._columnStartIndex; l <= this._columnStopIndex; l++) {
|
|
1075
|
-
var i = "".concat(r, "-").concat(l);
|
|
1076
|
-
this._styleCache[i] = e[i], n && (this._cellCache[i] = t[i]);
|
|
1077
|
-
}
|
|
1078
|
-
} }, { key: "_updateScrollTopForScrollToRow", value: function() {
|
|
1079
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = o._getScrollTopForScrollToRowStateUpdate(e, t);
|
|
1080
|
-
n && (n.needToResetStyleCache = !1, this.setState(n));
|
|
1081
|
-
} }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
|
|
1082
|
-
var n = {};
|
|
1083
|
-
e.columnCount === 0 && t.scrollLeft !== 0 || e.rowCount === 0 && t.scrollTop !== 0 ? (n.scrollLeft = 0, n.scrollTop = 0) : (e.scrollLeft !== t.scrollLeft && e.scrollToColumn < 0 || e.scrollTop !== t.scrollTop && e.scrollToRow < 0) && Object.assign(n, o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }));
|
|
1084
|
-
var r, l, i = t.instanceProps;
|
|
1085
|
-
return n.needToResetStyleCache = !1, e.columnWidth === i.prevColumnWidth && e.rowHeight === i.prevRowHeight || (n.needToResetStyleCache = !0), i.columnSizeAndPositionManager.configure({ cellCount: e.columnCount, estimatedCellSize: o._getEstimatedColumnSize(e), cellSizeGetter: o._wrapSizeGetter(e.columnWidth) }), i.rowSizeAndPositionManager.configure({ cellCount: e.rowCount, estimatedCellSize: o._getEstimatedRowSize(e), cellSizeGetter: o._wrapSizeGetter(e.rowHeight) }), i.prevColumnCount !== 0 && i.prevRowCount !== 0 || (i.prevColumnCount = 0, i.prevRowCount = 0), e.autoHeight && e.isScrolling === !1 && i.prevIsScrolling === !0 && Object.assign(n, { isScrolling: !1 }), Ye({ cellCount: i.prevColumnCount, cellSize: typeof i.prevColumnWidth == "number" ? i.prevColumnWidth : null, computeMetadataCallback: function() {
|
|
1086
|
-
return i.columnSizeAndPositionManager.resetCell(0);
|
|
1087
|
-
}, computeMetadataCallbackProps: e, nextCellsCount: e.columnCount, nextCellSize: typeof e.columnWidth == "number" ? e.columnWidth : null, nextScrollToIndex: e.scrollToColumn, scrollToIndex: i.prevScrollToColumn, updateScrollOffsetForScrollToIndex: function() {
|
|
1088
|
-
r = o._getScrollLeftForScrollToColumnStateUpdate(e, t);
|
|
1089
|
-
} }), Ye({ cellCount: i.prevRowCount, cellSize: typeof i.prevRowHeight == "number" ? i.prevRowHeight : null, computeMetadataCallback: function() {
|
|
1090
|
-
return i.rowSizeAndPositionManager.resetCell(0);
|
|
1091
|
-
}, computeMetadataCallbackProps: e, nextCellsCount: e.rowCount, nextCellSize: typeof e.rowHeight == "number" ? e.rowHeight : null, nextScrollToIndex: e.scrollToRow, scrollToIndex: i.prevScrollToRow, updateScrollOffsetForScrollToIndex: function() {
|
|
1092
|
-
l = o._getScrollTopForScrollToRowStateUpdate(e, t);
|
|
1093
|
-
} }), i.prevColumnCount = e.columnCount, i.prevColumnWidth = e.columnWidth, i.prevIsScrolling = e.isScrolling === !0, i.prevRowCount = e.rowCount, i.prevRowHeight = e.rowHeight, i.prevScrollToColumn = e.scrollToColumn, i.prevScrollToRow = e.scrollToRow, i.scrollbarSize = e.getScrollbarSize(), i.scrollbarSize === void 0 ? (i.scrollbarSizeMeasured = !1, i.scrollbarSize = 0) : i.scrollbarSizeMeasured = !0, n.instanceProps = i, j(j(j({}, n), r), l);
|
|
1094
|
-
} }, { key: "_getEstimatedColumnSize", value: function(e) {
|
|
1095
|
-
return typeof e.columnWidth == "number" ? e.columnWidth : e.estimatedColumnSize;
|
|
1096
|
-
} }, { key: "_getEstimatedRowSize", value: function(e) {
|
|
1097
|
-
return typeof e.rowHeight == "number" ? e.rowHeight : e.estimatedRowSize;
|
|
1098
|
-
} }, { key: "_getScrollToPositionStateUpdate", value: function(e) {
|
|
1099
|
-
var t = e.prevState, n = e.scrollLeft, r = e.scrollTop, l = { scrollPositionChangeReason: tt };
|
|
1100
|
-
return typeof n == "number" && n >= 0 && (l.scrollDirectionHorizontal = n > t.scrollLeft ? 1 : -1, l.scrollLeft = n), typeof r == "number" && r >= 0 && (l.scrollDirectionVertical = r > t.scrollTop ? 1 : -1, l.scrollTop = r), typeof n == "number" && n >= 0 && n !== t.scrollLeft || typeof r == "number" && r >= 0 && r !== t.scrollTop ? l : {};
|
|
1101
|
-
} }, { key: "_wrapSizeGetter", value: function(e) {
|
|
1102
|
-
return typeof e == "function" ? e : function() {
|
|
1103
|
-
return e;
|
|
1104
|
-
};
|
|
1105
|
-
} }, { key: "_getCalculatedScrollLeft", value: function(e, t) {
|
|
1106
|
-
var n = e.columnCount, r = e.height, l = e.scrollToAlignment, i = e.scrollToColumn, a = e.width, s = t.scrollLeft, c = t.instanceProps;
|
|
1107
|
-
if (n > 0) {
|
|
1108
|
-
var u = n - 1, d = i < 0 ? u : Math.min(u, i), f = c.rowSizeAndPositionManager.getTotalSize(), h = c.scrollbarSizeMeasured && f > r ? c.scrollbarSize : 0;
|
|
1109
|
-
return c.columnSizeAndPositionManager.getUpdatedOffsetForIndex({ align: l, containerSize: a - h, currentOffset: s, targetIndex: d });
|
|
1110
|
-
}
|
|
1111
|
-
return 0;
|
|
1112
|
-
} }, { key: "_getScrollLeftForScrollToColumnStateUpdate", value: function(e, t) {
|
|
1113
|
-
var n = t.scrollLeft, r = o._getCalculatedScrollLeft(e, t);
|
|
1114
|
-
return typeof r == "number" && r >= 0 && n !== r ? o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: r, scrollTop: -1 }) : {};
|
|
1115
|
-
} }, { key: "_getCalculatedScrollTop", value: function(e, t) {
|
|
1116
|
-
var n = e.height, r = e.rowCount, l = e.scrollToAlignment, i = e.scrollToRow, a = e.width, s = t.scrollTop, c = t.instanceProps;
|
|
1117
|
-
if (r > 0) {
|
|
1118
|
-
var u = r - 1, d = i < 0 ? u : Math.min(u, i), f = c.columnSizeAndPositionManager.getTotalSize(), h = c.scrollbarSizeMeasured && f > a ? c.scrollbarSize : 0;
|
|
1119
|
-
return c.rowSizeAndPositionManager.getUpdatedOffsetForIndex({ align: l, containerSize: n - h, currentOffset: s, targetIndex: d });
|
|
1120
|
-
}
|
|
1121
|
-
return 0;
|
|
1122
|
-
} }, { key: "_getScrollTopForScrollToRowStateUpdate", value: function(e, t) {
|
|
1123
|
-
var n = t.scrollTop, r = o._getCalculatedScrollTop(e, t);
|
|
1124
|
-
return typeof r == "number" && r >= 0 && n !== r ? o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: -1, scrollTop: r }) : {};
|
|
1125
|
-
} }]);
|
|
1126
|
-
}();
|
|
1127
|
-
p(V, "defaultProps", { "aria-label": "grid", "aria-readonly": !0, autoContainerWidth: !1, autoHeight: !1, autoWidth: !1, cellRangeRenderer: function(o) {
|
|
1128
|
-
for (var e = o.cellCache, t = o.cellRenderer, n = o.columnSizeAndPositionManager, r = o.columnStartIndex, l = o.columnStopIndex, i = o.deferredMeasurementCache, a = o.horizontalOffsetAdjustment, s = o.isScrolling, c = o.isScrollingOptOut, u = o.parent, d = o.rowSizeAndPositionManager, f = o.rowStartIndex, h = o.rowStopIndex, g = o.styleCache, v = o.verticalOffsetAdjustment, _ = o.visibleColumnIndices, S = o.visibleRowIndices, m = [], y = n.areOffsetsAdjusted() || d.areOffsetsAdjusted(), w = !s && !y, C = f; C <= h; C++) for (var R = d.getSizeAndPositionOfCell(C), z = r; z <= l; z++) {
|
|
1129
|
-
var b = n.getSizeAndPositionOfCell(z), I = z >= _.start && z <= _.stop && C >= S.start && C <= S.stop, O = "".concat(C, "-").concat(z), T = void 0;
|
|
1130
|
-
w && g[O] ? T = g[O] : i && !i.has(C, z) ? T = { height: "auto", left: 0, position: "absolute", top: 0, width: "auto" } : (T = { height: R.size, left: b.offset + a, position: "absolute", top: R.offset + v, width: b.size }, g[O] = T);
|
|
1131
|
-
var L = { columnIndex: z, isScrolling: s, isVisible: I, key: O, parent: u, rowIndex: C, style: T }, k = void 0;
|
|
1132
|
-
!c && !s || a || v ? k = t(L) : (e[O] || (e[O] = t(L)), k = e[O]), k != null && k !== !1 && (k.props.role || (k = yt.cloneElement(k, { role: "gridcell" })), m.push(k));
|
|
1133
|
-
}
|
|
1134
|
-
return m;
|
|
1135
|
-
}, containerRole: "row", containerStyle: {}, estimatedColumnSize: 100, estimatedRowSize: 30, getScrollbarSize: be, noContentRenderer: function() {
|
|
1136
|
-
return null;
|
|
1137
|
-
}, onScroll: function() {
|
|
1138
|
-
}, onScrollbarPresenceChange: function() {
|
|
1139
|
-
}, onSectionRendered: function() {
|
|
1140
|
-
}, overscanColumnCount: 0, overscanIndicesGetter: function(o) {
|
|
1141
|
-
var e = o.cellCount, t = o.overscanCellsCount, n = o.scrollDirection, r = o.startIndex, l = o.stopIndex;
|
|
1142
|
-
return n === 1 ? { overscanStartIndex: Math.max(0, r), overscanStopIndex: Math.min(e - 1, l + t) } : { overscanStartIndex: Math.max(0, r - t), overscanStopIndex: Math.min(e - 1, l) };
|
|
1143
|
-
}, overscanRowCount: 10, role: "grid", scrollingResetTimeInterval: 150, scrollToAlignment: "auto", scrollToColumn: -1, scrollToRow: -1, style: {}, tabIndex: 0, isScrollingOptOut: !1 }), ce(V);
|
|
1144
|
-
function At(o) {
|
|
1145
|
-
var e = o.cellCount, t = o.overscanCellsCount, n = o.scrollDirection, r = o.startIndex, l = o.stopIndex;
|
|
1146
|
-
return t = Math.max(1, t), n === 1 ? { overscanStartIndex: Math.max(0, r - 1), overscanStopIndex: Math.min(e - 1, l + t) } : { overscanStartIndex: Math.max(0, r - t), overscanStopIndex: Math.min(e - 1, l + 1) };
|
|
1147
|
-
}
|
|
1148
|
-
function Te(o, e) {
|
|
1149
|
-
(e == null || e > o.length) && (e = o.length);
|
|
1150
|
-
for (var t = 0, n = Array(e); t < e; t++) n[t] = o[t];
|
|
1151
|
-
return n;
|
|
1152
|
-
}
|
|
1153
|
-
function Et(o, e) {
|
|
1154
|
-
if (o) {
|
|
1155
|
-
if (typeof o == "string") return Te(o, e);
|
|
1156
|
-
var t = {}.toString.call(o).slice(8, -1);
|
|
1157
|
-
return t === "Object" && o.constructor && (t = o.constructor.name), t === "Map" || t === "Set" ? Array.from(o) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Te(o, e) : void 0;
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
function Wo(o) {
|
|
1161
|
-
return function(e) {
|
|
1162
|
-
if (Array.isArray(e)) return Te(e);
|
|
1163
|
-
}(o) || function(e) {
|
|
1164
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1165
|
-
}(o) || Et(o) || function() {
|
|
1166
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1167
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1168
|
-
}();
|
|
1169
|
-
}
|
|
1170
|
-
function Wt() {
|
|
1171
|
-
try {
|
|
1172
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1173
|
-
}));
|
|
1174
|
-
} catch {
|
|
1175
|
-
}
|
|
1176
|
-
return (Wt = function() {
|
|
1177
|
-
return !!o;
|
|
1178
|
-
})();
|
|
1179
|
-
}
|
|
1180
|
-
var ot = function() {
|
|
1181
|
-
function o(e, t) {
|
|
1182
|
-
var n, r, l, i;
|
|
1183
|
-
return G(this, o), r = this, i = [e, t], l = P(l = o), (n = H(r, Wt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i)))._loadMoreRowsMemoizer = Q(), n._onRowsRendered = n._onRowsRendered.bind(n), n._registerChild = n._registerChild.bind(n), n;
|
|
1184
|
-
}
|
|
1185
|
-
return D(o, x.PureComponent), A(o, [{ key: "resetLoadMoreRowsCache", value: function(e) {
|
|
1186
|
-
this._loadMoreRowsMemoizer = Q(), e && this._doStuff(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
|
|
1187
|
-
} }, { key: "render", value: function() {
|
|
1188
|
-
return (0, this.props.children)({ onRowsRendered: this._onRowsRendered, registerChild: this._registerChild });
|
|
1189
|
-
} }, { key: "_loadUnloadedRanges", value: function(e) {
|
|
1190
|
-
var t = this, n = this.props.loadMoreRows;
|
|
1191
|
-
e.forEach(function(r) {
|
|
1192
|
-
var l = n(r);
|
|
1193
|
-
l && l.then(function() {
|
|
1194
|
-
var i, a, s, c, u;
|
|
1195
|
-
i = { lastRenderedStartIndex: t._lastRenderedStartIndex, lastRenderedStopIndex: t._lastRenderedStopIndex, startIndex: r.startIndex, stopIndex: r.stopIndex }, a = i.lastRenderedStartIndex, s = i.lastRenderedStopIndex, c = i.startIndex, u = i.stopIndex, c > s || u < a || t._registeredChild && function(d) {
|
|
1196
|
-
var f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, h = typeof d.recomputeGridSize == "function" ? d.recomputeGridSize : d.recomputeRowHeights;
|
|
1197
|
-
h ? h.call(d, f) : d.forceUpdate();
|
|
1198
|
-
}(t._registeredChild, t._lastRenderedStartIndex);
|
|
1199
|
-
});
|
|
1200
|
-
});
|
|
1201
|
-
} }, { key: "_onRowsRendered", value: function(e) {
|
|
1202
|
-
var t = e.startIndex, n = e.stopIndex;
|
|
1203
|
-
this._lastRenderedStartIndex = t, this._lastRenderedStopIndex = n, this._doStuff(t, n);
|
|
1204
|
-
} }, { key: "_doStuff", value: function(e, t) {
|
|
1205
|
-
var n, r = this, l = this.props, i = l.isRowLoaded, a = l.minimumBatchSize, s = l.rowCount, c = l.threshold, u = function(f) {
|
|
1206
|
-
for (var h = f.isRowLoaded, g = f.minimumBatchSize, v = f.rowCount, _ = f.startIndex, S = f.stopIndex, m = [], y = null, w = null, C = _; C <= S; C++)
|
|
1207
|
-
h({ index: C }) ? w !== null && (m.push({ startIndex: y, stopIndex: w }), y = w = null) : (w = C, y === null && (y = C));
|
|
1208
|
-
if (w !== null) {
|
|
1209
|
-
for (var R = Math.min(Math.max(w, y + g - 1), v - 1), z = w + 1; z <= R && !h({ index: z }); z++) w = z;
|
|
1210
|
-
m.push({ startIndex: y, stopIndex: w });
|
|
1211
|
-
}
|
|
1212
|
-
if (m.length) for (var b = m[0]; b.stopIndex - b.startIndex + 1 < g && b.startIndex > 0; ) {
|
|
1213
|
-
var I = b.startIndex - 1;
|
|
1214
|
-
if (h({ index: I })) break;
|
|
1215
|
-
b.startIndex = I;
|
|
1216
|
-
}
|
|
1217
|
-
return m;
|
|
1218
|
-
}({ isRowLoaded: i, minimumBatchSize: a, rowCount: s, startIndex: Math.max(0, e - c), stopIndex: Math.min(s - 1, t + c) }), d = (n = []).concat.apply(n, Wo(u.map(function(f) {
|
|
1219
|
-
return [f.startIndex, f.stopIndex];
|
|
1220
|
-
})));
|
|
1221
|
-
this._loadMoreRowsMemoizer({ callback: function() {
|
|
1222
|
-
r._loadUnloadedRanges(u);
|
|
1223
|
-
}, indices: { squashedUnloadedRanges: d } });
|
|
1224
|
-
} }, { key: "_registerChild", value: function(e) {
|
|
1225
|
-
this._registeredChild = e;
|
|
1226
|
-
} }]);
|
|
1227
|
-
}();
|
|
1228
|
-
function Ht() {
|
|
1229
|
-
try {
|
|
1230
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1231
|
-
}));
|
|
1232
|
-
} catch {
|
|
1233
|
-
}
|
|
1234
|
-
return (Ht = function() {
|
|
1235
|
-
return !!o;
|
|
1236
|
-
})();
|
|
1237
|
-
}
|
|
1238
|
-
p(ot, "defaultProps", { minimumBatchSize: 10, rowCount: 0, threshold: 15 }), ot.propTypes = {};
|
|
1239
|
-
var Ho = function() {
|
|
1240
|
-
function o() {
|
|
1241
|
-
var e, t, n, r;
|
|
1242
|
-
G(this, o);
|
|
1243
|
-
for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
|
|
1244
|
-
return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Ht() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "Grid", void 0), p(e, "_cellRenderer", function(s) {
|
|
1245
|
-
var c = s.parent, u = s.rowIndex, d = s.style, f = s.isScrolling, h = s.isVisible, g = s.key, v = e.props.rowRenderer, _ = Object.getOwnPropertyDescriptor(d, "width");
|
|
1246
|
-
return _ && _.writable && (d.width = "100%"), v({ index: u, style: d, isScrolling: f, isVisible: h, key: g, parent: c });
|
|
1247
|
-
}), p(e, "_setRef", function(s) {
|
|
1248
|
-
e.Grid = s;
|
|
1249
|
-
}), p(e, "_onScroll", function(s) {
|
|
1250
|
-
var c = s.clientHeight, u = s.scrollHeight, d = s.scrollTop;
|
|
1251
|
-
(0, e.props.onScroll)({ clientHeight: c, scrollHeight: u, scrollTop: d });
|
|
1252
|
-
}), p(e, "_onSectionRendered", function(s) {
|
|
1253
|
-
var c = s.rowOverscanStartIndex, u = s.rowOverscanStopIndex, d = s.rowStartIndex, f = s.rowStopIndex;
|
|
1254
|
-
(0, e.props.onRowsRendered)({ overscanStartIndex: c, overscanStopIndex: u, startIndex: d, stopIndex: f });
|
|
1255
|
-
}), e;
|
|
1256
|
-
}
|
|
1257
|
-
return D(o, x.PureComponent), A(o, [{ key: "forceUpdateGrid", value: function() {
|
|
1258
|
-
this.Grid && this.Grid.forceUpdate();
|
|
1259
|
-
} }, { key: "getOffsetForRow", value: function(e) {
|
|
1260
|
-
var t = e.alignment, n = e.index;
|
|
1261
|
-
return this.Grid ? this.Grid.getOffsetForCell({ alignment: t, rowIndex: n, columnIndex: 0 }).scrollTop : 0;
|
|
1262
|
-
} }, { key: "invalidateCellSizeAfterRender", value: function(e) {
|
|
1263
|
-
var t = e.columnIndex, n = e.rowIndex;
|
|
1264
|
-
this.Grid && this.Grid.invalidateCellSizeAfterRender({ rowIndex: n, columnIndex: t });
|
|
1265
|
-
} }, { key: "measureAllRows", value: function() {
|
|
1266
|
-
this.Grid && this.Grid.measureAllCells();
|
|
1267
|
-
} }, { key: "recomputeGridSize", value: function() {
|
|
1268
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
|
|
1269
|
-
this.Grid && this.Grid.recomputeGridSize({ rowIndex: l, columnIndex: n });
|
|
1270
|
-
} }, { key: "recomputeRowHeights", value: function() {
|
|
1271
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
1272
|
-
this.Grid && this.Grid.recomputeGridSize({ rowIndex: e, columnIndex: 0 });
|
|
1273
|
-
} }, { key: "scrollToPosition", value: function() {
|
|
1274
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
1275
|
-
this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
|
|
1276
|
-
} }, { key: "scrollToRow", value: function() {
|
|
1277
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
1278
|
-
this.Grid && this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
|
|
1279
|
-
} }, { key: "render", value: function() {
|
|
1280
|
-
var e = this.props, t = e.className, n = e.noRowsRenderer, r = e.scrollToIndex, l = e.width, i = N("ReactVirtualized__List", t);
|
|
1281
|
-
return x.createElement(V, U({}, this.props, { autoContainerWidth: !0, cellRenderer: this._cellRenderer, className: i, columnWidth: l, columnCount: 1, noContentRenderer: n, onScroll: this._onScroll, onSectionRendered: this._onSectionRendered, ref: this._setRef, scrollToRow: r }));
|
|
1282
|
-
} }]);
|
|
1283
|
-
}();
|
|
1284
|
-
function Do(o, e) {
|
|
1285
|
-
return function(t) {
|
|
1286
|
-
if (Array.isArray(t)) return t;
|
|
1287
|
-
}(o) || function(t, n) {
|
|
1288
|
-
var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
1289
|
-
if (r != null) {
|
|
1290
|
-
var l, i, a, s, c = [], u = !0, d = !1;
|
|
1291
|
-
try {
|
|
1292
|
-
if (a = (r = r.call(t)).next, n !== 0) for (; !(u = (l = a.call(r)).done) && (c.push(l.value), c.length !== n); u = !0) ;
|
|
1293
|
-
} catch (f) {
|
|
1294
|
-
d = !0, i = f;
|
|
1295
|
-
} finally {
|
|
1296
|
-
try {
|
|
1297
|
-
if (!u && r.return != null && (s = r.return(), Object(s) !== s)) return;
|
|
1298
|
-
} finally {
|
|
1299
|
-
if (d) throw i;
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
return c;
|
|
1303
|
-
}
|
|
1304
|
-
}(o, e) || Et(o, e) || function() {
|
|
1305
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1306
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1307
|
-
}();
|
|
1308
|
-
}
|
|
1309
|
-
p(Ho, "defaultProps", { autoHeight: !1, estimatedRowSize: 30, onScroll: function() {
|
|
1310
|
-
}, noRowsRenderer: function() {
|
|
1311
|
-
return null;
|
|
1312
|
-
}, onRowsRendered: function() {
|
|
1313
|
-
}, overscanIndicesGetter: At, overscanRowCount: 10, scrollToAlignment: "auto", scrollToIndex: -1, style: {} });
|
|
1314
|
-
const me = { ge: function(o, e, t, n, r) {
|
|
1315
|
-
return typeof t == "function" ? function(l, i, a, s, c) {
|
|
1316
|
-
for (var u = a + 1; i <= a; ) {
|
|
1317
|
-
var d = i + a >>> 1;
|
|
1318
|
-
c(l[d], s) >= 0 ? (u = d, a = d - 1) : i = d + 1;
|
|
1319
|
-
}
|
|
1320
|
-
return u;
|
|
1321
|
-
}(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
|
|
1322
|
-
for (var c = a + 1; i <= a; ) {
|
|
1323
|
-
var u = i + a >>> 1;
|
|
1324
|
-
l[u] >= s ? (c = u, a = u - 1) : i = u + 1;
|
|
1325
|
-
}
|
|
1326
|
-
return c;
|
|
1327
|
-
}(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
|
|
1328
|
-
}, gt: function(o, e, t, n, r) {
|
|
1329
|
-
return typeof t == "function" ? function(l, i, a, s, c) {
|
|
1330
|
-
for (var u = a + 1; i <= a; ) {
|
|
1331
|
-
var d = i + a >>> 1;
|
|
1332
|
-
c(l[d], s) > 0 ? (u = d, a = d - 1) : i = d + 1;
|
|
1333
|
-
}
|
|
1334
|
-
return u;
|
|
1335
|
-
}(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
|
|
1336
|
-
for (var c = a + 1; i <= a; ) {
|
|
1337
|
-
var u = i + a >>> 1;
|
|
1338
|
-
l[u] > s ? (c = u, a = u - 1) : i = u + 1;
|
|
1339
|
-
}
|
|
1340
|
-
return c;
|
|
1341
|
-
}(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
|
|
1342
|
-
}, lt: function(o, e, t, n, r) {
|
|
1343
|
-
return typeof t == "function" ? function(l, i, a, s, c) {
|
|
1344
|
-
for (var u = i - 1; i <= a; ) {
|
|
1345
|
-
var d = i + a >>> 1;
|
|
1346
|
-
c(l[d], s) < 0 ? (u = d, i = d + 1) : a = d - 1;
|
|
1347
|
-
}
|
|
1348
|
-
return u;
|
|
1349
|
-
}(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
|
|
1350
|
-
for (var c = i - 1; i <= a; ) {
|
|
1351
|
-
var u = i + a >>> 1;
|
|
1352
|
-
l[u] < s ? (c = u, i = u + 1) : a = u - 1;
|
|
1353
|
-
}
|
|
1354
|
-
return c;
|
|
1355
|
-
}(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
|
|
1356
|
-
}, le: function(o, e, t, n, r) {
|
|
1357
|
-
return typeof t == "function" ? function(l, i, a, s, c) {
|
|
1358
|
-
for (var u = i - 1; i <= a; ) {
|
|
1359
|
-
var d = i + a >>> 1;
|
|
1360
|
-
c(l[d], s) <= 0 ? (u = d, i = d + 1) : a = d - 1;
|
|
1361
|
-
}
|
|
1362
|
-
return u;
|
|
1363
|
-
}(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
|
|
1364
|
-
for (var c = i - 1; i <= a; ) {
|
|
1365
|
-
var u = i + a >>> 1;
|
|
1366
|
-
l[u] <= s ? (c = u, i = u + 1) : a = u - 1;
|
|
1367
|
-
}
|
|
1368
|
-
return c;
|
|
1369
|
-
}(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
|
|
1370
|
-
}, eq: function(o, e, t, n, r) {
|
|
1371
|
-
return typeof t == "function" ? function(l, i, a, s, c) {
|
|
1372
|
-
for (; i <= a; ) {
|
|
1373
|
-
var u = i + a >>> 1, d = c(l[u], s);
|
|
1374
|
-
if (d === 0) return u;
|
|
1375
|
-
d <= 0 ? i = u + 1 : a = u - 1;
|
|
1376
|
-
}
|
|
1377
|
-
return -1;
|
|
1378
|
-
}(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
|
|
1379
|
-
for (; i <= a; ) {
|
|
1380
|
-
var c = i + a >>> 1, u = l[c];
|
|
1381
|
-
if (u === s) return c;
|
|
1382
|
-
u <= s ? i = c + 1 : a = c - 1;
|
|
1383
|
-
}
|
|
1384
|
-
return -1;
|
|
1385
|
-
}(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
|
|
1386
|
-
} };
|
|
1387
|
-
function Ge(o, e, t, n, r) {
|
|
1388
|
-
this.mid = o, this.left = e, this.right = t, this.leftPoints = n, this.rightPoints = r, this.count = (e ? e.count : 0) + (t ? t.count : 0) + n.length;
|
|
1389
|
-
}
|
|
1390
|
-
var oe = Ge.prototype;
|
|
1391
|
-
function we(o, e) {
|
|
1392
|
-
o.mid = e.mid, o.left = e.left, o.right = e.right, o.leftPoints = e.leftPoints, o.rightPoints = e.rightPoints, o.count = e.count;
|
|
1393
|
-
}
|
|
1394
|
-
function Dt(o, e) {
|
|
1395
|
-
var t = se(e);
|
|
1396
|
-
o.mid = t.mid, o.left = t.left, o.right = t.right, o.leftPoints = t.leftPoints, o.rightPoints = t.rightPoints, o.count = t.count;
|
|
1397
|
-
}
|
|
1398
|
-
function nt(o, e) {
|
|
1399
|
-
var t = o.intervals([]);
|
|
1400
|
-
t.push(e), Dt(o, t);
|
|
1401
|
-
}
|
|
1402
|
-
function rt(o, e) {
|
|
1403
|
-
var t = o.intervals([]), n = t.indexOf(e);
|
|
1404
|
-
return n < 0 ? 0 : (t.splice(n, 1), Dt(o, t), 1);
|
|
1405
|
-
}
|
|
1406
|
-
function it(o, e, t) {
|
|
1407
|
-
for (var n = 0; n < o.length && o[n][0] <= e; ++n) {
|
|
1408
|
-
var r = t(o[n]);
|
|
1409
|
-
if (r) return r;
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
function lt(o, e, t) {
|
|
1413
|
-
for (var n = o.length - 1; n >= 0 && o[n][1] >= e; --n) {
|
|
1414
|
-
var r = t(o[n]);
|
|
1415
|
-
if (r) return r;
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
function st(o, e) {
|
|
1419
|
-
for (var t = 0; t < o.length; ++t) {
|
|
1420
|
-
var n = e(o[t]);
|
|
1421
|
-
if (n) return n;
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
function jo(o, e) {
|
|
1425
|
-
return o - e;
|
|
1426
|
-
}
|
|
1427
|
-
function ze(o, e) {
|
|
1428
|
-
var t = o[0] - e[0];
|
|
1429
|
-
return t || o[1] - e[1];
|
|
1430
|
-
}
|
|
1431
|
-
function Ie(o, e) {
|
|
1432
|
-
var t = o[1] - e[1];
|
|
1433
|
-
return t || o[0] - e[0];
|
|
1434
|
-
}
|
|
1435
|
-
function se(o) {
|
|
1436
|
-
if (o.length === 0) return null;
|
|
1437
|
-
for (var e = [], t = 0; t < o.length; ++t) e.push(o[t][0], o[t][1]);
|
|
1438
|
-
e.sort(jo);
|
|
1439
|
-
var n = e[e.length >> 1], r = [], l = [], i = [];
|
|
1440
|
-
for (t = 0; t < o.length; ++t) {
|
|
1441
|
-
var a = o[t];
|
|
1442
|
-
a[1] < n ? r.push(a) : n < a[0] ? l.push(a) : i.push(a);
|
|
1443
|
-
}
|
|
1444
|
-
var s = i, c = i.slice();
|
|
1445
|
-
return s.sort(ze), c.sort(Ie), new Ge(n, se(r), se(l), s, c);
|
|
1446
|
-
}
|
|
1447
|
-
function jt(o) {
|
|
1448
|
-
this.root = o;
|
|
1449
|
-
}
|
|
1450
|
-
oe.intervals = function(o) {
|
|
1451
|
-
return o.push.apply(o, this.leftPoints), this.left && this.left.intervals(o), this.right && this.right.intervals(o), o;
|
|
1452
|
-
}, oe.insert = function(o) {
|
|
1453
|
-
var e = this.count - this.leftPoints.length;
|
|
1454
|
-
if (this.count += 1, o[1] < this.mid) this.left ? 4 * (this.left.count + 1) > 3 * (e + 1) ? nt(this, o) : this.left.insert(o) : this.left = se([o]);
|
|
1455
|
-
else if (o[0] > this.mid) this.right ? 4 * (this.right.count + 1) > 3 * (e + 1) ? nt(this, o) : this.right.insert(o) : this.right = se([o]);
|
|
1456
|
-
else {
|
|
1457
|
-
var t = me.ge(this.leftPoints, o, ze), n = me.ge(this.rightPoints, o, Ie);
|
|
1458
|
-
this.leftPoints.splice(t, 0, o), this.rightPoints.splice(n, 0, o);
|
|
1459
|
-
}
|
|
1460
|
-
}, oe.remove = function(o) {
|
|
1461
|
-
var e = this.count - this.leftPoints;
|
|
1462
|
-
if (o[1] < this.mid) return this.left ? 4 * (this.right ? this.right.count : 0) > 3 * (e - 1) ? rt(this, o) : (l = this.left.remove(o)) === 2 ? (this.left = null, this.count -= 1, 1) : (l === 1 && (this.count -= 1), l) : 0;
|
|
1463
|
-
if (o[0] > this.mid) return this.right ? 4 * (this.left ? this.left.count : 0) > 3 * (e - 1) ? rt(this, o) : (l = this.right.remove(o)) === 2 ? (this.right = null, this.count -= 1, 1) : (l === 1 && (this.count -= 1), l) : 0;
|
|
1464
|
-
if (this.count === 1) return this.leftPoints[0] === o ? 2 : 0;
|
|
1465
|
-
if (this.leftPoints.length === 1 && this.leftPoints[0] === o) {
|
|
1466
|
-
if (this.left && this.right) {
|
|
1467
|
-
for (var t = this, n = this.left; n.right; ) t = n, n = n.right;
|
|
1468
|
-
if (t === this) n.right = this.right;
|
|
1469
|
-
else {
|
|
1470
|
-
var r = this.left, l = this.right;
|
|
1471
|
-
t.count -= n.count, t.right = n.left, n.left = r, n.right = l;
|
|
1472
|
-
}
|
|
1473
|
-
we(this, n), this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;
|
|
1474
|
-
} else this.left ? we(this, this.left) : we(this, this.right);
|
|
1475
|
-
return 1;
|
|
1476
|
-
}
|
|
1477
|
-
for (r = me.ge(this.leftPoints, o, ze); r < this.leftPoints.length && this.leftPoints[r][0] === o[0]; ++r) if (this.leftPoints[r] === o) {
|
|
1478
|
-
for (this.count -= 1, this.leftPoints.splice(r, 1), l = me.ge(this.rightPoints, o, Ie); l < this.rightPoints.length && this.rightPoints[l][1] === o[1]; ++l) if (this.rightPoints[l] === o) return this.rightPoints.splice(l, 1), 1;
|
|
1479
|
-
}
|
|
1480
|
-
return 0;
|
|
1481
|
-
}, oe.queryPoint = function(o, e) {
|
|
1482
|
-
if (o < this.mid)
|
|
1483
|
-
return this.left && (t = this.left.queryPoint(o, e)) ? t : it(this.leftPoints, o, e);
|
|
1484
|
-
if (o > this.mid) {
|
|
1485
|
-
var t;
|
|
1486
|
-
return this.right && (t = this.right.queryPoint(o, e)) ? t : lt(this.rightPoints, o, e);
|
|
1487
|
-
}
|
|
1488
|
-
return st(this.leftPoints, e);
|
|
1489
|
-
}, oe.queryInterval = function(o, e, t) {
|
|
1490
|
-
var n;
|
|
1491
|
-
return o < this.mid && this.left && (n = this.left.queryInterval(o, e, t)) || e > this.mid && this.right && (n = this.right.queryInterval(o, e, t)) ? n : e < this.mid ? it(this.leftPoints, e, t) : o > this.mid ? lt(this.rightPoints, o, t) : st(this.leftPoints, t);
|
|
1492
|
-
};
|
|
1493
|
-
var Z = jt.prototype;
|
|
1494
|
-
Z.insert = function(o) {
|
|
1495
|
-
this.root ? this.root.insert(o) : this.root = new Ge(o[0], null, null, [o], [o]);
|
|
1496
|
-
}, Z.remove = function(o) {
|
|
1497
|
-
if (this.root) {
|
|
1498
|
-
var e = this.root.remove(o);
|
|
1499
|
-
return e === 2 && (this.root = null), e !== 0;
|
|
1500
|
-
}
|
|
1501
|
-
return !1;
|
|
1502
|
-
}, Z.queryPoint = function(o, e) {
|
|
1503
|
-
if (this.root) return this.root.queryPoint(o, e);
|
|
1504
|
-
}, Z.queryInterval = function(o, e, t) {
|
|
1505
|
-
if (o <= e && this.root) return this.root.queryInterval(o, e, t);
|
|
1506
|
-
}, Object.defineProperty(Z, "count", { get: function() {
|
|
1507
|
-
return this.root ? this.root.count : 0;
|
|
1508
|
-
} }), Object.defineProperty(Z, "intervals", { get: function() {
|
|
1509
|
-
return this.root ? this.root.intervals([]) : [];
|
|
1510
|
-
} });
|
|
1511
|
-
var Ce = function() {
|
|
1512
|
-
return A(function o() {
|
|
1513
|
-
G(this, o), p(this, "_columnSizeMap", {}), p(this, "_intervalTree", new jt(null)), p(this, "_leftMap", {});
|
|
1514
|
-
}, [{ key: "estimateTotalHeight", value: function(o, e, t) {
|
|
1515
|
-
var n = o - this.count;
|
|
1516
|
-
return this.tallestColumnSize + Math.ceil(n / e) * t;
|
|
1517
|
-
} }, { key: "range", value: function(o, e, t) {
|
|
1518
|
-
var n = this;
|
|
1519
|
-
this._intervalTree.queryInterval(o, o + e, function(r) {
|
|
1520
|
-
var l = Do(r, 3), i = l[0];
|
|
1521
|
-
l[1];
|
|
1522
|
-
var a = l[2];
|
|
1523
|
-
return t(a, n._leftMap[a], i);
|
|
1524
|
-
});
|
|
1525
|
-
} }, { key: "setPosition", value: function(o, e, t, n) {
|
|
1526
|
-
this._intervalTree.insert([t, t + n, o]), this._leftMap[o] = e;
|
|
1527
|
-
var r = this._columnSizeMap, l = r[e];
|
|
1528
|
-
r[e] = l === void 0 ? t + n : Math.max(l, t + n);
|
|
1529
|
-
} }, { key: "count", get: function() {
|
|
1530
|
-
return this._intervalTree.count;
|
|
1531
|
-
} }, { key: "shortestColumnSize", get: function() {
|
|
1532
|
-
var o = this._columnSizeMap, e = 0;
|
|
1533
|
-
for (var t in o) {
|
|
1534
|
-
var n = o[t];
|
|
1535
|
-
e = e === 0 ? n : Math.min(e, n);
|
|
1536
|
-
}
|
|
1537
|
-
return e;
|
|
1538
|
-
} }, { key: "tallestColumnSize", get: function() {
|
|
1539
|
-
var o = this._columnSizeMap, e = 0;
|
|
1540
|
-
for (var t in o) {
|
|
1541
|
-
var n = o[t];
|
|
1542
|
-
e = Math.max(e, n);
|
|
1543
|
-
}
|
|
1544
|
-
return e;
|
|
1545
|
-
} }]);
|
|
1546
|
-
}();
|
|
1547
|
-
function at(o, e) {
|
|
1548
|
-
var t = Object.keys(o);
|
|
1549
|
-
if (Object.getOwnPropertySymbols) {
|
|
1550
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
1551
|
-
e && (n = n.filter(function(r) {
|
|
1552
|
-
return Object.getOwnPropertyDescriptor(o, r).enumerable;
|
|
1553
|
-
})), t.push.apply(t, n);
|
|
1554
|
-
}
|
|
1555
|
-
return t;
|
|
1556
|
-
}
|
|
1557
|
-
function Fo(o) {
|
|
1558
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1559
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
1560
|
-
e % 2 ? at(Object(t), !0).forEach(function(n) {
|
|
1561
|
-
p(o, n, t[n]);
|
|
1562
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : at(Object(t)).forEach(function(n) {
|
|
1563
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1564
|
-
});
|
|
1565
|
-
}
|
|
1566
|
-
return o;
|
|
1567
|
-
}
|
|
1568
|
-
function Ft() {
|
|
1569
|
-
try {
|
|
1570
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1571
|
-
}));
|
|
1572
|
-
} catch {
|
|
1573
|
-
}
|
|
1574
|
-
return (Ft = function() {
|
|
1575
|
-
return !!o;
|
|
1576
|
-
})();
|
|
1577
|
-
}
|
|
1578
|
-
var ct = function() {
|
|
1579
|
-
function o() {
|
|
1580
|
-
var e, t, n, r;
|
|
1581
|
-
G(this, o);
|
|
1582
|
-
for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
|
|
1583
|
-
return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Ft() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "state", { isScrolling: !1, scrollTop: 0 }), p(e, "_debounceResetIsScrollingId", void 0), p(e, "_invalidateOnUpdateStartIndex", null), p(e, "_invalidateOnUpdateStopIndex", null), p(e, "_positionCache", new Ce()), p(e, "_startIndex", null), p(e, "_startIndexMemoized", null), p(e, "_stopIndex", null), p(e, "_stopIndexMemoized", null), p(e, "_debounceResetIsScrollingCallback", function() {
|
|
1584
|
-
e.setState({ isScrolling: !1 });
|
|
1585
|
-
}), p(e, "_setScrollingContainerRef", function(s) {
|
|
1586
|
-
e._scrollingContainer = s;
|
|
1587
|
-
}), p(e, "_onScroll", function(s) {
|
|
1588
|
-
var c = e.props.height, u = s.currentTarget.scrollTop, d = Math.min(Math.max(0, e._getEstimatedTotalHeight() - c), u);
|
|
1589
|
-
u === d && (e._debounceResetIsScrolling(), e.state.scrollTop !== d && e.setState({ isScrolling: !0, scrollTop: d }));
|
|
1590
|
-
}), e;
|
|
1591
|
-
}
|
|
1592
|
-
return D(o, x.PureComponent), A(o, [{ key: "clearCellPositions", value: function() {
|
|
1593
|
-
this._positionCache = new Ce(), this.forceUpdate();
|
|
1594
|
-
} }, { key: "invalidateCellSizeAfterRender", value: function(e) {
|
|
1595
|
-
var t = e.rowIndex;
|
|
1596
|
-
this._invalidateOnUpdateStartIndex === null ? (this._invalidateOnUpdateStartIndex = t, this._invalidateOnUpdateStopIndex = t) : (this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, t), this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, t));
|
|
1597
|
-
} }, { key: "recomputeCellPositions", value: function() {
|
|
1598
|
-
var e = this._positionCache.count - 1;
|
|
1599
|
-
this._positionCache = new Ce(), this._populatePositionCache(0, e), this.forceUpdate();
|
|
1600
|
-
} }, { key: "componentDidMount", value: function() {
|
|
1601
|
-
this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback();
|
|
1602
|
-
} }, { key: "componentDidUpdate", value: function(e, t) {
|
|
1603
|
-
this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback(), this.props.scrollTop !== e.scrollTop && this._debounceResetIsScrolling();
|
|
1604
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
1605
|
-
this._debounceResetIsScrollingId && ee(this._debounceResetIsScrollingId);
|
|
1606
|
-
} }, { key: "render", value: function() {
|
|
1607
|
-
var e, t = this, n = this.props, r = n.autoHeight, l = n.cellCount, i = n.cellMeasurerCache, a = n.cellRenderer, s = n.className, c = n.height, u = n.id, d = n.keyMapper, f = n.overscanByPixels, h = n.role, g = n.style, v = n.tabIndex, _ = n.width, S = n.rowDirection, m = this.state, y = m.isScrolling, w = m.scrollTop, C = [], R = this._getEstimatedTotalHeight(), z = this._positionCache.shortestColumnSize, b = this._positionCache.count, I = 0;
|
|
1608
|
-
if (this._positionCache.range(Math.max(0, w - f), c + 2 * f, function(L, k, E) {
|
|
1609
|
-
e === void 0 ? (I = L, e = L) : (I = Math.min(I, L), e = Math.max(e, L)), C.push(a({ index: L, isScrolling: y, key: d(L), parent: t, style: p(p(p(p({ height: i.getHeight(L) }, S === "ltr" ? "left" : "right", k), "position", "absolute"), "top", E), "width", i.getWidth(L)) }));
|
|
1610
|
-
}), z < w + c + f && b < l) for (var O = Math.min(l - b, Math.ceil((w + c + f - z) / i.defaultHeight * _ / i.defaultWidth)), T = b; T < b + O; T++) e = T, C.push(a({ index: T, isScrolling: y, key: d(T), parent: this, style: { width: i.getWidth(T) } }));
|
|
1611
|
-
return this._startIndex = I, this._stopIndex = e, x.createElement("div", { ref: this._setScrollingContainerRef, "aria-label": this.props["aria-label"], className: N("ReactVirtualized__Masonry", s), id: u, onScroll: this._onScroll, role: h, style: Fo({ boxSizing: "border-box", direction: "ltr", height: r ? "auto" : c, overflowX: "hidden", overflowY: R < c ? "hidden" : "auto", position: "relative", width: _, WebkitOverflowScrolling: "touch", willChange: "transform" }, g), tabIndex: v }, x.createElement("div", { className: "ReactVirtualized__Masonry__innerScrollContainer", style: { width: "100%", height: R, maxWidth: "100%", maxHeight: R, overflow: "hidden", pointerEvents: y ? "none" : "", position: "relative" } }, C));
|
|
1612
|
-
} }, { key: "_checkInvalidateOnUpdate", value: function() {
|
|
1613
|
-
if (typeof this._invalidateOnUpdateStartIndex == "number") {
|
|
1614
|
-
var e = this._invalidateOnUpdateStartIndex, t = this._invalidateOnUpdateStopIndex;
|
|
1615
|
-
this._invalidateOnUpdateStartIndex = null, this._invalidateOnUpdateStopIndex = null, this._populatePositionCache(e, t), this.forceUpdate();
|
|
1616
|
-
}
|
|
1617
|
-
} }, { key: "_debounceResetIsScrolling", value: function() {
|
|
1618
|
-
var e = this.props.scrollingResetTimeInterval;
|
|
1619
|
-
this._debounceResetIsScrollingId && ee(this._debounceResetIsScrollingId), this._debounceResetIsScrollingId = Le(this._debounceResetIsScrollingCallback, e);
|
|
1620
|
-
} }, { key: "_getEstimatedTotalHeight", value: function() {
|
|
1621
|
-
var e = this.props, t = e.cellCount, n = e.cellMeasurerCache, r = e.width, l = Math.max(1, Math.floor(r / n.defaultWidth));
|
|
1622
|
-
return this._positionCache.estimateTotalHeight(t, l, n.defaultHeight);
|
|
1623
|
-
} }, { key: "_invokeOnScrollCallback", value: function() {
|
|
1624
|
-
var e = this.props, t = e.height, n = e.onScroll, r = this.state.scrollTop;
|
|
1625
|
-
this._onScrollMemoized !== r && (n({ clientHeight: t, scrollHeight: this._getEstimatedTotalHeight(), scrollTop: r }), this._onScrollMemoized = r);
|
|
1626
|
-
} }, { key: "_invokeOnCellsRenderedCallback", value: function() {
|
|
1627
|
-
this._startIndexMemoized === this._startIndex && this._stopIndexMemoized === this._stopIndex || ((0, this.props.onCellsRendered)({ startIndex: this._startIndex, stopIndex: this._stopIndex }), this._startIndexMemoized = this._startIndex, this._stopIndexMemoized = this._stopIndex);
|
|
1628
|
-
} }, { key: "_populatePositionCache", value: function(e, t) {
|
|
1629
|
-
for (var n = this.props, r = n.cellMeasurerCache, l = n.cellPositioner, i = e; i <= t; i++) {
|
|
1630
|
-
var a = l(i), s = a.left, c = a.top;
|
|
1631
|
-
this._positionCache.setPosition(i, s, c, r.getHeight(i));
|
|
1632
|
-
}
|
|
1633
|
-
} }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
|
|
1634
|
-
return e.scrollTop !== void 0 && t.scrollTop !== e.scrollTop ? { isScrolling: !0, scrollTop: e.scrollTop } : null;
|
|
1635
|
-
} }]);
|
|
1636
|
-
}();
|
|
1637
|
-
function ut() {
|
|
1638
|
-
}
|
|
1639
|
-
p(ct, "defaultProps", { autoHeight: !1, keyMapper: function(o) {
|
|
1640
|
-
return o;
|
|
1641
|
-
}, onCellsRendered: ut, onScroll: ut, overscanByPixels: 20, role: "grid", scrollingResetTimeInterval: 150, style: {}, tabIndex: 0, rowDirection: "ltr" }), ce(ct);
|
|
1642
|
-
var xe = function() {
|
|
1643
|
-
return A(function o() {
|
|
1644
|
-
var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1645
|
-
G(this, o), p(this, "_cellMeasurerCache", void 0), p(this, "_columnIndexOffset", void 0), p(this, "_rowIndexOffset", void 0), p(this, "columnWidth", function(s) {
|
|
1646
|
-
var c = s.index;
|
|
1647
|
-
e._cellMeasurerCache.columnWidth({ index: c + e._columnIndexOffset });
|
|
1648
|
-
}), p(this, "rowHeight", function(s) {
|
|
1649
|
-
var c = s.index;
|
|
1650
|
-
e._cellMeasurerCache.rowHeight({ index: c + e._rowIndexOffset });
|
|
1651
|
-
});
|
|
1652
|
-
var n = t.cellMeasurerCache, r = t.columnIndexOffset, l = r === void 0 ? 0 : r, i = t.rowIndexOffset, a = i === void 0 ? 0 : i;
|
|
1653
|
-
this._cellMeasurerCache = n, this._columnIndexOffset = l, this._rowIndexOffset = a;
|
|
1654
|
-
}, [{ key: "clear", value: function(o, e) {
|
|
1655
|
-
this._cellMeasurerCache.clear(o + this._rowIndexOffset, e + this._columnIndexOffset);
|
|
1656
|
-
} }, { key: "clearAll", value: function() {
|
|
1657
|
-
this._cellMeasurerCache.clearAll();
|
|
1658
|
-
} }, { key: "defaultHeight", get: function() {
|
|
1659
|
-
return this._cellMeasurerCache.defaultHeight;
|
|
1660
|
-
} }, { key: "defaultWidth", get: function() {
|
|
1661
|
-
return this._cellMeasurerCache.defaultWidth;
|
|
1662
|
-
} }, { key: "hasFixedHeight", value: function() {
|
|
1663
|
-
return this._cellMeasurerCache.hasFixedHeight();
|
|
1664
|
-
} }, { key: "hasFixedWidth", value: function() {
|
|
1665
|
-
return this._cellMeasurerCache.hasFixedWidth();
|
|
1666
|
-
} }, { key: "getHeight", value: function(o) {
|
|
1667
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
1668
|
-
return this._cellMeasurerCache.getHeight(o + this._rowIndexOffset, e + this._columnIndexOffset);
|
|
1669
|
-
} }, { key: "getWidth", value: function(o) {
|
|
1670
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
1671
|
-
return this._cellMeasurerCache.getWidth(o + this._rowIndexOffset, e + this._columnIndexOffset);
|
|
1672
|
-
} }, { key: "has", value: function(o) {
|
|
1673
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
1674
|
-
return this._cellMeasurerCache.has(o + this._rowIndexOffset, e + this._columnIndexOffset);
|
|
1675
|
-
} }, { key: "set", value: function(o, e, t, n) {
|
|
1676
|
-
this._cellMeasurerCache.set(o + this._rowIndexOffset, e + this._columnIndexOffset, t, n);
|
|
1677
|
-
} }]);
|
|
1678
|
-
}(), No = ["rowIndex"], Bo = ["columnIndex", "rowIndex"], Uo = ["columnIndex"], Vo = ["onScroll", "onSectionRendered", "onScrollbarPresenceChange", "scrollLeft", "scrollToColumn", "scrollTop", "scrollToRow"];
|
|
1679
|
-
function dt(o, e) {
|
|
1680
|
-
var t = Object.keys(o);
|
|
1681
|
-
if (Object.getOwnPropertySymbols) {
|
|
1682
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
1683
|
-
e && (n = n.filter(function(r) {
|
|
1684
|
-
return Object.getOwnPropertyDescriptor(o, r).enumerable;
|
|
1685
|
-
})), t.push.apply(t, n);
|
|
1686
|
-
}
|
|
1687
|
-
return t;
|
|
1688
|
-
}
|
|
1689
|
-
function M(o) {
|
|
1690
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1691
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
1692
|
-
e % 2 ? dt(Object(t), !0).forEach(function(n) {
|
|
1693
|
-
p(o, n, t[n]);
|
|
1694
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : dt(Object(t)).forEach(function(n) {
|
|
1695
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1696
|
-
});
|
|
1697
|
-
}
|
|
1698
|
-
return o;
|
|
1699
|
-
}
|
|
1700
|
-
function Nt() {
|
|
1701
|
-
try {
|
|
1702
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1703
|
-
}));
|
|
1704
|
-
} catch {
|
|
1705
|
-
}
|
|
1706
|
-
return (Nt = function() {
|
|
1707
|
-
return !!o;
|
|
1708
|
-
})();
|
|
1709
|
-
}
|
|
1710
|
-
var Re = function() {
|
|
1711
|
-
function o(e, t) {
|
|
1712
|
-
var n, r, l, i;
|
|
1713
|
-
G(this, o), r = this, i = [e, t], l = P(l = o), p(n = H(r, Nt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i)), "state", { scrollLeft: 0, scrollTop: 0, scrollbarSize: 0, showHorizontalScrollbar: !1, showVerticalScrollbar: !1 }), p(n, "_deferredInvalidateColumnIndex", null), p(n, "_deferredInvalidateRowIndex", null), p(n, "_bottomLeftGridRef", function(u) {
|
|
1714
|
-
n._bottomLeftGrid = u;
|
|
1715
|
-
}), p(n, "_bottomRightGridRef", function(u) {
|
|
1716
|
-
n._bottomRightGrid = u;
|
|
1717
|
-
}), p(n, "_cellRendererBottomLeftGrid", function(u) {
|
|
1718
|
-
var d = u.rowIndex, f = ne(u, No), h = n.props, g = h.cellRenderer, v = h.fixedRowCount;
|
|
1719
|
-
return d === h.rowCount - v ? x.createElement("div", { key: f.key, style: M(M({}, f.style), {}, { height: 20 }) }) : g(M(M({}, f), {}, { parent: n, rowIndex: d + v }));
|
|
1720
|
-
}), p(n, "_cellRendererBottomRightGrid", function(u) {
|
|
1721
|
-
var d = u.columnIndex, f = u.rowIndex, h = ne(u, Bo), g = n.props, v = g.cellRenderer, _ = g.fixedColumnCount, S = g.fixedRowCount;
|
|
1722
|
-
return v(M(M({}, h), {}, { columnIndex: d + _, parent: n, rowIndex: f + S }));
|
|
1723
|
-
}), p(n, "_cellRendererTopRightGrid", function(u) {
|
|
1724
|
-
var d = u.columnIndex, f = ne(u, Uo), h = n.props, g = h.cellRenderer, v = h.columnCount, _ = h.fixedColumnCount;
|
|
1725
|
-
return d === v - _ ? x.createElement("div", { key: f.key, style: M(M({}, f.style), {}, { width: 20 }) }) : g(M(M({}, f), {}, { columnIndex: d + _, parent: n }));
|
|
1726
|
-
}), p(n, "_columnWidthRightGrid", function(u) {
|
|
1727
|
-
var d = u.index, f = n.props, h = f.columnCount, g = f.fixedColumnCount, v = f.columnWidth, _ = n.state, S = _.scrollbarSize;
|
|
1728
|
-
return _.showHorizontalScrollbar && d === h - g ? S : typeof v == "function" ? v({ index: d + g }) : v;
|
|
1729
|
-
}), p(n, "_onScroll", function(u) {
|
|
1730
|
-
var d = u.scrollLeft, f = u.scrollTop;
|
|
1731
|
-
n.setState({ scrollLeft: d, scrollTop: f });
|
|
1732
|
-
var h = n.props.onScroll;
|
|
1733
|
-
h && h(u);
|
|
1734
|
-
}), p(n, "_onScrollbarPresenceChange", function(u) {
|
|
1735
|
-
var d = u.horizontal, f = u.size, h = u.vertical, g = n.state, v = g.showHorizontalScrollbar, _ = g.showVerticalScrollbar;
|
|
1736
|
-
if (d !== v || h !== _) {
|
|
1737
|
-
n.setState({ scrollbarSize: f, showHorizontalScrollbar: d, showVerticalScrollbar: h });
|
|
1738
|
-
var S = n.props.onScrollbarPresenceChange;
|
|
1739
|
-
typeof S == "function" && S({ horizontal: d, size: f, vertical: h });
|
|
1740
|
-
}
|
|
1741
|
-
}), p(n, "_onScrollLeft", function(u) {
|
|
1742
|
-
var d = u.scrollLeft;
|
|
1743
|
-
n._onScroll({ scrollLeft: d, scrollTop: n.state.scrollTop });
|
|
1744
|
-
}), p(n, "_onScrollTop", function(u) {
|
|
1745
|
-
var d = u.scrollTop;
|
|
1746
|
-
n._onScroll({ scrollTop: d, scrollLeft: n.state.scrollLeft });
|
|
1747
|
-
}), p(n, "_rowHeightBottomGrid", function(u) {
|
|
1748
|
-
var d = u.index, f = n.props, h = f.fixedRowCount, g = f.rowCount, v = f.rowHeight, _ = n.state, S = _.scrollbarSize;
|
|
1749
|
-
return _.showVerticalScrollbar && d === g - h ? S : typeof v == "function" ? v({ index: d + h }) : v;
|
|
1750
|
-
}), p(n, "_topLeftGridRef", function(u) {
|
|
1751
|
-
n._topLeftGrid = u;
|
|
1752
|
-
}), p(n, "_topRightGridRef", function(u) {
|
|
1753
|
-
n._topRightGrid = u;
|
|
1754
|
-
});
|
|
1755
|
-
var a = e.deferredMeasurementCache, s = e.fixedColumnCount, c = e.fixedRowCount;
|
|
1756
|
-
return n._maybeCalculateCachedStyles(!0), a && (n._deferredMeasurementCacheBottomLeftGrid = c > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: 0, rowIndexOffset: c }) : a, n._deferredMeasurementCacheBottomRightGrid = s > 0 || c > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: s, rowIndexOffset: c }) : a, n._deferredMeasurementCacheTopRightGrid = s > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: s, rowIndexOffset: 0 }) : a), n;
|
|
1757
|
-
}
|
|
1758
|
-
return D(o, x.PureComponent), A(o, [{ key: "forceUpdateGrids", value: function() {
|
|
1759
|
-
this._bottomLeftGrid && this._bottomLeftGrid.forceUpdate(), this._bottomRightGrid && this._bottomRightGrid.forceUpdate(), this._topLeftGrid && this._topLeftGrid.forceUpdate(), this._topRightGrid && this._topRightGrid.forceUpdate();
|
|
1760
|
-
} }, { key: "invalidateCellSizeAfterRender", value: function() {
|
|
1761
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
|
|
1762
|
-
this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex == "number" ? Math.min(this._deferredInvalidateColumnIndex, n) : n, this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex == "number" ? Math.min(this._deferredInvalidateRowIndex, l) : l;
|
|
1763
|
-
} }, { key: "measureAllCells", value: function() {
|
|
1764
|
-
this._bottomLeftGrid && this._bottomLeftGrid.measureAllCells(), this._bottomRightGrid && this._bottomRightGrid.measureAllCells(), this._topLeftGrid && this._topLeftGrid.measureAllCells(), this._topRightGrid && this._topRightGrid.measureAllCells();
|
|
1765
|
-
} }, { key: "recomputeGridSize", value: function() {
|
|
1766
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r, i = this.props, a = i.fixedColumnCount, s = i.fixedRowCount, c = Math.max(0, n - a), u = Math.max(0, l - s);
|
|
1767
|
-
this._bottomLeftGrid && this._bottomLeftGrid.recomputeGridSize({ columnIndex: n, rowIndex: u }), this._bottomRightGrid && this._bottomRightGrid.recomputeGridSize({ columnIndex: c, rowIndex: u }), this._topLeftGrid && this._topLeftGrid.recomputeGridSize({ columnIndex: n, rowIndex: l }), this._topRightGrid && this._topRightGrid.recomputeGridSize({ columnIndex: c, rowIndex: l }), this._leftGridWidth = null, this._topGridHeight = null, this._maybeCalculateCachedStyles(!0);
|
|
1768
|
-
} }, { key: "componentDidMount", value: function() {
|
|
1769
|
-
var e = this.props, t = e.scrollLeft, n = e.scrollTop;
|
|
1770
|
-
if (t > 0 || n > 0) {
|
|
1771
|
-
var r = {};
|
|
1772
|
-
t > 0 && (r.scrollLeft = t), n > 0 && (r.scrollTop = n), this.setState(r);
|
|
1773
|
-
}
|
|
1774
|
-
this._handleInvalidatedGridSize();
|
|
1775
|
-
} }, { key: "componentDidUpdate", value: function() {
|
|
1776
|
-
this._handleInvalidatedGridSize();
|
|
1777
|
-
} }, { key: "render", value: function() {
|
|
1778
|
-
var e = this.props, t = e.onScroll, n = e.onSectionRendered;
|
|
1779
|
-
e.onScrollbarPresenceChange, e.scrollLeft;
|
|
1780
|
-
var r = e.scrollToColumn;
|
|
1781
|
-
e.scrollTop;
|
|
1782
|
-
var l = e.scrollToRow, i = ne(e, Vo);
|
|
1783
|
-
if (this._prepareForRender(), this.props.width === 0 || this.props.height === 0) return null;
|
|
1784
|
-
var a = this.state, s = a.scrollLeft, c = a.scrollTop;
|
|
1785
|
-
return x.createElement("div", { style: this._containerOuterStyle }, x.createElement("div", { style: this._containerTopStyle }, this._renderTopLeftGrid(i), this._renderTopRightGrid(M(M({}, i), {}, { onScroll: t, scrollLeft: s }))), x.createElement("div", { style: this._containerBottomStyle }, this._renderBottomLeftGrid(M(M({}, i), {}, { onScroll: t, scrollTop: c })), this._renderBottomRightGrid(M(M({}, i), {}, { onScroll: t, onSectionRendered: n, scrollLeft: s, scrollToColumn: r, scrollToRow: l, scrollTop: c }))));
|
|
1786
|
-
} }, { key: "_getBottomGridHeight", value: function(e) {
|
|
1787
|
-
return e.height - this._getTopGridHeight(e);
|
|
1788
|
-
} }, { key: "_getLeftGridWidth", value: function(e) {
|
|
1789
|
-
var t = e.fixedColumnCount, n = e.columnWidth;
|
|
1790
|
-
if (this._leftGridWidth == null) if (typeof n == "function") {
|
|
1791
|
-
for (var r = 0, l = 0; l < t; l++) r += n({ index: l });
|
|
1792
|
-
this._leftGridWidth = r;
|
|
1793
|
-
} else this._leftGridWidth = n * t;
|
|
1794
|
-
return this._leftGridWidth;
|
|
1795
|
-
} }, { key: "_getRightGridWidth", value: function(e) {
|
|
1796
|
-
return e.width - this._getLeftGridWidth(e);
|
|
1797
|
-
} }, { key: "_getTopGridHeight", value: function(e) {
|
|
1798
|
-
var t = e.fixedRowCount, n = e.rowHeight;
|
|
1799
|
-
if (this._topGridHeight == null) if (typeof n == "function") {
|
|
1800
|
-
for (var r = 0, l = 0; l < t; l++) r += n({ index: l });
|
|
1801
|
-
this._topGridHeight = r;
|
|
1802
|
-
} else this._topGridHeight = n * t;
|
|
1803
|
-
return this._topGridHeight;
|
|
1804
|
-
} }, { key: "_handleInvalidatedGridSize", value: function() {
|
|
1805
|
-
if (typeof this._deferredInvalidateColumnIndex == "number") {
|
|
1806
|
-
var e = this._deferredInvalidateColumnIndex, t = this._deferredInvalidateRowIndex;
|
|
1807
|
-
this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null, this.recomputeGridSize({ columnIndex: e, rowIndex: t }), this.forceUpdate();
|
|
1808
|
-
}
|
|
1809
|
-
} }, { key: "_maybeCalculateCachedStyles", value: function(e) {
|
|
1810
|
-
var t = this.props, n = t.columnWidth, r = t.enableFixedColumnScroll, l = t.enableFixedRowScroll, i = t.height, a = t.fixedColumnCount, s = t.fixedRowCount, c = t.rowHeight, u = t.style, d = t.styleBottomLeftGrid, f = t.styleBottomRightGrid, h = t.styleTopLeftGrid, g = t.styleTopRightGrid, v = t.width, _ = e || i !== this._lastRenderedHeight || v !== this._lastRenderedWidth, S = e || n !== this._lastRenderedColumnWidth || a !== this._lastRenderedFixedColumnCount, m = e || s !== this._lastRenderedFixedRowCount || c !== this._lastRenderedRowHeight;
|
|
1811
|
-
(e || _ || u !== this._lastRenderedStyle) && (this._containerOuterStyle = M({ height: i, overflow: "visible", width: v }, u)), (e || _ || m) && (this._containerTopStyle = { height: this._getTopGridHeight(this.props), position: "relative", width: v }, this._containerBottomStyle = { height: i - this._getTopGridHeight(this.props), overflow: "visible", position: "relative", width: v }), (e || d !== this._lastRenderedStyleBottomLeftGrid) && (this._bottomLeftGridStyle = M({ left: 0, overflowX: "hidden", overflowY: r ? "auto" : "hidden", position: "absolute" }, d)), (e || S || f !== this._lastRenderedStyleBottomRightGrid) && (this._bottomRightGridStyle = M({ left: this._getLeftGridWidth(this.props), position: "absolute" }, f)), (e || h !== this._lastRenderedStyleTopLeftGrid) && (this._topLeftGridStyle = M({ left: 0, overflowX: "hidden", overflowY: "hidden", position: "absolute", top: 0 }, h)), (e || S || g !== this._lastRenderedStyleTopRightGrid) && (this._topRightGridStyle = M({ left: this._getLeftGridWidth(this.props), overflowX: l ? "auto" : "hidden", overflowY: "hidden", position: "absolute", top: 0 }, g)), this._lastRenderedColumnWidth = n, this._lastRenderedFixedColumnCount = a, this._lastRenderedFixedRowCount = s, this._lastRenderedHeight = i, this._lastRenderedRowHeight = c, this._lastRenderedStyle = u, this._lastRenderedStyleBottomLeftGrid = d, this._lastRenderedStyleBottomRightGrid = f, this._lastRenderedStyleTopLeftGrid = h, this._lastRenderedStyleTopRightGrid = g, this._lastRenderedWidth = v;
|
|
1812
|
-
} }, { key: "_prepareForRender", value: function() {
|
|
1813
|
-
this._lastRenderedColumnWidth === this.props.columnWidth && this._lastRenderedFixedColumnCount === this.props.fixedColumnCount || (this._leftGridWidth = null), this._lastRenderedFixedRowCount === this.props.fixedRowCount && this._lastRenderedRowHeight === this.props.rowHeight || (this._topGridHeight = null), this._maybeCalculateCachedStyles(), this._lastRenderedColumnWidth = this.props.columnWidth, this._lastRenderedFixedColumnCount = this.props.fixedColumnCount, this._lastRenderedFixedRowCount = this.props.fixedRowCount, this._lastRenderedRowHeight = this.props.rowHeight;
|
|
1814
|
-
} }, { key: "_renderBottomLeftGrid", value: function(e) {
|
|
1815
|
-
var t = e.enableFixedColumnScroll, n = e.fixedColumnCount, r = e.fixedRowCount, l = e.rowCount, i = e.hideBottomLeftGridScrollbar, a = this.state.showVerticalScrollbar;
|
|
1816
|
-
if (!n) return null;
|
|
1817
|
-
var s = a ? 1 : 0, c = this._getBottomGridHeight(e), u = this._getLeftGridWidth(e), d = this.state.showVerticalScrollbar ? this.state.scrollbarSize : 0, f = i ? u + d : u, h = x.createElement(V, U({}, e, { cellRenderer: this._cellRendererBottomLeftGrid, className: this.props.classNameBottomLeftGrid, columnCount: n, deferredMeasurementCache: this._deferredMeasurementCacheBottomLeftGrid, height: c, onScroll: t ? this._onScrollTop : void 0, ref: this._bottomLeftGridRef, rowCount: Math.max(0, l - r) + s, rowHeight: this._rowHeightBottomGrid, style: this._bottomLeftGridStyle, tabIndex: null, width: f }));
|
|
1818
|
-
return i ? x.createElement("div", { className: "BottomLeftGrid_ScrollWrapper", style: M(M({}, this._bottomLeftGridStyle), {}, { height: c, width: u, overflowY: "hidden" }) }, h) : h;
|
|
1819
|
-
} }, { key: "_renderBottomRightGrid", value: function(e) {
|
|
1820
|
-
var t = e.columnCount, n = e.fixedColumnCount, r = e.fixedRowCount, l = e.rowCount, i = e.scrollToColumn, a = e.scrollToRow;
|
|
1821
|
-
return x.createElement(V, U({}, e, { cellRenderer: this._cellRendererBottomRightGrid, className: this.props.classNameBottomRightGrid, columnCount: Math.max(0, t - n), columnWidth: this._columnWidthRightGrid, deferredMeasurementCache: this._deferredMeasurementCacheBottomRightGrid, height: this._getBottomGridHeight(e), onScroll: this._onScroll, onScrollbarPresenceChange: this._onScrollbarPresenceChange, ref: this._bottomRightGridRef, rowCount: Math.max(0, l - r), rowHeight: this._rowHeightBottomGrid, scrollToColumn: i - n, scrollToRow: a - r, style: this._bottomRightGridStyle, width: this._getRightGridWidth(e) }));
|
|
1822
|
-
} }, { key: "_renderTopLeftGrid", value: function(e) {
|
|
1823
|
-
var t = e.fixedColumnCount, n = e.fixedRowCount;
|
|
1824
|
-
return t && n ? x.createElement(V, U({}, e, { className: this.props.classNameTopLeftGrid, columnCount: t, height: this._getTopGridHeight(e), ref: this._topLeftGridRef, rowCount: n, style: this._topLeftGridStyle, tabIndex: null, width: this._getLeftGridWidth(e) })) : null;
|
|
1825
|
-
} }, { key: "_renderTopRightGrid", value: function(e) {
|
|
1826
|
-
var t = e.columnCount, n = e.enableFixedRowScroll, r = e.fixedColumnCount, l = e.fixedRowCount, i = e.scrollLeft, a = e.hideTopRightGridScrollbar, s = this.state, c = s.showHorizontalScrollbar, u = s.scrollbarSize;
|
|
1827
|
-
if (!l) return null;
|
|
1828
|
-
var d = c ? 1 : 0, f = this._getTopGridHeight(e), h = this._getRightGridWidth(e), g = c ? u : 0, v = f, _ = this._topRightGridStyle;
|
|
1829
|
-
a && (v = f + g, _ = M(M({}, this._topRightGridStyle), {}, { left: 0 }));
|
|
1830
|
-
var S = x.createElement(V, U({}, e, { cellRenderer: this._cellRendererTopRightGrid, className: this.props.classNameTopRightGrid, columnCount: Math.max(0, t - r) + d, columnWidth: this._columnWidthRightGrid, deferredMeasurementCache: this._deferredMeasurementCacheTopRightGrid, height: v, onScroll: n ? this._onScrollLeft : void 0, ref: this._topRightGridRef, rowCount: l, scrollLeft: i, style: _, tabIndex: null, width: h }));
|
|
1831
|
-
return a ? x.createElement("div", { className: "TopRightGrid_ScrollWrapper", style: M(M({}, this._topRightGridStyle), {}, { height: f, width: h, overflowX: "hidden" }) }, S) : S;
|
|
1832
|
-
} }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
|
|
1833
|
-
return e.scrollLeft !== t.scrollLeft || e.scrollTop !== t.scrollTop ? { scrollLeft: e.scrollLeft != null && e.scrollLeft >= 0 ? e.scrollLeft : t.scrollLeft, scrollTop: e.scrollTop != null && e.scrollTop >= 0 ? e.scrollTop : t.scrollTop } : null;
|
|
1834
|
-
} }]);
|
|
1835
|
-
}();
|
|
1836
|
-
function Bt() {
|
|
1837
|
-
try {
|
|
1838
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1839
|
-
}));
|
|
1840
|
-
} catch {
|
|
1841
|
-
}
|
|
1842
|
-
return (Bt = function() {
|
|
1843
|
-
return !!o;
|
|
1844
|
-
})();
|
|
1845
|
-
}
|
|
1846
|
-
p(Re, "defaultProps", { classNameBottomLeftGrid: "", classNameBottomRightGrid: "", classNameTopLeftGrid: "", classNameTopRightGrid: "", enableFixedColumnScroll: !1, enableFixedRowScroll: !1, fixedColumnCount: 0, fixedRowCount: 0, scrollToColumn: -1, scrollToRow: -1, style: {}, styleBottomLeftGrid: {}, styleBottomRightGrid: {}, styleTopLeftGrid: {}, styleTopRightGrid: {}, hideTopRightGridScrollbar: !1, hideBottomLeftGridScrollbar: !1 }), Re.propTypes = {}, ce(Re), function() {
|
|
1847
|
-
function o(e, t) {
|
|
1848
|
-
var n, r, l, i;
|
|
1849
|
-
return G(this, o), r = this, i = [e, t], l = P(l = o), (n = H(r, Bt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i))).state = { clientHeight: 0, clientWidth: 0, scrollHeight: 0, scrollLeft: 0, scrollTop: 0, scrollWidth: 0 }, n._onScroll = n._onScroll.bind(n), n;
|
|
1850
|
-
}
|
|
1851
|
-
return D(o, x.PureComponent), A(o, [{ key: "render", value: function() {
|
|
1852
|
-
var e = this.props.children, t = this.state, n = t.clientHeight, r = t.clientWidth, l = t.scrollHeight, i = t.scrollLeft, a = t.scrollTop, s = t.scrollWidth;
|
|
1853
|
-
return e({ clientHeight: n, clientWidth: r, onScroll: this._onScroll, scrollHeight: l, scrollLeft: i, scrollTop: a, scrollWidth: s });
|
|
1854
|
-
} }, { key: "_onScroll", value: function(e) {
|
|
1855
|
-
var t = e.clientHeight, n = e.clientWidth, r = e.scrollHeight, l = e.scrollLeft, i = e.scrollTop, a = e.scrollWidth;
|
|
1856
|
-
this.setState({ clientHeight: t, clientWidth: n, scrollHeight: r, scrollLeft: l, scrollTop: i, scrollWidth: a });
|
|
1857
|
-
} }]);
|
|
1858
|
-
}().propTypes = {};
|
|
1859
|
-
var ae = "ASC", Pe = "DESC";
|
|
1860
|
-
function Ut(o) {
|
|
1861
|
-
var e = o.sortDirection, t = N("ReactVirtualized__Table__sortableHeaderIcon", { "ReactVirtualized__Table__sortableHeaderIcon--ASC": e === ae, "ReactVirtualized__Table__sortableHeaderIcon--DESC": e === Pe });
|
|
1862
|
-
return x.createElement("svg", { className: t, width: 18, height: 18, viewBox: "0 0 24 24" }, e === ae ? x.createElement("path", { d: "M7 14l5-5 5 5z" }) : x.createElement("path", { d: "M7 10l5 5 5-5z" }), x.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }));
|
|
1863
|
-
}
|
|
1864
|
-
function Vt() {
|
|
1865
|
-
try {
|
|
1866
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1867
|
-
}));
|
|
1868
|
-
} catch {
|
|
1869
|
-
}
|
|
1870
|
-
return (Vt = function() {
|
|
1871
|
-
return !!o;
|
|
1872
|
-
})();
|
|
1873
|
-
}
|
|
1874
|
-
Ut.propTypes = {};
|
|
1875
|
-
var _e = function() {
|
|
1876
|
-
function o() {
|
|
1877
|
-
return G(this, o), e = this, n = arguments, t = P(t = o), H(e, Vt() ? Reflect.construct(t, n || [], P(e).constructor) : t.apply(e, n));
|
|
1878
|
-
var e, t, n;
|
|
1879
|
-
}
|
|
1880
|
-
return D(o, x.Component), A(o);
|
|
1881
|
-
}();
|
|
1882
|
-
function ht(o, e) {
|
|
1883
|
-
var t = Object.keys(o);
|
|
1884
|
-
if (Object.getOwnPropertySymbols) {
|
|
1885
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
1886
|
-
e && (n = n.filter(function(r) {
|
|
1887
|
-
return Object.getOwnPropertyDescriptor(o, r).enumerable;
|
|
1888
|
-
})), t.push.apply(t, n);
|
|
1889
|
-
}
|
|
1890
|
-
return t;
|
|
1891
|
-
}
|
|
1892
|
-
function B(o) {
|
|
1893
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1894
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
1895
|
-
e % 2 ? ht(Object(t), !0).forEach(function(n) {
|
|
1896
|
-
p(o, n, t[n]);
|
|
1897
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : ht(Object(t)).forEach(function(n) {
|
|
1898
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1899
|
-
});
|
|
1900
|
-
}
|
|
1901
|
-
return o;
|
|
1902
|
-
}
|
|
1903
|
-
function qt() {
|
|
1904
|
-
try {
|
|
1905
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1906
|
-
}));
|
|
1907
|
-
} catch {
|
|
1908
|
-
}
|
|
1909
|
-
return (qt = function() {
|
|
1910
|
-
return !!o;
|
|
1911
|
-
})();
|
|
1912
|
-
}
|
|
1913
|
-
p(_e, "defaultProps", { cellDataGetter: function(o) {
|
|
1914
|
-
var e = o.dataKey, t = o.rowData;
|
|
1915
|
-
return typeof t.get == "function" ? t.get(e) : t[e];
|
|
1916
|
-
}, cellRenderer: function(o) {
|
|
1917
|
-
var e = o.cellData;
|
|
1918
|
-
return e == null ? "" : String(e);
|
|
1919
|
-
}, defaultSortDirection: ae, flexGrow: 0, flexShrink: 1, headerRenderer: function(o) {
|
|
1920
|
-
var e = o.dataKey, t = o.label, n = o.sortBy, r = o.sortDirection, l = n === e, i = [x.createElement("span", { className: "ReactVirtualized__Table__headerTruncatedText", key: "label", title: typeof t == "string" ? t : null }, t)];
|
|
1921
|
-
return l && i.push(x.createElement(Ut, { key: "SortIndicator", sortDirection: r })), i;
|
|
1922
|
-
}, style: {} }), _e.propTypes = {};
|
|
1923
|
-
var Oe = function() {
|
|
1924
|
-
function o(e) {
|
|
1925
|
-
var t, n, r, l;
|
|
1926
|
-
return G(this, o), n = this, l = [e], r = P(r = o), (t = H(n, qt() ? Reflect.construct(r, l || [], P(n).constructor) : r.apply(n, l))).state = { scrollbarWidth: 0 }, t._createColumn = t._createColumn.bind(t), t._createRow = t._createRow.bind(t), t._onScroll = t._onScroll.bind(t), t._onSectionRendered = t._onSectionRendered.bind(t), t._setRef = t._setRef.bind(t), t._setGridElementRef = t._setGridElementRef.bind(t), t;
|
|
1927
|
-
}
|
|
1928
|
-
return D(o, x.PureComponent), A(o, [{ key: "forceUpdateGrid", value: function() {
|
|
1929
|
-
this.Grid && this.Grid.forceUpdate();
|
|
1930
|
-
} }, { key: "getOffsetForRow", value: function(e) {
|
|
1931
|
-
var t = e.alignment, n = e.index;
|
|
1932
|
-
return this.Grid ? this.Grid.getOffsetForCell({ alignment: t, rowIndex: n }).scrollTop : 0;
|
|
1933
|
-
} }, { key: "invalidateCellSizeAfterRender", value: function(e) {
|
|
1934
|
-
var t = e.columnIndex, n = e.rowIndex;
|
|
1935
|
-
this.Grid && this.Grid.invalidateCellSizeAfterRender({ rowIndex: n, columnIndex: t });
|
|
1936
|
-
} }, { key: "measureAllRows", value: function() {
|
|
1937
|
-
this.Grid && this.Grid.measureAllCells();
|
|
1938
|
-
} }, { key: "recomputeGridSize", value: function() {
|
|
1939
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
|
|
1940
|
-
this.Grid && this.Grid.recomputeGridSize({ rowIndex: l, columnIndex: n });
|
|
1941
|
-
} }, { key: "recomputeRowHeights", value: function() {
|
|
1942
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
1943
|
-
this.Grid && this.Grid.recomputeGridSize({ rowIndex: e });
|
|
1944
|
-
} }, { key: "scrollToPosition", value: function() {
|
|
1945
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
1946
|
-
this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
|
|
1947
|
-
} }, { key: "scrollToRow", value: function() {
|
|
1948
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
1949
|
-
this.Grid && this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
|
|
1950
|
-
} }, { key: "getScrollbarWidth", value: function() {
|
|
1951
|
-
if (this.GridElement) {
|
|
1952
|
-
var e = this.GridElement, t = e.clientWidth || 0;
|
|
1953
|
-
return (e.offsetWidth || 0) - t;
|
|
1954
|
-
}
|
|
1955
|
-
return 0;
|
|
1956
|
-
} }, { key: "componentDidMount", value: function() {
|
|
1957
|
-
this._setScrollbarWidth();
|
|
1958
|
-
} }, { key: "componentDidUpdate", value: function() {
|
|
1959
|
-
this._setScrollbarWidth();
|
|
1960
|
-
} }, { key: "render", value: function() {
|
|
1961
|
-
var e = this, t = this.props, n = t.children, r = t.className, l = t.disableHeader, i = t.gridClassName, a = t.gridStyle, s = t.headerHeight, c = t.headerRowRenderer, u = t.height, d = t.id, f = t.noRowsRenderer, h = t.rowClassName, g = t.rowStyle, v = t.scrollToIndex, _ = t.style, S = t.width, m = this.state.scrollbarWidth, y = l ? u : u - s, w = typeof h == "function" ? h({ index: -1 }) : h, C = typeof g == "function" ? g({ index: -1 }) : g;
|
|
1962
|
-
return this._cachedColumnStyles = [], x.Children.toArray(n).forEach(function(R, z) {
|
|
1963
|
-
var b = e._getFlexStyleForColumn(R, R.props.style || _e.defaultProps.style);
|
|
1964
|
-
e._cachedColumnStyles[z] = B({ overflow: "hidden" }, b);
|
|
1965
|
-
}), x.createElement("div", { "aria-label": this.props["aria-label"], "aria-labelledby": this.props["aria-labelledby"], "aria-colcount": x.Children.toArray(n).length, "aria-rowcount": this.props.rowCount, className: N("ReactVirtualized__Table", r), id: d, role: "grid", style: _ }, !l && c({ className: N("ReactVirtualized__Table__headerRow", w), columns: this._getHeaderColumns(), style: B({ height: s, overflow: "hidden", paddingRight: m, width: S }, C) }), x.createElement(V, U({}, this.props, { elementRef: this._setGridElementRef, "aria-readonly": null, autoContainerWidth: !0, className: N("ReactVirtualized__Table__Grid", i), cellRenderer: this._createRow, columnWidth: S, columnCount: 1, height: y, id: void 0, noContentRenderer: f, onScroll: this._onScroll, onSectionRendered: this._onSectionRendered, ref: this._setRef, role: "rowgroup", scrollbarWidth: m, scrollToRow: v, style: B(B({}, a), {}, { overflowX: "hidden" }) })));
|
|
1966
|
-
} }, { key: "_createColumn", value: function(e) {
|
|
1967
|
-
var t = e.column, n = e.columnIndex, r = e.isScrolling, l = e.parent, i = e.rowData, a = e.rowIndex, s = this.props.onColumnClick, c = t.props, u = c.cellDataGetter, d = c.cellRenderer, f = c.className, h = c.columnData, g = c.dataKey, v = c.id, _ = d({ cellData: u({ columnData: h, dataKey: g, rowData: i }), columnData: h, columnIndex: n, dataKey: g, isScrolling: r, parent: l, rowData: i, rowIndex: a }), S = this._cachedColumnStyles[n], m = typeof _ == "string" ? _ : null;
|
|
1968
|
-
return x.createElement("div", { "aria-colindex": n + 1, "aria-describedby": v, className: N("ReactVirtualized__Table__rowColumn", f), key: "Row" + a + "-Col" + n, onClick: function(y) {
|
|
1969
|
-
s && s({ columnData: h, dataKey: g, event: y });
|
|
1970
|
-
}, role: "gridcell", style: S, title: m }, _);
|
|
1971
|
-
} }, { key: "_createHeader", value: function(e) {
|
|
1972
|
-
var t, n, r, l, i, a = e.column, s = e.index, c = this.props, u = c.headerClassName, d = c.headerStyle, f = c.onHeaderClick, h = c.sort, g = c.sortBy, v = c.sortDirection, _ = a.props, S = _.columnData, m = _.dataKey, y = _.defaultSortDirection, w = _.disableSort, C = _.headerRenderer, R = _.id, z = _.label, b = !w && h, I = N("ReactVirtualized__Table__headerColumn", u, a.props.headerClassName, { ReactVirtualized__Table__sortableHeaderColumn: b }), O = this._getFlexStyleForColumn(a, B(B({}, d), a.props.headerStyle)), T = C({ columnData: S, dataKey: m, disableSort: w, label: z, sortBy: g, sortDirection: v });
|
|
1973
|
-
if (b || f) {
|
|
1974
|
-
var L = g !== m ? y : v === Pe ? ae : Pe, k = function(E) {
|
|
1975
|
-
b && h({ defaultSortDirection: y, event: E, sortBy: m, sortDirection: L }), f && f({ columnData: S, dataKey: m, event: E });
|
|
1976
|
-
};
|
|
1977
|
-
i = a.props["aria-label"] || z || m, l = "none", r = 0, t = k, n = function(E) {
|
|
1978
|
-
E.key !== "Enter" && E.key !== " " || k(E);
|
|
1979
|
-
};
|
|
1980
|
-
}
|
|
1981
|
-
return g === m && (l = v === ae ? "ascending" : "descending"), x.createElement("div", { "aria-label": i, "aria-sort": l, className: I, id: R, key: "Header-Col" + s, onClick: t, onKeyDown: n, role: "columnheader", style: O, tabIndex: r }, T);
|
|
1982
|
-
} }, { key: "_createRow", value: function(e) {
|
|
1983
|
-
var t = this, n = e.rowIndex, r = e.isScrolling, l = e.key, i = e.parent, a = e.style, s = this.props, c = s.children, u = s.onRowClick, d = s.onRowDoubleClick, f = s.onRowRightClick, h = s.onRowMouseOver, g = s.onRowMouseOut, v = s.rowClassName, _ = s.rowGetter, S = s.rowRenderer, m = s.rowStyle, y = this.state.scrollbarWidth, w = typeof v == "function" ? v({ index: n }) : v, C = typeof m == "function" ? m({ index: n }) : m, R = _({ index: n }), z = x.Children.toArray(c).map(function(O, T) {
|
|
1984
|
-
return t._createColumn({ column: O, columnIndex: T, isScrolling: r, parent: i, rowData: R, rowIndex: n, scrollbarWidth: y });
|
|
1985
|
-
}), b = N("ReactVirtualized__Table__row", w), I = B(B({}, a), {}, { height: this._getRowHeight(n), overflow: "hidden", paddingRight: y }, C);
|
|
1986
|
-
return S({ className: b, columns: z, index: n, isScrolling: r, key: l, onRowClick: u, onRowDoubleClick: d, onRowRightClick: f, onRowMouseOver: h, onRowMouseOut: g, rowData: R, style: I });
|
|
1987
|
-
} }, { key: "_getFlexStyleForColumn", value: function(e) {
|
|
1988
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = "".concat(e.props.flexGrow, " ").concat(e.props.flexShrink, " ").concat(e.props.width, "px"), r = B(B({}, t), {}, { flex: n, msFlex: n, WebkitFlex: n });
|
|
1989
|
-
return e.props.maxWidth && (r.maxWidth = e.props.maxWidth), e.props.minWidth && (r.minWidth = e.props.minWidth), r;
|
|
1990
|
-
} }, { key: "_getHeaderColumns", value: function() {
|
|
1991
|
-
var e = this, t = this.props, n = t.children;
|
|
1992
|
-
return (t.disableHeader ? [] : x.Children.toArray(n)).map(function(r, l) {
|
|
1993
|
-
return e._createHeader({ column: r, index: l });
|
|
1994
|
-
});
|
|
1995
|
-
} }, { key: "_getRowHeight", value: function(e) {
|
|
1996
|
-
var t = this.props.rowHeight;
|
|
1997
|
-
return typeof t == "function" ? t({ index: e }) : t;
|
|
1998
|
-
} }, { key: "_onScroll", value: function(e) {
|
|
1999
|
-
var t = e.clientHeight, n = e.scrollHeight, r = e.scrollTop;
|
|
2000
|
-
(0, this.props.onScroll)({ clientHeight: t, scrollHeight: n, scrollTop: r });
|
|
2001
|
-
} }, { key: "_onSectionRendered", value: function(e) {
|
|
2002
|
-
var t = e.rowOverscanStartIndex, n = e.rowOverscanStopIndex, r = e.rowStartIndex, l = e.rowStopIndex;
|
|
2003
|
-
(0, this.props.onRowsRendered)({ overscanStartIndex: t, overscanStopIndex: n, startIndex: r, stopIndex: l });
|
|
2004
|
-
} }, { key: "_setRef", value: function(e) {
|
|
2005
|
-
this.Grid = e;
|
|
2006
|
-
} }, { key: "_setGridElementRef", value: function(e) {
|
|
2007
|
-
this.GridElement = e;
|
|
2008
|
-
} }, { key: "_setScrollbarWidth", value: function() {
|
|
2009
|
-
var e = this.getScrollbarWidth();
|
|
2010
|
-
this.setState({ scrollbarWidth: e });
|
|
2011
|
-
} }]);
|
|
2012
|
-
}();
|
|
2013
|
-
p(Oe, "defaultProps", { disableHeader: !1, estimatedRowSize: 30, headerHeight: 0, headerStyle: {}, noRowsRenderer: function() {
|
|
2014
|
-
return null;
|
|
2015
|
-
}, onRowsRendered: function() {
|
|
2016
|
-
return null;
|
|
2017
|
-
}, onScroll: function() {
|
|
2018
|
-
return null;
|
|
2019
|
-
}, overscanIndicesGetter: At, overscanRowCount: 10, rowRenderer: function(o) {
|
|
2020
|
-
var e = o.className, t = o.columns, n = o.index, r = o.key, l = o.onRowClick, i = o.onRowDoubleClick, a = o.onRowMouseOut, s = o.onRowMouseOver, c = o.onRowRightClick, u = o.rowData, d = o.style, f = { "aria-rowindex": n + 1 };
|
|
2021
|
-
return (l || i || a || s || c) && (f["aria-label"] = "row", f.tabIndex = 0, l && (f.onClick = function(h) {
|
|
2022
|
-
return l({ event: h, index: n, rowData: u });
|
|
2023
|
-
}), i && (f.onDoubleClick = function(h) {
|
|
2024
|
-
return i({ event: h, index: n, rowData: u });
|
|
2025
|
-
}), a && (f.onMouseOut = function(h) {
|
|
2026
|
-
return a({ event: h, index: n, rowData: u });
|
|
2027
|
-
}), s && (f.onMouseOver = function(h) {
|
|
2028
|
-
return s({ event: h, index: n, rowData: u });
|
|
2029
|
-
}), c && (f.onContextMenu = function(h) {
|
|
2030
|
-
return c({ event: h, index: n, rowData: u });
|
|
2031
|
-
})), x.createElement("div", U({}, f, { className: e, key: r, role: "row", style: d }), t);
|
|
2032
|
-
}, headerRowRenderer: function(o) {
|
|
2033
|
-
var e = o.className, t = o.columns, n = o.style;
|
|
2034
|
-
return x.createElement("div", { className: e, role: "row", style: n }, t);
|
|
2035
|
-
}, rowStyle: {}, scrollToAlignment: "auto", scrollToIndex: -1, style: {} }), Oe.propTypes = {};
|
|
2036
|
-
var Y = [], le = null, X = null;
|
|
2037
|
-
function Kt() {
|
|
2038
|
-
X && (X = null, document.body && le != null && (document.body.style.pointerEvents = le), le = null);
|
|
2039
|
-
}
|
|
2040
|
-
function qo() {
|
|
2041
|
-
Kt(), Y.forEach(function(o) {
|
|
2042
|
-
return o.__resetIsScrolling();
|
|
2043
|
-
});
|
|
2044
|
-
}
|
|
2045
|
-
function $t(o) {
|
|
2046
|
-
o.currentTarget === window && le == null && document.body && (le = document.body.style.pointerEvents, document.body.style.pointerEvents = "none"), function() {
|
|
2047
|
-
X && ee(X);
|
|
2048
|
-
var e = 0;
|
|
2049
|
-
Y.forEach(function(t) {
|
|
2050
|
-
e = Math.max(e, t.props.scrollingResetTimeInterval);
|
|
2051
|
-
}), X = Le(qo, e);
|
|
2052
|
-
}(), Y.forEach(function(e) {
|
|
2053
|
-
e.props.scrollElement === o.currentTarget && e.__handleWindowScrollEvent();
|
|
2054
|
-
});
|
|
2055
|
-
}
|
|
2056
|
-
function ft(o, e) {
|
|
2057
|
-
Y.some(function(t) {
|
|
2058
|
-
return t.props.scrollElement === e;
|
|
2059
|
-
}) || e.addEventListener("scroll", $t), Y.push(o);
|
|
2060
|
-
}
|
|
2061
|
-
function pt(o, e) {
|
|
2062
|
-
(Y = Y.filter(function(t) {
|
|
2063
|
-
return t !== o;
|
|
2064
|
-
})).length || (e.removeEventListener("scroll", $t), X && (ee(X), Kt()));
|
|
2065
|
-
}
|
|
2066
|
-
var Ae = function(o) {
|
|
2067
|
-
return o === window;
|
|
2068
|
-
}, re = function(o) {
|
|
2069
|
-
return o.getBoundingClientRect();
|
|
2070
|
-
};
|
|
2071
|
-
function mt(o, e) {
|
|
2072
|
-
if (o) {
|
|
2073
|
-
if (Ae(o)) {
|
|
2074
|
-
var t = window, n = t.innerHeight, r = t.innerWidth;
|
|
2075
|
-
return { height: typeof n == "number" ? n : 0, width: typeof r == "number" ? r : 0 };
|
|
2076
|
-
}
|
|
2077
|
-
return re(o);
|
|
2078
|
-
}
|
|
2079
|
-
return { height: e.serverHeight, width: e.serverWidth };
|
|
2080
|
-
}
|
|
2081
|
-
function gt(o) {
|
|
2082
|
-
return Ae(o) && document.documentElement ? { top: "scrollY" in window ? window.scrollY : document.documentElement.scrollTop, left: "scrollX" in window ? window.scrollX : document.documentElement.scrollLeft } : { top: o.scrollTop, left: o.scrollLeft };
|
|
2083
|
-
}
|
|
2084
|
-
function vt(o, e) {
|
|
2085
|
-
var t = Object.keys(o);
|
|
2086
|
-
if (Object.getOwnPropertySymbols) {
|
|
2087
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
2088
|
-
e && (n = n.filter(function(r) {
|
|
2089
|
-
return Object.getOwnPropertyDescriptor(o, r).enumerable;
|
|
2090
|
-
})), t.push.apply(t, n);
|
|
2091
|
-
}
|
|
2092
|
-
return t;
|
|
2093
|
-
}
|
|
2094
|
-
function _t(o) {
|
|
2095
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
2096
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
2097
|
-
e % 2 ? vt(Object(t), !0).forEach(function(n) {
|
|
2098
|
-
p(o, n, t[n]);
|
|
2099
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : vt(Object(t)).forEach(function(n) {
|
|
2100
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2101
|
-
});
|
|
2102
|
-
}
|
|
2103
|
-
return o;
|
|
2104
|
-
}
|
|
2105
|
-
function Xt() {
|
|
2106
|
-
try {
|
|
2107
|
-
var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2108
|
-
}));
|
|
2109
|
-
} catch {
|
|
2110
|
-
}
|
|
2111
|
-
return (Xt = function() {
|
|
2112
|
-
return !!o;
|
|
2113
|
-
})();
|
|
2114
|
-
}
|
|
2115
|
-
var Yt = function() {
|
|
2116
|
-
return typeof window < "u" ? window : void 0;
|
|
2117
|
-
}, Ko = function() {
|
|
2118
|
-
function o() {
|
|
2119
|
-
var e, t, n, r;
|
|
2120
|
-
G(this, o);
|
|
2121
|
-
for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
|
|
2122
|
-
return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Xt() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "_window", Yt()), p(e, "_isMounted", !1), p(e, "_positionFromTop", 0), p(e, "_positionFromLeft", 0), p(e, "_detectElementResize", void 0), p(e, "_child", void 0), p(e, "_windowScrollerRef", x.createRef()), p(e, "state", _t(_t({}, mt(e.props.scrollElement, e.props)), {}, { isScrolling: !1, scrollLeft: 0, scrollTop: 0 })), p(e, "_registerChild", function(s) {
|
|
2123
|
-
!s || s instanceof Element || console.warn("WindowScroller registerChild expects to be passed Element or null"), e._child = s, e.updatePosition();
|
|
2124
|
-
}), p(e, "_onChildScroll", function(s) {
|
|
2125
|
-
var c = s.scrollTop;
|
|
2126
|
-
if (e.state.scrollTop !== c) {
|
|
2127
|
-
var u = e.props.scrollElement;
|
|
2128
|
-
u && (typeof u.scrollTo == "function" ? u.scrollTo(0, c + e._positionFromTop) : u.scrollTop = c + e._positionFromTop);
|
|
2129
|
-
}
|
|
2130
|
-
}), p(e, "_registerResizeListener", function(s) {
|
|
2131
|
-
s === window ? window.addEventListener("resize", e._onResize, !1) : e._detectElementResize.addResizeListener(s, e._onResize);
|
|
2132
|
-
}), p(e, "_unregisterResizeListener", function(s) {
|
|
2133
|
-
s === window ? window.removeEventListener("resize", e._onResize, !1) : s && e._detectElementResize.removeResizeListener(s, e._onResize);
|
|
2134
|
-
}), p(e, "_onResize", function() {
|
|
2135
|
-
e.updatePosition();
|
|
2136
|
-
}), p(e, "__handleWindowScrollEvent", function() {
|
|
2137
|
-
if (e._isMounted) {
|
|
2138
|
-
var s = e.props.onScroll, c = e.props.scrollElement;
|
|
2139
|
-
if (c) {
|
|
2140
|
-
var u = gt(c), d = Math.max(0, u.left - e._positionFromLeft), f = Math.max(0, u.top - e._positionFromTop);
|
|
2141
|
-
e.setState({ isScrolling: !0, scrollLeft: d, scrollTop: f }), s({ scrollLeft: d, scrollTop: f });
|
|
2142
|
-
}
|
|
2143
|
-
}
|
|
2144
|
-
}), p(e, "__resetIsScrolling", function() {
|
|
2145
|
-
e.setState({ isScrolling: !1 });
|
|
2146
|
-
}), e;
|
|
2147
|
-
}
|
|
2148
|
-
return D(o, x.PureComponent), A(o, [{ key: "updatePosition", value: function() {
|
|
2149
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props.scrollElement, t = this.props.onResize, n = this.state, r = n.height, l = n.width, i = this._child || this._windowScrollerRef.current;
|
|
2150
|
-
if (i instanceof Element && e) {
|
|
2151
|
-
var a = function(c, u) {
|
|
2152
|
-
if (Ae(u) && document.documentElement) {
|
|
2153
|
-
var d = document.documentElement, f = re(c), h = re(d);
|
|
2154
|
-
return { top: f.top - h.top, left: f.left - h.left };
|
|
2155
|
-
}
|
|
2156
|
-
var g = gt(u), v = re(c), _ = re(u);
|
|
2157
|
-
return { top: v.top + g.top - _.top, left: v.left + g.left - _.left };
|
|
2158
|
-
}(i, e);
|
|
2159
|
-
this._positionFromTop = a.top, this._positionFromLeft = a.left;
|
|
2160
|
-
}
|
|
2161
|
-
var s = mt(e, this.props);
|
|
2162
|
-
r === s.height && l === s.width || (this.setState({ height: s.height, width: s.width }), t({ height: s.height, width: s.width })), this.props.updateScrollTopOnUpdatePosition === !0 && (this.__handleWindowScrollEvent(), this.__resetIsScrolling());
|
|
2163
|
-
} }, { key: "componentDidMount", value: function() {
|
|
2164
|
-
var e = this.props.scrollElement;
|
|
2165
|
-
this._detectElementResize = zt(), this.updatePosition(e), e && (ft(this, e), this._registerResizeListener(e)), this._isMounted = !0;
|
|
2166
|
-
} }, { key: "componentDidUpdate", value: function(e, t) {
|
|
2167
|
-
var n = this.props.scrollElement, r = e.scrollElement;
|
|
2168
|
-
r !== n && r != null && n != null && (this.updatePosition(n), pt(this, r), ft(this, n), this._unregisterResizeListener(r), this._registerResizeListener(n));
|
|
2169
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
2170
|
-
var e = this.props.scrollElement;
|
|
2171
|
-
e && (pt(this, e), this._unregisterResizeListener(e)), this._isMounted = !1;
|
|
2172
|
-
} }, { key: "render", value: function() {
|
|
2173
|
-
var e = this.props.children, t = this.state, n = t.isScrolling, r = t.scrollTop, l = t.scrollLeft, i = t.height, a = t.width;
|
|
2174
|
-
return x.createElement("div", { ref: this._windowScrollerRef }, e({ onChildScroll: this._onChildScroll, registerChild: this._registerChild, height: i, isScrolling: n, scrollLeft: l, scrollTop: r, width: a }));
|
|
2175
|
-
} }]);
|
|
2176
|
-
}();
|
|
2177
|
-
p(Ko, "defaultProps", { onResize: function() {
|
|
2178
|
-
}, onScroll: function() {
|
|
2179
|
-
}, scrollingResetTimeInterval: 150, scrollElement: Yt(), serverHeight: 0, serverWidth: 0 });
|
|
2180
|
-
const ie = "ReactVirtualizedDemo-flexContainer", Jt = "ReactVirtualizedDemo-tableRow", Zt = "ReactVirtualizedDemo-tableRowHover", ke = "ReactVirtualizedDemo-tableCell", Me = "ReactVirtualizedDemo-noClick";
|
|
2181
|
-
class $o extends yt.PureComponent {
|
|
2182
|
-
constructor() {
|
|
2183
|
-
super(...arguments), this.getRowClassName = ({ index: e }) => {
|
|
2184
|
-
const { onRowClick: t } = this.props;
|
|
2185
|
-
return Se(Jt, ie, { [Zt]: e !== -1 && t != null });
|
|
2186
|
-
}, this.cellRenderer = ({ cellData: e, dataKey: t, columnIndex: n, width: r }) => {
|
|
2187
|
-
const { columns: l, rowHeight: i, onRowClick: a } = this.props;
|
|
2188
|
-
let s = e, c = { height: i, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px", minWidth: `${r}px`, maxWidth: `${r}px` };
|
|
2189
|
-
return t === "shortcut" ? s = po(e) : t === "description" && (c = { ...c, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), W(We, { component: "div", className: Se(ke, ie, { [Me]: a == null }), variant: "body", style: c, align: n != null && l[n].numeric ? "right" : "left", children: s });
|
|
2190
|
-
}, this.headerRenderer = ({ label: e, columnIndex: t, width: n }) => {
|
|
2191
|
-
const { headerHeight: r, columns: l } = this.props, i = l[t];
|
|
2192
|
-
return W(We, { component: "div", className: Se(ke, ie, Me), variant: "head", sx: { width: n, height: r, backgroundColor: (a) => a.palette.grey[300] }, align: i.numeric ? "right" : "left", children: W("span", { children: i.label }) });
|
|
2193
|
-
};
|
|
2194
|
-
}
|
|
2195
|
-
static {
|
|
2196
|
-
this.defaultProps = { headerHeight: 40, rowHeight: 48 };
|
|
2197
|
-
}
|
|
2198
|
-
render() {
|
|
2199
|
-
const { columns: e, rowHeight: t, headerHeight: n, ...r } = this.props;
|
|
2200
|
-
return W(Pt, { children: ({ height: l, width: i }) => W(Oe, { height: l, width: i, rowHeight: t, gridStyle: { direction: "inherit" }, headerHeight: n, ...r, rowClassName: this.getRowClassName, children: e.map(({ dataKey: a, width: s, widthLess: c, ...u }, d) => {
|
|
2201
|
-
const f = c ? i - c : s;
|
|
2202
|
-
return W(_e, { style: { flex: `1 1 ${f}px` }, headerRenderer: (h) => this.headerRenderer({ ...h, width: f, columnIndex: d }), className: ie, cellDataGetter: ({ rowData: h, columnData: g, dataKey: v }) => h[v], cellRenderer: (h) => this.cellRenderer({ ...h, width: f, columnIndex: d }), dataKey: a, width: f, ...u }, a);
|
|
2203
|
-
}) }) });
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
const Xo = Ro($o)(({ theme: o }) => ({ "& .ReactVirtualized__Table__headerRow": { ...o.direction === "rtl" && { paddingLeft: "0 !important" }, ...o.direction !== "rtl" && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${ie}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${Jt}`]: { cursor: "pointer" }, [`& .${Zt}`]: { "&:hover:not([disabled])": { backgroundColor: o.palette.grey[200] } }, [`& .${ke}`]: { flex: 1 }, [`& .${Me}`]: { cursor: "initial" } }));
|
|
2207
|
-
function Yo(o) {
|
|
2208
|
-
const { commands: e, ...t } = o, [n, r] = he(!1), [l, i] = he(""), a = vo(() => {
|
|
2209
|
-
let h = e.getAllCommands();
|
|
2210
|
-
n || (h = h.filter((_) => _.command.shortcut())), h.sort((_, S) => _.command.label().localeCompare(S.command.label()));
|
|
2211
|
-
const g = [], v = (_) => _.replace(/\n\n/g, `
|
|
2212
|
-
`);
|
|
2213
|
-
for (let _ = 0; _ < h.length; _++) {
|
|
2214
|
-
const S = h[_].command, m = S.shortcut();
|
|
2215
|
-
if (Array.isArray(m)) {
|
|
2216
|
-
const y = m;
|
|
2217
|
-
for (let w = 0; w < y.length; w++) g.push({ label: S.label(), description: v(S.description()), shortcut: y[w] });
|
|
2218
|
-
} else g.push({ label: S.label(), description: v(S.description()), shortcut: S.shortcut() });
|
|
2219
|
-
}
|
|
2220
|
-
return g;
|
|
2221
|
-
}, [n, e]), [s, c] = he(null);
|
|
2222
|
-
De(() => {
|
|
2223
|
-
import("./DXKQ9TZdaT7ytR1S.mjs").then((h) => {
|
|
2224
|
-
c(new h.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
|
|
2225
|
-
});
|
|
2226
|
-
}, [a]);
|
|
2227
|
-
const [u, d] = he(a), f = l.length > 0 && u.length === 0;
|
|
2228
|
-
return De(() => {
|
|
2229
|
-
s && fo.debounce(() => {
|
|
2230
|
-
if (l.trim().length === 0) return void d(a);
|
|
2231
|
-
const h = s.search(l.trim()), g = new Array(h.length);
|
|
2232
|
-
for (let v = 0; v < h.length; v++) g[v] = h[v].item;
|
|
2233
|
-
d(g);
|
|
2234
|
-
}, 90)();
|
|
2235
|
-
}, [s, l]), Ee(ue, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...t, children: [Ee(ue, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (h) => h.spacing(2), color: (h) => h.palette.text.secondary }, children: [W(Qt, { InputProps: { sx: { backgroundImage: `linear-gradient(${fe("#fff", de(5))}, ${fe("#fff", de(5))})` }, inputProps: { className: "input", autoFocus: !0, spellCheck: !1, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (h) => h.spacing(1), paddingBottom: (h) => h.spacing(1) } }, endAdornment: W(eo, { sx: { opacity: l.length > 0 ? 1 : 0, display: l.length > 0 ? "flex" : "none" }, position: "end", children: W(to, { "aria-label": "clear search", onClick: () => i(""), edge: "end", children: W(_o, {}) }) }) }, sx: { flex: "1 1 40%", marginRight: (h) => h.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (h) => f ? `${h.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (h) => f ? `${h.palette.error.main} !important` : void 0 } }, value: l, onChange: (h) => {
|
|
2236
|
-
i(h.target.value);
|
|
2237
|
-
}, onKeyDown: (h) => {
|
|
2238
|
-
h.which === St.Escape && l.length > 0 && (i(""), h.stopPropagation(), h.preventDefault());
|
|
2239
|
-
}, onContextMenu: (h) => {
|
|
2240
|
-
h.stopPropagation();
|
|
2241
|
-
} }), W(oo, { sx: { flex: "1 1 60%" }, control: W(no, { checked: n, onChange: () => r(!n) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), W(ue, { sx: { flex: "1 1 100%", borderRadius: (h) => `${h.shape.borderRadius}px`, border: (h) => `solid ${h.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (h) => h.palette.background.paper, backgroundImage: `linear-gradient(${fe("#fff", de(5))}, ${fe("#fff", de(5))})` } }, children: W(Xo, { rowCount: u.length, rowGetter: (h) => u[h.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), W(ue, { sx: { display: "flex", flexShrink: "0", paddingLeft: (h) => h.spacing(1), paddingTop: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: W(ro, { noWrap: !0, component: "div", sx: { color: (h) => f ? h.palette.error.main : h.palette.text.secondary }, children: `${u.length === 0 ? "No" : u.length} shortcut key${u.length === 1 ? "" : "s"}${l.length > 0 ? " found" : ""}` }) })] });
|
|
2242
|
-
}
|
|
2243
|
-
const ln = (o) => {
|
|
2244
|
-
const { title: e = "Shortcut Keys", commands: t, sx: n, ...r } = o;
|
|
2245
|
-
return W(mo, { isModal: !0, onKeyDown: (l) => {
|
|
2246
|
-
l.keyCode === St.F1 && l.preventDefault();
|
|
2247
|
-
}, sx: { width: "780px", ...n }, title: e, autoFocusSel: ".input", ...r, children: W(io, { dividers: !0, children: W(Yo, { commands: t, sx: { marginBottom: "8px" } }) }) });
|
|
2248
|
-
};
|
|
2249
|
-
export {
|
|
2250
|
-
ln as default
|
|
2251
|
-
};
|