@semcore/d3-chart 3.21.2 → 3.21.3
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 -1
- package/lib/cjs/AnimatedClipPath.js +62 -0
- package/lib/cjs/AnimatedClipPath.js.map +1 -0
- package/lib/cjs/Area.js +13 -19
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +13 -13
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +14 -14
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/Donut.js +7 -7
- package/lib/cjs/Dots.js +14 -15
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +12 -15
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +13 -16
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +17 -17
- package/lib/cjs/RadialTree.js +10 -10
- package/lib/cjs/ReferenceLine.js +9 -9
- package/lib/cjs/ScatterPlot.js +11 -12
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/Tooltip.js +8 -8
- package/lib/cjs/Venn.js +7 -7
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +15 -15
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/cjs/style/dot.shadow.css +0 -5
- package/lib/es6/AnimatedClipPath.js +53 -0
- package/lib/es6/AnimatedClipPath.js.map +1 -0
- package/lib/es6/Area.js +13 -19
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +13 -13
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +14 -14
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/Donut.js +7 -7
- package/lib/es6/Dots.js +14 -15
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/HorizontalBar.js +12 -15
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +13 -16
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +17 -17
- package/lib/es6/RadialTree.js +10 -10
- package/lib/es6/ReferenceLine.js +9 -9
- package/lib/es6/ScatterPlot.js +11 -12
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/Tooltip.js +8 -8
- package/lib/es6/Venn.js +7 -7
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +15 -15
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/es6/style/dot.shadow.css +0 -5
- package/package.json +7 -7
- package/lib/cjs/ClipPath.js +0 -94
- package/lib/cjs/ClipPath.js.map +0 -1
- package/lib/es6/ClipPath.js +0 -85
- package/lib/es6/ClipPath.js.map +0 -1
package/lib/es6/ClipPath.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
7
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
9
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["id", "transition", "tag", "style", "className"];
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import createComponent, { Component } from '@semcore/core';
|
|
13
|
-
import propsForElement from '@semcore/utils/lib/propsForElement';
|
|
14
|
-
var ClipPath = /*#__PURE__*/function (_Component) {
|
|
15
|
-
_inherits(ClipPath, _Component);
|
|
16
|
-
var _super = _createSuper(ClipPath);
|
|
17
|
-
function ClipPath() {
|
|
18
|
-
var _this;
|
|
19
|
-
_classCallCheck(this, ClipPath);
|
|
20
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21
|
-
args[_key] = arguments[_key];
|
|
22
|
-
}
|
|
23
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
24
|
-
_defineProperty(_assertThisInitialized(_this), "refClipPath", /*#__PURE__*/React.createRef());
|
|
25
|
-
return _this;
|
|
26
|
-
}
|
|
27
|
-
_createClass(ClipPath, [{
|
|
28
|
-
key: "setAttributeTag",
|
|
29
|
-
value: function setAttributeTag() {
|
|
30
|
-
var _this$asProps = this.asProps,
|
|
31
|
-
id = _this$asProps.id,
|
|
32
|
-
tag = _this$asProps.tag,
|
|
33
|
-
setAttributeTag = _this$asProps.setAttributeTag;
|
|
34
|
-
if (setAttributeTag) {
|
|
35
|
-
Array.from(document.querySelectorAll("#".concat(id, " ").concat(tag))).forEach(setAttributeTag);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}, {
|
|
39
|
-
key: "componentDidMount",
|
|
40
|
-
value: function componentDidMount() {
|
|
41
|
-
var id = this.asProps.id;
|
|
42
|
-
if (!document || !id || !document.querySelector("#".concat(id))) return;
|
|
43
|
-
var svg = document.querySelector("#".concat(id)).closest('svg');
|
|
44
|
-
Array.from(svg.querySelectorAll("[clip-path=\"url(#".concat(id, ")\"]"))).forEach(function (node) {
|
|
45
|
-
var _node$getTotalLength;
|
|
46
|
-
node === null || node === void 0 ? void 0 : (_node$getTotalLength = node.getTotalLength) === null || _node$getTotalLength === void 0 ? void 0 : _node$getTotalLength.call(node);
|
|
47
|
-
});
|
|
48
|
-
this.setAttributeTag();
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
key: "componentDidUpdate",
|
|
52
|
-
value: function componentDidUpdate() {
|
|
53
|
-
this.setAttributeTag();
|
|
54
|
-
}
|
|
55
|
-
}, {
|
|
56
|
-
key: "render",
|
|
57
|
-
value: function render() {
|
|
58
|
-
var _this$asProps2 = this.asProps,
|
|
59
|
-
id = _this$asProps2.id,
|
|
60
|
-
transition = _this$asProps2.transition,
|
|
61
|
-
Tag = _this$asProps2.tag,
|
|
62
|
-
style = _this$asProps2.style,
|
|
63
|
-
className = _this$asProps2.className,
|
|
64
|
-
other = _objectWithoutProperties(_this$asProps2, _excluded);
|
|
65
|
-
return /*#__PURE__*/React.createElement("clipPath", {
|
|
66
|
-
"aria-hidden": true,
|
|
67
|
-
ref: this.refClipPath,
|
|
68
|
-
id: id
|
|
69
|
-
}, /*#__PURE__*/React.createElement(Tag, _extends({
|
|
70
|
-
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
71
|
-
transition: transition
|
|
72
|
-
})
|
|
73
|
-
}, propsForElement(other, Tag))));
|
|
74
|
-
}
|
|
75
|
-
}]);
|
|
76
|
-
return ClipPath;
|
|
77
|
-
}(Component);
|
|
78
|
-
_defineProperty(ClipPath, "defaultProps", {
|
|
79
|
-
tag: 'rect',
|
|
80
|
-
id: '',
|
|
81
|
-
transition: '',
|
|
82
|
-
setAttributeTag: null
|
|
83
|
-
});
|
|
84
|
-
export default createComponent(ClipPath);
|
|
85
|
-
//# sourceMappingURL=ClipPath.js.map
|
package/lib/es6/ClipPath.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClipPath.js","names":["React","createComponent","Component","propsForElement","ClipPath","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","createRef","_createClass","key","value","setAttributeTag","_this$asProps","asProps","id","tag","from","document","querySelectorAll","forEach","componentDidMount","querySelector","svg","closest","node","_node$getTotalLength","getTotalLength","componentDidUpdate","render","_this$asProps2","transition","Tag","style","className","other","_objectWithoutProperties","_excluded","createElement","ref","refClipPath","_extends","_objectSpread"],"sources":["../../src/ClipPath.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component } from '@semcore/core';\nimport propsForElement from '@semcore/utils/lib/propsForElement';\n\nclass ClipPath extends Component {\n static defaultProps = {\n tag: 'rect',\n id: '',\n transition: '',\n setAttributeTag: null,\n };\n\n refClipPath = React.createRef();\n\n setAttributeTag() {\n const { id, tag, setAttributeTag } = this.asProps;\n if (setAttributeTag) {\n Array.from(document.querySelectorAll(`#${id} ${tag}`)).forEach(setAttributeTag);\n }\n }\n\n componentDidMount() {\n const { id } = this.asProps;\n if (!document || !id || !document.querySelector(`#${id}`)) return;\n const svg = document.querySelector(`#${id}`).closest('svg');\n Array.from(svg.querySelectorAll(`[clip-path=\"url(#${id})\"]`)).forEach((node) => {\n node?.getTotalLength?.();\n });\n this.setAttributeTag();\n }\n\n componentDidUpdate() {\n this.setAttributeTag();\n }\n\n render() {\n const { id, transition, tag: Tag, style, className, ...other } = this.asProps;\n return (\n <clipPath aria-hidden ref={this.refClipPath} id={id}>\n <Tag style={{ ...style, transition }} {...propsForElement(other, Tag)} />\n </clipPath>\n );\n }\n}\n\nexport default createComponent(ClipPath);\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,QAAQ,eAAe;AAC1D,OAAOC,eAAe,MAAM,oCAAoC;AAAC,IAE3DC,QAAQ,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,QAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC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