victory-shared-events 37.3.1 → 37.3.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
CHANGED
|
@@ -51,7 +51,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
51
51
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
52
52
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
53
53
|
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
55
55
|
|
|
56
56
|
class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().Component) {
|
|
57
57
|
static displayName = "VictorySharedEvents";
|
|
@@ -4058,7 +4058,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4058
4058
|
|
|
4059
4059
|
|
|
4060
4060
|
|
|
4061
|
-
/* eslint-disable no-use-before-define */
|
|
4062
4061
|
|
|
4063
4062
|
const GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
4064
4063
|
|
|
@@ -4106,11 +4105,10 @@ getScopedEvents) {
|
|
|
4106
4105
|
*/
|
|
4107
4106
|
const getAllEvents = () => {
|
|
4108
4107
|
// Mandatory usage: `getEvents.bind(this)`
|
|
4109
|
-
|
|
4108
|
+
|
|
4110
4109
|
if (Array.isArray(this.componentEvents)) {
|
|
4111
4110
|
return Array.isArray(props.events) ? this.componentEvents.concat(...props.events) : this.componentEvents;
|
|
4112
4111
|
}
|
|
4113
|
-
/* eslint-enable no-invalid-this */
|
|
4114
4112
|
return props.events;
|
|
4115
4113
|
};
|
|
4116
4114
|
const allEvents = getAllEvents();
|
|
@@ -4135,7 +4133,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
4135
4133
|
}
|
|
4136
4134
|
|
|
4137
4135
|
// Mandatory usage: `getScopedEvents.bind(this)`
|
|
4138
|
-
|
|
4136
|
+
|
|
4139
4137
|
const newBaseProps = baseProps || this.baseProps;
|
|
4140
4138
|
// returns the original base props or base state of a given target element
|
|
4141
4139
|
const getTargetProps = (identifier, type) => {
|
|
@@ -4144,7 +4142,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
4144
4142
|
target,
|
|
4145
4143
|
key
|
|
4146
4144
|
} = identifier;
|
|
4147
|
-
// eslint-disable-next-line no-invalid-this
|
|
4148
4145
|
const baseType = type === "props" ? newBaseProps : this.state || {};
|
|
4149
4146
|
const base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
|
|
4150
4147
|
return key === "parent" ? base.parent : base[key] && base[key][target];
|
|
@@ -4171,7 +4168,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
4171
4168
|
|
|
4172
4169
|
// returns the state object with mutated props applied for a single key
|
|
4173
4170
|
const getMutationObject = (key, childName) => {
|
|
4174
|
-
// eslint-disable-next-line no-invalid-this
|
|
4175
4171
|
const baseState = this.state || {};
|
|
4176
4172
|
if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction)(eventReturn.mutation)) {
|
|
4177
4173
|
return baseState;
|
|
@@ -4244,11 +4240,9 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
4244
4240
|
// into a state mutation, and calls setState
|
|
4245
4241
|
// eslint-disable-next-line max-params
|
|
4246
4242
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
4247
|
-
// eslint-disable-next-line no-invalid-this
|
|
4248
4243
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
4249
4244
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(eventReturn)) {
|
|
4250
4245
|
const callbacks = compileCallbacks(eventReturn);
|
|
4251
|
-
// eslint-disable-next-line no-invalid-this
|
|
4252
4246
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
4253
4247
|
}
|
|
4254
4248
|
};
|
|
@@ -4278,7 +4272,7 @@ function getPartialEvents(events, eventKey, childProps) {
|
|
|
4278
4272
|
// eslint-disable-next-line max-params
|
|
4279
4273
|
function getEventState(eventKey, namespace, childType) {
|
|
4280
4274
|
// Mandatory usage: `getEventState.bind(this)`
|
|
4281
|
-
|
|
4275
|
+
|
|
4282
4276
|
const state = this.state || {};
|
|
4283
4277
|
if (!childType) {
|
|
4284
4278
|
return eventKey === "parent" ? state[eventKey] && state[eventKey][namespace] || state[eventKey] : state[eventKey] && state[eventKey][namespace];
|
|
@@ -4471,7 +4465,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4471
4465
|
|
|
4472
4466
|
|
|
4473
4467
|
|
|
4474
|
-
/* eslint-disable no-use-before-define */
|
|
4475
4468
|
|
|
4476
4469
|
// Private Functions
|
|
4477
4470
|
|
|
@@ -11,7 +11,7 @@ import stringify from "json-stringify-safe";
|
|
|
11
11
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
12
12
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
13
13
|
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
15
15
|
|
|
16
16
|
export class VictorySharedEvents extends React.Component {
|
|
17
17
|
static displayName = "VictorySharedEvents";
|
|
@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
18
18
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
19
19
|
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
21
21
|
|
|
22
22
|
class VictorySharedEvents extends _react.default.Component {
|
|
23
23
|
static displayName = "VictorySharedEvents";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-shared-events",
|
|
3
|
-
"version": "37.3.
|
|
3
|
+
"version": "37.3.2",
|
|
4
4
|
"description": "Shared Event Helper for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"json-stringify-safe": "^5.0.1",
|
|
24
24
|
"lodash": "^4.17.19",
|
|
25
25
|
"react-fast-compare": "^3.2.0",
|
|
26
|
-
"victory-core": "37.3.
|
|
26
|
+
"victory-core": "37.3.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": ">=16.6.0"
|
|
@@ -209,11 +209,9 @@
|
|
|
209
209
|
]
|
|
210
210
|
},
|
|
211
211
|
"lint": {
|
|
212
|
-
"command": "
|
|
212
|
+
"command": "eslint src",
|
|
213
213
|
"files": [
|
|
214
|
-
"src/**"
|
|
215
|
-
"../../.eslintignore",
|
|
216
|
-
"../../.eslintrc.js"
|
|
214
|
+
"src/**"
|
|
217
215
|
],
|
|
218
216
|
"output": [],
|
|
219
217
|
"dependencies": [
|
|
@@ -226,11 +224,9 @@
|
|
|
226
224
|
]
|
|
227
225
|
},
|
|
228
226
|
"lint:fix": {
|
|
229
|
-
"command": "
|
|
227
|
+
"command": "eslint --fix src",
|
|
230
228
|
"files": [
|
|
231
|
-
"src/**"
|
|
232
|
-
"../../.eslintignore",
|
|
233
|
-
"../../.eslintrc.js"
|
|
229
|
+
"src/**"
|
|
234
230
|
],
|
|
235
231
|
"output": [],
|
|
236
232
|
"dependencies": [
|
|
@@ -30,7 +30,7 @@ export type VictorySharedEventsProps = {
|
|
|
30
30
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
31
31
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
32
32
|
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
34
34
|
export interface VictorySharedEvents extends EventMixinCalculatedValues {}
|
|
35
35
|
|
|
36
36
|
export class VictorySharedEvents extends React.Component<VictorySharedEventsProps> {
|