@elliemae/ds-modal 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.
@@ -21,26 +21,25 @@ var DSModalWrapper = (WrappedComponent => {
21
21
  class DSModalWrapper extends react.Component {
22
22
  constructor() {
23
23
  super(...arguments);
24
-
25
- _defineProperty__default["default"](this, "state", {
24
+ this.state = {
26
25
  childready: false,
27
26
  additionalFooterCssClass: 'loading',
28
27
  container: null,
29
28
  actions: null,
30
29
  height: '100%'
31
- });
30
+ };
32
31
 
33
- _defineProperty__default["default"](this, "onHeaderHeight", e => {
32
+ this.onHeaderHeight = e => {
34
33
  this.heightHeaderFlag = true;
35
34
  this.heightHeader = e.height || 0;
36
- });
35
+ };
37
36
 
38
- _defineProperty__default["default"](this, "onFooterHeight", e => {
37
+ this.onFooterHeight = e => {
39
38
  this.heightFooterFlag = true;
40
39
  this.heightFooter = e.height || 0;
41
- });
40
+ };
42
41
 
43
- _defineProperty__default["default"](this, "onResize", _ref => {
42
+ this.onResize = _ref => {
44
43
  let {
45
44
  bounds
46
45
  } = _ref;
@@ -54,21 +53,21 @@ var DSModalWrapper = (WrappedComponent => {
54
53
  return setTimeout(this.onResize({
55
54
  bounds
56
55
  }), 0);
57
- });
56
+ };
58
57
 
59
- _defineProperty__default["default"](this, "handleContainer", node => {
58
+ this.handleContainer = node => {
60
59
  if (node) this.setState({
61
60
  container: node
62
61
  });
63
62
  this.handleResize();
64
- });
63
+ };
65
64
 
66
- _defineProperty__default["default"](this, "handleActions", node => {
65
+ this.handleActions = node => {
67
66
  if (node) this.setState({
68
67
  actions: node
69
68
  });
70
69
  this.handleResize();
71
- });
70
+ };
72
71
  }
73
72
 
74
73
  componentDidMount() {
@@ -1,10 +1,10 @@
1
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import 'core-js/modules/web.dom-collections.iterator.js';
3
1
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
2
  import 'core-js/modules/esnext.iterator.constructor.js';
5
3
  import 'core-js/modules/esnext.iterator.filter.js';
6
4
  import 'core-js/modules/esnext.async-iterator.for-each.js';
7
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
8
8
  import { Component, createElement } from 'react';
9
9
  import { MODAL_TYPE } from '../constants.js';
10
10
 
@@ -15,26 +15,25 @@ var DSModalWrapper = (WrappedComponent => {
15
15
  class DSModalWrapper extends Component {
16
16
  constructor() {
17
17
  super(...arguments);
18
-
19
- _defineProperty(this, "state", {
18
+ this.state = {
20
19
  childready: false,
21
20
  additionalFooterCssClass: 'loading',
22
21
  container: null,
23
22
  actions: null,
24
23
  height: '100%'
25
- });
24
+ };
26
25
 
27
- _defineProperty(this, "onHeaderHeight", e => {
26
+ this.onHeaderHeight = e => {
28
27
  this.heightHeaderFlag = true;
29
28
  this.heightHeader = e.height || 0;
30
- });
29
+ };
31
30
 
32
- _defineProperty(this, "onFooterHeight", e => {
31
+ this.onFooterHeight = e => {
33
32
  this.heightFooterFlag = true;
34
33
  this.heightFooter = e.height || 0;
35
- });
34
+ };
36
35
 
37
- _defineProperty(this, "onResize", _ref => {
36
+ this.onResize = _ref => {
38
37
  let {
39
38
  bounds
40
39
  } = _ref;
@@ -48,21 +47,21 @@ var DSModalWrapper = (WrappedComponent => {
48
47
  return setTimeout(this.onResize({
49
48
  bounds
50
49
  }), 0);
51
- });
50
+ };
52
51
 
53
- _defineProperty(this, "handleContainer", node => {
52
+ this.handleContainer = node => {
54
53
  if (node) this.setState({
55
54
  container: node
56
55
  });
57
56
  this.handleResize();
58
- });
57
+ };
59
58
 
60
- _defineProperty(this, "handleActions", node => {
59
+ this.handleActions = node => {
61
60
  if (node) this.setState({
62
61
  actions: node
63
62
  });
64
63
  this.handleResize();
65
- });
64
+ };
66
65
  }
67
66
 
68
67
  componentDidMount() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-modal",
3
- "version": "2.0.0-rc.6",
3
+ "version": "2.0.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Modal",
6
6
  "module": "./esm/index.js",
@@ -96,15 +96,21 @@
96
96
  "build": "node ../../scripts/build/build.js"
97
97
  },
98
98
  "dependencies": {
99
- "@elliemae/ds-basic": "2.0.0-rc.6",
100
- "@elliemae/ds-classnames": "2.0.0-rc.6",
101
- "@elliemae/ds-icons": "2.0.0-rc.6",
102
- "@elliemae/ds-modal": "2.0.0-rc.6",
103
- "@elliemae/ds-system": "2.0.0-rc.6",
99
+ "@elliemae/ds-button": "2.0.0",
100
+ "@elliemae/ds-classnames": "2.0.0",
101
+ "@elliemae/ds-form": "2.0.0",
102
+ "@elliemae/ds-icon": "2.0.0",
103
+ "@elliemae/ds-icons": "2.0.0",
104
+ "@elliemae/ds-shared": "2.0.0",
105
+ "@elliemae/ds-system": "2.0.0",
104
106
  "prop-types": "~15.7.2",
105
107
  "react-desc": "~4.1.3",
106
108
  "react-modal": "~3.12.1"
107
109
  },
110
+ "devDependencies": {
111
+ "@testing-library/jest-dom": "~5.15.0",
112
+ "@testing-library/react": "~12.1.2"
113
+ },
108
114
  "peerDependencies": {
109
115
  "lodash": "^4.17.21",
110
116
  "react": "~17.0.2",
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
1
2
  /// <reference types="react" />
2
3
  import { DSModalContent } from './components/ModalContent';
3
4
  declare const DSModal: {
@@ -33,59 +34,227 @@ declare const DSModal: {
33
34
  }): JSX.Element;
34
35
  propTypes: {
35
36
  /** inject props to container wrapper */
36
- containerProps: any;
37
+ containerProps: {
38
+ defaultValue<T = unknown>(arg: T): {
39
+ deprecated: import("react-desc").PropTypesDescValidator;
40
+ };
41
+ isRequired: import("react-desc").PropTypesDescValidator;
42
+ };
37
43
  /** css class */
38
- className: any;
44
+ className: {
45
+ defaultValue<T = unknown>(arg: T): {
46
+ deprecated: import("react-desc").PropTypesDescValidator;
47
+ };
48
+ isRequired: import("react-desc").PropTypesDescValidator;
49
+ };
39
50
  /** style object for container wrapper */
40
- style: any;
51
+ style: {
52
+ defaultValue<T = unknown>(arg: T): {
53
+ deprecated: import("react-desc").PropTypesDescValidator;
54
+ };
55
+ isRequired: import("react-desc").PropTypesDescValidator;
56
+ };
41
57
  /** modal container title */
42
- modalTitle: any;
58
+ modalTitle: {
59
+ defaultValue<T = unknown>(arg: T): {
60
+ deprecated: import("react-desc").PropTypesDescValidator;
61
+ };
62
+ isRequired: import("react-desc").PropTypesDescValidator;
63
+ };
43
64
  /** center container */
44
- centered: any;
65
+ centered: {
66
+ defaultValue<T = unknown>(arg: T): {
67
+ deprecated: import("react-desc").PropTypesDescValidator;
68
+ };
69
+ isRequired: import("react-desc").PropTypesDescValidator;
70
+ };
45
71
  /** show reject button */
46
- showRejectButton: any;
72
+ showRejectButton: {
73
+ defaultValue<T = unknown>(arg: T): {
74
+ deprecated: import("react-desc").PropTypesDescValidator;
75
+ };
76
+ isRequired: import("react-desc").PropTypesDescValidator;
77
+ };
47
78
  /** show close button */
48
- showClose: any;
49
- searchProps: any;
79
+ showClose: {
80
+ defaultValue<T = unknown>(arg: T): {
81
+ deprecated: import("react-desc").PropTypesDescValidator;
82
+ };
83
+ isRequired: import("react-desc").PropTypesDescValidator;
84
+ };
85
+ searchProps: {
86
+ defaultValue<T = unknown>(arg: T): {
87
+ deprecated: import("react-desc").PropTypesDescValidator;
88
+ };
89
+ isRequired: import("react-desc").PropTypesDescValidator;
90
+ };
50
91
  /** css class for footer */
51
- additionalFooterCssClass: any;
92
+ additionalFooterCssClass: {
93
+ defaultValue<T = unknown>(arg: T): {
94
+ deprecated: import("react-desc").PropTypesDescValidator;
95
+ };
96
+ isRequired: import("react-desc").PropTypesDescValidator;
97
+ };
52
98
  /** override props confirm button */
53
- overridePropsConfirmButton: any;
99
+ overridePropsConfirmButton: {
100
+ defaultValue<T = unknown>(arg: T): {
101
+ deprecated: import("react-desc").PropTypesDescValidator;
102
+ };
103
+ isRequired: import("react-desc").PropTypesDescValidator;
104
+ };
54
105
  /** override props reject button */
55
- overridePropsRejectButton: any;
106
+ overridePropsRejectButton: {
107
+ defaultValue<T = unknown>(arg: T): {
108
+ deprecated: import("react-desc").PropTypesDescValidator;
109
+ };
110
+ isRequired: import("react-desc").PropTypesDescValidator;
111
+ };
56
112
  /** controlled isOpen flag */
57
- isOpen: any;
113
+ isOpen: {
114
+ defaultValue<T = unknown>(arg: T): {
115
+ deprecated: import("react-desc").PropTypesDescValidator;
116
+ };
117
+ isRequired: import("react-desc").PropTypesDescValidator;
118
+ };
58
119
  /** close callback */
59
- onClose: any;
120
+ onClose: {
121
+ defaultValue<T = unknown>(arg: T): {
122
+ deprecated: import("react-desc").PropTypesDescValidator;
123
+ };
124
+ isRequired: import("react-desc").PropTypesDescValidator;
125
+ };
60
126
  /** after open callback */
61
- onAfterOpen: any;
127
+ onAfterOpen: {
128
+ defaultValue<T = unknown>(arg: T): {
129
+ deprecated: import("react-desc").PropTypesDescValidator;
130
+ };
131
+ isRequired: import("react-desc").PropTypesDescValidator;
132
+ };
62
133
  /** confirm callback */
63
- onConfirm: any;
134
+ onConfirm: {
135
+ defaultValue<T = unknown>(arg: T): {
136
+ deprecated: import("react-desc").PropTypesDescValidator;
137
+ };
138
+ isRequired: import("react-desc").PropTypesDescValidator;
139
+ };
64
140
  /** reject callback */
65
- onReject: any;
141
+ onReject: {
142
+ defaultValue<T = unknown>(arg: T): {
143
+ deprecated: import("react-desc").PropTypesDescValidator;
144
+ };
145
+ isRequired: import("react-desc").PropTypesDescValidator;
146
+ };
66
147
  /** reject label */
67
- rejectLabel: any;
148
+ rejectLabel: {
149
+ defaultValue<T = unknown>(arg: T): {
150
+ deprecated: import("react-desc").PropTypesDescValidator;
151
+ };
152
+ isRequired: import("react-desc").PropTypesDescValidator;
153
+ };
68
154
  /** confirm text string */
69
- confirmLabel: any;
155
+ confirmLabel: {
156
+ defaultValue<T = unknown>(arg: T): {
157
+ deprecated: import("react-desc").PropTypesDescValidator;
158
+ };
159
+ isRequired: import("react-desc").PropTypesDescValidator;
160
+ };
70
161
  /** modal container size */
71
- size: any;
162
+ size: {
163
+ defaultValue<T = unknown>(arg: T): {
164
+ deprecated: import("react-desc").PropTypesDescValidator;
165
+ };
166
+ isRequired: import("react-desc").PropTypesDescValidator;
167
+ };
72
168
  /** modal sub type */
73
- modalSubType: any;
169
+ modalSubType: {
170
+ defaultValue<T = unknown>(arg: T): {
171
+ deprecated: import("react-desc").PropTypesDescValidator;
172
+ };
173
+ isRequired: import("react-desc").PropTypesDescValidator;
174
+ };
74
175
  /** modal type */
75
- modalType: any;
176
+ modalType: {
177
+ defaultValue<T = unknown>(arg: T): {
178
+ deprecated: import("react-desc").PropTypesDescValidator;
179
+ };
180
+ isRequired: import("react-desc").PropTypesDescValidator;
181
+ };
76
182
  /** ref for modal footer actions */
77
- actionsRef: any;
183
+ actionsRef: {
184
+ defaultValue<T = unknown>(arg: T): {
185
+ deprecated: import("react-desc").PropTypesDescValidator;
186
+ };
187
+ isRequired: import("react-desc").PropTypesDescValidator;
188
+ };
78
189
  /** modal container children */
79
- children: any;
190
+ children: {
191
+ defaultValue<T = unknown>(arg: T): {
192
+ deprecated: import("react-desc").PropTypesDescValidator;
193
+ };
194
+ isRequired: import("react-desc").PropTypesDescValidator;
195
+ };
80
196
  /** close on click outside container */
81
- shouldCloseOnOverlayClick: any;
82
- appElement: any;
197
+ shouldCloseOnOverlayClick: {
198
+ defaultValue<T = unknown>(arg: T): {
199
+ deprecated: import("react-desc").PropTypesDescValidator;
200
+ };
201
+ isRequired: import("react-desc").PropTypesDescValidator;
202
+ };
203
+ appElement: {
204
+ defaultValue<T = unknown>(arg: T): {
205
+ deprecated: import("react-desc").PropTypesDescValidator;
206
+ };
207
+ isRequired: import("react-desc").PropTypesDescValidator;
208
+ };
83
209
  /** zindex for modal container */
84
- zIndex: any;
210
+ zIndex: {
211
+ defaultValue<T = unknown>(arg: T): {
212
+ deprecated: import("react-desc").PropTypesDescValidator;
213
+ };
214
+ isRequired: import("react-desc").PropTypesDescValidator;
215
+ };
85
216
  /** remove modal builtin padding */
86
- removePadding: any;
217
+ removePadding: {
218
+ defaultValue<T = unknown>(arg: T): {
219
+ deprecated: import("react-desc").PropTypesDescValidator;
220
+ };
221
+ isRequired: import("react-desc").PropTypesDescValidator;
222
+ };
87
223
  };
88
224
  };
89
- declare const DSModalWithSchema: any;
225
+ declare const DSModalWithSchema: {
226
+ (props?: {
227
+ containerProps?: {} | undefined;
228
+ className?: string | undefined;
229
+ style?: {} | undefined;
230
+ size?: string | undefined;
231
+ modalType?: string | undefined;
232
+ modalSubType?: null | undefined;
233
+ modalTitle?: string | undefined;
234
+ dataTestId?: string | undefined;
235
+ centered?: boolean | undefined;
236
+ showRejectButton?: boolean | undefined;
237
+ showClose?: boolean | undefined;
238
+ searchProps?: {} | undefined;
239
+ actionsRef?: (() => null) | undefined;
240
+ additionalFooterCssClass: any;
241
+ overridePropsConfirmButton?: {} | undefined;
242
+ overridePropsRejectButton?: {} | undefined;
243
+ children: any;
244
+ isOpen?: boolean | undefined;
245
+ onClose?: (() => null) | undefined;
246
+ onAfterOpen?: (() => null) | undefined;
247
+ onConfirm?: (() => null) | undefined;
248
+ onReject?: (() => null) | undefined;
249
+ rejectLabel?: string | undefined;
250
+ confirmLabel?: string | undefined;
251
+ shouldCloseOnOverlayClick?: boolean | undefined;
252
+ appElement?: string | undefined;
253
+ zIndex?: number | undefined;
254
+ removePadding?: boolean | undefined;
255
+ } | undefined): JSX.Element;
256
+ propTypes: unknown;
257
+ toTypescript: () => import("react-desc").TypescriptSchema;
258
+ };
90
259
  export { DSModalContent, DSModalWithSchema };
91
260
  export default DSModal;