@hybridcore/ui 1.6.11 → 1.6.13
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/{AnimatedTheme-D3VZKKNV.js → AnimatedTheme-ktdO3Bel.js} +6 -6
- package/dist/{AxisRenderer-Doyw-FTI.js → AxisRenderer-BCQoUJw6.js} +6 -6
- package/dist/{AxisRendererY-BylCU67e.js → AxisRendererY-AXWvGU6r.js} +3 -3
- package/dist/{Bullet-C6357hTv.js → Bullet-Djj7Vs9T.js} +1 -1
- package/dist/{Button-DGOT8RcT.js → Button-BLY4PVJC.js} +3 -3
- package/dist/{CategoryAxis-B5uTZjhL.js → CategoryAxis-B6NqW8qd.js} +3 -3
- package/dist/{Circle-DhzVdFBd.js → Circle-BnfBNKBD.js} +1 -1
- package/dist/{ColorSet-DGLMpbL3.js → ColorSet-cyPmWGwh.js} +1 -1
- package/dist/{ColumnSeries-CqJ-563p.js → ColumnSeries-CtRTsn-E.js} +28 -28
- package/dist/{DateAxis-lJZjbAS-.js → DateAxis-DEXKps1S.js} +4 -4
- package/dist/{Entity-4Lr2piVN.js → Entity-BJCuhdq_.js} +14 -14
- package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
- package/dist/{Hierarchy-DPEcTr0v.js → Hierarchy-CEOK8Gzh.js} +4 -4
- package/dist/{Legend-CTb6rZz_.js → Legend-CFvQiIfn.js} +4 -4
- package/dist/{LineSeries-Dg1aytHA.js → LineSeries-D_IL2qGF.js} +4 -4
- package/dist/{LinearGradient-D1hzMjaW.js → LinearGradient-CxQyCSEB.js} +2 -2
- package/dist/{PieSeries-C9YUWMnA.js → PieSeries-CMH0Z7pz.js} +8 -8
- package/dist/{RoundedRectangle-B23Oh_r6.js → RoundedRectangle-BKLX1LKM.js} +2 -2
- package/dist/{Scrollbar-CSoXoZSe.js → Scrollbar-CTI7_8Qw.js} +4 -4
- package/dist/{Slice-CIP7Vmzu.js → Slice-BUncQh1B.js} +11 -11
- package/dist/{Tick-CRu6rQQy.js → Tick--VhF0xlz.js} +2 -2
- package/dist/{Tooltip-RhAldW7s.js → Tooltip-vyZRZWih.js} +1 -1
- package/dist/{XYCursor-Z-Ral42q.js → XYCursor-CVUSpqb9.js} +3 -3
- package/dist/{ZoomableContainer-D1laxHnA.js → ZoomableContainer-Ca_pDVYQ.js} +2 -2
- package/dist/assets/index.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/components/button/styled.js +1 -1
- package/dist/components/charts/_common/format.js +149 -41
- package/dist/components/charts/_common/tooltip.js +2 -2
- package/dist/components/charts/_common/utils.js +16 -11
- package/dist/components/charts/candlestick/logic.js +34 -35
- package/dist/components/charts/column-line-mix/logic.js +40 -41
- package/dist/components/charts/donut-chart/logic.js +4 -4
- package/dist/components/charts/drill-down-treemap/logic.js +5 -5
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
- package/dist/components/charts/forecast-cone/logic.js +134 -120
- package/dist/components/charts/heatmap/logic.js +9 -9
- package/dist/components/charts/highlighting-line-data/logic.js +10 -10
- package/dist/components/charts/line/logic.js +19 -20
- package/dist/components/charts/logaritmic-scale/logic.js +30 -31
- package/dist/components/charts/multiple-value-axes/logic.js +18 -19
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +7 -7
- package/dist/components/charts/pie-chart/logic.js +4 -4
- package/dist/components/charts/stacked-area-radar/logic.js +9 -9
- package/dist/components/charts/stacked-column-chart/logic.js +10 -10
- package/dist/components/charts/xy-chart/logic.js +28 -29
- package/dist/components/collapsible-card/index.js +21 -30
- package/dist/components/collapsible-card/styled.js +16 -14
- package/dist/components/color-picker/index.js +2227 -3357
- package/dist/components/color-picker/styled.js +87 -7
- package/dist/components/confirm/dialog.js +89 -8
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/data-map/index.js +1 -1
- package/dist/components/data-map/logic.js +20 -20
- package/dist/components/data-security-selectors/dissemination-list/index.js +32 -3117
- package/dist/components/date-picker-with-custom-range/index.js +86 -7
- package/dist/components/date-range-picker/index.js +464 -452
- package/dist/components/document-viewer/components/viewer/index.js +1 -1
- package/dist/components/duration-select/index.js +10 -10
- package/dist/components/duration-select/styled.js +1 -1
- package/dist/components/geometry-picker/coordinate/index.js +14 -14
- package/dist/components/geometry-picker/edit/index.js +1 -1
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/kml/index.js +11 -11
- package/dist/components/geometry-picker/map/logic.js +145 -3656
- package/dist/components/geometry-picker/map/style.js +18 -17
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +43 -1255
- package/dist/components/heat-map/index.js +1 -1
- package/dist/components/heat-map/logic.js +77 -1924
- package/dist/components/instance-hierarchy-table/styled.js +18 -16
- package/dist/components/map/helpers/mapbox.js +17 -15
- package/dist/components/map/helpers/ol.js +386 -27
- package/dist/components/map/index.js +11 -10
- package/dist/components/map/logic.js +22 -22
- package/dist/components/map/styled.js +31 -27
- package/dist/components/metric-card/MetricChart.js +9 -9
- package/dist/components/metric-card/logic.js +46 -49
- package/dist/components/phone-input/index.js +10 -9
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/prr-map/index.js +1 -1
- package/dist/components/prr-map/logic.js +27 -26
- package/dist/components/range-selector/styled.js +65 -4228
- package/dist/components/raster-grid-map/index.js +1 -1
- package/dist/components/raster-grid-map/logic.js +60 -57
- package/dist/components/simple-pivot-table/index.js +17 -17
- package/dist/components/simple-pivot-table/logic.js +67 -76
- package/dist/components/sortable-list/index.js +1091 -1264
- package/dist/components/template-form/components/property-list/index.js +36 -33
- package/dist/components/template-form/components/property-list/property-list-columns.js +19 -18
- package/dist/components/template-form/components/property-list/property-list-form.js +137 -601
- package/dist/components/template-form/components/recognition-property-list/index.js +40 -37
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +11 -10
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +55 -63
- package/dist/components/tree-select/index.js +16 -16
- package/dist/index.esm-UfGMjYOL.js +197 -0
- package/dist/main.d.ts +67 -8
- package/dist/main.js +176 -175
- package/package.json +1 -1
- package/dist/AccordionSummary-CJppWeqF.js +0 -781
- package/dist/Add-CqcD1PWb.js +0 -403
- package/dist/Box-DqUMmZjL.js +0 -31
- package/dist/Button-C5yquWAB.js +0 -357
- package/dist/ButtonBase-BEF7oTOe.js +0 -887
- package/dist/DataProcessor-WXzhvIg6.js +0 -83
- package/dist/Delete-BdyYpINH.js +0 -23
- package/dist/DialogContent-BvVjD9z3.js +0 -523
- package/dist/FormGroup-CpBsIyYR.js +0 -89
- package/dist/GaplessDateAxis-DowssQ6y.js +0 -296
- package/dist/IconButton-BoGwbvrP.js +0 -184
- package/dist/InputLabel-Dd8RrneV.js +0 -341
- package/dist/MenuItem-DwqJqzuM.js +0 -233
- package/dist/Modal-MUZygjmQ.js +0 -1158
- package/dist/Paper-BkQLdsCI.js +0 -582
- package/dist/Select-DHUl_uG3.js +0 -3916
- package/dist/Source-BSZST_GH.js +0 -4410
- package/dist/SwitchBase-DTndTqI8.js +0 -235
- package/dist/Text-ChJRuaD8.js +0 -2197
- package/dist/TextField-e2oKaUN1.js +0 -669
- package/dist/TransitionGroupContext-BDAp2T0O.js +0 -96
- package/dist/Typography-DgsSLCFC.js +0 -178
- package/dist/Vector-BmuhQO4p.js +0 -3606
- package/dist/Vector-DfTqQEln.js +0 -1735
- package/dist/WKT-2wsDT-nq.js +0 -2310
- package/dist/assertThisInitialized-C1dAyb4j.js +0 -7
- package/dist/assets/index3.css +0 -1
- package/dist/assets/index4.css +0 -1
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/createChainedFunction-C0nujS3O.js +0 -9
- package/dist/createSvgIcon-Ch_cT8az.js +0 -185
- package/dist/createSvgIcon-DuDuASu1.js +0 -62
- package/dist/debounce-46wSf_lW.js +0 -15
- package/dist/dialog-BYRnCztH.js +0 -154
- package/dist/formControlState-vgaj2ksH.js +0 -10
- package/dist/generateUtilityClasses-C3ivN9Ie.js +0 -2973
- package/dist/index-DH6qsPBn.js +0 -153
- package/dist/index-e9xTIYWt.js +0 -1934
- package/dist/index.esm-BLLrbTzY.js +0 -318
- package/dist/math-Bvt2Ubuz.js +0 -704
- package/dist/objectWithoutPropertiesLoose-DJteAcBH.js +0 -22
- package/dist/ol-yOE-NV0X.js +0 -7465
- package/dist/ownerWindow-wg6foiOE.js +0 -10
- package/dist/setPrototypeOf-NPgp4cYc.js +0 -8
- package/dist/styled-SoqbyrkW.js +0 -350
- package/dist/unsupportedProp-DuqR2hj9.js +0 -36
- package/dist/useControlled-BYdyS7Pn.js +0 -31
- package/dist/useFormControl-CatNKXAi.js +0 -10
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useMobilePicker-CY8ndYRL.js +0 -8279
- package/dist/useSlot-B_Q4vnX5.js +0 -42
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
import ne, { useRef as ie, useState as L, useCallback as k, useEffect as F, isValidElement as oe, createRef as ae, cloneElement as P, PureComponent as ue } from "react";
|
|
2
|
-
import { findDOMNode as ce } from "react-dom";
|
|
3
|
-
import { c as H, a as Q } from "./_commonjsHelpers-BVfed4GL.js";
|
|
4
|
-
function fe(e) {
|
|
5
|
-
var r = typeof e;
|
|
6
|
-
return e != null && (r == "object" || r == "function");
|
|
7
|
-
}
|
|
8
|
-
var A = fe, se = typeof H == "object" && H && H.Object === Object && H, de = se, le = de, he = typeof self == "object" && self && self.Object === Object && self, ve = le || he || Function("return this")(), Y = ve, ge = Y, pe = function() {
|
|
9
|
-
return ge.Date.now();
|
|
10
|
-
}, be = pe, me = /\s/;
|
|
11
|
-
function ye(e) {
|
|
12
|
-
for (var r = e.length; r-- && me.test(e.charAt(r)); )
|
|
13
|
-
;
|
|
14
|
-
return r;
|
|
15
|
-
}
|
|
16
|
-
var Oe = ye, _e = Oe, we = /^\s+/;
|
|
17
|
-
function Re(e) {
|
|
18
|
-
return e && e.slice(0, _e(e) + 1).replace(we, "");
|
|
19
|
-
}
|
|
20
|
-
var Te = Re, Ee = Y, je = Ee.Symbol, Z = je, G = Z, ee = Object.prototype, Se = ee.hasOwnProperty, $e = ee.toString, x = G ? G.toStringTag : void 0;
|
|
21
|
-
function ze(e) {
|
|
22
|
-
var r = Se.call(e, x), n = e[x];
|
|
23
|
-
try {
|
|
24
|
-
e[x] = void 0;
|
|
25
|
-
var t = !0;
|
|
26
|
-
} catch {
|
|
27
|
-
}
|
|
28
|
-
var i = $e.call(e);
|
|
29
|
-
return t && (r ? e[x] = n : delete e[x]), i;
|
|
30
|
-
}
|
|
31
|
-
var xe = ze, Me = Object.prototype, ke = Me.toString;
|
|
32
|
-
function He(e) {
|
|
33
|
-
return ke.call(e);
|
|
34
|
-
}
|
|
35
|
-
var Pe = He, U = Z, Ie = xe, We = Pe, De = "[object Null]", Ae = "[object Undefined]", q = U ? U.toStringTag : void 0;
|
|
36
|
-
function Ce(e) {
|
|
37
|
-
return e == null ? e === void 0 ? Ae : De : q && q in Object(e) ? Ie(e) : We(e);
|
|
38
|
-
}
|
|
39
|
-
var Ne = Ce;
|
|
40
|
-
function Le(e) {
|
|
41
|
-
return e != null && typeof e == "object";
|
|
42
|
-
}
|
|
43
|
-
var Fe = Le, Ge = Ne, Ue = Fe, qe = "[object Symbol]";
|
|
44
|
-
function Be(e) {
|
|
45
|
-
return typeof e == "symbol" || Ue(e) && Ge(e) == qe;
|
|
46
|
-
}
|
|
47
|
-
var Xe = Be, Ve = Te, B = A, Je = Xe, X = NaN, Ke = /^[-+]0x[0-9a-f]+$/i, Qe = /^0b[01]+$/i, Ye = /^0o[0-7]+$/i, Ze = parseInt;
|
|
48
|
-
function et(e) {
|
|
49
|
-
if (typeof e == "number")
|
|
50
|
-
return e;
|
|
51
|
-
if (Je(e))
|
|
52
|
-
return X;
|
|
53
|
-
if (B(e)) {
|
|
54
|
-
var r = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
55
|
-
e = B(r) ? r + "" : r;
|
|
56
|
-
}
|
|
57
|
-
if (typeof e != "string")
|
|
58
|
-
return e === 0 ? e : +e;
|
|
59
|
-
e = Ve(e);
|
|
60
|
-
var n = Qe.test(e);
|
|
61
|
-
return n || Ye.test(e) ? Ze(e.slice(2), n ? 2 : 8) : Ke.test(e) ? X : +e;
|
|
62
|
-
}
|
|
63
|
-
var tt = et, rt = A, I = be, V = tt, nt = "Expected a function", it = Math.max, ot = Math.min;
|
|
64
|
-
function at(e, r, n) {
|
|
65
|
-
var t, i, d, g, s, p, c = 0, a = !1, u = !1, o = !0;
|
|
66
|
-
if (typeof e != "function")
|
|
67
|
-
throw new TypeError(nt);
|
|
68
|
-
r = V(r) || 0, rt(n) && (a = !!n.leading, u = "maxWait" in n, d = u ? it(V(n.maxWait) || 0, r) : d, o = "trailing" in n ? !!n.trailing : o);
|
|
69
|
-
function v(f) {
|
|
70
|
-
var w = t, j = i;
|
|
71
|
-
return t = i = void 0, c = f, g = e.apply(j, w), g;
|
|
72
|
-
}
|
|
73
|
-
function R(f) {
|
|
74
|
-
return c = f, s = setTimeout(l, r), a ? v(f) : g;
|
|
75
|
-
}
|
|
76
|
-
function y(f) {
|
|
77
|
-
var w = f - p, j = f - c, S = r - w;
|
|
78
|
-
return u ? ot(S, d - j) : S;
|
|
79
|
-
}
|
|
80
|
-
function T(f) {
|
|
81
|
-
var w = f - p, j = f - c;
|
|
82
|
-
return p === void 0 || w >= r || w < 0 || u && j >= d;
|
|
83
|
-
}
|
|
84
|
-
function l() {
|
|
85
|
-
var f = I();
|
|
86
|
-
if (T(f))
|
|
87
|
-
return b(f);
|
|
88
|
-
s = setTimeout(l, y(f));
|
|
89
|
-
}
|
|
90
|
-
function b(f) {
|
|
91
|
-
return s = void 0, o && t ? v(f) : (t = i = void 0, g);
|
|
92
|
-
}
|
|
93
|
-
function O() {
|
|
94
|
-
s !== void 0 && clearTimeout(s), c = 0, t = p = i = s = void 0;
|
|
95
|
-
}
|
|
96
|
-
function _() {
|
|
97
|
-
return s === void 0 ? g : b(I());
|
|
98
|
-
}
|
|
99
|
-
function E() {
|
|
100
|
-
var f = I(), w = T(f);
|
|
101
|
-
if (t = arguments, i = this, p = f, w) {
|
|
102
|
-
if (s === void 0)
|
|
103
|
-
return R(p);
|
|
104
|
-
if (u)
|
|
105
|
-
return clearTimeout(s), s = setTimeout(l, r), v(p);
|
|
106
|
-
}
|
|
107
|
-
return s === void 0 && (s = setTimeout(l, r)), g;
|
|
108
|
-
}
|
|
109
|
-
return E.cancel = O, E.flush = _, E;
|
|
110
|
-
}
|
|
111
|
-
var te = at;
|
|
112
|
-
const ut = /* @__PURE__ */ Q(te);
|
|
113
|
-
var ct = te, ft = A, st = "Expected a function";
|
|
114
|
-
function dt(e, r, n) {
|
|
115
|
-
var t = !0, i = !0;
|
|
116
|
-
if (typeof e != "function")
|
|
117
|
-
throw new TypeError(st);
|
|
118
|
-
return ft(n) && (t = "leading" in n ? !!n.leading : t, i = "trailing" in n ? !!n.trailing : i), ct(e, r, {
|
|
119
|
-
leading: t,
|
|
120
|
-
maxWait: r,
|
|
121
|
-
trailing: i
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
var lt = dt;
|
|
125
|
-
const ht = /* @__PURE__ */ Q(lt);
|
|
126
|
-
var W = function(e, r) {
|
|
127
|
-
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, t) {
|
|
128
|
-
n.__proto__ = t;
|
|
129
|
-
} || function(n, t) {
|
|
130
|
-
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (n[i] = t[i]);
|
|
131
|
-
}, W(e, r);
|
|
132
|
-
};
|
|
133
|
-
function vt(e, r) {
|
|
134
|
-
if (typeof r != "function" && r !== null)
|
|
135
|
-
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
136
|
-
W(e, r);
|
|
137
|
-
function n() {
|
|
138
|
-
this.constructor = e;
|
|
139
|
-
}
|
|
140
|
-
e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
|
|
141
|
-
}
|
|
142
|
-
var D = function() {
|
|
143
|
-
return D = Object.assign || function(r) {
|
|
144
|
-
for (var n, t = 1, i = arguments.length; t < i; t++) {
|
|
145
|
-
n = arguments[t];
|
|
146
|
-
for (var d in n) Object.prototype.hasOwnProperty.call(n, d) && (r[d] = n[d]);
|
|
147
|
-
}
|
|
148
|
-
return r;
|
|
149
|
-
}, D.apply(this, arguments);
|
|
150
|
-
};
|
|
151
|
-
function gt(e, r) {
|
|
152
|
-
var n = {};
|
|
153
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (n[t] = e[t]);
|
|
154
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
155
|
-
for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++)
|
|
156
|
-
r.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (n[t[i]] = e[t[i]]);
|
|
157
|
-
return n;
|
|
158
|
-
}
|
|
159
|
-
var re = function(e, r, n, t) {
|
|
160
|
-
switch (r) {
|
|
161
|
-
case "debounce":
|
|
162
|
-
return ut(e, n, t);
|
|
163
|
-
case "throttle":
|
|
164
|
-
return ht(e, n, t);
|
|
165
|
-
default:
|
|
166
|
-
return e;
|
|
167
|
-
}
|
|
168
|
-
}, J = function(e) {
|
|
169
|
-
return typeof e == "function";
|
|
170
|
-
}, M = function() {
|
|
171
|
-
return typeof window > "u";
|
|
172
|
-
}, K = function(e) {
|
|
173
|
-
return e instanceof Element || e instanceof HTMLDocument;
|
|
174
|
-
};
|
|
175
|
-
(function(e) {
|
|
176
|
-
vt(r, e);
|
|
177
|
-
function r(n) {
|
|
178
|
-
var t = e.call(this, n) || this;
|
|
179
|
-
t.cancelHandler = function() {
|
|
180
|
-
t.resizeHandler && t.resizeHandler.cancel && (t.resizeHandler.cancel(), t.resizeHandler = null);
|
|
181
|
-
}, t.attachObserver = function() {
|
|
182
|
-
var c = t.props, a = c.targetRef, u = c.observerOptions;
|
|
183
|
-
if (!M()) {
|
|
184
|
-
a && a.current && (t.targetRef.current = a.current);
|
|
185
|
-
var o = t.getElement();
|
|
186
|
-
o && (t.observableElement && t.observableElement === o || (t.observableElement = o, t.resizeObserver.observe(o, u)));
|
|
187
|
-
}
|
|
188
|
-
}, t.getElement = function() {
|
|
189
|
-
var c = t.props, a = c.querySelector, u = c.targetDomEl;
|
|
190
|
-
if (M())
|
|
191
|
-
return null;
|
|
192
|
-
if (a)
|
|
193
|
-
return document.querySelector(a);
|
|
194
|
-
if (u && K(u))
|
|
195
|
-
return u;
|
|
196
|
-
if (t.targetRef && K(t.targetRef.current))
|
|
197
|
-
return t.targetRef.current;
|
|
198
|
-
var o = ce(t);
|
|
199
|
-
if (!o)
|
|
200
|
-
return null;
|
|
201
|
-
var v = t.getRenderType();
|
|
202
|
-
switch (v) {
|
|
203
|
-
case "renderProp":
|
|
204
|
-
return o;
|
|
205
|
-
case "childFunction":
|
|
206
|
-
return o;
|
|
207
|
-
case "child":
|
|
208
|
-
return o;
|
|
209
|
-
case "childArray":
|
|
210
|
-
return o;
|
|
211
|
-
default:
|
|
212
|
-
return o.parentElement;
|
|
213
|
-
}
|
|
214
|
-
}, t.createResizeHandler = function(c) {
|
|
215
|
-
var a = t.props, u = a.handleWidth, o = u === void 0 ? !0 : u, v = a.handleHeight, R = v === void 0 ? !0 : v, y = a.onResize;
|
|
216
|
-
if (!(!o && !R)) {
|
|
217
|
-
var T = function(l) {
|
|
218
|
-
var b = l.width, O = l.height;
|
|
219
|
-
t.state.width === b && t.state.height === O || t.state.width === b && !R || t.state.height === O && !o || (y == null || y(b, O), t.setState({ width: b, height: O }));
|
|
220
|
-
};
|
|
221
|
-
c.forEach(function(l) {
|
|
222
|
-
var b = l && l.contentRect || {}, O = b.width, _ = b.height, E = !t.skipOnMount && !M();
|
|
223
|
-
E && T({ width: O, height: _ }), t.skipOnMount = !1;
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
}, t.getRenderType = function() {
|
|
227
|
-
var c = t.props, a = c.render, u = c.children;
|
|
228
|
-
return J(a) ? "renderProp" : J(u) ? "childFunction" : oe(u) ? "child" : Array.isArray(u) ? "childArray" : "parent";
|
|
229
|
-
};
|
|
230
|
-
var i = n.skipOnMount, d = n.refreshMode, g = n.refreshRate, s = g === void 0 ? 1e3 : g, p = n.refreshOptions;
|
|
231
|
-
return t.state = {
|
|
232
|
-
width: void 0,
|
|
233
|
-
height: void 0
|
|
234
|
-
}, t.sizeRef = {
|
|
235
|
-
current: t.state
|
|
236
|
-
}, t.skipOnMount = i, t.targetRef = ae(), t.observableElement = null, M() || (t.resizeHandler = re(t.createResizeHandler, d, s, p), t.resizeObserver = new window.ResizeObserver(t.resizeHandler)), t;
|
|
237
|
-
}
|
|
238
|
-
return r.prototype.componentDidMount = function() {
|
|
239
|
-
this.attachObserver();
|
|
240
|
-
}, r.prototype.componentDidUpdate = function() {
|
|
241
|
-
this.attachObserver(), this.sizeRef.current = this.state;
|
|
242
|
-
}, r.prototype.componentWillUnmount = function() {
|
|
243
|
-
M() || (this.observableElement = null, this.resizeObserver.disconnect(), this.cancelHandler());
|
|
244
|
-
}, r.prototype.render = function() {
|
|
245
|
-
var n = this.props, t = n.render, i = n.children, d = n.nodeType, g = d === void 0 ? "div" : d, s = this.state, p = s.width, c = s.height, a = { width: p, height: c, targetRef: this.targetRef }, u = this.getRenderType();
|
|
246
|
-
switch (u) {
|
|
247
|
-
case "renderProp":
|
|
248
|
-
return t == null ? void 0 : t(a);
|
|
249
|
-
case "childFunction": {
|
|
250
|
-
var o = i;
|
|
251
|
-
return o == null ? void 0 : o(a);
|
|
252
|
-
}
|
|
253
|
-
case "child": {
|
|
254
|
-
var v = i;
|
|
255
|
-
if (v.type && typeof v.type == "string") {
|
|
256
|
-
a.targetRef;
|
|
257
|
-
var R = gt(a, ["targetRef"]);
|
|
258
|
-
return P(v, R);
|
|
259
|
-
}
|
|
260
|
-
return P(v, a);
|
|
261
|
-
}
|
|
262
|
-
case "childArray": {
|
|
263
|
-
var y = i;
|
|
264
|
-
return y.map(function(T) {
|
|
265
|
-
return !!T && P(T, a);
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
default:
|
|
269
|
-
return ne.createElement(g, null);
|
|
270
|
-
}
|
|
271
|
-
}, r;
|
|
272
|
-
})(ue);
|
|
273
|
-
function yt(e) {
|
|
274
|
-
var r = {}, n = r.skipOnMount, t = n === void 0 ? !1 : n, i = r.refreshMode, d = r.refreshRate, g = d === void 0 ? 1e3 : d, s = r.refreshOptions, p = r.handleWidth, c = p === void 0 ? !0 : p, a = r.handleHeight, u = a === void 0 ? !0 : a, o = r.targetRef, v = r.observerOptions, R = r.onResize, y = ie(t), T = L({
|
|
275
|
-
width: void 0,
|
|
276
|
-
height: void 0
|
|
277
|
-
}), l = T[0], b = T[1], O = L((o == null ? void 0 : o.current) || null), _ = O[0], E = O[1];
|
|
278
|
-
o && setTimeout(function() {
|
|
279
|
-
o.current !== _ && E(o.current);
|
|
280
|
-
}, 0);
|
|
281
|
-
var f = k(function(h) {
|
|
282
|
-
h !== _ && E(h);
|
|
283
|
-
}, [_]);
|
|
284
|
-
f.current = _;
|
|
285
|
-
var w = k(function(h, m) {
|
|
286
|
-
return !(h.width === m.width && h.height === m.height || h.width === m.width && !u || h.height === m.height && !c);
|
|
287
|
-
}, [c, u]), j = k(function(h) {
|
|
288
|
-
if (!(!c && !u)) {
|
|
289
|
-
if (y.current) {
|
|
290
|
-
y.current = !1;
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
h.forEach(function(m) {
|
|
294
|
-
var z = (m == null ? void 0 : m.contentRect) || {}, $ = z.width, C = z.height;
|
|
295
|
-
b(function(N) {
|
|
296
|
-
return w(N, { width: $, height: C }) ? { width: $, height: C } : N;
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
}, [c, u, y, w]), S = k(re(j, i, g, s), [
|
|
301
|
-
j,
|
|
302
|
-
i,
|
|
303
|
-
g,
|
|
304
|
-
s
|
|
305
|
-
]);
|
|
306
|
-
return F(function() {
|
|
307
|
-
var h;
|
|
308
|
-
return _ ? (h = new window.ResizeObserver(S), h.observe(_, v)) : (l.width || l.height) && b({ width: void 0, height: void 0 }), function() {
|
|
309
|
-
var m, z, $;
|
|
310
|
-
(m = h == null ? void 0 : h.disconnect) === null || m === void 0 || m.call(h), ($ = (z = S).cancel) === null || $ === void 0 || $.call(z);
|
|
311
|
-
};
|
|
312
|
-
}, [S, _]), F(function() {
|
|
313
|
-
R == null || R(l.width, l.height);
|
|
314
|
-
}, [l]), D({ ref: f }, l);
|
|
315
|
-
}
|
|
316
|
-
export {
|
|
317
|
-
yt as u
|
|
318
|
-
};
|