@carto/meridian-ds 1.3.0 → 1.3.2
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/components/index.cjs +5 -5
- package/dist/components/index.js +967 -929
- package/dist/types/components/atoms/Button.d.ts +8 -0
- package/dist/types/components/atoms/Button.d.ts.map +1 -1
- package/dist/widgets/index.cjs +1 -1
- package/dist/widgets/index.js +254 -254
- 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 Pe, Divider 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 Pe, 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 $e, 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
10
|
import { A as Pi } from "../Alert-DbN79ENW.js";
|
|
11
|
-
import { c as yn, a as $i, b as
|
|
12
|
-
function
|
|
11
|
+
import { c as yn, a as $i, 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
|
() => ({
|
|
@@ -311,7 +311,7 @@ function ns(e) {
|
|
|
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: {
|
|
@@ -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 }
|
|
@@ -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,7 +612,7 @@ 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
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) {
|
|
@@ -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([]);
|
|
@@ -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,7 +918,7 @@ 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
|
Pe,
|
|
924
924
|
{
|
|
@@ -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({
|
|
@@ -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: {
|
|
@@ -1309,8 +1309,8 @@ function os({
|
|
|
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)) })
|
|
@@ -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,7 +1637,7 @@ function An({
|
|
|
1637
1637
|
})
|
|
1638
1638
|
}
|
|
1639
1639
|
),
|
|
1640
|
-
(o || l > 0) && /* @__PURE__ */
|
|
1640
|
+
(o || l > 0) && /* @__PURE__ */ v($r, { ref: y, children: [
|
|
1641
1641
|
/* @__PURE__ */ n(Pr, {}),
|
|
1642
1642
|
/* @__PURE__ */ n(
|
|
1643
1643
|
ue,
|
|
@@ -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(() => {
|
|
@@ -1811,8 +1811,8 @@ function as({
|
|
|
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
|
{
|
|
@@ -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,
|
|
@@ -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
|
{
|
|
@@ -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
|
}
|
|
@@ -2392,7 +2392,7 @@ function cs({
|
|
|
2392
2392
|
onPageChange: P,
|
|
2393
2393
|
onRowsPerPageChange: W,
|
|
2394
2394
|
ActionsComponent: () => /* @__PURE__ */ n(
|
|
2395
|
-
|
|
2395
|
+
wi,
|
|
2396
2396
|
{
|
|
2397
2397
|
count: s,
|
|
2398
2398
|
rowsPerPage: c,
|
|
@@ -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 });
|
|
@@ -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);
|
|
@@ -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(
|
|
@@ -2860,7 +2860,7 @@ 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([])),
|
|
2863
|
+
if (c && (y(!1), C("default")), g && (f(!1), qe = null, s.length === 1 && u([])), w && e) {
|
|
2864
2864
|
const [$] = e.convertFromPixel(_e, [
|
|
2865
2865
|
L.offsetX,
|
|
2866
2866
|
L.offsetY
|
|
@@ -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,
|
|
@@ -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
|
},
|
|
@@ -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
|
}), $ = 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,7 +3118,7 @@ function Wo({
|
|
|
3118
3118
|
p,
|
|
3119
3119
|
e,
|
|
3120
3120
|
y,
|
|
3121
|
-
|
|
3121
|
+
w
|
|
3122
3122
|
]
|
|
3123
3123
|
), P = F(
|
|
3124
3124
|
() => ({
|
|
@@ -3128,7 +3128,7 @@ 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
3134
|
series: $
|
|
@@ -3137,7 +3137,7 @@ function Wo({
|
|
|
3137
3137
|
T,
|
|
3138
3138
|
$,
|
|
3139
3139
|
f,
|
|
3140
|
-
|
|
3140
|
+
w.palette.secondary.main,
|
|
3141
3141
|
A
|
|
3142
3142
|
]
|
|
3143
3143
|
), J = { click: oe(
|
|
@@ -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,
|
|
@@ -3279,7 +3279,7 @@ function No({
|
|
|
3279
3279
|
onClose: k,
|
|
3280
3280
|
children: [
|
|
3281
3281
|
/* @__PURE__ */ n($e, { disabled: !0, children: /* @__PURE__ */ n(z, { variant: "caption", color: "textSecondary", children: g.formatMessage({ id: "c4r.widgets.timeSeries.speed" }) }) }),
|
|
3282
|
-
Fo.map((C) => /* @__PURE__ */
|
|
3282
|
+
Fo.map((C) => /* @__PURE__ */ v(
|
|
3283
3283
|
$e,
|
|
3284
3284
|
{
|
|
3285
3285
|
selected: C === o,
|
|
@@ -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 ?? $n }, 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,
|
|
@@ -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(
|
|
@@ -3671,7 +3671,7 @@ 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,
|
|
@@ -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 || (
|
|
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
3734
|
L(), $([]), 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,
|
|
@@ -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,7 +4074,7 @@ 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
4079
|
const h = le(), [b, k] = _(!1), [M, C] = _(!1), [x, A] = _(p), [T, O] = _(""), L = se(), $ = ce(L), P = F(() => {
|
|
4080
4080
|
const V = r.length ? r : [
|
|
@@ -4082,7 +4082,7 @@ function us({
|
|
|
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,
|
|
@@ -4112,7 +4112,7 @@ function us({
|
|
|
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
4114
|
}) : P, [P, T]), N = P.length - J.length + 1, I = s && !b && o < P.length;
|
|
4115
|
-
if (P.length === 0 ||
|
|
4115
|
+
if (P.length === 0 || w)
|
|
4116
4116
|
return /* @__PURE__ */ n(Mn, {});
|
|
4117
4117
|
const R = b ? E : M ? G : J;
|
|
4118
4118
|
function q() {
|
|
@@ -4139,22 +4139,22 @@ function us({
|
|
|
4139
4139
|
let pe = Array.from(ne);
|
|
4140
4140
|
pe.length === P.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
4146
|
pe.length === P.length && (pe = []), A(pe);
|
|
4147
4147
|
}
|
|
4148
|
-
const
|
|
4149
|
-
return /* @__PURE__ */
|
|
4150
|
-
u ? /* @__PURE__ */
|
|
4148
|
+
const ve = u ? b ? we : de : void 0;
|
|
4149
|
+
return /* @__PURE__ */ v(la, { children: [
|
|
4150
|
+
u ? /* @__PURE__ */ v(Xt, { center: !0, children: [
|
|
4151
4151
|
/* @__PURE__ */ n(z, { variant: "caption", children: p.length > 0 ? $.formatMessage(
|
|
4152
4152
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
4153
4153
|
{ items: p.length }
|
|
4154
4154
|
) : $.formatMessage({ id: "c4r.widgets.category.all" }) }),
|
|
4155
4155
|
/* @__PURE__ */ n(z, { variant: "caption", children: b ? /* @__PURE__ */ n(ye, { onClick: q, children: $.formatMessage({ id: "c4r.widgets.category.apply" }) }) : M ? /* @__PURE__ */ n(ye, { onClick: j, children: $.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: {
|
|
@@ -4166,7 +4166,7 @@ function us({
|
|
|
4166
4166
|
/* @__PURE__ */ n(ye, { onClick: te, children: $.formatMessage({
|
|
4167
4167
|
id: "c4r.widgets.category.lock"
|
|
4168
4168
|
}) }),
|
|
4169
|
-
/* @__PURE__ */ n(
|
|
4169
|
+
/* @__PURE__ */ n(wt, { orientation: "vertical", flexItem: !0 }),
|
|
4170
4170
|
/* @__PURE__ */ n(ye, { onClick: X, children: $.formatMessage({
|
|
4171
4171
|
id: "c4r.widgets.category.clear"
|
|
4172
4172
|
}) })
|
|
@@ -4184,12 +4184,12 @@ function us({
|
|
|
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__ */
|
|
4191
|
+
/* @__PURE__ */ v(sa, { children: [
|
|
4192
|
+
R.length === 0 ? /* @__PURE__ */ v(ie, { children: [
|
|
4193
4193
|
/* @__PURE__ */ n(z, { variant: "body2", children: $.formatMessage({
|
|
4194
4194
|
id: "c4r.widgets.category.noResults"
|
|
4195
4195
|
}) }),
|
|
@@ -4210,7 +4210,7 @@ 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))
|
|
@@ -4229,7 +4229,7 @@ function us({
|
|
|
4229
4229
|
}
|
|
4230
4230
|
) : null,
|
|
4231
4231
|
b ? /* @__PURE__ */ n(Pe, { size: "small", color: "primary", onClick: K, children: $.formatMessage({ id: "c4r.widgets.category.cancel" }) }) : null,
|
|
4232
|
-
/* @__PURE__ */ n(ca, { children: e.map((V, ee) => /* @__PURE__ */
|
|
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])) })
|
|
@@ -4263,7 +4263,7 @@ function Pa({
|
|
|
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,
|
|
@@ -4291,7 +4291,7 @@ function ps({
|
|
|
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
|
Pa,
|
|
4297
4297
|
{
|
|
@@ -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;
|
|
@@ -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
|
] })
|
|
@@ -4992,11 +4992,11 @@ function Lt({
|
|
|
4992
4992
|
{
|
|
4993
4993
|
ref: r,
|
|
4994
4994
|
color: t ? "textPrimary" : "textSecondary",
|
|
4995
|
-
variant: "button",
|
|
4996
4995
|
weight: "medium",
|
|
4997
4996
|
component: "p",
|
|
4998
4997
|
noWrap: !0,
|
|
4999
4998
|
my: 0.25,
|
|
4999
|
+
textTransform: "none",
|
|
5000
5000
|
...i,
|
|
5001
5001
|
children: e
|
|
5002
5002
|
}
|
|
@@ -5014,8 +5014,8 @@ function dl({
|
|
|
5014
5014
|
isStrokeColor: r = !1,
|
|
5015
5015
|
customMarkers: o,
|
|
5016
5016
|
maskedMarkers: a = !0
|
|
5017
|
-
} = e, l =
|
|
5018
|
-
return /* @__PURE__ */
|
|
5017
|
+
} = e, l = wn(i, t.length), d = t.length > ut, s = se(), u = ce(s);
|
|
5018
|
+
return /* @__PURE__ */ v(ie, { children: [
|
|
5019
5019
|
/* @__PURE__ */ n(jn, { "data-testid": "categories-legend", children: t.slice(0, ut).map((p, c) => /* @__PURE__ */ n(
|
|
5020
5020
|
hl,
|
|
5021
5021
|
{
|
|
@@ -5102,7 +5102,7 @@ function hl({
|
|
|
5102
5102
|
icon: r,
|
|
5103
5103
|
maskedIcon: o
|
|
5104
5104
|
}) {
|
|
5105
|
-
return /* @__PURE__ */
|
|
5105
|
+
return /* @__PURE__ */ v(S, { component: "li", sx: { display: "flex", alignItems: "center" }, children: [
|
|
5106
5106
|
/* @__PURE__ */ n(
|
|
5107
5107
|
gl,
|
|
5108
5108
|
{
|
|
@@ -5157,7 +5157,7 @@ const Ze = 6, rt = {
|
|
|
5157
5157
|
alignItems: "stretch",
|
|
5158
5158
|
justifyContent: "stretch",
|
|
5159
5159
|
padding: e(2, 0)
|
|
5160
|
-
})),
|
|
5160
|
+
})), wl = m(S)(() => ({
|
|
5161
5161
|
display: "flex",
|
|
5162
5162
|
flexDirection: "column",
|
|
5163
5163
|
justifyContent: "space-around",
|
|
@@ -5165,11 +5165,11 @@ const Ze = 6, rt = {
|
|
|
5165
5165
|
flexGrow: 1,
|
|
5166
5166
|
flexShrink: 1
|
|
5167
5167
|
}));
|
|
5168
|
-
function
|
|
5168
|
+
function vl({
|
|
5169
5169
|
legend: e
|
|
5170
5170
|
}) {
|
|
5171
5171
|
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__ */
|
|
5172
|
+
return /* @__PURE__ */ v(yl, { "data-testid": "proportion-legend", children: [
|
|
5173
5173
|
/* @__PURE__ */ n(ml, { children: [...Array(4)].map((u, p) => /* @__PURE__ */ n(
|
|
5174
5174
|
fl,
|
|
5175
5175
|
{
|
|
@@ -5178,8 +5178,8 @@ function wl({
|
|
|
5178
5178
|
},
|
|
5179
5179
|
p
|
|
5180
5180
|
)) }),
|
|
5181
|
-
/* @__PURE__ */ n(
|
|
5182
|
-
/* @__PURE__ */
|
|
5181
|
+
/* @__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: [
|
|
5182
|
+
/* @__PURE__ */ v(z, { variant: "overline", color: "textSecondary", children: [
|
|
5183
5183
|
r && i.formatMessage({ id: "c4r.widgets.legend.max" }) + ": ",
|
|
5184
5184
|
t.formatNumber(a, {
|
|
5185
5185
|
maximumSignificantDigits: Ze
|
|
@@ -5191,7 +5191,7 @@ function wl({
|
|
|
5191
5191
|
/* @__PURE__ */ n(z, { variant: "overline", color: "textSecondary", children: t.formatNumber(d, {
|
|
5192
5192
|
maximumSignificantDigits: Ze
|
|
5193
5193
|
}) }),
|
|
5194
|
-
/* @__PURE__ */
|
|
5194
|
+
/* @__PURE__ */ v(z, { variant: "overline", color: "textSecondary", children: [
|
|
5195
5195
|
r && i.formatMessage({ id: "c4r.widgets.legend.min" }) + ": ",
|
|
5196
5196
|
t.formatNumber(o, {
|
|
5197
5197
|
maximumSignificantDigits: Ze
|
|
@@ -5217,7 +5217,7 @@ function kl({
|
|
|
5217
5217
|
legend: e
|
|
5218
5218
|
}) {
|
|
5219
5219
|
const { labels: t = [], icons: i = [] } = e;
|
|
5220
|
-
return /* @__PURE__ */ n(jn, { "data-testid": "icon-legend", children: t.map((r, o) => /* @__PURE__ */
|
|
5220
|
+
return /* @__PURE__ */ n(jn, { "data-testid": "icon-legend", children: t.map((r, o) => /* @__PURE__ */ v(ol, { children: [
|
|
5221
5221
|
/* @__PURE__ */ n(al, { children: /* @__PURE__ */ n(
|
|
5222
5222
|
"img",
|
|
5223
5223
|
{
|
|
@@ -5244,12 +5244,12 @@ function en({
|
|
|
5244
5244
|
isContinuous: e = !1,
|
|
5245
5245
|
legend: t
|
|
5246
5246
|
}) {
|
|
5247
|
-
const { labels: i = [], colors: r = [], showMinMax: o = !0 } = t, a =
|
|
5247
|
+
const { labels: i = [], colors: r = [], showMinMax: o = !0 } = t, a = wn(
|
|
5248
5248
|
r,
|
|
5249
5249
|
!i.length || e ? 2 : i.length + 1
|
|
5250
5250
|
), 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
5251
|
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__ */
|
|
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__ */ v(ie, { children: [
|
|
5253
5253
|
/* @__PURE__ */ n(S, { display: "flex", pb: 1, children: e ? /* @__PURE__ */ n(
|
|
5254
5254
|
Ml,
|
|
5255
5255
|
{
|
|
@@ -5265,7 +5265,7 @@ function en({
|
|
|
5265
5265
|
min: g
|
|
5266
5266
|
}
|
|
5267
5267
|
) }),
|
|
5268
|
-
/* @__PURE__ */
|
|
5268
|
+
/* @__PURE__ */ v(S, { display: "flex", justifyContent: "space-between", children: [
|
|
5269
5269
|
/* @__PURE__ */ n(z, { variant: "overlineDelicate", color: "textSecondary", children: g }),
|
|
5270
5270
|
/* @__PURE__ */ n(z, { variant: "overlineDelicate", color: "textSecondary", children: y })
|
|
5271
5271
|
] })
|
|
@@ -5307,14 +5307,14 @@ function Cl({
|
|
|
5307
5307
|
}
|
|
5308
5308
|
const Tl = {
|
|
5309
5309
|
[Ie.CATEGORY]: dl,
|
|
5310
|
-
[Ie.PROPORTION]:
|
|
5310
|
+
[Ie.PROPORTION]: vl,
|
|
5311
5311
|
[Ie.ICON]: kl,
|
|
5312
5312
|
[Ie.BINS]: (e) => /* @__PURE__ */ n(en, { ...e, isContinuous: !1 }),
|
|
5313
5313
|
[Ie.CONTINUOUS_RAMP]: (e) => /* @__PURE__ */ n(en, { ...e, isContinuous: !0 })
|
|
5314
5314
|
};
|
|
5315
5315
|
function Al({ legend: e }) {
|
|
5316
5316
|
const t = se(), i = ce(t);
|
|
5317
|
-
return e.select || !e.type ? null : /* @__PURE__ */
|
|
5317
|
+
return e.select || !e.type ? null : /* @__PURE__ */ v(z, { variant: "body2", color: "textSecondary", component: "p", children: [
|
|
5318
5318
|
e.type,
|
|
5319
5319
|
" ",
|
|
5320
5320
|
i.formatMessage({ id: "c4r.widgets.legend.notSupported" }),
|
|
@@ -5332,8 +5332,8 @@ function Ll({
|
|
|
5332
5332
|
}) {
|
|
5333
5333
|
var p;
|
|
5334
5334
|
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__ */
|
|
5335
|
+
return /* @__PURE__ */ v(S, { component: "li", "data-testid": "legend-layer-variable", px: 2, children: [
|
|
5336
|
+
t.attr ? /* @__PURE__ */ v(S, { pb: 1, children: [
|
|
5337
5337
|
/* @__PURE__ */ n(
|
|
5338
5338
|
z,
|
|
5339
5339
|
{
|
|
@@ -5346,7 +5346,7 @@ function Ll({
|
|
|
5346
5346
|
),
|
|
5347
5347
|
/* @__PURE__ */ n(z, { variant: "caption", component: "p", children: t.attr })
|
|
5348
5348
|
] }) : null,
|
|
5349
|
-
t.select ? /* @__PURE__ */
|
|
5349
|
+
t.select ? /* @__PURE__ */ v(S, { pb: 1, children: [
|
|
5350
5350
|
/* @__PURE__ */ n(z, { variant: "caption", weight: "medium", component: "p", children: t.select.label }),
|
|
5351
5351
|
/* @__PURE__ */ n(
|
|
5352
5352
|
pi,
|
|
@@ -5390,15 +5390,15 @@ function tn({
|
|
|
5390
5390
|
minZoom: d = 0,
|
|
5391
5391
|
currentZoom: s = 0
|
|
5392
5392
|
}) {
|
|
5393
|
-
const u = se(), p = ce(u), c = re(null), [y, g] = _(!1), f = t.id,
|
|
5393
|
+
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, $ = t.maxZoom ?? l, P = O && (L > d || $ < l), W = s < L || s > $, J = Pl({
|
|
5394
5394
|
intl: p,
|
|
5395
5395
|
minZoom: d,
|
|
5396
5396
|
maxZoom: l,
|
|
5397
5397
|
layerMinZoom: L,
|
|
5398
5398
|
layerMaxZoom: $
|
|
5399
5399
|
}), G = t.helperText ?? (P ? J : ""), E = F(() => t.legend ? Array.isArray(t.legend) ? t.legend : [t.legend] : [], [t.legend]);
|
|
5400
|
-
return t.legend ? /* @__PURE__ */
|
|
5401
|
-
/* @__PURE__ */
|
|
5400
|
+
return t.legend ? /* @__PURE__ */ v(ll, { "data-testid": "legend-layer", "aria-label": w, children: [
|
|
5401
|
+
/* @__PURE__ */ v(tl, { ref: c, children: [
|
|
5402
5402
|
M && /* @__PURE__ */ n(
|
|
5403
5403
|
fe,
|
|
5404
5404
|
{
|
|
@@ -5411,15 +5411,15 @@ function tn({
|
|
|
5411
5411
|
children: T
|
|
5412
5412
|
}
|
|
5413
5413
|
),
|
|
5414
|
-
/* @__PURE__ */
|
|
5415
|
-
/* @__PURE__ */ n(Lt, { visible: h, title:
|
|
5414
|
+
/* @__PURE__ */ v(sl, { children: [
|
|
5415
|
+
/* @__PURE__ */ n(Lt, { visible: h, title: w ?? "" }),
|
|
5416
5416
|
P && /* @__PURE__ */ n(
|
|
5417
5417
|
ue,
|
|
5418
5418
|
{
|
|
5419
5419
|
title: p.formatMessage({
|
|
5420
5420
|
id: "c4r.widgets.legend.zoomLevelTooltip"
|
|
5421
5421
|
}),
|
|
5422
|
-
children: /* @__PURE__ */
|
|
5422
|
+
children: /* @__PURE__ */ v(
|
|
5423
5423
|
z,
|
|
5424
5424
|
{
|
|
5425
5425
|
color: h ? "textPrimary" : "textSecondary",
|
|
@@ -5470,7 +5470,7 @@ function tn({
|
|
|
5470
5470
|
}
|
|
5471
5471
|
)
|
|
5472
5472
|
] }),
|
|
5473
|
-
/* @__PURE__ */
|
|
5473
|
+
/* @__PURE__ */ v(St, { unmountOnExit: !0, timeout: 100, in: A, children: [
|
|
5474
5474
|
/* @__PURE__ */ n(
|
|
5475
5475
|
rl,
|
|
5476
5476
|
{
|
|
@@ -5531,25 +5531,25 @@ function fs({
|
|
|
5531
5531
|
isMobile: y,
|
|
5532
5532
|
sx: g
|
|
5533
5533
|
}) {
|
|
5534
|
-
const f = se(),
|
|
5534
|
+
const f = se(), w = ce(f), h = /* @__PURE__ */ v(el, { collapsed: i, children: [
|
|
5535
5535
|
/* @__PURE__ */ n(z, { variant: "caption", flexGrow: 1, children: s }),
|
|
5536
5536
|
/* @__PURE__ */ n(
|
|
5537
5537
|
ue,
|
|
5538
5538
|
{
|
|
5539
|
-
title:
|
|
5539
|
+
title: w.formatMessage({ id: "c4r.widgets.legend.close" }),
|
|
5540
5540
|
children: /* @__PURE__ */ n(fe, { size: "small", onClick: () => r(!0), children: /* @__PURE__ */ n(Ei, {}) })
|
|
5541
5541
|
}
|
|
5542
5542
|
)
|
|
5543
5543
|
] }), b = /* @__PURE__ */ n(
|
|
5544
5544
|
ue,
|
|
5545
5545
|
{
|
|
5546
|
-
title:
|
|
5546
|
+
title: w.formatMessage({ id: "c4r.widgets.legend.open" }),
|
|
5547
5547
|
children: /* @__PURE__ */ n(fe, { "aria-label": s, onClick: () => r(!1), children: /* @__PURE__ */ n(Li, {}) })
|
|
5548
5548
|
}
|
|
5549
5549
|
);
|
|
5550
|
-
return /* @__PURE__ */ n(Qa, { sx: g, elevation: 3, collapsed: i || !!y, children: y ? /* @__PURE__ */
|
|
5550
|
+
return /* @__PURE__ */ n(Qa, { sx: g, elevation: 3, collapsed: i || !!y, children: y ? /* @__PURE__ */ v(ie, { children: [
|
|
5551
5551
|
b,
|
|
5552
|
-
/* @__PURE__ */
|
|
5552
|
+
/* @__PURE__ */ v(
|
|
5553
5553
|
hi,
|
|
5554
5554
|
{
|
|
5555
5555
|
anchor: "bottom",
|
|
@@ -5575,7 +5575,7 @@ function fs({
|
|
|
5575
5575
|
]
|
|
5576
5576
|
}
|
|
5577
5577
|
)
|
|
5578
|
-
] }) : /* @__PURE__ */
|
|
5578
|
+
] }) : /* @__PURE__ */ v(ie, { children: [
|
|
5579
5579
|
i ? b : h,
|
|
5580
5580
|
/* @__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
5581
|
tn,
|
|
@@ -5615,7 +5615,7 @@ function ms({
|
|
|
5615
5615
|
severity: i = void 0,
|
|
5616
5616
|
...r
|
|
5617
5617
|
}) {
|
|
5618
|
-
return i ? /* @__PURE__ */ n(Pi, { title: e, severity: i, ...r, children: /* @__PURE__ */ n(nn, { children: t }) }) : /* @__PURE__ */
|
|
5618
|
+
return i ? /* @__PURE__ */ n(Pi, { title: e, severity: i, ...r, children: /* @__PURE__ */ n(nn, { children: t }) }) : /* @__PURE__ */ v(S, { ...r, children: [
|
|
5619
5619
|
e && /* @__PURE__ */ n(z, { variant: "body2", children: e }),
|
|
5620
5620
|
/* @__PURE__ */ n(nn, { color: "textSecondary", children: t })
|
|
5621
5621
|
] });
|
|
@@ -5713,7 +5713,7 @@ function ys({
|
|
|
5713
5713
|
isLoading: y = !1,
|
|
5714
5714
|
margin: g
|
|
5715
5715
|
}) {
|
|
5716
|
-
const f = ni(), [
|
|
5716
|
+
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
5717
|
d && M(!k);
|
|
5718
5718
|
}, O = (W) => x(W.currentTarget), L = () => x(null);
|
|
5719
5719
|
function $(W) {
|
|
@@ -5729,9 +5729,9 @@ function ys({
|
|
|
5729
5729
|
},
|
|
5730
5730
|
W.id
|
|
5731
5731
|
);
|
|
5732
|
-
return l ? o ? /* @__PURE__ */ n(ie, { children: o }) : null : /* @__PURE__ */
|
|
5732
|
+
return l ? o ? /* @__PURE__ */ n(ie, { children: o }) : null : /* @__PURE__ */ v(Wl, { margin: g, component: "section", "aria-label": e, children: [
|
|
5733
5733
|
y ? /* @__PURE__ */ n(Rl, {}) : null,
|
|
5734
|
-
/* @__PURE__ */
|
|
5734
|
+
/* @__PURE__ */ v(Fl, { container: !0, expanded: s, children: [
|
|
5735
5735
|
/* @__PURE__ */ n(
|
|
5736
5736
|
Nl,
|
|
5737
5737
|
{
|
|
@@ -5742,7 +5742,7 @@ function ys({
|
|
|
5742
5742
|
children: /* @__PURE__ */ n(ue, { title: e, children: /* @__PURE__ */ n(zl, { expanded: s, align: "left", variant: "subtitle1", children: e }) })
|
|
5743
5743
|
}
|
|
5744
5744
|
),
|
|
5745
|
-
/* @__PURE__ */
|
|
5745
|
+
/* @__PURE__ */ v(Hl, { item: !0, children: [
|
|
5746
5746
|
c,
|
|
5747
5747
|
t.length > 0 && t.map((W) => W.tooltip ? /* @__PURE__ */ n(
|
|
5748
5748
|
ue,
|
|
@@ -5753,7 +5753,7 @@ function ys({
|
|
|
5753
5753
|
},
|
|
5754
5754
|
W.id
|
|
5755
5755
|
) : P(W)),
|
|
5756
|
-
i.length > 0 && /* @__PURE__ */
|
|
5756
|
+
i.length > 0 && /* @__PURE__ */ v(ie, { children: [
|
|
5757
5757
|
/* @__PURE__ */ n(
|
|
5758
5758
|
rn,
|
|
5759
5759
|
{
|
|
@@ -5796,7 +5796,7 @@ function ys({
|
|
|
5796
5796
|
] })
|
|
5797
5797
|
] })
|
|
5798
5798
|
] }),
|
|
5799
|
-
/* @__PURE__ */ n(St, { ref: f, in: k, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */
|
|
5799
|
+
/* @__PURE__ */ n(St, { ref: f, in: k, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ v(S, { ...a, children: [
|
|
5800
5800
|
/* @__PURE__ */ n(S, { pt: 1, children: o }),
|
|
5801
5801
|
p ?? /* @__PURE__ */ n(S, { children: p })
|
|
5802
5802
|
] }) })
|
|
@@ -5818,7 +5818,7 @@ export {
|
|
|
5818
5818
|
Ie as LEGEND_TYPES,
|
|
5819
5819
|
dl as LegendCategories,
|
|
5820
5820
|
kl as LegendIcon,
|
|
5821
|
-
|
|
5821
|
+
vl as LegendProportion,
|
|
5822
5822
|
en as LegendRamp,
|
|
5823
5823
|
fs as LegendWidgetUI,
|
|
5824
5824
|
ms as NoDataAlert,
|