victory-tooltip 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-tooltip",
3
- "version": "36.5.3",
3
+ "version": "36.6.2",
4
4
  "description": "Tooltip 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,14 +22,250 @@
21
22
  "dependencies": {
22
23
  "lodash": "^4.17.19",
23
24
  "prop-types": "^15.8.1",
24
- "victory-core": "^36.5.3"
25
+ "victory-core": "^36.6.2"
25
26
  },
26
27
  "peerDependencies": {
27
28
  "react": ">=16.6.0"
28
29
  },
29
- "scripts": {
30
- "version": "yarn run nps build-libs && nps build-dists"
30
+ "wireit": {
31
+ "### THESE WIREIT CONFIGS ARE GENERATED ####": {},
32
+ "### DO NOT MODIFY THESE MANUALLY ####": {},
33
+ "build": {
34
+ "dependencies": [
35
+ "build:lib",
36
+ "build:dist",
37
+ "types:create"
38
+ ]
39
+ },
40
+ "build:lib": {
41
+ "dependencies": [
42
+ "build:lib:esm",
43
+ "build:lib:cjs"
44
+ ]
45
+ },
46
+ "build:lib:esm": {
47
+ "command": "nps build:lib:esm",
48
+ "files": [
49
+ "src/**",
50
+ "!src/**/*.test.*",
51
+ "../../.babelrc.build.js"
52
+ ],
53
+ "output": [
54
+ "es/**/*.js",
55
+ "es/**/*.js.map"
56
+ ],
57
+ "dependencies": [
58
+ "../victory-core:build:lib:esm"
59
+ ],
60
+ "packageLocks": [
61
+ "pnpm-lock.yaml"
62
+ ]
63
+ },
64
+ "build:lib:cjs": {
65
+ "command": "nps build:lib:cjs",
66
+ "files": [
67
+ "src/**",
68
+ "!src/**/*.test.*",
69
+ "../../.babelrc.build.js"
70
+ ],
71
+ "output": [
72
+ "lib/**/*.js",
73
+ "lib/**/*.js.map"
74
+ ],
75
+ "dependencies": [
76
+ "../victory-core:build:lib:cjs"
77
+ ],
78
+ "packageLocks": [
79
+ "pnpm-lock.yaml"
80
+ ]
81
+ },
82
+ "build:dist": {
83
+ "dependencies": [
84
+ "build:dist:dev",
85
+ "build:dist:min"
86
+ ]
87
+ },
88
+ "build:dist:dev": {
89
+ "command": "nps build:dist:dev",
90
+ "files": [
91
+ "src/**",
92
+ "!src/**/*.test.*",
93
+ "../../.babelrc.build.js",
94
+ "../../config/webpack.config.js",
95
+ "../../config/webpack.config.dev.js"
96
+ ],
97
+ "output": [
98
+ "dist/victory*.js",
99
+ "!dist/victory*.min.js*"
100
+ ],
101
+ "dependencies": [
102
+ "../victory-core:build:lib:esm"
103
+ ],
104
+ "packageLocks": [
105
+ "pnpm-lock.yaml"
106
+ ]
107
+ },
108
+ "build:dist:min": {
109
+ "command": "nps build:dist:min",
110
+ "files": [
111
+ "src/**",
112
+ "!src/**/*.test.*",
113
+ "../../.babelrc.build.js",
114
+ "../../config/webpack.config.js"
115
+ ],
116
+ "output": [
117
+ "dist/victory*.min.js*"
118
+ ],
119
+ "dependencies": [
120
+ "../victory-core:build:lib:esm"
121
+ ],
122
+ "packageLocks": [
123
+ "pnpm-lock.yaml"
124
+ ]
125
+ },
126
+ "check": {
127
+ "dependencies": [
128
+ "types:check",
129
+ "jest",
130
+ "format",
131
+ "lint"
132
+ ]
133
+ },
134
+ "types:check": {
135
+ "command": "nps types:pkg:check",
136
+ "files": [
137
+ "src/**/*.{ts,tsx}",
138
+ "../../tsconfig.base.json",
139
+ "tsconfig.json"
140
+ ],
141
+ "dependencies": [
142
+ "types:create",
143
+ "../victory-core:types:create",
144
+ "../victory-vendor:types:create",
145
+ "../victory-voronoi:types:create"
146
+ ],
147
+ "output": [],
148
+ "packageLocks": [
149
+ "pnpm-lock.yaml"
150
+ ]
151
+ },
152
+ "types:create": {
153
+ "command": "nps types:pkg:create",
154
+ "files": [
155
+ "src/**",
156
+ "!src/**/*.test.*",
157
+ "../../tsconfig.base.json",
158
+ "tsconfig.build.json"
159
+ ],
160
+ "output": [
161
+ "es/**/*.d.ts",
162
+ "es/**/*.d.ts.map",
163
+ "lib/**/*.d.ts",
164
+ "lib/**/*.d.ts.map"
165
+ ],
166
+ "dependencies": [
167
+ "../victory-core:types:create"
168
+ ],
169
+ "packageLocks": [
170
+ "pnpm-lock.yaml"
171
+ ]
172
+ },
173
+ "format": {
174
+ "command": "nps format:pkg",
175
+ "files": [
176
+ "src/**",
177
+ "*.json",
178
+ "../../.prettierignore",
179
+ "../../.prettierrc.json"
180
+ ],
181
+ "output": [],
182
+ "packageLocks": [
183
+ "pnpm-lock.yaml"
184
+ ]
185
+ },
186
+ "format:fix": {
187
+ "command": "pnpm run format || nps format:pkg:fix",
188
+ "files": [
189
+ "src/**",
190
+ "*.json",
191
+ "../../.prettierignore",
192
+ "../../.prettierrc.json"
193
+ ],
194
+ "output": [],
195
+ "packageLocks": [
196
+ "pnpm-lock.yaml"
197
+ ]
198
+ },
199
+ "lint": {
200
+ "command": "nps lint:pkg",
201
+ "files": [
202
+ "src/**",
203
+ "../../.eslintignore",
204
+ "../../.eslintrc.js"
205
+ ],
206
+ "output": [],
207
+ "dependencies": [
208
+ "../victory-core:types:create",
209
+ "../victory-vendor:types:create",
210
+ "../victory-voronoi:types:create"
211
+ ],
212
+ "packageLocks": [
213
+ "pnpm-lock.yaml"
214
+ ]
215
+ },
216
+ "lint:fix": {
217
+ "command": "pnpm run lint || nps lint:pkg:fix",
218
+ "files": [
219
+ "src/**",
220
+ "../../.eslintignore",
221
+ "../../.eslintrc.js"
222
+ ],
223
+ "output": [],
224
+ "dependencies": [
225
+ "../victory-core:types:create",
226
+ "../victory-vendor:types:create",
227
+ "../victory-voronoi:types:create"
228
+ ],
229
+ "packageLocks": [
230
+ "pnpm-lock.yaml"
231
+ ]
232
+ },
233
+ "jest": {
234
+ "command": "nps jest:pkg",
235
+ "files": [
236
+ "src/**/*.test.*",
237
+ "../../.babelrc.js",
238
+ "../../test/jest-config.js",
239
+ "../../test/jest-setup.ts"
240
+ ],
241
+ "output": [],
242
+ "dependencies": [
243
+ "build:lib:cjs",
244
+ "../victory-vendor:build:lib:cjs",
245
+ "../victory-voronoi:build:lib:cjs"
246
+ ],
247
+ "packageLocks": [
248
+ "pnpm-lock.yaml"
249
+ ]
250
+ }
31
251
  },
32
- "sideEffects": false,
33
- "gitHead": "55338af3c57eacca5956e53c08a58e47ba41d01e"
34
- }
252
+ "scripts": {
253
+ "### THESE SCRIPTS ARE GENERATED ###": "true",
254
+ "### DO NOT MODIFY THESE MANUALLY ###": "true",
255
+ "build": "wireit",
256
+ "build:lib": "wireit",
257
+ "build:lib:esm": "wireit",
258
+ "build:lib:cjs": "wireit",
259
+ "build:dist": "wireit",
260
+ "build:dist:dev": "wireit",
261
+ "build:dist:min": "wireit",
262
+ "check": "wireit",
263
+ "types:check": "wireit",
264
+ "types:create": "wireit",
265
+ "format": "wireit",
266
+ "format:fix": "wireit",
267
+ "lint": "wireit",
268
+ "lint:fix": "wireit",
269
+ "jest": "wireit"
270
+ }
271
+ }
package/src/flyout.js CHANGED
@@ -1,4 +1,4 @@
1
- /*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
1
+ /* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { Helpers, CommonProps, Path, UserProps } from "victory-core";
@@ -152,9 +152,8 @@ export default class VictoryTooltip extends React.Component {
152
152
  const positive = horizontal ? "right" : "top";
153
153
  const negative = horizontal ? "left" : "bottom";
154
154
  return datum && datum.y < 0 ? negative : positive;
155
- } else {
156
- return this.getPolarOrientation(props, datum);
157
155
  }
156
+ return this.getPolarOrientation(props, datum);
158
157
  }
159
158
 
160
159
  getPolarOrientation(props, datum) {
@@ -164,9 +163,8 @@ export default class VictoryTooltip extends React.Component {
164
163
  return this.getVerticalOrientations(degrees);
165
164
  } else if (placement === "parallel") {
166
165
  return degrees < 90 || degrees > 270 ? "right" : "left";
167
- } else {
168
- return degrees > 180 ? "bottom" : "top";
169
166
  }
167
+ return degrees > 180 ? "bottom" : "top";
170
168
  }
171
169
 
172
170
  getVerticalOrientations(degrees) {
@@ -179,9 +177,8 @@ export default class VictoryTooltip extends React.Component {
179
177
  // eslint-disable-next-line no-magic-numbers
180
178
  } else if (degrees > 135 && degrees < 225) {
181
179
  return "left";
182
- } else {
183
- return "bottom";
184
180
  }
181
+ return "bottom";
185
182
  }
186
183
 
187
184
  getStyles(props) {