@elliemae/ds-modal 2.2.0-next.6 → 2.3.0-alpha.1

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.
Files changed (71) hide show
  1. package/cjs/DSModal.js +86 -184
  2. package/cjs/DSModal.js.map +7 -0
  3. package/cjs/constants.js +67 -28
  4. package/cjs/constants.js.map +7 -0
  5. package/cjs/index.js +39 -18
  6. package/cjs/index.js.map +7 -0
  7. package/cjs/v1/DSModal.js +159 -130
  8. package/cjs/v1/DSModal.js.map +7 -0
  9. package/cjs/v1/DSModalType.js +45 -7
  10. package/cjs/v1/DSModalType.js.map +7 -0
  11. package/cjs/v1/DSModalWrapper.js +76 -113
  12. package/cjs/v1/DSModalWrapper.js.map +7 -0
  13. package/cjs/v1/ModalFeedBack/ModalFeedBack.js +77 -72
  14. package/cjs/v1/ModalFeedBack/ModalFeedBack.js.map +7 -0
  15. package/cjs/v2/DSModal.js +143 -186
  16. package/cjs/v2/DSModal.js.map +7 -0
  17. package/cjs/v2/blocks.js +69 -86
  18. package/cjs/v2/blocks.js.map +7 -0
  19. package/cjs/v2/components/DecisionHeader.js +47 -37
  20. package/cjs/v2/components/DecisionHeader.js.map +7 -0
  21. package/cjs/v2/components/FeedbackIcon.js +59 -50
  22. package/cjs/v2/components/FeedbackIcon.js.map +7 -0
  23. package/cjs/v2/components/Footer.js +68 -65
  24. package/cjs/v2/components/Footer.js.map +7 -0
  25. package/cjs/v2/components/FormHeader.js +53 -46
  26. package/cjs/v2/components/FormHeader.js.map +7 -0
  27. package/cjs/v2/components/ModalContent.js +95 -111
  28. package/cjs/v2/components/ModalContent.js.map +7 -0
  29. package/cjs/v2/components/SelectionHeader.js +50 -48
  30. package/cjs/v2/components/SelectionHeader.js.map +7 -0
  31. package/cjs/v2/components/Title.js +40 -25
  32. package/cjs/v2/components/Title.js.map +7 -0
  33. package/cjs/v2/helpers.js +49 -40
  34. package/cjs/v2/helpers.js.map +7 -0
  35. package/esm/DSModal.js +26 -142
  36. package/esm/DSModal.js.map +7 -0
  37. package/esm/constants.js +38 -20
  38. package/esm/constants.js.map +7 -0
  39. package/esm/index.js +10 -4
  40. package/esm/index.js.map +7 -0
  41. package/esm/v1/DSModal.js +130 -121
  42. package/esm/v1/DSModal.js.map +7 -0
  43. package/esm/v1/DSModalType.js +16 -3
  44. package/esm/v1/DSModalType.js.map +7 -0
  45. package/esm/v1/DSModalWrapper.js +45 -105
  46. package/esm/v1/DSModalWrapper.js.map +7 -0
  47. package/esm/v1/ModalFeedBack/ModalFeedBack.js +48 -66
  48. package/esm/v1/ModalFeedBack/ModalFeedBack.js.map +7 -0
  49. package/esm/v2/DSModal.js +112 -173
  50. package/esm/v2/DSModal.js.map +7 -0
  51. package/esm/v2/blocks.js +42 -77
  52. package/esm/v2/blocks.js.map +7 -0
  53. package/esm/v2/components/DecisionHeader.js +18 -27
  54. package/esm/v2/components/DecisionHeader.js.map +7 -0
  55. package/esm/v2/components/FeedbackIcon.js +25 -36
  56. package/esm/v2/components/FeedbackIcon.js.map +7 -0
  57. package/esm/v2/components/Footer.js +39 -54
  58. package/esm/v2/components/Footer.js.map +7 -0
  59. package/esm/v2/components/FormHeader.js +24 -36
  60. package/esm/v2/components/FormHeader.js.map +7 -0
  61. package/esm/v2/components/ModalContent.js +72 -102
  62. package/esm/v2/components/ModalContent.js.map +7 -0
  63. package/esm/v2/components/SelectionHeader.js +21 -38
  64. package/esm/v2/components/SelectionHeader.js.map +7 -0
  65. package/esm/v2/components/Title.js +11 -16
  66. package/esm/v2/components/Title.js.map +7 -0
  67. package/esm/v2/helpers.js +16 -28
  68. package/esm/v2/helpers.js.map +7 -0
  69. package/package.json +8 -8
  70. package/types/DSModal.d.ts +1 -1
  71. package/types/v2/DSModal.d.ts +1 -30
@@ -1,49 +1,51 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.filter.js');
6
- require('core-js/modules/esnext.iterator.constructor.js');
7
- require('core-js/modules/esnext.iterator.filter.js');
8
- require('core-js/modules/esnext.async-iterator.for-each.js');
9
- require('core-js/modules/esnext.iterator.for-each.js');
10
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
11
- var _jsx = require('@babel/runtime/helpers/jsx');
12
- require('react');
13
- var dsForm = require('@elliemae/ds-form');
14
- var blocks = require('../blocks.js');
15
- var Title = require('./Title.js');
16
- var jsxRuntime = require('react/jsx-runtime');
17
-
18
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
-
20
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
21
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
22
-
23
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
-
25
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
26
- const SelectionHeader = _ref => {
27
- let {
28
- searchProps = {},
29
- modalTitle,
30
- modalType,
31
- showClose
32
- } = _ref;
33
- return /*#__PURE__*/_jsx__default["default"](blocks.ModalHeader, {
34
- classProps: {
35
- type: 'selection'
36
- }
37
- }, void 0, /*#__PURE__*/_jsx__default["default"](Title.Title, {
38
- modalTitle: modalTitle,
39
- modalType: modalType
40
- }), showClose && /*#__PURE__*/_jsx__default["default"](blocks.ModalHeaderTopRight, {
41
- classProps: {
42
- type: 'selection'
43
- },
44
- "data-testid": "modal-search-box"
45
- }, void 0, /*#__PURE__*/jsxRuntime.jsx(dsForm.DSSearchBox, _objectSpread({}, searchProps))));
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
46
11
  };
47
-
48
- exports.SelectionHeader = SelectionHeader;
49
- exports["default"] = SelectionHeader;
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var SelectionHeader_exports = {};
29
+ __export(SelectionHeader_exports, {
30
+ SelectionHeader: () => SelectionHeader,
31
+ default: () => SelectionHeader_default
32
+ });
33
+ var React = __toESM(require("react"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_ds_form = require("@elliemae/ds-form");
36
+ var import_blocks = require("../blocks");
37
+ var import_Title = require("./Title");
38
+ const SelectionHeader = ({ searchProps = {}, modalTitle, modalType, showClose }) => /* @__PURE__ */ import_react.default.createElement(import_blocks.ModalHeader, {
39
+ classProps: { type: "selection" }
40
+ }, /* @__PURE__ */ import_react.default.createElement(import_Title.Title, {
41
+ modalTitle,
42
+ modalType
43
+ }), showClose && /* @__PURE__ */ import_react.default.createElement(import_blocks.ModalHeaderTopRight, {
44
+ classProps: { type: "selection" },
45
+ "data-testid": "modal-search-box"
46
+ }, /* @__PURE__ */ import_react.default.createElement(import_ds_form.DSSearchBox, {
47
+ ...searchProps
48
+ })));
49
+ var SelectionHeader_default = SelectionHeader;
50
+ module.exports = __toCommonJS(SelectionHeader_exports);
51
+ //# sourceMappingURL=SelectionHeader.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/v2/components/SelectionHeader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,qBAA4B;AAC5B,oBAAiD;AACjD,mBAAsB;AAEf,MAAM,kBAAkB,CAAC,EAAE,cAAc,IAAI,YAAY,WAAW,gBACzE,mDAAC,2BAAD;AAAA,EAAa,YAAY,EAAE,MAAM;AAAA,GAC/B,mDAAC,oBAAD;AAAA,EAAO;AAAA,EAAwB;AAAA,IAC9B,aACC,mDAAC,mCAAD;AAAA,EAAqB,YAAY,EAAE,MAAM;AAAA,EAAe,eAAY;AAAA,GAClE,mDAAC,4BAAD;AAAA,KAAiB;AAAA;AAMzB,IAAO,0BAAQ;",
6
+ "names": []
7
+ }
@@ -1,26 +1,41 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- require('react');
7
- var blocks = require('../blocks.js');
8
-
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
12
-
13
- const Title = _ref => {
14
- let {
15
- modalTitle,
16
- modalType
17
- } = _ref;
18
- return /*#__PURE__*/_jsx__default["default"](blocks.ModalTitle, {
19
- classProps: {
20
- type: modalType
21
- }
22
- }, void 0, modalTitle);
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
23
11
  };
24
-
25
- exports.Title = Title;
26
- exports["default"] = Title;
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var Title_exports = {};
29
+ __export(Title_exports, {
30
+ Title: () => Title,
31
+ default: () => Title_default
32
+ });
33
+ var React = __toESM(require("react"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_blocks = require("../blocks");
36
+ const Title = ({ modalTitle, modalType }) => /* @__PURE__ */ import_react.default.createElement(import_blocks.ModalTitle, {
37
+ classProps: { type: modalType }
38
+ }, modalTitle);
39
+ var Title_default = Title;
40
+ module.exports = __toCommonJS(Title_exports);
41
+ //# sourceMappingURL=Title.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/v2/components/Title.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,oBAA2B;AAEpB,MAAM,QAAQ,CAAC,EAAE,YAAY,gBAClC,mDAAC,0BAAD;AAAA,EAAY,YAAY,EAAE,MAAM;AAAA,GAAc;AAGhD,IAAO,gBAAQ;",
6
+ "names": []
7
+ }
package/cjs/v2/helpers.js CHANGED
@@ -1,45 +1,54 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var constants = require('../constants.js');
6
-
7
- function showDecision(_ref) {
8
- let {
9
- modalType
10
- } = _ref;
11
- return [constants.MODAL_TYPE_V2.INFORMATION, constants.MODAL_TYPE_V2.DECISION].indexOf(modalType) > -1;
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var helpers_exports = {};
29
+ __export(helpers_exports, {
30
+ showDecision: () => showDecision,
31
+ showFeedBack: () => showFeedBack,
32
+ showFooter: () => showFooter,
33
+ showForm: () => showForm,
34
+ showSelection: () => showSelection
35
+ });
36
+ var React = __toESM(require("react"));
37
+ var import_constants = require("../constants");
38
+ function showDecision({ modalType }) {
39
+ return [import_constants.MODAL_TYPE_V2.INFORMATION, import_constants.MODAL_TYPE_V2.DECISION].indexOf(modalType) > -1;
12
40
  }
13
- function showFeedBack(_ref2) {
14
- let {
15
- modalType,
16
- modalSubType
17
- } = _ref2;
18
- return showDecision({
19
- modalType
20
- }) && Object.values(constants.MODAL_SUB_TYPE_V2).indexOf(modalSubType) > -1;
41
+ function showFeedBack({ modalType, modalSubType }) {
42
+ return showDecision({ modalType }) && Object.values(import_constants.MODAL_SUB_TYPE_V2).indexOf(modalSubType) > -1;
21
43
  }
22
- function showFooter(_ref3) {
23
- let {
24
- modalType
25
- } = _ref3;
26
- return modalType !== constants.MODAL_TYPE_V2.INFORMATION;
44
+ function showFooter({ modalType }) {
45
+ return modalType !== import_constants.MODAL_TYPE_V2.INFORMATION;
27
46
  }
28
- function showSelection(_ref4) {
29
- let {
30
- modalType
31
- } = _ref4;
32
- return modalType === constants.MODAL_TYPE_V2.SELECTION;
47
+ function showSelection({ modalType }) {
48
+ return modalType === import_constants.MODAL_TYPE_V2.SELECTION;
33
49
  }
34
- function showForm(_ref5) {
35
- let {
36
- modalType
37
- } = _ref5;
38
- return modalType === constants.MODAL_TYPE_V2.FORM;
50
+ function showForm({ modalType }) {
51
+ return modalType === import_constants.MODAL_TYPE_V2.FORM;
39
52
  }
40
-
41
- exports.showDecision = showDecision;
42
- exports.showFeedBack = showFeedBack;
43
- exports.showFooter = showFooter;
44
- exports.showForm = showForm;
45
- exports.showSelection = showSelection;
53
+ module.exports = __toCommonJS(helpers_exports);
54
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/v2/helpers.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAiD;AAE1C,sBAAsB,EAAE,aAAa;AAC1C,SACE,CAAC,+BAAc,aAAa,+BAAc,UAAU,QAAQ,aAAa;AAAA;AAItE,sBAAsB,EAAE,WAAW,gBAAgB;AACxD,SACE,aAAa,EAAE,gBACf,OAAO,OAAO,oCAAmB,QAAQ,gBAAgB;AAAA;AAItD,oBAAoB,EAAE,aAAa;AACxC,SAAO,cAAc,+BAAc;AAAA;AAG9B,uBAAuB,EAAE,aAAa;AAC3C,SAAO,cAAc,+BAAc;AAAA;AAE9B,kBAAkB,EAAE,aAAa;AACtC,SAAO,cAAc,+BAAc;AAAA;",
6
+ "names": []
7
+ }
package/esm/DSModal.js CHANGED
@@ -1,175 +1,59 @@
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 _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
8
- import 'react';
9
- import PropTypes from 'prop-types';
10
- import { modalTypes } from './constants.js';
11
- import DSModal$2 from './v1/DSModal.js';
12
- import DSModal$1 from './v2/DSModal.js';
13
- import { iconSizes, sizes } from '@elliemae/ds-shared/prop-types';
14
- import { jsx } from 'react/jsx-runtime';
15
- export { DSModalContent } from './v2/components/ModalContent.js';
16
-
17
- const _excluded = ["version"];
18
-
19
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
-
21
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22
-
23
- const DSModal = _ref => {
24
- let {
25
- version = 1
26
- } = _ref,
27
- rest = _objectWithoutProperties(_ref, _excluded);
28
-
29
- if (version === 2) return /*#__PURE__*/jsx(DSModal$1, _objectSpread({}, rest));
30
- return /*#__PURE__*/jsx(DSModal$2, _objectSpread({}, rest));
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import PropTypes from "prop-types";
4
+ import { modalTypes } from "./constants";
5
+ import DSModalV1 from "./v1/DSModal";
6
+ import DSModalV2, { DSModalContent } from "./v2/DSModal";
7
+ import { sizes, iconSizes } from "@elliemae/ds-shared/prop-types";
8
+ const DSModal = ({ version = 1, ...rest }) => {
9
+ if (version === 2)
10
+ return /* @__PURE__ */ React2.createElement(DSModalV2, {
11
+ ...rest
12
+ });
13
+ return /* @__PURE__ */ React2.createElement(DSModalV1, {
14
+ ...rest
15
+ });
31
16
  };
32
-
33
- DSModal$2.propTypes = {
17
+ DSModal.propTypes = {
18
+ version: PropTypes.oneOf([1, 2])
19
+ };
20
+ DSModalV1.propTypes = {
34
21
  version: PropTypes.oneOf([1, 2]),
35
22
  className: PropTypes.string,
36
-
37
- /**
38
- * Add an additional css class to the footer
39
- */
40
23
  additionalFooterCssClass: PropTypes.string,
41
-
42
- /**
43
- * Set style for the modal
44
- */
45
24
  style: PropTypes.objectOf(PropTypes.string),
46
-
47
- /**
48
- * Select size for the close icon
49
- */
50
25
  iconCloseSize: PropTypes.oneOf(iconSizes),
51
-
52
- /**
53
- * ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']
54
- */
55
26
  modalType: PropTypes.oneOf(modalTypes),
56
-
57
- /**
58
- * Show the header or not
59
- */
60
27
  showHeader: PropTypes.bool,
61
-
62
- /**
63
- * Show the footer or not
64
- */
65
28
  showFooter: PropTypes.bool,
66
-
67
- /**
68
- * Main content of the modal
69
- */
70
29
  children: PropTypes.element.isRequired,
71
-
72
- /**
73
- * Content is centered or not
74
- */
75
30
  centered: PropTypes.bool,
76
-
77
- /**
78
- * Text to be added in the confirm button
79
- */
80
31
  confirmLabel: PropTypes.string,
81
-
82
- /**
83
- * Text to be added in the modal title
84
- */
85
32
  modalTitle: PropTypes.string,
86
-
87
- /**
88
- * Text to be added in the modal title
89
- */
90
33
  size: PropTypes.oneOf(sizes),
91
-
92
- /**
93
- * Modal is open or not
94
- */
95
34
  isOpen: PropTypes.bool,
96
-
97
- /**
98
- * Allows a function to be triggered once the modal is closed
99
- */
100
35
  onClose: PropTypes.func,
101
-
102
- /**
103
- * Allows a function to be triggered once the modal is opened
104
- */
105
36
  onAfterOpen: PropTypes.func,
106
-
107
- /**
108
- * Allows a function to be triggered once the modal open is confirmed
109
- */
110
37
  onConfirm: PropTypes.func,
111
-
112
- /**
113
- * Allows a function to be triggered once the modal open is rejected
114
- */
115
38
  onReject: PropTypes.func,
116
-
117
- /**
118
- * Text to be added in the reject button
119
- */
120
39
  rejectLabel: PropTypes.string,
121
-
122
- /**
123
- * If modal should close on overlay click
124
- */
125
40
  shouldCloseOnOverlayClick: PropTypes.bool,
126
-
127
- /**
128
- * Modal has error or not
129
- */
130
41
  hasError: PropTypes.bool,
131
-
132
- /**
133
- * Modal has warning or not
134
- */
135
42
  hasWarning: PropTypes.bool,
136
-
137
- /**
138
- * Modal has success or not
139
- */
140
43
  hasSuccess: PropTypes.bool,
141
-
142
- /**
143
- * Modal has info or not
144
- */
145
44
  hasInfo: PropTypes.bool,
146
-
147
- /**
148
- * Modal has help or not
149
- */
150
45
  hasHelp: PropTypes.bool,
151
46
  actionsRef: PropTypes.func,
152
47
  appElement: PropTypes.string,
153
-
154
- /**
155
- * Customized props for the confirm button
156
- */
157
48
  overridePropsConfirmButton: PropTypes.objectOf(PropTypes.shape({})),
158
-
159
- /**
160
- * Customized props for the reject button
161
- */
162
49
  overridePropsRejectButton: PropTypes.objectOf(PropTypes.string),
163
-
164
- /**
165
- * Show confirm button
166
- */
167
50
  showConfirmButton: PropTypes.bool,
168
-
169
- /**
170
- * Show confirm button
171
- */
172
51
  customCloseComponent: PropTypes.element
173
52
  };
174
-
175
- export { DSModal as default };
53
+ var DSModal_default = DSModal;
54
+ export {
55
+ DSModal,
56
+ DSModalContent,
57
+ DSModal_default as default
58
+ };
59
+ //# sourceMappingURL=DSModal.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSModal.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { modalTypes } from './constants';\nimport DSModalV1 from './v1/DSModal';\nimport DSModalV2, { DSModalContent } from './v2/DSModal';\nimport { sizes, iconSizes } from '@elliemae/ds-shared/prop-types';\n\nconst DSModal = ({ version = 1, ...rest }) => {\n if (version === 2) return <DSModalV2 {...rest} />;\n return <DSModalV1 {...rest} />;\n};\n\nDSModal.propTypes = {\n version: PropTypes.oneOf([1, 2]),\n};\n\nDSModalV1.propTypes = {\n version: PropTypes.oneOf([1, 2]),\n className: PropTypes.string,\n /**\n * Add an additional css class to the footer\n */\n additionalFooterCssClass: PropTypes.string,\n /**\n * Set style for the modal\n */\n style: PropTypes.objectOf(PropTypes.string),\n /**\n * Select size for the close icon\n */\n iconCloseSize: PropTypes.oneOf(iconSizes),\n /**\n * ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']\n */\n modalType: PropTypes.oneOf(modalTypes),\n /**\n * Show the header or not\n */\n showHeader: PropTypes.bool,\n /**\n * Show the footer or not\n */\n showFooter: PropTypes.bool,\n /**\n * Main content of the modal\n */\n children: PropTypes.element.isRequired,\n /**\n * Content is centered or not\n */\n centered: PropTypes.bool,\n /**\n * Text to be added in the confirm button\n */\n confirmLabel: PropTypes.string,\n /**\n * Text to be added in the modal title\n */\n modalTitle: PropTypes.string,\n /**\n * Text to be added in the modal title\n */\n size: PropTypes.oneOf(sizes),\n /**\n * Modal is open or not\n */\n isOpen: PropTypes.bool,\n /**\n * Allows a function to be triggered once the modal is closed\n */\n onClose: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal is opened\n */\n onAfterOpen: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal open is confirmed\n */\n onConfirm: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal open is rejected\n */\n onReject: PropTypes.func,\n /**\n * Text to be added in the reject button\n */\n rejectLabel: PropTypes.string,\n /**\n * If modal should close on overlay click\n */\n shouldCloseOnOverlayClick: PropTypes.bool,\n /**\n * Modal has error or not\n */\n hasError: PropTypes.bool,\n /**\n * Modal has warning or not\n */\n hasWarning: PropTypes.bool,\n /**\n * Modal has success or not\n */\n hasSuccess: PropTypes.bool,\n /**\n * Modal has info or not\n */\n hasInfo: PropTypes.bool,\n /**\n * Modal has help or not\n */\n hasHelp: PropTypes.bool,\n actionsRef: PropTypes.func,\n appElement: PropTypes.string,\n /**\n * Customized props for the confirm button\n */\n overridePropsConfirmButton: PropTypes.objectOf(PropTypes.shape({})),\n /**\n * Customized props for the reject button\n */\n overridePropsRejectButton: PropTypes.objectOf(PropTypes.string),\n /**\n * Show confirm button\n */\n showConfirmButton: PropTypes.bool,\n /**\n * Show confirm button\n */\n customCloseComponent: PropTypes.element,\n};\nexport { DSModalContent, DSModal };\nexport default DSModal;\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,UAAU,CAAC,EAAE,UAAU,MAAM,WAAW;AAC5C,MAAI,YAAY;AAAG,WAAO,qCAAC,WAAD;AAAA,SAAe;AAAA;AACzC,SAAO,qCAAC,WAAD;AAAA,OAAe;AAAA;AAAA;AAGxB,QAAQ,YAAY;AAAA,EAClB,SAAS,UAAU,MAAM,CAAC,GAAG;AAAA;AAG/B,UAAU,YAAY;AAAA,EACpB,SAAS,UAAU,MAAM,CAAC,GAAG;AAAA,EAC7B,WAAW,UAAU;AAAA,EAIrB,0BAA0B,UAAU;AAAA,EAIpC,OAAO,UAAU,SAAS,UAAU;AAAA,EAIpC,eAAe,UAAU,MAAM;AAAA,EAI/B,WAAW,UAAU,MAAM;AAAA,EAI3B,YAAY,UAAU;AAAA,EAItB,YAAY,UAAU;AAAA,EAItB,UAAU,UAAU,QAAQ;AAAA,EAI5B,UAAU,UAAU;AAAA,EAIpB,cAAc,UAAU;AAAA,EAIxB,YAAY,UAAU;AAAA,EAItB,MAAM,UAAU,MAAM;AAAA,EAItB,QAAQ,UAAU;AAAA,EAIlB,SAAS,UAAU;AAAA,EAInB,aAAa,UAAU;AAAA,EAIvB,WAAW,UAAU;AAAA,EAIrB,UAAU,UAAU;AAAA,EAIpB,aAAa,UAAU;AAAA,EAIvB,2BAA2B,UAAU;AAAA,EAIrC,UAAU,UAAU;AAAA,EAIpB,YAAY,UAAU;AAAA,EAItB,YAAY,UAAU;AAAA,EAItB,SAAS,UAAU;AAAA,EAInB,SAAS,UAAU;AAAA,EACnB,YAAY,UAAU;AAAA,EACtB,YAAY,UAAU;AAAA,EAItB,4BAA4B,UAAU,SAAS,UAAU,MAAM;AAAA,EAI/D,2BAA2B,UAAU,SAAS,UAAU;AAAA,EAIxD,mBAAmB,UAAU;AAAA,EAI7B,sBAAsB,UAAU;AAAA;AAGlC,IAAO,kBAAQ;",
6
+ "names": []
7
+ }
package/esm/constants.js CHANGED
@@ -1,26 +1,44 @@
1
+ import * as React from "react";
1
2
  const MODAL_TYPE = {
2
- DEFAULT: 'default',
3
- ALERT: 'alert',
4
- CONFIRM: 'confirm',
5
- NOTIFICATION: 'notification',
6
- WARNING: 'warning',
7
- ERROR: 'error',
8
- SUCCESS: 'success',
9
- HELP: 'help',
10
- INFO: 'info'
3
+ DEFAULT: "default",
4
+ ALERT: "alert",
5
+ CONFIRM: "confirm",
6
+ NOTIFICATION: "notification",
7
+ WARNING: "warning",
8
+ ERROR: "error",
9
+ SUCCESS: "success",
10
+ HELP: "help",
11
+ INFO: "info"
11
12
  };
12
- const modalTypes = [MODAL_TYPE.DEFAULT, MODAL_TYPE.ALERT, MODAL_TYPE.CONFIRM, MODAL_TYPE.NOTIFICATION, MODAL_TYPE.WARNING, MODAL_TYPE.ERROR, MODAL_TYPE.SUCCESS, MODAL_TYPE.HELP, MODAL_TYPE.INFO];
13
+ const modalTypes = [
14
+ MODAL_TYPE.DEFAULT,
15
+ MODAL_TYPE.ALERT,
16
+ MODAL_TYPE.CONFIRM,
17
+ MODAL_TYPE.NOTIFICATION,
18
+ MODAL_TYPE.WARNING,
19
+ MODAL_TYPE.ERROR,
20
+ MODAL_TYPE.SUCCESS,
21
+ MODAL_TYPE.HELP,
22
+ MODAL_TYPE.INFO
23
+ ];
13
24
  const MODAL_TYPE_V2 = {
14
- INFORMATION: 'information',
15
- DECISION: 'decision',
16
- SELECTION: 'selection',
17
- FORM: 'form'
25
+ INFORMATION: "information",
26
+ DECISION: "decision",
27
+ SELECTION: "selection",
28
+ FORM: "form"
18
29
  };
19
30
  const MODAL_SUB_TYPE_V2 = {
20
- SUCCESS: 'success',
21
- WARNING: 'warning',
22
- ERROR: 'error',
23
- INFORMATION: 'information'
31
+ SUCCESS: "success",
32
+ WARNING: "warning",
33
+ ERROR: "error",
34
+ INFORMATION: "information"
24
35
  };
25
-
26
- export { MODAL_SUB_TYPE_V2, MODAL_TYPE, MODAL_TYPE_V2, MODAL_TYPE as default, modalTypes };
36
+ var constants_default = MODAL_TYPE;
37
+ export {
38
+ MODAL_SUB_TYPE_V2,
39
+ MODAL_TYPE,
40
+ MODAL_TYPE_V2,
41
+ constants_default as default,
42
+ modalTypes
43
+ };
44
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/constants.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const MODAL_TYPE = {\n DEFAULT: 'default',\n ALERT: 'alert',\n CONFIRM: 'confirm',\n NOTIFICATION: 'notification',\n WARNING: 'warning',\n ERROR: 'error',\n SUCCESS: 'success',\n HELP: 'help',\n INFO: 'info',\n};\n\nexport const modalTypes = [\n MODAL_TYPE.DEFAULT,\n MODAL_TYPE.ALERT,\n MODAL_TYPE.CONFIRM,\n MODAL_TYPE.NOTIFICATION,\n MODAL_TYPE.WARNING,\n MODAL_TYPE.ERROR,\n MODAL_TYPE.SUCCESS,\n MODAL_TYPE.HELP,\n MODAL_TYPE.INFO,\n];\n\nexport const MODAL_TYPE_V2 = {\n INFORMATION: 'information',\n DECISION: 'decision',\n SELECTION: 'selection',\n FORM: 'form',\n};\n\nexport const MODAL_SUB_TYPE_V2 = {\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n INFORMATION: 'information',\n};\n\nexport default MODAL_TYPE;\n"],
5
+ "mappings": "AAAA;ACAO,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AAAA;AAGD,MAAM,aAAa;AAAA,EACxB,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA;AAGN,MAAM,gBAAgB;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA;AAGD,MAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AAAA;AAGf,IAAO,oBAAQ;",
6
+ "names": []
7
+ }
package/esm/index.js CHANGED
@@ -1,4 +1,10 @@
1
- export { default } from './DSModal.js';
2
- export { MODAL_SUB_TYPE_V2, MODAL_TYPE, MODAL_TYPE_V2, modalTypes } from './constants.js';
3
- export { DSModalWithSchema } from './v2/DSModal.js';
4
- export { DSModalContent } from './v2/components/ModalContent.js';
1
+ import * as React from "react";
2
+ export * from "./DSModal";
3
+ export * from "./constants";
4
+ import { DSModalWithSchema } from "./v2/DSModal";
5
+ import { default as default2 } from "./DSModal";
6
+ export {
7
+ DSModalWithSchema,
8
+ default2 as default
9
+ };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSModal';\nexport * from './constants';\nexport { DSModalWithSchema } from './v2/DSModal';\n\nexport { default } from './DSModal';\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAEA;",
6
+ "names": []
7
+ }