boundless-portal
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){e.exports=require("boundless-utils-omit-keys")},function(e,t){e.exports=require("boundless-utils-uuid")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-dom")},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),u=n.n(l),p=n(3),s=n.n(p),c=n(0),f=n.n(c),d=n(1),h=n.n(d),y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){function t(){var e,n,r,a;o(this,t);for(var l=arguments.length,u=Array(l),p=0;p<l;p++)u[p]=arguments[p];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.id=h()(),r.$portal=null,r.$passenger=null,a=n,i(r,a)}return a(t,e),b(t,[{key:"componentWillMount",value:function(){this.$portal=document.createElement("div"),this.props.destination.appendChild(this.$portal),this.renderPortalledContent()}},{key:"renderPortalledContent",value:function(){var e=u.a.isValidElement(this.props.children)?this.props.children:u.a.createElement("div",null,this.props.children);this.$portal.id=this.props.portalId||this.id,s.a.unstable_renderSubtreeIntoContainer(this,e,this.$portal),this.$passenger=this.$portal.children[0]}},{key:"componentDidUpdate",value:function(){this.renderPortalledContent()}},{key:"componentWillUnmount",value:function(){s.a.unmountComponentAtNode(this.$portal),this.props.destination.removeChild(this.$portal)}},{key:"render",value:function(){return u.a.createElement("span",y({},f()(this.props,t.internalKeys),r({},t.PORTAL_DATA_ATTRIBUTE,this.props.portalId||this.id)))}}]),t}(u.a.Component);m.propTypes={"*":l.PropTypes.any,children:u.a.PropTypes.node,destination:l.PropTypes.instanceOf(HTMLElement),portalId:l.PropTypes.string},m.defaultProps={children:null,destination:document.body,portalId:null},m.internalKeys=Object.keys(m.defaultProps),m.PORTAL_DATA_ATTRIBUTE="data-portal-id",t.default=m}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGQzZDFhODhjOGQ4YmI0NWZjYzA5Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzcy11dGlscy1vbWl0LWtleXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLXV0aWxzLXV1a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mVudEF0Tm9kZSh0aGlzLiRwb3J0YWwpO1xuICAgICAgICB0aGlzLnByb3BzLmRlc3RpbmF0aW9uLnJlbW92ZUNoaWxkKHRoaXMuJHBvcnRhbCk7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHNwYW5cbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBQb3J0YWwuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICB7Li4ue1tQb3J0YWwuUE9SVEFMX0RBVEFfQVRUUklCVVRFXTogdGhpcy5wcm9wcy5wb3J0YWxJZCB8fCB0aGlzLmlkfX0gLz5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtcG9ydGFsL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){e.exports=require("boundless-utils-omit-keys")},function(e,t){e.exports=require("boundless-utils-uuid")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-dom")},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(2),a=(n.n(u),n(3)),p=(n.n(a),n(0)),s=n.n(p),c=n(1),f=n.n(c),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){var e,n,r,l;o(this,t);for(var u=arguments.length,a=Array(u),p=0;p<u;p++)a[p]=arguments[p];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.id=f()(),r.$portal=null,r.$passenger=null,l=n,i(r,l)}return l(t,e),h(t,[{key:"componentWillMount",value:function(){this.$portal=document.createElement("div"),this.props.destination.appendChild(this.$portal),this.renderPortalledContent()}},{key:"renderPortalledContent",value:function(){var e=n.i(u.isValidElement)(this.props.children)?this.props.children:n.i(u.createElement)("div",null,this.props.children);this.$portal.id=this.props.portalId||this.id,n.i(a.unstable_renderSubtreeIntoContainer)(this,e,this.$portal),this.$passenger=this.$portal.children[0]}},{key:"componentDidUpdate",value:function(){this.renderPortalledContent()}},{key:"componentWillUnmount",value:function(){n.i(a.unmountComponentAtNode)(this.$portal),this.props.destination.removeChild(this.$portal)}},{key:"render",value:function(){return n.i(u.createElement)("span",d({},s()(this.props,t.internalKeys),r({},t.PORTAL_DATA_ATTRIBUTE,this.props.portalId||this.id)))}}]),t}(u.Component);y.propTypes={"*":u.PropTypes.any,children:u.PropTypes.node,destination:u.PropTypes.instanceOf(HTMLElement),portalId:u.PropTypes.string},y.defaultProps={children:null,destination:document.body,portalId:null},y.internalKeys=Object.keys(y.defaultProps),y.PORTAL_DATA_ATTRIBUTE="data-portal-id",t.default=y}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDNkYWM4ZWQxNDVkODQ0MzNmOTE4Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzcy11dGlscy1vbWl0LWtleXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLXV0aWxzLXV1aWRcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwicmVhY3RcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwicmVhY3QtZG9tXCJ9Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy1wb3J0YWwvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJpbnN0YWxsZWRNb2R1bGVzIiwiaSIsImwiLCJjYWxsIiwibSIsImMiLCJ2YWx1ZSIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiY29uZmlndXJhYmxlIiwiZW51bWVyYWJsZSIsImdldCIsIm4iLCJfX2VzTW9kdWxlIiwib2JqZWN0IiwicHJvcGVydHkiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsInAiLCJzI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gICAgICAqICAgICAgIDxkaXY+Zm9vPC9kaXY+XG4gICAgICAgICAqICAgICAgIDxkaXY+YmFyPC9kaXY+XG4gICAgICAgICAqICAgPC9kaXY+XG4gICAgICAgICAqIDwvUG9ydGFsPlxuICAgICAgICAgKiBgYGBcblxuICAgICAgICAgKiDim5TvuI8gTm90IE9LOlxuXG4gICAgICAgICAqIGBgYGpzeFxuICAgICAgICAgKiA8UG9ydGFsPlxuICAgICAgICAgKiAgIDxkaXY+Zm9vPC9kaXY+XG4gICAgICAgICAqICAgPGRpdj5iYXI8L2Rpdj5cbiAgICAgICAgICogPC9Qb3J0YWw+XG4gICAgICAgICAqIGBgYFxuICAgICAgICAgKi9cbiAgICAgICAgY2hpbGRyZW46IFByb3BUeXBlcy5ub2RlLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiB0aGUgbG9jYXRpb24gdG8gYXBwZW5kIHRoZSBnZW5lcmF0ZWQgcG9ydGFsIGFuZCBjaGlsZCBlbGVtZW50c1xuICAgICAgICAgKi9cbiAgICAgICAgZGVzdGluYXRpb246IFByb3BUeXBlcy5pbnN0YW5jZU9mKEhUTUxFbGVtZW50KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogdGhlIElEIHVzZWQgdG8gbGluayB0aGUgcG9ydGFsIG9yaWdpbiB0byB0aGUgZGVzdGluYXRpb247IGFkZGVkIHRvIGdlbmVyYXRlZCBgPGRpdj5gIGFwcGVuZGVkIHRvIHRoZSBkZXN0aW5hdGlvbiBIVE1MIG5vZGVcbiAgICAgICAgICovXG4gICAgICAgIHBvcnRhbElkOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgIH1cblxuICAgIHN0YXRpYyBkZWZhdWx0UHJvcHMgPSB7XG4gICAgICAgIGNoaWxkcmVuOiBudWxsLFxuICAgICAgICBkZXN0aW5hdGlvbjogZG9jdW1lbnQuYm9keSxcbiAgICAgICAgcG9ydGFsSWQ6IG51bGwsXG4gICAgfVxuXG4gICAgc3RhdGljIGludGVyb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BvcnRhbC5jaGlsZHJlblswXTtcbiAgICB9XG5cbiAgICBjb21wb25lbnREaWRVcGRhdGUoKSB7IHRoaXMucmVuZGVyUG9ydGFsbGVkQ29udGVudCgpOyB9XG5cbiAgICBjb21wb25lbnRXaWxsVW5tb3VudCgpIHtcbiAgICAgICAgdW5tb3VudENvbXBvbmVudEF0Tm9kZSh0aGlzLiRwb3J0YWwpO1xuICAgICAgICB0aGlzLnByb3BzLmRlc3RpbmF0aW9uLnJlbW92ZUNoaWxkKHRoaXMuJHBvcnRhbCk7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHNwYW5cbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBQb3J0YWwuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICB7Li4ue1tQb3J0YWwuUE9SVEFMX0RBVEFfQVRUUklCVVRFXTogdGhpcy5wcm9wcy5wb3J0YWxJZCB8fCB0aGlzLmlkfX0gLz5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtcG9ydGFsL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== |
16
index.js
@@ -1,3 +0,3 @@ | ||
import React, {PropTypes} from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import {createElement, isValidElement, Component, PropTypes} from 'react'; | ||
import {unmountComponentAtNode, unstable_renderSubtreeIntoContainer as renderSubtree} from 'react-dom'; | ||
@@ -8,7 +8,5 @@ import omit from 'boundless-utils-omit-keys'; | ||
/** | ||
__A higher-order component for the rendering of components outside the normal React tree.__ | ||
`Portal` is used in other components such as `Popover` to render content to places like the HTML `<body>` tag, avoiding style leakage and parent layout contexts. Only accepts a single top-level child; naked text, etc will be wrapped in a `<div>`. | ||
*/ | ||
export default class Portal extends React.Component { | ||
export default class Portal extends Component { | ||
static propTypes = { | ||
@@ -53,3 +51,3 @@ /** | ||
*/ | ||
children: React.PropTypes.node, | ||
children: PropTypes.node, | ||
@@ -93,3 +91,3 @@ /** | ||
renderPortalledContent() { | ||
const child = React.isValidElement(this.props.children) ? this.props.children : (<div>{this.props.children}</div>); | ||
const child = isValidElement(this.props.children) ? this.props.children : (<div>{this.props.children}</div>); | ||
@@ -99,3 +97,3 @@ // update the portal ID link if needed | ||
ReactDOM.unstable_renderSubtreeIntoContainer(this, child, this.$portal); | ||
renderSubtree(this, child, this.$portal); | ||
this.$passenger = this.$portal.children[0]; | ||
@@ -107,3 +105,3 @@ } | ||
componentWillUnmount() { | ||
ReactDOM.unmountComponentAtNode(this.$portal); | ||
unmountComponentAtNode(this.$portal); | ||
this.props.destination.removeChild(this.$portal); | ||
@@ -110,0 +108,0 @@ } |
/* eslint no-unused-expressions:0 */ | ||
import React from 'react'; | ||
import {createElement} from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "boundless-portal", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A higher-order component for the rendering of components outside the normal React tree.", | ||
@@ -18,3 +18,3 @@ "main": "build/index.js", | ||
"contributors": [ | ||
"Evan Scott <glitterbyte@gmail.com> (http://yaycmyk.com)", | ||
"Evan Scott <probablyup@gmail.com> (http://yaycmyk.com)", | ||
"Abe Rubenstein <abe.rubenstein@enigma.io>", | ||
@@ -27,6 +27,6 @@ "Jenn Creighton <jenn.creighton@enigma.io>" | ||
}, | ||
"homepage": "http://boundless.js.org/Portal", | ||
"homepage": "https://boundless.js.org/Portal", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.3", | ||
"boundless-utils-uuid": "^1.0.3" | ||
"boundless-utils-omit-keys": "^1.0.4", | ||
"boundless-utils-uuid": "^1.0.4" | ||
}, | ||
@@ -33,0 +33,0 @@ "peerDependencies": { |
@@ -6,4 +6,2 @@ <!--- | ||
__A higher-order component for the rendering of components outside the normal React tree.__ | ||
`Portal` is used in other components such as `Popover` to render content to places like the HTML `<body>` tag, avoiding style leakage and parent layout contexts. Only accepts a single top-level child; naked text, etc will be wrapped in a `<div>`. | ||
@@ -42,3 +40,3 @@ | ||
> Note: only top-level props are in the README, for the full list check out the [website](http://boundless.js.org/Portal). | ||
> Note: only top-level props are in the README, for the full list check out the [website](https://boundless.js.org/Portal). | ||
@@ -52,9 +50,9 @@ ### Required Props | ||
- __`*`__ ・ any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes) | ||
- __`*`__ · any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes) | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`any` | `n/a` | ||
- __`children`__ ・ any normal React child, but must be singular; multiple sibling children must have a common wrapper, such as a "layout" `<div>` | ||
- __`children`__ · any normal React child, but must be singular; multiple sibling children must have a common wrapper, such as a "layout" `<div>` | ||
@@ -90,17 +88,17 @@ ✅ OK: | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`any renderable` | `null` | ||
- __`destination`__ ・ the location to append the generated portal and child elements | ||
- __`destination`__ · the location to append the generated portal and child elements | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`HTMLElement` | `document.body` | ||
- __`portalId`__ ・ the ID used to link the portal origin to the destination; added to generated `<div>` appended to the destination HTML node | ||
- __`portalId`__ · the ID used to link the portal origin to the destination; added to generated `<div>` appended to the destination HTML node | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`string` | `null` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39828
154
101
2