victory-pie 36.5.3 → 36.6.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 +31 -0
- package/dist/victory-pie.js +5881 -2069
- package/dist/victory-pie.min.js +1 -1
- package/es/helper-methods.js +4 -4
- package/es/victory-pie.js +1 -1
- package/lib/helper-methods.js +4 -4
- package/package.json +255 -8
- package/src/helper-methods.js +3 -5
- package/src/victory-pie.js +1 -1
package/es/helper-methods.js
CHANGED
|
@@ -9,9 +9,9 @@ import { Helpers, Data, Style } from "victory-core";
|
|
|
9
9
|
var checkForValidText = function (text) {
|
|
10
10
|
if (text === undefined || text === null || _isFunction(text)) {
|
|
11
11
|
return text;
|
|
12
|
-
} else {
|
|
13
|
-
return "".concat(text);
|
|
14
12
|
}
|
|
13
|
+
|
|
14
|
+
return "".concat(text);
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
var getColor = function (style, colors, index) {
|
|
@@ -122,9 +122,9 @@ var getLabelOrientation = function (degree, labelPlacement) {
|
|
|
122
122
|
return "right";
|
|
123
123
|
} else if (degree >= 135 && degree < 225) {
|
|
124
124
|
return "bottom";
|
|
125
|
-
} else {
|
|
126
|
-
return "left";
|
|
127
125
|
}
|
|
126
|
+
|
|
127
|
+
return "left";
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
var getTextAnchor = function (orientation) {
|
package/es/victory-pie.js
CHANGED
|
@@ -18,7 +18,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
18
18
|
|
|
19
19
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
20
|
|
|
21
|
-
/*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
|
|
21
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
|
|
22
22
|
import React from "react";
|
|
23
23
|
import PropTypes from "prop-types";
|
|
24
24
|
import { addEvents, Helpers, Data, PropTypes as CustomPropTypes, VictoryContainer, VictoryLabel, VictoryTheme, UserProps } from "victory-core";
|
package/lib/helper-methods.js
CHANGED
|
@@ -28,9 +28,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
28
28
|
var checkForValidText = function (text) {
|
|
29
29
|
if (text === undefined || text === null || (0, _isFunction2.default)(text)) {
|
|
30
30
|
return text;
|
|
31
|
-
} else {
|
|
32
|
-
return "".concat(text);
|
|
33
31
|
}
|
|
32
|
+
|
|
33
|
+
return "".concat(text);
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
var getColor = function (style, colors, index) {
|
|
@@ -146,9 +146,9 @@ var getLabelOrientation = function (degree, labelPlacement) {
|
|
|
146
146
|
return "right";
|
|
147
147
|
} else if (degree >= 135 && degree < 225) {
|
|
148
148
|
return "bottom";
|
|
149
|
-
} else {
|
|
150
|
-
return "left";
|
|
151
149
|
}
|
|
150
|
+
|
|
151
|
+
return "left";
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
var getTextAnchor = function (orientation) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-pie",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.6.2",
|
|
4
4
|
"description": "Pie Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"url": "https://github.com/formidablelabs/victory.git"
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://formidable.com/open-source/victory",
|
|
16
|
+
"sideEffects": false,
|
|
16
17
|
"main": "lib/index.js",
|
|
17
18
|
"module": "es/index.js",
|
|
18
19
|
"jsnext:main": "es/index.js",
|
|
@@ -21,15 +22,261 @@
|
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"lodash": "^4.17.19",
|
|
23
24
|
"prop-types": "^15.8.1",
|
|
24
|
-
"victory-core": "^36.
|
|
25
|
-
"victory-vendor": "^36.
|
|
25
|
+
"victory-core": "^36.6.2",
|
|
26
|
+
"victory-vendor": "^36.6.2"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
29
|
"react": ">=16.6.0"
|
|
29
30
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"victory-pie": "*"
|
|
32
33
|
},
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
}
|
|
34
|
+
"wireit": {
|
|
35
|
+
"### THESE WIREIT CONFIGS ARE GENERATED ####": {},
|
|
36
|
+
"### DO NOT MODIFY THESE MANUALLY ####": {},
|
|
37
|
+
"build": {
|
|
38
|
+
"dependencies": [
|
|
39
|
+
"build:lib",
|
|
40
|
+
"build:dist",
|
|
41
|
+
"types:create"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"build:lib": {
|
|
45
|
+
"dependencies": [
|
|
46
|
+
"build:lib:esm",
|
|
47
|
+
"build:lib:cjs"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"build:lib:esm": {
|
|
51
|
+
"command": "nps build:lib:esm",
|
|
52
|
+
"files": [
|
|
53
|
+
"src/**",
|
|
54
|
+
"!src/**/*.test.*",
|
|
55
|
+
"../../.babelrc.build.js"
|
|
56
|
+
],
|
|
57
|
+
"output": [
|
|
58
|
+
"es/**/*.js",
|
|
59
|
+
"es/**/*.js.map"
|
|
60
|
+
],
|
|
61
|
+
"dependencies": [
|
|
62
|
+
"../victory-core:build:lib:esm",
|
|
63
|
+
"../victory-vendor:build:lib:esm"
|
|
64
|
+
],
|
|
65
|
+
"packageLocks": [
|
|
66
|
+
"pnpm-lock.yaml"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"build:lib:cjs": {
|
|
70
|
+
"command": "nps build:lib:cjs",
|
|
71
|
+
"files": [
|
|
72
|
+
"src/**",
|
|
73
|
+
"!src/**/*.test.*",
|
|
74
|
+
"../../.babelrc.build.js"
|
|
75
|
+
],
|
|
76
|
+
"output": [
|
|
77
|
+
"lib/**/*.js",
|
|
78
|
+
"lib/**/*.js.map"
|
|
79
|
+
],
|
|
80
|
+
"dependencies": [
|
|
81
|
+
"../victory-core:build:lib:cjs",
|
|
82
|
+
"../victory-vendor:build:lib:cjs"
|
|
83
|
+
],
|
|
84
|
+
"packageLocks": [
|
|
85
|
+
"pnpm-lock.yaml"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"build:dist": {
|
|
89
|
+
"dependencies": [
|
|
90
|
+
"build:dist:dev",
|
|
91
|
+
"build:dist:min"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"build:dist:dev": {
|
|
95
|
+
"command": "nps build:dist:dev",
|
|
96
|
+
"files": [
|
|
97
|
+
"src/**",
|
|
98
|
+
"!src/**/*.test.*",
|
|
99
|
+
"../../.babelrc.build.js",
|
|
100
|
+
"../../config/webpack.config.js",
|
|
101
|
+
"../../config/webpack.config.dev.js"
|
|
102
|
+
],
|
|
103
|
+
"output": [
|
|
104
|
+
"dist/victory*.js",
|
|
105
|
+
"!dist/victory*.min.js*"
|
|
106
|
+
],
|
|
107
|
+
"dependencies": [
|
|
108
|
+
"../victory-core:build:lib:esm",
|
|
109
|
+
"../victory-vendor:build:lib:esm"
|
|
110
|
+
],
|
|
111
|
+
"packageLocks": [
|
|
112
|
+
"pnpm-lock.yaml"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"build:dist:min": {
|
|
116
|
+
"command": "nps build:dist:min",
|
|
117
|
+
"files": [
|
|
118
|
+
"src/**",
|
|
119
|
+
"!src/**/*.test.*",
|
|
120
|
+
"../../.babelrc.build.js",
|
|
121
|
+
"../../config/webpack.config.js"
|
|
122
|
+
],
|
|
123
|
+
"output": [
|
|
124
|
+
"dist/victory*.min.js*"
|
|
125
|
+
],
|
|
126
|
+
"dependencies": [
|
|
127
|
+
"../victory-core:build:lib:esm",
|
|
128
|
+
"../victory-vendor:build:lib:esm"
|
|
129
|
+
],
|
|
130
|
+
"packageLocks": [
|
|
131
|
+
"pnpm-lock.yaml"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"check": {
|
|
135
|
+
"dependencies": [
|
|
136
|
+
"types:check",
|
|
137
|
+
"jest",
|
|
138
|
+
"format",
|
|
139
|
+
"lint"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"types:check": {
|
|
143
|
+
"command": "nps types:pkg:check",
|
|
144
|
+
"files": [
|
|
145
|
+
"src/**/*.{ts,tsx}",
|
|
146
|
+
"../../tsconfig.base.json",
|
|
147
|
+
"tsconfig.json"
|
|
148
|
+
],
|
|
149
|
+
"dependencies": [
|
|
150
|
+
"types:create",
|
|
151
|
+
"../victory-core:types:create",
|
|
152
|
+
"../victory-vendor:types:create",
|
|
153
|
+
"../victory-voronoi:types:create"
|
|
154
|
+
],
|
|
155
|
+
"output": [],
|
|
156
|
+
"packageLocks": [
|
|
157
|
+
"pnpm-lock.yaml"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"types:create": {
|
|
161
|
+
"command": "nps types:pkg:create",
|
|
162
|
+
"files": [
|
|
163
|
+
"src/**",
|
|
164
|
+
"!src/**/*.test.*",
|
|
165
|
+
"../../tsconfig.base.json",
|
|
166
|
+
"tsconfig.build.json"
|
|
167
|
+
],
|
|
168
|
+
"output": [
|
|
169
|
+
"es/**/*.d.ts",
|
|
170
|
+
"es/**/*.d.ts.map",
|
|
171
|
+
"lib/**/*.d.ts",
|
|
172
|
+
"lib/**/*.d.ts.map"
|
|
173
|
+
],
|
|
174
|
+
"dependencies": [
|
|
175
|
+
"../victory-core:types:create",
|
|
176
|
+
"../victory-vendor:types:create"
|
|
177
|
+
],
|
|
178
|
+
"packageLocks": [
|
|
179
|
+
"pnpm-lock.yaml"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"format": {
|
|
183
|
+
"command": "nps format:pkg",
|
|
184
|
+
"files": [
|
|
185
|
+
"src/**",
|
|
186
|
+
"*.json",
|
|
187
|
+
"../../.prettierignore",
|
|
188
|
+
"../../.prettierrc.json"
|
|
189
|
+
],
|
|
190
|
+
"output": [],
|
|
191
|
+
"packageLocks": [
|
|
192
|
+
"pnpm-lock.yaml"
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
"format:fix": {
|
|
196
|
+
"command": "pnpm run format || nps format:pkg:fix",
|
|
197
|
+
"files": [
|
|
198
|
+
"src/**",
|
|
199
|
+
"*.json",
|
|
200
|
+
"../../.prettierignore",
|
|
201
|
+
"../../.prettierrc.json"
|
|
202
|
+
],
|
|
203
|
+
"output": [],
|
|
204
|
+
"packageLocks": [
|
|
205
|
+
"pnpm-lock.yaml"
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"lint": {
|
|
209
|
+
"command": "nps lint:pkg",
|
|
210
|
+
"files": [
|
|
211
|
+
"src/**",
|
|
212
|
+
"../../.eslintignore",
|
|
213
|
+
"../../.eslintrc.js"
|
|
214
|
+
],
|
|
215
|
+
"output": [],
|
|
216
|
+
"dependencies": [
|
|
217
|
+
"../victory-vendor:build",
|
|
218
|
+
"../victory-core:types:create",
|
|
219
|
+
"../victory-vendor:types:create",
|
|
220
|
+
"../victory-voronoi:types:create"
|
|
221
|
+
],
|
|
222
|
+
"packageLocks": [
|
|
223
|
+
"pnpm-lock.yaml"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"lint:fix": {
|
|
227
|
+
"command": "pnpm run lint || nps lint:pkg:fix",
|
|
228
|
+
"files": [
|
|
229
|
+
"src/**",
|
|
230
|
+
"../../.eslintignore",
|
|
231
|
+
"../../.eslintrc.js"
|
|
232
|
+
],
|
|
233
|
+
"output": [],
|
|
234
|
+
"dependencies": [
|
|
235
|
+
"../victory-vendor:build",
|
|
236
|
+
"../victory-core:types:create",
|
|
237
|
+
"../victory-vendor:types:create",
|
|
238
|
+
"../victory-voronoi:types:create"
|
|
239
|
+
],
|
|
240
|
+
"packageLocks": [
|
|
241
|
+
"pnpm-lock.yaml"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"jest": {
|
|
245
|
+
"command": "nps jest:pkg",
|
|
246
|
+
"files": [
|
|
247
|
+
"src/**/*.test.*",
|
|
248
|
+
"../../.babelrc.js",
|
|
249
|
+
"../../test/jest-config.js",
|
|
250
|
+
"../../test/jest-setup.ts"
|
|
251
|
+
],
|
|
252
|
+
"output": [],
|
|
253
|
+
"dependencies": [
|
|
254
|
+
"build:lib:cjs",
|
|
255
|
+
"../victory-vendor:build:lib:cjs",
|
|
256
|
+
"../victory-voronoi:build:lib:cjs"
|
|
257
|
+
],
|
|
258
|
+
"packageLocks": [
|
|
259
|
+
"pnpm-lock.yaml"
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"scripts": {
|
|
264
|
+
"### THESE SCRIPTS ARE GENERATED ###": "true",
|
|
265
|
+
"### DO NOT MODIFY THESE MANUALLY ###": "true",
|
|
266
|
+
"build": "wireit",
|
|
267
|
+
"build:lib": "wireit",
|
|
268
|
+
"build:lib:esm": "wireit",
|
|
269
|
+
"build:lib:cjs": "wireit",
|
|
270
|
+
"build:dist": "wireit",
|
|
271
|
+
"build:dist:dev": "wireit",
|
|
272
|
+
"build:dist:min": "wireit",
|
|
273
|
+
"check": "wireit",
|
|
274
|
+
"types:check": "wireit",
|
|
275
|
+
"types:create": "wireit",
|
|
276
|
+
"format": "wireit",
|
|
277
|
+
"format:fix": "wireit",
|
|
278
|
+
"lint": "wireit",
|
|
279
|
+
"lint:fix": "wireit",
|
|
280
|
+
"jest": "wireit"
|
|
281
|
+
}
|
|
282
|
+
}
|
package/src/helper-methods.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 45, 90, 135, 180, 225, 270, 315, 360] }]*/
|
|
1
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 45, 90, 135, 180, 225, 270, 315, 360] }]*/
|
|
2
2
|
import { assign, defaults, isFunction, isPlainObject, isNil } from "lodash";
|
|
3
3
|
import * as d3Shape from "victory-vendor/d3-shape";
|
|
4
4
|
|
|
@@ -7,9 +7,8 @@ import { Helpers, Data, Style } from "victory-core";
|
|
|
7
7
|
const checkForValidText = (text) => {
|
|
8
8
|
if (text === undefined || text === null || isFunction(text)) {
|
|
9
9
|
return text;
|
|
10
|
-
} else {
|
|
11
|
-
return `${text}`;
|
|
12
10
|
}
|
|
11
|
+
return `${text}`;
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
const getColor = (style, colors, index) => {
|
|
@@ -128,9 +127,8 @@ const getLabelOrientation = (degree, labelPlacement) => {
|
|
|
128
127
|
return "right";
|
|
129
128
|
} else if (degree >= 135 && degree < 225) {
|
|
130
129
|
return "bottom";
|
|
131
|
-
} else {
|
|
132
|
-
return "left";
|
|
133
130
|
}
|
|
131
|
+
return "left";
|
|
134
132
|
};
|
|
135
133
|
|
|
136
134
|
const getTextAnchor = (orientation) => {
|
package/src/victory-pie.js
CHANGED