Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atlaskit/layer-manager

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/layer-manager - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

14

CHANGELOG.md

@@ -1,6 +0,16 @@

<a name="2.0.1"></a>
## 2.0.1 (2017-09-12)
<a name="2.0.2"></a>
## 2.0.2 (2017-09-13)
<a name="2.0.2"></a>
## 2.0.2 (2017-09-13)
### Bug Fixes
* **component:** fix index vs src/index bug for npm ([31d7177](https://bitbucket.org/atlassian/atlaskit/commits/31d7177))
<a name="2.0.1"></a>

@@ -7,0 +17,0 @@ ## 2.0.1 (2017-09-12)

5

dist/bundle-cjs.js

@@ -403,2 +403,3 @@ module.exports = /******/

}
// eslint-disable-next-line
function withRenderTarget(_ref, WrappedComponent) {

@@ -468,3 +469,3 @@ var _class, _temp, target = _ref.target;

var node = document.createElement("span");
document.body.appendChild(node), this.portalElement = node, this.componentDidUpdate();
document.body && (document.body.appendChild(node), this.portalElement = node, this.componentDidUpdate());
}, Portal.prototype.componentDidUpdate = function() {

@@ -483,3 +484,3 @@ var children = this.props.children;

setTimeout(function() {
document.body.removeChild(_this2.portalElement);
document.body && document.body.removeChild(_this2.portalElement);
}, 5e3);

@@ -486,0 +487,0 @@ });

@@ -1,1 +0,1 @@

module.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(i).default}});var o=n(16);Object.defineProperty(t,"withRenderTarget",{enumerable:!0,get:function(){return r(o).default}});var u=n(9);Object.defineProperty(t,"Gateway",{enumerable:!0,get:function(){return u.Gateway}}),Object.defineProperty(t,"GatewayDest",{enumerable:!0,get:function(){return u.GatewayDest}}),Object.defineProperty(t,"GatewayProvider",{enumerable:!0,get:function(){return u.GatewayProvider}}),Object.defineProperty(t,"GatewayRegistry",{enumerable:!0,get:function(){return u.GatewayRegistry}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),u=n(4),a=r(u),l=n(5),s=r(l),d=n(6),c=r(d),p=n(7),f=r(p),h=n(8),y=n(9),m=function(e){function t(n,r){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,n,r));return i.appId="app-wrapper",i}return(0,s.default)(t,e),t.prototype.getChildContext=function(){return{appId:this.appId}},t.prototype.render=function(){var e=this.props.children;return f.default.createElement(y.GatewayProvider,null,f.default.createElement("div",null,f.default.createElement("div",{id:this.appId,style:{position:"relative",zIndex:0}},p.Children.only(e)),f.default.createElement(y.GatewayDest,{component:h.TransitionGroup,id:"gateway-destination-modal",name:"modal"})))},t}(p.PureComponent);m.propTypes={children:c.default.any.isRequired},m.childContextTypes={appId:c.default.string},t.default=m},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(e,t){e.exports=require("babel-runtime/helpers/inherits")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-transition-group")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(10);Object.defineProperty(t,"Gateway",{enumerable:!0,get:function(){return r(i).default}});var o=n(13);Object.defineProperty(t,"GatewayDest",{enumerable:!0,get:function(){return r(o).default}});var u=n(15);Object.defineProperty(t,"GatewayProvider",{enumerable:!0,get:function(){return r(u).default}});var a=n(11);Object.defineProperty(t,"GatewayRegistry",{enumerable:!0,get:function(){return r(a).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),u=n(4),a=r(u),l=n(5),s=r(l),d=n(7),c=n(6),p=r(c),f=n(11),h=r(f),y=function(e){function t(n,r){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,n,r));return i.gatewayRegistry=r.gatewayRegistry,i}return(0,s.default)(t,e),t.prototype.componentWillMount=function(){this.id=this.gatewayRegistry.register(this.props.into,this.props.children),this.renderIntoGatewayNode(this.props)},t.prototype.componentWillReceiveProps=function(e){this.gatewayRegistry.clearChild(this.props.into,this.id),this.renderIntoGatewayNode(e)},t.prototype.componentWillUnmount=function(){this.gatewayRegistry.unregister(this.props.into,this.id)},t.prototype.renderIntoGatewayNode=function(e){this.gatewayRegistry.addChild(this.props.into,this.id,e.children)},t.prototype.render=function(){return null},t}(d.Component);y.contextTypes={gatewayRegistry:p.default.instanceOf(h.default).isRequired},y.propTypes={into:p.default.string.isRequired,children:p.default.element},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=r(i),u=n(3),a=r(u),l=n(7),s=function(){function e(){(0,a.default)(this,e),this._containers={},this._children={},this._currentId=0}return e.prototype._renderContainer=function(e){var t=this;if(this._containers[e]&&this._children[e]){var n=(0,o.default)(this._children[e]),r=n.length;this._containers[e].setState({children:n.sort().map(function(n,i){var o=r-(i+1),u=t._children[e][n];return(0,l.cloneElement)(u,{key:n,stackIndex:o,stackTotal:r})})})}},e.prototype.addContainer=function(e,t){this._containers[e]=t,this._renderContainer(e)},e.prototype.removeContainer=function(e){this._containers[e]=null},e.prototype.addChild=function(e,t,n){this._children[e][t]=n,this._renderContainer(e)},e.prototype.clearChild=function(e,t){delete this._children[e][t]},e.prototype.register=function(e,t){this._children[e]=this._children[e]||{};var n=e+"_"+this._currentId;return this._children[e][n]=t,this._currentId+=1,n},e.prototype.unregister=function(e,t){this.clearChild(e,t),this._renderContainer(e)},e}();t.default=s},function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),o=r(i),u=n(3),a=r(u),l=n(4),s=r(l),d=n(5),c=r(d),p=n(7),f=n(6),h=r(f),y=n(11),m=r(y),g=function(e){function t(n,r){(0,a.default)(this,t);var i=(0,s.default)(this,e.call(this,n,r));return i.state={children:null},i.gatewayRegistry=r.gatewayRegistry,i}return(0,c.default)(t,e),t.prototype.componentWillMount=function(){this.gatewayRegistry.addContainer(this.props.name,this)},t.prototype.componentWillUnmount=function(){this.gatewayRegistry.removeContainer(this.props.name,this)},t.prototype.render=function(){var e=this.props,t=e.component,n=(0,o.default)(e,["component"]);return delete n.name,(0,p.createElement)(t,n,this.state.children)},t}(p.Component);g.contextTypes={gatewayRegistry:h.default.instanceOf(m.default).isRequired},g.propTypes={name:h.default.string.isRequired,component:h.default.oneOfType([h.default.string,h.default.func])},g.defaultProps={component:"div"},t.default=g},function(e,t){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),u=n(4),a=r(u),l=n(5),s=r(l),d=n(7),c=n(6),p=r(c),f=n(11),h=r(f),y=function(e){function t(n,r){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,n,r));return i.gatewayRegistry=new h.default,i}return(0,s.default)(t,e),t.prototype.getChildContext=function(){return{gatewayRegistry:this.gatewayRegistry}},t.prototype.render=function(){return this.props.children},t}(d.Component);y.childContextTypes={gatewayRegistry:p.default.instanceOf(h.default).isRequired},y.propTypes={children:p.default.element},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n,r,i=e.target;return r=n=function(e){function n(){return(0,u.default)(this,n),(0,l.default)(this,e.apply(this,arguments))}return(0,d.default)(n,e),n.prototype.render=function(){var e=this.context.gatewayRegistry,n=e?y.Gateway:g.default;return p.default.createElement(n,{into:i},p.default.createElement(t,this.props))},n}(c.Component),n.contextTypes={gatewayRegistry:h.default.instanceOf(y.GatewayRegistry)},r}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),u=r(o),a=n(4),l=r(a),s=n(5),d=r(s);t.default=i;var c=n(7),p=r(c),f=n(6),h=r(f),y=n(9),m=n(17),g=r(m)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return h.default.createElement(m.ThemeProvider,{theme:{}},h.default.createElement(b,e))}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),u=r(o),a=n(4),l=r(a),s=n(5),d=r(s),c=n(6),p=r(c);t.default=i;var f=n(7),h=r(f),y=n(18),m=n(19),g=n(8),v=function(e){var t=e.children;return f.Children.toArray(t)[0]||null},_=function(e){function t(){var n,r,i;(0,u.default)(this,t);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r=(0,l.default)(this,e.call.apply(e,[this].concat(a))),r.portalElement=null,r.renderChildren=function(e){var t=r.props.theme;return h.default.createElement(m.ThemeProvider,{theme:t},h.default.createElement(g.TransitionGroup,{component:v},e))},i=n,(0,l.default)(r,i)}return(0,d.default)(t,e),t.prototype.componentDidMount=function(){var e=document.createElement("span");document.body.appendChild(e),this.portalElement=e,this.componentDidUpdate()},t.prototype.componentDidUpdate=function(){var e=this.props.children;(0,y.render)(this.renderChildren(e),this.portalElement)},t.prototype.componentWillUnmount=function(){var e=this;(0,y.render)(this.renderChildren(),this.portalElement,function(){setTimeout(function(){document.body.removeChild(e.portalElement)},5e3)})},t.prototype.render=function(){return null},t}(f.Component);_.propTypes={children:p.default.any.isRequired,theme:p.default.object.isRequired};var b=(0,m.withTheme)(_)},function(e,t){e.exports=require("react-dom")},function(e,t){e.exports=require("styled-components")}]);
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(i).default}});var o=n(16);Object.defineProperty(t,"withRenderTarget",{enumerable:!0,get:function(){return r(o).default}});var u=n(9);Object.defineProperty(t,"Gateway",{enumerable:!0,get:function(){return u.Gateway}}),Object.defineProperty(t,"GatewayDest",{enumerable:!0,get:function(){return u.GatewayDest}}),Object.defineProperty(t,"GatewayProvider",{enumerable:!0,get:function(){return u.GatewayProvider}}),Object.defineProperty(t,"GatewayRegistry",{enumerable:!0,get:function(){return u.GatewayRegistry}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),u=n(4),a=r(u),l=n(5),d=r(l),s=n(6),c=r(s),p=n(7),f=r(p),h=n(8),y=n(9),m=function(e){function t(n,r){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,n,r));return i.appId="app-wrapper",i}return(0,d.default)(t,e),t.prototype.getChildContext=function(){return{appId:this.appId}},t.prototype.render=function(){var e=this.props.children;return f.default.createElement(y.GatewayProvider,null,f.default.createElement("div",null,f.default.createElement("div",{id:this.appId,style:{position:"relative",zIndex:0}},p.Children.only(e)),f.default.createElement(y.GatewayDest,{component:h.TransitionGroup,id:"gateway-destination-modal",name:"modal"})))},t}(p.PureComponent);m.propTypes={children:c.default.any.isRequired},m.childContextTypes={appId:c.default.string},t.default=m},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(e,t){e.exports=require("babel-runtime/helpers/inherits")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-transition-group")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(10);Object.defineProperty(t,"Gateway",{enumerable:!0,get:function(){return r(i).default}});var o=n(13);Object.defineProperty(t,"GatewayDest",{enumerable:!0,get:function(){return r(o).default}});var u=n(15);Object.defineProperty(t,"GatewayProvider",{enumerable:!0,get:function(){return r(u).default}});var a=n(11);Object.defineProperty(t,"GatewayRegistry",{enumerable:!0,get:function(){return r(a).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),u=n(4),a=r(u),l=n(5),d=r(l),s=n(7),c=n(6),p=r(c),f=n(11),h=r(f),y=function(e){function t(n,r){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,n,r));return i.gatewayRegistry=r.gatewayRegistry,i}return(0,d.default)(t,e),t.prototype.componentWillMount=function(){this.id=this.gatewayRegistry.register(this.props.into,this.props.children),this.renderIntoGatewayNode(this.props)},t.prototype.componentWillReceiveProps=function(e){this.gatewayRegistry.clearChild(this.props.into,this.id),this.renderIntoGatewayNode(e)},t.prototype.componentWillUnmount=function(){this.gatewayRegistry.unregister(this.props.into,this.id)},t.prototype.renderIntoGatewayNode=function(e){this.gatewayRegistry.addChild(this.props.into,this.id,e.children)},t.prototype.render=function(){return null},t}(s.Component);y.contextTypes={gatewayRegistry:p.default.instanceOf(h.default).isRequired},y.propTypes={into:p.default.string.isRequired,children:p.default.element},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=r(i),u=n(3),a=r(u),l=n(7),d=function(){function e(){(0,a.default)(this,e),this._containers={},this._children={},this._currentId=0}return e.prototype._renderContainer=function(e){var t=this;if(this._containers[e]&&this._children[e]){var n=(0,o.default)(this._children[e]),r=n.length;this._containers[e].setState({children:n.sort().map(function(n,i){var o=r-(i+1),u=t._children[e][n];return(0,l.cloneElement)(u,{key:n,stackIndex:o,stackTotal:r})})})}},e.prototype.addContainer=function(e,t){this._containers[e]=t,this._renderContainer(e)},e.prototype.removeContainer=function(e){this._containers[e]=null},e.prototype.addChild=function(e,t,n){this._children[e][t]=n,this._renderContainer(e)},e.prototype.clearChild=function(e,t){delete this._children[e][t]},e.prototype.register=function(e,t){this._children[e]=this._children[e]||{};var n=e+"_"+this._currentId;return this._children[e][n]=t,this._currentId+=1,n},e.prototype.unregister=function(e,t){this.clearChild(e,t),this._renderContainer(e)},e}();t.default=d},function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),o=r(i),u=n(3),a=r(u),l=n(4),d=r(l),s=n(5),c=r(s),p=n(7),f=n(6),h=r(f),y=n(11),m=r(y),g=function(e){function t(n,r){(0,a.default)(this,t);var i=(0,d.default)(this,e.call(this,n,r));return i.state={children:null},i.gatewayRegistry=r.gatewayRegistry,i}return(0,c.default)(t,e),t.prototype.componentWillMount=function(){this.gatewayRegistry.addContainer(this.props.name,this)},t.prototype.componentWillUnmount=function(){this.gatewayRegistry.removeContainer(this.props.name,this)},t.prototype.render=function(){var e=this.props,t=e.component,n=(0,o.default)(e,["component"]);return delete n.name,(0,p.createElement)(t,n,this.state.children)},t}(p.Component);g.contextTypes={gatewayRegistry:h.default.instanceOf(m.default).isRequired},g.propTypes={name:h.default.string.isRequired,component:h.default.oneOfType([h.default.string,h.default.func])},g.defaultProps={component:"div"},t.default=g},function(e,t){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),u=n(4),a=r(u),l=n(5),d=r(l),s=n(7),c=n(6),p=r(c),f=n(11),h=r(f),y=function(e){function t(n,r){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,n,r));return i.gatewayRegistry=new h.default,i}return(0,d.default)(t,e),t.prototype.getChildContext=function(){return{gatewayRegistry:this.gatewayRegistry}},t.prototype.render=function(){return this.props.children},t}(s.Component);y.childContextTypes={gatewayRegistry:p.default.instanceOf(h.default).isRequired},y.propTypes={children:p.default.element},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n,r,i=e.target;return r=n=function(e){function n(){return(0,u.default)(this,n),(0,l.default)(this,e.apply(this,arguments))}return(0,s.default)(n,e),n.prototype.render=function(){var e=this.context.gatewayRegistry,n=e?y.Gateway:g.default;return p.default.createElement(n,{into:i},p.default.createElement(t,this.props))},n}(c.Component),n.contextTypes={gatewayRegistry:h.default.instanceOf(y.GatewayRegistry)},r}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),u=r(o),a=n(4),l=r(a),d=n(5),s=r(d);t.default=i;var c=n(7),p=r(c),f=n(6),h=r(f),y=n(9),m=n(17),g=r(m)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return h.default.createElement(m.ThemeProvider,{theme:{}},h.default.createElement(b,e))}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),u=r(o),a=n(4),l=r(a),d=n(5),s=r(d),c=n(6),p=r(c);t.default=i;var f=n(7),h=r(f),y=n(18),m=n(19),g=n(8),v=function(e){var t=e.children;return f.Children.toArray(t)[0]||null},_=function(e){function t(){var n,r,i;(0,u.default)(this,t);for(var o=arguments.length,a=Array(o),d=0;d<o;d++)a[d]=arguments[d];return n=r=(0,l.default)(this,e.call.apply(e,[this].concat(a))),r.portalElement=null,r.renderChildren=function(e){var t=r.props.theme;return h.default.createElement(m.ThemeProvider,{theme:t},h.default.createElement(g.TransitionGroup,{component:v},e))},i=n,(0,l.default)(r,i)}return(0,s.default)(t,e),t.prototype.componentDidMount=function(){var e=document.createElement("span");document.body&&(document.body.appendChild(e),this.portalElement=e,this.componentDidUpdate())},t.prototype.componentDidUpdate=function(){var e=this.props.children;(0,y.render)(this.renderChildren(e),this.portalElement)},t.prototype.componentWillUnmount=function(){var e=this;(0,y.render)(this.renderChildren(),this.portalElement,function(){setTimeout(function(){document.body&&document.body.removeChild(e.portalElement)},5e3)})},t.prototype.render=function(){return null},t}(f.Component);_.propTypes={children:p.default.any.isRequired,theme:p.default.object.isRequired};var b=(0,m.withTheme)(_)},function(e,t){e.exports=require("react-dom")},function(e,t){e.exports=require("styled-components")}]);

@@ -406,2 +406,3 @@ !function(root, factory) {

}
// eslint-disable-next-line
function withRenderTarget(_ref, WrappedComponent) {

@@ -471,3 +472,3 @@ var _class, _temp, target = _ref.target;

var node = document.createElement("span");
document.body.appendChild(node), this.portalElement = node, this.componentDidUpdate();
document.body && (document.body.appendChild(node), this.portalElement = node, this.componentDidUpdate());
}, Portal.prototype.componentDidUpdate = function() {

@@ -486,3 +487,3 @@ var children = this.props.children;

setTimeout(function() {
document.body.removeChild(_this2.portalElement);
document.body && document.body.removeChild(_this2.portalElement);
}, 5e3);

@@ -489,0 +490,0 @@ });

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("react-transition-group"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/helpers/objectWithoutProperties"),require("react-dom"),require("styled-components")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","prop-types","react","react-transition-group","babel-runtime/core-js/object/keys","babel-runtime/helpers/objectWithoutProperties","react-dom","styled-components"],t):"object"==typeof exports?exports["@atlaskit/layerManager"]=t(require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("react-transition-group"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/helpers/objectWithoutProperties"),require("react-dom"),require("styled-components")):e["@atlaskit/layerManager"]=t(e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e["prop-types"],e.react,e["react-transition-group"],e["babel-runtime/core-js/object/keys"],e["babel-runtime/helpers/objectWithoutProperties"],e["react-dom"],e["styled-components"])}(this,function(e,t,r,n,i,o,u,a,l,s){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(1)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(i).default}});var o=r(16);Object.defineProperty(t,"withRenderTarget",{enumerable:!0,get:function(){return n(o).default}});var u=r(9);Object.defineProperty(t,"Gateway",{enumerable:!0,get:function(){return u.Gateway}}),Object.defineProperty(t,"GatewayDest",{enumerable:!0,get:function(){return u.GatewayDest}}),Object.defineProperty(t,"GatewayProvider",{enumerable:!0,get:function(){return u.GatewayProvider}}),Object.defineProperty(t,"GatewayRegistry",{enumerable:!0,get:function(){return u.GatewayRegistry}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=n(i),u=r(4),a=n(u),l=r(5),s=n(l),d=r(6),c=n(d),p=r(7),f=n(p),h=r(8),y=r(9),m=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,r,n));return i.appId="app-wrapper",i}return(0,s.default)(t,e),t.prototype.getChildContext=function(){return{appId:this.appId}},t.prototype.render=function(){var e=this.props.children;return f.default.createElement(y.GatewayProvider,null,f.default.createElement("div",null,f.default.createElement("div",{id:this.appId,style:{position:"relative",zIndex:0}},p.Children.only(e)),f.default.createElement(y.GatewayDest,{component:h.TransitionGroup,id:"gateway-destination-modal",name:"modal"})))},t}(p.PureComponent);m.propTypes={children:c.default.any.isRequired},m.childContextTypes={appId:c.default.string},t.default=m},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(10);Object.defineProperty(t,"Gateway",{enumerable:!0,get:function(){return n(i).default}});var o=r(13);Object.defineProperty(t,"GatewayDest",{enumerable:!0,get:function(){return n(o).default}});var u=r(15);Object.defineProperty(t,"GatewayProvider",{enumerable:!0,get:function(){return n(u).default}});var a=r(11);Object.defineProperty(t,"GatewayRegistry",{enumerable:!0,get:function(){return n(a).default}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=n(i),u=r(4),a=n(u),l=r(5),s=n(l),d=r(7),c=r(6),p=n(c),f=r(11),h=n(f),y=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,r,n));return i.gatewayRegistry=n.gatewayRegistry,i}return(0,s.default)(t,e),t.prototype.componentWillMount=function(){this.id=this.gatewayRegistry.register(this.props.into,this.props.children),this.renderIntoGatewayNode(this.props)},t.prototype.componentWillReceiveProps=function(e){this.gatewayRegistry.clearChild(this.props.into,this.id),this.renderIntoGatewayNode(e)},t.prototype.componentWillUnmount=function(){this.gatewayRegistry.unregister(this.props.into,this.id)},t.prototype.renderIntoGatewayNode=function(e){this.gatewayRegistry.addChild(this.props.into,this.id,e.children)},t.prototype.render=function(){return null},t}(d.Component);y.contextTypes={gatewayRegistry:p.default.instanceOf(h.default).isRequired},y.propTypes={into:p.default.string.isRequired,children:p.default.element},t.default=y},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(12),o=n(i),u=r(3),a=n(u),l=r(7),s=function(){function e(){(0,a.default)(this,e),this._containers={},this._children={},this._currentId=0}return e.prototype._renderContainer=function(e){var t=this;if(this._containers[e]&&this._children[e]){var r=(0,o.default)(this._children[e]),n=r.length;this._containers[e].setState({children:r.sort().map(function(r,i){var o=n-(i+1),u=t._children[e][r];return(0,l.cloneElement)(u,{key:r,stackIndex:o,stackTotal:n})})})}},e.prototype.addContainer=function(e,t){this._containers[e]=t,this._renderContainer(e)},e.prototype.removeContainer=function(e){this._containers[e]=null},e.prototype.addChild=function(e,t,r){this._children[e][t]=r,this._renderContainer(e)},e.prototype.clearChild=function(e,t){delete this._children[e][t]},e.prototype.register=function(e,t){this._children[e]=this._children[e]||{};var r=e+"_"+this._currentId;return this._children[e][r]=t,this._currentId+=1,r},e.prototype.unregister=function(e,t){this.clearChild(e,t),this._renderContainer(e)},e}();t.default=s},function(e,t){e.exports=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(14),o=n(i),u=r(3),a=n(u),l=r(4),s=n(l),d=r(5),c=n(d),p=r(7),f=r(6),h=n(f),y=r(11),m=n(y),b=function(e){function t(r,n){(0,a.default)(this,t);var i=(0,s.default)(this,e.call(this,r,n));return i.state={children:null},i.gatewayRegistry=n.gatewayRegistry,i}return(0,c.default)(t,e),t.prototype.componentWillMount=function(){this.gatewayRegistry.addContainer(this.props.name,this)},t.prototype.componentWillUnmount=function(){this.gatewayRegistry.removeContainer(this.props.name,this)},t.prototype.render=function(){var e=this.props,t=e.component,r=(0,o.default)(e,["component"]);return delete r.name,(0,p.createElement)(t,r,this.state.children)},t}(p.Component);b.contextTypes={gatewayRegistry:h.default.instanceOf(m.default).isRequired},b.propTypes={name:h.default.string.isRequired,component:h.default.oneOfType([h.default.string,h.default.func])},b.defaultProps={component:"div"},t.default=b},function(e,t){e.exports=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=n(i),u=r(4),a=n(u),l=r(5),s=n(l),d=r(7),c=r(6),p=n(c),f=r(11),h=n(f),y=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,r,n));return i.gatewayRegistry=new h.default,i}return(0,s.default)(t,e),t.prototype.getChildContext=function(){return{gatewayRegistry:this.gatewayRegistry}},t.prototype.render=function(){return this.props.children},t}(d.Component);y.childContextTypes={gatewayRegistry:p.default.instanceOf(h.default).isRequired},y.propTypes={children:p.default.element},t.default=y},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r,n,i=e.target;return n=r=function(e){function r(){return(0,u.default)(this,r),(0,l.default)(this,e.apply(this,arguments))}return(0,d.default)(r,e),r.prototype.render=function(){var e=this.context.gatewayRegistry,r=e?y.Gateway:b.default;return p.default.createElement(r,{into:i},p.default.createElement(t,this.props))},r}(c.Component),r.contextTypes={gatewayRegistry:h.default.instanceOf(y.GatewayRegistry)},n}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),u=n(o),a=r(4),l=n(a),s=r(5),d=n(s);t.default=i;var c=r(7),p=n(c),f=r(6),h=n(f),y=r(9),m=r(17),b=n(m)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return h.default.createElement(m.ThemeProvider,{theme:{}},h.default.createElement(_,e))}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),u=n(o),a=r(4),l=n(a),s=r(5),d=n(s),c=r(6),p=n(c);t.default=i;var f=r(7),h=n(f),y=r(18),m=r(19),b=r(8),g=function(e){var t=e.children;return f.Children.toArray(t)[0]||null},v=function(e){function t(){var r,n,i;(0,u.default)(this,t);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return r=n=(0,l.default)(this,e.call.apply(e,[this].concat(a))),n.portalElement=null,n.renderChildren=function(e){var t=n.props.theme;return h.default.createElement(m.ThemeProvider,{theme:t},h.default.createElement(b.TransitionGroup,{component:g},e))},i=r,(0,l.default)(n,i)}return(0,d.default)(t,e),t.prototype.componentDidMount=function(){var e=document.createElement("span");document.body.appendChild(e),this.portalElement=e,this.componentDidUpdate()},t.prototype.componentDidUpdate=function(){var e=this.props.children;(0,y.render)(this.renderChildren(e),this.portalElement)},t.prototype.componentWillUnmount=function(){var e=this;(0,y.render)(this.renderChildren(),this.portalElement,function(){setTimeout(function(){document.body.removeChild(e.portalElement)},5e3)})},t.prototype.render=function(){return null},t}(f.Component);v.propTypes={children:p.default.any.isRequired,theme:p.default.object.isRequired};var _=(0,m.withTheme)(v)},function(e,t){e.exports=l},function(e,t){e.exports=s}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("react-transition-group"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/helpers/objectWithoutProperties"),require("react-dom"),require("styled-components")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","prop-types","react","react-transition-group","babel-runtime/core-js/object/keys","babel-runtime/helpers/objectWithoutProperties","react-dom","styled-components"],t):"object"==typeof exports?exports["@atlaskit/layerManager"]=t(require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("react-transition-group"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/helpers/objectWithoutProperties"),require("react-dom"),require("styled-components")):e["@atlaskit/layerManager"]=t(e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e["prop-types"],e.react,e["react-transition-group"],e["babel-runtime/core-js/object/keys"],e["babel-runtime/helpers/objectWithoutProperties"],e["react-dom"],e["styled-components"])}(this,function(e,t,r,n,i,o,u,a,l,s){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(1)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(i).default}});var o=r(16);Object.defineProperty(t,"withRenderTarget",{enumerable:!0,get:function(){return n(o).default}});var u=r(9);Object.defineProperty(t,"Gateway",{enumerable:!0,get:function(){return u.Gateway}}),Object.defineProperty(t,"GatewayDest",{enumerable:!0,get:function(){return u.GatewayDest}}),Object.defineProperty(t,"GatewayProvider",{enumerable:!0,get:function(){return u.GatewayProvider}}),Object.defineProperty(t,"GatewayRegistry",{enumerable:!0,get:function(){return u.GatewayRegistry}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=n(i),u=r(4),a=n(u),l=r(5),s=n(l),d=r(6),c=n(d),p=r(7),f=n(p),h=r(8),y=r(9),m=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,r,n));return i.appId="app-wrapper",i}return(0,s.default)(t,e),t.prototype.getChildContext=function(){return{appId:this.appId}},t.prototype.render=function(){var e=this.props.children;return f.default.createElement(y.GatewayProvider,null,f.default.createElement("div",null,f.default.createElement("div",{id:this.appId,style:{position:"relative",zIndex:0}},p.Children.only(e)),f.default.createElement(y.GatewayDest,{component:h.TransitionGroup,id:"gateway-destination-modal",name:"modal"})))},t}(p.PureComponent);m.propTypes={children:c.default.any.isRequired},m.childContextTypes={appId:c.default.string},t.default=m},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(10);Object.defineProperty(t,"Gateway",{enumerable:!0,get:function(){return n(i).default}});var o=r(13);Object.defineProperty(t,"GatewayDest",{enumerable:!0,get:function(){return n(o).default}});var u=r(15);Object.defineProperty(t,"GatewayProvider",{enumerable:!0,get:function(){return n(u).default}});var a=r(11);Object.defineProperty(t,"GatewayRegistry",{enumerable:!0,get:function(){return n(a).default}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=n(i),u=r(4),a=n(u),l=r(5),s=n(l),d=r(7),c=r(6),p=n(c),f=r(11),h=n(f),y=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,r,n));return i.gatewayRegistry=n.gatewayRegistry,i}return(0,s.default)(t,e),t.prototype.componentWillMount=function(){this.id=this.gatewayRegistry.register(this.props.into,this.props.children),this.renderIntoGatewayNode(this.props)},t.prototype.componentWillReceiveProps=function(e){this.gatewayRegistry.clearChild(this.props.into,this.id),this.renderIntoGatewayNode(e)},t.prototype.componentWillUnmount=function(){this.gatewayRegistry.unregister(this.props.into,this.id)},t.prototype.renderIntoGatewayNode=function(e){this.gatewayRegistry.addChild(this.props.into,this.id,e.children)},t.prototype.render=function(){return null},t}(d.Component);y.contextTypes={gatewayRegistry:p.default.instanceOf(h.default).isRequired},y.propTypes={into:p.default.string.isRequired,children:p.default.element},t.default=y},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(12),o=n(i),u=r(3),a=n(u),l=r(7),s=function(){function e(){(0,a.default)(this,e),this._containers={},this._children={},this._currentId=0}return e.prototype._renderContainer=function(e){var t=this;if(this._containers[e]&&this._children[e]){var r=(0,o.default)(this._children[e]),n=r.length;this._containers[e].setState({children:r.sort().map(function(r,i){var o=n-(i+1),u=t._children[e][r];return(0,l.cloneElement)(u,{key:r,stackIndex:o,stackTotal:n})})})}},e.prototype.addContainer=function(e,t){this._containers[e]=t,this._renderContainer(e)},e.prototype.removeContainer=function(e){this._containers[e]=null},e.prototype.addChild=function(e,t,r){this._children[e][t]=r,this._renderContainer(e)},e.prototype.clearChild=function(e,t){delete this._children[e][t]},e.prototype.register=function(e,t){this._children[e]=this._children[e]||{};var r=e+"_"+this._currentId;return this._children[e][r]=t,this._currentId+=1,r},e.prototype.unregister=function(e,t){this.clearChild(e,t),this._renderContainer(e)},e}();t.default=s},function(e,t){e.exports=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(14),o=n(i),u=r(3),a=n(u),l=r(4),s=n(l),d=r(5),c=n(d),p=r(7),f=r(6),h=n(f),y=r(11),m=n(y),b=function(e){function t(r,n){(0,a.default)(this,t);var i=(0,s.default)(this,e.call(this,r,n));return i.state={children:null},i.gatewayRegistry=n.gatewayRegistry,i}return(0,c.default)(t,e),t.prototype.componentWillMount=function(){this.gatewayRegistry.addContainer(this.props.name,this)},t.prototype.componentWillUnmount=function(){this.gatewayRegistry.removeContainer(this.props.name,this)},t.prototype.render=function(){var e=this.props,t=e.component,r=(0,o.default)(e,["component"]);return delete r.name,(0,p.createElement)(t,r,this.state.children)},t}(p.Component);b.contextTypes={gatewayRegistry:h.default.instanceOf(m.default).isRequired},b.propTypes={name:h.default.string.isRequired,component:h.default.oneOfType([h.default.string,h.default.func])},b.defaultProps={component:"div"},t.default=b},function(e,t){e.exports=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=n(i),u=r(4),a=n(u),l=r(5),s=n(l),d=r(7),c=r(6),p=n(c),f=r(11),h=n(f),y=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,a.default)(this,e.call(this,r,n));return i.gatewayRegistry=new h.default,i}return(0,s.default)(t,e),t.prototype.getChildContext=function(){return{gatewayRegistry:this.gatewayRegistry}},t.prototype.render=function(){return this.props.children},t}(d.Component);y.childContextTypes={gatewayRegistry:p.default.instanceOf(h.default).isRequired},y.propTypes={children:p.default.element},t.default=y},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r,n,i=e.target;return n=r=function(e){function r(){return(0,u.default)(this,r),(0,l.default)(this,e.apply(this,arguments))}return(0,d.default)(r,e),r.prototype.render=function(){var e=this.context.gatewayRegistry,r=e?y.Gateway:b.default;return p.default.createElement(r,{into:i},p.default.createElement(t,this.props))},r}(c.Component),r.contextTypes={gatewayRegistry:h.default.instanceOf(y.GatewayRegistry)},n}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),u=n(o),a=r(4),l=n(a),s=r(5),d=n(s);t.default=i;var c=r(7),p=n(c),f=r(6),h=n(f),y=r(9),m=r(17),b=n(m)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return h.default.createElement(m.ThemeProvider,{theme:{}},h.default.createElement(_,e))}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),u=n(o),a=r(4),l=n(a),s=r(5),d=n(s),c=r(6),p=n(c);t.default=i;var f=r(7),h=n(f),y=r(18),m=r(19),b=r(8),g=function(e){var t=e.children;return f.Children.toArray(t)[0]||null},v=function(e){function t(){var r,n,i;(0,u.default)(this,t);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return r=n=(0,l.default)(this,e.call.apply(e,[this].concat(a))),n.portalElement=null,n.renderChildren=function(e){var t=n.props.theme;return h.default.createElement(m.ThemeProvider,{theme:t},h.default.createElement(b.TransitionGroup,{component:g},e))},i=r,(0,l.default)(n,i)}return(0,d.default)(t,e),t.prototype.componentDidMount=function(){var e=document.createElement("span");document.body&&(document.body.appendChild(e),this.portalElement=e,this.componentDidUpdate())},t.prototype.componentDidUpdate=function(){var e=this.props.children;(0,y.render)(this.renderChildren(e),this.portalElement)},t.prototype.componentWillUnmount=function(){var e=this;(0,y.render)(this.renderChildren(),this.portalElement,function(){setTimeout(function(){document.body&&document.body.removeChild(e.portalElement)},5e3)})},t.prototype.render=function(){return null},t}(f.Component);v.propTypes={children:p.default.any.isRequired,theme:p.default.object.isRequired};var _=(0,m.withTheme)(v)},function(e,t){e.exports=l},function(e,t){e.exports=s}])});

@@ -47,5 +47,7 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck';

var node = document.createElement('span');
document.body.appendChild(node);
this.portalElement = node;
this.componentDidUpdate();
if (document.body) {
document.body.appendChild(node);
this.portalElement = node;
this.componentDidUpdate();
}
};

@@ -70,3 +72,5 @@

setTimeout(function () {
document.body.removeChild(_this2.portalElement);
if (document.body) {
document.body.removeChild(_this2.portalElement);
}
}, 5000);

@@ -73,0 +77,0 @@ });

@@ -9,3 +9,3 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck';

import Portal from './Portal';
// eslint-disable-next-line
export default function withRenderTarget(_ref, WrappedComponent) {

@@ -12,0 +12,0 @@ var _class, _temp;

{
"name": "@atlaskit/layer-manager",
"version": "2.0.1",
"version": "2.0.2",
"config": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -12,3 +12,3 @@ [![AtlasKit component registry](https://img.shields.io/badge/AtlasKit-components-FF5230.svg)](http://atlaskit.atlassian.com)

Interact with a [live demo of the @atlaskit/layer-manager component](https://aui-cdn.atlassian.com/atlaskit/stories/@atlaskit/layer-manager/2.0.1/).
Interact with a [live demo of the @atlaskit/layer-manager component](https://aui-cdn.atlassian.com/atlaskit/stories/@atlaskit/layer-manager/2.0.2/).

@@ -15,0 +15,0 @@ ## Installation

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc