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

react-disposable-modal

Package Overview
Dependencies
Maintainers
12
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-disposable-modal - npm Package Compare versions

Comparing version 0.3.6 to 0.4.0

28

lib/disposable-modal.js

@@ -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

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