@hitachivantara/uikit-react-viz 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +28 -75
- package/dist/Chart/Chart.js.map +1 -1
- package/dist/Chart/Plot/Plot.js +10 -47
- 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/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.js +0 -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 +28 -46
- package/dist/legacy/Chart/Chart.js.map +1 -1
- package/dist/legacy/Chart/Plot/Plot.js +10 -21
- 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/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.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 +17 -33
- package/dist/modern/Chart/Chart.js.map +1 -1
- package/dist/modern/Chart/Plot/Plot.js +11 -22
- 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/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.js.map +1 -1
- package/package.json +3 -3
package/dist/Chart/Chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.js","names":["Chart","id","classes","data","layout","config","tooltipType","tooltip","afterPlot","xAxisTitle","yAxisTitle","others","theme","useTheme","isHorizontal","useMemo","isNil","orientation","toUpperCase","chartLayout","applyLayoutDefaults","chartConfig","applyConfigDefaults","useSingle","useState","isHover","setIsHover","x","y","coordinates","setCoordinates","dataTooltip","setDataTooltip","onHover","useCallback","event","points","dataFromPoints","title","elements","forEach","p","i","fData","fullData","pNumber","pointNumber","name","push","color","marker","line","labels","value","onUnHover","onMouseMove","clientX","clientY","root","propTypes","PropTypes","string","shape","arrayOf","instanceOf","Object","isRequired","oneOf","func","subtitle","withStyles","styles"],"sources":["../../src/Chart/Chart.js"],"sourcesContent":["import React, { useState, useMemo, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport isNil from \"lodash/isNil\";\nimport { withStyles, useTheme } from \"@mui/styles\";\n\nimport Tooltip from \"./Tooltip\";\nimport { applyLayoutDefaults, applyConfigDefaults } from \"./chartPlotlyOverrides\";\n\nimport Plot from \"./Plot\";\nimport styles from \"./styles\";\n\nconst Chart = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltipType = \"multiple\",\n tooltip,\n afterPlot,\n xAxisTitle,\n yAxisTitle,\n ...others\n}) => {\n const theme = useTheme();\n\n /* Values derived from props */\n\n // Check if the barchart is horizontal or vertical.\n const isHorizontal = useMemo(\n () => (!isNil(data[0]?.orientation) ? data[0].orientation.toUpperCase() === \"H\" : false),\n [data]\n );\n\n const chartLayout = useMemo(\n () => applyLayoutDefaults(layout, theme, isHorizontal, xAxisTitle, yAxisTitle),\n [isHorizontal, layout, theme, xAxisTitle, yAxisTitle]\n );\n\n const chartConfig = useMemo(() => applyConfigDefaults(config), [config]);\n\n const useSingle = tooltipType === \"single\";\n\n /* State */\n\n const [isHover, setIsHover] = useState(false);\n const [coordinates, setCoordinates] = useState({ x: 0, y: 0 });\n const [dataTooltip, setDataTooltip] = useState();\n\n /* Callbacks */\n\n // Extract data from the plotly onHover event to be used to create the tooltip.\n const onHover = useCallback(\n (event) => {\n const { points } = event;\n\n const dataFromPoints = {\n title: \"\",\n elements: [],\n };\n\n points.forEach((p, i) => {\n const fData = p.fullData;\n const pNumber = p.pointNumber;\n\n if (i === 0) dataFromPoints.title = isHorizontal ? p.y : p.x || fData.name;\n\n dataFromPoints.elements.push({\n color: fData.marker?.color || fData.line?.color || p.color,\n name: fData.labels?.[pNumber] || fData.name,\n value: isHorizontal ? p.x : p.y || p.value,\n });\n });\n\n setDataTooltip(dataFromPoints);\n setIsHover(true);\n },\n [isHorizontal]\n );\n\n const onUnHover = useCallback(() => {\n setIsHover(false);\n }, []);\n\n const onMouseMove = useCallback((event) => {\n setCoordinates({\n x: event.clientX,\n y: event.clientY,\n });\n }, []);\n\n return (\n <>\n {isHover && (\n <Tooltip\n coordinates={coordinates}\n data={dataTooltip}\n useSingle={useSingle}\n tooltip={tooltip}\n />\n )}\n <div id={id} className={classes.root}>\n <div onMouseMove={onMouseMove}>\n <Plot\n data={data}\n layout={chartLayout}\n config={chartConfig}\n onHover={onHover}\n onUnHover={onUnHover}\n afterPlot={afterPlot}\n {...others}\n />\n </div>\n </div>\n </>\n );\n};\n\nChart.propTypes = {\n /**\n * An Id passed on to the component\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n root: PropTypes.string,\n }),\n\n /**\n * Plotly data object (see https://plot.ly/javascript/reference/).\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object (see https://plot.ly/javascript/reference/#layout).\n */\n layout: PropTypes.instanceOf(Object).isRequired,\n /**\n * Plotly config object (see https://plot.ly/javascript/configuration-options/).\n */\n config: PropTypes.instanceOf(Object),\n /**\n * Defines if should use a single or multiline tooltip.\n */\n tooltipType: PropTypes.oneOf([\"single\", \"multiple\"]),\n /**\n * Custom tooltip element to be displayed\n */\n tooltip: PropTypes.func,\n /**\n * Function to be called after plot render.\n */\n afterPlot: PropTypes.func,\n /**\n * Defines the X axis title.\n */\n xAxisTitle: PropTypes.string,\n /**\n * Defines the Y axis title.\n */\n yAxisTitle: PropTypes.string,\n /**\n * Defines the chart subtitle.\n */\n subtitle: PropTypes.string,\n};\n\nexport default withStyles(styles, { name: \"HvChart\" })(Chart);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chart.js","names":["Chart","id","classes","data","layout","config","tooltipType","tooltip","afterPlot","xAxisTitle","yAxisTitle","others","theme","useTheme","isHorizontal","useMemo","isNil","orientation","toUpperCase","chartLayout","applyLayoutDefaults","chartConfig","applyConfigDefaults","useSingle","useState","isHover","setIsHover","x","y","coordinates","setCoordinates","dataTooltip","setDataTooltip","onHover","useCallback","event","points","dataFromPoints","title","elements","forEach","p","i","fData","fullData","pNumber","pointNumber","name","push","color","marker","line","labels","value","onUnHover","onMouseMove","clientX","clientY","root","propTypes","PropTypes","string","shape","arrayOf","instanceOf","Object","isRequired","oneOf","func","subtitle","withStyles","styles"],"sources":["../../src/Chart/Chart.js"],"sourcesContent":["import React, { useState, useMemo, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport isNil from \"lodash/isNil\";\nimport { withStyles, useTheme } from \"@mui/styles\";\n\nimport Tooltip from \"./Tooltip\";\nimport { applyLayoutDefaults, applyConfigDefaults } from \"./chartPlotlyOverrides\";\n\nimport Plot from \"./Plot\";\nimport styles from \"./styles\";\n\nconst Chart = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltipType = \"multiple\",\n tooltip,\n afterPlot,\n xAxisTitle,\n yAxisTitle,\n ...others\n}) => {\n const theme = useTheme();\n\n /* Values derived from props */\n\n // Check if the barchart is horizontal or vertical.\n const isHorizontal = useMemo(\n () => (!isNil(data[0]?.orientation) ? data[0].orientation.toUpperCase() === \"H\" : false),\n [data]\n );\n\n const chartLayout = useMemo(\n () => applyLayoutDefaults(layout, theme, isHorizontal, xAxisTitle, yAxisTitle),\n [isHorizontal, layout, theme, xAxisTitle, yAxisTitle]\n );\n\n const chartConfig = useMemo(() => applyConfigDefaults(config), [config]);\n\n const useSingle = tooltipType === \"single\";\n\n /* State */\n\n const [isHover, setIsHover] = useState(false);\n const [coordinates, setCoordinates] = useState({ x: 0, y: 0 });\n const [dataTooltip, setDataTooltip] = useState();\n\n /* Callbacks */\n\n // Extract data from the plotly onHover event to be used to create the tooltip.\n const onHover = useCallback(\n (event) => {\n const { points } = event;\n\n const dataFromPoints = {\n title: \"\",\n elements: [],\n };\n\n points.forEach((p, i) => {\n const fData = p.fullData;\n const pNumber = p.pointNumber;\n\n if (i === 0) dataFromPoints.title = isHorizontal ? p.y : p.x || fData.name;\n\n dataFromPoints.elements.push({\n color: fData.marker?.color || fData.line?.color || p.color,\n name: fData.labels?.[pNumber] || fData.name,\n value: isHorizontal ? p.x : p.y || p.value,\n });\n });\n\n setDataTooltip(dataFromPoints);\n setIsHover(true);\n },\n [isHorizontal]\n );\n\n const onUnHover = useCallback(() => {\n setIsHover(false);\n }, []);\n\n const onMouseMove = useCallback((event) => {\n setCoordinates({\n x: event.clientX,\n y: event.clientY,\n });\n }, []);\n\n return (\n <>\n {isHover && (\n <Tooltip\n coordinates={coordinates}\n data={dataTooltip}\n useSingle={useSingle}\n tooltip={tooltip}\n />\n )}\n <div id={id} className={classes.root}>\n <div onMouseMove={onMouseMove}>\n <Plot\n data={data}\n layout={chartLayout}\n config={chartConfig}\n onHover={onHover}\n onUnHover={onUnHover}\n afterPlot={afterPlot}\n {...others}\n />\n </div>\n </div>\n </>\n );\n};\n\nChart.propTypes = {\n /**\n * An Id passed on to the component\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n root: PropTypes.string,\n }),\n\n /**\n * Plotly data object (see https://plot.ly/javascript/reference/).\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object (see https://plot.ly/javascript/reference/#layout).\n */\n layout: PropTypes.instanceOf(Object).isRequired,\n /**\n * Plotly config object (see https://plot.ly/javascript/configuration-options/).\n */\n config: PropTypes.instanceOf(Object),\n /**\n * Defines if should use a single or multiline tooltip.\n */\n tooltipType: PropTypes.oneOf([\"single\", \"multiple\"]),\n /**\n * Custom tooltip element to be displayed\n */\n tooltip: PropTypes.func,\n /**\n * Function to be called after plot render.\n */\n afterPlot: PropTypes.func,\n /**\n * Defines the X axis title.\n */\n xAxisTitle: PropTypes.string,\n /**\n * Defines the Y axis title.\n */\n yAxisTitle: PropTypes.string,\n /**\n * Defines the chart subtitle.\n */\n subtitle: PropTypes.string,\n};\n\nexport default withStyles(styles, { name: \"HvChart\" })(Chart);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAE9B,IAAMA,KAAK,GAAG,SAARA,KAAK,OAYL;EAAA,IAXJC,EAAE,QAAFA,EAAE;IACFC,OAAO,QAAPA,OAAO;IACPC,IAAI,QAAJA,IAAI;IACJC,MAAM,QAANA,MAAM;IACNC,MAAM,QAANA,MAAM;IAAA,wBACNC,WAAW;IAAXA,WAAW,iCAAG,UAAU;IACxBC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IACTC,UAAU,QAAVA,UAAU;I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EAC5B;AACF;AACA;EACEnD,UAAU,EAAEkD,kBAAS,CAACC,MAAM;EAC5B;AACF;AACA;EACEQ,QAAQ,EAAET,kBAAS,CAACC;AACtB,CAAC;AAAC,eAEa,IAAAS,kBAAU,EAACC,gBAAM,EAAE;EAAExB,IAAI,EAAE;AAAU,CAAC,CAAC,CAAC/C,KAAK,CAAC;AAAA"}
|
package/dist/Chart/Plot/Plot.js
CHANGED
|
@@ -1,85 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.keys.js");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.symbol.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.array.filter.js");
|
|
8
|
-
|
|
9
6
|
require("core-js/modules/es.object.to-string.js");
|
|
10
|
-
|
|
11
7
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
12
|
-
|
|
13
8
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
14
|
-
|
|
15
9
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
16
|
-
|
|
17
10
|
require("core-js/modules/es.array.iterator.js");
|
|
18
|
-
|
|
19
11
|
require("core-js/modules/es.string.iterator.js");
|
|
20
|
-
|
|
21
12
|
require("core-js/modules/es.weak-map.js");
|
|
22
|
-
|
|
23
13
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
24
|
-
|
|
25
14
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
26
|
-
|
|
27
15
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
28
|
-
|
|
29
16
|
Object.defineProperty(exports, "__esModule", {
|
|
30
17
|
value: true
|
|
31
18
|
});
|
|
32
19
|
exports.default = void 0;
|
|
33
|
-
|
|
34
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
35
|
-
|
|
36
21
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
37
|
-
|
|
38
22
|
var _react = _interopRequireWildcard(require("react"));
|
|
39
|
-
|
|
40
23
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
41
|
-
|
|
42
24
|
var _plotly = _interopRequireDefault(require("plotly.js-basic-dist"));
|
|
43
|
-
|
|
44
25
|
var _factory = _interopRequireDefault(require("react-plotly.js/factory"));
|
|
45
|
-
|
|
46
26
|
var _styles = require("@mui/styles");
|
|
47
|
-
|
|
48
27
|
var _styles2 = _interopRequireDefault(require("./styles"));
|
|
49
|
-
|
|
50
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
51
|
-
|
|
52
29
|
var _excluded = ["data", "layout", "config", "revision", "onHover", "onUnHover", "afterPlot"];
|
|
53
|
-
|
|
54
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
55
|
-
|
|
56
31
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
57
|
-
|
|
58
32
|
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; }
|
|
59
|
-
|
|
60
33
|
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) { (0, _defineProperty2.default)(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; }
|
|
61
|
-
|
|
62
34
|
var PlotGraph = (0, _factory.default)(_plotly.default);
|
|
63
35
|
var plotGraphStyle = {
|
|
64
36
|
position: "relative"
|
|
65
37
|
};
|
|
66
|
-
|
|
67
38
|
var Plot = function Plot(_ref) {
|
|
68
39
|
var data = _ref.data,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
40
|
+
layout = _ref.layout,
|
|
41
|
+
config = _ref.config,
|
|
42
|
+
_ref$revision = _ref.revision,
|
|
43
|
+
revision = _ref$revision === void 0 ? 0 : _ref$revision,
|
|
44
|
+
onHover = _ref.onHover,
|
|
45
|
+
onUnHover = _ref.onUnHover,
|
|
46
|
+
afterPlot = _ref.afterPlot,
|
|
47
|
+
others = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
77
48
|
var ref = (0, _react.useRef)(null);
|
|
49
|
+
|
|
78
50
|
/* Callbacks */
|
|
79
51
|
|
|
80
52
|
var afterPlotInternal = (0, _react.useCallback)(function () {
|
|
81
53
|
afterPlot === null || afterPlot === void 0 ? void 0 : afterPlot(ref);
|
|
82
54
|
}, [afterPlot]);
|
|
55
|
+
|
|
83
56
|
/* Effects */
|
|
84
57
|
|
|
85
58
|
/**
|
|
@@ -87,7 +60,6 @@ var Plot = function Plot(_ref) {
|
|
|
87
60
|
* (https://github.com/plotly/react-plotly.js/blob/bd15ca98be12b159633fb57c4ea762cb7a64c3a7/src/factory.js#L88)
|
|
88
61
|
*/
|
|
89
62
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
90
|
-
|
|
91
63
|
(0, _react.useLayoutEffect)(afterPlotInternal, []);
|
|
92
64
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PlotGraph, _objectSpread({
|
|
93
65
|
ref: ref,
|
|
@@ -101,47 +73,38 @@ var Plot = function Plot(_ref) {
|
|
|
101
73
|
style: plotGraphStyle
|
|
102
74
|
}, others));
|
|
103
75
|
};
|
|
104
|
-
|
|
105
76
|
process.env.NODE_ENV !== "production" ? Plot.propTypes = {
|
|
106
77
|
/**
|
|
107
78
|
* Plotly data object.
|
|
108
79
|
*/
|
|
109
80
|
data: _propTypes.default.arrayOf(_propTypes.default.instanceOf(Object)).isRequired,
|
|
110
|
-
|
|
111
81
|
/**
|
|
112
82
|
* Plotly layout object.
|
|
113
83
|
*/
|
|
114
84
|
layout: _propTypes.default.instanceOf(Object).isRequired,
|
|
115
|
-
|
|
116
85
|
/**
|
|
117
86
|
* Plotly config object.
|
|
118
87
|
*/
|
|
119
88
|
config: _propTypes.default.instanceOf(Object).isRequired,
|
|
120
|
-
|
|
121
89
|
/**
|
|
122
90
|
* OnHover function.
|
|
123
91
|
*/
|
|
124
92
|
onHover: _propTypes.default.func,
|
|
125
|
-
|
|
126
93
|
/**
|
|
127
94
|
* OnUnHover function.
|
|
128
95
|
*/
|
|
129
96
|
onUnHover: _propTypes.default.func,
|
|
130
|
-
|
|
131
97
|
/**
|
|
132
98
|
* Function to be call after plot render.
|
|
133
99
|
*/
|
|
134
100
|
afterPlot: _propTypes.default.func,
|
|
135
|
-
|
|
136
101
|
/**
|
|
137
102
|
* Plot revision.
|
|
138
103
|
*/
|
|
139
104
|
revision: _propTypes.default.number
|
|
140
105
|
} : void 0;
|
|
141
|
-
|
|
142
106
|
var _default = (0, _styles.withStyles)(_styles2.default, {
|
|
143
107
|
name: "HvChartPlot"
|
|
144
108
|
})(Plot);
|
|
145
|
-
|
|
146
109
|
exports.default = _default;
|
|
147
110
|
//# sourceMappingURL=Plot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plot.js","names":["PlotGraph","createPlotlyComponent","Plotly","plotGraphStyle","position","Plot","data","layout","config","revision","onHover","onUnHover","afterPlot","others","ref","useRef","afterPlotInternal","useCallback","useLayoutEffect","propTypes","PropTypes","arrayOf","instanceOf","Object","isRequired","func","number","withStyles","styles","name"],"sources":["../../../src/Chart/Plot/Plot.js"],"sourcesContent":["import React, { useLayoutEffect, useRef, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport Plotly from \"plotly.js-basic-dist\";\nimport createPlotlyComponent from \"react-plotly.js/factory\";\nimport { withStyles } from \"@mui/styles\";\nimport styles from \"./styles\";\n\nconst PlotGraph = createPlotlyComponent(Plotly);\n\nconst plotGraphStyle = { position: \"relative\" };\n\nconst Plot = ({ data, layout, config, revision = 0, onHover, onUnHover, afterPlot, ...others }) => {\n const ref = useRef(null);\n\n /* Callbacks */\n\n const afterPlotInternal = useCallback(() => {\n afterPlot?.(ref);\n }, [afterPlot]);\n\n /* Effects */\n\n /**\n * Call in the first render because react-plotly.js won't do so.\n * (https://github.com/plotly/react-plotly.js/blob/bd15ca98be12b159633fb57c4ea762cb7a64c3a7/src/factory.js#L88)\n */\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(afterPlotInternal, []);\n\n return (\n <PlotGraph\n ref={ref}\n data={data}\n layout={layout}\n config={config}\n revision={revision}\n onHover={onHover}\n onUnhover={onUnHover}\n onAfterPlot={afterPlot != null ? afterPlotInternal : null}\n style={plotGraphStyle}\n {...others}\n />\n );\n};\n\nPlot.propTypes = {\n /**\n * Plotly data object.\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object.\n */\n layout: PropTypes.instanceOf(Object).isRequired,\n /**\n * Plotly config object.\n */\n config: PropTypes.instanceOf(Object).isRequired,\n /**\n * OnHover function.\n */\n onHover: PropTypes.func,\n /**\n * OnUnHover function.\n */\n onUnHover: PropTypes.func,\n /**\n * Function to be call after plot render.\n */\n afterPlot: PropTypes.func,\n /**\n * Plot revision.\n */\n revision: PropTypes.number,\n};\n\nexport default withStyles(styles, { name: \"HvChartPlot\" })(Plot);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Plot.js","names":["PlotGraph","createPlotlyComponent","Plotly","plotGraphStyle","position","Plot","data","layout","config","revision","onHover","onUnHover","afterPlot","others","ref","useRef","afterPlotInternal","useCallback","useLayoutEffect","propTypes","PropTypes","arrayOf","instanceOf","Object","isRequired","func","number","withStyles","styles","name"],"sources":["../../../src/Chart/Plot/Plot.js"],"sourcesContent":["import React, { useLayoutEffect, useRef, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport Plotly from \"plotly.js-basic-dist\";\nimport createPlotlyComponent from \"react-plotly.js/factory\";\nimport { withStyles } from \"@mui/styles\";\nimport styles from \"./styles\";\n\nconst PlotGraph = createPlotlyComponent(Plotly);\n\nconst plotGraphStyle = { position: \"relative\" };\n\nconst Plot = ({ data, layout, config, revision = 0, onHover, onUnHover, afterPlot, ...others }) => {\n const ref = useRef(null);\n\n /* Callbacks */\n\n const afterPlotInternal = useCallback(() => {\n afterPlot?.(ref);\n }, [afterPlot]);\n\n /* Effects */\n\n /**\n * Call in the first render because react-plotly.js won't do so.\n * (https://github.com/plotly/react-plotly.js/blob/bd15ca98be12b159633fb57c4ea762cb7a64c3a7/src/factory.js#L88)\n */\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(afterPlotInternal, []);\n\n return (\n <PlotGraph\n ref={ref}\n data={data}\n layout={layout}\n config={config}\n revision={revision}\n onHover={onHover}\n onUnhover={onUnHover}\n onAfterPlot={afterPlot != null ? afterPlotInternal : null}\n style={plotGraphStyle}\n {...others}\n />\n );\n};\n\nPlot.propTypes = {\n /**\n * Plotly data object.\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object.\n */\n layout: PropTypes.instanceOf(Object).isRequired,\n /**\n * Plotly config object.\n */\n config: PropTypes.instanceOf(Object).isRequired,\n /**\n * OnHover function.\n */\n onHover: PropTypes.func,\n /**\n * OnUnHover function.\n */\n onUnHover: PropTypes.func,\n /**\n * Function to be call after plot render.\n */\n afterPlot: PropTypes.func,\n /**\n * Plot revision.\n */\n revision: PropTypes.number,\n};\n\nexport default withStyles(styles, { name: \"HvChartPlot\" })(Plot);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAE9B,IAAMA,SAAS,GAAG,IAAAC,gBAAqB,EAACC,eAAM,CAAC;AAE/C,IAAMC,cAAc,GAAG;EAAEC,QAAQ,EAAE;AAAW,CAAC;AAE/C,IAAMC,IAAI,GAAG,SAAPA,IAAI,OAAyF;EAAA,IAAnFC,IAAI,QAAJA,IAAI;IAAEC,MAAM,QAANA,MAAM;IAAEC,MAAM,QAANA,MAAM;IAAA,qBAAEC,QAAQ;IAARA,QAAQ,8BAAG,CAAC;IAAEC,OAAO,QAAPA,OAAO;IAAEC,SAAS,QAATA,SAAS;IAAEC,SAAS,QAATA,SAAS;IAAKC,MAAM;EAC1F,IAAMC,GAAG,GAAG,IAAAC,aAAM,EAAC,IAAI,CAAC;;EAExB;;EAEA,IAAMC,iBAAiB,GAAG,IAAAC,kBAAW,EAAC,YAAM;IAC1CL,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAGE,GAAG,CAAC;EAClB,CAAC,EAAE,CAACF,SAAS,CAAC,CAAC;;EAEf;;EAEA;AACF;AACA;AACA;EACE;EACA,IAAAM,sBAAe,EAACF,iBAAiB,EAAE,EAAE,CAAC;EAEtC,oBACE,qBAAC,SAAS;IACR,GAAG,EAAEF,GAAI;IACT,IAAI,EAAER,IAAK;IACX,MAAM,EAAEC,MAAO;IACf,MAAM,EAAEC,MAAO;IACf,QAAQ,EAAEC,QAAS;IACnB,OAAO,EAAEC,OAAQ;IACjB,SAAS,EAAEC,SAAU;IACrB,WAAW,EAAEC,SAAS,IAAI,IAAI,GAAGI,iBAAiB,GAAG,IAAK;IAC1D,KAAK,EAAEb;EAAe,GAClBU,MAAM,EACV;AAEN,CAAC;AAED,wCAAAR,IAAI,CAACc,SAAS,GAAG;EACf;AACF;AACA;EACEb,IAAI,EAAEc,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACE,UAAU,CAACC,MAAM,CAAC,CAAC,CAACC,UAAU;EAChE;AACF;AACA;EACEjB,MAAM,EAAEa,kBAAS,CAACE,UAAU,CAACC,MAAM,CAAC,CAACC,UAAU;EAC/C;AACF;AACA;EACEhB,MAAM,EAAEY,kBAAS,CAACE,UAAU,CAACC,MAAM,CAAC,CAACC,UAAU;EAC/C;AACF;AACA;EACEd,OAAO,EAAEU,kBAAS,CAACK,IAAI;EACvB;AACF;AACA;EACEd,SAAS,EAAES,kBAAS,CAACK,IAAI;EACzB;AACF;AACA;EACEb,SAAS,EAAEQ,kBAAS,CAACK,IAAI;EACzB;AACF;AACA;EACEhB,QAAQ,EAAEW,kBAAS,CAACM;AACtB,CAAC;AAAC,eAEa,IAAAC,kBAAU,EAACC,gBAAM,EAAE;EAAEC,IAAI,EAAE;AAAc,CAAC,CAAC,CAACxB,IAAI,CAAC;AAAA"}
|
package/dist/Chart/Plot/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,6 +10,5 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _Plot.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _Plot = _interopRequireDefault(require("./Plot"));
|
|
16
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/Chart/Plot/index.js"],"sourcesContent":["export { default } from \"./Plot\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/Chart/Plot/index.js"],"sourcesContent":["export { default } from \"./Plot\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/Chart/Plot/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":";;;;;;AAAA,IAAMA,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/Chart/Plot/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":";;;;;;AAAA,IAAMA,MAAM,GAAG,CAAC,CAAC;AAAC,eAEHA,MAAM;AAAA"}
|
|
@@ -1,51 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.string.iterator.js");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.weak-map.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
8
|
-
|
|
9
6
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
10
|
-
|
|
11
7
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
12
|
-
|
|
13
8
|
Object.defineProperty(exports, "__esModule", {
|
|
14
9
|
value: true
|
|
15
10
|
});
|
|
16
11
|
exports.default = void 0;
|
|
17
|
-
|
|
18
12
|
require("core-js/modules/es.array.map.js");
|
|
19
|
-
|
|
20
13
|
require("core-js/modules/es.function.name.js");
|
|
21
|
-
|
|
22
14
|
require("core-js/modules/es.array.iterator.js");
|
|
23
|
-
|
|
24
15
|
require("core-js/modules/es.object.to-string.js");
|
|
25
|
-
|
|
26
16
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
27
|
-
|
|
28
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
29
|
-
|
|
30
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
31
|
-
|
|
32
19
|
var _styles = require("@mui/styles");
|
|
33
|
-
|
|
34
20
|
var _uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
35
|
-
|
|
36
21
|
var _styles2 = _interopRequireDefault(require("./styles"));
|
|
37
|
-
|
|
38
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
39
|
-
|
|
40
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
41
|
-
|
|
42
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
43
|
-
|
|
44
25
|
var MultiTooltip = function MultiTooltip(_ref) {
|
|
45
26
|
var _data$elements;
|
|
46
|
-
|
|
47
27
|
var classes = _ref.classes,
|
|
48
|
-
|
|
28
|
+
data = _ref.data;
|
|
49
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
50
30
|
className: classes.root,
|
|
51
31
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -88,7 +68,6 @@ var MultiTooltip = function MultiTooltip(_ref) {
|
|
|
88
68
|
})]
|
|
89
69
|
});
|
|
90
70
|
};
|
|
91
|
-
|
|
92
71
|
process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
|
|
93
72
|
/**
|
|
94
73
|
* A Jss Object used to override or extend the styles applied.
|
|
@@ -98,43 +77,35 @@ process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
|
|
|
98
77
|
* Styles applied to the root.
|
|
99
78
|
*/
|
|
100
79
|
root: _propTypes.default.string,
|
|
101
|
-
|
|
102
80
|
/**
|
|
103
81
|
* Styles applied to the title.
|
|
104
82
|
*/
|
|
105
83
|
title: _propTypes.default.string,
|
|
106
|
-
|
|
107
84
|
/**
|
|
108
85
|
* Styles applied to the values container.
|
|
109
86
|
*/
|
|
110
87
|
valuesContainer: _propTypes.default.string,
|
|
111
|
-
|
|
112
88
|
/**
|
|
113
89
|
* Styling applied to the elements describing a data.
|
|
114
90
|
*/
|
|
115
91
|
valueNameWrapper: _propTypes.default.string,
|
|
116
|
-
|
|
117
92
|
/**
|
|
118
93
|
* Styles applied to the values.
|
|
119
94
|
*/
|
|
120
95
|
values: _propTypes.default.string,
|
|
121
|
-
|
|
122
96
|
/**
|
|
123
97
|
* Styles applied to the color.
|
|
124
98
|
*/
|
|
125
99
|
color: _propTypes.default.string,
|
|
126
|
-
|
|
127
100
|
/**
|
|
128
101
|
* Styles applied to the separator between color and title.
|
|
129
102
|
*/
|
|
130
103
|
separatorColor: _propTypes.default.string,
|
|
131
|
-
|
|
132
104
|
/**
|
|
133
105
|
* Styles applied to the separator.
|
|
134
106
|
*/
|
|
135
107
|
separator: _propTypes.default.string
|
|
136
108
|
}).isRequired,
|
|
137
|
-
|
|
138
109
|
/**
|
|
139
110
|
* Data of the tooltip.
|
|
140
111
|
*/
|
|
@@ -143,7 +114,6 @@ process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
|
|
|
143
114
|
* Styles applied to the barchart root class.
|
|
144
115
|
*/
|
|
145
116
|
title: _propTypes.default.string,
|
|
146
|
-
|
|
147
117
|
/**
|
|
148
118
|
* Values of tooltip
|
|
149
119
|
*/
|
|
@@ -152,12 +122,10 @@ process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
|
|
|
152
122
|
* Color (in hex).
|
|
153
123
|
*/
|
|
154
124
|
color: _propTypes.default.string,
|
|
155
|
-
|
|
156
125
|
/**
|
|
157
126
|
* Name.
|
|
158
127
|
*/
|
|
159
128
|
name: _propTypes.default.string,
|
|
160
|
-
|
|
161
129
|
/**
|
|
162
130
|
* Value.
|
|
163
131
|
*/
|
|
@@ -165,14 +133,11 @@ process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
|
|
|
165
133
|
}))
|
|
166
134
|
}).isRequired
|
|
167
135
|
} : void 0;
|
|
168
|
-
|
|
169
136
|
var arePropsEqual = function arePropsEqual(prevProps, nextProps) {
|
|
170
137
|
return prevProps.data === nextProps.data;
|
|
171
138
|
};
|
|
172
|
-
|
|
173
139
|
var _default = (0, _styles.withStyles)(_styles2.default, {
|
|
174
140
|
name: "HvChartMultiTooltip"
|
|
175
141
|
})( /*#__PURE__*/(0, _react.memo)(MultiTooltip, arePropsEqual));
|
|
176
|
-
|
|
177
142
|
exports.default = _default;
|
|
178
143
|
//# sourceMappingURL=MultiTooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiTooltip.js","names":["MultiTooltip","classes","data","root","title","valuesContainer","elements","map","element","values","valueNameWrapper","color","backgroundColor","separatorColor","name","separator","value","propTypes","PropTypes","shape","string","isRequired","arrayOf","number","arePropsEqual","prevProps","nextProps","withStyles","styles","memo"],"sources":["../../../../src/Chart/Tooltip/MultiTooltip/MultiTooltip.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 MultiTooltip = ({ classes, data }) => (\n <div className={classes.root}>\n <div className={classes.title}>\n <div>\n <HvTypography variant=\"highlightText\">{data.title}</HvTypography>\n </div>\n </div>\n <div className={classes.valuesContainer}>\n {data?.elements?.map((element) => (\n <div key={element.name} className={classes.values}>\n <div className={classes.valueNameWrapper}>\n <div className={classes.color} style={{ backgroundColor: element.color }} />\n <div className={classes.separatorColor} />\n <div>\n <HvTypography variant=\"highlightText\">{element.name}</HvTypography>\n </div>\n <div className={classes.separator} />\n </div>\n <div>\n <HvTypography>{element.value}</HvTypography>\n </div>\n </div>\n ))}\n </div>\n </div>\n);\n\nMultiTooltip.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.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the title.\n */\n title: PropTypes.string,\n /**\n * Styles applied to the values container.\n */\n valuesContainer: PropTypes.string,\n /**\n * Styling applied to the elements describing a data.\n */\n valueNameWrapper: PropTypes.string,\n /**\n * Styles applied to the values.\n */\n values: PropTypes.string,\n /**\n * Styles applied to the color.\n */\n color: PropTypes.string,\n /**\n * Styles applied to the separator between color and title.\n */\n separatorColor: PropTypes.string,\n /**\n * Styles applied to the separator.\n */\n separator: PropTypes.string,\n }).isRequired,\n /**\n * Data of the tooltip.\n */\n data: PropTypes.shape({\n /**\n * Styles applied to the barchart root class.\n */\n title: PropTypes.string,\n /**\n * Values of tooltip\n */\n elements: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * Color (in hex).\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\nconst arePropsEqual = (prevProps, nextProps) => prevProps.data === nextProps.data;\n\nexport default withStyles(styles, { name: \"HvChartMultiTooltip\" })(\n memo(MultiTooltip, arePropsEqual)\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiTooltip.js","names":["MultiTooltip","classes","data","root","title","valuesContainer","elements","map","element","values","valueNameWrapper","color","backgroundColor","separatorColor","name","separator","value","propTypes","PropTypes","shape","string","isRequired","arrayOf","number","arePropsEqual","prevProps","nextProps","withStyles","styles","memo"],"sources":["../../../../src/Chart/Tooltip/MultiTooltip/MultiTooltip.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 MultiTooltip = ({ classes, data }) => (\n <div className={classes.root}>\n <div className={classes.title}>\n <div>\n <HvTypography variant=\"highlightText\">{data.title}</HvTypography>\n </div>\n </div>\n <div className={classes.valuesContainer}>\n {data?.elements?.map((element) => (\n <div key={element.name} className={classes.values}>\n <div className={classes.valueNameWrapper}>\n <div className={classes.color} style={{ backgroundColor: element.color }} />\n <div className={classes.separatorColor} />\n <div>\n <HvTypography variant=\"highlightText\">{element.name}</HvTypography>\n </div>\n <div className={classes.separator} />\n </div>\n <div>\n <HvTypography>{element.value}</HvTypography>\n </div>\n </div>\n ))}\n </div>\n </div>\n);\n\nMultiTooltip.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.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the title.\n */\n title: PropTypes.string,\n /**\n * Styles applied to the values container.\n */\n valuesContainer: PropTypes.string,\n /**\n * Styling applied to the elements describing a data.\n */\n valueNameWrapper: PropTypes.string,\n /**\n * Styles applied to the values.\n */\n values: PropTypes.string,\n /**\n * Styles applied to the color.\n */\n color: PropTypes.string,\n /**\n * Styles applied to the separator between color and title.\n */\n separatorColor: PropTypes.string,\n /**\n * Styles applied to the separator.\n */\n separator: PropTypes.string,\n }).isRequired,\n /**\n * Data of the tooltip.\n */\n data: PropTypes.shape({\n /**\n * Styles applied to the barchart root class.\n */\n title: PropTypes.string,\n /**\n * Values of tooltip\n */\n elements: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * Color (in hex).\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\nconst arePropsEqual = (prevProps, nextProps) => prevProps.data === nextProps.data;\n\nexport default withStyles(styles, { name: \"HvChartMultiTooltip\" })(\n memo(MultiTooltip, arePropsEqual)\n);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAA8B;AAAA;AAAA;AAE9B,IAAMA,YAAY,GAAG,SAAfA,YAAY;EAAA;EAAA,IAAMC,OAAO,QAAPA,OAAO;IAAEC,IAAI,QAAJA,IAAI;EAAA,oBACnC;IAAK,SAAS,EAAED,OAAO,CAACE,IAAK;IAAA,wBAC3B;MAAK,SAAS,EAAEF,OAAO,CAACG,KAAM;MAAA,uBAC5B;QAAA,uBACE,qBAAC,4BAAY;UAAC,OAAO,EAAC,eAAe;UAAA,UAAEF,IAAI,CAACE;QAAK;MAAgB;IAC7D,EACF,eACN;MAAK,SAAS,EAAEH,OAAO,CAACI,eAAgB;MAAA,UACrCH,IAAI,aAAJA,IAAI,yCAAJA,IAAI,CAAEI,QAAQ,mDAAd,eAAgBC,GAAG,CAAC,UAACC,OAAO;QAAA,oBAC3B;UAAwB,SAAS,EAAEP,OAAO,CAACQ,MAAO;UAAA,wBAChD;YAAK,SAAS,EAAER,OAAO,CAACS,gBAAiB;YAAA,wBACvC;cAAK,SAAS,EAAET,OAAO,CAACU,KAAM;cAAC,KAAK,EAAE;gBAAEC,eAAe,EAAEJ,OAAO,CAACG;cAAM;YAAE,EAAG,eAC5E;cAAK,SAAS,EAAEV,OAAO,CAACY;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AACA;MACQJ,KAAK,EAAEE,kBAAS,CAACK;IACnB,CAAC,CAAC;EAEN,CAAC,CAAC,CAACF;AACL,CAAC;AAED,IAAMG,aAAa,GAAG,SAAhBA,aAAa,CAAIC,SAAS,EAAEC,SAAS;EAAA,OAAKD,SAAS,CAACvB,IAAI,KAAKwB,SAAS,CAACxB,IAAI;AAAA;AAAC,eAEnE,IAAAyB,kBAAU,EAACC,gBAAM,EAAE;EAAEd,IAAI,EAAE;AAAsB,CAAC,CAAC,eAChE,IAAAe,WAAI,EAAC7B,YAAY,EAAEwB,aAAa,CAAC,CAClC;AAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,6 +10,5 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _MultiTooltip.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _MultiTooltip = _interopRequireDefault(require("./MultiTooltip"));
|
|
16
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/Chart/Tooltip/MultiTooltip/index.js"],"sourcesContent":["export { default } from \"./MultiTooltip\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/Chart/Tooltip/MultiTooltip/index.js"],"sourcesContent":["export { default } from \"./MultiTooltip\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var styles = function styles(theme) {
|
|
9
8
|
return {
|
|
10
9
|
root: {
|
|
@@ -45,7 +44,6 @@ var styles = function styles(theme) {
|
|
|
45
44
|
}
|
|
46
45
|
};
|
|
47
46
|
};
|
|
48
|
-
|
|
49
47
|
var _default = styles;
|
|
50
48
|
exports.default = _default;
|
|
51
49
|
//# sourceMappingURL=styles.js.map
|
|
@@ -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":"
|
|
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,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,eAAe,EAAEF,KAAK,CAACG,EAAE,CAACC,OAAO,CAACC,UAAU,CAACC,KAAK;MAClDC,KAAK,EAAE,aAAa;MACpBC,SAAS,EAAER,KAAK,CAACG,EAAE,CAACM,OAAO,CAAC,CAAC,CAAC;MAC9BC,MAAM,EAAE;IACV,CAAC;IACDC,KAAK,EAAE;MACLC,OAAO,EAAEZ,KAAK,CAACa,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC;MACtCC,YAAY,sBAAed,KAAK,CAACG,EAAE,CAACC,OAAO,CAACC,UAAU,CAACU,KAAK;IAC9D,CAAC;IACDC,eAAe,EAAE;MACfJ,OAAO,EAAEZ,KAAK,CAACG,EAAE,CAACc,OAAO,CAACC;IAC5B,CAAC;IACDC,MAAM,EAAE;MACNC,OAAO,EAAE,MAAM;MACfC,cAAc,EAAE,eAAe;MAC/BC,UAAU,EAAE,QAAQ;MACpBC,aAAa,EAAEvB,KAAK,CAACG,EAAE,CAACc,OAAO,CAACC,EAAE;MAClC,cAAc,EAAE;QACdK,aAAa,EAAE;MACjB;IACF,CAAC;IACDC,gBAAgB,EAAE;MAChBJ,OAAO,EAAE,MAAM;MACfE,UAAU,EAAE;IACd,CAAC;IACDG,KAAK,EAAE;MACLlB,KAAK,EAAEP,KAAK,CAACG,EAAE,CAACc,OAAO,CAACS,EAAE;MAC1BC,MAAM,EAAE3B,KAAK,CAACG,EAAE,CAACc,OAAO,CAACS;IAC3B,CAAC;IACDE,SAAS,EAAE;MACTrB,KAAK,EAAEP,KAAK,CAACG,EAAE,CAACc,OAAO,CAACS;IAC1B,CAAC;IACDG,cAAc,EAAE;MACdtB,KAAK,EAAE;IACT;EACF,CAAC;AAAA,CAAC;AAAC,eAEYR,MAAM;AAAA"}
|
|
@@ -1,46 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.array.iterator.js");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.object.to-string.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.string.iterator.js");
|
|
8
|
-
|
|
9
6
|
require("core-js/modules/es.weak-map.js");
|
|
10
|
-
|
|
11
7
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
-
|
|
13
8
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
14
|
-
|
|
15
9
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
16
|
-
|
|
17
10
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
18
|
-
|
|
19
11
|
Object.defineProperty(exports, "__esModule", {
|
|
20
12
|
value: true
|
|
21
13
|
});
|
|
22
14
|
exports.default = void 0;
|
|
23
|
-
|
|
24
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
25
|
-
|
|
26
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
17
|
var _styles = require("@mui/styles");
|
|
29
|
-
|
|
30
18
|
var _uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
31
|
-
|
|
32
19
|
var _styles2 = _interopRequireDefault(require("./styles"));
|
|
33
|
-
|
|
34
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
|
-
|
|
36
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
|
-
|
|
38
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
-
|
|
40
23
|
var SingleTooltip = function SingleTooltip(_ref) {
|
|
41
24
|
var classes = _ref.classes,
|
|
42
|
-
|
|
43
|
-
|
|
25
|
+
title = _ref.title,
|
|
26
|
+
value = _ref.value;
|
|
44
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
45
28
|
className: classes.root,
|
|
46
29
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -57,7 +40,6 @@ var SingleTooltip = function SingleTooltip(_ref) {
|
|
|
57
40
|
})]
|
|
58
41
|
});
|
|
59
42
|
};
|
|
60
|
-
|
|
61
43
|
process.env.NODE_ENV !== "production" ? SingleTooltip.propTypes = {
|
|
62
44
|
/**
|
|
63
45
|
* A Jss Object used to override or extend the styles applied.
|
|
@@ -67,31 +49,25 @@ process.env.NODE_ENV !== "production" ? SingleTooltip.propTypes = {
|
|
|
67
49
|
* Styles applied to the root class.
|
|
68
50
|
*/
|
|
69
51
|
root: _propTypes.default.string,
|
|
70
|
-
|
|
71
52
|
/**
|
|
72
53
|
* Styles applied to the separator between title and value.
|
|
73
54
|
*/
|
|
74
55
|
separator: _propTypes.default.string
|
|
75
56
|
}).isRequired,
|
|
76
|
-
|
|
77
57
|
/**
|
|
78
58
|
* Title of the chart.
|
|
79
59
|
*/
|
|
80
60
|
title: _propTypes.default.string.isRequired,
|
|
81
|
-
|
|
82
61
|
/**
|
|
83
62
|
* Value of the chart.
|
|
84
63
|
*/
|
|
85
64
|
value: _propTypes.default.number.isRequired
|
|
86
65
|
} : void 0;
|
|
87
|
-
|
|
88
66
|
var arePropsEqual = function arePropsEqual(prevProps, nextProps) {
|
|
89
67
|
return prevProps.title === nextProps.title && prevProps.value === nextProps.value;
|
|
90
68
|
};
|
|
91
|
-
|
|
92
69
|
var _default = (0, _styles.withStyles)(_styles2.default, {
|
|
93
70
|
name: "HvChartSingleTooltip"
|
|
94
71
|
})( /*#__PURE__*/(0, _react.memo)(SingleTooltip, arePropsEqual));
|
|
95
|
-
|
|
96
72
|
exports.default = _default;
|
|
97
73
|
//# sourceMappingURL=SingleTooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleTooltip.js","names":["SingleTooltip","classes","title","value","root","separator","propTypes","PropTypes","shape","string","isRequired","number","arePropsEqual","prevProps","nextProps","withStyles","styles","name","memo"],"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":"
|
|
1
|
+
{"version":3,"file":"SingleTooltip.js","names":["SingleTooltip","classes","title","value","root","separator","propTypes","PropTypes","shape","string","isRequired","number","arePropsEqual","prevProps","nextProps","withStyles","styles","name","memo"],"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;AACA;AACA;AACA;AACA;AAA8B;AAAA;AAAA;AAE9B,IAAMA,aAAa,GAAG,SAAhBA,aAAa;EAAA,IAAMC,OAAO,QAAPA,OAAO;IAAEC,KAAK,QAALA,KAAK;IAAEC,KAAK,QAALA,KAAK;EAAA,oBAC5C;IAAK,SAAS,EAAEF,OAAO,CAACG,IAAK;IAAA,wBAC3B;MAAA,uBACE,qBAAC,4BAAY;QAAC,OAAO,EAAC,eAAe;QAAA,UAAEF;MAAK;IAAgB,EACxD,eACN;MAAK,SAAS,EAAED,OAAO,CAACI;IAAU,EAAG,eACrC;MAAA,uBACE,qBAAC,4BAAY;QAAA,UAAEF;MAAK;IAAgB,EAChC;EAAA,EACF;AAAA,CACP;AAED,wCAAAH,aAAa,CAACM,SAAS,GAAG;EACxB;AACF;AACA;EACEL,OAAO,EAAEM,kBAAS,CAACC,KAAK,CAAC;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEG,kBAAS,CAACE,MAAM;IACtB;AACJ;AACA;IACIJ,SAAS,EAAEE,kBAAS,CAACE;EACvB,CAAC,CAAC,CAACC,UAAU;EACb;AACF;AACA;EACER,KAAK,EAAEK,kBAAS,CAACE,MAAM,CAACC,UAAU;EAClC;AACF;AACA;EACEP,KAAK,EAAEI,kBAAS,CAACI,MAAM,CAACD;AAC1B,CAAC;AAED,IAAME,aAAa,GAAG,SAAhBA,aAAa,CAAIC,SAAS,EAAEC,SAAS;EAAA,OACzCD,SAAS,CAACX,KAAK,KAAKY,SAAS,CAACZ,KAAK,IAAIW,SAAS,CAACV,KAAK,KAAKW,SAAS,CAACX,KAAK;AAAA;AAAC,eAE9D,IAAAY,kBAAU,EAACC,gBAAM,EAAE;EAAEC,IAAI,EAAE;AAAuB,CAAC,CAAC,eACjE,IAAAC,WAAI,EAAClB,aAAa,EAAEY,aAAa,CAAC,CACnC;AAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,6 +10,5 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _SingleTooltip.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _SingleTooltip = _interopRequireDefault(require("./SingleTooltip"));
|
|
16
14
|
//# sourceMappingURL=index.js.map
|