victory-shared-events 36.8.5-next.0 → 36.8.5

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
@@ -1,13 +1,10 @@
1
1
  # victory-shared-events
2
2
 
3
- ## 36.8.5-next.0
3
+ ## 36.8.5
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - c8c2eb2f5: Replace instances of lodash.assign with Object.assign
8
- - Updated dependencies [c8c2eb2f5]
9
- - Updated dependencies [0f3abe234]
10
- - victory-core@36.8.5-next.0
7
+ - Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
11
8
 
12
9
  ## 36.8.4
13
10
 
@@ -4881,6 +4881,7 @@ __webpack_require__.r(__webpack_exports__);
4881
4881
  /* harmony export */ "modifyProps": () => (/* binding */ modifyProps),
4882
4882
  /* harmony export */ "omit": () => (/* binding */ omit),
4883
4883
  /* harmony export */ "radiansToDegrees": () => (/* binding */ radiansToDegrees),
4884
+ /* harmony export */ "range": () => (/* binding */ range),
4884
4885
  /* harmony export */ "reduceChildren": () => (/* binding */ reduceChildren),
4885
4886
  /* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
4886
4887
  /* harmony export */ });
@@ -5160,6 +5161,38 @@ function getCurrentAxis(axis, horizontal) {
5160
5161
  var otherAxis = axis === "x" ? "y" : "x";
5161
5162
  return horizontal ? otherAxis : axis;
5162
5163
  }
5164
+ /**
5165
+ * Creates an array of numbers (positive and/or negative) progressing
5166
+ * from start up to, but not including, end.
5167
+ * A step of -1 is used if a negative start is specified without an end or step.
5168
+ * If end is not specified, it's set to start with start then set to 0.
5169
+ *
5170
+ * @param start The length of the array to create, or the start value
5171
+ * @param end [The end value] If this is defined, start is the start value
5172
+ * @returns An array of the given length
5173
+ */
5174
+
5175
+ function range(start, end, increment) {
5176
+ // when the end index is not given, start from 0
5177
+ var startIndex = end ? start : 0; // when the end index is not given, the end of the range is the start index
5178
+
5179
+ var endIndex = end ? end : start; // ensure endIndex is not a falsy value
5180
+
5181
+ if (!endIndex) endIndex = 0;
5182
+ var k = endIndex - startIndex; // the value range
5183
+
5184
+ var length = Math.abs(k); // the length of the range
5185
+
5186
+ var sign = k / length || 1; // the sign of the range (negative or positive)
5187
+
5188
+ var inc = increment || 1; // the step size of each increment
5189
+ // normalize the array length when dealing with floating point values
5190
+
5191
+ var arrayLength = Math.max(Math.ceil(length / inc), 0);
5192
+ return Array.from(Array(arrayLength), function (_, i) {
5193
+ return startIndex + i * sign * inc;
5194
+ });
5195
+ }
5163
5196
  /**
5164
5197
  * @param {Array} children: an array of child components
5165
5198
  * @param {Function} iteratee: a function with arguments "child", "childName", and "parent"
package/es/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./victory-shared-events";
1
+ export * from "./victory-shared-events";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,51 +1,51 @@
1
- /// <reference types="lodash" />
2
- import React from "react";
3
- import { EventCallbackInterface, EventMixinCalculatedValues, EventPropTypeInterface, StringOrNumberOrCallback } from "victory-core";
4
- export declare type VictorySharedEventsProps = {
5
- children?: React.ReactElement | React.ReactElement[];
6
- container?: React.ReactElement;
7
- groupComponent?: React.ReactElement;
8
- events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
9
- eventKey?: StringOrNumberOrCallback;
10
- externalEventMutations?: EventCallbackInterface<string | string[], string | number | (string | number)[]>[];
11
- };
12
- export interface VictorySharedEvents extends EventMixinCalculatedValues {
13
- }
14
- export declare class VictorySharedEvents extends React.Component<VictorySharedEventsProps> {
15
- static displayName: string;
16
- static role: string;
17
- static contextType: React.Context<{
18
- transitionTimer: import("victory-core").Timer;
19
- animationTimer: import("victory-core").Timer;
20
- }>;
21
- static defaultProps: {
22
- groupComponent: JSX.Element;
23
- };
24
- getScopedEvents: any;
25
- getEventState: any;
26
- baseProps: any;
27
- sharedEventsCache: any;
28
- globalEvents: any;
29
- prevGlobalEventKeys: any;
30
- boundGlobalEvents: any;
31
- constructor(props: VictorySharedEventsProps);
32
- shouldComponentUpdate(nextProps: any): boolean;
33
- componentDidMount(): void;
34
- componentDidUpdate(): void;
35
- componentWillUnmount(): void;
36
- addGlobalListener(key: any): void;
37
- removeGlobalListener(key: any): void;
38
- getAllEvents(props: any): any;
39
- applyExternalMutations(props: any, externalMutations: any): void;
40
- getExternalMutations(props: any, baseProps: any): any;
41
- cacheSharedEvents(name: any, sharedEvents: any, cacheValues: any): void;
42
- getCachedSharedEvents(name: any, cacheValues: any): any;
43
- getBaseProps(props: any): import("lodash").Dictionary<any> & {
44
- parent: any;
45
- };
46
- getBasePropsFromChildren(childComponents: any): import("lodash").Dictionary<any>;
47
- getNewChildren(props: any, baseProps: any): any;
48
- getContainer(props: any, baseProps: any, events: any): React.DetailedReactHTMLElement<any, HTMLElement>;
49
- render(): React.ReactElement;
50
- }
1
+ /// <reference types="lodash" />
2
+ import React from "react";
3
+ import { EventCallbackInterface, EventMixinCalculatedValues, EventPropTypeInterface, StringOrNumberOrCallback } from "victory-core";
4
+ export declare type VictorySharedEventsProps = {
5
+ children?: React.ReactElement | React.ReactElement[];
6
+ container?: React.ReactElement;
7
+ groupComponent?: React.ReactElement;
8
+ events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
9
+ eventKey?: StringOrNumberOrCallback;
10
+ externalEventMutations?: EventCallbackInterface<string | string[], string | number | (string | number)[]>[];
11
+ };
12
+ export interface VictorySharedEvents extends EventMixinCalculatedValues {
13
+ }
14
+ export declare class VictorySharedEvents extends React.Component<VictorySharedEventsProps> {
15
+ static displayName: string;
16
+ static role: string;
17
+ static contextType: React.Context<{
18
+ transitionTimer: import("victory-core").Timer;
19
+ animationTimer: import("victory-core").Timer;
20
+ }>;
21
+ static defaultProps: {
22
+ groupComponent: JSX.Element;
23
+ };
24
+ getScopedEvents: any;
25
+ getEventState: any;
26
+ baseProps: any;
27
+ sharedEventsCache: any;
28
+ globalEvents: any;
29
+ prevGlobalEventKeys: any;
30
+ boundGlobalEvents: any;
31
+ constructor(props: VictorySharedEventsProps);
32
+ shouldComponentUpdate(nextProps: any): boolean;
33
+ componentDidMount(): void;
34
+ componentDidUpdate(): void;
35
+ componentWillUnmount(): void;
36
+ addGlobalListener(key: any): void;
37
+ removeGlobalListener(key: any): void;
38
+ getAllEvents(props: any): any;
39
+ applyExternalMutations(props: any, externalMutations: any): void;
40
+ getExternalMutations(props: any, baseProps: any): any;
41
+ cacheSharedEvents(name: any, sharedEvents: any, cacheValues: any): void;
42
+ getCachedSharedEvents(name: any, cacheValues: any): any;
43
+ getBaseProps(props: any): import("lodash").Dictionary<any> & {
44
+ parent: any;
45
+ };
46
+ getBasePropsFromChildren(childComponents: any): import("lodash").Dictionary<any>;
47
+ getNewChildren(props: any, baseProps: any): any;
48
+ getContainer(props: any, baseProps: any, events: any): React.DetailedReactHTMLElement<any, HTMLElement>;
49
+ render(): React.ReactElement;
50
+ }
51
51
  //# sourceMappingURL=victory-shared-events.d.ts.map
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./victory-shared-events";
1
+ export * from "./victory-shared-events";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,51 +1,51 @@
1
- /// <reference types="lodash" />
2
- import React from "react";
3
- import { EventCallbackInterface, EventMixinCalculatedValues, EventPropTypeInterface, StringOrNumberOrCallback } from "victory-core";
4
- export declare type VictorySharedEventsProps = {
5
- children?: React.ReactElement | React.ReactElement[];
6
- container?: React.ReactElement;
7
- groupComponent?: React.ReactElement;
8
- events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
9
- eventKey?: StringOrNumberOrCallback;
10
- externalEventMutations?: EventCallbackInterface<string | string[], string | number | (string | number)[]>[];
11
- };
12
- export interface VictorySharedEvents extends EventMixinCalculatedValues {
13
- }
14
- export declare class VictorySharedEvents extends React.Component<VictorySharedEventsProps> {
15
- static displayName: string;
16
- static role: string;
17
- static contextType: React.Context<{
18
- transitionTimer: import("victory-core").Timer;
19
- animationTimer: import("victory-core").Timer;
20
- }>;
21
- static defaultProps: {
22
- groupComponent: JSX.Element;
23
- };
24
- getScopedEvents: any;
25
- getEventState: any;
26
- baseProps: any;
27
- sharedEventsCache: any;
28
- globalEvents: any;
29
- prevGlobalEventKeys: any;
30
- boundGlobalEvents: any;
31
- constructor(props: VictorySharedEventsProps);
32
- shouldComponentUpdate(nextProps: any): boolean;
33
- componentDidMount(): void;
34
- componentDidUpdate(): void;
35
- componentWillUnmount(): void;
36
- addGlobalListener(key: any): void;
37
- removeGlobalListener(key: any): void;
38
- getAllEvents(props: any): any;
39
- applyExternalMutations(props: any, externalMutations: any): void;
40
- getExternalMutations(props: any, baseProps: any): any;
41
- cacheSharedEvents(name: any, sharedEvents: any, cacheValues: any): void;
42
- getCachedSharedEvents(name: any, cacheValues: any): any;
43
- getBaseProps(props: any): import("lodash").Dictionary<any> & {
44
- parent: any;
45
- };
46
- getBasePropsFromChildren(childComponents: any): import("lodash").Dictionary<any>;
47
- getNewChildren(props: any, baseProps: any): any;
48
- getContainer(props: any, baseProps: any, events: any): React.DetailedReactHTMLElement<any, HTMLElement>;
49
- render(): React.ReactElement;
50
- }
1
+ /// <reference types="lodash" />
2
+ import React from "react";
3
+ import { EventCallbackInterface, EventMixinCalculatedValues, EventPropTypeInterface, StringOrNumberOrCallback } from "victory-core";
4
+ export declare type VictorySharedEventsProps = {
5
+ children?: React.ReactElement | React.ReactElement[];
6
+ container?: React.ReactElement;
7
+ groupComponent?: React.ReactElement;
8
+ events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
9
+ eventKey?: StringOrNumberOrCallback;
10
+ externalEventMutations?: EventCallbackInterface<string | string[], string | number | (string | number)[]>[];
11
+ };
12
+ export interface VictorySharedEvents extends EventMixinCalculatedValues {
13
+ }
14
+ export declare class VictorySharedEvents extends React.Component<VictorySharedEventsProps> {
15
+ static displayName: string;
16
+ static role: string;
17
+ static contextType: React.Context<{
18
+ transitionTimer: import("victory-core").Timer;
19
+ animationTimer: import("victory-core").Timer;
20
+ }>;
21
+ static defaultProps: {
22
+ groupComponent: JSX.Element;
23
+ };
24
+ getScopedEvents: any;
25
+ getEventState: any;
26
+ baseProps: any;
27
+ sharedEventsCache: any;
28
+ globalEvents: any;
29
+ prevGlobalEventKeys: any;
30
+ boundGlobalEvents: any;
31
+ constructor(props: VictorySharedEventsProps);
32
+ shouldComponentUpdate(nextProps: any): boolean;
33
+ componentDidMount(): void;
34
+ componentDidUpdate(): void;
35
+ componentWillUnmount(): void;
36
+ addGlobalListener(key: any): void;
37
+ removeGlobalListener(key: any): void;
38
+ getAllEvents(props: any): any;
39
+ applyExternalMutations(props: any, externalMutations: any): void;
40
+ getExternalMutations(props: any, baseProps: any): any;
41
+ cacheSharedEvents(name: any, sharedEvents: any, cacheValues: any): void;
42
+ getCachedSharedEvents(name: any, cacheValues: any): any;
43
+ getBaseProps(props: any): import("lodash").Dictionary<any> & {
44
+ parent: any;
45
+ };
46
+ getBasePropsFromChildren(childComponents: any): import("lodash").Dictionary<any>;
47
+ getNewChildren(props: any, baseProps: any): any;
48
+ getContainer(props: any, baseProps: any, events: any): React.DetailedReactHTMLElement<any, HTMLElement>;
49
+ render(): React.ReactElement;
50
+ }
51
51
  //# sourceMappingURL=victory-shared-events.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-shared-events",
3
- "version": "36.8.5-next.0",
3
+ "version": "36.8.5",
4
4
  "description": "Shared Event Helper for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -24,13 +24,13 @@
24
24
  "lodash": "^4.17.19",
25
25
  "prop-types": "^15.8.1",
26
26
  "react-fast-compare": "^3.2.0",
27
- "victory-core": "^36.8.5-next.0"
27
+ "victory-core": "^36.8.5"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": ">=16.6.0"
31
31
  },
32
32
  "publishConfig": {
33
- "provenance": false
33
+ "provenance": true
34
34
  },
35
35
  "wireit": {
36
36
  "### THESE WIREIT CONFIGS ARE GENERATED ####": {},