@elliemae/ds-modal 1.60.0 → 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 +59 -68
- package/cjs/constants.js +5 -6
- package/cjs/index.js +6 -29
- package/cjs/v1/DSModal.js +142 -13
- package/cjs/v1/DSModalType.js +1 -2
- package/cjs/v1/DSModalWrapper.js +116 -143
- package/cjs/v1/ModalFeedBack/ModalFeedBack.js +54 -55
- package/cjs/v2/DSModal.js +63 -102
- package/cjs/v2/blocks.js +65 -43
- package/cjs/v2/components/DecisionHeader.js +15 -15
- package/cjs/v2/components/FeedbackIcon.js +24 -23
- package/cjs/v2/components/Footer.js +50 -40
- package/cjs/v2/components/FormHeader.js +19 -19
- package/cjs/v2/components/ModalContent.js +99 -112
- package/cjs/v2/components/SelectionHeader.js +28 -19
- package/cjs/v2/components/Title.js +12 -13
- package/cjs/v2/helpers.js +17 -8
- package/esm/DSModal.js +23 -32
- package/esm/constants.js +4 -5
- package/esm/index.js +0 -23
- package/esm/v1/DSModal.js +138 -12
- package/esm/v1/DSModalType.js +1 -2
- package/esm/v1/DSModalWrapper.js +115 -137
- package/esm/v1/ModalFeedBack/ModalFeedBack.js +53 -54
- package/esm/v2/DSModal.js +54 -93
- package/esm/v2/blocks.js +65 -39
- package/esm/v2/components/DecisionHeader.js +12 -12
- package/esm/v2/components/FeedbackIcon.js +21 -20
- package/esm/v2/components/Footer.js +46 -36
- package/esm/v2/components/FormHeader.js +15 -15
- package/esm/v2/components/ModalContent.js +89 -103
- package/esm/v2/components/SelectionHeader.js +23 -15
- package/esm/v2/components/Title.js +9 -10
- package/esm/v2/helpers.js +17 -8
- package/package.json +101 -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 +260 -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,69 @@
|
|
|
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';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
1
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import
|
|
8
|
+
import 'react';
|
|
3
9
|
import { PropTypes, describe } from 'react-desc';
|
|
4
10
|
import ReactModal from 'react-modal';
|
|
5
11
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
6
12
|
import { MODAL_TYPE_V2 } from '../constants.js';
|
|
7
13
|
import { DSModalContent } from './components/ModalContent.js';
|
|
8
14
|
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
15
|
|
|
22
16
|
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
17
|
|
|
24
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; }
|
|
25
19
|
|
|
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
|
-
|
|
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;
|
|
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;
|
|
91
54
|
|
|
92
55
|
if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && document && ReactModal.setAppElement) {
|
|
93
56
|
ReactModal.setAppElement(appElement);
|
|
94
57
|
}
|
|
95
58
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return /*#__PURE__*/
|
|
59
|
+
const {
|
|
60
|
+
cssClassName,
|
|
61
|
+
classNameBlock,
|
|
62
|
+
classNameModifier
|
|
63
|
+
} = convertPropToCssClassName('modal-v2', className, {
|
|
64
|
+
size
|
|
65
|
+
});
|
|
66
|
+
return /*#__PURE__*/_jsx(ReactModal, {
|
|
104
67
|
testId: dataTestId,
|
|
105
68
|
className: "".concat(cssClassName, " ").concat(classNameBlock("type-".concat(modalType))),
|
|
106
69
|
contentLabel: modalTitle,
|
|
@@ -113,10 +76,10 @@ var DSModal = function DSModal(_ref) {
|
|
|
113
76
|
content: _objectSpread({}, style),
|
|
114
77
|
overlay: {
|
|
115
78
|
// 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
|
|
79
|
+
zIndex
|
|
117
80
|
}
|
|
118
81
|
}
|
|
119
|
-
}, /*#__PURE__*/
|
|
82
|
+
}, void 0, /*#__PURE__*/_jsx(DSModalContent, {
|
|
120
83
|
actionsRef: actionsRef,
|
|
121
84
|
additionalFooterCssClass: additionalFooterCssClass,
|
|
122
85
|
confirmLabel: confirmLabel,
|
|
@@ -134,10 +97,10 @@ var DSModal = function DSModal(_ref) {
|
|
|
134
97
|
showClose: showClose,
|
|
135
98
|
showRejectButton: showRejectButton,
|
|
136
99
|
removePadding: removePadding
|
|
137
|
-
}, children));
|
|
100
|
+
}, void 0, children));
|
|
138
101
|
};
|
|
139
102
|
|
|
140
|
-
|
|
103
|
+
const props = {
|
|
141
104
|
/** inject props to container wrapper */
|
|
142
105
|
containerProps: PropTypes.object.description('inject props to container wrapper'),
|
|
143
106
|
|
|
@@ -223,9 +186,7 @@ var props = {
|
|
|
223
186
|
/** remove modal builtin padding */
|
|
224
187
|
removePadding: PropTypes.bool.description('remove modal builtin padding')
|
|
225
188
|
};
|
|
226
|
-
|
|
227
|
-
var DSModalWithSchema = describe(DSModal);
|
|
189
|
+
const DSModalWithSchema = describe(DSModal);
|
|
228
190
|
DSModalWithSchema.propTypes = props;
|
|
229
191
|
|
|
230
192
|
export { DSModalWithSchema, DSModal as default };
|
|
231
|
-
//# sourceMappingURL=DSModal.js.map
|
package/esm/v2/blocks.js
CHANGED
|
@@ -1,51 +1,77 @@
|
|
|
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
|
-
return
|
|
3
|
+
const blockName = 'modal-v2';
|
|
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
|
+
};
|
|
11
13
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
const ModalHeaderTopRight = aggregatedClasses('div')(blockName, 'modal-header-close', _ref2 => {
|
|
15
|
+
let {
|
|
16
|
+
type
|
|
17
|
+
} = _ref2;
|
|
18
|
+
return {
|
|
19
|
+
[type]: type
|
|
20
|
+
};
|
|
15
21
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
const ModalFeedback = aggregatedClasses('div')(blockName, 'modal-feedback', _ref3 => {
|
|
23
|
+
let {
|
|
24
|
+
type
|
|
25
|
+
} = _ref3;
|
|
26
|
+
return {
|
|
27
|
+
[type]: type
|
|
28
|
+
};
|
|
19
29
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
30
|
+
const ModalTitle = aggregatedClasses('h3')(blockName, 'modal-title', _ref4 => {
|
|
31
|
+
let {
|
|
32
|
+
type
|
|
33
|
+
} = _ref4;
|
|
34
|
+
return {
|
|
35
|
+
[type]: type
|
|
36
|
+
};
|
|
23
37
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return
|
|
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
|
+
};
|
|
30
47
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return
|
|
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
|
+
};
|
|
37
57
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return
|
|
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
|
+
};
|
|
44
67
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
68
|
+
const ModalFooterActions = aggregatedClasses('div')(blockName, 'modal-footer-actions', _ref8 => {
|
|
69
|
+
let {
|
|
70
|
+
type
|
|
71
|
+
} = _ref8;
|
|
72
|
+
return {
|
|
73
|
+
[type]: type
|
|
74
|
+
};
|
|
48
75
|
});
|
|
49
76
|
|
|
50
77
|
export { ModalContent, ModalFeedback, ModalFooter, ModalFooterActions, ModalHeader, ModalHeaderTopRight, ModalTitle, ModalWrapper };
|
|
51
|
-
//# sourceMappingURL=blocks.js.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
2
3
|
import { Close } from '@elliemae/ds-icons';
|
|
3
4
|
import DSButton from '@elliemae/ds-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
|
-
|
|
7
|
+
var _Close;
|
|
8
|
+
const DecisionHeader = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
onClose,
|
|
11
|
+
showClose
|
|
12
|
+
} = _ref;
|
|
13
|
+
return /*#__PURE__*/_jsx(ModalHeader, {
|
|
13
14
|
classProps: {
|
|
14
15
|
type: 'decision',
|
|
15
|
-
showClose
|
|
16
|
+
showClose
|
|
16
17
|
}
|
|
17
|
-
}, showClose && /*#__PURE__*/
|
|
18
|
+
}, void 0, showClose && /*#__PURE__*/_jsx(DSButton, {
|
|
18
19
|
buttonType: "link",
|
|
19
20
|
containerProps: {
|
|
20
21
|
'data-testid': 'modal-button-close'
|
|
21
22
|
},
|
|
22
|
-
icon: /*#__PURE__*/
|
|
23
|
+
icon: _Close || (_Close = /*#__PURE__*/_jsx(Close, {})),
|
|
23
24
|
onClick: onClose
|
|
24
25
|
}));
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
export { DecisionHeader, DecisionHeader as default };
|
|
28
|
-
//# sourceMappingURL=DecisionHeader.js.map
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
2
3
|
import { HelpCircle, InfoCircle, CheckmarkCircle, ErrorHexegon, WarningTriangle } from '@elliemae/ds-icons';
|
|
3
4
|
import { MODAL_SUB_TYPE_V2 } from '../../constants.js';
|
|
4
5
|
import { ModalFeedback } from '../blocks.js';
|
|
5
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
7
6
|
|
|
8
|
-
var
|
|
7
|
+
var _WarningTriangle, _ErrorHexegon, _CheckmarkCircle, _InfoCircle, _HelpCircle;
|
|
8
|
+
const feedbackIconSize = 'xxl';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const getIconType = subtype => {
|
|
11
11
|
switch (subtype) {
|
|
12
12
|
case MODAL_SUB_TYPE_V2.WARNING:
|
|
13
|
-
return /*#__PURE__*/
|
|
13
|
+
return _WarningTriangle || (_WarningTriangle = /*#__PURE__*/_jsx(WarningTriangle, {
|
|
14
14
|
"data-testid": "icon-waring",
|
|
15
15
|
size: feedbackIconSize
|
|
16
|
-
});
|
|
16
|
+
}));
|
|
17
17
|
|
|
18
18
|
case MODAL_SUB_TYPE_V2.ERROR:
|
|
19
|
-
return /*#__PURE__*/
|
|
19
|
+
return _ErrorHexegon || (_ErrorHexegon = /*#__PURE__*/_jsx(ErrorHexegon, {
|
|
20
20
|
"data-testid": "icon-error",
|
|
21
21
|
size: feedbackIconSize
|
|
22
|
-
});
|
|
22
|
+
}));
|
|
23
23
|
|
|
24
24
|
case MODAL_SUB_TYPE_V2.SUCCESS:
|
|
25
|
-
return /*#__PURE__*/
|
|
25
|
+
return _CheckmarkCircle || (_CheckmarkCircle = /*#__PURE__*/_jsx(CheckmarkCircle, {
|
|
26
26
|
"data-testid": "icon-success",
|
|
27
27
|
size: feedbackIconSize
|
|
28
|
-
});
|
|
28
|
+
}));
|
|
29
29
|
|
|
30
30
|
case MODAL_SUB_TYPE_V2.INFORMATION:
|
|
31
|
-
return /*#__PURE__*/
|
|
31
|
+
return _InfoCircle || (_InfoCircle = /*#__PURE__*/_jsx(InfoCircle, {
|
|
32
32
|
"data-testid": "icon-information",
|
|
33
33
|
size: feedbackIconSize
|
|
34
|
-
});
|
|
34
|
+
}));
|
|
35
35
|
|
|
36
36
|
default:
|
|
37
|
-
return /*#__PURE__*/
|
|
37
|
+
return _HelpCircle || (_HelpCircle = /*#__PURE__*/_jsx(HelpCircle, {
|
|
38
38
|
"data-testid": "icon-help",
|
|
39
39
|
size: feedbackIconSize
|
|
40
|
-
});
|
|
40
|
+
}));
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const FeedbackIcon = _ref => {
|
|
45
|
+
let {
|
|
46
|
+
modalSubType
|
|
47
|
+
} = _ref;
|
|
48
|
+
return /*#__PURE__*/_jsx(ModalFeedback, {
|
|
47
49
|
classProps: {
|
|
48
50
|
type: modalSubType
|
|
49
51
|
}
|
|
50
|
-
}, getIconType(modalSubType));
|
|
52
|
+
}, void 0, getIconType(modalSubType));
|
|
51
53
|
};
|
|
52
54
|
|
|
53
55
|
export { FeedbackIcon, FeedbackIcon as default };
|
|
54
|
-
//# sourceMappingURL=FeedbackIcon.js.map
|
|
@@ -1,45 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import 'react';
|
|
3
9
|
import DSButton from '@elliemae/ds-button';
|
|
4
10
|
import { ModalFooter, ModalFooterActions } from '../blocks.js';
|
|
5
|
-
import '
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
11
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
12
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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; }
|
|
14
|
+
|
|
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; }
|
|
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, {
|
|
19
29
|
classProps: {
|
|
20
|
-
additionalFooterCssClass
|
|
30
|
+
additionalFooterCssClass
|
|
21
31
|
},
|
|
22
32
|
"data-testid": "modal-footer-wrapper"
|
|
23
|
-
}, /*#__PURE__*/
|
|
24
|
-
ref: actionsRef
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
+
}));
|
|
42
53
|
};
|
|
43
54
|
|
|
44
55
|
export { Footer, Footer as default };
|
|
45
|
-
//# sourceMappingURL=Footer.js.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
2
3
|
import { Close } from '@elliemae/ds-icons';
|
|
3
4
|
import DSButton from '@elliemae/ds-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
|
-
|
|
8
|
+
var _Close;
|
|
9
|
+
const FormHeader = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
showClose,
|
|
12
|
+
modalTitle,
|
|
13
|
+
modalType,
|
|
14
|
+
onClose
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/_jsx(ModalHeader, {
|
|
16
17
|
classProps: {
|
|
17
18
|
type: 'selection'
|
|
18
19
|
}
|
|
19
|
-
}, /*#__PURE__*/
|
|
20
|
+
}, void 0, /*#__PURE__*/_jsx(Title, {
|
|
20
21
|
modalTitle: modalTitle,
|
|
21
22
|
modalType: modalType
|
|
22
|
-
}), /*#__PURE__*/
|
|
23
|
+
}), /*#__PURE__*/_jsx(ModalHeaderTopRight, {
|
|
23
24
|
classProps: {
|
|
24
25
|
type: 'form'
|
|
25
26
|
}
|
|
26
|
-
}, showClose && /*#__PURE__*/
|
|
27
|
+
}, void 0, showClose && /*#__PURE__*/_jsx(DSButton, {
|
|
27
28
|
buttonType: "link",
|
|
28
29
|
containerProps: {
|
|
29
30
|
'data-testid': 'modal-close-btn'
|
|
30
31
|
},
|
|
31
|
-
icon: /*#__PURE__*/
|
|
32
|
+
icon: _Close || (_Close = /*#__PURE__*/_jsx(Close, {})),
|
|
32
33
|
onClick: onClose
|
|
33
34
|
})));
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
export { FormHeader, FormHeader as default };
|
|
37
|
-
//# sourceMappingURL=FormHeader.js.map
|