@semcore/d3-chart 2.3.2 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -2
- package/lib/cjs/Area.js +9 -9
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +8 -8
- package/lib/cjs/Bubble.js +10 -10
- package/lib/cjs/Donut.js +7 -7
- package/lib/cjs/Dots.js +9 -9
- package/lib/cjs/GroupBar.js +7 -24
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +8 -8
- package/lib/cjs/Hover.js +4 -4
- package/lib/cjs/Line.js +8 -8
- package/lib/cjs/Plot.js +4 -4
- package/lib/cjs/RadialTree.js +11 -11
- package/lib/cjs/ReferenceLine.js +10 -10
- package/lib/cjs/ScatterPlot.js +7 -7
- package/lib/cjs/StackBar.js +7 -24
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +5 -23
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +8 -8
- package/lib/cjs/Venn.js +7 -7
- package/lib/cjs/a11y/PlotA11yModule.js +3 -3
- package/lib/cjs/a11y/PlotA11yView.js +4 -4
- package/lib/cjs/style/area.shadow.css +1 -1
- package/lib/cjs/style/bar.shadow.css +1 -1
- package/lib/cjs/style/bubble.shadow.css +1 -1
- package/lib/cjs/style/donut.shadow.css +1 -1
- package/lib/cjs/style/dot.shadow.css +1 -1
- package/lib/cjs/style/line.shadow.css +1 -1
- package/lib/cjs/style/plot.shadow.css +1 -1
- package/lib/cjs/style/plotA11yModule.shadow.css +1 -1
- package/lib/cjs/style/plotA11yView.shadow.css +1 -1
- package/lib/cjs/style/radial-tree.shadow.css +1 -1
- package/lib/cjs/style/scatterplot.shadow.css +1 -1
- package/lib/cjs/style/tooltip.shadow.css +1 -1
- package/lib/cjs/style/venn.shadow.css +1 -1
- package/lib/es6/Area.js +9 -9
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +8 -8
- package/lib/es6/Bubble.js +10 -10
- package/lib/es6/Donut.js +7 -7
- package/lib/es6/Dots.js +9 -9
- package/lib/es6/GroupBar.js +6 -23
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +8 -8
- package/lib/es6/Hover.js +4 -4
- package/lib/es6/Line.js +8 -8
- package/lib/es6/Plot.js +4 -4
- package/lib/es6/RadialTree.js +11 -11
- package/lib/es6/ReferenceLine.js +10 -10
- package/lib/es6/ScatterPlot.js +7 -7
- package/lib/es6/StackBar.js +6 -24
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +4 -23
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +8 -8
- package/lib/es6/Venn.js +7 -7
- package/lib/es6/a11y/PlotA11yModule.js +3 -3
- package/lib/es6/a11y/PlotA11yView.js +4 -4
- package/lib/es6/style/area.shadow.css +1 -1
- package/lib/es6/style/bar.shadow.css +1 -1
- package/lib/es6/style/bubble.shadow.css +1 -1
- package/lib/es6/style/donut.shadow.css +1 -1
- package/lib/es6/style/dot.shadow.css +1 -1
- package/lib/es6/style/line.shadow.css +1 -1
- package/lib/es6/style/plot.shadow.css +1 -1
- package/lib/es6/style/plotA11yModule.shadow.css +1 -1
- package/lib/es6/style/plotA11yView.shadow.css +1 -1
- package/lib/es6/style/radial-tree.shadow.css +1 -1
- package/lib/es6/style/scatterplot.shadow.css +1 -1
- package/lib/es6/style/tooltip.shadow.css +1 -1
- package/lib/es6/style/venn.shadow.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [2.3.4] - 2022-09-21
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/popper` [4.11.29 ~> 4.11.30]).
|
|
10
|
+
|
|
11
|
+
## [2.3.3] - 2022-09-13
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Changed paths in css files to relative.
|
|
16
|
+
|
|
5
17
|
## [2.3.2] - 2022-08-30
|
|
6
18
|
|
|
7
19
|
### Changed
|
|
@@ -34,13 +46,13 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
|
|
|
34
46
|
|
|
35
47
|
## [2.2.5] - 2022-08-04
|
|
36
48
|
|
|
37
|
-
###
|
|
49
|
+
### Fixed
|
|
38
50
|
|
|
39
51
|
- Fixed `ResponsiveContainer` memory leak on unmount.
|
|
40
52
|
|
|
41
53
|
## [2.2.4] - 2022-08-02
|
|
42
54
|
|
|
43
|
-
###
|
|
55
|
+
### Fixed
|
|
44
56
|
|
|
45
57
|
- `Venn` chart was not mentioned in exported types.
|
|
46
58
|
|
package/lib/cjs/Area.js
CHANGED
|
@@ -48,18 +48,18 @@ var style = (
|
|
|
48
48
|
/*__reshadow_css_start__*/
|
|
49
49
|
_core.sstyled.insert(
|
|
50
50
|
/*__inner_css_start__*/
|
|
51
|
-
".
|
|
51
|
+
".___SArea_19zvk_gg_{fill:#2bb3ff;fill-opacity:.2}.___SArea_19zvk_gg_.__color_19zvk_gg_{fill:var(--color_19zvk)}.___SAreaLine_19zvk_gg_{stroke:#2bb3ff;stroke-width:3;fill:transparent}.___SAreaLine_19zvk_gg_.__color_19zvk_gg_{stroke:var(--color_19zvk)}.___SArea_19zvk_gg_,.___SAreaLine_19zvk_gg_{transition-property:d;transition-duration:var(--duration_19zvk);transition-timing-function:ease-in-out}.___SNull_19zvk_gg_{fill:transparent;stroke:#8a8e9b;stroke-dasharray:4}.___SNull_19zvk_gg_.__hide_19zvk_gg_{display:none}"
|
|
52
52
|
/*__inner_css_end__*/
|
|
53
|
-
, "
|
|
53
|
+
, "19zvk_gg_")
|
|
54
54
|
/*__reshadow_css_end__*/
|
|
55
55
|
, {
|
|
56
|
-
"__SArea": "
|
|
57
|
-
"_color": "
|
|
58
|
-
"--color": "--
|
|
59
|
-
"__SAreaLine": "
|
|
60
|
-
"--duration": "--
|
|
61
|
-
"__SNull": "
|
|
62
|
-
"_hide": "
|
|
56
|
+
"__SArea": "___SArea_19zvk_gg_",
|
|
57
|
+
"_color": "__color_19zvk_gg_",
|
|
58
|
+
"--color": "--color_19zvk",
|
|
59
|
+
"__SAreaLine": "___SAreaLine_19zvk_gg_",
|
|
60
|
+
"--duration": "--duration_19zvk",
|
|
61
|
+
"__SNull": "___SNull_19zvk_gg_",
|
|
62
|
+
"_hide": "__hide_19zvk_gg_"
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
var AreaRoot = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/Axis.js
CHANGED
|
@@ -44,23 +44,23 @@ var style = (
|
|
|
44
44
|
/*__reshadow_css_start__*/
|
|
45
45
|
_core.sstyled.insert(
|
|
46
46
|
/*__inner_css_start__*/
|
|
47
|
-
".
|
|
47
|
+
".___SAxis_1oodn_gg_{stroke:#c4c7cf}.___SAxis_1oodn_gg_.__hide_1oodn_gg_{display:none}.___STick_1oodn_gg_{font-size:12px;fill:#6c6e79}.___STick_1oodn_gg_.__hide_1oodn_gg_{display:none}.___SGrid_1oodn_gg_{fill:transparent;stroke:#e0e1e9}.___STitle_1oodn_gg_{font-size:12px;fill:#6c6e79;transform-origin:var(--transform-origin_1oodn)}.___STitle_1oodn_gg_._position_top_1oodn_gg_{text-anchor:middle}.___STitle_1oodn_gg_._position_bottom_1oodn_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_1oodn_gg_._position_right_1oodn_gg_{transform:rotate(-90deg);alignment-baseline:middle;text-anchor:middle}.___STitle_1oodn_gg_._position_left_1oodn_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___STick_1oodn_gg_._position_top_1oodn_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_1oodn_gg_._position_bottom_1oodn_gg_{transform:translateY(12px);text-anchor:middle;alignment-baseline:hanging}.___STick_1oodn_gg_._position_right_1oodn_gg_{transform:translateX(16px);text-anchor:start;alignment-baseline:middle}.___STick_1oodn_gg_._position_left_1oodn_gg_{transform:translateX(-16px);text-anchor:end;alignment-baseline:middle}.___STick_1oodn_gg_._position_custom_0_1oodn_gg_{transform:translateY(12px);text-anchor:middle;alignment-baseline:hanging}.___STick_1oodn_gg_._position_custom_1_1oodn_gg_{transform:translateX(-16px);text-anchor:end;alignment-baseline:middle}"
|
|
48
48
|
/*__inner_css_end__*/
|
|
49
|
-
, "
|
|
49
|
+
, "1oodn_gg_")
|
|
50
50
|
/*__reshadow_css_end__*/
|
|
51
51
|
, {
|
|
52
|
-
"__SAxis": "
|
|
53
|
-
"_hide": "
|
|
54
|
-
"__STick": "
|
|
55
|
-
"__SGrid": "
|
|
56
|
-
"__STitle": "
|
|
57
|
-
"--transform-origin": "--transform-
|
|
58
|
-
"_position_top": "
|
|
59
|
-
"_position_bottom": "
|
|
60
|
-
"_position_right": "
|
|
61
|
-
"_position_left": "
|
|
62
|
-
"_position_custom_0": "
|
|
63
|
-
"_position_custom_1": "
|
|
52
|
+
"__SAxis": "___SAxis_1oodn_gg_",
|
|
53
|
+
"_hide": "__hide_1oodn_gg_",
|
|
54
|
+
"__STick": "___STick_1oodn_gg_",
|
|
55
|
+
"__SGrid": "___SGrid_1oodn_gg_",
|
|
56
|
+
"__STitle": "___STitle_1oodn_gg_",
|
|
57
|
+
"--transform-origin": "--transform-origin_1oodn",
|
|
58
|
+
"_position_top": "_position_top_1oodn_gg_",
|
|
59
|
+
"_position_bottom": "_position_bottom_1oodn_gg_",
|
|
60
|
+
"_position_right": "_position_right_1oodn_gg_",
|
|
61
|
+
"_position_left": "_position_left_1oodn_gg_",
|
|
62
|
+
"_position_custom_0": "_position_custom_0_1oodn_gg_",
|
|
63
|
+
"_position_custom_1": "_position_custom_1_1oodn_gg_"
|
|
64
64
|
});
|
|
65
65
|
var CUSTOM_0 = Symbol('custom_0');
|
|
66
66
|
var CUSTOM_1 = Symbol('custom_1');
|
package/lib/cjs/Bar.js
CHANGED
|
@@ -44,17 +44,17 @@ var style = (
|
|
|
44
44
|
/*__reshadow_css_start__*/
|
|
45
45
|
_core.sstyled.insert(
|
|
46
46
|
/*__inner_css_start__*/
|
|
47
|
-
".
|
|
47
|
+
".___SBar_1gm67_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_1gm67);transition-timing-function:ease-in-out}.___SBar_1gm67_gg_.__color_1gm67_gg_{fill:var(--color_1gm67)}.___SBar_1gm67_gg_.__hide_1gm67_gg_{display:none}.___SBackground_1gm67_gg_{fill:#c4c7cf}"
|
|
48
48
|
/*__inner_css_end__*/
|
|
49
|
-
, "
|
|
49
|
+
, "1gm67_gg_")
|
|
50
50
|
/*__reshadow_css_end__*/
|
|
51
51
|
, {
|
|
52
|
-
"__SBar": "
|
|
53
|
-
"--duration": "--
|
|
54
|
-
"_color": "
|
|
55
|
-
"--color": "--
|
|
56
|
-
"_hide": "
|
|
57
|
-
"__SBackground": "
|
|
52
|
+
"__SBar": "___SBar_1gm67_gg_",
|
|
53
|
+
"--duration": "--duration_1gm67",
|
|
54
|
+
"_color": "__color_1gm67_gg_",
|
|
55
|
+
"--color": "--color_1gm67",
|
|
56
|
+
"_hide": "__hide_1gm67_gg_",
|
|
57
|
+
"__SBackground": "___SBackground_1gm67_gg_"
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
var BarRoot = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/Bubble.js
CHANGED
|
@@ -56,19 +56,19 @@ var style = (
|
|
|
56
56
|
/*__reshadow_css_start__*/
|
|
57
57
|
_core.sstyled.insert(
|
|
58
58
|
/*__inner_css_start__*/
|
|
59
|
-
".
|
|
59
|
+
".___SBubble_3yz5f_gg_{fill:#2bb3ff;stroke:#fff;stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_3yz5f);transition-timing-function:ease-in-out;opacity:.5}.___SBubble_3yz5f_gg_:hover{opacity:.8}.___SBubble_3yz5f_gg_.__color_3yz5f_gg_{fill:var(--color_3yz5f)}.___SCenter_3yz5f_gg_{text-anchor:middle;font-size:11px;stroke:#2bb3ff}.___SCenter_3yz5f_gg_.__color_3yz5f_gg_{stroke:var(--color_3yz5f)}.___SLabel_3yz5f_gg_{fill:#2bb3ff}.___SLabel_3yz5f_gg_._position_right_3yz5f_gg_{text-anchor:end}.___SLabel_3yz5f_gg_._position_left_3yz5f_gg_{text-anchor:start}.___SLabel_3yz5f_gg_.__color_3yz5f_gg_{fill:var(--color_3yz5f)}"
|
|
60
60
|
/*__inner_css_end__*/
|
|
61
|
-
, "
|
|
61
|
+
, "3yz5f_gg_")
|
|
62
62
|
/*__reshadow_css_end__*/
|
|
63
63
|
, {
|
|
64
|
-
"__SBubble": "
|
|
65
|
-
"--duration": "--
|
|
66
|
-
"_color": "
|
|
67
|
-
"--color": "--
|
|
68
|
-
"__SCenter": "
|
|
69
|
-
"__SLabel": "
|
|
70
|
-
"_position_right": "
|
|
71
|
-
"_position_left": "
|
|
64
|
+
"__SBubble": "___SBubble_3yz5f_gg_",
|
|
65
|
+
"--duration": "--duration_3yz5f",
|
|
66
|
+
"_color": "__color_3yz5f_gg_",
|
|
67
|
+
"--color": "--color_3yz5f",
|
|
68
|
+
"__SCenter": "___SCenter_3yz5f_gg_",
|
|
69
|
+
"__SLabel": "___SLabel_3yz5f_gg_",
|
|
70
|
+
"_position_right": "_position_right_3yz5f_gg_",
|
|
71
|
+
"_position_left": "_position_left_3yz5f_gg_"
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
var BubbleRoot = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/Donut.js
CHANGED
|
@@ -66,16 +66,16 @@ var style = (
|
|
|
66
66
|
/*__reshadow_css_start__*/
|
|
67
67
|
_core.sstyled.insert(
|
|
68
68
|
/*__inner_css_start__*/
|
|
69
|
-
".
|
|
69
|
+
".___SPie_uacef_gg_{stroke:#fff;fill:#2bb3ff}.___SPie_uacef_gg_.__color_uacef_gg_{fill:var(--color_uacef)}.___SEmptyData_uacef_gg_{fill:#e0e1e9}.___SEmptyData_uacef_gg_.__color_uacef_gg_{fill:var(--color_uacef)}.___SLabel_uacef_gg_{text-anchor:middle;vertical-anchor:middle}"
|
|
70
70
|
/*__inner_css_end__*/
|
|
71
|
-
, "
|
|
71
|
+
, "uacef_gg_")
|
|
72
72
|
/*__reshadow_css_end__*/
|
|
73
73
|
, {
|
|
74
|
-
"__SPie": "
|
|
75
|
-
"_color": "
|
|
76
|
-
"--color": "--
|
|
77
|
-
"__SEmptyData": "
|
|
78
|
-
"__SLabel": "
|
|
74
|
+
"__SPie": "___SPie_uacef_gg_",
|
|
75
|
+
"_color": "__color_uacef_gg_",
|
|
76
|
+
"--color": "--color_uacef",
|
|
77
|
+
"__SEmptyData": "___SEmptyData_uacef_gg_",
|
|
78
|
+
"__SLabel": "___SLabel_uacef_gg_"
|
|
79
79
|
});
|
|
80
80
|
var DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');
|
|
81
81
|
|
package/lib/cjs/Dots.js
CHANGED
|
@@ -32,18 +32,18 @@ var style = (
|
|
|
32
32
|
/*__reshadow_css_start__*/
|
|
33
33
|
_core.sstyled.insert(
|
|
34
34
|
/*__inner_css_start__*/
|
|
35
|
-
".
|
|
35
|
+
".___SDots_v4ge4_gg_ .___SDot_v4ge4_gg_{transition-duration:var(--duration_v4ge4)}.___SDot_v4ge4_gg_{stroke-width:2px;stroke:#fff;r:6px;fill:#2bb3ff;transition-property:cx,cy;transition-timing-function:ease-in-out}.___SDot_v4ge4_gg_.__hide_v4ge4_gg_{display:none}.___SDot_v4ge4_gg_.__active_v4ge4_gg_{r:8px}.___SDot_v4ge4_gg_.__color_v4ge4_gg_{fill:var(--color_v4ge4)}"
|
|
36
36
|
/*__inner_css_end__*/
|
|
37
|
-
, "
|
|
37
|
+
, "v4ge4_gg_")
|
|
38
38
|
/*__reshadow_css_end__*/
|
|
39
39
|
, {
|
|
40
|
-
"__SDots": "
|
|
41
|
-
"__SDot": "
|
|
42
|
-
"--duration": "--
|
|
43
|
-
"_hide": "
|
|
44
|
-
"_active": "
|
|
45
|
-
"_color": "
|
|
46
|
-
"--color": "--
|
|
40
|
+
"__SDots": "___SDots_v4ge4_gg_",
|
|
41
|
+
"__SDot": "___SDot_v4ge4_gg_",
|
|
42
|
+
"--duration": "--duration_v4ge4",
|
|
43
|
+
"_hide": "__hide_v4ge4_gg_",
|
|
44
|
+
"_active": "__active_v4ge4_gg_",
|
|
45
|
+
"_color": "__color_v4ge4_gg_",
|
|
46
|
+
"--color": "--color_v4ge4"
|
|
47
47
|
});
|
|
48
48
|
var EXCLUDE_PROPS = ['data', 'scale', 'value', 'display'];
|
|
49
49
|
|
package/lib/cjs/GroupBar.js
CHANGED
|
@@ -19,8 +19,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
19
19
|
|
|
20
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
21
|
|
|
22
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
23
|
-
|
|
24
22
|
var _react = _interopRequireDefault(require("react"));
|
|
25
23
|
|
|
26
24
|
var _core = require("@semcore/core");
|
|
@@ -33,27 +31,12 @@ var _Bar = _interopRequireDefault(require("./Bar"));
|
|
|
33
31
|
|
|
34
32
|
var _HorizontalBar = _interopRequireDefault(require("./HorizontalBar"));
|
|
35
33
|
|
|
34
|
+
var _barShadow = _interopRequireDefault(require("./style/bar.shadow.css"));
|
|
35
|
+
|
|
36
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
37
37
|
|
|
38
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
39
|
|
|
40
|
-
/*__reshadow-styles__:"./style/bar.shadow.css"*/
|
|
41
|
-
var _ref = (
|
|
42
|
-
/*__reshadow_css_start__*/
|
|
43
|
-
(0, _core.__css__)(
|
|
44
|
-
/*__inner_css_start__*/
|
|
45
|
-
".___SBar_f03r7_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SBar_f03r7_gg_.__color_f03r7_gg_{fill:var(--color)}.___SBar_f03r7_gg_.__hide_f03r7_gg_{display:none}.___SBackground_f03r7_gg_{fill:#c4c7cf}"
|
|
46
|
-
/*__inner_css_end__*/
|
|
47
|
-
, "jel8ua_gg_")
|
|
48
|
-
/*__reshadow_css_end__*/
|
|
49
|
-
, {
|
|
50
|
-
"__SBar": "___SBar_f03r7_gg_",
|
|
51
|
-
"_color": "__color_f03r7_gg_",
|
|
52
|
-
"_hide": "__hide_f03r7_gg_",
|
|
53
|
-
"__SBackground": "___SBackground_f03r7_gg_"
|
|
54
|
-
}),
|
|
55
|
-
style = (0, _extends2["default"])({}, _ref);
|
|
56
|
-
|
|
57
40
|
var GroupBarRoot = /*#__PURE__*/function (_Component) {
|
|
58
41
|
(0, _inherits2["default"])(GroupBarRoot, _Component);
|
|
59
42
|
|
|
@@ -92,8 +75,8 @@ var GroupBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
92
75
|
}
|
|
93
76
|
}, {
|
|
94
77
|
key: "getBarProps",
|
|
95
|
-
value: function getBarProps(
|
|
96
|
-
var y =
|
|
78
|
+
value: function getBarProps(_ref) {
|
|
79
|
+
var y = _ref.y;
|
|
97
80
|
var x = this.asProps.x;
|
|
98
81
|
return {
|
|
99
82
|
offset: [this.scaleGroup(y), 0],
|
|
@@ -104,8 +87,8 @@ var GroupBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
104
87
|
}
|
|
105
88
|
}, {
|
|
106
89
|
key: "getHorizontalBarProps",
|
|
107
|
-
value: function getHorizontalBarProps(
|
|
108
|
-
var x =
|
|
90
|
+
value: function getHorizontalBarProps(_ref2) {
|
|
91
|
+
var x = _ref2.x;
|
|
109
92
|
var y = this.asProps.y;
|
|
110
93
|
return {
|
|
111
94
|
offset: [0, this.scaleGroup(x)],
|
|
@@ -132,7 +115,7 @@ var GroupBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
132
115
|
}(_core.Component);
|
|
133
116
|
|
|
134
117
|
(0, _defineProperty2["default"])(GroupBarRoot, "displayName", 'GroupBar');
|
|
135
|
-
(0, _defineProperty2["default"])(GroupBarRoot, "style",
|
|
118
|
+
(0, _defineProperty2["default"])(GroupBarRoot, "style", _barShadow["default"]);
|
|
136
119
|
var GroupBar = (0, _createElement["default"])(GroupBarRoot, {
|
|
137
120
|
Bar: _Bar["default"],
|
|
138
121
|
HorizontalBar: _HorizontalBar["default"]
|
package/lib/cjs/GroupBar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupBar.js","names":["GroupBarRoot","asProps","Children","scale","scaleGroup","x","xyScale","domain","React","toArray","getOriginChildren","reduce","acc","child","isValidElement","type","GroupBar","Bar","props","hide","push","y","HorizontalBar","copy","range","bandwidth","paddingInner","paddingOuter","offset","width","groupKey","height","Element","getScaleGroup","dataHintsHandler","establishDataType","Component","style","createElement"],"sources":["../../src/GroupBar.jsx"],"sourcesContent":["import React from 'react';\nimport { Component } from '@semcore/core';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\nimport createElement from './createElement';\nimport Bar from './Bar';\nimport HorizontalBar from './HorizontalBar';\n\nimport style from './style/bar.shadow.css';\n\nclass GroupBarRoot extends Component {\n static displayName = 'GroupBar';\n\n static style = style;\n\n getScaleGroup() {\n const { Children, scale, scaleGroup, x } = this.asProps;\n // TODO: love that hack (by lsroman)\n const xyScale = x ? scale[0] : scale[1];\n\n if (scaleGroup) return scaleGroup;\n\n const domain = React.Children.toArray(getOriginChildren(Children)).reduce((acc, child) => {\n if (React.isValidElement(child) && child.type === GroupBar.Bar && !child.props.hide) {\n acc.push(child.props.y);\n }\n if (\n React.isValidElement(child) &&\n child.type === GroupBar.HorizontalBar &&\n !child.props.hide\n ) {\n acc.push(child.props.x);\n }\n return acc;\n }, []);\n\n return xyScale\n .copy()\n .range([0, xyScale.bandwidth()])\n .domain(domain)\n .paddingInner(xyScale.paddingOuter())\n .paddingOuter(0);\n }\n\n getBarProps({ y }) {\n const { x } = this.asProps;\n\n return {\n offset: [this.scaleGroup(y), 0],\n width: this.scaleGroup.bandwidth(),\n x,\n groupKey: x,\n };\n }\n\n getHorizontalBarProps({ x }) {\n const { y } = this.asProps;\n\n return {\n offset: [0, this.scaleGroup(x)],\n height: this.scaleGroup.bandwidth(),\n y,\n groupKey: y,\n };\n }\n\n render() {\n const Element = this.Element;\n this.scaleGroup = this.getScaleGroup();\n\n this.asProps.dataHintsHandler.establishDataType('grouped-values');\n\n return (\n <Element aria-hidden render=\"g\" childrenPosition=\"inside\" scaleGroup={this.scaleGroup} />\n );\n }\n}\n\nconst GroupBar = createElement(GroupBarRoot, {\n Bar,\n HorizontalBar,\n});\n\nexport default GroupBar;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupBar.js","names":["GroupBarRoot","asProps","Children","scale","scaleGroup","x","xyScale","domain","React","toArray","getOriginChildren","reduce","acc","child","isValidElement","type","GroupBar","Bar","props","hide","push","y","HorizontalBar","copy","range","bandwidth","paddingInner","paddingOuter","offset","width","groupKey","height","Element","getScaleGroup","dataHintsHandler","establishDataType","Component","style","createElement"],"sources":["../../src/GroupBar.jsx"],"sourcesContent":["import React from 'react';\nimport { Component } from '@semcore/core';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\nimport createElement from './createElement';\nimport Bar from './Bar';\nimport HorizontalBar from './HorizontalBar';\n\nimport style from './style/bar.shadow.css';\n\nclass GroupBarRoot extends Component {\n static displayName = 'GroupBar';\n\n static style = style;\n\n getScaleGroup() {\n const { Children, scale, scaleGroup, x } = this.asProps;\n // TODO: love that hack (by lsroman)\n const xyScale = x ? scale[0] : scale[1];\n\n if (scaleGroup) return scaleGroup;\n\n const domain = React.Children.toArray(getOriginChildren(Children)).reduce((acc, child) => {\n if (React.isValidElement(child) && child.type === GroupBar.Bar && !child.props.hide) {\n acc.push(child.props.y);\n }\n if (\n React.isValidElement(child) &&\n child.type === GroupBar.HorizontalBar &&\n !child.props.hide\n ) {\n acc.push(child.props.x);\n }\n return acc;\n }, []);\n\n return xyScale\n .copy()\n .range([0, xyScale.bandwidth()])\n .domain(domain)\n .paddingInner(xyScale.paddingOuter())\n .paddingOuter(0);\n }\n\n getBarProps({ y }) {\n const { x } = this.asProps;\n\n return {\n offset: [this.scaleGroup(y), 0],\n width: this.scaleGroup.bandwidth(),\n x,\n groupKey: x,\n };\n }\n\n getHorizontalBarProps({ x }) {\n const { y } = this.asProps;\n\n return {\n offset: [0, this.scaleGroup(x)],\n height: this.scaleGroup.bandwidth(),\n y,\n groupKey: y,\n };\n }\n\n render() {\n const Element = this.Element;\n this.scaleGroup = this.getScaleGroup();\n\n this.asProps.dataHintsHandler.establishDataType('grouped-values');\n\n return (\n <Element aria-hidden render=\"g\" childrenPosition=\"inside\" scaleGroup={this.scaleGroup} />\n );\n }\n}\n\nconst GroupBar = createElement(GroupBarRoot, {\n Bar,\n HorizontalBar,\n});\n\nexport default GroupBar;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEMA,Y;;;;;;;;;;;;WAKJ,yBAAgB;MACd,oBAA2C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|
44
44
|
/*__inner_css_start__*/
|
|
45
|
-
".
|
|
45
|
+
".___SBar_1gm67_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_1gm67);transition-timing-function:ease-in-out}.___SBar_1gm67_gg_.__color_1gm67_gg_{fill:var(--color_1gm67)}.___SBar_1gm67_gg_.__hide_1gm67_gg_{display:none}.___SBackground_1gm67_gg_{fill:#c4c7cf}"
|
|
46
46
|
/*__inner_css_end__*/
|
|
47
|
-
, "
|
|
47
|
+
, "1gm67_gg_")
|
|
48
48
|
/*__reshadow_css_end__*/
|
|
49
49
|
, {
|
|
50
|
-
"__SBar": "
|
|
51
|
-
"--duration": "--
|
|
52
|
-
"_color": "
|
|
53
|
-
"--color": "--
|
|
54
|
-
"_hide": "
|
|
55
|
-
"__SBackground": "
|
|
50
|
+
"__SBar": "___SBar_1gm67_gg_",
|
|
51
|
+
"--duration": "--duration_1gm67",
|
|
52
|
+
"_color": "__color_1gm67_gg_",
|
|
53
|
+
"--color": "--color_1gm67",
|
|
54
|
+
"_hide": "__hide_1gm67_gg_",
|
|
55
|
+
"__SBackground": "___SBackground_1gm67_gg_"
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
var HorizontalBarRoot = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/Hover.js
CHANGED
|
@@ -44,13 +44,13 @@ var style = (
|
|
|
44
44
|
/*__reshadow_css_start__*/
|
|
45
45
|
_core.sstyled.insert(
|
|
46
46
|
/*__inner_css_start__*/
|
|
47
|
-
".
|
|
47
|
+
".___SHoverLine_coze4_gg_{stroke:#a9abb6}.___SHoverRect_coze4_gg_{fill:rgba(196,199,207,.3)}"
|
|
48
48
|
/*__inner_css_end__*/
|
|
49
|
-
, "
|
|
49
|
+
, "coze4_gg_")
|
|
50
50
|
/*__reshadow_css_end__*/
|
|
51
51
|
, {
|
|
52
|
-
"__SHoverLine": "
|
|
53
|
-
"__SHoverRect": "
|
|
52
|
+
"__SHoverLine": "___SHoverLine_coze4_gg_",
|
|
53
|
+
"__SHoverRect": "___SHoverRect_coze4_gg_"
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
var Hover = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/Line.js
CHANGED
|
@@ -46,17 +46,17 @@ var style = (
|
|
|
46
46
|
/*__reshadow_css_start__*/
|
|
47
47
|
_core.sstyled.insert(
|
|
48
48
|
/*__inner_css_start__*/
|
|
49
|
-
".
|
|
49
|
+
".___SLine_58m7j_gg_{fill:transparent;stroke-width:3;stroke:#2bb3ff;transition-property:d;transition-duration:var(--duration_58m7j);transition-timing-function:ease-in-out}.___SLine_58m7j_gg_.__color_58m7j_gg_{stroke:var(--color_58m7j)}.___SLine_58m7j_gg_.__hide_58m7j_gg_{display:none}.___SNull_58m7j_gg_{fill:transparent;stroke:#c4c7cf;stroke-dasharray:4}.___SNull_58m7j_gg_.__hide_58m7j_gg_{display:none}"
|
|
50
50
|
/*__inner_css_end__*/
|
|
51
|
-
, "
|
|
51
|
+
, "58m7j_gg_")
|
|
52
52
|
/*__reshadow_css_end__*/
|
|
53
53
|
, {
|
|
54
|
-
"__SLine": "
|
|
55
|
-
"--duration": "--
|
|
56
|
-
"_color": "
|
|
57
|
-
"--color": "--
|
|
58
|
-
"_hide": "
|
|
59
|
-
"__SNull": "
|
|
54
|
+
"__SLine": "___SLine_58m7j_gg_",
|
|
55
|
+
"--duration": "--duration_58m7j",
|
|
56
|
+
"_color": "__color_58m7j_gg_",
|
|
57
|
+
"--color": "--color_58m7j",
|
|
58
|
+
"_hide": "__hide_58m7j_gg_",
|
|
59
|
+
"__SNull": "___SNull_58m7j_gg_"
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
var LineRoot = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/Plot.js
CHANGED
|
@@ -58,13 +58,13 @@ var style = (
|
|
|
58
58
|
/*__reshadow_css_start__*/
|
|
59
59
|
_core.sstyled.insert(
|
|
60
60
|
/*__inner_css_start__*/
|
|
61
|
-
".
|
|
61
|
+
".___SPlot_uv2q2_gg_{overflow:hidden}.___SPlot_uv2q2_gg_:active,.___SPlot_uv2q2_gg_:focus{outline:0;text-decoration:none}.___SPlot_uv2q2_gg_.__keyboardFocused_uv2q2_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}"
|
|
62
62
|
/*__inner_css_end__*/
|
|
63
|
-
, "
|
|
63
|
+
, "uv2q2_gg_")
|
|
64
64
|
/*__reshadow_css_end__*/
|
|
65
65
|
, {
|
|
66
|
-
"__SPlot": "
|
|
67
|
-
"_keyboardFocused": "
|
|
66
|
+
"__SPlot": "___SPlot_uv2q2_gg_",
|
|
67
|
+
"_keyboardFocused": "__keyboardFocused_uv2q2_gg_"
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
var PlotRoot = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/RadialTree.js
CHANGED
|
@@ -60,20 +60,20 @@ var style = (
|
|
|
60
60
|
/*__reshadow_css_start__*/
|
|
61
61
|
_core.sstyled.insert(
|
|
62
62
|
/*__inner_css_start__*/
|
|
63
|
-
".
|
|
63
|
+
".___SRadian_73pdo_gg_{cursor:pointer;fill:#008ff8}.___SLine_73pdo_gg_{stroke:#008ff8}.___SLine_73pdo_gg_.__color_73pdo_gg_{stroke:var(--color_73pdo)}.___SCap_73pdo_gg_{transition:r .1s}.___SLabel_73pdo_gg_{fill:var(--color_73pdo);cursor:var(--text-cursor_73pdo)}.___SRadian_73pdo_gg_:hover .___SLabel_73pdo_gg_{fill:var(--color-hovered_73pdo)}@media (prefers-reduced-motion){.___SLineCap_73pdo_gg_{transition:none}}"
|
|
64
64
|
/*__inner_css_end__*/
|
|
65
|
-
, "
|
|
65
|
+
, "73pdo_gg_")
|
|
66
66
|
/*__reshadow_css_end__*/
|
|
67
67
|
, {
|
|
68
|
-
"__SRadian": "
|
|
69
|
-
"__SLine": "
|
|
70
|
-
"_color": "
|
|
71
|
-
"--color": "--
|
|
72
|
-
"__SCap": "
|
|
73
|
-
"__SLabel": "
|
|
74
|
-
"--text-cursor": "--text-
|
|
75
|
-
"--color-hovered": "--color-
|
|
76
|
-
"__SLineCap": "
|
|
68
|
+
"__SRadian": "___SRadian_73pdo_gg_",
|
|
69
|
+
"__SLine": "___SLine_73pdo_gg_",
|
|
70
|
+
"_color": "__color_73pdo_gg_",
|
|
71
|
+
"--color": "--color_73pdo",
|
|
72
|
+
"__SCap": "___SCap_73pdo_gg_",
|
|
73
|
+
"__SLabel": "___SLabel_73pdo_gg_",
|
|
74
|
+
"--text-cursor": "--text-cursor_73pdo",
|
|
75
|
+
"--color-hovered": "--color-hovered_73pdo",
|
|
76
|
+
"__SLineCap": "___SLineCap_73pdo_gg_"
|
|
77
77
|
});
|
|
78
78
|
var baseAngle = -Math.PI / 2; // The top vertical line
|
|
79
79
|
|
package/lib/cjs/ReferenceLine.js
CHANGED
|
@@ -42,19 +42,19 @@ var style = (
|
|
|
42
42
|
/*__reshadow_css_start__*/
|
|
43
43
|
_core.sstyled.insert(
|
|
44
44
|
/*__inner_css_start__*/
|
|
45
|
-
".
|
|
45
|
+
".___SReferenceLine_myf25_gg_{fill:none;stroke:#a9abb6}.___STitle_myf25_gg_{font-size:12px;fill:#6c6e79;transform-origin:var(--transform-origin_myf25)}.___STitle_myf25_gg_._position_top_myf25_gg_{text-anchor:middle}.___STitle_myf25_gg_._position_bottom_myf25_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_myf25_gg_._position_right_myf25_gg_{transform:rotate(-90deg);alignment-baseline:middle;text-anchor:middle}.___STitle_myf25_gg_._position_left_myf25_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___SBackground_myf25_gg_{fill:rgba(196,199,207,.2)}"
|
|
46
46
|
/*__inner_css_end__*/
|
|
47
|
-
, "
|
|
47
|
+
, "myf25_gg_")
|
|
48
48
|
/*__reshadow_css_end__*/
|
|
49
49
|
, {
|
|
50
|
-
"__SReferenceLine": "
|
|
51
|
-
"__STitle": "
|
|
52
|
-
"--transform-origin": "--transform-
|
|
53
|
-
"_position_top": "
|
|
54
|
-
"_position_bottom": "
|
|
55
|
-
"_position_right": "
|
|
56
|
-
"_position_left": "
|
|
57
|
-
"__SBackground": "
|
|
50
|
+
"__SReferenceLine": "___SReferenceLine_myf25_gg_",
|
|
51
|
+
"__STitle": "___STitle_myf25_gg_",
|
|
52
|
+
"--transform-origin": "--transform-origin_myf25",
|
|
53
|
+
"_position_top": "_position_top_myf25_gg_",
|
|
54
|
+
"_position_bottom": "_position_bottom_myf25_gg_",
|
|
55
|
+
"_position_right": "_position_right_myf25_gg_",
|
|
56
|
+
"_position_left": "_position_left_myf25_gg_",
|
|
57
|
+
"__SBackground": "___SBackground_myf25_gg_"
|
|
58
58
|
});
|
|
59
59
|
var MAP_ORIENTATION = {
|
|
60
60
|
left: 'vertical',
|
package/lib/cjs/ScatterPlot.js
CHANGED
|
@@ -52,16 +52,16 @@ var style = (
|
|
|
52
52
|
/*__reshadow_css_start__*/
|
|
53
53
|
_core.sstyled.insert(
|
|
54
54
|
/*__inner_css_start__*/
|
|
55
|
-
".
|
|
55
|
+
".___SScatterPlot_1ez8h_gg_{fill:#2bb3ff;transition-property:cx,cy;transition-duration:var(--duration_1ez8h);transition-timing-function:ease-in-out;opacity:.5}.___SScatterPlot_1ez8h_gg_:hover{opacity:.8}.___SScatterPlot_1ez8h_gg_.__color_1ez8h_gg_{fill:var(--color_1ez8h)}.___SValue_1ez8h_gg_{text-anchor:middle;font-size:10px;stroke:#008ff8}.___SValue_1ez8h_gg_.__color_1ez8h_gg_{stroke:var(--color_1ez8h)}"
|
|
56
56
|
/*__inner_css_end__*/
|
|
57
|
-
, "
|
|
57
|
+
, "1ez8h_gg_")
|
|
58
58
|
/*__reshadow_css_end__*/
|
|
59
59
|
, {
|
|
60
|
-
"__SScatterPlot": "
|
|
61
|
-
"--duration": "--
|
|
62
|
-
"_color": "
|
|
63
|
-
"--color": "--
|
|
64
|
-
"__SValue": "
|
|
60
|
+
"__SScatterPlot": "___SScatterPlot_1ez8h_gg_",
|
|
61
|
+
"--duration": "--duration_1ez8h",
|
|
62
|
+
"_color": "__color_1ez8h_gg_",
|
|
63
|
+
"--color": "--color_1ez8h",
|
|
64
|
+
"__SValue": "___SValue_1ez8h_gg_"
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
var ScatterPlotRoot = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/StackBar.js
CHANGED
|
@@ -19,8 +19,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
19
19
|
|
|
20
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
21
|
|
|
22
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
23
|
-
|
|
24
22
|
var _react = _interopRequireDefault(require("react"));
|
|
25
23
|
|
|
26
24
|
var _d3Shape = require("d3-shape");
|
|
@@ -35,6 +33,8 @@ var _Bar = _interopRequireDefault(require("./Bar"));
|
|
|
35
33
|
|
|
36
34
|
var _HorizontalBar = _interopRequireDefault(require("./HorizontalBar"));
|
|
37
35
|
|
|
36
|
+
var _barShadow = _interopRequireDefault(require("./style/bar.shadow.css"));
|
|
37
|
+
|
|
38
38
|
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; }
|
|
39
39
|
|
|
40
40
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -43,23 +43,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
43
43
|
|
|
44
44
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
45
|
|
|
46
|
-
/*__reshadow-styles__:"./style/bar.shadow.css"*/
|
|
47
|
-
var _ref = (
|
|
48
|
-
/*__reshadow_css_start__*/
|
|
49
|
-
(0, _core.__css__)(
|
|
50
|
-
/*__inner_css_start__*/
|
|
51
|
-
".___SBar_ns3re_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SBar_ns3re_gg_.__color_ns3re_gg_{fill:var(--color)}.___SBar_ns3re_gg_.__hide_ns3re_gg_{display:none}.___SBackground_ns3re_gg_{fill:#c4c7cf}"
|
|
52
|
-
/*__inner_css_end__*/
|
|
53
|
-
, "bmt5z6_gg_")
|
|
54
|
-
/*__reshadow_css_end__*/
|
|
55
|
-
, {
|
|
56
|
-
"__SBar": "___SBar_ns3re_gg_",
|
|
57
|
-
"_color": "__color_ns3re_gg_",
|
|
58
|
-
"_hide": "__hide_ns3re_gg_",
|
|
59
|
-
"__SBackground": "___SBackground_ns3re_gg_"
|
|
60
|
-
}),
|
|
61
|
-
style = (0, _extends2["default"])({}, _ref);
|
|
62
|
-
|
|
63
46
|
var DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');
|
|
64
47
|
var XY0 = Symbol('XY0');
|
|
65
48
|
|
|
@@ -101,10 +84,10 @@ var StackBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
101
84
|
}
|
|
102
85
|
}, {
|
|
103
86
|
key: "getBarProps",
|
|
104
|
-
value: function getBarProps(
|
|
87
|
+
value: function getBarProps(_ref) {
|
|
105
88
|
var _this = this;
|
|
106
89
|
|
|
107
|
-
var y =
|
|
90
|
+
var y = _ref.y;
|
|
108
91
|
var _this$asProps2 = this.asProps,
|
|
109
92
|
x = _this$asProps2.x,
|
|
110
93
|
r = _this$asProps2.r;
|
|
@@ -132,10 +115,10 @@ var StackBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
132
115
|
}
|
|
133
116
|
}, {
|
|
134
117
|
key: "getHorizontalBarProps",
|
|
135
|
-
value: function getHorizontalBarProps(
|
|
118
|
+
value: function getHorizontalBarProps(_ref2) {
|
|
136
119
|
var _this2 = this;
|
|
137
120
|
|
|
138
|
-
var x =
|
|
121
|
+
var x = _ref2.x;
|
|
139
122
|
var _this$asProps3 = this.asProps,
|
|
140
123
|
y = _this$asProps3.y,
|
|
141
124
|
r = _this$asProps3.r;
|
|
@@ -177,7 +160,7 @@ var StackBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
177
160
|
}(_core.Component);
|
|
178
161
|
|
|
179
162
|
(0, _defineProperty2["default"])(StackBarRoot, "displayName", 'StackBar');
|
|
180
|
-
(0, _defineProperty2["default"])(StackBarRoot, "style",
|
|
163
|
+
(0, _defineProperty2["default"])(StackBarRoot, "style", _barShadow["default"]);
|
|
181
164
|
(0, _defineProperty2["default"])(StackBarRoot, "defaultProps", function () {
|
|
182
165
|
var stack = (0, _d3Shape.stack)();
|
|
183
166
|
stack[DEFAULT_INSTANCE] = true;
|
package/lib/cjs/StackBar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackBar.js","names":["DEFAULT_INSTANCE","Symbol","XY0","StackBarRoot","asProps","Children","data","stack","keys","React","toArray","getOriginChildren","reduce","acc","child","isValidElement","type","StackBar","Bar","props","hide","push","y","HorizontalBar","x","r","seriesIndex","series","findIndex","s","key","rBar","map","i","slice","some","bar","y0","groupKey","x0","Element","getSeries","dataHintsHandler","establishDataType","Component","style","d3Stack","createElement"],"sources":["../../src/StackBar.jsx"],"sourcesContent":["import React from 'react';\nimport { stack as d3Stack } from 'd3-shape';\nimport { Component } from '@semcore/core';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\nimport createElement from './createElement';\nimport Bar from './Bar';\nimport HorizontalBar from './HorizontalBar';\n\nimport style from './style/bar.shadow.css';\n\nconst DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');\nconst XY0 = Symbol('XY0');\n\nclass StackBarRoot extends Component {\n static displayName = 'StackBar';\n\n static style = style;\n\n static defaultProps = () => {\n const stack = d3Stack();\n stack[DEFAULT_INSTANCE] = true;\n return { stack, r: 2 };\n };\n\n getSeries() {\n const { Children, data, stack } = this.asProps;\n\n if (stack[DEFAULT_INSTANCE]) {\n const keys = React.Children.toArray(getOriginChildren(Children)).reduce((acc, child) => {\n if (React.isValidElement(child) && child.type === StackBar.Bar && !child.props.hide) {\n acc.push(child.props.y);\n }\n if (\n React.isValidElement(child) &&\n child.type === StackBar.HorizontalBar &&\n !child.props.hide\n ) {\n acc.push(child.props.x);\n }\n return acc;\n }, []);\n stack.keys(keys);\n }\n\n return stack(data);\n }\n\n getBarProps({ y }) {\n const { x, r } = this.asProps;\n\n const seriesIndex = this.series.findIndex((s) => s.key === y);\n // or [] if hide bar\n const series = this.series[seriesIndex] || [];\n\n const rBar = series.map((s, i) =>\n this.series.slice(seriesIndex + 1).some((bar) => bar[i][0] !== bar[i][1]) ? 0 : r,\n );\n\n return {\n data: series.map((s) => ({\n ...s.data,\n [y]: s[1],\n [XY0]: s[0],\n })),\n y0: XY0,\n x,\n r: rBar,\n groupKey: x,\n };\n }\n\n getHorizontalBarProps({ x }) {\n const { y, r } = this.asProps;\n\n const seriesIndex = this.series.findIndex((s) => s.key === x);\n const series = this.series[seriesIndex];\n\n const rBar = series.map((s, i) =>\n this.series.slice(seriesIndex + 1).some((bar) => bar[i][0] !== bar[i][1]) ? 0 : r,\n );\n\n return {\n data: series.map((s) => ({\n ...s.data,\n [x]: s[1],\n [XY0]: s[0],\n })),\n x0: XY0,\n y,\n r: rBar,\n groupKey: y,\n };\n }\n\n render() {\n const Element = this.Element;\n this.series = this.getSeries();\n\n this.asProps.dataHintsHandler.establishDataType('grouped-values');\n\n return <Element aria-hidden render=\"g\" series={this.series} />;\n }\n}\n\nconst StackBar = createElement(StackBarRoot, {\n Bar,\n HorizontalBar,\n});\n\nexport default StackBar;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"StackBar.js","names":["DEFAULT_INSTANCE","Symbol","XY0","StackBarRoot","asProps","Children","data","stack","keys","React","toArray","getOriginChildren","reduce","acc","child","isValidElement","type","StackBar","Bar","props","hide","push","y","HorizontalBar","x","r","seriesIndex","series","findIndex","s","key","rBar","map","i","slice","some","bar","y0","groupKey","x0","Element","getSeries","dataHintsHandler","establishDataType","Component","style","d3Stack","createElement"],"sources":["../../src/StackBar.jsx"],"sourcesContent":["import React from 'react';\nimport { stack as d3Stack } from 'd3-shape';\nimport { Component } from '@semcore/core';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\nimport createElement from './createElement';\nimport Bar from './Bar';\nimport HorizontalBar from './HorizontalBar';\n\nimport style from './style/bar.shadow.css';\n\nconst DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');\nconst XY0 = Symbol('XY0');\n\nclass StackBarRoot extends Component {\n static displayName = 'StackBar';\n\n static style = style;\n\n static defaultProps = () => {\n const stack = d3Stack();\n stack[DEFAULT_INSTANCE] = true;\n return { stack, r: 2 };\n };\n\n getSeries() {\n const { Children, data, stack } = this.asProps;\n\n if (stack[DEFAULT_INSTANCE]) {\n const keys = React.Children.toArray(getOriginChildren(Children)).reduce((acc, child) => {\n if (React.isValidElement(child) && child.type === StackBar.Bar && !child.props.hide) {\n acc.push(child.props.y);\n }\n if (\n React.isValidElement(child) &&\n child.type === StackBar.HorizontalBar &&\n !child.props.hide\n ) {\n acc.push(child.props.x);\n }\n return acc;\n }, []);\n stack.keys(keys);\n }\n\n return stack(data);\n }\n\n getBarProps({ y }) {\n const { x, r } = this.asProps;\n\n const seriesIndex = this.series.findIndex((s) => s.key === y);\n // or [] if hide bar\n const series = this.series[seriesIndex] || [];\n\n const rBar = series.map((s, i) =>\n this.series.slice(seriesIndex + 1).some((bar) => bar[i][0] !== bar[i][1]) ? 0 : r,\n );\n\n return {\n data: series.map((s) => ({\n ...s.data,\n [y]: s[1],\n [XY0]: s[0],\n })),\n y0: XY0,\n x,\n r: rBar,\n groupKey: x,\n };\n }\n\n getHorizontalBarProps({ x }) {\n const { y, r } = this.asProps;\n\n const seriesIndex = this.series.findIndex((s) => s.key === x);\n const series = this.series[seriesIndex];\n\n const rBar = series.map((s, i) =>\n this.series.slice(seriesIndex + 1).some((bar) => bar[i][0] !== bar[i][1]) ? 0 : r,\n );\n\n return {\n data: series.map((s) => ({\n ...s.data,\n [x]: s[1],\n [XY0]: s[0],\n })),\n x0: XY0,\n y,\n r: rBar,\n groupKey: y,\n };\n }\n\n render() {\n const Element = this.Element;\n this.series = this.getSeries();\n\n this.asProps.dataHintsHandler.establishDataType('grouped-values');\n\n return <Element aria-hidden render=\"g\" series={this.series} />;\n }\n}\n\nconst StackBar = createElement(StackBarRoot, {\n Bar,\n HorizontalBar,\n});\n\nexport default StackBar;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AAEA,IAAMA,gBAAgB,GAAGC,MAAM,CAAC,kBAAD,CAA/B;AACA,IAAMC,GAAG,GAAGD,MAAM,CAAC,KAAD,CAAlB;;IAEME,Y;;;;;;;;;;;;WAWJ,qBAAY;MACV,oBAAkC,KAAKC,OAAvC;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,IAAlB,iBAAkBA,IAAlB;MAAA,IAAwBC,KAAxB,iBAAwBA,KAAxB;;MAEA,IAAIA,KAAK,CAACP,gBAAD,CAAT,EAA6B;QAC3B,IAAMQ,IAAI,GAAGC,iBAAA,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