@connectif/ui-components 2.0.9 → 2.0.11
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import './EchartsConfig';
|
|
2
3
|
import ReactEChartsCore from 'echarts-for-react/lib/core';
|
|
3
4
|
import { sizes } from '../../theme/Typography';
|
|
@@ -42,6 +43,10 @@ export type BarChartProps = {
|
|
|
42
43
|
* Formatter function used to format values shown in tooltip.
|
|
43
44
|
*/
|
|
44
45
|
tooltipEntryFormatter?: ChartTooltipEntryFormatter;
|
|
46
|
+
/**
|
|
47
|
+
* Reference to chart component
|
|
48
|
+
*/
|
|
49
|
+
chartRef?: React.RefObject<ReactEChartsCore>;
|
|
45
50
|
/**
|
|
46
51
|
* The series to display in the chart.
|
|
47
52
|
*/
|
|
@@ -97,5 +102,5 @@ export type BarChartProps = {
|
|
|
97
102
|
/**
|
|
98
103
|
* A bar chart component to display numeric data grouped by categories and series.
|
|
99
104
|
*/
|
|
100
|
-
declare const BarChart: ({ style, isLoading, series, categories, labelColor, gridLineColor, gridLabelSize, yAxisLabelFormatter, tooltipEntryFormatter, onClick }: BarChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
105
|
+
declare const BarChart: ({ style, isLoading, series, categories, labelColor, gridLineColor, gridLabelSize, chartRef, yAxisLabelFormatter, tooltipEntryFormatter, onClick }: BarChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
101
106
|
export default BarChart;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import './EchartsConfig';
|
|
3
|
+
import ReactEChartsCore from 'echarts-for-react/lib/core';
|
|
2
4
|
import { CategorizedChartProps } from './CategorizedChartProps';
|
|
3
5
|
import { IconId } from '../icon/Icon';
|
|
4
6
|
import { IncrementLabelType } from '../../propTypes/IncrementLabel';
|
|
@@ -90,10 +92,6 @@ export type LineChartProps = CategorizedChartProps & {
|
|
|
90
92
|
* Option to disable split lines on X axe.
|
|
91
93
|
*/
|
|
92
94
|
disableSplitLine?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Option to enable full grid on the chart.
|
|
95
|
-
*/
|
|
96
|
-
fullGrid?: boolean;
|
|
97
95
|
/**
|
|
98
96
|
* Font size to format the label of the Y axis.
|
|
99
97
|
*/
|
|
@@ -110,10 +108,23 @@ export type LineChartProps = CategorizedChartProps & {
|
|
|
110
108
|
* Margin to add between labels and x axis. It will be in px
|
|
111
109
|
*/
|
|
112
110
|
xAxisMargin?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Reference to chart component
|
|
113
|
+
*/
|
|
114
|
+
chartRef?: React.RefObject<ReactEChartsCore>;
|
|
115
|
+
/**
|
|
116
|
+
* Set grid internal margin
|
|
117
|
+
*/
|
|
118
|
+
gridMargin?: {
|
|
119
|
+
left?: number;
|
|
120
|
+
top?: number;
|
|
121
|
+
bottom?: number;
|
|
122
|
+
right?: number;
|
|
123
|
+
};
|
|
113
124
|
};
|
|
114
125
|
/**
|
|
115
126
|
* A line chart component to display numeric data grouped by categories and series.
|
|
116
127
|
* Commonly, categories use to be sorted dates.
|
|
117
128
|
*/
|
|
118
|
-
declare const LineChart: ({ style, isLoading, series, categories, yAxisLabelFormatter, ySecondaryAxisLabelFormatter, onClick, disableSeriesNames, disableAxes, disableSplitLine,
|
|
129
|
+
declare const LineChart: ({ style, isLoading, series, categories, yAxisLabelFormatter, ySecondaryAxisLabelFormatter, onClick, disableSeriesNames, disableAxes, disableSplitLine, axisFontSize, axisFontColor, yAxisPosition, xAxisMargin, chartRef, gridMargin }: LineChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
119
130
|
export default LineChart;
|
package/dist/index.js
CHANGED
|
@@ -12020,6 +12020,7 @@ var BarChart2 = ({
|
|
|
12020
12020
|
labelColor = grey400,
|
|
12021
12021
|
gridLineColor = grey200,
|
|
12022
12022
|
gridLabelSize = "sm",
|
|
12023
|
+
chartRef,
|
|
12023
12024
|
yAxisLabelFormatter = (value) => `${value}`,
|
|
12024
12025
|
tooltipEntryFormatter = ({ data }) => ({
|
|
12025
12026
|
text: `${data.tooltipName}: ${data.tooltipValue}`
|
|
@@ -12271,6 +12272,7 @@ var BarChart2 = ({
|
|
|
12271
12272
|
) : /* @__PURE__ */ jsx67(AutoSizer, { style: { height: "100%", width: "100%" }, children: ({ width: width2 }) => /* @__PURE__ */ jsx67(
|
|
12272
12273
|
ReactEChartsCore,
|
|
12273
12274
|
{
|
|
12275
|
+
ref: chartRef,
|
|
12274
12276
|
style: style3,
|
|
12275
12277
|
echarts: echarts2,
|
|
12276
12278
|
option: getEchartsOptions(width2),
|
|
@@ -12300,11 +12302,12 @@ var LineChart2 = ({
|
|
|
12300
12302
|
disableSeriesNames = false,
|
|
12301
12303
|
disableAxes = false,
|
|
12302
12304
|
disableSplitLine = false,
|
|
12303
|
-
fullGrid = false,
|
|
12304
12305
|
axisFontSize = "11px",
|
|
12305
12306
|
axisFontColor = grey400,
|
|
12306
12307
|
yAxisPosition = "right",
|
|
12307
|
-
xAxisMargin
|
|
12308
|
+
xAxisMargin,
|
|
12309
|
+
chartRef,
|
|
12310
|
+
gridMargin
|
|
12308
12311
|
}) => {
|
|
12309
12312
|
const theme2 = useTheme3();
|
|
12310
12313
|
const cursor2 = onClick ? "pointer" : "default";
|
|
@@ -12467,10 +12470,10 @@ var LineChart2 = ({
|
|
|
12467
12470
|
formatter: tooltipFormatter
|
|
12468
12471
|
},
|
|
12469
12472
|
grid: {
|
|
12470
|
-
left: 0,
|
|
12471
|
-
right: 0,
|
|
12472
|
-
top:
|
|
12473
|
-
bottom: 0,
|
|
12473
|
+
left: gridMargin?.left || 0,
|
|
12474
|
+
right: gridMargin?.right || 0,
|
|
12475
|
+
top: gridMargin?.top || 16,
|
|
12476
|
+
bottom: gridMargin?.bottom || 0,
|
|
12474
12477
|
containLabel: true
|
|
12475
12478
|
},
|
|
12476
12479
|
xAxis: {
|
|
@@ -12674,6 +12677,7 @@ var LineChart2 = ({
|
|
|
12674
12677
|
children: /* @__PURE__ */ jsx68(
|
|
12675
12678
|
ReactEChartsCore2,
|
|
12676
12679
|
{
|
|
12680
|
+
ref: chartRef,
|
|
12677
12681
|
notMerge: true,
|
|
12678
12682
|
style: style3,
|
|
12679
12683
|
echarts: echarts3,
|
|
@@ -24229,6 +24233,8 @@ var Loader_default = Loader;
|
|
|
24229
24233
|
import ReactMarkdown from "react-markdown";
|
|
24230
24234
|
import remarkGfm from "remark-gfm";
|
|
24231
24235
|
import { styled as styled8 } from "@mui/material/styles";
|
|
24236
|
+
import remarkMath from "remark-math";
|
|
24237
|
+
import rehypeKatex from "rehype-katex";
|
|
24232
24238
|
import { jsx as jsx136 } from "react/jsx-runtime";
|
|
24233
24239
|
var MarkdownContainer = styled8("div")(
|
|
24234
24240
|
({ color: color2, backgroundColor: backgroundColor2 = "transparent", variant }) => ({
|
|
@@ -24287,13 +24293,24 @@ var MarkdownContainer = styled8("div")(
|
|
|
24287
24293
|
},
|
|
24288
24294
|
"& a:hover": {
|
|
24289
24295
|
textDecoration: "underline"
|
|
24296
|
+
},
|
|
24297
|
+
"& .katex .katex-html": {
|
|
24298
|
+
display: "none"
|
|
24290
24299
|
}
|
|
24291
24300
|
})
|
|
24292
24301
|
);
|
|
24293
24302
|
var MarkdownRenderer = ({
|
|
24294
24303
|
text,
|
|
24295
24304
|
...rest
|
|
24296
|
-
}) => /* @__PURE__ */ jsx136(MarkdownContainer, { ...rest, children: /* @__PURE__ */ jsx136(
|
|
24305
|
+
}) => /* @__PURE__ */ jsx136(MarkdownContainer, { ...rest, children: /* @__PURE__ */ jsx136(
|
|
24306
|
+
ReactMarkdown,
|
|
24307
|
+
{
|
|
24308
|
+
remarkPlugins: [remarkGfm, remarkMath],
|
|
24309
|
+
rehypePlugins: [rehypeKatex],
|
|
24310
|
+
skipHtml: true,
|
|
24311
|
+
children: text
|
|
24312
|
+
}
|
|
24313
|
+
) });
|
|
24297
24314
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
24298
24315
|
|
|
24299
24316
|
// src/components/navbar/Navbar.tsx
|
|
@@ -26374,7 +26391,7 @@ react-is/cjs/react-is.development.js:
|
|
|
26374
26391
|
|
|
26375
26392
|
@mui/styled-engine/esm/index.js:
|
|
26376
26393
|
(**
|
|
26377
|
-
* @mui/styled-engine v7.
|
|
26394
|
+
* @mui/styled-engine v7.3.0
|
|
26378
26395
|
*
|
|
26379
26396
|
* @license MIT
|
|
26380
26397
|
* This source code is licensed under the MIT license found in the
|
|
@@ -26383,7 +26400,7 @@ react-is/cjs/react-is.development.js:
|
|
|
26383
26400
|
|
|
26384
26401
|
@mui/system/esm/index.js:
|
|
26385
26402
|
(**
|
|
26386
|
-
* @mui/system v7.
|
|
26403
|
+
* @mui/system v7.3.0
|
|
26387
26404
|
*
|
|
26388
26405
|
* @license MIT
|
|
26389
26406
|
* This source code is licensed under the MIT license found in the
|