@carto/meridian-ds 1.3.2 → 1.3.4
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 +8 -0
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +1 -1
- 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 +10 -10
- package/dist/widgets/index.js +583 -596
- package/package.json +1 -1
package/dist/widgets/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
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
|
|
3
|
+
import { useTheme as le, styled as m, Box as S, Skeleton as z, 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
|
|
5
|
+
import { t as yi, u as ce, T as H, S as B, B as Mt, a as wi, b as pt } from "../TablePaginationActions-BmvmVQd9.js";
|
|
6
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
|
-
import { ChevronLeft as ki, ChevronRight as Si, KeyboardArrowDown as Mi, ErrorOutline as Ii, Cancel as
|
|
10
|
-
import { A as
|
|
11
|
-
import { c as yn, a as
|
|
9
|
+
import { ChevronLeft as ki, ChevronRight as Si, KeyboardArrowDown as Mi, ErrorOutline as Ii, Cancel as Ti, VisibilityOutlined as Ci, 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 $i } from "../Alert-DbN79ENW.js";
|
|
11
|
+
import { c as yn, a as Pi, b as wn } from "../paletteUtils-BEwZhrLg.js";
|
|
12
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;
|
|
@@ -167,26 +167,26 @@ const at = 240, xn = m(S)(({ theme: e }) => ({
|
|
|
167
167
|
backgroundImage: `linear-gradient(${e.palette.grey[50]} 0.5px, transparent 0.5px, transparent calc(100% - 0.5px), ${e.palette.grey[50]} calc(100% - 0.5px)), linear-gradient(90deg, ${e.palette.grey[50]} 0.5px, transparent 0.5px, transparent calc(100% - 0.5px), ${e.palette.grey[50]} calc(100% - 0.5px))`,
|
|
168
168
|
backgroundSize: "8.33% 20%",
|
|
169
169
|
border: `0.5px solid ${e.palette.grey[50]}`
|
|
170
|
-
})), Fe = m(
|
|
170
|
+
})), Fe = m(z)(({ theme: e }) => ({
|
|
171
171
|
flex: 1,
|
|
172
172
|
maxWidth: e.spacing(12),
|
|
173
173
|
"& + &": {
|
|
174
174
|
marginLeft: e.spacing(1)
|
|
175
175
|
}
|
|
176
|
-
})), he = m(
|
|
176
|
+
})), he = m(z)(({ theme: e }) => ({
|
|
177
177
|
flex: 1,
|
|
178
178
|
maxWidth: e.spacing(8),
|
|
179
179
|
"& + &": {
|
|
180
180
|
marginLeft: "1px"
|
|
181
181
|
}
|
|
182
|
-
})), _i = m(
|
|
182
|
+
})), _i = m(z)(({ theme: e }) => ({
|
|
183
183
|
backgroundColor: e.palette.common.white
|
|
184
|
-
})), Rt = m(
|
|
184
|
+
})), Rt = m(z)(({ theme: e }) => ({
|
|
185
185
|
backgroundColor: e.palette.grey[100]
|
|
186
186
|
}));
|
|
187
|
-
function
|
|
187
|
+
function Hi({ height: e }) {
|
|
188
188
|
return /* @__PURE__ */ v(ie, { children: [
|
|
189
|
-
/* @__PURE__ */ n(S, { mb: 2, children: /* @__PURE__ */ n(
|
|
189
|
+
/* @__PURE__ */ n(S, { mb: 2, children: /* @__PURE__ */ n(z, { width: 48, height: 8 }) }),
|
|
190
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%" }),
|
|
@@ -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
|
|
205
|
+
const zi = vn(), ji = m(ae)(({ theme: e }) => ({
|
|
206
206
|
marginBottom: e.spacing(2),
|
|
207
207
|
flexDirection: "row",
|
|
208
208
|
justifyContent: "space-between",
|
|
@@ -232,7 +232,7 @@ function ns(e) {
|
|
|
232
232
|
filterable: f,
|
|
233
233
|
animation: w,
|
|
234
234
|
isLoading: h
|
|
235
|
-
} = Fi(e), b = r.length > 1, k = le(), M = se(),
|
|
235
|
+
} = Fi(e), b = r.length > 1, k = le(), M = se(), T = ce(M), { showSkeleton: x } = ke(!!h), A = F(
|
|
236
236
|
() => ({
|
|
237
237
|
show: l,
|
|
238
238
|
trigger: "axis",
|
|
@@ -244,14 +244,14 @@ function ns(e) {
|
|
|
244
244
|
color: k.palette.common.white
|
|
245
245
|
},
|
|
246
246
|
backgroundColor: k.palette.black[90],
|
|
247
|
-
position: function(I, R,
|
|
247
|
+
position: function(I, R, X, j, q) {
|
|
248
248
|
const te = { top: 0 };
|
|
249
|
-
return
|
|
249
|
+
return q.contentSize[0] < q.viewSize[0] - I[0] ? te.left = I[0] : te.right = q.viewSize[0] - I[0], te;
|
|
250
250
|
},
|
|
251
251
|
formatter: (I) => d(I, c)
|
|
252
252
|
}),
|
|
253
253
|
[k, l, d, c]
|
|
254
|
-
),
|
|
254
|
+
), C = F(
|
|
255
255
|
() => i.map(
|
|
256
256
|
(I) => ge(p(s[I] ?? String(I)))
|
|
257
257
|
),
|
|
@@ -269,15 +269,15 @@ function ns(e) {
|
|
|
269
269
|
...k.typography.overlineDelicate,
|
|
270
270
|
padding: [parseInt(k.spacing(0.5)), 0, 0, 0]
|
|
271
271
|
},
|
|
272
|
-
data:
|
|
272
|
+
data: C
|
|
273
273
|
}),
|
|
274
|
-
[k,
|
|
274
|
+
[k, C]
|
|
275
275
|
), L = F(() => {
|
|
276
276
|
let I = [];
|
|
277
|
-
return y ? I = t.reduce((R,
|
|
278
|
-
(j,
|
|
277
|
+
return y ? I = t.reduce((R, X) => (X.forEach(
|
|
278
|
+
(j, q) => R[q] = (R[q] ?? 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,18 +307,18 @@ 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
314
|
animation: w,
|
|
315
315
|
barMaxWidth: 100,
|
|
316
|
-
data: I.map((
|
|
317
|
-
const
|
|
316
|
+
data: I.map((X, j) => {
|
|
317
|
+
const q = o.some(
|
|
318
318
|
([Y, K = 0]) => Y === j && K === R
|
|
319
|
-
), te = !!o.length && !
|
|
319
|
+
), te = !!o.length && !q;
|
|
320
320
|
return {
|
|
321
|
-
value:
|
|
321
|
+
value: X,
|
|
322
322
|
...te && {
|
|
323
323
|
itemStyle: { color: k.palette.black[25] },
|
|
324
324
|
disabled: !0
|
|
@@ -326,7 +326,7 @@ function ns(e) {
|
|
|
326
326
|
};
|
|
327
327
|
}),
|
|
328
328
|
...y && { stack: "total" },
|
|
329
|
-
...!
|
|
329
|
+
...!zi && {
|
|
330
330
|
emphasis: {
|
|
331
331
|
focus: "series",
|
|
332
332
|
itemStyle: {
|
|
@@ -339,14 +339,14 @@ function ns(e) {
|
|
|
339
339
|
), W = F(
|
|
340
340
|
() => ({
|
|
341
341
|
grid: {
|
|
342
|
-
left:
|
|
343
|
-
String(
|
|
344
|
-
|
|
342
|
+
left: C.length >= 4 ? Ft(
|
|
343
|
+
String(C[0]),
|
|
344
|
+
C.length
|
|
345
345
|
) : 0,
|
|
346
346
|
top: parseInt(k.spacing(2)),
|
|
347
|
-
right:
|
|
348
|
-
String(
|
|
349
|
-
|
|
347
|
+
right: C.length >= 4 ? Ft(
|
|
348
|
+
String(C[C.length - 1]),
|
|
349
|
+
C.length
|
|
350
350
|
) : 0,
|
|
351
351
|
bottom: 0,
|
|
352
352
|
containLabel: !0
|
|
@@ -359,29 +359,29 @@ 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
|
+
C,
|
|
367
367
|
k,
|
|
368
368
|
u,
|
|
369
369
|
A,
|
|
370
370
|
O,
|
|
371
|
-
|
|
372
|
-
|
|
371
|
+
P,
|
|
372
|
+
$
|
|
373
373
|
]
|
|
374
374
|
), J = () => {
|
|
375
375
|
a && a([], []);
|
|
376
376
|
}, G = (I) => {
|
|
377
377
|
I.key === "Enter" && J();
|
|
378
|
-
},
|
|
378
|
+
}, D = oe(
|
|
379
379
|
(I) => {
|
|
380
380
|
if (a) {
|
|
381
|
-
const R = [...o], { dataIndex:
|
|
382
|
-
([Y, K = 0]) =>
|
|
381
|
+
const R = [...o], { dataIndex: X, componentIndex: j } = I, q = R.findIndex(
|
|
382
|
+
([Y, K = 0]) => X === Y && j === K
|
|
383
383
|
);
|
|
384
|
-
|
|
384
|
+
q === -1 ? R.push([X, j]) : R.splice(q, 1);
|
|
385
385
|
const te = R.map(
|
|
386
386
|
([Y, K = 0]) => ({
|
|
387
387
|
xAxis: i[Y],
|
|
@@ -402,16 +402,16 @@ function ns(e) {
|
|
|
402
402
|
]
|
|
403
403
|
), N = F(
|
|
404
404
|
() => f ? {
|
|
405
|
-
click:
|
|
405
|
+
click: D
|
|
406
406
|
} : {},
|
|
407
|
-
[f,
|
|
407
|
+
[f, D]
|
|
408
408
|
);
|
|
409
|
-
return x ? /* @__PURE__ */ n(
|
|
409
|
+
return x ? /* @__PURE__ */ n(Hi, { height: g }) : /* @__PURE__ */ v("div", { children: [
|
|
410
410
|
a && /* @__PURE__ */ v(ji, { container: !0, children: [
|
|
411
|
-
/* @__PURE__ */ n(
|
|
411
|
+
/* @__PURE__ */ n(H, { variant: "caption", children: o.length > 0 ? T.formatMessage(
|
|
412
412
|
{ id: "c4r.widgets.bar.selectedItems" },
|
|
413
413
|
{ items: o.length }
|
|
414
|
-
) :
|
|
414
|
+
) : T.formatMessage({ id: "c4r.widgets.bar.all" }) }),
|
|
415
415
|
o && o.length > 0 && /* @__PURE__ */ n(
|
|
416
416
|
Yi,
|
|
417
417
|
{
|
|
@@ -419,7 +419,7 @@ function ns(e) {
|
|
|
419
419
|
onKeyDown: G,
|
|
420
420
|
underline: "hover",
|
|
421
421
|
tabIndex: 0,
|
|
422
|
-
children:
|
|
422
|
+
children: T.formatMessage({ id: "c4r.widgets.bar.clear" })
|
|
423
423
|
}
|
|
424
424
|
)
|
|
425
425
|
] }),
|
|
@@ -439,7 +439,7 @@ function Ft(e = "", t = 0) {
|
|
|
439
439
|
return t <= 15 && e.length <= 8 ? 0 : e.length * 8.5 / 6;
|
|
440
440
|
}
|
|
441
441
|
const Me = "__rest__", Oe = "Others";
|
|
442
|
-
var
|
|
442
|
+
var Te = /* @__PURE__ */ ((e) => (e.RANKING = "ranking", e.FIXED = "fixed", e))(Te || {});
|
|
443
443
|
const kn = m(ae)(({ theme: e }) => ({
|
|
444
444
|
maxHeight: e.spacing(40),
|
|
445
445
|
overflow: "auto",
|
|
@@ -509,7 +509,7 @@ const kn = m(ae)(({ theme: e }) => ({
|
|
|
509
509
|
...t && {
|
|
510
510
|
width: `calc(100% - ${e.spacing(4)})`
|
|
511
511
|
}
|
|
512
|
-
})), Ui = m(
|
|
512
|
+
})), Ui = m(H)(({ theme: e }) => ({
|
|
513
513
|
fontWeight: e.typography.fontWeightBold,
|
|
514
514
|
marginRight: e.spacing(2)
|
|
515
515
|
})), Ve = m(ye)(({ theme: e }) => ({
|
|
@@ -518,9 +518,9 @@ const kn = m(ae)(({ theme: e }) => ({
|
|
|
518
518
|
"& + hr": {
|
|
519
519
|
margin: e.spacing(0, 1)
|
|
520
520
|
}
|
|
521
|
-
})),
|
|
521
|
+
})), Xi = 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",
|
|
@@ -533,17 +533,17 @@ const kn = m(ae)(({ theme: e }) => ({
|
|
|
533
533
|
height: "auto",
|
|
534
534
|
marginTop: e.spacing(2)
|
|
535
535
|
}
|
|
536
|
-
})),
|
|
536
|
+
})), qi = m(z)(({ theme: e }) => ({
|
|
537
537
|
marginTop: e.spacing(1.25),
|
|
538
538
|
marginBottom: e.spacing(1.75)
|
|
539
539
|
})), Ki = (e) => e % 2 === 1, Mn = () => /* @__PURE__ */ v(ie, { children: [
|
|
540
|
-
/* @__PURE__ */ n(
|
|
540
|
+
/* @__PURE__ */ n(z, { width: 48, height: 8 }),
|
|
541
541
|
/* @__PURE__ */ n(kn, { container: !0, mt: 3, children: [...Array(6)].map((e, t) => /* @__PURE__ */ v(Sn, { container: !0, spacing: 1, children: [
|
|
542
542
|
/* @__PURE__ */ v(ae, { container: !0, item: !0, direction: "row", justifyContent: "space-between", children: [
|
|
543
|
-
/* @__PURE__ */ n(
|
|
544
|
-
/* @__PURE__ */ n(
|
|
543
|
+
/* @__PURE__ */ n(z, { width: Ki(t) ? 72 : 48, height: 8 }),
|
|
544
|
+
/* @__PURE__ */ n(z, { width: 48, height: 8 })
|
|
545
545
|
] }),
|
|
546
|
-
/* @__PURE__ */ n(
|
|
546
|
+
/* @__PURE__ */ n(qi, { height: 4, width: "100%" })
|
|
547
547
|
] }, t)) })
|
|
548
548
|
] });
|
|
549
549
|
function In(e) {
|
|
@@ -603,7 +603,7 @@ function is({
|
|
|
603
603
|
formatter: t = er,
|
|
604
604
|
labels: i = Qi,
|
|
605
605
|
maxItems: r = 5,
|
|
606
|
-
order: o =
|
|
606
|
+
order: o = Te.RANKING,
|
|
607
607
|
selectedCategories: a = Ji,
|
|
608
608
|
onSelectedCategoriesChange: l = ct,
|
|
609
609
|
onMaxItemsOverflow: d = tr,
|
|
@@ -612,72 +612,72 @@ function is({
|
|
|
612
612
|
searchable: p = !0,
|
|
613
613
|
isLoading: c
|
|
614
614
|
}) {
|
|
615
|
-
const y = le(), [g, f] = _([]), [w, h] = _(1), [b, k] = _(!1), [M,
|
|
615
|
+
const y = le(), [g, f] = _([]), [w, h] = _(1), [b, k] = _(!1), [M, T] = _(""), [x, A] = _([]), [C, O] = _(
|
|
616
616
|
[]
|
|
617
|
-
), [L,
|
|
618
|
-
function R(
|
|
619
|
-
return g.reduce((Z, Q) => (
|
|
617
|
+
), [L, P] = _([]), $ = re(null), W = re(), J = In(L), G = re([]), { showSkeleton: D } = ke(!!c), N = se(), I = ce(N);
|
|
618
|
+
function R(E) {
|
|
619
|
+
return g.reduce((Z, Q) => (E.includes(Q.name) && Z.push(Q.name), Z), []);
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
if (
|
|
621
|
+
function X(E) {
|
|
622
|
+
if (E !== Me) {
|
|
623
623
|
let Z;
|
|
624
|
-
a.includes(
|
|
624
|
+
a.includes(E) ? Z = a.filter((Q) => Q !== E) : Z = [...a, E], l && l(Z);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
const j = () => l([]),
|
|
628
|
-
|
|
627
|
+
const j = () => l([]), q = (E) => {
|
|
628
|
+
E.key === "Enter" && j();
|
|
629
629
|
}, te = () => {
|
|
630
630
|
l([]), A([]);
|
|
631
|
-
}, Y = (
|
|
632
|
-
|
|
631
|
+
}, Y = (E) => {
|
|
632
|
+
E.key === "Enter" && te();
|
|
633
633
|
}, K = () => {
|
|
634
634
|
A(R(a));
|
|
635
|
-
}, de = (
|
|
636
|
-
|
|
635
|
+
}, de = (E) => {
|
|
636
|
+
E.key === "Enter" && K();
|
|
637
637
|
}, we = () => {
|
|
638
|
-
const
|
|
639
|
-
|
|
638
|
+
const E = R(
|
|
639
|
+
C
|
|
640
640
|
);
|
|
641
|
-
l([...
|
|
642
|
-
}, ve = (
|
|
643
|
-
|
|
641
|
+
l([...E]), A([...E]), O([]), k(!1), T("");
|
|
642
|
+
}, ve = (E) => {
|
|
643
|
+
E.key === "Enter" && we();
|
|
644
644
|
}, V = () => {
|
|
645
|
-
|
|
646
|
-
}, ee = (
|
|
647
|
-
if (
|
|
645
|
+
T(""), k(!1);
|
|
646
|
+
}, ee = (E) => {
|
|
647
|
+
if (E !== Me) {
|
|
648
648
|
let Z;
|
|
649
|
-
|
|
649
|
+
C.includes(E) ? Z = C.filter((Q) => Q !== E) : Z = [...C, E], O(Z);
|
|
650
650
|
}
|
|
651
|
-
}, ne = (
|
|
652
|
-
|
|
653
|
-
}, pe = (
|
|
654
|
-
|
|
655
|
-
},
|
|
651
|
+
}, ne = (E) => {
|
|
652
|
+
E.currentTarget.scrollIntoView();
|
|
653
|
+
}, pe = (E) => {
|
|
654
|
+
T(E.currentTarget.value);
|
|
655
|
+
}, Ce = () => {
|
|
656
656
|
k(!0), O([...a]);
|
|
657
657
|
}, Re = oe(
|
|
658
|
-
(
|
|
658
|
+
(E) => {
|
|
659
659
|
if (b)
|
|
660
|
-
return M ?
|
|
660
|
+
return M ? E.filter((Z) => {
|
|
661
661
|
var xe;
|
|
662
662
|
if (!Z.name)
|
|
663
663
|
return !1;
|
|
664
664
|
const Q = String(Z.name);
|
|
665
665
|
return !!(Q.toLowerCase().includes(M.toLowerCase()) || (xe = i[Q]) != null && xe.toLowerCase().includes(M.toLowerCase()));
|
|
666
|
-
}) :
|
|
666
|
+
}) : E;
|
|
667
667
|
if (x.length)
|
|
668
668
|
return x.reduce((Q, xe) => {
|
|
669
|
-
const Ye =
|
|
669
|
+
const Ye = E.find((be) => be.name === xe);
|
|
670
670
|
return Q.push({
|
|
671
671
|
name: xe,
|
|
672
672
|
value: Ye ? Ye.value : null
|
|
673
673
|
}), Q;
|
|
674
674
|
}, []);
|
|
675
675
|
{
|
|
676
|
-
const Z =
|
|
677
|
-
if (Z.length <
|
|
676
|
+
const Z = E.slice(0, r);
|
|
677
|
+
if (Z.length < E.length) {
|
|
678
678
|
const Q = {
|
|
679
679
|
name: Me,
|
|
680
|
-
value: d(
|
|
680
|
+
value: d(E.slice(r))
|
|
681
681
|
};
|
|
682
682
|
return [...Z, Q];
|
|
683
683
|
} else
|
|
@@ -693,26 +693,26 @@ function is({
|
|
|
693
693
|
d
|
|
694
694
|
]
|
|
695
695
|
), Ae = oe(() => {
|
|
696
|
-
const
|
|
697
|
-
return
|
|
696
|
+
const E = x.length;
|
|
697
|
+
return E ? e.length - E : e.length - r;
|
|
698
698
|
}, [e, r, x]), Dt = oe(
|
|
699
|
-
(
|
|
699
|
+
(E) => E === Me ? `Others ${p ? "" : `(${Ae()})`}` : i[String(E)] ?? String(E),
|
|
700
700
|
[Ae, i, p]
|
|
701
701
|
), Un = oe(
|
|
702
|
-
(
|
|
702
|
+
(E) => E >= w ? E != null ? "100%" : 0 : `${(E || 0) * 100 / w}%`,
|
|
703
703
|
[w]
|
|
704
704
|
);
|
|
705
705
|
U(() => {
|
|
706
706
|
a.length === 0 && A([]);
|
|
707
707
|
}, [a]), U(() => {
|
|
708
708
|
if (e) {
|
|
709
|
-
if (o ===
|
|
710
|
-
const
|
|
709
|
+
if (o === Te.RANKING) {
|
|
710
|
+
const E = [...e].sort((Q, xe) => (xe.value ?? 0) - (Q.value ?? 0)), Z = Re(E);
|
|
711
711
|
Z.length > 0 ? h(Z[0].value ?? 0) : h(1), f(Z);
|
|
712
|
-
} else if (o ===
|
|
712
|
+
} else if (o === Te.FIXED) {
|
|
713
713
|
h(Math.max(...e.map((Z) => Z.value ?? 0)));
|
|
714
|
-
const
|
|
715
|
-
f(
|
|
714
|
+
const E = Re(e);
|
|
715
|
+
f(E);
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
}, [
|
|
@@ -729,28 +729,28 @@ function is({
|
|
|
729
729
|
}, [J]), U(() => {
|
|
730
730
|
if (s)
|
|
731
731
|
return Zi({
|
|
732
|
-
start: (G.current || []).map((
|
|
733
|
-
...
|
|
734
|
-
value:
|
|
732
|
+
start: (G.current || []).map((E) => ({
|
|
733
|
+
...E,
|
|
734
|
+
value: E.value ?? 0
|
|
735
735
|
})),
|
|
736
|
-
end: g.map((
|
|
736
|
+
end: g.map((E) => ({ ...E, value: E.value ?? 0 })),
|
|
737
737
|
duration: 500,
|
|
738
|
-
drawFrame: (
|
|
739
|
-
requestRef:
|
|
738
|
+
drawFrame: (E) => P(E),
|
|
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]);
|
|
747
|
-
function
|
|
748
|
-
data:
|
|
747
|
+
function Xn({
|
|
748
|
+
data: E,
|
|
749
749
|
onCategoryClick: Z
|
|
750
750
|
}) {
|
|
751
|
-
const Q = t(
|
|
752
|
-
var
|
|
753
|
-
const st = (((
|
|
751
|
+
const Q = t(E.value ?? 0), [xe, Ye] = _(!1), be = re(null), lt = () => {
|
|
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), () => {
|
|
@@ -758,7 +758,7 @@ function is({
|
|
|
758
758
|
}), []);
|
|
759
759
|
const Zn = (st) => {
|
|
760
760
|
st.key === "Enter" && Z();
|
|
761
|
-
}, Jn = !b && a.length > 0 && !a.includes(
|
|
761
|
+
}, Jn = !b && a.length > 0 && !a.includes(E.name);
|
|
762
762
|
return /* @__PURE__ */ v(
|
|
763
763
|
Sn,
|
|
764
764
|
{
|
|
@@ -769,13 +769,13 @@ function is({
|
|
|
769
769
|
onKeyDown: u ? Zn : ct,
|
|
770
770
|
selectable: u,
|
|
771
771
|
unselected: Jn,
|
|
772
|
-
name:
|
|
772
|
+
name: E.name === Me ? Me : "",
|
|
773
773
|
tabIndex: u ? 0 : -1,
|
|
774
774
|
children: [
|
|
775
775
|
u && b && /* @__PURE__ */ n(ae, { item: !0, mr: 1, children: /* @__PURE__ */ n(
|
|
776
776
|
ln,
|
|
777
777
|
{
|
|
778
|
-
checked:
|
|
778
|
+
checked: C.includes(E.name),
|
|
779
779
|
tabIndex: -1
|
|
780
780
|
}
|
|
781
781
|
) }),
|
|
@@ -792,9 +792,9 @@ function is({
|
|
|
792
792
|
/* @__PURE__ */ n(
|
|
793
793
|
ue,
|
|
794
794
|
{
|
|
795
|
-
title: Dt(
|
|
795
|
+
title: Dt(E.name),
|
|
796
796
|
disableHoverListener: !xe,
|
|
797
|
-
children: /* @__PURE__ */ n(Ui, { variant: "body2", noWrap: !0, ref: be, children: Dt(
|
|
797
|
+
children: /* @__PURE__ */ n(Ui, { variant: "body2", noWrap: !0, ref: be, children: Dt(E.name) })
|
|
798
798
|
}
|
|
799
799
|
),
|
|
800
800
|
typeof Q == "object" && Q !== null ? /* @__PURE__ */ v("span", { children: [
|
|
@@ -805,29 +805,29 @@ function is({
|
|
|
805
805
|
]
|
|
806
806
|
}
|
|
807
807
|
),
|
|
808
|
-
/* @__PURE__ */ n(Vi, { className: "progressbar", item: !0, children: /* @__PURE__ */ n("div", { style: { width: Un(
|
|
808
|
+
/* @__PURE__ */ n(Vi, { className: "progressbar", item: !0, children: /* @__PURE__ */ n("div", { style: { width: Un(E.value ?? 0) } }) })
|
|
809
809
|
] })
|
|
810
810
|
]
|
|
811
811
|
}
|
|
812
812
|
);
|
|
813
813
|
}
|
|
814
|
-
if ((e == null ? void 0 : e.length) === 0 ||
|
|
815
|
-
const
|
|
816
|
-
index:
|
|
814
|
+
if ((e == null ? void 0 : e.length) === 0 || D) return /* @__PURE__ */ n(Mn, {});
|
|
815
|
+
const qn = ({
|
|
816
|
+
index: E,
|
|
817
817
|
style: Z
|
|
818
818
|
}) => {
|
|
819
|
-
const Q = L[
|
|
819
|
+
const Q = L[E];
|
|
820
820
|
return Q ? /* @__PURE__ */ n("div", { style: Z, children: /* @__PURE__ */ n(
|
|
821
|
-
|
|
821
|
+
Xn,
|
|
822
822
|
{
|
|
823
823
|
data: Q,
|
|
824
|
-
onCategoryClick: () => b ? ee(Q.name) :
|
|
824
|
+
onCategoryClick: () => b ? ee(Q.name) : X(Q.name)
|
|
825
825
|
}
|
|
826
826
|
) }) : null;
|
|
827
|
-
}, Kn = () => b ? 320 : x.length > 0 ? x.length * 38 : (r + 1) * 38;
|
|
828
|
-
return /* @__PURE__ */ v(
|
|
827
|
+
}, Kn = () => b ? 320 : L.length <= r ? L.length * 38 : x.length > 0 ? x.length * 38 : (r + 1) * 38;
|
|
828
|
+
return /* @__PURE__ */ v(Xi, { children: [
|
|
829
829
|
u && g.length > 0 && /* @__PURE__ */ v(Nt, { container: !0, children: [
|
|
830
|
-
/* @__PURE__ */ n(
|
|
830
|
+
/* @__PURE__ */ n(H, { variant: "caption", children: a.length > 0 ? I.formatMessage(
|
|
831
831
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
832
832
|
{ items: a.length }
|
|
833
833
|
) : I.formatMessage({ id: "c4r.widgets.category.all" }) }),
|
|
@@ -868,7 +868,7 @@ function is({
|
|
|
868
868
|
Ve,
|
|
869
869
|
{
|
|
870
870
|
onClick: j,
|
|
871
|
-
onKeyDown:
|
|
871
|
+
onKeyDown: q,
|
|
872
872
|
underline: "hover",
|
|
873
873
|
tabIndex: 0,
|
|
874
874
|
children: I.formatMessage({
|
|
@@ -903,24 +903,25 @@ function is({
|
|
|
903
903
|
/* @__PURE__ */ n(kn, { container: !0, item: !0, children: L.length ? /* @__PURE__ */ n(
|
|
904
904
|
xi,
|
|
905
905
|
{
|
|
906
|
+
outerElementType: (E) => /* @__PURE__ */ n("div", { ...E, "data-testid": "category-widget-list" }),
|
|
906
907
|
height: Kn(),
|
|
907
908
|
width: "100%",
|
|
908
909
|
itemCount: L.length,
|
|
909
910
|
itemSize: y.spacingValue * 4.5,
|
|
910
|
-
children:
|
|
911
|
+
children: qn
|
|
911
912
|
}
|
|
912
913
|
) : /* @__PURE__ */ v(S, { children: [
|
|
913
|
-
/* @__PURE__ */ n(
|
|
914
|
+
/* @__PURE__ */ n(H, { variant: "body2", children: I.formatMessage({
|
|
914
915
|
id: "c4r.widgets.category.noResults"
|
|
915
916
|
}) }),
|
|
916
|
-
/* @__PURE__ */ n(
|
|
917
|
+
/* @__PURE__ */ n(H, { component: "p", variant: "caption", mb: 2, children: I.formatMessage(
|
|
917
918
|
{ id: "c4r.widgets.category.noResultsMessage" },
|
|
918
919
|
{ searchValue: M }
|
|
919
920
|
) })
|
|
920
921
|
] }) }),
|
|
921
922
|
b && /* @__PURE__ */ n(Bt, { size: "small", onClick: we, children: I.formatMessage({ id: "c4r.widgets.category.apply" }) }),
|
|
922
923
|
e.length > r && p ? b ? /* @__PURE__ */ n(S, { mt: 1.5, children: /* @__PURE__ */ n(
|
|
923
|
-
|
|
924
|
+
$e,
|
|
924
925
|
{
|
|
925
926
|
size: "small",
|
|
926
927
|
color: "primary",
|
|
@@ -929,12 +930,13 @@ function is({
|
|
|
929
930
|
children: I.formatMessage({ id: "c4r.widgets.category.cancel" })
|
|
930
931
|
}
|
|
931
932
|
) }) : /* @__PURE__ */ n(S, { mt: 1.5, children: /* @__PURE__ */ n(
|
|
932
|
-
|
|
933
|
+
$e,
|
|
933
934
|
{
|
|
935
|
+
"data-testid": "show-all-categories-button",
|
|
934
936
|
size: "small",
|
|
935
937
|
color: "primary",
|
|
936
938
|
startIcon: /* @__PURE__ */ n(Qe, {}),
|
|
937
|
-
onClick:
|
|
939
|
+
onClick: Ce,
|
|
938
940
|
children: I.formatMessage(
|
|
939
941
|
{ id: "c4r.widgets.category.searchInfo" },
|
|
940
942
|
{ elements: Ae() }
|
|
@@ -943,7 +945,7 @@ function is({
|
|
|
943
945
|
) }) : null
|
|
944
946
|
] });
|
|
945
947
|
}
|
|
946
|
-
const
|
|
948
|
+
const Tn = () => /* @__PURE__ */ n(S, { pt: 0.5, children: /* @__PURE__ */ n(z, { height: 24, width: 120 }) }), nr = m("span")(() => ({
|
|
947
949
|
marginRight: "2px"
|
|
948
950
|
})), ir = m("span")(() => ({
|
|
949
951
|
marginLeft: "2px"
|
|
@@ -973,12 +975,12 @@ function rs({
|
|
|
973
975
|
l.current && cancelAnimationFrame(l.current);
|
|
974
976
|
}), [i, e, a]);
|
|
975
977
|
const p = t(o), c = typeof p == "object" && p !== null, y = p === Ge;
|
|
976
|
-
return u ? /* @__PURE__ */ n(
|
|
978
|
+
return u ? /* @__PURE__ */ n(Tn, {}) : c ? /* @__PURE__ */ v(H, { variant: "h5", component: "div", weight: "medium", children: [
|
|
977
979
|
/* @__PURE__ */ n(nr, { children: p.prefix }),
|
|
978
980
|
p.value,
|
|
979
981
|
/* @__PURE__ */ n(ir, { children: p.suffix })
|
|
980
982
|
] }) : /* @__PURE__ */ n(
|
|
981
|
-
|
|
983
|
+
H,
|
|
982
984
|
{
|
|
983
985
|
variant: "h5",
|
|
984
986
|
component: "div",
|
|
@@ -1077,7 +1079,7 @@ function dt(e, t, i) {
|
|
|
1077
1079
|
}
|
|
1078
1080
|
function ar({ height: e }) {
|
|
1079
1081
|
return /* @__PURE__ */ v(ie, { children: [
|
|
1080
|
-
/* @__PURE__ */ n(S, { mb: 2, children: /* @__PURE__ */ n(
|
|
1082
|
+
/* @__PURE__ */ n(S, { mb: 2, children: /* @__PURE__ */ n(z, { width: 48, height: 8 }) }),
|
|
1081
1083
|
/* @__PURE__ */ v(bn, { style: { height: e ?? at }, children: [
|
|
1082
1084
|
/* @__PURE__ */ n(he, { variant: "rectangular", height: "20%" }),
|
|
1083
1085
|
/* @__PURE__ */ n(he, { variant: "rectangular", height: "40%" }),
|
|
@@ -1135,16 +1137,16 @@ function os({
|
|
|
1135
1137
|
height: g = 200,
|
|
1136
1138
|
isLoading: f
|
|
1137
1139
|
}) {
|
|
1138
|
-
const w = se(), h = le(), b = ce(w), { showSkeleton: k } = ke(!!f), M = !!y && !!s, [
|
|
1140
|
+
const w = se(), h = le(), b = ce(w), { showSkeleton: k } = ke(!!f), M = !!y && !!s, [T, x] = _(), A = (I) => x(I), C = F(
|
|
1139
1141
|
() => fr(e, t, i, r),
|
|
1140
1142
|
[e, t, i, r]
|
|
1141
1143
|
), { onEvents: O, markAreaOptions: L } = or({
|
|
1142
|
-
data:
|
|
1144
|
+
data: C,
|
|
1143
1145
|
filterable: M,
|
|
1144
1146
|
selectedBars: d,
|
|
1145
1147
|
onSelectedBarsChange: s,
|
|
1146
|
-
echartsInstance:
|
|
1147
|
-
}),
|
|
1148
|
+
echartsInstance: T
|
|
1149
|
+
}), P = F(
|
|
1148
1150
|
() => ({
|
|
1149
1151
|
show: u,
|
|
1150
1152
|
trigger: "item",
|
|
@@ -1163,11 +1165,11 @@ function os({
|
|
|
1163
1165
|
}
|
|
1164
1166
|
}),
|
|
1165
1167
|
[h, u, p, o, a]
|
|
1166
|
-
),
|
|
1168
|
+
), $ = F(
|
|
1167
1169
|
() => ({
|
|
1168
1170
|
min: i,
|
|
1169
1171
|
max: r,
|
|
1170
|
-
interval: (r - i) /
|
|
1172
|
+
interval: (r - i) / C.length,
|
|
1171
1173
|
axisLine: {
|
|
1172
1174
|
show: !1
|
|
1173
1175
|
},
|
|
@@ -1193,7 +1195,7 @@ function os({
|
|
|
1193
1195
|
color: h.palette.black[60]
|
|
1194
1196
|
}
|
|
1195
1197
|
}),
|
|
1196
|
-
[i, r,
|
|
1198
|
+
[i, r, C.length, h, o]
|
|
1197
1199
|
), W = F(() => {
|
|
1198
1200
|
const I = {
|
|
1199
1201
|
margin: 0,
|
|
@@ -1201,9 +1203,9 @@ function os({
|
|
|
1201
1203
|
padding: [0, 0, B * 1.25, 0],
|
|
1202
1204
|
inside: !0,
|
|
1203
1205
|
color: (j) => {
|
|
1204
|
-
const
|
|
1206
|
+
const q = Math.max(...e.map((Y) => Y ?? Number.MIN_SAFE_INTEGER)) || 1;
|
|
1205
1207
|
let te = "transparent";
|
|
1206
|
-
return j >=
|
|
1208
|
+
return j >= q && (te = h.palette.black[60]), te;
|
|
1207
1209
|
},
|
|
1208
1210
|
...h.typography.overlineDelicate,
|
|
1209
1211
|
formatter: (j) => ge(a(j))
|
|
@@ -1211,7 +1213,7 @@ function os({
|
|
|
1211
1213
|
verticalAlign: "middle",
|
|
1212
1214
|
padding: [0, 0, 0, B * 0.5],
|
|
1213
1215
|
color: h.palette.black[60]
|
|
1214
|
-
},
|
|
1216
|
+
}, X = l === "dense" ? I : R;
|
|
1215
1217
|
return {
|
|
1216
1218
|
type: "value",
|
|
1217
1219
|
axisLine: {
|
|
@@ -1230,7 +1232,7 @@ function os({
|
|
|
1230
1232
|
show: !0,
|
|
1231
1233
|
showMaxLabel: !0,
|
|
1232
1234
|
showMinLabel: !1,
|
|
1233
|
-
...
|
|
1235
|
+
...X,
|
|
1234
1236
|
...h.typography.overlineDelicate,
|
|
1235
1237
|
formatter: (j) => ge(a(j))
|
|
1236
1238
|
}
|
|
@@ -1242,16 +1244,16 @@ function os({
|
|
|
1242
1244
|
a,
|
|
1243
1245
|
l
|
|
1244
1246
|
]), J = F(() => {
|
|
1245
|
-
const I = i === r &&
|
|
1246
|
-
const Y = d.length && !d.includes(
|
|
1247
|
+
const I = i === r && C.filter((j) => j[2] !== 0).length === 1, X = (I ? [C[0], C[C.length - 1]] : C).map((j, q) => {
|
|
1248
|
+
const Y = d.length && !d.includes(q) ? h.palette.black[25] : h.palette.secondary.main;
|
|
1247
1249
|
return { value: j, itemStyle: { color: Y } };
|
|
1248
1250
|
});
|
|
1249
1251
|
return {
|
|
1250
1252
|
type: "custom",
|
|
1251
1253
|
cursor: "pointer",
|
|
1252
1254
|
markArea: L,
|
|
1253
|
-
renderItem: function(j,
|
|
1254
|
-
const te = j.dataIndex ===
|
|
1255
|
+
renderItem: function(j, q) {
|
|
1256
|
+
const te = j.dataIndex === C.length - 1, Y = j.dataIndex === 0, K = X[j.dataIndex].itemStyle.color, de = q.value(0), we = q.value(1), ve = q.value(2), [V, ee] = q.coord([de, ve]), [ne, pe] = q.size([we - de, ve]);
|
|
1255
1257
|
return {
|
|
1256
1258
|
type: "rect",
|
|
1257
1259
|
shape: {
|
|
@@ -1276,13 +1278,13 @@ function os({
|
|
|
1276
1278
|
y: 2,
|
|
1277
1279
|
tooltip: [0, 1, 2]
|
|
1278
1280
|
},
|
|
1279
|
-
data:
|
|
1281
|
+
data: X,
|
|
1280
1282
|
animation: c
|
|
1281
1283
|
};
|
|
1282
1284
|
}, [
|
|
1283
1285
|
i,
|
|
1284
1286
|
r,
|
|
1285
|
-
|
|
1287
|
+
C,
|
|
1286
1288
|
L,
|
|
1287
1289
|
h.palette.black,
|
|
1288
1290
|
h.palette.secondary.main,
|
|
@@ -1297,13 +1299,13 @@ function os({
|
|
|
1297
1299
|
bottom: B * 0.5,
|
|
1298
1300
|
containLabel: !0
|
|
1299
1301
|
},
|
|
1300
|
-
tooltip:
|
|
1301
|
-
xAxis:
|
|
1302
|
+
tooltip: P,
|
|
1303
|
+
xAxis: $,
|
|
1302
1304
|
yAxis: W,
|
|
1303
1305
|
series: [J]
|
|
1304
1306
|
}),
|
|
1305
|
-
[
|
|
1306
|
-
),
|
|
1307
|
+
[P, $, W, J]
|
|
1308
|
+
), D = d.reduce(
|
|
1307
1309
|
(I, R) => I += e[R] ?? 0,
|
|
1308
1310
|
0
|
|
1309
1311
|
), N = (I) => {
|
|
@@ -1311,11 +1313,11 @@ function os({
|
|
|
1311
1313
|
};
|
|
1312
1314
|
return k ? /* @__PURE__ */ n(ar, { height: g }) : /* @__PURE__ */ v("div", { children: [
|
|
1313
1315
|
M && /* @__PURE__ */ v(sr, { container: !0, children: [
|
|
1314
|
-
/* @__PURE__ */ n(
|
|
1316
|
+
/* @__PURE__ */ n(H, { variant: "caption", weight: "strong", children: d.length > 0 ? b.formatMessage(
|
|
1315
1317
|
{ id: "c4r.widgets.histogram.selectedItems" },
|
|
1316
1318
|
{
|
|
1317
1319
|
items: ge(
|
|
1318
|
-
a(
|
|
1320
|
+
a(D)
|
|
1319
1321
|
)
|
|
1320
1322
|
}
|
|
1321
1323
|
) : b.formatMessage({ id: "c4r.widgets.histogram.all" }) }),
|
|
@@ -1359,7 +1361,7 @@ function fr(e, t, i, r) {
|
|
|
1359
1361
|
);
|
|
1360
1362
|
}
|
|
1361
1363
|
function mr(e, t, i, r) {
|
|
1362
|
-
const o = le(), a = F(() => t ===
|
|
1364
|
+
const o = le(), a = F(() => t === Te.RANKING ? e.slice().sort((s, u) => (u.value ?? 0) - (s.value ?? 0)) : e, [e, t]), l = F(() => {
|
|
1363
1365
|
const s = [];
|
|
1364
1366
|
let u = 0;
|
|
1365
1367
|
for (const p of a)
|
|
@@ -1436,10 +1438,10 @@ function xr({
|
|
|
1436
1438
|
}, [a, o]);
|
|
1437
1439
|
const { name: l, percentage: d, color: s } = r ?? {};
|
|
1438
1440
|
return r ? /* @__PURE__ */ v(yr, { children: [
|
|
1439
|
-
/* @__PURE__ */ n(
|
|
1441
|
+
/* @__PURE__ */ n(H, { variant: "h5", children: d }),
|
|
1440
1442
|
/* @__PURE__ */ v(wr, { children: [
|
|
1441
1443
|
/* @__PURE__ */ n(vr, { bgcolor: s, component: "span" }),
|
|
1442
|
-
/* @__PURE__ */ n(
|
|
1444
|
+
/* @__PURE__ */ n(H, { component: "span", variant: "body2", noWrap: !0, children: l })
|
|
1443
1445
|
] })
|
|
1444
1446
|
] }) : null;
|
|
1445
1447
|
}
|
|
@@ -1453,7 +1455,7 @@ function kr(e, t, i) {
|
|
|
1453
1455
|
let r = 0;
|
|
1454
1456
|
return t !== 0 && (r = e / t * 100), i ? i(r) : `${r}%`;
|
|
1455
1457
|
}
|
|
1456
|
-
const
|
|
1458
|
+
const Ht = 32, Sr = m(S)(({ theme: e }) => ({
|
|
1457
1459
|
display: "flex",
|
|
1458
1460
|
alignItems: "center",
|
|
1459
1461
|
justifyContent: "center",
|
|
@@ -1466,14 +1468,14 @@ const zt = 32, Sr = m(S)(({ theme: e }) => ({
|
|
|
1466
1468
|
})), Ir = m(_i)(() => ({
|
|
1467
1469
|
position: "absolute",
|
|
1468
1470
|
zIndex: 1
|
|
1469
|
-
})),
|
|
1471
|
+
})), Tr = m("div")(({ theme: e }) => ({
|
|
1470
1472
|
display: "flex",
|
|
1471
1473
|
flexDirection: "column",
|
|
1472
1474
|
alignItems: "center",
|
|
1473
1475
|
gap: e.spacing(1),
|
|
1474
1476
|
position: "absolute",
|
|
1475
1477
|
zIndex: 2
|
|
1476
|
-
})),
|
|
1478
|
+
})), Cr = m(S)(({ theme: e }) => ({
|
|
1477
1479
|
display: "flex",
|
|
1478
1480
|
alignItems: "center",
|
|
1479
1481
|
gap: e.spacing(2),
|
|
@@ -1483,12 +1485,12 @@ const zt = 32, Sr = m(S)(({ theme: e }) => ({
|
|
|
1483
1485
|
alignItems: "center",
|
|
1484
1486
|
gap: e.spacing(1.5)
|
|
1485
1487
|
}));
|
|
1486
|
-
function
|
|
1487
|
-
const t = parseInt(String(e), 10) || at, i = t -
|
|
1488
|
+
function Cn({ height: e }) {
|
|
1489
|
+
const t = parseInt(String(e), 10) || at, i = t - Ht, r = i - Ht;
|
|
1488
1490
|
return /* @__PURE__ */ v(S, { mt: 0.5, children: [
|
|
1489
|
-
/* @__PURE__ */ n(
|
|
1491
|
+
/* @__PURE__ */ n(z, { height: 8, width: 64 }),
|
|
1490
1492
|
/* @__PURE__ */ n(Sr, { height: t, children: /* @__PURE__ */ v(Mr, { children: [
|
|
1491
|
-
/* @__PURE__ */ n(
|
|
1493
|
+
/* @__PURE__ */ n(z, { variant: "circular", width: i, height: i }),
|
|
1492
1494
|
/* @__PURE__ */ n(
|
|
1493
1495
|
Ir,
|
|
1494
1496
|
{
|
|
@@ -1497,14 +1499,14 @@ function Tn({ height: e }) {
|
|
|
1497
1499
|
height: r
|
|
1498
1500
|
}
|
|
1499
1501
|
),
|
|
1500
|
-
/* @__PURE__ */ v(
|
|
1501
|
-
/* @__PURE__ */ n(
|
|
1502
|
-
/* @__PURE__ */ n(
|
|
1502
|
+
/* @__PURE__ */ v(Tr, { children: [
|
|
1503
|
+
/* @__PURE__ */ n(z, { height: 24, width: 72 }),
|
|
1504
|
+
/* @__PURE__ */ n(z, { height: 8, width: 48 })
|
|
1503
1505
|
] })
|
|
1504
1506
|
] }) }),
|
|
1505
|
-
/* @__PURE__ */ n(
|
|
1506
|
-
/* @__PURE__ */ n(
|
|
1507
|
-
/* @__PURE__ */ n(
|
|
1507
|
+
/* @__PURE__ */ n(Cr, { children: [...Array(2)].map((o, a) => /* @__PURE__ */ v(Ar, { children: [
|
|
1508
|
+
/* @__PURE__ */ n(z, { variant: "circular", width: 8, height: 8 }),
|
|
1509
|
+
/* @__PURE__ */ n(z, { width: 48, height: 8 })
|
|
1508
1510
|
] }, a)) })
|
|
1509
1511
|
] });
|
|
1510
1512
|
}
|
|
@@ -1529,7 +1531,7 @@ const Er = m(S)(({ theme: e }) => ({
|
|
|
1529
1531
|
textOverflow: "ellipsis",
|
|
1530
1532
|
whiteSpace: "nowrap",
|
|
1531
1533
|
cursor: "pointer"
|
|
1532
|
-
})),
|
|
1534
|
+
})), $r = m(S)(({ theme: e }) => ({
|
|
1533
1535
|
display: "inline-block",
|
|
1534
1536
|
position: "absolute",
|
|
1535
1537
|
left: e.spacing(-2),
|
|
@@ -1538,7 +1540,7 @@ const Er = m(S)(({ theme: e }) => ({
|
|
|
1538
1540
|
zIndex: 1,
|
|
1539
1541
|
width: e.spacing(2.5),
|
|
1540
1542
|
background: `linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, ${e.palette.background.paper} 100%)`
|
|
1541
|
-
})),
|
|
1543
|
+
})), Pr = m(S)(({ theme: e }) => ({
|
|
1542
1544
|
position: "absolute",
|
|
1543
1545
|
padding: e.spacing(0.25, 1),
|
|
1544
1546
|
top: e.spacing(0),
|
|
@@ -1560,7 +1562,7 @@ function An({
|
|
|
1560
1562
|
selectedCategories: t,
|
|
1561
1563
|
onCategoryClick: i
|
|
1562
1564
|
}) {
|
|
1563
|
-
var M,
|
|
1565
|
+
var M, T;
|
|
1564
1566
|
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
1567
|
function w() {
|
|
1566
1568
|
d(l + 1);
|
|
@@ -1572,10 +1574,10 @@ function An({
|
|
|
1572
1574
|
x.key === "Enter" && (i == null || i(A));
|
|
1573
1575
|
}
|
|
1574
1576
|
const k = oe(() => {
|
|
1575
|
-
var A,
|
|
1577
|
+
var A, C, O;
|
|
1576
1578
|
const x = !!c.current && c.current.scrollWidth > c.current.clientWidth;
|
|
1577
1579
|
a(x), u(
|
|
1578
|
-
x && c.current ? (((A = p.current) == null ? void 0 : A.clientWidth) ?? 0) - (((
|
|
1580
|
+
x && c.current ? (((A = p.current) == null ? void 0 : A.clientWidth) ?? 0) - (((C = y.current) == null ? void 0 : C.clientWidth) ?? 70) : (((O = p.current) == null ? void 0 : O.clientWidth) ?? 0) - 12 || 500
|
|
1579
1581
|
);
|
|
1580
1582
|
}, [p, c, y]);
|
|
1581
1583
|
return U(() => {
|
|
@@ -1583,7 +1585,7 @@ function An({
|
|
|
1583
1585
|
}, [
|
|
1584
1586
|
c,
|
|
1585
1587
|
(M = c.current) == null ? void 0 : M.scrollWidth,
|
|
1586
|
-
(
|
|
1588
|
+
(T = c.current) == null ? void 0 : T.clientWidth,
|
|
1587
1589
|
k,
|
|
1588
1590
|
l
|
|
1589
1591
|
]), U(() => {
|
|
@@ -1605,7 +1607,7 @@ function An({
|
|
|
1605
1607
|
},
|
|
1606
1608
|
children: e.map((x, A) => {
|
|
1607
1609
|
if (A < l) return null;
|
|
1608
|
-
const
|
|
1610
|
+
const C = t.length === 0 || t.includes(x.name);
|
|
1609
1611
|
return /* @__PURE__ */ v(
|
|
1610
1612
|
Dr,
|
|
1611
1613
|
{
|
|
@@ -1619,14 +1621,14 @@ function An({
|
|
|
1619
1621
|
/* @__PURE__ */ n(
|
|
1620
1622
|
Or,
|
|
1621
1623
|
{
|
|
1622
|
-
color:
|
|
1624
|
+
color: C ? x.color : r.palette.text.disabled
|
|
1623
1625
|
}
|
|
1624
1626
|
),
|
|
1625
1627
|
/* @__PURE__ */ n(
|
|
1626
|
-
|
|
1628
|
+
H,
|
|
1627
1629
|
{
|
|
1628
1630
|
variant: "overline",
|
|
1629
|
-
color:
|
|
1631
|
+
color: C ? void 0 : "text.disabled",
|
|
1630
1632
|
children: x.name
|
|
1631
1633
|
}
|
|
1632
1634
|
)
|
|
@@ -1637,8 +1639,8 @@ function An({
|
|
|
1637
1639
|
})
|
|
1638
1640
|
}
|
|
1639
1641
|
),
|
|
1640
|
-
(o || l > 0) && /* @__PURE__ */ v(
|
|
1641
|
-
/* @__PURE__ */ n(
|
|
1642
|
+
(o || l > 0) && /* @__PURE__ */ v(Pr, { ref: y, children: [
|
|
1643
|
+
/* @__PURE__ */ n($r, {}),
|
|
1642
1644
|
/* @__PURE__ */ n(
|
|
1643
1645
|
ue,
|
|
1644
1646
|
{
|
|
@@ -1700,7 +1702,7 @@ const ht = "232px", Wr = m(ae)(({ theme: e }) => ({
|
|
|
1700
1702
|
right: 0,
|
|
1701
1703
|
left: 0,
|
|
1702
1704
|
bottom: 0
|
|
1703
|
-
})),
|
|
1705
|
+
})), zt = [], Nr = {}, Br = (e) => e;
|
|
1704
1706
|
function as({
|
|
1705
1707
|
name: e,
|
|
1706
1708
|
data: t,
|
|
@@ -1710,21 +1712,21 @@ function as({
|
|
|
1710
1712
|
height: a = ht,
|
|
1711
1713
|
width: l = ht,
|
|
1712
1714
|
labels: d = Nr,
|
|
1713
|
-
colors: s =
|
|
1715
|
+
colors: s = zt,
|
|
1714
1716
|
animation: u = !0,
|
|
1715
1717
|
filterable: p = !0,
|
|
1716
|
-
selectedCategories: c =
|
|
1718
|
+
selectedCategories: c = zt,
|
|
1717
1719
|
onSelectedCategoriesChange: y,
|
|
1718
1720
|
isLoading: g,
|
|
1719
1721
|
maxItems: f = 11,
|
|
1720
|
-
order: w =
|
|
1722
|
+
order: w = Te.RANKING
|
|
1721
1723
|
}) {
|
|
1722
|
-
const h = le(), b = mr(t, w, f, s), { showSkeleton: k } = ke(!!g), M = se(),
|
|
1724
|
+
const h = le(), b = mr(t, w, f, s), { showSkeleton: k } = ke(!!g), M = se(), T = ce(M), x = F(() => o || ((G) => `${M.formatNumber(G, {
|
|
1723
1725
|
maximumFractionDigits: 2,
|
|
1724
1726
|
minimumFractionDigits: 2
|
|
1725
1727
|
})}%`), [M, o]), A = F(() => {
|
|
1726
1728
|
let G;
|
|
1727
|
-
return r && (G = (
|
|
1729
|
+
return r && (G = (D) => r(D, i, x)), {
|
|
1728
1730
|
padding: [B * 0.5, B],
|
|
1729
1731
|
backgroundColor: h.palette.black[90],
|
|
1730
1732
|
borderColor: "transparent",
|
|
@@ -1738,21 +1740,21 @@ function as({
|
|
|
1738
1740
|
r,
|
|
1739
1741
|
i,
|
|
1740
1742
|
x
|
|
1741
|
-
]),
|
|
1743
|
+
]), C = F(
|
|
1742
1744
|
() => [
|
|
1743
1745
|
{
|
|
1744
1746
|
type: "pie",
|
|
1745
1747
|
name: e,
|
|
1746
1748
|
animation: u,
|
|
1747
1749
|
data: b.map((G) => {
|
|
1748
|
-
const
|
|
1749
|
-
return d != null && d[
|
|
1750
|
-
...
|
|
1750
|
+
const D = { ...G }, N = (c == null ? void 0 : c.length) && !c.includes(D.name);
|
|
1751
|
+
return d != null && d[D.name] && (D.name = d[D.name]), N ? {
|
|
1752
|
+
...D,
|
|
1751
1753
|
disabled: !0,
|
|
1752
1754
|
itemStyle: { color: h.palette.black[25] }
|
|
1753
1755
|
} : {
|
|
1754
|
-
...
|
|
1755
|
-
itemStyle: { color:
|
|
1756
|
+
...D,
|
|
1757
|
+
itemStyle: { color: D.color }
|
|
1756
1758
|
};
|
|
1757
1759
|
}),
|
|
1758
1760
|
radius: ["74%", "90%"],
|
|
@@ -1782,41 +1784,41 @@ function as({
|
|
|
1782
1784
|
legend: {
|
|
1783
1785
|
show: !1
|
|
1784
1786
|
},
|
|
1785
|
-
series:
|
|
1787
|
+
series: C
|
|
1786
1788
|
}),
|
|
1787
|
-
[A,
|
|
1789
|
+
[A, C]
|
|
1788
1790
|
), L = oe(
|
|
1789
1791
|
(G) => {
|
|
1790
1792
|
if (y) {
|
|
1791
|
-
const
|
|
1793
|
+
const D = [...c], { name: N } = b[G.dataIndex];
|
|
1792
1794
|
if (N === Oe)
|
|
1793
1795
|
return;
|
|
1794
|
-
const I =
|
|
1795
|
-
I === -1 ?
|
|
1796
|
+
const I = D.indexOf(N);
|
|
1797
|
+
I === -1 ? D.push(N) : D.splice(I, 1), y(D);
|
|
1796
1798
|
}
|
|
1797
1799
|
},
|
|
1798
1800
|
[b, y, c]
|
|
1799
|
-
),
|
|
1801
|
+
), P = oe(
|
|
1800
1802
|
(G) => {
|
|
1801
1803
|
if (y) {
|
|
1802
|
-
const
|
|
1803
|
-
N === -1 ?
|
|
1804
|
+
const D = [...c], N = D.indexOf(G);
|
|
1805
|
+
N === -1 ? D.push(G) : D.splice(N, 1), y(D);
|
|
1804
1806
|
}
|
|
1805
1807
|
},
|
|
1806
1808
|
[y, c]
|
|
1807
|
-
),
|
|
1809
|
+
), $ = {
|
|
1808
1810
|
...p && { click: L }
|
|
1809
1811
|
}, W = () => {
|
|
1810
1812
|
y == null || y([]);
|
|
1811
1813
|
}, J = (G) => {
|
|
1812
1814
|
G.key === "Enter" && W();
|
|
1813
1815
|
};
|
|
1814
|
-
return k ? /* @__PURE__ */ n(
|
|
1816
|
+
return k ? /* @__PURE__ */ n(Cn, { height: a }) : /* @__PURE__ */ v(ie, { children: [
|
|
1815
1817
|
p && /* @__PURE__ */ v(Wr, { container: !0, children: [
|
|
1816
|
-
/* @__PURE__ */ n(
|
|
1818
|
+
/* @__PURE__ */ n(H, { variant: "caption", color: "textSecondary", children: c.length ? T.formatMessage(
|
|
1817
1819
|
{ id: "c4r.widgets.pie.selectedItems" },
|
|
1818
1820
|
{ items: c.length }
|
|
1819
|
-
) :
|
|
1821
|
+
) : T.formatMessage({ id: "c4r.widgets.pie.allSelected" }) }),
|
|
1820
1822
|
c.length > 0 && /* @__PURE__ */ n(
|
|
1821
1823
|
ye,
|
|
1822
1824
|
{
|
|
@@ -1824,7 +1826,7 @@ function as({
|
|
|
1824
1826
|
onClick: W,
|
|
1825
1827
|
onKeyDown: J,
|
|
1826
1828
|
tabIndex: 0,
|
|
1827
|
-
children:
|
|
1829
|
+
children: T.formatMessage({ id: "c4r.widgets.pie.clear" })
|
|
1828
1830
|
}
|
|
1829
1831
|
)
|
|
1830
1832
|
] }),
|
|
@@ -1841,7 +1843,7 @@ function as({
|
|
|
1841
1843
|
Fr,
|
|
1842
1844
|
{
|
|
1843
1845
|
option: O,
|
|
1844
|
-
onEvents:
|
|
1846
|
+
onEvents: $,
|
|
1845
1847
|
lazyUpdate: !0,
|
|
1846
1848
|
style: { height: a, width: l }
|
|
1847
1849
|
}
|
|
@@ -1852,7 +1854,7 @@ function as({
|
|
|
1852
1854
|
{
|
|
1853
1855
|
series: b,
|
|
1854
1856
|
selectedCategories: c,
|
|
1855
|
-
onCategoryClick: y &&
|
|
1857
|
+
onCategoryClick: y && P
|
|
1856
1858
|
}
|
|
1857
1859
|
)
|
|
1858
1860
|
] });
|
|
@@ -1868,27 +1870,27 @@ function _r(e, t, i) {
|
|
|
1868
1870
|
<p style="display:flex;align-items:center;font-size: 11px;font-weight:500;line-height:1.454;margin:0;"><span style="${d}"></span> <span style="margin:0 4px;font-weight:400;">${o}</span> (${a})</p></div>
|
|
1869
1871
|
`.trim();
|
|
1870
1872
|
}
|
|
1871
|
-
const
|
|
1873
|
+
const Hr = m(ae)(({ theme: e }) => ({
|
|
1872
1874
|
position: "relative",
|
|
1873
1875
|
alignItems: "center",
|
|
1874
1876
|
height: e.spacing(4)
|
|
1875
|
-
})),
|
|
1877
|
+
})), zr = m(ae)(({ theme: e }) => ({
|
|
1876
1878
|
position: "absolute",
|
|
1877
1879
|
zIndex: 1,
|
|
1878
1880
|
padding: e.spacing(0, 3)
|
|
1879
1881
|
}));
|
|
1880
1882
|
function jr() {
|
|
1881
1883
|
return /* @__PURE__ */ v(ae, { container: !0, children: [
|
|
1882
|
-
/* @__PURE__ */ v(
|
|
1883
|
-
/* @__PURE__ */ v(
|
|
1884
|
+
/* @__PURE__ */ v(Hr, { container: !0, item: !0, children: [
|
|
1885
|
+
/* @__PURE__ */ v(zr, { container: !0, item: !0, justifyContent: "space-between", children: [
|
|
1884
1886
|
/* @__PURE__ */ n(Rt, { variant: "circular", width: 12, height: 12 }),
|
|
1885
1887
|
/* @__PURE__ */ n(Rt, { variant: "circular", width: 12, height: 12 })
|
|
1886
1888
|
] }),
|
|
1887
|
-
/* @__PURE__ */ n(
|
|
1889
|
+
/* @__PURE__ */ n(z, { height: 2, width: "100%" })
|
|
1888
1890
|
] }),
|
|
1889
1891
|
/* @__PURE__ */ v(ae, { container: !0, item: !0, justifyContent: "space-between", children: [
|
|
1890
|
-
/* @__PURE__ */ n(
|
|
1891
|
-
/* @__PURE__ */ n(
|
|
1892
|
+
/* @__PURE__ */ n(z, { width: 56, height: 32 }),
|
|
1893
|
+
/* @__PURE__ */ n(z, { width: 56, height: 32 })
|
|
1892
1894
|
] })
|
|
1893
1895
|
] });
|
|
1894
1896
|
}
|
|
@@ -1924,7 +1926,7 @@ const Yr = m(S)(() => ({
|
|
|
1924
1926
|
"& .MuiSlider-rail": {
|
|
1925
1927
|
color: e.text.hint
|
|
1926
1928
|
}
|
|
1927
|
-
})),
|
|
1929
|
+
})), Xr = m(xt)(({ theme: { palette: e, spacing: t } }) => ({
|
|
1928
1930
|
pointerEvents: "none",
|
|
1929
1931
|
position: "absolute",
|
|
1930
1932
|
zIndex: 1,
|
|
@@ -1978,8 +1980,8 @@ function ls({
|
|
|
1978
1980
|
u([...x]), d([...x]), f && f([...x]);
|
|
1979
1981
|
};
|
|
1980
1982
|
function h(x, A) {
|
|
1981
|
-
const
|
|
1982
|
-
A === 0 && u([
|
|
1983
|
+
const C = x.target.value === "" ? "" : Number(x.target.value);
|
|
1984
|
+
A === 0 && u([C, s[1]]), A === 1 && u([s[0], C]);
|
|
1983
1985
|
}
|
|
1984
1986
|
const b = t !== s[0] || i !== s[1];
|
|
1985
1987
|
U(() => {
|
|
@@ -1988,21 +1990,21 @@ function ls({
|
|
|
1988
1990
|
function k(x) {
|
|
1989
1991
|
let A = s[x];
|
|
1990
1992
|
A === "" && (A = l[x]), A > i && (A = i), A < t && (A = t);
|
|
1991
|
-
const
|
|
1992
|
-
w(
|
|
1993
|
+
const C = x === 0 ? [A, s[1]] : [s[0], A];
|
|
1994
|
+
w(C.sort((O, L) => O - L));
|
|
1993
1995
|
}
|
|
1994
1996
|
const M = () => {
|
|
1995
1997
|
w([t, i]);
|
|
1996
1998
|
};
|
|
1997
|
-
function
|
|
1999
|
+
function T(x) {
|
|
1998
2000
|
x.key === "Enter" && M();
|
|
1999
2001
|
}
|
|
2000
2002
|
return y ? /* @__PURE__ */ n(jr, {}) : /* @__PURE__ */ v(Yr, { children: [
|
|
2001
|
-
/* @__PURE__ */ n(Vr, { children: b && /* @__PURE__ */ n(
|
|
2003
|
+
/* @__PURE__ */ n(Vr, { children: b && /* @__PURE__ */ n(H, { variant: "caption", color: "primary", children: /* @__PURE__ */ n(
|
|
2002
2004
|
Gr,
|
|
2003
2005
|
{
|
|
2004
2006
|
onClick: M,
|
|
2005
|
-
onKeyDown:
|
|
2007
|
+
onKeyDown: T,
|
|
2006
2008
|
tabIndex: 0,
|
|
2007
2009
|
component: "button",
|
|
2008
2010
|
underline: "hover",
|
|
@@ -2021,7 +2023,7 @@ function ls({
|
|
|
2021
2023
|
}
|
|
2022
2024
|
),
|
|
2023
2025
|
r && r.length === 2 && /* @__PURE__ */ n(
|
|
2024
|
-
|
|
2026
|
+
Xr,
|
|
2025
2027
|
{
|
|
2026
2028
|
getAriaLabel: (x) => x === 0 ? c.formatMessage({ id: "c4r.widgets.range.minLimit" }) : c.formatMessage({ id: "c4r.widgets.range.maxLimit" }),
|
|
2027
2029
|
value: r,
|
|
@@ -2069,7 +2071,7 @@ function ls({
|
|
|
2069
2071
|
] })
|
|
2070
2072
|
] });
|
|
2071
2073
|
}
|
|
2072
|
-
const
|
|
2074
|
+
const qr = m(bn)(({ theme: e }) => ({
|
|
2073
2075
|
flexDirection: "column",
|
|
2074
2076
|
alignItems: "center",
|
|
2075
2077
|
justifyContent: "center",
|
|
@@ -2092,12 +2094,12 @@ function Zr({ height: e }) {
|
|
|
2092
2094
|
return Math.floor(Math.random() * 5);
|
|
2093
2095
|
}
|
|
2094
2096
|
return /* @__PURE__ */ v(S, { height: e ?? at, children: [
|
|
2095
|
-
/* @__PURE__ */ n(S, { mb: 4, children: /* @__PURE__ */ n(
|
|
2096
|
-
/* @__PURE__ */ n(
|
|
2097
|
+
/* @__PURE__ */ n(S, { mb: 4, children: /* @__PURE__ */ n(z, { width: 48, height: 8 }) }),
|
|
2098
|
+
/* @__PURE__ */ n(qr, { height: "80%", children: [...Array(3)].map((i, r) => (
|
|
2097
2099
|
// Every row is placed with an incremental margin left to reinforce the effect of a scatter plot
|
|
2098
2100
|
/* @__PURE__ */ n(Kr, { ml: r * 3, children: [...Array(4)].map((o, a) => (
|
|
2099
2101
|
// Random margins are used to create the effect of a scatter plot
|
|
2100
|
-
/* @__PURE__ */ n(S, { mt: t(), ml: t(), children: /* @__PURE__ */ n(
|
|
2102
|
+
/* @__PURE__ */ n(S, { mt: t(), ml: t(), children: /* @__PURE__ */ n(z, { variant: "circular", width: 12, height: 12 }) }, a)
|
|
2101
2103
|
)) }, r)
|
|
2102
2104
|
)) })
|
|
2103
2105
|
] });
|
|
@@ -2226,7 +2228,7 @@ function Ue({
|
|
|
2226
2228
|
const a = [72, 48, 96, 32, 64], l = o % a.length;
|
|
2227
2229
|
return a[l];
|
|
2228
2230
|
}
|
|
2229
|
-
return [...Array(t)].map((o, a) => /* @__PURE__ */ n(bt, { children: /* @__PURE__ */ n(
|
|
2231
|
+
return [...Array(t)].map((o, a) => /* @__PURE__ */ n(bt, { children: /* @__PURE__ */ n(z, { width: e ?? r(i), height: 8 }) }, a));
|
|
2230
2232
|
}
|
|
2231
2233
|
const ro = m(S)(({ theme: e }) => ({
|
|
2232
2234
|
display: "flex",
|
|
@@ -2259,11 +2261,11 @@ function ao({
|
|
|
2259
2261
|
) })
|
|
2260
2262
|
] }) }),
|
|
2261
2263
|
i && /* @__PURE__ */ v(ro, { children: [
|
|
2262
|
-
/* @__PURE__ */ n(
|
|
2263
|
-
/* @__PURE__ */ n(S, { mr: 1, children: /* @__PURE__ */ n(
|
|
2264
|
-
/* @__PURE__ */ n(
|
|
2265
|
-
/* @__PURE__ */ n(
|
|
2266
|
-
/* @__PURE__ */ n(
|
|
2264
|
+
/* @__PURE__ */ n(z, { width: 56, height: 8 }),
|
|
2265
|
+
/* @__PURE__ */ n(S, { mr: 1, children: /* @__PURE__ */ n(z, { width: 52, height: 16 }) }),
|
|
2266
|
+
/* @__PURE__ */ n(z, { width: 60, height: 8 }),
|
|
2267
|
+
/* @__PURE__ */ n(z, { width: 16, height: 16 }),
|
|
2268
|
+
/* @__PURE__ */ n(z, { width: 16, height: 16 })
|
|
2267
2269
|
] })
|
|
2268
2270
|
] });
|
|
2269
2271
|
}
|
|
@@ -2314,36 +2316,36 @@ function cs({
|
|
|
2314
2316
|
height: b,
|
|
2315
2317
|
dense: k = !1,
|
|
2316
2318
|
isLoading: M,
|
|
2317
|
-
lastPageTooltip:
|
|
2319
|
+
lastPageTooltip: T
|
|
2318
2320
|
}) {
|
|
2319
2321
|
var G;
|
|
2320
|
-
const x = re(null), A = se(),
|
|
2322
|
+
const x = re(null), A = se(), C = ce(A), { showSkeleton: O } = ke(!!M);
|
|
2321
2323
|
function L({
|
|
2322
|
-
from:
|
|
2324
|
+
from: D,
|
|
2323
2325
|
to: N,
|
|
2324
2326
|
count: I
|
|
2325
2327
|
}) {
|
|
2326
|
-
return
|
|
2328
|
+
return C.formatMessage(
|
|
2327
2329
|
{ id: "c4r.widgets.table.of" },
|
|
2328
|
-
{ from:
|
|
2330
|
+
{ from: D, to: N, count: I }
|
|
2329
2331
|
);
|
|
2330
2332
|
}
|
|
2331
|
-
function
|
|
2332
|
-
l(r ===
|
|
2333
|
+
function P(D) {
|
|
2334
|
+
l(r === D && o === "asc" ? "desc" : "asc"), a(D);
|
|
2333
2335
|
}
|
|
2334
|
-
function
|
|
2336
|
+
function $(D, N) {
|
|
2335
2337
|
p(N);
|
|
2336
2338
|
}
|
|
2337
|
-
function W(
|
|
2338
|
-
g(parseInt(
|
|
2339
|
+
function W(D) {
|
|
2340
|
+
g(parseInt(D.target.value, 10)), p(0);
|
|
2339
2341
|
}
|
|
2340
2342
|
const J = { height: void 0 };
|
|
2341
2343
|
if (b) {
|
|
2342
|
-
const
|
|
2344
|
+
const D = Math.max(
|
|
2343
2345
|
((G = x == null ? void 0 : x.current) == null ? void 0 : G.clientHeight) ?? 0,
|
|
2344
2346
|
d ? B * 6 : 0
|
|
2345
2347
|
);
|
|
2346
|
-
J.height = `calc(${b} - ${
|
|
2348
|
+
J.height = `calc(${b} - ${D}px)`;
|
|
2347
2349
|
}
|
|
2348
2350
|
return O ? /* @__PURE__ */ n(
|
|
2349
2351
|
ao,
|
|
@@ -2362,7 +2364,7 @@ function cs({
|
|
|
2362
2364
|
sorting: i,
|
|
2363
2365
|
sortBy: r,
|
|
2364
2366
|
sortDirection: o,
|
|
2365
|
-
onSort:
|
|
2367
|
+
onSort: P
|
|
2366
2368
|
}
|
|
2367
2369
|
),
|
|
2368
2370
|
/* @__PURE__ */ n(
|
|
@@ -2381,7 +2383,7 @@ function cs({
|
|
|
2381
2383
|
{
|
|
2382
2384
|
ref: x,
|
|
2383
2385
|
rowsPerPageOptions: y,
|
|
2384
|
-
labelRowsPerPage:
|
|
2386
|
+
labelRowsPerPage: C.formatMessage({
|
|
2385
2387
|
id: "c4r.widgets.table.rowsPerPage"
|
|
2386
2388
|
}),
|
|
2387
2389
|
labelDisplayedRows: L,
|
|
@@ -2389,7 +2391,7 @@ function cs({
|
|
|
2389
2391
|
count: s,
|
|
2390
2392
|
rowsPerPage: c,
|
|
2391
2393
|
page: u,
|
|
2392
|
-
onPageChange:
|
|
2394
|
+
onPageChange: $,
|
|
2393
2395
|
onRowsPerPageChange: W,
|
|
2394
2396
|
ActionsComponent: () => /* @__PURE__ */ n(
|
|
2395
2397
|
wi,
|
|
@@ -2397,8 +2399,8 @@ function cs({
|
|
|
2397
2399
|
count: s,
|
|
2398
2400
|
rowsPerPage: c,
|
|
2399
2401
|
page: u,
|
|
2400
|
-
onPageChange:
|
|
2401
|
-
lastPageTooltip:
|
|
2402
|
+
onPageChange: $,
|
|
2403
|
+
lastPageTooltip: T
|
|
2402
2404
|
}
|
|
2403
2405
|
)
|
|
2404
2406
|
}
|
|
@@ -2519,7 +2521,7 @@ function yo(e) {
|
|
|
2519
2521
|
return t.setDate(r), t.setHours(0, 0, 0, 0), t.getTime();
|
|
2520
2522
|
}
|
|
2521
2523
|
var Se = /* @__PURE__ */ ((e) => (e.YEARS = "year", e.MONTHS = "month", e.WEEKS = "week", e.DAYS = "day", e.HOURS = "hour", e.MINUTES = "minute", e.SECONDS = "second", e))(Se || {});
|
|
2522
|
-
const
|
|
2524
|
+
const Tt = {
|
|
2523
2525
|
year: Ee,
|
|
2524
2526
|
month: Ee,
|
|
2525
2527
|
week: Ee,
|
|
@@ -2530,8 +2532,8 @@ const Ct = {
|
|
|
2530
2532
|
}, wo = {
|
|
2531
2533
|
year: Eo,
|
|
2532
2534
|
month: Ao,
|
|
2533
|
-
week:
|
|
2534
|
-
day:
|
|
2535
|
+
week: Co,
|
|
2536
|
+
day: To,
|
|
2535
2537
|
hour: Io,
|
|
2536
2538
|
minute: Mo,
|
|
2537
2539
|
second: So
|
|
@@ -2540,7 +2542,7 @@ function vo({
|
|
|
2540
2542
|
date: e,
|
|
2541
2543
|
stepSize: t
|
|
2542
2544
|
}) {
|
|
2543
|
-
const i =
|
|
2545
|
+
const i = Tt[t];
|
|
2544
2546
|
if (!i) throw new Error("formatTime: invalid stepSize");
|
|
2545
2547
|
return i(e);
|
|
2546
2548
|
}
|
|
@@ -2551,7 +2553,7 @@ function it({
|
|
|
2551
2553
|
}) {
|
|
2552
2554
|
if (e > t)
|
|
2553
2555
|
return it({ start: t, end: e, stepSize: i });
|
|
2554
|
-
const r =
|
|
2556
|
+
const r = Tt[i];
|
|
2555
2557
|
if (!r)
|
|
2556
2558
|
throw new Error("formatTimeRange: missing formatter or invalid stepSize");
|
|
2557
2559
|
const o = r(e), a = r(t);
|
|
@@ -2562,7 +2564,7 @@ function Dn({
|
|
|
2562
2564
|
stepSize: t,
|
|
2563
2565
|
stepMultiplier: i
|
|
2564
2566
|
}) {
|
|
2565
|
-
if (!
|
|
2567
|
+
if (!Tt[t])
|
|
2566
2568
|
throw new Error("formatBucketRange: missing formatter or invalid stepSize");
|
|
2567
2569
|
const { start: o, end: a } = ko({ date: e, stepSize: t, stepMultiplier: i });
|
|
2568
2570
|
if (i === 1) {
|
|
@@ -2575,7 +2577,7 @@ function Dn({
|
|
|
2575
2577
|
}
|
|
2576
2578
|
return it({ start: o, end: a, stepSize: t });
|
|
2577
2579
|
}
|
|
2578
|
-
const
|
|
2580
|
+
const Ct = (e) => 1e3 * e, At = (e) => Ct(60 * e), xo = (e) => At(60 * e);
|
|
2579
2581
|
function Ee(e) {
|
|
2580
2582
|
return e.toLocaleDateString();
|
|
2581
2583
|
}
|
|
@@ -2619,7 +2621,7 @@ function So({
|
|
|
2619
2621
|
e.getMinutes(),
|
|
2620
2622
|
e.getSeconds(),
|
|
2621
2623
|
0
|
|
2622
|
-
), r = new Date(i.getTime() +
|
|
2624
|
+
), r = new Date(i.getTime() + Ct(t - 1) + 999);
|
|
2623
2625
|
return { start: i, end: r };
|
|
2624
2626
|
}
|
|
2625
2627
|
function Mo({
|
|
@@ -2635,7 +2637,7 @@ function Mo({
|
|
|
2635
2637
|
0,
|
|
2636
2638
|
0
|
|
2637
2639
|
), r = new Date(
|
|
2638
|
-
i.getTime() + At(t - 1) +
|
|
2640
|
+
i.getTime() + At(t - 1) + Ct(59)
|
|
2639
2641
|
);
|
|
2640
2642
|
return { start: i, end: r };
|
|
2641
2643
|
}
|
|
@@ -2656,7 +2658,7 @@ function Io({
|
|
|
2656
2658
|
);
|
|
2657
2659
|
return { start: i, end: r };
|
|
2658
2660
|
}
|
|
2659
|
-
function
|
|
2661
|
+
function To({
|
|
2660
2662
|
date: e,
|
|
2661
2663
|
stepMultiplier: t = 1
|
|
2662
2664
|
}) {
|
|
@@ -2675,7 +2677,7 @@ function Co({
|
|
|
2675
2677
|
);
|
|
2676
2678
|
return { start: i, end: r };
|
|
2677
2679
|
}
|
|
2678
|
-
function
|
|
2680
|
+
function Co({
|
|
2679
2681
|
date: e,
|
|
2680
2682
|
stepMultiplier: t = 1
|
|
2681
2683
|
}) {
|
|
@@ -2701,7 +2703,7 @@ function Eo({
|
|
|
2701
2703
|
return { start: i, end: r };
|
|
2702
2704
|
}
|
|
2703
2705
|
const me = () => {
|
|
2704
|
-
},
|
|
2706
|
+
}, $n = ei({
|
|
2705
2707
|
isPlaying: !1,
|
|
2706
2708
|
setIsPlaying: me,
|
|
2707
2709
|
isPaused: !1,
|
|
@@ -2714,7 +2716,7 @@ const me = () => {
|
|
|
2714
2716
|
intl: {}
|
|
2715
2717
|
});
|
|
2716
2718
|
function Et() {
|
|
2717
|
-
return ti(
|
|
2719
|
+
return ti($n);
|
|
2718
2720
|
}
|
|
2719
2721
|
function Lo({
|
|
2720
2722
|
children: e,
|
|
@@ -2729,7 +2731,7 @@ function Lo({
|
|
|
2729
2731
|
}) {
|
|
2730
2732
|
const [u, p] = _(t), [c, y] = _(i), [g, f] = _([]), w = ce(s);
|
|
2731
2733
|
U(() => {
|
|
2732
|
-
const M = g.sort((
|
|
2734
|
+
const M = g.sort((T, x) => T < x ? -1 : 1).map(Ln);
|
|
2733
2735
|
d == null || d(M);
|
|
2734
2736
|
}, [g, d]);
|
|
2735
2737
|
const h = oe(() => {
|
|
@@ -2745,10 +2747,10 @@ function Lo({
|
|
|
2745
2747
|
i !== c && y(i);
|
|
2746
2748
|
}, [i]), U(() => {
|
|
2747
2749
|
if (!l) return;
|
|
2748
|
-
const M = l.map(Vt),
|
|
2749
|
-
(M[0] !==
|
|
2750
|
+
const M = l.map(Vt), T = g.map(Vt);
|
|
2751
|
+
(M[0] !== T[0] || M[1] !== T[1]) && f(M);
|
|
2750
2752
|
}, l), /* @__PURE__ */ n(
|
|
2751
|
-
|
|
2753
|
+
$n.Provider,
|
|
2752
2754
|
{
|
|
2753
2755
|
value: {
|
|
2754
2756
|
isPlaying: !!u,
|
|
@@ -2767,7 +2769,7 @@ function Lo({
|
|
|
2767
2769
|
);
|
|
2768
2770
|
}
|
|
2769
2771
|
const Ut = {};
|
|
2770
|
-
let
|
|
2772
|
+
let Xe = null;
|
|
2771
2773
|
const _e = { seriesId: "0" };
|
|
2772
2774
|
function Do({
|
|
2773
2775
|
echartsInstance: e,
|
|
@@ -2775,7 +2777,7 @@ function Do({
|
|
|
2775
2777
|
canSelectLines: i,
|
|
2776
2778
|
filterable: r
|
|
2777
2779
|
}) {
|
|
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]),
|
|
2780
|
+
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]), T = oe(
|
|
2779
2781
|
(O) => M == null ? void 0 : M.setCursorStyle(O),
|
|
2780
2782
|
[M]
|
|
2781
2783
|
), x = oe(
|
|
@@ -2784,8 +2786,8 @@ function Do({
|
|
|
2784
2786
|
const [L] = e.convertFromPixel(_e, [
|
|
2785
2787
|
O.offsetX,
|
|
2786
2788
|
O.offsetY
|
|
2787
|
-
]),
|
|
2788
|
-
u(
|
|
2789
|
+
]), P = nt(L, t);
|
|
2790
|
+
u(P !== void 0 ? [t[P].name] : []);
|
|
2789
2791
|
}
|
|
2790
2792
|
},
|
|
2791
2793
|
[t, e, u]
|
|
@@ -2794,7 +2796,7 @@ function Do({
|
|
|
2794
2796
|
function O(L) {
|
|
2795
2797
|
r && (i && L.target || (s.length || (x(L), !l && !a && d(!0)), s.length === 2 && (u([]), p())));
|
|
2796
2798
|
}
|
|
2797
|
-
return
|
|
2799
|
+
return qe(M, "click", O);
|
|
2798
2800
|
}, [
|
|
2799
2801
|
M,
|
|
2800
2802
|
l,
|
|
@@ -2808,71 +2810,71 @@ function Do({
|
|
|
2808
2810
|
r
|
|
2809
2811
|
]), U(() => {
|
|
2810
2812
|
function O(L) {
|
|
2811
|
-
var
|
|
2813
|
+
var P;
|
|
2812
2814
|
if (r) {
|
|
2813
|
-
if (((
|
|
2814
|
-
y(!0),
|
|
2815
|
+
if (((P = L.target) == null ? void 0 : P.type) === "ec-line") {
|
|
2816
|
+
y(!0), T("grabbing");
|
|
2815
2817
|
return;
|
|
2816
2818
|
}
|
|
2817
2819
|
if (s.length === 2) {
|
|
2818
|
-
const [
|
|
2820
|
+
const [$] = e.convertFromPixel(_e, [
|
|
2819
2821
|
L.offsetX,
|
|
2820
2822
|
L.offsetY
|
|
2821
2823
|
]);
|
|
2822
|
-
if (
|
|
2824
|
+
if ($ >= s[0] && $ <= s[1]) {
|
|
2823
2825
|
h(!0);
|
|
2824
|
-
const W =
|
|
2826
|
+
const W = $ - s[0];
|
|
2825
2827
|
k(W);
|
|
2826
2828
|
return;
|
|
2827
2829
|
}
|
|
2828
2830
|
}
|
|
2829
2831
|
if (e) {
|
|
2830
2832
|
f(!0);
|
|
2831
|
-
const [
|
|
2833
|
+
const [$] = e.convertFromPixel(_e, [
|
|
2832
2834
|
L.offsetX,
|
|
2833
2835
|
L.offsetY
|
|
2834
2836
|
]);
|
|
2835
|
-
|
|
2837
|
+
Xe = $;
|
|
2836
2838
|
return;
|
|
2837
2839
|
}
|
|
2838
2840
|
}
|
|
2839
2841
|
}
|
|
2840
|
-
return
|
|
2841
|
-
}, [M, e, s,
|
|
2842
|
+
return qe(M, "mousedown", O);
|
|
2843
|
+
}, [M, e, s, T, r]), U(() => {
|
|
2842
2844
|
function O(L) {
|
|
2843
|
-
var
|
|
2844
|
-
if (((
|
|
2845
|
-
const [
|
|
2845
|
+
var P;
|
|
2846
|
+
if (((P = L == null ? void 0 : L.target) == null ? void 0 : P.type) === "polygon" && T("move"), c && e && (x(L), T("grabbing")), g && e) {
|
|
2847
|
+
const [$] = e.convertFromPixel(_e, [
|
|
2846
2848
|
L.offsetX,
|
|
2847
2849
|
L.offsetY
|
|
2848
2850
|
]);
|
|
2849
|
-
u(
|
|
2851
|
+
u(Xe === $ ? [] : [Xe, $]);
|
|
2850
2852
|
}
|
|
2851
2853
|
}
|
|
2852
|
-
return
|
|
2854
|
+
return qe(M, "mousemove", O);
|
|
2853
2855
|
}, [
|
|
2854
2856
|
M,
|
|
2855
2857
|
e,
|
|
2856
2858
|
g,
|
|
2857
2859
|
c,
|
|
2858
2860
|
u,
|
|
2859
|
-
|
|
2861
|
+
T,
|
|
2860
2862
|
x
|
|
2861
2863
|
]), U(() => {
|
|
2862
2864
|
function O(L) {
|
|
2863
|
-
if (c && (y(!1),
|
|
2864
|
-
const [
|
|
2865
|
+
if (c && (y(!1), T("default")), g && (f(!1), Xe = null, s.length === 1 && u([])), w && e) {
|
|
2866
|
+
const [P] = e.convertFromPixel(_e, [
|
|
2865
2867
|
L.offsetX,
|
|
2866
2868
|
L.offsetY
|
|
2867
|
-
]),
|
|
2869
|
+
]), $ = P - s[0];
|
|
2868
2870
|
if (b) {
|
|
2869
|
-
const W =
|
|
2871
|
+
const W = $ - b;
|
|
2870
2872
|
u([s[0] + W, s[1] + W]);
|
|
2871
2873
|
}
|
|
2872
2874
|
h(!1);
|
|
2873
2875
|
}
|
|
2874
2876
|
}
|
|
2875
|
-
return
|
|
2877
|
+
return qe(M, "mouseup", O);
|
|
2876
2878
|
}, [
|
|
2877
2879
|
M,
|
|
2878
2880
|
e,
|
|
@@ -2882,21 +2884,21 @@ function Do({
|
|
|
2882
2884
|
b,
|
|
2883
2885
|
u,
|
|
2884
2886
|
s,
|
|
2885
|
-
|
|
2887
|
+
T
|
|
2886
2888
|
]), U(() => {
|
|
2887
2889
|
!r && s.length && u([]);
|
|
2888
2890
|
}, [r, u, s.length]);
|
|
2889
2891
|
const A = F(() => {
|
|
2890
|
-
var
|
|
2892
|
+
var $;
|
|
2891
2893
|
if (s.length !== 1)
|
|
2892
2894
|
return;
|
|
2893
2895
|
const O = s[0], L = nt(O, t);
|
|
2894
2896
|
if (L === void 0)
|
|
2895
2897
|
return;
|
|
2896
|
-
const
|
|
2898
|
+
const P = ($ = t[L]) == null ? void 0 : $.name;
|
|
2897
2899
|
return (
|
|
2898
2900
|
// Cannot have markLine and markArea at the same time
|
|
2899
|
-
|
|
2901
|
+
P !== void 0 && {
|
|
2900
2902
|
symbol: ["none", "none"],
|
|
2901
2903
|
animationDuration: 100,
|
|
2902
2904
|
animationDurationUpdate: 150,
|
|
@@ -2911,7 +2913,7 @@ function Do({
|
|
|
2911
2913
|
show: !1
|
|
2912
2914
|
}
|
|
2913
2915
|
},
|
|
2914
|
-
xAxis:
|
|
2916
|
+
xAxis: P,
|
|
2915
2917
|
lineStyle: {
|
|
2916
2918
|
type: "solid",
|
|
2917
2919
|
color: o.palette.primary.main,
|
|
@@ -2923,7 +2925,7 @@ function Do({
|
|
|
2923
2925
|
] : []
|
|
2924
2926
|
}
|
|
2925
2927
|
);
|
|
2926
|
-
}, [t, l, a, o, s]),
|
|
2928
|
+
}, [t, l, a, o, s]), C = F(
|
|
2927
2929
|
() => s.length === 2 && {
|
|
2928
2930
|
data: [[{ coord: [s[0]] }, { coord: [s[1]] }]],
|
|
2929
2931
|
itemStyle: {
|
|
@@ -2933,15 +2935,15 @@ function Do({
|
|
|
2933
2935
|
},
|
|
2934
2936
|
[o, s]
|
|
2935
2937
|
);
|
|
2936
|
-
return { timelineOptions: A, timeWindowOptions:
|
|
2938
|
+
return { timelineOptions: A, timeWindowOptions: C };
|
|
2937
2939
|
}
|
|
2938
|
-
function
|
|
2940
|
+
function qe(e, t, i) {
|
|
2939
2941
|
if (e != null && e.handler)
|
|
2940
2942
|
return Ut[t] = i, e.on(t, i), () => {
|
|
2941
2943
|
Ut[t] && (e != null && e.handler) && e.off(t, i);
|
|
2942
2944
|
};
|
|
2943
2945
|
}
|
|
2944
|
-
const
|
|
2946
|
+
const Pn = B * 22, On = "100%", $o = 5, Po = 3, Oo = B * 20;
|
|
2945
2947
|
function Wo({
|
|
2946
2948
|
chartType: e,
|
|
2947
2949
|
formatter: t,
|
|
@@ -2959,11 +2961,11 @@ function Wo({
|
|
|
2959
2961
|
onCategoryClick: g,
|
|
2960
2962
|
yAxisType: f
|
|
2961
2963
|
}) {
|
|
2962
|
-
const w = le(), [h, b] = _(), k = (
|
|
2964
|
+
const w = le(), [h, b] = _(), k = (D) => b(D), [M, T] = _(), x = F(
|
|
2963
2965
|
() => l.reduce(
|
|
2964
|
-
(
|
|
2966
|
+
(D, { data: N }) => N.reduce(
|
|
2965
2967
|
(I, R) => R[1] > I ? R[1] : I,
|
|
2966
|
-
|
|
2968
|
+
D
|
|
2967
2969
|
),
|
|
2968
2970
|
Number.MIN_VALUE
|
|
2969
2971
|
),
|
|
@@ -2981,29 +2983,29 @@ function Wo({
|
|
|
2981
2983
|
},
|
|
2982
2984
|
borderWidth: 0,
|
|
2983
2985
|
backgroundColor: w.palette.black[90],
|
|
2984
|
-
position: (
|
|
2986
|
+
position: (D, N, I, R, X) => {
|
|
2985
2987
|
const j = { top: 0 };
|
|
2986
|
-
return
|
|
2988
|
+
return X.contentSize[0] < X.viewSize[0] - D[0] ? j.left = D[0] + B * 1.5 : j.right = X.viewSize[0] - D[0] + B * 1.5, j;
|
|
2987
2989
|
},
|
|
2988
2990
|
...o ? { formatter: o } : {}
|
|
2989
2991
|
}),
|
|
2990
2992
|
[w, r, o]
|
|
2991
|
-
),
|
|
2992
|
-
const
|
|
2993
|
+
), C = F(() => {
|
|
2994
|
+
const D = {
|
|
2993
2995
|
margin: 0,
|
|
2994
2996
|
verticalAlign: "bottom",
|
|
2995
2997
|
padding: [0, 0, B * 1.25, 0],
|
|
2996
2998
|
inside: !0,
|
|
2997
2999
|
color: (R) => {
|
|
2998
|
-
let
|
|
2999
|
-
return R >= x && (
|
|
3000
|
+
let X = "transparent";
|
|
3001
|
+
return R >= x && (X = w.palette.black[60]), X;
|
|
3000
3002
|
}
|
|
3001
3003
|
}, N = {
|
|
3002
3004
|
margin: 0,
|
|
3003
3005
|
verticalAlign: "middle",
|
|
3004
3006
|
padding: [0, B * 0.75, 0, 0],
|
|
3005
3007
|
color: w.palette.black[60]
|
|
3006
|
-
}, I = f === "dense" ?
|
|
3008
|
+
}, I = f === "dense" ? D : N;
|
|
3007
3009
|
return {
|
|
3008
3010
|
axisPointer: {
|
|
3009
3011
|
lineStyle: {
|
|
@@ -3044,9 +3046,9 @@ function Wo({
|
|
|
3044
3046
|
show: !1
|
|
3045
3047
|
},
|
|
3046
3048
|
splitNumber: i ?? (M !== void 0 ? Math.min(
|
|
3047
|
-
|
|
3049
|
+
Po,
|
|
3048
3050
|
Math.ceil(M / Oo)
|
|
3049
|
-
) :
|
|
3051
|
+
) : $o)
|
|
3050
3052
|
},
|
|
3051
3053
|
yAxis: {
|
|
3052
3054
|
type: "value",
|
|
@@ -3084,20 +3086,20 @@ function Wo({
|
|
|
3084
3086
|
data: a,
|
|
3085
3087
|
canSelectLines: !!g,
|
|
3086
3088
|
filterable: c
|
|
3087
|
-
}),
|
|
3088
|
-
() => l.map(({ data:
|
|
3089
|
-
const
|
|
3089
|
+
}), P = F(
|
|
3090
|
+
() => l.map(({ data: D, color: N, name: I }, R) => {
|
|
3091
|
+
const X = y && y.length > 0, j = X && y.includes(I), q = !X || j ? N : w.palette.action.disabledBackground;
|
|
3090
3092
|
return {
|
|
3091
3093
|
id: String(R),
|
|
3092
3094
|
name: I,
|
|
3093
3095
|
markLine: R === 0 ? O : void 0,
|
|
3094
3096
|
markArea: R === 0 ? L : void 0,
|
|
3095
3097
|
animation: p,
|
|
3096
|
-
data:
|
|
3098
|
+
data: D,
|
|
3097
3099
|
type: e,
|
|
3098
3100
|
smooth: !0,
|
|
3099
|
-
color:
|
|
3100
|
-
z:
|
|
3101
|
+
color: q,
|
|
3102
|
+
z: X && j ? 10 : 0,
|
|
3101
3103
|
lineStyle: {
|
|
3102
3104
|
width: 2
|
|
3103
3105
|
},
|
|
@@ -3106,7 +3108,7 @@ function Wo({
|
|
|
3106
3108
|
scale: 2,
|
|
3107
3109
|
lineStyle: {
|
|
3108
3110
|
width: 2,
|
|
3109
|
-
color:
|
|
3111
|
+
color: q
|
|
3110
3112
|
}
|
|
3111
3113
|
}
|
|
3112
3114
|
};
|
|
@@ -3120,7 +3122,7 @@ function Wo({
|
|
|
3120
3122
|
y,
|
|
3121
3123
|
w
|
|
3122
3124
|
]
|
|
3123
|
-
),
|
|
3125
|
+
), $ = F(
|
|
3124
3126
|
() => ({
|
|
3125
3127
|
grid: {
|
|
3126
3128
|
left: B * (f === "dense" ? 2 : 3.5),
|
|
@@ -3130,20 +3132,20 @@ function Wo({
|
|
|
3130
3132
|
},
|
|
3131
3133
|
color: [w.palette.secondary.main],
|
|
3132
3134
|
tooltip: A,
|
|
3133
|
-
...
|
|
3134
|
-
series:
|
|
3135
|
+
...C,
|
|
3136
|
+
series: P
|
|
3135
3137
|
}),
|
|
3136
3138
|
[
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
+
C,
|
|
3140
|
+
P,
|
|
3139
3141
|
f,
|
|
3140
3142
|
w.palette.secondary.main,
|
|
3141
3143
|
A
|
|
3142
3144
|
]
|
|
3143
3145
|
), J = { click: oe(
|
|
3144
|
-
(
|
|
3145
|
-
if (d && g &&
|
|
3146
|
-
const N = d[
|
|
3146
|
+
(D) => {
|
|
3147
|
+
if (d && g && D.componentType === "series") {
|
|
3148
|
+
const N = d[D.seriesIndex];
|
|
3147
3149
|
g(N);
|
|
3148
3150
|
}
|
|
3149
3151
|
},
|
|
@@ -3153,25 +3155,25 @@ function Wo({
|
|
|
3153
3155
|
var I;
|
|
3154
3156
|
if (typeof ResizeObserver > "u" || !h)
|
|
3155
3157
|
return;
|
|
3156
|
-
const
|
|
3157
|
-
if (!
|
|
3158
|
+
const D = (I = h == null ? void 0 : h.getDom()) == null ? void 0 : I.parentElement;
|
|
3159
|
+
if (!D)
|
|
3158
3160
|
return;
|
|
3159
3161
|
const N = new ResizeObserver(() => {
|
|
3160
|
-
|
|
3162
|
+
T(D.clientWidth), h.resize();
|
|
3161
3163
|
});
|
|
3162
|
-
return N.observe(
|
|
3164
|
+
return N.observe(D), () => {
|
|
3163
3165
|
N.disconnect();
|
|
3164
3166
|
};
|
|
3165
3167
|
}, [h]);
|
|
3166
|
-
const G = u ? On : s ??
|
|
3168
|
+
const G = u ? On : s ?? Pn;
|
|
3167
3169
|
return an(() => {
|
|
3168
3170
|
var N;
|
|
3169
|
-
const
|
|
3170
|
-
|
|
3171
|
+
const D = (N = h == null ? void 0 : h.getDom()) == null ? void 0 : N.parentElement;
|
|
3172
|
+
D && T(D.clientWidth), h == null || h.resize();
|
|
3171
3173
|
}, [G, u, h]), /* @__PURE__ */ n(
|
|
3172
3174
|
We,
|
|
3173
3175
|
{
|
|
3174
|
-
option:
|
|
3176
|
+
option: $,
|
|
3175
3177
|
onEvents: J,
|
|
3176
3178
|
onChartReady: k,
|
|
3177
3179
|
style: { height: G }
|
|
@@ -3213,8 +3215,8 @@ function No({
|
|
|
3213
3215
|
[e]
|
|
3214
3216
|
);
|
|
3215
3217
|
const f = () => {
|
|
3216
|
-
const { animationFrameId:
|
|
3217
|
-
|
|
3218
|
+
const { animationFrameId: T, timeoutId: x } = l.current;
|
|
3219
|
+
T && window.cancelAnimationFrame(T), x && clearTimeout(x);
|
|
3218
3220
|
}, w = oe(() => {
|
|
3219
3221
|
f(), c();
|
|
3220
3222
|
}, [c]), h = () => {
|
|
@@ -3242,8 +3244,8 @@ function No({
|
|
|
3242
3244
|
speed: o,
|
|
3243
3245
|
timelinePosition: u[0],
|
|
3244
3246
|
data: e,
|
|
3245
|
-
drawFrame: (
|
|
3246
|
-
p([
|
|
3247
|
+
drawFrame: (T) => {
|
|
3248
|
+
p([T]);
|
|
3247
3249
|
},
|
|
3248
3250
|
onEnd: () => {
|
|
3249
3251
|
setTimeout(w, 250);
|
|
@@ -3252,12 +3254,12 @@ function No({
|
|
|
3252
3254
|
}), () => f();
|
|
3253
3255
|
d && u.length === 0 && p([e[0].name]);
|
|
3254
3256
|
}, [e, d, o, u.length, w]);
|
|
3255
|
-
const b = (
|
|
3256
|
-
|
|
3257
|
+
const b = (T) => {
|
|
3258
|
+
T != null && T.currentTarget && r(T.currentTarget);
|
|
3257
3259
|
}, k = () => {
|
|
3258
3260
|
r(null);
|
|
3259
|
-
}, M = (
|
|
3260
|
-
a(
|
|
3261
|
+
}, M = (T) => {
|
|
3262
|
+
a(T), k();
|
|
3261
3263
|
};
|
|
3262
3264
|
return /* @__PURE__ */ v(ie, { children: [
|
|
3263
3265
|
/* @__PURE__ */ n(
|
|
@@ -3278,18 +3280,18 @@ function No({
|
|
|
3278
3280
|
open: !!i,
|
|
3279
3281
|
onClose: k,
|
|
3280
3282
|
children: [
|
|
3281
|
-
/* @__PURE__ */ n(
|
|
3282
|
-
Fo.map((
|
|
3283
|
-
|
|
3283
|
+
/* @__PURE__ */ n(Pe, { disabled: !0, children: /* @__PURE__ */ n(H, { variant: "caption", color: "textSecondary", children: g.formatMessage({ id: "c4r.widgets.timeSeries.speed" }) }) }),
|
|
3284
|
+
Fo.map((T) => /* @__PURE__ */ v(
|
|
3285
|
+
Pe,
|
|
3284
3286
|
{
|
|
3285
|
-
selected:
|
|
3286
|
-
onClick: () => M(
|
|
3287
|
+
selected: T === o,
|
|
3288
|
+
onClick: () => M(T),
|
|
3287
3289
|
children: [
|
|
3288
|
-
|
|
3290
|
+
T,
|
|
3289
3291
|
"x"
|
|
3290
3292
|
]
|
|
3291
3293
|
},
|
|
3292
|
-
|
|
3294
|
+
T
|
|
3293
3295
|
))
|
|
3294
3296
|
]
|
|
3295
3297
|
}
|
|
@@ -3302,7 +3304,7 @@ function No({
|
|
|
3302
3304
|
disabled: !(s || d),
|
|
3303
3305
|
onClick: w,
|
|
3304
3306
|
"data-testid": "stop",
|
|
3305
|
-
children: /* @__PURE__ */ n(
|
|
3307
|
+
children: /* @__PURE__ */ n(Ho, {})
|
|
3306
3308
|
}
|
|
3307
3309
|
) }),
|
|
3308
3310
|
/* @__PURE__ */ n(S, { mt: 0.75, children: /* @__PURE__ */ n(
|
|
@@ -3312,7 +3314,7 @@ function No({
|
|
|
3312
3314
|
size: "small",
|
|
3313
3315
|
color: "primary",
|
|
3314
3316
|
onClick: h,
|
|
3315
|
-
children: d ? /* @__PURE__ */ n(
|
|
3317
|
+
children: d ? /* @__PURE__ */ n(zo, {}) : /* @__PURE__ */ n(_o, {})
|
|
3316
3318
|
}
|
|
3317
3319
|
) })
|
|
3318
3320
|
] });
|
|
@@ -3337,7 +3339,7 @@ function _o() {
|
|
|
3337
3339
|
}
|
|
3338
3340
|
) });
|
|
3339
3341
|
}
|
|
3340
|
-
function
|
|
3342
|
+
function Ho() {
|
|
3341
3343
|
return /* @__PURE__ */ n(je, { children: /* @__PURE__ */ n(
|
|
3342
3344
|
"path",
|
|
3343
3345
|
{
|
|
@@ -3347,7 +3349,7 @@ function zo() {
|
|
|
3347
3349
|
}
|
|
3348
3350
|
) });
|
|
3349
3351
|
}
|
|
3350
|
-
function
|
|
3352
|
+
function zo() {
|
|
3351
3353
|
return /* @__PURE__ */ n(je, { "data-testid": "pause-icon", children: /* @__PURE__ */ n(
|
|
3352
3354
|
"path",
|
|
3353
3355
|
{
|
|
@@ -3417,13 +3419,13 @@ const Uo = m(S)(() => ({
|
|
|
3417
3419
|
containerType: "inline-size",
|
|
3418
3420
|
display: "flex",
|
|
3419
3421
|
flexDirection: "column"
|
|
3420
|
-
})),
|
|
3422
|
+
})), Xo = m(S)(() => ({
|
|
3421
3423
|
display: "flex",
|
|
3422
3424
|
flexDirection: "column"
|
|
3423
3425
|
})), Wn = m(S)(() => ({
|
|
3424
3426
|
display: "flex",
|
|
3425
3427
|
flexDirection: "row"
|
|
3426
|
-
})),
|
|
3428
|
+
})), qo = m(Wn)(() => ({
|
|
3427
3429
|
alignItems: "center",
|
|
3428
3430
|
justifyContent: "space-between"
|
|
3429
3431
|
})), Ko = m(S)(({ theme: e }) => ({
|
|
@@ -3459,8 +3461,8 @@ function Rn({
|
|
|
3459
3461
|
flex: e ? "1" : void 0
|
|
3460
3462
|
},
|
|
3461
3463
|
children: [
|
|
3462
|
-
/* @__PURE__ */ n(
|
|
3463
|
-
i ? /* @__PURE__ */ v(
|
|
3464
|
+
/* @__PURE__ */ n(qo, { flex: 0, children: t }),
|
|
3465
|
+
i ? /* @__PURE__ */ v(Xo, { flex: 1, children: [
|
|
3464
3466
|
/* @__PURE__ */ v(Wn, { flex: 1, children: [
|
|
3465
3467
|
/* @__PURE__ */ n(Ko, { flex: 0, children: i }),
|
|
3466
3468
|
/* @__PURE__ */ n(Zo, { flex: 1, children: r })
|
|
@@ -3521,7 +3523,7 @@ const Jo = (e) => /* @__PURE__ */ n(je, { width: "720", height: "124", viewBox:
|
|
|
3521
3523
|
gap: e.spacing(2),
|
|
3522
3524
|
margin: 0,
|
|
3523
3525
|
padding: e.spacing(1.5, 1, 0.25, 1)
|
|
3524
|
-
})),
|
|
3526
|
+
})), Xt = m(S)(({ theme: e }) => ({
|
|
3525
3527
|
display: "flex",
|
|
3526
3528
|
flexDirection: "row",
|
|
3527
3529
|
gap: e.spacing(1)
|
|
@@ -3534,28 +3536,28 @@ const Jo = (e) => /* @__PURE__ */ n(je, { width: "720", height: "124", viewBox:
|
|
|
3534
3536
|
Rn,
|
|
3535
3537
|
{
|
|
3536
3538
|
fitHeight: !!e,
|
|
3537
|
-
header: /* @__PURE__ */ n(S, { pt: 1.25, pb: 0.75, children: /* @__PURE__ */ n(
|
|
3539
|
+
header: /* @__PURE__ */ n(S, { pt: 1.25, pb: 0.75, children: /* @__PURE__ */ n(z, { width: 48, height: 8 }) }),
|
|
3538
3540
|
controls: i && /* @__PURE__ */ v(Qo, { children: [
|
|
3539
|
-
/* @__PURE__ */ n(S, { p: 0.5, children: /* @__PURE__ */ n(
|
|
3540
|
-
/* @__PURE__ */ n(S, { mt: 2, p: 0.5, children: /* @__PURE__ */ n(
|
|
3541
|
-
/* @__PURE__ */ n(S, { mt: 1, p: 0.5, children: /* @__PURE__ */ n(
|
|
3541
|
+
/* @__PURE__ */ n(S, { p: 0.5, children: /* @__PURE__ */ n(z, { width: 16, height: 16 }) }),
|
|
3542
|
+
/* @__PURE__ */ n(S, { mt: 2, p: 0.5, children: /* @__PURE__ */ n(z, { width: 16, height: 16 }) }),
|
|
3543
|
+
/* @__PURE__ */ n(S, { mt: 1, p: 0.5, children: /* @__PURE__ */ n(z, { width: 16, height: 16 }) })
|
|
3542
3544
|
] }),
|
|
3543
|
-
chart: /* @__PURE__ */ v(ea, { style: { height: e ? On : t ??
|
|
3544
|
-
/* @__PURE__ */ n(ta, { flex: 0, children: /* @__PURE__ */ n(
|
|
3545
|
+
chart: /* @__PURE__ */ v(ea, { style: { height: e ? On : t ?? Pn }, children: [
|
|
3546
|
+
/* @__PURE__ */ n(ta, { flex: 0, children: /* @__PURE__ */ n(z, { width: 24, height: 8 }) }),
|
|
3545
3547
|
/* @__PURE__ */ n(na, { flex: 1, children: /* @__PURE__ */ n(Jo, { preserveAspectRatio: "none" }) }),
|
|
3546
3548
|
/* @__PURE__ */ v(ia, { flex: 0, children: [
|
|
3547
|
-
/* @__PURE__ */ n(
|
|
3548
|
-
/* @__PURE__ */ n(
|
|
3549
|
+
/* @__PURE__ */ n(z, { width: 32, height: 8 }),
|
|
3550
|
+
/* @__PURE__ */ n(z, { width: 32, height: 8 })
|
|
3549
3551
|
] })
|
|
3550
3552
|
] }),
|
|
3551
3553
|
legend: r && (r && /* @__PURE__ */ v(ra, { children: [
|
|
3552
|
-
/* @__PURE__ */ v(
|
|
3553
|
-
/* @__PURE__ */ n(
|
|
3554
|
-
/* @__PURE__ */ n(
|
|
3554
|
+
/* @__PURE__ */ v(Xt, { children: [
|
|
3555
|
+
/* @__PURE__ */ n(z, { width: 8, height: 8 }),
|
|
3556
|
+
/* @__PURE__ */ n(z, { width: 48, height: 8 })
|
|
3555
3557
|
] }),
|
|
3556
|
-
/* @__PURE__ */ v(
|
|
3557
|
-
/* @__PURE__ */ n(
|
|
3558
|
-
/* @__PURE__ */ n(
|
|
3558
|
+
/* @__PURE__ */ v(Xt, { children: [
|
|
3559
|
+
/* @__PURE__ */ n(z, { width: 8, height: 8 }),
|
|
3560
|
+
/* @__PURE__ */ n(z, { width: 48, height: 8 })
|
|
3559
3561
|
] })
|
|
3560
3562
|
] }))
|
|
3561
3563
|
}
|
|
@@ -3581,26 +3583,26 @@ function ds({
|
|
|
3581
3583
|
onTimeWindowUpdate: b,
|
|
3582
3584
|
selectedCategories: k,
|
|
3583
3585
|
onSelectedCategoriesChange: M,
|
|
3584
|
-
isPlaying:
|
|
3586
|
+
isPlaying: T = !1,
|
|
3585
3587
|
onPlay: x,
|
|
3586
3588
|
isPaused: A = !1,
|
|
3587
|
-
onPause:
|
|
3589
|
+
onPause: C,
|
|
3588
3590
|
onStop: O,
|
|
3589
3591
|
isLoading: L = !1,
|
|
3590
|
-
palette:
|
|
3591
|
-
showLegend:
|
|
3592
|
+
palette: P = Object.values(yn.qualitative.bold),
|
|
3593
|
+
showLegend: $,
|
|
3592
3594
|
yAxisType: W = "dense"
|
|
3593
3595
|
}) {
|
|
3594
|
-
const J = re([]), G = se(), { showSkeleton:
|
|
3596
|
+
const J = re([]), G = se(), { showSkeleton: D } = ke(!!L), N = oe(
|
|
3595
3597
|
(I) => {
|
|
3596
|
-
var R,
|
|
3598
|
+
var R, X;
|
|
3597
3599
|
if (I.length === 2) {
|
|
3598
3600
|
((R = J.current) == null ? void 0 : R.length) === 1 && (f == null || f(void 0));
|
|
3599
|
-
const j = I.sort((
|
|
3601
|
+
const j = I.sort((q, te) => q < te ? -1 : 1).map(Ln);
|
|
3600
3602
|
b == null || b(j);
|
|
3601
3603
|
}
|
|
3602
3604
|
if (I.length === 1) {
|
|
3603
|
-
((
|
|
3605
|
+
((X = J.current) == null ? void 0 : X.length) === 2 && (b == null || b([]));
|
|
3604
3606
|
const j = nt(Number(I[0]), e);
|
|
3605
3607
|
f == null || f(j);
|
|
3606
3608
|
}
|
|
@@ -3608,21 +3610,21 @@ function ds({
|
|
|
3608
3610
|
},
|
|
3609
3611
|
[b, f, e]
|
|
3610
3612
|
);
|
|
3611
|
-
return
|
|
3613
|
+
return D ? /* @__PURE__ */ n(
|
|
3612
3614
|
oa,
|
|
3613
3615
|
{
|
|
3614
3616
|
fitHeight: p,
|
|
3615
3617
|
height: u,
|
|
3616
3618
|
showControls: c,
|
|
3617
|
-
showLegend:
|
|
3619
|
+
showLegend: $
|
|
3618
3620
|
}
|
|
3619
3621
|
) : /* @__PURE__ */ n(
|
|
3620
3622
|
Lo,
|
|
3621
3623
|
{
|
|
3622
|
-
isPlaying:
|
|
3624
|
+
isPlaying: T,
|
|
3623
3625
|
onPlay: x,
|
|
3624
3626
|
isPaused: A,
|
|
3625
|
-
onPause:
|
|
3627
|
+
onPause: C,
|
|
3626
3628
|
onStop: O,
|
|
3627
3629
|
timeWindow: w,
|
|
3628
3630
|
onTimeWindowUpdate: N,
|
|
@@ -3644,8 +3646,8 @@ function ds({
|
|
|
3644
3646
|
showControls: c,
|
|
3645
3647
|
animation: y,
|
|
3646
3648
|
filterable: g,
|
|
3647
|
-
palette:
|
|
3648
|
-
showLegend:
|
|
3649
|
+
palette: P,
|
|
3650
|
+
showLegend: $,
|
|
3649
3651
|
selectedCategories: k,
|
|
3650
3652
|
timelinePosition: h,
|
|
3651
3653
|
onSelectedCategoriesChange: M,
|
|
@@ -3677,23 +3679,23 @@ function aa({
|
|
|
3677
3679
|
timelinePosition: k,
|
|
3678
3680
|
yAxisType: M = "dense"
|
|
3679
3681
|
}) {
|
|
3680
|
-
const
|
|
3682
|
+
const T = le(), x = T.palette.secondary.main, { isPlaying: A, isPaused: C, timeWindow: O, stop: L, setTimeWindow: P, intl: $ } = Et();
|
|
3681
3683
|
U(() => {
|
|
3682
3684
|
if (k !== void 0) {
|
|
3683
3685
|
if (k < 0 || k >= e.length) return;
|
|
3684
3686
|
const Y = e[k].name;
|
|
3685
|
-
|
|
3687
|
+
P([Y]);
|
|
3686
3688
|
}
|
|
3687
3689
|
}, [k, e]), U(() => {
|
|
3688
3690
|
if (!e.length) return;
|
|
3689
3691
|
const Y = e[0].name, K = e[e.length - 1].name;
|
|
3690
|
-
(O[0] < Y || O[1] > K || O[1] < Y || O[1] > K) &&
|
|
3692
|
+
(O[0] < Y || O[1] > K || O[1] < Y || O[1] > K) && P([]);
|
|
3691
3693
|
}, [e]);
|
|
3692
3694
|
const W = F(() => {
|
|
3693
3695
|
const Y = {}, K = t ? t.map((de) => ({
|
|
3694
3696
|
name: de,
|
|
3695
3697
|
data: [],
|
|
3696
|
-
color:
|
|
3698
|
+
color: Pi(de, {
|
|
3697
3699
|
palette: f,
|
|
3698
3700
|
fallbackColor: x,
|
|
3699
3701
|
colorMapping: Y
|
|
@@ -3702,7 +3704,7 @@ function aa({
|
|
|
3702
3704
|
{
|
|
3703
3705
|
name: "",
|
|
3704
3706
|
data: [],
|
|
3705
|
-
color:
|
|
3707
|
+
color: T.palette.secondary.main
|
|
3706
3708
|
}
|
|
3707
3709
|
];
|
|
3708
3710
|
for (const {
|
|
@@ -3715,14 +3717,14 @@ function aa({
|
|
|
3715
3717
|
ee === -1 || t && ee >= t.length || !Number.isFinite(ee) || K[ee].data.push([de, we]);
|
|
3716
3718
|
}
|
|
3717
3719
|
return K;
|
|
3718
|
-
}, [t, e, f, x,
|
|
3720
|
+
}, [t, e, f, x, T.palette.secondary.main]), J = F(() => {
|
|
3719
3721
|
if (!e.length)
|
|
3720
3722
|
return "";
|
|
3721
3723
|
if (O.length === 2) {
|
|
3722
3724
|
const [Y, K] = O.map((de) => new Date(de));
|
|
3723
3725
|
return it({ start: Y, end: K, stepSize: i });
|
|
3724
3726
|
}
|
|
3725
|
-
if (!A && !
|
|
3727
|
+
if (!A && !C) {
|
|
3726
3728
|
const Y = new Date(e[0].name), K = new Date(e[e.length - 1].name);
|
|
3727
3729
|
return it({ start: Y, end: K, stepSize: i });
|
|
3728
3730
|
}
|
|
@@ -3730,10 +3732,10 @@ function aa({
|
|
|
3730
3732
|
const Y = new Date(O[0]);
|
|
3731
3733
|
return Dn({ date: Y, stepSize: i, stepMultiplier: r });
|
|
3732
3734
|
}
|
|
3733
|
-
}, [e, O, A,
|
|
3734
|
-
L(),
|
|
3735
|
+
}, [e, O, A, C, i, r]), G = F(() => A || C || O.length > 0 || (w == null ? void 0 : w.length) > 0, [C, A, w == null ? void 0 : w.length, O.length]), D = () => {
|
|
3736
|
+
L(), P([]), h == null || h([]);
|
|
3735
3737
|
}, N = (Y) => {
|
|
3736
|
-
Y.key === "Enter" &&
|
|
3738
|
+
Y.key === "Enter" && D();
|
|
3737
3739
|
}, I = oe(
|
|
3738
3740
|
(Y) => {
|
|
3739
3741
|
if (h) {
|
|
@@ -3742,18 +3744,18 @@ function aa({
|
|
|
3742
3744
|
}
|
|
3743
3745
|
},
|
|
3744
3746
|
[h, w]
|
|
3745
|
-
), R = !!(b ?? W.length > 1),
|
|
3746
|
-
/* @__PURE__ */ n(S, { children: /* @__PURE__ */ n(
|
|
3747
|
+
), R = !!(b ?? W.length > 1), X = /* @__PURE__ */ v(ie, { children: [
|
|
3748
|
+
/* @__PURE__ */ n(S, { children: /* @__PURE__ */ n(H, { color: "textSecondary", variant: "caption", children: J ?? "-" }) }),
|
|
3747
3749
|
g && G && /* @__PURE__ */ n(
|
|
3748
3750
|
ye,
|
|
3749
3751
|
{
|
|
3750
3752
|
variant: "caption",
|
|
3751
3753
|
style: { cursor: "pointer" },
|
|
3752
|
-
onClick:
|
|
3754
|
+
onClick: D,
|
|
3753
3755
|
onKeyDown: N,
|
|
3754
3756
|
tabIndex: 0,
|
|
3755
3757
|
underline: "hover",
|
|
3756
|
-
children:
|
|
3758
|
+
children: $.formatMessage({ id: "c4r.widgets.timeSeries.clear" })
|
|
3757
3759
|
}
|
|
3758
3760
|
)
|
|
3759
3761
|
] });
|
|
@@ -3761,7 +3763,7 @@ function aa({
|
|
|
3761
3763
|
Rn,
|
|
3762
3764
|
{
|
|
3763
3765
|
fitHeight: p,
|
|
3764
|
-
header:
|
|
3766
|
+
header: X,
|
|
3765
3767
|
controls: g && c && /* @__PURE__ */ n(No, { data: e, stepSize: i }),
|
|
3766
3768
|
chart: /* @__PURE__ */ n(
|
|
3767
3769
|
Wo,
|
|
@@ -3842,7 +3844,7 @@ const la = m("div")(({ theme: e }) => ({
|
|
|
3842
3844
|
transition: `background-color ${e.transitions.easing.sharp} ${e.transitions.duration.shortest}ms,
|
|
3843
3845
|
width ${e.transitions.easing.sharp} ${e.transitions.duration.complex}ms`
|
|
3844
3846
|
}
|
|
3845
|
-
})),
|
|
3847
|
+
})), qt = m(S, {
|
|
3846
3848
|
shouldForwardProp: (e) => e !== "center"
|
|
3847
3849
|
})(({ theme: e, center: t = !1 }) => ({
|
|
3848
3850
|
marginBottom: e.spacing(2),
|
|
@@ -3923,7 +3925,7 @@ function wa(e, t, i, r, o) {
|
|
|
3923
3925
|
data: y
|
|
3924
3926
|
};
|
|
3925
3927
|
});
|
|
3926
|
-
return o ===
|
|
3928
|
+
return o === Te.RANKING && l.sort((d, s) => {
|
|
3927
3929
|
const u = Math.max(...d.data.map((c) => c.value));
|
|
3928
3930
|
return Math.max(...s.data.map((c) => c.value)) - u;
|
|
3929
3931
|
}), l;
|
|
@@ -3944,7 +3946,7 @@ function xa(e, t = {}) {
|
|
|
3944
3946
|
}), [e, i, r]), d;
|
|
3945
3947
|
}
|
|
3946
3948
|
const ba = {};
|
|
3947
|
-
function
|
|
3949
|
+
function Hn({
|
|
3948
3950
|
enabled: e = !0,
|
|
3949
3951
|
value: t = 0,
|
|
3950
3952
|
options: i = ba,
|
|
@@ -4039,7 +4041,7 @@ function Ia({
|
|
|
4039
4041
|
variant: f === 0 ? "body2" : "caption",
|
|
4040
4042
|
color: f === 0 ? "textPrimary" : "textSecondary",
|
|
4041
4043
|
children: /* @__PURE__ */ n(
|
|
4042
|
-
|
|
4044
|
+
Hn,
|
|
4043
4045
|
{
|
|
4044
4046
|
value: g.value,
|
|
4045
4047
|
enabled: t,
|
|
@@ -4056,27 +4058,27 @@ function Ia({
|
|
|
4056
4058
|
] })
|
|
4057
4059
|
] });
|
|
4058
4060
|
}
|
|
4059
|
-
const Kt = (e) => e,
|
|
4060
|
-
},
|
|
4061
|
+
const Kt = (e) => e, Ta = () => {
|
|
4062
|
+
}, He = [];
|
|
4061
4063
|
function us({
|
|
4062
|
-
names: e =
|
|
4063
|
-
data: t =
|
|
4064
|
-
labels: i =
|
|
4065
|
-
colors: r =
|
|
4064
|
+
names: e = He,
|
|
4065
|
+
data: t = He,
|
|
4066
|
+
labels: i = He,
|
|
4067
|
+
colors: r = He,
|
|
4066
4068
|
maxItems: o = 5,
|
|
4067
|
-
order: a =
|
|
4069
|
+
order: a = Te.FIXED,
|
|
4068
4070
|
animation: l = !0,
|
|
4069
4071
|
animationOptions: d,
|
|
4070
4072
|
searchable: s = !0,
|
|
4071
4073
|
filterable: u = !0,
|
|
4072
|
-
selectedCategories: p =
|
|
4073
|
-
onSelectedCategoriesChange: c =
|
|
4074
|
+
selectedCategories: p = He,
|
|
4075
|
+
onSelectedCategoriesChange: c = Ta,
|
|
4074
4076
|
formatter: y = Kt,
|
|
4075
4077
|
tooltipFormatter: g = Kt,
|
|
4076
4078
|
tooltip: f = !0,
|
|
4077
4079
|
isLoading: w = !1
|
|
4078
4080
|
}) {
|
|
4079
|
-
const h = le(), [b, k] = _(!1), [M,
|
|
4081
|
+
const h = le(), [b, k] = _(!1), [M, T] = _(!1), [x, A] = _(p), [C, O] = _(""), L = se(), P = ce(L), $ = F(() => {
|
|
4080
4082
|
const V = r.length ? r : [
|
|
4081
4083
|
h.palette.secondary.main,
|
|
4082
4084
|
h.palette.primary.main,
|
|
@@ -4092,40 +4094,40 @@ function us({
|
|
|
4092
4094
|
}, [t, r, i, h, p, a]), W = F(() => Math.max(
|
|
4093
4095
|
...t.map((V) => V.map((ee) => ee.value ?? 0)).flat()
|
|
4094
4096
|
), [t]), J = F(() => {
|
|
4095
|
-
if (o >=
|
|
4096
|
-
return
|
|
4097
|
-
const V =
|
|
4098
|
-
for (const
|
|
4099
|
-
|
|
4097
|
+
if (o >= $.length)
|
|
4098
|
+
return $;
|
|
4099
|
+
const V = $.slice(0, o), ee = $.slice(o), ne = [];
|
|
4100
|
+
for (const Ce of ee)
|
|
4101
|
+
Ce.data.forEach((Re, Ae) => {
|
|
4100
4102
|
ne[Ae] = ne[Ae] ?? 0, ne[Ae] += Re.value;
|
|
4101
4103
|
});
|
|
4102
4104
|
const pe = {
|
|
4103
4105
|
key: Oe,
|
|
4104
|
-
label: s ? "Others" : `Others (${
|
|
4105
|
-
data: ne.map((
|
|
4106
|
-
value:
|
|
4106
|
+
label: s ? "Others" : `Others (${$.length - o})`,
|
|
4107
|
+
data: ne.map((Ce) => ({
|
|
4108
|
+
value: Ce,
|
|
4107
4109
|
color: h.palette.divider
|
|
4108
4110
|
}))
|
|
4109
4111
|
};
|
|
4110
4112
|
return [...V, pe];
|
|
4111
|
-
}, [
|
|
4112
|
-
const ee = (V.key || "").toLowerCase(), ne = (V.label || "").toLowerCase(), pe = ee == null ? void 0 : ee.includes(
|
|
4113
|
-
return pe ||
|
|
4114
|
-
}) :
|
|
4115
|
-
if (
|
|
4113
|
+
}, [$, s, o, h.palette.divider]), G = F(() => $.filter((V) => p.includes(V.key)), [$, p]), D = F(() => C ? $.filter((V) => {
|
|
4114
|
+
const ee = (V.key || "").toLowerCase(), ne = (V.label || "").toLowerCase(), pe = ee == null ? void 0 : ee.includes(C.toLowerCase()), Ce = ne == null ? void 0 : ne.includes(C.toLowerCase());
|
|
4115
|
+
return pe || Ce;
|
|
4116
|
+
}) : $, [$, C]), N = $.length - J.length + 1, I = s && !b && o < $.length;
|
|
4117
|
+
if ($.length === 0 || w)
|
|
4116
4118
|
return /* @__PURE__ */ n(Mn, {});
|
|
4117
|
-
const R = b ?
|
|
4118
|
-
function
|
|
4119
|
-
|
|
4119
|
+
const R = b ? D : M ? G : J;
|
|
4120
|
+
function X() {
|
|
4121
|
+
T(!0), c([...x]), K();
|
|
4120
4122
|
}
|
|
4121
4123
|
function j() {
|
|
4122
|
-
|
|
4124
|
+
T(!1);
|
|
4123
4125
|
}
|
|
4124
|
-
function
|
|
4126
|
+
function q() {
|
|
4125
4127
|
c([]);
|
|
4126
4128
|
}
|
|
4127
4129
|
function te() {
|
|
4128
|
-
|
|
4130
|
+
T(!0);
|
|
4129
4131
|
}
|
|
4130
4132
|
function Y() {
|
|
4131
4133
|
k(!0), A([...p]);
|
|
@@ -4137,22 +4139,22 @@ function us({
|
|
|
4137
4139
|
const ee = p.includes(V), ne = new Set(p);
|
|
4138
4140
|
ee ? ne.delete(V) : ne.add(V);
|
|
4139
4141
|
let pe = Array.from(ne);
|
|
4140
|
-
pe.length ===
|
|
4142
|
+
pe.length === $.length && (pe = []), c(pe);
|
|
4141
4143
|
}
|
|
4142
4144
|
function we(V) {
|
|
4143
4145
|
const ee = x.includes(V), ne = new Set(x);
|
|
4144
4146
|
ee ? ne.delete(V) : ne.add(V);
|
|
4145
4147
|
let pe = Array.from(ne);
|
|
4146
|
-
pe.length ===
|
|
4148
|
+
pe.length === $.length && (pe = []), A(pe);
|
|
4147
4149
|
}
|
|
4148
4150
|
const ve = u ? b ? we : de : void 0;
|
|
4149
4151
|
return /* @__PURE__ */ v(la, { children: [
|
|
4150
|
-
u ? /* @__PURE__ */ v(
|
|
4151
|
-
/* @__PURE__ */ n(
|
|
4152
|
+
u ? /* @__PURE__ */ v(qt, { center: !0, children: [
|
|
4153
|
+
/* @__PURE__ */ n(H, { variant: "caption", children: p.length > 0 ? P.formatMessage(
|
|
4152
4154
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
4153
4155
|
{ items: p.length }
|
|
4154
|
-
) :
|
|
4155
|
-
/* @__PURE__ */ n(
|
|
4156
|
+
) : P.formatMessage({ id: "c4r.widgets.category.all" }) }),
|
|
4157
|
+
/* @__PURE__ */ n(H, { variant: "caption", children: b ? /* @__PURE__ */ n(ye, { onClick: X, children: P.formatMessage({ id: "c4r.widgets.category.apply" }) }) : M ? /* @__PURE__ */ n(ye, { onClick: j, children: P.formatMessage({
|
|
4156
4158
|
id: "c4r.widgets.category.unlock"
|
|
4157
4159
|
}) }) : p.length ? /* @__PURE__ */ v(
|
|
4158
4160
|
S,
|
|
@@ -4163,22 +4165,22 @@ function us({
|
|
|
4163
4165
|
gap: h.spacing(1)
|
|
4164
4166
|
},
|
|
4165
4167
|
children: [
|
|
4166
|
-
/* @__PURE__ */ n(ye, { onClick: te, children:
|
|
4168
|
+
/* @__PURE__ */ n(ye, { onClick: te, children: P.formatMessage({
|
|
4167
4169
|
id: "c4r.widgets.category.lock"
|
|
4168
4170
|
}) }),
|
|
4169
4171
|
/* @__PURE__ */ n(wt, { orientation: "vertical", flexItem: !0 }),
|
|
4170
|
-
/* @__PURE__ */ n(ye, { onClick:
|
|
4172
|
+
/* @__PURE__ */ n(ye, { onClick: q, children: P.formatMessage({
|
|
4171
4173
|
id: "c4r.widgets.category.clear"
|
|
4172
4174
|
}) })
|
|
4173
4175
|
]
|
|
4174
4176
|
}
|
|
4175
4177
|
) : null })
|
|
4176
4178
|
] }) : null,
|
|
4177
|
-
b ? /* @__PURE__ */ n(
|
|
4179
|
+
b ? /* @__PURE__ */ n(qt, { children: /* @__PURE__ */ n(
|
|
4178
4180
|
ga,
|
|
4179
4181
|
{
|
|
4180
4182
|
size: "small",
|
|
4181
|
-
placeholder:
|
|
4183
|
+
placeholder: P.formatMessage({
|
|
4182
4184
|
id: "c4r.widgets.category.search"
|
|
4183
4185
|
}),
|
|
4184
4186
|
onChange: (V) => O(V.currentTarget.value),
|
|
@@ -4190,12 +4192,12 @@ function us({
|
|
|
4190
4192
|
) }) : null,
|
|
4191
4193
|
/* @__PURE__ */ v(sa, { children: [
|
|
4192
4194
|
R.length === 0 ? /* @__PURE__ */ v(ie, { children: [
|
|
4193
|
-
/* @__PURE__ */ n(
|
|
4195
|
+
/* @__PURE__ */ n(H, { variant: "body2", children: P.formatMessage({
|
|
4194
4196
|
id: "c4r.widgets.category.noResults"
|
|
4195
4197
|
}) }),
|
|
4196
|
-
/* @__PURE__ */ n(
|
|
4198
|
+
/* @__PURE__ */ n(H, { variant: "caption", children: P.formatMessage(
|
|
4197
4199
|
{ id: "c4r.widgets.category.noResultsMessage" },
|
|
4198
|
-
{ searchValue:
|
|
4200
|
+
{ searchValue: C }
|
|
4199
4201
|
) })
|
|
4200
4202
|
] }) : null,
|
|
4201
4203
|
R.map((V) => /* @__PURE__ */ n(ha, { children: /* @__PURE__ */ n(
|
|
@@ -4216,26 +4218,26 @@ function us({
|
|
|
4216
4218
|
) }, V.key))
|
|
4217
4219
|
] }),
|
|
4218
4220
|
I ? /* @__PURE__ */ n(
|
|
4219
|
-
|
|
4221
|
+
$e,
|
|
4220
4222
|
{
|
|
4221
4223
|
size: "small",
|
|
4222
4224
|
color: "primary",
|
|
4223
4225
|
startIcon: /* @__PURE__ */ n(Qe, {}),
|
|
4224
4226
|
onClick: Y,
|
|
4225
|
-
children:
|
|
4227
|
+
children: P.formatMessage(
|
|
4226
4228
|
{ id: "c4r.widgets.category.searchInfo" },
|
|
4227
4229
|
{ elements: N }
|
|
4228
4230
|
)
|
|
4229
4231
|
}
|
|
4230
4232
|
) : null,
|
|
4231
|
-
b ? /* @__PURE__ */ n(
|
|
4233
|
+
b ? /* @__PURE__ */ n($e, { size: "small", color: "primary", onClick: K, children: P.formatMessage({ id: "c4r.widgets.category.cancel" }) }) : null,
|
|
4232
4234
|
/* @__PURE__ */ n(ca, { children: e.map((V, ee) => /* @__PURE__ */ v(Bn, { children: [
|
|
4233
4235
|
/* @__PURE__ */ n(_n, { color: (r == null ? void 0 : r[ee]) ?? h.palette.background.default }),
|
|
4234
|
-
/* @__PURE__ */ n(
|
|
4236
|
+
/* @__PURE__ */ n(H, { variant: "overline", children: V })
|
|
4235
4237
|
] }, e[ee])) })
|
|
4236
4238
|
] });
|
|
4237
4239
|
}
|
|
4238
|
-
const
|
|
4240
|
+
const Ca = m(H)(({ theme: e }) => ({
|
|
4239
4241
|
display: "inline-block",
|
|
4240
4242
|
marginTop: e.spacing(0.5)
|
|
4241
4243
|
}));
|
|
@@ -4243,7 +4245,7 @@ function Aa({
|
|
|
4243
4245
|
row: e
|
|
4244
4246
|
}) {
|
|
4245
4247
|
const t = le();
|
|
4246
|
-
return e.label ? /* @__PURE__ */ n(S, { color: e.color ?? t.palette.text.secondary, children: /* @__PURE__ */ n(
|
|
4248
|
+
return e.label ? /* @__PURE__ */ n(S, { color: e.color ?? t.palette.text.secondary, children: /* @__PURE__ */ n(Ca, { color: "inherit", variant: "caption", children: e.label }) }) : null;
|
|
4247
4249
|
}
|
|
4248
4250
|
const Ea = m("div")(({ theme: e }) => ({
|
|
4249
4251
|
margin: 0,
|
|
@@ -4251,12 +4253,12 @@ const Ea = m("div")(({ theme: e }) => ({
|
|
|
4251
4253
|
fontWeight: Number(e.typography.fontWeightMedium),
|
|
4252
4254
|
color: e.palette.text.primary,
|
|
4253
4255
|
display: "flex"
|
|
4254
|
-
})), La = m(
|
|
4256
|
+
})), La = m(H)(({ theme: e }) => ({
|
|
4255
4257
|
marginRight: e.spacing(0.5)
|
|
4256
|
-
})), Da = m(
|
|
4258
|
+
})), Da = m(H)(({ theme: e }) => ({
|
|
4257
4259
|
marginLeft: e.spacing(0.5)
|
|
4258
4260
|
}));
|
|
4259
|
-
function
|
|
4261
|
+
function $a({
|
|
4260
4262
|
row: e,
|
|
4261
4263
|
animated: t,
|
|
4262
4264
|
animationOptions: i,
|
|
@@ -4266,7 +4268,7 @@ function Pa({
|
|
|
4266
4268
|
return /* @__PURE__ */ v(Ea, { children: [
|
|
4267
4269
|
a ? /* @__PURE__ */ n(S, { color: o.palette.text.secondary, children: /* @__PURE__ */ n(La, { color: "inherit", component: "span", variant: "subtitle2", children: a }) }) : null,
|
|
4268
4270
|
/* @__PURE__ */ n(S, { fontWeight: s ? "bold" : "", children: /* @__PURE__ */ n(
|
|
4269
|
-
|
|
4271
|
+
Hn,
|
|
4270
4272
|
{
|
|
4271
4273
|
value: l,
|
|
4272
4274
|
enabled: t,
|
|
@@ -4277,7 +4279,7 @@ function Pa({
|
|
|
4277
4279
|
d ? /* @__PURE__ */ n(S, { color: o.palette.text.secondary, children: /* @__PURE__ */ n(Da, { color: "inherit", component: "span", variant: "subtitle2", children: d }) }) : null
|
|
4278
4280
|
] });
|
|
4279
4281
|
}
|
|
4280
|
-
const
|
|
4282
|
+
const Pa = (e) => e, Zt = [], Oa = m("div")(({ theme: e }) => ({
|
|
4281
4283
|
"&:nth-of-type(n+2)": {
|
|
4282
4284
|
marginTop: e.spacing(2)
|
|
4283
4285
|
}
|
|
@@ -4287,13 +4289,13 @@ function ps({
|
|
|
4287
4289
|
colors: t = Zt,
|
|
4288
4290
|
animated: i = !0,
|
|
4289
4291
|
animationOptions: r,
|
|
4290
|
-
formatter: o =
|
|
4292
|
+
formatter: o = Pa,
|
|
4291
4293
|
isLoading: a = !1
|
|
4292
4294
|
}) {
|
|
4293
4295
|
const l = Wa(e, t);
|
|
4294
|
-
return a ? /* @__PURE__ */ n(
|
|
4296
|
+
return a ? /* @__PURE__ */ n(Tn, {}) : /* @__PURE__ */ n("div", { children: l.map((d, s) => /* @__PURE__ */ v(Oa, { children: [
|
|
4295
4297
|
/* @__PURE__ */ n(
|
|
4296
|
-
|
|
4298
|
+
$a,
|
|
4297
4299
|
{
|
|
4298
4300
|
row: d,
|
|
4299
4301
|
animated: i,
|
|
@@ -4369,7 +4371,7 @@ function gs({
|
|
|
4369
4371
|
borderWidth: 0,
|
|
4370
4372
|
formatter: k
|
|
4371
4373
|
}, x = {
|
|
4372
|
-
data: b ? g.map((L,
|
|
4374
|
+
data: b ? g.map((L, P) => e[P]) : (g[0] ?? []).map((L) => L.name),
|
|
4373
4375
|
selectedMode: !1,
|
|
4374
4376
|
type: "scroll",
|
|
4375
4377
|
left: B,
|
|
@@ -4404,7 +4406,7 @@ function gs({
|
|
|
4404
4406
|
color: c.palette.text.primary
|
|
4405
4407
|
}
|
|
4406
4408
|
}, A = {
|
|
4407
|
-
formatter: ({ name: L, percent:
|
|
4409
|
+
formatter: ({ name: L, percent: P }) => `{per|${l(P)}%}
|
|
4408
4410
|
{b|${L}}`,
|
|
4409
4411
|
position: "center",
|
|
4410
4412
|
rich: {
|
|
@@ -4423,17 +4425,17 @@ function gs({
|
|
|
4423
4425
|
color: c.palette.text.primary
|
|
4424
4426
|
}
|
|
4425
4427
|
}
|
|
4426
|
-
},
|
|
4427
|
-
var
|
|
4428
|
+
}, C = g.map((L, P) => {
|
|
4429
|
+
var $;
|
|
4428
4430
|
return {
|
|
4429
4431
|
type: "pie",
|
|
4430
|
-
name: e[
|
|
4432
|
+
name: e[P],
|
|
4431
4433
|
itemStyle: {
|
|
4432
|
-
color: (
|
|
4434
|
+
color: ($ = L[0]) == null ? void 0 : $.color
|
|
4433
4435
|
},
|
|
4434
4436
|
animation: a,
|
|
4435
4437
|
data: L.map((W) => ({ ...W, itemStyle: { color: W.color } })),
|
|
4436
|
-
radius:
|
|
4438
|
+
radius: P === 0 ? ["75%", "90%"] : ["56%", "72%"],
|
|
4437
4439
|
selectedOffset: 0,
|
|
4438
4440
|
hoverOffset: 5,
|
|
4439
4441
|
bottom: B * 2.5,
|
|
@@ -4453,7 +4455,7 @@ function gs({
|
|
|
4453
4455
|
top: 0,
|
|
4454
4456
|
right: 0,
|
|
4455
4457
|
bottom: 0
|
|
4456
|
-
}, tooltip: M, legend: x, series:
|
|
4458
|
+
}, tooltip: M, legend: x, series: C };
|
|
4457
4459
|
}, [c, e, a, g, l, d]), w = {
|
|
4458
4460
|
mouseover: (b, k) => {
|
|
4459
4461
|
g.length === 1 && (b.seriesIndex !== 0 || b.dataIndex !== 0) && k.dispatchAction({
|
|
@@ -4470,11 +4472,11 @@ function gs({
|
|
|
4470
4472
|
});
|
|
4471
4473
|
},
|
|
4472
4474
|
click: (b) => {
|
|
4473
|
-
const M = g[b.seriesIndex][b.dataIndex].key,
|
|
4474
|
-
|
|
4475
|
+
const M = g[b.seriesIndex][b.dataIndex].key, T = s.includes(M), x = new Set(s);
|
|
4476
|
+
T ? x.delete(M) : x.add(M);
|
|
4475
4477
|
const A = g[0].length;
|
|
4476
|
-
let
|
|
4477
|
-
|
|
4478
|
+
let C = Array.from(x);
|
|
4479
|
+
C.length === A && (C = []), u(C);
|
|
4478
4480
|
}
|
|
4479
4481
|
};
|
|
4480
4482
|
U(() => {
|
|
@@ -4487,7 +4489,7 @@ function gs({
|
|
|
4487
4489
|
function h(b) {
|
|
4488
4490
|
y.current = b;
|
|
4489
4491
|
}
|
|
4490
|
-
return g.length ? p ? /* @__PURE__ */ n(
|
|
4492
|
+
return g.length ? p ? /* @__PURE__ */ n(Cn, { height: o }) : /* @__PURE__ */ n(
|
|
4491
4493
|
We,
|
|
4492
4494
|
{
|
|
4493
4495
|
onChartReady: h,
|
|
@@ -4498,14 +4500,14 @@ function gs({
|
|
|
4498
4500
|
}
|
|
4499
4501
|
) : null;
|
|
4500
4502
|
}
|
|
4501
|
-
const
|
|
4503
|
+
const Ha = () => {
|
|
4502
4504
|
};
|
|
4503
|
-
function
|
|
4505
|
+
function za({
|
|
4504
4506
|
icon: e,
|
|
4505
4507
|
hoverTooltip: t,
|
|
4506
4508
|
clickTooltip: i,
|
|
4507
4509
|
enabled: r,
|
|
4508
|
-
onEnabledChange: o =
|
|
4510
|
+
onEnabledChange: o = Ha,
|
|
4509
4511
|
tooltipPlacement: a = "bottom"
|
|
4510
4512
|
}) {
|
|
4511
4513
|
const [l, d] = _(!1), [s, u] = _(r);
|
|
@@ -4549,14 +4551,14 @@ const ja = m(fe, {
|
|
|
4549
4551
|
width: t.spacing(3),
|
|
4550
4552
|
transform: `rotate(${e ? "180" : "0"}deg)`,
|
|
4551
4553
|
backgroundColor: e ? t.palette.action.hover : void 0
|
|
4552
|
-
})), Ya = m(
|
|
4554
|
+
})), Ya = m(Pe, {
|
|
4553
4555
|
shouldForwardProp: (e) => e !== "disabled"
|
|
4554
4556
|
})(({ disabled: e, theme: t }) => ({
|
|
4555
4557
|
...e && {
|
|
4556
4558
|
pointerEvents: "none",
|
|
4557
4559
|
color: t.palette.text.disabled
|
|
4558
4560
|
}
|
|
4559
|
-
})), Va = m(
|
|
4561
|
+
})), Va = m(Pe)(() => ({
|
|
4560
4562
|
"&.Mui-disabled": {
|
|
4561
4563
|
opacity: 1
|
|
4562
4564
|
}
|
|
@@ -4575,7 +4577,7 @@ function Ua({
|
|
|
4575
4577
|
}) {
|
|
4576
4578
|
const u = le(), [p, c] = _(null), y = !!p, g = (M) => c(M.currentTarget), f = () => c(null), w = (M) => {
|
|
4577
4579
|
r && r(M), f();
|
|
4578
|
-
}, h = !!e.length && !!t.length, b = (M) => t.some((
|
|
4580
|
+
}, h = !!e.length && !!t.length, b = (M) => t.some((T) => T.id === M.id);
|
|
4579
4581
|
function k(M) {
|
|
4580
4582
|
return /* @__PURE__ */ n(
|
|
4581
4583
|
Ya,
|
|
@@ -4585,7 +4587,7 @@ function Ua({
|
|
|
4585
4587
|
disabled: s && b(M),
|
|
4586
4588
|
children: /* @__PURE__ */ v(S, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [
|
|
4587
4589
|
M.icon,
|
|
4588
|
-
/* @__PURE__ */ n(S, { ml: 2, children: /* @__PURE__ */ n(
|
|
4590
|
+
/* @__PURE__ */ n(S, { ml: 2, children: /* @__PURE__ */ n(H, { variant: "body2", color: "inherit", children: gn(M.label) }) })
|
|
4589
4591
|
] })
|
|
4590
4592
|
},
|
|
4591
4593
|
M.id
|
|
@@ -4614,7 +4616,7 @@ function Ua({
|
|
|
4614
4616
|
onClose: f,
|
|
4615
4617
|
MenuListProps: { "aria-labelledby": "feature-selection-menu-button" },
|
|
4616
4618
|
children: [
|
|
4617
|
-
d && /* @__PURE__ */ n(Va, { disabled: !0, children: /* @__PURE__ */ n(
|
|
4619
|
+
d && /* @__PURE__ */ n(Va, { disabled: !0, children: /* @__PURE__ */ n(H, { variant: "caption", color: "textSecondary", children: d }) }),
|
|
4618
4620
|
!!e.length && e.map(k),
|
|
4619
4621
|
h && /* @__PURE__ */ n(wt, { sx: { margin: ({ spacing: M }) => M(1, 0) } }),
|
|
4620
4622
|
!!t.length && t.map(k)
|
|
@@ -4623,7 +4625,7 @@ function Ua({
|
|
|
4623
4625
|
)
|
|
4624
4626
|
] });
|
|
4625
4627
|
}
|
|
4626
|
-
const
|
|
4628
|
+
const Xa = m(di)(({ theme: e }) => ({
|
|
4627
4629
|
display: "flex",
|
|
4628
4630
|
alignItems: "center",
|
|
4629
4631
|
marginLeft: e.spacing(1.5),
|
|
@@ -4635,11 +4637,11 @@ const qa = m(di)(({ theme: e }) => ({
|
|
|
4635
4637
|
"&::-webkit-scrollbar": {
|
|
4636
4638
|
display: "none"
|
|
4637
4639
|
}
|
|
4638
|
-
})),
|
|
4640
|
+
})), qa = () => {
|
|
4639
4641
|
};
|
|
4640
4642
|
function Ka({
|
|
4641
4643
|
features: e,
|
|
4642
|
-
onSelectGeometry: t =
|
|
4644
|
+
onSelectGeometry: t = qa,
|
|
4643
4645
|
onDeleteGeometry: i,
|
|
4644
4646
|
chipTooltip: r,
|
|
4645
4647
|
disabledChipTooltip: o,
|
|
@@ -4663,9 +4665,9 @@ function Ka({
|
|
|
4663
4665
|
return d || ((b = f.properties) == null ? void 0 : b.name) || `${h} ${w + 1}`;
|
|
4664
4666
|
}
|
|
4665
4667
|
const [y, g] = _(!1);
|
|
4666
|
-
return /* @__PURE__ */ n(S, { sx: { overflowX: "auto" }, children: /* @__PURE__ */ n(
|
|
4667
|
-
var
|
|
4668
|
-
const h = (
|
|
4668
|
+
return /* @__PURE__ */ n(S, { sx: { overflowX: "auto" }, children: /* @__PURE__ */ n(Xa, { sx: { gap: a === "small" ? 0.5 : 1 }, children: e.map((f, w) => {
|
|
4669
|
+
var T, x;
|
|
4670
|
+
const h = (T = f.properties) == null ? void 0 : T.disabled, b = (x = f.properties) == null ? void 0 : x.invalid;
|
|
4669
4671
|
let k = r;
|
|
4670
4672
|
h && (k = o || r), b && (k = u.formatMessage({
|
|
4671
4673
|
id: "c4r.widgets.featureSelection.invalid"
|
|
@@ -4689,7 +4691,7 @@ function Ka({
|
|
|
4689
4691
|
onDelete: i ? () => i(f) : void 0,
|
|
4690
4692
|
icon: b ? /* @__PURE__ */ n(Ii, { color: "error" }) : void 0,
|
|
4691
4693
|
deleteIcon: /* @__PURE__ */ n(
|
|
4692
|
-
|
|
4694
|
+
Ti,
|
|
4693
4695
|
{
|
|
4694
4696
|
onMouseEnter: () => g(!0),
|
|
4695
4697
|
onMouseLeave: () => g(!1)
|
|
@@ -4722,15 +4724,15 @@ function hs({
|
|
|
4722
4724
|
size: p = "medium",
|
|
4723
4725
|
chipLabel: c
|
|
4724
4726
|
}) {
|
|
4725
|
-
const y = se(), g = ce(y), f = F(() => e.map((
|
|
4726
|
-
...
|
|
4727
|
+
const y = se(), g = ce(y), f = F(() => e.map((T) => ({
|
|
4728
|
+
...T,
|
|
4727
4729
|
label: g.formatMessage({
|
|
4728
|
-
id: `c4r.widgets.featureSelection.${Jt(
|
|
4730
|
+
id: `c4r.widgets.featureSelection.${Jt(T.id)}`
|
|
4729
4731
|
})
|
|
4730
|
-
})), [e, g]), w = F(() => t.map((
|
|
4731
|
-
...
|
|
4732
|
+
})), [e, g]), w = F(() => t.map((T) => ({
|
|
4733
|
+
...T,
|
|
4732
4734
|
label: g.formatMessage({
|
|
4733
|
-
id: `c4r.widgets.featureSelection.${Jt(
|
|
4735
|
+
id: `c4r.widgets.featureSelection.${Jt(T.id)}`
|
|
4734
4736
|
})
|
|
4735
4737
|
})), [t, g]), h = F(() => {
|
|
4736
4738
|
const x = [
|
|
@@ -4758,7 +4760,7 @@ function hs({
|
|
|
4758
4760
|
});
|
|
4759
4761
|
return /* @__PURE__ */ v(Za, { children: [
|
|
4760
4762
|
/* @__PURE__ */ n(
|
|
4761
|
-
|
|
4763
|
+
za,
|
|
4762
4764
|
{
|
|
4763
4765
|
icon: h == null ? void 0 : h.icon,
|
|
4764
4766
|
hoverTooltip: k,
|
|
@@ -4808,10 +4810,10 @@ function hs({
|
|
|
4808
4810
|
function Jt(e) {
|
|
4809
4811
|
return e.charAt(0).toLowerCase() + e.slice(1);
|
|
4810
4812
|
}
|
|
4811
|
-
const
|
|
4813
|
+
const zn = 240, Qa = m(hn, {
|
|
4812
4814
|
shouldForwardProp: (e) => e !== "collapsed"
|
|
4813
4815
|
})(({ theme: e, collapsed: t }) => ({
|
|
4814
|
-
width: t ? "min-content" :
|
|
4816
|
+
width: t ? "min-content" : zn,
|
|
4815
4817
|
background: e.palette.background.paper,
|
|
4816
4818
|
maxHeight: "calc(100% - 120px)",
|
|
4817
4819
|
display: "flex",
|
|
@@ -4840,7 +4842,7 @@ const Hn = 240, Qa = m(hn, {
|
|
|
4840
4842
|
gap: e.spacing(2),
|
|
4841
4843
|
alignItems: "center",
|
|
4842
4844
|
padding: e.spacing(1),
|
|
4843
|
-
minWidth: `calc(${
|
|
4845
|
+
minWidth: `calc(${zn}px - ${e.spacing(4)})`
|
|
4844
4846
|
})), il = m(ot)(({ theme: e }) => ({
|
|
4845
4847
|
display: "flex",
|
|
4846
4848
|
width: e.spacing(7.5),
|
|
@@ -4977,31 +4979,30 @@ function cl({
|
|
|
4977
4979
|
}
|
|
4978
4980
|
function Lt({
|
|
4979
4981
|
title: e,
|
|
4980
|
-
visible: t
|
|
4981
|
-
typographyProps: i
|
|
4982
|
+
visible: t
|
|
4982
4983
|
}) {
|
|
4983
|
-
const
|
|
4984
|
+
const i = re(null), [r, o] = _(!1);
|
|
4984
4985
|
an(() => {
|
|
4985
|
-
if (t &&
|
|
4986
|
-
const { offsetWidth:
|
|
4987
|
-
|
|
4986
|
+
if (t && i.current) {
|
|
4987
|
+
const { offsetWidth: l, scrollWidth: d } = i.current;
|
|
4988
|
+
o(l < d);
|
|
4988
4989
|
}
|
|
4989
4990
|
}, [e, t]);
|
|
4990
|
-
const
|
|
4991
|
-
|
|
4991
|
+
const a = /* @__PURE__ */ n(
|
|
4992
|
+
H,
|
|
4992
4993
|
{
|
|
4993
|
-
ref:
|
|
4994
|
+
ref: i,
|
|
4994
4995
|
color: t ? "textPrimary" : "textSecondary",
|
|
4995
|
-
|
|
4996
|
+
variant: "caption",
|
|
4997
|
+
weight: "regular",
|
|
4996
4998
|
component: "p",
|
|
4997
4999
|
noWrap: !0,
|
|
4998
5000
|
my: 0.25,
|
|
4999
5001
|
textTransform: "none",
|
|
5000
|
-
...i,
|
|
5001
5002
|
children: e
|
|
5002
5003
|
}
|
|
5003
5004
|
);
|
|
5004
|
-
return
|
|
5005
|
+
return r ? /* @__PURE__ */ n(ue, { title: e, children: a }) : a;
|
|
5005
5006
|
}
|
|
5006
5007
|
var Ie = /* @__PURE__ */ ((e) => (e.CATEGORY = "category", e.ICON = "icon", e.CONTINUOUS_RAMP = "continuous_ramp", e.BINS = "bins", e.PROPORTION = "proportion", e))(Ie || {});
|
|
5007
5008
|
const ut = 20;
|
|
@@ -5028,7 +5029,7 @@ function dl({
|
|
|
5028
5029
|
`${p}${c}`
|
|
5029
5030
|
)) }),
|
|
5030
5031
|
d && /* @__PURE__ */ n(
|
|
5031
|
-
|
|
5032
|
+
H,
|
|
5032
5033
|
{
|
|
5033
5034
|
variant: "caption",
|
|
5034
5035
|
color: "textSecondary",
|
|
@@ -5115,14 +5116,7 @@ function hl({
|
|
|
5115
5116
|
color: i
|
|
5116
5117
|
}
|
|
5117
5118
|
),
|
|
5118
|
-
/* @__PURE__ */ n(
|
|
5119
|
-
Lt,
|
|
5120
|
-
{
|
|
5121
|
-
title: e,
|
|
5122
|
-
visible: !0,
|
|
5123
|
-
typographyProps: { variant: "overline", my: 0.75 }
|
|
5124
|
-
}
|
|
5125
|
-
)
|
|
5119
|
+
/* @__PURE__ */ n(Lt, { title: e, visible: !0 })
|
|
5126
5120
|
] });
|
|
5127
5121
|
}
|
|
5128
5122
|
const Ze = 6, rt = {
|
|
@@ -5178,20 +5172,20 @@ function vl({
|
|
|
5178
5172
|
},
|
|
5179
5173
|
p
|
|
5180
5174
|
)) }),
|
|
5181
|
-
/* @__PURE__ */ n(wl, { children: l ? /* @__PURE__ */ n(S, { maxWidth: 240, children: /* @__PURE__ */ n(
|
|
5182
|
-
/* @__PURE__ */ v(
|
|
5175
|
+
/* @__PURE__ */ n(wl, { children: l ? /* @__PURE__ */ n(S, { maxWidth: 240, children: /* @__PURE__ */ n(H, { variant: "overline", children: "You need to specify valid numbers for the labels property" }) }) : /* @__PURE__ */ v(ie, { children: [
|
|
5176
|
+
/* @__PURE__ */ v(H, { variant: "overline", color: "textSecondary", children: [
|
|
5183
5177
|
r && i.formatMessage({ id: "c4r.widgets.legend.max" }) + ": ",
|
|
5184
5178
|
t.formatNumber(a, {
|
|
5185
5179
|
maximumSignificantDigits: Ze
|
|
5186
5180
|
})
|
|
5187
5181
|
] }),
|
|
5188
|
-
/* @__PURE__ */ n(
|
|
5182
|
+
/* @__PURE__ */ n(H, { variant: "overline", color: "textSecondary", children: t.formatNumber(s, {
|
|
5189
5183
|
maximumSignificantDigits: Ze
|
|
5190
5184
|
}) }),
|
|
5191
|
-
/* @__PURE__ */ n(
|
|
5185
|
+
/* @__PURE__ */ n(H, { variant: "overline", color: "textSecondary", children: t.formatNumber(d, {
|
|
5192
5186
|
maximumSignificantDigits: Ze
|
|
5193
5187
|
}) }),
|
|
5194
|
-
/* @__PURE__ */ v(
|
|
5188
|
+
/* @__PURE__ */ v(H, { variant: "overline", color: "textSecondary", children: [
|
|
5195
5189
|
r && i.formatMessage({ id: "c4r.widgets.legend.min" }) + ": ",
|
|
5196
5190
|
t.formatNumber(o, {
|
|
5197
5191
|
maximumSignificantDigits: Ze
|
|
@@ -5227,14 +5221,7 @@ function kl({
|
|
|
5227
5221
|
height: pt
|
|
5228
5222
|
}
|
|
5229
5223
|
) }),
|
|
5230
|
-
/* @__PURE__ */ n(
|
|
5231
|
-
Lt,
|
|
5232
|
-
{
|
|
5233
|
-
visible: !0,
|
|
5234
|
-
title: r,
|
|
5235
|
-
typographyProps: { variant: "overline", my: 0.75 }
|
|
5236
|
-
}
|
|
5237
|
-
)
|
|
5224
|
+
/* @__PURE__ */ n(Lt, { visible: !0, title: r })
|
|
5238
5225
|
] }, r)) });
|
|
5239
5226
|
}
|
|
5240
5227
|
function Sl(e) {
|
|
@@ -5249,7 +5236,7 @@ function en({
|
|
|
5249
5236
|
!i.length || e ? 2 : i.length + 1
|
|
5250
5237
|
), 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
5238
|
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(
|
|
5239
|
+
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(H, { variant: "overline", children: "You need to specify valid numbers for the labels property" }) }) : /* @__PURE__ */ v(ie, { children: [
|
|
5253
5240
|
/* @__PURE__ */ n(S, { display: "flex", pb: 1, children: e ? /* @__PURE__ */ n(
|
|
5254
5241
|
Ml,
|
|
5255
5242
|
{
|
|
@@ -5257,7 +5244,7 @@ function en({
|
|
|
5257
5244
|
palette: a
|
|
5258
5245
|
}
|
|
5259
5246
|
) : /* @__PURE__ */ n(
|
|
5260
|
-
|
|
5247
|
+
Tl,
|
|
5261
5248
|
{
|
|
5262
5249
|
palette: a,
|
|
5263
5250
|
labels: s,
|
|
@@ -5266,8 +5253,8 @@ function en({
|
|
|
5266
5253
|
}
|
|
5267
5254
|
) }),
|
|
5268
5255
|
/* @__PURE__ */ v(S, { display: "flex", justifyContent: "space-between", children: [
|
|
5269
|
-
/* @__PURE__ */ n(
|
|
5270
|
-
/* @__PURE__ */ n(
|
|
5256
|
+
/* @__PURE__ */ n(H, { variant: "overlineDelicate", color: "textSecondary", children: g }),
|
|
5257
|
+
/* @__PURE__ */ n(H, { variant: "overlineDelicate", color: "textSecondary", children: y })
|
|
5271
5258
|
] })
|
|
5272
5259
|
] }) });
|
|
5273
5260
|
}
|
|
@@ -5293,7 +5280,7 @@ const Ml = m(S, {
|
|
|
5293
5280
|
borderRadius: t.spacing(0, 0.5, 0.5, 0)
|
|
5294
5281
|
}
|
|
5295
5282
|
}));
|
|
5296
|
-
function
|
|
5283
|
+
function Tl({
|
|
5297
5284
|
labels: e = [],
|
|
5298
5285
|
palette: t = [],
|
|
5299
5286
|
max: i,
|
|
@@ -5305,7 +5292,7 @@ function Cl({
|
|
|
5305
5292
|
return /* @__PURE__ */ n(ue, { title: d, children: /* @__PURE__ */ n(Il, { "data-testid": "step-discontinuous", color: t[l] }) }, l);
|
|
5306
5293
|
}) });
|
|
5307
5294
|
}
|
|
5308
|
-
const
|
|
5295
|
+
const Cl = {
|
|
5309
5296
|
[Ie.CATEGORY]: dl,
|
|
5310
5297
|
[Ie.PROPORTION]: vl,
|
|
5311
5298
|
[Ie.ICON]: kl,
|
|
@@ -5314,7 +5301,7 @@ const Tl = {
|
|
|
5314
5301
|
};
|
|
5315
5302
|
function Al({ legend: e }) {
|
|
5316
5303
|
const t = se(), i = ce(t);
|
|
5317
|
-
return e.select || !e.type ? null : /* @__PURE__ */ v(
|
|
5304
|
+
return e.select || !e.type ? null : /* @__PURE__ */ v(H, { variant: "body2", color: "textSecondary", component: "p", children: [
|
|
5318
5305
|
e.type,
|
|
5319
5306
|
" ",
|
|
5320
5307
|
i.formatMessage({ id: "c4r.widgets.legend.notSupported" }),
|
|
@@ -5331,11 +5318,11 @@ function Ll({
|
|
|
5331
5318
|
onChangeSelection: r
|
|
5332
5319
|
}) {
|
|
5333
5320
|
var p;
|
|
5334
|
-
const o = se(), a = ce(o), l = t.type, s =
|
|
5321
|
+
const o = se(), a = ce(o), l = t.type, s = Cl[l] ?? i[l] ?? Al, u = ((p = t.select) == null ? void 0 : p.options) ?? [];
|
|
5335
5322
|
return /* @__PURE__ */ v(S, { component: "li", "data-testid": "legend-layer-variable", px: 2, children: [
|
|
5336
5323
|
t.attr ? /* @__PURE__ */ v(S, { pb: 1, children: [
|
|
5337
5324
|
/* @__PURE__ */ n(
|
|
5338
|
-
|
|
5325
|
+
H,
|
|
5339
5326
|
{
|
|
5340
5327
|
gutterBottom: !0,
|
|
5341
5328
|
variant: "overlineDelicate",
|
|
@@ -5344,10 +5331,10 @@ function Ll({
|
|
|
5344
5331
|
children: a.formatMessage({ id: El(t) })
|
|
5345
5332
|
}
|
|
5346
5333
|
),
|
|
5347
|
-
/* @__PURE__ */ n(
|
|
5334
|
+
/* @__PURE__ */ n(H, { variant: "caption", component: "p", children: t.attr })
|
|
5348
5335
|
] }) : null,
|
|
5349
5336
|
t.select ? /* @__PURE__ */ v(S, { pb: 1, children: [
|
|
5350
|
-
/* @__PURE__ */ n(
|
|
5337
|
+
/* @__PURE__ */ n(H, { variant: "caption", weight: "medium", component: "p", children: t.select.label }),
|
|
5351
5338
|
/* @__PURE__ */ n(
|
|
5352
5339
|
pi,
|
|
5353
5340
|
{
|
|
@@ -5368,7 +5355,7 @@ function Ll({
|
|
|
5368
5355
|
}
|
|
5369
5356
|
}
|
|
5370
5357
|
},
|
|
5371
|
-
children: u.map((c) => /* @__PURE__ */ n(
|
|
5358
|
+
children: u.map((c) => /* @__PURE__ */ n(Pe, { value: c.value, children: /* @__PURE__ */ n(gi, { primary: c.label }) }, c.value))
|
|
5372
5359
|
}
|
|
5373
5360
|
)
|
|
5374
5361
|
] }) : null,
|
|
@@ -5390,13 +5377,13 @@ function tn({
|
|
|
5390
5377
|
minZoom: d = 0,
|
|
5391
5378
|
currentZoom: s = 0
|
|
5392
5379
|
}) {
|
|
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),
|
|
5380
|
+
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), T = t.opacity ?? 1, x = t.showOpacityControl ?? !0, A = h && !k, C = 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
5381
|
intl: p,
|
|
5395
5382
|
minZoom: d,
|
|
5396
5383
|
maxZoom: l,
|
|
5397
5384
|
layerMinZoom: L,
|
|
5398
|
-
layerMaxZoom:
|
|
5399
|
-
}), G = t.helperText ?? (
|
|
5385
|
+
layerMaxZoom: P
|
|
5386
|
+
}), G = t.helperText ?? ($ ? J : ""), D = F(() => t.legend ? Array.isArray(t.legend) ? t.legend : [t.legend] : [], [t.legend]);
|
|
5400
5387
|
return t.legend ? /* @__PURE__ */ v(ll, { "data-testid": "legend-layer", "aria-label": w, children: [
|
|
5401
5388
|
/* @__PURE__ */ v(tl, { ref: c, children: [
|
|
5402
5389
|
M && /* @__PURE__ */ n(
|
|
@@ -5408,19 +5395,19 @@ function tn({
|
|
|
5408
5395
|
}),
|
|
5409
5396
|
disabled: !h,
|
|
5410
5397
|
onClick: () => i({ id: f, collapsed: !k }),
|
|
5411
|
-
children:
|
|
5398
|
+
children: C
|
|
5412
5399
|
}
|
|
5413
5400
|
),
|
|
5414
5401
|
/* @__PURE__ */ v(sl, { children: [
|
|
5415
5402
|
/* @__PURE__ */ n(Lt, { visible: h, title: w ?? "" }),
|
|
5416
|
-
|
|
5403
|
+
$ && /* @__PURE__ */ n(
|
|
5417
5404
|
ue,
|
|
5418
5405
|
{
|
|
5419
5406
|
title: p.formatMessage({
|
|
5420
5407
|
id: "c4r.widgets.legend.zoomLevelTooltip"
|
|
5421
5408
|
}),
|
|
5422
5409
|
children: /* @__PURE__ */ v(
|
|
5423
|
-
|
|
5410
|
+
H,
|
|
5424
5411
|
{
|
|
5425
5412
|
color: h ? "textPrimary" : "textSecondary",
|
|
5426
5413
|
variant: "caption",
|
|
@@ -5445,7 +5432,7 @@ function tn({
|
|
|
5445
5432
|
menuRef: c,
|
|
5446
5433
|
open: y,
|
|
5447
5434
|
toggleOpen: g,
|
|
5448
|
-
opacity:
|
|
5435
|
+
opacity: T,
|
|
5449
5436
|
onChange: (N) => r({ id: f, opacity: N })
|
|
5450
5437
|
}
|
|
5451
5438
|
),
|
|
@@ -5464,7 +5451,7 @@ function tn({
|
|
|
5464
5451
|
collapsed: h ? k : !1,
|
|
5465
5452
|
visible: !h
|
|
5466
5453
|
}),
|
|
5467
|
-
children: h ? /* @__PURE__ */ n(
|
|
5454
|
+
children: h ? /* @__PURE__ */ n(Ci, {}) : /* @__PURE__ */ n(Ai, {})
|
|
5468
5455
|
}
|
|
5469
5456
|
)
|
|
5470
5457
|
}
|
|
@@ -5476,7 +5463,7 @@ function tn({
|
|
|
5476
5463
|
{
|
|
5477
5464
|
"data-testid": "legend-layer-variable-list",
|
|
5478
5465
|
opacity: W ? 0.5 : 1,
|
|
5479
|
-
children:
|
|
5466
|
+
children: D.map((N, I) => /* @__PURE__ */ n(
|
|
5480
5467
|
Ll,
|
|
5481
5468
|
{
|
|
5482
5469
|
legend: N,
|
|
@@ -5489,7 +5476,7 @@ function tn({
|
|
|
5489
5476
|
}
|
|
5490
5477
|
),
|
|
5491
5478
|
G && /* @__PURE__ */ n(
|
|
5492
|
-
|
|
5479
|
+
H,
|
|
5493
5480
|
{
|
|
5494
5481
|
variant: "caption",
|
|
5495
5482
|
color: "textSecondary",
|
|
@@ -5501,7 +5488,7 @@ function tn({
|
|
|
5501
5488
|
] })
|
|
5502
5489
|
] }) : null;
|
|
5503
5490
|
}
|
|
5504
|
-
function
|
|
5491
|
+
function $l({
|
|
5505
5492
|
intl: e,
|
|
5506
5493
|
minZoom: t,
|
|
5507
5494
|
maxZoom: i,
|
|
@@ -5513,17 +5500,17 @@ function Pl({
|
|
|
5513
5500
|
}), 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
5501
|
return c ? `${s} ${c}` : "";
|
|
5515
5502
|
}
|
|
5516
|
-
const
|
|
5503
|
+
const Pl = {}, ze = () => {
|
|
5517
5504
|
}, Ol = [];
|
|
5518
5505
|
function fs({
|
|
5519
|
-
customLegendTypes: e =
|
|
5506
|
+
customLegendTypes: e = Pl,
|
|
5520
5507
|
layers: t = Ol,
|
|
5521
5508
|
collapsed: i = !1,
|
|
5522
|
-
onChangeCollapsed: r =
|
|
5523
|
-
onChangeVisibility: o =
|
|
5524
|
-
onChangeOpacity: a =
|
|
5525
|
-
onChangeLegendRowCollapsed: l =
|
|
5526
|
-
onChangeSelection: d =
|
|
5509
|
+
onChangeCollapsed: r = ze,
|
|
5510
|
+
onChangeVisibility: o = ze,
|
|
5511
|
+
onChangeOpacity: a = ze,
|
|
5512
|
+
onChangeLegendRowCollapsed: l = ze,
|
|
5513
|
+
onChangeSelection: d = ze,
|
|
5527
5514
|
title: s = "Layers",
|
|
5528
5515
|
maxZoom: u = 20,
|
|
5529
5516
|
minZoom: p = 0,
|
|
@@ -5532,7 +5519,7 @@ function fs({
|
|
|
5532
5519
|
sx: g
|
|
5533
5520
|
}) {
|
|
5534
5521
|
const f = se(), w = ce(f), h = /* @__PURE__ */ v(el, { collapsed: i, children: [
|
|
5535
|
-
/* @__PURE__ */ n(
|
|
5522
|
+
/* @__PURE__ */ n(H, { variant: "caption", flexGrow: 1, children: s }),
|
|
5536
5523
|
/* @__PURE__ */ n(
|
|
5537
5524
|
ue,
|
|
5538
5525
|
{
|
|
@@ -5599,7 +5586,7 @@ function nn({
|
|
|
5599
5586
|
children: t
|
|
5600
5587
|
}) {
|
|
5601
5588
|
return t ? /* @__PURE__ */ n(S, { mt: 0.5, children: /* @__PURE__ */ n(
|
|
5602
|
-
|
|
5589
|
+
H,
|
|
5603
5590
|
{
|
|
5604
5591
|
component: "div",
|
|
5605
5592
|
variant: "caption",
|
|
@@ -5615,8 +5602,8 @@ function ms({
|
|
|
5615
5602
|
severity: i = void 0,
|
|
5616
5603
|
...r
|
|
5617
5604
|
}) {
|
|
5618
|
-
return i ? /* @__PURE__ */ n(
|
|
5619
|
-
e && /* @__PURE__ */ n(
|
|
5605
|
+
return i ? /* @__PURE__ */ n($i, { title: e, severity: i, ...r, children: /* @__PURE__ */ n(nn, { children: t }) }) : /* @__PURE__ */ v(S, { ...r, children: [
|
|
5606
|
+
e && /* @__PURE__ */ n(H, { variant: "body2", children: e }),
|
|
5620
5607
|
/* @__PURE__ */ n(nn, { color: "textSecondary", children: t })
|
|
5621
5608
|
] });
|
|
5622
5609
|
}
|
|
@@ -5643,7 +5630,7 @@ const Wl = m(S, {
|
|
|
5643
5630
|
width: "100%",
|
|
5644
5631
|
...t ? { minHeight: e.spacing(3) } : { height: e.spacing(3) },
|
|
5645
5632
|
padding: 0
|
|
5646
|
-
})), Nl = m(
|
|
5633
|
+
})), Nl = m($e, {
|
|
5647
5634
|
shouldForwardProp: (e) => e !== "expandable"
|
|
5648
5635
|
})(({ theme: e, expandable: t = !0 }) => ({
|
|
5649
5636
|
flex: 1,
|
|
@@ -5668,7 +5655,7 @@ const Wl = m(S, {
|
|
|
5668
5655
|
width: e.spacing(3),
|
|
5669
5656
|
height: e.spacing(3),
|
|
5670
5657
|
color: e.palette.text.secondary
|
|
5671
|
-
}), Bl = m(fn)(({ theme: e }) => Gn({ theme: e })), _l = m(mn)(({ theme: e }) => Gn({ theme: e })),
|
|
5658
|
+
}), Bl = m(fn)(({ theme: e }) => Gn({ theme: e })), _l = m(mn)(({ theme: e }) => Gn({ theme: e })), Hl = m(De, {
|
|
5672
5659
|
shouldForwardProp: (e) => e !== "expanded"
|
|
5673
5660
|
})(({ expanded: e = !0 }) => ({
|
|
5674
5661
|
wordBreak: "break-word",
|
|
@@ -5682,7 +5669,7 @@ const Wl = m(S, {
|
|
|
5682
5669
|
whiteSpace: "nowrap",
|
|
5683
5670
|
textOverflow: "ellipsis"
|
|
5684
5671
|
}
|
|
5685
|
-
})),
|
|
5672
|
+
})), zl = m(ae)(({ theme: e }) => ({
|
|
5686
5673
|
display: "flex",
|
|
5687
5674
|
alignItems: "center",
|
|
5688
5675
|
gap: e.spacing(1),
|
|
@@ -5713,13 +5700,13 @@ function ys({
|
|
|
5713
5700
|
isLoading: y = !1,
|
|
5714
5701
|
margin: g
|
|
5715
5702
|
}) {
|
|
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, [
|
|
5703
|
+
const f = ni(), [w, h] = _(!0), b = s !== void 0 && u !== void 0, k = d !== !1 ? b ? s : w : !0, M = b ? u : h, [T, x] = _(null), A = !!T, C = () => {
|
|
5717
5704
|
d && M(!k);
|
|
5718
5705
|
}, O = (W) => x(W.currentTarget), L = () => x(null);
|
|
5719
|
-
function
|
|
5706
|
+
function P(W) {
|
|
5720
5707
|
W && W(), L();
|
|
5721
5708
|
}
|
|
5722
|
-
const
|
|
5709
|
+
const $ = (W) => /* @__PURE__ */ n(
|
|
5723
5710
|
rn,
|
|
5724
5711
|
{
|
|
5725
5712
|
"aria-label": W.label,
|
|
@@ -5737,22 +5724,22 @@ function ys({
|
|
|
5737
5724
|
{
|
|
5738
5725
|
expandable: d,
|
|
5739
5726
|
startIcon: d && /* @__PURE__ */ n(fi, { children: k ? /* @__PURE__ */ n(Bl, {}) : /* @__PURE__ */ n(_l, {}) }),
|
|
5740
|
-
onClick:
|
|
5727
|
+
onClick: C,
|
|
5741
5728
|
tabIndex: d ? 0 : -1,
|
|
5742
|
-
children: /* @__PURE__ */ n(ue, { title: e, children: /* @__PURE__ */ n(
|
|
5729
|
+
children: /* @__PURE__ */ n(ue, { title: e, children: /* @__PURE__ */ n(Hl, { expanded: s, align: "left", variant: "subtitle1", children: e }) })
|
|
5743
5730
|
}
|
|
5744
5731
|
),
|
|
5745
|
-
/* @__PURE__ */ v(
|
|
5732
|
+
/* @__PURE__ */ v(zl, { item: !0, children: [
|
|
5746
5733
|
c,
|
|
5747
5734
|
t.length > 0 && t.map((W) => W.tooltip ? /* @__PURE__ */ n(
|
|
5748
5735
|
ue,
|
|
5749
5736
|
{
|
|
5750
5737
|
title: W.tooltip.text,
|
|
5751
5738
|
placement: W.tooltip.placement ?? "top",
|
|
5752
|
-
children:
|
|
5739
|
+
children: $(W)
|
|
5753
5740
|
},
|
|
5754
5741
|
W.id
|
|
5755
|
-
) :
|
|
5742
|
+
) : $(W)),
|
|
5756
5743
|
i.length > 0 && /* @__PURE__ */ v(ie, { children: [
|
|
5757
5744
|
/* @__PURE__ */ n(
|
|
5758
5745
|
rn,
|
|
@@ -5778,15 +5765,15 @@ function ys({
|
|
|
5778
5765
|
vertical: "top",
|
|
5779
5766
|
horizontal: "right"
|
|
5780
5767
|
},
|
|
5781
|
-
anchorEl:
|
|
5768
|
+
anchorEl: T,
|
|
5782
5769
|
keepMounted: !0,
|
|
5783
5770
|
open: A,
|
|
5784
5771
|
onClose: L,
|
|
5785
5772
|
children: i.map((W) => /* @__PURE__ */ n(
|
|
5786
|
-
|
|
5773
|
+
Pe,
|
|
5787
5774
|
{
|
|
5788
5775
|
selected: W.selected,
|
|
5789
|
-
onClick: () =>
|
|
5776
|
+
onClick: () => P(W.action),
|
|
5790
5777
|
children: W.name
|
|
5791
5778
|
},
|
|
5792
5779
|
W.id
|
|
@@ -5810,7 +5797,7 @@ export {
|
|
|
5810
5797
|
gs as ComparativePieWidgetUI,
|
|
5811
5798
|
Ua as FeatureSelectionUIDropdown,
|
|
5812
5799
|
Ka as FeatureSelectionUIGeometryChips,
|
|
5813
|
-
|
|
5800
|
+
za as FeatureSelectionUIToggleButton,
|
|
5814
5801
|
hs as FeatureSelectionWidgetUI,
|
|
5815
5802
|
rs as FormulaWidgetUI,
|
|
5816
5803
|
Se as GroupDateTypes,
|