@elliemae/ds-modal 3.0.0-next.0 → 3.0.0-next.4
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/dist/cjs/DSModal.js +111 -0
- package/dist/cjs/DSModal.js.map +7 -0
- package/dist/cjs/constants.js +73 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/index.js +43 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/v1/DSModal.js +185 -0
- package/dist/cjs/v1/DSModal.js.map +7 -0
- package/dist/cjs/v1/DSModalType.js +45 -0
- package/dist/cjs/v1/DSModalType.js.map +7 -0
- package/dist/cjs/v1/DSModalWrapper.js +145 -0
- package/dist/cjs/v1/DSModalWrapper.js.map +7 -0
- package/dist/cjs/v1/ModalFeedBack/ModalFeedBack.js +103 -0
- package/dist/cjs/v1/ModalFeedBack/ModalFeedBack.js.map +7 -0
- package/dist/cjs/v2/DSModal.js +172 -0
- package/dist/cjs/v2/DSModal.js.map +7 -0
- package/dist/cjs/v2/blocks.js +71 -0
- package/dist/cjs/v2/blocks.js.map +7 -0
- package/dist/cjs/v2/components/DecisionHeader.js +48 -0
- package/dist/cjs/v2/components/DecisionHeader.js.map +7 -0
- package/dist/cjs/v2/components/FeedbackIcon.js +73 -0
- package/dist/cjs/v2/components/FeedbackIcon.js.map +7 -0
- package/dist/cjs/v2/components/Footer.js +81 -0
- package/dist/cjs/v2/components/Footer.js.map +7 -0
- package/dist/cjs/v2/components/FormHeader.js +54 -0
- package/dist/cjs/v2/components/FormHeader.js.map +7 -0
- package/dist/cjs/v2/components/ModalContent.js +108 -0
- package/dist/cjs/v2/components/ModalContent.js.map +7 -0
- package/dist/cjs/v2/components/SelectionHeader.js +63 -0
- package/dist/cjs/v2/components/SelectionHeader.js.map +7 -0
- package/dist/cjs/v2/components/Title.js +41 -0
- package/dist/cjs/v2/components/Title.js.map +7 -0
- package/dist/cjs/v2/helpers.js +54 -0
- package/dist/cjs/v2/helpers.js.map +7 -0
- package/dist/esm/DSModal.js +84 -0
- package/dist/esm/DSModal.js.map +7 -0
- package/dist/esm/constants.js +44 -0
- package/dist/esm/constants.js.map +7 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/v1/DSModal.js +158 -0
- package/dist/esm/v1/DSModal.js.map +7 -0
- package/dist/esm/v1/DSModalType.js +16 -0
- package/dist/esm/v1/DSModalType.js.map +7 -0
- package/dist/esm/v1/DSModalWrapper.js +118 -0
- package/dist/esm/v1/DSModalWrapper.js.map +7 -0
- package/dist/esm/v1/ModalFeedBack/ModalFeedBack.js +74 -0
- package/dist/esm/v1/ModalFeedBack/ModalFeedBack.js.map +7 -0
- package/dist/esm/v2/DSModal.js +145 -0
- package/dist/esm/v2/DSModal.js.map +7 -0
- package/dist/esm/v2/blocks.js +42 -0
- package/dist/esm/v2/blocks.js.map +7 -0
- package/dist/esm/v2/components/DecisionHeader.js +19 -0
- package/dist/esm/v2/components/DecisionHeader.js.map +7 -0
- package/dist/esm/v2/components/FeedbackIcon.js +44 -0
- package/dist/esm/v2/components/FeedbackIcon.js.map +7 -0
- package/dist/esm/v2/components/Footer.js +54 -0
- package/dist/esm/v2/components/Footer.js.map +7 -0
- package/dist/esm/v2/components/FormHeader.js +25 -0
- package/dist/esm/v2/components/FormHeader.js.map +7 -0
- package/dist/esm/v2/components/ModalContent.js +87 -0
- package/dist/esm/v2/components/ModalContent.js.map +7 -0
- package/dist/esm/v2/components/SelectionHeader.js +36 -0
- package/dist/esm/v2/components/SelectionHeader.js.map +7 -0
- package/dist/esm/v2/components/Title.js +12 -0
- package/dist/esm/v2/components/Title.js.map +7 -0
- package/dist/esm/v2/helpers.js +25 -0
- package/dist/esm/v2/helpers.js.map +7 -0
- package/package.json +64 -55
- package/cjs/DSModal.js +0 -186
- package/cjs/constants.js +0 -34
- package/cjs/index.js +0 -18
- package/cjs/v1/DSModal.js +0 -148
- package/cjs/v1/DSModalType.js +0 -7
- package/cjs/v1/DSModalWrapper.js +0 -166
- package/cjs/v1/ModalFeedBack/ModalFeedBack.js +0 -98
- package/cjs/v2/DSModal.js +0 -203
- package/cjs/v2/blocks.js +0 -88
- package/cjs/v2/components/DecisionHeader.js +0 -38
- package/cjs/v2/components/FeedbackIcon.js +0 -64
- package/cjs/v2/components/Footer.js +0 -66
- package/cjs/v2/components/FormHeader.js +0 -47
- package/cjs/v2/components/ModalContent.js +0 -112
- package/cjs/v2/components/SelectionHeader.js +0 -49
- package/cjs/v2/components/Title.js +0 -26
- package/cjs/v2/helpers.js +0 -45
- package/esm/DSModal.js +0 -175
- package/esm/constants.js +0 -26
- package/esm/index.js +0 -4
- package/esm/v1/DSModal.js +0 -139
- package/esm/v1/DSModalType.js +0 -3
- package/esm/v1/DSModalWrapper.js +0 -160
- package/esm/v1/ModalFeedBack/ModalFeedBack.js +0 -92
- package/esm/v2/DSModal.js +0 -192
- package/esm/v2/blocks.js +0 -77
- package/esm/v2/components/DecisionHeader.js +0 -28
- package/esm/v2/components/FeedbackIcon.js +0 -55
- package/esm/v2/components/Footer.js +0 -55
- package/esm/v2/components/FormHeader.js +0 -37
- package/esm/v2/components/ModalContent.js +0 -103
- package/esm/v2/components/SelectionHeader.js +0 -39
- package/esm/v2/components/Title.js +0 -17
- package/esm/v2/helpers.js +0 -37
- package/types/DSModal.d.ts +0 -14
- package/types/constants.d.ts +0 -25
- package/types/index.d.ts +0 -4
- package/types/v1/DSModal.d.ts +0 -143
- package/types/v1/DSModalType.d.ts +0 -1
- package/types/v1/ModalFeedBack/ModalFeedBack.d.ts +0 -11
- package/types/v2/DSModal.d.ts +0 -260
- package/types/v2/blocks.d.ts +0 -9
- package/types/v2/components/DecisionHeader.d.ts +0 -6
- package/types/v2/components/FeedbackIcon.d.ts +0 -5
- package/types/v2/components/Footer.d.ts +0 -13
- package/types/v2/components/FormHeader.d.ts +0 -8
- package/types/v2/components/ModalContent.d.ts +0 -21
- package/types/v2/components/SelectionHeader.d.ts +0 -8
- package/types/v2/components/Title.d.ts +0 -6
- package/types/v2/components/tests/DecisionHeader.test.d.ts +0 -1
- package/types/v2/components/tests/FeedbackIcon.test.d.ts +0 -1
- package/types/v2/components/tests/Footer.test.d.ts +0 -1
- package/types/v2/components/tests/FormHeader.test.d.ts +0 -1
- package/types/v2/components/tests/SelectionHeader.test.d.ts +0 -1
- package/types/v2/helpers.d.ts +0 -16
- package/types/v2/tests/DSModal.test.d.ts +0 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import React2 from "react";
|
|
19
|
+
import { PropTypes, describe } from "react-desc";
|
|
20
|
+
import ReactModal from "react-modal";
|
|
21
|
+
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
22
|
+
import { MODAL_TYPE_V2 } from "../constants";
|
|
23
|
+
import { DSModalContent } from "./components/ModalContent";
|
|
24
|
+
const DSModal = ({
|
|
25
|
+
containerProps = {},
|
|
26
|
+
className = "",
|
|
27
|
+
style = {},
|
|
28
|
+
size = "default",
|
|
29
|
+
modalType = MODAL_TYPE_V2.INFORMATION,
|
|
30
|
+
modalSubType = null,
|
|
31
|
+
modalTitle = "",
|
|
32
|
+
dataTestId = "ds-modal",
|
|
33
|
+
centered = false,
|
|
34
|
+
showRejectButton = false,
|
|
35
|
+
showClose = true,
|
|
36
|
+
searchProps = {},
|
|
37
|
+
actionsRef = () => null,
|
|
38
|
+
additionalFooterCssClass,
|
|
39
|
+
overridePropsConfirmButton = {},
|
|
40
|
+
overridePropsRejectButton = {},
|
|
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
|
+
}) => {
|
|
54
|
+
if (typeof document !== "undefined" && true && document && ReactModal.setAppElement) {
|
|
55
|
+
ReactModal.setAppElement(appElement);
|
|
56
|
+
}
|
|
57
|
+
const {
|
|
58
|
+
cssClassName,
|
|
59
|
+
classNameBlock,
|
|
60
|
+
classNameModifier
|
|
61
|
+
} = convertPropToCssClassName("modal-v2", className, { size });
|
|
62
|
+
return /* @__PURE__ */ React2.createElement(ReactModal, {
|
|
63
|
+
testId: dataTestId,
|
|
64
|
+
className: `${cssClassName} ${classNameBlock(`type-${modalType}`)}`,
|
|
65
|
+
contentLabel: modalTitle,
|
|
66
|
+
isOpen,
|
|
67
|
+
onAfterOpen,
|
|
68
|
+
onRequestClose: onClose,
|
|
69
|
+
overlayClassName: `${classNameBlock("overlay")} ${classNameModifier(centered ? "center" : "top")}`,
|
|
70
|
+
shouldCloseOnOverlayClick,
|
|
71
|
+
style: {
|
|
72
|
+
content: __spreadValues({}, style),
|
|
73
|
+
overlay: {
|
|
74
|
+
zIndex
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, /* @__PURE__ */ React2.createElement(DSModalContent, {
|
|
78
|
+
actionsRef,
|
|
79
|
+
additionalFooterCssClass,
|
|
80
|
+
confirmLabel,
|
|
81
|
+
containerProps,
|
|
82
|
+
modalSubType,
|
|
83
|
+
modalTitle,
|
|
84
|
+
modalType,
|
|
85
|
+
onClose,
|
|
86
|
+
onConfirm,
|
|
87
|
+
onReject,
|
|
88
|
+
overridePropsConfirmButton,
|
|
89
|
+
overridePropsRejectButton,
|
|
90
|
+
rejectLabel,
|
|
91
|
+
searchProps,
|
|
92
|
+
showClose,
|
|
93
|
+
showRejectButton,
|
|
94
|
+
removePadding
|
|
95
|
+
}, children));
|
|
96
|
+
};
|
|
97
|
+
const props = {
|
|
98
|
+
containerProps: PropTypes.object.description("inject props to container wrapper"),
|
|
99
|
+
className: PropTypes.string.description("css class"),
|
|
100
|
+
style: PropTypes.object.description("style object for container wrapper"),
|
|
101
|
+
modalTitle: PropTypes.string.description("modal container title"),
|
|
102
|
+
centered: PropTypes.bool.description("center container"),
|
|
103
|
+
showRejectButton: PropTypes.bool.description("show reject button"),
|
|
104
|
+
showClose: PropTypes.bool.description("show close button"),
|
|
105
|
+
searchProps: PropTypes.object.description("Props for search component"),
|
|
106
|
+
additionalFooterCssClass: PropTypes.string.description("css class for footer"),
|
|
107
|
+
overridePropsConfirmButton: PropTypes.object.description("override props confirm button"),
|
|
108
|
+
overridePropsRejectButton: PropTypes.object.description("override props reject button"),
|
|
109
|
+
isOpen: PropTypes.bool.description("controlled isOpen flag"),
|
|
110
|
+
onClose: PropTypes.func.description("close callback"),
|
|
111
|
+
onAfterOpen: PropTypes.func.description("after open callback"),
|
|
112
|
+
onConfirm: PropTypes.func.description("confirm callback"),
|
|
113
|
+
onReject: PropTypes.func.description("reject callback"),
|
|
114
|
+
rejectLabel: PropTypes.string.description("reject label"),
|
|
115
|
+
confirmLabel: PropTypes.string.description("confirm text string"),
|
|
116
|
+
size: PropTypes.oneOf([
|
|
117
|
+
"default",
|
|
118
|
+
"xx-large",
|
|
119
|
+
"x-large",
|
|
120
|
+
"large",
|
|
121
|
+
"medium",
|
|
122
|
+
"small"
|
|
123
|
+
]).description("modal container size"),
|
|
124
|
+
modalSubType: PropTypes.any.description("modal sub type"),
|
|
125
|
+
modalType: PropTypes.any.description("modal type"),
|
|
126
|
+
actionsRef: PropTypes.any.description("ref for modal footer actions"),
|
|
127
|
+
children: PropTypes.oneOfType([
|
|
128
|
+
PropTypes.element,
|
|
129
|
+
PropTypes.arrayOf([PropTypes.element])
|
|
130
|
+
]).description("modal container children"),
|
|
131
|
+
shouldCloseOnOverlayClick: PropTypes.bool.description("close on click outside container"),
|
|
132
|
+
appElement: PropTypes.string.description("App element ID to inject the modal"),
|
|
133
|
+
zIndex: PropTypes.number.description("zindex for modal container"),
|
|
134
|
+
removePadding: PropTypes.bool.description("remove modal builtin padding")
|
|
135
|
+
};
|
|
136
|
+
DSModal.propTypes = props;
|
|
137
|
+
const DSModalWithSchema = describe(DSModal);
|
|
138
|
+
DSModalWithSchema.propTypes = props;
|
|
139
|
+
var DSModal_default = DSModal;
|
|
140
|
+
export {
|
|
141
|
+
DSModalContent,
|
|
142
|
+
DSModalWithSchema,
|
|
143
|
+
DSModal_default as default
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=DSModal.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/DSModal.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactModal from 'react-modal';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { MODAL_TYPE_V2 } from '../constants';\nimport { DSModalContent } from './components/ModalContent';\n\nconst DSModal = ({\n containerProps = {},\n className = '',\n style = {},\n size = 'default',\n //\n modalType = MODAL_TYPE_V2.INFORMATION,\n modalSubType = null,\n modalTitle = '',\n dataTestId = 'ds-modal',\n centered = false,\n showRejectButton = false,\n showClose = true,\n searchProps = {},\n // override\n actionsRef = () => null,\n additionalFooterCssClass,\n overridePropsConfirmButton = {},\n overridePropsRejectButton = {},\n // react modal\n children,\n isOpen = true,\n onClose = () => null,\n onAfterOpen = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Discard',\n confirmLabel = 'Save',\n shouldCloseOnOverlayClick = false,\n appElement = '#root',\n zIndex = 10,\n removePadding = false,\n}) => {\n if (\n typeof document !== 'undefined' &&\n process.env.NODE_ENV !== 'test' &&\n document &&\n ReactModal.setAppElement\n ) {\n ReactModal.setAppElement(appElement);\n }\n\n const {\n cssClassName,\n classNameBlock,\n classNameModifier,\n } = convertPropToCssClassName('modal-v2', className, { size });\n\n return (\n <ReactModal\n testId={dataTestId}\n className={`${cssClassName} ${classNameBlock(`type-${modalType}`)}`}\n contentLabel={modalTitle}\n isOpen={isOpen}\n onAfterOpen={onAfterOpen}\n onRequestClose={onClose}\n overlayClassName={`${classNameBlock('overlay')} ${classNameModifier(\n centered ? 'center' : 'top',\n )}`}\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\n style={{\n content: {\n ...style,\n },\n overlay: {\n // 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\n zIndex,\n },\n }}\n >\n <DSModalContent\n actionsRef={actionsRef}\n additionalFooterCssClass={additionalFooterCssClass}\n confirmLabel={confirmLabel}\n containerProps={containerProps}\n modalSubType={modalSubType}\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={onClose}\n onConfirm={onConfirm}\n onReject={onReject}\n overridePropsConfirmButton={overridePropsConfirmButton}\n overridePropsRejectButton={overridePropsRejectButton}\n rejectLabel={rejectLabel}\n searchProps={searchProps}\n showClose={showClose}\n showRejectButton={showRejectButton}\n removePadding={removePadding}\n >\n {children}\n </DSModalContent>\n </ReactModal>\n );\n};\n\nconst props = {\n /** inject props to container wrapper */\n containerProps: PropTypes.object.description(\n 'inject props to container wrapper',\n ),\n /** css class */\n className: PropTypes.string.description('css class'),\n /** style object for container wrapper */\n style: PropTypes.object.description('style object for container wrapper'),\n /** modal container title */\n modalTitle: PropTypes.string.description('modal container title'),\n /** center container */\n centered: PropTypes.bool.description('center container'),\n /** show reject button */\n showRejectButton: PropTypes.bool.description('show reject button'),\n /** show close button */\n showClose: PropTypes.bool.description('show close button'),\n /*\n Props for search component\n */\n searchProps: PropTypes.object.description('Props for search component'),\n /** css class for footer */\n additionalFooterCssClass: PropTypes.string.description(\n 'css class for footer',\n ),\n /** override props confirm button */\n overridePropsConfirmButton: PropTypes.object.description(\n 'override props confirm button',\n ),\n /** override props reject button */\n overridePropsRejectButton: PropTypes.object.description(\n 'override props reject button',\n ),\n /** controlled isOpen flag */\n isOpen: PropTypes.bool.description('controlled isOpen flag'),\n /** close callback */\n onClose: PropTypes.func.description('close callback'),\n /** after open callback */\n onAfterOpen: PropTypes.func.description('after open callback'),\n /** confirm callback */\n onConfirm: PropTypes.func.description('confirm callback'),\n /** reject callback */\n onReject: PropTypes.func.description('reject callback'),\n /** reject label */\n rejectLabel: PropTypes.string.description('reject label'),\n /** confirm text string */\n confirmLabel: PropTypes.string.description('confirm text string'),\n /** modal container size */\n size: PropTypes.oneOf([\n 'default',\n 'xx-large',\n 'x-large',\n 'large',\n 'medium',\n 'small',\n ]).description('modal container size'),\n /** modal sub type */\n modalSubType: PropTypes.any.description('modal sub type'),\n /** modal type */\n modalType: PropTypes.any.description('modal type'),\n /** ref for modal footer actions */\n actionsRef: PropTypes.any.description('ref for modal footer actions'),\n /** modal container children */\n children: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.arrayOf([PropTypes.element]),\n ]).description('modal container children'),\n /** close on click outside container */\n shouldCloseOnOverlayClick: PropTypes.bool.description(\n 'close on click outside container',\n ),\n /*\n App element ID to inject the modal\n */\n appElement: PropTypes.string.description(\n 'App element ID to inject the modal',\n ),\n /** zindex for modal container */\n zIndex: PropTypes.number.description('zindex for modal container'),\n /** remove modal builtin padding */\n removePadding: PropTypes.bool.description('remove modal builtin padding'),\n};\n\nDSModal.propTypes = props;\n\nconst DSModalWithSchema = describe(DSModal);\nDSModalWithSchema.propTypes = props;\n\nexport { DSModalContent, DSModalWithSchema };\nexport default DSModal;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
3
|
+
const blockName = "modal-v2";
|
|
4
|
+
const ModalHeader = aggregatedClasses("div")(blockName, "modal-header", ({ type, showClose }) => ({
|
|
5
|
+
[type]: type,
|
|
6
|
+
"with-close": showClose
|
|
7
|
+
}));
|
|
8
|
+
const ModalHeaderTopRight = aggregatedClasses("div")(blockName, "modal-header-close", ({ type }) => ({
|
|
9
|
+
[type]: type
|
|
10
|
+
}));
|
|
11
|
+
const ModalFeedback = aggregatedClasses("div")(blockName, "modal-feedback", ({ type }) => ({
|
|
12
|
+
[type]: type
|
|
13
|
+
}));
|
|
14
|
+
const ModalTitle = aggregatedClasses("h3")(blockName, "modal-title", ({ type }) => ({
|
|
15
|
+
[type]: type
|
|
16
|
+
}));
|
|
17
|
+
const ModalContent = aggregatedClasses("div")(blockName, "modal-content", ({ type, removePadding }) => ({
|
|
18
|
+
[type]: type,
|
|
19
|
+
"remove-padding": removePadding
|
|
20
|
+
}));
|
|
21
|
+
const ModalWrapper = aggregatedClasses("div")(blockName, "modal-wrapper", ({ type, removePadding }) => ({
|
|
22
|
+
[type]: type,
|
|
23
|
+
"remove-padding": removePadding
|
|
24
|
+
}));
|
|
25
|
+
const ModalFooter = aggregatedClasses("div")(blockName, "modal-footer", ({ type, additionalFooterCssClass }) => ({
|
|
26
|
+
[type]: type,
|
|
27
|
+
[additionalFooterCssClass]: additionalFooterCssClass
|
|
28
|
+
}));
|
|
29
|
+
const ModalFooterActions = aggregatedClasses("div")(blockName, "modal-footer-actions", ({ type }) => ({
|
|
30
|
+
[type]: type
|
|
31
|
+
}));
|
|
32
|
+
export {
|
|
33
|
+
ModalContent,
|
|
34
|
+
ModalFeedback,
|
|
35
|
+
ModalFooter,
|
|
36
|
+
ModalFooterActions,
|
|
37
|
+
ModalHeader,
|
|
38
|
+
ModalHeaderTopRight,
|
|
39
|
+
ModalTitle,
|
|
40
|
+
ModalWrapper
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=blocks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/blocks.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'modal-v2';\n\nexport const ModalHeader = aggregatedClasses('div')(blockName, 'modal-header', ({ type, showClose }) => ({\n [type]: type,\n 'with-close': showClose,\n}));\n\nexport const ModalHeaderTopRight = aggregatedClasses('div')(blockName, 'modal-header-close', ({ type }) => ({\n [type]: type,\n}));\n\nexport const ModalFeedback = aggregatedClasses('div')(blockName, 'modal-feedback', ({ type }) => ({\n [type]: type,\n}));\n\nexport const ModalTitle = aggregatedClasses('h3')(blockName, 'modal-title', ({ type }) => ({\n [type]: type,\n}));\n\nexport const ModalContent = aggregatedClasses('div')(blockName, 'modal-content', ({ type, removePadding }) => ({\n [type]: type,\n 'remove-padding': removePadding,\n}));\n\nexport const ModalWrapper = aggregatedClasses('div')(blockName, 'modal-wrapper', ({ type, removePadding }) => ({\n [type]: type,\n 'remove-padding': removePadding,\n}));\n\nexport const ModalFooter = aggregatedClasses('div')(\n blockName,\n 'modal-footer',\n ({ type, additionalFooterCssClass }) => ({\n [type]: type,\n [additionalFooterCssClass]: additionalFooterCssClass,\n }),\n);\n\nexport const ModalFooterActions = aggregatedClasses('div')(blockName, 'modal-footer-actions', ({ type }) => ({\n [type]: type,\n}));\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA,MAAM,YAAY;AAEX,MAAM,cAAc,kBAAkB,OAAO,WAAW,gBAAgB,CAAC,EAAE,MAAM,gBAAiB;AAAA,GACtG,OAAO;AAAA,EACR,cAAc;AAAA;AAGT,MAAM,sBAAsB,kBAAkB,OAAO,WAAW,sBAAsB,CAAC,EAAE,WAAY;AAAA,GACzG,OAAO;AAAA;AAGH,MAAM,gBAAgB,kBAAkB,OAAO,WAAW,kBAAkB,CAAC,EAAE,WAAY;AAAA,GAC/F,OAAO;AAAA;AAGH,MAAM,aAAa,kBAAkB,MAAM,WAAW,eAAe,CAAC,EAAE,WAAY;AAAA,GACxF,OAAO;AAAA;AAGH,MAAM,eAAe,kBAAkB,OAAO,WAAW,iBAAiB,CAAC,EAAE,MAAM,oBAAqB;AAAA,GAC5G,OAAO;AAAA,EACR,kBAAkB;AAAA;AAGb,MAAM,eAAe,kBAAkB,OAAO,WAAW,iBAAiB,CAAC,EAAE,MAAM,oBAAqB;AAAA,GAC5G,OAAO;AAAA,EACR,kBAAkB;AAAA;AAGb,MAAM,cAAc,kBAAkB,OAC3C,WACA,gBACA,CAAC,EAAE,MAAM,+BAAgC;AAAA,GACtC,OAAO;AAAA,GACP,2BAA2B;AAAA;AAIzB,MAAM,qBAAqB,kBAAkB,OAAO,WAAW,wBAAwB,CAAC,EAAE,WAAY;AAAA,GAC1G,OAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { Close } from "@elliemae/ds-icons";
|
|
4
|
+
import DSButton from "@elliemae/ds-button";
|
|
5
|
+
import { ModalHeader } from "../blocks";
|
|
6
|
+
const DecisionHeader = ({ onClose, showClose }) => /* @__PURE__ */ React2.createElement(ModalHeader, {
|
|
7
|
+
classProps: { type: "decision", showClose }
|
|
8
|
+
}, showClose && /* @__PURE__ */ React2.createElement(DSButton, {
|
|
9
|
+
buttonType: "link",
|
|
10
|
+
containerProps: { "data-testid": "modal-button-close" },
|
|
11
|
+
icon: /* @__PURE__ */ React2.createElement(Close, null),
|
|
12
|
+
onClick: onClose
|
|
13
|
+
}));
|
|
14
|
+
var DecisionHeader_default = DecisionHeader;
|
|
15
|
+
export {
|
|
16
|
+
DecisionHeader,
|
|
17
|
+
DecisionHeader_default as default
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=DecisionHeader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/DecisionHeader.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalHeader } from '../blocks';\n\nexport const DecisionHeader = ({ onClose, showClose }) => (\n <ModalHeader classProps={{ type: 'decision', showClose }}>\n {showClose && (\n <DSButton\n buttonType=\"link\"\n containerProps={{ 'data-testid': 'modal-button-close' }}\n icon={<Close />}\n onClick={onClose}\n />\n )}\n </ModalHeader>\n);\n\nexport default DecisionHeader;\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEO,MAAM,iBAAiB,CAAC,EAAE,SAAS,gBACxC,qCAAC,aAAD;AAAA,EAAa,YAAY,EAAE,MAAM,YAAY;AAAA,GAC1C,aACC,qCAAC,UAAD;AAAA,EACE,YAAW;AAAA,EACX,gBAAgB,EAAE,eAAe;AAAA,EACjC,MAAM,qCAAC,OAAD;AAAA,EACN,SAAS;AAAA;AAMjB,IAAO,yBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { ErrorHexegon, WarningTriangle, CheckmarkCircle, HelpCircle, InfoCircle } from "@elliemae/ds-icons";
|
|
4
|
+
import { MODAL_SUB_TYPE_V2 } from "../../constants";
|
|
5
|
+
import { ModalFeedback } from "../blocks";
|
|
6
|
+
const feedbackIconSize = "xxl";
|
|
7
|
+
const getIconType = (subtype) => {
|
|
8
|
+
switch (subtype) {
|
|
9
|
+
case MODAL_SUB_TYPE_V2.WARNING:
|
|
10
|
+
return /* @__PURE__ */ React2.createElement(WarningTriangle, {
|
|
11
|
+
"data-testid": "icon-waring",
|
|
12
|
+
size: feedbackIconSize
|
|
13
|
+
});
|
|
14
|
+
case MODAL_SUB_TYPE_V2.ERROR:
|
|
15
|
+
return /* @__PURE__ */ React2.createElement(ErrorHexegon, {
|
|
16
|
+
"data-testid": "icon-error",
|
|
17
|
+
size: feedbackIconSize
|
|
18
|
+
});
|
|
19
|
+
case MODAL_SUB_TYPE_V2.SUCCESS:
|
|
20
|
+
return /* @__PURE__ */ React2.createElement(CheckmarkCircle, {
|
|
21
|
+
"data-testid": "icon-success",
|
|
22
|
+
size: feedbackIconSize
|
|
23
|
+
});
|
|
24
|
+
case MODAL_SUB_TYPE_V2.INFORMATION:
|
|
25
|
+
return /* @__PURE__ */ React2.createElement(InfoCircle, {
|
|
26
|
+
"data-testid": "icon-information",
|
|
27
|
+
size: feedbackIconSize
|
|
28
|
+
});
|
|
29
|
+
default:
|
|
30
|
+
return /* @__PURE__ */ React2.createElement(HelpCircle, {
|
|
31
|
+
"data-testid": "icon-help",
|
|
32
|
+
size: feedbackIconSize
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const FeedbackIcon = ({ modalSubType }) => /* @__PURE__ */ React2.createElement(ModalFeedback, {
|
|
37
|
+
classProps: { type: modalSubType }
|
|
38
|
+
}, getIconType(modalSubType));
|
|
39
|
+
var FeedbackIcon_default = FeedbackIcon;
|
|
40
|
+
export {
|
|
41
|
+
FeedbackIcon,
|
|
42
|
+
FeedbackIcon_default as default
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=FeedbackIcon.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/FeedbackIcon.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ErrorHexegon, WarningTriangle, CheckmarkCircle, HelpCircle, InfoCircle } from '@elliemae/ds-icons';\n\nimport { MODAL_SUB_TYPE_V2 } from '../../constants';\nimport { ModalFeedback } from '../blocks';\n\nconst feedbackIconSize = 'xxl';\n\nconst getIconType = (subtype) => {\n switch (subtype) {\n case MODAL_SUB_TYPE_V2.WARNING:\n return <WarningTriangle data-testid=\"icon-waring\" size={feedbackIconSize} />;\n case MODAL_SUB_TYPE_V2.ERROR:\n return <ErrorHexegon data-testid=\"icon-error\" size={feedbackIconSize} />;\n case MODAL_SUB_TYPE_V2.SUCCESS:\n return <CheckmarkCircle data-testid=\"icon-success\" size={feedbackIconSize} />;\n case MODAL_SUB_TYPE_V2.INFORMATION:\n return <InfoCircle data-testid=\"icon-information\" size={feedbackIconSize} />;\n default:\n return <HelpCircle data-testid=\"icon-help\" size={feedbackIconSize} />;\n }\n};\n\nexport const FeedbackIcon = ({ modalSubType }) => (\n <ModalFeedback classProps={{ type: modalSubType }}>{getIconType(modalSubType)}</ModalFeedback>\n);\n\nexport default FeedbackIcon;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA;AACA;AAEA,MAAM,mBAAmB;AAEzB,MAAM,cAAc,CAAC,YAAY;AAC/B,UAAQ;AAAA,SACD,kBAAkB;AACrB,aAAO,qCAAC,iBAAD;AAAA,QAAiB,eAAY;AAAA,QAAc,MAAM;AAAA;AAAA,SACrD,kBAAkB;AACrB,aAAO,qCAAC,cAAD;AAAA,QAAc,eAAY;AAAA,QAAa,MAAM;AAAA;AAAA,SACjD,kBAAkB;AACrB,aAAO,qCAAC,iBAAD;AAAA,QAAiB,eAAY;AAAA,QAAe,MAAM;AAAA;AAAA,SACtD,kBAAkB;AACrB,aAAO,qCAAC,YAAD;AAAA,QAAY,eAAY;AAAA,QAAmB,MAAM;AAAA;AAAA;AAExD,aAAO,qCAAC,YAAD;AAAA,QAAY,eAAY;AAAA,QAAY,MAAM;AAAA;AAAA;AAAA;AAIhD,MAAM,eAAe,CAAC,EAAE,mBAC7B,qCAAC,eAAD;AAAA,EAAe,YAAY,EAAE,MAAM;AAAA,GAAiB,YAAY;AAGlE,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import React2 from "react";
|
|
19
|
+
import DSButton from "@elliemae/ds-button";
|
|
20
|
+
import { ModalFooter, ModalFooterActions } from "../blocks";
|
|
21
|
+
const Footer = ({
|
|
22
|
+
additionalFooterCssClass,
|
|
23
|
+
actionsRef,
|
|
24
|
+
rejectLabel,
|
|
25
|
+
onReject,
|
|
26
|
+
overridePropsRejectButton,
|
|
27
|
+
confirmLabel,
|
|
28
|
+
onConfirm,
|
|
29
|
+
overridePropsConfirmButton,
|
|
30
|
+
showRejectButton
|
|
31
|
+
}) => /* @__PURE__ */ React2.createElement(ModalFooter, {
|
|
32
|
+
classProps: { additionalFooterCssClass },
|
|
33
|
+
"data-testid": "modal-footer-wrapper"
|
|
34
|
+
}, /* @__PURE__ */ React2.createElement(ModalFooterActions, {
|
|
35
|
+
ref: actionsRef
|
|
36
|
+
}, showRejectButton === true && /* @__PURE__ */ React2.createElement(DSButton, __spreadValues({
|
|
37
|
+
buttonType: "secondary",
|
|
38
|
+
className: "action-reject",
|
|
39
|
+
containerProps: { "data-testid": "modal-footer-reject-btn" },
|
|
40
|
+
labelText: rejectLabel,
|
|
41
|
+
onClick: onReject
|
|
42
|
+
}, overridePropsRejectButton)), /* @__PURE__ */ React2.createElement(DSButton, __spreadValues({
|
|
43
|
+
buttonType: "primary",
|
|
44
|
+
className: "action-confirm",
|
|
45
|
+
containerProps: { "data-testid": "modal-footer-confirm-btn" },
|
|
46
|
+
labelText: confirmLabel,
|
|
47
|
+
onClick: onConfirm
|
|
48
|
+
}, overridePropsConfirmButton))));
|
|
49
|
+
var Footer_default = Footer;
|
|
50
|
+
export {
|
|
51
|
+
Footer,
|
|
52
|
+
Footer_default as default
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=Footer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/Footer.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalFooter, ModalFooterActions } from '../blocks';\n\nexport const Footer = ({\n additionalFooterCssClass,\n actionsRef,\n rejectLabel,\n onReject,\n overridePropsRejectButton,\n confirmLabel,\n onConfirm,\n overridePropsConfirmButton,\n showRejectButton,\n}) => (\n <ModalFooter classProps={{ additionalFooterCssClass }} data-testid=\"modal-footer-wrapper\">\n <ModalFooterActions ref={actionsRef}>\n {showRejectButton === true && (\n <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...overridePropsRejectButton}\n />\n )}\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...overridePropsConfirmButton}\n />\n </ModalFooterActions>\n </ModalFooter>\n);\n\nexport default Footer;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AAEO,MAAM,SAAS,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEA,qCAAC,aAAD;AAAA,EAAa,YAAY,EAAE;AAAA,EAA4B,eAAY;AAAA,GACjE,qCAAC,oBAAD;AAAA,EAAoB,KAAK;AAAA,GACtB,qBAAqB,QACpB,qCAAC,UAAD;AAAA,EACE,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe;AAAA,EACjC,WAAW;AAAA,EACX,SAAS;AAAA,GACL,6BAGR,qCAAC,UAAD;AAAA,EACE,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe;AAAA,EACjC,WAAW;AAAA,EACX,SAAS;AAAA,GACL;AAMZ,IAAO,iBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { Close } from "@elliemae/ds-icons";
|
|
4
|
+
import DSButton from "@elliemae/ds-button";
|
|
5
|
+
import { ModalHeader, ModalHeaderTopRight } from "../blocks";
|
|
6
|
+
import { Title } from "./Title";
|
|
7
|
+
const FormHeader = ({ showClose, modalTitle, modalType, onClose }) => /* @__PURE__ */ React2.createElement(ModalHeader, {
|
|
8
|
+
classProps: { type: "selection" }
|
|
9
|
+
}, /* @__PURE__ */ React2.createElement(Title, {
|
|
10
|
+
modalTitle,
|
|
11
|
+
modalType
|
|
12
|
+
}), /* @__PURE__ */ React2.createElement(ModalHeaderTopRight, {
|
|
13
|
+
classProps: { type: "form" }
|
|
14
|
+
}, showClose && /* @__PURE__ */ React2.createElement(DSButton, {
|
|
15
|
+
buttonType: "link",
|
|
16
|
+
containerProps: { "data-testid": "modal-close-btn" },
|
|
17
|
+
icon: /* @__PURE__ */ React2.createElement(Close, null),
|
|
18
|
+
onClick: onClose
|
|
19
|
+
})));
|
|
20
|
+
var FormHeader_default = FormHeader;
|
|
21
|
+
export {
|
|
22
|
+
FormHeader,
|
|
23
|
+
FormHeader_default as default
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=FormHeader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/FormHeader.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalHeader, ModalHeaderTopRight } from '../blocks';\nimport { Title } from './Title';\n\nexport const FormHeader = ({ showClose, modalTitle, modalType, onClose }) => (\n <ModalHeader classProps={{ type: 'selection' }}>\n <Title modalTitle={modalTitle} modalType={modalType} />\n <ModalHeaderTopRight classProps={{ type: 'form' }}>\n {showClose && (\n <DSButton\n buttonType=\"link\"\n containerProps={{ 'data-testid': 'modal-close-btn' }}\n icon={<Close />}\n onClick={onClose}\n />\n )}\n </ModalHeaderTopRight>\n </ModalHeader>\n);\n\nexport default FormHeader;\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AAEO,MAAM,aAAa,CAAC,EAAE,WAAW,YAAY,WAAW,cAC7D,qCAAC,aAAD;AAAA,EAAa,YAAY,EAAE,MAAM;AAAA,GAC/B,qCAAC,OAAD;AAAA,EAAO;AAAA,EAAwB;AAAA,IAC/B,qCAAC,qBAAD;AAAA,EAAqB,YAAY,EAAE,MAAM;AAAA,GACtC,aACC,qCAAC,UAAD;AAAA,EACE,YAAW;AAAA,EACX,gBAAgB,EAAE,eAAe;AAAA,EACjC,MAAM,qCAAC,OAAD;AAAA,EACN,SAAS;AAAA;AAOnB,IAAO,qBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import React2 from "react";
|
|
19
|
+
import { MODAL_TYPE_V2 } from "../../constants";
|
|
20
|
+
import { SelectionHeader } from "./SelectionHeader";
|
|
21
|
+
import { DecisionHeader } from "./DecisionHeader";
|
|
22
|
+
import { FormHeader } from "./FormHeader";
|
|
23
|
+
import { FeedbackIcon } from "./FeedbackIcon";
|
|
24
|
+
import { Footer } from "./Footer";
|
|
25
|
+
import { Title } from "./Title";
|
|
26
|
+
import {
|
|
27
|
+
showDecision,
|
|
28
|
+
showFeedBack,
|
|
29
|
+
showFooter,
|
|
30
|
+
showSelection,
|
|
31
|
+
showForm
|
|
32
|
+
} from "../helpers";
|
|
33
|
+
import { ModalContent, ModalWrapper } from "../blocks";
|
|
34
|
+
const DSModalContent = ({
|
|
35
|
+
containerProps = {},
|
|
36
|
+
modalType = MODAL_TYPE_V2.INFORMATION,
|
|
37
|
+
modalSubType = null,
|
|
38
|
+
modalTitle = "",
|
|
39
|
+
showRejectButton = false,
|
|
40
|
+
showClose = true,
|
|
41
|
+
searchProps = {},
|
|
42
|
+
actionsRef = () => null,
|
|
43
|
+
additionalFooterCssClass,
|
|
44
|
+
overridePropsConfirmButton = {},
|
|
45
|
+
overridePropsRejectButton = {},
|
|
46
|
+
children,
|
|
47
|
+
onClose = () => null,
|
|
48
|
+
onConfirm = () => null,
|
|
49
|
+
onReject = () => null,
|
|
50
|
+
rejectLabel = "Discard",
|
|
51
|
+
confirmLabel = "Save",
|
|
52
|
+
removePadding = false
|
|
53
|
+
}) => /* @__PURE__ */ React2.createElement(ModalWrapper, __spreadValues({}, containerProps), showForm({ modalType, modalSubType }) && /* @__PURE__ */ React2.createElement(FormHeader, {
|
|
54
|
+
modalTitle,
|
|
55
|
+
modalType,
|
|
56
|
+
onClose,
|
|
57
|
+
showClose
|
|
58
|
+
}), showSelection({ modalType, modalSubType }) && /* @__PURE__ */ React2.createElement(SelectionHeader, {
|
|
59
|
+
modalTitle,
|
|
60
|
+
modalType,
|
|
61
|
+
searchProps,
|
|
62
|
+
showClose
|
|
63
|
+
}), showDecision({ modalType, modalSubType }) && /* @__PURE__ */ React2.createElement(DecisionHeader, {
|
|
64
|
+
onClose,
|
|
65
|
+
showClose
|
|
66
|
+
}), showFeedBack({ modalType, modalSubType }) && /* @__PURE__ */ React2.createElement(FeedbackIcon, {
|
|
67
|
+
modalSubType
|
|
68
|
+
}), showDecision({ modalType, modalSubType }) && /* @__PURE__ */ React2.createElement(Title, {
|
|
69
|
+
modalTitle,
|
|
70
|
+
modalType
|
|
71
|
+
}), /* @__PURE__ */ React2.createElement(ModalContent, {
|
|
72
|
+
classProps: { type: modalType, removePadding }
|
|
73
|
+
}, children), showFooter({ modalType, modalSubType }) && /* @__PURE__ */ React2.createElement(Footer, {
|
|
74
|
+
actionsRef,
|
|
75
|
+
additionalFooterCssClass,
|
|
76
|
+
confirmLabel,
|
|
77
|
+
onConfirm,
|
|
78
|
+
onReject,
|
|
79
|
+
overridePropsConfirmButton,
|
|
80
|
+
overridePropsRejectButton,
|
|
81
|
+
rejectLabel,
|
|
82
|
+
showRejectButton
|
|
83
|
+
}));
|
|
84
|
+
export {
|
|
85
|
+
DSModalContent
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=ModalContent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/ModalContent.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { MODAL_TYPE_V2 } from '../../constants';\nimport { SelectionHeader } from './SelectionHeader';\nimport { DecisionHeader } from './DecisionHeader';\nimport { FormHeader } from './FormHeader';\nimport { FeedbackIcon } from './FeedbackIcon';\nimport { Footer } from './Footer';\nimport { Title } from './Title';\nimport {\n showDecision,\n showFeedBack,\n showFooter,\n showSelection,\n showForm,\n} from '../helpers';\nimport { ModalContent, ModalWrapper } from '../blocks';\n\nexport const DSModalContent = ({\n containerProps = {},\n //\n modalType = MODAL_TYPE_V2.INFORMATION,\n modalSubType = null,\n modalTitle = '',\n showRejectButton = false,\n showClose = true,\n searchProps = {},\n // override\n actionsRef = () => null,\n additionalFooterCssClass,\n overridePropsConfirmButton = {},\n overridePropsRejectButton = {},\n // react modal\n children,\n onClose = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Discard',\n confirmLabel = 'Save',\n removePadding = false,\n}) => (\n <ModalWrapper {...containerProps}>\n {showForm({ modalType, modalSubType }) && (\n <FormHeader\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={onClose}\n showClose={showClose}\n />\n )}\n {showSelection({ modalType, modalSubType }) && (\n <SelectionHeader\n modalTitle={modalTitle}\n modalType={modalType}\n searchProps={searchProps}\n showClose={showClose}\n />\n )}\n {showDecision({ modalType, modalSubType }) && (\n <DecisionHeader onClose={onClose} showClose={showClose} />\n )}\n {showFeedBack({ modalType, modalSubType }) && (\n <FeedbackIcon modalSubType={modalSubType} />\n )}\n {showDecision({ modalType, modalSubType }) && (\n <Title modalTitle={modalTitle} modalType={modalType} />\n )}\n <ModalContent classProps={{ type: modalType, removePadding }}>\n {children}\n </ModalContent>\n {showFooter({ modalType, modalSubType }) && (\n <Footer\n actionsRef={actionsRef}\n additionalFooterCssClass={additionalFooterCssClass}\n confirmLabel={confirmLabel}\n onConfirm={onConfirm}\n onReject={onReject}\n overridePropsConfirmButton={overridePropsConfirmButton}\n overridePropsRejectButton={overridePropsRejectButton}\n rejectLabel={rejectLabel}\n showRejectButton={showRejectButton}\n />\n )}\n </ModalWrapper>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AAEO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,iBAAiB;AAAA,EAEjB,YAAY,cAAc;AAAA,EAC1B,eAAe;AAAA,EACf,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,cAAc;AAAA,EAEd,aAAa,MAAM;AAAA,EACnB;AAAA,EACA,6BAA6B;AAAA,EAC7B,4BAA4B;AAAA,EAE5B;AAAA,EACA,UAAU,MAAM;AAAA,EAChB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,gBAAgB;AAAA,MAEhB,qCAAC,cAAD,mBAAkB,iBACf,SAAS,EAAE,WAAW,mBACrB,qCAAC,YAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,IAGH,cAAc,EAAE,WAAW,mBAC1B,qCAAC,iBAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,IAGH,aAAa,EAAE,WAAW,mBACzB,qCAAC,gBAAD;AAAA,EAAgB;AAAA,EAAkB;AAAA,IAEnC,aAAa,EAAE,WAAW,mBACzB,qCAAC,cAAD;AAAA,EAAc;AAAA,IAEf,aAAa,EAAE,WAAW,mBACzB,qCAAC,OAAD;AAAA,EAAO;AAAA,EAAwB;AAAA,IAEjC,qCAAC,cAAD;AAAA,EAAc,YAAY,EAAE,MAAM,WAAW;AAAA,GAC1C,WAEF,WAAW,EAAE,WAAW,mBACvB,qCAAC,QAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import React2 from "react";
|
|
19
|
+
import { DSSearchBox } from "@elliemae/ds-form";
|
|
20
|
+
import { ModalHeader, ModalHeaderTopRight } from "../blocks";
|
|
21
|
+
import { Title } from "./Title";
|
|
22
|
+
const SelectionHeader = ({ searchProps = {}, modalTitle, modalType, showClose }) => /* @__PURE__ */ React2.createElement(ModalHeader, {
|
|
23
|
+
classProps: { type: "selection" }
|
|
24
|
+
}, /* @__PURE__ */ React2.createElement(Title, {
|
|
25
|
+
modalTitle,
|
|
26
|
+
modalType
|
|
27
|
+
}), showClose && /* @__PURE__ */ React2.createElement(ModalHeaderTopRight, {
|
|
28
|
+
classProps: { type: "selection" },
|
|
29
|
+
"data-testid": "modal-search-box"
|
|
30
|
+
}, /* @__PURE__ */ React2.createElement(DSSearchBox, __spreadValues({}, searchProps))));
|
|
31
|
+
var SelectionHeader_default = SelectionHeader;
|
|
32
|
+
export {
|
|
33
|
+
SelectionHeader,
|
|
34
|
+
SelectionHeader_default as default
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=SelectionHeader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/SelectionHeader.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { DSSearchBox } from '@elliemae/ds-form';\nimport { ModalHeader, ModalHeaderTopRight } from '../blocks';\nimport { Title } from './Title';\n\nexport const SelectionHeader = ({ searchProps = {}, modalTitle, modalType, showClose }) => (\n <ModalHeader classProps={{ type: 'selection' }}>\n <Title modalTitle={modalTitle} modalType={modalType} />\n {showClose && (\n <ModalHeaderTopRight classProps={{ type: 'selection' }} data-testid=\"modal-search-box\">\n <DSSearchBox {...searchProps} />\n </ModalHeaderTopRight>\n )}\n </ModalHeader>\n);\n\nexport default SelectionHeader;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AAEO,MAAM,kBAAkB,CAAC,EAAE,cAAc,IAAI,YAAY,WAAW,gBACzE,qCAAC,aAAD;AAAA,EAAa,YAAY,EAAE,MAAM;AAAA,GAC/B,qCAAC,OAAD;AAAA,EAAO;AAAA,EAAwB;AAAA,IAC9B,aACC,qCAAC,qBAAD;AAAA,EAAqB,YAAY,EAAE,MAAM;AAAA,EAAe,eAAY;AAAA,GAClE,qCAAC,aAAD,mBAAiB;AAMzB,IAAO,0BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { ModalTitle } from "../blocks";
|
|
4
|
+
const Title = ({ modalTitle, modalType }) => /* @__PURE__ */ React2.createElement(ModalTitle, {
|
|
5
|
+
classProps: { type: modalType }
|
|
6
|
+
}, modalTitle);
|
|
7
|
+
var Title_default = Title;
|
|
8
|
+
export {
|
|
9
|
+
Title,
|
|
10
|
+
Title_default as default
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=Title.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/Title.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { ModalTitle } from '../blocks';\n\nexport const Title = ({ modalTitle, modalType }) => (\n <ModalTitle classProps={{ type: modalType }}>{modalTitle}</ModalTitle>\n);\n\nexport default Title;\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AAEO,MAAM,QAAQ,CAAC,EAAE,YAAY,gBAClC,qCAAC,YAAD;AAAA,EAAY,YAAY,EAAE,MAAM;AAAA,GAAc;AAGhD,IAAO,gBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from "../constants";
|
|
3
|
+
function showDecision({ modalType }) {
|
|
4
|
+
return [MODAL_TYPE_V2.INFORMATION, MODAL_TYPE_V2.DECISION].indexOf(modalType) > -1;
|
|
5
|
+
}
|
|
6
|
+
function showFeedBack({ modalType, modalSubType }) {
|
|
7
|
+
return showDecision({ modalType }) && Object.values(MODAL_SUB_TYPE_V2).indexOf(modalSubType) > -1;
|
|
8
|
+
}
|
|
9
|
+
function showFooter({ modalType }) {
|
|
10
|
+
return modalType !== MODAL_TYPE_V2.INFORMATION;
|
|
11
|
+
}
|
|
12
|
+
function showSelection({ modalType }) {
|
|
13
|
+
return modalType === MODAL_TYPE_V2.SELECTION;
|
|
14
|
+
}
|
|
15
|
+
function showForm({ modalType }) {
|
|
16
|
+
return modalType === MODAL_TYPE_V2.FORM;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
showDecision,
|
|
20
|
+
showFeedBack,
|
|
21
|
+
showFooter,
|
|
22
|
+
showForm,
|
|
23
|
+
showSelection
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/helpers.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from '../constants';\n\nexport function showDecision({ modalType }) {\n return (\n [MODAL_TYPE_V2.INFORMATION, MODAL_TYPE_V2.DECISION].indexOf(modalType) > -1\n );\n}\n\nexport function showFeedBack({ modalType, modalSubType }) {\n return (\n showDecision({ modalType }) &&\n Object.values(MODAL_SUB_TYPE_V2).indexOf(modalSubType) > -1\n );\n}\n\nexport function showFooter({ modalType }) {\n return modalType !== MODAL_TYPE_V2.INFORMATION;\n}\n\nexport function showSelection({ modalType }) {\n return modalType === MODAL_TYPE_V2.SELECTION;\n}\nexport function showForm({ modalType }) {\n return modalType === MODAL_TYPE_V2.FORM;\n}\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,sBAAsB,EAAE,aAAa;AAC1C,SACE,CAAC,cAAc,aAAa,cAAc,UAAU,QAAQ,aAAa;AAAA;AAItE,sBAAsB,EAAE,WAAW,gBAAgB;AACxD,SACE,aAAa,EAAE,gBACf,OAAO,OAAO,mBAAmB,QAAQ,gBAAgB;AAAA;AAItD,oBAAoB,EAAE,aAAa;AACxC,SAAO,cAAc,cAAc;AAAA;AAG9B,uBAAuB,EAAE,aAAa;AAC3C,SAAO,cAAc,cAAc;AAAA;AAE9B,kBAAkB,EAAE,aAAa;AACtC,SAAO,cAAc,cAAc;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|