@elliemae/ds-modal 2.0.0-alpha.11 → 2.0.0-alpha.12
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/cjs/DSModal.js +5 -0
- package/cjs/v1/DSModal.js +44 -39
- package/cjs/v1/DSModalWrapper.js +23 -17
- package/cjs/v1/ModalFeedBack/ModalFeedBack.js +24 -29
- package/cjs/v2/DSModal.js +40 -33
- package/cjs/v2/blocks.js +72 -48
- package/cjs/v2/components/DecisionHeader.js +21 -19
- package/cjs/v2/components/FeedbackIcon.js +16 -22
- package/cjs/v2/components/Footer.js +43 -35
- package/cjs/v2/components/FormHeader.js +30 -28
- package/cjs/v2/components/ModalContent.js +84 -76
- package/cjs/v2/components/SelectionHeader.js +27 -20
- package/cjs/v2/components/Title.js +11 -8
- package/cjs/v2/helpers.js +21 -16
- package/esm/DSModal.js +5 -0
- package/esm/v1/DSModal.js +44 -38
- package/esm/v1/DSModalWrapper.js +23 -17
- package/esm/v1/ModalFeedBack/ModalFeedBack.js +19 -20
- package/esm/v2/DSModal.js +40 -33
- package/esm/v2/blocks.js +72 -48
- package/esm/v2/components/DecisionHeader.js +21 -18
- package/esm/v2/components/FeedbackIcon.js +11 -12
- package/esm/v2/components/Footer.js +43 -35
- package/esm/v2/components/FormHeader.js +30 -27
- package/esm/v2/components/ModalContent.js +84 -76
- package/esm/v2/components/SelectionHeader.js +27 -19
- package/esm/v2/components/Title.js +11 -8
- package/esm/v2/helpers.js +21 -16
- package/package.json +13 -4
- package/types/v1/DSModal.d.ts +1 -1
- package/types/v2/DSModal.d.ts +197 -28
- package/types/v2/components/SelectionHeader.d.ts +1 -1
package/esm/v1/DSModal.js
CHANGED
|
@@ -1,54 +1,60 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import 'react';
|
|
4
9
|
import ReactModal from 'react-modal';
|
|
5
10
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import DSButton from '@elliemae/ds-
|
|
11
|
+
import { DSIconSizes } from '@elliemae/ds-icon';
|
|
12
|
+
import { Close } from '@elliemae/ds-icons';
|
|
13
|
+
import DSButton from '@elliemae/ds-button';
|
|
9
14
|
import { MODAL_TYPE } from '../constants.js';
|
|
10
15
|
import ModalFeedBack from './ModalFeedBack/ModalFeedBack.js';
|
|
11
16
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
17
|
|
|
13
|
-
var
|
|
18
|
+
var _Close;
|
|
14
19
|
|
|
15
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
16
21
|
|
|
17
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
18
23
|
|
|
19
|
-
const DSModal =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
24
|
+
const DSModal = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
containerProps = {},
|
|
27
|
+
className = '',
|
|
28
|
+
dataTestId = 'ds-modal',
|
|
29
|
+
additionalFooterCssClass = '',
|
|
30
|
+
style = {},
|
|
31
|
+
iconCloseSize = DSIconSizes.S,
|
|
32
|
+
modalType = MODAL_TYPE.DEFAULT,
|
|
33
|
+
showHeader = true,
|
|
34
|
+
showFooter = true,
|
|
35
|
+
children,
|
|
36
|
+
centered = true,
|
|
37
|
+
confirmLabel = 'Accept',
|
|
38
|
+
modalTitle = '',
|
|
39
|
+
size = 'medium',
|
|
40
|
+
isOpen = false,
|
|
41
|
+
onClose = () => null,
|
|
42
|
+
onAfterOpen = () => null,
|
|
43
|
+
onConfirm = () => null,
|
|
44
|
+
onReject = () => null,
|
|
45
|
+
rejectLabel = 'Cancel',
|
|
46
|
+
shouldCloseOnOverlayClick = false,
|
|
47
|
+
hasError = false,
|
|
48
|
+
hasWarning = false,
|
|
49
|
+
hasSuccess = false,
|
|
50
|
+
hasInfo = false,
|
|
51
|
+
hasHelp = false,
|
|
52
|
+
actionsRef = () => null,
|
|
53
|
+
appElement = '#root',
|
|
54
|
+
overridePropsConfirmButton = {},
|
|
55
|
+
overridePropsRejectButton = {},
|
|
56
|
+
zIndex = 10
|
|
57
|
+
} = _ref;
|
|
52
58
|
// http://reactcommunity.org/react-modal/accessibility/ https://github.com/reactjs/react-modal#examples
|
|
53
59
|
typeof document !== 'undefined' && document && ReactModal.setAppElement && ReactModal.setAppElement(appElement); // eslint-disable-line
|
|
54
60
|
|
|
@@ -98,7 +104,7 @@ const DSModal = ({
|
|
|
98
104
|
className: classNameElement('icon', 'modal-header')
|
|
99
105
|
}, void 0, /*#__PURE__*/_jsx(DSButton, {
|
|
100
106
|
buttonType: "link",
|
|
101
|
-
icon:
|
|
107
|
+
icon: _Close || (_Close = /*#__PURE__*/_jsx(Close, {})),
|
|
102
108
|
onClick: onClose,
|
|
103
109
|
size: iconCloseSize
|
|
104
110
|
}))), /*#__PURE__*/_jsx("div", {
|
package/esm/v1/DSModalWrapper.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
8
|
import { Component, createElement } from 'react';
|
|
@@ -8,30 +13,31 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
8
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9
14
|
var DSModalWrapper = (WrappedComponent => {
|
|
10
15
|
class DSModalWrapper extends Component {
|
|
11
|
-
constructor(
|
|
12
|
-
super(...
|
|
13
|
-
|
|
14
|
-
_defineProperty(this, "state", {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.state = {
|
|
15
19
|
childready: false,
|
|
16
20
|
additionalFooterCssClass: 'loading',
|
|
17
21
|
container: null,
|
|
18
22
|
actions: null,
|
|
19
23
|
height: '100%'
|
|
20
|
-
}
|
|
24
|
+
};
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
this.onHeaderHeight = e => {
|
|
23
27
|
this.heightHeaderFlag = true;
|
|
24
28
|
this.heightHeader = e.height || 0;
|
|
25
|
-
}
|
|
29
|
+
};
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
this.onFooterHeight = e => {
|
|
28
32
|
this.heightFooterFlag = true;
|
|
29
33
|
this.heightFooter = e.height || 0;
|
|
30
|
-
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
this.onResize = _ref => {
|
|
37
|
+
let {
|
|
38
|
+
bounds
|
|
39
|
+
} = _ref;
|
|
31
40
|
|
|
32
|
-
_defineProperty(this, "onResize", ({
|
|
33
|
-
bounds
|
|
34
|
-
}) => {
|
|
35
41
|
if (this.heightFooterFlag && this.heightHeaderFlag) {
|
|
36
42
|
return this.setState({
|
|
37
43
|
height: bounds.height - this.heightFooter - this.heightHeader
|
|
@@ -41,21 +47,21 @@ var DSModalWrapper = (WrappedComponent => {
|
|
|
41
47
|
return setTimeout(this.onResize({
|
|
42
48
|
bounds
|
|
43
49
|
}), 0);
|
|
44
|
-
}
|
|
50
|
+
};
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
this.handleContainer = node => {
|
|
47
53
|
if (node) this.setState({
|
|
48
54
|
container: node
|
|
49
55
|
});
|
|
50
56
|
this.handleResize();
|
|
51
|
-
}
|
|
57
|
+
};
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
this.handleActions = node => {
|
|
54
60
|
if (node) this.setState({
|
|
55
61
|
actions: node
|
|
56
62
|
});
|
|
57
63
|
this.handleResize();
|
|
58
|
-
}
|
|
64
|
+
};
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
componentDidMount() {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
-
import WarningCircle from '@elliemae/ds-icons
|
|
4
|
-
import CheckmarkCircle from '@elliemae/ds-icons/CheckmarkCircle';
|
|
5
|
-
import HelpCircle from '@elliemae/ds-icons/HelpCircle';
|
|
6
|
-
import InfoCircle from '@elliemae/ds-icons/InfoCircle';
|
|
3
|
+
import { InfoCircle, HelpCircle, CheckmarkCircle, WarningCircle } from '@elliemae/ds-icons';
|
|
7
4
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
8
5
|
import { MODAL_TYPE } from '../../constants.js';
|
|
9
6
|
|
|
@@ -17,13 +14,14 @@ const {
|
|
|
17
14
|
INFO
|
|
18
15
|
} = MODAL_TYPE;
|
|
19
16
|
|
|
20
|
-
const getModalType = (modalType, {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
const getModalType = (modalType, _ref) => {
|
|
18
|
+
let {
|
|
19
|
+
hasError,
|
|
20
|
+
hasWarning,
|
|
21
|
+
hasSuccess,
|
|
22
|
+
hasInfo,
|
|
23
|
+
hasHelp
|
|
24
|
+
} = _ref;
|
|
27
25
|
if ([WARNING, ERROR, SUCCESS, HELP, INFO].indexOf(modalType) > -1) return modalType;
|
|
28
26
|
if (hasError) return ERROR;
|
|
29
27
|
if (hasWarning) return WARNING;
|
|
@@ -63,15 +61,16 @@ const getIconType = modalType => {
|
|
|
63
61
|
}
|
|
64
62
|
};
|
|
65
63
|
|
|
66
|
-
const ModalFeedBack =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
const ModalFeedBack = _ref2 => {
|
|
65
|
+
let {
|
|
66
|
+
className = '',
|
|
67
|
+
modalType = null,
|
|
68
|
+
hasError = false,
|
|
69
|
+
hasWarning = false,
|
|
70
|
+
hasSuccess = false,
|
|
71
|
+
hasInfo = false,
|
|
72
|
+
hasHelp = false
|
|
73
|
+
} = _ref2;
|
|
75
74
|
const type = getModalType(modalType, {
|
|
76
75
|
hasError,
|
|
77
76
|
hasWarning,
|
package/esm/v2/DSModal.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import 'react';
|
|
@@ -12,39 +17,41 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
12
17
|
|
|
13
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
14
19
|
|
|
15
|
-
const DSModal =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
const DSModal = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
containerProps = {},
|
|
23
|
+
className = '',
|
|
24
|
+
style = {},
|
|
25
|
+
size = 'default',
|
|
26
|
+
//
|
|
27
|
+
modalType = MODAL_TYPE_V2.INFORMATION,
|
|
28
|
+
modalSubType = null,
|
|
29
|
+
modalTitle = '',
|
|
30
|
+
dataTestId = 'ds-modal',
|
|
31
|
+
centered = false,
|
|
32
|
+
showRejectButton = false,
|
|
33
|
+
showClose = true,
|
|
34
|
+
searchProps = {},
|
|
35
|
+
// override
|
|
36
|
+
actionsRef = () => null,
|
|
37
|
+
additionalFooterCssClass,
|
|
38
|
+
overridePropsConfirmButton = {},
|
|
39
|
+
overridePropsRejectButton = {},
|
|
40
|
+
// react modal
|
|
41
|
+
children,
|
|
42
|
+
isOpen = true,
|
|
43
|
+
onClose = () => null,
|
|
44
|
+
onAfterOpen = () => null,
|
|
45
|
+
onConfirm = () => null,
|
|
46
|
+
onReject = () => null,
|
|
47
|
+
rejectLabel = 'Discard',
|
|
48
|
+
confirmLabel = 'Save',
|
|
49
|
+
shouldCloseOnOverlayClick = false,
|
|
50
|
+
appElement = '#root',
|
|
51
|
+
zIndex = 10,
|
|
52
|
+
removePadding = false
|
|
53
|
+
} = _ref;
|
|
54
|
+
|
|
48
55
|
if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && document && ReactModal.setAppElement) {
|
|
49
56
|
ReactModal.setAppElement(appElement);
|
|
50
57
|
}
|
package/esm/v2/blocks.js
CHANGED
|
@@ -1,53 +1,77 @@
|
|
|
1
1
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
2
2
|
|
|
3
3
|
const blockName = 'modal-v2';
|
|
4
|
-
const ModalHeader = aggregatedClasses('div')(blockName, 'modal-header',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
4
|
+
const ModalHeader = aggregatedClasses('div')(blockName, 'modal-header', _ref => {
|
|
5
|
+
let {
|
|
6
|
+
type,
|
|
7
|
+
showClose
|
|
8
|
+
} = _ref;
|
|
9
|
+
return {
|
|
10
|
+
[type]: type,
|
|
11
|
+
'with-close': showClose
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
const ModalHeaderTopRight = aggregatedClasses('div')(blockName, 'modal-header-close', _ref2 => {
|
|
15
|
+
let {
|
|
16
|
+
type
|
|
17
|
+
} = _ref2;
|
|
18
|
+
return {
|
|
19
|
+
[type]: type
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
const ModalFeedback = aggregatedClasses('div')(blockName, 'modal-feedback', _ref3 => {
|
|
23
|
+
let {
|
|
24
|
+
type
|
|
25
|
+
} = _ref3;
|
|
26
|
+
return {
|
|
27
|
+
[type]: type
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
const ModalTitle = aggregatedClasses('h3')(blockName, 'modal-title', _ref4 => {
|
|
31
|
+
let {
|
|
32
|
+
type
|
|
33
|
+
} = _ref4;
|
|
34
|
+
return {
|
|
35
|
+
[type]: type
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
const ModalContent = aggregatedClasses('div')(blockName, 'modal-content', _ref5 => {
|
|
39
|
+
let {
|
|
40
|
+
type,
|
|
41
|
+
removePadding
|
|
42
|
+
} = _ref5;
|
|
43
|
+
return {
|
|
44
|
+
[type]: type,
|
|
45
|
+
'remove-padding': removePadding
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
const ModalWrapper = aggregatedClasses('div')(blockName, 'modal-wrapper', _ref6 => {
|
|
49
|
+
let {
|
|
50
|
+
type,
|
|
51
|
+
removePadding
|
|
52
|
+
} = _ref6;
|
|
53
|
+
return {
|
|
54
|
+
[type]: type,
|
|
55
|
+
'remove-padding': removePadding
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
const ModalFooter = aggregatedClasses('div')(blockName, 'modal-footer', _ref7 => {
|
|
59
|
+
let {
|
|
60
|
+
type,
|
|
61
|
+
additionalFooterCssClass
|
|
62
|
+
} = _ref7;
|
|
63
|
+
return {
|
|
64
|
+
[type]: type,
|
|
65
|
+
[additionalFooterCssClass]: additionalFooterCssClass
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
const ModalFooterActions = aggregatedClasses('div')(blockName, 'modal-footer-actions', _ref8 => {
|
|
69
|
+
let {
|
|
70
|
+
type
|
|
71
|
+
} = _ref8;
|
|
72
|
+
return {
|
|
73
|
+
[type]: type
|
|
74
|
+
};
|
|
75
|
+
});
|
|
52
76
|
|
|
53
77
|
export { ModalContent, ModalFeedback, ModalFooter, ModalFooterActions, ModalHeader, ModalHeaderTopRight, ModalTitle, ModalWrapper };
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
-
import
|
|
4
|
-
import DSButton from '@elliemae/ds-
|
|
3
|
+
import { Close } from '@elliemae/ds-icons';
|
|
4
|
+
import DSButton from '@elliemae/ds-button';
|
|
5
5
|
import { ModalHeader } from '../blocks.js';
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
const DecisionHeader =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}) => /*#__PURE__*/_jsx(ModalHeader, {
|
|
12
|
-
classProps: {
|
|
13
|
-
type: 'decision',
|
|
7
|
+
var _Close;
|
|
8
|
+
const DecisionHeader = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
onClose,
|
|
14
11
|
showClose
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
} = _ref;
|
|
13
|
+
return /*#__PURE__*/_jsx(ModalHeader, {
|
|
14
|
+
classProps: {
|
|
15
|
+
type: 'decision',
|
|
16
|
+
showClose
|
|
17
|
+
}
|
|
18
|
+
}, void 0, showClose && /*#__PURE__*/_jsx(DSButton, {
|
|
19
|
+
buttonType: "link",
|
|
20
|
+
containerProps: {
|
|
21
|
+
'data-testid': 'modal-button-close'
|
|
22
|
+
},
|
|
23
|
+
icon: _Close || (_Close = /*#__PURE__*/_jsx(Close, {})),
|
|
24
|
+
onClick: onClose
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
24
27
|
|
|
25
28
|
export { DecisionHeader, DecisionHeader as default };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
-
import ErrorHexegon from '@elliemae/ds-icons
|
|
4
|
-
import WarningTriangle from '@elliemae/ds-icons/WarningTriangle';
|
|
5
|
-
import CheckmarkCircle from '@elliemae/ds-icons/CheckmarkCircle';
|
|
6
|
-
import HelpCircle from '@elliemae/ds-icons/HelpCircle';
|
|
7
|
-
import InfoCircle from '@elliemae/ds-icons/InfoCircle';
|
|
3
|
+
import { HelpCircle, InfoCircle, CheckmarkCircle, ErrorHexegon, WarningTriangle } from '@elliemae/ds-icons';
|
|
8
4
|
import { MODAL_SUB_TYPE_V2 } from '../../constants.js';
|
|
9
5
|
import { ModalFeedback } from '../blocks.js';
|
|
10
6
|
|
|
@@ -45,12 +41,15 @@ const getIconType = subtype => {
|
|
|
45
41
|
}
|
|
46
42
|
};
|
|
47
43
|
|
|
48
|
-
const FeedbackIcon =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
const FeedbackIcon = _ref => {
|
|
45
|
+
let {
|
|
46
|
+
modalSubType
|
|
47
|
+
} = _ref;
|
|
48
|
+
return /*#__PURE__*/_jsx(ModalFeedback, {
|
|
49
|
+
classProps: {
|
|
50
|
+
type: modalSubType
|
|
51
|
+
}
|
|
52
|
+
}, void 0, getIconType(modalSubType));
|
|
53
|
+
};
|
|
55
54
|
|
|
56
55
|
export { FeedbackIcon, FeedbackIcon as default };
|
|
@@ -1,47 +1,55 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import 'react';
|
|
4
|
-
import DSButton from '@elliemae/ds-
|
|
9
|
+
import DSButton from '@elliemae/ds-button';
|
|
5
10
|
import { ModalFooter, ModalFooterActions } from '../blocks.js';
|
|
6
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
12
|
|
|
8
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
9
14
|
|
|
10
15
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
11
|
-
const Footer =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, void 0, /*#__PURE__*/jsxs(ModalFooterActions, {
|
|
27
|
-
ref: actionsRef,
|
|
28
|
-
children: [showRejectButton === true && /*#__PURE__*/jsx(DSButton, _objectSpread({
|
|
29
|
-
buttonType: "secondary",
|
|
30
|
-
className: "action-reject",
|
|
31
|
-
containerProps: {
|
|
32
|
-
'data-testid': 'modal-footer-reject-btn'
|
|
16
|
+
const Footer = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
additionalFooterCssClass,
|
|
19
|
+
actionsRef,
|
|
20
|
+
rejectLabel,
|
|
21
|
+
onReject,
|
|
22
|
+
overridePropsRejectButton,
|
|
23
|
+
confirmLabel,
|
|
24
|
+
onConfirm,
|
|
25
|
+
overridePropsConfirmButton,
|
|
26
|
+
showRejectButton
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/_jsx(ModalFooter, {
|
|
29
|
+
classProps: {
|
|
30
|
+
additionalFooterCssClass
|
|
33
31
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}))
|
|
32
|
+
"data-testid": "modal-footer-wrapper"
|
|
33
|
+
}, void 0, /*#__PURE__*/jsxs(ModalFooterActions, {
|
|
34
|
+
ref: actionsRef,
|
|
35
|
+
children: [showRejectButton === true && /*#__PURE__*/jsx(DSButton, _objectSpread({
|
|
36
|
+
buttonType: "secondary",
|
|
37
|
+
className: "action-reject",
|
|
38
|
+
containerProps: {
|
|
39
|
+
'data-testid': 'modal-footer-reject-btn'
|
|
40
|
+
},
|
|
41
|
+
labelText: rejectLabel,
|
|
42
|
+
onClick: onReject
|
|
43
|
+
}, overridePropsRejectButton)), /*#__PURE__*/jsx(DSButton, _objectSpread({
|
|
44
|
+
buttonType: "primary",
|
|
45
|
+
className: "action-confirm",
|
|
46
|
+
containerProps: {
|
|
47
|
+
'data-testid': 'modal-footer-confirm-btn'
|
|
48
|
+
},
|
|
49
|
+
labelText: confirmLabel,
|
|
50
|
+
onClick: onConfirm
|
|
51
|
+
}, overridePropsConfirmButton))]
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
46
54
|
|
|
47
55
|
export { Footer, Footer as default };
|