@adecore/charts 0.53.3 → 0.54.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Heatmap.js +6 -5
- package/dist/Root.js +275 -251
- package/dist/SeriesLegend.js +2 -2
- package/dist/Sparkline.js +2 -2
- package/dist/ValuesBox.d.ts +6 -0
- package/dist/ValuesBox.js +43 -0
- package/dist/annotations.js +1 -1
- package/dist/axes.js +3 -3
- package/dist/overlays.js +121 -115
- package/dist/series.d.ts +1 -1
- package/dist/series.js +1 -1
- package/dist/timeline.js +3 -3
- package/dist/values-table.d.ts +1 -4
- package/dist/values-table.js +1 -4
- package/package.json +3 -3
- package/src/Heatmap.tsx +6 -5
- package/src/Root.tsx +98 -88
- package/src/SeriesLegend.tsx +2 -2
- package/src/Sparkline.tsx +3 -3
- package/src/ValuesBox.tsx +19 -0
- package/src/annotations.tsx +1 -1
- package/src/axes.tsx +3 -3
- package/src/overlays.tsx +5 -4
- package/src/scatter.tsx +1 -1
- package/src/series.tsx +2 -2
- package/src/timeline.tsx +3 -3
- package/src/values-table.ts +1 -2
package/dist/Root.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useContentSize, useOverlayScrollbars } from '@adecore/ui';
|
|
3
|
+
import { formatNumber, formatRounded } from '@adecore/ui/format';
|
|
3
4
|
import clsx from 'clsx';
|
|
5
|
+
import { useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
4
6
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { useContentSize } from '@adecore/ui';
|
|
6
|
-
import { formatNumber, formatRounded } from '@adecore/ui/format';
|
|
7
7
|
import { readValue, warnMissingKey, warnOnce, xOf } from './access.js';
|
|
8
8
|
import { LABEL_GAP as X_AXIS_GAP } from "./axes.js";
|
|
9
9
|
import { bandLayout, GROUP_GAP } from './band.js';
|
|
@@ -33,7 +33,7 @@ const NO_ENTRIES = new Map();
|
|
|
33
33
|
const defaultValue = value => Number.isInteger(value) ? formatNumber(value) : formatRounded(value, 2);
|
|
34
34
|
/* The box of a chart: owns the data, the scales, the cursor and the keyboard; each part inside draws one layer. */
|
|
35
35
|
export function ChartRoot(t0) {
|
|
36
|
-
const $ = _c(
|
|
36
|
+
const $ = _c(114);
|
|
37
37
|
const {
|
|
38
38
|
data,
|
|
39
39
|
x,
|
|
@@ -121,6 +121,7 @@ export function ChartRoot(t0) {
|
|
|
121
121
|
const [measureGroups, groupsSize] = useContentSize();
|
|
122
122
|
const boxHeight = grow ? Math.max(leastHeight, size.height - groupsSize.height) : leastHeight;
|
|
123
123
|
const scroller = useRef(null);
|
|
124
|
+
const [scrollBox, setScrollBox] = useState(null);
|
|
124
125
|
const points = rows === "points";
|
|
125
126
|
const band = xScale === "band" && !points;
|
|
126
127
|
const horizontal = orientation === "horizontal" && band;
|
|
@@ -269,6 +270,16 @@ export function ChartRoot(t0) {
|
|
|
269
270
|
const width = layout === null || horizontal ? room : Math.max(room, Math.ceil(layout.width + marginLeft + marginRight));
|
|
270
271
|
const scrolls = layout !== null && width > room;
|
|
271
272
|
const overhang = scrolls ? leftAxis : 0;
|
|
273
|
+
let t25;
|
|
274
|
+
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
275
|
+
t25 = {
|
|
276
|
+
axis: "x"
|
|
277
|
+
};
|
|
278
|
+
$[45] = t25;
|
|
279
|
+
} else {
|
|
280
|
+
t25 = $[45];
|
|
281
|
+
}
|
|
282
|
+
const scrollbars = useOverlayScrollbars(scrolls ? scrollBox : null, t25);
|
|
272
283
|
const xRows = [...xAxes.values()];
|
|
273
284
|
const valueRoom = horizontal ? Math.max(0, ...[...series.values()].map(_temp2)) : 0;
|
|
274
285
|
const titleRoom = leftY?.top ?? rightY?.top ?? 0;
|
|
@@ -371,10 +382,10 @@ export function ChartRoot(t0) {
|
|
|
371
382
|
});
|
|
372
383
|
return [left, pixel_0];
|
|
373
384
|
});
|
|
374
|
-
const readable = [...series].filter((
|
|
375
|
-
const [, entry_6] =
|
|
376
|
-
return !points || all.findIndex(
|
|
377
|
-
const [, other] =
|
|
385
|
+
const readable = [...series].filter((t26, index_7, all) => {
|
|
386
|
+
const [, entry_6] = t26;
|
|
387
|
+
return !points || all.findIndex(t27 => {
|
|
388
|
+
const [, other] = t27;
|
|
378
389
|
return other.label === entry_6.label;
|
|
379
390
|
}) === index_7;
|
|
380
391
|
});
|
|
@@ -480,9 +491,9 @@ export function ChartRoot(t0) {
|
|
|
480
491
|
const keyIndex = indexAt(keyX);
|
|
481
492
|
const from_0 = keyIndex >= 0 ? keyIndex : activeIndex;
|
|
482
493
|
const ownsCursor = controlled || sharedCursor === null || sharedCursor.owner === id;
|
|
483
|
-
let
|
|
484
|
-
if ($[
|
|
485
|
-
|
|
494
|
+
let t28;
|
|
495
|
+
if ($[46] !== controlled || $[47] !== id || $[48] !== onActiveXChange || $[49] !== sharedCursor) {
|
|
496
|
+
t28 = value_5 => {
|
|
486
497
|
if (!controlled) {
|
|
487
498
|
if (sharedCursor !== null) {
|
|
488
499
|
sharedCursor.setX(value_5, id);
|
|
@@ -492,42 +503,42 @@ export function ChartRoot(t0) {
|
|
|
492
503
|
}
|
|
493
504
|
onActiveXChange?.(value_5);
|
|
494
505
|
};
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
} else {
|
|
501
|
-
t27 = $[49];
|
|
502
|
-
}
|
|
503
|
-
const setActiveX = t27;
|
|
504
|
-
let t28;
|
|
505
|
-
if ($[50] !== selected) {
|
|
506
|
-
t28 = new Set((selected ?? []).map(String));
|
|
507
|
-
$[50] = selected;
|
|
508
|
-
$[51] = t28;
|
|
506
|
+
$[46] = controlled;
|
|
507
|
+
$[47] = id;
|
|
508
|
+
$[48] = onActiveXChange;
|
|
509
|
+
$[49] = sharedCursor;
|
|
510
|
+
$[50] = t28;
|
|
509
511
|
} else {
|
|
510
|
-
t28 = $[
|
|
512
|
+
t28 = $[50];
|
|
511
513
|
}
|
|
512
|
-
const
|
|
514
|
+
const setActiveX = t28;
|
|
513
515
|
let t29;
|
|
514
|
-
if ($[
|
|
515
|
-
t29 =
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
516
|
+
if ($[51] !== selected) {
|
|
517
|
+
t29 = new Set((selected ?? []).map(String));
|
|
518
|
+
$[51] = selected;
|
|
519
|
+
$[52] = t29;
|
|
518
520
|
} else {
|
|
519
|
-
t29 = $[
|
|
521
|
+
t29 = $[52];
|
|
520
522
|
}
|
|
521
|
-
const
|
|
523
|
+
const picked = t29;
|
|
522
524
|
let t30;
|
|
523
|
-
if ($[
|
|
524
|
-
t30 =
|
|
525
|
-
$[
|
|
526
|
-
$[
|
|
525
|
+
if ($[53] !== picked) {
|
|
526
|
+
t30 = key_0 => picked.has(String(key_0));
|
|
527
|
+
$[53] = picked;
|
|
528
|
+
$[54] = t30;
|
|
527
529
|
} else {
|
|
528
|
-
t30 = $[
|
|
530
|
+
t30 = $[54];
|
|
529
531
|
}
|
|
530
|
-
const
|
|
532
|
+
const selectedRows = (keys_0 ?? xs_0).map(t30);
|
|
533
|
+
let t31;
|
|
534
|
+
if ($[55] !== dimmed) {
|
|
535
|
+
t31 = (row_6, index_16) => dimmed?.(row_6, index_16) ?? false;
|
|
536
|
+
$[55] = dimmed;
|
|
537
|
+
$[56] = t31;
|
|
538
|
+
} else {
|
|
539
|
+
t31 = $[56];
|
|
540
|
+
}
|
|
541
|
+
const dimmedRows = data.map(t31);
|
|
531
542
|
const dimmedGroups = new Set(pointGroups.filter(run => run.indexes.every(index_17 => dimmedRows[index_17])).map(_temp9));
|
|
532
543
|
const anyPicked = selectedRows.some(Boolean);
|
|
533
544
|
const columnDim = [...series.values()].find(_temp0)?.dimOpacity ?? null;
|
|
@@ -547,22 +558,22 @@ export function ChartRoot(t0) {
|
|
|
547
558
|
}
|
|
548
559
|
return [...parts, ...notesAt(index_19).map(_temp10)].join(", ");
|
|
549
560
|
};
|
|
550
|
-
let t31;
|
|
551
561
|
let t32;
|
|
552
|
-
|
|
553
|
-
|
|
562
|
+
let t33;
|
|
563
|
+
if ($[57] !== data || $[58] !== x) {
|
|
564
|
+
t32 = () => {
|
|
554
565
|
warnMissingKey(x, data, "Chart.Root");
|
|
555
566
|
};
|
|
556
|
-
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
559
|
-
$[58] = t31;
|
|
567
|
+
t33 = [x, data];
|
|
568
|
+
$[57] = data;
|
|
569
|
+
$[58] = x;
|
|
560
570
|
$[59] = t32;
|
|
571
|
+
$[60] = t33;
|
|
561
572
|
} else {
|
|
562
|
-
t31 = $[58];
|
|
563
573
|
t32 = $[59];
|
|
574
|
+
t33 = $[60];
|
|
564
575
|
}
|
|
565
|
-
useEffect(
|
|
576
|
+
useEffect(t32, t33);
|
|
566
577
|
const indexAtPointer = e => {
|
|
567
578
|
const box = e.currentTarget.getBoundingClientRect();
|
|
568
579
|
const pixel_1 = horizontal ? e.clientY - box.top : e.clientX - box.left;
|
|
@@ -598,21 +609,21 @@ export function ChartRoot(t0) {
|
|
|
598
609
|
}
|
|
599
610
|
};
|
|
600
611
|
const pressable = interactive && onActivate !== undefined && (layout !== null || points);
|
|
601
|
-
let
|
|
602
|
-
if ($[
|
|
603
|
-
|
|
612
|
+
let t34;
|
|
613
|
+
if ($[61] !== data || $[62] !== onActivate || $[63] !== pressable) {
|
|
614
|
+
t34 = index_24 => {
|
|
604
615
|
if (pressable && index_24 >= 0) {
|
|
605
616
|
onActivate(data[index_24], index_24);
|
|
606
617
|
}
|
|
607
618
|
};
|
|
608
|
-
$[
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
619
|
+
$[61] = data;
|
|
620
|
+
$[62] = onActivate;
|
|
621
|
+
$[63] = pressable;
|
|
622
|
+
$[64] = t34;
|
|
612
623
|
} else {
|
|
613
|
-
|
|
624
|
+
t34 = $[64];
|
|
614
625
|
}
|
|
615
|
-
const activate =
|
|
626
|
+
const activate = t34;
|
|
616
627
|
const onKeyDown = e_1 => {
|
|
617
628
|
if (pressable && from_0 >= 0 && (e_1.key === "Enter" || e_1.key === " ")) {
|
|
618
629
|
e_1.preventDefault();
|
|
@@ -712,46 +723,46 @@ export function ChartRoot(t0) {
|
|
|
712
723
|
halo: surface === "raised" ? "var(--surface-raised)" : "var(--surface)"
|
|
713
724
|
};
|
|
714
725
|
const ruleText = rules.size === 0 ? null : `${[...rules.values()].map(rule_0 => `${rule_0.label} ${formatY(rule_0.value)}`).join(", ")}.`;
|
|
715
|
-
let t34;
|
|
716
|
-
if ($[64] !== horizontal || $[65] !== points || $[66] !== t) {
|
|
717
|
-
t34 = points ? t("keyboard.points") : horizontal ? t("keyboard.rows") : t("keyboard.move");
|
|
718
|
-
$[64] = horizontal;
|
|
719
|
-
$[65] = points;
|
|
720
|
-
$[66] = t;
|
|
721
|
-
$[67] = t34;
|
|
722
|
-
} else {
|
|
723
|
-
t34 = $[67];
|
|
724
|
-
}
|
|
725
726
|
let t35;
|
|
726
|
-
if ($[
|
|
727
|
-
t35 =
|
|
728
|
-
$[
|
|
729
|
-
$[
|
|
730
|
-
$[
|
|
727
|
+
if ($[65] !== horizontal || $[66] !== points || $[67] !== t) {
|
|
728
|
+
t35 = points ? t("keyboard.points") : horizontal ? t("keyboard.rows") : t("keyboard.move");
|
|
729
|
+
$[65] = horizontal;
|
|
730
|
+
$[66] = points;
|
|
731
|
+
$[67] = t;
|
|
732
|
+
$[68] = t35;
|
|
731
733
|
} else {
|
|
732
|
-
t35 = $[
|
|
734
|
+
t35 = $[68];
|
|
733
735
|
}
|
|
734
736
|
let t36;
|
|
735
|
-
if ($[
|
|
736
|
-
t36 =
|
|
737
|
-
$[
|
|
738
|
-
$[
|
|
739
|
-
$[
|
|
737
|
+
if ($[69] !== layout || $[70] !== t) {
|
|
738
|
+
t36 = layout !== null && layout.groups.length > 0 ? t("keyboard.groups") : null;
|
|
739
|
+
$[69] = layout;
|
|
740
|
+
$[70] = t;
|
|
741
|
+
$[71] = t36;
|
|
740
742
|
} else {
|
|
741
|
-
t36 = $[
|
|
743
|
+
t36 = $[71];
|
|
742
744
|
}
|
|
743
745
|
let t37;
|
|
744
|
-
if ($[
|
|
745
|
-
t37 =
|
|
746
|
-
$[
|
|
747
|
-
$[
|
|
746
|
+
if ($[72] !== pressable || $[73] !== t) {
|
|
747
|
+
t37 = pressable ? t("keyboard.activate") : null;
|
|
748
|
+
$[72] = pressable;
|
|
749
|
+
$[73] = t;
|
|
750
|
+
$[74] = t37;
|
|
751
|
+
} else {
|
|
752
|
+
t37 = $[74];
|
|
753
|
+
}
|
|
754
|
+
let t38;
|
|
755
|
+
if ($[75] !== ruleText || $[76] !== t35 || $[77] !== t36 || $[78] !== t37) {
|
|
756
|
+
t38 = [ruleText, t35, t36, t37].filter(Boolean);
|
|
757
|
+
$[75] = ruleText;
|
|
748
758
|
$[76] = t35;
|
|
749
759
|
$[77] = t36;
|
|
750
760
|
$[78] = t37;
|
|
761
|
+
$[79] = t38;
|
|
751
762
|
} else {
|
|
752
|
-
|
|
763
|
+
t38 = $[79];
|
|
753
764
|
}
|
|
754
|
-
const hint =
|
|
765
|
+
const hint = t38.join(" ");
|
|
755
766
|
const highlighted = layout === null ? [] : xs_0.flatMap((__3, index_26) => cursor === "full" && index_26 === activeIndex || selectedRows[index_26] ? [index_26] : []);
|
|
756
767
|
const bucketBox = (index_27, pressing) => {
|
|
757
768
|
const start = Math.round(bucketStart + (layout?.lefts[index_27] ?? 0));
|
|
@@ -776,191 +787,201 @@ export function ChartRoot(t0) {
|
|
|
776
787
|
height: pressing ? height - plot.top : plot.height
|
|
777
788
|
};
|
|
778
789
|
};
|
|
779
|
-
let
|
|
780
|
-
if ($[
|
|
781
|
-
|
|
782
|
-
$[
|
|
783
|
-
$[
|
|
784
|
-
$[
|
|
790
|
+
let t39;
|
|
791
|
+
if ($[80] !== keyX || $[81] !== setActiveX) {
|
|
792
|
+
t39 = () => setActiveX(keyX);
|
|
793
|
+
$[80] = keyX;
|
|
794
|
+
$[81] = setActiveX;
|
|
795
|
+
$[82] = t39;
|
|
785
796
|
} else {
|
|
786
|
-
|
|
797
|
+
t39 = $[82];
|
|
787
798
|
}
|
|
788
799
|
const pointer = {
|
|
789
800
|
onPointerMove,
|
|
790
|
-
onPointerLeave:
|
|
801
|
+
onPointerLeave: t39,
|
|
791
802
|
onClick: pressable ? e_2 => activate(indexAtPointer(e_2)) : undefined
|
|
792
803
|
};
|
|
793
|
-
const
|
|
794
|
-
let
|
|
795
|
-
if ($[
|
|
796
|
-
|
|
797
|
-
$[
|
|
798
|
-
$[83] = t39;
|
|
804
|
+
const t40 = grow && "h-full min-h-0";
|
|
805
|
+
let t41;
|
|
806
|
+
if ($[83] !== className || $[84] !== t40) {
|
|
807
|
+
t41 = clsx("flex min-w-0 flex-col gap-3", t40, className);
|
|
808
|
+
$[83] = className;
|
|
799
809
|
$[84] = t40;
|
|
810
|
+
$[85] = t41;
|
|
800
811
|
} else {
|
|
801
|
-
|
|
812
|
+
t41 = $[85];
|
|
802
813
|
}
|
|
803
|
-
let
|
|
804
|
-
if ($[
|
|
805
|
-
|
|
814
|
+
let t42;
|
|
815
|
+
if ($[86] === Symbol.for("react.memo_cache_sentinel")) {
|
|
816
|
+
t42 = /*#__PURE__*/_jsx("div", {
|
|
806
817
|
ref: setLegendSlot,
|
|
807
818
|
className: "empty:hidden"
|
|
808
819
|
});
|
|
809
|
-
$[
|
|
820
|
+
$[86] = t42;
|
|
810
821
|
} else {
|
|
811
|
-
|
|
822
|
+
t42 = $[86];
|
|
812
823
|
}
|
|
813
|
-
const
|
|
814
|
-
const
|
|
815
|
-
let
|
|
816
|
-
if ($[
|
|
817
|
-
|
|
818
|
-
$[86] = t42;
|
|
824
|
+
const t43 = grow && !horizontal && "min-h-0 flex-1";
|
|
825
|
+
const t44 = horizontal && pressable && "cursor-pointer";
|
|
826
|
+
let t45;
|
|
827
|
+
if ($[87] !== t43 || $[88] !== t44) {
|
|
828
|
+
t45 = clsx("focus-ring-within relative flex rounded-md", t43, t44);
|
|
819
829
|
$[87] = t43;
|
|
820
830
|
$[88] = t44;
|
|
831
|
+
$[89] = t45;
|
|
821
832
|
} else {
|
|
822
|
-
|
|
833
|
+
t45 = $[89];
|
|
823
834
|
}
|
|
824
|
-
let
|
|
825
|
-
if ($[
|
|
826
|
-
|
|
835
|
+
let t46;
|
|
836
|
+
if ($[90] === Symbol.for("react.memo_cache_sentinel")) {
|
|
837
|
+
t46 = {
|
|
827
838
|
outlineOffset: 4
|
|
828
839
|
};
|
|
829
|
-
$[
|
|
840
|
+
$[90] = t46;
|
|
830
841
|
} else {
|
|
831
|
-
|
|
842
|
+
t46 = $[90];
|
|
832
843
|
}
|
|
833
|
-
const t46 = scrolls ? "overflow-x-auto overflow-y-hidden overscroll-x-contain" : "overflow-visible";
|
|
834
844
|
let t47;
|
|
835
|
-
if ($[
|
|
836
|
-
t47 =
|
|
837
|
-
|
|
845
|
+
if ($[91] === Symbol.for("react.memo_cache_sentinel")) {
|
|
846
|
+
t47 = node => {
|
|
847
|
+
scroller.current = node;
|
|
848
|
+
setScrollBox(node);
|
|
849
|
+
};
|
|
838
850
|
$[91] = t47;
|
|
839
851
|
} else {
|
|
840
852
|
t47 = $[91];
|
|
841
853
|
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
854
|
+
const t48 = scrolls ? "overflow-x-auto overflow-y-hidden overscroll-x-contain" : "overflow-visible";
|
|
855
|
+
let t49;
|
|
856
|
+
if ($[92] !== t48) {
|
|
857
|
+
t49 = clsx("min-w-0 flex-1", t48);
|
|
858
|
+
$[92] = t48;
|
|
859
|
+
$[93] = t49;
|
|
860
|
+
} else {
|
|
861
|
+
t49 = $[93];
|
|
862
|
+
}
|
|
863
|
+
let t50;
|
|
864
|
+
if ($[94] !== overhang || $[95] !== scroll) {
|
|
865
|
+
t50 = overhang > 0 ? {
|
|
845
866
|
marginLeft: -overhang,
|
|
846
867
|
paddingLeft: overhang,
|
|
847
868
|
clipPath: scroll > 0 ? `inset(0 0 0 ${overhang}px)` : undefined
|
|
848
869
|
} : undefined;
|
|
849
|
-
$[
|
|
850
|
-
$[
|
|
851
|
-
$[
|
|
870
|
+
$[94] = overhang;
|
|
871
|
+
$[95] = scroll;
|
|
872
|
+
$[96] = t50;
|
|
852
873
|
} else {
|
|
853
|
-
|
|
874
|
+
t50 = $[96];
|
|
854
875
|
}
|
|
855
|
-
let t49;
|
|
856
|
-
if ($[95] === Symbol.for("react.memo_cache_sentinel")) {
|
|
857
|
-
t49 = e_3 => setScroll(e_3.currentTarget.scrollLeft);
|
|
858
|
-
$[95] = t49;
|
|
859
|
-
} else {
|
|
860
|
-
t49 = $[95];
|
|
861
|
-
}
|
|
862
|
-
const t50 = height;
|
|
863
876
|
let t51;
|
|
864
|
-
if ($[
|
|
865
|
-
t51 =
|
|
866
|
-
$[
|
|
867
|
-
$[97] = t;
|
|
868
|
-
$[98] = t51;
|
|
877
|
+
if ($[97] === Symbol.for("react.memo_cache_sentinel")) {
|
|
878
|
+
t51 = e_3 => setScroll(e_3.currentTarget.scrollLeft);
|
|
879
|
+
$[97] = t51;
|
|
869
880
|
} else {
|
|
870
|
-
t51 = $[
|
|
881
|
+
t51 = $[97];
|
|
871
882
|
}
|
|
872
|
-
const t52 =
|
|
883
|
+
const t52 = height;
|
|
873
884
|
let t53;
|
|
874
|
-
if ($[99] !==
|
|
875
|
-
t53 =
|
|
876
|
-
$[
|
|
885
|
+
if ($[98] !== interactive || $[99] !== t) {
|
|
886
|
+
t53 = interactive ? t("chart") : undefined;
|
|
887
|
+
$[98] = interactive;
|
|
888
|
+
$[99] = t;
|
|
877
889
|
$[100] = t53;
|
|
878
890
|
} else {
|
|
879
891
|
t53 = $[100];
|
|
880
892
|
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
893
|
+
const t54 = pressable && "cursor-pointer";
|
|
894
|
+
let t55;
|
|
895
|
+
if ($[101] !== t54) {
|
|
896
|
+
t55 = clsx("block overflow-visible outline-none", t54);
|
|
897
|
+
$[101] = t54;
|
|
898
|
+
$[102] = t55;
|
|
899
|
+
} else {
|
|
900
|
+
t55 = $[102];
|
|
901
|
+
}
|
|
902
|
+
let t56;
|
|
903
|
+
if ($[103] === Symbol.for("react.memo_cache_sentinel")) {
|
|
904
|
+
t56 = /*#__PURE__*/_jsx("g", {
|
|
884
905
|
ref: setRulesSlot,
|
|
885
906
|
tabIndex: -1
|
|
886
907
|
});
|
|
887
|
-
$[
|
|
908
|
+
$[103] = t56;
|
|
888
909
|
} else {
|
|
889
|
-
|
|
910
|
+
t56 = $[103];
|
|
890
911
|
}
|
|
891
|
-
let
|
|
892
|
-
if ($[
|
|
893
|
-
|
|
894
|
-
setGroupsSlot(
|
|
895
|
-
measureGroups(
|
|
912
|
+
let t57;
|
|
913
|
+
if ($[104] !== measureGroups) {
|
|
914
|
+
t57 = node_0 => {
|
|
915
|
+
setGroupsSlot(node_0);
|
|
916
|
+
measureGroups(node_0);
|
|
896
917
|
};
|
|
897
|
-
$[
|
|
898
|
-
$[
|
|
918
|
+
$[104] = measureGroups;
|
|
919
|
+
$[105] = t57;
|
|
899
920
|
} else {
|
|
900
|
-
|
|
921
|
+
t57 = $[105];
|
|
901
922
|
}
|
|
902
|
-
let
|
|
903
|
-
if ($[
|
|
904
|
-
|
|
923
|
+
let t58;
|
|
924
|
+
if ($[106] !== width) {
|
|
925
|
+
t58 = {
|
|
905
926
|
width
|
|
906
927
|
};
|
|
907
|
-
$[
|
|
908
|
-
$[
|
|
928
|
+
$[106] = width;
|
|
929
|
+
$[107] = t58;
|
|
909
930
|
} else {
|
|
910
|
-
|
|
931
|
+
t58 = $[107];
|
|
911
932
|
}
|
|
912
|
-
let
|
|
913
|
-
if ($[
|
|
914
|
-
|
|
915
|
-
ref:
|
|
933
|
+
let t59;
|
|
934
|
+
if ($[108] !== t57 || $[109] !== t58) {
|
|
935
|
+
t59 = /*#__PURE__*/_jsx("div", {
|
|
936
|
+
ref: t57,
|
|
916
937
|
className: "empty:hidden",
|
|
917
|
-
style:
|
|
938
|
+
style: t58
|
|
918
939
|
});
|
|
919
|
-
$[106] = t55;
|
|
920
|
-
$[107] = t56;
|
|
921
940
|
$[108] = t57;
|
|
941
|
+
$[109] = t58;
|
|
942
|
+
$[110] = t59;
|
|
922
943
|
} else {
|
|
923
|
-
|
|
944
|
+
t59 = $[110];
|
|
924
945
|
}
|
|
925
|
-
let
|
|
926
|
-
if ($[
|
|
927
|
-
|
|
946
|
+
let t60;
|
|
947
|
+
if ($[111] === Symbol.for("react.memo_cache_sentinel")) {
|
|
948
|
+
t60 = /*#__PURE__*/_jsx("g", {
|
|
928
949
|
ref: setRightSlot,
|
|
929
950
|
tabIndex: -1
|
|
930
951
|
});
|
|
931
|
-
$[
|
|
952
|
+
$[111] = t60;
|
|
932
953
|
} else {
|
|
933
|
-
|
|
954
|
+
t60 = $[111];
|
|
934
955
|
}
|
|
935
|
-
let
|
|
936
|
-
if ($[
|
|
937
|
-
|
|
956
|
+
let t61;
|
|
957
|
+
if ($[112] === Symbol.for("react.memo_cache_sentinel")) {
|
|
958
|
+
t61 = /*#__PURE__*/_jsx("div", {
|
|
938
959
|
ref: setTooltipSlot,
|
|
939
960
|
className: "pointer-events-none absolute inset-0"
|
|
940
961
|
});
|
|
941
|
-
$[
|
|
962
|
+
$[112] = t61;
|
|
942
963
|
} else {
|
|
943
|
-
|
|
964
|
+
t61 = $[112];
|
|
944
965
|
}
|
|
945
|
-
let
|
|
946
|
-
if ($[
|
|
947
|
-
|
|
966
|
+
let t62;
|
|
967
|
+
if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
|
|
968
|
+
t62 = /*#__PURE__*/_jsx("div", {
|
|
948
969
|
ref: setTableSlot,
|
|
949
970
|
className: "empty:hidden"
|
|
950
971
|
});
|
|
951
|
-
$[
|
|
972
|
+
$[113] = t62;
|
|
952
973
|
} else {
|
|
953
|
-
|
|
974
|
+
t62 = $[113];
|
|
954
975
|
}
|
|
955
976
|
return /*#__PURE__*/_jsx(ChartContext, {
|
|
956
977
|
value: context,
|
|
957
978
|
children: /*#__PURE__*/_jsxs("div", {
|
|
958
979
|
ref: ref,
|
|
959
|
-
className:
|
|
960
|
-
children: [
|
|
980
|
+
className: t41,
|
|
981
|
+
children: [t42, /*#__PURE__*/_jsxs("div", {
|
|
961
982
|
ref: measure,
|
|
962
|
-
className:
|
|
963
|
-
style:
|
|
983
|
+
className: t45,
|
|
984
|
+
style: t46,
|
|
964
985
|
...(horizontal ? pointer : {}),
|
|
965
986
|
children: [horizontal ? /*#__PURE__*/_jsx("div", {
|
|
966
987
|
ref: setRowsSlot,
|
|
@@ -980,70 +1001,73 @@ export function ChartRoot(t0) {
|
|
|
980
1001
|
tabIndex: -1
|
|
981
1002
|
})
|
|
982
1003
|
}), /*#__PURE__*/_jsxs("div", {
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1004
|
+
className: "relative flex min-w-0 flex-1",
|
|
1005
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
1006
|
+
ref: t47,
|
|
1007
|
+
className: t49,
|
|
1008
|
+
style: t50,
|
|
1009
|
+
onScroll: t51,
|
|
1010
|
+
children: [/*#__PURE__*/_jsxs("svg", {
|
|
1011
|
+
width: width,
|
|
1012
|
+
height: t52,
|
|
1013
|
+
role: interactive ? "group" : "img",
|
|
1014
|
+
tabIndex: interactive ? 0 : undefined,
|
|
1015
|
+
"aria-roledescription": t53,
|
|
1016
|
+
"aria-label": label,
|
|
1017
|
+
"aria-describedby": interactive ? `${id}-hint` : undefined,
|
|
1018
|
+
"aria-activedescendant": pressable && from_0 >= 0 ? `${id}-${from_0}` : undefined,
|
|
1019
|
+
className: t55,
|
|
1020
|
+
...(horizontal ? {} : pointer),
|
|
1021
|
+
onKeyDown: interactive ? onKeyDown : undefined,
|
|
1022
|
+
onBlur: () => {
|
|
1023
|
+
setAnnounce(false);
|
|
1024
|
+
setKeyX(null);
|
|
1025
|
+
if (activeIndex >= 0 && (points || announce)) {
|
|
1026
|
+
setActiveX(null);
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
children: [layout !== null && highlighted.map(index_28 => /*#__PURE__*/_jsx("rect", {
|
|
1030
|
+
...bucketBox(index_28, false),
|
|
1031
|
+
className: "fill-surface-hover"
|
|
1032
|
+
}, index_28)), children, t56, continuous !== null && !points && activeIndex >= 0 && cursor !== "none" && /*#__PURE__*/_jsx(Crosshair, {
|
|
1033
|
+
context: context,
|
|
1034
|
+
dots: cursor === "full"
|
|
1035
|
+
}), points && /*#__PURE__*/_jsx(Guides, {
|
|
1036
|
+
context: context
|
|
1037
|
+
}), pressable && points && positions.map((position, index_29) => position === null ? null : /*#__PURE__*/_jsx("circle", {
|
|
1038
|
+
id: `${id}-${index_29}`,
|
|
1039
|
+
role: "button",
|
|
1040
|
+
"aria-pressed": selectedRows[index_29],
|
|
1041
|
+
"aria-label": describe(index_29),
|
|
1042
|
+
cx: position[0],
|
|
1043
|
+
cy: position[1],
|
|
1044
|
+
r: 10,
|
|
1045
|
+
fill: "transparent"
|
|
1046
|
+
}, keys_0[index_29])), pressable && layout !== null && xs_0.map((key_1, index_30) => /*#__PURE__*/_jsx("rect", {
|
|
1047
|
+
id: `${id}-${index_30}`,
|
|
1048
|
+
role: "button",
|
|
1049
|
+
"aria-pressed": selectedRows[index_30],
|
|
1050
|
+
"aria-label": describe(index_30),
|
|
1051
|
+
...bucketBox(index_30, true),
|
|
1052
|
+
fill: "transparent"
|
|
1053
|
+
}, String(key_1))), xs_0.length === 0 && /*#__PURE__*/_jsx("text", {
|
|
1054
|
+
x: Math.round((plot.left + plot.right) / 2),
|
|
1055
|
+
y: Math.round((plot.top + plot.bottom) / 2),
|
|
1056
|
+
dy: "0.32em",
|
|
1057
|
+
textAnchor: "middle",
|
|
1058
|
+
className: "fill-text-faint text-xs",
|
|
1059
|
+
children: t("noData")
|
|
1060
|
+
})]
|
|
1061
|
+
}), t59]
|
|
1062
|
+
}), scrollbars]
|
|
1039
1063
|
}), /*#__PURE__*/_jsx("svg", {
|
|
1040
1064
|
width: rightAxis,
|
|
1041
1065
|
height: height,
|
|
1042
1066
|
"aria-hidden": true,
|
|
1043
1067
|
className: "shrink-0 overflow-visible",
|
|
1044
|
-
children:
|
|
1045
|
-
}),
|
|
1046
|
-
}),
|
|
1068
|
+
children: t60
|
|
1069
|
+
}), t61]
|
|
1070
|
+
}), t62, interactive && /*#__PURE__*/_jsxs(_Fragment, {
|
|
1047
1071
|
children: [/*#__PURE__*/_jsx("p", {
|
|
1048
1072
|
id: `${id}-hint`,
|
|
1049
1073
|
className: "sr-only",
|