victory-box-plot 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.
@@ -0,0 +1,4 @@
1
+ export declare const getData: (props: any) => any;
2
+ export declare const getDomain: (props: any, axis: any) => any;
3
+ export declare const getBaseProps: (props: any, fallbackProps: any) => any;
4
+ //# sourceMappingURL=helper-methods.d.ts.map
package/es/index.d.ts CHANGED
@@ -1,77 +1,2 @@
1
- import * as React from "react";
2
- import {
3
- EventPropTypeInterface,
4
- DomainPropType,
5
- DomainPaddingPropType,
6
- OrientationTypes,
7
- StringOrNumberOrCallback,
8
- VictoryDatableProps,
9
- VictoryCommonProps,
10
- VictoryStyleObject,
11
- VictoryLabelStyleObject,
12
- } from "victory-core";
13
-
14
- export type VictoryBoxPlotLabelType =
15
- | boolean
16
- | (string | number)[]
17
- | Function
18
- | { (data: any): string | null };
19
-
20
- export interface VictoryBoxPlotStyleInterface {
21
- parent?: VictoryStyleObject;
22
- max?: VictoryStyleObject;
23
- maxLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
24
- min?: VictoryStyleObject;
25
- minLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
26
- median?: VictoryStyleObject;
27
- medianLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
28
- q1?: VictoryStyleObject;
29
- q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
30
- q3?: VictoryStyleObject;
31
- q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
32
- }
33
-
34
- export interface VictoryBoxPlotLabelOrientationInterface {
35
- max?: OrientationTypes;
36
- min?: OrientationTypes;
37
- median?: OrientationTypes;
38
- q1?: OrientationTypes;
39
- q3?: OrientationTypes;
40
- }
41
-
42
- export interface VictoryBoxPlotProps
43
- extends VictoryCommonProps,
44
- VictoryDatableProps {
45
- boxWidth?: number;
46
- domain?: DomainPropType;
47
- domainPadding?: DomainPaddingPropType;
48
- events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
49
- eventKey?: StringOrNumberOrCallback;
50
- horizontal?: boolean;
51
- labelOrientation?: OrientationTypes | VictoryBoxPlotLabelOrientationInterface;
52
- labels?: boolean;
53
- max?: StringOrNumberOrCallback | string[];
54
- maxComponent?: React.ReactElement;
55
- maxLabelComponent?: React.ReactElement;
56
- maxLabels?: VictoryBoxPlotLabelType;
57
- median?: StringOrNumberOrCallback | string[];
58
- medianComponent?: React.ReactElement;
59
- medianLabelComponent?: React.ReactElement;
60
- medianLabels?: VictoryBoxPlotLabelType;
61
- min?: StringOrNumberOrCallback | string[];
62
- minComponent?: React.ReactElement;
63
- minLabelComponent?: React.ReactElement;
64
- minLabels?: VictoryBoxPlotLabelType;
65
- q1?: StringOrNumberOrCallback | string[];
66
- q1Component?: React.ReactElement;
67
- q1LabelComponent?: React.ReactElement;
68
- q1Labels?: VictoryBoxPlotLabelType;
69
- q3?: StringOrNumberOrCallback | string[];
70
- q3Component?: React.ReactElement;
71
- q3LabelComponent?: React.ReactElement;
72
- q3Labels?: VictoryBoxPlotLabelType;
73
- style?: VictoryBoxPlotStyleInterface;
74
- whiskerWidth?: number;
75
- }
76
-
77
- export class VictoryBoxPlot extends React.Component<VictoryBoxPlotProps, any> {}
1
+ export * from "./victory-box-plot";
2
+ //# sourceMappingURL=index.d.ts.map
package/es/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { default as VictoryBoxPlot } from "./victory-box-plot";
1
+ export * from "./victory-box-plot";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,265 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { EventPropTypeInterface, DomainPropType, DomainPaddingPropType, OrientationTypes, StringOrNumberOrCallback, VictoryDatableProps, VictoryCommonProps, VictoryStyleObject, VictoryLabelStyleObject, EventsMixinClass } from "victory-core";
4
+ export declare type VictoryBoxPlotLabelType = boolean | (string | number)[] | {
5
+ (): any;
6
+ } | {
7
+ (data: any): string | null;
8
+ };
9
+ export interface VictoryBoxPlotStyleInterface {
10
+ parent?: VictoryStyleObject;
11
+ max?: VictoryStyleObject;
12
+ maxLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
13
+ min?: VictoryStyleObject;
14
+ minLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
15
+ median?: VictoryStyleObject;
16
+ medianLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
17
+ q1?: VictoryStyleObject;
18
+ q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
19
+ q3?: VictoryStyleObject;
20
+ q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
21
+ }
22
+ export interface VictoryBoxPlotLabelOrientationInterface {
23
+ max?: OrientationTypes;
24
+ min?: OrientationTypes;
25
+ median?: OrientationTypes;
26
+ q1?: OrientationTypes;
27
+ q3?: OrientationTypes;
28
+ }
29
+ export interface VictoryBoxPlotProps extends VictoryCommonProps, VictoryDatableProps {
30
+ boxWidth?: number;
31
+ datum?: any;
32
+ domain?: DomainPropType;
33
+ domainPadding?: DomainPaddingPropType;
34
+ events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
35
+ eventKey?: StringOrNumberOrCallback;
36
+ horizontal?: boolean;
37
+ labelOrientation?: OrientationTypes | VictoryBoxPlotLabelOrientationInterface;
38
+ labels?: boolean;
39
+ max?: StringOrNumberOrCallback | string[];
40
+ maxComponent?: React.ReactElement;
41
+ maxLabelComponent?: React.ReactElement;
42
+ maxLabels?: VictoryBoxPlotLabelType;
43
+ median?: StringOrNumberOrCallback | string[];
44
+ medianComponent?: React.ReactElement;
45
+ medianLabelComponent?: React.ReactElement;
46
+ medianLabels?: VictoryBoxPlotLabelType;
47
+ min?: StringOrNumberOrCallback | string[];
48
+ minComponent?: React.ReactElement;
49
+ minLabelComponent?: React.ReactElement;
50
+ minLabels?: VictoryBoxPlotLabelType;
51
+ q1?: StringOrNumberOrCallback | string[];
52
+ q1Component?: React.ReactElement;
53
+ q1LabelComponent?: React.ReactElement;
54
+ q1Labels?: VictoryBoxPlotLabelType;
55
+ q3?: StringOrNumberOrCallback | string[];
56
+ q3Component?: React.ReactElement;
57
+ q3LabelComponent?: React.ReactElement;
58
+ q3Labels?: VictoryBoxPlotLabelType;
59
+ style?: VictoryBoxPlotStyleInterface;
60
+ text?: StringOrNumberOrCallback | string[];
61
+ whiskerWidth?: number;
62
+ }
63
+ interface VictoryBoxPlotBase extends EventsMixinClass<VictoryBoxPlotProps> {
64
+ }
65
+ declare class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
66
+ static animationWhitelist: Array<keyof VictoryBoxPlotProps>;
67
+ static displayName: string;
68
+ static role: string;
69
+ static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
70
+ static propTypes: {
71
+ boxWidth: PropTypes.Requireable<number>;
72
+ events: PropTypes.Requireable<(PropTypes.InferProps<{
73
+ target: PropTypes.Requireable<string>;
74
+ eventKey: PropTypes.Requireable<string | number | any[]>;
75
+ eventHandlers: PropTypes.Requireable<object>;
76
+ }> | null | undefined)[]>;
77
+ horizontal: PropTypes.Requireable<boolean>;
78
+ labelOrientation: PropTypes.Requireable<string | PropTypes.InferProps<{
79
+ q1: PropTypes.Requireable<string>;
80
+ q3: PropTypes.Requireable<string>;
81
+ min: PropTypes.Requireable<string>;
82
+ max: PropTypes.Requireable<string>;
83
+ median: PropTypes.Requireable<string>;
84
+ }>>;
85
+ labels: PropTypes.Requireable<boolean>;
86
+ max: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
87
+ maxComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
88
+ maxLabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
89
+ maxLabels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
90
+ median: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
91
+ medianComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
92
+ medianLabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
93
+ medianLabels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
94
+ min: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
95
+ minComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
96
+ minLabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
97
+ minLabels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
98
+ q1: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
99
+ q1Component: PropTypes.Requireable<PropTypes.ReactElementLike>;
100
+ q1LabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
101
+ q1Labels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
102
+ q3: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
103
+ q3Component: PropTypes.Requireable<PropTypes.ReactElementLike>;
104
+ q3LabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
105
+ q3Labels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
106
+ style: PropTypes.Requireable<PropTypes.InferProps<{
107
+ boxes: PropTypes.Requireable<object>;
108
+ labels: PropTypes.Requireable<object>;
109
+ parent: PropTypes.Requireable<object>;
110
+ max: PropTypes.Requireable<object>;
111
+ maxLabels: PropTypes.Requireable<object>;
112
+ median: PropTypes.Requireable<object>;
113
+ medianLabels: PropTypes.Requireable<object>;
114
+ min: PropTypes.Requireable<object>;
115
+ minLabels: PropTypes.Requireable<object>;
116
+ q1: PropTypes.Requireable<object>;
117
+ q1Labels: PropTypes.Requireable<object>;
118
+ q3: PropTypes.Requireable<object>;
119
+ q3Labels: PropTypes.Requireable<object>;
120
+ whiskers: PropTypes.Requireable<object>;
121
+ }>>;
122
+ whiskerWidth: PropTypes.Requireable<number>;
123
+ categories?: React.Validator<import("victory-core").CategoryPropType | null | undefined> | undefined;
124
+ data?: React.Validator<readonly any[] | null | undefined> | undefined;
125
+ dataComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
126
+ domain?: React.Validator<import("victory-core").ForAxes<import("victory-core").DomainTuple> | null | undefined> | undefined;
127
+ domainPadding?: React.Validator<import("victory-core").ForAxes<import("victory-core").PaddingType> | null | undefined> | undefined;
128
+ samples?: React.Validator<number | null | undefined> | undefined;
129
+ sortKey?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
130
+ sortOrder?: React.Validator<import("victory-core").SortOrderPropType | null | undefined> | undefined;
131
+ x?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
132
+ y?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
133
+ y0?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
134
+ theme?: React.Validator<import("victory-core").VictoryThemeDefinition | null | undefined> | undefined;
135
+ animate?: React.Validator<boolean | import("victory-core").AnimatePropTypeInterface | null | undefined> | undefined;
136
+ colorScale?: React.Validator<import("victory-core").ColorScalePropType | null | undefined> | undefined;
137
+ containerComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
138
+ externalEventMutations?: React.Validator<import("victory-core").EventCallbackInterface<string | string[], import("victory-core").StringOrNumberOrList>[] | null | undefined> | undefined;
139
+ groupComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
140
+ height?: React.Validator<number | null | undefined> | undefined;
141
+ maxDomain?: React.Validator<number | {
142
+ x?: number | undefined;
143
+ y?: number | undefined;
144
+ } | null | undefined> | undefined;
145
+ minDomain?: React.Validator<number | {
146
+ x?: number | undefined;
147
+ y?: number | undefined;
148
+ } | null | undefined> | undefined;
149
+ name?: React.Validator<string | null | undefined> | undefined;
150
+ origin?: React.Validator<import("victory-core").OriginType | null | undefined> | undefined;
151
+ padding?: React.Validator<import("victory-core").PaddingProps | null | undefined> | undefined;
152
+ polar?: React.Validator<boolean | null | undefined> | undefined;
153
+ range?: React.Validator<import("victory-core").ForAxes<import("victory-core").RangeTuple> | null | undefined> | undefined;
154
+ scale?: React.Validator<import("victory-core").D3Scale<any> | import("victory-core").ScaleName | {
155
+ x?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
156
+ y?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
157
+ } | null | undefined> | undefined;
158
+ sharedEvents?: React.Validator<{
159
+ events: any[];
160
+ getEventState: Function;
161
+ } | null | undefined> | undefined;
162
+ singleQuadrantDomainPadding?: React.Validator<boolean | {
163
+ x?: boolean | undefined;
164
+ y?: boolean | undefined;
165
+ } | null | undefined> | undefined;
166
+ standalone?: React.Validator<boolean | null | undefined> | undefined;
167
+ width?: React.Validator<number | null | undefined> | undefined;
168
+ };
169
+ static defaultProps: {
170
+ containerComponent: JSX.Element;
171
+ data: {
172
+ x: number;
173
+ min: number;
174
+ q1: number;
175
+ median: number;
176
+ q3: number;
177
+ max: number;
178
+ }[];
179
+ dataComponent: JSX.Element;
180
+ groupComponent: JSX.Element;
181
+ maxComponent: JSX.Element;
182
+ maxLabelComponent: JSX.Element;
183
+ medianComponent: JSX.Element;
184
+ medianLabelComponent: JSX.Element;
185
+ minComponent: JSX.Element;
186
+ minLabelComponent: JSX.Element;
187
+ q1Component: JSX.Element;
188
+ q1LabelComponent: JSX.Element;
189
+ q3Component: JSX.Element;
190
+ q3LabelComponent: JSX.Element;
191
+ samples: number;
192
+ sortKey: string;
193
+ sortOrder: string;
194
+ standalone: boolean;
195
+ theme: import("victory-core").VictoryThemeDefinition;
196
+ };
197
+ static getDomain: (props: any, axis: any) => any;
198
+ static getData: (props: any) => any;
199
+ static getBaseProps: (props: any) => any;
200
+ static expectedComponents: Array<keyof VictoryBoxPlotProps>;
201
+ renderBoxPlot(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
202
+ shouldAnimate(): boolean;
203
+ shouldRenderDatum(datum: any): boolean;
204
+ render(): React.ReactElement;
205
+ }
206
+ export declare const VictoryBoxPlot: {
207
+ new (props: import("victory-core").EventMixinCommonProps): {
208
+ state: {};
209
+ getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
210
+ getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
211
+ getEvents: (p: any, target: any, eventKey: any) => any;
212
+ externalMutations: {} | undefined;
213
+ calculatedState: {};
214
+ globalEvents: {};
215
+ prevGlobalEventKeys: string[];
216
+ boundGlobalEvents: {};
217
+ shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
218
+ componentDidMount(): void;
219
+ componentDidUpdate(prevProps: any): void;
220
+ componentWillUnmount(): void;
221
+ addGlobalListener(key: any): void;
222
+ removeGlobalListener(key: any): void;
223
+ getStateChanges(props: any): {};
224
+ applyExternalMutations(props: any, externalMutations: any): void;
225
+ getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
226
+ getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
227
+ cacheValues(obj: any): void;
228
+ getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
229
+ getAllEvents(props: any): any;
230
+ getComponentProps(component: any, type: any, index: any): any;
231
+ renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
232
+ animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
233
+ renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
234
+ renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
235
+ context: unknown;
236
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
237
+ forceUpdate(callback?: (() => void) | undefined): void;
238
+ render(): React.ReactNode;
239
+ readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
240
+ refs: {
241
+ [key: string]: React.ReactInstance;
242
+ };
243
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
244
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
245
+ componentWillMount?(): void;
246
+ UNSAFE_componentWillMount?(): void;
247
+ componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
248
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
249
+ componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
250
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
251
+ componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
252
+ getSharedEventState: (key: string, value: string) => unknown;
253
+ baseProps: Record<string, object>;
254
+ dataKeys: string[];
255
+ hasEvents: unknown;
256
+ events: unknown;
257
+ };
258
+ getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
259
+ role?: string | undefined;
260
+ expectedComponents?: string[] | undefined;
261
+ getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
262
+ animationWhitelist?: string[] | undefined;
263
+ } & typeof VictoryBoxPlotBase;
264
+ export {};
265
+ //# sourceMappingURL=victory-box-plot.d.ts.map
@@ -95,18 +95,18 @@ var options = {
95
95
  }]
96
96
  };
97
97
 
98
- var VictoryBoxPlot = /*#__PURE__*/function (_React$Component) {
99
- _inherits(VictoryBoxPlot, _React$Component);
98
+ var VictoryBoxPlotBase = /*#__PURE__*/function (_React$Component) {
99
+ _inherits(VictoryBoxPlotBase, _React$Component);
100
100
 
101
- var _super = _createSuper(VictoryBoxPlot);
101
+ var _super = _createSuper(VictoryBoxPlotBase);
102
102
 
103
- function VictoryBoxPlot() {
104
- _classCallCheck(this, VictoryBoxPlot);
103
+ function VictoryBoxPlotBase() {
104
+ _classCallCheck(this, VictoryBoxPlotBase);
105
105
 
106
106
  return _super.apply(this, arguments);
107
107
  }
108
108
 
109
- _createClass(VictoryBoxPlot, [{
109
+ _createClass(VictoryBoxPlotBase, [{
110
110
  key: "renderBoxPlot",
111
111
  value: function renderBoxPlot(props) {
112
112
  var _this = this;
@@ -128,18 +128,18 @@ var VictoryBoxPlot = /*#__PURE__*/function (_React$Component) {
128
128
  }));
129
129
 
130
130
  var labelComponents = _flatten(types.map(function (type) {
131
- var components = _this.dataKeys.map(function (key, index) {
131
+ var components = _this.dataKeys.reduce(function (validComponents, _key, index) {
132
132
  var name = "".concat(type, "Labels");
133
133
  var baseComponent = props["".concat(type, "LabelComponent")];
134
134
 
135
135
  var labelProps = _this.getComponentProps(baseComponent, name, index);
136
136
 
137
137
  if (labelProps.text !== undefined && labelProps.text !== null) {
138
- return /*#__PURE__*/React.cloneElement(baseComponent, labelProps);
138
+ validComponents.push( /*#__PURE__*/React.cloneElement(baseComponent, labelProps));
139
139
  }
140
140
 
141
- return undefined;
142
- });
141
+ return validComponents;
142
+ }, []);
143
143
 
144
144
  return components.filter(Boolean);
145
145
  }));
@@ -178,14 +178,14 @@ var VictoryBoxPlot = /*#__PURE__*/function (_React$Component) {
178
178
  }
179
179
  }]);
180
180
 
181
- return VictoryBoxPlot;
181
+ return VictoryBoxPlotBase;
182
182
  }(React.Component);
183
183
 
184
- VictoryBoxPlot.animationWhitelist = ["data", "domain", "height", "padding", "style", "width"];
185
- VictoryBoxPlot.displayName = "VictoryBoxPlot";
186
- VictoryBoxPlot.role = "boxplot";
187
- VictoryBoxPlot.defaultTransitions = DefaultTransitions.discreteTransitions();
188
- VictoryBoxPlot.propTypes = _objectSpread(_objectSpread(_objectSpread({}, CommonProps.baseProps), CommonProps.dataProps), {}, {
184
+ VictoryBoxPlotBase.animationWhitelist = ["data", "domain", "height", "padding", "style", "width"];
185
+ VictoryBoxPlotBase.displayName = "VictoryBoxPlot";
186
+ VictoryBoxPlotBase.role = "boxplot";
187
+ VictoryBoxPlotBase.defaultTransitions = DefaultTransitions.discreteTransitions();
188
+ VictoryBoxPlotBase.propTypes = _objectSpread(_objectSpread(_objectSpread({}, CommonProps.baseProps), CommonProps.dataProps), {}, {
189
189
  boxWidth: PropTypes.number,
190
190
  events: PropTypes.arrayOf(PropTypes.shape({
191
191
  target: PropTypes.oneOf(["max", "maxLabels", "median", "medianLabels", "min", "minLabels", "q1", "q1Labels", "q3", "q3Labels", "parent"]),
@@ -239,7 +239,7 @@ VictoryBoxPlot.propTypes = _objectSpread(_objectSpread(_objectSpread({}, CommonP
239
239
  }),
240
240
  whiskerWidth: PropTypes.number
241
241
  });
242
- VictoryBoxPlot.defaultProps = {
242
+ VictoryBoxPlotBase.defaultProps = {
243
243
  containerComponent: /*#__PURE__*/React.createElement(VictoryContainer, null),
244
244
  data: defaultData,
245
245
  dataComponent: /*#__PURE__*/React.createElement(Box, null),
@@ -262,13 +262,13 @@ VictoryBoxPlot.defaultProps = {
262
262
  standalone: true,
263
263
  theme: VictoryTheme.grayscale
264
264
  };
265
- VictoryBoxPlot.getDomain = getDomain;
266
- VictoryBoxPlot.getData = getData;
265
+ VictoryBoxPlotBase.getDomain = getDomain;
266
+ VictoryBoxPlotBase.getData = getData;
267
267
 
268
- VictoryBoxPlot.getBaseProps = function (props) {
268
+ VictoryBoxPlotBase.getBaseProps = function (props) {
269
269
  return getBaseProps(props, fallbackProps);
270
270
  };
271
271
 
272
- VictoryBoxPlot.expectedComponents = ["maxComponent", "maxLabelComponent", "medianComponent", "medianLabelComponent", "minComponent", "minLabelComponent", "q1Component", "q1LabelComponent", "q3Component", "q3LabelComponent", "groupComponent", "containerComponent"];
273
- export default addEvents(VictoryBoxPlot, options);
272
+ VictoryBoxPlotBase.expectedComponents = ["maxComponent", "maxLabelComponent", "medianComponent", "medianLabelComponent", "minComponent", "minLabelComponent", "q1Component", "q1LabelComponent", "q3Component", "q3LabelComponent", "groupComponent", "containerComponent"];
273
+ export var VictoryBoxPlot = addEvents(VictoryBoxPlotBase, options);
274
274
  //# sourceMappingURL=victory-box-plot.js.map
@@ -0,0 +1,4 @@
1
+ export declare const getData: (props: any) => any;
2
+ export declare const getDomain: (props: any, axis: any) => any;
3
+ export declare const getBaseProps: (props: any, fallbackProps: any) => any;
4
+ //# sourceMappingURL=helper-methods.d.ts.map
package/lib/index.d.ts CHANGED
@@ -1,77 +1,2 @@
1
- import * as React from "react";
2
- import {
3
- EventPropTypeInterface,
4
- DomainPropType,
5
- DomainPaddingPropType,
6
- OrientationTypes,
7
- StringOrNumberOrCallback,
8
- VictoryDatableProps,
9
- VictoryCommonProps,
10
- VictoryStyleObject,
11
- VictoryLabelStyleObject,
12
- } from "victory-core";
13
-
14
- export type VictoryBoxPlotLabelType =
15
- | boolean
16
- | (string | number)[]
17
- | Function
18
- | { (data: any): string | null };
19
-
20
- export interface VictoryBoxPlotStyleInterface {
21
- parent?: VictoryStyleObject;
22
- max?: VictoryStyleObject;
23
- maxLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
24
- min?: VictoryStyleObject;
25
- minLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
26
- median?: VictoryStyleObject;
27
- medianLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
28
- q1?: VictoryStyleObject;
29
- q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
30
- q3?: VictoryStyleObject;
31
- q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
32
- }
33
-
34
- export interface VictoryBoxPlotLabelOrientationInterface {
35
- max?: OrientationTypes;
36
- min?: OrientationTypes;
37
- median?: OrientationTypes;
38
- q1?: OrientationTypes;
39
- q3?: OrientationTypes;
40
- }
41
-
42
- export interface VictoryBoxPlotProps
43
- extends VictoryCommonProps,
44
- VictoryDatableProps {
45
- boxWidth?: number;
46
- domain?: DomainPropType;
47
- domainPadding?: DomainPaddingPropType;
48
- events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
49
- eventKey?: StringOrNumberOrCallback;
50
- horizontal?: boolean;
51
- labelOrientation?: OrientationTypes | VictoryBoxPlotLabelOrientationInterface;
52
- labels?: boolean;
53
- max?: StringOrNumberOrCallback | string[];
54
- maxComponent?: React.ReactElement;
55
- maxLabelComponent?: React.ReactElement;
56
- maxLabels?: VictoryBoxPlotLabelType;
57
- median?: StringOrNumberOrCallback | string[];
58
- medianComponent?: React.ReactElement;
59
- medianLabelComponent?: React.ReactElement;
60
- medianLabels?: VictoryBoxPlotLabelType;
61
- min?: StringOrNumberOrCallback | string[];
62
- minComponent?: React.ReactElement;
63
- minLabelComponent?: React.ReactElement;
64
- minLabels?: VictoryBoxPlotLabelType;
65
- q1?: StringOrNumberOrCallback | string[];
66
- q1Component?: React.ReactElement;
67
- q1LabelComponent?: React.ReactElement;
68
- q1Labels?: VictoryBoxPlotLabelType;
69
- q3?: StringOrNumberOrCallback | string[];
70
- q3Component?: React.ReactElement;
71
- q3LabelComponent?: React.ReactElement;
72
- q3Labels?: VictoryBoxPlotLabelType;
73
- style?: VictoryBoxPlotStyleInterface;
74
- whiskerWidth?: number;
75
- }
76
-
77
- export class VictoryBoxPlot extends React.Component<VictoryBoxPlotProps, any> {}
1
+ export * from "./victory-box-plot";
2
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -3,14 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "VictoryBoxPlot", {
7
- enumerable: true,
8
- get: function () {
9
- return _victoryBoxPlot.default;
10
- }
11
- });
12
6
 
13
- var _victoryBoxPlot = _interopRequireDefault(require("./victory-box-plot"));
7
+ var _victoryBoxPlot = require("./victory-box-plot");
14
8
 
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ Object.keys(_victoryBoxPlot).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ if (key in exports && exports[key] === _victoryBoxPlot[key]) return;
12
+ Object.defineProperty(exports, key, {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _victoryBoxPlot[key];
16
+ }
17
+ });
18
+ });
16
19
  //# sourceMappingURL=index.js.map