@uiw/react-portal
Advanced tools
Comparing version 4.0.0-alpha.2 to 4.0.0-alpha.3
@@ -23,5 +23,5 @@ import React from 'react'; | ||
componentWillUnmount(): void; | ||
render(): React.ReactPortal | null; | ||
render(): JSX.Element; | ||
private createContainerElement; | ||
unstableRenderNoPortal(): void; | ||
} |
"use strict"; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
@@ -20,7 +22,7 @@ | ||
var _react = _interopRequireDefault(require("react")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _reactDom = _interopRequireDefault(require("react-dom")); | ||
function _createSuper(Derived) { return function () { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | ||
@@ -96,3 +98,3 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
if (cannotCreatePortal || typeof document === 'undefined' || !this.state.hasMounted) { | ||
return null; | ||
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null); | ||
} else { | ||
@@ -99,0 +101,0 @@ return _reactDom.default.createPortal(this.props.children, this.portalElement); |
@@ -23,5 +23,5 @@ import React from 'react'; | ||
componentWillUnmount(): void; | ||
render(): React.ReactPortal | null; | ||
render(): JSX.Element; | ||
private createContainerElement; | ||
unstableRenderNoPortal(): void; | ||
} |
@@ -7,7 +7,7 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
import React from 'react'; | ||
import React, { Fragment } from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
@@ -82,3 +82,3 @@ | ||
if (cannotCreatePortal || typeof document === 'undefined' || !this.state.hasMounted) { | ||
return null; | ||
return /*#__PURE__*/React.createElement(Fragment, null); | ||
} else { | ||
@@ -85,0 +85,0 @@ return ReactDOM.createPortal(this.props.children, this.portalElement); |
{ | ||
"name": "@uiw/react-portal", | ||
"version": "4.0.0-alpha.2", | ||
"version": "4.0.0-alpha.3", | ||
"description": "Portal component", | ||
"author": "Kenny Wong <wowohoo@qq.com>", | ||
"homepage": "https://github.com/uiwjs/uiw/tree/master/packages/react-portal#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/uiwjs/uiw.git" | ||
}, | ||
"license": "MIT", | ||
@@ -61,3 +65,3 @@ "main": "lib/cjs/index.js", | ||
}, | ||
"gitHead": "64af09b5b66c90204315cda3d4f0e3a567ede7a6" | ||
"gitHead": "b69dd5c068ab4d05bae8f347795dd515c0af6e3b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
24386
317
0