@hitachivantara/uikit-react-viz 4.0.2 → 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.
Files changed (145) hide show
  1. package/dist/Barchart/Barchart.js +45 -72
  2. package/dist/Barchart/Barchart.js.map +1 -1
  3. package/dist/Barchart/barchartPlotlyOverrides.js +1 -13
  4. package/dist/Barchart/barchartPlotlyOverrides.js.map +1 -1
  5. package/dist/Barchart/index.js +0 -2
  6. package/dist/Barchart/index.js.map +1 -1
  7. package/dist/Barchart/styles.js.map +1 -1
  8. package/dist/Chart/Chart.d.ts +1 -1
  9. package/dist/Chart/Chart.js +28 -75
  10. package/dist/Chart/Chart.js.map +1 -1
  11. package/dist/Chart/Plot/Plot.js +10 -47
  12. package/dist/Chart/Plot/Plot.js.map +1 -1
  13. package/dist/Chart/Plot/index.js +0 -2
  14. package/dist/Chart/Plot/index.js.map +1 -1
  15. package/dist/Chart/Plot/styles.js.map +1 -1
  16. package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js +1 -36
  17. package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
  18. package/dist/Chart/Tooltip/MultiTooltip/index.js +0 -2
  19. package/dist/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
  20. package/dist/Chart/Tooltip/MultiTooltip/styles.js +0 -2
  21. package/dist/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
  22. package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js +2 -26
  23. package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
  24. package/dist/Chart/Tooltip/SingleTooltip/index.js +0 -2
  25. package/dist/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
  26. package/dist/Chart/Tooltip/SingleTooltip/styles.js +0 -2
  27. package/dist/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
  28. package/dist/Chart/Tooltip/Tooltip.js +16 -51
  29. package/dist/Chart/Tooltip/Tooltip.js.map +1 -1
  30. package/dist/Chart/Tooltip/index.js +0 -2
  31. package/dist/Chart/Tooltip/index.js.map +1 -1
  32. package/dist/Chart/Tooltip/styles.js.map +1 -1
  33. package/dist/Chart/chartPlotlyOverrides.js +9 -33
  34. package/dist/Chart/chartPlotlyOverrides.js.map +1 -1
  35. package/dist/Chart/index.js +0 -2
  36. package/dist/Chart/index.js.map +1 -1
  37. package/dist/Chart/styles.js +0 -13
  38. package/dist/Chart/styles.js.map +1 -1
  39. package/dist/Donutchart/Donutchart.js +10 -47
  40. package/dist/Donutchart/Donutchart.js.map +1 -1
  41. package/dist/Donutchart/donutchartPlotlyOverrides.js +1 -13
  42. package/dist/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
  43. package/dist/Donutchart/index.js +0 -2
  44. package/dist/Donutchart/index.js.map +1 -1
  45. package/dist/Donutchart/styles.js.map +1 -1
  46. package/dist/Linechart/Linechart.js +12 -50
  47. package/dist/Linechart/Linechart.js.map +1 -1
  48. package/dist/Linechart/index.js +0 -2
  49. package/dist/Linechart/index.js.map +1 -1
  50. package/dist/Linechart/lineChartPlotlyOverrides.js +1 -17
  51. package/dist/Linechart/lineChartPlotlyOverrides.js.map +1 -1
  52. package/dist/Linechart/styles.js.map +1 -1
  53. package/dist/index.js +0 -4
  54. package/dist/index.js.map +1 -1
  55. package/dist/legacy/Barchart/Barchart.js +45 -43
  56. package/dist/legacy/Barchart/Barchart.js.map +1 -1
  57. package/dist/legacy/Barchart/barchartPlotlyOverrides.js +1 -6
  58. package/dist/legacy/Barchart/barchartPlotlyOverrides.js.map +1 -1
  59. package/dist/legacy/Barchart/index.js.map +1 -1
  60. package/dist/legacy/Barchart/styles.js.map +1 -1
  61. package/dist/legacy/Chart/Chart.d.ts +1 -1
  62. package/dist/legacy/Chart/Chart.js +28 -46
  63. package/dist/legacy/Chart/Chart.js.map +1 -1
  64. package/dist/legacy/Chart/Plot/Plot.js +10 -21
  65. package/dist/legacy/Chart/Plot/Plot.js.map +1 -1
  66. package/dist/legacy/Chart/Plot/index.js.map +1 -1
  67. package/dist/legacy/Chart/Plot/styles.js.map +1 -1
  68. package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js +1 -17
  69. package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
  70. package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
  71. package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js +0 -1
  72. package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
  73. package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js +2 -9
  74. package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
  75. package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
  76. package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js +0 -1
  77. package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
  78. package/dist/legacy/Chart/Tooltip/Tooltip.js +16 -30
  79. package/dist/legacy/Chart/Tooltip/Tooltip.js.map +1 -1
  80. package/dist/legacy/Chart/Tooltip/index.js.map +1 -1
  81. package/dist/legacy/Chart/Tooltip/styles.js.map +1 -1
  82. package/dist/legacy/Chart/chartPlotlyOverrides.js +9 -20
  83. package/dist/legacy/Chart/chartPlotlyOverrides.js.map +1 -1
  84. package/dist/legacy/Chart/index.js.map +1 -1
  85. package/dist/legacy/Chart/styles.js +0 -4
  86. package/dist/legacy/Chart/styles.js.map +1 -1
  87. package/dist/legacy/Donutchart/Donutchart.js +11 -22
  88. package/dist/legacy/Donutchart/Donutchart.js.map +1 -1
  89. package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js +1 -6
  90. package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
  91. package/dist/legacy/Donutchart/index.js.map +1 -1
  92. package/dist/legacy/Donutchart/styles.js.map +1 -1
  93. package/dist/legacy/Linechart/Linechart.js +13 -25
  94. package/dist/legacy/Linechart/Linechart.js.map +1 -1
  95. package/dist/legacy/Linechart/index.js.map +1 -1
  96. package/dist/legacy/Linechart/lineChartPlotlyOverrides.js +1 -10
  97. package/dist/legacy/Linechart/lineChartPlotlyOverrides.js.map +1 -1
  98. package/dist/legacy/Linechart/styles.js.map +1 -1
  99. package/dist/legacy/index.js.map +1 -1
  100. package/dist/modern/Barchart/Barchart.js +38 -31
  101. package/dist/modern/Barchart/Barchart.js.map +1 -1
  102. package/dist/modern/Barchart/barchartPlotlyOverrides.js +1 -6
  103. package/dist/modern/Barchart/barchartPlotlyOverrides.js.map +1 -1
  104. package/dist/modern/Barchart/index.js.map +1 -1
  105. package/dist/modern/Barchart/styles.js.map +1 -1
  106. package/dist/modern/Chart/Chart.d.ts +1 -1
  107. package/dist/modern/Chart/Chart.js +17 -33
  108. package/dist/modern/Chart/Chart.js.map +1 -1
  109. package/dist/modern/Chart/Plot/Plot.js +11 -22
  110. package/dist/modern/Chart/Plot/Plot.js.map +1 -1
  111. package/dist/modern/Chart/Plot/index.js.map +1 -1
  112. package/dist/modern/Chart/Plot/styles.js.map +1 -1
  113. package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -17
  114. package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
  115. package/dist/modern/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
  116. package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js +0 -1
  117. package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
  118. package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -7
  119. package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
  120. package/dist/modern/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
  121. package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js +0 -1
  122. package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
  123. package/dist/modern/Chart/Tooltip/Tooltip.js +2 -13
  124. package/dist/modern/Chart/Tooltip/Tooltip.js.map +1 -1
  125. package/dist/modern/Chart/Tooltip/index.js.map +1 -1
  126. package/dist/modern/Chart/Tooltip/styles.js.map +1 -1
  127. package/dist/modern/Chart/chartPlotlyOverrides.js +9 -20
  128. package/dist/modern/Chart/chartPlotlyOverrides.js.map +1 -1
  129. package/dist/modern/Chart/index.js.map +1 -1
  130. package/dist/modern/Chart/styles.js +0 -4
  131. package/dist/modern/Chart/styles.js.map +1 -1
  132. package/dist/modern/Donutchart/Donutchart.js +11 -22
  133. package/dist/modern/Donutchart/Donutchart.js.map +1 -1
  134. package/dist/modern/Donutchart/donutchartPlotlyOverrides.js +1 -6
  135. package/dist/modern/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
  136. package/dist/modern/Donutchart/index.js.map +1 -1
  137. package/dist/modern/Donutchart/styles.js.map +1 -1
  138. package/dist/modern/Linechart/Linechart.js +12 -24
  139. package/dist/modern/Linechart/Linechart.js.map +1 -1
  140. package/dist/modern/Linechart/index.js.map +1 -1
  141. package/dist/modern/Linechart/lineChartPlotlyOverrides.js +1 -10
  142. package/dist/modern/Linechart/lineChartPlotlyOverrides.js.map +1 -1
  143. package/dist/modern/Linechart/styles.js.map +1 -1
  144. package/dist/modern/index.js.map +1 -1
  145. package/package.json +3 -3
@@ -1,11 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  const _excluded = ["data", "layout", "config", "revision", "onHover", "onUnHover", "afterPlot"];
4
-
5
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; }
6
-
7
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; }
8
-
9
6
  import React, { useLayoutEffect, useRef, useCallback } from "react";
10
7
  import PropTypes from "prop-types";
11
8
  import Plotly from "plotly.js-basic-dist";
@@ -17,25 +14,25 @@ const PlotGraph = createPlotlyComponent(Plotly);
17
14
  const plotGraphStyle = {
18
15
  position: "relative"
19
16
  };
20
-
21
17
  const Plot = _ref => {
22
18
  let {
23
- data,
24
- layout,
25
- config,
26
- revision = 0,
27
- onHover,
28
- onUnHover,
29
- afterPlot
30
- } = _ref,
31
- others = _objectWithoutProperties(_ref, _excluded);
32
-
19
+ data,
20
+ layout,
21
+ config,
22
+ revision = 0,
23
+ onHover,
24
+ onUnHover,
25
+ afterPlot
26
+ } = _ref,
27
+ others = _objectWithoutProperties(_ref, _excluded);
33
28
  const ref = useRef(null);
29
+
34
30
  /* Callbacks */
35
31
 
36
32
  const afterPlotInternal = useCallback(() => {
37
33
  afterPlot === null || afterPlot === void 0 ? void 0 : afterPlot(ref);
38
34
  }, [afterPlot]);
35
+
39
36
  /* Effects */
40
37
 
41
38
  /**
@@ -43,7 +40,6 @@ const Plot = _ref => {
43
40
  * (https://github.com/plotly/react-plotly.js/blob/bd15ca98be12b159633fb57c4ea762cb7a64c3a7/src/factory.js#L88)
44
41
  */
45
42
  // eslint-disable-next-line react-hooks/exhaustive-deps
46
-
47
43
  useLayoutEffect(afterPlotInternal, []);
48
44
  return /*#__PURE__*/_jsx(PlotGraph, _objectSpread({
49
45
  ref: ref,
@@ -57,38 +53,31 @@ const Plot = _ref => {
57
53
  style: plotGraphStyle
58
54
  }, others));
59
55
  };
60
-
61
56
  process.env.NODE_ENV !== "production" ? Plot.propTypes = {
62
57
  /**
63
58
  * Plotly data object.
64
59
  */
65
60
  data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,
66
-
67
61
  /**
68
62
  * Plotly layout object.
69
63
  */
70
64
  layout: PropTypes.instanceOf(Object).isRequired,
71
-
72
65
  /**
73
66
  * Plotly config object.
74
67
  */
75
68
  config: PropTypes.instanceOf(Object).isRequired,
76
-
77
69
  /**
78
70
  * OnHover function.
79
71
  */
80
72
  onHover: PropTypes.func,
81
-
82
73
  /**
83
74
  * OnUnHover function.
84
75
  */
85
76
  onUnHover: PropTypes.func,
86
-
87
77
  /**
88
78
  * Function to be call after plot render.
89
79
  */
90
80
  afterPlot: PropTypes.func,
91
-
92
81
  /**
93
82
  * Plot revision.
94
83
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.js","names":["React","useLayoutEffect","useRef","useCallback","PropTypes","Plotly","createPlotlyComponent","withStyles","styles","PlotGraph","plotGraphStyle","position","Plot","data","layout","config","revision","onHover","onUnHover","afterPlot","others","ref","afterPlotInternal","propTypes","arrayOf","instanceOf","Object","isRequired","func","number","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,OAAOA,KAAP,IAAgBC,eAAhB,EAAiCC,MAAjC,EAAyCC,WAAzC,QAA4D,OAA5D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,qBAAP,MAAkC,yBAAlC;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAEA,MAAMC,SAAS,GAAGH,qBAAqB,CAACD,MAAD,CAAvC;AAEA,MAAMK,cAAc,GAAG;EAAEC,QAAQ,EAAE;AAAZ,CAAvB;;AAEA,MAAMC,IAAI,GAAG,QAAsF;EAAA,IAArF;IAAEC,IAAF;IAAQC,MAAR;IAAgBC,MAAhB;IAAwBC,QAAQ,GAAG,CAAnC;IAAsCC,OAAtC;IAA+CC,SAA/C;IAA0DC;EAA1D,CAAqF;EAAA,IAAbC,MAAa;;EACjG,MAAMC,GAAG,GAAGnB,MAAM,CAAC,IAAD,CAAlB;EAEA;;EAEA,MAAMoB,iBAA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Plot.js","names":["React","useLayoutEffect","useRef","useCallback","PropTypes","Plotly","createPlotlyComponent","withStyles","styles","PlotGraph","plotGraphStyle","position","Plot","data","layout","config","revision","onHover","onUnHover","afterPlot","others","ref","afterPlotInternal","propTypes","arrayOf","instanceOf","Object","isRequired","func","number","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,OAAOA,KAAK,IAAIC,eAAe,EAAEC,MAAM,EAAEC,WAAW,QAAQ,OAAO;AACnE,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,MAAM,MAAM,sBAAsB;AACzC,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,MAAM,MAAM,UAAU;AAAC;AAE9B,MAAMC,SAAS,GAAGH,qBAAqB,CAACD,MAAM,CAAC;AAE/C,MAAMK,cAAc,GAAG;EAAEC,QAAQ,EAAE;AAAW,CAAC;AAE/C,MAAMC,IAAI,GAAG,QAAsF;EAAA,IAArF;MAAEC,IAAI;MAAEC,MAAM;MAAEC,MAAM;MAAEC,QAAQ,GAAG,CAAC;MAAEC,OAAO;MAAEC,SAAS;MAAEC;IAAqB,CAAC;IAARC,MAAM;EAC1F,MAAMC,GAAG,GAAGnB,MAAM,CAAC,IAAI,CAAC;;EAExB;;EAEA,MAAMoB,iBAAiB,GAAGnB,WAAW,CAAC,MAAM;IAC1CgB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAGE,GAAG,CAAC;EAClB,CAAC,EAAE,CAACF,SAAS,CAAC,CAAC;;EAEf;;EAEA;AACF;AACA;AACA;EACE;EACAlB,eAAe,CAACqB,iBAAiB,EAAE,EAAE,CAAC;EAEtC,oBACE,KAAC,SAAS;IACR,GAAG,EAAED,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,GAAGG,iBAAiB,GAAG,IAAK;IAC1D,KAAK,EAAEZ;EAAe,GAClBU,MAAM,EACV;AAEN,CAAC;AAED,wCAAAR,IAAI,CAACW,SAAS,GAAG;EACf;AACF;AACA;EACEV,IAAI,EAAET,SAAS,CAACoB,OAAO,CAACpB,SAAS,CAACqB,UAAU,CAACC,MAAM,CAAC,CAAC,CAACC,UAAU;EAChE;AACF;AACA;EACEb,MAAM,EAAEV,SAAS,CAACqB,UAAU,CAACC,MAAM,CAAC,CAACC,UAAU;EAC/C;AACF;AACA;EACEZ,MAAM,EAAEX,SAAS,CAACqB,UAAU,CAACC,MAAM,CAAC,CAACC,UAAU;EAC/C;AACF;AACA;EACEV,OAAO,EAAEb,SAAS,CAACwB,IAAI;EACvB;AACF;AACA;EACEV,SAAS,EAAEd,SAAS,CAACwB,IAAI;EACzB;AACF;AACA;EACET,SAAS,EAAEf,SAAS,CAACwB,IAAI;EACzB;AACF;AACA;EACEZ,QAAQ,EAAEZ,SAAS,CAACyB;AACtB,CAAC;AAED,eAAetB,UAAU,CAACC,MAAM,EAAE;EAAEsB,IAAI,EAAE;AAAc,CAAC,CAAC,CAAClB,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Chart/Plot/index.js"],"sourcesContent":["export { default } from \"./Plot\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,QAAxB"}
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Chart/Plot/index.js"],"sourcesContent":["export { default } from \"./Plot\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,QAAQ"}
@@ -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,MAAMA,MAAM,GAAG,EAAf;AAEA,eAAeA,MAAf"}
1
+ {"version":3,"file":"styles.js","names":["styles"],"sources":["../../../../src/Chart/Plot/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,CAAC,CAAC;AAEjB,eAAeA,MAAM"}
@@ -1,4 +1,3 @@
1
- import "core-js/modules/web.dom-collections.iterator.js";
2
1
  import React, { memo } from "react";
3
2
  import PropTypes from "prop-types";
4
3
  import { withStyles } from "@mui/styles";
@@ -6,13 +5,11 @@ import { HvTypography } from "@hitachivantara/uikit-react-core";
6
5
  import styles from "./styles";
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
8
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
-
10
8
  const MultiTooltip = ({
11
9
  classes,
12
10
  data
13
11
  }) => {
14
12
  var _data$elements;
15
-
16
13
  return /*#__PURE__*/_jsxs("div", {
17
14
  className: classes.root,
18
15
  children: [/*#__PURE__*/_jsx("div", {
@@ -53,7 +50,6 @@ const MultiTooltip = ({
53
50
  })]
54
51
  });
55
52
  };
56
-
57
53
  process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
58
54
  /**
59
55
  * A Jss Object used to override or extend the styles applied.
@@ -63,43 +59,35 @@ process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
63
59
  * Styles applied to the root.
64
60
  */
65
61
  root: PropTypes.string,
66
-
67
62
  /**
68
63
  * Styles applied to the title.
69
64
  */
70
65
  title: PropTypes.string,
71
-
72
66
  /**
73
67
  * Styles applied to the values container.
74
68
  */
75
69
  valuesContainer: PropTypes.string,
76
-
77
70
  /**
78
71
  * Styling applied to the elements describing a data.
79
72
  */
80
73
  valueNameWrapper: PropTypes.string,
81
-
82
74
  /**
83
75
  * Styles applied to the values.
84
76
  */
85
77
  values: PropTypes.string,
86
-
87
78
  /**
88
79
  * Styles applied to the color.
89
80
  */
90
81
  color: PropTypes.string,
91
-
92
82
  /**
93
83
  * Styles applied to the separator between color and title.
94
84
  */
95
85
  separatorColor: PropTypes.string,
96
-
97
86
  /**
98
87
  * Styles applied to the separator.
99
88
  */
100
89
  separator: PropTypes.string
101
90
  }).isRequired,
102
-
103
91
  /**
104
92
  * Data of the tooltip.
105
93
  */
@@ -108,7 +96,6 @@ process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
108
96
  * Styles applied to the barchart root class.
109
97
  */
110
98
  title: PropTypes.string,
111
-
112
99
  /**
113
100
  * Values of tooltip
114
101
  */
@@ -117,12 +104,10 @@ process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
117
104
  * Color (in hex).
118
105
  */
119
106
  color: PropTypes.string,
120
-
121
107
  /**
122
108
  * Name.
123
109
  */
124
110
  name: PropTypes.string,
125
-
126
111
  /**
127
112
  * Value.
128
113
  */
@@ -130,9 +115,7 @@ process.env.NODE_ENV !== "production" ? MultiTooltip.propTypes = {
130
115
  }))
131
116
  }).isRequired
132
117
  } : void 0;
133
-
134
118
  const arePropsEqual = (prevProps, nextProps) => prevProps.data === nextProps.data;
135
-
136
119
  export default withStyles(styles, {
137
120
  name: "HvChartMultiTooltip"
138
121
  })( /*#__PURE__*/memo(MultiTooltip, arePropsEqual));
@@ -1 +1 @@
1
- {"version":3,"file":"MultiTooltip.js","names":["React","memo","PropTypes","withStyles","HvTypography","styles","MultiTooltip","classes","data","root","title","valuesContainer","elements","map","element","values","valueNameWrapper","color","backgroundColor","separatorColor","name","separator","value","propTypes","shape","string","isRequired","arrayOf","number","arePropsEqual","prevProps","nextProps"],"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,OAAOA,KAAP,IAAgBC,IAAhB,QAA4B,OAA5B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,YAAT,QAA6B,kCAA7B;AACA,OAAOC,MAAP,MAAmB,UAAnB;;;;AAEA,MAAMC,YAAY,GAAG,CAAC;EAAEC,OAAF;EAAWC;AAAX,CAAD;EAAA;;EAAA,oBACnB;IAAK,SAAS,EAAED,OAAO,CAACE,IAAxB;IA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b,SAAS,CAACuB,MApBK;;IAqBvB;AACJ;AACA;IACIR,KAAK,EAAEf,SAAS,CAACuB,MAxBM;;IAyBvB;AACJ;AACA;IACIN,cAAc,EAAEjB,SAAS,CAACuB,MA5BH;;IA6BvB;AACJ;AACA;IACIJ,SAAS,EAAEnB,SAAS,CAACuB;EAhCE,CAAhB,EAiCNC,UArCoB;;EAsCvB;AACF;AACA;EACElB,IAAI,EAAEN,SAAS,CAACsB,KAAV,CAAgB;IACpB;AACJ;AACA;IACId,KAAK,EAAER,SAAS,CAACuB,MAJG;;IAKpB;AACJ;AACA;IACIb,QAAQ,EAAEV,SAAS,CAACyB,OAAV,CACRzB,SAAS,CAACsB,KAAV,CAAgB;MACd;AACR;AACA;MACQP,KAAK,EAAEf,SAAS,CAACuB,MAJH;;MAKd;AACR;AACA;MACQL,IAAI,EAAElB,SAAS,CAACuB,MARF;;MASd;AACR;AACA;MACQH,KAAK,EAAEpB,SAAS,CAAC0B;IAZH,CAAhB,CADQ;EARU,CAAhB,EAwBHF;AAjEoB,CAAzB;;AAoEA,MAAMG,aAAa,GAAG,CAACC,SAAD,EAAYC,SAAZ,KAA0BD,SAAS,CAACtB,IAAV,KAAmBuB,SAAS,CAACvB,IAA7E;;AAEA,eAAeL,UAAU,CAACE,MAAD,EAAS;EAAEe,IAAI,EAAE;AAAR,CAAT,CAAV,eACbnB,IAAI,CAACK,YAAD,EAAeuB,aAAf,CADS,CAAf"}
1
+ {"version":3,"file":"MultiTooltip.js","names":["React","memo","PropTypes","withStyles","HvTypography","styles","MultiTooltip","classes","data","root","title","valuesContainer","elements","map","element","values","valueNameWrapper","color","backgroundColor","separatorColor","name","separator","value","propTypes","shape","string","isRequired","arrayOf","number","arePropsEqual","prevProps","nextProps"],"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,OAAOA,KAA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AO,EAAEL,SAAS,CAACsB,KAAK,CAAC;IACvB;AACJ;AACA;IACIf,IAAI,EAAEP,SAAS,CAACuB,MAAM;IACtB;AACJ;AACA;IACIf,KAAK,EAAER,SAAS,CAACuB,MAAM;IACvB;AACJ;AACA;IACId,eAAe,EAAET,SAAS,CAACuB,MAAM;IACjC;AACJ;AACA;IACIT,gBAAgB,EAAEd,SAAS,CAACuB,MAAM;IAClC;AACJ;AACA;IACIV,MAAM,EAAEb,SAAS,CAACuB,MAAM;IACxB;AACJ;AACA;IACIR,KAAK,EAAEf,SAAS,CAACuB,MAAM;IACvB;AACJ;AACA;IACIN,cAAc,EAAEjB,SAAS,CAACuB,MAAM;IAChC;AACJ;AACA;IACIJ,SAAS,EAAEnB,SAAS,CAACuB;EACvB,CAAC,CAAC,CAACC,UAAU;EACb;AACF;AACA;EACElB,IAAI,EAAEN,SAAS,CAACsB,KAAK,CAAC;IACpB;AACJ;AACA;IACId,KAAK,EAAER,SAAS,CAACuB,MAAM;IACvB;AACJ;AACA;IACIb,QAAQ,EAAEV,SAAS,CAACyB,OAAO,CACzBzB,SAAS,CAACsB,KAAK,CAAC;MACd;AACR;AACA;MACQP,KAAK,EAAEf,SAAS,CAACuB,MAAM;MACvB;AACR;AACA;MACQL,IAAI,EAAElB,SAAS,CAACuB,MAAM;MACtB;AACR;AACA;MACQH,KAAK,EAAEpB,SAAS,CAAC0B;IACnB,CAAC,CAAC;EAEN,CAAC,CAAC,CAACF;AACL,CAAC;AAED,MAAMG,aAAa,GAAG,CAACC,SAAS,EAAEC,SAAS,KAAKD,SAAS,CAACtB,IAAI,KAAKuB,SAAS,CAACvB,IAAI;AAEjF,eAAeL,UAAU,CAACE,MAAM,EAAE;EAAEe,IAAI,EAAE;AAAsB,CAAC,CAAC,eAChEnB,IAAI,CAACK,YAAY,EAAEuB,aAAa,CAAC,CAClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default"],"sources":["../../../../../src/Chart/Tooltip/MultiTooltip/index.js"],"sourcesContent":["export { default } from \"./MultiTooltip\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,gBAAxB"}
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../../src/Chart/Tooltip/MultiTooltip/index.js"],"sourcesContent":["export { default } from \"./MultiTooltip\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,gBAAgB"}
@@ -36,6 +36,5 @@ const styles = theme => ({
36
36
  width: "5px"
37
37
  }
38
38
  });
39
-
40
39
  export default styles;
41
40
  //# 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":"AAAA,MAAMA,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,eAAe,EAAEF,KAAK,CAACG,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KADzC;IAEJC,KAAK,EAAE,aAFH;IAGJC,SAAS,EAAER,KAAK,CAACG,EAAN,CAASM,OAAT,CAAiB,CAAjB,CAHP;IAIJC,MAAM,EAAE;EAJJ,CADmB;EAOzBC,KAAK,EAAE;IACLC,OAAO,EAAEZ,KAAK,CAACa,SAAN,CAAgB,MAAhB,EAAwB,IAAxB,CADJ;IAELC,YAAY,EAAG,aAAYd,KAAK,CAACG,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BU,KAAM;EAFxD,CAPkB;EAWzBC,eAAe,EAAE;IACfJ,OAAO,EAAEZ,KAAK,CAACG,EAAN,CAASc,OAAT,CAAiBC;EADX,CAXQ;EAczBC,MAAM,EAAE;IACNC,OAAO,EAAE,MADH;IAENC,cAAc,EAAE,eAFV;IAGNC,UAAU,EAAE,QAHN;IAINC,aAAa,EAAEvB,KAAK,CAACG,EAAN,CAASc,OAAT,CAAiBC,EAJ1B;IAKN,gBAAgB;MACdK,aAAa,EAAE;IADD;EALV,CAdiB;EAuBzBC,gBAAgB,EAAE;IAChBJ,OAAO,EAAE,MADO;IAEhBE,UAAU,EAAE;EAFI,CAvBO;EA2BzBG,KAAK,EAAE;IACLlB,KAAK,EAAEP,KAAK,CAACG,EAAN,CAASc,OAAT,CAAiBS,EADnB;IAELC,MAAM,EAAE3B,KAAK,CAACG,EAAN,CAASc,OAAT,CAAiBS;EAFpB,CA3BkB;EA+BzBE,SAAS,EAAE;IACTrB,KAAK,EAAEP,KAAK,CAACG,EAAN,CAASc,OAAT,CAAiBS;EADf,CA/Bc;EAkCzBG,cAAc,EAAE;IACdtB,KAAK,EAAE;EADO;AAlCS,CAAZ,CAAf;;AAuCA,eAAeR,MAAf"}
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,KAAP,IAAgBC,IAAhB,QAA4B,OAA5B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,YAAT,QAA6B,kCAA7B;AACA,OAAOC,MAAP,MAAmB,UAAnB;;;;AAEA,MAAMC,aAAa,GAAG,CAAC;EAAEC,OAAF;EAAWC,KAAX;EAAkBC;AAAlB,CAAD,kBACpB;EAAK,SAAS,EAAEF,OAAO,CAACG,IAAxB;EAAA,wBACE;IAAA,uBACE,KAAC,YAAD;MAAc,OAAO,EAAC,eAAtB;MAAA,UAAuCF;IAAvC;EADF,EADF,eAIE;IAAK,SAAS,EAAED,OAAO,CAACI;EAAxB,EAJF,eAKE;IAAA,uBACE,KAAC,YAAD;MAAA,UAAeF;IAAf;EADF,EALF;AAAA,EADF;;AAYA,wCAAAH,aAAa,CAACM,SAAd,GAA0B;EACxB;AACF;AACA;EACEL,OAAO,EAAEL,SAAS,CAACW,KAAV,CAAgB;IACvB;AACJ;AACA;IACIH,IAAI,EAAER,SAAS,CAACY,MAJO;;IAKvB;AACJ;AACA;IACIH,SAAS,EAAET,SAAS,CAACY;EARE,CAAhB,EASNC,UAbqB;;EAcxB;AACF;AACA;EACEP,KAAK,EAAEN,SAAS,CAACY,MAAV,CAAiBC,UAjBA;;EAkBxB;AACF;AACA;EACEN,KAAK,EAAEP,SAAS,CAACc,MAAV,CAAiBD;AArBA,CAA1B;;AAwBA,MAAME,aAAa,GAAG,CAACC,SAAD,EAAYC,SAAZ,KACpBD,SAAS,CAACV,KAAV,KAAoBW,SAAS,CAACX,KAA9B,IAAuCU,SAAS,CAACT,KAAV,KAAoBU,SAAS,CAACV,KADvE;;AAGA,eAAeN,UAAU,CAACE,MAAD,EAAS;EAAEe,IAAI,EAAE;AAAR,CAAT,CAAV,eACbnB,IAAI,CAACK,aAAD,EAAgBW,aAAhB,CADS,CAAf"}
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,OAAT,QAAwB,iBAAxB"}
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"}
@@ -11,6 +11,5 @@ const styles = theme => ({
11
11
  width: theme.hv.spacing.xs
12
12
  }
13
13
  });
14
-
15
14
  export default styles;
16
15
  //# sourceMappingURL=styles.js.map
@@ -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,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAEF,KAAK,CAACG,EAAN,CAASC,OAAT,CAAiBC,EADtB;IAEJC,OAAO,EAAE,MAFL;IAGJC,eAAe,EAAEP,KAAK,CAACG,EAAN,CAASK,OAAT,CAAiBC,UAAjB,CAA4BC,KAHzC;IAIJC,SAAS,EAAEX,KAAK,CAACG,EAAN,CAASS,OAAT,CAAiB,CAAjB,CAJP;IAKJC,KAAK,EAAE,aALH;IAMJC,MAAM,EAAE;EANJ,CADmB;EASzBC,SAAS,EAAE;IACTF,KAAK,EAAEb,KAAK,CAACG,EAAN,CAASC,OAAT,CAAiBY;EADf;AATc,CAAZ,CAAf;;AAcA,eAAejB,MAAf"}
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":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,MAA3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,CAAhB,EASVA,UAlDmB;;EAmDtB;AACF;AACA;EACEvB,SAAS,EAAEV,SAAS,CAACsC,IAtDC;;EAuDtB;AACF;AACA;EACE3B,OAAO,EAAEX,SAAS,CAACuC;AA1DG,CAAxB;AA6DAjC,WAAW,CAACkC,YAAZ,GAA2B;EACzB9B,SAAS,EAAE;AADc,CAA3B;AAIA,eAAeT,UAAU,CAACG,MAAD,EAAS;EAAEgC,IAAI,EAAE;AAAR,CAAT,CAAV,CAA+C9B,WAA/C,CAAf"}
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;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AO;EAAC,EACnB;AAEV,CAAC;AAED,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,OAAT,QAAwB,WAAxB"}
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,OADN;IAEJC,MAAM,EAAE,GAFJ;IAGJC,aAAa,EAAE;EAHX;AADO,CAAf;AAQA,eAAeJ,MAAf"}
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"}