@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
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
+
import 'react';
|
|
2
4
|
import { MODAL_TYPE_V2 } from '../../constants.js';
|
|
3
5
|
import { SelectionHeader } from './SelectionHeader.js';
|
|
4
6
|
import { DecisionHeader } from './DecisionHeader.js';
|
|
@@ -8,99 +10,76 @@ import { Footer } from './Footer.js';
|
|
|
8
10
|
import { Title } from './Title.js';
|
|
9
11
|
import { showForm, showSelection, showDecision, showFeedBack, showFooter } from '../helpers.js';
|
|
10
12
|
import { ModalWrapper, ModalContent } from '../blocks.js';
|
|
11
|
-
import '
|
|
12
|
-
import '@elliemae/ds-icons';
|
|
13
|
-
import '@elliemae/ds-button';
|
|
14
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
15
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
16
|
-
import '@elliemae/ds-classnames';
|
|
13
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
17
14
|
|
|
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
|
-
_ref$onConfirm = _ref.onConfirm,
|
|
49
|
-
onConfirm = _ref$onConfirm === void 0 ? function () {
|
|
50
|
-
return null;
|
|
51
|
-
} : _ref$onConfirm,
|
|
52
|
-
_ref$onReject = _ref.onReject,
|
|
53
|
-
onReject = _ref$onReject === void 0 ? function () {
|
|
54
|
-
return null;
|
|
55
|
-
} : _ref$onReject,
|
|
56
|
-
_ref$rejectLabel = _ref.rejectLabel,
|
|
57
|
-
rejectLabel = _ref$rejectLabel === void 0 ? 'Discard' : _ref$rejectLabel,
|
|
58
|
-
_ref$confirmLabel = _ref.confirmLabel,
|
|
59
|
-
confirmLabel = _ref$confirmLabel === void 0 ? 'Save' : _ref$confirmLabel,
|
|
60
|
-
_ref$removePadding = _ref.removePadding,
|
|
61
|
-
removePadding = _ref$removePadding === void 0 ? false : _ref$removePadding;
|
|
62
|
-
return /*#__PURE__*/React.createElement(ModalWrapper, containerProps, showForm({
|
|
63
|
-
modalType: modalType,
|
|
64
|
-
modalSubType: modalSubType
|
|
65
|
-
}) && /*#__PURE__*/React.createElement(FormHeader, {
|
|
15
|
+
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
|
+
|
|
17
|
+
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
|
+
const DSModalContent = ({
|
|
19
|
+
containerProps = {},
|
|
20
|
+
//
|
|
21
|
+
modalType = MODAL_TYPE_V2.INFORMATION,
|
|
22
|
+
modalSubType = null,
|
|
23
|
+
modalTitle = '',
|
|
24
|
+
showRejectButton = false,
|
|
25
|
+
showClose = true,
|
|
26
|
+
searchProps = {},
|
|
27
|
+
// override
|
|
28
|
+
actionsRef = () => null,
|
|
29
|
+
additionalFooterCssClass,
|
|
30
|
+
overridePropsConfirmButton = {},
|
|
31
|
+
overridePropsRejectButton = {},
|
|
32
|
+
// react modal
|
|
33
|
+
children,
|
|
34
|
+
onClose = () => null,
|
|
35
|
+
onConfirm = () => null,
|
|
36
|
+
onReject = () => null,
|
|
37
|
+
rejectLabel = 'Discard',
|
|
38
|
+
confirmLabel = 'Save',
|
|
39
|
+
removePadding = false
|
|
40
|
+
}) => /*#__PURE__*/jsxs(ModalWrapper, _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
41
|
+
children: [showForm({
|
|
42
|
+
modalType,
|
|
43
|
+
modalSubType
|
|
44
|
+
}) && /*#__PURE__*/_jsx(FormHeader, {
|
|
66
45
|
modalTitle: modalTitle,
|
|
67
46
|
modalType: modalType,
|
|
68
47
|
onClose: onClose,
|
|
69
48
|
showClose: showClose
|
|
70
49
|
}), showSelection({
|
|
71
|
-
modalType
|
|
72
|
-
modalSubType
|
|
73
|
-
}) && /*#__PURE__*/
|
|
50
|
+
modalType,
|
|
51
|
+
modalSubType
|
|
52
|
+
}) && /*#__PURE__*/_jsx(SelectionHeader, {
|
|
74
53
|
modalTitle: modalTitle,
|
|
75
54
|
modalType: modalType,
|
|
76
55
|
searchProps: searchProps,
|
|
77
56
|
showClose: showClose
|
|
78
57
|
}), showDecision({
|
|
79
|
-
modalType
|
|
80
|
-
modalSubType
|
|
81
|
-
}) && /*#__PURE__*/
|
|
58
|
+
modalType,
|
|
59
|
+
modalSubType
|
|
60
|
+
}) && /*#__PURE__*/_jsx(DecisionHeader, {
|
|
82
61
|
onClose: onClose,
|
|
83
62
|
showClose: showClose
|
|
84
63
|
}), showFeedBack({
|
|
85
|
-
modalType
|
|
86
|
-
modalSubType
|
|
87
|
-
}) && /*#__PURE__*/
|
|
64
|
+
modalType,
|
|
65
|
+
modalSubType
|
|
66
|
+
}) && /*#__PURE__*/_jsx(FeedbackIcon, {
|
|
88
67
|
modalSubType: modalSubType
|
|
89
68
|
}), showDecision({
|
|
90
|
-
modalType
|
|
91
|
-
modalSubType
|
|
92
|
-
}) && /*#__PURE__*/
|
|
69
|
+
modalType,
|
|
70
|
+
modalSubType
|
|
71
|
+
}) && /*#__PURE__*/_jsx(Title, {
|
|
93
72
|
modalTitle: modalTitle,
|
|
94
73
|
modalType: modalType
|
|
95
|
-
}), /*#__PURE__*/
|
|
74
|
+
}), /*#__PURE__*/_jsx(ModalContent, {
|
|
96
75
|
classProps: {
|
|
97
76
|
type: modalType,
|
|
98
|
-
removePadding
|
|
77
|
+
removePadding
|
|
99
78
|
}
|
|
100
|
-
}, children), showFooter({
|
|
101
|
-
modalType
|
|
102
|
-
modalSubType
|
|
103
|
-
}) && /*#__PURE__*/
|
|
79
|
+
}, void 0, children), showFooter({
|
|
80
|
+
modalType,
|
|
81
|
+
modalSubType
|
|
82
|
+
}) && /*#__PURE__*/_jsx(Footer, {
|
|
104
83
|
actionsRef: actionsRef,
|
|
105
84
|
additionalFooterCssClass: additionalFooterCssClass,
|
|
106
85
|
confirmLabel: confirmLabel,
|
|
@@ -110,8 +89,7 @@ var DSModalContent = function DSModalContent(_ref) {
|
|
|
110
89
|
overridePropsRejectButton: overridePropsRejectButton,
|
|
111
90
|
rejectLabel: rejectLabel,
|
|
112
91
|
showRejectButton: showRejectButton
|
|
113
|
-
})
|
|
114
|
-
};
|
|
92
|
+
})]
|
|
93
|
+
}));
|
|
115
94
|
|
|
116
95
|
export { DSModalContent };
|
|
117
|
-
//# sourceMappingURL=ModalContent.js.map
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
+
import 'react';
|
|
4
|
+
import DSSearchBox from '@elliemae/ds-basic/form/SearchBox';
|
|
3
5
|
import { ModalHeader, ModalHeaderTopRight } from '../blocks.js';
|
|
4
6
|
import { Title } from './Title.js';
|
|
5
|
-
import '
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
9
|
+
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; }
|
|
10
|
+
|
|
11
|
+
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; }
|
|
12
|
+
const SelectionHeader = ({
|
|
13
|
+
searchProps = {},
|
|
14
|
+
modalTitle,
|
|
15
|
+
modalType,
|
|
16
|
+
showClose
|
|
17
|
+
}) => /*#__PURE__*/_jsx(ModalHeader, {
|
|
18
|
+
classProps: {
|
|
19
|
+
type: 'selection'
|
|
20
|
+
}
|
|
21
|
+
}, void 0, /*#__PURE__*/_jsx(Title, {
|
|
22
|
+
modalTitle: modalTitle,
|
|
23
|
+
modalType: modalType
|
|
24
|
+
}), showClose && /*#__PURE__*/_jsx(ModalHeaderTopRight, {
|
|
25
|
+
classProps: {
|
|
26
|
+
type: 'selection'
|
|
27
|
+
},
|
|
28
|
+
"data-testid": "modal-search-box"
|
|
29
|
+
}, void 0, /*#__PURE__*/jsx(DSSearchBox, _objectSpread({}, searchProps))));
|
|
29
30
|
|
|
30
31
|
export { SelectionHeader, SelectionHeader as default };
|
|
31
|
-
//# sourceMappingURL=SelectionHeader.js.map
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
2
3
|
import { ModalTitle } from '../blocks.js';
|
|
3
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
4
|
-
import '@elliemae/ds-classnames';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, modalTitle);
|
|
15
|
-
};
|
|
5
|
+
const Title = ({
|
|
6
|
+
modalTitle,
|
|
7
|
+
modalType
|
|
8
|
+
}) => /*#__PURE__*/_jsx(ModalTitle, {
|
|
9
|
+
classProps: {
|
|
10
|
+
type: modalType
|
|
11
|
+
}
|
|
12
|
+
}, void 0, modalTitle);
|
|
16
13
|
|
|
17
14
|
export { Title, Title as default };
|
|
18
|
-
//# sourceMappingURL=Title.js.map
|
package/esm/v2/helpers.js
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import { MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from '../constants.js';
|
|
2
2
|
|
|
3
|
-
function showDecision(
|
|
4
|
-
|
|
3
|
+
function showDecision({
|
|
4
|
+
modalType
|
|
5
|
+
}) {
|
|
5
6
|
return [MODAL_TYPE_V2.INFORMATION, MODAL_TYPE_V2.DECISION].indexOf(modalType) > -1;
|
|
6
7
|
}
|
|
7
|
-
function showFeedBack(
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
function showFeedBack({
|
|
9
|
+
modalType,
|
|
10
|
+
modalSubType
|
|
11
|
+
}) {
|
|
10
12
|
return showDecision({
|
|
11
|
-
modalType
|
|
13
|
+
modalType
|
|
12
14
|
}) && Object.values(MODAL_SUB_TYPE_V2).indexOf(modalSubType) > -1;
|
|
13
15
|
}
|
|
14
|
-
function showFooter(
|
|
15
|
-
|
|
16
|
+
function showFooter({
|
|
17
|
+
modalType
|
|
18
|
+
}) {
|
|
16
19
|
return modalType !== MODAL_TYPE_V2.INFORMATION;
|
|
17
20
|
}
|
|
18
|
-
function showSelection(
|
|
19
|
-
|
|
21
|
+
function showSelection({
|
|
22
|
+
modalType
|
|
23
|
+
}) {
|
|
20
24
|
return modalType === MODAL_TYPE_V2.SELECTION;
|
|
21
25
|
}
|
|
22
|
-
function showForm(
|
|
23
|
-
|
|
26
|
+
function showForm({
|
|
27
|
+
modalType
|
|
28
|
+
}) {
|
|
24
29
|
return modalType === MODAL_TYPE_V2.FORM;
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
export { showDecision, showFeedBack, showFooter, showForm, showSelection };
|
|
28
|
-
//# sourceMappingURL=helpers.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,94 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-modal",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.11",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
5
|
+
"description": "ICE MT - Dimsum - Modal",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./v2/helpers": {
|
|
15
|
+
"import": "./esm/v2/helpers.js",
|
|
16
|
+
"require": "./cjs/v2/helpers.js"
|
|
17
|
+
},
|
|
18
|
+
"./v2/DSModal": {
|
|
19
|
+
"import": "./esm/v2/DSModal.js",
|
|
20
|
+
"require": "./cjs/v2/DSModal.js"
|
|
21
|
+
},
|
|
22
|
+
"./v2/components/Title": {
|
|
23
|
+
"import": "./esm/v2/components/Title.js",
|
|
24
|
+
"require": "./cjs/v2/components/Title.js"
|
|
25
|
+
},
|
|
26
|
+
"./v2/components/SelectionHeader": {
|
|
27
|
+
"import": "./esm/v2/components/SelectionHeader.js",
|
|
28
|
+
"require": "./cjs/v2/components/SelectionHeader.js"
|
|
29
|
+
},
|
|
30
|
+
"./v2/components/ModalContent": {
|
|
31
|
+
"import": "./esm/v2/components/ModalContent.js",
|
|
32
|
+
"require": "./cjs/v2/components/ModalContent.js"
|
|
33
|
+
},
|
|
34
|
+
"./v2/components/FormHeader": {
|
|
35
|
+
"import": "./esm/v2/components/FormHeader.js",
|
|
36
|
+
"require": "./cjs/v2/components/FormHeader.js"
|
|
37
|
+
},
|
|
38
|
+
"./v2/components/Footer": {
|
|
39
|
+
"import": "./esm/v2/components/Footer.js",
|
|
40
|
+
"require": "./cjs/v2/components/Footer.js"
|
|
41
|
+
},
|
|
42
|
+
"./v2/components/FeedbackIcon": {
|
|
43
|
+
"import": "./esm/v2/components/FeedbackIcon.js",
|
|
44
|
+
"require": "./cjs/v2/components/FeedbackIcon.js"
|
|
45
|
+
},
|
|
46
|
+
"./v2/components/DecisionHeader": {
|
|
47
|
+
"import": "./esm/v2/components/DecisionHeader.js",
|
|
48
|
+
"require": "./cjs/v2/components/DecisionHeader.js"
|
|
49
|
+
},
|
|
50
|
+
"./v2/blocks": {
|
|
51
|
+
"import": "./esm/v2/blocks.js",
|
|
52
|
+
"require": "./cjs/v2/blocks.js"
|
|
53
|
+
},
|
|
54
|
+
"./v1/ModalFeedBack/ModalFeedBack": {
|
|
55
|
+
"import": "./esm/v1/ModalFeedBack/ModalFeedBack.js",
|
|
56
|
+
"require": "./cjs/v1/ModalFeedBack/ModalFeedBack.js"
|
|
57
|
+
},
|
|
58
|
+
"./v1/DSModalWrapper": {
|
|
59
|
+
"import": "./esm/v1/DSModalWrapper.js",
|
|
60
|
+
"require": "./cjs/v1/DSModalWrapper.js"
|
|
61
|
+
},
|
|
62
|
+
"./v1/DSModalType": {
|
|
63
|
+
"import": "./esm/v1/DSModalType.js",
|
|
64
|
+
"require": "./cjs/v1/DSModalType.js"
|
|
65
|
+
},
|
|
66
|
+
"./v1/DSModal": {
|
|
67
|
+
"import": "./esm/v1/DSModal.js",
|
|
68
|
+
"require": "./cjs/v1/DSModal.js"
|
|
69
|
+
},
|
|
70
|
+
"./DSModal": {
|
|
71
|
+
"import": "./esm/DSModal.js",
|
|
72
|
+
"require": "./cjs/DSModal.js"
|
|
73
|
+
},
|
|
74
|
+
"./constants": {
|
|
75
|
+
"import": "./esm/constants.js",
|
|
76
|
+
"require": "./cjs/constants.js"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
8
79
|
"sideEffects": [
|
|
9
80
|
"*.css",
|
|
10
81
|
"*.scss"
|
|
11
82
|
],
|
|
83
|
+
"repository": {
|
|
84
|
+
"type": "git",
|
|
85
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
86
|
+
},
|
|
87
|
+
"engines": {
|
|
88
|
+
"npm": ">=7",
|
|
89
|
+
"node": ">=14"
|
|
90
|
+
},
|
|
91
|
+
"author": "ICE MT",
|
|
12
92
|
"scripts": {
|
|
13
93
|
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
14
94
|
"prebuild": "exit 0",
|
|
@@ -16,22 +96,20 @@
|
|
|
16
96
|
"build": "node ../../scripts/build/build.js"
|
|
17
97
|
},
|
|
18
98
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-basic": "
|
|
20
|
-
"@elliemae/ds-classnames": "
|
|
21
|
-
"@elliemae/ds-icons": "1.57.1-rc.0",
|
|
22
|
-
"@elliemae/ds-modal": "1.57.1-rc.0",
|
|
23
|
-
"@elliemae/ds-system": "1.57.1-rc.0",
|
|
99
|
+
"@elliemae/ds-basic": "2.0.0-alpha.11",
|
|
100
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.11",
|
|
24
101
|
"prop-types": "~15.7.2",
|
|
25
|
-
"react-
|
|
102
|
+
"react-measure": "~2.5.2",
|
|
26
103
|
"react-modal": "~3.12.1"
|
|
27
104
|
},
|
|
28
105
|
"peerDependencies": {
|
|
29
|
-
"lodash": "^4.17.
|
|
30
|
-
"react": "~17.0.
|
|
31
|
-
"react-dom": "^17.0.
|
|
106
|
+
"lodash": "^4.17.21",
|
|
107
|
+
"react": "~17.0.2",
|
|
108
|
+
"react-dom": "^17.0.2"
|
|
32
109
|
},
|
|
33
110
|
"publishConfig": {
|
|
34
111
|
"access": "public",
|
|
35
|
-
"directory": "dist"
|
|
112
|
+
"directory": "dist",
|
|
113
|
+
"generateSubmodules": true
|
|
36
114
|
}
|
|
37
115
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { DSModalContent } from './v2/DSModal';
|
|
4
|
+
declare const DSModal: {
|
|
5
|
+
({ version, ...rest }: {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
version?: number | undefined;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
propTypes: {
|
|
10
|
+
version: PropTypes.Requireable<number>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export { DSModalContent };
|
|
14
|
+
export default DSModal;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const MODAL_TYPE: {
|
|
2
|
+
DEFAULT: string;
|
|
3
|
+
ALERT: string;
|
|
4
|
+
CONFIRM: string;
|
|
5
|
+
NOTIFICATION: string;
|
|
6
|
+
WARNING: string;
|
|
7
|
+
ERROR: string;
|
|
8
|
+
SUCCESS: string;
|
|
9
|
+
HELP: string;
|
|
10
|
+
INFO: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const modalTypes: string[];
|
|
13
|
+
export declare const MODAL_TYPE_V2: {
|
|
14
|
+
INFORMATION: string;
|
|
15
|
+
DECISION: string;
|
|
16
|
+
SELECTION: string;
|
|
17
|
+
FORM: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const MODAL_SUB_TYPE_V2: {
|
|
20
|
+
SUCCESS: string;
|
|
21
|
+
WARNING: string;
|
|
22
|
+
ERROR: string;
|
|
23
|
+
INFORMATION: string;
|
|
24
|
+
};
|
|
25
|
+
export default MODAL_TYPE;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare const DSModal: {
|
|
4
|
+
({ containerProps, className, dataTestId, additionalFooterCssClass, style, iconCloseSize, modalType, showHeader, showFooter, children, centered, confirmLabel, modalTitle, size, isOpen, onClose, onAfterOpen, onConfirm, onReject, rejectLabel, shouldCloseOnOverlayClick, hasError, hasWarning, hasSuccess, hasInfo, hasHelp, actionsRef, appElement, overridePropsConfirmButton, overridePropsRejectButton, zIndex, }: {
|
|
5
|
+
containerProps?: {} | undefined;
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
dataTestId?: string | undefined;
|
|
8
|
+
additionalFooterCssClass?: string | undefined;
|
|
9
|
+
style?: {} | undefined;
|
|
10
|
+
iconCloseSize?: any;
|
|
11
|
+
modalType?: string | undefined;
|
|
12
|
+
showHeader?: boolean | undefined;
|
|
13
|
+
showFooter?: boolean | undefined;
|
|
14
|
+
children: any;
|
|
15
|
+
centered?: boolean | undefined;
|
|
16
|
+
confirmLabel?: string | undefined;
|
|
17
|
+
modalTitle?: string | undefined;
|
|
18
|
+
size?: string | undefined;
|
|
19
|
+
isOpen?: boolean | undefined;
|
|
20
|
+
onClose?: (() => null) | undefined;
|
|
21
|
+
onAfterOpen?: (() => null) | undefined;
|
|
22
|
+
onConfirm?: (() => null) | undefined;
|
|
23
|
+
onReject?: (() => null) | undefined;
|
|
24
|
+
rejectLabel?: string | undefined;
|
|
25
|
+
shouldCloseOnOverlayClick?: boolean | undefined;
|
|
26
|
+
hasError?: boolean | undefined;
|
|
27
|
+
hasWarning?: boolean | undefined;
|
|
28
|
+
hasSuccess?: boolean | undefined;
|
|
29
|
+
hasInfo?: boolean | undefined;
|
|
30
|
+
hasHelp?: boolean | undefined;
|
|
31
|
+
actionsRef?: (() => null) | undefined;
|
|
32
|
+
appElement?: string | undefined;
|
|
33
|
+
overridePropsConfirmButton?: {} | undefined;
|
|
34
|
+
overridePropsRejectButton?: {} | undefined;
|
|
35
|
+
zIndex?: number | undefined;
|
|
36
|
+
}): JSX.Element;
|
|
37
|
+
propTypes: {
|
|
38
|
+
className: PropTypes.Requireable<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Add an additional css class to the footer
|
|
41
|
+
*/
|
|
42
|
+
additionalFooterCssClass: PropTypes.Requireable<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Set style for the modal
|
|
45
|
+
*/
|
|
46
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
47
|
+
/**
|
|
48
|
+
* Select size for the close icon
|
|
49
|
+
*/
|
|
50
|
+
iconCloseSize: PropTypes.Requireable<unknown>;
|
|
51
|
+
/**
|
|
52
|
+
* ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']
|
|
53
|
+
*/
|
|
54
|
+
modalType: PropTypes.Requireable<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Show the header or not
|
|
57
|
+
*/
|
|
58
|
+
showHeader: PropTypes.Requireable<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Show the footer or not
|
|
61
|
+
*/
|
|
62
|
+
showFooter: PropTypes.Requireable<boolean>;
|
|
63
|
+
/**
|
|
64
|
+
* Main content of the modal
|
|
65
|
+
*/
|
|
66
|
+
children: PropTypes.Validator<any>;
|
|
67
|
+
/**
|
|
68
|
+
* Content is centered or not
|
|
69
|
+
*/
|
|
70
|
+
centered: PropTypes.Requireable<boolean>;
|
|
71
|
+
/**
|
|
72
|
+
* Text to be added in the confirm button
|
|
73
|
+
*/
|
|
74
|
+
confirmLabel: PropTypes.Requireable<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Text to be added in the modal title
|
|
77
|
+
*/
|
|
78
|
+
modalTitle: PropTypes.Requireable<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Text to be added in the modal title
|
|
81
|
+
*/
|
|
82
|
+
size: PropTypes.Requireable<unknown>;
|
|
83
|
+
/**
|
|
84
|
+
* Modal is open or not
|
|
85
|
+
*/
|
|
86
|
+
isOpen: PropTypes.Requireable<boolean>;
|
|
87
|
+
/**
|
|
88
|
+
* Allows a function to be triggered once the modal is closed
|
|
89
|
+
*/
|
|
90
|
+
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
91
|
+
/**
|
|
92
|
+
* Allows a function to be triggered once the modal is opened
|
|
93
|
+
*/
|
|
94
|
+
onAfterOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
95
|
+
/**
|
|
96
|
+
* Allows a function to be triggered once the modal open is confirmed
|
|
97
|
+
*/
|
|
98
|
+
onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
|
+
/**
|
|
100
|
+
* Allows a function to be triggered once the modal open is rejected
|
|
101
|
+
*/
|
|
102
|
+
onReject: PropTypes.Requireable<(...args: any[]) => any>;
|
|
103
|
+
/**
|
|
104
|
+
* Text to be added in the reject button
|
|
105
|
+
*/
|
|
106
|
+
rejectLabel: PropTypes.Requireable<string>;
|
|
107
|
+
/**
|
|
108
|
+
* If modal should close on overlay click
|
|
109
|
+
*/
|
|
110
|
+
shouldCloseOnOverlayClick: PropTypes.Requireable<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* Modal has error or not
|
|
113
|
+
*/
|
|
114
|
+
hasError: PropTypes.Requireable<boolean>;
|
|
115
|
+
/**
|
|
116
|
+
* Modal has warning or not
|
|
117
|
+
*/
|
|
118
|
+
hasWarning: PropTypes.Requireable<boolean>;
|
|
119
|
+
/**
|
|
120
|
+
* Modal has success or not
|
|
121
|
+
*/
|
|
122
|
+
hasSuccess: PropTypes.Requireable<boolean>;
|
|
123
|
+
/**
|
|
124
|
+
* Modal has info or not
|
|
125
|
+
*/
|
|
126
|
+
hasInfo: PropTypes.Requireable<boolean>;
|
|
127
|
+
/**
|
|
128
|
+
* Modal has help or not
|
|
129
|
+
*/
|
|
130
|
+
hasHelp: PropTypes.Requireable<boolean>;
|
|
131
|
+
actionsRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
132
|
+
appElement: PropTypes.Requireable<string>;
|
|
133
|
+
/**
|
|
134
|
+
* Customized props for the confirm button
|
|
135
|
+
*/
|
|
136
|
+
overridePropsConfirmButton: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
137
|
+
/**
|
|
138
|
+
* Customized props for the reject button
|
|
139
|
+
*/
|
|
140
|
+
overridePropsRejectButton: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export default DSModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const modalTypes: any[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const ModalFeedBack: ({ className, modalType, hasError, hasWarning, hasSuccess, hasInfo, hasHelp, }: {
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
modalType?: null | undefined;
|
|
5
|
+
hasError?: boolean | undefined;
|
|
6
|
+
hasWarning?: boolean | undefined;
|
|
7
|
+
hasSuccess?: boolean | undefined;
|
|
8
|
+
hasInfo?: boolean | undefined;
|
|
9
|
+
hasHelp?: boolean | undefined;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export default ModalFeedBack;
|