@elliemae/ds-portal 3.0.0-next.45 → 3.0.0-next.48
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/DSPortal.js +9 -16
- package/dist/cjs/DSPortal.js.map +1 -1
- package/dist/cjs/index.js +11 -17
- package/dist/cjs/index.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/DSPortal.js
CHANGED
|
@@ -4,32 +4,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var DSPortal_exports = {};
|
|
29
22
|
__export(DSPortal_exports, {
|
|
30
23
|
DSPortal: () => DSPortal,
|
|
31
24
|
default: () => DSPortal_default
|
|
32
25
|
});
|
|
26
|
+
module.exports = __toCommonJS(DSPortal_exports);
|
|
33
27
|
var React = __toESM(require("react"));
|
|
34
28
|
var import_react = __toESM(require("react"));
|
|
35
29
|
var import_react_dom = __toESM(require("react-dom"));
|
|
@@ -85,5 +79,4 @@ class DSPortal extends import_react.Component {
|
|
|
85
79
|
}
|
|
86
80
|
DSPortal.defaultProps = { onRender: () => null };
|
|
87
81
|
var DSPortal_default = DSPortal;
|
|
88
|
-
module.exports = __toCommonJS(DSPortal_exports);
|
|
89
82
|
//# sourceMappingURL=DSPortal.js.map
|
package/dist/cjs/DSPortal.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSPortal.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { Component } from 'react';\nimport ReactDOM from 'react-dom';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { isFunction, DOCUMENT } from '@elliemae/ds-utilities';\n\nconst blockName = 'portal';\n\nconst canRenderPortal = isFunction(ReactDOM.createPortal);\n\n// TODO: If this is rendered on server, is going to break\n\nclass DSPortal extends Component {\n // eslint-disable-next-line react/static-property-placement\n static defaultProps = { onRender: () => null };\n\n constructor(props) {\n super(props);\n\n this.createPortalContainer = this.createPortalContainer.bind(this);\n this.renderNoPortal = this.renderNoPortal.bind(this);\n }\n\n // eslint-disable-next-line react/state-in-constructor\n state = { isMounted: false };\n\n componentDidMount() {\n const { onRender } = this.props;\n this.portalEl = this.createPortalContainer();\n if (DOCUMENT && this.portalEl) {\n DOCUMENT.body.appendChild(this.portalEl);\n onRender();\n this.setState({ isMounted: true });\n }\n }\n\n componentDidUpdate() {\n if (!canRenderPortal) {\n this.renderNoPortal();\n }\n }\n\n componentWillUnmount() {\n if (this.portalEl) {\n this.portalEl.parentNode.removeChild(this.portalEl);\n }\n }\n\n createPortalContainer() {\n if (!DOCUMENT) return null;\n\n const { className } = this.props;\n const { cssClassName } = convertPropToCssClassName(blockName, className);\n const container = DOCUMENT.createElement('div');\n container.classList.add(cssClassName);\n container.setAttribute('data-testid', 'portal');\n\n return container;\n }\n\n renderNoPortal() {\n const { children } = this.props;\n ReactDOM.unstable_renderSubtreeIntoContainer(this, <div>{children}</div>, this.portalEl);\n }\n\n render() {\n const { children } = this.props;\n const { isMounted } = this.state;\n return !canRenderPortal || !isMounted ? null : ReactDOM.createPortal(children, this.portalEl);\n }\n}\nexport { DSPortal };\nexport default DSPortal;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAiC;AACjC,uBAAqB;AACrB,2BAA0C;AAC1C,0BAAqC;AAErC,MAAM,YAAY;AAElB,MAAM,kBAAkB,oCAAW,yBAAS,YAAY;AAIxD,MAAM,iBAAiB,uBAAU;AAAA,EAI/B,YAAY,OAAO;AACjB,UAAM,KAAK;AAOb,iBAAQ,EAAE,WAAW,MAAM;AALzB,SAAK,wBAAwB,KAAK,sBAAsB,KAAK,IAAI;AACjE,SAAK,iBAAiB,KAAK,eAAe,KAAK,IAAI;AAAA,EACrD;AAAA,EAKA,oBAAoB;AAClB,UAAM,EAAE,aAAa,KAAK;AAC1B,SAAK,WAAW,KAAK,sBAAsB;AAC3C,QAAI,gCAAY,KAAK,UAAU;AAC7B,mCAAS,KAAK,YAAY,KAAK,QAAQ;AACvC,eAAS;AACT,WAAK,SAAS,EAAE,WAAW,KAAK,CAAC;AAAA,IACnC;AAAA,EACF;AAAA,EAEA,qBAAqB;AACnB,QAAI,CAAC,iBAAiB;AACpB,WAAK,eAAe;AAAA,IACtB;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,QAAI,KAAK,UAAU;AACjB,WAAK,SAAS,WAAW,YAAY,KAAK,QAAQ;AAAA,IACpD;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,QAAI,CAAC;AAAU,aAAO;AAEtB,UAAM,EAAE,cAAc,KAAK;AAC3B,UAAM,EAAE,iBAAiB,oDAA0B,WAAW,SAAS;AACvE,UAAM,YAAY,6BAAS,cAAc,KAAK;AAC9C,cAAU,UAAU,IAAI,YAAY;AACpC,cAAU,aAAa,eAAe,QAAQ;AAE9C,WAAO;AAAA,EACT;AAAA,EAEA,iBAAiB;AACf,UAAM,EAAE,aAAa,KAAK;AAC1B,6BAAS,oCAAoC,MAAM,mDAAC,aAAK,QAAS,GAAQ,KAAK,QAAQ;AAAA,EACzF;AAAA,EAEA,SAAS;AACP,UAAM,EAAE,aAAa,KAAK;AAC1B,UAAM,EAAE,cAAc,KAAK;AAC3B,WAAO,CAAC,mBAAmB,CAAC,YAAY,OAAO,yBAAS,aAAa,UAAU,KAAK,QAAQ;AAAA,EAC9F;AACF;AAxDS,AAFT,SAES,eAAe,EAAE,UAAU,MAAM,KAAK;AA0D/C,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,33 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
22
|
var src_exports = {};
|
|
29
23
|
__export(src_exports, {
|
|
30
24
|
default: () => import_DSPortal.default
|
|
31
25
|
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
32
27
|
var React = __toESM(require("react"));
|
|
33
|
-
__reExport(src_exports, require("./DSPortal"));
|
|
28
|
+
__reExport(src_exports, require("./DSPortal"), module.exports);
|
|
34
29
|
var import_DSPortal = __toESM(require("./DSPortal"));
|
|
35
|
-
module.exports = __toCommonJS(src_exports);
|
|
36
30
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSPortal';\nexport { default } from './DSPortal';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,uBAAd;AACA,sBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-portal",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.48",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Portal",
|
|
6
6
|
"files": [
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"indent": 4
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@elliemae/ds-classnames": "3.0.0-next.
|
|
47
|
-
"@elliemae/ds-utilities": "3.0.0-next.
|
|
46
|
+
"@elliemae/ds-classnames": "3.0.0-next.48",
|
|
47
|
+
"@elliemae/ds-utilities": "3.0.0-next.48"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": "^17.0.2",
|