victory-errorbar 37.0.1-next.2 → 37.0.2
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 +8 -3
- package/dist/victory-errorbar.js +20 -23
- package/dist/victory-errorbar.min.js +1 -1
- package/es/error-bar.d.ts +31 -31
- package/es/error-bar.js +2 -4
- package/es/helper-methods.d.ts +3 -3
- package/es/index.d.ts +2 -2
- package/es/victory-errorbar.d.ts +85 -85
- package/lib/error-bar.d.ts +31 -31
- package/lib/error-bar.js +2 -4
- package/lib/helper-methods.d.ts +3 -3
- package/lib/index.d.ts +2 -2
- package/lib/victory-errorbar.d.ts +85 -85
- package/package.json +6 -3
- package/src/error-bar.tsx +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
# victory-errorbar
|
|
2
2
|
|
|
3
|
-
## 37.0.
|
|
3
|
+
## 37.0.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
7
|
+
- Ensure undefined props do not overwrite defaults ([#2852](https://github.com/FormidableLabs/victory/pull/2852))
|
|
8
|
+
|
|
9
|
+
## 37.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix the signature of class static functions in components ([#2840](https://github.com/FormidableLabs/victory/pull/2840))
|
|
9
14
|
|
|
10
15
|
## 37.0.0
|
|
11
16
|
|
package/dist/victory-errorbar.js
CHANGED
|
@@ -22,17 +22,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22
22
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23
23
|
/* harmony export */ "ErrorBar": function() { return /* binding */ ErrorBar; }
|
|
24
24
|
/* harmony export */ });
|
|
25
|
-
/* harmony import */ var
|
|
26
|
-
/* harmony import */ var
|
|
27
|
-
/* harmony import */ var
|
|
28
|
-
/* harmony import */ var
|
|
29
|
-
/* harmony import */ var
|
|
25
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
26
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
27
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
28
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
29
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
30
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/line.js");
|
|
31
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
32
|
+
|
|
30
33
|
/* eslint-disable max-statements */
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
const renderBorder = (props, error, type) => {
|
|
34
37
|
const vertical = type === "right" || type === "left";
|
|
35
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.lineComponent, {
|
|
36
39
|
...props.events,
|
|
37
40
|
role: props.role,
|
|
38
41
|
shapeRendering: props.shapeRendering,
|
|
@@ -49,7 +52,7 @@ const renderBorder = (props, error, type) => {
|
|
|
49
52
|
};
|
|
50
53
|
const renderCross = (props, error, type) => {
|
|
51
54
|
const vertical = type === "top" || type === "bottom";
|
|
52
|
-
return /*#__PURE__*/
|
|
55
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.lineComponent, {
|
|
53
56
|
...props.events,
|
|
54
57
|
role: props.role,
|
|
55
58
|
shapeRendering: props.shapeRendering,
|
|
@@ -108,12 +111,12 @@ const evaluateProps = props => {
|
|
|
108
111
|
* `style`
|
|
109
112
|
* `tabIndex`
|
|
110
113
|
*/
|
|
111
|
-
const ariaLabel =
|
|
112
|
-
const id =
|
|
113
|
-
const style =
|
|
114
|
+
const ariaLabel = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
115
|
+
const id = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
116
|
+
const style = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(Object.assign({
|
|
114
117
|
stroke: "black"
|
|
115
118
|
}, props.style), props);
|
|
116
|
-
const tabIndex =
|
|
119
|
+
const tabIndex = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
117
120
|
return Object.assign({}, props, {
|
|
118
121
|
ariaLabel,
|
|
119
122
|
id,
|
|
@@ -127,27 +130,24 @@ const evaluateProps = props => {
|
|
|
127
130
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
128
131
|
|
|
129
132
|
const defaultProps = {
|
|
130
|
-
groupComponent: /*#__PURE__*/
|
|
131
|
-
lineComponent: /*#__PURE__*/
|
|
133
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null),
|
|
134
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
132
135
|
role: "presentation",
|
|
133
136
|
shapeRendering: "auto"
|
|
134
137
|
};
|
|
135
138
|
const ErrorBar = initialProps => {
|
|
136
|
-
const props = evaluateProps({
|
|
137
|
-
...defaultProps,
|
|
138
|
-
...initialProps
|
|
139
|
-
});
|
|
139
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
140
140
|
const {
|
|
141
141
|
groupComponent
|
|
142
142
|
} = props;
|
|
143
|
-
const userProps =
|
|
143
|
+
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_4__.getSafeUserProps(props);
|
|
144
144
|
const {
|
|
145
145
|
tabIndex,
|
|
146
146
|
ariaLabel
|
|
147
147
|
} = props;
|
|
148
148
|
const error = calculateError(props);
|
|
149
149
|
const children = [error.right ? renderBorder(props, error, "right") : null, error.left ? renderBorder(props, error, "left") : null, error.bottom ? renderBorder(props, error, "bottom") : null, error.top ? renderBorder(props, error, "top") : null, error.right ? renderCross(props, error, "right") : null, error.left ? renderCross(props, error, "left") : null, error.bottom ? renderCross(props, error, "bottom") : null, error.top ? renderCross(props, error, "top") : null].filter(Boolean);
|
|
150
|
-
return /*#__PURE__*/
|
|
150
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(groupComponent, {
|
|
151
151
|
tabIndex,
|
|
152
152
|
"aria-label": ariaLabel,
|
|
153
153
|
...userProps
|
|
@@ -6163,10 +6163,7 @@ const defaultProps = {
|
|
|
6163
6163
|
lineHeight: 1
|
|
6164
6164
|
};
|
|
6165
6165
|
const VictoryLabel = initialProps => {
|
|
6166
|
-
const props = evaluateProps({
|
|
6167
|
-
...defaultProps,
|
|
6168
|
-
...initialProps
|
|
6169
|
-
});
|
|
6166
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
6170
6167
|
if (props.text === null || props.text === undefined) {
|
|
6171
6168
|
return null;
|
|
6172
6169
|
}
|