boundless-portal
Advanced tools
Comparing version 1.0.0-beta.6 to 1.0.0-beta.7
@@ -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,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t,n){"use strict";function r(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=r},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 u=n(2),l=n.n(u),p=n(3),c=n.n(p),s=n(0),f=n(1),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,r,a,u;o(this,t);for(var l=arguments.length,p=Array(l),c=0;c<l;c++)p[c]=arguments[c];return r=a=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(p))),a.id=n.i(f.a)(),a.$portal=null,a.$passenger=null,u=r,i(a,u)}return a(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=l.a.isValidElement(this.props.children)?this.props.children:l.a.createElement("div",null,this.props.children);this.$portal.id=this.props.portalId||this.id,c.a.unstable_renderSubtreeIntoContainer(this,e,this.$portal),this.$passenger=this.$portal.children[0]}},{key:"componentDidUpdate",value:function(){this.renderPortalledContent()}},{key:"componentWillUnmount",value:function(){c.a.unmountComponentAtNode(this.$portal),this.props.destination.removeChild(this.$portal)}},{key:"render",value:function(){return l.a.createElement("span",d({},n.i(s.a)(this.props,t.internalKeys),r({},t.PORTAL_DATA_ATTRIBUTE,this.props.portalId||this.id)))}}]),t}(l.a.Component);y.propTypes={children:l.a.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGFiMWQ1ZDRlYjdjMzc5Njk4OWM4Iiwid2VicGFjazovL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AgKiA8L1BvcnRhbD5cblxuICAgICAgICAgKiA8UG9ydGFsPlxuICAgICAgICAgKiAgIDxkaXY+XG4gICAgICAgICAqICAgICAgIDxkaXY+Zm9vPC9kaXY+XG4gICAgICAgICAqICAgICAgIDxkaXY+YmFyPC9kaXY+XG4gICAgICAgICAqICAgPC9kaXY+XG4gICAgICAgICAqIDwvUG9ydGFsPlxuICAgICAgICAgKiBgYGBcblxuICAgICAgICAgKiDim5TvuI8gTm90IE9LOlxuXG4gICAgICAgICAqIGBgYGpzeFxuICAgICAgICAgKiA8UG9ydGFsPlxuICAgICAgICAgKiAgIDxkaXY+Zm9vPC9kaXY+XG4gICAgICAgICAqICAgPGRpdj5iYXI8L2Rpdj5cbiAgICAgICAgICogPC9Qb3J0YWw+XG4gICAgICAgICAqIGBgYFxuICAgICAgICAgKi9cbiAgICAgICAgY2hpbGRyZW46IFJlYWN0LlByb3BUeXBlcy5ub2RlLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiB0aGUgbG9jYXRpb24gdG8gYXBwZW5kIHRoZSBnZW5lcmF0ZWQgcG9ydGFsIGFuZCBjaGlsZCBlbGVtZW50c1xuICAgICAgICAgKi9cbiAgICAgICAgZGVzdGluYXRpb246IFByb3BUeXBlcy5pbnN0YW5jZU9mKEhUTUxFbGVtZW50KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogdGhlIElEIHVzZWQgdG8gbGluayB0aGUgcG9ydGFsIG9yaWdpbiB0byB0aGUgZGVzdGluYXRpb247IGFkZGVkIHRvIGdlbmVyYXRlZCBgPGRpdj5gIGFwcGVuZGVkIHRvIHRoZSBkZXN0aW5hdGlvbiBIVE1MIG5vZGVcbiAgICAgICAgICovXG4gICAgICAgIHBvcnRhbElkOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgIH1cblxuICAgIHN0YXRpYyBkZWZhdWx0UHJvcHMgPSB7XG4gICAgICAgIGNoaWxkcmVuOiBudWxsLFxuICAgICAgICBkZXN0aW5hdGlvbj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0RE9NLnVuc3RhYmxlX3JlbmRlclN1YnRyZWVJbnRvQ29udGFpbmVyKHRoaXMsIGNoaWxkLCB0aGlzLiRwb3J0YWwpO1xuICAgICAgICB0aGlzLiRwYXNzZW5nZXIgPSB0aGlzLiRwb3J0YWwuY2hpbGRyZW5bMF07XG4gICAgfVxuXG4gICAgY29tcG9uZW50RGlkVXBkYXRlKCkgeyB0aGlzLnJlbmRlclBvcnRhbGxlZENvbnRlbnQoKTsgfVxuXG4gICAgY29tcG9uZW50V2lsbFVubW91bnQoKSB7XG4gICAgICAgIFJlYWN0RE9NLnVubW91bnRDb21wb25lbnRBdE5vZGUodGhpcy4kcG9ydGFsKTtcbiAgICAgICAgdGhpcy5wcm9wcy5kZXN0aW5hdGlvbi5yZW1vdmVDaGlsZCh0aGlzLiRwb3J0YWwpO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxzcGFuXG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgUG9ydGFsLmludGVybmFsS2V5cyl9XG4gICAgICAgICAgICAgICAgey4uLntbUG9ydGFsLlBPUlRBTF9EQVRBX0FUVFJJQlVURV06IHRoaXMucHJvcHMucG9ydGFsSWQgfHwgdGhpcy5pZH19IC8+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLXBvcnRhbC9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0= | ||
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGQzZDFhODhjOGQ4YmI0NWZjYzA5Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzcy11dGlscy1vbWl0LWtleXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLXV0aWxzLXV1aWRcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwicmVhY3RcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwicmVhY3QtZG9tXCJ9Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy1wb3J0YWwvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2t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ICAgICB7Li4ue1tQb3J0YWwuUE9SVEFMX0RBVEFfQVRUUklCVVRFXTogdGhpcy5wcm9wcy5wb3J0YWxJZCB8fCB0aGlzLmlkfX0gLz5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtcG9ydGFsL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== |
@@ -8,3 +8,2 @@ import React, {PropTypes} from 'react'; | ||
/** | ||
# Portal | ||
__A higher-order component for the rendering of components outside the normal React tree.__ | ||
@@ -16,2 +15,7 @@ | ||
static propTypes = { | ||
/** | ||
* any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes) | ||
*/ | ||
'*': PropTypes.any, | ||
// single child only - arrays not allowed | ||
@@ -18,0 +22,0 @@ |
@@ -7,3 +7,3 @@ /* eslint no-unused-expressions:0 */ | ||
import Portal from './index'; | ||
import conformanceChecker from '../boundless-utils-conformance/index'; | ||
import {$, conformanceChecker} from '../boundless-utils-test-helpers/index'; | ||
@@ -21,5 +21,5 @@ describe('Portal component', () => { | ||
const element = render(<Portal>foo</Portal>); | ||
id = mountNode.querySelector('[data-portal-id]').getAttribute('data-portal-id'); | ||
id = $('[data-portal-id]').getAttribute('data-portal-id'); | ||
expect(element.$portal === document.getElementById(id)).toBe(true); | ||
expect(element.$portal === $(`#${id}`)).toBe(true); | ||
}); | ||
@@ -29,5 +29,5 @@ | ||
const element = render(<Portal>foo</Portal>); | ||
id = mountNode.querySelector('[data-portal-id]').getAttribute('data-portal-id'); | ||
id = $('[data-portal-id]').getAttribute('data-portal-id'); | ||
expect(element.$passenger === document.getElementById(id).children[0]).toBe(true); | ||
expect(element.$passenger === $(`#${id} > :first-child`)).toBe(true); | ||
}); | ||
@@ -40,6 +40,6 @@ }); | ||
render(<Portal portalId='foo'>foo</Portal>); | ||
id = mountNode.querySelector('[data-portal-id]').getAttribute('data-portal-id'); | ||
id = $('[data-portal-id]').getAttribute('data-portal-id'); | ||
expect(id).toBe('foo'); | ||
expect(document.getElementById(id)).not.toBeNull(); | ||
expect($(`#${id}`)).not.toBeNull(); | ||
}); | ||
@@ -49,6 +49,6 @@ | ||
render(<Portal>foo</Portal>); | ||
id = mountNode.querySelector('[data-portal-id]').getAttribute('data-portal-id'); | ||
id = $('[data-portal-id]').getAttribute('data-portal-id'); | ||
expect(id).not.toBeUndefined(); | ||
expect(document.getElementById(id)).not.toBeNull(); | ||
expect($(`#${id}`)).not.toBeNull(); | ||
}); | ||
@@ -58,5 +58,5 @@ | ||
render(<Portal>foo</Portal>); | ||
id = mountNode.querySelector('[data-portal-id]').getAttribute('data-portal-id'); | ||
id = $('[data-portal-id]').getAttribute('data-portal-id'); | ||
expect(document.getElementById(id).textContent).toBe('foo'); | ||
expect($(`#${id}`).textContent).toBe('foo'); | ||
}); | ||
@@ -66,8 +66,8 @@ | ||
render(<Portal><div className='foo'>bar</div></Portal>); | ||
id = mountNode.querySelector('[data-portal-id]').getAttribute('data-portal-id'); | ||
id = $('[data-portal-id]').getAttribute('data-portal-id'); | ||
expect(document.getElementById(id).querySelector('.foo')).not.toBeNull(); | ||
expect($(`#${id} .foo`)).not.toBeNull(); | ||
render(<Portal><div className='baz'>bar</div></Portal>); | ||
expect(document.getElementById(id).querySelector('.baz')).not.toBeNull(); | ||
expect($(`#${id} .baz`)).not.toBeNull(); | ||
}); | ||
@@ -77,7 +77,7 @@ | ||
render(<Portal>foo</Portal>); | ||
id = mountNode.querySelector('[data-portal-id]').getAttribute('data-portal-id'); | ||
id = $('[data-portal-id]').getAttribute('data-portal-id'); | ||
ReactDOM.unmountComponentAtNode(mountNode); | ||
expect(document.getElementById(id)).toBeNull(); | ||
expect($(`#${id}`)).toBeNull(); | ||
}); | ||
}); |
{ | ||
"name": "boundless-portal", | ||
"version": "1.0.0-beta.6", | ||
"version": "1.0.0-beta.7", | ||
"description": "A higher-order component for the rendering of components outside the normal React tree.", | ||
@@ -28,4 +28,4 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.6", | ||
"boundless-utils-uuid": "^1.0.0-beta.5" | ||
"boundless-utils-omit-keys": "^1.0.0-beta.7", | ||
"boundless-utils-uuid": "^1.0.0-beta.7" | ||
}, | ||
@@ -32,0 +32,0 @@ "peerDependencies": { |
102
README.md
@@ -0,4 +1,6 @@ | ||
<!--- | ||
THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
--> | ||
# Portal | ||
# Portal | ||
__A higher-order component for the rendering of components outside the normal React tree.__ | ||
@@ -8,5 +10,6 @@ | ||
## Props | ||
_Note: only top-level props are in the README, for the full list check out the [website](http://boundless.js.org/Portal#props)._ | ||
> Note: only top-level props are in the README, for the full list check out the [website](http://boundless.js.org/Portal#props). | ||
@@ -20,61 +23,54 @@ ### Required Props | ||
<table> | ||
<tr> | ||
<th>Name</th> | ||
<th>Type</th> | ||
<th>Default Value</th> | ||
<th>Description</th> | ||
</tr> | ||
- __`*`__ ・ any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes) | ||
<tr> | ||
<td>children</td> | ||
<td><pre><code>any renderable</code></pre></td> | ||
<td><pre><code class="language-js">null</code></pre></td> | ||
<td>any normal React child, but must be singular; multiple sibling children must have a common wrapper, such as a "layout" `<div>` | ||
Expects | Default Value | ||
- | - | ||
`any` | `n/a` | ||
✅ OK: | ||
- __`children`__ ・ any normal React child, but must be singular; multiple sibling children must have a common wrapper, such as a "layout" `<div>` | ||
✅ OK: | ||
```jsx | ||
<Portal> | ||
foo | ||
</Portal> | ||
<Portal> | ||
<div>foo</div> | ||
</Portal> | ||
<Portal> | ||
<div> | ||
<div>foo</div> | ||
<div>bar</div> | ||
</div> | ||
</Portal> | ||
``` | ||
⛔️ Not OK: | ||
```jsx | ||
<Portal> | ||
<div>foo</div> | ||
<div>bar</div> | ||
</Portal> | ||
``` | ||
```jsx | ||
<Portal> | ||
foo | ||
</Portal> | ||
Expects | Default Value | ||
- | - | ||
`any renderable` | `null` | ||
<Portal> | ||
<div>foo</div> | ||
</Portal> | ||
- __`destination`__ ・ the location to append the generated portal and child elements | ||
<Portal> | ||
<div> | ||
<div>foo</div> | ||
<div>bar</div> | ||
</div> | ||
</Portal> | ||
``` | ||
Expects | Default Value | ||
- | - | ||
`HTMLElement` | `document.body` | ||
⛔️ Not OK: | ||
- __`portalId`__ ・ the ID used to link the portal origin to the destination; added to generated `<div>` appended to the destination HTML node | ||
```jsx | ||
<Portal> | ||
<div>foo</div> | ||
<div>bar</div> | ||
</Portal> | ||
```</td> | ||
</tr> | ||
Expects | Default Value | ||
- | - | ||
`string` | `null` | ||
<tr> | ||
<td>destination</td> | ||
<td><pre><code>HTMLElement</code></pre></td> | ||
<td><pre><code class="language-js">document.body</code></pre></td> | ||
<td>the location to append the generated portal and child elements</td> | ||
</tr> | ||
<tr> | ||
<td>portalId</td> | ||
<td><pre><code>string</code></pre></td> | ||
<td><pre><code class="language-js">null</code></pre></td> | ||
<td>the ID used to link the portal origin to the destination; added to generated `<div>` appended to the destination HTML node</td> | ||
</tr> | ||
</table> | ||
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
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
155
39722
75