rc-trigger
Advanced tools
Comparing version 1.7.2 to 1.7.3
@@ -7,2 +7,6 @@ 'use strict'; | ||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); | ||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
var _react = require('react'); | ||
@@ -14,4 +18,2 @@ | ||
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; } | ||
var LazyRenderBox = _react2["default"].createClass({ | ||
@@ -33,4 +35,4 @@ displayName: 'LazyRenderBox', | ||
var visible = _props.visible; | ||
var props = (0, _objectWithoutProperties3["default"])(_props, ['hiddenClassName', 'visible']); | ||
var props = _objectWithoutProperties(_props, ['hiddenClassName', 'visible']); | ||
@@ -37,0 +39,0 @@ if (hiddenClassName || _react2["default"].Children.count(props.children) > 1) { |
@@ -7,4 +7,6 @@ 'use strict'; | ||
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 _extends2 = require('babel-runtime/helpers/extends'); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _react = require('react'); | ||
@@ -105,3 +107,3 @@ | ||
} | ||
var newStyle = _extends({}, style, this.getZIndexStyle()); | ||
var newStyle = (0, _extends3["default"])({}, style, this.getZIndexStyle()); | ||
var popupInnerProps = { | ||
@@ -136,3 +138,3 @@ className: className, | ||
_PopupInner2["default"], | ||
_extends({ | ||
(0, _extends3["default"])({ | ||
visible: true | ||
@@ -169,3 +171,3 @@ }, popupInnerProps), | ||
_PopupInner2["default"], | ||
_extends({ | ||
(0, _extends3["default"])({ | ||
hiddenClassName: hiddenClassName | ||
@@ -172,0 +174,0 @@ }, popupInnerProps), |
@@ -7,4 +7,6 @@ 'use strict'; | ||
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 _extends2 = require('babel-runtime/helpers/extends'); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _react = require('react'); | ||
@@ -73,2 +75,3 @@ | ||
mask: _react.PropTypes.bool, | ||
maskClosable: _react.PropTypes.bool, | ||
onPopupAlign: _react.PropTypes.func, | ||
@@ -106,3 +109,3 @@ popupAlign: _react.PropTypes.object, | ||
_Popup2["default"], | ||
_extends({ | ||
(0, _extends3["default"])({ | ||
prefixCls: props.prefixCls, | ||
@@ -148,2 +151,3 @@ destroyPopupOnHide: props.destroyPopupOnHide, | ||
mask: false, | ||
maskClosable: true, | ||
action: [], | ||
@@ -291,2 +295,5 @@ showAction: [], | ||
onDocumentClick: function onDocumentClick(event) { | ||
if (this.props.mask && !this.props.maskClosable) { | ||
return; | ||
} | ||
var target = event.target; | ||
@@ -296,3 +303,3 @@ var root = (0, _reactDom.findDOMNode)(this); | ||
if (!(0, _contains2["default"])(root, target) && !(0, _contains2["default"])(popupNode, target)) { | ||
this.setPopupVisible(false); | ||
this.close(); | ||
} | ||
@@ -432,2 +439,5 @@ }, | ||
}, | ||
close: function close() { | ||
this.setPopupVisible(false); | ||
}, | ||
render: function render() { | ||
@@ -434,0 +444,0 @@ var props = this.props; |
@@ -7,6 +7,11 @@ 'use strict'; | ||
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 _extends2 = require('babel-runtime/helpers/extends'); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
exports.getAlignFromPlacement = getAlignFromPlacement; | ||
exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function isPointsEq(a1, a2) { | ||
@@ -18,3 +23,3 @@ return a1[0] === a2[0] && a1[1] === a2[1]; | ||
var baseAlign = builtinPlacements[placementStr] || {}; | ||
return _extends({}, baseAlign, align); | ||
return (0, _extends3["default"])({}, baseAlign, align); | ||
} | ||
@@ -21,0 +26,0 @@ |
{ | ||
"name": "rc-trigger", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "base abstract trigger component for react", | ||
@@ -33,3 +33,3 @@ "keywords": [ | ||
"start": "rc-tools run server", | ||
"pub": "rc-tools run pub", | ||
"pub": "rc-tools run pub --babel-runtime", | ||
"lint": "rc-tools run lint", | ||
@@ -57,2 +57,3 @@ "karma": "rc-tools run karma", | ||
"dependencies": { | ||
"babel-runtime": "6.x", | ||
"rc-align": "2.x", | ||
@@ -59,0 +60,0 @@ "rc-animate": "2.x", |
@@ -159,6 +159,12 @@ # rc-trigger | ||
<td>boolean</td> | ||
<td></td> | ||
<td>false</td> | ||
<td>whether to support mask</td> | ||
</tr> | ||
<tr> | ||
<td>maskClosable</td> | ||
<td>boolean</td> | ||
<td>true</td> | ||
<td>whether to support click mask to hide</td> | ||
</tr> | ||
<tr> | ||
<td>popupVisible</td> | ||
@@ -165,0 +171,0 @@ <td>boolean</td> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41146
931
244
4
+ Addedbabel-runtime@6.x