@elliemae/ds-popper 2.0.0-rc.6 → 2.0.0

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.
@@ -149,9 +149,8 @@ class PopperContent extends react.PureComponent {
149
149
  }
150
150
 
151
151
  }
152
-
153
- _defineProperty__default["default"](PopperContent, "defaultProps", {
152
+ PopperContent.defaultProps = {
154
153
  onContentDestroyed: () => null
155
- });
154
+ };
156
155
 
157
156
  module.exports = PopperContent;
package/cjs/PopperImpl.js CHANGED
@@ -30,16 +30,13 @@ class PopperImpl extends react.Component {
30
30
  // we use safeIsMounted because isMounted is not allowed by React.
31
31
  constructor(props) {
32
32
  super(props);
33
-
34
- _defineProperty__default["default"](this, "safeIsMounted", false);
35
-
36
- _defineProperty__default["default"](this, "handlePopperPlacementChange", memoizeOne__default["default"](placement => {
33
+ this.safeIsMounted = false;
34
+ this.handlePopperPlacementChange = memoizeOne__default["default"](placement => {
37
35
  const {
38
36
  onPlacementChange
39
37
  } = this.props;
40
38
  onPlacementChange(placement);
41
- }));
42
-
39
+ });
43
40
  this.state = {
44
41
  isOpen: false,
45
42
  destroyed: true
@@ -140,9 +140,8 @@ class PopperContent extends PureComponent {
140
140
  }
141
141
 
142
142
  }
143
-
144
- _defineProperty(PopperContent, "defaultProps", {
143
+ PopperContent.defaultProps = {
145
144
  onContentDestroyed: () => null
146
- });
145
+ };
147
146
 
148
147
  export { PopperContent as default };
package/esm/PopperImpl.js CHANGED
@@ -22,16 +22,13 @@ class PopperImpl extends Component {
22
22
  // we use safeIsMounted because isMounted is not allowed by React.
23
23
  constructor(props) {
24
24
  super(props);
25
-
26
- _defineProperty(this, "safeIsMounted", false);
27
-
28
- _defineProperty(this, "handlePopperPlacementChange", memoizeOne(placement => {
25
+ this.safeIsMounted = false;
26
+ this.handlePopperPlacementChange = memoizeOne(placement => {
29
27
  const {
30
28
  onPlacementChange
31
29
  } = this.props;
32
30
  onPlacementChange(placement);
33
- }));
34
-
31
+ });
35
32
  this.state = {
36
33
  isOpen: false,
37
34
  destroyed: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-popper",
3
- "version": "2.0.0-rc.6",
3
+ "version": "2.0.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Popper",
6
6
  "module": "./esm/index.js",
@@ -60,8 +60,8 @@
60
60
  "build": "node ../../scripts/build/build.js"
61
61
  },
62
62
  "dependencies": {
63
- "@elliemae/ds-overlay": "2.0.0-rc.6",
64
- "@elliemae/ds-utilities": "2.0.0-rc.6",
63
+ "@elliemae/ds-overlay": "2.0.0",
64
+ "@elliemae/ds-utilities": "2.0.0",
65
65
  "memoize-one": "~5.1.1",
66
66
  "prop-types": "~15.7.2",
67
67
  "react-desc": "~4.1.3",
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  /// <reference types="react" />
2
3
  import { Position } from './positions';
3
4
  import { Interaction } from './interaction';
@@ -36,17 +37,67 @@ declare const DSPopper: {
36
37
  hideIfNotVisible: any;
37
38
  }): JSX.Element;
38
39
  propTypes: {
39
- hideIfNotVisible: any;
40
- containerProps: any;
41
- arrowGap: any;
42
- onOpen: any;
43
- onClose: any;
44
- delayClose: any;
45
- delayOpen: any;
46
- onPlacementChange: any;
47
- arrowSize: any;
48
- blockName: any;
49
- triggerComponent: any;
40
+ hideIfNotVisible: {
41
+ defaultValue<T = unknown>(arg: T): {
42
+ deprecated: import("react-desc").PropTypesDescValidator;
43
+ };
44
+ isRequired: import("react-desc").PropTypesDescValidator;
45
+ };
46
+ containerProps: {
47
+ defaultValue<T = unknown>(arg: T): {
48
+ deprecated: import("react-desc").PropTypesDescValidator;
49
+ };
50
+ isRequired: import("react-desc").PropTypesDescValidator;
51
+ };
52
+ arrowGap: {
53
+ defaultValue<T = unknown>(arg: T): {
54
+ deprecated: import("react-desc").PropTypesDescValidator;
55
+ };
56
+ isRequired: import("react-desc").PropTypesDescValidator;
57
+ };
58
+ onOpen: {
59
+ defaultValue<T = unknown>(arg: T): {
60
+ deprecated: import("react-desc").PropTypesDescValidator;
61
+ };
62
+ isRequired: import("react-desc").PropTypesDescValidator;
63
+ };
64
+ onClose: {
65
+ defaultValue<T = unknown>(arg: T): {
66
+ deprecated: import("react-desc").PropTypesDescValidator;
67
+ };
68
+ isRequired: import("react-desc").PropTypesDescValidator;
69
+ };
70
+ delayClose: {
71
+ defaultValue<T = unknown>(arg: T): {
72
+ deprecated: import("react-desc").PropTypesDescValidator;
73
+ };
74
+ isRequired: import("react-desc").PropTypesDescValidator;
75
+ };
76
+ delayOpen: {
77
+ defaultValue<T = unknown>(arg: T): {
78
+ deprecated: import("react-desc").PropTypesDescValidator;
79
+ };
80
+ isRequired: import("react-desc").PropTypesDescValidator;
81
+ };
82
+ onPlacementChange: {
83
+ defaultValue<T = unknown>(arg: T): {
84
+ deprecated: import("react-desc").PropTypesDescValidator;
85
+ };
86
+ isRequired: import("react-desc").PropTypesDescValidator;
87
+ };
88
+ arrowSize: {
89
+ defaultValue<T = unknown>(arg: T): {
90
+ deprecated: import("react-desc").PropTypesDescValidator;
91
+ };
92
+ isRequired: import("react-desc").PropTypesDescValidator;
93
+ };
94
+ blockName: {
95
+ defaultValue<T = unknown>(arg: T): {
96
+ deprecated: import("react-desc").PropTypesDescValidator;
97
+ };
98
+ isRequired: import("react-desc").PropTypesDescValidator;
99
+ };
100
+ triggerComponent: import("react-desc").PropTypesDescValidator;
50
101
  };
51
102
  defaultProps: {
52
103
  containerProps: {};
@@ -94,7 +145,43 @@ declare const DSPopper: {
94
145
  hideIfNotVisible: boolean;
95
146
  };
96
147
  };
97
- declare const DSPopperWithSchema: any;
148
+ declare const DSPopperWithSchema: {
149
+ (props?: {
150
+ containerProps: any;
151
+ arrowGap: any;
152
+ arrowSize: any;
153
+ blockName: any;
154
+ contentOffset: any;
155
+ contentStyle: any;
156
+ contentComponent: any;
157
+ delayClose: any;
158
+ delayOpen: any;
159
+ interactionType: any;
160
+ isOpen: any;
161
+ onOpen: any;
162
+ onClose: any;
163
+ onPlacementChange: any;
164
+ placement: any;
165
+ preventOverflow: any;
166
+ showArrow: any;
167
+ closeAnimationConfig: any;
168
+ openAnimationConfig: any;
169
+ usePortal: any;
170
+ triggerComponent: any;
171
+ wrapExtraComponent: any;
172
+ getTargetFromChildren: any;
173
+ getContentFromChildren: any;
174
+ modifiers: any;
175
+ triggerRef: any;
176
+ children: any;
177
+ renderReference: any;
178
+ referenceNode: any;
179
+ zIndex: any;
180
+ hideIfNotVisible: any;
181
+ } | undefined): JSX.Element;
182
+ propTypes: unknown;
183
+ toTypescript: () => import("react-desc").TypescriptSchema;
184
+ };
98
185
  export { Interaction as PopperInteractions, Position as PopperPositions, DSPopperWithSchema, DSPopper };
99
186
  export { interactions } from './interaction';
100
187
  export { positions } from './positions';
package/types/props.d.ts CHANGED
@@ -1,25 +1,76 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  export declare const popperProps: {
2
3
  /** Hide menu component if trigger component is not visible/scrolled away */
3
- hideIfNotVisible: any;
4
+ hideIfNotVisible: {
5
+ defaultValue<T = unknown>(arg: T): {
6
+ deprecated: import("react-desc").PropTypesDescValidator;
7
+ };
8
+ isRequired: import("react-desc").PropTypesDescValidator;
9
+ };
4
10
  /** props to inject to popper wrapper */
5
- containerProps: any;
11
+ containerProps: {
12
+ defaultValue<T = unknown>(arg: T): {
13
+ deprecated: import("react-desc").PropTypesDescValidator;
14
+ };
15
+ isRequired: import("react-desc").PropTypesDescValidator;
16
+ };
6
17
  /** Space between the arrow and the popup */
7
- arrowGap: any;
18
+ arrowGap: {
19
+ defaultValue<T = unknown>(arg: T): {
20
+ deprecated: import("react-desc").PropTypesDescValidator;
21
+ };
22
+ isRequired: import("react-desc").PropTypesDescValidator;
23
+ };
8
24
  /** callback for when menu changes from close to open */
9
- onOpen: any;
25
+ onOpen: {
26
+ defaultValue<T = unknown>(arg: T): {
27
+ deprecated: import("react-desc").PropTypesDescValidator;
28
+ };
29
+ isRequired: import("react-desc").PropTypesDescValidator;
30
+ };
10
31
  /** callback for when menu changes from open to close */
11
- onClose: any;
32
+ onClose: {
33
+ defaultValue<T = unknown>(arg: T): {
34
+ deprecated: import("react-desc").PropTypesDescValidator;
35
+ };
36
+ isRequired: import("react-desc").PropTypesDescValidator;
37
+ };
12
38
  /** Time in ms to delay close of menu */
13
- delayClose: any;
39
+ delayClose: {
40
+ defaultValue<T = unknown>(arg: T): {
41
+ deprecated: import("react-desc").PropTypesDescValidator;
42
+ };
43
+ isRequired: import("react-desc").PropTypesDescValidator;
44
+ };
14
45
  /** Time in ms to delay open of menu */
15
- delayOpen: any;
46
+ delayOpen: {
47
+ defaultValue<T = unknown>(arg: T): {
48
+ deprecated: import("react-desc").PropTypesDescValidator;
49
+ };
50
+ isRequired: import("react-desc").PropTypesDescValidator;
51
+ };
16
52
  /** callback for when menu changes placement */
17
- onPlacementChange: any;
53
+ onPlacementChange: {
54
+ defaultValue<T = unknown>(arg: T): {
55
+ deprecated: import("react-desc").PropTypesDescValidator;
56
+ };
57
+ isRequired: import("react-desc").PropTypesDescValidator;
58
+ };
18
59
  /** Arrow size */
19
- arrowSize: any;
60
+ arrowSize: {
61
+ defaultValue<T = unknown>(arg: T): {
62
+ deprecated: import("react-desc").PropTypesDescValidator;
63
+ };
64
+ isRequired: import("react-desc").PropTypesDescValidator;
65
+ };
20
66
  /** Bem blockname for the popper */
21
- blockName: any;
22
- triggerComponent: any;
67
+ blockName: {
68
+ defaultValue<T = unknown>(arg: T): {
69
+ deprecated: import("react-desc").PropTypesDescValidator;
70
+ };
71
+ isRequired: import("react-desc").PropTypesDescValidator;
72
+ };
73
+ triggerComponent: import("react-desc").PropTypesDescValidator;
23
74
  };
24
75
  export declare const defaultProps: {
25
76
  containerProps: {};