@devtron-labs/devtron-fe-common-lib 1.4.0-beta-3 → 1.4.0-beta-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{@code-editor-CJtUMNgR.js → @code-editor-zlnAVvPx.js} +6933 -7004
- package/dist/{@common-rjsf-8WBKwCV7.js → @common-rjsf-DzGbu1Bm.js} +2 -2
- package/dist/{@framer-motion-C4FMADic.js → @framer-motion-CdgdF0KV.js} +1 -1
- package/dist/{@react-dates-Bw9xFSwg.js → @react-dates-CtQV2TLr.js} +20 -20
- package/dist/{@react-select-DbkfUliH.js → @react-select-Cn3OpC9h.js} +1 -1
- package/dist/@react-virtualized-sticky-tree-CVJYfMx0.js +452 -0
- package/dist/{@vendor-BfPc30M8.js → @vendor-CwAQS8iU.js} +5155 -4713
- package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +13 -1
- package/dist/Common/CodeEditor/types.d.ts +4 -2
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/SegmentedBarChart/types.d.ts +0 -1
- package/dist/Pages/ResourceBrowser/service.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +0 -5
- package/dist/Shared/Components/Security/SecurityModal/index.d.ts +0 -1
- package/dist/Shared/Components/Security/SecurityModal/types.d.ts +0 -1
- package/dist/Shared/Components/Security/SecuritySummaryCard/SecuritySummaryCard.d.ts +3 -0
- package/dist/Shared/Components/Security/SecuritySummaryCard/index.d.ts +1 -0
- package/dist/Shared/Components/Security/SecuritySummaryCard/types.d.ts +10 -0
- package/dist/Shared/Components/Security/index.d.ts +1 -1
- package/dist/Shared/Components/Security/utils.d.ts +7 -5
- package/dist/Shared/Components/VirtualizedList/VirtualizedList.component.d.ts +2 -0
- package/dist/Shared/Components/VirtualizedList/VirtualizedList.constants.d.ts +2 -0
- package/dist/Shared/Components/VirtualizedList/VirtualizedList.types.d.ts +36 -0
- package/dist/Shared/Components/VirtualizedList/index.d.ts +2 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +1 -0
- package/dist/Shared/Services/types.d.ts +4 -0
- package/dist/assets/@code-editor.css +1 -1
- package/dist/index.js +368 -370
- package/package.json +6 -1
- package/dist/Shared/Components/Security/SecurityDetailsCards/SecurityCard.d.ts +0 -3
- package/dist/Shared/Components/Security/SecurityDetailsCards/SecurityDetailsCards.d.ts +0 -3
- package/dist/Shared/Components/Security/SecurityDetailsCards/index.d.ts +0 -2
- package/dist/Shared/Components/Security/SecurityDetailsCards/types.d.ts +0 -11
- package/dist/Shared/Components/Security/constants.d.ts +0 -2
- package/dist/Shared/Components/Security/types.d.ts +0 -18
- package/dist/assets/ic-shield-check.7f018238.svg +0 -3
- package/dist/assets/ic-shield-warning-outline.70fea3e8.svg +0 -3
@@ -1,8 +1,8 @@
|
|
1
|
-
import { j as n, J as A } from "./@vendor-
|
1
|
+
import { j as n, J as A } from "./@vendor-CwAQS8iU.js";
|
2
2
|
import E, { forwardRef as $ } from "react";
|
3
3
|
import L, { getDefaultRegistry as k } from "@rjsf/core";
|
4
4
|
import D from "@rjsf/validator-ajv8";
|
5
|
-
import { T as y, c as H, a as U, i as J, d as w } from "./@code-editor-
|
5
|
+
import { T as y, c as H, a as U, i as J, d as w } from "./@code-editor-zlnAVvPx.js";
|
6
6
|
import M, { components as O } from "react-select";
|
7
7
|
import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as P, errorId as V, englishStringTranslator as q, TranslatableString as K, titleId as Y, canExpand as z, deepEquals as G } from "@rjsf/utils";
|
8
8
|
import { ReactComponent as Q } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { g as ct, l as m, o as I, p as Yr, q as we, r as T, t as at, v as zt, w as ae, x as Xe, y as J, z as kr, B as Qn, C as Xr, D as ti, E as ei, F as ri, G as ni, H as ii, I as Wr, K as ai, L as oi, M as si, N as ui, O as li, P as fi, S as ci, T as yt, U as k, V as pe, W as Zr, X as vi, Y as di, Z as W, $, a0 as pi, a1 as he, a2 as Dt, a3 as hi, a4 as mi, a5 as $r, a6 as Mt, a7 as O, a8 as me, a9 as gi, aa as oe, ab as yi } from "./@vendor-
|
1
|
+
import { g as ct, l as m, o as I, p as Yr, q as we, r as T, t as at, v as zt, w as ae, x as Xe, y as J, z as kr, B as Qn, C as Xr, D as ti, E as ei, F as ri, G as ni, H as ii, I as Wr, K as ai, L as oi, M as si, N as ui, O as li, P as fi, S as ci, T as yt, U as k, V as pe, W as Zr, X as vi, Y as di, Z as W, $, a0 as pi, a1 as he, a2 as Dt, a3 as hi, a4 as mi, a5 as $r, a6 as Mt, a7 as O, a8 as me, a9 as gi, aa as oe, ab as yi } from "./@vendor-CwAQS8iU.js";
|
2
2
|
import * as K from "react";
|
3
3
|
import Ee, { createContext as bt, useContext as F, useLayoutEffect as Pi, useEffect as G, useState as qr, useRef as q, useCallback as ge, useMemo as It, forwardRef as bi, createElement as Vi, cloneElement as Ti, Children as Si, isValidElement as xi } from "react";
|
4
4
|
var We = "production", Le = typeof process > "u" || process.env === void 0 ? We : process.env.NODE_ENV || We, Q = function(t) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import Te from "react";
|
2
|
-
import { ac as xe, ad as we, ae as ve, af as lr, ag as Le, ah as Je, ai as tt, aj as at, ak as et, al as lt, am as rt, an as Xn, ao as sr, ap as Jn, aq as bt, ar as Go, as as dr, at as eo, au as to, av as ao, aw as $o, ax as Yo, ay as ur, az as Fe, aA as Rt, aB as Uo, aC as cr, aD as Qo, aE as Cr, aF as Zo, aG as Xo, aH as Jo } from "./@vendor-
|
2
|
+
import { ac as xe, ad as we, ae as ve, af as lr, ag as Le, ah as Je, ai as tt, aj as at, ak as et, al as lt, am as rt, an as Xn, ao as sr, ap as Jn, aq as bt, ar as Go, as as dr, at as eo, au as to, av as ao, aw as $o, ax as Yo, ay as ur, az as Fe, aA as Rt, aB as Uo, aC as cr, aD as Qo, aE as Cr, aF as Zo, aG as Xo, aH as Jo } from "./@vendor-CwAQS8iU.js";
|
3
3
|
import { r as Ne, g as ei, h as ti } from "./@moment-C_WeV3Af.js";
|
4
4
|
import './assets/@react-dates.css';var ro = {}, Wt = {}, jt = {}, Mr;
|
5
5
|
function Ve() {
|
@@ -216,7 +216,7 @@ function Ue() {
|
|
216
216
|
Object.defineProperty(a, "__esModule", {
|
217
217
|
value: !0
|
218
218
|
}), a.default = f;
|
219
|
-
var r = e(xe), c = e(we());
|
219
|
+
var r = e(xe()), c = e(we());
|
220
220
|
function d(v, o) {
|
221
221
|
var E = Object.keys(v);
|
222
222
|
if (Object.getOwnPropertySymbols) {
|
@@ -362,7 +362,7 @@ function Et() {
|
|
362
362
|
Object.defineProperty(a, "__esModule", {
|
363
363
|
value: !0
|
364
364
|
}), a.default = void 0;
|
365
|
-
var r = e(xe), c = e(lr), d = e(we()), l = Le(), f = (0, l.and)([d.default.instanceOf(Set), function(o, E) {
|
365
|
+
var r = e(xe()), c = e(lr), d = e(we()), l = Le(), f = (0, l.and)([d.default.instanceOf(Set), function(o, E) {
|
366
366
|
for (var P = arguments.length, x = new Array(P > 2 ? P - 2 : 0), $ = 2; $ < P; $++)
|
367
367
|
x[$ - 2] = arguments[$];
|
368
368
|
var J = o[E], X;
|
@@ -381,7 +381,7 @@ function oo() {
|
|
381
381
|
Object.defineProperty(a, "__esModule", {
|
382
382
|
value: !0
|
383
383
|
}), a.default = a.PureCalendarDay = void 0;
|
384
|
-
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = rt(), $ = e(Ne), J = e(Xn()), X = Ve(), ne = e(Ue()), q = e(no()), ie = e(Et()), ae = Ce();
|
384
|
+
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe()), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = rt(), $ = e(Ne), J = e(Xn()), X = Ve(), ne = e(Ue()), q = e(no()), ie = e(Et()), ae = Ce();
|
385
385
|
function re(K, D) {
|
386
386
|
var s = Object.keys(K);
|
387
387
|
if (Object.getOwnPropertySymbols) {
|
@@ -783,7 +783,7 @@ function lo() {
|
|
783
783
|
Object.defineProperty(a, "__esModule", {
|
784
784
|
value: !0
|
785
785
|
}), a.default = void 0;
|
786
|
-
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = rt(), $ = e(Ne), J = Ve(), X = e(Ue()), ne = e(ri()), q = e(oo()), ie = e(io()), ae = e(ni()), re = e(vt()), le = e(Ct()), ee = e(Et()), U = e(_t()), H = e(pt()), oe = Ce();
|
786
|
+
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe()), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = rt(), $ = e(Ne), J = Ve(), X = e(Ue()), ne = e(ri()), q = e(oo()), ie = e(io()), ae = e(ni()), re = e(vt()), le = e(Ct()), ee = e(Et()), U = e(_t()), H = e(pt()), oe = Ce();
|
787
787
|
function K(M, V) {
|
788
788
|
var O = Object.keys(M);
|
789
789
|
if (Object.getOwnPropertySymbols) {
|
@@ -1085,7 +1085,7 @@ function uo() {
|
|
1085
1085
|
Object.defineProperty(a, "__esModule", {
|
1086
1086
|
value: !0
|
1087
1087
|
}), a.default = void 0;
|
1088
|
-
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = rt(), $ = e(Ne), J = sr, X = Ve(), ne = e(Ue()), q = e(ct()), ie = e(lo()), ae = e(oi()), re = e(ii()), le = e(so()), ee = e(Ft()), U = e(li()), H = e(si()), oe = e(Et()), K = e(_t()), D = e(pt()), s = Ce();
|
1088
|
+
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe()), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = rt(), $ = e(Ne), J = sr, X = Ve(), ne = e(Ue()), q = e(ct()), ie = e(lo()), ae = e(oi()), re = e(ii()), le = e(so()), ee = e(Ft()), U = e(li()), H = e(si()), oe = e(Et()), K = e(_t()), D = e(pt()), s = Ce();
|
1089
1089
|
function u(S, C) {
|
1090
1090
|
var t = Object.keys(S);
|
1091
1091
|
if (Object.getOwnPropertySymbols) {
|
@@ -1524,7 +1524,7 @@ function po() {
|
|
1524
1524
|
Object.defineProperty(a, "__esModule", {
|
1525
1525
|
value: !0
|
1526
1526
|
}), a.default = d;
|
1527
|
-
var r = e(xe), c = Ce();
|
1527
|
+
var r = e(xe()), c = Ce();
|
1528
1528
|
function d(l, f, v, o) {
|
1529
1529
|
var E = typeof window < "u" ? window.innerWidth : 0, P = l === c.ANCHOR_LEFT ? E - v : v, x = o || 0;
|
1530
1530
|
return (0, r.default)({}, l, Math.min(f + P - x, 0));
|
@@ -1628,7 +1628,7 @@ function bo() {
|
|
1628
1628
|
Object.defineProperty(a, "__esModule", {
|
1629
1629
|
value: !0
|
1630
1630
|
}), a.default = void 0;
|
1631
|
-
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe), v = e(Te), o = e(we()), E = Le(), P = rt(), x = e(Jn()), $ = e(bt()), J = e(ct()), X = e(hr()), ne = e(yt()), q = Ce();
|
1631
|
+
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe()), v = e(Te), o = e(we()), E = Le(), P = rt(), x = e(Jn()), $ = e(bt()), J = e(ct()), X = e(hr()), ne = e(yt()), q = Ce();
|
1632
1632
|
function ie(s, u) {
|
1633
1633
|
var g = Object.keys(s);
|
1634
1634
|
if (Object.getOwnPropertySymbols) {
|
@@ -1970,7 +1970,7 @@ function Po() {
|
|
1970
1970
|
Object.defineProperty(a, "__esModule", {
|
1971
1971
|
value: !0
|
1972
1972
|
}), a.default = void 0;
|
1973
|
-
var r = e(tt()), c = e(xe), d = e(Te), l = e(we()), f = Le(), v = rt(), o = Ve(), E = e(Ue()), P = e(ct()), x = e(yt()), $ = e(bo()), J = e(St()), X = e(Mt()), ne = e(go()), q = e(_o()), ie = e(wt()), ae = e(So()), re = Ce();
|
1973
|
+
var r = e(tt()), c = e(xe()), d = e(Te), l = e(we()), f = Le(), v = rt(), o = Ve(), E = e(Ue()), P = e(ct()), x = e(yt()), $ = e(bo()), J = e(St()), X = e(Mt()), ne = e(go()), q = e(_o()), ie = e(wt()), ae = e(So()), re = Ce();
|
1974
1974
|
function le(D, s) {
|
1975
1975
|
var u = Object.keys(D);
|
1976
1976
|
if (Object.getOwnPropertySymbols) {
|
@@ -2600,7 +2600,7 @@ function Co() {
|
|
2600
2600
|
Object.defineProperty(kt, "__esModule", {
|
2601
2601
|
value: !0
|
2602
2602
|
}), kt.addModifier = E, kt.deleteModifier = P;
|
2603
|
-
var e = a(xe), r = a(pr()), c = a(Ct()), d = a(Ft()), l = a(ci()), f = Ce();
|
2603
|
+
var e = a(xe()), r = a(pr()), c = a(Ct()), d = a(Ft()), l = a(ci()), f = Ce();
|
2604
2604
|
function v(x, $) {
|
2605
2605
|
var J = Object.keys(x);
|
2606
2606
|
if (Object.getOwnPropertySymbols) {
|
@@ -2723,7 +2723,7 @@ function vi() {
|
|
2723
2723
|
Object.defineProperty(a, "__esModule", {
|
2724
2724
|
value: !0
|
2725
2725
|
}), a.default = void 0;
|
2726
|
-
var r = e(Je()), c = e(tt()), d = e(lr), l = e(et()), f = e(xe), v = e(Te), o = e(we()), E = Le(), P = rt(), x = Ve(), $ = e(Ue()), J = e(ct()), X = e(_o()), ne = e(go()), q = e(fi()), ie = e(hi()), ae = e(Pt()), re = e(_t()), le = Ce();
|
2726
|
+
var r = e(Je()), c = e(tt()), d = e(lr), l = e(et()), f = e(xe()), v = e(Te), o = e(we()), E = Le(), P = rt(), x = Ve(), $ = e(Ue()), J = e(ct()), X = e(_o()), ne = e(go()), q = e(fi()), ie = e(hi()), ae = e(Pt()), re = e(_t()), le = Ce();
|
2727
2727
|
function ee(s, u) {
|
2728
2728
|
var g = Object.keys(s);
|
2729
2729
|
if (Object.getOwnPropertySymbols) {
|
@@ -3000,7 +3000,7 @@ function pi() {
|
|
3000
3000
|
Object.defineProperty(a, "__esModule", {
|
3001
3001
|
value: !0
|
3002
3002
|
}), a.default = void 0;
|
3003
|
-
var r = e(tt()), c = e(xe), d = e(Te), l = e(we()), f = Le(), v = rt();
|
3003
|
+
var r = e(tt()), c = e(xe()), d = e(Te), l = e(we()), f = Le(), v = rt();
|
3004
3004
|
function o(X, ne) {
|
3005
3005
|
var q = Object.keys(X);
|
3006
3006
|
if (Object.getOwnPropertySymbols) {
|
@@ -3089,7 +3089,7 @@ function yi() {
|
|
3089
3089
|
Object.defineProperty(a, "__esModule", {
|
3090
3090
|
value: !0
|
3091
3091
|
}), a.default = a.BOTTOM_RIGHT = a.TOP_RIGHT = a.TOP_LEFT = void 0;
|
3092
|
-
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe), v = e(Te), o = e(we()), E = Le(), P = rt(), x = Ve(), $ = e(Ue()), J = e(pi()), X = e(wt());
|
3092
|
+
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe()), v = e(Te), o = e(we()), E = Le(), P = rt(), x = Ve(), $ = e(Ue()), J = e(pi()), X = e(wt());
|
3093
3093
|
function ne(K, D) {
|
3094
3094
|
var s = Object.keys(K);
|
3095
3095
|
if (Object.getOwnPropertySymbols) {
|
@@ -3443,7 +3443,7 @@ function yr() {
|
|
3443
3443
|
Object.defineProperty(a, "__esModule", {
|
3444
3444
|
value: !0
|
3445
3445
|
}), a.default = a.PureDayPicker = a.defaultProps = void 0;
|
3446
|
-
var c = r(Je()), d = r(tt()), l = r(lr), f = r(at()), v = r(et()), o = r(xe), E = r(Te), P = r(we()), x = Le(), $ = rt(), J = r(Ne), X = r(Jn()), ne = r(bt()), q = r(dr()), ie = Ve(), ae = r(Ue()), re = r(ct()), le = r(uo()), ee = r(vi()), U = e(yi()), H = r(Di()), oe = r(so()), K = r(io()), D = r(bi()), s = r(pr()), u = r(fr()), g = r(Et()), F = r(Pt()), M = r(_t()), V = r(pt()), O = r(It()), h = Ce();
|
3446
|
+
var c = r(Je()), d = r(tt()), l = r(lr), f = r(at()), v = r(et()), o = r(xe()), E = r(Te), P = r(we()), x = Le(), $ = rt(), J = r(Ne), X = r(Jn()), ne = r(bt()), q = r(dr()), ie = Ve(), ae = r(Ue()), re = r(ct()), le = r(uo()), ee = r(vi()), U = e(yi()), H = r(Di()), oe = r(so()), K = r(io()), D = r(bi()), s = r(pr()), u = r(fr()), g = r(Et()), F = r(Pt()), M = r(_t()), V = r(pt()), O = r(It()), h = Ce();
|
3447
3447
|
function S(y, _) {
|
3448
3448
|
var j = Object.keys(y);
|
3449
3449
|
if (Object.getOwnPropertySymbols) {
|
@@ -4167,7 +4167,7 @@ function Io() {
|
|
4167
4167
|
Object.defineProperty(a, "__esModule", {
|
4168
4168
|
value: !0
|
4169
4169
|
}), a.default = void 0;
|
4170
|
-
var r = e(Je()), c = e(eo), d = e(xe), l = e(at()), f = e(et()), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = e(Ne), $ = e(to()), J = e(bt()), X = Ve(), ne = e(Ue()), q = e(mt()), ie = e(ko()), ae = e(vt()), re = e(At()), le = e(Tt()), ee = e(di()), U = e(Oo()), H = e(pr()), oe = e(ui()), K = e(Ct()), D = Co(), s = e(Mt()), u = e(co()), g = e(_t()), F = e(pt()), M = e(It()), V = e(Pt()), O = Ce(), h = e(yr()), S = e(Mo());
|
4170
|
+
var r = e(Je()), c = e(eo), d = e(xe()), l = e(at()), f = e(et()), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = e(Ne), $ = e(to()), J = e(bt()), X = Ve(), ne = e(Ue()), q = e(mt()), ie = e(ko()), ae = e(vt()), re = e(At()), le = e(Tt()), ee = e(di()), U = e(Oo()), H = e(pr()), oe = e(ui()), K = e(Ct()), D = Co(), s = e(Mt()), u = e(co()), g = e(_t()), F = e(pt()), M = e(It()), V = e(Pt()), O = Ce(), h = e(yr()), S = e(Mo());
|
4171
4171
|
function C(T, I) {
|
4172
4172
|
var z = Object.keys(T);
|
4173
4173
|
if (Object.getOwnPropertySymbols) {
|
@@ -4870,7 +4870,7 @@ function gi() {
|
|
4870
4870
|
Object.defineProperty(a, "__esModule", {
|
4871
4871
|
value: !0
|
4872
4872
|
}), a.default = a.PureDateRangePicker = void 0;
|
4873
|
-
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe), v = e(Te), o = e(Ne), E = rt(), P = ao, x = Le(), $ = sr, J = e(bt()), X = e(dr()), ne = e(vo()), q = Ve(), ie = e(po()), ae = e(yo()), re = e(hr()), le = e(mt()), ee = e(Do()), U = e(ct()), H = e(mo()), oe = e(Io()), K = e(wt()), D = Ce();
|
4873
|
+
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe()), v = e(Te), o = e(Ne), E = rt(), P = ao, x = Le(), $ = sr, J = e(bt()), X = e(dr()), ne = e(vo()), q = Ve(), ie = e(po()), ae = e(yo()), re = e(hr()), le = e(mt()), ee = e(Do()), U = e(ct()), H = e(mo()), oe = e(Io()), K = e(wt()), D = Ce();
|
4874
4874
|
function s(O, h) {
|
4875
4875
|
var S = Object.keys(O);
|
4876
4876
|
if (Object.getOwnPropertySymbols) {
|
@@ -5275,7 +5275,7 @@ function To() {
|
|
5275
5275
|
Object.defineProperty(a, "__esModule", {
|
5276
5276
|
value: !0
|
5277
5277
|
}), a.default = void 0;
|
5278
|
-
var r = e(Je()), c = e(eo), d = e(xe), l = e(at()), f = e(et()), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = e(Ne), $ = e(to()), J = e(bt()), X = Ve(), ne = e(Ue()), q = e(vt()), ie = e(At()), ae = e(Oo()), re = e(Ct()), le = Co(), ee = e(_t()), U = e(pt()), H = e(It()), oe = e(Pt()), K = Ce(), D = e(yr()), s = e(Mo());
|
5278
|
+
var r = e(Je()), c = e(eo), d = e(xe()), l = e(at()), f = e(et()), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = e(Ne), $ = e(to()), J = e(bt()), X = Ve(), ne = e(Ue()), q = e(vt()), ie = e(At()), ae = e(Oo()), re = e(Ct()), le = Co(), ee = e(_t()), U = e(pt()), H = e(It()), oe = e(Pt()), K = Ce(), D = e(yr()), s = e(Mo());
|
5279
5279
|
function u(O, h) {
|
5280
5280
|
var S = Object.keys(O);
|
5281
5281
|
if (Object.getOwnPropertySymbols) {
|
@@ -5783,7 +5783,7 @@ function No() {
|
|
5783
5783
|
Object.defineProperty(a, "__esModule", {
|
5784
5784
|
value: !0
|
5785
5785
|
}), a.default = void 0;
|
5786
|
-
var r = e(tt()), c = e(xe), d = e(Te), l = e(we()), f = Le(), v = rt(), o = Ve(), E = e(Ue()), P = e(ct()), x = e(bo()), $ = e(St()), J = e(wt()), X = e(So()), ne = e(yt()), q = Ce();
|
5786
|
+
var r = e(tt()), c = e(xe()), d = e(Te), l = e(we()), f = Le(), v = rt(), o = Ve(), E = e(Ue()), P = e(ct()), x = e(bo()), $ = e(St()), J = e(wt()), X = e(So()), ne = e(yt()), q = Ce();
|
5787
5787
|
function ie(H, oe) {
|
5788
5788
|
var K = Object.keys(H);
|
5789
5789
|
if (Object.getOwnPropertySymbols) {
|
@@ -6185,7 +6185,7 @@ function Si() {
|
|
6185
6185
|
Object.defineProperty(a, "__esModule", {
|
6186
6186
|
value: !0
|
6187
6187
|
}), a.default = a.PureSingleDatePicker = void 0;
|
6188
|
-
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe), v = e(Te), o = e(Ne), E = rt(), P = ao, x = Le(), $ = sr, J = e(bt()), X = e(dr()), ne = e(wo()), q = Ve(), ie = e(po()), ae = e(yo()), re = e(hr()), le = e(mt()), ee = e(Do()), U = e(ct()), H = e(_i()), oe = e(To()), K = e(wt()), D = Ce();
|
6188
|
+
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe()), v = e(Te), o = e(Ne), E = rt(), P = ao, x = Le(), $ = sr, J = e(bt()), X = e(dr()), ne = e(wo()), q = Ve(), ie = e(po()), ae = e(yo()), re = e(hr()), le = e(mt()), ee = e(Do()), U = e(ct()), H = e(_i()), oe = e(To()), K = e(wt()), D = Ce();
|
6189
6189
|
function s(O, h) {
|
6190
6190
|
var S = Object.keys(O);
|
6191
6191
|
if (Object.getOwnPropertySymbols) {
|
@@ -6868,7 +6868,7 @@ function Eo() {
|
|
6868
6868
|
Object.defineProperty(a, "__esModule", {
|
6869
6869
|
value: !0
|
6870
6870
|
}), a.default = a.PureCustomizableCalendarDay = a.selectedStyles = a.lastInRangeStyles = a.selectedSpanStyles = a.hoveredSpanStyles = a.blockedOutOfRangeStyles = a.blockedCalendarStyles = a.blockedMinNightsStyles = a.highlightedCalendarStyles = a.outsideStyles = a.defaultStyles = void 0;
|
6871
|
-
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = rt(), $ = e(Ne), J = e(Xn()), X = Ve(), ne = e(Ue()), q = e(no()), ie = Ce(), ae = e(Eo());
|
6871
|
+
var r = e(Je()), c = e(tt()), d = e(at()), l = e(et()), f = e(xe()), v = e(Te), o = e(we()), E = e(lt()), P = Le(), x = rt(), $ = e(Ne), J = e(Xn()), X = Ve(), ne = e(Ue()), q = e(no()), ie = Ce(), ae = e(Eo());
|
6872
6872
|
function re(p, m) {
|
6873
6873
|
var N = Object.keys(p);
|
6874
6874
|
if (Object.getOwnPropertySymbols) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { aI as xt, aJ as Bt, aK as Ft, aL as v, aM as U, aN as xe, ay as re, aO as h, aG as f, aP as Y, aQ as Vt, aR as Ue, aS as Et, aT as yt, aU as Wt, aV as Xt, aW as Zt, aX as ne } from "./@vendor-
|
1
|
+
import { aI as xt, aJ as Bt, aK as Ft, aL as v, aM as U, aN as xe, ay as re, aO as h, aG as f, aP as Y, aQ as Vt, aR as Ue, aS as Et, aT as yt, aU as Wt, aV as Xt, aW as Zt, aX as ne } from "./@vendor-CwAQS8iU.js";
|
2
2
|
import * as y from "react";
|
3
3
|
import { useContext as Nt, useRef as j, useState as ee, createContext as St, useMemo as q, useCallback as D, Component as Rt, Fragment as Be, useEffect as Qe, forwardRef as Ht } from "react";
|
4
4
|
import { createPortal as Tt } from "react-dom";
|
@@ -0,0 +1,452 @@
|
|
1
|
+
var v = Object.defineProperty;
|
2
|
+
var E = (a, h, e) => h in a ? v(a, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[h] = e;
|
3
|
+
var f = (a, h, e) => E(a, typeof h != "symbol" ? h + "" : h, e);
|
4
|
+
import u, { createRef as k } from "react";
|
5
|
+
import { aY as x } from "./@vendor-CwAQS8iU.js";
|
6
|
+
const b = () => typeof navigator < "u" && /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor) ? "-webkit-sticky" : "sticky";
|
7
|
+
var g;
|
8
|
+
(function(a) {
|
9
|
+
a.OBSERVED = "observed", a.REQUESTED = "requested";
|
10
|
+
})(g || (g = {}));
|
11
|
+
class N extends u.PureComponent {
|
12
|
+
constructor(e) {
|
13
|
+
super(e);
|
14
|
+
f(this, "nodes");
|
15
|
+
f(this, "getChildrenCache");
|
16
|
+
f(this, "rowRenderCache");
|
17
|
+
f(this, "rowRenderRange");
|
18
|
+
f(this, "structureChanged");
|
19
|
+
f(this, "elemRef", k());
|
20
|
+
f(this, "pendingScrollTop");
|
21
|
+
f(this, "treeToRender");
|
22
|
+
this.props.apiRef && this.props.apiRef(this), this.state = {
|
23
|
+
scrollTop: 0,
|
24
|
+
currNodePos: 0,
|
25
|
+
scrollTick: !1
|
26
|
+
}, this.nodes = [], this.structureChanged = !1, this.onScroll = this.onScroll.bind(this), this.getChildrenCache = {}, this.rowRenderCache = {}, this.rowRenderRange = void 0;
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* Converts the consumer's tree structure into a flat array with root at index: 0,
|
30
|
+
* including information about the top and height of each node.
|
31
|
+
*
|
32
|
+
* i.e:
|
33
|
+
* [
|
34
|
+
* { id: 'root', top: 0, index: 0, height: 100. isSticky: true , zIndex: 0, stickyTop: 10 },
|
35
|
+
* { id: 'child1', top: 10, index: 1, parentIndex: 0 height: 10, isSticky: false },
|
36
|
+
* ...
|
37
|
+
* ]
|
38
|
+
*/
|
39
|
+
flattenTree(e, t = this.props, i = [], s = !1, r = !1, o = void 0, d = { totalHeight: 0 }) {
|
40
|
+
const n = i.length, S = e.height !== void 0 ? e.height : t.rowHeight, R = o !== void 0 ? i[o] : void 0, { isSticky: T = !1, stickyTop: w = 0, zIndex: I = 0, node: m } = e, p = {
|
41
|
+
id: m.id,
|
42
|
+
isSticky: T,
|
43
|
+
stickyTop: w,
|
44
|
+
zIndex: I,
|
45
|
+
node: m,
|
46
|
+
top: d.totalHeight,
|
47
|
+
isLeafNode: !1,
|
48
|
+
meta: e.meta,
|
49
|
+
parentIndex: o,
|
50
|
+
parentInfo: R,
|
51
|
+
depth: R !== void 0 ? R.depth + 1 : 0,
|
52
|
+
height: S,
|
53
|
+
index: n,
|
54
|
+
isFirstChild: s,
|
55
|
+
isLastChild: r,
|
56
|
+
totalHeight: 0
|
57
|
+
};
|
58
|
+
i.push(p), R !== void 0 && R.children.push(n), d.totalHeight += S;
|
59
|
+
const l = t.getChildren(e.node, p);
|
60
|
+
if (t.isModelImmutable) {
|
61
|
+
let c = this.getChildrenCache[p.id];
|
62
|
+
(l === void 0 || c !== l) && (delete this.rowRenderCache[p.id], this.getChildrenCache[p.id] = l, c && l && (l.length !== c.length || !l.every((C, y) => C.node.id === c[y].node.id)) && (this.structureChanged = !0, this.getBranchChildrenIds(l).forEach((C) => delete this.rowRenderCache[C])));
|
63
|
+
} else
|
64
|
+
this.structureChanged = !0;
|
65
|
+
if (Array.isArray(l)) {
|
66
|
+
p.children = [];
|
67
|
+
for (let c = 0; c < l.length; c++) {
|
68
|
+
const C = l[c];
|
69
|
+
this.flattenTree(C, t, i, c === 0, c === l.length - 1, n, d);
|
70
|
+
}
|
71
|
+
} else
|
72
|
+
p.isLeafNode = !0;
|
73
|
+
return p.totalHeight = d.totalHeight - p.top, i;
|
74
|
+
}
|
75
|
+
getBranchChildrenIds(e, t = []) {
|
76
|
+
return e && e.forEach((i) => {
|
77
|
+
t.push(i.node.id), this.getBranchChildrenIds(this.getChildrenCache[i.node.id], t);
|
78
|
+
}), t;
|
79
|
+
}
|
80
|
+
UNSAFE_componentWillMount() {
|
81
|
+
this.refreshCachedMetadata(this.props), this.storeRenderTree(this.props, this.state);
|
82
|
+
}
|
83
|
+
treeDataUpdated(e) {
|
84
|
+
return e.root !== this.props.root || e.getChildren !== this.props.getChildren || e.rowHeight !== this.props.rowHeight;
|
85
|
+
}
|
86
|
+
UNSAFE_componentWillReceiveProps(e) {
|
87
|
+
this.treeDataUpdated(e) && this.refreshCachedMetadata(e), e.scrollIndex !== void 0 && e.scrollIndex >= 0 && this.scrollIndexIntoView(e.scrollIndex);
|
88
|
+
}
|
89
|
+
UNSAFE_componentWillUpdate(e, t) {
|
90
|
+
(t.scrollTick === this.state.scrollTick || t.currNodePos !== this.state.currNodePos) && this.storeRenderTree(e, t);
|
91
|
+
}
|
92
|
+
getNode(e) {
|
93
|
+
return this.nodes[this.getNodeIndex(e)]?.node;
|
94
|
+
}
|
95
|
+
/**
|
96
|
+
* Returns the index of the node in a flat list tree (post-order traversal).
|
97
|
+
*
|
98
|
+
* @param nodeId The node index to get the index for.
|
99
|
+
* @returns {number}
|
100
|
+
*/
|
101
|
+
getNodeIndex(e) {
|
102
|
+
return this.nodes.findIndex((t) => t.id === e);
|
103
|
+
}
|
104
|
+
/**
|
105
|
+
* Returns the node that appears higher than this node (either a parent, sibling or child of the sibling above).
|
106
|
+
* @param nodeId The node to get the previous node of.
|
107
|
+
* @returns {*}
|
108
|
+
*/
|
109
|
+
getPreviousNodeId(e) {
|
110
|
+
const t = this.getNodeIndex(e);
|
111
|
+
if (t !== -1) {
|
112
|
+
const i = this.nodes[t - 1];
|
113
|
+
if (i)
|
114
|
+
return i.id;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Returns the node that appears lower than this node (sibling or sibling of the node's parent).
|
119
|
+
* @param nodeId The node to get the next node of.
|
120
|
+
* @returns {*}
|
121
|
+
*/
|
122
|
+
getNextNodeId(e) {
|
123
|
+
const t = this.getNodeIndex(e);
|
124
|
+
if (t !== -1) {
|
125
|
+
const i = this.nodes[t + 1];
|
126
|
+
if (i)
|
127
|
+
return i.id;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
/**
|
131
|
+
* Returns true if the node is completely visible and is not obscured.
|
132
|
+
* This will return false when the node is partially obscured.
|
133
|
+
*
|
134
|
+
* @param nodeId The id of the node to check
|
135
|
+
* @param includeObscured if true, this method will return true for partially visible nodes.
|
136
|
+
* @returns {boolean}
|
137
|
+
*/
|
138
|
+
isNodeVisible(e, t = !1) {
|
139
|
+
return this.isIndexVisible(this.getNodeIndex(e), t);
|
140
|
+
}
|
141
|
+
/**
|
142
|
+
* Returns true if the node is completely visible and is not obscured, unless includeObscured is specified.
|
143
|
+
* This will return false when the node is partially obscured, unless includeObscured is set to true.
|
144
|
+
*
|
145
|
+
* @param index The index of the node to check, generally retrieved via getNodeIndex()
|
146
|
+
* @param includeObscured if true, this method will return true for partially visible nodes.
|
147
|
+
* @returns {boolean}
|
148
|
+
*/
|
149
|
+
isIndexVisible(e, t = !1) {
|
150
|
+
let i;
|
151
|
+
const s = this.nodes[e];
|
152
|
+
if (!s)
|
153
|
+
return !1;
|
154
|
+
if (s.isSticky && e === this.state.currNodePos || this.getParentPath(this.state.currNodePos).includes(this.nodes[e]))
|
155
|
+
return !0;
|
156
|
+
const r = this.getScrollTop();
|
157
|
+
if (t ? this.elemRef.current && (i = r <= s.top + s.height - s.stickyTop && r + this.props.height >= s.top) : i = this.isIndexInViewport(e), i) {
|
158
|
+
const o = this.getParentPath(e, !1);
|
159
|
+
for (let d = 0; d < o.length; d++) {
|
160
|
+
const n = o[d];
|
161
|
+
if (n.isSticky && (!t && n.stickyTop + n.height > s.top - r || t && n.stickyTop + n.height > s.top + s.height - r))
|
162
|
+
return !1;
|
163
|
+
}
|
164
|
+
return !0;
|
165
|
+
}
|
166
|
+
return !1;
|
167
|
+
}
|
168
|
+
/**
|
169
|
+
* Returns true if the node is within the view port window. Note this this will return FALSE for visible sticky nodes that are
|
170
|
+
* partially out of view disregarding sticky, which is useful when the node will become unstuck. This may occur when the node is
|
171
|
+
* collapsed in a tree. In this case, you want to scroll this node back into view so that the collapsed node stays in the same position.
|
172
|
+
*
|
173
|
+
* @param nodeId The id of the node to check
|
174
|
+
* @returns {boolean}
|
175
|
+
*/
|
176
|
+
isNodeInViewport(e) {
|
177
|
+
return this.isIndexInViewport(this.getNodeIndex(e));
|
178
|
+
}
|
179
|
+
/**
|
180
|
+
* Returns true if the node is within the view port window. Note this this will return FALSE for visible sticky nodes that are
|
181
|
+
* partially out of view disregarding sticky, which is useful when the node will become unstuck. This may occur when the node is
|
182
|
+
* collapsed in a tree. In this case, you want to scroll this node back into view so that the collapsed node stays in the same position.
|
183
|
+
*
|
184
|
+
* This also returns false if the node is partially out of view.
|
185
|
+
*
|
186
|
+
* @param index The node index, generally retrieved via getNodeIndex()
|
187
|
+
* @returns {boolean}
|
188
|
+
*/
|
189
|
+
isIndexInViewport(e) {
|
190
|
+
let t = this.nodes[e];
|
191
|
+
if (!t || !this.elemRef)
|
192
|
+
return !1;
|
193
|
+
const i = this.getScrollTop();
|
194
|
+
return i <= t.top - t.stickyTop && i + this.props.height >= t.top + t.height;
|
195
|
+
}
|
196
|
+
/**
|
197
|
+
* Returns the top of the node with the specified id.
|
198
|
+
* @param nodeId
|
199
|
+
*/
|
200
|
+
getNodeTop(e) {
|
201
|
+
return this.getIndexTop(this.getNodeIndex(e));
|
202
|
+
}
|
203
|
+
/**
|
204
|
+
* Returns the top of the node with the specified index.
|
205
|
+
* @param index
|
206
|
+
*/
|
207
|
+
getIndexTop(e) {
|
208
|
+
const t = this.nodes[e];
|
209
|
+
return t ? t.top : -1;
|
210
|
+
}
|
211
|
+
/**
|
212
|
+
* Returns the scrollTop of the scrollable element
|
213
|
+
*
|
214
|
+
* @return returns -1 if the elem does not exist.
|
215
|
+
*/
|
216
|
+
getScrollTop() {
|
217
|
+
return this.elemRef.current ? this.elemRef.current.scrollTop : -1;
|
218
|
+
}
|
219
|
+
/**
|
220
|
+
* Returns the scrollLeft of the scrollable element
|
221
|
+
*
|
222
|
+
* @return returns -1 if the elem does not exist.
|
223
|
+
*/
|
224
|
+
getScrollLeft() {
|
225
|
+
return this.elemRef.current ? this.elemRef.current.scrollLeft : -1;
|
226
|
+
}
|
227
|
+
/**
|
228
|
+
* Sets the scrollTop position of the scrollable element.
|
229
|
+
* @param scrollTop
|
230
|
+
*/
|
231
|
+
setScrollTop(e) {
|
232
|
+
isNaN(e) || this.setScrollTopAndClosestNode(e, this.state.currNodePos, g.REQUESTED);
|
233
|
+
}
|
234
|
+
/**
|
235
|
+
* Sets the scrollLeft position of the scrollable element.
|
236
|
+
* @param scrollLeft
|
237
|
+
*/
|
238
|
+
setScrollLeft(e) {
|
239
|
+
!isNaN(e) && this.elemRef.current && (this.elemRef.current.scrollLeft = e);
|
240
|
+
}
|
241
|
+
/**
|
242
|
+
* Scrolls the node into view so that it is visible.
|
243
|
+
*
|
244
|
+
* @param nodeId The node id of the node to scroll into view.
|
245
|
+
* @param alignToTop if true, the node will aligned to the top of viewport, or sticky parent. If false, the bottom of the node will
|
246
|
+
* be aligned with the bottom of the viewport.
|
247
|
+
*/
|
248
|
+
scrollNodeIntoView(e, t = !0) {
|
249
|
+
this.scrollIndexIntoView(this.getNodeIndex(e), t);
|
250
|
+
}
|
251
|
+
/**
|
252
|
+
* Scrolls the node into view so that it is visible.
|
253
|
+
*
|
254
|
+
* @param index The index of the node.
|
255
|
+
* @param alignToTop if true, the node will aligned to the top of viewport, or sticky parent. If false, the bottom of the node will
|
256
|
+
* be aligned with the bottom of the viewport.
|
257
|
+
*/
|
258
|
+
scrollIndexIntoView(e, t = !0) {
|
259
|
+
let i = this.nodes[e];
|
260
|
+
if (i !== void 0) {
|
261
|
+
let s;
|
262
|
+
if (t)
|
263
|
+
if (i.isSticky)
|
264
|
+
s = i.top - i.stickyTop;
|
265
|
+
else {
|
266
|
+
const r = this.getParentPath(e, !1);
|
267
|
+
for (let o = 0; o < r.length; o++) {
|
268
|
+
const d = r[o];
|
269
|
+
if (d.isSticky) {
|
270
|
+
s = i.top - d.stickyTop - d.height;
|
271
|
+
break;
|
272
|
+
}
|
273
|
+
}
|
274
|
+
s === void 0 && (s = i.top);
|
275
|
+
}
|
276
|
+
else
|
277
|
+
s = i.top - this.props.height + i.height;
|
278
|
+
this.setScrollTop(s);
|
279
|
+
}
|
280
|
+
}
|
281
|
+
componentDidUpdate(e, t) {
|
282
|
+
if (this.state.scrollReason === g.REQUESTED && this.elemRef.current && this.state.scrollTop >= 0 && this.state.scrollTop !== this.elemRef.current.scrollTop && (this.elemRef.current.scrollTop = this.state.scrollTop), this.props.onRowsRendered !== void 0 && (t.currNodePos !== this.state.currNodePos || this.treeDataUpdated(e))) {
|
283
|
+
const i = this.rowRenderRange, s = this.nodes[i.visibleStart], r = this.nodes[i.visibleEnd];
|
284
|
+
this.props.onRowsRendered({
|
285
|
+
overscanStartIndex: i.start,
|
286
|
+
overscanStopIndex: i.end,
|
287
|
+
startIndex: i.visibleStart,
|
288
|
+
stopIndex: i.visibleEnd,
|
289
|
+
startNode: s && s,
|
290
|
+
endNode: r && r,
|
291
|
+
nodes: this.nodes
|
292
|
+
});
|
293
|
+
}
|
294
|
+
}
|
295
|
+
refreshCachedMetadata(e) {
|
296
|
+
this.structureChanged = !1, this.nodes = this.flattenTree(e.root, e), this.structureChanged && this.elemRef && this.setScrollTopAndClosestNode(this.pendingScrollTop || this.getScrollTop(), 0, g.REQUESTED);
|
297
|
+
}
|
298
|
+
recomputeTree() {
|
299
|
+
this.props.root !== void 0 && this.props.getChildren !== void 0 && (this.refreshCachedMetadata(this.props), this.forceUpdate());
|
300
|
+
}
|
301
|
+
storeRenderTree(e, t) {
|
302
|
+
this.treeToRender = this.renderParentTree(e, t);
|
303
|
+
}
|
304
|
+
forceUpdate() {
|
305
|
+
this.getChildrenCache = {}, this.rowRenderCache = {}, this.storeRenderTree(this.props, this.state), super.forceUpdate();
|
306
|
+
}
|
307
|
+
renderParentTree(e, t) {
|
308
|
+
this.rowRenderRange = this.getRenderRowRange(e, t);
|
309
|
+
const i = this.getParentPath(this.rowRenderRange.start), s = /* @__PURE__ */ new Set();
|
310
|
+
for (let r = 0; r < i.length; r++)
|
311
|
+
s.add(i[r].index);
|
312
|
+
for (let r = this.rowRenderRange.start; r <= this.rowRenderRange.end; r++)
|
313
|
+
s.add(this.nodes[r].index);
|
314
|
+
return this.props.renderRoot ? u.createElement("div", { className: "rv-sticky-node-list", style: { width: "100%", position: "absolute", top: 0 } }, this.renderChildWithChildren(e, t, this.nodes[0], 0, s)) : this.renderParentContainer(e, t, this.nodes[0], s);
|
315
|
+
}
|
316
|
+
renderParentContainer(e, t, i, s) {
|
317
|
+
return u.createElement("div", { className: "rv-sticky-node-list", style: { position: "absolute", width: "100%", height: i.totalHeight - i.height } }, this.renderChildren(e, t, i, s));
|
318
|
+
}
|
319
|
+
getChildContainerStyle(e, t) {
|
320
|
+
return { position: "absolute", top: t, height: e.totalHeight, width: "100%" };
|
321
|
+
}
|
322
|
+
renderChildWithChildren(e, t, i, s, r) {
|
323
|
+
return u.createElement(
|
324
|
+
"div",
|
325
|
+
{ key: `rv-node-${i.id}`, className: "rv-sticky-parent-node", style: this.getChildContainerStyle(i, s) },
|
326
|
+
this.renderNode(e, t, i, this.getClientNodeStyle(i)),
|
327
|
+
this.renderParentContainer(e, t, i, r)
|
328
|
+
);
|
329
|
+
}
|
330
|
+
getClientNodeStyle(e) {
|
331
|
+
const t = { height: e.height };
|
332
|
+
return e.isSticky && (t.position = b(), t.top = e.stickyTop, t.zIndex = e.zIndex), t;
|
333
|
+
}
|
334
|
+
getClientLeafNodeStyle(e, t) {
|
335
|
+
return {
|
336
|
+
position: "absolute",
|
337
|
+
top: t,
|
338
|
+
height: e.height,
|
339
|
+
width: "100%"
|
340
|
+
};
|
341
|
+
}
|
342
|
+
renderChildren(e, t, i, s) {
|
343
|
+
const r = [];
|
344
|
+
let o = 0;
|
345
|
+
return i.children.forEach((d) => {
|
346
|
+
const n = this.nodes[d];
|
347
|
+
s.has(d) && ("children" in n && n.children.length > 0 ? r.push(this.renderChildWithChildren(e, t, n, o, s)) : n.isSticky || e.wrapAllLeafNodes ? r.push(u.createElement("div", { className: "rv-sticky-leaf-node", key: `rv-node-${n.id}`, style: this.getChildContainerStyle(n, o) }, this.renderNode(e, t, n, this.getClientNodeStyle(n)))) : r.push(this.renderNode(e, t, n, this.getClientLeafNodeStyle(n, o)))), o += n.totalHeight;
|
348
|
+
}), r;
|
349
|
+
}
|
350
|
+
renderNode(e, t, i, s) {
|
351
|
+
if (e.isModelImmutable && this.rowRenderCache[i.id])
|
352
|
+
return this.rowRenderCache[i.id];
|
353
|
+
const r = e.rowRenderer({ node: i.node, nodeInfo: i, style: s, meta: e.meta });
|
354
|
+
return e.isModelImmutable && (this.rowRenderCache[i.id] = r), r;
|
355
|
+
}
|
356
|
+
/**
|
357
|
+
* Determines the start and end number of the range to be rendered.
|
358
|
+
* @returns {{start: number, end: number}} Indexes within nodes
|
359
|
+
*/
|
360
|
+
getRenderRowRange(e, t) {
|
361
|
+
let i = e.overscanRowCount > 0 ? e.overscanRowCount : 1, s = t.currNodePos - i;
|
362
|
+
s < 0 && (s = 0);
|
363
|
+
let r = t.currNodePos + 1;
|
364
|
+
for (; this.nodes[r] && this.nodes[r].top < t.scrollTop + e.height; )
|
365
|
+
r++;
|
366
|
+
let o = r + i;
|
367
|
+
return o > this.nodes.length - 1 && (o = this.nodes.length - 1), { start: s, end: o, visibleStart: t.currNodePos, visibleEnd: r };
|
368
|
+
}
|
369
|
+
/**
|
370
|
+
* Returns the parent path from nodes for the specified index within nodes.
|
371
|
+
* @param nodeIndex
|
372
|
+
* @param topDownOrder if true, the array with index 0 will be the root node, otherwise 0 will be the immediate parent.
|
373
|
+
* @returns {Array<TreeNode>}
|
374
|
+
*/
|
375
|
+
getParentPath(e, t = !0) {
|
376
|
+
let i = this.nodes[e];
|
377
|
+
const s = [];
|
378
|
+
for (; i; )
|
379
|
+
i = this.nodes[i.parentIndex], i && s.push(i);
|
380
|
+
return t ? s.reverse() : s;
|
381
|
+
}
|
382
|
+
/**
|
383
|
+
* Searches from the current node position downwards to see if the top of nodes above are greater
|
384
|
+
* than or equal to the current scrollTop
|
385
|
+
* @param scrollTop
|
386
|
+
* @param searchPos
|
387
|
+
* @returns {number}
|
388
|
+
*/
|
389
|
+
forwardSearch(e, t) {
|
390
|
+
const i = this.nodes;
|
391
|
+
for (let s = t; s < i.length; s++)
|
392
|
+
if (i[s].top >= e)
|
393
|
+
return s;
|
394
|
+
return i.length - 1;
|
395
|
+
}
|
396
|
+
/**
|
397
|
+
* Searches from the current node position upwards to see if the top of nodes above are less than
|
398
|
+
* or equal the current scrollTop.
|
399
|
+
* @param scrollTop
|
400
|
+
* @param searchPos
|
401
|
+
* @returns {number}
|
402
|
+
*/
|
403
|
+
backwardSearch(e, t) {
|
404
|
+
const i = this.nodes;
|
405
|
+
for (let s = Math.min(t, Math.max(i.length - 1, 0)); s >= 0; s--)
|
406
|
+
if (i[s].top <= e)
|
407
|
+
return s;
|
408
|
+
return 0;
|
409
|
+
}
|
410
|
+
/**
|
411
|
+
* Sets the scroll top in state and finds and sets the closest node to that scroll top.
|
412
|
+
*/
|
413
|
+
setScrollTopAndClosestNode(e, t, i) {
|
414
|
+
if (e === this.state.scrollTop || (this.elemRef.current && e >= this.elemRef.current.scrollHeight - this.elemRef.current.offsetHeight && (e = this.elemRef.current.scrollHeight - this.elemRef.current.offsetHeight), e === this.state.scrollTop))
|
415
|
+
return;
|
416
|
+
let s;
|
417
|
+
(e > this.state.scrollTop || t === 0) && (s = this.forwardSearch(e, t)), e < this.state.scrollTop && s === void 0 && (s = this.backwardSearch(e, t)), this.pendingScrollTop = e, this.setState({ currNodePos: s || 0, scrollTop: e, scrollReason: i }, () => {
|
418
|
+
this.pendingScrollTop = void 0;
|
419
|
+
});
|
420
|
+
}
|
421
|
+
onScroll(e) {
|
422
|
+
const { scrollTop: t, scrollLeft: i } = e.target, s = this.state.scrollReason || g.OBSERVED;
|
423
|
+
this.setScrollTopAndClosestNode(t, this.state.currNodePos, s), this.props.onScroll !== void 0 && this.props.onScroll({ scrollTop: t, scrollLeft: i, scrollReason: s }), this.setState({ scrollTick: !this.state.scrollTick, scrollReason: void 0 });
|
424
|
+
}
|
425
|
+
render() {
|
426
|
+
let e = { overflow: "auto", position: "relative" };
|
427
|
+
return this.props.inlineWidthHeight !== !1 && (this.props.width && (e.width = this.props.width), this.props.height && (e.height = this.props.height)), u.createElement("div", { ref: this.elemRef, className: "rv-sticky-tree", style: e, onScroll: this.onScroll }, this.treeToRender);
|
428
|
+
}
|
429
|
+
}
|
430
|
+
f(N, "defaultProps", {
|
431
|
+
overscanRowCount: 10,
|
432
|
+
renderRoot: !0,
|
433
|
+
wrapAllLeafNodes: !1,
|
434
|
+
isModelImmutable: !1
|
435
|
+
});
|
436
|
+
class U extends u.PureComponent {
|
437
|
+
constructor(h) {
|
438
|
+
super(h), this.state = {};
|
439
|
+
}
|
440
|
+
render() {
|
441
|
+
return u.createElement(x, { bounds: !0, onResize: (h) => {
|
442
|
+
this.setState({ width: h.bounds.width, height: h.bounds.height }), this.props.onResize !== void 0 && this.props.onResize(h);
|
443
|
+
} }, ({ measureRef: h }) => u.createElement(
|
444
|
+
"div",
|
445
|
+
{ ref: h, className: this.props.className },
|
446
|
+
u.createElement(N, { ref: this.props.treeRef, width: this.state.width, height: this.state.height, ...this.props })
|
447
|
+
));
|
448
|
+
}
|
449
|
+
}
|
450
|
+
export {
|
451
|
+
U as A
|
452
|
+
};
|