react-disposable-modal
Advanced tools
Comparing version 0.3.6 to 0.4.0
@@ -57,3 +57,3 @@ "use strict"; | ||
value: function render() { | ||
return _react.default.createElement("span", null, this.props.children); | ||
return _react["default"].createElement("span", null, this.props.children); | ||
} | ||
@@ -63,3 +63,3 @@ }]); | ||
return _Portal; | ||
}(_react.default.Component); | ||
}(_react["default"].Component); | ||
@@ -81,3 +81,3 @@ var _Modal = | ||
// renderPortal() if < React16 for inital render | ||
if (!_reactDom.default.createPortal) this.renderPortal(); | ||
if (!_reactDom["default"].createPortal) this.renderPortal(); | ||
} | ||
@@ -88,3 +88,3 @@ }, { | ||
// renderPortal() if < React16 so that state/prop changes are reflected in the DOM | ||
if (!_reactDom.default.createPortal) this.renderPortal(); | ||
if (!_reactDom["default"].createPortal) this.renderPortal(); | ||
} | ||
@@ -105,3 +105,3 @@ }, { | ||
value: function render() { | ||
if (!_reactDom.default.createPortal) return null; | ||
if (!_reactDom["default"].createPortal) return null; | ||
@@ -114,3 +114,3 @@ if (!this.parentContainer) { | ||
return _reactDom.default.createPortal(this.props.children, this.parentContainer); | ||
return _reactDom["default"].createPortal(this.props.children, this.parentContainer); | ||
} | ||
@@ -128,5 +128,5 @@ }, { | ||
return _Modal; | ||
}(_react.default.Component); | ||
}(_react["default"].Component); | ||
var Modal = (0, _reactDisposableDecorator.default)(_Modal); | ||
var Modal = (0, _reactDisposableDecorator["default"])(_Modal); | ||
exports.Modal = Modal; | ||
@@ -137,3 +137,3 @@ | ||
var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; | ||
return (0, _disposableComponent.default)(function (onNext, onCompleted, onError) { | ||
return (0, _disposableComponent["default"])(function (onNext, onCompleted, onError) { | ||
if (!parent) { | ||
@@ -144,3 +144,3 @@ parent = document.createElement("div"); | ||
_reactDom.default.render(_react.default.createElement(El, _extends({}, props, { | ||
_reactDom["default"].render(_react["default"].createElement(El, _extends({}, props, { | ||
onCompleted: onCompleted, | ||
@@ -151,3 +151,3 @@ onNext: onNext, | ||
}, function () { | ||
_reactDom.default.unmountComponentAtNode(parent); // React15 calls this multiple times, so while it's safe to do the above function, we have to check parent.parentNode or it crashes | ||
_reactDom["default"].unmountComponentAtNode(parent); // React15 calls this multiple times, so while it's safe to do the above function, we have to check parent.parentNode or it crashes | ||
@@ -162,3 +162,3 @@ | ||
var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; | ||
return (0, _rx.default)(function (next, complete, error) { | ||
return (0, _rx["default"])(function (next, complete, error) { | ||
if (!parent) { | ||
@@ -169,3 +169,3 @@ parent = document.createElement("div"); | ||
_reactDom.default.render(_react.default.createElement(El, _extends({}, props, { | ||
_reactDom["default"].render(_react["default"].createElement(El, _extends({}, props, { | ||
onCompleted: complete, | ||
@@ -176,3 +176,3 @@ onNext: next, | ||
}, function () { | ||
_reactDom.default.unmountComponentAtNode(parent); | ||
_reactDom["default"].unmountComponentAtNode(parent); | ||
@@ -179,0 +179,0 @@ if (parent.parentNode) parent.parentNode.removeChild(parent); |
{ | ||
"name": "react-disposable-modal", | ||
"version": "0.3.6", | ||
"version": "0.4.0", | ||
"description": "React-disposable-modal is a reactive API for building modal components in React.", | ||
@@ -14,5 +14,5 @@ "main": "lib/disposable-modal.js", | ||
"devDependencies": { | ||
"@babel/cli": "^7.1.5", | ||
"@babel/core": "^7.1.5", | ||
"@babel/preset-env": "^7.1.5", | ||
"@babel/cli": "^7.4.3", | ||
"@babel/core": "^7.4.3", | ||
"@babel/preset-env": "^7.4.3", | ||
"@babel/preset-react": "^7.0.0" | ||
@@ -25,3 +25,3 @@ }, | ||
"dependencies": { | ||
"disposable-component": "^0.3.2", | ||
"disposable-component": "^0.4.2", | ||
"react-disposable-decorator": "^4.0.0" | ||
@@ -28,0 +28,0 @@ }, |
Sorry, the diff of this file is not supported yet
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
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
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
22416
0
+ Addeddisposable-component@0.4.2(transitive)
+ Addedrx@4.1.0(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedtslib@1.14.1(transitive)
- Removeddisposable-component@0.3.2(transitive)
Updateddisposable-component@^0.4.2