@carto/meridian-ds 1.3.1 → 1.3.3
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/CHANGELOG.md +10 -0
- package/dist/types/widgets/legend/LegendLayerTitle.d.ts +1 -3
- package/dist/types/widgets/legend/LegendLayerTitle.d.ts.map +1 -1
- package/dist/types/widgets/legend/legend-types/LegendIcon.d.ts.map +1 -1
- package/dist/widgets/index.cjs +1 -1
- package/dist/widgets/index.js +392 -407
- package/package.json +1 -1
package/dist/widgets/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as v, Fragment as ie, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import Qn, { useMemo as F, useState as _, useEffect as U, useCallback as oe, useRef as re, createContext as ei, useContext as ti, useLayoutEffect as an, createRef as ni } from "react";
|
|
3
|
-
import { useTheme as le, styled as m, Box as S, Skeleton as H, Grid as ae, Link as ye, darken as yt, Button as
|
|
3
|
+
import { useTheme as le, styled as m, Box as S, Skeleton as H, Grid as ae, Link as ye, darken as yt, Button as $e, Divider as wt, TextField as ot, InputAdornment as vt, Checkbox as ln, Tooltip as ue, IconButton as fe, debounce as ii, Slider as xt, TableCell as bt, Table as sn, TableHead as cn, TableRow as Je, TableBody as dn, TableContainer as un, TableSortLabel as ri, TablePagination as oi, Menu as kt, MenuItem as Pe, SvgIcon as je, lighten as pn, Typography as De, ClickAwayListener as ai, ToggleButton as li, capitalize as gn, ListItem as si, Chip as ci, List as di, Paper as hn, Popover as ui, Select as pi, ListItemText as gi, Collapse as St, Drawer as hi, Icon as fi, LinearProgress as mi } from "@mui/material";
|
|
4
4
|
import { useIntl as se } from "react-intl";
|
|
5
|
-
import { t as yi, u as ce, T as z, S as B, B as Mt, a as
|
|
6
|
-
import
|
|
5
|
+
import { t as yi, u as ce, T as z, S as B, B as Mt, a as wi, b as pt } from "../TablePaginationActions-BmvmVQd9.js";
|
|
6
|
+
import vi from "echarts-for-react";
|
|
7
7
|
import { FixedSizeList as xi } from "react-window";
|
|
8
8
|
import { S as Qe, a as bi } from "../SwatchSquare-DAne_6Gi.js";
|
|
9
9
|
import { ChevronLeft as ki, ChevronRight as Si, KeyboardArrowDown as Mi, ErrorOutline as Ii, Cancel as Ci, VisibilityOutlined as Ti, VisibilityOffOutlined as Ai, ExpandLess as fn, ExpandMore as mn, Close as Ei, LayersOutlined as Li, MoreVert as Di } from "@mui/icons-material";
|
|
10
|
-
import { A as
|
|
11
|
-
import { c as yn, a as
|
|
12
|
-
function
|
|
10
|
+
import { A as $i } from "../Alert-DbN79ENW.js";
|
|
11
|
+
import { c as yn, a as Pi, b as wn } from "../paletteUtils-BEwZhrLg.js";
|
|
12
|
+
function vn() {
|
|
13
13
|
let e = !1;
|
|
14
14
|
return window.PointerEvent && "maxTouchPoints" in navigator ? navigator.maxTouchPoints > 0 && (e = !0) : (window.matchMedia && window.matchMedia("(any-pointer:coarse)").matches || window.TouchEvent || "ontouchstart" in window) && (e = !0), e;
|
|
15
15
|
}
|
|
@@ -50,13 +50,13 @@ function Fi({
|
|
|
50
50
|
stacked: g = !0,
|
|
51
51
|
...f
|
|
52
52
|
}) {
|
|
53
|
-
const
|
|
53
|
+
const w = le(), h = F(
|
|
54
54
|
() => (o ?? []).map((M) => t[M] ?? M),
|
|
55
55
|
[o, t]
|
|
56
56
|
), b = F(
|
|
57
57
|
() => Array.isArray(i[0]) ? i : [i],
|
|
58
58
|
[i]
|
|
59
|
-
), k = F(() => typeof a == "string" ? [a] : Array.isArray(a) && a.length ? a : b.length <= 1 || h.length === 1 ? [
|
|
59
|
+
), k = F(() => typeof a == "string" ? [a] : Array.isArray(a) && a.length ? a : b.length <= 1 || h.length === 1 ? [w.palette.secondary.main] : b.length === 2 || h.length === 2 ? [w.palette.secondary.light, w.palette.secondary.dark] : Object.values(w.palette.qualitative.bold || {}), [a, w, b, h]);
|
|
60
60
|
return {
|
|
61
61
|
...f,
|
|
62
62
|
tooltip: l,
|
|
@@ -68,7 +68,7 @@ function Fi({
|
|
|
68
68
|
filterable: y,
|
|
69
69
|
stacked: g,
|
|
70
70
|
labels: t,
|
|
71
|
-
height: e ?? parseInt(
|
|
71
|
+
height: e ?? parseInt(w.spacing(22)),
|
|
72
72
|
// parseInt removes 'px' from the string,
|
|
73
73
|
selectedBars: Ni(r),
|
|
74
74
|
yAxisData: b,
|
|
@@ -105,7 +105,7 @@ var Bi = function e(t, i) {
|
|
|
105
105
|
return t !== t && i !== i;
|
|
106
106
|
};
|
|
107
107
|
const Le = /* @__PURE__ */ yi(Bi);
|
|
108
|
-
class We extends
|
|
108
|
+
class We extends vi {
|
|
109
109
|
componentDidUpdate(t) {
|
|
110
110
|
const { shouldSetOption: i } = this.props;
|
|
111
111
|
if (typeof i == "function" && !i(t, this.props))
|
|
@@ -185,9 +185,9 @@ const at = 240, xn = m(S)(({ theme: e }) => ({
|
|
|
185
185
|
backgroundColor: e.palette.grey[100]
|
|
186
186
|
}));
|
|
187
187
|
function zi({ height: e }) {
|
|
188
|
-
return /* @__PURE__ */
|
|
188
|
+
return /* @__PURE__ */ v(ie, { children: [
|
|
189
189
|
/* @__PURE__ */ n(S, { mb: 2, children: /* @__PURE__ */ n(H, { width: 48, height: 8 }) }),
|
|
190
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ v(xn, { style: { height: e || at }, children: [
|
|
191
191
|
/* @__PURE__ */ n(Fe, { variant: "rectangular", height: "20%" }),
|
|
192
192
|
/* @__PURE__ */ n(Fe, { variant: "rectangular", height: "40%" }),
|
|
193
193
|
/* @__PURE__ */ n(Fe, { variant: "rectangular", height: "60%" }),
|
|
@@ -202,7 +202,7 @@ function ke(e) {
|
|
|
202
202
|
e && !r && (i(!0), o(!0)), e || i(!1);
|
|
203
203
|
}, [e, r]), { showSkeleton: t };
|
|
204
204
|
}
|
|
205
|
-
const Hi =
|
|
205
|
+
const Hi = vn(), ji = m(ae)(({ theme: e }) => ({
|
|
206
206
|
marginBottom: e.spacing(2),
|
|
207
207
|
flexDirection: "row",
|
|
208
208
|
justifyContent: "space-between",
|
|
@@ -230,7 +230,7 @@ function ns(e) {
|
|
|
230
230
|
stacked: y,
|
|
231
231
|
height: g,
|
|
232
232
|
filterable: f,
|
|
233
|
-
animation:
|
|
233
|
+
animation: w,
|
|
234
234
|
isLoading: h
|
|
235
235
|
} = Fi(e), b = r.length > 1, k = le(), M = se(), C = ce(M), { showSkeleton: x } = ke(!!h), A = F(
|
|
236
236
|
() => ({
|
|
@@ -277,7 +277,7 @@ function ns(e) {
|
|
|
277
277
|
return y ? I = t.reduce((R, q) => (q.forEach(
|
|
278
278
|
(j, X) => R[X] = (R[X] ?? 0) + (j ?? Number.MIN_SAFE_INTEGER)
|
|
279
279
|
), R), []) : I = t.flat().map((R) => R ?? Number.MIN_SAFE_INTEGER), Math.max(...I);
|
|
280
|
-
}, [t, y]),
|
|
280
|
+
}, [t, y]), P = F(
|
|
281
281
|
() => ({
|
|
282
282
|
type: "value",
|
|
283
283
|
axisLabel: {
|
|
@@ -307,11 +307,11 @@ function ns(e) {
|
|
|
307
307
|
}
|
|
308
308
|
}),
|
|
309
309
|
[k, L, c]
|
|
310
|
-
),
|
|
310
|
+
), $ = F(
|
|
311
311
|
() => t.map((I, R) => ({
|
|
312
312
|
type: "bar",
|
|
313
313
|
name: r[R] ?? "",
|
|
314
|
-
animation:
|
|
314
|
+
animation: w,
|
|
315
315
|
barMaxWidth: 100,
|
|
316
316
|
data: I.map((q, j) => {
|
|
317
317
|
const X = o.some(
|
|
@@ -335,7 +335,7 @@ function ns(e) {
|
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
})),
|
|
338
|
-
[
|
|
338
|
+
[w, u, r, t, o, y, k]
|
|
339
339
|
), W = F(
|
|
340
340
|
() => ({
|
|
341
341
|
grid: {
|
|
@@ -359,8 +359,8 @@ function ns(e) {
|
|
|
359
359
|
color: u,
|
|
360
360
|
tooltip: A,
|
|
361
361
|
xAxis: O,
|
|
362
|
-
yAxis:
|
|
363
|
-
series:
|
|
362
|
+
yAxis: P,
|
|
363
|
+
series: $
|
|
364
364
|
}),
|
|
365
365
|
[
|
|
366
366
|
T,
|
|
@@ -368,8 +368,8 @@ function ns(e) {
|
|
|
368
368
|
u,
|
|
369
369
|
A,
|
|
370
370
|
O,
|
|
371
|
-
|
|
372
|
-
|
|
371
|
+
P,
|
|
372
|
+
$
|
|
373
373
|
]
|
|
374
374
|
), J = () => {
|
|
375
375
|
a && a([], []);
|
|
@@ -406,8 +406,8 @@ function ns(e) {
|
|
|
406
406
|
} : {},
|
|
407
407
|
[f, E]
|
|
408
408
|
);
|
|
409
|
-
return x ? /* @__PURE__ */ n(zi, { height: g }) : /* @__PURE__ */
|
|
410
|
-
a && /* @__PURE__ */
|
|
409
|
+
return x ? /* @__PURE__ */ n(zi, { height: g }) : /* @__PURE__ */ v("div", { children: [
|
|
410
|
+
a && /* @__PURE__ */ v(ji, { container: !0, children: [
|
|
411
411
|
/* @__PURE__ */ n(z, { variant: "caption", children: o.length > 0 ? C.formatMessage(
|
|
412
412
|
{ id: "c4r.widgets.bar.selectedItems" },
|
|
413
413
|
{ items: o.length }
|
|
@@ -520,7 +520,7 @@ const kn = m(ae)(({ theme: e }) => ({
|
|
|
520
520
|
}
|
|
521
521
|
})), qi = m(S)(({ theme: e }) => ({
|
|
522
522
|
...e.typography.body2
|
|
523
|
-
})), Bt = m(
|
|
523
|
+
})), Bt = m($e)(({ theme: e }) => ({
|
|
524
524
|
position: "absolute",
|
|
525
525
|
left: "-999px",
|
|
526
526
|
top: "-1px",
|
|
@@ -536,10 +536,10 @@ const kn = m(ae)(({ theme: e }) => ({
|
|
|
536
536
|
})), Xi = m(H)(({ theme: e }) => ({
|
|
537
537
|
marginTop: e.spacing(1.25),
|
|
538
538
|
marginBottom: e.spacing(1.75)
|
|
539
|
-
})), Ki = (e) => e % 2 === 1, Mn = () => /* @__PURE__ */
|
|
539
|
+
})), Ki = (e) => e % 2 === 1, Mn = () => /* @__PURE__ */ v(ie, { children: [
|
|
540
540
|
/* @__PURE__ */ n(H, { width: 48, height: 8 }),
|
|
541
|
-
/* @__PURE__ */ n(kn, { container: !0, mt: 3, children: [...Array(6)].map((e, t) => /* @__PURE__ */
|
|
542
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ n(kn, { container: !0, mt: 3, children: [...Array(6)].map((e, t) => /* @__PURE__ */ v(Sn, { container: !0, spacing: 1, children: [
|
|
542
|
+
/* @__PURE__ */ v(ae, { container: !0, item: !0, direction: "row", justifyContent: "space-between", children: [
|
|
543
543
|
/* @__PURE__ */ n(H, { width: Ki(t) ? 72 : 48, height: 8 }),
|
|
544
544
|
/* @__PURE__ */ n(H, { width: 48, height: 8 })
|
|
545
545
|
] }),
|
|
@@ -587,10 +587,10 @@ function Zi({
|
|
|
587
587
|
}
|
|
588
588
|
const p = i / 1e3 * 60, c = s.map((g) => g / p), y = () => {
|
|
589
589
|
d < p ? (l = l.map((g, f) => {
|
|
590
|
-
const
|
|
590
|
+
const w = Math.floor(g.value + c[f]), h = f > 0 && Math.floor(g.value + c[f - 1]);
|
|
591
591
|
return {
|
|
592
592
|
...g,
|
|
593
|
-
value:
|
|
593
|
+
value: w === h ? t[f].value : w
|
|
594
594
|
};
|
|
595
595
|
}), r(l), d++, o.current = requestAnimationFrame(y)) : r(t);
|
|
596
596
|
};
|
|
@@ -612,9 +612,9 @@ function is({
|
|
|
612
612
|
searchable: p = !0,
|
|
613
613
|
isLoading: c
|
|
614
614
|
}) {
|
|
615
|
-
const y = le(), [g, f] = _([]), [
|
|
615
|
+
const y = le(), [g, f] = _([]), [w, h] = _(1), [b, k] = _(!1), [M, C] = _(""), [x, A] = _([]), [T, O] = _(
|
|
616
616
|
[]
|
|
617
|
-
), [L,
|
|
617
|
+
), [L, P] = _([]), $ = re(null), W = re(), J = In(L), G = re([]), { showSkeleton: E } = ke(!!c), N = se(), I = ce(N);
|
|
618
618
|
function R(D) {
|
|
619
619
|
return g.reduce((Z, Q) => (D.includes(Q.name) && Z.push(Q.name), Z), []);
|
|
620
620
|
}
|
|
@@ -634,13 +634,13 @@ function is({
|
|
|
634
634
|
A(R(a));
|
|
635
635
|
}, de = (D) => {
|
|
636
636
|
D.key === "Enter" && K();
|
|
637
|
-
},
|
|
637
|
+
}, we = () => {
|
|
638
638
|
const D = R(
|
|
639
639
|
T
|
|
640
640
|
);
|
|
641
641
|
l([...D]), A([...D]), O([]), k(!1), C("");
|
|
642
|
-
},
|
|
643
|
-
D.key === "Enter" &&
|
|
642
|
+
}, ve = (D) => {
|
|
643
|
+
D.key === "Enter" && we();
|
|
644
644
|
}, V = () => {
|
|
645
645
|
C(""), k(!1);
|
|
646
646
|
}, ee = (D) => {
|
|
@@ -699,8 +699,8 @@ function is({
|
|
|
699
699
|
(D) => D === Me ? `Others ${p ? "" : `(${Ae()})`}` : i[String(D)] ?? String(D),
|
|
700
700
|
[Ae, i, p]
|
|
701
701
|
), Un = oe(
|
|
702
|
-
(D) => D >=
|
|
703
|
-
[
|
|
702
|
+
(D) => D >= w ? D != null ? "100%" : 0 : `${(D || 0) * 100 / w}%`,
|
|
703
|
+
[w]
|
|
704
704
|
);
|
|
705
705
|
U(() => {
|
|
706
706
|
a.length === 0 && A([]);
|
|
@@ -735,12 +735,12 @@ function is({
|
|
|
735
735
|
})),
|
|
736
736
|
end: g.map((D) => ({ ...D, value: D.value ?? 0 })),
|
|
737
737
|
duration: 500,
|
|
738
|
-
drawFrame: (D) =>
|
|
739
|
-
requestRef:
|
|
738
|
+
drawFrame: (D) => P(D),
|
|
739
|
+
requestRef: $
|
|
740
740
|
}), () => {
|
|
741
|
-
|
|
741
|
+
$.current && cancelAnimationFrame($.current);
|
|
742
742
|
};
|
|
743
|
-
|
|
743
|
+
P(g);
|
|
744
744
|
}, [s, g]), U(() => {
|
|
745
745
|
b && W.current && W.current.focus();
|
|
746
746
|
}, [b, W]);
|
|
@@ -749,8 +749,8 @@ function is({
|
|
|
749
749
|
onCategoryClick: Z
|
|
750
750
|
}) {
|
|
751
751
|
const Q = t(D.value ?? 0), [xe, Ye] = _(!1), be = re(null), lt = () => {
|
|
752
|
-
var
|
|
753
|
-
const st = (((
|
|
752
|
+
var $t, Pt;
|
|
753
|
+
const st = ((($t = be == null ? void 0 : be.current) == null ? void 0 : $t.scrollWidth) ?? 0) > (((Pt = be == null ? void 0 : be.current) == null ? void 0 : Pt.clientWidth) ?? 0);
|
|
754
754
|
Ye(st);
|
|
755
755
|
};
|
|
756
756
|
U(() => (lt(), window.addEventListener("resize", lt), () => {
|
|
@@ -759,7 +759,7 @@ function is({
|
|
|
759
759
|
const Zn = (st) => {
|
|
760
760
|
st.key === "Enter" && Z();
|
|
761
761
|
}, Jn = !b && a.length > 0 && !a.includes(D.name);
|
|
762
|
-
return /* @__PURE__ */
|
|
762
|
+
return /* @__PURE__ */ v(
|
|
763
763
|
Sn,
|
|
764
764
|
{
|
|
765
765
|
container: !0,
|
|
@@ -779,8 +779,8 @@ function is({
|
|
|
779
779
|
tabIndex: -1
|
|
780
780
|
}
|
|
781
781
|
) }),
|
|
782
|
-
/* @__PURE__ */
|
|
783
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ v(Gi, { container: !0, item: !0, xs: !0, isSelectable: b, children: [
|
|
783
|
+
/* @__PURE__ */ v(
|
|
784
784
|
ae,
|
|
785
785
|
{
|
|
786
786
|
container: !0,
|
|
@@ -797,7 +797,7 @@ function is({
|
|
|
797
797
|
children: /* @__PURE__ */ n(Ui, { variant: "body2", noWrap: !0, ref: be, children: Dt(D.name) })
|
|
798
798
|
}
|
|
799
799
|
),
|
|
800
|
-
typeof Q == "object" && Q !== null ? /* @__PURE__ */
|
|
800
|
+
typeof Q == "object" && Q !== null ? /* @__PURE__ */ v("span", { children: [
|
|
801
801
|
Q.prefix,
|
|
802
802
|
Q.value,
|
|
803
803
|
Q.suffix
|
|
@@ -825,8 +825,8 @@ function is({
|
|
|
825
825
|
}
|
|
826
826
|
) }) : null;
|
|
827
827
|
}, Kn = () => b ? 320 : x.length > 0 ? x.length * 38 : (r + 1) * 38;
|
|
828
|
-
return /* @__PURE__ */
|
|
829
|
-
u && g.length > 0 && /* @__PURE__ */
|
|
828
|
+
return /* @__PURE__ */ v(qi, { children: [
|
|
829
|
+
u && g.length > 0 && /* @__PURE__ */ v(Nt, { container: !0, children: [
|
|
830
830
|
/* @__PURE__ */ n(z, { variant: "caption", children: a.length > 0 ? I.formatMessage(
|
|
831
831
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
832
832
|
{ items: a.length }
|
|
@@ -834,8 +834,8 @@ function is({
|
|
|
834
834
|
b ? /* @__PURE__ */ n(
|
|
835
835
|
Ve,
|
|
836
836
|
{
|
|
837
|
-
onClick:
|
|
838
|
-
onKeyDown:
|
|
837
|
+
onClick: we,
|
|
838
|
+
onKeyDown: ve,
|
|
839
839
|
underline: "hover",
|
|
840
840
|
tabIndex: 0,
|
|
841
841
|
"data-testid": "primaryApplyButton",
|
|
@@ -850,7 +850,7 @@ function is({
|
|
|
850
850
|
tabIndex: 0,
|
|
851
851
|
children: I.formatMessage({ id: "c4r.widgets.category.unlock" })
|
|
852
852
|
}
|
|
853
|
-
) : a.length > 0 && /* @__PURE__ */
|
|
853
|
+
) : a.length > 0 && /* @__PURE__ */ v(ae, { container: !0, direction: "row", justifyContent: "flex-end", item: !0, xs: !0, children: [
|
|
854
854
|
/* @__PURE__ */ n(
|
|
855
855
|
Ve,
|
|
856
856
|
{
|
|
@@ -863,7 +863,7 @@ function is({
|
|
|
863
863
|
})
|
|
864
864
|
}
|
|
865
865
|
),
|
|
866
|
-
/* @__PURE__ */ n(
|
|
866
|
+
/* @__PURE__ */ n(wt, { orientation: "vertical", flexItem: !0 }),
|
|
867
867
|
/* @__PURE__ */ n(
|
|
868
868
|
Ve,
|
|
869
869
|
{
|
|
@@ -878,7 +878,7 @@ function is({
|
|
|
878
878
|
)
|
|
879
879
|
] })
|
|
880
880
|
] }),
|
|
881
|
-
e.length > r && b && /* @__PURE__ */
|
|
881
|
+
e.length > r && b && /* @__PURE__ */ v(Nt, { container: !0, children: [
|
|
882
882
|
/* @__PURE__ */ n(
|
|
883
883
|
ot,
|
|
884
884
|
{
|
|
@@ -890,7 +890,7 @@ function is({
|
|
|
890
890
|
onChange: pe,
|
|
891
891
|
onFocus: ne,
|
|
892
892
|
InputProps: {
|
|
893
|
-
startAdornment: /* @__PURE__ */ n(
|
|
893
|
+
startAdornment: /* @__PURE__ */ n(vt, { position: "start", children: /* @__PURE__ */ n(Qe, {}) })
|
|
894
894
|
},
|
|
895
895
|
inputProps: {
|
|
896
896
|
tabIndex: 0,
|
|
@@ -909,7 +909,7 @@ function is({
|
|
|
909
909
|
itemSize: y.spacingValue * 4.5,
|
|
910
910
|
children: Xn
|
|
911
911
|
}
|
|
912
|
-
) : /* @__PURE__ */
|
|
912
|
+
) : /* @__PURE__ */ v(S, { children: [
|
|
913
913
|
/* @__PURE__ */ n(z, { variant: "body2", children: I.formatMessage({
|
|
914
914
|
id: "c4r.widgets.category.noResults"
|
|
915
915
|
}) }),
|
|
@@ -918,9 +918,9 @@ function is({
|
|
|
918
918
|
{ searchValue: M }
|
|
919
919
|
) })
|
|
920
920
|
] }) }),
|
|
921
|
-
b && /* @__PURE__ */ n(Bt, { size: "small", onClick:
|
|
921
|
+
b && /* @__PURE__ */ n(Bt, { size: "small", onClick: we, children: I.formatMessage({ id: "c4r.widgets.category.apply" }) }),
|
|
922
922
|
e.length > r && p ? b ? /* @__PURE__ */ n(S, { mt: 1.5, children: /* @__PURE__ */ n(
|
|
923
|
-
|
|
923
|
+
$e,
|
|
924
924
|
{
|
|
925
925
|
size: "small",
|
|
926
926
|
color: "primary",
|
|
@@ -929,7 +929,7 @@ function is({
|
|
|
929
929
|
children: I.formatMessage({ id: "c4r.widgets.category.cancel" })
|
|
930
930
|
}
|
|
931
931
|
) }) : /* @__PURE__ */ n(S, { mt: 1.5, children: /* @__PURE__ */ n(
|
|
932
|
-
|
|
932
|
+
$e,
|
|
933
933
|
{
|
|
934
934
|
size: "small",
|
|
935
935
|
color: "primary",
|
|
@@ -973,7 +973,7 @@ function rs({
|
|
|
973
973
|
l.current && cancelAnimationFrame(l.current);
|
|
974
974
|
}), [i, e, a]);
|
|
975
975
|
const p = t(o), c = typeof p == "object" && p !== null, y = p === Ge;
|
|
976
|
-
return u ? /* @__PURE__ */ n(Cn, {}) : c ? /* @__PURE__ */
|
|
976
|
+
return u ? /* @__PURE__ */ n(Cn, {}) : c ? /* @__PURE__ */ v(z, { variant: "h5", component: "div", weight: "medium", children: [
|
|
977
977
|
/* @__PURE__ */ n(nr, { children: p.prefix }),
|
|
978
978
|
p.value,
|
|
979
979
|
/* @__PURE__ */ n(ir, { children: p.suffix })
|
|
@@ -1017,7 +1017,7 @@ function or({
|
|
|
1017
1017
|
y.offsetX,
|
|
1018
1018
|
y.offsetY
|
|
1019
1019
|
]);
|
|
1020
|
-
d(Ne === g ? [] : [Ne, g].sort((f,
|
|
1020
|
+
d(Ne === g ? [] : [Ne, g].sort((f, w) => f - w));
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
if (o && t) {
|
|
@@ -1076,9 +1076,9 @@ function dt(e, t, i) {
|
|
|
1076
1076
|
};
|
|
1077
1077
|
}
|
|
1078
1078
|
function ar({ height: e }) {
|
|
1079
|
-
return /* @__PURE__ */
|
|
1079
|
+
return /* @__PURE__ */ v(ie, { children: [
|
|
1080
1080
|
/* @__PURE__ */ n(S, { mb: 2, children: /* @__PURE__ */ n(H, { width: 48, height: 8 }) }),
|
|
1081
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ v(bn, { style: { height: e ?? at }, children: [
|
|
1082
1082
|
/* @__PURE__ */ n(he, { variant: "rectangular", height: "20%" }),
|
|
1083
1083
|
/* @__PURE__ */ n(he, { variant: "rectangular", height: "40%" }),
|
|
1084
1084
|
/* @__PURE__ */ n(he, { variant: "rectangular", height: "60%" }),
|
|
@@ -1094,7 +1094,7 @@ function ar({ height: e }) {
|
|
|
1094
1094
|
] })
|
|
1095
1095
|
] });
|
|
1096
1096
|
}
|
|
1097
|
-
const lr =
|
|
1097
|
+
const lr = vn(), sr = m(ae)(({ theme: e }) => ({
|
|
1098
1098
|
marginBottom: e.spacing(2),
|
|
1099
1099
|
flexDirection: "row",
|
|
1100
1100
|
justifyContent: "space-between",
|
|
@@ -1135,7 +1135,7 @@ function os({
|
|
|
1135
1135
|
height: g = 200,
|
|
1136
1136
|
isLoading: f
|
|
1137
1137
|
}) {
|
|
1138
|
-
const
|
|
1138
|
+
const w = se(), h = le(), b = ce(w), { showSkeleton: k } = ke(!!f), M = !!y && !!s, [C, x] = _(), A = (I) => x(I), T = F(
|
|
1139
1139
|
() => fr(e, t, i, r),
|
|
1140
1140
|
[e, t, i, r]
|
|
1141
1141
|
), { onEvents: O, markAreaOptions: L } = or({
|
|
@@ -1144,7 +1144,7 @@ function os({
|
|
|
1144
1144
|
selectedBars: d,
|
|
1145
1145
|
onSelectedBarsChange: s,
|
|
1146
1146
|
echartsInstance: C
|
|
1147
|
-
}),
|
|
1147
|
+
}), P = F(
|
|
1148
1148
|
() => ({
|
|
1149
1149
|
show: u,
|
|
1150
1150
|
trigger: "item",
|
|
@@ -1163,7 +1163,7 @@ function os({
|
|
|
1163
1163
|
}
|
|
1164
1164
|
}),
|
|
1165
1165
|
[h, u, p, o, a]
|
|
1166
|
-
),
|
|
1166
|
+
), $ = F(
|
|
1167
1167
|
() => ({
|
|
1168
1168
|
min: i,
|
|
1169
1169
|
max: r,
|
|
@@ -1251,7 +1251,7 @@ function os({
|
|
|
1251
1251
|
cursor: "pointer",
|
|
1252
1252
|
markArea: L,
|
|
1253
1253
|
renderItem: function(j, X) {
|
|
1254
|
-
const te = j.dataIndex === T.length - 1, Y = j.dataIndex === 0, K = q[j.dataIndex].itemStyle.color, de = X.value(0),
|
|
1254
|
+
const te = j.dataIndex === T.length - 1, Y = j.dataIndex === 0, K = q[j.dataIndex].itemStyle.color, de = X.value(0), we = X.value(1), ve = X.value(2), [V, ee] = X.coord([de, ve]), [ne, pe] = X.size([we - de, ve]);
|
|
1255
1255
|
return {
|
|
1256
1256
|
type: "rect",
|
|
1257
1257
|
shape: {
|
|
@@ -1297,20 +1297,20 @@ function os({
|
|
|
1297
1297
|
bottom: B * 0.5,
|
|
1298
1298
|
containLabel: !0
|
|
1299
1299
|
},
|
|
1300
|
-
tooltip:
|
|
1301
|
-
xAxis:
|
|
1300
|
+
tooltip: P,
|
|
1301
|
+
xAxis: $,
|
|
1302
1302
|
yAxis: W,
|
|
1303
1303
|
series: [J]
|
|
1304
1304
|
}),
|
|
1305
|
-
[
|
|
1305
|
+
[P, $, W, J]
|
|
1306
1306
|
), E = d.reduce(
|
|
1307
1307
|
(I, R) => I += e[R] ?? 0,
|
|
1308
1308
|
0
|
|
1309
1309
|
), N = (I) => {
|
|
1310
1310
|
I.key === "Enter" && s([]);
|
|
1311
1311
|
};
|
|
1312
|
-
return k ? /* @__PURE__ */ n(ar, { height: g }) : /* @__PURE__ */
|
|
1313
|
-
M && /* @__PURE__ */
|
|
1312
|
+
return k ? /* @__PURE__ */ n(ar, { height: g }) : /* @__PURE__ */ v("div", { children: [
|
|
1313
|
+
M && /* @__PURE__ */ v(sr, { container: !0, children: [
|
|
1314
1314
|
/* @__PURE__ */ n(z, { variant: "caption", weight: "strong", children: d.length > 0 ? b.formatMessage(
|
|
1315
1315
|
{ id: "c4r.widgets.histogram.selectedItems" },
|
|
1316
1316
|
{
|
|
@@ -1393,13 +1393,13 @@ const yr = m(S)(({ theme: e }) => ({
|
|
|
1393
1393
|
alignItems: "center",
|
|
1394
1394
|
justifyContent: "center",
|
|
1395
1395
|
paddingBottom: e.spacing(1)
|
|
1396
|
-
})),
|
|
1396
|
+
})), wr = m(S)(({ theme: e }) => ({
|
|
1397
1397
|
display: "flex",
|
|
1398
1398
|
alignItems: "center",
|
|
1399
1399
|
gap: e.spacing(1),
|
|
1400
1400
|
maxWidth: "140px",
|
|
1401
1401
|
textTransform: "uppercase"
|
|
1402
|
-
})),
|
|
1402
|
+
})), vr = m(S)(({ theme: e }) => ({
|
|
1403
1403
|
display: "inline-block",
|
|
1404
1404
|
borderRadius: e.spacing(0.5),
|
|
1405
1405
|
width: e.spacing(1),
|
|
@@ -1435,10 +1435,10 @@ function xr({
|
|
|
1435
1435
|
a && o(a);
|
|
1436
1436
|
}, [a, o]);
|
|
1437
1437
|
const { name: l, percentage: d, color: s } = r ?? {};
|
|
1438
|
-
return r ? /* @__PURE__ */
|
|
1438
|
+
return r ? /* @__PURE__ */ v(yr, { children: [
|
|
1439
1439
|
/* @__PURE__ */ n(z, { variant: "h5", children: d }),
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
/* @__PURE__ */ n(
|
|
1440
|
+
/* @__PURE__ */ v(wr, { children: [
|
|
1441
|
+
/* @__PURE__ */ n(vr, { bgcolor: s, component: "span" }),
|
|
1442
1442
|
/* @__PURE__ */ n(z, { component: "span", variant: "body2", noWrap: !0, children: l })
|
|
1443
1443
|
] })
|
|
1444
1444
|
] }) : null;
|
|
@@ -1485,9 +1485,9 @@ const zt = 32, Sr = m(S)(({ theme: e }) => ({
|
|
|
1485
1485
|
}));
|
|
1486
1486
|
function Tn({ height: e }) {
|
|
1487
1487
|
const t = parseInt(String(e), 10) || at, i = t - zt, r = i - zt;
|
|
1488
|
-
return /* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ v(S, { mt: 0.5, children: [
|
|
1489
1489
|
/* @__PURE__ */ n(H, { height: 8, width: 64 }),
|
|
1490
|
-
/* @__PURE__ */ n(Sr, { height: t, children: /* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ n(Sr, { height: t, children: /* @__PURE__ */ v(Mr, { children: [
|
|
1491
1491
|
/* @__PURE__ */ n(H, { variant: "circular", width: i, height: i }),
|
|
1492
1492
|
/* @__PURE__ */ n(
|
|
1493
1493
|
Ir,
|
|
@@ -1497,12 +1497,12 @@ function Tn({ height: e }) {
|
|
|
1497
1497
|
height: r
|
|
1498
1498
|
}
|
|
1499
1499
|
),
|
|
1500
|
-
/* @__PURE__ */
|
|
1500
|
+
/* @__PURE__ */ v(Cr, { children: [
|
|
1501
1501
|
/* @__PURE__ */ n(H, { height: 24, width: 72 }),
|
|
1502
1502
|
/* @__PURE__ */ n(H, { height: 8, width: 48 })
|
|
1503
1503
|
] })
|
|
1504
1504
|
] }) }),
|
|
1505
|
-
/* @__PURE__ */ n(Tr, { children: [...Array(2)].map((o, a) => /* @__PURE__ */
|
|
1505
|
+
/* @__PURE__ */ n(Tr, { children: [...Array(2)].map((o, a) => /* @__PURE__ */ v(Ar, { children: [
|
|
1506
1506
|
/* @__PURE__ */ n(H, { variant: "circular", width: 8, height: 8 }),
|
|
1507
1507
|
/* @__PURE__ */ n(H, { width: 48, height: 8 })
|
|
1508
1508
|
] }, a)) })
|
|
@@ -1529,7 +1529,7 @@ const Er = m(S)(({ theme: e }) => ({
|
|
|
1529
1529
|
textOverflow: "ellipsis",
|
|
1530
1530
|
whiteSpace: "nowrap",
|
|
1531
1531
|
cursor: "pointer"
|
|
1532
|
-
})),
|
|
1532
|
+
})), $r = m(S)(({ theme: e }) => ({
|
|
1533
1533
|
display: "inline-block",
|
|
1534
1534
|
position: "absolute",
|
|
1535
1535
|
left: e.spacing(-2),
|
|
@@ -1538,7 +1538,7 @@ const Er = m(S)(({ theme: e }) => ({
|
|
|
1538
1538
|
zIndex: 1,
|
|
1539
1539
|
width: e.spacing(2.5),
|
|
1540
1540
|
background: `linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, ${e.palette.background.paper} 100%)`
|
|
1541
|
-
})),
|
|
1541
|
+
})), Pr = m(S)(({ theme: e }) => ({
|
|
1542
1542
|
position: "absolute",
|
|
1543
1543
|
padding: e.spacing(0.25, 1),
|
|
1544
1544
|
top: e.spacing(0),
|
|
@@ -1562,7 +1562,7 @@ function An({
|
|
|
1562
1562
|
}) {
|
|
1563
1563
|
var M, C;
|
|
1564
1564
|
const r = le(), [o, a] = _(!1), [l, d] = _(0), [s, u] = _(void 0), p = re(null), c = re(null), y = re(null), g = se(), f = ce(g);
|
|
1565
|
-
function
|
|
1565
|
+
function w() {
|
|
1566
1566
|
d(l + 1);
|
|
1567
1567
|
}
|
|
1568
1568
|
function h() {
|
|
@@ -1595,7 +1595,7 @@ function An({
|
|
|
1595
1595
|
}), x.observe(p.current)), () => {
|
|
1596
1596
|
x == null || x.disconnect();
|
|
1597
1597
|
};
|
|
1598
|
-
}, [p, k]), /* @__PURE__ */
|
|
1598
|
+
}, [p, k]), /* @__PURE__ */ v(Er, { ref: p, children: [
|
|
1599
1599
|
/* @__PURE__ */ n(
|
|
1600
1600
|
Lr,
|
|
1601
1601
|
{
|
|
@@ -1606,7 +1606,7 @@ function An({
|
|
|
1606
1606
|
children: e.map((x, A) => {
|
|
1607
1607
|
if (A < l) return null;
|
|
1608
1608
|
const T = t.length === 0 || t.includes(x.name);
|
|
1609
|
-
return /* @__PURE__ */
|
|
1609
|
+
return /* @__PURE__ */ v(
|
|
1610
1610
|
Dr,
|
|
1611
1611
|
{
|
|
1612
1612
|
tabIndex: 0,
|
|
@@ -1637,8 +1637,8 @@ function An({
|
|
|
1637
1637
|
})
|
|
1638
1638
|
}
|
|
1639
1639
|
),
|
|
1640
|
-
(o || l > 0) && /* @__PURE__ */
|
|
1641
|
-
/* @__PURE__ */ n(
|
|
1640
|
+
(o || l > 0) && /* @__PURE__ */ v(Pr, { ref: y, children: [
|
|
1641
|
+
/* @__PURE__ */ n($r, {}),
|
|
1642
1642
|
/* @__PURE__ */ n(
|
|
1643
1643
|
ue,
|
|
1644
1644
|
{
|
|
@@ -1667,7 +1667,7 @@ function An({
|
|
|
1667
1667
|
{
|
|
1668
1668
|
size: "small",
|
|
1669
1669
|
disabled: !o,
|
|
1670
|
-
onClick:
|
|
1670
|
+
onClick: w,
|
|
1671
1671
|
children: /* @__PURE__ */ n(Si, {})
|
|
1672
1672
|
}
|
|
1673
1673
|
)
|
|
@@ -1717,9 +1717,9 @@ function as({
|
|
|
1717
1717
|
onSelectedCategoriesChange: y,
|
|
1718
1718
|
isLoading: g,
|
|
1719
1719
|
maxItems: f = 11,
|
|
1720
|
-
order:
|
|
1720
|
+
order: w = Ce.RANKING
|
|
1721
1721
|
}) {
|
|
1722
|
-
const h = le(), b = mr(t,
|
|
1722
|
+
const h = le(), b = mr(t, w, f, s), { showSkeleton: k } = ke(!!g), M = se(), C = ce(M), x = F(() => o || ((G) => `${M.formatNumber(G, {
|
|
1723
1723
|
maximumFractionDigits: 2,
|
|
1724
1724
|
minimumFractionDigits: 2
|
|
1725
1725
|
})}%`), [M, o]), A = F(() => {
|
|
@@ -1796,7 +1796,7 @@ function as({
|
|
|
1796
1796
|
}
|
|
1797
1797
|
},
|
|
1798
1798
|
[b, y, c]
|
|
1799
|
-
),
|
|
1799
|
+
), P = oe(
|
|
1800
1800
|
(G) => {
|
|
1801
1801
|
if (y) {
|
|
1802
1802
|
const E = [...c], N = E.indexOf(G);
|
|
@@ -1804,15 +1804,15 @@ function as({
|
|
|
1804
1804
|
}
|
|
1805
1805
|
},
|
|
1806
1806
|
[y, c]
|
|
1807
|
-
),
|
|
1807
|
+
), $ = {
|
|
1808
1808
|
...p && { click: L }
|
|
1809
1809
|
}, W = () => {
|
|
1810
1810
|
y == null || y([]);
|
|
1811
1811
|
}, J = (G) => {
|
|
1812
1812
|
G.key === "Enter" && W();
|
|
1813
1813
|
};
|
|
1814
|
-
return k ? /* @__PURE__ */ n(Tn, { height: a }) : /* @__PURE__ */
|
|
1815
|
-
p && /* @__PURE__ */
|
|
1814
|
+
return k ? /* @__PURE__ */ n(Tn, { height: a }) : /* @__PURE__ */ v(ie, { children: [
|
|
1815
|
+
p && /* @__PURE__ */ v(Wr, { container: !0, children: [
|
|
1816
1816
|
/* @__PURE__ */ n(z, { variant: "caption", color: "textSecondary", children: c.length ? C.formatMessage(
|
|
1817
1817
|
{ id: "c4r.widgets.pie.selectedItems" },
|
|
1818
1818
|
{ items: c.length }
|
|
@@ -1828,7 +1828,7 @@ function as({
|
|
|
1828
1828
|
}
|
|
1829
1829
|
)
|
|
1830
1830
|
] }),
|
|
1831
|
-
/* @__PURE__ */
|
|
1831
|
+
/* @__PURE__ */ v(Rr, { height: a, width: l, children: [
|
|
1832
1832
|
/* @__PURE__ */ n(
|
|
1833
1833
|
xr,
|
|
1834
1834
|
{
|
|
@@ -1841,7 +1841,7 @@ function as({
|
|
|
1841
1841
|
Fr,
|
|
1842
1842
|
{
|
|
1843
1843
|
option: O,
|
|
1844
|
-
onEvents:
|
|
1844
|
+
onEvents: $,
|
|
1845
1845
|
lazyUpdate: !0,
|
|
1846
1846
|
style: { height: a, width: l }
|
|
1847
1847
|
}
|
|
@@ -1852,7 +1852,7 @@ function as({
|
|
|
1852
1852
|
{
|
|
1853
1853
|
series: b,
|
|
1854
1854
|
selectedCategories: c,
|
|
1855
|
-
onCategoryClick: y &&
|
|
1855
|
+
onCategoryClick: y && P
|
|
1856
1856
|
}
|
|
1857
1857
|
)
|
|
1858
1858
|
] });
|
|
@@ -1878,15 +1878,15 @@ const zr = m(ae)(({ theme: e }) => ({
|
|
|
1878
1878
|
padding: e.spacing(0, 3)
|
|
1879
1879
|
}));
|
|
1880
1880
|
function jr() {
|
|
1881
|
-
return /* @__PURE__ */
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
/* @__PURE__ */
|
|
1881
|
+
return /* @__PURE__ */ v(ae, { container: !0, children: [
|
|
1882
|
+
/* @__PURE__ */ v(zr, { container: !0, item: !0, children: [
|
|
1883
|
+
/* @__PURE__ */ v(Hr, { container: !0, item: !0, justifyContent: "space-between", children: [
|
|
1884
1884
|
/* @__PURE__ */ n(Rt, { variant: "circular", width: 12, height: 12 }),
|
|
1885
1885
|
/* @__PURE__ */ n(Rt, { variant: "circular", width: 12, height: 12 })
|
|
1886
1886
|
] }),
|
|
1887
1887
|
/* @__PURE__ */ n(H, { height: 2, width: "100%" })
|
|
1888
1888
|
] }),
|
|
1889
|
-
/* @__PURE__ */
|
|
1889
|
+
/* @__PURE__ */ v(ae, { container: !0, item: !0, justifyContent: "space-between", children: [
|
|
1890
1890
|
/* @__PURE__ */ n(H, { width: 56, height: 32 }),
|
|
1891
1891
|
/* @__PURE__ */ n(H, { width: 56, height: 32 })
|
|
1892
1892
|
] })
|
|
@@ -1974,7 +1974,7 @@ function ls({
|
|
|
1974
1974
|
}, [r, i, t]), f = F(
|
|
1975
1975
|
() => o ? ii(o, 250) : null,
|
|
1976
1976
|
[o]
|
|
1977
|
-
),
|
|
1977
|
+
), w = (x) => {
|
|
1978
1978
|
u([...x]), d([...x]), f && f([...x]);
|
|
1979
1979
|
};
|
|
1980
1980
|
function h(x, A) {
|
|
@@ -1989,15 +1989,15 @@ function ls({
|
|
|
1989
1989
|
let A = s[x];
|
|
1990
1990
|
A === "" && (A = l[x]), A > i && (A = i), A < t && (A = t);
|
|
1991
1991
|
const T = x === 0 ? [A, s[1]] : [s[0], A];
|
|
1992
|
-
|
|
1992
|
+
w(T.sort((O, L) => O - L));
|
|
1993
1993
|
}
|
|
1994
1994
|
const M = () => {
|
|
1995
|
-
|
|
1995
|
+
w([t, i]);
|
|
1996
1996
|
};
|
|
1997
1997
|
function C(x) {
|
|
1998
1998
|
x.key === "Enter" && M();
|
|
1999
1999
|
}
|
|
2000
|
-
return y ? /* @__PURE__ */ n(jr, {}) : /* @__PURE__ */
|
|
2000
|
+
return y ? /* @__PURE__ */ n(jr, {}) : /* @__PURE__ */ v(Yr, { children: [
|
|
2001
2001
|
/* @__PURE__ */ n(Vr, { children: b && /* @__PURE__ */ n(z, { variant: "caption", color: "primary", children: /* @__PURE__ */ n(
|
|
2002
2002
|
Gr,
|
|
2003
2003
|
{
|
|
@@ -2009,7 +2009,7 @@ function ls({
|
|
|
2009
2009
|
children: c.formatMessage({ id: "c4r.widgets.range.clear" })
|
|
2010
2010
|
}
|
|
2011
2011
|
) }) }),
|
|
2012
|
-
/* @__PURE__ */
|
|
2012
|
+
/* @__PURE__ */ v(S, { children: [
|
|
2013
2013
|
/* @__PURE__ */ n(
|
|
2014
2014
|
Ur,
|
|
2015
2015
|
{
|
|
@@ -2017,7 +2017,7 @@ function ls({
|
|
|
2017
2017
|
value: l,
|
|
2018
2018
|
min: t,
|
|
2019
2019
|
max: i,
|
|
2020
|
-
onChange: (x, A) =>
|
|
2020
|
+
onChange: (x, A) => w(A)
|
|
2021
2021
|
}
|
|
2022
2022
|
),
|
|
2023
2023
|
r && r.length === 2 && /* @__PURE__ */ n(
|
|
@@ -2031,7 +2031,7 @@ function ls({
|
|
|
2031
2031
|
}
|
|
2032
2032
|
)
|
|
2033
2033
|
] }),
|
|
2034
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ v(S, { display: "flex", justifyContent: "space-between", mb: 1, children: [
|
|
2035
2035
|
/* @__PURE__ */ n(
|
|
2036
2036
|
jt,
|
|
2037
2037
|
{
|
|
@@ -2091,7 +2091,7 @@ function Zr({ height: e }) {
|
|
|
2091
2091
|
function t() {
|
|
2092
2092
|
return Math.floor(Math.random() * 5);
|
|
2093
2093
|
}
|
|
2094
|
-
return /* @__PURE__ */
|
|
2094
|
+
return /* @__PURE__ */ v(S, { height: e ?? at, children: [
|
|
2095
2095
|
/* @__PURE__ */ n(S, { mb: 4, children: /* @__PURE__ */ n(H, { width: 48, height: 8 }) }),
|
|
2096
2096
|
/* @__PURE__ */ n(Xr, { height: "80%", children: [...Array(3)].map((i, r) => (
|
|
2097
2097
|
// Every row is placed with an incremental margin left to reinforce the effect of a scatter plot
|
|
@@ -2245,20 +2245,20 @@ function ao({
|
|
|
2245
2245
|
pagination: i,
|
|
2246
2246
|
rowsPerPage: r
|
|
2247
2247
|
}) {
|
|
2248
|
-
return /* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */ n(oo, { style: e, children: /* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */ n(cn, { children: /* @__PURE__ */
|
|
2248
|
+
return /* @__PURE__ */ v(ie, { children: [
|
|
2249
|
+
/* @__PURE__ */ n(oo, { style: e, children: /* @__PURE__ */ v(sn, { "aria-label": "skeleton table", size: t ? "small" : "medium", children: [
|
|
2250
|
+
/* @__PURE__ */ n(cn, { children: /* @__PURE__ */ v(Je, { children: [
|
|
2251
2251
|
/* @__PURE__ */ n(Ue, { rows: 1, width: 8 }),
|
|
2252
2252
|
/* @__PURE__ */ n(Ue, { width: 56 })
|
|
2253
2253
|
] }) }),
|
|
2254
2254
|
/* @__PURE__ */ n(dn, { children: [...Array(Math.min(10, r ?? 10))].map(
|
|
2255
|
-
(o, a) => /* @__PURE__ */
|
|
2255
|
+
(o, a) => /* @__PURE__ */ v(Je, { children: [
|
|
2256
2256
|
/* @__PURE__ */ n(Ue, { rows: 1, width: 8 }),
|
|
2257
2257
|
/* @__PURE__ */ n(Ue, { index: a })
|
|
2258
2258
|
] }, a)
|
|
2259
2259
|
) })
|
|
2260
2260
|
] }) }),
|
|
2261
|
-
i && /* @__PURE__ */
|
|
2261
|
+
i && /* @__PURE__ */ v(ro, { children: [
|
|
2262
2262
|
/* @__PURE__ */ n(H, { width: 56, height: 8 }),
|
|
2263
2263
|
/* @__PURE__ */ n(S, { mr: 1, children: /* @__PURE__ */ n(H, { width: 52, height: 16 }) }),
|
|
2264
2264
|
/* @__PURE__ */ n(H, { width: 60, height: 8 }),
|
|
@@ -2309,7 +2309,7 @@ function cs({
|
|
|
2309
2309
|
rowsPerPageOptions: y = go,
|
|
2310
2310
|
onSetRowsPerPage: g = Be,
|
|
2311
2311
|
onRowClick: f = Be,
|
|
2312
|
-
onRowMouseEnter:
|
|
2312
|
+
onRowMouseEnter: w,
|
|
2313
2313
|
onRowMouseLeave: h,
|
|
2314
2314
|
height: b,
|
|
2315
2315
|
dense: k = !1,
|
|
@@ -2328,10 +2328,10 @@ function cs({
|
|
|
2328
2328
|
{ from: E, to: N, count: I }
|
|
2329
2329
|
);
|
|
2330
2330
|
}
|
|
2331
|
-
function
|
|
2331
|
+
function P(E) {
|
|
2332
2332
|
l(r === E && o === "asc" ? "desc" : "asc"), a(E);
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2334
|
+
function $(E, N) {
|
|
2335
2335
|
p(N);
|
|
2336
2336
|
}
|
|
2337
2337
|
function W(E) {
|
|
@@ -2353,8 +2353,8 @@ function cs({
|
|
|
2353
2353
|
dense: k,
|
|
2354
2354
|
pagination: d
|
|
2355
2355
|
}
|
|
2356
|
-
) : /* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */ n(un, { style: J, children: /* @__PURE__ */
|
|
2356
|
+
) : /* @__PURE__ */ v(ie, { children: [
|
|
2357
|
+
/* @__PURE__ */ n(un, { style: J, children: /* @__PURE__ */ v(sn, { stickyHeader: !0, size: k ? "small" : "medium", children: [
|
|
2358
2358
|
/* @__PURE__ */ n(
|
|
2359
2359
|
ho,
|
|
2360
2360
|
{
|
|
@@ -2362,7 +2362,7 @@ function cs({
|
|
|
2362
2362
|
sorting: i,
|
|
2363
2363
|
sortBy: r,
|
|
2364
2364
|
sortDirection: o,
|
|
2365
|
-
onSort:
|
|
2365
|
+
onSort: P
|
|
2366
2366
|
}
|
|
2367
2367
|
),
|
|
2368
2368
|
/* @__PURE__ */ n(
|
|
@@ -2370,7 +2370,7 @@ function cs({
|
|
|
2370
2370
|
{
|
|
2371
2371
|
columns: e,
|
|
2372
2372
|
rows: t,
|
|
2373
|
-
onRowMouseEnter:
|
|
2373
|
+
onRowMouseEnter: w,
|
|
2374
2374
|
onRowMouseLeave: h,
|
|
2375
2375
|
onRowClick: f
|
|
2376
2376
|
}
|
|
@@ -2389,15 +2389,15 @@ function cs({
|
|
|
2389
2389
|
count: s,
|
|
2390
2390
|
rowsPerPage: c,
|
|
2391
2391
|
page: u,
|
|
2392
|
-
onPageChange:
|
|
2392
|
+
onPageChange: $,
|
|
2393
2393
|
onRowsPerPageChange: W,
|
|
2394
2394
|
ActionsComponent: () => /* @__PURE__ */ n(
|
|
2395
|
-
|
|
2395
|
+
wi,
|
|
2396
2396
|
{
|
|
2397
2397
|
count: s,
|
|
2398
2398
|
rowsPerPage: c,
|
|
2399
2399
|
page: u,
|
|
2400
|
-
onPageChange:
|
|
2400
|
+
onPageChange: $,
|
|
2401
2401
|
lastPageTooltip: C
|
|
2402
2402
|
}
|
|
2403
2403
|
)
|
|
@@ -2441,8 +2441,8 @@ function fo({
|
|
|
2441
2441
|
children: e.map(
|
|
2442
2442
|
({ field: s, headerName: u, align: p, component: c, formatter: y }) => {
|
|
2443
2443
|
var f;
|
|
2444
|
-
let g = (f = Object.entries(a).find(([
|
|
2445
|
-
return y ? g = y(g) : typeof g == "bigint" ? g = g.toString() : Array.isArray(g) ? g = `[${g.map((
|
|
2444
|
+
let g = (f = Object.entries(a).find(([w]) => w.toUpperCase() === s.toUpperCase())) == null ? void 0 : f[1];
|
|
2445
|
+
return y ? g = y(g) : typeof g == "bigint" ? g = g.toString() : Array.isArray(g) ? g = `[${g.map((w) => typeof w == "string" ? `"${w}"` : String(w)).join(", ")}]` : typeof g == "object" && g !== null && (g = JSON.stringify(g)), (u ?? s) && /* @__PURE__ */ n(
|
|
2446
2446
|
co,
|
|
2447
2447
|
{
|
|
2448
2448
|
scope: "row",
|
|
@@ -2527,7 +2527,7 @@ const Ct = {
|
|
|
2527
2527
|
hour: bo,
|
|
2528
2528
|
minute: Gt,
|
|
2529
2529
|
second: Gt
|
|
2530
|
-
},
|
|
2530
|
+
}, wo = {
|
|
2531
2531
|
year: Eo,
|
|
2532
2532
|
month: Ao,
|
|
2533
2533
|
week: To,
|
|
@@ -2536,7 +2536,7 @@ const Ct = {
|
|
|
2536
2536
|
minute: Mo,
|
|
2537
2537
|
second: So
|
|
2538
2538
|
};
|
|
2539
|
-
function
|
|
2539
|
+
function vo({
|
|
2540
2540
|
date: e,
|
|
2541
2541
|
stepSize: t
|
|
2542
2542
|
}) {
|
|
@@ -2567,7 +2567,7 @@ function Dn({
|
|
|
2567
2567
|
const { start: o, end: a } = ko({ date: e, stepSize: t, stepMultiplier: i });
|
|
2568
2568
|
if (i === 1) {
|
|
2569
2569
|
if (t === "day")
|
|
2570
|
-
return
|
|
2570
|
+
return vo({ date: o, stepSize: t });
|
|
2571
2571
|
if (t === "second")
|
|
2572
2572
|
return `${Ee(o)} ${ft(
|
|
2573
2573
|
o
|
|
@@ -2602,7 +2602,7 @@ function ko({
|
|
|
2602
2602
|
stepSize: t,
|
|
2603
2603
|
stepMultiplier: i = 1
|
|
2604
2604
|
}) {
|
|
2605
|
-
const r =
|
|
2605
|
+
const r = wo[t];
|
|
2606
2606
|
if (!r)
|
|
2607
2607
|
throw new Error("getBucketInterval: invalid bucket size");
|
|
2608
2608
|
return r({ date: e, stepMultiplier: i });
|
|
@@ -2701,7 +2701,7 @@ function Eo({
|
|
|
2701
2701
|
return { start: i, end: r };
|
|
2702
2702
|
}
|
|
2703
2703
|
const me = () => {
|
|
2704
|
-
},
|
|
2704
|
+
}, $n = ei({
|
|
2705
2705
|
isPlaying: !1,
|
|
2706
2706
|
setIsPlaying: me,
|
|
2707
2707
|
isPaused: !1,
|
|
@@ -2714,7 +2714,7 @@ const me = () => {
|
|
|
2714
2714
|
intl: {}
|
|
2715
2715
|
});
|
|
2716
2716
|
function Et() {
|
|
2717
|
-
return ti(
|
|
2717
|
+
return ti($n);
|
|
2718
2718
|
}
|
|
2719
2719
|
function Lo({
|
|
2720
2720
|
children: e,
|
|
@@ -2727,7 +2727,7 @@ function Lo({
|
|
|
2727
2727
|
onTimeWindowUpdate: d = me,
|
|
2728
2728
|
intl: s
|
|
2729
2729
|
}) {
|
|
2730
|
-
const [u, p] = _(t), [c, y] = _(i), [g, f] = _([]),
|
|
2730
|
+
const [u, p] = _(t), [c, y] = _(i), [g, f] = _([]), w = ce(s);
|
|
2731
2731
|
U(() => {
|
|
2732
2732
|
const M = g.sort((C, x) => C < x ? -1 : 1).map(Ln);
|
|
2733
2733
|
d == null || d(M);
|
|
@@ -2748,7 +2748,7 @@ function Lo({
|
|
|
2748
2748
|
const M = l.map(Vt), C = g.map(Vt);
|
|
2749
2749
|
(M[0] !== C[0] || M[1] !== C[1]) && f(M);
|
|
2750
2750
|
}, l), /* @__PURE__ */ n(
|
|
2751
|
-
|
|
2751
|
+
$n.Provider,
|
|
2752
2752
|
{
|
|
2753
2753
|
value: {
|
|
2754
2754
|
isPlaying: !!u,
|
|
@@ -2760,7 +2760,7 @@ function Lo({
|
|
|
2760
2760
|
onTimeWindowUpdate: d,
|
|
2761
2761
|
togglePlay: h,
|
|
2762
2762
|
stop: k,
|
|
2763
|
-
intl:
|
|
2763
|
+
intl: w
|
|
2764
2764
|
},
|
|
2765
2765
|
children: e
|
|
2766
2766
|
}
|
|
@@ -2775,7 +2775,7 @@ function Do({
|
|
|
2775
2775
|
canSelectLines: i,
|
|
2776
2776
|
filterable: r
|
|
2777
2777
|
}) {
|
|
2778
|
-
const o = le(), { isPlaying: a, isPaused: l, setIsPaused: d, timeWindow: s, setTimeWindow: u, stop: p } = Et(), [c, y] = _(!1), [g, f] = _(!1), [
|
|
2778
|
+
const o = le(), { isPlaying: a, isPaused: l, setIsPaused: d, timeWindow: s, setTimeWindow: u, stop: p } = Et(), [c, y] = _(!1), [g, f] = _(!1), [w, h] = _(!1), [b, k] = _(0), M = F(() => e == null ? void 0 : e.getZr(), [e]), C = oe(
|
|
2779
2779
|
(O) => M == null ? void 0 : M.setCursorStyle(O),
|
|
2780
2780
|
[M]
|
|
2781
2781
|
), x = oe(
|
|
@@ -2784,8 +2784,8 @@ function Do({
|
|
|
2784
2784
|
const [L] = e.convertFromPixel(_e, [
|
|
2785
2785
|
O.offsetX,
|
|
2786
2786
|
O.offsetY
|
|
2787
|
-
]),
|
|
2788
|
-
u(
|
|
2787
|
+
]), P = nt(L, t);
|
|
2788
|
+
u(P !== void 0 ? [t[P].name] : []);
|
|
2789
2789
|
}
|
|
2790
2790
|
},
|
|
2791
2791
|
[t, e, u]
|
|
@@ -2808,31 +2808,31 @@ function Do({
|
|
|
2808
2808
|
r
|
|
2809
2809
|
]), U(() => {
|
|
2810
2810
|
function O(L) {
|
|
2811
|
-
var
|
|
2811
|
+
var P;
|
|
2812
2812
|
if (r) {
|
|
2813
|
-
if (((
|
|
2813
|
+
if (((P = L.target) == null ? void 0 : P.type) === "ec-line") {
|
|
2814
2814
|
y(!0), C("grabbing");
|
|
2815
2815
|
return;
|
|
2816
2816
|
}
|
|
2817
2817
|
if (s.length === 2) {
|
|
2818
|
-
const [
|
|
2818
|
+
const [$] = e.convertFromPixel(_e, [
|
|
2819
2819
|
L.offsetX,
|
|
2820
2820
|
L.offsetY
|
|
2821
2821
|
]);
|
|
2822
|
-
if (
|
|
2822
|
+
if ($ >= s[0] && $ <= s[1]) {
|
|
2823
2823
|
h(!0);
|
|
2824
|
-
const W =
|
|
2824
|
+
const W = $ - s[0];
|
|
2825
2825
|
k(W);
|
|
2826
2826
|
return;
|
|
2827
2827
|
}
|
|
2828
2828
|
}
|
|
2829
2829
|
if (e) {
|
|
2830
2830
|
f(!0);
|
|
2831
|
-
const [
|
|
2831
|
+
const [$] = e.convertFromPixel(_e, [
|
|
2832
2832
|
L.offsetX,
|
|
2833
2833
|
L.offsetY
|
|
2834
2834
|
]);
|
|
2835
|
-
qe =
|
|
2835
|
+
qe = $;
|
|
2836
2836
|
return;
|
|
2837
2837
|
}
|
|
2838
2838
|
}
|
|
@@ -2840,13 +2840,13 @@ function Do({
|
|
|
2840
2840
|
return Xe(M, "mousedown", O);
|
|
2841
2841
|
}, [M, e, s, C, r]), U(() => {
|
|
2842
2842
|
function O(L) {
|
|
2843
|
-
var
|
|
2844
|
-
if (((
|
|
2845
|
-
const [
|
|
2843
|
+
var P;
|
|
2844
|
+
if (((P = L == null ? void 0 : L.target) == null ? void 0 : P.type) === "polygon" && C("move"), c && e && (x(L), C("grabbing")), g && e) {
|
|
2845
|
+
const [$] = e.convertFromPixel(_e, [
|
|
2846
2846
|
L.offsetX,
|
|
2847
2847
|
L.offsetY
|
|
2848
2848
|
]);
|
|
2849
|
-
u(qe ===
|
|
2849
|
+
u(qe === $ ? [] : [qe, $]);
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
2852
|
return Xe(M, "mousemove", O);
|
|
@@ -2860,13 +2860,13 @@ function Do({
|
|
|
2860
2860
|
x
|
|
2861
2861
|
]), U(() => {
|
|
2862
2862
|
function O(L) {
|
|
2863
|
-
if (c && (y(!1), C("default")), g && (f(!1), qe = null, s.length === 1 && u([])),
|
|
2864
|
-
const [
|
|
2863
|
+
if (c && (y(!1), C("default")), g && (f(!1), qe = null, s.length === 1 && u([])), w && e) {
|
|
2864
|
+
const [P] = e.convertFromPixel(_e, [
|
|
2865
2865
|
L.offsetX,
|
|
2866
2866
|
L.offsetY
|
|
2867
|
-
]),
|
|
2867
|
+
]), $ = P - s[0];
|
|
2868
2868
|
if (b) {
|
|
2869
|
-
const W =
|
|
2869
|
+
const W = $ - b;
|
|
2870
2870
|
u([s[0] + W, s[1] + W]);
|
|
2871
2871
|
}
|
|
2872
2872
|
h(!1);
|
|
@@ -2876,7 +2876,7 @@ function Do({
|
|
|
2876
2876
|
}, [
|
|
2877
2877
|
M,
|
|
2878
2878
|
e,
|
|
2879
|
-
|
|
2879
|
+
w,
|
|
2880
2880
|
g,
|
|
2881
2881
|
c,
|
|
2882
2882
|
b,
|
|
@@ -2887,16 +2887,16 @@ function Do({
|
|
|
2887
2887
|
!r && s.length && u([]);
|
|
2888
2888
|
}, [r, u, s.length]);
|
|
2889
2889
|
const A = F(() => {
|
|
2890
|
-
var
|
|
2890
|
+
var $;
|
|
2891
2891
|
if (s.length !== 1)
|
|
2892
2892
|
return;
|
|
2893
2893
|
const O = s[0], L = nt(O, t);
|
|
2894
2894
|
if (L === void 0)
|
|
2895
2895
|
return;
|
|
2896
|
-
const
|
|
2896
|
+
const P = ($ = t[L]) == null ? void 0 : $.name;
|
|
2897
2897
|
return (
|
|
2898
2898
|
// Cannot have markLine and markArea at the same time
|
|
2899
|
-
|
|
2899
|
+
P !== void 0 && {
|
|
2900
2900
|
symbol: ["none", "none"],
|
|
2901
2901
|
animationDuration: 100,
|
|
2902
2902
|
animationDurationUpdate: 150,
|
|
@@ -2911,7 +2911,7 @@ function Do({
|
|
|
2911
2911
|
show: !1
|
|
2912
2912
|
}
|
|
2913
2913
|
},
|
|
2914
|
-
xAxis:
|
|
2914
|
+
xAxis: P,
|
|
2915
2915
|
lineStyle: {
|
|
2916
2916
|
type: "solid",
|
|
2917
2917
|
color: o.palette.primary.main,
|
|
@@ -2941,7 +2941,7 @@ function Xe(e, t, i) {
|
|
|
2941
2941
|
Ut[t] && (e != null && e.handler) && e.off(t, i);
|
|
2942
2942
|
};
|
|
2943
2943
|
}
|
|
2944
|
-
const
|
|
2944
|
+
const Pn = B * 22, On = "100%", $o = 5, Po = 3, Oo = B * 20;
|
|
2945
2945
|
function Wo({
|
|
2946
2946
|
chartType: e,
|
|
2947
2947
|
formatter: t,
|
|
@@ -2959,7 +2959,7 @@ function Wo({
|
|
|
2959
2959
|
onCategoryClick: g,
|
|
2960
2960
|
yAxisType: f
|
|
2961
2961
|
}) {
|
|
2962
|
-
const
|
|
2962
|
+
const w = le(), [h, b] = _(), k = (E) => b(E), [M, C] = _(), x = F(
|
|
2963
2963
|
() => l.reduce(
|
|
2964
2964
|
(E, { data: N }) => N.reduce(
|
|
2965
2965
|
(I, R) => R[1] > I ? R[1] : I,
|
|
@@ -2975,19 +2975,19 @@ function Wo({
|
|
|
2975
2975
|
appendToBody: !0,
|
|
2976
2976
|
padding: [B * 0.5, B],
|
|
2977
2977
|
textStyle: {
|
|
2978
|
-
...
|
|
2978
|
+
...w.typography.caption,
|
|
2979
2979
|
fontSize: 11,
|
|
2980
|
-
color:
|
|
2980
|
+
color: w.palette.common.white
|
|
2981
2981
|
},
|
|
2982
2982
|
borderWidth: 0,
|
|
2983
|
-
backgroundColor:
|
|
2983
|
+
backgroundColor: w.palette.black[90],
|
|
2984
2984
|
position: (E, N, I, R, q) => {
|
|
2985
2985
|
const j = { top: 0 };
|
|
2986
2986
|
return q.contentSize[0] < q.viewSize[0] - E[0] ? j.left = E[0] + B * 1.5 : j.right = q.viewSize[0] - E[0] + B * 1.5, j;
|
|
2987
2987
|
},
|
|
2988
2988
|
...o ? { formatter: o } : {}
|
|
2989
2989
|
}),
|
|
2990
|
-
[
|
|
2990
|
+
[w, r, o]
|
|
2991
2991
|
), T = F(() => {
|
|
2992
2992
|
const E = {
|
|
2993
2993
|
margin: 0,
|
|
@@ -2996,18 +2996,18 @@ function Wo({
|
|
|
2996
2996
|
inside: !0,
|
|
2997
2997
|
color: (R) => {
|
|
2998
2998
|
let q = "transparent";
|
|
2999
|
-
return R >= x && (q =
|
|
2999
|
+
return R >= x && (q = w.palette.black[60]), q;
|
|
3000
3000
|
}
|
|
3001
3001
|
}, N = {
|
|
3002
3002
|
margin: 0,
|
|
3003
3003
|
verticalAlign: "middle",
|
|
3004
3004
|
padding: [0, B * 0.75, 0, 0],
|
|
3005
|
-
color:
|
|
3005
|
+
color: w.palette.black[60]
|
|
3006
3006
|
}, I = f === "dense" ? E : N;
|
|
3007
3007
|
return {
|
|
3008
3008
|
axisPointer: {
|
|
3009
3009
|
lineStyle: {
|
|
3010
|
-
color:
|
|
3010
|
+
color: w.palette.black[40]
|
|
3011
3011
|
}
|
|
3012
3012
|
},
|
|
3013
3013
|
xAxis: {
|
|
@@ -3015,28 +3015,28 @@ function Wo({
|
|
|
3015
3015
|
axisLine: {
|
|
3016
3016
|
show: !0,
|
|
3017
3017
|
lineStyle: {
|
|
3018
|
-
color:
|
|
3018
|
+
color: w.palette.grey[900],
|
|
3019
3019
|
opacity: 0.2
|
|
3020
3020
|
}
|
|
3021
3021
|
},
|
|
3022
3022
|
axisLabel: {
|
|
3023
|
-
fontWeight:
|
|
3024
|
-
fontSize:
|
|
3025
|
-
fontFamily:
|
|
3023
|
+
fontWeight: w.typography.fontWeightRegular,
|
|
3024
|
+
fontSize: w.typography.caption.fontSize,
|
|
3025
|
+
fontFamily: w.typography.caption.fontFamily,
|
|
3026
3026
|
// echarts doesn't intepret lineHeight properly, so hack it around
|
|
3027
|
-
lineHeight:
|
|
3028
|
-
letterSpacing:
|
|
3027
|
+
lineHeight: w.typography.caption.lineHeight * 8,
|
|
3028
|
+
letterSpacing: w.typography.caption.letterSpacing,
|
|
3029
3029
|
// https://echarts.apache.org/en/option.html#xAxis.axisLabel.formatter
|
|
3030
3030
|
formatter: {
|
|
3031
3031
|
year: "{yearStyle|{yyyy}}"
|
|
3032
3032
|
},
|
|
3033
3033
|
rich: {
|
|
3034
3034
|
yearStyle: {
|
|
3035
|
-
fontWeight:
|
|
3036
|
-
fontSize:
|
|
3037
|
-
fontFamily:
|
|
3038
|
-
letterSpacing:
|
|
3039
|
-
lineHeight:
|
|
3035
|
+
fontWeight: w.typography.fontWeightMedium,
|
|
3036
|
+
fontSize: w.typography.caption.fontSize,
|
|
3037
|
+
fontFamily: w.typography.caption.fontFamily,
|
|
3038
|
+
letterSpacing: w.typography.caption.letterSpacing,
|
|
3039
|
+
lineHeight: w.typography.caption.lineHeight * 8
|
|
3040
3040
|
}
|
|
3041
3041
|
}
|
|
3042
3042
|
},
|
|
@@ -3044,9 +3044,9 @@ function Wo({
|
|
|
3044
3044
|
show: !1
|
|
3045
3045
|
},
|
|
3046
3046
|
splitNumber: i ?? (M !== void 0 ? Math.min(
|
|
3047
|
-
|
|
3047
|
+
Po,
|
|
3048
3048
|
Math.ceil(M / Oo)
|
|
3049
|
-
) :
|
|
3049
|
+
) : $o)
|
|
3050
3050
|
},
|
|
3051
3051
|
yAxis: {
|
|
3052
3052
|
type: "value",
|
|
@@ -3056,12 +3056,12 @@ function Wo({
|
|
|
3056
3056
|
showMinLabel: !1,
|
|
3057
3057
|
...I,
|
|
3058
3058
|
...t ? { formatter: (R) => t(R) } : {},
|
|
3059
|
-
fontWeight:
|
|
3060
|
-
fontSize:
|
|
3061
|
-
fontFamily:
|
|
3059
|
+
fontWeight: w.typography.fontWeightRegular,
|
|
3060
|
+
fontSize: w.typography.overlineDelicate.fontSize,
|
|
3061
|
+
fontFamily: w.typography.overlineDelicate.fontFamily,
|
|
3062
3062
|
// echarts doesn't intepret lineHeight properly, so hack it around
|
|
3063
|
-
lineHeight:
|
|
3064
|
-
letterSpacing:
|
|
3063
|
+
lineHeight: w.typography.overlineDelicate.lineHeight * 8,
|
|
3064
|
+
letterSpacing: w.typography.overlineDelicate.letterSpacing
|
|
3065
3065
|
},
|
|
3066
3066
|
axisLine: {
|
|
3067
3067
|
show: !1
|
|
@@ -3073,20 +3073,20 @@ function Wo({
|
|
|
3073
3073
|
show: !0,
|
|
3074
3074
|
onZero: !1,
|
|
3075
3075
|
lineStyle: {
|
|
3076
|
-
color:
|
|
3076
|
+
color: w.palette.black[4]
|
|
3077
3077
|
}
|
|
3078
3078
|
},
|
|
3079
3079
|
max: x
|
|
3080
3080
|
}
|
|
3081
3081
|
};
|
|
3082
|
-
}, [
|
|
3082
|
+
}, [w, x, t, M, i, f]), { timelineOptions: O, timeWindowOptions: L } = Do({
|
|
3083
3083
|
echartsInstance: h,
|
|
3084
3084
|
data: a,
|
|
3085
3085
|
canSelectLines: !!g,
|
|
3086
3086
|
filterable: c
|
|
3087
|
-
}),
|
|
3087
|
+
}), P = F(
|
|
3088
3088
|
() => l.map(({ data: E, color: N, name: I }, R) => {
|
|
3089
|
-
const q = y && y.length > 0, j = q && y.includes(I), X = !q || j ? N :
|
|
3089
|
+
const q = y && y.length > 0, j = q && y.includes(I), X = !q || j ? N : w.palette.action.disabledBackground;
|
|
3090
3090
|
return {
|
|
3091
3091
|
id: String(R),
|
|
3092
3092
|
name: I,
|
|
@@ -3118,9 +3118,9 @@ function Wo({
|
|
|
3118
3118
|
p,
|
|
3119
3119
|
e,
|
|
3120
3120
|
y,
|
|
3121
|
-
|
|
3121
|
+
w
|
|
3122
3122
|
]
|
|
3123
|
-
),
|
|
3123
|
+
), $ = F(
|
|
3124
3124
|
() => ({
|
|
3125
3125
|
grid: {
|
|
3126
3126
|
left: B * (f === "dense" ? 2 : 3.5),
|
|
@@ -3128,16 +3128,16 @@ function Wo({
|
|
|
3128
3128
|
right: B * 2,
|
|
3129
3129
|
bottom: B * 3
|
|
3130
3130
|
},
|
|
3131
|
-
color: [
|
|
3131
|
+
color: [w.palette.secondary.main],
|
|
3132
3132
|
tooltip: A,
|
|
3133
3133
|
...T,
|
|
3134
|
-
series:
|
|
3134
|
+
series: P
|
|
3135
3135
|
}),
|
|
3136
3136
|
[
|
|
3137
3137
|
T,
|
|
3138
|
-
|
|
3138
|
+
P,
|
|
3139
3139
|
f,
|
|
3140
|
-
|
|
3140
|
+
w.palette.secondary.main,
|
|
3141
3141
|
A
|
|
3142
3142
|
]
|
|
3143
3143
|
), J = { click: oe(
|
|
@@ -3163,7 +3163,7 @@ function Wo({
|
|
|
3163
3163
|
N.disconnect();
|
|
3164
3164
|
};
|
|
3165
3165
|
}, [h]);
|
|
3166
|
-
const G = u ? On : s ??
|
|
3166
|
+
const G = u ? On : s ?? Pn;
|
|
3167
3167
|
return an(() => {
|
|
3168
3168
|
var N;
|
|
3169
3169
|
const E = (N = h == null ? void 0 : h.getDom()) == null ? void 0 : N.parentElement;
|
|
@@ -3171,7 +3171,7 @@ function Wo({
|
|
|
3171
3171
|
}, [G, u, h]), /* @__PURE__ */ n(
|
|
3172
3172
|
We,
|
|
3173
3173
|
{
|
|
3174
|
-
option:
|
|
3174
|
+
option: $,
|
|
3175
3175
|
onEvents: J,
|
|
3176
3176
|
onChartReady: k,
|
|
3177
3177
|
style: { height: G }
|
|
@@ -3215,7 +3215,7 @@ function No({
|
|
|
3215
3215
|
const f = () => {
|
|
3216
3216
|
const { animationFrameId: C, timeoutId: x } = l.current;
|
|
3217
3217
|
C && window.cancelAnimationFrame(C), x && clearTimeout(x);
|
|
3218
|
-
},
|
|
3218
|
+
}, w = oe(() => {
|
|
3219
3219
|
f(), c();
|
|
3220
3220
|
}, [c]), h = () => {
|
|
3221
3221
|
f(), y();
|
|
@@ -3231,12 +3231,12 @@ function No({
|
|
|
3231
3231
|
p(A);
|
|
3232
3232
|
},
|
|
3233
3233
|
onEnd: () => {
|
|
3234
|
-
setTimeout(
|
|
3234
|
+
setTimeout(w, 250);
|
|
3235
3235
|
},
|
|
3236
3236
|
animationRef: l
|
|
3237
3237
|
}), () => f();
|
|
3238
3238
|
}
|
|
3239
|
-
}, [e, d, t, p,
|
|
3239
|
+
}, [e, d, t, p, w, o]), U(() => {
|
|
3240
3240
|
if (d && u.length === 1 && e.length)
|
|
3241
3241
|
return Go({
|
|
3242
3242
|
speed: o,
|
|
@@ -3246,12 +3246,12 @@ function No({
|
|
|
3246
3246
|
p([C]);
|
|
3247
3247
|
},
|
|
3248
3248
|
onEnd: () => {
|
|
3249
|
-
setTimeout(
|
|
3249
|
+
setTimeout(w, 250);
|
|
3250
3250
|
},
|
|
3251
3251
|
animationRef: l
|
|
3252
3252
|
}), () => f();
|
|
3253
3253
|
d && u.length === 0 && p([e[0].name]);
|
|
3254
|
-
}, [e, d, o, u.length,
|
|
3254
|
+
}, [e, d, o, u.length, w]);
|
|
3255
3255
|
const b = (C) => {
|
|
3256
3256
|
C != null && C.currentTarget && r(C.currentTarget);
|
|
3257
3257
|
}, k = () => {
|
|
@@ -3259,7 +3259,7 @@ function No({
|
|
|
3259
3259
|
}, M = (C) => {
|
|
3260
3260
|
a(C), k();
|
|
3261
3261
|
};
|
|
3262
|
-
return /* @__PURE__ */
|
|
3262
|
+
return /* @__PURE__ */ v(ie, { children: [
|
|
3263
3263
|
/* @__PURE__ */ n(
|
|
3264
3264
|
fe,
|
|
3265
3265
|
{
|
|
@@ -3270,7 +3270,7 @@ function No({
|
|
|
3270
3270
|
children: /* @__PURE__ */ n(Bo, {})
|
|
3271
3271
|
}
|
|
3272
3272
|
),
|
|
3273
|
-
/* @__PURE__ */
|
|
3273
|
+
/* @__PURE__ */ v(
|
|
3274
3274
|
kt,
|
|
3275
3275
|
{
|
|
3276
3276
|
anchorEl: i,
|
|
@@ -3278,9 +3278,9 @@ function No({
|
|
|
3278
3278
|
open: !!i,
|
|
3279
3279
|
onClose: k,
|
|
3280
3280
|
children: [
|
|
3281
|
-
/* @__PURE__ */ n(
|
|
3282
|
-
Fo.map((C) => /* @__PURE__ */
|
|
3283
|
-
|
|
3281
|
+
/* @__PURE__ */ n(Pe, { disabled: !0, children: /* @__PURE__ */ n(z, { variant: "caption", color: "textSecondary", children: g.formatMessage({ id: "c4r.widgets.timeSeries.speed" }) }) }),
|
|
3282
|
+
Fo.map((C) => /* @__PURE__ */ v(
|
|
3283
|
+
Pe,
|
|
3284
3284
|
{
|
|
3285
3285
|
selected: C === o,
|
|
3286
3286
|
onClick: () => M(C),
|
|
@@ -3300,7 +3300,7 @@ function No({
|
|
|
3300
3300
|
size: "small",
|
|
3301
3301
|
color: "primary",
|
|
3302
3302
|
disabled: !(s || d),
|
|
3303
|
-
onClick:
|
|
3303
|
+
onClick: w,
|
|
3304
3304
|
"data-testid": "stop",
|
|
3305
3305
|
children: /* @__PURE__ */ n(zo, {})
|
|
3306
3306
|
}
|
|
@@ -3452,7 +3452,7 @@ function Rn({
|
|
|
3452
3452
|
legend: o
|
|
3453
3453
|
}) {
|
|
3454
3454
|
const a = o && /* @__PURE__ */ n(S, { flex: 0, mt: 2, children: o });
|
|
3455
|
-
return /* @__PURE__ */
|
|
3455
|
+
return /* @__PURE__ */ v(
|
|
3456
3456
|
Uo,
|
|
3457
3457
|
{
|
|
3458
3458
|
style: {
|
|
@@ -3460,13 +3460,13 @@ function Rn({
|
|
|
3460
3460
|
},
|
|
3461
3461
|
children: [
|
|
3462
3462
|
/* @__PURE__ */ n(Xo, { flex: 0, children: t }),
|
|
3463
|
-
i ? /* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */
|
|
3463
|
+
i ? /* @__PURE__ */ v(qo, { flex: 1, children: [
|
|
3464
|
+
/* @__PURE__ */ v(Wn, { flex: 1, children: [
|
|
3465
3465
|
/* @__PURE__ */ n(Ko, { flex: 0, children: i }),
|
|
3466
3466
|
/* @__PURE__ */ n(Zo, { flex: 1, children: r })
|
|
3467
3467
|
] }),
|
|
3468
3468
|
a
|
|
3469
|
-
] }) : /* @__PURE__ */
|
|
3469
|
+
] }) : /* @__PURE__ */ v(ie, { children: [
|
|
3470
3470
|
/* @__PURE__ */ n(S, { pb: 1.5, flex: 1, children: r }),
|
|
3471
3471
|
a
|
|
3472
3472
|
] })
|
|
@@ -3535,25 +3535,25 @@ const Jo = (e) => /* @__PURE__ */ n(je, { width: "720", height: "124", viewBox:
|
|
|
3535
3535
|
{
|
|
3536
3536
|
fitHeight: !!e,
|
|
3537
3537
|
header: /* @__PURE__ */ n(S, { pt: 1.25, pb: 0.75, children: /* @__PURE__ */ n(H, { width: 48, height: 8 }) }),
|
|
3538
|
-
controls: i && /* @__PURE__ */
|
|
3538
|
+
controls: i && /* @__PURE__ */ v(Qo, { children: [
|
|
3539
3539
|
/* @__PURE__ */ n(S, { p: 0.5, children: /* @__PURE__ */ n(H, { width: 16, height: 16 }) }),
|
|
3540
3540
|
/* @__PURE__ */ n(S, { mt: 2, p: 0.5, children: /* @__PURE__ */ n(H, { width: 16, height: 16 }) }),
|
|
3541
3541
|
/* @__PURE__ */ n(S, { mt: 1, p: 0.5, children: /* @__PURE__ */ n(H, { width: 16, height: 16 }) })
|
|
3542
3542
|
] }),
|
|
3543
|
-
chart: /* @__PURE__ */
|
|
3543
|
+
chart: /* @__PURE__ */ v(ea, { style: { height: e ? On : t ?? Pn }, children: [
|
|
3544
3544
|
/* @__PURE__ */ n(ta, { flex: 0, children: /* @__PURE__ */ n(H, { width: 24, height: 8 }) }),
|
|
3545
3545
|
/* @__PURE__ */ n(na, { flex: 1, children: /* @__PURE__ */ n(Jo, { preserveAspectRatio: "none" }) }),
|
|
3546
|
-
/* @__PURE__ */
|
|
3546
|
+
/* @__PURE__ */ v(ia, { flex: 0, children: [
|
|
3547
3547
|
/* @__PURE__ */ n(H, { width: 32, height: 8 }),
|
|
3548
3548
|
/* @__PURE__ */ n(H, { width: 32, height: 8 })
|
|
3549
3549
|
] })
|
|
3550
3550
|
] }),
|
|
3551
|
-
legend: r && (r && /* @__PURE__ */
|
|
3552
|
-
/* @__PURE__ */
|
|
3551
|
+
legend: r && (r && /* @__PURE__ */ v(ra, { children: [
|
|
3552
|
+
/* @__PURE__ */ v(qt, { children: [
|
|
3553
3553
|
/* @__PURE__ */ n(H, { width: 8, height: 8 }),
|
|
3554
3554
|
/* @__PURE__ */ n(H, { width: 48, height: 8 })
|
|
3555
3555
|
] }),
|
|
3556
|
-
/* @__PURE__ */
|
|
3556
|
+
/* @__PURE__ */ v(qt, { children: [
|
|
3557
3557
|
/* @__PURE__ */ n(H, { width: 8, height: 8 }),
|
|
3558
3558
|
/* @__PURE__ */ n(H, { width: 48, height: 8 })
|
|
3559
3559
|
] })
|
|
@@ -3576,7 +3576,7 @@ function ds({
|
|
|
3576
3576
|
animation: y = !0,
|
|
3577
3577
|
filterable: g = !0,
|
|
3578
3578
|
onTimelineUpdate: f,
|
|
3579
|
-
timeWindow:
|
|
3579
|
+
timeWindow: w,
|
|
3580
3580
|
timelinePosition: h,
|
|
3581
3581
|
onTimeWindowUpdate: b,
|
|
3582
3582
|
selectedCategories: k,
|
|
@@ -3587,8 +3587,8 @@ function ds({
|
|
|
3587
3587
|
onPause: T,
|
|
3588
3588
|
onStop: O,
|
|
3589
3589
|
isLoading: L = !1,
|
|
3590
|
-
palette:
|
|
3591
|
-
showLegend:
|
|
3590
|
+
palette: P = Object.values(yn.qualitative.bold),
|
|
3591
|
+
showLegend: $,
|
|
3592
3592
|
yAxisType: W = "dense"
|
|
3593
3593
|
}) {
|
|
3594
3594
|
const J = re([]), G = se(), { showSkeleton: E } = ke(!!L), N = oe(
|
|
@@ -3614,7 +3614,7 @@ function ds({
|
|
|
3614
3614
|
fitHeight: p,
|
|
3615
3615
|
height: u,
|
|
3616
3616
|
showControls: c,
|
|
3617
|
-
showLegend:
|
|
3617
|
+
showLegend: $
|
|
3618
3618
|
}
|
|
3619
3619
|
) : /* @__PURE__ */ n(
|
|
3620
3620
|
Lo,
|
|
@@ -3624,7 +3624,7 @@ function ds({
|
|
|
3624
3624
|
isPaused: A,
|
|
3625
3625
|
onPause: T,
|
|
3626
3626
|
onStop: O,
|
|
3627
|
-
timeWindow:
|
|
3627
|
+
timeWindow: w,
|
|
3628
3628
|
onTimeWindowUpdate: N,
|
|
3629
3629
|
intl: G,
|
|
3630
3630
|
children: /* @__PURE__ */ n(
|
|
@@ -3644,8 +3644,8 @@ function ds({
|
|
|
3644
3644
|
showControls: c,
|
|
3645
3645
|
animation: y,
|
|
3646
3646
|
filterable: g,
|
|
3647
|
-
palette:
|
|
3648
|
-
showLegend:
|
|
3647
|
+
palette: P,
|
|
3648
|
+
showLegend: $,
|
|
3649
3649
|
selectedCategories: k,
|
|
3650
3650
|
timelinePosition: h,
|
|
3651
3651
|
onSelectedCategoriesChange: M,
|
|
@@ -3671,29 +3671,29 @@ function aa({
|
|
|
3671
3671
|
animation: y = !0,
|
|
3672
3672
|
filterable: g = !0,
|
|
3673
3673
|
palette: f = Object.values(yn.qualitative.bold),
|
|
3674
|
-
selectedCategories:
|
|
3674
|
+
selectedCategories: w = [],
|
|
3675
3675
|
onSelectedCategoriesChange: h,
|
|
3676
3676
|
showLegend: b,
|
|
3677
3677
|
timelinePosition: k,
|
|
3678
3678
|
yAxisType: M = "dense"
|
|
3679
3679
|
}) {
|
|
3680
|
-
const C = le(), x = C.palette.secondary.main, { isPlaying: A, isPaused: T, timeWindow: O, stop: L, setTimeWindow:
|
|
3680
|
+
const C = le(), x = C.palette.secondary.main, { isPlaying: A, isPaused: T, timeWindow: O, stop: L, setTimeWindow: P, intl: $ } = Et();
|
|
3681
3681
|
U(() => {
|
|
3682
3682
|
if (k !== void 0) {
|
|
3683
3683
|
if (k < 0 || k >= e.length) return;
|
|
3684
3684
|
const Y = e[k].name;
|
|
3685
|
-
|
|
3685
|
+
P([Y]);
|
|
3686
3686
|
}
|
|
3687
3687
|
}, [k, e]), U(() => {
|
|
3688
3688
|
if (!e.length) return;
|
|
3689
3689
|
const Y = e[0].name, K = e[e.length - 1].name;
|
|
3690
|
-
(O[0] < Y || O[1] > K || O[1] < Y || O[1] > K) &&
|
|
3690
|
+
(O[0] < Y || O[1] > K || O[1] < Y || O[1] > K) && P([]);
|
|
3691
3691
|
}, [e]);
|
|
3692
3692
|
const W = F(() => {
|
|
3693
3693
|
const Y = {}, K = t ? t.map((de) => ({
|
|
3694
3694
|
name: de,
|
|
3695
3695
|
data: [],
|
|
3696
|
-
color:
|
|
3696
|
+
color: Pi(de, {
|
|
3697
3697
|
palette: f,
|
|
3698
3698
|
fallbackColor: x,
|
|
3699
3699
|
colorMapping: Y
|
|
@@ -3707,12 +3707,12 @@ function aa({
|
|
|
3707
3707
|
];
|
|
3708
3708
|
for (const {
|
|
3709
3709
|
name: de,
|
|
3710
|
-
value:
|
|
3711
|
-
category:
|
|
3710
|
+
value: we,
|
|
3711
|
+
category: ve,
|
|
3712
3712
|
categoryIndex: V
|
|
3713
3713
|
} of e) {
|
|
3714
|
-
const ee = V ?? (t &&
|
|
3715
|
-
ee === -1 || t && ee >= t.length || !Number.isFinite(ee) || K[ee].data.push([de,
|
|
3714
|
+
const ee = V ?? (t && ve ? t.indexOf(ve) : 0);
|
|
3715
|
+
ee === -1 || t && ee >= t.length || !Number.isFinite(ee) || K[ee].data.push([de, we]);
|
|
3716
3716
|
}
|
|
3717
3717
|
return K;
|
|
3718
3718
|
}, [t, e, f, x, C.palette.secondary.main]), J = F(() => {
|
|
@@ -3730,19 +3730,19 @@ function aa({
|
|
|
3730
3730
|
const Y = new Date(O[0]);
|
|
3731
3731
|
return Dn({ date: Y, stepSize: i, stepMultiplier: r });
|
|
3732
3732
|
}
|
|
3733
|
-
}, [e, O, A, T, i, r]), G = F(() => A || T || O.length > 0 || (
|
|
3734
|
-
L(),
|
|
3733
|
+
}, [e, O, A, T, i, r]), G = F(() => A || T || O.length > 0 || (w == null ? void 0 : w.length) > 0, [T, A, w == null ? void 0 : w.length, O.length]), E = () => {
|
|
3734
|
+
L(), P([]), h == null || h([]);
|
|
3735
3735
|
}, N = (Y) => {
|
|
3736
3736
|
Y.key === "Enter" && E();
|
|
3737
3737
|
}, I = oe(
|
|
3738
3738
|
(Y) => {
|
|
3739
3739
|
if (h) {
|
|
3740
|
-
const K = [...
|
|
3740
|
+
const K = [...w], de = K.indexOf(Y);
|
|
3741
3741
|
de === -1 ? K.push(Y) : K.splice(de, 1), h(K);
|
|
3742
3742
|
}
|
|
3743
3743
|
},
|
|
3744
|
-
[h,
|
|
3745
|
-
), R = !!(b ?? W.length > 1), q = /* @__PURE__ */
|
|
3744
|
+
[h, w]
|
|
3745
|
+
), R = !!(b ?? W.length > 1), q = /* @__PURE__ */ v(ie, { children: [
|
|
3746
3746
|
/* @__PURE__ */ n(S, { children: /* @__PURE__ */ n(z, { color: "textSecondary", variant: "caption", children: J ?? "-" }) }),
|
|
3747
3747
|
g && G && /* @__PURE__ */ n(
|
|
3748
3748
|
ye,
|
|
@@ -3753,7 +3753,7 @@ function aa({
|
|
|
3753
3753
|
onKeyDown: N,
|
|
3754
3754
|
tabIndex: 0,
|
|
3755
3755
|
underline: "hover",
|
|
3756
|
-
children:
|
|
3756
|
+
children: $.formatMessage({ id: "c4r.widgets.timeSeries.clear" })
|
|
3757
3757
|
}
|
|
3758
3758
|
)
|
|
3759
3759
|
] });
|
|
@@ -3784,7 +3784,7 @@ function aa({
|
|
|
3784
3784
|
fitHeight: p,
|
|
3785
3785
|
animation: y,
|
|
3786
3786
|
filterable: g,
|
|
3787
|
-
selectedCategories:
|
|
3787
|
+
selectedCategories: w,
|
|
3788
3788
|
onCategoryClick: h && I,
|
|
3789
3789
|
yAxisType: M
|
|
3790
3790
|
}
|
|
@@ -3793,7 +3793,7 @@ function aa({
|
|
|
3793
3793
|
An,
|
|
3794
3794
|
{
|
|
3795
3795
|
series: W,
|
|
3796
|
-
selectedCategories:
|
|
3796
|
+
selectedCategories: w,
|
|
3797
3797
|
onCategoryClick: h && I
|
|
3798
3798
|
}
|
|
3799
3799
|
)
|
|
@@ -3908,13 +3908,13 @@ const ha = m("div", {
|
|
|
3908
3908
|
color: "white",
|
|
3909
3909
|
borderRadius: e.spacing(2)
|
|
3910
3910
|
}));
|
|
3911
|
-
function
|
|
3911
|
+
function wa(e, t, i, r, o) {
|
|
3912
3912
|
const l = (e[0] ?? []).map((d, s) => {
|
|
3913
3913
|
const u = String(d.name), p = r.length > 0 && !r.includes(u), c = i[s] ?? u, y = e.map((g, f) => {
|
|
3914
|
-
var
|
|
3914
|
+
var w;
|
|
3915
3915
|
return {
|
|
3916
3916
|
color: p ? pn(t[f], 0.8) : t[f],
|
|
3917
|
-
value: ((
|
|
3917
|
+
value: ((w = g[s]) == null ? void 0 : w.value) ?? 0
|
|
3918
3918
|
};
|
|
3919
3919
|
});
|
|
3920
3920
|
return {
|
|
@@ -3928,7 +3928,7 @@ function va(e, t, i, r, o) {
|
|
|
3928
3928
|
return Math.max(...s.data.map((c) => c.value)) - u;
|
|
3929
3929
|
}), l;
|
|
3930
3930
|
}
|
|
3931
|
-
const
|
|
3931
|
+
const va = 500;
|
|
3932
3932
|
function xa(e, t = {}) {
|
|
3933
3933
|
const { disabled: i, duration: r, animateOnMount: o, initialValue: a = 0 } = t, l = re(null), [d, s] = _(
|
|
3934
3934
|
() => o ? a : e
|
|
@@ -3936,7 +3936,7 @@ function xa(e, t = {}) {
|
|
|
3936
3936
|
return U(() => (i ? s(e) : gt({
|
|
3937
3937
|
start: d,
|
|
3938
3938
|
end: e,
|
|
3939
|
-
duration: r ??
|
|
3939
|
+
duration: r ?? va,
|
|
3940
3940
|
drawFrame: (u) => s(u),
|
|
3941
3941
|
requestRef: l
|
|
3942
3942
|
}), () => {
|
|
@@ -3968,9 +3968,9 @@ function Ma({
|
|
|
3968
3968
|
formatter: r = mt
|
|
3969
3969
|
}) {
|
|
3970
3970
|
const o = le(), a = e.data[0], l = e.data[t], d = i[t], s = (l.value - a.value) / (a.value || 1) * 100, u = Math.sign(s) === -1 ? "-" : "+", p = Math.sign(s) === -1 ? o.palette.error.main : o.palette.success.main, c = e.key === Oe ? o.palette.text.disabled : p;
|
|
3971
|
-
return /* @__PURE__ */
|
|
3971
|
+
return /* @__PURE__ */ v("div", { children: [
|
|
3972
3972
|
/* @__PURE__ */ n(De, { color: "inherit", variant: "caption", noWrap: !0, children: e.label }),
|
|
3973
|
-
/* @__PURE__ */ n(S, { pt: 1, pb: 0.5, children: /* @__PURE__ */
|
|
3973
|
+
/* @__PURE__ */ n(S, { pt: 1, pb: 0.5, children: /* @__PURE__ */ v(Bn, { alignItems: "baseline", children: [
|
|
3974
3974
|
/* @__PURE__ */ n(
|
|
3975
3975
|
_n,
|
|
3976
3976
|
{
|
|
@@ -3979,7 +3979,7 @@ function Ma({
|
|
|
3979
3979
|
),
|
|
3980
3980
|
/* @__PURE__ */ n(De, { color: "inherit", variant: "caption", children: d }),
|
|
3981
3981
|
/* @__PURE__ */ n(S, { style: { flexGrow: 1 } }),
|
|
3982
|
-
/* @__PURE__ */ n(ya, { backgroundColor: c, children: /* @__PURE__ */
|
|
3982
|
+
/* @__PURE__ */ n(ya, { backgroundColor: c, children: /* @__PURE__ */ v(De, { color: "inherit", variant: "caption", children: [
|
|
3983
3983
|
u,
|
|
3984
3984
|
r(Math.abs(s))
|
|
3985
3985
|
] }) })
|
|
@@ -4011,9 +4011,9 @@ function Ia({
|
|
|
4011
4011
|
index: g
|
|
4012
4012
|
}
|
|
4013
4013
|
);
|
|
4014
|
-
return /* @__PURE__ */
|
|
4014
|
+
return /* @__PURE__ */ v(fa, { onClick: () => s(e.key), children: [
|
|
4015
4015
|
o ? /* @__PURE__ */ n(ln, { checked: a }) : null,
|
|
4016
|
-
/* @__PURE__ */
|
|
4016
|
+
/* @__PURE__ */ v(ma, { children: [
|
|
4017
4017
|
/* @__PURE__ */ n(De, { variant: "body2", noWrap: !0, children: e.label }),
|
|
4018
4018
|
e.data.map((g, f) => /* @__PURE__ */ n(
|
|
4019
4019
|
pa,
|
|
@@ -4022,7 +4022,7 @@ function Ia({
|
|
|
4022
4022
|
placement: "top-start",
|
|
4023
4023
|
arrow: !1,
|
|
4024
4024
|
disableHoverListener: !p,
|
|
4025
|
-
children: /* @__PURE__ */
|
|
4025
|
+
children: /* @__PURE__ */ v(da, { children: [
|
|
4026
4026
|
/* @__PURE__ */ n(ua, { className: "progressbar", children: /* @__PURE__ */ n(
|
|
4027
4027
|
"div",
|
|
4028
4028
|
{
|
|
@@ -4074,15 +4074,15 @@ function us({
|
|
|
4074
4074
|
formatter: y = Kt,
|
|
4075
4075
|
tooltipFormatter: g = Kt,
|
|
4076
4076
|
tooltip: f = !0,
|
|
4077
|
-
isLoading:
|
|
4077
|
+
isLoading: w = !1
|
|
4078
4078
|
}) {
|
|
4079
|
-
const h = le(), [b, k] = _(!1), [M, C] = _(!1), [x, A] = _(p), [T, O] = _(""), L = se(),
|
|
4079
|
+
const h = le(), [b, k] = _(!1), [M, C] = _(!1), [x, A] = _(p), [T, O] = _(""), L = se(), P = ce(L), $ = F(() => {
|
|
4080
4080
|
const V = r.length ? r : [
|
|
4081
4081
|
h.palette.secondary.main,
|
|
4082
4082
|
h.palette.primary.main,
|
|
4083
4083
|
h.palette.info.main
|
|
4084
4084
|
];
|
|
4085
|
-
return
|
|
4085
|
+
return wa(
|
|
4086
4086
|
t,
|
|
4087
4087
|
V,
|
|
4088
4088
|
i,
|
|
@@ -4092,27 +4092,27 @@ function us({
|
|
|
4092
4092
|
}, [t, r, i, h, p, a]), W = F(() => Math.max(
|
|
4093
4093
|
...t.map((V) => V.map((ee) => ee.value ?? 0)).flat()
|
|
4094
4094
|
), [t]), J = F(() => {
|
|
4095
|
-
if (o >=
|
|
4096
|
-
return
|
|
4097
|
-
const V =
|
|
4095
|
+
if (o >= $.length)
|
|
4096
|
+
return $;
|
|
4097
|
+
const V = $.slice(0, o), ee = $.slice(o), ne = [];
|
|
4098
4098
|
for (const Te of ee)
|
|
4099
4099
|
Te.data.forEach((Re, Ae) => {
|
|
4100
4100
|
ne[Ae] = ne[Ae] ?? 0, ne[Ae] += Re.value;
|
|
4101
4101
|
});
|
|
4102
4102
|
const pe = {
|
|
4103
4103
|
key: Oe,
|
|
4104
|
-
label: s ? "Others" : `Others (${
|
|
4104
|
+
label: s ? "Others" : `Others (${$.length - o})`,
|
|
4105
4105
|
data: ne.map((Te) => ({
|
|
4106
4106
|
value: Te,
|
|
4107
4107
|
color: h.palette.divider
|
|
4108
4108
|
}))
|
|
4109
4109
|
};
|
|
4110
4110
|
return [...V, pe];
|
|
4111
|
-
}, [
|
|
4111
|
+
}, [$, s, o, h.palette.divider]), G = F(() => $.filter((V) => p.includes(V.key)), [$, p]), E = F(() => T ? $.filter((V) => {
|
|
4112
4112
|
const ee = (V.key || "").toLowerCase(), ne = (V.label || "").toLowerCase(), pe = ee == null ? void 0 : ee.includes(T.toLowerCase()), Te = ne == null ? void 0 : ne.includes(T.toLowerCase());
|
|
4113
4113
|
return pe || Te;
|
|
4114
|
-
}) :
|
|
4115
|
-
if (
|
|
4114
|
+
}) : $, [$, T]), N = $.length - J.length + 1, I = s && !b && o < $.length;
|
|
4115
|
+
if ($.length === 0 || w)
|
|
4116
4116
|
return /* @__PURE__ */ n(Mn, {});
|
|
4117
4117
|
const R = b ? E : M ? G : J;
|
|
4118
4118
|
function q() {
|
|
@@ -4137,24 +4137,24 @@ function us({
|
|
|
4137
4137
|
const ee = p.includes(V), ne = new Set(p);
|
|
4138
4138
|
ee ? ne.delete(V) : ne.add(V);
|
|
4139
4139
|
let pe = Array.from(ne);
|
|
4140
|
-
pe.length ===
|
|
4140
|
+
pe.length === $.length && (pe = []), c(pe);
|
|
4141
4141
|
}
|
|
4142
|
-
function
|
|
4142
|
+
function we(V) {
|
|
4143
4143
|
const ee = x.includes(V), ne = new Set(x);
|
|
4144
4144
|
ee ? ne.delete(V) : ne.add(V);
|
|
4145
4145
|
let pe = Array.from(ne);
|
|
4146
|
-
pe.length ===
|
|
4146
|
+
pe.length === $.length && (pe = []), A(pe);
|
|
4147
4147
|
}
|
|
4148
|
-
const
|
|
4149
|
-
return /* @__PURE__ */
|
|
4150
|
-
u ? /* @__PURE__ */
|
|
4151
|
-
/* @__PURE__ */ n(z, { variant: "caption", children: p.length > 0 ?
|
|
4148
|
+
const ve = u ? b ? we : de : void 0;
|
|
4149
|
+
return /* @__PURE__ */ v(la, { children: [
|
|
4150
|
+
u ? /* @__PURE__ */ v(Xt, { center: !0, children: [
|
|
4151
|
+
/* @__PURE__ */ n(z, { variant: "caption", children: p.length > 0 ? P.formatMessage(
|
|
4152
4152
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
4153
4153
|
{ items: p.length }
|
|
4154
|
-
) :
|
|
4155
|
-
/* @__PURE__ */ n(z, { variant: "caption", children: b ? /* @__PURE__ */ n(ye, { onClick: q, children:
|
|
4154
|
+
) : P.formatMessage({ id: "c4r.widgets.category.all" }) }),
|
|
4155
|
+
/* @__PURE__ */ n(z, { variant: "caption", children: b ? /* @__PURE__ */ n(ye, { onClick: q, children: P.formatMessage({ id: "c4r.widgets.category.apply" }) }) : M ? /* @__PURE__ */ n(ye, { onClick: j, children: P.formatMessage({
|
|
4156
4156
|
id: "c4r.widgets.category.unlock"
|
|
4157
|
-
}) }) : p.length ? /* @__PURE__ */
|
|
4157
|
+
}) }) : p.length ? /* @__PURE__ */ v(
|
|
4158
4158
|
S,
|
|
4159
4159
|
{
|
|
4160
4160
|
style: {
|
|
@@ -4163,11 +4163,11 @@ function us({
|
|
|
4163
4163
|
gap: h.spacing(1)
|
|
4164
4164
|
},
|
|
4165
4165
|
children: [
|
|
4166
|
-
/* @__PURE__ */ n(ye, { onClick: te, children:
|
|
4166
|
+
/* @__PURE__ */ n(ye, { onClick: te, children: P.formatMessage({
|
|
4167
4167
|
id: "c4r.widgets.category.lock"
|
|
4168
4168
|
}) }),
|
|
4169
|
-
/* @__PURE__ */ n(
|
|
4170
|
-
/* @__PURE__ */ n(ye, { onClick: X, children:
|
|
4169
|
+
/* @__PURE__ */ n(wt, { orientation: "vertical", flexItem: !0 }),
|
|
4170
|
+
/* @__PURE__ */ n(ye, { onClick: X, children: P.formatMessage({
|
|
4171
4171
|
id: "c4r.widgets.category.clear"
|
|
4172
4172
|
}) })
|
|
4173
4173
|
]
|
|
@@ -4178,22 +4178,22 @@ function us({
|
|
|
4178
4178
|
ga,
|
|
4179
4179
|
{
|
|
4180
4180
|
size: "small",
|
|
4181
|
-
placeholder:
|
|
4181
|
+
placeholder: P.formatMessage({
|
|
4182
4182
|
id: "c4r.widgets.category.search"
|
|
4183
4183
|
}),
|
|
4184
4184
|
onChange: (V) => O(V.currentTarget.value),
|
|
4185
4185
|
onFocus: (V) => V.currentTarget.scrollIntoView(),
|
|
4186
4186
|
InputProps: {
|
|
4187
|
-
startAdornment: /* @__PURE__ */ n(
|
|
4187
|
+
startAdornment: /* @__PURE__ */ n(vt, { position: "start", children: /* @__PURE__ */ n(Qe, {}) })
|
|
4188
4188
|
}
|
|
4189
4189
|
}
|
|
4190
4190
|
) }) : null,
|
|
4191
|
-
/* @__PURE__ */
|
|
4192
|
-
R.length === 0 ? /* @__PURE__ */
|
|
4193
|
-
/* @__PURE__ */ n(z, { variant: "body2", children:
|
|
4191
|
+
/* @__PURE__ */ v(sa, { children: [
|
|
4192
|
+
R.length === 0 ? /* @__PURE__ */ v(ie, { children: [
|
|
4193
|
+
/* @__PURE__ */ n(z, { variant: "body2", children: P.formatMessage({
|
|
4194
4194
|
id: "c4r.widgets.category.noResults"
|
|
4195
4195
|
}) }),
|
|
4196
|
-
/* @__PURE__ */ n(z, { variant: "caption", children:
|
|
4196
|
+
/* @__PURE__ */ n(z, { variant: "caption", children: P.formatMessage(
|
|
4197
4197
|
{ id: "c4r.widgets.category.noResultsMessage" },
|
|
4198
4198
|
{ searchValue: T }
|
|
4199
4199
|
) })
|
|
@@ -4210,26 +4210,26 @@ function us({
|
|
|
4210
4210
|
formatter: y,
|
|
4211
4211
|
tooltipFormatter: g,
|
|
4212
4212
|
tooltip: f,
|
|
4213
|
-
onClick:
|
|
4213
|
+
onClick: ve,
|
|
4214
4214
|
names: e
|
|
4215
4215
|
}
|
|
4216
4216
|
) }, V.key))
|
|
4217
4217
|
] }),
|
|
4218
4218
|
I ? /* @__PURE__ */ n(
|
|
4219
|
-
|
|
4219
|
+
$e,
|
|
4220
4220
|
{
|
|
4221
4221
|
size: "small",
|
|
4222
4222
|
color: "primary",
|
|
4223
4223
|
startIcon: /* @__PURE__ */ n(Qe, {}),
|
|
4224
4224
|
onClick: Y,
|
|
4225
|
-
children:
|
|
4225
|
+
children: P.formatMessage(
|
|
4226
4226
|
{ id: "c4r.widgets.category.searchInfo" },
|
|
4227
4227
|
{ elements: N }
|
|
4228
4228
|
)
|
|
4229
4229
|
}
|
|
4230
4230
|
) : null,
|
|
4231
|
-
b ? /* @__PURE__ */ n(
|
|
4232
|
-
/* @__PURE__ */ n(ca, { children: e.map((V, ee) => /* @__PURE__ */
|
|
4231
|
+
b ? /* @__PURE__ */ n($e, { size: "small", color: "primary", onClick: K, children: P.formatMessage({ id: "c4r.widgets.category.cancel" }) }) : null,
|
|
4232
|
+
/* @__PURE__ */ n(ca, { children: e.map((V, ee) => /* @__PURE__ */ v(Bn, { children: [
|
|
4233
4233
|
/* @__PURE__ */ n(_n, { color: (r == null ? void 0 : r[ee]) ?? h.palette.background.default }),
|
|
4234
4234
|
/* @__PURE__ */ n(z, { variant: "overline", children: V })
|
|
4235
4235
|
] }, e[ee])) })
|
|
@@ -4256,14 +4256,14 @@ const Ea = m("div")(({ theme: e }) => ({
|
|
|
4256
4256
|
})), Da = m(z)(({ theme: e }) => ({
|
|
4257
4257
|
marginLeft: e.spacing(0.5)
|
|
4258
4258
|
}));
|
|
4259
|
-
function
|
|
4259
|
+
function $a({
|
|
4260
4260
|
row: e,
|
|
4261
4261
|
animated: t,
|
|
4262
4262
|
animationOptions: i,
|
|
4263
4263
|
formatter: r
|
|
4264
4264
|
}) {
|
|
4265
4265
|
const o = le(), { prefix: a, value: l, suffix: d, shouldBeHighlighted: s } = e;
|
|
4266
|
-
return /* @__PURE__ */
|
|
4266
|
+
return /* @__PURE__ */ v(Ea, { children: [
|
|
4267
4267
|
a ? /* @__PURE__ */ n(S, { color: o.palette.text.secondary, children: /* @__PURE__ */ n(La, { color: "inherit", component: "span", variant: "subtitle2", children: a }) }) : null,
|
|
4268
4268
|
/* @__PURE__ */ n(S, { fontWeight: s ? "bold" : "", children: /* @__PURE__ */ n(
|
|
4269
4269
|
zn,
|
|
@@ -4277,7 +4277,7 @@ function Pa({
|
|
|
4277
4277
|
d ? /* @__PURE__ */ n(S, { color: o.palette.text.secondary, children: /* @__PURE__ */ n(Da, { color: "inherit", component: "span", variant: "subtitle2", children: d }) }) : null
|
|
4278
4278
|
] });
|
|
4279
4279
|
}
|
|
4280
|
-
const
|
|
4280
|
+
const Pa = (e) => e, Zt = [], Oa = m("div")(({ theme: e }) => ({
|
|
4281
4281
|
"&:nth-of-type(n+2)": {
|
|
4282
4282
|
marginTop: e.spacing(2)
|
|
4283
4283
|
}
|
|
@@ -4287,13 +4287,13 @@ function ps({
|
|
|
4287
4287
|
colors: t = Zt,
|
|
4288
4288
|
animated: i = !0,
|
|
4289
4289
|
animationOptions: r,
|
|
4290
|
-
formatter: o =
|
|
4290
|
+
formatter: o = Pa,
|
|
4291
4291
|
isLoading: a = !1
|
|
4292
4292
|
}) {
|
|
4293
4293
|
const l = Wa(e, t);
|
|
4294
|
-
return a ? /* @__PURE__ */ n(Cn, {}) : /* @__PURE__ */ n("div", { children: l.map((d, s) => /* @__PURE__ */
|
|
4294
|
+
return a ? /* @__PURE__ */ n(Cn, {}) : /* @__PURE__ */ n("div", { children: l.map((d, s) => /* @__PURE__ */ v(Oa, { children: [
|
|
4295
4295
|
/* @__PURE__ */ n(
|
|
4296
|
-
|
|
4296
|
+
$a,
|
|
4297
4297
|
{
|
|
4298
4298
|
row: d,
|
|
4299
4299
|
animated: i,
|
|
@@ -4369,7 +4369,7 @@ function gs({
|
|
|
4369
4369
|
borderWidth: 0,
|
|
4370
4370
|
formatter: k
|
|
4371
4371
|
}, x = {
|
|
4372
|
-
data: b ? g.map((L,
|
|
4372
|
+
data: b ? g.map((L, P) => e[P]) : (g[0] ?? []).map((L) => L.name),
|
|
4373
4373
|
selectedMode: !1,
|
|
4374
4374
|
type: "scroll",
|
|
4375
4375
|
left: B,
|
|
@@ -4404,7 +4404,7 @@ function gs({
|
|
|
4404
4404
|
color: c.palette.text.primary
|
|
4405
4405
|
}
|
|
4406
4406
|
}, A = {
|
|
4407
|
-
formatter: ({ name: L, percent:
|
|
4407
|
+
formatter: ({ name: L, percent: P }) => `{per|${l(P)}%}
|
|
4408
4408
|
{b|${L}}`,
|
|
4409
4409
|
position: "center",
|
|
4410
4410
|
rich: {
|
|
@@ -4423,17 +4423,17 @@ function gs({
|
|
|
4423
4423
|
color: c.palette.text.primary
|
|
4424
4424
|
}
|
|
4425
4425
|
}
|
|
4426
|
-
}, T = g.map((L,
|
|
4427
|
-
var
|
|
4426
|
+
}, T = g.map((L, P) => {
|
|
4427
|
+
var $;
|
|
4428
4428
|
return {
|
|
4429
4429
|
type: "pie",
|
|
4430
|
-
name: e[
|
|
4430
|
+
name: e[P],
|
|
4431
4431
|
itemStyle: {
|
|
4432
|
-
color: (
|
|
4432
|
+
color: ($ = L[0]) == null ? void 0 : $.color
|
|
4433
4433
|
},
|
|
4434
4434
|
animation: a,
|
|
4435
4435
|
data: L.map((W) => ({ ...W, itemStyle: { color: W.color } })),
|
|
4436
|
-
radius:
|
|
4436
|
+
radius: P === 0 ? ["75%", "90%"] : ["56%", "72%"],
|
|
4437
4437
|
selectedOffset: 0,
|
|
4438
4438
|
hoverOffset: 5,
|
|
4439
4439
|
bottom: B * 2.5,
|
|
@@ -4454,7 +4454,7 @@ function gs({
|
|
|
4454
4454
|
right: 0,
|
|
4455
4455
|
bottom: 0
|
|
4456
4456
|
}, tooltip: M, legend: x, series: T };
|
|
4457
|
-
}, [c, e, a, g, l, d]),
|
|
4457
|
+
}, [c, e, a, g, l, d]), w = {
|
|
4458
4458
|
mouseover: (b, k) => {
|
|
4459
4459
|
g.length === 1 && (b.seriesIndex !== 0 || b.dataIndex !== 0) && k.dispatchAction({
|
|
4460
4460
|
type: "downplay",
|
|
@@ -4493,7 +4493,7 @@ function gs({
|
|
|
4493
4493
|
onChartReady: h,
|
|
4494
4494
|
notMerge: !0,
|
|
4495
4495
|
option: f,
|
|
4496
|
-
onEvents:
|
|
4496
|
+
onEvents: w,
|
|
4497
4497
|
style: { maxHeight: o, width: "100%" }
|
|
4498
4498
|
}
|
|
4499
4499
|
) : null;
|
|
@@ -4549,14 +4549,14 @@ const ja = m(fe, {
|
|
|
4549
4549
|
width: t.spacing(3),
|
|
4550
4550
|
transform: `rotate(${e ? "180" : "0"}deg)`,
|
|
4551
4551
|
backgroundColor: e ? t.palette.action.hover : void 0
|
|
4552
|
-
})), Ya = m(
|
|
4552
|
+
})), Ya = m(Pe, {
|
|
4553
4553
|
shouldForwardProp: (e) => e !== "disabled"
|
|
4554
4554
|
})(({ disabled: e, theme: t }) => ({
|
|
4555
4555
|
...e && {
|
|
4556
4556
|
pointerEvents: "none",
|
|
4557
4557
|
color: t.palette.text.disabled
|
|
4558
4558
|
}
|
|
4559
|
-
})), Va = m(
|
|
4559
|
+
})), Va = m(Pe)(() => ({
|
|
4560
4560
|
"&.Mui-disabled": {
|
|
4561
4561
|
opacity: 1
|
|
4562
4562
|
}
|
|
@@ -4573,7 +4573,7 @@ function Ua({
|
|
|
4573
4573
|
menuHeaderText: d = "",
|
|
4574
4574
|
editDisabled: s
|
|
4575
4575
|
}) {
|
|
4576
|
-
const u = le(), [p, c] = _(null), y = !!p, g = (M) => c(M.currentTarget), f = () => c(null),
|
|
4576
|
+
const u = le(), [p, c] = _(null), y = !!p, g = (M) => c(M.currentTarget), f = () => c(null), w = (M) => {
|
|
4577
4577
|
r && r(M), f();
|
|
4578
4578
|
}, h = !!e.length && !!t.length, b = (M) => t.some((C) => C.id === M.id);
|
|
4579
4579
|
function k(M) {
|
|
@@ -4581,9 +4581,9 @@ function Ua({
|
|
|
4581
4581
|
Ya,
|
|
4582
4582
|
{
|
|
4583
4583
|
selected: o && i === M.id,
|
|
4584
|
-
onClick: () =>
|
|
4584
|
+
onClick: () => w(M.id),
|
|
4585
4585
|
disabled: s && b(M),
|
|
4586
|
-
children: /* @__PURE__ */
|
|
4586
|
+
children: /* @__PURE__ */ v(S, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [
|
|
4587
4587
|
M.icon,
|
|
4588
4588
|
/* @__PURE__ */ n(S, { ml: 2, children: /* @__PURE__ */ n(z, { variant: "body2", color: "inherit", children: gn(M.label) }) })
|
|
4589
4589
|
] })
|
|
@@ -4591,7 +4591,7 @@ function Ua({
|
|
|
4591
4591
|
M.id
|
|
4592
4592
|
);
|
|
4593
4593
|
}
|
|
4594
|
-
return /* @__PURE__ */
|
|
4594
|
+
return /* @__PURE__ */ v(ie, { children: [
|
|
4595
4595
|
/* @__PURE__ */ n(ue, { title: l, placement: a, children: /* @__PURE__ */ n(
|
|
4596
4596
|
ja,
|
|
4597
4597
|
{
|
|
@@ -4604,7 +4604,7 @@ function Ua({
|
|
|
4604
4604
|
children: /* @__PURE__ */ n(Mi, {})
|
|
4605
4605
|
}
|
|
4606
4606
|
) }),
|
|
4607
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ v(
|
|
4608
4608
|
kt,
|
|
4609
4609
|
{
|
|
4610
4610
|
id: "feature-selection-menu",
|
|
@@ -4616,7 +4616,7 @@ function Ua({
|
|
|
4616
4616
|
children: [
|
|
4617
4617
|
d && /* @__PURE__ */ n(Va, { disabled: !0, children: /* @__PURE__ */ n(z, { variant: "caption", color: "textSecondary", children: d }) }),
|
|
4618
4618
|
!!e.length && e.map(k),
|
|
4619
|
-
h && /* @__PURE__ */ n(
|
|
4619
|
+
h && /* @__PURE__ */ n(wt, { sx: { margin: ({ spacing: M }) => M(1, 0) } }),
|
|
4620
4620
|
!!t.length && t.map(k)
|
|
4621
4621
|
]
|
|
4622
4622
|
}
|
|
@@ -4657,13 +4657,13 @@ function Ka({
|
|
|
4657
4657
|
id: "c4r.widgets.featureSelection.polygon"
|
|
4658
4658
|
}) : f;
|
|
4659
4659
|
}
|
|
4660
|
-
function c(f,
|
|
4660
|
+
function c(f, w) {
|
|
4661
4661
|
var b;
|
|
4662
4662
|
const h = p(f.geometry.type);
|
|
4663
|
-
return d || ((b = f.properties) == null ? void 0 : b.name) || `${h} ${
|
|
4663
|
+
return d || ((b = f.properties) == null ? void 0 : b.name) || `${h} ${w + 1}`;
|
|
4664
4664
|
}
|
|
4665
4665
|
const [y, g] = _(!1);
|
|
4666
|
-
return /* @__PURE__ */ n(S, { sx: { overflowX: "auto" }, children: /* @__PURE__ */ n(qa, { sx: { gap: a === "small" ? 0.5 : 1 }, children: e.map((f,
|
|
4666
|
+
return /* @__PURE__ */ n(S, { sx: { overflowX: "auto" }, children: /* @__PURE__ */ n(qa, { sx: { gap: a === "small" ? 0.5 : 1 }, children: e.map((f, w) => {
|
|
4667
4667
|
var C, x;
|
|
4668
4668
|
const h = (C = f.properties) == null ? void 0 : C.disabled, b = (x = f.properties) == null ? void 0 : x.invalid;
|
|
4669
4669
|
let k = r;
|
|
@@ -4683,7 +4683,7 @@ function Ka({
|
|
|
4683
4683
|
ci,
|
|
4684
4684
|
{
|
|
4685
4685
|
size: a,
|
|
4686
|
-
label: c(f,
|
|
4686
|
+
label: c(f, w),
|
|
4687
4687
|
color: M,
|
|
4688
4688
|
onClick: () => t(f),
|
|
4689
4689
|
onDelete: i ? () => i(f) : void 0,
|
|
@@ -4698,7 +4698,7 @@ function Ka({
|
|
|
4698
4698
|
}
|
|
4699
4699
|
)
|
|
4700
4700
|
}
|
|
4701
|
-
) },
|
|
4701
|
+
) }, w);
|
|
4702
4702
|
}) }) });
|
|
4703
4703
|
}
|
|
4704
4704
|
const Za = m(hn)(({ theme: e }) => ({
|
|
@@ -4727,7 +4727,7 @@ function hs({
|
|
|
4727
4727
|
label: g.formatMessage({
|
|
4728
4728
|
id: `c4r.widgets.featureSelection.${Jt(C.id)}`
|
|
4729
4729
|
})
|
|
4730
|
-
})), [e, g]),
|
|
4730
|
+
})), [e, g]), w = F(() => t.map((C) => ({
|
|
4731
4731
|
...C,
|
|
4732
4732
|
label: g.formatMessage({
|
|
4733
4733
|
id: `c4r.widgets.featureSelection.${Jt(C.id)}`
|
|
@@ -4738,7 +4738,7 @@ function hs({
|
|
|
4738
4738
|
...A,
|
|
4739
4739
|
isEdit: !1
|
|
4740
4740
|
})),
|
|
4741
|
-
...
|
|
4741
|
+
...w.map((A) => ({
|
|
4742
4742
|
...A,
|
|
4743
4743
|
isEdit: !0
|
|
4744
4744
|
}))
|
|
@@ -4746,7 +4746,7 @@ function hs({
|
|
|
4746
4746
|
if (!x)
|
|
4747
4747
|
throw new Error(`Selected mode "${i}" not supported`);
|
|
4748
4748
|
return x;
|
|
4749
|
-
}, [
|
|
4749
|
+
}, [w, f, i]), b = gn((h == null ? void 0 : h.label) || ""), k = h != null && h.isEdit ? b : g.formatMessage(
|
|
4750
4750
|
{
|
|
4751
4751
|
id: "c4r.widgets.featureSelection.selectTool"
|
|
4752
4752
|
},
|
|
@@ -4756,7 +4756,7 @@ function hs({
|
|
|
4756
4756
|
}) : g.formatMessage({
|
|
4757
4757
|
id: "c4r.widgets.featureSelection.clickToCreate"
|
|
4758
4758
|
});
|
|
4759
|
-
return /* @__PURE__ */
|
|
4759
|
+
return /* @__PURE__ */ v(Za, { children: [
|
|
4760
4760
|
/* @__PURE__ */ n(
|
|
4761
4761
|
Ha,
|
|
4762
4762
|
{
|
|
@@ -4772,7 +4772,7 @@ function hs({
|
|
|
4772
4772
|
Ua,
|
|
4773
4773
|
{
|
|
4774
4774
|
selectionModes: f,
|
|
4775
|
-
editModes:
|
|
4775
|
+
editModes: w,
|
|
4776
4776
|
selectedMode: i,
|
|
4777
4777
|
onSelectMode: r,
|
|
4778
4778
|
enabled: o,
|
|
@@ -4902,7 +4902,7 @@ function cl({
|
|
|
4902
4902
|
const u = parseInt(s.target.value || "0"), p = Math.min(Math.max(u, 0), 100);
|
|
4903
4903
|
o(p / 100);
|
|
4904
4904
|
}
|
|
4905
|
-
return /* @__PURE__ */
|
|
4905
|
+
return /* @__PURE__ */ v(ie, { children: [
|
|
4906
4906
|
/* @__PURE__ */ n(
|
|
4907
4907
|
ue,
|
|
4908
4908
|
{
|
|
@@ -4937,7 +4937,7 @@ function cl({
|
|
|
4937
4937
|
sx: { transform: "translate(-12px, 36px)" }
|
|
4938
4938
|
}
|
|
4939
4939
|
},
|
|
4940
|
-
children: /* @__PURE__ */
|
|
4940
|
+
children: /* @__PURE__ */ v(nl, { children: [
|
|
4941
4941
|
/* @__PURE__ */ n(
|
|
4942
4942
|
xt,
|
|
4943
4943
|
{
|
|
@@ -4963,7 +4963,7 @@ function cl({
|
|
|
4963
4963
|
"data-testid": "opacity-slider"
|
|
4964
4964
|
},
|
|
4965
4965
|
InputProps: {
|
|
4966
|
-
endAdornment: /* @__PURE__ */
|
|
4966
|
+
endAdornment: /* @__PURE__ */ v(vt, { position: "end", sx: { margin: 0 }, children: [
|
|
4967
4967
|
" ",
|
|
4968
4968
|
"%"
|
|
4969
4969
|
] })
|
|
@@ -4977,31 +4977,30 @@ function cl({
|
|
|
4977
4977
|
}
|
|
4978
4978
|
function Lt({
|
|
4979
4979
|
title: e,
|
|
4980
|
-
visible: t
|
|
4981
|
-
typographyProps: i
|
|
4980
|
+
visible: t
|
|
4982
4981
|
}) {
|
|
4983
|
-
const
|
|
4982
|
+
const i = re(null), [r, o] = _(!1);
|
|
4984
4983
|
an(() => {
|
|
4985
|
-
if (t &&
|
|
4986
|
-
const { offsetWidth:
|
|
4987
|
-
|
|
4984
|
+
if (t && i.current) {
|
|
4985
|
+
const { offsetWidth: l, scrollWidth: d } = i.current;
|
|
4986
|
+
o(l < d);
|
|
4988
4987
|
}
|
|
4989
4988
|
}, [e, t]);
|
|
4990
|
-
const
|
|
4989
|
+
const a = /* @__PURE__ */ n(
|
|
4991
4990
|
z,
|
|
4992
4991
|
{
|
|
4993
|
-
ref:
|
|
4992
|
+
ref: i,
|
|
4994
4993
|
color: t ? "textPrimary" : "textSecondary",
|
|
4995
|
-
variant: "
|
|
4996
|
-
weight: "
|
|
4994
|
+
variant: "caption",
|
|
4995
|
+
weight: "regular",
|
|
4997
4996
|
component: "p",
|
|
4998
4997
|
noWrap: !0,
|
|
4999
4998
|
my: 0.25,
|
|
5000
|
-
|
|
4999
|
+
textTransform: "none",
|
|
5001
5000
|
children: e
|
|
5002
5001
|
}
|
|
5003
5002
|
);
|
|
5004
|
-
return
|
|
5003
|
+
return r ? /* @__PURE__ */ n(ue, { title: e, children: a }) : a;
|
|
5005
5004
|
}
|
|
5006
5005
|
var Ie = /* @__PURE__ */ ((e) => (e.CATEGORY = "category", e.ICON = "icon", e.CONTINUOUS_RAMP = "continuous_ramp", e.BINS = "bins", e.PROPORTION = "proportion", e))(Ie || {});
|
|
5007
5006
|
const ut = 20;
|
|
@@ -5014,8 +5013,8 @@ function dl({
|
|
|
5014
5013
|
isStrokeColor: r = !1,
|
|
5015
5014
|
customMarkers: o,
|
|
5016
5015
|
maskedMarkers: a = !0
|
|
5017
|
-
} = e, l =
|
|
5018
|
-
return /* @__PURE__ */
|
|
5016
|
+
} = e, l = wn(i, t.length), d = t.length > ut, s = se(), u = ce(s);
|
|
5017
|
+
return /* @__PURE__ */ v(ie, { children: [
|
|
5019
5018
|
/* @__PURE__ */ n(jn, { "data-testid": "categories-legend", children: t.slice(0, ut).map((p, c) => /* @__PURE__ */ n(
|
|
5020
5019
|
hl,
|
|
5021
5020
|
{
|
|
@@ -5102,7 +5101,7 @@ function hl({
|
|
|
5102
5101
|
icon: r,
|
|
5103
5102
|
maskedIcon: o
|
|
5104
5103
|
}) {
|
|
5105
|
-
return /* @__PURE__ */
|
|
5104
|
+
return /* @__PURE__ */ v(S, { component: "li", sx: { display: "flex", alignItems: "center" }, children: [
|
|
5106
5105
|
/* @__PURE__ */ n(
|
|
5107
5106
|
gl,
|
|
5108
5107
|
{
|
|
@@ -5115,14 +5114,7 @@ function hl({
|
|
|
5115
5114
|
color: i
|
|
5116
5115
|
}
|
|
5117
5116
|
),
|
|
5118
|
-
/* @__PURE__ */ n(
|
|
5119
|
-
Lt,
|
|
5120
|
-
{
|
|
5121
|
-
title: e,
|
|
5122
|
-
visible: !0,
|
|
5123
|
-
typographyProps: { variant: "overline", my: 0.75 }
|
|
5124
|
-
}
|
|
5125
|
-
)
|
|
5117
|
+
/* @__PURE__ */ n(Lt, { title: e, visible: !0 })
|
|
5126
5118
|
] });
|
|
5127
5119
|
}
|
|
5128
5120
|
const Ze = 6, rt = {
|
|
@@ -5157,7 +5149,7 @@ const Ze = 6, rt = {
|
|
|
5157
5149
|
alignItems: "stretch",
|
|
5158
5150
|
justifyContent: "stretch",
|
|
5159
5151
|
padding: e(2, 0)
|
|
5160
|
-
})),
|
|
5152
|
+
})), wl = m(S)(() => ({
|
|
5161
5153
|
display: "flex",
|
|
5162
5154
|
flexDirection: "column",
|
|
5163
5155
|
justifyContent: "space-around",
|
|
@@ -5165,11 +5157,11 @@ const Ze = 6, rt = {
|
|
|
5165
5157
|
flexGrow: 1,
|
|
5166
5158
|
flexShrink: 1
|
|
5167
5159
|
}));
|
|
5168
|
-
function
|
|
5160
|
+
function vl({
|
|
5169
5161
|
legend: e
|
|
5170
5162
|
}) {
|
|
5171
5163
|
const t = se(), i = ce(t), r = e.showMinMax ?? !0, { min: o, max: a, error: l } = xl(e), [d, s] = l ? [0, 0] : bl(o, a);
|
|
5172
|
-
return /* @__PURE__ */
|
|
5164
|
+
return /* @__PURE__ */ v(yl, { "data-testid": "proportion-legend", children: [
|
|
5173
5165
|
/* @__PURE__ */ n(ml, { children: [...Array(4)].map((u, p) => /* @__PURE__ */ n(
|
|
5174
5166
|
fl,
|
|
5175
5167
|
{
|
|
@@ -5178,8 +5170,8 @@ function wl({
|
|
|
5178
5170
|
},
|
|
5179
5171
|
p
|
|
5180
5172
|
)) }),
|
|
5181
|
-
/* @__PURE__ */ n(
|
|
5182
|
-
/* @__PURE__ */
|
|
5173
|
+
/* @__PURE__ */ n(wl, { children: l ? /* @__PURE__ */ n(S, { maxWidth: 240, children: /* @__PURE__ */ n(z, { variant: "overline", children: "You need to specify valid numbers for the labels property" }) }) : /* @__PURE__ */ v(ie, { children: [
|
|
5174
|
+
/* @__PURE__ */ v(z, { variant: "overline", color: "textSecondary", children: [
|
|
5183
5175
|
r && i.formatMessage({ id: "c4r.widgets.legend.max" }) + ": ",
|
|
5184
5176
|
t.formatNumber(a, {
|
|
5185
5177
|
maximumSignificantDigits: Ze
|
|
@@ -5191,7 +5183,7 @@ function wl({
|
|
|
5191
5183
|
/* @__PURE__ */ n(z, { variant: "overline", color: "textSecondary", children: t.formatNumber(d, {
|
|
5192
5184
|
maximumSignificantDigits: Ze
|
|
5193
5185
|
}) }),
|
|
5194
|
-
/* @__PURE__ */
|
|
5186
|
+
/* @__PURE__ */ v(z, { variant: "overline", color: "textSecondary", children: [
|
|
5195
5187
|
r && i.formatMessage({ id: "c4r.widgets.legend.min" }) + ": ",
|
|
5196
5188
|
t.formatNumber(o, {
|
|
5197
5189
|
maximumSignificantDigits: Ze
|
|
@@ -5217,7 +5209,7 @@ function kl({
|
|
|
5217
5209
|
legend: e
|
|
5218
5210
|
}) {
|
|
5219
5211
|
const { labels: t = [], icons: i = [] } = e;
|
|
5220
|
-
return /* @__PURE__ */ n(jn, { "data-testid": "icon-legend", children: t.map((r, o) => /* @__PURE__ */
|
|
5212
|
+
return /* @__PURE__ */ n(jn, { "data-testid": "icon-legend", children: t.map((r, o) => /* @__PURE__ */ v(ol, { children: [
|
|
5221
5213
|
/* @__PURE__ */ n(al, { children: /* @__PURE__ */ n(
|
|
5222
5214
|
"img",
|
|
5223
5215
|
{
|
|
@@ -5227,14 +5219,7 @@ function kl({
|
|
|
5227
5219
|
height: pt
|
|
5228
5220
|
}
|
|
5229
5221
|
) }),
|
|
5230
|
-
/* @__PURE__ */ n(
|
|
5231
|
-
Lt,
|
|
5232
|
-
{
|
|
5233
|
-
visible: !0,
|
|
5234
|
-
title: r,
|
|
5235
|
-
typographyProps: { variant: "overline", my: 0.75 }
|
|
5236
|
-
}
|
|
5237
|
-
)
|
|
5222
|
+
/* @__PURE__ */ n(Lt, { visible: !0, title: r })
|
|
5238
5223
|
] }, r)) });
|
|
5239
5224
|
}
|
|
5240
5225
|
function Sl(e) {
|
|
@@ -5244,12 +5229,12 @@ function en({
|
|
|
5244
5229
|
isContinuous: e = !1,
|
|
5245
5230
|
legend: t
|
|
5246
5231
|
}) {
|
|
5247
|
-
const { labels: i = [], colors: r = [], showMinMax: o = !0 } = t, a =
|
|
5232
|
+
const { labels: i = [], colors: r = [], showMinMax: o = !0 } = t, a = wn(
|
|
5248
5233
|
r,
|
|
5249
5234
|
!i.length || e ? 2 : i.length + 1
|
|
5250
5235
|
), l = Sl(i), d = l ? i.map(({ value: f }) => f) : i, s = l ? i.map(({ label: f }) => f) : i, [u, p] = Yn({ labels: d }), c = Number.isNaN(u) || Number.isNaN(p);
|
|
5251
5236
|
let y = s[s.length - 1], g = s[0];
|
|
5252
|
-
return !e && o && (g = "< " + g, y = "≥ " + y), /* @__PURE__ */ n(S, { py: 2, "data-testid": "ramp-legend", children: c ? /* @__PURE__ */ n(S, { maxWidth: 240, children: /* @__PURE__ */ n(z, { variant: "overline", children: "You need to specify valid numbers for the labels property" }) }) : /* @__PURE__ */
|
|
5237
|
+
return !e && o && (g = "< " + g, y = "≥ " + y), /* @__PURE__ */ n(S, { py: 2, "data-testid": "ramp-legend", children: c ? /* @__PURE__ */ n(S, { maxWidth: 240, children: /* @__PURE__ */ n(z, { variant: "overline", children: "You need to specify valid numbers for the labels property" }) }) : /* @__PURE__ */ v(ie, { children: [
|
|
5253
5238
|
/* @__PURE__ */ n(S, { display: "flex", pb: 1, children: e ? /* @__PURE__ */ n(
|
|
5254
5239
|
Ml,
|
|
5255
5240
|
{
|
|
@@ -5265,7 +5250,7 @@ function en({
|
|
|
5265
5250
|
min: g
|
|
5266
5251
|
}
|
|
5267
5252
|
) }),
|
|
5268
|
-
/* @__PURE__ */
|
|
5253
|
+
/* @__PURE__ */ v(S, { display: "flex", justifyContent: "space-between", children: [
|
|
5269
5254
|
/* @__PURE__ */ n(z, { variant: "overlineDelicate", color: "textSecondary", children: g }),
|
|
5270
5255
|
/* @__PURE__ */ n(z, { variant: "overlineDelicate", color: "textSecondary", children: y })
|
|
5271
5256
|
] })
|
|
@@ -5307,14 +5292,14 @@ function Cl({
|
|
|
5307
5292
|
}
|
|
5308
5293
|
const Tl = {
|
|
5309
5294
|
[Ie.CATEGORY]: dl,
|
|
5310
|
-
[Ie.PROPORTION]:
|
|
5295
|
+
[Ie.PROPORTION]: vl,
|
|
5311
5296
|
[Ie.ICON]: kl,
|
|
5312
5297
|
[Ie.BINS]: (e) => /* @__PURE__ */ n(en, { ...e, isContinuous: !1 }),
|
|
5313
5298
|
[Ie.CONTINUOUS_RAMP]: (e) => /* @__PURE__ */ n(en, { ...e, isContinuous: !0 })
|
|
5314
5299
|
};
|
|
5315
5300
|
function Al({ legend: e }) {
|
|
5316
5301
|
const t = se(), i = ce(t);
|
|
5317
|
-
return e.select || !e.type ? null : /* @__PURE__ */
|
|
5302
|
+
return e.select || !e.type ? null : /* @__PURE__ */ v(z, { variant: "body2", color: "textSecondary", component: "p", children: [
|
|
5318
5303
|
e.type,
|
|
5319
5304
|
" ",
|
|
5320
5305
|
i.formatMessage({ id: "c4r.widgets.legend.notSupported" }),
|
|
@@ -5332,8 +5317,8 @@ function Ll({
|
|
|
5332
5317
|
}) {
|
|
5333
5318
|
var p;
|
|
5334
5319
|
const o = se(), a = ce(o), l = t.type, s = Tl[l] ?? i[l] ?? Al, u = ((p = t.select) == null ? void 0 : p.options) ?? [];
|
|
5335
|
-
return /* @__PURE__ */
|
|
5336
|
-
t.attr ? /* @__PURE__ */
|
|
5320
|
+
return /* @__PURE__ */ v(S, { component: "li", "data-testid": "legend-layer-variable", px: 2, children: [
|
|
5321
|
+
t.attr ? /* @__PURE__ */ v(S, { pb: 1, children: [
|
|
5337
5322
|
/* @__PURE__ */ n(
|
|
5338
5323
|
z,
|
|
5339
5324
|
{
|
|
@@ -5346,7 +5331,7 @@ function Ll({
|
|
|
5346
5331
|
),
|
|
5347
5332
|
/* @__PURE__ */ n(z, { variant: "caption", component: "p", children: t.attr })
|
|
5348
5333
|
] }) : null,
|
|
5349
|
-
t.select ? /* @__PURE__ */
|
|
5334
|
+
t.select ? /* @__PURE__ */ v(S, { pb: 1, children: [
|
|
5350
5335
|
/* @__PURE__ */ n(z, { variant: "caption", weight: "medium", component: "p", children: t.select.label }),
|
|
5351
5336
|
/* @__PURE__ */ n(
|
|
5352
5337
|
pi,
|
|
@@ -5368,7 +5353,7 @@ function Ll({
|
|
|
5368
5353
|
}
|
|
5369
5354
|
}
|
|
5370
5355
|
},
|
|
5371
|
-
children: u.map((c) => /* @__PURE__ */ n(
|
|
5356
|
+
children: u.map((c) => /* @__PURE__ */ n(Pe, { value: c.value, children: /* @__PURE__ */ n(gi, { primary: c.label }) }, c.value))
|
|
5372
5357
|
}
|
|
5373
5358
|
)
|
|
5374
5359
|
] }) : null,
|
|
@@ -5390,15 +5375,15 @@ function tn({
|
|
|
5390
5375
|
minZoom: d = 0,
|
|
5391
5376
|
currentZoom: s = 0
|
|
5392
5377
|
}) {
|
|
5393
|
-
const u = se(), p = ce(u), c = re(null), [y, g] = _(!1), f = t.id,
|
|
5378
|
+
const u = se(), p = ce(u), c = re(null), [y, g] = _(!1), f = t.id, w = t.title, h = t.visible ?? !0, b = t.switchable ?? !0, k = t.collapsed ?? !1, M = (t.collapsible ?? !0) && !Vn(t.legend), C = t.opacity ?? 1, x = t.showOpacityControl ?? !0, A = h && !k, T = A ? /* @__PURE__ */ n(fn, {}) : /* @__PURE__ */ n(mn, {}), O = (t == null ? void 0 : t.minZoom) !== void 0 || (t == null ? void 0 : t.maxZoom) !== void 0, L = t.minZoom ?? d, P = t.maxZoom ?? l, $ = O && (L > d || P < l), W = s < L || s > P, J = $l({
|
|
5394
5379
|
intl: p,
|
|
5395
5380
|
minZoom: d,
|
|
5396
5381
|
maxZoom: l,
|
|
5397
5382
|
layerMinZoom: L,
|
|
5398
|
-
layerMaxZoom:
|
|
5399
|
-
}), G = t.helperText ?? (
|
|
5400
|
-
return t.legend ? /* @__PURE__ */
|
|
5401
|
-
/* @__PURE__ */
|
|
5383
|
+
layerMaxZoom: P
|
|
5384
|
+
}), G = t.helperText ?? ($ ? J : ""), E = F(() => t.legend ? Array.isArray(t.legend) ? t.legend : [t.legend] : [], [t.legend]);
|
|
5385
|
+
return t.legend ? /* @__PURE__ */ v(ll, { "data-testid": "legend-layer", "aria-label": w, children: [
|
|
5386
|
+
/* @__PURE__ */ v(tl, { ref: c, children: [
|
|
5402
5387
|
M && /* @__PURE__ */ n(
|
|
5403
5388
|
fe,
|
|
5404
5389
|
{
|
|
@@ -5411,15 +5396,15 @@ function tn({
|
|
|
5411
5396
|
children: T
|
|
5412
5397
|
}
|
|
5413
5398
|
),
|
|
5414
|
-
/* @__PURE__ */
|
|
5415
|
-
/* @__PURE__ */ n(Lt, { visible: h, title:
|
|
5416
|
-
|
|
5399
|
+
/* @__PURE__ */ v(sl, { children: [
|
|
5400
|
+
/* @__PURE__ */ n(Lt, { visible: h, title: w ?? "" }),
|
|
5401
|
+
$ && /* @__PURE__ */ n(
|
|
5417
5402
|
ue,
|
|
5418
5403
|
{
|
|
5419
5404
|
title: p.formatMessage({
|
|
5420
5405
|
id: "c4r.widgets.legend.zoomLevelTooltip"
|
|
5421
5406
|
}),
|
|
5422
|
-
children: /* @__PURE__ */
|
|
5407
|
+
children: /* @__PURE__ */ v(
|
|
5423
5408
|
z,
|
|
5424
5409
|
{
|
|
5425
5410
|
color: h ? "textPrimary" : "textSecondary",
|
|
@@ -5470,7 +5455,7 @@ function tn({
|
|
|
5470
5455
|
}
|
|
5471
5456
|
)
|
|
5472
5457
|
] }),
|
|
5473
|
-
/* @__PURE__ */
|
|
5458
|
+
/* @__PURE__ */ v(St, { unmountOnExit: !0, timeout: 100, in: A, children: [
|
|
5474
5459
|
/* @__PURE__ */ n(
|
|
5475
5460
|
rl,
|
|
5476
5461
|
{
|
|
@@ -5501,7 +5486,7 @@ function tn({
|
|
|
5501
5486
|
] })
|
|
5502
5487
|
] }) : null;
|
|
5503
5488
|
}
|
|
5504
|
-
function
|
|
5489
|
+
function $l({
|
|
5505
5490
|
intl: e,
|
|
5506
5491
|
minZoom: t,
|
|
5507
5492
|
maxZoom: i,
|
|
@@ -5513,10 +5498,10 @@ function Pl({
|
|
|
5513
5498
|
}), s = e.formatMessage({ id: "c4r.widgets.legend.zoomNote" }), u = o < i ? `${l} ${o}` : "", p = r > t ? `${d} ${r}` : "", c = [u, p].filter(Boolean).join(` ${a} `);
|
|
5514
5499
|
return c ? `${s} ${c}` : "";
|
|
5515
5500
|
}
|
|
5516
|
-
const
|
|
5501
|
+
const Pl = {}, He = () => {
|
|
5517
5502
|
}, Ol = [];
|
|
5518
5503
|
function fs({
|
|
5519
|
-
customLegendTypes: e =
|
|
5504
|
+
customLegendTypes: e = Pl,
|
|
5520
5505
|
layers: t = Ol,
|
|
5521
5506
|
collapsed: i = !1,
|
|
5522
5507
|
onChangeCollapsed: r = He,
|
|
@@ -5531,25 +5516,25 @@ function fs({
|
|
|
5531
5516
|
isMobile: y,
|
|
5532
5517
|
sx: g
|
|
5533
5518
|
}) {
|
|
5534
|
-
const f = se(),
|
|
5519
|
+
const f = se(), w = ce(f), h = /* @__PURE__ */ v(el, { collapsed: i, children: [
|
|
5535
5520
|
/* @__PURE__ */ n(z, { variant: "caption", flexGrow: 1, children: s }),
|
|
5536
5521
|
/* @__PURE__ */ n(
|
|
5537
5522
|
ue,
|
|
5538
5523
|
{
|
|
5539
|
-
title:
|
|
5524
|
+
title: w.formatMessage({ id: "c4r.widgets.legend.close" }),
|
|
5540
5525
|
children: /* @__PURE__ */ n(fe, { size: "small", onClick: () => r(!0), children: /* @__PURE__ */ n(Ei, {}) })
|
|
5541
5526
|
}
|
|
5542
5527
|
)
|
|
5543
5528
|
] }), b = /* @__PURE__ */ n(
|
|
5544
5529
|
ue,
|
|
5545
5530
|
{
|
|
5546
|
-
title:
|
|
5531
|
+
title: w.formatMessage({ id: "c4r.widgets.legend.open" }),
|
|
5547
5532
|
children: /* @__PURE__ */ n(fe, { "aria-label": s, onClick: () => r(!1), children: /* @__PURE__ */ n(Li, {}) })
|
|
5548
5533
|
}
|
|
5549
5534
|
);
|
|
5550
|
-
return /* @__PURE__ */ n(Qa, { sx: g, elevation: 3, collapsed: i || !!y, children: y ? /* @__PURE__ */
|
|
5535
|
+
return /* @__PURE__ */ n(Qa, { sx: g, elevation: 3, collapsed: i || !!y, children: y ? /* @__PURE__ */ v(ie, { children: [
|
|
5551
5536
|
b,
|
|
5552
|
-
/* @__PURE__ */
|
|
5537
|
+
/* @__PURE__ */ v(
|
|
5553
5538
|
hi,
|
|
5554
5539
|
{
|
|
5555
5540
|
anchor: "bottom",
|
|
@@ -5575,7 +5560,7 @@ function fs({
|
|
|
5575
5560
|
]
|
|
5576
5561
|
}
|
|
5577
5562
|
)
|
|
5578
|
-
] }) : /* @__PURE__ */
|
|
5563
|
+
] }) : /* @__PURE__ */ v(ie, { children: [
|
|
5579
5564
|
i ? b : h,
|
|
5580
5565
|
/* @__PURE__ */ n(Qt, { width: i ? 0 : void 0, children: /* @__PURE__ */ n(St, { unmountOnExit: !0, in: !i, timeout: 500, children: t.map((k) => /* @__PURE__ */ n(
|
|
5581
5566
|
tn,
|
|
@@ -5615,7 +5600,7 @@ function ms({
|
|
|
5615
5600
|
severity: i = void 0,
|
|
5616
5601
|
...r
|
|
5617
5602
|
}) {
|
|
5618
|
-
return i ? /* @__PURE__ */ n(
|
|
5603
|
+
return i ? /* @__PURE__ */ n($i, { title: e, severity: i, ...r, children: /* @__PURE__ */ n(nn, { children: t }) }) : /* @__PURE__ */ v(S, { ...r, children: [
|
|
5619
5604
|
e && /* @__PURE__ */ n(z, { variant: "body2", children: e }),
|
|
5620
5605
|
/* @__PURE__ */ n(nn, { color: "textSecondary", children: t })
|
|
5621
5606
|
] });
|
|
@@ -5643,7 +5628,7 @@ const Wl = m(S, {
|
|
|
5643
5628
|
width: "100%",
|
|
5644
5629
|
...t ? { minHeight: e.spacing(3) } : { height: e.spacing(3) },
|
|
5645
5630
|
padding: 0
|
|
5646
|
-
})), Nl = m(
|
|
5631
|
+
})), Nl = m($e, {
|
|
5647
5632
|
shouldForwardProp: (e) => e !== "expandable"
|
|
5648
5633
|
})(({ theme: e, expandable: t = !0 }) => ({
|
|
5649
5634
|
flex: 1,
|
|
@@ -5713,13 +5698,13 @@ function ys({
|
|
|
5713
5698
|
isLoading: y = !1,
|
|
5714
5699
|
margin: g
|
|
5715
5700
|
}) {
|
|
5716
|
-
const f = ni(), [
|
|
5701
|
+
const f = ni(), [w, h] = _(!0), b = s !== void 0 && u !== void 0, k = d !== !1 ? b ? s : w : !0, M = b ? u : h, [C, x] = _(null), A = !!C, T = () => {
|
|
5717
5702
|
d && M(!k);
|
|
5718
5703
|
}, O = (W) => x(W.currentTarget), L = () => x(null);
|
|
5719
|
-
function
|
|
5704
|
+
function P(W) {
|
|
5720
5705
|
W && W(), L();
|
|
5721
5706
|
}
|
|
5722
|
-
const
|
|
5707
|
+
const $ = (W) => /* @__PURE__ */ n(
|
|
5723
5708
|
rn,
|
|
5724
5709
|
{
|
|
5725
5710
|
"aria-label": W.label,
|
|
@@ -5729,9 +5714,9 @@ function ys({
|
|
|
5729
5714
|
},
|
|
5730
5715
|
W.id
|
|
5731
5716
|
);
|
|
5732
|
-
return l ? o ? /* @__PURE__ */ n(ie, { children: o }) : null : /* @__PURE__ */
|
|
5717
|
+
return l ? o ? /* @__PURE__ */ n(ie, { children: o }) : null : /* @__PURE__ */ v(Wl, { margin: g, component: "section", "aria-label": e, children: [
|
|
5733
5718
|
y ? /* @__PURE__ */ n(Rl, {}) : null,
|
|
5734
|
-
/* @__PURE__ */
|
|
5719
|
+
/* @__PURE__ */ v(Fl, { container: !0, expanded: s, children: [
|
|
5735
5720
|
/* @__PURE__ */ n(
|
|
5736
5721
|
Nl,
|
|
5737
5722
|
{
|
|
@@ -5742,18 +5727,18 @@ function ys({
|
|
|
5742
5727
|
children: /* @__PURE__ */ n(ue, { title: e, children: /* @__PURE__ */ n(zl, { expanded: s, align: "left", variant: "subtitle1", children: e }) })
|
|
5743
5728
|
}
|
|
5744
5729
|
),
|
|
5745
|
-
/* @__PURE__ */
|
|
5730
|
+
/* @__PURE__ */ v(Hl, { item: !0, children: [
|
|
5746
5731
|
c,
|
|
5747
5732
|
t.length > 0 && t.map((W) => W.tooltip ? /* @__PURE__ */ n(
|
|
5748
5733
|
ue,
|
|
5749
5734
|
{
|
|
5750
5735
|
title: W.tooltip.text,
|
|
5751
5736
|
placement: W.tooltip.placement ?? "top",
|
|
5752
|
-
children:
|
|
5737
|
+
children: $(W)
|
|
5753
5738
|
},
|
|
5754
5739
|
W.id
|
|
5755
|
-
) :
|
|
5756
|
-
i.length > 0 && /* @__PURE__ */
|
|
5740
|
+
) : $(W)),
|
|
5741
|
+
i.length > 0 && /* @__PURE__ */ v(ie, { children: [
|
|
5757
5742
|
/* @__PURE__ */ n(
|
|
5758
5743
|
rn,
|
|
5759
5744
|
{
|
|
@@ -5783,10 +5768,10 @@ function ys({
|
|
|
5783
5768
|
open: A,
|
|
5784
5769
|
onClose: L,
|
|
5785
5770
|
children: i.map((W) => /* @__PURE__ */ n(
|
|
5786
|
-
|
|
5771
|
+
Pe,
|
|
5787
5772
|
{
|
|
5788
5773
|
selected: W.selected,
|
|
5789
|
-
onClick: () =>
|
|
5774
|
+
onClick: () => P(W.action),
|
|
5790
5775
|
children: W.name
|
|
5791
5776
|
},
|
|
5792
5777
|
W.id
|
|
@@ -5796,7 +5781,7 @@ function ys({
|
|
|
5796
5781
|
] })
|
|
5797
5782
|
] })
|
|
5798
5783
|
] }),
|
|
5799
|
-
/* @__PURE__ */ n(St, { ref: f, in: k, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */
|
|
5784
|
+
/* @__PURE__ */ n(St, { ref: f, in: k, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ v(S, { ...a, children: [
|
|
5800
5785
|
/* @__PURE__ */ n(S, { pt: 1, children: o }),
|
|
5801
5786
|
p ?? /* @__PURE__ */ n(S, { children: p })
|
|
5802
5787
|
] }) })
|
|
@@ -5818,7 +5803,7 @@ export {
|
|
|
5818
5803
|
Ie as LEGEND_TYPES,
|
|
5819
5804
|
dl as LegendCategories,
|
|
5820
5805
|
kl as LegendIcon,
|
|
5821
|
-
|
|
5806
|
+
vl as LegendProportion,
|
|
5822
5807
|
en as LegendRamp,
|
|
5823
5808
|
fs as LegendWidgetUI,
|
|
5824
5809
|
ms as NoDataAlert,
|