react-popper
Advanced tools
Comparing version
@@ -0,1 +1,5 @@ | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
import { createElement } from 'react'; | ||
@@ -9,3 +13,4 @@ import PropTypes from 'prop-types'; | ||
children = props.children, | ||
restProps = babelHelpers.objectWithoutProperties(props, ['component', 'innerRef', 'children']); | ||
restProps = _objectWithoutProperties(props, ['component', 'innerRef', 'children']); | ||
var popper = context.popper; | ||
@@ -29,4 +34,4 @@ | ||
var componentProps = babelHelpers.extends({}, restProps, { | ||
style: babelHelpers.extends({}, arrowStyle, restProps.style) | ||
var componentProps = _extends({}, restProps, { | ||
style: _extends({}, arrowStyle, restProps.style) | ||
}); | ||
@@ -33,0 +38,0 @@ |
@@ -0,1 +1,11 @@ | ||
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; }; }(); | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
import { Component, createElement } from 'react'; | ||
@@ -5,3 +15,3 @@ import PropTypes from 'prop-types'; | ||
var Manager = function (_Component) { | ||
babelHelpers.inherits(Manager, _Component); | ||
_inherits(Manager, _Component); | ||
@@ -13,3 +23,3 @@ function Manager() { | ||
babelHelpers.classCallCheck(this, Manager); | ||
_classCallCheck(this, Manager); | ||
@@ -20,10 +30,10 @@ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = Manager.__proto__ || Object.getPrototypeOf(Manager)).call.apply(_ref, [this].concat(args))), _this), _this._setTargetNode = function (node) { | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Manager.__proto__ || Object.getPrototypeOf(Manager)).call.apply(_ref, [this].concat(args))), _this), _this._setTargetNode = function (node) { | ||
_this._targetNode = node; | ||
}, _this._getTargetNode = function () { | ||
return _this._targetNode; | ||
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret); | ||
}, _temp), _possibleConstructorReturn(_this, _ret); | ||
} | ||
babelHelpers.createClass(Manager, [{ | ||
_createClass(Manager, [{ | ||
key: 'getChildContext', | ||
@@ -44,3 +54,3 @@ value: function getChildContext() { | ||
children = _props.children, | ||
restProps = babelHelpers.objectWithoutProperties(_props, ['tag', 'children']); | ||
restProps = _objectWithoutProperties(_props, ['tag', 'children']); | ||
@@ -54,2 +64,3 @@ if (tag !== false) { | ||
}]); | ||
return Manager; | ||
@@ -56,0 +67,0 @@ }(Component); |
@@ -0,1 +1,13 @@ | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
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; }; }(); | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
import { Component, createElement } from 'react'; | ||
@@ -8,3 +20,3 @@ import PropTypes from 'prop-types'; | ||
var Popper = function (_Component) { | ||
babelHelpers.inherits(Popper, _Component); | ||
_inherits(Popper, _Component); | ||
@@ -16,3 +28,3 @@ function Popper() { | ||
babelHelpers.classCallCheck(this, Popper); | ||
_classCallCheck(this, Popper); | ||
@@ -23,3 +35,3 @@ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = Popper.__proto__ || Object.getPrototypeOf(Popper)).call.apply(_ref, [this].concat(args))), _this), _this.state = {}, _this._setArrowNode = function (node) { | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Popper.__proto__ || Object.getPrototypeOf(Popper)).call.apply(_ref, [this].concat(args))), _this), _this.state = {}, _this._setArrowNode = function (node) { | ||
_this._arrowNode = node; | ||
@@ -64,3 +76,3 @@ }, _this._getTargetNode = function () { | ||
return babelHelpers.extends({ | ||
return _extends({ | ||
position: data.offsets.popper.position | ||
@@ -94,6 +106,6 @@ }, data.styles); | ||
_this._popper && _this._popper.scheduleUpdate(); | ||
}, _temp), babelHelpers.possibleConstructorReturn(_this, _ret); | ||
}, _temp), _possibleConstructorReturn(_this, _ret); | ||
} | ||
babelHelpers.createClass(Popper, [{ | ||
_createClass(Popper, [{ | ||
key: 'getChildContext', | ||
@@ -134,3 +146,3 @@ value: function getChildContext() { | ||
var modifiers = babelHelpers.extends({}, this.props.modifiers, { | ||
var modifiers = _extends({}, this.props.modifiers, { | ||
applyStyle: { enabled: false }, | ||
@@ -140,3 +152,3 @@ updateState: this._updateStateModifier | ||
if (this._arrowNode) { | ||
modifiers.arrow = babelHelpers.extends({}, this.props.modifiers.arrow || {}, { | ||
modifiers.arrow = _extends({}, this.props.modifiers.arrow || {}, { | ||
element: this._arrowNode | ||
@@ -175,3 +187,3 @@ }); | ||
children = _props2.children, | ||
restProps = babelHelpers.objectWithoutProperties(_props2, ['component', 'innerRef', 'placement', 'eventsEnabled', 'positionFixed', 'modifiers', 'children']); | ||
restProps = _objectWithoutProperties(_props2, ['component', 'innerRef', 'placement', 'eventsEnabled', 'positionFixed', 'modifiers', 'children']); | ||
@@ -196,4 +208,4 @@ var popperStyle = this._getPopperStyle(); | ||
var componentProps = babelHelpers.extends({}, restProps, { | ||
style: babelHelpers.extends({}, restProps.style, popperStyle), | ||
var componentProps = _extends({}, restProps, { | ||
style: _extends({}, restProps.style, popperStyle), | ||
'data-placement': popperPlacement, | ||
@@ -212,2 +224,3 @@ 'data-x-out-of-boundaries': popperHide | ||
}]); | ||
return Popper; | ||
@@ -214,0 +227,0 @@ }(Component); |
@@ -0,1 +1,5 @@ | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
import { createElement } from 'react'; | ||
@@ -9,3 +13,4 @@ import PropTypes from 'prop-types'; | ||
children = props.children, | ||
restProps = babelHelpers.objectWithoutProperties(props, ['component', 'innerRef', 'children']); | ||
restProps = _objectWithoutProperties(props, ['component', 'innerRef', 'children']); | ||
var popperManager = context.popperManager; | ||
@@ -25,3 +30,3 @@ | ||
var componentProps = babelHelpers.extends({}, restProps); | ||
var componentProps = _extends({}, restProps); | ||
@@ -28,0 +33,0 @@ if (typeof component === 'string') { |
{ | ||
"name": "react-popper", | ||
"version": "0.10.2", | ||
"version": "0.10.3", | ||
"description": "React wrapper around PopperJS.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
144981
4.01%1289
1.5%0
-100%