@hitachivantara/uikit-react-viz 4.0.3 → 4.1.0
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/Barchart/Barchart.js +45 -72
- package/dist/Barchart/Barchart.js.map +1 -1
- package/dist/Barchart/barchartPlotlyOverrides.js +1 -13
- package/dist/Barchart/barchartPlotlyOverrides.js.map +1 -1
- package/dist/Barchart/index.js +0 -2
- package/dist/Barchart/index.js.map +1 -1
- package/dist/Barchart/styles.js.map +1 -1
- package/dist/Chart/Chart.js +30 -76
- package/dist/Chart/Chart.js.map +1 -1
- package/dist/Chart/Plot/Plot.js +11 -48
- package/dist/Chart/Plot/Plot.js.map +1 -1
- package/dist/Chart/Plot/index.js +0 -2
- package/dist/Chart/Plot/index.js.map +1 -1
- package/dist/Chart/Plot/styles.js.map +1 -1
- package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js +1 -36
- package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
- package/dist/Chart/Tooltip/MultiTooltip/index.js +0 -2
- package/dist/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
- package/dist/Chart/Tooltip/MultiTooltip/styles.js +0 -2
- package/dist/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
- package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js +2 -26
- package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
- package/dist/Chart/Tooltip/SingleTooltip/index.js +0 -2
- package/dist/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
- package/dist/Chart/Tooltip/SingleTooltip/styles.js +0 -2
- package/dist/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
- package/dist/Chart/Tooltip/Tooltip.js +16 -51
- package/dist/Chart/Tooltip/Tooltip.js.map +1 -1
- package/dist/Chart/Tooltip/index.js +0 -2
- package/dist/Chart/Tooltip/index.js.map +1 -1
- package/dist/Chart/Tooltip/styles.js.map +1 -1
- package/dist/Chart/chartPlotlyOverrides.js +9 -33
- package/dist/Chart/chartPlotlyOverrides.js.map +1 -1
- package/dist/Chart/index.js +0 -2
- package/dist/Chart/index.js.map +1 -1
- package/dist/Chart/styles.js +0 -13
- package/dist/Chart/styles.js.map +1 -1
- package/dist/ConfusionMatrix/ConfusionMatrix.d.ts +10 -0
- package/dist/ConfusionMatrix/ConfusionMatrix.js +102 -0
- package/dist/ConfusionMatrix/ConfusionMatrix.js.map +1 -0
- package/dist/ConfusionMatrix/CustomTooltip/CustomTooltip.js +47 -0
- package/dist/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +1 -0
- package/dist/ConfusionMatrix/CustomTooltip/index.js +14 -0
- package/dist/ConfusionMatrix/CustomTooltip/index.js.map +1 -0
- package/dist/ConfusionMatrix/CustomTooltip/styles.js +26 -0
- package/dist/ConfusionMatrix/CustomTooltip/styles.js.map +1 -0
- package/dist/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +189 -0
- package/dist/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +1 -0
- package/dist/ConfusionMatrix/index.d.ts +2 -0
- package/dist/ConfusionMatrix/index.js +14 -0
- package/dist/ConfusionMatrix/index.js.map +1 -0
- package/dist/ConfusionMatrix/styles.js +10 -0
- package/dist/ConfusionMatrix/styles.js.map +1 -0
- package/dist/Donutchart/Donutchart.js +10 -47
- package/dist/Donutchart/Donutchart.js.map +1 -1
- package/dist/Donutchart/donutchartPlotlyOverrides.js +1 -13
- package/dist/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
- package/dist/Donutchart/index.js +0 -2
- package/dist/Donutchart/index.js.map +1 -1
- package/dist/Donutchart/styles.js.map +1 -1
- package/dist/Linechart/Linechart.js +12 -50
- package/dist/Linechart/Linechart.js.map +1 -1
- package/dist/Linechart/index.js +0 -2
- package/dist/Linechart/index.js.map +1 -1
- package/dist/Linechart/lineChartPlotlyOverrides.js +1 -17
- package/dist/Linechart/lineChartPlotlyOverrides.js.map +1 -1
- package/dist/Linechart/styles.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/legacy/Barchart/Barchart.js +45 -43
- package/dist/legacy/Barchart/Barchart.js.map +1 -1
- package/dist/legacy/Barchart/barchartPlotlyOverrides.js +1 -6
- package/dist/legacy/Barchart/barchartPlotlyOverrides.js.map +1 -1
- package/dist/legacy/Barchart/index.js.map +1 -1
- package/dist/legacy/Barchart/styles.js.map +1 -1
- package/dist/legacy/Chart/Chart.js +30 -47
- package/dist/legacy/Chart/Chart.js.map +1 -1
- package/dist/legacy/Chart/Plot/Plot.js +11 -22
- package/dist/legacy/Chart/Plot/Plot.js.map +1 -1
- package/dist/legacy/Chart/Plot/index.js.map +1 -1
- package/dist/legacy/Chart/Plot/styles.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js +1 -17
- package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js +0 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js +2 -9
- package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js +0 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/Tooltip.js +16 -30
- package/dist/legacy/Chart/Tooltip/Tooltip.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/index.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/styles.js.map +1 -1
- package/dist/legacy/Chart/chartPlotlyOverrides.js +9 -20
- package/dist/legacy/Chart/chartPlotlyOverrides.js.map +1 -1
- package/dist/legacy/Chart/index.js.map +1 -1
- package/dist/legacy/Chart/styles.js +0 -4
- package/dist/legacy/Chart/styles.js.map +1 -1
- package/dist/legacy/ConfusionMatrix/ConfusionMatrix.d.ts +10 -0
- package/dist/legacy/ConfusionMatrix/ConfusionMatrix.js +87 -0
- package/dist/legacy/ConfusionMatrix/ConfusionMatrix.js.map +1 -0
- package/dist/legacy/ConfusionMatrix/CustomTooltip/CustomTooltip.js +39 -0
- package/dist/legacy/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +1 -0
- package/dist/legacy/ConfusionMatrix/CustomTooltip/index.js +2 -0
- package/dist/legacy/ConfusionMatrix/CustomTooltip/index.js.map +1 -0
- package/dist/legacy/ConfusionMatrix/CustomTooltip/styles.js +19 -0
- package/dist/legacy/ConfusionMatrix/CustomTooltip/styles.js.map +1 -0
- package/dist/legacy/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +181 -0
- package/dist/legacy/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +1 -0
- package/dist/legacy/ConfusionMatrix/index.d.ts +2 -0
- package/dist/legacy/ConfusionMatrix/index.js +2 -0
- package/dist/legacy/ConfusionMatrix/index.js.map +1 -0
- package/dist/legacy/ConfusionMatrix/styles.js +3 -0
- package/dist/legacy/ConfusionMatrix/styles.js.map +1 -0
- package/dist/legacy/Donutchart/Donutchart.js +11 -22
- package/dist/legacy/Donutchart/Donutchart.js.map +1 -1
- package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js +1 -6
- package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
- package/dist/legacy/Donutchart/index.js.map +1 -1
- package/dist/legacy/Donutchart/styles.js.map +1 -1
- package/dist/legacy/Linechart/Linechart.js +13 -25
- package/dist/legacy/Linechart/Linechart.js.map +1 -1
- package/dist/legacy/Linechart/index.js.map +1 -1
- package/dist/legacy/Linechart/lineChartPlotlyOverrides.js +1 -10
- package/dist/legacy/Linechart/lineChartPlotlyOverrides.js.map +1 -1
- package/dist/legacy/Linechart/styles.js.map +1 -1
- package/dist/legacy/index.d.ts +3 -0
- package/dist/legacy/index.js +1 -0
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/Barchart/Barchart.js +38 -31
- package/dist/modern/Barchart/Barchart.js.map +1 -1
- package/dist/modern/Barchart/barchartPlotlyOverrides.js +1 -6
- package/dist/modern/Barchart/barchartPlotlyOverrides.js.map +1 -1
- package/dist/modern/Barchart/index.js.map +1 -1
- package/dist/modern/Barchart/styles.js.map +1 -1
- package/dist/modern/Chart/Chart.js +19 -34
- package/dist/modern/Chart/Chart.js.map +1 -1
- package/dist/modern/Chart/Plot/Plot.js +12 -23
- package/dist/modern/Chart/Plot/Plot.js.map +1 -1
- package/dist/modern/Chart/Plot/index.js.map +1 -1
- package/dist/modern/Chart/Plot/styles.js.map +1 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -17
- package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js +0 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -7
- package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js +0 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
- package/dist/modern/Chart/Tooltip/Tooltip.js +2 -13
- package/dist/modern/Chart/Tooltip/Tooltip.js.map +1 -1
- package/dist/modern/Chart/Tooltip/index.js.map +1 -1
- package/dist/modern/Chart/Tooltip/styles.js.map +1 -1
- package/dist/modern/Chart/chartPlotlyOverrides.js +9 -20
- package/dist/modern/Chart/chartPlotlyOverrides.js.map +1 -1
- package/dist/modern/Chart/index.js.map +1 -1
- package/dist/modern/Chart/styles.js +0 -4
- package/dist/modern/Chart/styles.js.map +1 -1
- package/dist/modern/ConfusionMatrix/ConfusionMatrix.d.ts +10 -0
- package/dist/modern/ConfusionMatrix/ConfusionMatrix.js +76 -0
- package/dist/modern/ConfusionMatrix/ConfusionMatrix.js.map +1 -0
- package/dist/modern/ConfusionMatrix/CustomTooltip/CustomTooltip.js +37 -0
- package/dist/modern/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +1 -0
- package/dist/modern/ConfusionMatrix/CustomTooltip/index.js +2 -0
- package/dist/modern/ConfusionMatrix/CustomTooltip/index.js.map +1 -0
- package/dist/modern/ConfusionMatrix/CustomTooltip/styles.js +17 -0
- package/dist/modern/ConfusionMatrix/CustomTooltip/styles.js.map +1 -0
- package/dist/modern/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +154 -0
- package/dist/modern/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +1 -0
- package/dist/modern/ConfusionMatrix/index.d.ts +2 -0
- package/dist/modern/ConfusionMatrix/index.js +2 -0
- package/dist/modern/ConfusionMatrix/index.js.map +1 -0
- package/dist/modern/ConfusionMatrix/styles.js +3 -0
- package/dist/modern/ConfusionMatrix/styles.js.map +1 -0
- package/dist/modern/Donutchart/Donutchart.js +11 -22
- package/dist/modern/Donutchart/Donutchart.js.map +1 -1
- package/dist/modern/Donutchart/donutchartPlotlyOverrides.js +1 -6
- package/dist/modern/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
- package/dist/modern/Donutchart/index.js.map +1 -1
- package/dist/modern/Donutchart/styles.js.map +1 -1
- package/dist/modern/Linechart/Linechart.js +12 -24
- package/dist/modern/Linechart/Linechart.js.map +1 -1
- package/dist/modern/Linechart/index.js.map +1 -1
- package/dist/modern/Linechart/lineChartPlotlyOverrides.js +1 -10
- package/dist/modern/Linechart/lineChartPlotlyOverrides.js.map +1 -1
- package/dist/modern/Linechart/styles.js.map +1 -1
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +1 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","backgroundColor","hv","palette","atmosphere","atmo1","width","boxShadow","shadows","zIndex","title","padding","hvSpacing","borderBottom","atmo2","valuesContainer","spacing","sm","values","display","justifyContent","alignItems","paddingBottom","valueNameWrapper","color","xs","height","separator","separatorColor"],"sources":["../../../../../src/Chart/Tooltip/MultiTooltip/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n width: \"fit-content\",\n boxShadow: theme.hv.shadows[1],\n zIndex: 100,\n },\n title: {\n padding: theme.hvSpacing(\"15px\", \"sm\"),\n borderBottom: `3px solid ${theme.hv.palette.atmosphere.atmo2}`,\n },\n valuesContainer: {\n padding: theme.hv.spacing.sm,\n },\n values: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingBottom: theme.hv.spacing.sm,\n \"&:last-child\": {\n paddingBottom: 0,\n },\n },\n valueNameWrapper: {\n display: \"flex\",\n alignItems: \"center\",\n },\n color: {\n width: theme.hv.spacing.xs,\n height: theme.hv.spacing.xs,\n },\n separator: {\n width: theme.hv.spacing.xs,\n },\n separatorColor: {\n width: \"5px\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","backgroundColor","hv","palette","atmosphere","atmo1","width","boxShadow","shadows","zIndex","title","padding","hvSpacing","borderBottom","atmo2","valuesContainer","spacing","sm","values","display","justifyContent","alignItems","paddingBottom","valueNameWrapper","color","xs","height","separator","separatorColor"],"sources":["../../../../../src/Chart/Tooltip/MultiTooltip/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n width: \"fit-content\",\n boxShadow: theme.hv.shadows[1],\n zIndex: 100,\n },\n title: {\n padding: theme.hvSpacing(\"15px\", \"sm\"),\n borderBottom: `3px solid ${theme.hv.palette.atmosphere.atmo2}`,\n },\n valuesContainer: {\n padding: theme.hv.spacing.sm,\n },\n values: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingBottom: theme.hv.spacing.sm,\n \"&:last-child\": {\n paddingBottom: 0,\n },\n },\n valueNameWrapper: {\n display: \"flex\",\n alignItems: \"center\",\n },\n color: {\n width: theme.hv.spacing.xs,\n height: theme.hv.spacing.xs,\n },\n separator: {\n width: theme.hv.spacing.xs,\n },\n separatorColor: {\n width: \"5px\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,KAAK,KAAM;EACzBC,IAAI,EAAE;IACJC,eAAe,EAAEF,KAAK,CAACG,EAAE,CAACC,OAAO,CAACC,UAAU,CAACC,KAAK;IAClDC,KAAK,EAAE,aAAa;IACpBC,SAAS,EAAER,KAAK,CAACG,EAAE,CAACM,OAAO,CAAC,CAAC,CAAC;IAC9BC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLC,OAAO,EAAEZ,KAAK,CAACa,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC;IACtCC,YAAY,EAAG,aAAYd,KAAK,CAACG,EAAE,CAACC,OAAO,CAACC,UAAU,CAACU,KAAM;EAC/D,CAAC;EACDC,eAAe,EAAE;IACfJ,OAAO,EAAEZ,KAAK,CAACG,EAAE,CAACc,OAAO,CAACC;EAC5B,CAAC;EACDC,MAAM,EAAE;IACNC,OAAO,EAAE,MAAM;IACfC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAEvB,KAAK,CAACG,EAAE,CAACc,OAAO,CAACC,EAAE;IAClC,cAAc,EAAE;MACdK,aAAa,EAAE;IACjB;EACF,CAAC;EACDC,gBAAgB,EAAE;IAChBJ,OAAO,EAAE,MAAM;IACfE,UAAU,EAAE;EACd,CAAC;EACDG,KAAK,EAAE;IACLlB,KAAK,EAAEP,KAAK,CAACG,EAAE,CAACc,OAAO,CAACS,EAAE;IAC1BC,MAAM,EAAE3B,KAAK,CAACG,EAAE,CAACc,OAAO,CAACS;EAC3B,CAAC;EACDE,SAAS,EAAE;IACTrB,KAAK,EAAEP,KAAK,CAACG,EAAE,CAACc,OAAO,CAACS;EAC1B,CAAC;EACDG,cAAc,EAAE;IACdtB,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAeR,MAAM"}
|
|
@@ -5,7 +5,6 @@ import { HvTypography } from "@hitachivantara/uikit-react-core";
|
|
|
5
5
|
import styles from "./styles";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
8
|
const SingleTooltip = ({
|
|
10
9
|
classes,
|
|
11
10
|
title,
|
|
@@ -25,7 +24,6 @@ const SingleTooltip = ({
|
|
|
25
24
|
})
|
|
26
25
|
})]
|
|
27
26
|
});
|
|
28
|
-
|
|
29
27
|
process.env.NODE_ENV !== "production" ? SingleTooltip.propTypes = {
|
|
30
28
|
/**
|
|
31
29
|
* A Jss Object used to override or extend the styles applied.
|
|
@@ -35,26 +33,21 @@ process.env.NODE_ENV !== "production" ? SingleTooltip.propTypes = {
|
|
|
35
33
|
* Styles applied to the root class.
|
|
36
34
|
*/
|
|
37
35
|
root: PropTypes.string,
|
|
38
|
-
|
|
39
36
|
/**
|
|
40
37
|
* Styles applied to the separator between title and value.
|
|
41
38
|
*/
|
|
42
39
|
separator: PropTypes.string
|
|
43
40
|
}).isRequired,
|
|
44
|
-
|
|
45
41
|
/**
|
|
46
42
|
* Title of the chart.
|
|
47
43
|
*/
|
|
48
44
|
title: PropTypes.string.isRequired,
|
|
49
|
-
|
|
50
45
|
/**
|
|
51
46
|
* Value of the chart.
|
|
52
47
|
*/
|
|
53
48
|
value: PropTypes.number.isRequired
|
|
54
49
|
} : void 0;
|
|
55
|
-
|
|
56
50
|
const arePropsEqual = (prevProps, nextProps) => prevProps.title === nextProps.title && prevProps.value === nextProps.value;
|
|
57
|
-
|
|
58
51
|
export default withStyles(styles, {
|
|
59
52
|
name: "HvChartSingleTooltip"
|
|
60
53
|
})( /*#__PURE__*/memo(SingleTooltip, arePropsEqual));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleTooltip.js","names":["React","memo","PropTypes","withStyles","HvTypography","styles","SingleTooltip","classes","title","value","root","separator","propTypes","shape","string","isRequired","number","arePropsEqual","prevProps","nextProps","name"],"sources":["../../../../../src/Chart/Tooltip/SingleTooltip/SingleTooltip.js"],"sourcesContent":["import React, { memo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport { HvTypography } from \"@hitachivantara/uikit-react-core\";\nimport styles from \"./styles\";\n\nconst SingleTooltip = ({ classes, title, value }) => (\n <div className={classes.root}>\n <div>\n <HvTypography variant=\"highlightText\">{title}</HvTypography>\n </div>\n <div className={classes.separator} />\n <div>\n <HvTypography>{value}</HvTypography>\n </div>\n </div>\n);\n\nSingleTooltip.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the separator between title and value.\n */\n separator: PropTypes.string,\n }).isRequired,\n /**\n * Title of the chart.\n */\n title: PropTypes.string.isRequired,\n /**\n * Value of the chart.\n */\n value: PropTypes.number.isRequired,\n};\n\nconst arePropsEqual = (prevProps, nextProps) =>\n prevProps.title === nextProps.title && prevProps.value === nextProps.value;\n\nexport default withStyles(styles, { name: \"HvChartSingleTooltip\" })(\n memo(SingleTooltip, arePropsEqual)\n);\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"SingleTooltip.js","names":["React","memo","PropTypes","withStyles","HvTypography","styles","SingleTooltip","classes","title","value","root","separator","propTypes","shape","string","isRequired","number","arePropsEqual","prevProps","nextProps","name"],"sources":["../../../../../src/Chart/Tooltip/SingleTooltip/SingleTooltip.js"],"sourcesContent":["import React, { memo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport { HvTypography } from \"@hitachivantara/uikit-react-core\";\nimport styles from \"./styles\";\n\nconst SingleTooltip = ({ classes, title, value }) => (\n <div className={classes.root}>\n <div>\n <HvTypography variant=\"highlightText\">{title}</HvTypography>\n </div>\n <div className={classes.separator} />\n <div>\n <HvTypography>{value}</HvTypography>\n </div>\n </div>\n);\n\nSingleTooltip.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the separator between title and value.\n */\n separator: PropTypes.string,\n }).isRequired,\n /**\n * Title of the chart.\n */\n title: PropTypes.string.isRequired,\n /**\n * Value of the chart.\n */\n value: PropTypes.number.isRequired,\n};\n\nconst arePropsEqual = (prevProps, nextProps) =>\n prevProps.title === nextProps.title && prevProps.value === nextProps.value;\n\nexport default withStyles(styles, { name: \"HvChartSingleTooltip\" })(\n memo(SingleTooltip, arePropsEqual)\n);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,YAAY,QAAQ,kCAAkC;AAC/D,OAAOC,MAAM,MAAM,UAAU;AAAC;AAAA;AAE9B,MAAMC,aAAa,GAAG,CAAC;EAAEC,OAAO;EAAEC,KAAK;EAAEC;AAAM,CAAC,kBAC9C;EAAK,SAAS,EAAEF,OAAO,CAACG,IAAK;EAAA,wBAC3B;IAAA,uBACE,KAAC,YAAY;MAAC,OAAO,EAAC,eAAe;MAAA,UAAEF;IAAK;EAAgB,EACxD,eACN;IAAK,SAAS,EAAED,OAAO,CAACI;EAAU,EAAG,eACrC;IAAA,uBACE,KAAC,YAAY;MAAA,UAAEF;IAAK;EAAgB,EAChC;AAAA,EAET;AAED,wCAAAH,aAAa,CAACM,SAAS,GAAG;EACxB;AACF;AACA;EACEL,OAAO,EAAEL,SAAS,CAACW,KAAK,CAAC;IACvB;AACJ;AACA;IACIH,IAAI,EAAER,SAAS,CAACY,MAAM;IACtB;AACJ;AACA;IACIH,SAAS,EAAET,SAAS,CAACY;EACvB,CAAC,CAAC,CAACC,UAAU;EACb;AACF;AACA;EACEP,KAAK,EAAEN,SAAS,CAACY,MAAM,CAACC,UAAU;EAClC;AACF;AACA;EACEN,KAAK,EAAEP,SAAS,CAACc,MAAM,CAACD;AAC1B,CAAC;AAED,MAAME,aAAa,GAAG,CAACC,SAAS,EAAEC,SAAS,KACzCD,SAAS,CAACV,KAAK,KAAKW,SAAS,CAACX,KAAK,IAAIU,SAAS,CAACT,KAAK,KAAKU,SAAS,CAACV,KAAK;AAE5E,eAAeN,UAAU,CAACE,MAAM,EAAE;EAAEe,IAAI,EAAE;AAAuB,CAAC,CAAC,eACjEnB,IAAI,CAACK,aAAa,EAAEW,aAAa,CAAC,CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default"],"sources":["../../../../../src/Chart/Tooltip/SingleTooltip/index.js"],"sourcesContent":["export { default } from \"./SingleTooltip\";\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../../../src/Chart/Tooltip/SingleTooltip/index.js"],"sourcesContent":["export { default } from \"./SingleTooltip\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","hv","spacing","sm","display","backgroundColor","palette","atmosphere","atmo1","boxShadow","shadows","width","zIndex","separator","xs"],"sources":["../../../../../src/Chart/Tooltip/SingleTooltip/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: theme.hv.spacing.sm,\n display: \"flex\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n boxShadow: theme.hv.shadows[1],\n width: \"fit-content\",\n zIndex: 100,\n },\n separator: {\n width: theme.hv.spacing.xs,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","hv","spacing","sm","display","backgroundColor","palette","atmosphere","atmo1","boxShadow","shadows","width","zIndex","separator","xs"],"sources":["../../../../../src/Chart/Tooltip/SingleTooltip/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: theme.hv.spacing.sm,\n display: \"flex\",\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n boxShadow: theme.hv.shadows[1],\n width: \"fit-content\",\n zIndex: 100,\n },\n separator: {\n width: theme.hv.spacing.xs,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAIC,KAAK,KAAM;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAEF,KAAK,CAACG,EAAE,CAACC,OAAO,CAACC,EAAE;IAC5BC,OAAO,EAAE,MAAM;IACfC,eAAe,EAAEP,KAAK,CAACG,EAAE,CAACK,OAAO,CAACC,UAAU,CAACC,KAAK;IAClDC,SAAS,EAAEX,KAAK,CAACG,EAAE,CAACS,OAAO,CAAC,CAAC,CAAC;IAC9BC,KAAK,EAAE,aAAa;IACpBC,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTF,KAAK,EAAEb,KAAK,CAACG,EAAE,CAACC,OAAO,CAACY;EAC1B;AACF,CAAC,CAAC;AAEF,eAAejB,MAAM"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "core-js/modules/web.dom-collections.iterator.js";
|
|
2
1
|
import React, { useEffect, useRef, useState, useCallback } from "react";
|
|
3
2
|
import PropTypes from "prop-types";
|
|
4
3
|
import { withStyles } from "@mui/styles";
|
|
@@ -7,11 +6,11 @@ import MultipleTooltip from "./MultiTooltip";
|
|
|
7
6
|
import styles from "./styles";
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
8
|
const offset = 20;
|
|
9
|
+
|
|
10
10
|
/**
|
|
11
11
|
* Component responsible for deciding which tooltip should be use and to calculate
|
|
12
12
|
* the exact position where it should be render.
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
14
|
const MainToolTip = ({
|
|
16
15
|
classes,
|
|
17
16
|
coordinates,
|
|
@@ -20,7 +19,6 @@ const MainToolTip = ({
|
|
|
20
19
|
tooltip
|
|
21
20
|
}) => {
|
|
22
21
|
var _MultipleTooltip;
|
|
23
|
-
|
|
24
22
|
const {
|
|
25
23
|
x,
|
|
26
24
|
y
|
|
@@ -31,11 +29,11 @@ const MainToolTip = ({
|
|
|
31
29
|
visibility: "hidden"
|
|
32
30
|
});
|
|
33
31
|
const ref = useRef(null);
|
|
32
|
+
|
|
34
33
|
/**
|
|
35
34
|
* Calculate the position where the tooltip has to render, having in account
|
|
36
35
|
* the dimensions.
|
|
37
36
|
*/
|
|
38
|
-
|
|
39
37
|
useEffect(() => {
|
|
40
38
|
if (!ref.current || !ref.current.getBoundingClientRect().width) return;
|
|
41
39
|
const {
|
|
@@ -64,7 +62,6 @@ const MainToolTip = ({
|
|
|
64
62
|
children: renderTooltip(tooltip)
|
|
65
63
|
});
|
|
66
64
|
};
|
|
67
|
-
|
|
68
65
|
process.env.NODE_ENV !== "production" ? MainToolTip.propTypes = {
|
|
69
66
|
/**
|
|
70
67
|
* A Jss Object used to override or extend the styles applied.
|
|
@@ -75,7 +72,6 @@ process.env.NODE_ENV !== "production" ? MainToolTip.propTypes = {
|
|
|
75
72
|
*/
|
|
76
73
|
root: PropTypes.string
|
|
77
74
|
}).isRequired,
|
|
78
|
-
|
|
79
75
|
/**
|
|
80
76
|
* Data of the tooltip.
|
|
81
77
|
*/
|
|
@@ -84,7 +80,6 @@ process.env.NODE_ENV !== "production" ? MainToolTip.propTypes = {
|
|
|
84
80
|
* Title.
|
|
85
81
|
*/
|
|
86
82
|
title: PropTypes.string,
|
|
87
|
-
|
|
88
83
|
/**
|
|
89
84
|
* Values of the tooltip.
|
|
90
85
|
*/
|
|
@@ -93,19 +88,16 @@ process.env.NODE_ENV !== "production" ? MainToolTip.propTypes = {
|
|
|
93
88
|
* Color of the bar.
|
|
94
89
|
*/
|
|
95
90
|
color: PropTypes.string,
|
|
96
|
-
|
|
97
91
|
/**
|
|
98
92
|
* Name.
|
|
99
93
|
*/
|
|
100
94
|
name: PropTypes.string,
|
|
101
|
-
|
|
102
95
|
/**
|
|
103
96
|
* Value.
|
|
104
97
|
*/
|
|
105
98
|
value: PropTypes.number
|
|
106
99
|
}))
|
|
107
100
|
}).isRequired,
|
|
108
|
-
|
|
109
101
|
/**
|
|
110
102
|
* Coordinates.
|
|
111
103
|
*/
|
|
@@ -114,18 +106,15 @@ process.env.NODE_ENV !== "production" ? MainToolTip.propTypes = {
|
|
|
114
106
|
* xx's coordinate.
|
|
115
107
|
*/
|
|
116
108
|
x: PropTypes.number.isRequired,
|
|
117
|
-
|
|
118
109
|
/**
|
|
119
110
|
* yy's coordinate.
|
|
120
111
|
*/
|
|
121
112
|
y: PropTypes.number.isRequired
|
|
122
113
|
}).isRequired,
|
|
123
|
-
|
|
124
114
|
/**
|
|
125
115
|
* Defines if should use a single or multiline tooltip.
|
|
126
116
|
*/
|
|
127
117
|
useSingle: PropTypes.bool,
|
|
128
|
-
|
|
129
118
|
/**
|
|
130
119
|
* Custom tooltip element to be displayed
|
|
131
120
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["React","useEffect","useRef","useState","useCallback","PropTypes","withStyles","SingleTooltip","MultipleTooltip","styles","offset","MainToolTip","classes","coordinates","data","useSingle","tooltip","x","y","style","setStyle","left","top","visibility","ref","current","getBoundingClientRect","width","height","renderTooltip","CustomTooltip","title","elements","value","root","propTypes","shape","string","isRequired","arrayOf","color","name","number","bool","func","defaultProps"],"sources":["../../../../src/Chart/Tooltip/Tooltip.js"],"sourcesContent":["import React, { useEffect, useRef, useState, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport SingleTooltip from \"./SingleTooltip\";\nimport MultipleTooltip from \"./MultiTooltip\";\nimport styles from \"./styles\";\n\nconst offset = 20;\n\n/**\n * Component responsible for deciding which tooltip should be use and to calculate\n * the exact position where it should be render.\n */\nconst MainToolTip = ({ classes, coordinates, data, useSingle, tooltip }) => {\n const { x, y } = coordinates;\n const [style, setStyle] = useState({ left: x, top: y, visibility: \"hidden\" });\n const ref = useRef(null);\n\n /**\n * Calculate the position where the tooltip has to render, having in account\n * the dimensions.\n */\n useEffect(() => {\n if (!ref.current || !ref.current.getBoundingClientRect().width) return;\n\n const { width, height } = ref.current.getBoundingClientRect();\n\n setStyle({ left: x - width / 2, top: y - height - offset });\n }, [x, y]);\n\n const renderTooltip = useCallback(\n (CustomTooltip) => {\n if (CustomTooltip) return CustomTooltip(data);\n if (useSingle) return <SingleTooltip title={data.title} value={data.elements[0].value} />;\n return <MultipleTooltip data={data} />;\n },\n [data, useSingle]\n );\n\n return (\n <div ref={ref} className={classes.root} style={style}>\n {renderTooltip(tooltip)}\n </div>\n );\n};\n\nMainToolTip.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the barchart root class.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Data of the tooltip.\n */\n data: PropTypes.shape({\n /**\n * Title.\n */\n title: PropTypes.string,\n /**\n * Values of the tooltip.\n */\n elements: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * Color of the bar.\n */\n color: PropTypes.string,\n /**\n * Name.\n */\n name: PropTypes.string,\n /**\n * Value.\n */\n value: PropTypes.number,\n })\n ),\n }).isRequired,\n /**\n * Coordinates.\n */\n coordinates: PropTypes.shape({\n /**\n * xx's coordinate.\n */\n x: PropTypes.number.isRequired,\n /**\n * yy's coordinate.\n */\n y: PropTypes.number.isRequired,\n }).isRequired,\n /**\n * Defines if should use a single or multiline tooltip.\n */\n useSingle: PropTypes.bool,\n /**\n * Custom tooltip element to be displayed\n */\n tooltip: PropTypes.func,\n};\n\nMainToolTip.defaultProps = {\n useSingle: false,\n};\n\nexport default withStyles(styles, { name: \"HvChartTooltip\" })(MainToolTip);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["React","useEffect","useRef","useState","useCallback","PropTypes","withStyles","SingleTooltip","MultipleTooltip","styles","offset","MainToolTip","classes","coordinates","data","useSingle","tooltip","x","y","style","setStyle","left","top","visibility","ref","current","getBoundingClientRect","width","height","renderTooltip","CustomTooltip","title","elements","value","root","propTypes","shape","string","isRequired","arrayOf","color","name","number","bool","func","defaultProps"],"sources":["../../../../src/Chart/Tooltip/Tooltip.js"],"sourcesContent":["import React, { useEffect, useRef, useState, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport SingleTooltip from \"./SingleTooltip\";\nimport MultipleTooltip from \"./MultiTooltip\";\nimport styles from \"./styles\";\n\nconst offset = 20;\n\n/**\n * Component responsible for deciding which tooltip should be use and to calculate\n * the exact position where it should be render.\n */\nconst MainToolTip = ({ classes, coordinates, data, useSingle, tooltip }) => {\n const { x, y } = coordinates;\n const [style, setStyle] = useState({ left: x, top: y, visibility: \"hidden\" });\n const ref = useRef(null);\n\n /**\n * Calculate the position where the tooltip has to render, having in account\n * the dimensions.\n */\n useEffect(() => {\n if (!ref.current || !ref.current.getBoundingClientRect().width) return;\n\n const { width, height } = ref.current.getBoundingClientRect();\n\n setStyle({ left: x - width / 2, top: y - height - offset });\n }, [x, y]);\n\n const renderTooltip = useCallback(\n (CustomTooltip) => {\n if (CustomTooltip) return CustomTooltip(data);\n if (useSingle) return <SingleTooltip title={data.title} value={data.elements[0].value} />;\n return <MultipleTooltip data={data} />;\n },\n [data, useSingle]\n );\n\n return (\n <div ref={ref} className={classes.root} style={style}>\n {renderTooltip(tooltip)}\n </div>\n );\n};\n\nMainToolTip.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the barchart root class.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Data of the tooltip.\n */\n data: PropTypes.shape({\n /**\n * Title.\n */\n title: PropTypes.string,\n /**\n * Values of the tooltip.\n */\n elements: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * Color of the bar.\n */\n color: PropTypes.string,\n /**\n * Name.\n */\n name: PropTypes.string,\n /**\n * Value.\n */\n value: PropTypes.number,\n })\n ),\n }).isRequired,\n /**\n * Coordinates.\n */\n coordinates: PropTypes.shape({\n /**\n * xx's coordinate.\n */\n x: PropTypes.number.isRequired,\n /**\n * yy's coordinate.\n */\n y: PropTypes.number.isRequired,\n }).isRequired,\n /**\n * Defines if should use a single or multiline tooltip.\n */\n useSingle: PropTypes.bool,\n /**\n * Custom tooltip element to be displayed\n */\n tooltip: PropTypes.func,\n};\n\nMainToolTip.defaultProps = {\n useSingle: false,\n};\n\nexport default withStyles(styles, { name: \"HvChartTooltip\" })(MainToolTip);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACvE,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,eAAe,MAAM,gBAAgB;AAC5C,OAAOC,MAAM,MAAM,UAAU;AAAC;AAE9B,MAAMC,MAAM,GAAG,EAAE;;AAEjB;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,CAAC;EAAEC,OAAO;EAAEC,WAAW;EAAEC,IAAI;EAAEC,SAAS;EAAEC;AAAQ,CAAC,KAAK;EAAA;EAC1E,MAAM;IAAEC,CAAC;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wCAAAL,WAAW,CAACwB,SAAS,GAAG;EACtB;AACF;AACA;EACEvB,OAAO,EAAEP,SAAS,CAAC+B,KAAK,CAAC;IACvB;AACJ;AACA;IACIF,IAAI,EAAE7B,SAAS,CAACgC;EAClB,CAAC,CAAC,CAACC,UAAU;EACb;AACF;AACA;EACExB,IAAI,EAAET,SAAS,CAAC+B,KAAK,CAAC;IACpB;AACJ;AACA;IACIL,KAAK,EAAE1B,SAAS,CAACgC,MAAM;IACvB;AACJ;AACA;IACIL,QAAQ,EAAE3B,SAAS,CAACkC,OAAO,CACzBlC,SAAS,CAAC+B,KAAK,CAAC;MACd;AACR;AACA;MACQI,KAAK,EAAEnC,SAAS,CAACgC,MAAM;MACvB;AACR;AACA;MACQI,IAAI,EAAEpC,SAAS,CAACgC,MAAM;MACtB;AACR;AACA;MACQJ,KAAK,EAAE5B,SAAS,CAACqC;IACnB,CAAC,CAAC;EAEN,CAAC,CAAC,CAACJ,UAAU;EACb;AACF;AACA;EACEzB,WAAW,EAAER,SAAS,CAAC+B,KAAK,CAAC;IAC3B;AACJ;AACA;IACInB,CAAC,EAAEZ,SAAS,CAACqC,MAAM,CAACJ,UAAU;IAC9B;AACJ;AACA;IACIpB,CAAC,EAAEb,SAAS,CAACqC,MAAM,CAACJ;EACtB,CAAC,CAAC,CAACA,UAAU;EACb;AACF;AACA;EACEvB,SAAS,EAAEV,SAAS,CAACsC,IAAI;EACzB;AACF;AACA;EACE3B,OAAO,EAAEX,SAAS,CAACuC;AACrB,CAAC;AAEDjC,WAAW,CAACkC,YAAY,GAAG;EACzB9B,SAAS,EAAE;AACb,CAAC;AAED,eAAeT,UAAU,CAACG,MAAM,EAAE;EAAEgC,IAAI,EAAE;AAAiB,CAAC,CAAC,CAAC9B,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Chart/Tooltip/index.js"],"sourcesContent":["export { default } from \"./Tooltip\";\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Chart/Tooltip/index.js"],"sourcesContent":["export { default } from \"./Tooltip\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","root","position","zIndex","pointerEvents"],"sources":["../../../../src/Chart/Tooltip/styles.js"],"sourcesContent":["const styles = {\n root: {\n position: \"fixed\",\n zIndex: 100,\n pointerEvents: \"none\",\n },\n};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG;EACbC,IAAI,EAAE;IACJC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","root","position","zIndex","pointerEvents"],"sources":["../../../../src/Chart/Tooltip/styles.js"],"sourcesContent":["const styles = {\n root: {\n position: \"fixed\",\n zIndex: 100,\n pointerEvents: \"none\",\n },\n};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG;EACbC,IAAI,EAAE;IACJC,QAAQ,EAAE,OAAO;IACjBC,MAAM,EAAE,GAAG;IACXC,aAAa,EAAE;EACjB;AACF,CAAC;AAED,eAAeJ,MAAM"}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
|
|
3
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
4
|
import styles from "./styles";
|
|
8
|
-
|
|
9
5
|
const setterIfNil = (object, property, value) => {
|
|
10
6
|
var _object$property;
|
|
11
|
-
|
|
12
7
|
// eslint-disable-next-line no-param-reassign
|
|
13
8
|
object[property] = (_object$property = object[property]) !== null && _object$property !== void 0 ? _object$property : value;
|
|
14
9
|
};
|
|
10
|
+
|
|
15
11
|
/**
|
|
16
12
|
* Auxiliary functions to set the layout in order to follow the DS guideline.
|
|
17
13
|
*
|
|
18
14
|
*/
|
|
19
15
|
|
|
20
|
-
|
|
21
16
|
const applyLayoutYaxisDefaults = (inputLayout, layoutStyles, yAxisTitle, isHorizontal) => {
|
|
22
17
|
const layout = inputLayout;
|
|
23
18
|
setterIfNil(layout, "yaxis", {});
|
|
@@ -41,16 +36,13 @@ const applyLayoutYaxisDefaults = (inputLayout, layoutStyles, yAxisTitle, isHoriz
|
|
|
41
36
|
setterIfNil(layout.yaxis, "linecolor", layoutStyles.lineColor);
|
|
42
37
|
setterIfNil(layout.yaxis, "linewidth", 1);
|
|
43
38
|
setterIfNil(layout.yaxis, "zeroline", false);
|
|
44
|
-
|
|
45
39
|
if (yAxisTitle) {
|
|
46
40
|
setterIfNil(layout, "yaxis", {});
|
|
47
41
|
setterIfNil(layout.yaxis, "title", {});
|
|
48
42
|
setterIfNil(layout.yaxis.title, "text", yAxisTitle);
|
|
49
43
|
}
|
|
50
|
-
|
|
51
44
|
return layout;
|
|
52
45
|
};
|
|
53
|
-
|
|
54
46
|
const applyLayoutXaxisDefaults = (inputLayout, layoutStyles, xAxisTitle, isHorizontal) => {
|
|
55
47
|
const layout = inputLayout;
|
|
56
48
|
setterIfNil(layout, "xaxis", {});
|
|
@@ -74,16 +66,13 @@ const applyLayoutXaxisDefaults = (inputLayout, layoutStyles, xAxisTitle, isHoriz
|
|
|
74
66
|
setterIfNil(layout.xaxis, "linewidth", 1);
|
|
75
67
|
setterIfNil(layout.xaxis, "linecolor", layoutStyles.lineColor);
|
|
76
68
|
setterIfNil(layout.xaxis, "zeroline", false);
|
|
77
|
-
|
|
78
69
|
if (xAxisTitle) {
|
|
79
70
|
setterIfNil(layout, "xaxis", {});
|
|
80
71
|
setterIfNil(layout.xaxis, "title", {});
|
|
81
72
|
setterIfNil(layout.xaxis.title, "text", xAxisTitle);
|
|
82
73
|
}
|
|
83
|
-
|
|
84
74
|
return layout;
|
|
85
75
|
};
|
|
86
|
-
|
|
87
76
|
const applyLayoutLegendDefaults = (inputLayout, layoutStyles) => {
|
|
88
77
|
const layout = inputLayout;
|
|
89
78
|
setterIfNil(layout, "legend", {
|
|
@@ -100,7 +89,6 @@ const applyLayoutLegendDefaults = (inputLayout, layoutStyles) => {
|
|
|
100
89
|
});
|
|
101
90
|
return layout;
|
|
102
91
|
};
|
|
103
|
-
|
|
104
92
|
const applyLayoutRootDefaults = (inputLayout, layoutStyles) => {
|
|
105
93
|
const layout = inputLayout;
|
|
106
94
|
setterIfNil(layout, "colorway", Object.values(layoutStyles.defaultColors));
|
|
@@ -114,19 +102,20 @@ const applyLayoutRootDefaults = (inputLayout, layoutStyles) => {
|
|
|
114
102
|
setterIfNil(layout, "plot_bgcolor", layoutStyles.plotColor);
|
|
115
103
|
setterIfNil(layout, "paper_bgcolor", layoutStyles.plotColor);
|
|
116
104
|
};
|
|
117
|
-
|
|
118
105
|
export const applyLayoutDefaults = (inputLayout, theme, isHorizontal, xAxisTitle, yAxisTitle) => {
|
|
119
106
|
const layoutStyles = styles(theme);
|
|
107
|
+
const layout = _objectSpread({}, inputLayout);
|
|
120
108
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
applyLayoutRootDefaults(layout, layoutStyles); // Legend
|
|
109
|
+
// Layout
|
|
110
|
+
applyLayoutRootDefaults(layout, layoutStyles);
|
|
125
111
|
|
|
126
|
-
|
|
112
|
+
// Legend
|
|
113
|
+
applyLayoutLegendDefaults(layout, layoutStyles);
|
|
127
114
|
|
|
128
|
-
|
|
115
|
+
// Xaxis
|
|
116
|
+
applyLayoutXaxisDefaults(layout, layoutStyles, xAxisTitle, isHorizontal);
|
|
129
117
|
|
|
118
|
+
// Yaxis
|
|
130
119
|
applyLayoutYaxisDefaults(layout, layoutStyles, yAxisTitle, isHorizontal);
|
|
131
120
|
return layout;
|
|
132
121
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartPlotlyOverrides.js","names":["styles","setterIfNil","object","property","value","applyLayoutYaxisDefaults","inputLayout","layoutStyles","yAxisTitle","isHorizontal","layout","yaxis","title","family","vizText","fontFamily","size","fontSize","color","gridColor","lineColor","applyLayoutXaxisDefaults","xAxisTitle","xaxis","applyLayoutLegendDefaults","x","y","xanchor","yanchor","orientation","legend","legendText","applyLayoutRootDefaults","Object","values","defaultColors","l","b","t","pad","plotColor","applyLayoutDefaults","theme","applyConfigDefaults","config","responsive","displayModeBar"],"sources":["../../../src/Chart/chartPlotlyOverrides.js"],"sourcesContent":["import styles from \"./styles\";\n\nconst setterIfNil = (object, property, value) => {\n // eslint-disable-next-line no-param-reassign\n object[property] = object[property] ?? value;\n};\n\n/**\n * Auxiliary functions to set the layout in order to follow the DS guideline.\n *\n */\n\nconst applyLayoutYaxisDefaults = (inputLayout, layoutStyles, yAxisTitle, isHorizontal) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"yaxis\", {});\n\n setterIfNil(layout.yaxis, \"automargin\", true);\n\n setterIfNil(layout.yaxis, \"title\", {});\n\n setterIfNil(layout.yaxis.title, \"font\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.yaxis, \"fixedrange\", true);\n\n setterIfNil(layout.yaxis, \"ticks\", \"\");\n setterIfNil(layout.yaxis, \"tickfont\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.yaxis, \"gridcolor\", layoutStyles.gridColor);\n setterIfNil(layout.yaxis, \"showgrid\", !isHorizontal);\n setterIfNil(layout.yaxis, \"showline\", isHorizontal);\n\n setterIfNil(layout.yaxis, \"linecolor\", layoutStyles.lineColor);\n setterIfNil(layout.yaxis, \"linewidth\", 1);\n setterIfNil(layout.yaxis, \"zeroline\", false);\n\n if (yAxisTitle) {\n setterIfNil(layout, \"yaxis\", {});\n setterIfNil(layout.yaxis, \"title\", {});\n setterIfNil(layout.yaxis.title, \"text\", yAxisTitle);\n }\n\n return layout;\n};\n\nconst applyLayoutXaxisDefaults = (inputLayout, layoutStyles, xAxisTitle, isHorizontal) => {\n const layout = inputLayout;\n setterIfNil(layout, \"xaxis\", {});\n\n setterIfNil(layout.xaxis, \"automargin\", true);\n\n setterIfNil(layout.xaxis, \"title\", {});\n setterIfNil(layout.xaxis.title, \"font\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.xaxis, \"fixedrange\", true);\n\n setterIfNil(layout.xaxis, \"ticks\", \"\");\n setterIfNil(layout.xaxis, \"tickfont\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.xaxis, \"gridcolor\", layoutStyles.gridColor);\n setterIfNil(layout.xaxis, \"showgrid\", isHorizontal);\n setterIfNil(layout.xaxis, \"showline\", !isHorizontal);\n\n setterIfNil(layout.xaxis, \"linewidth\", 1);\n setterIfNil(layout.xaxis, \"linecolor\", layoutStyles.lineColor);\n setterIfNil(layout.xaxis, \"zeroline\", false);\n\n if (xAxisTitle) {\n setterIfNil(layout, \"xaxis\", {});\n setterIfNil(layout.xaxis, \"title\", {});\n setterIfNil(layout.xaxis.title, \"text\", xAxisTitle);\n }\n return layout;\n};\n\nconst applyLayoutLegendDefaults = (inputLayout, layoutStyles) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"legend\", {\n x: 0.5,\n y: 1.15,\n xanchor: \"center\",\n yanchor: \"middle\",\n orientation: \"h\",\n });\n\n setterIfNil(layout.legend, \"font\", {\n family: layoutStyles.legendText.fontFamily,\n size: layoutStyles.legendText.fontSize,\n color: layoutStyles.legendText.color,\n });\n return layout;\n};\n\nconst applyLayoutRootDefaults = (inputLayout, layoutStyles) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"colorway\", Object.values(layoutStyles.defaultColors));\n\n setterIfNil(layout, \"autosize\", true);\n\n setterIfNil(layout, \"margin\", {\n l: 50,\n b: 50,\n t: 50,\n pad: 0,\n });\n\n setterIfNil(layout, \"plot_bgcolor\", layoutStyles.plotColor);\n setterIfNil(layout, \"paper_bgcolor\", layoutStyles.plotColor);\n};\n\nexport const applyLayoutDefaults = (inputLayout, theme, isHorizontal, xAxisTitle, yAxisTitle) => {\n const layoutStyles = styles(theme);\n const layout = { ...inputLayout };\n\n // Layout\n applyLayoutRootDefaults(layout, layoutStyles);\n\n // Legend\n applyLayoutLegendDefaults(layout, layoutStyles);\n\n // Xaxis\n applyLayoutXaxisDefaults(layout, layoutStyles, xAxisTitle, isHorizontal);\n\n // Yaxis\n applyLayoutYaxisDefaults(layout, layoutStyles, yAxisTitle, isHorizontal);\n\n return layout;\n};\n\nexport const applyConfigDefaults = (config) => ({\n responsive: true,\n displayModeBar: false,\n ...config,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"chartPlotlyOverrides.js","names":["styles","setterIfNil","object","property","value","applyLayoutYaxisDefaults","inputLayout","layoutStyles","yAxisTitle","isHorizontal","layout","yaxis","title","family","vizText","fontFamily","size","fontSize","color","gridColor","lineColor","applyLayoutXaxisDefaults","xAxisTitle","xaxis","applyLayoutLegendDefaults","x","y","xanchor","yanchor","orientation","legend","legendText","applyLayoutRootDefaults","Object","values","defaultColors","l","b","t","pad","plotColor","applyLayoutDefaults","theme","applyConfigDefaults","config","responsive","displayModeBar"],"sources":["../../../src/Chart/chartPlotlyOverrides.js"],"sourcesContent":["import styles from \"./styles\";\n\nconst setterIfNil = (object, property, value) => {\n // eslint-disable-next-line no-param-reassign\n object[property] = object[property] ?? value;\n};\n\n/**\n * Auxiliary functions to set the layout in order to follow the DS guideline.\n *\n */\n\nconst applyLayoutYaxisDefaults = (inputLayout, layoutStyles, yAxisTitle, isHorizontal) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"yaxis\", {});\n\n setterIfNil(layout.yaxis, \"automargin\", true);\n\n setterIfNil(layout.yaxis, \"title\", {});\n\n setterIfNil(layout.yaxis.title, \"font\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.yaxis, \"fixedrange\", true);\n\n setterIfNil(layout.yaxis, \"ticks\", \"\");\n setterIfNil(layout.yaxis, \"tickfont\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.yaxis, \"gridcolor\", layoutStyles.gridColor);\n setterIfNil(layout.yaxis, \"showgrid\", !isHorizontal);\n setterIfNil(layout.yaxis, \"showline\", isHorizontal);\n\n setterIfNil(layout.yaxis, \"linecolor\", layoutStyles.lineColor);\n setterIfNil(layout.yaxis, \"linewidth\", 1);\n setterIfNil(layout.yaxis, \"zeroline\", false);\n\n if (yAxisTitle) {\n setterIfNil(layout, \"yaxis\", {});\n setterIfNil(layout.yaxis, \"title\", {});\n setterIfNil(layout.yaxis.title, \"text\", yAxisTitle);\n }\n\n return layout;\n};\n\nconst applyLayoutXaxisDefaults = (inputLayout, layoutStyles, xAxisTitle, isHorizontal) => {\n const layout = inputLayout;\n setterIfNil(layout, \"xaxis\", {});\n\n setterIfNil(layout.xaxis, \"automargin\", true);\n\n setterIfNil(layout.xaxis, \"title\", {});\n setterIfNil(layout.xaxis.title, \"font\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.xaxis, \"fixedrange\", true);\n\n setterIfNil(layout.xaxis, \"ticks\", \"\");\n setterIfNil(layout.xaxis, \"tickfont\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.xaxis, \"gridcolor\", layoutStyles.gridColor);\n setterIfNil(layout.xaxis, \"showgrid\", isHorizontal);\n setterIfNil(layout.xaxis, \"showline\", !isHorizontal);\n\n setterIfNil(layout.xaxis, \"linewidth\", 1);\n setterIfNil(layout.xaxis, \"linecolor\", layoutStyles.lineColor);\n setterIfNil(layout.xaxis, \"zeroline\", false);\n\n if (xAxisTitle) {\n setterIfNil(layout, \"xaxis\", {});\n setterIfNil(layout.xaxis, \"title\", {});\n setterIfNil(layout.xaxis.title, \"text\", xAxisTitle);\n }\n return layout;\n};\n\nconst applyLayoutLegendDefaults = (inputLayout, layoutStyles) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"legend\", {\n x: 0.5,\n y: 1.15,\n xanchor: \"center\",\n yanchor: \"middle\",\n orientation: \"h\",\n });\n\n setterIfNil(layout.legend, \"font\", {\n family: layoutStyles.legendText.fontFamily,\n size: layoutStyles.legendText.fontSize,\n color: layoutStyles.legendText.color,\n });\n return layout;\n};\n\nconst applyLayoutRootDefaults = (inputLayout, layoutStyles) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"colorway\", Object.values(layoutStyles.defaultColors));\n\n setterIfNil(layout, \"autosize\", true);\n\n setterIfNil(layout, \"margin\", {\n l: 50,\n b: 50,\n t: 50,\n pad: 0,\n });\n\n setterIfNil(layout, \"plot_bgcolor\", layoutStyles.plotColor);\n setterIfNil(layout, \"paper_bgcolor\", layoutStyles.plotColor);\n};\n\nexport const applyLayoutDefaults = (inputLayout, theme, isHorizontal, xAxisTitle, yAxisTitle) => {\n const layoutStyles = styles(theme);\n const layout = { ...inputLayout };\n\n // Layout\n applyLayoutRootDefaults(layout, layoutStyles);\n\n // Legend\n applyLayoutLegendDefaults(layout, layoutStyles);\n\n // Xaxis\n applyLayoutXaxisDefaults(layout, layoutStyles, xAxisTitle, isHorizontal);\n\n // Yaxis\n applyLayoutYaxisDefaults(layout, layoutStyles, yAxisTitle, isHorizontal);\n\n return layout;\n};\n\nexport const applyConfigDefaults = (config) => ({\n responsive: true,\n displayModeBar: false,\n ...config,\n});\n"],"mappings":";;;AAAA,OAAOA,MAAM,MAAM,UAAU;AAE7B,MAAMC,WAAW,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,KAAK;EAAA;EAC/C;EACAF,MAAM,CAACC,QAAQ,CAAC,uBAAGD,MAAM,CAACC,QAAQ,CAAC,+DAAIC,KAAK;AAC9C,CAAC;;AAED;AACA;AACA;AACA;;AAEA,MAAMC,wBAAwB,GAAG,CAACC,WAAW,EAAEC,YAAY,EAAEC,UAAU,EAAEC,YAAY,KAAK;EACxF,MAAMC,MAAM,GAAGJ,WAAW;EAE1BL,WAAW,CAACS,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;EAEhCT,WAAW,CAACS,MAAM,CAACC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC;EAE7CV,WAAW,CAACS,MAAM,CAACC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;EAEtCV,WAAW,CAACS,MAAM,CAACC,KAAK,CAACC,KAAK,EAAE,MAAM,EAAE;IACtCC,MAAM,EAAEN,YAAY,CAACO,OAAO,CAACC,UAAU;IACvCC,IAAI,EAAET,YAAY,CAACO,OAAO,CAACG,QAAQ;IACnCC,KAAK,EAAEX,YAAY,CAACO,OAAO,CAACI;EAC9B,CAAC,CAAC;EAEFjB,WAAW,CAACS,MAAM,CAACC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC;EAE7CV,WAAW,CAACS,MAAM,CAACC,KAAK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CAACiC,SAAS,CAAC;AAC9D,CAAC;AAED,OAAO,MAAMC,mBAAmB,GAAG,CAACnC,WAAW,EAAEoC,KAAK,EAAEjC,YAAY,EAAEa,UAAU,EAAEd,UAAU,KAAK;EAC/F,MAAMD,YAAY,GAAGP,MAAM,CAAC0C,KAAK,CAAC;EAClC,MAAMhC,MAAM,qBAAQJ,WAAW,CAAE;;EAEjC;EACA0B,uBAAuB,CAACtB,MAAM,EAAEH,YAAY,CAAC;;EAE7C;EACAiB,yBAAyB,CAACd,MAAM,EAAEH,YAAY,CAAC;;EAE/C;EACAc,wBAAwB,CAACX,MAAM,EAAEH,YAAY,EAAEe,UAAU,EAAEb,YAAY,CAAC;;EAExE;EACAJ,wBAAwB,CAACK,MAAM,EAAEH,YAAY,EAAEC,UAAU,EAAEC,YAAY,CAAC;EAExE,OAAOC,MAAM;AACf,CAAC;AAED,OAAO,MAAMiC,mBAAmB,GAAIC,MAAM;EACxCC,UAAU,EAAE,IAAI;EAChBC,cAAc,EAAE;AAAK,GAClBF,MAAM,CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Chart/index.js"],"sourcesContent":["export { default } from \"./Chart\";\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Chart/index.js"],"sourcesContent":["export { default } from \"./Chart\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,SAAS"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
|
|
3
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
4
|
const styles = theme => ({
|
|
8
5
|
root: {
|
|
9
6
|
padding: 0
|
|
@@ -18,6 +15,5 @@ const styles = theme => ({
|
|
|
18
15
|
gridColor: theme.hv.palette.atmosphere.atmo4,
|
|
19
16
|
plotColor: "transparent"
|
|
20
17
|
});
|
|
21
|
-
|
|
22
18
|
export default styles;
|
|
23
19
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","defaultColors","hv","viz","palette","categorical","vizText","typography","fontFamily","fontSize","legendText","normalText","lineColor","atmosphere","atmo4","gridColor","plotColor"],"sources":["../../../src/Chart/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: 0,\n },\n defaultColors: {\n ...theme.hv.viz.palette.categorical,\n },\n vizText: {\n ...theme.hv.typography.vizText,\n fontFamily: theme.hv.typography.fontFamily,\n fontSize: 10,\n },\n legendText: {\n ...theme.hv.typography.normalText,\n },\n lineColor: theme.hv.palette.atmosphere.atmo4,\n gridColor: theme.hv.palette.atmosphere.atmo4,\n plotColor: \"transparent\",\n});\n\nexport default styles;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","defaultColors","hv","viz","palette","categorical","vizText","typography","fontFamily","fontSize","legendText","normalText","lineColor","atmosphere","atmo4","gridColor","plotColor"],"sources":["../../../src/Chart/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: 0,\n },\n defaultColors: {\n ...theme.hv.viz.palette.categorical,\n },\n vizText: {\n ...theme.hv.typography.vizText,\n fontFamily: theme.hv.typography.fontFamily,\n fontSize: 10,\n },\n legendText: {\n ...theme.hv.typography.normalText,\n },\n lineColor: theme.hv.palette.atmosphere.atmo4,\n gridColor: theme.hv.palette.atmosphere.atmo4,\n plotColor: \"transparent\",\n});\n\nexport default styles;\n"],"mappings":";;;AAAA,MAAMA,MAAM,GAAIC,KAAK,KAAM;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE;EACX,CAAC;EACDC,aAAa,oBACRH,KAAK,CAACI,EAAE,CAACC,GAAG,CAACC,OAAO,CAACC,WAAW,CACpC;EACDC,OAAO,kCACFR,KAAK,CAACI,EAAE,CAACK,UAAU,CAACD,OAAO;IAC9BE,UAAU,EAAEV,KAAK,CAACI,EAAE,CAACK,UAAU,CAACC,UAAU;IAC1CC,QAAQ,EAAE;EAAE,EACb;EACDC,UAAU,oBACLZ,KAAK,CAACI,EAAE,CAACK,UAAU,CAACI,UAAU,CAClC;EACDC,SAAS,EAAEd,KAAK,CAACI,EAAE,CAACE,OAAO,CAACS,UAAU,CAACC,KAAK;EAC5CC,SAAS,EAAEjB,KAAK,CAACI,EAAE,CAACE,OAAO,CAACS,UAAU,CAACC,KAAK;EAC5CE,SAAS,EAAE;AACb,CAAC,CAAC;AAEF,eAAenB,MAAM"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
const _excluded = ["id", "classes", "data", "layout", "config", "tooltip", "deltaMatrix"];
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
import React, { useMemo } from "react";
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import { withStyles } from "@mui/styles";
|
|
9
|
+
import { useTheme } from "@mui/material/styles";
|
|
10
|
+
import Chart from "../Chart";
|
|
11
|
+
import CustomTooltip from "./CustomTooltip";
|
|
12
|
+
import { applyDataDefaults, applyLayoutDefaults } from "./confusionMatrixPlotlyOverrides";
|
|
13
|
+
import styles from "./styles";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
const ConfusionMatrix = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
id,
|
|
18
|
+
classes,
|
|
19
|
+
data,
|
|
20
|
+
layout,
|
|
21
|
+
config,
|
|
22
|
+
tooltip,
|
|
23
|
+
deltaMatrix
|
|
24
|
+
} = _ref,
|
|
25
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
const theme = useTheme();
|
|
27
|
+
const dataWithDefaults = useMemo(() => applyDataDefaults(data, theme, deltaMatrix), [data, theme, deltaMatrix]);
|
|
28
|
+
const layoutWithDefaults = useMemo(() => applyLayoutDefaults(layout, theme, dataWithDefaults, deltaMatrix), [layout, theme, dataWithDefaults, deltaMatrix]);
|
|
29
|
+
return /*#__PURE__*/_jsx(Chart, _objectSpread({
|
|
30
|
+
id: id,
|
|
31
|
+
classes: classes,
|
|
32
|
+
data: dataWithDefaults,
|
|
33
|
+
layout: layoutWithDefaults,
|
|
34
|
+
config: config,
|
|
35
|
+
tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : tooltipData => /*#__PURE__*/_jsx(CustomTooltip, {
|
|
36
|
+
data: tooltipData,
|
|
37
|
+
deltaMatrix: !!deltaMatrix
|
|
38
|
+
})
|
|
39
|
+
}, others));
|
|
40
|
+
};
|
|
41
|
+
process.env.NODE_ENV !== "production" ? ConfusionMatrix.propTypes = {
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
id: PropTypes.string,
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
classes: PropTypes.shape({
|
|
50
|
+
root: PropTypes.string
|
|
51
|
+
}),
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
*/
|
|
59
|
+
layout: PropTypes.instanceOf(Object),
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
config: PropTypes.instanceOf(Object),
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
tooltip: PropTypes.func,
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
deltaMatrix: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))
|
|
72
|
+
} : void 0;
|
|
73
|
+
export default withStyles(styles, {
|
|
74
|
+
name: "HvConfusionMatrix"
|
|
75
|
+
})(ConfusionMatrix);
|
|
76
|
+
//# sourceMappingURL=ConfusionMatrix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfusionMatrix.js","names":["React","useMemo","PropTypes","withStyles","useTheme","Chart","CustomTooltip","applyDataDefaults","applyLayoutDefaults","styles","ConfusionMatrix","id","classes","data","layout","config","tooltip","deltaMatrix","others","theme","dataWithDefaults","layoutWithDefaults","tooltipData","propTypes","string","shape","root","arrayOf","instanceOf","Object","isRequired","func","number","name"],"sources":["../../../src/ConfusionMatrix/ConfusionMatrix.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport { useTheme } from \"@mui/material/styles\";\nimport Chart from \"../Chart\";\nimport CustomTooltip from \"./CustomTooltip\";\nimport { applyDataDefaults, applyLayoutDefaults } from \"./confusionMatrixPlotlyOverrides\";\nimport styles from \"./styles\";\n\nconst ConfusionMatrix = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltip,\n deltaMatrix,\n ...others\n}) => {\n const theme = useTheme();\n const dataWithDefaults = useMemo(\n () => applyDataDefaults(data, theme, deltaMatrix),\n [data, theme, deltaMatrix]\n );\n const layoutWithDefaults = useMemo(\n () => applyLayoutDefaults(layout, theme, dataWithDefaults, deltaMatrix),\n [layout, theme, dataWithDefaults, deltaMatrix]\n );\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={dataWithDefaults}\n layout={layoutWithDefaults}\n config={config}\n tooltip={\n tooltip ??\n ((tooltipData) => <CustomTooltip data={tooltipData} deltaMatrix={!!deltaMatrix} />)\n }\n {...others}\n />\n );\n};\n\nConfusionMatrix.propTypes = {\n /**\n *\n */\n id: PropTypes.string,\n /**\n *\n */\n classes: PropTypes.shape({\n root: PropTypes.string,\n }),\n /**\n *\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n *\n */\n layout: PropTypes.instanceOf(Object),\n /**\n *\n */\n config: PropTypes.instanceOf(Object),\n /**\n *\n */\n tooltip: PropTypes.func,\n /**\n *\n */\n deltaMatrix: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)),\n};\n\nexport default withStyles(styles, { name: \"HvConfusionMatrix\" })(ConfusionMatrix);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,OAAOC,KAAK,MAAM,UAAU;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AAEX,SAAS,CAACyB,OAAO,CAACzB,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC,CAAC,CAACC,UAAU;EAChE;AACF;AACA;EACEhB,MAAM,EAAEZ,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACEd,MAAM,EAAEb,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACEb,OAAO,EAAEd,SAAS,CAAC6B,IAAI;EACvB;AACF;AACA;EACEd,WAAW,EAAEf,SAAS,CAACyB,OAAO,CAACzB,SAAS,CAACyB,OAAO,CAACzB,SAAS,CAAC8B,MAAM,CAAC;AACpE,CAAC;AAED,eAAe7B,UAAU,CAACM,MAAM,EAAE;EAAEwB,IAAI,EAAE;AAAoB,CAAC,CAAC,CAACvB,eAAe,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { HvTypography } from "@hitachivantara/uikit-react-core";
|
|
4
|
+
import useStyles from "./styles";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const CustomTooltip = ({
|
|
7
|
+
data,
|
|
8
|
+
deltaMatrix
|
|
9
|
+
}) => {
|
|
10
|
+
const classes = useStyles();
|
|
11
|
+
const [element] = data.elements;
|
|
12
|
+
const value = deltaMatrix && data.title !== element.value ? 0 - element.zValue : element.zValue;
|
|
13
|
+
const oneLiner = `${data.title} - ${element.value}: ${value}`;
|
|
14
|
+
return /*#__PURE__*/_jsx("div", {
|
|
15
|
+
className: classes.root,
|
|
16
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
17
|
+
className: classes.container,
|
|
18
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
19
|
+
children: /*#__PURE__*/_jsx(HvTypography, {
|
|
20
|
+
children: oneLiner
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
process.env.NODE_ENV !== "production" ? CustomTooltip.propTypes = {
|
|
27
|
+
data: PropTypes.shape({
|
|
28
|
+
title: PropTypes.string,
|
|
29
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
30
|
+
value: PropTypes.string,
|
|
31
|
+
zValue: PropTypes.number
|
|
32
|
+
}))
|
|
33
|
+
}),
|
|
34
|
+
deltaMatrix: PropTypes.bool
|
|
35
|
+
} : void 0;
|
|
36
|
+
export default CustomTooltip;
|
|
37
|
+
//# sourceMappingURL=CustomTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTooltip.js","names":["React","PropTypes","HvTypography","useStyles","CustomTooltip","data","deltaMatrix","classes","element","elements","value","title","zValue","oneLiner","root","container","propTypes","shape","string","arrayOf","number","bool"],"sources":["../../../../src/ConfusionMatrix/CustomTooltip/CustomTooltip.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { HvTypography } from \"@hitachivantara/uikit-react-core\";\n\nimport useStyles from \"./styles\";\n\nconst CustomTooltip = ({ data, deltaMatrix }) => {\n const classes = useStyles();\n const [element] = data.elements;\n const value = deltaMatrix && data.title !== element.value ? 0 - element.zValue : element.zValue;\n const oneLiner = `${data.title} - ${element.value}: ${value}`;\n return (\n <div className={classes.root}>\n <div className={classes.container}>\n <div>\n <HvTypography>{oneLiner}</HvTypography>\n </div>\n </div>\n </div>\n );\n};\n\nCustomTooltip.propTypes = {\n data: PropTypes.shape({\n title: PropTypes.string,\n elements: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.string,\n zValue: PropTypes.number,\n })\n ),\n }),\n deltaMatrix: PropTypes.bool,\n};\n\nexport default CustomTooltip;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,kCAAkC;AAE/D,OAAOC,SAAS,MAAM,UAAU;AAAC;AAEjC,MAAMC,aAAa,GAAG,CAAC;EAAEC,IAAI;EAAEC;AAAY,CAAC,KAAK;EAC/C,MAAMC,OAAO,GAAGJ,SAAS,EAAE;EAC3B,MAAM,CAACK,OAAO,CAAC,GAAGH,IAAI,CAACI,QAAQ;EAC/B,MAAMC,KAAK,GAAGJ,WAAW,IAAID,IAAI,CAACM,KAAK,KAAKH,OAAO,CAACE,KAAK,GAAG,CAAC,GAAGF,OAAO,CAACI,MAAM,GAAGJ,OAAO,CAACI,MAAM;EAC/F,MAAMC,QAAQ,GAAI,GAAER,IAAI,CAACM,KAAM,MAAKH,OAAO,CAACE,KAAM,KAAIA,KAAM,EAAC;EAC7D,oBACE;IAAK,SAAS,EAAEH,OAAO,CAACO,IAAK;IAAA,uBAC3B;MAAK,SAAS,EAAEP,OAAO,CAACQ,SAAU;MAAA,uBAChC;QAAA,uBACE,KAAC,YAAY;UAAA,UAAEF;QAAQ;MAAgB;IACnC;EACF,EACF;AAEV,CAAC;AAED,wCAAAT,aAAa,CAACY,SAAS,GAAG;EACxBX,IAAI,EAAEJ,SAAS,CAACgB,KAAK,CAAC;IACpBN,KAAK,EAAEV,SAAS,CAACiB,MAAM;IACvBT,QAAQ,EAAER,SAAS,CAACkB,OAAO,CACzBlB,SAAS,CAACgB,KAAK,CAAC;MACdP,KAAK,EAAET,SAAS,CAACiB,MAAM;MACvBN,MAAM,EAAEX,SAAS,CAACmB;IACpB,CAAC,CAAC;EAEN,CAAC,CAAC;EACFd,WAAW,EAAEL,SAAS,CAACoB;AACzB,CAAC;AAED,eAAejB,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/ConfusionMatrix/CustomTooltip/index.js"],"sourcesContent":["export { default } from \"./CustomTooltip\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,iBAAiB"}
|