@hitachivantara/uikit-react-viz 4.0.4 → 4.1.1

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 (70) hide show
  1. package/dist/Chart/Chart.js +2 -1
  2. package/dist/Chart/Chart.js.map +1 -1
  3. package/dist/Chart/Plot/Plot.js +1 -1
  4. package/dist/Chart/Plot/Plot.js.map +1 -1
  5. package/dist/ConfusionMatrix/ConfusionMatrix.d.ts +10 -0
  6. package/dist/ConfusionMatrix/ConfusionMatrix.js +102 -0
  7. package/dist/ConfusionMatrix/ConfusionMatrix.js.map +1 -0
  8. package/dist/ConfusionMatrix/CustomTooltip/CustomTooltip.js +47 -0
  9. package/dist/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +1 -0
  10. package/dist/ConfusionMatrix/CustomTooltip/index.js +14 -0
  11. package/dist/ConfusionMatrix/CustomTooltip/index.js.map +1 -0
  12. package/dist/ConfusionMatrix/CustomTooltip/styles.js +26 -0
  13. package/dist/ConfusionMatrix/CustomTooltip/styles.js.map +1 -0
  14. package/dist/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +189 -0
  15. package/dist/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +1 -0
  16. package/dist/ConfusionMatrix/index.d.ts +2 -0
  17. package/dist/ConfusionMatrix/index.js +14 -0
  18. package/dist/ConfusionMatrix/index.js.map +1 -0
  19. package/dist/ConfusionMatrix/styles.js +10 -0
  20. package/dist/ConfusionMatrix/styles.js.map +1 -0
  21. package/dist/index.d.ts +3 -0
  22. package/dist/index.js +7 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/legacy/Chart/Chart.js +2 -1
  25. package/dist/legacy/Chart/Chart.js.map +1 -1
  26. package/dist/legacy/Chart/Plot/Plot.js +1 -1
  27. package/dist/legacy/Chart/Plot/Plot.js.map +1 -1
  28. package/dist/legacy/ConfusionMatrix/ConfusionMatrix.d.ts +10 -0
  29. package/dist/legacy/ConfusionMatrix/ConfusionMatrix.js +87 -0
  30. package/dist/legacy/ConfusionMatrix/ConfusionMatrix.js.map +1 -0
  31. package/dist/legacy/ConfusionMatrix/CustomTooltip/CustomTooltip.js +39 -0
  32. package/dist/legacy/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +1 -0
  33. package/dist/legacy/ConfusionMatrix/CustomTooltip/index.js +2 -0
  34. package/dist/legacy/ConfusionMatrix/CustomTooltip/index.js.map +1 -0
  35. package/dist/legacy/ConfusionMatrix/CustomTooltip/styles.js +19 -0
  36. package/dist/legacy/ConfusionMatrix/CustomTooltip/styles.js.map +1 -0
  37. package/dist/legacy/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +181 -0
  38. package/dist/legacy/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +1 -0
  39. package/dist/legacy/ConfusionMatrix/index.d.ts +2 -0
  40. package/dist/legacy/ConfusionMatrix/index.js +2 -0
  41. package/dist/legacy/ConfusionMatrix/index.js.map +1 -0
  42. package/dist/legacy/ConfusionMatrix/styles.js +3 -0
  43. package/dist/legacy/ConfusionMatrix/styles.js.map +1 -0
  44. package/dist/legacy/index.d.ts +3 -0
  45. package/dist/legacy/index.js +1 -0
  46. package/dist/legacy/index.js.map +1 -1
  47. package/dist/modern/Chart/Chart.js +2 -1
  48. package/dist/modern/Chart/Chart.js.map +1 -1
  49. package/dist/modern/Chart/Plot/Plot.js +1 -1
  50. package/dist/modern/Chart/Plot/Plot.js.map +1 -1
  51. package/dist/modern/ConfusionMatrix/ConfusionMatrix.d.ts +10 -0
  52. package/dist/modern/ConfusionMatrix/ConfusionMatrix.js +76 -0
  53. package/dist/modern/ConfusionMatrix/ConfusionMatrix.js.map +1 -0
  54. package/dist/modern/ConfusionMatrix/CustomTooltip/CustomTooltip.js +37 -0
  55. package/dist/modern/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +1 -0
  56. package/dist/modern/ConfusionMatrix/CustomTooltip/index.js +2 -0
  57. package/dist/modern/ConfusionMatrix/CustomTooltip/index.js.map +1 -0
  58. package/dist/modern/ConfusionMatrix/CustomTooltip/styles.js +17 -0
  59. package/dist/modern/ConfusionMatrix/CustomTooltip/styles.js.map +1 -0
  60. package/dist/modern/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +154 -0
  61. package/dist/modern/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +1 -0
  62. package/dist/modern/ConfusionMatrix/index.d.ts +2 -0
  63. package/dist/modern/ConfusionMatrix/index.js +2 -0
  64. package/dist/modern/ConfusionMatrix/index.js.map +1 -0
  65. package/dist/modern/ConfusionMatrix/styles.js +3 -0
  66. package/dist/modern/ConfusionMatrix/styles.js.map +1 -0
  67. package/dist/modern/index.d.ts +3 -0
  68. package/dist/modern/index.js +1 -0
  69. package/dist/modern/index.js.map +1 -1
  70. package/package.json +5 -5
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import React, { useLayoutEffect, useRef, useCallback } from "react";
7
7
  import PropTypes from "prop-types";
8
- import Plotly from "plotly.js-basic-dist";
8
+ import Plotly from "plotly.js-dist-min";
9
9
  import createPlotlyComponent from "react-plotly.js/factory";
10
10
  import { withStyles } from "@mui/styles";
11
11
  import styles from "./styles";
@@ -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,KAAK,IAAIC,eAAe,EAAEC,MAAM,EAAEC,WAA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U;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
+ {"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-dist-min\";\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,oBAAoB;AACvC,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"}
@@ -0,0 +1,10 @@
1
+ import { HvChartProps } from "../Chart";
2
+
3
+ export interface HvConfusionMatrixProps extends HvChartProps {
4
+ /**
5
+ *
6
+ */
7
+ deltaMatrix?: number[][];
8
+ }
9
+
10
+ export default function HvConfusionMatrixProps(props: HvConfusionMatrixProps): JSX.Element | null;
@@ -0,0 +1,76 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ const _excluded = ["id", "classes", "data", "layout", "config", "tooltip", "deltaMatrix"];
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+ import React, { useMemo } from "react";
7
+ import PropTypes from "prop-types";
8
+ import { withStyles } from "@mui/styles";
9
+ import { useTheme } from "@mui/material/styles";
10
+ import Chart from "../Chart";
11
+ import CustomTooltip from "./CustomTooltip";
12
+ import { applyDataDefaults, applyLayoutDefaults } from "./confusionMatrixPlotlyOverrides";
13
+ import styles from "./styles";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ const ConfusionMatrix = _ref => {
16
+ let {
17
+ id,
18
+ classes,
19
+ data,
20
+ layout,
21
+ config,
22
+ tooltip,
23
+ deltaMatrix
24
+ } = _ref,
25
+ others = _objectWithoutProperties(_ref, _excluded);
26
+ const theme = useTheme();
27
+ const dataWithDefaults = useMemo(() => applyDataDefaults(data, theme, deltaMatrix), [data, theme, deltaMatrix]);
28
+ const layoutWithDefaults = useMemo(() => applyLayoutDefaults(layout, theme, dataWithDefaults, deltaMatrix), [layout, theme, dataWithDefaults, deltaMatrix]);
29
+ return /*#__PURE__*/_jsx(Chart, _objectSpread({
30
+ id: id,
31
+ classes: classes,
32
+ data: dataWithDefaults,
33
+ layout: layoutWithDefaults,
34
+ config: config,
35
+ tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : tooltipData => /*#__PURE__*/_jsx(CustomTooltip, {
36
+ data: tooltipData,
37
+ deltaMatrix: !!deltaMatrix
38
+ })
39
+ }, others));
40
+ };
41
+ process.env.NODE_ENV !== "production" ? ConfusionMatrix.propTypes = {
42
+ /**
43
+ *
44
+ */
45
+ id: PropTypes.string,
46
+ /**
47
+ *
48
+ */
49
+ classes: PropTypes.shape({
50
+ root: PropTypes.string
51
+ }),
52
+ /**
53
+ *
54
+ */
55
+ data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,
56
+ /**
57
+ *
58
+ */
59
+ layout: PropTypes.instanceOf(Object),
60
+ /**
61
+ *
62
+ */
63
+ config: PropTypes.instanceOf(Object),
64
+ /**
65
+ *
66
+ */
67
+ tooltip: PropTypes.func,
68
+ /**
69
+ *
70
+ */
71
+ deltaMatrix: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))
72
+ } : void 0;
73
+ export default withStyles(styles, {
74
+ name: "HvConfusionMatrix"
75
+ })(ConfusionMatrix);
76
+ //# sourceMappingURL=ConfusionMatrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfusionMatrix.js","names":["React","useMemo","PropTypes","withStyles","useTheme","Chart","CustomTooltip","applyDataDefaults","applyLayoutDefaults","styles","ConfusionMatrix","id","classes","data","layout","config","tooltip","deltaMatrix","others","theme","dataWithDefaults","layoutWithDefaults","tooltipData","propTypes","string","shape","root","arrayOf","instanceOf","Object","isRequired","func","number","name"],"sources":["../../../src/ConfusionMatrix/ConfusionMatrix.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport { useTheme } from \"@mui/material/styles\";\nimport Chart from \"../Chart\";\nimport CustomTooltip from \"./CustomTooltip\";\nimport { applyDataDefaults, applyLayoutDefaults } from \"./confusionMatrixPlotlyOverrides\";\nimport styles from \"./styles\";\n\nconst ConfusionMatrix = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltip,\n deltaMatrix,\n ...others\n}) => {\n const theme = useTheme();\n const dataWithDefaults = useMemo(\n () => applyDataDefaults(data, theme, deltaMatrix),\n [data, theme, deltaMatrix]\n );\n const layoutWithDefaults = useMemo(\n () => applyLayoutDefaults(layout, theme, dataWithDefaults, deltaMatrix),\n [layout, theme, dataWithDefaults, deltaMatrix]\n );\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={dataWithDefaults}\n layout={layoutWithDefaults}\n config={config}\n tooltip={\n tooltip ??\n ((tooltipData) => <CustomTooltip data={tooltipData} deltaMatrix={!!deltaMatrix} />)\n }\n {...others}\n />\n );\n};\n\nConfusionMatrix.propTypes = {\n /**\n *\n */\n id: PropTypes.string,\n /**\n *\n */\n classes: PropTypes.shape({\n root: PropTypes.string,\n }),\n /**\n *\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n *\n */\n layout: PropTypes.instanceOf(Object),\n /**\n *\n */\n config: PropTypes.instanceOf(Object),\n /**\n *\n */\n tooltip: PropTypes.func,\n /**\n *\n */\n deltaMatrix: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)),\n};\n\nexport default withStyles(styles, { name: \"HvConfusionMatrix\" })(ConfusionMatrix);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,OAAOC,KAAK,MAAM,UAAU;AAC5B,OAAOC,aAAa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OAAO,CAACzB,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC,CAAC,CAACC,UAAU;EAChE;AACF;AACA;EACEhB,MAAM,EAAEZ,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACEd,MAAM,EAAEb,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACEb,OAAO,EAAEd,SAAS,CAAC6B,IAAI;EACvB;AACF;AACA;EACEd,WAAW,EAAEf,SAAS,CAACyB,OAAO,CAACzB,SAAS,CAACyB,OAAO,CAACzB,SAAS,CAAC8B,MAAM,CAAC;AACpE,CAAC;AAED,eAAe7B,UAAU,CAACM,MAAM,EAAE;EAAEwB,IAAI,EAAE;AAAoB,CAAC,CAAC,CAACvB,eAAe,CAAC"}
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { HvTypography } from "@hitachivantara/uikit-react-core";
4
+ import useStyles from "./styles";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const CustomTooltip = ({
7
+ data,
8
+ deltaMatrix
9
+ }) => {
10
+ const classes = useStyles();
11
+ const [element] = data.elements;
12
+ const value = deltaMatrix && data.title !== element.value ? 0 - element.zValue : element.zValue;
13
+ const oneLiner = `${data.title} - ${element.value}: ${value}`;
14
+ return /*#__PURE__*/_jsx("div", {
15
+ className: classes.root,
16
+ children: /*#__PURE__*/_jsx("div", {
17
+ className: classes.container,
18
+ children: /*#__PURE__*/_jsx("div", {
19
+ children: /*#__PURE__*/_jsx(HvTypography, {
20
+ children: oneLiner
21
+ })
22
+ })
23
+ })
24
+ });
25
+ };
26
+ process.env.NODE_ENV !== "production" ? CustomTooltip.propTypes = {
27
+ data: PropTypes.shape({
28
+ title: PropTypes.string,
29
+ elements: PropTypes.arrayOf(PropTypes.shape({
30
+ value: PropTypes.string,
31
+ zValue: PropTypes.number
32
+ }))
33
+ }),
34
+ deltaMatrix: PropTypes.bool
35
+ } : void 0;
36
+ export default CustomTooltip;
37
+ //# sourceMappingURL=CustomTooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomTooltip.js","names":["React","PropTypes","HvTypography","useStyles","CustomTooltip","data","deltaMatrix","classes","element","elements","value","title","zValue","oneLiner","root","container","propTypes","shape","string","arrayOf","number","bool"],"sources":["../../../../src/ConfusionMatrix/CustomTooltip/CustomTooltip.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { HvTypography } from \"@hitachivantara/uikit-react-core\";\n\nimport useStyles from \"./styles\";\n\nconst CustomTooltip = ({ data, deltaMatrix }) => {\n const classes = useStyles();\n const [element] = data.elements;\n const value = deltaMatrix && data.title !== element.value ? 0 - element.zValue : element.zValue;\n const oneLiner = `${data.title} - ${element.value}: ${value}`;\n return (\n <div className={classes.root}>\n <div className={classes.container}>\n <div>\n <HvTypography>{oneLiner}</HvTypography>\n </div>\n </div>\n </div>\n );\n};\n\nCustomTooltip.propTypes = {\n data: PropTypes.shape({\n title: PropTypes.string,\n elements: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.string,\n zValue: PropTypes.number,\n })\n ),\n }),\n deltaMatrix: PropTypes.bool,\n};\n\nexport default CustomTooltip;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,kCAAkC;AAE/D,OAAOC,SAAS,MAAM,UAAU;AAAC;AAEjC,MAAMC,aAAa,GAAG,CAAC;EAAEC,IAAI;EAAEC;AAAY,CAAC,KAAK;EAC/C,MAAMC,OAAO,GAAGJ,SAAS,EAAE;EAC3B,MAAM,CAACK,OAAO,CAAC,GAAGH,IAAI,CAACI,QAAQ;EAC/B,MAAMC,KAAK,GAAGJ,WAAW,IAAID,IAAI,CAACM,KAAK,KAAKH,OAAO,CAACE,KAAK,GAAG,CAAC,GAAGF,OAAO,CAACI,MAAM,GAAGJ,OAAO,CAACI,MAAM;EAC/F,MAAMC,QAAQ,GAAI,GAAER,IAAI,CAACM,KAAM,MAAKH,OAAO,CAACE,KAAM,KAAIA,KAAM,EAAC;EAC7D,oBACE;IAAK,SAAS,EAAEH,OAAO,CAACO,IAAK;IAAA,uBAC3B;MAAK,SAAS,EAAEP,OAAO,CAACQ,SAAU;MAAA,uBAChC;QAAA,uBACE,KAAC,YAAY;UAAA,UAAEF;QAAQ;MAAgB;IACnC;EACF,EACF;AAEV,CAAC;AAED,wCAAAT,aAAa,CAACY,SAAS,GAAG;EACxBX,IAAI,EAAEJ,SAAS,CAACgB,KAAK,CAAC;IACpBN,KAAK,EAAEV,SAAS,CAACiB,MAAM;IACvBT,QAAQ,EAAER,SAAS,CAACkB,OAAO,CACzBlB,SAAS,CAACgB,KAAK,CAAC;MACdP,KAAK,EAAET,SAAS,CAACiB,MAAM;MACvBN,MAAM,EAAEX,SAAS,CAACmB;IACpB,CAAC,CAAC;EAEN,CAAC,CAAC;EACFd,WAAW,EAAEL,SAAS,CAACoB;AACzB,CAAC;AAED,eAAejB,aAAa"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./CustomTooltip";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/ConfusionMatrix/CustomTooltip/index.js"],"sourcesContent":["export { default } from \"./CustomTooltip\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,iBAAiB"}
@@ -0,0 +1,17 @@
1
+ import { makeStyles } from "@mui/styles";
2
+ const useStyles = makeStyles(theme => ({
3
+ root: {
4
+ backgroundColor: theme.hv.palette.atmosphere.atmo1,
5
+ width: "fit-content",
6
+ minWidth: 150,
7
+ boxShadow: theme.hv.shadows[1],
8
+ zIndex: 1000
9
+ },
10
+ container: {
11
+ padding: theme.hvSpacing("15px", "sm"),
12
+ display: "flex",
13
+ flexDirection: "column"
14
+ }
15
+ }));
16
+ export default useStyles;
17
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["makeStyles","useStyles","theme","root","backgroundColor","hv","palette","atmosphere","atmo1","width","minWidth","boxShadow","shadows","zIndex","container","padding","hvSpacing","display","flexDirection"],"sources":["../../../../src/ConfusionMatrix/CustomTooltip/styles.js"],"sourcesContent":["import { makeStyles } from \"@mui/styles\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n width: \"fit-content\",\n minWidth: 150,\n boxShadow: theme.hv.shadows[1],\n zIndex: 1000,\n },\n container: {\n padding: theme.hvSpacing(\"15px\", \"sm\"),\n display: \"flex\",\n flexDirection: \"column\",\n },\n}));\n\nexport default useStyles;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,aAAa;AAExC,MAAMC,SAAS,GAAGD,UAAU,CAAEE,KAAK,KAAM;EACvCC,IAAI,EAAE;IACJC,eAAe,EAAEF,KAAK,CAACG,EAAE,CAACC,OAAO,CAACC,UAAU,CAACC,KAAK;IAClDC,KAAK,EAAE,aAAa;IACpBC,QAAQ,EAAE,GAAG;IACbC,SAAS,EAAET,KAAK,CAACG,EAAE,CAACO,OAAO,CAAC,CAAC,CAAC;IAC9BC,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTC,OAAO,EAAEb,KAAK,CAACc,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC;IACtCC,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC,CAAC;AAEH,eAAejB,SAAS"}
@@ -0,0 +1,154 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ /* eslint-disable no-param-reassign */
5
+ import clone from "lodash/cloneDeep";
6
+ const HEX_ALPHA_50 = "80";
7
+ const HEIGHT_PER_CATEGORY = 45;
8
+ const WIDTH_PER_CATEGORY = 55;
9
+ const setterIfNil = (object, property, value) => {
10
+ var _object$property;
11
+ object[property] = (_object$property = object[property]) !== null && _object$property !== void 0 ? _object$property : value;
12
+ };
13
+ const buildAnnotations = (trace, customAnnotations, deltaMatrix = false) => {
14
+ const {
15
+ x = [],
16
+ y = [],
17
+ z = []
18
+ } = trace;
19
+ const annotations = [];
20
+ for (let i = 0; i < y.length; i += 1) {
21
+ for (let j = 0; j < x.length; j += 1) {
22
+ var _customAnnotations$te, _customAnnotations$te2, _customAnnotations$si;
23
+ const currentValue = z[i][j];
24
+ let textValue;
25
+ let size = 12;
26
+ if (currentValue > 999) {
27
+ textValue = currentValue.toExponential(1);
28
+ } else {
29
+ textValue = currentValue;
30
+ }
31
+ if (deltaMatrix) {
32
+ if (i !== j) {
33
+ textValue = 0 - textValue;
34
+ } else {
35
+ textValue = `<span style="font-weight: 600;">${textValue}</span>`;
36
+ size = 14;
37
+ }
38
+ }
39
+ const result = {
40
+ xref: "x1",
41
+ yref: "y1",
42
+ x: x[j],
43
+ y: y[i],
44
+ text: (_customAnnotations$te = customAnnotations === null || customAnnotations === void 0 ? void 0 : (_customAnnotations$te2 = customAnnotations.text) === null || _customAnnotations$te2 === void 0 ? void 0 : _customAnnotations$te2.call(customAnnotations, currentValue)) !== null && _customAnnotations$te !== void 0 ? _customAnnotations$te : textValue,
45
+ font: {
46
+ family: "Open Sans",
47
+ size: (_customAnnotations$si = customAnnotations === null || customAnnotations === void 0 ? void 0 : customAnnotations.size) !== null && _customAnnotations$si !== void 0 ? _customAnnotations$si : size,
48
+ color: customAnnotations === null || customAnnotations === void 0 ? void 0 : customAnnotations.textColor
49
+ },
50
+ showarrow: false
51
+ };
52
+ annotations.push(result);
53
+ }
54
+ }
55
+ return annotations;
56
+ };
57
+
58
+ /**
59
+ * Auxiliary functions to set the layout in order to follow the DS guideline.
60
+ */
61
+ export const applyLayoutDefaults = (inputLayout = {}, theme, data = [{}], deltaMatrix) => {
62
+ var _theme$hv, _theme$hv$palette, _theme$hv$palette$acc, _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$at;
63
+ const layout = clone(inputLayout);
64
+ setterIfNil(layout, "hovermode", "closest");
65
+ const [trace] = data;
66
+ const categories = (trace === null || trace === void 0 ? void 0 : trace.x) || [];
67
+ const squareWidth = categories.length * WIDTH_PER_CATEGORY;
68
+ const squareHeight = categories.length * HEIGHT_PER_CATEGORY;
69
+ const chartWidth = Math.max(squareWidth, WIDTH_PER_CATEGORY * 10);
70
+ const chartHeight = Math.max(squareHeight, WIDTH_PER_CATEGORY * 10);
71
+ setterIfNil(layout, "width", chartWidth);
72
+ setterIfNil(layout, "height", chartHeight);
73
+ setterIfNil(layout, "margin", {
74
+ t: 130,
75
+ b: 40,
76
+ pad: 10
77
+ });
78
+ const textColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv = theme.hv) === null || _theme$hv === void 0 ? void 0 : (_theme$hv$palette = _theme$hv.palette) === null || _theme$hv$palette === void 0 ? void 0 : (_theme$hv$palette$acc = _theme$hv$palette.accent) === null || _theme$hv$palette$acc === void 0 ? void 0 : _theme$hv$palette$acc.acce1) || "black";
79
+ const getAxisLayout = (text, standoff) => ({
80
+ color: textColor,
81
+ showline: false,
82
+ showgrid: false,
83
+ tickfont: {
84
+ family: "Open Sans",
85
+ size: 12
86
+ },
87
+ ticks: "",
88
+ title: {
89
+ text,
90
+ standoff,
91
+ font: {
92
+ family: "Open Sans",
93
+ size: 12
94
+ }
95
+ }
96
+ });
97
+ setterIfNil(layout, "yaxis", _objectSpread(_objectSpread({}, getAxisLayout("True Label", 50)), {}, {
98
+ autorange: "reversed"
99
+ }));
100
+ setterIfNil(layout, "xaxis", _objectSpread(_objectSpread({}, getAxisLayout("Predicted Label", 15)), {}, {
101
+ side: "top",
102
+ tickangle: "-45"
103
+ }));
104
+ const backgroundColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv2 = theme.hv) === null || _theme$hv2 === void 0 ? void 0 : (_theme$hv2$palette = _theme$hv2.palette) === null || _theme$hv2$palette === void 0 ? void 0 : (_theme$hv2$palette$at = _theme$hv2$palette.atmosphere) === null || _theme$hv2$palette$at === void 0 ? void 0 : _theme$hv2$palette$at.atmo1) || "white";
105
+ setterIfNil(layout, "paper_bgcolor", backgroundColor);
106
+ setterIfNil(layout, "plot_bgcolor", backgroundColor);
107
+ setterIfNil(layout, "annotations", buildAnnotations(trace, _objectSpread({
108
+ textColor
109
+ }, layout.customAnnotations || {}), deltaMatrix));
110
+ return layout;
111
+ };
112
+ const calculateDeltaMatrix = (matrix1, matrix2) => {
113
+ let deltaMin = 0;
114
+ const matrixData = matrix1.reduce((lineAcc, classLine, lineIndex) => {
115
+ const lineValues = classLine.reduce((columnAcc, columnValue, columnIndex) => {
116
+ let value = columnValue - matrix2[lineIndex][columnIndex];
117
+ deltaMin = Math.min(deltaMin, value);
118
+ if (lineIndex !== columnIndex) {
119
+ value = 0 - value;
120
+ }
121
+ return [...columnAcc, value];
122
+ }, []);
123
+ return [...lineAcc, lineValues];
124
+ }, []);
125
+ return [matrixData, deltaMin];
126
+ };
127
+ export const applyDataDefaults = (inputData = [{}], theme, deltaMatrix) => {
128
+ var _theme$hv3, _theme$hv3$palette, _theme$hv3$palette$at, _theme$hv4, _theme$hv4$viz, _theme$hv4$viz$palett, _theme$hv4$viz$palett2, _theme$hv5, _theme$hv5$viz, _theme$hv5$viz$palett, _theme$hv5$viz$palett2;
129
+ const data = clone(inputData);
130
+ const backgroundColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv3 = theme.hv) === null || _theme$hv3 === void 0 ? void 0 : (_theme$hv3$palette = _theme$hv3.palette) === null || _theme$hv3$palette === void 0 ? void 0 : (_theme$hv3$palette$at = _theme$hv3$palette.atmosphere) === null || _theme$hv3$palette$at === void 0 ? void 0 : _theme$hv3$palette$at.atmo1) || "white";
131
+ const greenColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv4 = theme.hv) === null || _theme$hv4 === void 0 ? void 0 : (_theme$hv4$viz = _theme$hv4.viz) === null || _theme$hv4$viz === void 0 ? void 0 : (_theme$hv4$viz$palett = _theme$hv4$viz.palette) === null || _theme$hv4$viz$palett === void 0 ? void 0 : (_theme$hv4$viz$palett2 = _theme$hv4$viz$palett.polarized) === null || _theme$hv4$viz$palett2 === void 0 ? void 0 : _theme$hv4$viz$palett2.cviz21) || "#008000";
132
+ const redColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv5 = theme.hv) === null || _theme$hv5 === void 0 ? void 0 : (_theme$hv5$viz = _theme$hv5.viz) === null || _theme$hv5$viz === void 0 ? void 0 : (_theme$hv5$viz$palett = _theme$hv5$viz.palette) === null || _theme$hv5$viz$palett === void 0 ? void 0 : (_theme$hv5$viz$palett2 = _theme$hv5$viz$palett.polarized) === null || _theme$hv5$viz$palett2 === void 0 ? void 0 : _theme$hv5$viz$palett2.cviz26) || "#FF0000";
133
+ data.forEach(trace => {
134
+ setterIfNil(trace, "type", "heatmap");
135
+ setterIfNil(trace, "hoverinfo", "none");
136
+ const colorscale = [[0, backgroundColor], [1, `${greenColor}${HEX_ALPHA_50}`]];
137
+ const deltaColorscale = [[0, `${redColor}${HEX_ALPHA_50}`], [0.5, backgroundColor], [1, `${greenColor}${HEX_ALPHA_50}`]];
138
+ setterIfNil(trace, "colorscale", deltaMatrix ? deltaColorscale : colorscale);
139
+ setterIfNil(trace, "showscale", false);
140
+ const [matrixData, deltaMin] = deltaMatrix ? calculateDeltaMatrix(trace.z, deltaMatrix) : [trace.z];
141
+ trace.z = matrixData;
142
+ if (deltaMatrix) {
143
+ const getMax = matrix => {
144
+ const max = Math.max(...matrix.flat());
145
+ return max < 0 ? Math.abs(deltaMin) : max;
146
+ };
147
+ setterIfNil(trace, "zmin", deltaMin);
148
+ setterIfNil(trace, "zmid", 0);
149
+ setterIfNil(trace, "zmax", getMax(matrixData));
150
+ }
151
+ });
152
+ return data;
153
+ };
154
+ //# sourceMappingURL=confusionMatrixPlotlyOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confusionMatrixPlotlyOverrides.js","names":["clone","HEX_ALPHA_50","HEIGHT_PER_CATEGORY","WIDTH_PER_CATEGORY","setterIfNil","object","property","value","buildAnnotations","trace","customAnnotations","deltaMatrix","x","y","z","annotations","i","length","j","currentValue","textValue","size","toExponential","result","xref","yref","text","font","family","color","textColor","showarrow","push","applyLayoutDefaults","inputLayout","theme","data","layout","categories","squareWidth","squareHeight","chartWidth","Math","max","chartHeight","t","b","pad","hv","palette","accent","acce1","getAxisLayout","standoff","showline","showgrid","tickfont","ticks","title","autorange","side","tickangle","backgroundColor","atmosphere","atmo1","calculateDeltaMatrix","matrix1","matrix2","deltaMin","matrixData","reduce","lineAcc","classLine","lineIndex","lineValues","columnAcc","columnValue","columnIndex","min","applyDataDefaults","inputData","greenColor","viz","polarized","cviz21","redColor","cviz26","forEach","colorscale","deltaColorscale","getMax","matrix","flat","abs"],"sources":["../../../src/ConfusionMatrix/confusionMatrixPlotlyOverrides.js"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport clone from \"lodash/cloneDeep\";\n\nconst HEX_ALPHA_50 = \"80\";\nconst HEIGHT_PER_CATEGORY = 45;\nconst WIDTH_PER_CATEGORY = 55;\n\nconst setterIfNil = (object, property, value) => {\n object[property] = object[property] ?? value;\n};\n\nconst buildAnnotations = (trace, customAnnotations, deltaMatrix = false) => {\n const { x = [], y = [], z = [] } = trace;\n const annotations = [];\n for (let i = 0; i < y.length; i += 1) {\n for (let j = 0; j < x.length; j += 1) {\n const currentValue = z[i][j];\n let textValue;\n let size = 12;\n if (currentValue > 999) {\n textValue = currentValue.toExponential(1);\n } else {\n textValue = currentValue;\n }\n\n if (deltaMatrix) {\n if (i !== j) {\n textValue = 0 - textValue;\n } else {\n textValue = `<span style=\"font-weight: 600;\">${textValue}</span>`;\n size = 14;\n }\n }\n\n const result = {\n xref: \"x1\",\n yref: \"y1\",\n x: x[j],\n y: y[i],\n text: customAnnotations?.text?.(currentValue) ?? textValue,\n font: {\n family: \"Open Sans\",\n size: customAnnotations?.size ?? size,\n color: customAnnotations?.textColor,\n },\n showarrow: false,\n };\n annotations.push(result);\n }\n }\n\n return annotations;\n};\n\n/**\n * Auxiliary functions to set the layout in order to follow the DS guideline.\n */\nexport const applyLayoutDefaults = (inputLayout = {}, theme, data = [{}], deltaMatrix) => {\n const layout = clone(inputLayout);\n setterIfNil(layout, \"hovermode\", \"closest\");\n const [trace] = data;\n\n const categories = trace?.x || [];\n const squareWidth = categories.length * WIDTH_PER_CATEGORY;\n const squareHeight = categories.length * HEIGHT_PER_CATEGORY;\n const chartWidth = Math.max(squareWidth, WIDTH_PER_CATEGORY * 10);\n const chartHeight = Math.max(squareHeight, WIDTH_PER_CATEGORY * 10);\n setterIfNil(layout, \"width\", chartWidth);\n setterIfNil(layout, \"height\", chartHeight);\n setterIfNil(layout, \"margin\", {\n t: 130,\n b: 40,\n pad: 10,\n });\n\n const textColor = theme?.hv?.palette?.accent?.acce1 || \"black\";\n\n const getAxisLayout = (text, standoff) => ({\n color: textColor,\n showline: false,\n showgrid: false,\n tickfont: {\n family: \"Open Sans\",\n size: 12,\n },\n ticks: \"\",\n title: {\n text,\n standoff,\n font: {\n family: \"Open Sans\",\n size: 12,\n },\n },\n });\n setterIfNil(layout, \"yaxis\", {\n ...getAxisLayout(\"True Label\", 50),\n autorange: \"reversed\",\n });\n setterIfNil(layout, \"xaxis\", {\n ...getAxisLayout(\"Predicted Label\", 15),\n side: \"top\",\n tickangle: \"-45\",\n });\n\n const backgroundColor = theme?.hv?.palette?.atmosphere?.atmo1 || \"white\";\n setterIfNil(layout, \"paper_bgcolor\", backgroundColor);\n setterIfNil(layout, \"plot_bgcolor\", backgroundColor);\n\n setterIfNil(\n layout,\n \"annotations\",\n buildAnnotations(trace, { textColor, ...(layout.customAnnotations || {}) }, deltaMatrix)\n );\n\n return layout;\n};\n\nconst calculateDeltaMatrix = (matrix1, matrix2) => {\n let deltaMin = 0;\n const matrixData = matrix1.reduce((lineAcc, classLine, lineIndex) => {\n const lineValues = classLine.reduce((columnAcc, columnValue, columnIndex) => {\n let value = columnValue - matrix2[lineIndex][columnIndex];\n deltaMin = Math.min(deltaMin, value);\n if (lineIndex !== columnIndex) {\n value = 0 - value;\n }\n return [...columnAcc, value];\n }, []);\n return [...lineAcc, lineValues];\n }, []);\n\n return [matrixData, deltaMin];\n};\n\nexport const applyDataDefaults = (inputData = [{}], theme, deltaMatrix) => {\n const data = clone(inputData);\n const backgroundColor = theme?.hv?.palette?.atmosphere?.atmo1 || \"white\";\n const greenColor = theme?.hv?.viz?.palette?.polarized?.cviz21 || \"#008000\";\n const redColor = theme?.hv?.viz?.palette?.polarized?.cviz26 || \"#FF0000\";\n\n data.forEach((trace) => {\n setterIfNil(trace, \"type\", \"heatmap\");\n setterIfNil(trace, \"hoverinfo\", \"none\");\n\n const colorscale = [\n [0, backgroundColor],\n [1, `${greenColor}${HEX_ALPHA_50}`],\n ];\n const deltaColorscale = [\n [0, `${redColor}${HEX_ALPHA_50}`],\n [0.5, backgroundColor],\n [1, `${greenColor}${HEX_ALPHA_50}`],\n ];\n\n setterIfNil(trace, \"colorscale\", deltaMatrix ? deltaColorscale : colorscale);\n setterIfNil(trace, \"showscale\", false);\n\n const [matrixData, deltaMin] = deltaMatrix\n ? calculateDeltaMatrix(trace.z, deltaMatrix)\n : [trace.z];\n trace.z = matrixData;\n\n if (deltaMatrix) {\n const getMax = (matrix) => {\n const max = Math.max(...matrix.flat());\n return max < 0 ? Math.abs(deltaMin) : max;\n };\n\n setterIfNil(trace, \"zmin\", deltaMin);\n setterIfNil(trace, \"zmid\", 0);\n setterIfNil(trace, \"zmax\", getMax(matrixData));\n }\n });\n\n return data;\n};\n"],"mappings":";;;AAAA;AACA,OAAOA,KAAK,MAAM,kBAAkB;AAEpC,MAAMC,YAAY,GAAG,IAAI;AACzB,MAAMC,mBAAmB,GAAG,EAAE;AAC9B,MAAMC,kBAAkB,GAAG,EAAE;AAE7B,MAAMC,WAAW,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,KAAK;EAAA;EAC/CF,MAAM,CAACC,QAAQ,CAAC,uBAAGD,MAAM,CAACC,QAAQ,CAAC,+DAAIC,KAAK;AAC9C,CAAC;AAED,MAAMC,gBAAgB,GAAG,CAACC,KAAK,EAAEC,iBAAiB,EAAEC,WAAW,GAAG,KAAK,KAAK;EAC1E,MAAM;IAAEC,CAAC,GAAG,EAAE;IAAEC,CAAC,GAAG,EAAE;IAAEC,CAAC,GAAG;EAAG,CAAC,GAAGL,KAAK;EACxC,MAAMM,WAAW,GAAG,EAAE;EACtB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,CAAC,CAACI,MAAM,EAAED,CAAC,IAAI,CAAC,EAAE;IACpC,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGN,CAAC,CAACK,MAAM,EAAEC,CAAC,IAAI,CAAC,EAAE;MAAA;MACpC,MAAMC,YAAY,GAAGL,CAAC,CAACE,CAAC,CAAC,CAACE,CAAC,CAAC;MAC5B,IAAIE,SAAS;MACb,IAAIC,IAAI,GAAG,EAAE;MACb,IAAIF,YAAY,GAAG,GAAG,EAAE;QACtBC,SAAS,GAAGD,YAAY,CAACG,aAAa,CAAC,CAAC,CAAC;MAC3C,CAAC,MAAM;QACLF,SAAS,GAAGD,YAAY;MAC1B;MAEA,IAAIR,WAAW,EAAE;Q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,CAAC,EAAG,GAAEmB,UAAW,GAAEhF,YAAa,EAAC,CAAC,CACpC;IAEDG,WAAW,CAACK,KAAK,EAAE,YAAY,EAAEE,WAAW,GAAG8E,eAAe,GAAGD,UAAU,CAAC;IAC5EpF,WAAW,CAACK,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC;IAEtC,MAAM,CAAC4D,UAAU,EAAED,QAAQ,CAAC,GAAGzD,WAAW,GACtCsD,oBAAoB,CAACxD,KAAK,CAACK,CAAC,EAAEH,WAAW,CAAC,GAC1C,CAACF,KAAK,CAACK,CAAC,CAAC;IACbL,KAAK,CAACK,CAAC,GAAGuD,UAAU;IAEpB,IAAI1D,WAAW,EAAE;MACf,MAAM+E,MAAM,GAAIC,MAAM,IAAK;QACzB,MAAMhD,GAAG,GAAGD,IAAI,CAACC,GAAG,CAAC,GAAGgD,MAAM,CAACC,IAAI,EAAE,CAAC;QACtC,OAAOjD,GAAG,GAAG,CAAC,GAAGD,IAAI,CAACmD,GAAG,CAACzB,QAAQ,CAAC,GAAGzB,GAAG;MAC3C,CAAC;MAEDvC,WAAW,CAACK,KAAK,EAAE,MAAM,EAAE2D,QAAQ,CAAC;MACpChE,WAAW,CAACK,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;MAC7BL,WAAW,CAACK,KAAK,EAAE,MAAM,EAAEiF,MAAM,CAACrB,UAAU,CAAC,CAAC;IAChD;EACF,CAAC,CAAC;EAEF,OAAOjC,IAAI;AACb,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./ConfusionMatrix";
2
+ export * from "./ConfusionMatrix";
@@ -0,0 +1,2 @@
1
+ export { default } from "./ConfusionMatrix";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../src/ConfusionMatrix/index.js"],"sourcesContent":["export { default } from \"./ConfusionMatrix\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,mBAAmB"}
@@ -0,0 +1,3 @@
1
+ const styles = {};
2
+ export default styles;
3
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/ConfusionMatrix/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,CAAC,CAAC;AAEjB,eAAeA,MAAM"}
@@ -6,3 +6,6 @@ export * from "./Donutchart";
6
6
 
7
7
  export { default as HvLinechart } from "./Linechart";
8
8
  export * from "./Linechart";
9
+
10
+ export { default as HvConfusionMatrix} from "./ConfusionMatrix";
11
+ export * from "./ConfusionMatrix";
@@ -2,4 +2,5 @@
2
2
  export { default as HvBarchart } from "./Barchart";
3
3
  export { default as HvDonutchart } from "./Donutchart";
4
4
  export { default as HvLinechart } from "./Linechart";
5
+ export { default as HvConfusionMatrix } from "./ConfusionMatrix";
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","HvBarchart","HvDonutchart","HvLinechart"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvLinechart } from \"./Linechart\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,UAAU,QAAQ,YAAY;AAClD,SAASD,OAAO,IAAIE,YAAY,QAAQ,cAAc;AACtD,SAASF,OAAO,IAAIG,WAAW,QAAQ,aAAa"}
1
+ {"version":3,"file":"index.js","names":["default","HvBarchart","HvDonutchart","HvLinechart","HvConfusionMatrix"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvLinechart } from \"./Linechart\";\nexport { default as HvConfusionMatrix } from \"./ConfusionMatrix\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,UAAU,QAAQ,YAAY;AAClD,SAASD,OAAO,IAAIE,YAAY,QAAQ,cAAc;AACtD,SAASF,OAAO,IAAIG,WAAW,QAAQ,aAAa;AACpD,SAASH,OAAO,IAAII,iBAAiB,QAAQ,mBAAmB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-viz",
3
- "version": "4.0.4",
3
+ "version": "4.1.1",
4
4
  "description": "A collection of React visualizations for the Hitachi Vantara's Design System.",
5
5
  "homepage": "https://github.com/lumada-design/hv-uikit-react",
6
6
  "license": "Apache-2.0",
@@ -40,12 +40,12 @@
40
40
  "@emotion/styled": "^11.10.0",
41
41
  "@mui/material": "^5.9.0",
42
42
  "@mui/styles": "^5.9.0",
43
- "plotly.js-basic-dist": "^2.11.1",
43
+ "plotly.js-dist-min": "^2.14.0",
44
44
  "react": "^16.13.1 || ^17.0.2",
45
45
  "react-dom": "^16.13.1 || ^17.0.2"
46
46
  },
47
47
  "dependencies": {
48
- "@hitachivantara/uikit-react-core": "^4.0.4",
48
+ "@hitachivantara/uikit-react-core": "^4.1.0",
49
49
  "clsx": "^1.2.1",
50
50
  "lodash": "^4.17.21",
51
51
  "prop-types": "^15.8.1",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/lodash": "^4.14.182",
56
- "@types/plotly.js": "2.12.2",
56
+ "@types/plotly.js": "2.12.5",
57
57
  "@types/react": "^17.0.47",
58
58
  "cross-env": "^7.0.3"
59
59
  },
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "1861d424d32437aa1a9cbda0c17c706f65d0e853"
66
+ "gitHead": "73337338eb03a7fa1f4f6ef819c2bf0c086aab31"
67
67
  }