@alfalab/core-components-chart 3.1.4 → 3.1.6

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 (90) hide show
  1. package/Component.js +39 -41
  2. package/components/CustomizedLabel.js +5 -7
  3. package/components/Dot/index.css +8 -8
  4. package/components/Dot/index.js +9 -11
  5. package/components/Legends/index.css +8 -8
  6. package/components/Legends/index.js +13 -15
  7. package/components/LinearGradient.js +3 -5
  8. package/components/RectBar.js +5 -7
  9. package/components/Tick/index.css +4 -4
  10. package/components/Tick/index.js +7 -9
  11. package/components/TooltipContent/index.css +7 -7
  12. package/components/TooltipContent/index.js +12 -14
  13. package/cssm/Component.js +41 -43
  14. package/cssm/components/CustomizedLabel.js +5 -7
  15. package/cssm/components/Dot/index.js +10 -12
  16. package/cssm/components/Legends/index.js +13 -15
  17. package/cssm/components/LinearGradient.js +3 -5
  18. package/cssm/components/RectBar.js +5 -7
  19. package/cssm/components/Tick/index.js +7 -9
  20. package/cssm/components/TooltipContent/index.js +12 -14
  21. package/cssm/hooks/usePathBar/index.js +0 -2
  22. package/cssm/hooks/usePathBar/utils/getRadius.js +0 -2
  23. package/cssm/hooks/useSettings/index.js +1 -3
  24. package/cssm/hooks/useSettings/utils/setComposedChartsMargin.js +0 -2
  25. package/cssm/hooks/useSettings/utils/setDatas.js +4 -6
  26. package/cssm/hooks/useSettings/utils/setGradientCharts.js +2 -4
  27. package/cssm/hooks/useSettings/utils/setLegendMargin.js +0 -2
  28. package/cssm/hooks/useSettings/utils/sortByIndex.js +0 -2
  29. package/cssm/icons/Circle.js +4 -6
  30. package/cssm/icons/CircleLine.js +5 -7
  31. package/cssm/icons/FilledCircle.js +8 -10
  32. package/cssm/icons/Point.js +5 -7
  33. package/cssm/icons/StrokeCircle.js +4 -6
  34. package/cssm/index.js +9 -11
  35. package/cssm/{tslib.es6-0de342ae.d.ts → tslib.es6-19b064c1.d.ts} +0 -0
  36. package/cssm/{tslib.es6-0de342ae.js → tslib.es6-19b064c1.js} +0 -0
  37. package/cssm/types/utils/index.d.ts +1 -0
  38. package/esm/Component.js +23 -23
  39. package/esm/components/CustomizedLabel.js +1 -1
  40. package/esm/components/Dot/index.css +8 -8
  41. package/esm/components/Dot/index.js +3 -3
  42. package/esm/components/Legends/index.css +8 -8
  43. package/esm/components/Legends/index.js +4 -4
  44. package/esm/components/LinearGradient.js +1 -1
  45. package/esm/components/RectBar.js +2 -2
  46. package/esm/components/Tick/index.css +4 -4
  47. package/esm/components/Tick/index.js +2 -2
  48. package/esm/components/TooltipContent/index.css +7 -7
  49. package/esm/components/TooltipContent/index.js +2 -2
  50. package/esm/hooks/useSettings/index.js +1 -1
  51. package/esm/hooks/useSettings/utils/setDatas.js +4 -4
  52. package/esm/hooks/useSettings/utils/setGradientCharts.js +2 -2
  53. package/esm/index.css +5 -5
  54. package/esm/index.js +7 -7
  55. package/esm/{tslib.es6-98750278.d.ts → tslib.es6-44e6acd2.d.ts} +0 -0
  56. package/esm/{tslib.es6-98750278.js → tslib.es6-44e6acd2.js} +0 -0
  57. package/esm/types/utils/index.d.ts +1 -0
  58. package/hooks/usePathBar/index.js +0 -2
  59. package/hooks/usePathBar/utils/getRadius.js +0 -2
  60. package/hooks/useSettings/index.js +1 -3
  61. package/hooks/useSettings/utils/setComposedChartsMargin.js +0 -2
  62. package/hooks/useSettings/utils/setDatas.js +4 -6
  63. package/hooks/useSettings/utils/setGradientCharts.js +2 -4
  64. package/hooks/useSettings/utils/setLegendMargin.js +0 -2
  65. package/hooks/useSettings/utils/sortByIndex.js +0 -2
  66. package/icons/Circle.js +4 -6
  67. package/icons/CircleLine.js +5 -7
  68. package/icons/FilledCircle.js +8 -10
  69. package/icons/Point.js +5 -7
  70. package/icons/StrokeCircle.js +4 -6
  71. package/index.css +5 -5
  72. package/index.js +7 -9
  73. package/modern/Component.js +10 -10
  74. package/modern/components/CustomizedLabel.js +1 -1
  75. package/modern/components/Dot/index.css +8 -8
  76. package/modern/components/Dot/index.js +1 -1
  77. package/modern/components/Legends/index.css +8 -8
  78. package/modern/components/Legends/index.js +1 -1
  79. package/modern/components/RectBar.js +1 -1
  80. package/modern/components/Tick/index.css +4 -4
  81. package/modern/components/Tick/index.js +1 -1
  82. package/modern/components/TooltipContent/index.css +7 -7
  83. package/modern/components/TooltipContent/index.js +1 -1
  84. package/modern/index.css +5 -5
  85. package/modern/index.js +6 -6
  86. package/modern/types/utils/index.d.ts +1 -0
  87. package/package.json +2 -2
  88. package/{tslib.es6-27fe16ea.d.ts → tslib.es6-0a16d1e2.d.ts} +0 -0
  89. package/{tslib.es6-27fe16ea.js → tslib.es6-0a16d1e2.js} +0 -0
  90. package/types/utils/index.d.ts +1 -0
@@ -1,8 +1,6 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib_es6 = require('../../../tslib.es6-0de342ae.js');
3
+ var tslib_es6 = require('../../../tslib.es6-19b064c1.js');
6
4
 
7
5
  var setGradientCharts = function (series) {
8
6
  var filterSeries = series.filter(function (item) { return item.chart !== 'gradient'; });
@@ -19,7 +17,7 @@ var setGradientCharts = function (series) {
19
17
  };
20
18
  });
21
19
  }
22
- accum.push(tslib_es6.__assign(tslib_es6.__assign({}, item), { zIndex: -100, chart: 'gradient', hideLegend: true, hideTooltip: true, properties: tslib_es6.__assign(tslib_es6.__assign({}, item.properties), { dataKey: item.properties.dataKey + "-gradient", fill: fill }), data: newData || item.data }));
20
+ accum.push(tslib_es6.__assign(tslib_es6.__assign({}, item), { zIndex: -100, chart: 'gradient', hideLegend: true, hideTooltip: true, properties: tslib_es6.__assign(tslib_es6.__assign({}, item.properties), { dataKey: "".concat(item.properties.dataKey, "-gradient"), fill: fill }), data: newData || item.data }));
23
21
  }
24
22
  accum.push(item);
25
23
  return accum;
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var setLegendMargin = function (brush, legend) {
6
4
  var top = 0;
7
5
  if (typeof (brush === null || brush === void 0 ? void 0 : brush.brushMargin) !== 'number' || !(legend === null || legend === void 0 ? void 0 : legend.verticalAlign))
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var sortByIndex = function (series) {
6
4
  return series.sort(function (a, b) {
7
5
  if ((a === null || a === void 0 ? void 0 : a.zIndex) && (b === null || b === void 0 ? void 0 : b.zIndex) && (a === null || a === void 0 ? void 0 : a.zIndex) > (b === null || b === void 0 ? void 0 : b.zIndex)) {
@@ -1,17 +1,15 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var CircleIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#FF5C5C' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 16 16', fill: 'none' },
14
- React__default['default'].createElement("circle", { cx: '8', cy: '8', r: '8', fill: fill })));
11
+ return (React__default.default.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 16 16', fill: 'none' },
12
+ React__default.default.createElement("circle", { cx: '8', cy: '8', r: '8', fill: fill })));
15
13
  };
16
14
 
17
15
  exports.CircleIcon = CircleIcon;
@@ -1,18 +1,16 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var CircleLineIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#FF5C5C' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 12', fill: 'none' },
14
- React__default['default'].createElement("circle", { cx: '11', cy: '6', r: '6', fill: fill }),
15
- React__default['default'].createElement("rect", { y: '5', width: '22', height: '2', fill: fill })));
11
+ return (React__default.default.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 12', fill: 'none' },
12
+ React__default.default.createElement("circle", { cx: '11', cy: '6', r: '6', fill: fill }),
13
+ React__default.default.createElement("rect", { y: '5', width: '22', height: '2', fill: fill })));
16
14
  };
17
15
 
18
16
  exports.CircleLineIcon = CircleLineIcon;
@@ -1,21 +1,19 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var FilledCircleIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
14
- React__default['default'].createElement("circle", { cx: '11', cy: '11', r: '10', fill: 'url(#paint0_linear)', stroke: fill, strokeWidth: '2' }),
15
- React__default['default'].createElement("defs", null,
16
- React__default['default'].createElement("linearGradient", { id: 'paint0_linear', x1: '11', y1: '1', x2: '11', y2: '21', gradientUnits: 'userSpaceOnUse' },
17
- React__default['default'].createElement("stop", { stopColor: fill, stopOpacity: '0.2' }),
18
- React__default['default'].createElement("stop", { offset: '1', stopColor: fill, stopOpacity: '0' })))));
11
+ return (React__default.default.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
12
+ React__default.default.createElement("circle", { cx: '11', cy: '11', r: '10', fill: 'url(#paint0_linear)', stroke: fill, strokeWidth: '2' }),
13
+ React__default.default.createElement("defs", null,
14
+ React__default.default.createElement("linearGradient", { id: 'paint0_linear', x1: '11', y1: '1', x2: '11', y2: '21', gradientUnits: 'userSpaceOnUse' },
15
+ React__default.default.createElement("stop", { stopColor: fill, stopOpacity: '0.2' }),
16
+ React__default.default.createElement("stop", { offset: '1', stopColor: fill, stopOpacity: '0' })))));
19
17
  };
20
18
 
21
19
  exports.FilledCircleIcon = FilledCircleIcon;
@@ -1,18 +1,16 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var PointIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { height: height, viewBox: '0 0 18 18' },
14
- React__default['default'].createElement("circle", { cx: '9', cy: '9', r: '9', strokeWidth: '1', fill: fill, fillOpacity: '0.4' }),
15
- React__default['default'].createElement("circle", { cx: '9', cy: '9', r: '3', strokeWidth: '2', stroke: '#fff', fill: fill })));
11
+ return (React__default.default.createElement("svg", { height: height, viewBox: '0 0 18 18' },
12
+ React__default.default.createElement("circle", { cx: '9', cy: '9', r: '9', strokeWidth: '1', fill: fill, fillOpacity: '0.4' }),
13
+ React__default.default.createElement("circle", { cx: '9', cy: '9', r: '3', strokeWidth: '2', stroke: '#fff', fill: fill })));
16
14
  };
17
15
 
18
16
  exports.PointIcon = PointIcon;
@@ -1,17 +1,15 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var StrokeCircleIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
14
- React__default['default'].createElement("circle", { cx: '11', cy: '11', r: '10', stroke: fill, strokeWidth: '2', strokeDasharray: '8 8' })));
11
+ return (React__default.default.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
12
+ React__default.default.createElement("circle", { cx: '11', cy: '11', r: '10', stroke: fill, strokeWidth: '2', strokeDasharray: '8 8' })));
15
13
  };
16
14
 
17
15
  exports.StrokeCircleIcon = StrokeCircleIcon;
package/cssm/index.js CHANGED
@@ -1,37 +1,35 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('./tslib.es6-0de342ae.js');
3
+ var Component = require('./Component.js');
4
+ require('./tslib.es6-19b064c1.js');
6
5
  require('react');
7
6
  require('classnames');
8
7
  require('recharts');
9
- require('./hooks/usePathBar/utils/getRadius.js');
10
- require('./hooks/usePathBar/index.js');
11
8
  require('./components/CustomizedLabel.js');
9
+ require('./hooks/usePathBar/index.js');
10
+ require('./hooks/usePathBar/utils/getRadius.js');
11
+ require('./components/Dot/index.js');
12
12
  require('./icons/Point.js');
13
13
  require('./components/Dot/index.module.css');
14
- require('./components/Dot/index.js');
14
+ require('./components/Legends/index.js');
15
15
  require('@alfalab/core-components-typography/cssm');
16
16
  require('./icons/Circle.js');
17
17
  require('./icons/CircleLine.js');
18
18
  require('./icons/FilledCircle.js');
19
19
  require('./icons/StrokeCircle.js');
20
20
  require('./components/Legends/index.module.css');
21
- require('./components/Legends/index.js');
22
21
  require('./components/LinearGradient.js');
23
22
  require('./components/RectBar.js');
24
- require('./components/Tick/index.module.css');
25
23
  require('./components/Tick/index.js');
26
- require('./components/TooltipContent/index.module.css');
24
+ require('./components/Tick/index.module.css');
27
25
  require('./components/TooltipContent/index.js');
28
- var Component = require('./Component.js');
26
+ require('./components/TooltipContent/index.module.css');
27
+ require('./hooks/useSettings/index.js');
29
28
  require('./hooks/useSettings/utils/setComposedChartsMargin.js');
30
29
  require('./hooks/useSettings/utils/setDatas.js');
31
30
  require('./hooks/useSettings/utils/setGradientCharts.js');
32
31
  require('./hooks/useSettings/utils/setLegendMargin.js');
33
32
  require('./hooks/useSettings/utils/sortByIndex.js');
34
- require('./hooks/useSettings/index.js');
35
33
  require('./index.module.css');
36
34
 
37
35
 
@@ -4,3 +4,4 @@ export * from "./data.types";
4
4
  export * from "./dot.types";
5
5
  export * from "./gradient.types";
6
6
  export * from "./tick.types";
7
+ export {};
package/esm/Component.js CHANGED
@@ -1,35 +1,35 @@
1
- import { _ as __assign } from './tslib.es6-98750278.js';
1
+ import { _ as __assign } from './tslib.es6-44e6acd2.js';
2
2
  import React, { useState, useRef, useMemo, useCallback, useEffect } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { Legend, CartesianGrid, XAxis, YAxis, Brush, Tooltip, Area, Line, Bar, LabelList, Cell, ResponsiveContainer, ComposedChart } from 'recharts';
5
- import './hooks/usePathBar/utils/getRadius.js';
6
- import './hooks/usePathBar/index.js';
7
5
  import { CustomizedLabel } from './components/CustomizedLabel.js';
8
- import './icons/Point.js';
9
6
  import { Dot } from './components/Dot/index.js';
10
- import '@alfalab/core-components-typography/esm';
11
- import './icons/Circle.js';
12
- import './icons/CircleLine.js';
13
- import './icons/FilledCircle.js';
14
- import './icons/StrokeCircle.js';
15
7
  import { Legends } from './components/Legends/index.js';
16
8
  import { LinearGradient } from './components/LinearGradient.js';
17
9
  import { RectBar } from './components/RectBar.js';
18
10
  import { Tick } from './components/Tick/index.js';
19
11
  import { TooltipContent } from './components/TooltipContent/index.js';
12
+ import { useSettings } from './hooks/useSettings/index.js';
13
+ import './hooks/usePathBar/index.js';
14
+ import './hooks/usePathBar/utils/getRadius.js';
15
+ import './icons/Point.js';
16
+ import '@alfalab/core-components-typography/esm';
17
+ import './icons/Circle.js';
18
+ import './icons/CircleLine.js';
19
+ import './icons/FilledCircle.js';
20
+ import './icons/StrokeCircle.js';
20
21
  import './hooks/useSettings/utils/setComposedChartsMargin.js';
21
22
  import './hooks/useSettings/utils/setDatas.js';
22
23
  import './hooks/useSettings/utils/setGradientCharts.js';
23
24
  import './hooks/useSettings/utils/setLegendMargin.js';
24
25
  import './hooks/useSettings/utils/sortByIndex.js';
25
- import { useSettings } from './hooks/useSettings/index.js';
26
26
 
27
27
  var CustomizedHOC = function (Component, options) {
28
28
  var NewComponent = function (props) { return React.createElement(Component, __assign({}, props, options)); };
29
29
  return NewComponent;
30
30
  };
31
31
 
32
- var styles = {"coreChart":"chart__coreChart_11fps","bar":"chart__bar_11fps","unfocused":"chart__unfocused_11fps"};
32
+ var styles = {"coreChart":"chart__coreChart_12np2","bar":"chart__bar_12np2","unfocused":"chart__unfocused_12np2"};
33
33
  require('./index.css')
34
34
 
35
35
  var Chart = function (props) {
@@ -52,18 +52,18 @@ var Chart = function (props) {
52
52
  if (chart !== 'gradient' || !gradient)
53
53
  return null;
54
54
  var gid = gradient.gid, points = gradient.points;
55
- return (React.createElement(LinearGradient, { key: state.id + "-" + gid, id: state.id, gid: gid, points: points }));
55
+ return (React.createElement(LinearGradient, { key: "".concat(state.id, "-").concat(gid), id: state.id, gid: gid, points: points }));
56
56
  });
57
57
  }, [state]);
58
58
  var toggleChart = useCallback(function (item) {
59
59
  var chart = item.chart, dataKey = item.properties.dataKey;
60
60
  var withGrad = chart === 'area';
61
61
  var changed = false;
62
- if (charts["" + dataKey] && filterCount > 1) {
62
+ if (charts["".concat(dataKey)] && filterCount > 1) {
63
63
  changed = true;
64
64
  setFilterCount(function (prev) { return prev - 1; });
65
65
  }
66
- if (!charts["" + dataKey]) {
66
+ if (!charts["".concat(dataKey)]) {
67
67
  changed = true;
68
68
  setFilterCount(function (prev) { return prev + 1; });
69
69
  }
@@ -71,9 +71,9 @@ var Chart = function (props) {
71
71
  return;
72
72
  setCharts(function (prev) {
73
73
  var newState = __assign({}, prev);
74
- newState["" + dataKey] = !newState["" + dataKey];
74
+ newState["".concat(dataKey)] = !newState["".concat(dataKey)];
75
75
  if (withGrad)
76
- newState[dataKey + "-gradient"] = !newState[dataKey + "-gradient"];
76
+ newState["".concat(dataKey, "-gradient")] = !newState["".concat(dataKey, "-gradient")];
77
77
  return newState;
78
78
  });
79
79
  }, [charts, filterCount, setCharts, setFilterCount]);
@@ -93,7 +93,7 @@ var Chart = function (props) {
93
93
  ? state.xAxis.tickMargin + (((_c = state === null || state === void 0 ? void 0 : state.brush) === null || _c === void 0 ? void 0 : _c.brushMargin) || 0)
94
94
  : 0;
95
95
  return (React.createElement(Legend, __assign({}, (state.legend || null), { content: React.createElement(Legends, { legend: state.legend, series: state.series, id: state.id, toggleChart: toggleChart, ref: legendRef, charts: charts }), wrapperStyle: {
96
- transform: "translateY(" + translate + "px)",
96
+ transform: "translateY(".concat(translate, "px)"),
97
97
  } })));
98
98
  }, [state, charts, toggleChart, legendRef]);
99
99
  var renderCartesianGrid = useMemo(function () {
@@ -148,13 +148,13 @@ var Chart = function (props) {
148
148
  return null;
149
149
  return state.series.map(function (item) {
150
150
  var chart = item.chart, properties = item.properties, radius = item.radius, labelList = item.labelList;
151
- var show = charts["" + properties.dataKey];
151
+ var show = charts["".concat(properties.dataKey)];
152
152
  switch (chart) {
153
153
  case 'bar':
154
- return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React.createElement(Bar, __assign({ key: state.id + "-" + properties.dataKey }, properties, { shape: React.createElement(RectBar, { radius: radius }) }),
154
+ return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React.createElement(Bar, __assign({ key: "".concat(state.id, "-").concat(properties.dataKey) }, properties, { shape: React.createElement(RectBar, { radius: radius }) }),
155
155
  labelList && (React.createElement(LabelList, __assign({ dataKey: properties.dataKey.toString() }, labelList, { content: React.createElement(CustomizedLabel, { radius: radius }) }))),
156
156
  data.map(function (_, index) {
157
- var key = state.id + "-" + properties.dataKey + "-" + index;
157
+ var key = "".concat(state.id, "-").concat(properties.dataKey, "-").concat(index);
158
158
  return (React.createElement(Cell, { key: key, className: cn(styles.bar, typeof activeDotsState.active === 'number' &&
159
159
  activeDotsState.active !== index
160
160
  ? styles.unfocused
@@ -162,7 +162,7 @@ var Chart = function (props) {
162
162
  }))) : null;
163
163
  case 'area':
164
164
  case 'line':
165
- return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React.createElement(Line, __assign({ key: state.id + "-" + properties.dataKey }, properties, { dot: properties.dot && properties.dotSettings
165
+ return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React.createElement(Line, __assign({ key: "".concat(state.id, "-").concat(properties.dataKey) }, properties, { dot: properties.dot && properties.dotSettings
166
166
  ? CustomizedHOC(Dot, {
167
167
  activeDot: activeDotsState.active,
168
168
  dotSettings: properties.dotSettings,
@@ -172,8 +172,8 @@ var Chart = function (props) {
172
172
  })
173
173
  : false, activeDot: false }))) : null;
174
174
  case 'gradient':
175
- return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React.createElement(Area, __assign({}, item.properties, { key: state.id + "-" + item.properties.dataKey, dataKey: "" + item.properties.dataKey, stroke: 'transparent', fill: item.gradient.gid
176
- ? "url(#" + state.id + "-" + item.gradient.gid + ")"
175
+ return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React.createElement(Area, __assign({}, item.properties, { key: "".concat(state.id, "-").concat(item.properties.dataKey), dataKey: "".concat(item.properties.dataKey), stroke: 'transparent', fill: item.gradient.gid
176
+ ? "url(#".concat(state.id, "-").concat(item.gradient.gid, ")")
177
177
  : item.properties.fill, dot: false, activeDot: false }))) : null;
178
178
  default:
179
179
  return null;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import '../hooks/usePathBar/utils/getRadius.js';
3
2
  import { usePathBar } from '../hooks/usePathBar/index.js';
3
+ import '../hooks/usePathBar/utils/getRadius.js';
4
4
 
5
5
  var CustomizedLabel = function (_a) {
6
6
  var x = _a.x, y = _a.y, value = _a.value, offset = _a.offset, radius = _a.radius, height = _a.height, width = _a.width, formatter = _a.formatter;
@@ -1,19 +1,19 @@
1
- /* hash: 1lzqe */
2
- .chart__dotUnfocused_1axnn {
1
+ /* hash: 6blwv */
2
+ .chart__dotUnfocused_1ysgs {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_1axnn,
7
- .chart__dotItem_1axnn,
8
- .chart__dotWrap_1axnn {
6
+ .chart__dot_1ysgs,
7
+ .chart__dotItem_1ysgs,
8
+ .chart__dotWrap_1ysgs {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_1axnn {
13
- animation: chart__showDot_1axnn 0.5s ease;
12
+ .chart__dot_1ysgs {
13
+ animation: chart__showDot_1ysgs 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_1axnn {
16
+ @keyframes chart__showDot_1ysgs {
17
17
  from {
18
18
  opacity: 0;
19
19
  }
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { PointIcon } from '../../icons/Point.js';
4
4
 
5
- var styles = {"dotUnfocused":"chart__dotUnfocused_1axnn","dot":"chart__dot_1axnn","dotItem":"chart__dotItem_1axnn","dotWrap":"chart__dotWrap_1axnn","showDot":"chart__showDot_1axnn"};
5
+ var styles = {"dotUnfocused":"chart__dotUnfocused_1ysgs","dot":"chart__dot_1ysgs","dotItem":"chart__dotItem_1ysgs","dotWrap":"chart__dotWrap_1ysgs","showDot":"chart__showDot_1ysgs"};
6
6
  require('./index.css')
7
7
 
8
8
  var Dot = React.forwardRef(function (_a, ref) {
@@ -35,8 +35,8 @@ var Dot = React.forwardRef(function (_a, ref) {
35
35
  }, [activeDot, index, option]);
36
36
  if (!value)
37
37
  return null;
38
- return (React.createElement("g", { ref: ref, className: cn(styles.dot), transform: "translate(" + (cx - width / 2) + ", " + (cy - height / 2) + ")" },
39
- React.createElement("g", { className: cn(styles.dotWrap), transform: "scale(" + (activeDot === index ? (option === null || option === void 0 ? void 0 : option.scale) || 0 : (option === null || option === void 0 ? void 0 : option.initScale) || 0) + ")" },
38
+ return (React.createElement("g", { ref: ref, className: cn(styles.dot), transform: "translate(".concat(cx - width / 2, ", ").concat(cy - height / 2, ")") },
39
+ React.createElement("g", { className: cn(styles.dotWrap), transform: "scale(".concat(activeDot === index ? (option === null || option === void 0 ? void 0 : option.scale) || 0 : (option === null || option === void 0 ? void 0 : option.initScale) || 0, ")") },
40
40
  React.createElement("svg", { className: cn(styles.dotItem, activeDot === index ? styles.dotActive : '', typeof activeDot === 'number' && activeDot !== index
41
41
  ? styles.dotUnfocused
42
42
  : ''), "data-id": index, "data-name": dataKey, width: (option === null || option === void 0 ? void 0 : option.width) || 0, height: (option === null || option === void 0 ? void 0 : option.height) || 0 },
@@ -1,4 +1,4 @@
1
- /* hash: 12x4p */
1
+ /* hash: li1ih */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,31 +10,31 @@
10
10
  :root {
11
11
  --gap-2xl: 32px;
12
12
  }
13
- .chart__legendContent_r4v4u {
13
+ .chart__legendContent_vxgym {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  flex-wrap: wrap;
17
17
  }
18
- .chart__legendWrap_r4v4u {
18
+ .chart__legendWrap_vxgym {
19
19
  width: 100%;
20
20
  margin: 0;
21
21
  padding: 0;
22
22
  }
23
- .chart__legendItem_r4v4u {
23
+ .chart__legendItem_vxgym {
24
24
  margin-right: var(--gap-2xl);
25
25
  cursor: pointer;
26
26
  display: inline-block;
27
27
  }
28
- .chart__legendItem_r4v4u:last-child {
28
+ .chart__legendItem_vxgym:last-child {
29
29
  margin-right: 0;
30
30
  }
31
- .chart__legendUnactive_r4v4u {
31
+ .chart__legendUnactive_vxgym {
32
32
  opacity: 0.3;
33
33
  }
34
- .chart__legendIcon_r4v4u {
34
+ .chart__legendIcon_vxgym {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
37
  }
38
- .chart__legendValue_r4v4u {
38
+ .chart__legendValue_vxgym {
39
39
  text-transform: capitalize;
40
40
  }
@@ -6,7 +6,7 @@ import { CircleLineIcon } from '../../icons/CircleLine.js';
6
6
  import { FilledCircleIcon } from '../../icons/FilledCircle.js';
7
7
  import { StrokeCircleIcon } from '../../icons/StrokeCircle.js';
8
8
 
9
- var styles = {"legendContent":"chart__legendContent_r4v4u","legendWrap":"chart__legendWrap_r4v4u","legendItem":"chart__legendItem_r4v4u","legendUnactive":"chart__legendUnactive_r4v4u","legendIcon":"chart__legendIcon_r4v4u","legendValue":"chart__legendValue_r4v4u"};
9
+ var styles = {"legendContent":"chart__legendContent_vxgym","legendWrap":"chart__legendWrap_vxgym","legendItem":"chart__legendItem_vxgym","legendUnactive":"chart__legendUnactive_vxgym","legendIcon":"chart__legendIcon_vxgym","legendValue":"chart__legendValue_vxgym"};
10
10
  require('./index.css')
11
11
 
12
12
  var icons = {
@@ -19,15 +19,15 @@ var Legends = React.forwardRef(function (_a, ref) {
19
19
  var legend = _a.legend, series = _a.series, id = _a.id, charts = _a.charts, toggleChart = _a.toggleChart;
20
20
  var style = {
21
21
  textAlign: legend.align || 'center',
22
- transform: "translateY(" + ((legend === null || legend === void 0 ? void 0 : legend.marginTop) ? legend.marginTop : 0) *
23
- (legend.verticalAlign === 'top' ? -1 : 1) + "px)",
22
+ transform: "translateY(".concat(((legend === null || legend === void 0 ? void 0 : legend.marginTop) ? legend.marginTop : 0) *
23
+ (legend.verticalAlign === 'top' ? -1 : 1), "px)"),
24
24
  };
25
25
  return (React.createElement("ul", { ref: ref, className: cn(styles.legendWrap), style: style }, series.map(function (item) {
26
26
  var _a, _b;
27
27
  if (item.hideLegend || item.hide)
28
28
  return null;
29
29
  var Icon = icons[item.icon] || CircleIcon;
30
- return (React.createElement("li", { role: 'presentation', key: id + "-" + item.properties.dataKey, className: cn(styles.legendItem, charts["" + item.properties.dataKey] ? '' : styles.legendUnactive), onClick: function () { return toggleChart(item); } },
30
+ return (React.createElement("li", { role: 'presentation', key: "".concat(id, "-").concat(item.properties.dataKey), className: cn(styles.legendItem, charts["".concat(item.properties.dataKey)] ? '' : styles.legendUnactive), onClick: function () { return toggleChart(item); } },
31
31
  React.createElement("div", { className: cn(styles.legendContent) },
32
32
  Icon ? (React.createElement("i", { className: cn(styles.legendIcon) },
33
33
  React.createElement(Icon, { fill: ((_a = item.properties) === null || _a === void 0 ? void 0 : _a.fill) ||
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  var LinearGradient = function (_a) {
4
4
  var id = _a.id, gid = _a.gid, points = _a.points;
5
- return (React.createElement("linearGradient", { key: id + "-" + gid, id: id + "-" + gid, x1: '0', y1: '0', x2: '0', y2: '1' }, points.map(function (point, index) { return (React.createElement("stop", { key: "" + id + gid + "-" + index.toString(), offset: point.offset + "%", stopColor: point.stopColor, stopOpacity: point.stopOpacity })); })));
5
+ return (React.createElement("linearGradient", { key: "".concat(id, "-").concat(gid), id: "".concat(id, "-").concat(gid), x1: '0', y1: '0', x2: '0', y2: '1' }, points.map(function (point, index) { return (React.createElement("stop", { key: "".concat(id).concat(gid, "-").concat(index.toString()), offset: "".concat(point.offset, "%"), stopColor: point.stopColor, stopOpacity: point.stopOpacity })); })));
6
6
  };
7
7
 
8
8
  export { LinearGradient };
@@ -1,10 +1,10 @@
1
1
  import React, { useMemo } from 'react';
2
- import '../hooks/usePathBar/utils/getRadius.js';
3
2
  import { usePathBar } from '../hooks/usePathBar/index.js';
3
+ import '../hooks/usePathBar/utils/getRadius.js';
4
4
 
5
5
  // eslint-disable-next-line complexity
6
6
  var getPath = function (x, width, height, initHeight, topRadius, bottomRadius, initY) {
7
- return "\n M" + (x + ((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight || 0) + "\n Q" + x + " " + (initY + initHeight) + " " + x + " " + (initY + initHeight - ((height !== 0 && bottomRadius) || 0)) + "\n L" + x + " " + (initY + ((height !== 0 && topRadius) || 0)) + "\n Q" + x + " " + initY + " " + (x + ((height !== 0 && topRadius) || 0)) + " " + initY + "\n L" + (x + width - ((height !== 0 && topRadius) || 0)) + " " + initY + "\n Q" + (x + width) + " " + initY + " " + (x + width) + " " + (initY + (topRadius || 0)) + "\n L" + (x + width) + " " + (initY + initHeight - ((height !== 0 && bottomRadius) || 0)) + "\n Q" + (x + width) + " " + (initY + initHeight) + " " + (x + width - ((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight) + "\n Z\n ";
7
+ return "\n M".concat(x + ((height !== 0 && bottomRadius) || 0), " ").concat(initY + initHeight || 0, "\n Q").concat(x, " ").concat(initY + initHeight, " ").concat(x, " ").concat(initY + initHeight - ((height !== 0 && bottomRadius) || 0), "\n L").concat(x, " ").concat(initY + ((height !== 0 && topRadius) || 0), "\n Q").concat(x, " ").concat(initY, " ").concat(x + ((height !== 0 && topRadius) || 0), " ").concat(initY, "\n L").concat(x + width - ((height !== 0 && topRadius) || 0), " ").concat(initY, "\n Q").concat(x + width, " ").concat(initY, " ").concat(x + width, " ").concat(initY + (topRadius || 0), "\n L").concat(x + width, " ").concat(initY + initHeight - ((height !== 0 && bottomRadius) || 0), "\n Q").concat(x + width, " ").concat(initY + initHeight, " ").concat(x + width - ((height !== 0 && bottomRadius) || 0), " ").concat(initY + initHeight, "\n Z\n ");
8
8
  };
9
9
  var RectBar = function (_a) {
10
10
  var fill = _a.fill, x = _a.x, y = _a.y, width = _a.width, height = _a.height, radius = _a.radius, background = _a.background;
@@ -1,4 +1,4 @@
1
- /* hash: ohfit */
1
+ /* hash: iolvt */
2
2
  :root {
3
3
  --color-dark-bg-primary: #0b1f35;
4
4
  --color-light-text-primary: #0b1f35;
@@ -11,17 +11,17 @@
11
11
 
12
12
  /* Hard up */
13
13
  }
14
- .chart__tickText_19d3b {
14
+ .chart__tickText_gmual {
15
15
  fill: var(--color-light-text-primary);
16
16
  font-size: 16px;
17
17
  line-height: 24px;
18
18
  font-weight: 400;
19
19
  }
20
- .chart__circle_19d3b {
20
+ .chart__circle_gmual {
21
21
  opacity: 0.3;
22
22
  fill: var(--color-dark-bg-primary);
23
23
  }
24
- .chart__circle_19d3b {
24
+ .chart__circle_gmual {
25
25
  opacity: 0.3;
26
26
  fill: var(--color-dark-bg-primary);
27
27
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- var styles = {"tickText":"chart__tickText_19d3b","circle":"chart__circle_19d3b"};
4
+ var styles = {"tickText":"chart__tickText_gmual","circle":"chart__circle_gmual"};
5
5
  require('./index.css')
6
6
 
7
7
  var Tick = function (_a) {
@@ -11,7 +11,7 @@ var Tick = function (_a) {
11
11
  (xAxis.tickMargin > 0 ? xAxis.tickMargin - radius / 2 : xAxis.tickMargin === 0)
12
12
  ? (radius / 2) * -1
13
13
  : null;
14
- return (React.createElement("g", { className: cn(styles.tick), opacity: '1', textAnchor: 'middle', transform: "translate(" + payload.coordinate + ", " + (y - (typeof marginTick === 'number' ? marginTick : 0) - radius * 2) + ")" },
14
+ return (React.createElement("g", { className: cn(styles.tick), opacity: '1', textAnchor: 'middle', transform: "translate(".concat(payload.coordinate, ", ").concat(y - (typeof marginTick === 'number' ? marginTick : 0) - radius * 2, ")") },
15
15
  React.createElement("text", { className: cn(styles.tickText), y: '30' }, tickFormatter ? tickFormatter(payload.value) : payload.value),
16
16
  React.createElement("circle", { r: radius, className: cn(styles.circle) })));
17
17
  };
@@ -1,4 +1,4 @@
1
- /* hash: qccg7 */
1
+ /* hash: ion8l */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-border-primary: #dbdee1;
@@ -19,7 +19,7 @@
19
19
  :root {
20
20
  --border-radius-m: 8px;
21
21
  }
22
- .chart__tooltip_ackkk {
22
+ .chart__tooltip_59a0x {
23
23
  background-color: var(--color-light-bg-primary);
24
24
  border: 1px solid var(--color-light-border-primary);
25
25
  box-shadow: var(--shadow-l);
@@ -28,17 +28,17 @@
28
28
  pointer-events: none;
29
29
  position: relative;
30
30
  }
31
- .chart__tooltipList_ackkk {
31
+ .chart__tooltipList_59a0x {
32
32
  position: relative;
33
33
  z-index: 5;
34
34
  list-style-type: none;
35
35
  padding: 0;
36
36
  margin: 0;
37
37
  }
38
- .chart__tooltipItem_ackkk {
38
+ .chart__tooltipItem_59a0x {
39
39
  margin-bottom: 10px;
40
40
  }
41
- .chart__tooltipArrow_ackkk {
41
+ .chart__tooltipArrow_59a0x {
42
42
  position: absolute;
43
43
  left: 0;
44
44
  top: 50%;
@@ -48,7 +48,7 @@
48
48
  border: 1px solid var(--color-light-border-primary);
49
49
  background-color: var(--color-light-bg-primary);
50
50
  }
51
- .chart__tooltipArrow_ackkk:before {
51
+ .chart__tooltipArrow_59a0x:before {
52
52
  content: '';
53
53
  position: absolute;
54
54
  left: -2px;
@@ -59,7 +59,7 @@
59
59
  border-width: 0 24px 24px 0;
60
60
  border-color: transparent var(--color-light-bg-primary) transparent transparent;
61
61
  }
62
- .chart__tooltipArrowRight_ackkk {
62
+ .chart__tooltipArrowRight_59a0x {
63
63
  left: 100%;
64
64
  transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
65
65
  }