@elliemae/ds-modal 1.57.1-rc.0 → 2.0.0-alpha.11
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 +54 -68
- package/cjs/constants.js +5 -6
- package/cjs/index.js +6 -29
- package/cjs/v1/DSModal.js +137 -13
- package/cjs/v1/DSModalType.js +1 -2
- package/cjs/v1/DSModalWrapper.js +110 -146
- package/cjs/v1/ModalFeedBack/ModalFeedBack.js +60 -56
- package/cjs/v2/DSModal.js +56 -102
- package/cjs/v2/blocks.js +49 -51
- package/cjs/v2/components/DecisionHeader.js +25 -27
- package/cjs/v2/components/FeedbackIcon.js +35 -28
- package/cjs/v2/components/Footer.js +33 -31
- package/cjs/v2/components/FormHeader.js +34 -36
- package/cjs/v2/components/ModalContent.js +68 -89
- package/cjs/v2/components/SelectionHeader.js +32 -30
- package/cjs/v2/components/Title.js +13 -17
- package/cjs/v2/helpers.js +17 -13
- package/esm/DSModal.js +18 -32
- package/esm/constants.js +4 -5
- package/esm/index.js +0 -23
- package/esm/v1/DSModal.js +132 -12
- package/esm/v1/DSModalType.js +1 -2
- package/esm/v1/DSModalWrapper.js +109 -139
- package/esm/v1/ModalFeedBack/ModalFeedBack.js +55 -55
- package/esm/v2/DSModal.js +48 -94
- package/esm/v2/blocks.js +49 -47
- package/esm/v2/components/DecisionHeader.js +21 -24
- package/esm/v2/components/FeedbackIcon.js +27 -25
- package/esm/v2/components/Footer.js +29 -27
- package/esm/v2/components/FormHeader.js +29 -32
- package/esm/v2/components/ModalContent.js +54 -76
- package/esm/v2/components/SelectionHeader.js +26 -26
- package/esm/v2/components/Title.js +10 -14
- package/esm/v2/helpers.js +17 -13
- package/package.json +92 -14
- package/types/DSModal.d.ts +14 -0
- package/types/constants.d.ts +25 -0
- package/types/index.d.ts +4 -0
- package/types/v1/DSModal.d.ts +143 -0
- package/types/v1/DSModalType.d.ts +1 -0
- package/types/v1/ModalFeedBack/ModalFeedBack.d.ts +11 -0
- package/types/v2/DSModal.d.ts +91 -0
- package/types/v2/blocks.d.ts +9 -0
- package/types/v2/components/DecisionHeader.d.ts +6 -0
- package/types/v2/components/FeedbackIcon.d.ts +5 -0
- package/types/v2/components/Footer.d.ts +13 -0
- package/types/v2/components/FormHeader.d.ts +8 -0
- package/types/v2/components/ModalContent.d.ts +21 -0
- package/types/v2/components/SelectionHeader.d.ts +8 -0
- package/types/v2/components/Title.d.ts +6 -0
- package/types/v2/components/tests/DecisionHeader.test.d.ts +1 -0
- package/types/v2/components/tests/FeedbackIcon.test.d.ts +1 -0
- package/types/v2/components/tests/Footer.test.d.ts +1 -0
- package/types/v2/components/tests/FormHeader.test.d.ts +1 -0
- package/types/v2/components/tests/SelectionHeader.test.d.ts +1 -0
- package/types/v2/helpers.d.ts +16 -0
- package/types/v2/tests/DSModal.test.d.ts +1 -0
- package/DSModal/package.json +0 -10
- package/cjs/DSModal-3126a986.js +0 -316
- package/cjs/DSModal-3126a986.js.map +0 -1
- package/cjs/DSModal.js.map +0 -1
- package/cjs/constants.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/v1/DSModal.js.map +0 -1
- package/cjs/v1/DSModalType.js.map +0 -1
- package/cjs/v1/DSModalWrapper.js.map +0 -1
- package/cjs/v1/ModalFeedBack/ModalFeedBack.js.map +0 -1
- package/cjs/v2/DSModal.js.map +0 -1
- package/cjs/v2/blocks.js.map +0 -1
- package/cjs/v2/components/DecisionHeader.js.map +0 -1
- package/cjs/v2/components/FeedbackIcon.js.map +0 -1
- package/cjs/v2/components/Footer.js.map +0 -1
- package/cjs/v2/components/FormHeader.js.map +0 -1
- package/cjs/v2/components/ModalContent.js.map +0 -1
- package/cjs/v2/components/SelectionHeader.js.map +0 -1
- package/cjs/v2/components/Title.js.map +0 -1
- package/cjs/v2/helpers.js.map +0 -1
- package/constants/package.json +0 -10
- package/esm/DSModal-a8b0fbf0.js +0 -303
- package/esm/DSModal-a8b0fbf0.js.map +0 -1
- package/esm/DSModal.js.map +0 -1
- package/esm/constants.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/v1/DSModal.js.map +0 -1
- package/esm/v1/DSModalType.js.map +0 -1
- package/esm/v1/DSModalWrapper.js.map +0 -1
- package/esm/v1/ModalFeedBack/ModalFeedBack.js.map +0 -1
- package/esm/v2/DSModal.js.map +0 -1
- package/esm/v2/blocks.js.map +0 -1
- package/esm/v2/components/DecisionHeader.js.map +0 -1
- package/esm/v2/components/FeedbackIcon.js.map +0 -1
- package/esm/v2/components/Footer.js.map +0 -1
- package/esm/v2/components/FormHeader.js.map +0 -1
- package/esm/v2/components/ModalContent.js.map +0 -1
- package/esm/v2/components/SelectionHeader.js.map +0 -1
- package/esm/v2/components/Title.js.map +0 -1
- package/esm/v2/helpers.js.map +0 -1
- package/v1/DSModal/package.json +0 -10
- package/v1/DSModalType/package.json +0 -10
- package/v1/DSModalWrapper/package.json +0 -10
- package/v1/ModalFeedBack/ModalFeedBack/package.json +0 -10
- package/v2/DSModal/package.json +0 -10
- package/v2/blocks/package.json +0 -10
- package/v2/components/DecisionHeader/package.json +0 -10
- package/v2/components/FeedbackIcon/package.json +0 -10
- package/v2/components/Footer/package.json +0 -10
- package/v2/components/FormHeader/package.json +0 -10
- package/v2/components/ModalContent/package.json +0 -10
- package/v2/components/SelectionHeader/package.json +0 -10
- package/v2/components/Title/package.json +0 -10
- package/v2/helpers/package.json +0 -10
package/esm/v2/DSModal.js
CHANGED
|
@@ -1,106 +1,62 @@
|
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
1
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import
|
|
3
|
+
import 'react';
|
|
3
4
|
import { PropTypes, describe } from 'react-desc';
|
|
4
5
|
import ReactModal from 'react-modal';
|
|
5
6
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
6
7
|
import { MODAL_TYPE_V2 } from '../constants.js';
|
|
7
8
|
import { DSModalContent } from './components/ModalContent.js';
|
|
8
9
|
export { DSModalContent } from './components/ModalContent.js';
|
|
9
|
-
import './components/SelectionHeader.js';
|
|
10
|
-
import '@elliemae/ds-form';
|
|
11
|
-
import './blocks.js';
|
|
12
|
-
import './components/Title.js';
|
|
13
|
-
import './components/DecisionHeader.js';
|
|
14
|
-
import '@elliemae/ds-icons';
|
|
15
|
-
import '@elliemae/ds-button';
|
|
16
|
-
import './components/FormHeader.js';
|
|
17
|
-
import './components/FeedbackIcon.js';
|
|
18
|
-
import './components/Footer.js';
|
|
19
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
20
|
-
import './helpers.js';
|
|
21
10
|
|
|
22
11
|
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; }
|
|
23
12
|
|
|
24
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; }
|
|
25
14
|
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
overridePropsRejectButton = _ref$overridePropsRej === void 0 ? {} : _ref$overridePropsRej,
|
|
60
|
-
children = _ref.children,
|
|
61
|
-
_ref$isOpen = _ref.isOpen,
|
|
62
|
-
isOpen = _ref$isOpen === void 0 ? true : _ref$isOpen,
|
|
63
|
-
_ref$onClose = _ref.onClose,
|
|
64
|
-
onClose = _ref$onClose === void 0 ? function () {
|
|
65
|
-
return null;
|
|
66
|
-
} : _ref$onClose,
|
|
67
|
-
_ref$onAfterOpen = _ref.onAfterOpen,
|
|
68
|
-
onAfterOpen = _ref$onAfterOpen === void 0 ? function () {
|
|
69
|
-
return null;
|
|
70
|
-
} : _ref$onAfterOpen,
|
|
71
|
-
_ref$onConfirm = _ref.onConfirm,
|
|
72
|
-
onConfirm = _ref$onConfirm === void 0 ? function () {
|
|
73
|
-
return null;
|
|
74
|
-
} : _ref$onConfirm,
|
|
75
|
-
_ref$onReject = _ref.onReject,
|
|
76
|
-
onReject = _ref$onReject === void 0 ? function () {
|
|
77
|
-
return null;
|
|
78
|
-
} : _ref$onReject,
|
|
79
|
-
_ref$rejectLabel = _ref.rejectLabel,
|
|
80
|
-
rejectLabel = _ref$rejectLabel === void 0 ? 'Discard' : _ref$rejectLabel,
|
|
81
|
-
_ref$confirmLabel = _ref.confirmLabel,
|
|
82
|
-
confirmLabel = _ref$confirmLabel === void 0 ? 'Save' : _ref$confirmLabel,
|
|
83
|
-
_ref$shouldCloseOnOve = _ref.shouldCloseOnOverlayClick,
|
|
84
|
-
shouldCloseOnOverlayClick = _ref$shouldCloseOnOve === void 0 ? false : _ref$shouldCloseOnOve,
|
|
85
|
-
_ref$appElement = _ref.appElement,
|
|
86
|
-
appElement = _ref$appElement === void 0 ? '#root' : _ref$appElement,
|
|
87
|
-
_ref$zIndex = _ref.zIndex,
|
|
88
|
-
zIndex = _ref$zIndex === void 0 ? 10 : _ref$zIndex,
|
|
89
|
-
_ref$removePadding = _ref.removePadding,
|
|
90
|
-
removePadding = _ref$removePadding === void 0 ? false : _ref$removePadding;
|
|
91
|
-
|
|
15
|
+
const DSModal = ({
|
|
16
|
+
containerProps = {},
|
|
17
|
+
className = '',
|
|
18
|
+
style = {},
|
|
19
|
+
size = 'default',
|
|
20
|
+
//
|
|
21
|
+
modalType = MODAL_TYPE_V2.INFORMATION,
|
|
22
|
+
modalSubType = null,
|
|
23
|
+
modalTitle = '',
|
|
24
|
+
dataTestId = 'ds-modal',
|
|
25
|
+
centered = false,
|
|
26
|
+
showRejectButton = false,
|
|
27
|
+
showClose = true,
|
|
28
|
+
searchProps = {},
|
|
29
|
+
// override
|
|
30
|
+
actionsRef = () => null,
|
|
31
|
+
additionalFooterCssClass,
|
|
32
|
+
overridePropsConfirmButton = {},
|
|
33
|
+
overridePropsRejectButton = {},
|
|
34
|
+
// react modal
|
|
35
|
+
children,
|
|
36
|
+
isOpen = true,
|
|
37
|
+
onClose = () => null,
|
|
38
|
+
onAfterOpen = () => null,
|
|
39
|
+
onConfirm = () => null,
|
|
40
|
+
onReject = () => null,
|
|
41
|
+
rejectLabel = 'Discard',
|
|
42
|
+
confirmLabel = 'Save',
|
|
43
|
+
shouldCloseOnOverlayClick = false,
|
|
44
|
+
appElement = '#root',
|
|
45
|
+
zIndex = 10,
|
|
46
|
+
removePadding = false
|
|
47
|
+
}) => {
|
|
92
48
|
if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && document && ReactModal.setAppElement) {
|
|
93
49
|
ReactModal.setAppElement(appElement);
|
|
94
50
|
}
|
|
95
51
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return /*#__PURE__*/
|
|
52
|
+
const {
|
|
53
|
+
cssClassName,
|
|
54
|
+
classNameBlock,
|
|
55
|
+
classNameModifier
|
|
56
|
+
} = convertPropToCssClassName('modal-v2', className, {
|
|
57
|
+
size
|
|
58
|
+
});
|
|
59
|
+
return /*#__PURE__*/_jsx(ReactModal, {
|
|
104
60
|
testId: dataTestId,
|
|
105
61
|
className: "".concat(cssClassName, " ").concat(classNameBlock("type-".concat(modalType))),
|
|
106
62
|
contentLabel: modalTitle,
|
|
@@ -113,10 +69,10 @@ var DSModal = function DSModal(_ref) {
|
|
|
113
69
|
content: _objectSpread({}, style),
|
|
114
70
|
overlay: {
|
|
115
71
|
// position: 'absolute', https://jira.elliemae.io/browse/PUI-1471, the overlay should be positioned based on the browser window rather positioned absolute to its parent
|
|
116
|
-
zIndex
|
|
72
|
+
zIndex
|
|
117
73
|
}
|
|
118
74
|
}
|
|
119
|
-
}, /*#__PURE__*/
|
|
75
|
+
}, void 0, /*#__PURE__*/_jsx(DSModalContent, {
|
|
120
76
|
actionsRef: actionsRef,
|
|
121
77
|
additionalFooterCssClass: additionalFooterCssClass,
|
|
122
78
|
confirmLabel: confirmLabel,
|
|
@@ -134,10 +90,10 @@ var DSModal = function DSModal(_ref) {
|
|
|
134
90
|
showClose: showClose,
|
|
135
91
|
showRejectButton: showRejectButton,
|
|
136
92
|
removePadding: removePadding
|
|
137
|
-
}, children));
|
|
93
|
+
}, void 0, children));
|
|
138
94
|
};
|
|
139
95
|
|
|
140
|
-
|
|
96
|
+
const props = {
|
|
141
97
|
/** inject props to container wrapper */
|
|
142
98
|
containerProps: PropTypes.object.description('inject props to container wrapper'),
|
|
143
99
|
|
|
@@ -223,9 +179,7 @@ var props = {
|
|
|
223
179
|
/** remove modal builtin padding */
|
|
224
180
|
removePadding: PropTypes.bool.description('remove modal builtin padding')
|
|
225
181
|
};
|
|
226
|
-
|
|
227
|
-
var DSModalWithSchema = describe(DSModal);
|
|
182
|
+
const DSModalWithSchema = describe(DSModal);
|
|
228
183
|
DSModalWithSchema.propTypes = props;
|
|
229
184
|
|
|
230
185
|
export { DSModalWithSchema, DSModal as default };
|
|
231
|
-
//# sourceMappingURL=DSModal.js.map
|
package/esm/v2/blocks.js
CHANGED
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
1
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
3
2
|
|
|
4
|
-
|
|
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
|
-
|
|
3
|
+
const blockName = 'modal-v2';
|
|
4
|
+
const ModalHeader = aggregatedClasses('div')(blockName, 'modal-header', ({
|
|
5
|
+
type,
|
|
6
|
+
showClose
|
|
7
|
+
}) => ({
|
|
8
|
+
[type]: type,
|
|
9
|
+
'with-close': showClose
|
|
10
|
+
}));
|
|
11
|
+
const ModalHeaderTopRight = aggregatedClasses('div')(blockName, 'modal-header-close', ({
|
|
12
|
+
type
|
|
13
|
+
}) => ({
|
|
14
|
+
[type]: type
|
|
15
|
+
}));
|
|
16
|
+
const ModalFeedback = aggregatedClasses('div')(blockName, 'modal-feedback', ({
|
|
17
|
+
type
|
|
18
|
+
}) => ({
|
|
19
|
+
[type]: type
|
|
20
|
+
}));
|
|
21
|
+
const ModalTitle = aggregatedClasses('h3')(blockName, 'modal-title', ({
|
|
22
|
+
type
|
|
23
|
+
}) => ({
|
|
24
|
+
[type]: type
|
|
25
|
+
}));
|
|
26
|
+
const ModalContent = aggregatedClasses('div')(blockName, 'modal-content', ({
|
|
27
|
+
type,
|
|
28
|
+
removePadding
|
|
29
|
+
}) => ({
|
|
30
|
+
[type]: type,
|
|
31
|
+
'remove-padding': removePadding
|
|
32
|
+
}));
|
|
33
|
+
const ModalWrapper = aggregatedClasses('div')(blockName, 'modal-wrapper', ({
|
|
34
|
+
type,
|
|
35
|
+
removePadding
|
|
36
|
+
}) => ({
|
|
37
|
+
[type]: type,
|
|
38
|
+
'remove-padding': removePadding
|
|
39
|
+
}));
|
|
40
|
+
const ModalFooter = aggregatedClasses('div')(blockName, 'modal-footer', ({
|
|
41
|
+
type,
|
|
42
|
+
additionalFooterCssClass
|
|
43
|
+
}) => ({
|
|
44
|
+
[type]: type,
|
|
45
|
+
[additionalFooterCssClass]: additionalFooterCssClass
|
|
46
|
+
}));
|
|
47
|
+
const ModalFooterActions = aggregatedClasses('div')(blockName, 'modal-footer-actions', ({
|
|
48
|
+
type
|
|
49
|
+
}) => ({
|
|
50
|
+
[type]: type
|
|
51
|
+
}));
|
|
49
52
|
|
|
50
53
|
export { ModalContent, ModalFeedback, ModalFooter, ModalFooterActions, ModalHeader, ModalHeaderTopRight, ModalTitle, ModalWrapper };
|
|
51
|
-
//# sourceMappingURL=blocks.js.map
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import CloseIcon from '@elliemae/ds-icons/Close';
|
|
4
|
+
import DSButton from '@elliemae/ds-basic/Button';
|
|
4
5
|
import { ModalHeader } from '../blocks.js';
|
|
5
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
7
|
+
var _CloseIcon;
|
|
8
|
+
const DecisionHeader = ({
|
|
9
|
+
onClose,
|
|
10
|
+
showClose
|
|
11
|
+
}) => /*#__PURE__*/_jsx(ModalHeader, {
|
|
12
|
+
classProps: {
|
|
13
|
+
type: 'decision',
|
|
14
|
+
showClose
|
|
15
|
+
}
|
|
16
|
+
}, void 0, showClose && /*#__PURE__*/_jsx(DSButton, {
|
|
17
|
+
buttonType: "link",
|
|
18
|
+
containerProps: {
|
|
19
|
+
'data-testid': 'modal-button-close'
|
|
20
|
+
},
|
|
21
|
+
icon: _CloseIcon || (_CloseIcon = /*#__PURE__*/_jsx(CloseIcon, {})),
|
|
22
|
+
onClick: onClose
|
|
23
|
+
}));
|
|
26
24
|
|
|
27
25
|
export { DecisionHeader, DecisionHeader as default };
|
|
28
|
-
//# sourceMappingURL=DecisionHeader.js.map
|
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import ErrorHexegon from '@elliemae/ds-icons/ErrorHexegon';
|
|
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
8
|
import { MODAL_SUB_TYPE_V2 } from '../../constants.js';
|
|
4
9
|
import { ModalFeedback } from '../blocks.js';
|
|
5
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
7
10
|
|
|
8
|
-
var
|
|
11
|
+
var _WarningTriangle, _ErrorHexegon, _CheckmarkCircle, _InfoCircle, _HelpCircle;
|
|
12
|
+
const feedbackIconSize = 'xxl';
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
const getIconType = subtype => {
|
|
11
15
|
switch (subtype) {
|
|
12
16
|
case MODAL_SUB_TYPE_V2.WARNING:
|
|
13
|
-
return /*#__PURE__*/
|
|
17
|
+
return _WarningTriangle || (_WarningTriangle = /*#__PURE__*/_jsx(WarningTriangle, {
|
|
14
18
|
"data-testid": "icon-waring",
|
|
15
19
|
size: feedbackIconSize
|
|
16
|
-
});
|
|
20
|
+
}));
|
|
17
21
|
|
|
18
22
|
case MODAL_SUB_TYPE_V2.ERROR:
|
|
19
|
-
return /*#__PURE__*/
|
|
23
|
+
return _ErrorHexegon || (_ErrorHexegon = /*#__PURE__*/_jsx(ErrorHexegon, {
|
|
20
24
|
"data-testid": "icon-error",
|
|
21
25
|
size: feedbackIconSize
|
|
22
|
-
});
|
|
26
|
+
}));
|
|
23
27
|
|
|
24
28
|
case MODAL_SUB_TYPE_V2.SUCCESS:
|
|
25
|
-
return /*#__PURE__*/
|
|
29
|
+
return _CheckmarkCircle || (_CheckmarkCircle = /*#__PURE__*/_jsx(CheckmarkCircle, {
|
|
26
30
|
"data-testid": "icon-success",
|
|
27
31
|
size: feedbackIconSize
|
|
28
|
-
});
|
|
32
|
+
}));
|
|
29
33
|
|
|
30
34
|
case MODAL_SUB_TYPE_V2.INFORMATION:
|
|
31
|
-
return /*#__PURE__*/
|
|
35
|
+
return _InfoCircle || (_InfoCircle = /*#__PURE__*/_jsx(InfoCircle, {
|
|
32
36
|
"data-testid": "icon-information",
|
|
33
37
|
size: feedbackIconSize
|
|
34
|
-
});
|
|
38
|
+
}));
|
|
35
39
|
|
|
36
40
|
default:
|
|
37
|
-
return /*#__PURE__*/
|
|
41
|
+
return _HelpCircle || (_HelpCircle = /*#__PURE__*/_jsx(HelpCircle, {
|
|
38
42
|
"data-testid": "icon-help",
|
|
39
43
|
size: feedbackIconSize
|
|
40
|
-
});
|
|
44
|
+
}));
|
|
41
45
|
}
|
|
42
46
|
};
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
48
|
+
const FeedbackIcon = ({
|
|
49
|
+
modalSubType
|
|
50
|
+
}) => /*#__PURE__*/_jsx(ModalFeedback, {
|
|
51
|
+
classProps: {
|
|
52
|
+
type: modalSubType
|
|
53
|
+
}
|
|
54
|
+
}, void 0, getIconType(modalSubType));
|
|
52
55
|
|
|
53
56
|
export { FeedbackIcon, FeedbackIcon as default };
|
|
54
|
-
//# sourceMappingURL=FeedbackIcon.js.map
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
+
import 'react';
|
|
4
|
+
import DSButton from '@elliemae/ds-basic/Button';
|
|
4
5
|
import { ModalFooter, ModalFooterActions } from '../blocks.js';
|
|
5
|
-
import '
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
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
|
+
|
|
10
|
+
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
|
+
additionalFooterCssClass,
|
|
13
|
+
actionsRef,
|
|
14
|
+
rejectLabel,
|
|
15
|
+
onReject,
|
|
16
|
+
overridePropsRejectButton,
|
|
17
|
+
confirmLabel,
|
|
18
|
+
onConfirm,
|
|
19
|
+
overridePropsConfirmButton,
|
|
20
|
+
showRejectButton
|
|
21
|
+
}) => /*#__PURE__*/_jsx(ModalFooter, {
|
|
22
|
+
classProps: {
|
|
23
|
+
additionalFooterCssClass
|
|
24
|
+
},
|
|
25
|
+
"data-testid": "modal-footer-wrapper"
|
|
26
|
+
}, void 0, /*#__PURE__*/jsxs(ModalFooterActions, {
|
|
27
|
+
ref: actionsRef,
|
|
28
|
+
children: [showRejectButton === true && /*#__PURE__*/jsx(DSButton, _objectSpread({
|
|
26
29
|
buttonType: "secondary",
|
|
27
30
|
className: "action-reject",
|
|
28
31
|
containerProps: {
|
|
@@ -30,7 +33,7 @@ var Footer = function Footer(_ref) {
|
|
|
30
33
|
},
|
|
31
34
|
labelText: rejectLabel,
|
|
32
35
|
onClick: onReject
|
|
33
|
-
}, overridePropsRejectButton)), /*#__PURE__*/
|
|
36
|
+
}, overridePropsRejectButton)), /*#__PURE__*/jsx(DSButton, _objectSpread({
|
|
34
37
|
buttonType: "primary",
|
|
35
38
|
className: "action-confirm",
|
|
36
39
|
containerProps: {
|
|
@@ -38,8 +41,7 @@ var Footer = function Footer(_ref) {
|
|
|
38
41
|
},
|
|
39
42
|
labelText: confirmLabel,
|
|
40
43
|
onClick: onConfirm
|
|
41
|
-
}, overridePropsConfirmButton))
|
|
42
|
-
};
|
|
44
|
+
}, overridePropsConfirmButton))]
|
|
45
|
+
}));
|
|
43
46
|
|
|
44
47
|
export { Footer, Footer as default };
|
|
45
|
-
//# sourceMappingURL=Footer.js.map
|
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import CloseIcon from '@elliemae/ds-icons/Close';
|
|
4
|
+
import DSButton from '@elliemae/ds-basic/Button';
|
|
4
5
|
import { ModalHeader, ModalHeaderTopRight } from '../blocks.js';
|
|
5
6
|
import { Title } from './Title.js';
|
|
6
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import '@elliemae/ds-classnames';
|
|
8
7
|
|
|
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
|
-
};
|
|
8
|
+
var _CloseIcon;
|
|
9
|
+
const FormHeader = ({
|
|
10
|
+
showClose,
|
|
11
|
+
modalTitle,
|
|
12
|
+
modalType,
|
|
13
|
+
onClose
|
|
14
|
+
}) => /*#__PURE__*/_jsx(ModalHeader, {
|
|
15
|
+
classProps: {
|
|
16
|
+
type: 'selection'
|
|
17
|
+
}
|
|
18
|
+
}, void 0, /*#__PURE__*/_jsx(Title, {
|
|
19
|
+
modalTitle: modalTitle,
|
|
20
|
+
modalType: modalType
|
|
21
|
+
}), /*#__PURE__*/_jsx(ModalHeaderTopRight, {
|
|
22
|
+
classProps: {
|
|
23
|
+
type: 'form'
|
|
24
|
+
}
|
|
25
|
+
}, void 0, showClose && /*#__PURE__*/_jsx(DSButton, {
|
|
26
|
+
buttonType: "link",
|
|
27
|
+
containerProps: {
|
|
28
|
+
'data-testid': 'modal-close-btn'
|
|
29
|
+
},
|
|
30
|
+
icon: _CloseIcon || (_CloseIcon = /*#__PURE__*/_jsx(CloseIcon, {})),
|
|
31
|
+
onClick: onClose
|
|
32
|
+
})));
|
|
35
33
|
|
|
36
34
|
export { FormHeader, FormHeader as default };
|
|
37
|
-
//# sourceMappingURL=FormHeader.js.map
|