Socket
Socket
Sign inDemoInstall

react-portal

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-portal - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

build/examples_bundle.js

15

build/portal.js
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
Object.defineProperty(exports, "__esModule", {

@@ -9,2 +7,4 @@ value: true

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');

@@ -106,3 +106,3 @@

this.closePortal();
this.closePortal(true);
}

@@ -160,2 +160,4 @@ }, {

var isUnmounted = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];
var resetPortalState = function resetPortalState() {

@@ -168,3 +170,5 @@ if (_this2.node) {

_this2.node = null;
_this2.setState({ active: false });
if (!isUnmounted) {
_this2.setState({ active: false });
}
};

@@ -190,3 +194,3 @@

var root = (0, _reactDom.findDOMNode)(this.portal);
if (root.contains(e.target) || e.target.tagName === 'HTML') {
if (root.contains(e.target) || e.button !== 0) {
return;

@@ -212,2 +216,3 @@ }

Portal.propTypes = {

@@ -214,0 +219,0 @@ className: _react2.default.PropTypes.string,

@@ -69,3 +69,3 @@ import React from 'react';

this.closePortal();
this.closePortal(true);
}

@@ -112,3 +112,3 @@

closePortal() {
closePortal(isUnmounted = false) {
const resetPortalState = () => {

@@ -121,3 +121,5 @@ if (this.node) {

this.node = null;
this.setState({active: false});
if (!isUnmounted) {
this.setState({active: false});
}
};

@@ -140,3 +142,3 @@

const root = findDOMNode(this.portal);
if (root.contains(e.target) || e.target.tagName === 'HTML') { return; }
if (root.contains(e.target) || e.button !== 0) { return; }

@@ -143,0 +145,0 @@ e.stopPropagation();

{
"name": "react-portal",
"version": "2.0.0",
"version": "2.1.0",
"description": "React component for transportation of modals, lightboxes, loading bars... to document.body",

@@ -40,6 +40,2 @@ "main": "build/portal",

],
"peerDependencies": {
"react": "^0.14.0",
"react-dom": "^0.14.0"
},
"devDependencies": {

@@ -46,0 +42,0 @@ "babel-cli": "^6.4.0",

@@ -24,3 +24,3 @@ React-portal

Try [http://miksu.cz/react-portal](http://miksu.cz/react-portal) **or**
Try [https://miksu.cz/react-portal](https://miksu.cz/react-portal) **or**

@@ -178,2 +178,2 @@ ```shell

Vojtech Miksu 2015, [miksu.cz](http://miksu.cz), [@vmiksu](https://twitter.com/vmiksu)
Vojtech Miksu 2015, [miksu.cz](https://miksu.cz), [@vmiksu](https://twitter.com/vmiksu)

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