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

rc-trigger

Package Overview
Dependencies
Maintainers
3
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-trigger - npm Package Compare versions

Comparing version 1.11.2 to 1.11.3

61

es/Popup.js

@@ -13,2 +13,3 @@ import _extends from 'babel-runtime/helpers/extends';

import LazyRenderBox from './LazyRenderBox';
import { saveRef } from './utils';

@@ -18,28 +19,12 @@ var Popup = function (_Component) {

function Popup() {
var _ref;
function Popup(props) {
_classCallCheck(this, Popup);
var _temp, _this, _ret;
var _this = _possibleConstructorReturn(this, (Popup.__proto__ || Object.getPrototypeOf(Popup)).call(this, props));
_classCallCheck(this, Popup);
_initialiseProps.call(_this);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Popup.__proto__ || Object.getPrototypeOf(Popup)).call.apply(_ref, [this].concat(args))), _this), _this.onAlign = function (popupDomNode, align) {
var props = _this.props;
var currentAlignClassName = props.getClassNameFromAlign(align);
// FIX: https://github.com/react-component/trigger/issues/56
// FIX: https://github.com/react-component/tooltip/issues/79
if (_this.currentAlignClassName !== currentAlignClassName) {
_this.currentAlignClassName = currentAlignClassName;
popupDomNode.className = _this.getClassName(currentAlignClassName);
}
props.onAlign(popupDomNode, align);
}, _this.getTarget = function () {
return _this.props.getRootDomNode();
}, _this.saveAlign = function (align) {
_this.alignInstance = align;
}, _temp), _possibleConstructorReturn(_this, _ret);
_this.savePopupRef = saveRef.bind(_this, 'popupInstance');
_this.saveAlignRef = saveRef.bind(_this, 'alignInstance');
return _this;
}

@@ -55,3 +40,3 @@

value: function getPopupDomNode() {
return ReactDOM.findDOMNode(this.refs.popup);
return ReactDOM.findDOMNode(this.popupInstance);
}

@@ -87,3 +72,4 @@ }, {

value: function getPopupElement() {
var props = this.props;
var savePopupRef = this.savePopupRef,
props = this.props;
var align = props.align,

@@ -104,3 +90,3 @@ style = props.style,

prefixCls: prefixCls,
ref: 'popup',
ref: savePopupRef,
onMouseEnter: props.onMouseEnter,

@@ -124,3 +110,3 @@ onMouseLeave: props.onMouseLeave,

key: 'popup',
ref: this.saveAlign,
ref: this.saveAlignRef,
monitorWindowResize: true,

@@ -154,3 +140,3 @@ align: align,

key: 'popup',
ref: this.saveAlign,
ref: this.saveAlignRef,
monitorWindowResize: true,

@@ -242,3 +228,22 @@ xVisible: visible,

var _initialiseProps = function _initialiseProps() {
var _this2 = this;
this.onAlign = function (popupDomNode, align) {
var props = _this2.props;
var currentAlignClassName = props.getClassNameFromAlign(align);
// FIX: https://github.com/react-component/trigger/issues/56
// FIX: https://github.com/react-component/tooltip/issues/79
if (_this2.currentAlignClassName !== currentAlignClassName) {
_this2.currentAlignClassName = currentAlignClassName;
popupDomNode.className = _this2.getClassName(currentAlignClassName);
}
props.onAlign(popupDomNode, align);
};
this.getTarget = function () {
return _this2.props.getRootDomNode();
};
};
export default Popup;

@@ -21,2 +21,6 @@ import _extends from 'babel-runtime/helpers/extends';

return '';
}
export function saveRef(name, component) {
this[name] = component;
}

@@ -55,2 +55,4 @@ 'use strict';

var _utils = require('./utils');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

@@ -61,28 +63,12 @@

function Popup() {
var _ref;
function Popup(props) {
(0, _classCallCheck3['default'])(this, Popup);
var _temp, _this, _ret;
var _this = (0, _possibleConstructorReturn3['default'])(this, (Popup.__proto__ || Object.getPrototypeOf(Popup)).call(this, props));
(0, _classCallCheck3['default'])(this, Popup);
_initialiseProps.call(_this);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, (_ref = Popup.__proto__ || Object.getPrototypeOf(Popup)).call.apply(_ref, [this].concat(args))), _this), _this.onAlign = function (popupDomNode, align) {
var props = _this.props;
var currentAlignClassName = props.getClassNameFromAlign(align);
// FIX: https://github.com/react-component/trigger/issues/56
// FIX: https://github.com/react-component/tooltip/issues/79
if (_this.currentAlignClassName !== currentAlignClassName) {
_this.currentAlignClassName = currentAlignClassName;
popupDomNode.className = _this.getClassName(currentAlignClassName);
}
props.onAlign(popupDomNode, align);
}, _this.getTarget = function () {
return _this.props.getRootDomNode();
}, _this.saveAlign = function (align) {
_this.alignInstance = align;
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
_this.savePopupRef = _utils.saveRef.bind(_this, 'popupInstance');
_this.saveAlignRef = _utils.saveRef.bind(_this, 'alignInstance');
return _this;
}

@@ -98,3 +84,3 @@

value: function getPopupDomNode() {
return _reactDom2['default'].findDOMNode(this.refs.popup);
return _reactDom2['default'].findDOMNode(this.popupInstance);
}

@@ -130,3 +116,4 @@ }, {

value: function getPopupElement() {
var props = this.props;
var savePopupRef = this.savePopupRef,
props = this.props;
var align = props.align,

@@ -147,3 +134,3 @@ style = props.style,

prefixCls: prefixCls,
ref: 'popup',
ref: savePopupRef,
onMouseEnter: props.onMouseEnter,

@@ -167,3 +154,3 @@ onMouseLeave: props.onMouseLeave,

key: 'popup',
ref: this.saveAlign,
ref: this.saveAlignRef,
monitorWindowResize: true,

@@ -197,3 +184,3 @@ align: align,

key: 'popup',
ref: this.saveAlign,
ref: this.saveAlignRef,
monitorWindowResize: true,

@@ -283,3 +270,24 @@ xVisible: visible,

};
var _initialiseProps = function _initialiseProps() {
var _this2 = this;
this.onAlign = function (popupDomNode, align) {
var props = _this2.props;
var currentAlignClassName = props.getClassNameFromAlign(align);
// FIX: https://github.com/react-component/trigger/issues/56
// FIX: https://github.com/react-component/tooltip/issues/79
if (_this2.currentAlignClassName !== currentAlignClassName) {
_this2.currentAlignClassName = currentAlignClassName;
popupDomNode.className = _this2.getClassName(currentAlignClassName);
}
props.onAlign(popupDomNode, align);
};
this.getTarget = function () {
return _this2.props.getRootDomNode();
};
};
exports['default'] = Popup;
module.exports = exports['default'];

@@ -13,2 +13,3 @@ 'use strict';

exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign;
exports.saveRef = saveRef;

@@ -36,2 +37,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

return '';
}
function saveRef(name, component) {
this[name] = component;
}
{
"name": "rc-trigger",
"version": "1.11.2",
"version": "1.11.3",
"description": "base abstract trigger component for react",

@@ -5,0 +5,0 @@ "keywords": [

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