@mlw-packages/react-components 1.8.7 → 1.8.9
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/index.css +256 -18
- package/dist/index.d.mts +193 -142
- package/dist/index.d.ts +193 -142
- package/dist/index.js +3565 -3767
- package/dist/index.mjs +2860 -3731
- package/package.json +5 -6
package/dist/index.d.mts
CHANGED
|
@@ -63,8 +63,10 @@ declare const useTheme: () => ThemeProviderState;
|
|
|
63
63
|
|
|
64
64
|
type ModeToggleBaseProps = {
|
|
65
65
|
themes?: Theme[];
|
|
66
|
+
className?: string;
|
|
67
|
+
variant?: "default" | "outline" | "link" | "destructive" | "secondary" | "ghost";
|
|
66
68
|
};
|
|
67
|
-
declare function ModeToggleBase({ themes, }: ModeToggleBaseProps): react_jsx_runtime.JSX.Element;
|
|
69
|
+
declare function ModeToggleBase({ themes, className, variant, }: ModeToggleBaseProps): react_jsx_runtime.JSX.Element;
|
|
68
70
|
|
|
69
71
|
declare const AvatarBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
70
72
|
declare const AvatarImageBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
@@ -546,7 +548,6 @@ declare const DropDownMenuContentBase: React$1.ForwardRefExoticComponent<Omit<Dr
|
|
|
546
548
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
547
549
|
declare const DropDownMenuItemBase: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
548
550
|
inset?: boolean;
|
|
549
|
-
leftIcon?: React$1.ReactNode;
|
|
550
551
|
rightIcon?: React$1.ReactNode;
|
|
551
552
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
552
553
|
declare const DropDownMenuCheckboxItemBase: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1563,24 +1564,112 @@ interface SelectPropsWithGroupItems<T extends string> extends DefaultSelectProps
|
|
|
1563
1564
|
type NewSelectProps<T extends string> = SelectPropsWithItems<T> | SelectPropsWithGroupItems<T>;
|
|
1564
1565
|
declare function Select<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, disabled, selected, label, labelClassname, className, pagination, hideClear, }: NewSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
1565
1566
|
|
|
1567
|
+
type Primitive = string | number | boolean | null | undefined;
|
|
1568
|
+
interface ChartData$4 {
|
|
1569
|
+
[key: string]: Primitive;
|
|
1570
|
+
name?: string;
|
|
1571
|
+
}
|
|
1572
|
+
interface XAxisConfig$2 {
|
|
1573
|
+
dataKey: string;
|
|
1574
|
+
label?: string;
|
|
1575
|
+
valueFormatter?: (value: string | number) => string;
|
|
1576
|
+
autoLabel?: boolean;
|
|
1577
|
+
}
|
|
1578
|
+
type ValueFormatter = (value: string | number) => string | number;
|
|
1579
|
+
type FinalValueFormatter = (value: number | string | null | undefined) => string;
|
|
1580
|
+
type SeriesProp$1 = {
|
|
1581
|
+
bar?: string[];
|
|
1582
|
+
line?: string[];
|
|
1583
|
+
area?: string[];
|
|
1584
|
+
};
|
|
1585
|
+
type SeriesEntry = {
|
|
1586
|
+
type: "bar" | "line" | "area";
|
|
1587
|
+
key: string;
|
|
1588
|
+
};
|
|
1589
|
+
type SeriesCounts = {
|
|
1590
|
+
bar: number;
|
|
1591
|
+
line: number;
|
|
1592
|
+
area: number;
|
|
1593
|
+
};
|
|
1594
|
+
type YAxisSide = "left" | "right";
|
|
1595
|
+
type YAxisMap = Record<string, YAxisSide>;
|
|
1596
|
+
interface MapperConfigEntry {
|
|
1597
|
+
label?: string;
|
|
1598
|
+
valueFormatter?: ValueFormatter;
|
|
1599
|
+
color?: string;
|
|
1600
|
+
type?: "number" | "string" | "auto";
|
|
1601
|
+
visible?: boolean;
|
|
1602
|
+
}
|
|
1603
|
+
type MapperConfig = Record<string, MapperConfigEntry>;
|
|
1604
|
+
interface YAxisOptions {
|
|
1605
|
+
label?: string;
|
|
1606
|
+
stroke?: string;
|
|
1607
|
+
width?: number;
|
|
1608
|
+
percent?: boolean;
|
|
1609
|
+
percentDecimals?: number;
|
|
1610
|
+
}
|
|
1611
|
+
type YAxes = Partial<{
|
|
1612
|
+
left: YAxisOptions;
|
|
1613
|
+
right: YAxisOptions;
|
|
1614
|
+
}>;
|
|
1615
|
+
interface TooltipItem$2 {
|
|
1616
|
+
id: string;
|
|
1617
|
+
data: ChartData$4;
|
|
1618
|
+
position: {
|
|
1619
|
+
top: number;
|
|
1620
|
+
left: number;
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
type TooltipAdaptedRow = Record<string, string | number> & {
|
|
1624
|
+
name: string;
|
|
1625
|
+
};
|
|
1626
|
+
interface TimeSeriesConfig {
|
|
1627
|
+
start?: number;
|
|
1628
|
+
end?: number;
|
|
1629
|
+
onRangeChange?: (startIndex: number, endIndex: number) => void;
|
|
1630
|
+
height?: number;
|
|
1631
|
+
brushColor?: string;
|
|
1632
|
+
brushStroke?: string;
|
|
1633
|
+
miniChartOpacity?: number;
|
|
1634
|
+
chartHeight?: number;
|
|
1635
|
+
}
|
|
1636
|
+
interface ChartHooksArgs {
|
|
1637
|
+
width?: number | string;
|
|
1638
|
+
measuredWidth?: number | null;
|
|
1639
|
+
points?: number;
|
|
1640
|
+
seriesCounts?: SeriesCounts;
|
|
1641
|
+
niceMax?: number;
|
|
1642
|
+
yAxes?: YAxes;
|
|
1643
|
+
yAxisLabel?: string;
|
|
1644
|
+
chartMargin?: Partial<{
|
|
1645
|
+
top: number;
|
|
1646
|
+
right: number;
|
|
1647
|
+
left: number;
|
|
1648
|
+
bottom: number;
|
|
1649
|
+
}>;
|
|
1650
|
+
showLabels?: boolean;
|
|
1651
|
+
timeSeries?: boolean | TimeSeriesConfig;
|
|
1652
|
+
timeSeriesLegend?: string;
|
|
1653
|
+
customLegend?: boolean;
|
|
1654
|
+
}
|
|
1655
|
+
interface LegendItem {
|
|
1656
|
+
label: string;
|
|
1657
|
+
value: string | number;
|
|
1658
|
+
color?: string;
|
|
1659
|
+
trend?: {
|
|
1660
|
+
value?: number;
|
|
1661
|
+
label?: string;
|
|
1662
|
+
positive?: boolean;
|
|
1663
|
+
neutral?: boolean;
|
|
1664
|
+
};
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1566
1667
|
declare const formatFieldName: (fieldName: string) => string;
|
|
1567
1668
|
declare const detectDataFields: (data: Record<string, unknown>[], xAxisKey: string) => string[];
|
|
1568
1669
|
declare const detectXAxis: (data: Record<string, unknown>[]) => string;
|
|
1569
1670
|
declare const generateAdditionalColors: (baseColors: string[], count: number) => string[];
|
|
1570
1671
|
declare const niceCeil: (value: number) => number;
|
|
1571
1672
|
declare const compactTick: (value: number) => string;
|
|
1572
|
-
type Padding = number | Partial<{
|
|
1573
|
-
left: number;
|
|
1574
|
-
right: number;
|
|
1575
|
-
top: number;
|
|
1576
|
-
bottom: number;
|
|
1577
|
-
}>;
|
|
1578
|
-
type Margins = Partial<{
|
|
1579
|
-
top: number;
|
|
1580
|
-
right: number;
|
|
1581
|
-
left: number;
|
|
1582
|
-
bottom: number;
|
|
1583
|
-
}>;
|
|
1584
1673
|
declare const resolveContainerPaddingLeft: (padding?: Padding, containerPaddingLeft?: number, defaultLeft?: number) => number;
|
|
1585
1674
|
declare const resolveChartMargins: (margins?: Margins, chartMargins?: Margins, showLabels?: boolean) => {
|
|
1586
1675
|
top: number;
|
|
@@ -1594,21 +1683,11 @@ declare const generateColorMap: (dataKeys: string[], baseColors: string[], mappe
|
|
|
1594
1683
|
declare const computeNiceMax: (maxValue: number) => number;
|
|
1595
1684
|
declare const getMaxDataValue: (data: Record<string, unknown>[], keys: string[]) => number;
|
|
1596
1685
|
declare const getMinDataValue: (data: Record<string, unknown>[], keys: string[]) => number;
|
|
1597
|
-
interface SeriesConfig {
|
|
1598
|
-
bar?: string[];
|
|
1599
|
-
line?: string[];
|
|
1600
|
-
area?: string[];
|
|
1601
|
-
}
|
|
1602
1686
|
declare const computeChartWidth: (width: number | string | undefined, dataLength: number, series: SeriesConfig | undefined, niceMaxLeft: number, niceMaxRight: number) => number;
|
|
1603
1687
|
declare const adaptDataForTooltip: <T extends Record<string, unknown>>(data: T, xAxisKey: string) => {
|
|
1604
1688
|
name: string;
|
|
1605
1689
|
[key: string]: string | number;
|
|
1606
1690
|
};
|
|
1607
|
-
type ValueFormatterType = (props: {
|
|
1608
|
-
value: number | string | undefined;
|
|
1609
|
-
formattedValue: string;
|
|
1610
|
-
[key: string]: unknown;
|
|
1611
|
-
}) => string;
|
|
1612
1691
|
declare const createValueFormatter: (customFormatter: ValueFormatterType | undefined, formatBR: boolean) => ValueFormatterType | undefined;
|
|
1613
1692
|
declare const createYTickFormatter: (finalValueFormatter: ValueFormatterType | undefined) => ((value: number | string) => string);
|
|
1614
1693
|
declare const computeYAxisTickWidth: (chartMarginLeft: number | undefined, yAxisLabel: string | undefined, axisLabelMargin: number, yTickFormatter: (value: number | string) => string, minValue: number, maxValue: number) => number;
|
|
@@ -1640,10 +1719,10 @@ declare const renderPillLabel: (color: string, variant: Variant, valueFormatter?
|
|
|
1640
1719
|
|
|
1641
1720
|
declare const renderInsideBarLabel: (color: string, valueFormatter?: valueFormatter) => (props: LabelRendererProps) => react_jsx_runtime.JSX.Element;
|
|
1642
1721
|
|
|
1643
|
-
interface ChartData$
|
|
1722
|
+
interface ChartData$3 {
|
|
1644
1723
|
[key: string]: string | number | boolean | null | undefined;
|
|
1645
1724
|
}
|
|
1646
|
-
interface XAxisConfig$
|
|
1725
|
+
interface XAxisConfig$1 {
|
|
1647
1726
|
dataKey: string;
|
|
1648
1727
|
label?: string;
|
|
1649
1728
|
valueFormatter?: (value: string | number) => string;
|
|
@@ -1656,24 +1735,14 @@ interface BiaxialConfig {
|
|
|
1656
1735
|
decimals?: number;
|
|
1657
1736
|
stroke?: string | Record<string, string>;
|
|
1658
1737
|
}
|
|
1659
|
-
|
|
1660
|
-
start?: number;
|
|
1661
|
-
end?: number;
|
|
1662
|
-
onRangeChange?: (startIndex: number, endIndex: number) => void;
|
|
1663
|
-
height?: number;
|
|
1664
|
-
brushColor?: string;
|
|
1665
|
-
brushStroke?: string;
|
|
1666
|
-
miniChartOpacity?: number;
|
|
1667
|
-
chartHeight?: number;
|
|
1668
|
-
}
|
|
1669
|
-
type SeriesProp$1 = {
|
|
1738
|
+
type SeriesProp = {
|
|
1670
1739
|
bar?: string[];
|
|
1671
1740
|
line?: string[];
|
|
1672
1741
|
area?: string[];
|
|
1673
1742
|
};
|
|
1674
1743
|
interface ChartProps {
|
|
1675
|
-
data: ChartData$
|
|
1676
|
-
series?: SeriesProp
|
|
1744
|
+
data: ChartData$3[];
|
|
1745
|
+
series?: SeriesProp;
|
|
1677
1746
|
className?: string;
|
|
1678
1747
|
chartMargin?: Partial<{
|
|
1679
1748
|
top: number;
|
|
@@ -1697,7 +1766,7 @@ interface ChartProps {
|
|
|
1697
1766
|
periodLabel?: string;
|
|
1698
1767
|
xAxisLabel?: string;
|
|
1699
1768
|
yAxisLabel?: string;
|
|
1700
|
-
xAxis?: XAxisConfig$
|
|
1769
|
+
xAxis?: XAxisConfig$1 | string;
|
|
1701
1770
|
biaxial?: BiaxialConfig | string | string[];
|
|
1702
1771
|
enableHighlights?: boolean;
|
|
1703
1772
|
enableShowOnly?: boolean;
|
|
@@ -1709,13 +1778,43 @@ interface ChartProps {
|
|
|
1709
1778
|
legendUppercase?: boolean;
|
|
1710
1779
|
isLoading?: boolean;
|
|
1711
1780
|
timeSeries?: boolean | TimeSeriesConfig;
|
|
1781
|
+
timeSeriesLegend?: string;
|
|
1782
|
+
customLegend?: boolean;
|
|
1783
|
+
labelsVisibility?: {
|
|
1784
|
+
bar: boolean;
|
|
1785
|
+
line: boolean;
|
|
1786
|
+
area: boolean;
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
interface SeriesConfig {
|
|
1790
|
+
bar?: string[];
|
|
1791
|
+
line?: string[];
|
|
1792
|
+
area?: string[];
|
|
1712
1793
|
}
|
|
1794
|
+
type ValueFormatterType = (props: {
|
|
1795
|
+
value: number | string | undefined;
|
|
1796
|
+
formattedValue: string;
|
|
1797
|
+
[key: string]: unknown;
|
|
1798
|
+
}) => string;
|
|
1799
|
+
type Padding = number | Partial<{
|
|
1800
|
+
left: number;
|
|
1801
|
+
right: number;
|
|
1802
|
+
top: number;
|
|
1803
|
+
bottom: number;
|
|
1804
|
+
}>;
|
|
1805
|
+
type Margins = Partial<{
|
|
1806
|
+
top: number;
|
|
1807
|
+
right: number;
|
|
1808
|
+
left: number;
|
|
1809
|
+
bottom: number;
|
|
1810
|
+
}>;
|
|
1811
|
+
|
|
1713
1812
|
declare const Chart: React__default.FC<ChartProps>;
|
|
1714
1813
|
|
|
1715
1814
|
interface BarChartData {
|
|
1716
1815
|
[key: string]: string | number | boolean | null | undefined;
|
|
1717
1816
|
}
|
|
1718
|
-
interface XAxisConfig
|
|
1817
|
+
interface XAxisConfig {
|
|
1719
1818
|
dataKey: string;
|
|
1720
1819
|
label?: string;
|
|
1721
1820
|
valueFormatter?: (value: string | number) => string;
|
|
@@ -1748,7 +1847,7 @@ interface BarChartProps {
|
|
|
1748
1847
|
titlePosition?: "left" | "center" | "right";
|
|
1749
1848
|
showLabels?: boolean;
|
|
1750
1849
|
labelMap?: Record<string, string>;
|
|
1751
|
-
xAxis?: XAxisConfig
|
|
1850
|
+
xAxis?: XAxisConfig | string;
|
|
1752
1851
|
mapper?: DataMapper | string[];
|
|
1753
1852
|
yAxis?: DataMapper | string[];
|
|
1754
1853
|
autoDetect?: boolean;
|
|
@@ -1871,14 +1970,14 @@ interface TooltipData {
|
|
|
1871
1970
|
name: string;
|
|
1872
1971
|
[key: string]: string | number;
|
|
1873
1972
|
}
|
|
1874
|
-
interface Position$
|
|
1973
|
+
interface Position$2 {
|
|
1875
1974
|
top: number;
|
|
1876
1975
|
left: number;
|
|
1877
1976
|
}
|
|
1878
1977
|
interface DraggableTooltipProps {
|
|
1879
1978
|
id: string;
|
|
1880
1979
|
data: TooltipData;
|
|
1881
|
-
position: Position$
|
|
1980
|
+
position: Position$2;
|
|
1882
1981
|
isDragging?: boolean;
|
|
1883
1982
|
title?: string;
|
|
1884
1983
|
dataKeys: string[];
|
|
@@ -1892,7 +1991,7 @@ interface DraggableTooltipProps {
|
|
|
1892
1991
|
onCloseAll?: () => void;
|
|
1893
1992
|
closeAllButtonPosition?: "top-left" | "top-right" | "top-center";
|
|
1894
1993
|
closeAllButtonVariant?: "floating" | "inline";
|
|
1895
|
-
onPositionChange?: (id: string, position: Position$
|
|
1994
|
+
onPositionChange?: (id: string, position: Position$2) => void;
|
|
1896
1995
|
highlightedSeries?: Set<string>;
|
|
1897
1996
|
toggleHighlight?: (key: string) => void;
|
|
1898
1997
|
showOnlyHighlighted?: boolean;
|
|
@@ -1940,11 +2039,38 @@ interface Props {
|
|
|
1940
2039
|
}
|
|
1941
2040
|
declare const TooltipSimple: React__default.FC<Props>;
|
|
1942
2041
|
|
|
1943
|
-
interface
|
|
2042
|
+
interface Connection {
|
|
2043
|
+
id: string;
|
|
2044
|
+
name: string;
|
|
2045
|
+
type: "entrada" | "saida";
|
|
2046
|
+
status?: "active" | "inactive" | "warning";
|
|
2047
|
+
}
|
|
2048
|
+
interface SystemData {
|
|
2049
|
+
name: string;
|
|
2050
|
+
description: string;
|
|
2051
|
+
connections: Connection[];
|
|
2052
|
+
}
|
|
2053
|
+
interface Position$1 {
|
|
2054
|
+
top: number;
|
|
2055
|
+
left: number;
|
|
2056
|
+
}
|
|
2057
|
+
interface SystemTooltipProps {
|
|
2058
|
+
id: string;
|
|
2059
|
+
data: SystemData;
|
|
2060
|
+
position: Position$1;
|
|
2061
|
+
title?: string;
|
|
2062
|
+
onMouseDown?: (id: string, e: React__default.MouseEvent | React__default.TouchEvent) => void;
|
|
2063
|
+
onClose: (id: string) => void;
|
|
2064
|
+
onPositionChange?: (id: string, position: Position$1) => void;
|
|
2065
|
+
}
|
|
2066
|
+
declare const SystemTooltip: React__default.FC<SystemTooltipProps>;
|
|
2067
|
+
|
|
2068
|
+
interface ChartData$2 {
|
|
1944
2069
|
[key: string]: string | number | boolean | null | undefined;
|
|
1945
2070
|
}
|
|
1946
2071
|
interface BrushProps {
|
|
1947
|
-
data: ChartData$
|
|
2072
|
+
data: ChartData$2[];
|
|
2073
|
+
legend?: string;
|
|
1948
2074
|
startIndex: number;
|
|
1949
2075
|
endIndex: number;
|
|
1950
2076
|
onMouseDown: (e: React__default.MouseEvent, type: "start" | "end" | "middle") => void;
|
|
@@ -1967,6 +2093,11 @@ interface BrushProps {
|
|
|
1967
2093
|
}
|
|
1968
2094
|
declare const Brush: React__default.FC<BrushProps>;
|
|
1969
2095
|
|
|
2096
|
+
interface ChartTotalLegendProps {
|
|
2097
|
+
items: LegendItem[];
|
|
2098
|
+
}
|
|
2099
|
+
declare const ChartTotalLegend: React__default.FC<ChartTotalLegendProps>;
|
|
2100
|
+
|
|
1970
2101
|
interface UseChartHighlightsReturn {
|
|
1971
2102
|
highlightedSeries: Set<string>;
|
|
1972
2103
|
showOnlyHighlighted: boolean;
|
|
@@ -1983,20 +2114,20 @@ declare const useChartDimensions: () => {
|
|
|
1983
2114
|
measuredWidth: number | null;
|
|
1984
2115
|
};
|
|
1985
2116
|
|
|
1986
|
-
interface ChartData$
|
|
2117
|
+
interface ChartData$1 {
|
|
1987
2118
|
[key: string]: string | number | boolean | null | undefined;
|
|
1988
2119
|
}
|
|
1989
|
-
interface TooltipItem$
|
|
2120
|
+
interface TooltipItem$1 {
|
|
1990
2121
|
id: string;
|
|
1991
|
-
data: ChartData$
|
|
2122
|
+
data: ChartData$1;
|
|
1992
2123
|
position: {
|
|
1993
2124
|
top: number;
|
|
1994
2125
|
left: number;
|
|
1995
2126
|
};
|
|
1996
2127
|
}
|
|
1997
2128
|
declare const useChartTooltips: (maxTooltips?: number) => {
|
|
1998
|
-
activeTooltips: TooltipItem$
|
|
1999
|
-
toggleTooltip: (tooltipId: string, data: ChartData$
|
|
2129
|
+
activeTooltips: TooltipItem$1[];
|
|
2130
|
+
toggleTooltip: (tooltipId: string, data: ChartData$1, basePosition: {
|
|
2000
2131
|
top: number;
|
|
2001
2132
|
left: number;
|
|
2002
2133
|
}) => void;
|
|
@@ -2006,15 +2137,15 @@ declare const useChartTooltips: (maxTooltips?: number) => {
|
|
|
2006
2137
|
}) => void;
|
|
2007
2138
|
closeTooltip: (id: string) => void;
|
|
2008
2139
|
closeAllTooltips: () => void;
|
|
2009
|
-
setActiveTooltips: React$1.Dispatch<React$1.SetStateAction<TooltipItem$
|
|
2140
|
+
setActiveTooltips: React$1.Dispatch<React$1.SetStateAction<TooltipItem$1[]>>;
|
|
2010
2141
|
};
|
|
2011
2142
|
|
|
2012
|
-
interface ChartData
|
|
2143
|
+
interface ChartData {
|
|
2013
2144
|
[key: string]: string | number | boolean | null | undefined;
|
|
2014
2145
|
}
|
|
2015
|
-
interface TooltipItem
|
|
2146
|
+
interface TooltipItem {
|
|
2016
2147
|
id: string;
|
|
2017
|
-
data: ChartData
|
|
2148
|
+
data: ChartData;
|
|
2018
2149
|
position: {
|
|
2019
2150
|
top: number;
|
|
2020
2151
|
left: number;
|
|
@@ -2023,15 +2154,15 @@ interface TooltipItem$1 {
|
|
|
2023
2154
|
interface UseChartClickProps {
|
|
2024
2155
|
enableDraggableTooltips: boolean;
|
|
2025
2156
|
xAxisDataKey: string;
|
|
2026
|
-
toggleTooltip: (tooltipId: string, data: ChartData
|
|
2157
|
+
toggleTooltip: (tooltipId: string, data: ChartData, basePosition: {
|
|
2027
2158
|
top: number;
|
|
2028
2159
|
left: number;
|
|
2029
2160
|
}) => void;
|
|
2030
|
-
setActiveTooltips: React.Dispatch<React.SetStateAction<TooltipItem
|
|
2161
|
+
setActiveTooltips: React.Dispatch<React.SetStateAction<TooltipItem[]>>;
|
|
2031
2162
|
}
|
|
2032
2163
|
declare const useChartClick: ({ enableDraggableTooltips, xAxisDataKey, toggleTooltip, setActiveTooltips, }: UseChartClickProps) => {
|
|
2033
2164
|
handleChartClick: (e?: unknown) => void;
|
|
2034
|
-
handleBarClick: (data: ChartData
|
|
2165
|
+
handleBarClick: (data: ChartData, index: number, event: React.MouseEvent) => void;
|
|
2035
2166
|
handleSeriesClick: (...args: unknown[]) => void;
|
|
2036
2167
|
};
|
|
2037
2168
|
|
|
@@ -2060,84 +2191,6 @@ interface NoDataProps {
|
|
|
2060
2191
|
}
|
|
2061
2192
|
declare const NoData: React__default.FC<NoDataProps>;
|
|
2062
2193
|
|
|
2063
|
-
type Primitive = string | number | boolean | null | undefined;
|
|
2064
|
-
interface ChartData {
|
|
2065
|
-
[key: string]: Primitive;
|
|
2066
|
-
name?: string;
|
|
2067
|
-
}
|
|
2068
|
-
interface XAxisConfig {
|
|
2069
|
-
dataKey: string;
|
|
2070
|
-
label?: string;
|
|
2071
|
-
valueFormatter?: (value: string | number) => string;
|
|
2072
|
-
autoLabel?: boolean;
|
|
2073
|
-
}
|
|
2074
|
-
type ValueFormatter = (value: string | number) => string | number;
|
|
2075
|
-
type FinalValueFormatter = (value: number | string | null | undefined) => string;
|
|
2076
|
-
type SeriesProp = {
|
|
2077
|
-
bar?: string[];
|
|
2078
|
-
line?: string[];
|
|
2079
|
-
area?: string[];
|
|
2080
|
-
};
|
|
2081
|
-
type SeriesEntry = {
|
|
2082
|
-
type: "bar" | "line" | "area";
|
|
2083
|
-
key: string;
|
|
2084
|
-
};
|
|
2085
|
-
type SeriesCounts = {
|
|
2086
|
-
bar: number;
|
|
2087
|
-
line: number;
|
|
2088
|
-
area: number;
|
|
2089
|
-
};
|
|
2090
|
-
type YAxisSide = "left" | "right";
|
|
2091
|
-
type YAxisMap = Record<string, YAxisSide>;
|
|
2092
|
-
interface MapperConfigEntry {
|
|
2093
|
-
label?: string;
|
|
2094
|
-
valueFormatter?: ValueFormatter;
|
|
2095
|
-
color?: string;
|
|
2096
|
-
type?: "number" | "string" | "auto";
|
|
2097
|
-
visible?: boolean;
|
|
2098
|
-
}
|
|
2099
|
-
type MapperConfig = Record<string, MapperConfigEntry>;
|
|
2100
|
-
interface YAxisOptions {
|
|
2101
|
-
label?: string;
|
|
2102
|
-
stroke?: string;
|
|
2103
|
-
width?: number;
|
|
2104
|
-
percent?: boolean;
|
|
2105
|
-
percentDecimals?: number;
|
|
2106
|
-
}
|
|
2107
|
-
type YAxes = Partial<{
|
|
2108
|
-
left: YAxisOptions;
|
|
2109
|
-
right: YAxisOptions;
|
|
2110
|
-
}>;
|
|
2111
|
-
interface TooltipItem {
|
|
2112
|
-
id: string;
|
|
2113
|
-
data: ChartData;
|
|
2114
|
-
position: {
|
|
2115
|
-
top: number;
|
|
2116
|
-
left: number;
|
|
2117
|
-
};
|
|
2118
|
-
}
|
|
2119
|
-
type TooltipAdaptedRow = Record<string, string | number> & {
|
|
2120
|
-
name: string;
|
|
2121
|
-
};
|
|
2122
|
-
interface ChartHooksArgs {
|
|
2123
|
-
width?: number | string;
|
|
2124
|
-
measuredWidth?: number | null;
|
|
2125
|
-
points?: number;
|
|
2126
|
-
seriesCounts?: SeriesCounts;
|
|
2127
|
-
niceMax?: number;
|
|
2128
|
-
yAxes?: YAxes;
|
|
2129
|
-
yAxisLabel?: string;
|
|
2130
|
-
chartMargin?: Partial<{
|
|
2131
|
-
top: number;
|
|
2132
|
-
right: number;
|
|
2133
|
-
left: number;
|
|
2134
|
-
bottom: number;
|
|
2135
|
-
}>;
|
|
2136
|
-
showLabels?: boolean;
|
|
2137
|
-
showLegend?: boolean;
|
|
2138
|
-
xAxisLabel?: string;
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
2194
|
interface LeaderboardItem<T extends string> {
|
|
2142
2195
|
name: string;
|
|
2143
2196
|
value: number | string | T;
|
|
@@ -2149,10 +2202,8 @@ interface LeaderboardProps<T extends string> {
|
|
|
2149
2202
|
className?: string;
|
|
2150
2203
|
isLoading?: boolean;
|
|
2151
2204
|
legend?: string[];
|
|
2152
|
-
best?: boolean;
|
|
2153
|
-
worst?: boolean;
|
|
2154
2205
|
}
|
|
2155
|
-
declare function Leaderboard<T extends string>({ items, order: initialOrder, title, className, isLoading, legend,
|
|
2206
|
+
declare function Leaderboard<T extends string>({ items, order: initialOrder, title, className, isLoading, legend, }: LeaderboardProps<T>): react_jsx_runtime.JSX.Element;
|
|
2156
2207
|
|
|
2157
2208
|
declare function useIsMobile(): boolean;
|
|
2158
2209
|
|
|
@@ -2166,11 +2217,11 @@ interface UseDragOptions {
|
|
|
2166
2217
|
onDrag?: (id: string, position: Position) => void;
|
|
2167
2218
|
}
|
|
2168
2219
|
declare const useDrag: (options?: UseDragOptions) => {
|
|
2169
|
-
handleMouseDown: (id: string, e: React.MouseEvent) => void;
|
|
2220
|
+
handleMouseDown: (id: string, e: React.MouseEvent | React.TouchEvent) => void;
|
|
2170
2221
|
getPosition: (id: string) => Position;
|
|
2171
2222
|
setPosition: (id: string, position: Position) => void;
|
|
2172
2223
|
isElementDragging: (id: string) => boolean;
|
|
2173
2224
|
isDragging: boolean;
|
|
2174
2225
|
};
|
|
2175
2226
|
|
|
2176
|
-
export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, type AvatarComboboxItem, type AvatarComboboxProps, type AvatarComboboxPropsWithGroupItems, type AvatarComboboxPropsWithItems, type AvatarComboboxTestIds, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, type BadgeColorType, type BannerProps, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, type CalendarEvent, type CalendarEventAgenda, type CalendarProps, type CalendarView, type CalendarViewAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart, type ChartData, type ChartHooksArgs, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, type DebouncedInputProps, type DefaultAvatarComboboxProps, DefaultEndHour, DefaultEndHourAgenda, type DefaultMultiSelectProps, type DefaultSelectProps, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent, DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage, EventAgenda, EventCalendar, type EventColor, type EventColorAgenda, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, type FinalValueFormatter, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, type IconProps, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, Leaderboard, type LeaderboardItem, type LeaderboardProps, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type MapperConfig, type MapperConfigEntry,
|
|
2227
|
+
export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, type AvatarComboboxItem, type AvatarComboboxProps, type AvatarComboboxPropsWithGroupItems, type AvatarComboboxPropsWithItems, type AvatarComboboxTestIds, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, type BadgeColorType, type BannerProps, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, type CalendarEvent, type CalendarEventAgenda, type CalendarProps, type CalendarView, type CalendarViewAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart, type ChartData$4 as ChartData, type ChartHooksArgs, ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, type DebouncedInputProps, type DefaultAvatarComboboxProps, DefaultEndHour, DefaultEndHourAgenda, type DefaultMultiSelectProps, type DefaultSelectProps, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent, DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage, EventAgenda, EventCalendar, type EventColor, type EventColorAgenda, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, type FinalValueFormatter, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, type IconProps, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, Leaderboard, type LeaderboardItem, type LeaderboardProps, type LegendItem, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type MapperConfig, type MapperConfigEntry, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, type MultiComboboxProps, type MultiComboboxTestIds, MultiSelect, MultiSelectBase, MultiSelectContentBase, type MultiSelectContextType, MultiSelectGroupBase, type MultiSelectItem, MultiSelectItemBase, type MultiSelectProps, type MultiSelectPropsWithGroupItems, type MultiSelectPropsWithItems, MultiSelectSeparatorBase, type MultiSelectTestIds, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, type NewSelectProps, NoData, NotificationButton, type Period, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, type Primitive, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, type ProgressType, RangePicker, type RangePickerProps, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, type SelectPropsWithGroupItems, type SelectPropsWithItems, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, type SelectTestIds, SelectTriggerBase, SelectValueBase, SeparatorBase, type SeriesCounts, type SeriesEntry, type SeriesProp$1 as SeriesProp, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, type SliderBaseProps, StartHour, StartHourAgenda, StatusIndicator, type StatusProps, SwitchBase, SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type TextAreaBaseProps, type Theme, ThemeProviderBase, TimePicker, TimePickerInput, type TimePickerInputProps, type TimePickerType, TimeSeries, type TimeSeriesConfig, Toaster, type TooltipAdaptedRow, TooltipBase, TooltipContentBase, type TooltipItem$2 as TooltipItem, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, type ValueFormatter, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, type XAxisConfig$2 as XAxisConfig, type YAxes, type YAxisMap, type YAxisOptions, type YAxisSide, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, renderInsideBarLabel, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useTheme, useTimeSeriesRange, type valueFormatter, visualForItem };
|