aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/common.js')
-rw-r--r--examples/common.js3091
1 files changed, 1087 insertions, 2004 deletions
diff --git a/examples/common.js b/examples/common.js
index 5f073b6..74b6347 100644
--- a/examples/common.js
+++ b/examples/common.js
@@ -258,12 +258,40 @@
258 // shim for using process in browser 258 // shim for using process in browser
259 259
260 var process = module.exports = {}; 260 var process = module.exports = {};
261
262 // cached from whatever global is present so that test runners that stub it
263 // don't break things. But we need to wrap it in a try catch in case it is
264 // wrapped in strict mode code which doesn't define any globals. It's inside a
265 // function because try/catches deoptimize in certain engines.
266
267 var cachedSetTimeout;
268 var cachedClearTimeout;
269
270 (function () {
271 try {
272 cachedSetTimeout = setTimeout;
273 } catch (e) {
274 cachedSetTimeout = function () {
275 throw new Error('setTimeout is not defined');
276 }
277 }
278 try {
279 cachedClearTimeout = clearTimeout;
280 } catch (e) {
281 cachedClearTimeout = function () {
282 throw new Error('clearTimeout is not defined');
283 }
284 }
285 } ())
261 var queue = []; 286 var queue = [];
262 var draining = false; 287 var draining = false;
263 var currentQueue; 288 var currentQueue;
264 var queueIndex = -1; 289 var queueIndex = -1;
265 290
266 function cleanUpNextTick() { 291 function cleanUpNextTick() {
292 if (!draining || !currentQueue) {
293 return;
294 }
267 draining = false; 295 draining = false;
268 if (currentQueue.length) { 296 if (currentQueue.length) {
269 queue = currentQueue.concat(queue); 297 queue = currentQueue.concat(queue);
@@ -279,7 +307,7 @@
279 if (draining) { 307 if (draining) {
280 return; 308 return;
281 } 309 }
282 var timeout = setTimeout(cleanUpNextTick); 310 var timeout = cachedSetTimeout(cleanUpNextTick);
283 draining = true; 311 draining = true;
284 312
285 var len = queue.length; 313 var len = queue.length;
@@ -296,7 +324,7 @@
296 } 324 }
297 currentQueue = null; 325 currentQueue = null;
298 draining = false; 326 draining = false;
299 clearTimeout(timeout); 327 cachedClearTimeout(timeout);
300 } 328 }
301 329
302 process.nextTick = function (fun) { 330 process.nextTick = function (fun) {
@@ -308,7 +336,7 @@
308 } 336 }
309 queue.push(new Item(fun, args)); 337 queue.push(new Item(fun, args));
310 if (queue.length === 1 && !draining) { 338 if (queue.length === 1 && !draining) {
311 setTimeout(drainQueue, 0); 339 cachedSetTimeout(drainQueue, 0);
312 } 340 }
313 }; 341 };
314 342
@@ -1114,7 +1142,7 @@
1114 * will remain to ensure logic does not differ in production. 1142 * will remain to ensure logic does not differ in production.
1115 */ 1143 */
1116 1144
1117 var invariant = function (condition, format, a, b, c, d, e, f) { 1145 function invariant(condition, format, a, b, c, d, e, f) {
1118 if (process.env.NODE_ENV !== 'production') { 1146 if (process.env.NODE_ENV !== 'production') {
1119 if (format === undefined) { 1147 if (format === undefined) {
1120 throw new Error('invariant requires an error message argument'); 1148 throw new Error('invariant requires an error message argument');
@@ -1128,15 +1156,16 @@
1128 } else { 1156 } else {
1129 var args = [a, b, c, d, e, f]; 1157 var args = [a, b, c, d, e, f];
1130 var argIndex = 0; 1158 var argIndex = 0;
1131 error = new Error('Invariant Violation: ' + format.replace(/%s/g, function () { 1159 error = new Error(format.replace(/%s/g, function () {
1132 return args[argIndex++]; 1160 return args[argIndex++];
1133 })); 1161 }));
1162 error.name = 'Invariant Violation';
1134 } 1163 }
1135 1164
1136 error.framesToPop = 1; // we don't care about invariant's own frame 1165 error.framesToPop = 1; // we don't care about invariant's own frame
1137 throw error; 1166 throw error;
1138 } 1167 }
1139 }; 1168 }
1140 1169
1141 module.exports = invariant; 1170 module.exports = invariant;
1142 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) 1171 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
@@ -7997,6 +8026,10 @@
7997 } 8026 }
7998 }; 8027 };
7999 8028
8029 function registerNullComponentID() {
8030 ReactEmptyComponentRegistry.registerNullComponentID(this._rootNodeID);
8031 }
8032
8000 var ReactEmptyComponent = function (instantiate) { 8033 var ReactEmptyComponent = function (instantiate) {
8001 this._currentElement = null; 8034 this._currentElement = null;
8002 this._rootNodeID = null; 8035 this._rootNodeID = null;
@@ -8005,7 +8038,7 @@
8005 assign(ReactEmptyComponent.prototype, { 8038 assign(ReactEmptyComponent.prototype, {
8006 construct: function (element) {}, 8039 construct: function (element) {},
8007 mountComponent: function (rootID, transaction, context) { 8040 mountComponent: function (rootID, transaction, context) {
8008 ReactEmptyComponentRegistry.registerNullComponentID(rootID); 8041 transaction.getReactMountReady().enqueue(registerNullComponentID, this);
8009 this._rootNodeID = rootID; 8042 this._rootNodeID = rootID;
8010 return ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, context); 8043 return ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, context);
8011 }, 8044 },
@@ -9355,6 +9388,7 @@
9355 */ 9388 */
9356 var EventInterface = { 9389 var EventInterface = {
9357 type: null, 9390 type: null,
9391 target: null,
9358 // currentTarget is set when dispatching; no use in copying it here 9392 // currentTarget is set when dispatching; no use in copying it here
9359 currentTarget: emptyFunction.thatReturnsNull, 9393 currentTarget: emptyFunction.thatReturnsNull,
9360 eventPhase: null, 9394 eventPhase: null,
@@ -9388,8 +9422,6 @@
9388 this.dispatchConfig = dispatchConfig; 9422 this.dispatchConfig = dispatchConfig;
9389 this.dispatchMarker = dispatchMarker; 9423 this.dispatchMarker = dispatchMarker;
9390 this.nativeEvent = nativeEvent; 9424 this.nativeEvent = nativeEvent;
9391 this.target = nativeEventTarget;
9392 this.currentTarget = nativeEventTarget;
9393 9425
9394 var Interface = this.constructor.Interface; 9426 var Interface = this.constructor.Interface;
9395 for (var propName in Interface) { 9427 for (var propName in Interface) {
@@ -9400,7 +9432,11 @@
9400 if (normalize) { 9432 if (normalize) {
9401 this[propName] = normalize(nativeEvent); 9433 this[propName] = normalize(nativeEvent);
9402 } else { 9434 } else {
9403 this[propName] = nativeEvent[propName]; 9435 if (propName === 'target') {
9436 this.target = nativeEventTarget;
9437 } else {
9438 this[propName] = nativeEvent[propName];
9439 }
9404 } 9440 }
9405 } 9441 }
9406 9442
@@ -10563,8 +10599,8 @@
10563 */ 10599 */
10564 // autoCapitalize and autoCorrect are supported in Mobile Safari for 10600 // autoCapitalize and autoCorrect are supported in Mobile Safari for
10565 // keyboard hints. 10601 // keyboard hints.
10566 autoCapitalize: null, 10602 autoCapitalize: MUST_USE_ATTRIBUTE,
10567 autoCorrect: null, 10603 autoCorrect: MUST_USE_ATTRIBUTE,
10568 // autoSave allows WebKit/Blink to persist values of input fields on page reloads 10604 // autoSave allows WebKit/Blink to persist values of input fields on page reloads
10569 autoSave: null, 10605 autoSave: null,
10570 // color is for Safari mask-icon link 10606 // color is for Safari mask-icon link
@@ -10595,9 +10631,7 @@
10595 httpEquiv: 'http-equiv' 10631 httpEquiv: 'http-equiv'
10596 }, 10632 },
10597 DOMPropertyNames: { 10633 DOMPropertyNames: {
10598 autoCapitalize: 'autocapitalize',
10599 autoComplete: 'autocomplete', 10634 autoComplete: 'autocomplete',
10600 autoCorrect: 'autocorrect',
10601 autoFocus: 'autofocus', 10635 autoFocus: 'autofocus',
10602 autoPlay: 'autoplay', 10636 autoPlay: 'autoplay',
10603 autoSave: 'autosave', 10637 autoSave: 'autosave',
@@ -13251,7 +13285,10 @@
13251 } 13285 }
13252 }); 13286 });
13253 13287
13254 nativeProps.children = content; 13288 if (content) {
13289 nativeProps.children = content;
13290 }
13291
13255 return nativeProps; 13292 return nativeProps;
13256 } 13293 }
13257 13294
@@ -13676,7 +13713,7 @@
13676 var value = LinkedValueUtils.getValue(props); 13713 var value = LinkedValueUtils.getValue(props);
13677 13714
13678 if (value != null) { 13715 if (value != null) {
13679 updateOptions(this, props, value); 13716 updateOptions(this, Boolean(props.multiple), value);
13680 } 13717 }
13681 } 13718 }
13682 } 13719 }
@@ -16711,11 +16748,14 @@
16711 * @typechecks 16748 * @typechecks
16712 */ 16749 */
16713 16750
16751 /* eslint-disable fb-www/typeof-undefined */
16752
16714 /** 16753 /**
16715 * Same as document.activeElement but wraps in a try-catch block. In IE it is 16754 * Same as document.activeElement but wraps in a try-catch block. In IE it is
16716 * not safe to call document.activeElement if there is nothing focused. 16755 * not safe to call document.activeElement if there is nothing focused.
16717 * 16756 *
16718 * The activeElement will be null only if the document or document body is not yet defined. 16757 * The activeElement will be null only if the document or document body is not
16758 * yet defined.
16719 */ 16759 */
16720 'use strict'; 16760 'use strict';
16721 16761
@@ -16723,7 +16763,6 @@
16723 if (typeof document === 'undefined') { 16763 if (typeof document === 'undefined') {
16724 return null; 16764 return null;
16725 } 16765 }
16726
16727 try { 16766 try {
16728 return document.activeElement || document.body; 16767 return document.activeElement || document.body;
16729 } catch (e) { 16768 } catch (e) {
@@ -18463,7 +18502,9 @@
18463 'setValueForProperty': 'update attribute', 18502 'setValueForProperty': 'update attribute',
18464 'setValueForAttribute': 'update attribute', 18503 'setValueForAttribute': 'update attribute',
18465 'deleteValueForProperty': 'remove attribute', 18504 'deleteValueForProperty': 'remove attribute',
18466 'dangerouslyReplaceNodeWithMarkupByID': 'replace' 18505 'setValueForStyles': 'update styles',
18506 'replaceNodeWithMarkup': 'replace',
18507 'updateTextContent': 'set textContent'
18467 }; 18508 };
18468 18509
18469 function getTotalTime(measurements) { 18510 function getTotalTime(measurements) {
@@ -18655,19 +18696,24 @@
18655 'use strict'; 18696 'use strict';
18656 18697
18657 var performance = __webpack_require__(147); 18698 var performance = __webpack_require__(147);
18658 var curPerformance = performance; 18699
18700 var performanceNow;
18659 18701
18660 /** 18702 /**
18661 * Detect if we can use `window.performance.now()` and gracefully fallback to 18703 * Detect if we can use `window.performance.now()` and gracefully fallback to
18662 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now 18704 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
18663 * because of Facebook's testing infrastructure. 18705 * because of Facebook's testing infrastructure.
18664 */ 18706 */
18665 if (!curPerformance || !curPerformance.now) { 18707 if (performance.now) {
18666 curPerformance = Date; 18708 performanceNow = function () {
18709 return performance.now();
18710 };
18711 } else {
18712 performanceNow = function () {
18713 return Date.now();
18714 };
18667 } 18715 }
18668 18716
18669 var performanceNow = curPerformance.now.bind(curPerformance);
18670
18671 module.exports = performanceNow; 18717 module.exports = performanceNow;
18672 18718
18673/***/ }, 18719/***/ },
@@ -18715,7 +18761,7 @@
18715 18761
18716 'use strict'; 18762 'use strict';
18717 18763
18718 module.exports = '0.14.3'; 18764 module.exports = '0.14.8';
18719 18765
18720/***/ }, 18766/***/ },
18721/* 149 */ 18767/* 149 */
@@ -20960,6 +21006,22 @@
20960 return this.getTime() === obj.getTime() && this.firstDayOfWeek === obj.firstDayOfWeek && this.timezoneOffset === obj.timezoneOffset && this.minimalDaysInFirstWeek === obj.minimalDaysInFirstWeek; 21006 return this.getTime() === obj.getTime() && this.firstDayOfWeek === obj.firstDayOfWeek && this.timezoneOffset === obj.timezoneOffset && this.minimalDaysInFirstWeek === obj.minimalDaysInFirstWeek;
20961 }, 21007 },
20962 21008
21009 compareToDay: function compareToDay(d2) {
21010 var d1Year = this.getYear();
21011 var d2Year = d2.getYear();
21012 var d1Month = this.getMonth();
21013 var d2Month = d2.getMonth();
21014 var d1Day = this.getDayOfMonth();
21015 var d2Day = d2.getDayOfMonth();
21016 if (d1Year !== d2Year) {
21017 return d1Year - d2Year;
21018 }
21019 if (d1Month !== d2Month) {
21020 return d1Month - d2Month;
21021 }
21022 return d1Day - d2Day;
21023 },
21024
20963 /* 21025 /*
20964 * Sets all the calendar field values or specified field and the time value 21026 * Sets all the calendar field values or specified field and the time value
20965 * (millisecond offset from the Epoch) of this Calendar undefined. 21027 * (millisecond offset from the Epoch) of this Calendar undefined.
@@ -20975,6 +21037,12 @@
20975 } 21037 }
20976 this.time = undefined; 21038 this.time = undefined;
20977 this.fieldsComputed = false; 21039 this.fieldsComputed = false;
21040 },
21041
21042 toString: function toString() {
21043 // for debug
21044 var v = this;
21045 return '[GregorianCalendar]: ' + v.getYear() + '/' + v.getMonth() + '/' + v.getDayOfMonth() + ' ' + v.getHourOfDay() + ':' + v.getMinutes() + ':' + v.getSeconds();
20978 } 21046 }
20979 }; 21047 };
20980 21048
@@ -21346,6 +21414,7 @@
21346 Letter Date or Time Component Presentation Examples 21414 Letter Date or Time Component Presentation Examples
21347 G Era designator Text AD 21415 G Era designator Text AD
21348 y Year Year 1996; 96 21416 y Year Year 1996; 96
21417 Y WeekYear WeekYear 1996; 96
21349 M Month in year Month July; Jul; 07 21418 M Month in year Month July; Jul; 07
21350 w Week in year Number 27 21419 w Week in year Number 27
21351 W Week in month Number 2 21420 W Week in month Number 2
@@ -21382,14 +21451,17 @@
21382 patternChars[GregorianCalendar.WEEK_OF_MONTH] = 'W'; 21451 patternChars[GregorianCalendar.WEEK_OF_MONTH] = 'W';
21383 patternChars[GregorianCalendar.DAY_OF_YEAR] = 'D'; 21452 patternChars[GregorianCalendar.DAY_OF_YEAR] = 'D';
21384 patternChars[GregorianCalendar.DAY_OF_WEEK_IN_MONTH] = 'F'; 21453 patternChars[GregorianCalendar.DAY_OF_WEEK_IN_MONTH] = 'F';
21454 patternChars.push('Y');
21385 21455
21386 (function init() { 21456 patternChars.forEach(function (v, key) {
21387 for (var index in patternChars) { 21457 var k = key;
21388 if (patternChars.hasOwnProperty(index)) { 21458 if (v === 'Y') {
21389 calendarIndexMap[patternChars[index]] = index; 21459 k = GregorianCalendar.YEAR;
21390 } 21460 }
21461 if (v) {
21462 calendarIndexMap[v] = k;
21391 } 21463 }
21392 })(); 21464 });
21393 21465
21394 function mix(t, s) { 21466 function mix(t, s) {
21395 for (var p in s) { 21467 for (var p in s) {
@@ -21694,6 +21766,13 @@
21694 value = calendar.getYear() > 0 ? 1 : 0; 21766 value = calendar.getYear() > 0 ? 1 : 0;
21695 current = locale.eras[value]; 21767 current = locale.eras[value];
21696 break; 21768 break;
21769 case 'Y':
21770 value = calendar.getWeekYear();
21771 if (value <= 0) {
21772 value = 1 - value;
21773 }
21774 current = zeroPaddingNumber(value, 2, count !== 2 ? MAX_VALUE : 2);
21775 break;
21697 case 'y': 21776 case 'y':
21698 value = calendar.getYear(); 21777 value = calendar.getYear();
21699 if (value <= 0) { 21778 if (value <= 0) {
@@ -22275,19 +22354,19 @@
22275 22354
22276 var _rcTrigger2 = _interopRequireDefault(_rcTrigger); 22355 var _rcTrigger2 = _interopRequireDefault(_rcTrigger);
22277 22356
22278 var _modulePanel = __webpack_require__(218); 22357 var _modulePanel = __webpack_require__(204);
22279 22358
22280 var _modulePanel2 = _interopRequireDefault(_modulePanel); 22359 var _modulePanel2 = _interopRequireDefault(_modulePanel);
22281 22360
22282 var _utilPlacements = __webpack_require__(225); 22361 var _utilPlacements = __webpack_require__(212);
22283 22362
22284 var _utilPlacements2 = _interopRequireDefault(_utilPlacements); 22363 var _utilPlacements2 = _interopRequireDefault(_utilPlacements);
22285 22364
22286 var _mixinCommonMixin = __webpack_require__(219); 22365 var _mixinCommonMixin = __webpack_require__(205);
22287 22366
22288 var _mixinCommonMixin2 = _interopRequireDefault(_mixinCommonMixin); 22367 var _mixinCommonMixin2 = _interopRequireDefault(_mixinCommonMixin);
22289 22368
22290 var _utilIndex = __webpack_require__(226); 22369 var _utilIndex = __webpack_require__(213);
22291 22370
22292 function noop() {} 22371 function noop() {}
22293 22372
@@ -22566,13 +22645,13 @@
22566 22645
22567 'use strict'; 22646 'use strict';
22568 22647
22569 Object.defineProperty(exports, '__esModule', { 22648 Object.defineProperty(exports, "__esModule", {
22570 value: true 22649 value: true
22571 }); 22650 });
22572 22651
22573 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; }; 22652 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; };
22574 22653
22575 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 22654 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
22576 22655
22577 var _react = __webpack_require__(3); 22656 var _react = __webpack_require__(3);
22578 22657
@@ -22582,13 +22661,25 @@
22582 22661
22583 var _reactDom2 = _interopRequireDefault(_reactDom); 22662 var _reactDom2 = _interopRequireDefault(_reactDom);
22584 22663
22585 var _rcUtil = __webpack_require__(173); 22664 var _createChainedFunction = __webpack_require__(173);
22665
22666 var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
22667
22668 var _contains = __webpack_require__(174);
22669
22670 var _contains2 = _interopRequireDefault(_contains);
22671
22672 var _addEventListener = __webpack_require__(175);
22586 22673
22587 var _Popup = __webpack_require__(196); 22674 var _addEventListener2 = _interopRequireDefault(_addEventListener);
22675
22676 var _Popup = __webpack_require__(180);
22588 22677
22589 var _Popup2 = _interopRequireDefault(_Popup); 22678 var _Popup2 = _interopRequireDefault(_Popup);
22590 22679
22591 var _utils = __webpack_require__(217); 22680 var _utils = __webpack_require__(203);
22681
22682 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
22592 22683
22593 function noop() {} 22684 function noop() {}
22594 22685
@@ -22596,16 +22687,21 @@
22596 return ''; 22687 return '';
22597 } 22688 }
22598 22689
22599 var Trigger = _react2['default'].createClass({ 22690 var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur'];
22691
22692 var Trigger = _react2["default"].createClass({
22600 displayName: 'Trigger', 22693 displayName: 'Trigger',
22601 22694
22602 propTypes: { 22695 propTypes: {
22603 action: _react.PropTypes.any, 22696 action: _react.PropTypes.any,
22697 showAction: _react.PropTypes.any,
22698 hideAction: _react.PropTypes.any,
22604 getPopupClassNameFromAlign: _react.PropTypes.any, 22699 getPopupClassNameFromAlign: _react.PropTypes.any,
22605 onPopupVisibleChange: _react.PropTypes.func, 22700 onPopupVisibleChange: _react.PropTypes.func,
22606 afterPopupVisibleChange: _react.PropTypes.func, 22701 afterPopupVisibleChange: _react.PropTypes.func,
22607 popup: _react.PropTypes.node.isRequired, 22702 popup: _react.PropTypes.node.isRequired,
22608 popupStyle: _react.PropTypes.object, 22703 popupStyle: _react.PropTypes.object,
22704 prefixCls: _react.PropTypes.string,
22609 popupClassName: _react.PropTypes.string, 22705 popupClassName: _react.PropTypes.string,
22610 popupPlacement: _react.PropTypes.string, 22706 popupPlacement: _react.PropTypes.string,
22611 builtinPlacements: _react.PropTypes.object, 22707 builtinPlacements: _react.PropTypes.object,
@@ -22613,10 +22709,17 @@
22613 popupAnimation: _react.PropTypes.any, 22709 popupAnimation: _react.PropTypes.any,
22614 mouseEnterDelay: _react.PropTypes.number, 22710 mouseEnterDelay: _react.PropTypes.number,
22615 mouseLeaveDelay: _react.PropTypes.number, 22711 mouseLeaveDelay: _react.PropTypes.number,
22712 zIndex: _react.PropTypes.number,
22713 focusDelay: _react.PropTypes.number,
22714 blurDelay: _react.PropTypes.number,
22616 getPopupContainer: _react.PropTypes.func, 22715 getPopupContainer: _react.PropTypes.func,
22617 destroyPopupOnHide: _react.PropTypes.bool, 22716 destroyPopupOnHide: _react.PropTypes.bool,
22717 mask: _react.PropTypes.bool,
22718 onPopupAlign: _react.PropTypes.func,
22618 popupAlign: _react.PropTypes.object, 22719 popupAlign: _react.PropTypes.object,
22619 popupVisible: _react.PropTypes.bool 22720 popupVisible: _react.PropTypes.bool,
22721 maskTransitionName: _react.PropTypes.string,
22722 maskAnimation: _react.PropTypes.string
22620 }, 22723 },
22621 22724
22622 getDefaultProps: function getDefaultProps() { 22725 getDefaultProps: function getDefaultProps() {
@@ -22625,34 +22728,39 @@
22625 getPopupClassNameFromAlign: returnEmptyString, 22728 getPopupClassNameFromAlign: returnEmptyString,
22626 onPopupVisibleChange: noop, 22729 onPopupVisibleChange: noop,
22627 afterPopupVisibleChange: noop, 22730 afterPopupVisibleChange: noop,
22731 onPopupAlign: noop,
22628 popupClassName: '', 22732 popupClassName: '',
22629 mouseEnterDelay: 0, 22733 mouseEnterDelay: 0,
22630 mouseLeaveDelay: 0.1, 22734 mouseLeaveDelay: 0.1,
22735 focusDelay: 0,
22736 blurDelay: 0.15,
22631 popupStyle: {}, 22737 popupStyle: {},
22632 destroyPopupOnHide: false, 22738 destroyPopupOnHide: false,
22633 popupAlign: {}, 22739 popupAlign: {},
22634 defaultPopupVisible: false, 22740 defaultPopupVisible: false,
22635 action: [] 22741 mask: false,
22742 action: [],
22743 showAction: [],
22744 hideAction: []
22636 }; 22745 };
22637 }, 22746 },
22638
22639 getInitialState: function getInitialState() { 22747 getInitialState: function getInitialState() {
22640 var props = this.props; 22748 var props = this.props;
22641 var popupVisible = undefined; 22749 var popupVisible = void 0;
22642 if ('popupVisible' in props) { 22750 if ('popupVisible' in props) {
22643 popupVisible = !!props.popupVisible; 22751 popupVisible = !!props.popupVisible;
22644 } else { 22752 } else {
22645 popupVisible = !!props.defaultPopupVisible; 22753 popupVisible = !!props.defaultPopupVisible;
22646 } 22754 }
22647 return { popupVisible: popupVisible }; 22755 return {
22756 popupVisible: popupVisible
22757 };
22648 }, 22758 },
22649
22650 componentDidMount: function componentDidMount() { 22759 componentDidMount: function componentDidMount() {
22651 this.componentDidUpdate({}, { 22760 this.componentDidUpdate({}, {
22652 popupVisible: this.state.popupVisible 22761 popupVisible: this.state.popupVisible
22653 }); 22762 });
22654 }, 22763 },
22655
22656 componentWillReceiveProps: function componentWillReceiveProps(nextProps) { 22764 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
22657 if ('popupVisible' in nextProps) { 22765 if ('popupVisible' in nextProps) {
22658 this.setState({ 22766 this.setState({
@@ -22660,18 +22768,18 @@
22660 }); 22768 });
22661 } 22769 }
22662 }, 22770 },
22663
22664 componentDidUpdate: function componentDidUpdate(prevProps, prevState) { 22771 componentDidUpdate: function componentDidUpdate(prevProps, prevState) {
22665 var _this = this; 22772 var _this = this;
22666 22773
22667 var props = this.props; 22774 var props = this.props;
22668 var state = this.state; 22775 var state = this.state;
22669 if (this.popupRendered) { 22776 if (this.popupRendered) {
22670 var _ret = (function () { 22777 var _ret = function () {
22671 var self = _this; 22778 var self = _this;
22672 _reactDom2['default'].unstable_renderSubtreeIntoContainer(_this, _this.getPopupElement(), _this.getPopupContainer(), function renderPopup() { 22779 self.popupInstance = _reactDom2["default"].unstable_renderSubtreeIntoContainer(_this, _this.getPopupElement(), _this.getPopupContainer(), function renderPopup() {
22780 /* eslint react/no-is-mounted:0 */
22673 if (this.isMounted()) { 22781 if (this.isMounted()) {
22674 self.popupDomNode = _reactDom2['default'].findDOMNode(this); 22782 self.popupDomNode = this.getPopupDomNode();
22675 } else { 22783 } else {
22676 self.popupDomNode = null; 22784 self.popupDomNode = null;
22677 } 22785 }
@@ -22679,14 +22787,14 @@
22679 props.afterPopupVisibleChange(state.popupVisible); 22787 props.afterPopupVisibleChange(state.popupVisible);
22680 } 22788 }
22681 }); 22789 });
22682 if (props.action.indexOf('click') !== -1) { 22790 if (_this.isClickToHide()) {
22683 if (state.popupVisible) { 22791 if (state.popupVisible) {
22684 if (!_this.clickOutsideHandler) { 22792 if (!_this.clickOutsideHandler) {
22685 _this.clickOutsideHandler = _rcUtil.Dom.addEventListener(document, 'mousedown', _this.onDocumentClick); 22793 _this.clickOutsideHandler = (0, _addEventListener2["default"])(document, 'mousedown', _this.onDocumentClick);
22686 _this.touchOutsideHandler = _rcUtil.Dom.addEventListener(document, 'touchstart', _this.onDocumentClick); 22794 _this.touchOutsideHandler = (0, _addEventListener2["default"])(document, 'touchstart', _this.onDocumentClick);
22687 } 22795 }
22688 return { 22796 return {
22689 v: undefined 22797 v: void 0
22690 }; 22798 };
22691 } 22799 }
22692 } 22800 }
@@ -22696,28 +22804,19 @@
22696 _this.clickOutsideHandler = null; 22804 _this.clickOutsideHandler = null;
22697 _this.touchOutsideHandler = null; 22805 _this.touchOutsideHandler = null;
22698 } 22806 }
22699 })(); 22807 }();
22700 22808
22701 if (typeof _ret === 'object') return _ret.v; 22809 if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
22702 } 22810 }
22703 }, 22811 },
22704
22705 componentWillUnmount: function componentWillUnmount() { 22812 componentWillUnmount: function componentWillUnmount() {
22706 var popupContainer = this.popupContainer; 22813 var popupContainer = this.popupContainer;
22707 if (popupContainer) { 22814 if (popupContainer) {
22708 _reactDom2['default'].unmountComponentAtNode(popupContainer); 22815 _reactDom2["default"].unmountComponentAtNode(popupContainer);
22709 if (this.props.getPopupContainer) { 22816 popupContainer.parentNode.removeChild(popupContainer);
22710 var mountNode = this.props.getPopupContainer();
22711 mountNode.removeChild(popupContainer);
22712 } else {
22713 document.body.removeChild(popupContainer);
22714 }
22715 this.popupContainer = null; 22817 this.popupContainer = null;
22716 } 22818 }
22717 if (this.delayTimer) { 22819 this.clearDelayTimer();
22718 clearTimeout(this.delayTimer);
22719 this.delayTimer = null;
22720 }
22721 if (this.clickOutsideHandler) { 22820 if (this.clickOutsideHandler) {
22722 this.clickOutsideHandler.remove(); 22821 this.clickOutsideHandler.remove();
22723 this.touchOutsideHandler.remove(); 22822 this.touchOutsideHandler.remove();
@@ -22725,36 +22824,41 @@
22725 this.touchOutsideHandler = null; 22824 this.touchOutsideHandler = null;
22726 } 22825 }
22727 }, 22826 },
22728
22729 onMouseEnter: function onMouseEnter() { 22827 onMouseEnter: function onMouseEnter() {
22730 this.delaySetPopupVisible(true, this.props.mouseEnterDelay); 22828 this.delaySetPopupVisible(true, this.props.mouseEnterDelay);
22731 }, 22829 },
22732 22830 onMouseLeave: function onMouseLeave(e) {
22733 onMouseLeave: function onMouseLeave() { 22831 // https://github.com/react-component/trigger/pull/13
22832 // react bug?
22833 if (e.relatedTarget && !e.relatedTarget.setTimeout && (0, _contains2["default"])(this.popupContainer, e.relatedTarget)) {
22834 return;
22835 }
22734 this.delaySetPopupVisible(false, this.props.mouseLeaveDelay); 22836 this.delaySetPopupVisible(false, this.props.mouseLeaveDelay);
22735 }, 22837 },
22736
22737 onFocus: function onFocus() { 22838 onFocus: function onFocus() {
22738 this.focusTime = Date.now(); 22839 // incase focusin and focusout
22739 this.setPopupVisible(true); 22840 this.clearDelayTimer();
22841 if (this.isFocusToShow()) {
22842 this.focusTime = Date.now();
22843 this.delaySetPopupVisible(true, this.props.focusDelay);
22844 }
22740 }, 22845 },
22741
22742 onMouseDown: function onMouseDown() { 22846 onMouseDown: function onMouseDown() {
22743 this.preClickTime = Date.now(); 22847 this.preClickTime = Date.now();
22744 }, 22848 },
22745
22746 onTouchStart: function onTouchStart() { 22849 onTouchStart: function onTouchStart() {
22747 this.preTouchTime = Date.now(); 22850 this.preTouchTime = Date.now();
22748 }, 22851 },
22749
22750 onBlur: function onBlur() { 22852 onBlur: function onBlur() {
22751 this.setPopupVisible(false); 22853 this.clearDelayTimer();
22854 if (this.isBlurToHide()) {
22855 this.delaySetPopupVisible(false, this.props.blurDelay);
22856 }
22752 }, 22857 },
22753
22754 onClick: function onClick(event) { 22858 onClick: function onClick(event) {
22755 // focus will trigger click 22859 // focus will trigger click
22756 if (this.focusTime) { 22860 if (this.focusTime) {
22757 var preTime = undefined; 22861 var preTime = void 0;
22758 if (this.preClickTime && this.preTouchTime) { 22862 if (this.preClickTime && this.preTouchTime) {
22759 preTime = Math.min(this.preClickTime, this.preTouchTime); 22863 preTime = Math.min(this.preClickTime, this.preTouchTime);
22760 } else if (this.preClickTime) { 22864 } else if (this.preClickTime) {
@@ -22770,36 +22874,34 @@
22770 this.preClickTime = 0; 22874 this.preClickTime = 0;
22771 this.preTouchTime = 0; 22875 this.preTouchTime = 0;
22772 event.preventDefault(); 22876 event.preventDefault();
22773 this.setPopupVisible(!this.state.popupVisible); 22877 var nextVisible = !this.state.popupVisible;
22878 if (this.isClickToHide() && !nextVisible || nextVisible && this.isClickToShow()) {
22879 this.setPopupVisible(!this.state.popupVisible);
22880 }
22774 }, 22881 },
22775
22776 onDocumentClick: function onDocumentClick(event) { 22882 onDocumentClick: function onDocumentClick(event) {
22777 var target = event.target; 22883 var target = event.target;
22778 var root = _reactDom2['default'].findDOMNode(this); 22884 var root = (0, _reactDom.findDOMNode)(this);
22779 var popupNode = this.getPopupDomNode(); 22885 var popupNode = this.getPopupDomNode();
22780 if (!_rcUtil.Dom.contains(root, target) && !_rcUtil.Dom.contains(popupNode, target)) { 22886 if (!(0, _contains2["default"])(root, target) && !(0, _contains2["default"])(popupNode, target)) {
22781 this.setPopupVisible(false); 22887 this.setPopupVisible(false);
22782 } 22888 }
22783 }, 22889 },
22784
22785 getPopupDomNode: function getPopupDomNode() { 22890 getPopupDomNode: function getPopupDomNode() {
22786 // for test 22891 // for test
22787 return this.popupDomNode; 22892 return this.popupDomNode;
22788 }, 22893 },
22789 22894 getRootDomNode: function getRootDomNode() {
22895 return _reactDom2["default"].findDOMNode(this);
22896 },
22790 getPopupContainer: function getPopupContainer() { 22897 getPopupContainer: function getPopupContainer() {
22791 if (!this.popupContainer) { 22898 if (!this.popupContainer) {
22792 this.popupContainer = document.createElement('div'); 22899 this.popupContainer = document.createElement('div');
22793 if (this.props.getPopupContainer) { 22900 var mountNode = this.props.getPopupContainer ? this.props.getPopupContainer((0, _reactDom.findDOMNode)(this)) : document.body;
22794 var mountNode = this.props.getPopupContainer(); 22901 mountNode.appendChild(this.popupContainer);
22795 mountNode.appendChild(this.popupContainer);
22796 } else {
22797 document.body.appendChild(this.popupContainer);
22798 }
22799 } 22902 }
22800 return this.popupContainer; 22903 return this.popupContainer;
22801 }, 22904 },
22802
22803 getPopupClassNameFromAlign: function getPopupClassNameFromAlign(align) { 22905 getPopupClassNameFromAlign: function getPopupClassNameFromAlign(align) {
22804 var className = []; 22906 var className = [];
22805 var props = this.props; 22907 var props = this.props;
@@ -22815,7 +22917,6 @@
22815 } 22917 }
22816 return className.join(' '); 22918 return className.join(' ');
22817 }, 22919 },
22818
22819 getPopupAlign: function getPopupAlign() { 22920 getPopupAlign: function getPopupAlign() {
22820 var props = this.props; 22921 var props = this.props;
22821 var popupPlacement = props.popupPlacement; 22922 var popupPlacement = props.popupPlacement;
@@ -22827,34 +22928,43 @@
22827 } 22928 }
22828 return popupAlign; 22929 return popupAlign;
22829 }, 22930 },
22830
22831 getPopupElement: function getPopupElement() { 22931 getPopupElement: function getPopupElement() {
22832 var props = this.props; 22932 var props = this.props;
22833 var state = this.state; 22933 var state = this.state;
22934
22834 var mouseProps = {}; 22935 var mouseProps = {};
22835 if (props.action.indexOf('hover') !== -1) { 22936 if (this.isMouseEnterToShow()) {
22836 mouseProps.onMouseEnter = this.onMouseEnter; 22937 mouseProps.onMouseEnter = this.onMouseEnter;
22938 }
22939 if (this.isMouseLeaveToHide()) {
22837 mouseProps.onMouseLeave = this.onMouseLeave; 22940 mouseProps.onMouseLeave = this.onMouseLeave;
22838 } 22941 }
22839 return _react2['default'].createElement( 22942 return _react2["default"].createElement(
22840 _Popup2['default'], 22943 _Popup2["default"],
22841 _extends({ prefixCls: props.prefixCls, 22944 _extends({
22945 prefixCls: props.prefixCls,
22842 destroyPopupOnHide: props.destroyPopupOnHide, 22946 destroyPopupOnHide: props.destroyPopupOnHide,
22843 visible: state.popupVisible, 22947 visible: state.popupVisible,
22844 className: props.popupClassName, 22948 className: props.popupClassName,
22845 action: props.action, 22949 action: props.action,
22846 align: this.getPopupAlign(), 22950 align: this.getPopupAlign(),
22951 onAlign: props.onPopupAlign,
22847 animation: props.popupAnimation, 22952 animation: props.popupAnimation,
22848 getClassNameFromAlign: this.getPopupClassNameFromAlign 22953 getClassNameFromAlign: this.getPopupClassNameFromAlign
22849 }, mouseProps, { 22954 }, mouseProps, {
22850 wrap: this, 22955 getRootDomNode: this.getRootDomNode,
22851 style: props.popupStyle, 22956 style: props.popupStyle,
22852 transitionName: props.popupTransitionName }), 22957 mask: props.mask,
22958 zIndex: props.zIndex,
22959 transitionName: props.popupTransitionName,
22960 maskAnimation: props.maskAnimation,
22961 maskTransitionName: props.maskTransitionName
22962 }),
22853 props.popup 22963 props.popup
22854 ); 22964 );
22855 }, 22965 },
22856
22857 setPopupVisible: function setPopupVisible(popupVisible) { 22966 setPopupVisible: function setPopupVisible(popupVisible) {
22967 this.clearDelayTimer();
22858 if (this.state.popupVisible !== popupVisible) { 22968 if (this.state.popupVisible !== popupVisible) {
22859 if (!('popupVisible' in this.props)) { 22969 if (!('popupVisible' in this.props)) {
22860 this.setState({ 22970 this.setState({
@@ -22864,1552 +22974,118 @@
22864 this.props.onPopupVisibleChange(popupVisible); 22974 this.props.onPopupVisibleChange(popupVisible);
22865 } 22975 }
22866 }, 22976 },
22867
22868 delaySetPopupVisible: function delaySetPopupVisible(visible, delayS) { 22977 delaySetPopupVisible: function delaySetPopupVisible(visible, delayS) {
22869 var _this2 = this; 22978 var _this2 = this;
22870 22979
22871 var delay = delayS * 1000; 22980 var delay = delayS * 1000;
22872 if (this.delayTimer) { 22981 this.clearDelayTimer();
22873 clearTimeout(this.delayTimer);
22874 this.delayTimer = null;
22875 }
22876 if (delay) { 22982 if (delay) {
22877 this.delayTimer = setTimeout(function () { 22983 this.delayTimer = setTimeout(function () {
22878 _this2.setPopupVisible(visible); 22984 _this2.setPopupVisible(visible);
22879 _this2.delayTimer = null; 22985 _this2.clearDelayTimer();
22880 }, delay); 22986 }, delay);
22881 } else { 22987 } else {
22882 this.setPopupVisible(visible); 22988 this.setPopupVisible(visible);
22883 } 22989 }
22884 }, 22990 },
22885 22991 clearDelayTimer: function clearDelayTimer() {
22886 render: function render() { 22992 if (this.delayTimer) {
22887 this.popupRendered = this.popupRendered || this.state.popupVisible; 22993 clearTimeout(this.delayTimer);
22888 var props = this.props; 22994 this.delayTimer = null;
22889 var children = props.children;
22890 var child = _react2['default'].Children.only(children);
22891 var childProps = child.props || {};
22892 var newChildProps = {};
22893 var trigger = props.action;
22894 if (trigger.indexOf('click') !== -1) {
22895 newChildProps.onClick = (0, _rcUtil.createChainedFunction)(this.onClick, childProps.onClick);
22896 newChildProps.onMouseDown = (0, _rcUtil.createChainedFunction)(this.onMouseDown, childProps.onMouseDown);
22897 newChildProps.onTouchStart = (0, _rcUtil.createChainedFunction)(this.onTouchStart, childProps.onTouchStart);
22898 }
22899 if (trigger.indexOf('hover') !== -1) {
22900 newChildProps.onMouseEnter = (0, _rcUtil.createChainedFunction)(this.onMouseEnter, childProps.onMouseEnter);
22901 newChildProps.onMouseLeave = (0, _rcUtil.createChainedFunction)(this.onMouseLeave, childProps.onMouseLeave);
22902 }
22903 if (trigger.indexOf('focus') !== -1) {
22904 newChildProps.onFocus = (0, _rcUtil.createChainedFunction)(this.onFocus, childProps.onFocus);
22905 newChildProps.onBlur = (0, _rcUtil.createChainedFunction)(this.onBlur, childProps.onBlur);
22906 } 22995 }
22907
22908 return _react2['default'].cloneElement(child, newChildProps);
22909 }
22910 });
22911
22912 exports['default'] = Trigger;
22913 module.exports = exports['default'];
22914
22915/***/ },
22916/* 173 */
22917/***/ function(module, exports, __webpack_require__) {
22918
22919 'use strict';
22920
22921 module.exports = {
22922 guid: __webpack_require__(174),
22923 classSet: __webpack_require__(175),
22924 joinClasses: __webpack_require__(178),
22925 KeyCode: __webpack_require__(179),
22926 PureRenderMixin: __webpack_require__(180),
22927 shallowEqual: __webpack_require__(181),
22928 createChainedFunction: __webpack_require__(187),
22929 Dom: {
22930 addEventListener: __webpack_require__(188),
22931 contains: __webpack_require__(193)
22932 }, 22996 },
22933 Children: { 22997 isClickToShow: function isClickToShow() {
22934 toArray: __webpack_require__(194), 22998 var _props = this.props;
22935 mapSelf: __webpack_require__(195) 22999 var action = _props.action;
22936 } 23000 var showAction = _props.showAction;
22937 };
22938
22939/***/ },
22940/* 174 */
22941/***/ function(module, exports) {
22942
22943 'use strict';
22944
22945 var seed = 0;
22946 module.exports = function guid() {
22947 return Date.now() + '_' + seed++;
22948 };
22949
22950/***/ },
22951/* 175 */
22952/***/ function(module, exports, __webpack_require__) {
22953
22954 'use strict';
22955
22956 var deprecate = __webpack_require__(176);
22957 var classNames = __webpack_require__(177);
22958
22959 module.exports = deprecate(classNames, '`rcUtil.classSet()` is deprecated, use `classNames()` by `require(\'classnames\')` instead');
22960
22961/***/ },
22962/* 176 */
22963/***/ function(module, exports) {
22964
22965 /* WEBPACK VAR INJECTION */(function(global) {
22966 /**
22967 * Module exports.
22968 */
22969
22970 module.exports = deprecate;
22971
22972 /**
22973 * Mark that a method should not be used.
22974 * Returns a modified function which warns once by default.
22975 *
22976 * If `localStorage.noDeprecation = true` is set, then it is a no-op.
22977 *
22978 * If `localStorage.throwDeprecation = true` is set, then deprecated functions
22979 * will throw an Error when invoked.
22980 *
22981 * If `localStorage.traceDeprecation = true` is set, then deprecated functions
22982 * will invoke `console.trace()` instead of `console.error()`.
22983 *
22984 * @param {Function} fn - the function to deprecate
22985 * @param {String} msg - the string to print to the console when `fn` is invoked
22986 * @returns {Function} a new "deprecated" version of `fn`
22987 * @api public
22988 */
22989
22990 function deprecate (fn, msg) {
22991 if (config('noDeprecation')) {
22992 return fn;
22993 }
22994
22995 var warned = false;
22996 function deprecated() {
22997 if (!warned) {
22998 if (config('throwDeprecation')) {
22999 throw new Error(msg);
23000 } else if (config('traceDeprecation')) {
23001 console.trace(msg);
23002 } else {
23003 console.warn(msg);
23004 }
23005 warned = true;
23006 }
23007 return fn.apply(this, arguments);
23008 }
23009
23010 return deprecated;
23011 }
23012
23013 /**
23014 * Checks `localStorage` for boolean values for the given `name`.
23015 *
23016 * @param {String} name
23017 * @returns {Boolean}
23018 * @api private
23019 */
23020
23021 function config (name) {
23022 // accessing global.localStorage can trigger a DOMException in sandboxed iframes
23023 try {
23024 if (!global.localStorage) return false;
23025 } catch (_) {
23026 return false;
23027 }
23028 var val = global.localStorage[name];
23029 if (null == val) return false;
23030 return String(val).toLowerCase() === 'true';
23031 }
23032
23033 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
23034
23035/***/ },
23036/* 177 */
23037/***/ function(module, exports, __webpack_require__) {
23038
23039 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
23040 Copyright (c) 2015 Jed Watson.
23041 Licensed under the MIT License (MIT), see
23042 http://jedwatson.github.io/classnames
23043 */
23044 /* global define */
23045
23046 (function () {
23047 'use strict';
23048
23049 var hasOwn = {}.hasOwnProperty;
23050
23051 function classNames () {
23052 var classes = '';
23053
23054 for (var i = 0; i < arguments.length; i++) {
23055 var arg = arguments[i];
23056 if (!arg) continue;
23057
23058 var argType = typeof arg;
23059
23060 if (argType === 'string' || argType === 'number') {
23061 classes += ' ' + arg;
23062 } else if (Array.isArray(arg)) {
23063 classes += ' ' + classNames.apply(null, arg);
23064 } else if (argType === 'object') {
23065 for (var key in arg) {
23066 if (hasOwn.call(arg, key) && arg[key]) {
23067 classes += ' ' + key;
23068 }
23069 }
23070 }
23071 }
23072
23073 return classes.substr(1);
23074 }
23075
23076 if (typeof module !== 'undefined' && module.exports) {
23077 module.exports = classNames;
23078 } else if (true) {
23079 // register as 'classnames', consistent with npm package name
23080 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
23081 return classNames;
23082 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
23083 } else {
23084 window.classNames = classNames;
23085 }
23086 }());
23087
23088
23089/***/ },
23090/* 178 */
23091/***/ function(module, exports, __webpack_require__) {
23092
23093 'use strict';
23094
23095 var deprecate = __webpack_require__(176);
23096 var classNames = __webpack_require__(177);
23097
23098 module.exports = deprecate(classNames, '`rcUtil.joinClasses()` is deprecated, use `classNames()` by `require(\'classnames\')` instead');
23099
23100/***/ },
23101/* 179 */
23102/***/ function(module, exports) {
23103
23104 /**
23105 * @ignore
23106 * some key-codes definition and utils from closure-library
23107 * @author yiminghe@gmail.com
23108 */
23109
23110 'use strict';
23111
23112 var KeyCode = {
23113 /**
23114 * MAC_ENTER
23115 */
23116 MAC_ENTER: 3,
23117 /**
23118 * BACKSPACE
23119 */
23120 BACKSPACE: 8,
23121 /**
23122 * TAB
23123 */
23124 TAB: 9,
23125 /**
23126 * NUMLOCK on FF/Safari Mac
23127 */
23128 NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac
23129 /**
23130 * ENTER
23131 */
23132 ENTER: 13,
23133 /**
23134 * SHIFT
23135 */
23136 SHIFT: 16,
23137 /**
23138 * CTRL
23139 */
23140 CTRL: 17,
23141 /**
23142 * ALT
23143 */
23144 ALT: 18,
23145 /**
23146 * PAUSE
23147 */
23148 PAUSE: 19,
23149 /**
23150 * CAPS_LOCK
23151 */
23152 CAPS_LOCK: 20,
23153 /**
23154 * ESC
23155 */
23156 ESC: 27,
23157 /**
23158 * SPACE
23159 */
23160 SPACE: 32,
23161 /**
23162 * PAGE_UP
23163 */
23164 PAGE_UP: 33, // also NUM_NORTH_EAST
23165 /**
23166 * PAGE_DOWN
23167 */
23168 PAGE_DOWN: 34, // also NUM_SOUTH_EAST
23169 /**
23170 * END
23171 */
23172 END: 35, // also NUM_SOUTH_WEST
23173 /**
23174 * HOME
23175 */
23176 HOME: 36, // also NUM_NORTH_WEST
23177 /**
23178 * LEFT
23179 */
23180 LEFT: 37, // also NUM_WEST
23181 /**
23182 * UP
23183 */
23184 UP: 38, // also NUM_NORTH
23185 /**
23186 * RIGHT
23187 */
23188 RIGHT: 39, // also NUM_EAST
23189 /**
23190 * DOWN
23191 */
23192 DOWN: 40, // also NUM_SOUTH
23193 /**
23194 * PRINT_SCREEN
23195 */
23196 PRINT_SCREEN: 44,
23197 /**
23198 * INSERT
23199 */
23200 INSERT: 45, // also NUM_INSERT
23201 /**
23202 * DELETE
23203 */
23204 DELETE: 46, // also NUM_DELETE
23205 /**
23206 * ZERO
23207 */
23208 ZERO: 48,
23209 /**
23210 * ONE
23211 */
23212 ONE: 49,
23213 /**
23214 * TWO
23215 */
23216 TWO: 50,
23217 /**
23218 * THREE
23219 */
23220 THREE: 51,
23221 /**
23222 * FOUR
23223 */
23224 FOUR: 52,
23225 /**
23226 * FIVE
23227 */
23228 FIVE: 53,
23229 /**
23230 * SIX
23231 */
23232 SIX: 54,
23233 /**
23234 * SEVEN
23235 */
23236 SEVEN: 55,
23237 /**
23238 * EIGHT
23239 */
23240 EIGHT: 56,
23241 /**
23242 * NINE
23243 */
23244 NINE: 57,
23245 /**
23246 * QUESTION_MARK
23247 */
23248 QUESTION_MARK: 63, // needs localization
23249 /**
23250 * A
23251 */
23252 A: 65,
23253 /**
23254 * B
23255 */
23256 B: 66,
23257 /**
23258 * C
23259 */
23260 C: 67,
23261 /**
23262 * D
23263 */
23264 D: 68,
23265 /**
23266 * E
23267 */
23268 E: 69,
23269 /**
23270 * F
23271 */
23272 F: 70,
23273 /**
23274 * G
23275 */
23276 G: 71,
23277 /**
23278 * H
23279 */
23280 H: 72,
23281 /**
23282 * I
23283 */
23284 I: 73,
23285 /**
23286 * J
23287 */
23288 J: 74,
23289 /**
23290 * K
23291 */
23292 K: 75,
23293 /**
23294 * L
23295 */
23296 L: 76,
23297 /**
23298 * M
23299 */
23300 M: 77,
23301 /**
23302 * N
23303 */
23304 N: 78,
23305 /**
23306 * O
23307 */
23308 O: 79,
23309 /**
23310 * P
23311 */
23312 P: 80,
23313 /**
23314 * Q
23315 */
23316 Q: 81,
23317 /**
23318 * R
23319 */
23320 R: 82,
23321 /**
23322 * S
23323 */
23324 S: 83,
23325 /**
23326 * T
23327 */
23328 T: 84,
23329 /**
23330 * U
23331 */
23332 U: 85,
23333 /**
23334 * V
23335 */
23336 V: 86,
23337 /**
23338 * W
23339 */
23340 W: 87,
23341 /**
23342 * X
23343 */
23344 X: 88,
23345 /**
23346 * Y
23347 */
23348 Y: 89,
23349 /**
23350 * Z
23351 */
23352 Z: 90,
23353 /**
23354 * META
23355 */
23356 META: 91, // WIN_KEY_LEFT
23357 /**
23358 * WIN_KEY_RIGHT
23359 */
23360 WIN_KEY_RIGHT: 92,
23361 /**
23362 * CONTEXT_MENU
23363 */
23364 CONTEXT_MENU: 93,
23365 /**
23366 * NUM_ZERO
23367 */
23368 NUM_ZERO: 96,
23369 /**
23370 * NUM_ONE
23371 */
23372 NUM_ONE: 97,
23373 /**
23374 * NUM_TWO
23375 */
23376 NUM_TWO: 98,
23377 /**
23378 * NUM_THREE
23379 */
23380 NUM_THREE: 99,
23381 /**
23382 * NUM_FOUR
23383 */
23384 NUM_FOUR: 100,
23385 /**
23386 * NUM_FIVE
23387 */
23388 NUM_FIVE: 101,
23389 /**
23390 * NUM_SIX
23391 */
23392 NUM_SIX: 102,
23393 /**
23394 * NUM_SEVEN
23395 */
23396 NUM_SEVEN: 103,
23397 /**
23398 * NUM_EIGHT
23399 */
23400 NUM_EIGHT: 104,
23401 /**
23402 * NUM_NINE
23403 */
23404 NUM_NINE: 105,
23405 /**
23406 * NUM_MULTIPLY
23407 */
23408 NUM_MULTIPLY: 106,
23409 /**
23410 * NUM_PLUS
23411 */
23412 NUM_PLUS: 107,
23413 /**
23414 * NUM_MINUS
23415 */
23416 NUM_MINUS: 109,
23417 /**
23418 * NUM_PERIOD
23419 */
23420 NUM_PERIOD: 110,
23421 /**
23422 * NUM_DIVISION
23423 */
23424 NUM_DIVISION: 111,
23425 /**
23426 * F1
23427 */
23428 F1: 112,
23429 /**
23430 * F2
23431 */
23432 F2: 113,
23433 /**
23434 * F3
23435 */
23436 F3: 114,
23437 /**
23438 * F4
23439 */
23440 F4: 115,
23441 /**
23442 * F5
23443 */
23444 F5: 116,
23445 /**
23446 * F6
23447 */
23448 F6: 117,
23449 /**
23450 * F7
23451 */
23452 F7: 118,
23453 /**
23454 * F8
23455 */
23456 F8: 119,
23457 /**
23458 * F9
23459 */
23460 F9: 120,
23461 /**
23462 * F10
23463 */
23464 F10: 121,
23465 /**
23466 * F11
23467 */
23468 F11: 122,
23469 /**
23470 * F12
23471 */
23472 F12: 123,
23473 /**
23474 * NUMLOCK
23475 */
23476 NUMLOCK: 144,
23477 /**
23478 * SEMICOLON
23479 */
23480 SEMICOLON: 186, // needs localization
23481 /**
23482 * DASH
23483 */
23484 DASH: 189, // needs localization
23485 /**
23486 * EQUALS
23487 */
23488 EQUALS: 187, // needs localization
23489 /**
23490 * COMMA
23491 */
23492 COMMA: 188, // needs localization
23493 /**
23494 * PERIOD
23495 */
23496 PERIOD: 190, // needs localization
23497 /**
23498 * SLASH
23499 */
23500 SLASH: 191, // needs localization
23501 /**
23502 * APOSTROPHE
23503 */
23504 APOSTROPHE: 192, // needs localization
23505 /**
23506 * SINGLE_QUOTE
23507 */
23508 SINGLE_QUOTE: 222, // needs localization
23509 /**
23510 * OPEN_SQUARE_BRACKET
23511 */
23512 OPEN_SQUARE_BRACKET: 219, // needs localization
23513 /**
23514 * BACKSLASH
23515 */
23516 BACKSLASH: 220, // needs localization
23517 /**
23518 * CLOSE_SQUARE_BRACKET
23519 */
23520 CLOSE_SQUARE_BRACKET: 221, // needs localization
23521 /**
23522 * WIN_KEY
23523 */
23524 WIN_KEY: 224,
23525 /**
23526 * MAC_FF_META
23527 */
23528 MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91
23529 /**
23530 * WIN_IME
23531 */
23532 WIN_IME: 229
23533 };
23534
23535 /*
23536 whether text and modified key is entered at the same time.
23537 */
23538 KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
23539 var keyCode = e.keyCode;
23540 if (e.altKey && !e.ctrlKey || e.metaKey ||
23541 // Function keys don't generate text
23542 keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
23543 return false;
23544 }
23545
23546 // The following keys are quite harmless, even in combination with
23547 // CTRL, ALT or SHIFT.
23548 switch (keyCode) {
23549 case KeyCode.ALT:
23550 case KeyCode.CAPS_LOCK:
23551 case KeyCode.CONTEXT_MENU:
23552 case KeyCode.CTRL:
23553 case KeyCode.DOWN:
23554 case KeyCode.END:
23555 case KeyCode.ESC:
23556 case KeyCode.HOME:
23557 case KeyCode.INSERT:
23558 case KeyCode.LEFT:
23559 case KeyCode.MAC_FF_META:
23560 case KeyCode.META:
23561 case KeyCode.NUMLOCK:
23562 case KeyCode.NUM_CENTER:
23563 case KeyCode.PAGE_DOWN:
23564 case KeyCode.PAGE_UP:
23565 case KeyCode.PAUSE:
23566 case KeyCode.PRINT_SCREEN:
23567 case KeyCode.RIGHT:
23568 case KeyCode.SHIFT:
23569 case KeyCode.UP:
23570 case KeyCode.WIN_KEY:
23571 case KeyCode.WIN_KEY_RIGHT:
23572 return false;
23573 default:
23574 return true;
23575 }
23576 };
23577
23578 /*
23579 whether character is entered.
23580 */
23581 KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
23582 if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
23583 return true;
23584 }
23585
23586 if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
23587 return true;
23588 }
23589
23590 if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
23591 return true;
23592 }
23593
23594 // Safari sends zero key code for non-latin characters.
23595 if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
23596 return true;
23597 }
23598
23599 switch (keyCode) {
23600 case KeyCode.SPACE:
23601 case KeyCode.QUESTION_MARK:
23602 case KeyCode.NUM_PLUS:
23603 case KeyCode.NUM_MINUS:
23604 case KeyCode.NUM_PERIOD:
23605 case KeyCode.NUM_DIVISION:
23606 case KeyCode.SEMICOLON:
23607 case KeyCode.DASH:
23608 case KeyCode.EQUALS:
23609 case KeyCode.COMMA:
23610 case KeyCode.PERIOD:
23611 case KeyCode.SLASH:
23612 case KeyCode.APOSTROPHE:
23613 case KeyCode.SINGLE_QUOTE:
23614 case KeyCode.OPEN_SQUARE_BRACKET:
23615 case KeyCode.BACKSLASH:
23616 case KeyCode.CLOSE_SQUARE_BRACKET:
23617 return true;
23618 default:
23619 return false;
23620 }
23621 };
23622
23623 module.exports = KeyCode;
23624
23625/***/ },
23626/* 180 */
23627/***/ function(module, exports, __webpack_require__) {
23628
23629 'use strict';
23630
23631 var shallowEqual = __webpack_require__(181);
23632
23633 /**
23634 * If your React component's render function is "pure", e.g. it will render the
23635 * same result given the same props and state, provide this Mixin for a
23636 * considerable performance boost.
23637 *
23638 * Most React components have pure render functions.
23639 *
23640 * Example:
23641 *
23642 * const ReactComponentWithPureRenderMixin =
23643 * require('ReactComponentWithPureRenderMixin');
23644 * React.createClass({
23645 * mixins: [ReactComponentWithPureRenderMixin],
23646 *
23647 * render: function() {
23648 * return <div className={this.props.className}>foo</div>;
23649 * }
23650 * });
23651 *
23652 * Note: This only checks shallow equality for props and state. If these contain
23653 * complex data structures this mixin may have false-negatives for deeper
23654 * differences. Only mixin to components which have simple props and state, or
23655 * use `forceUpdate()` when you know deep data structures have changed.
23656 */
23657 var ReactComponentWithPureRenderMixin = {
23658 shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
23659 return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);
23660 }
23661 };
23662
23663 module.exports = ReactComponentWithPureRenderMixin;
23664
23665/***/ },
23666/* 181 */
23667/***/ function(module, exports, __webpack_require__) {
23668
23669 'use strict';
23670 23001
23671 var shallowEqual = __webpack_require__(182); 23002 return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;
23003 },
23004 isClickToHide: function isClickToHide() {
23005 var _props2 = this.props;
23006 var action = _props2.action;
23007 var hideAction = _props2.hideAction;
23672 23008
23673 module.exports = shallowEqual; 23009 return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;
23674 23010 },
23675/***/ }, 23011 isMouseEnterToShow: function isMouseEnterToShow() {
23676/* 182 */ 23012 var _props3 = this.props;
23677/***/ function(module, exports, __webpack_require__) { 23013 var action = _props3.action;
23678 23014 var showAction = _props3.showAction;
23679 'use strict';
23680 23015
23681 var fetchKeys = __webpack_require__(183); 23016 return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;
23017 },
23018 isMouseLeaveToHide: function isMouseLeaveToHide() {
23019 var _props4 = this.props;
23020 var action = _props4.action;
23021 var hideAction = _props4.hideAction;
23682 23022
23683 module.exports = function shallowEqual(objA, objB, compare, compareContext) { 23023 return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;
23024 },
23025 isFocusToShow: function isFocusToShow() {
23026 var _props5 = this.props;
23027 var action = _props5.action;
23028 var showAction = _props5.showAction;
23684 23029
23685 var ret = compare ? compare.call(compareContext, objA, objB) : void 0; 23030 return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;
23031 },
23032 isBlurToHide: function isBlurToHide() {
23033 var _props6 = this.props;
23034 var action = _props6.action;
23035 var hideAction = _props6.hideAction;
23686 23036
23687 if (ret !== void 0) { 23037 return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;
23688 return !!ret; 23038 },
23039 forcePopupAlign: function forcePopupAlign() {
23040 if (this.state.popupVisible && this.popupInstance && this.popupInstance.alignInstance) {
23041 this.popupInstance.alignInstance.forceAlign();
23689 } 23042 }
23043 },
23044 render: function render() {
23045 this.popupRendered = this.popupRendered || this.state.popupVisible;
23046 var props = this.props;
23047 var children = props.children;
23048 var child = _react2["default"].Children.only(children);
23049 var childProps = child.props || {};
23050 var newChildProps = {};
23690 23051
23691 if (objA === objB) { 23052 if (this.isClickToHide() || this.isClickToShow()) {
23692 return true; 23053 newChildProps.onClick = (0, _createChainedFunction2["default"])(this.onClick, childProps.onClick);
23054 newChildProps.onMouseDown = (0, _createChainedFunction2["default"])(this.onMouseDown, childProps.onMouseDown);
23055 newChildProps.onTouchStart = (0, _createChainedFunction2["default"])(this.onTouchStart, childProps.onTouchStart);
23693 } 23056 }
23694 23057 if (this.isMouseEnterToShow()) {
23695 if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { 23058 newChildProps.onMouseEnter = (0, _createChainedFunction2["default"])(this.onMouseEnter, childProps.onMouseEnter);
23696 return false;
23697 } 23059 }
23698 23060 if (this.isMouseLeaveToHide()) {
23699 var keysA = fetchKeys(objA); 23061 newChildProps.onMouseLeave = (0, _createChainedFunction2["default"])(this.onMouseLeave, childProps.onMouseLeave);
23700 var keysB = fetchKeys(objB);
23701
23702 var len = keysA.length;
23703 if (len !== keysB.length) {
23704 return false;
23705 } 23062 }
23706 23063 if (this.isFocusToShow() || this.isBlurToHide()) {
23707 compareContext = compareContext || null; 23064 newChildProps.onFocus = (0, _createChainedFunction2["default"])(this.onFocus, childProps.onFocus);
23708 23065 newChildProps.onBlur = (0, _createChainedFunction2["default"])(this.onBlur, childProps.onBlur);
23709 // Test for A's keys different from B.
23710 var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
23711 for (var i = 0; i < len; i++) {
23712 var key = keysA[i];
23713 if (!bHasOwnProperty(key)) {
23714 return false;
23715 }
23716 var valueA = objA[key];
23717 var valueB = objB[key];
23718
23719 var _ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
23720 if (_ret === false || _ret === void 0 && valueA !== valueB) {
23721 return false;
23722 }
23723 } 23066 }
23724 23067
23725 return true; 23068 ALL_HANDLERS.forEach(function (handler) {
23726 }; 23069 var newFn = void 0;
23727 23070 if (props[handler] && newChildProps[handler]) {
23728/***/ }, 23071 newFn = (0, _createChainedFunction2["default"])(props[handler], newChildProps[handler]);
23729/* 183 */ 23072 } else {
23730/***/ function(module, exports, __webpack_require__) { 23073 newFn = props[handler] || newChildProps[handler];
23731 23074 }
23732 /** 23075 if (newFn) {
23733 * lodash 3.1.2 (Custom Build) <https://lodash.com/> 23076 newChildProps[handler] = newFn;
23734 * Build: `lodash modern modularize exports="npm" -o ./` 23077 }
23735 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> 23078 });
23736 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
23737 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
23738 * Available under MIT license <https://lodash.com/license>
23739 */
23740 var getNative = __webpack_require__(184),
23741 isArguments = __webpack_require__(185),
23742 isArray = __webpack_require__(186);
23743
23744 /** Used to detect unsigned integer values. */
23745 var reIsUint = /^\d+$/;
23746
23747 /** Used for native method references. */
23748 var objectProto = Object.prototype;
23749
23750 /** Used to check objects for own properties. */
23751 var hasOwnProperty = objectProto.hasOwnProperty;
23752
23753 /* Native method references for those with the same name as other `lodash` methods. */
23754 var nativeKeys = getNative(Object, 'keys');
23755
23756 /**
23757 * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
23758 * of an array-like value.
23759 */
23760 var MAX_SAFE_INTEGER = 9007199254740991;
23761
23762 /**
23763 * The base implementation of `_.property` without support for deep paths.
23764 *
23765 * @private
23766 * @param {string} key The key of the property to get.
23767 * @returns {Function} Returns the new function.
23768 */
23769 function baseProperty(key) {
23770 return function(object) {
23771 return object == null ? undefined : object[key];
23772 };
23773 }
23774
23775 /**
23776 * Gets the "length" property value of `object`.
23777 *
23778 * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
23779 * that affects Safari on at least iOS 8.1-8.3 ARM64.
23780 *
23781 * @private
23782 * @param {Object} object The object to query.
23783 * @returns {*} Returns the "length" value.
23784 */
23785 var getLength = baseProperty('length');
23786
23787 /**
23788 * Checks if `value` is array-like.
23789 *
23790 * @private
23791 * @param {*} value The value to check.
23792 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
23793 */
23794 function isArrayLike(value) {
23795 return value != null && isLength(getLength(value));
23796 }
23797
23798 /**
23799 * Checks if `value` is a valid array-like index.
23800 *
23801 * @private
23802 * @param {*} value The value to check.
23803 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
23804 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
23805 */
23806 function isIndex(value, length) {
23807 value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
23808 length = length == null ? MAX_SAFE_INTEGER : length;
23809 return value > -1 && value % 1 == 0 && value < length;
23810 }
23811
23812 /**
23813 * Checks if `value` is a valid array-like length.
23814 *
23815 * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
23816 *
23817 * @private
23818 * @param {*} value The value to check.
23819 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
23820 */
23821 function isLength(value) {
23822 return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
23823 }
23824
23825 /**
23826 * A fallback implementation of `Object.keys` which creates an array of the
23827 * own enumerable property names of `object`.
23828 *
23829 * @private
23830 * @param {Object} object The object to query.
23831 * @returns {Array} Returns the array of property names.
23832 */
23833 function shimKeys(object) {
23834 var props = keysIn(object),
23835 propsLength = props.length,
23836 length = propsLength && object.length;
23837
23838 var allowIndexes = !!length && isLength(length) &&
23839 (isArray(object) || isArguments(object));
23840
23841 var index = -1,
23842 result = [];
23843
23844 while (++index < propsLength) {
23845 var key = props[index];
23846 if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
23847 result.push(key);
23848 }
23849 }
23850 return result;
23851 }
23852
23853 /**
23854 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
23855 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
23856 *
23857 * @static
23858 * @memberOf _
23859 * @category Lang
23860 * @param {*} value The value to check.
23861 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
23862 * @example
23863 *
23864 * _.isObject({});
23865 * // => true
23866 *
23867 * _.isObject([1, 2, 3]);
23868 * // => true
23869 *
23870 * _.isObject(1);
23871 * // => false
23872 */
23873 function isObject(value) {
23874 // Avoid a V8 JIT bug in Chrome 19-20.
23875 // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
23876 var type = typeof value;
23877 return !!value && (type == 'object' || type == 'function');
23878 }
23879
23880 /**
23881 * Creates an array of the own enumerable property names of `object`.
23882 *
23883 * **Note:** Non-object values are coerced to objects. See the
23884 * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
23885 * for more details.
23886 *
23887 * @static
23888 * @memberOf _
23889 * @category Object
23890 * @param {Object} object The object to query.
23891 * @returns {Array} Returns the array of property names.
23892 * @example
23893 *
23894 * function Foo() {
23895 * this.a = 1;
23896 * this.b = 2;
23897 * }
23898 *
23899 * Foo.prototype.c = 3;
23900 *
23901 * _.keys(new Foo);
23902 * // => ['a', 'b'] (iteration order is not guaranteed)
23903 *
23904 * _.keys('hi');
23905 * // => ['0', '1']
23906 */
23907 var keys = !nativeKeys ? shimKeys : function(object) {
23908 var Ctor = object == null ? undefined : object.constructor;
23909 if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
23910 (typeof object != 'function' && isArrayLike(object))) {
23911 return shimKeys(object);
23912 }
23913 return isObject(object) ? nativeKeys(object) : [];
23914 };
23915
23916 /**
23917 * Creates an array of the own and inherited enumerable property names of `object`.
23918 *
23919 * **Note:** Non-object values are coerced to objects.
23920 *
23921 * @static
23922 * @memberOf _
23923 * @category Object
23924 * @param {Object} object The object to query.
23925 * @returns {Array} Returns the array of property names.
23926 * @example
23927 *
23928 * function Foo() {
23929 * this.a = 1;
23930 * this.b = 2;
23931 * }
23932 *
23933 * Foo.prototype.c = 3;
23934 *
23935 * _.keysIn(new Foo);
23936 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
23937 */
23938 function keysIn(object) {
23939 if (object == null) {
23940 return [];
23941 }
23942 if (!isObject(object)) {
23943 object = Object(object);
23944 }
23945 var length = object.length;
23946 length = (length && isLength(length) &&
23947 (isArray(object) || isArguments(object)) && length) || 0;
23948
23949 var Ctor = object.constructor,
23950 index = -1,
23951 isProto = typeof Ctor == 'function' && Ctor.prototype === object,
23952 result = Array(length),
23953 skipIndexes = length > 0;
23954
23955 while (++index < length) {
23956 result[index] = (index + '');
23957 }
23958 for (var key in object) {
23959 if (!(skipIndexes && isIndex(key, length)) &&
23960 !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
23961 result.push(key);
23962 }
23963 }
23964 return result;
23965 }
23966
23967 module.exports = keys;
23968
23969
23970/***/ },
23971/* 184 */
23972/***/ function(module, exports) {
23973
23974 /**
23975 * lodash 3.9.1 (Custom Build) <https://lodash.com/>
23976 * Build: `lodash modern modularize exports="npm" -o ./`
23977 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
23978 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
23979 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
23980 * Available under MIT license <https://lodash.com/license>
23981 */
23982
23983 /** `Object#toString` result references. */
23984 var funcTag = '[object Function]';
23985
23986 /** Used to detect host constructors (Safari > 5). */
23987 var reIsHostCtor = /^\[object .+?Constructor\]$/;
23988
23989 /**
23990 * Checks if `value` is object-like.
23991 *
23992 * @private
23993 * @param {*} value The value to check.
23994 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
23995 */
23996 function isObjectLike(value) {
23997 return !!value && typeof value == 'object';
23998 }
23999
24000 /** Used for native method references. */
24001 var objectProto = Object.prototype;
24002
24003 /** Used to resolve the decompiled source of functions. */
24004 var fnToString = Function.prototype.toString;
24005
24006 /** Used to check objects for own properties. */
24007 var hasOwnProperty = objectProto.hasOwnProperty;
24008
24009 /**
24010 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
24011 * of values.
24012 */
24013 var objToString = objectProto.toString;
24014
24015 /** Used to detect if a method is native. */
24016 var reIsNative = RegExp('^' +
24017 fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
24018 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
24019 );
24020
24021 /**
24022 * Gets the native function at `key` of `object`.
24023 *
24024 * @private
24025 * @param {Object} object The object to query.
24026 * @param {string} key The key of the method to get.
24027 * @returns {*} Returns the function if it's native, else `undefined`.
24028 */
24029 function getNative(object, key) {
24030 var value = object == null ? undefined : object[key];
24031 return isNative(value) ? value : undefined;
24032 }
24033
24034 /**
24035 * Checks if `value` is classified as a `Function` object.
24036 *
24037 * @static
24038 * @memberOf _
24039 * @category Lang
24040 * @param {*} value The value to check.
24041 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
24042 * @example
24043 *
24044 * _.isFunction(_);
24045 * // => true
24046 *
24047 * _.isFunction(/abc/);
24048 * // => false
24049 */
24050 function isFunction(value) {
24051 // The use of `Object#toString` avoids issues with the `typeof` operator
24052 // in older versions of Chrome and Safari which return 'function' for regexes
24053 // and Safari 8 equivalents which return 'object' for typed array constructors.
24054 return isObject(value) && objToString.call(value) == funcTag;
24055 }
24056
24057 /**
24058 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
24059 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
24060 *
24061 * @static
24062 * @memberOf _
24063 * @category Lang
24064 * @param {*} value The value to check.
24065 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
24066 * @example
24067 *
24068 * _.isObject({});
24069 * // => true
24070 *
24071 * _.isObject([1, 2, 3]);
24072 * // => true
24073 *
24074 * _.isObject(1);
24075 * // => false
24076 */
24077 function isObject(value) {
24078 // Avoid a V8 JIT bug in Chrome 19-20.
24079 // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
24080 var type = typeof value;
24081 return !!value && (type == 'object' || type == 'function');
24082 }
24083
24084 /**
24085 * Checks if `value` is a native function.
24086 *
24087 * @static
24088 * @memberOf _
24089 * @category Lang
24090 * @param {*} value The value to check.
24091 * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
24092 * @example
24093 *
24094 * _.isNative(Array.prototype.push);
24095 * // => true
24096 *
24097 * _.isNative(_);
24098 * // => false
24099 */
24100 function isNative(value) {
24101 if (value == null) {
24102 return false;
24103 }
24104 if (isFunction(value)) {
24105 return reIsNative.test(fnToString.call(value));
24106 }
24107 return isObjectLike(value) && reIsHostCtor.test(value);
24108 }
24109
24110 module.exports = getNative;
24111
24112
24113/***/ },
24114/* 185 */
24115/***/ function(module, exports) {
24116
24117 /**
24118 * lodash 3.0.4 (Custom Build) <https://lodash.com/>
24119 * Build: `lodash modern modularize exports="npm" -o ./`
24120 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
24121 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
24122 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
24123 * Available under MIT license <https://lodash.com/license>
24124 */
24125
24126 /**
24127 * Checks if `value` is object-like.
24128 *
24129 * @private
24130 * @param {*} value The value to check.
24131 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
24132 */
24133 function isObjectLike(value) {
24134 return !!value && typeof value == 'object';
24135 }
24136
24137 /** Used for native method references. */
24138 var objectProto = Object.prototype;
24139
24140 /** Used to check objects for own properties. */
24141 var hasOwnProperty = objectProto.hasOwnProperty;
24142
24143 /** Native method references. */
24144 var propertyIsEnumerable = objectProto.propertyIsEnumerable;
24145
24146 /**
24147 * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
24148 * of an array-like value.
24149 */
24150 var MAX_SAFE_INTEGER = 9007199254740991;
24151
24152 /**
24153 * The base implementation of `_.property` without support for deep paths.
24154 *
24155 * @private
24156 * @param {string} key The key of the property to get.
24157 * @returns {Function} Returns the new function.
24158 */
24159 function baseProperty(key) {
24160 return function(object) {
24161 return object == null ? undefined : object[key];
24162 };
24163 }
24164
24165 /**
24166 * Gets the "length" property value of `object`.
24167 *
24168 * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
24169 * that affects Safari on at least iOS 8.1-8.3 ARM64.
24170 *
24171 * @private
24172 * @param {Object} object The object to query.
24173 * @returns {*} Returns the "length" value.
24174 */
24175 var getLength = baseProperty('length');
24176
24177 /**
24178 * Checks if `value` is array-like.
24179 *
24180 * @private
24181 * @param {*} value The value to check.
24182 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
24183 */
24184 function isArrayLike(value) {
24185 return value != null && isLength(getLength(value));
24186 }
24187
24188 /**
24189 * Checks if `value` is a valid array-like length.
24190 *
24191 * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
24192 *
24193 * @private
24194 * @param {*} value The value to check.
24195 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
24196 */
24197 function isLength(value) {
24198 return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
24199 }
24200
24201 /**
24202 * Checks if `value` is classified as an `arguments` object.
24203 *
24204 * @static
24205 * @memberOf _
24206 * @category Lang
24207 * @param {*} value The value to check.
24208 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
24209 * @example
24210 *
24211 * _.isArguments(function() { return arguments; }());
24212 * // => true
24213 *
24214 * _.isArguments([1, 2, 3]);
24215 * // => false
24216 */
24217 function isArguments(value) {
24218 return isObjectLike(value) && isArrayLike(value) &&
24219 hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
24220 }
24221
24222 module.exports = isArguments;
24223
24224
24225/***/ },
24226/* 186 */
24227/***/ function(module, exports) {
24228
24229 /**
24230 * lodash 3.0.4 (Custom Build) <https://lodash.com/>
24231 * Build: `lodash modern modularize exports="npm" -o ./`
24232 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
24233 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
24234 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
24235 * Available under MIT license <https://lodash.com/license>
24236 */
24237
24238 /** `Object#toString` result references. */
24239 var arrayTag = '[object Array]',
24240 funcTag = '[object Function]';
24241
24242 /** Used to detect host constructors (Safari > 5). */
24243 var reIsHostCtor = /^\[object .+?Constructor\]$/;
24244
24245 /**
24246 * Checks if `value` is object-like.
24247 *
24248 * @private
24249 * @param {*} value The value to check.
24250 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
24251 */
24252 function isObjectLike(value) {
24253 return !!value && typeof value == 'object';
24254 }
24255
24256 /** Used for native method references. */
24257 var objectProto = Object.prototype;
24258
24259 /** Used to resolve the decompiled source of functions. */
24260 var fnToString = Function.prototype.toString;
24261
24262 /** Used to check objects for own properties. */
24263 var hasOwnProperty = objectProto.hasOwnProperty;
24264
24265 /**
24266 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
24267 * of values.
24268 */
24269 var objToString = objectProto.toString;
24270
24271 /** Used to detect if a method is native. */
24272 var reIsNative = RegExp('^' +
24273 fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
24274 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
24275 );
24276
24277 /* Native method references for those with the same name as other `lodash` methods. */
24278 var nativeIsArray = getNative(Array, 'isArray');
24279
24280 /**
24281 * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
24282 * of an array-like value.
24283 */
24284 var MAX_SAFE_INTEGER = 9007199254740991;
24285
24286 /**
24287 * Gets the native function at `key` of `object`.
24288 *
24289 * @private
24290 * @param {Object} object The object to query.
24291 * @param {string} key The key of the method to get.
24292 * @returns {*} Returns the function if it's native, else `undefined`.
24293 */
24294 function getNative(object, key) {
24295 var value = object == null ? undefined : object[key];
24296 return isNative(value) ? value : undefined;
24297 }
24298
24299 /**
24300 * Checks if `value` is a valid array-like length.
24301 *
24302 * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
24303 *
24304 * @private
24305 * @param {*} value The value to check.
24306 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
24307 */
24308 function isLength(value) {
24309 return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
24310 }
24311
24312 /**
24313 * Checks if `value` is classified as an `Array` object.
24314 *
24315 * @static
24316 * @memberOf _
24317 * @category Lang
24318 * @param {*} value The value to check.
24319 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
24320 * @example
24321 *
24322 * _.isArray([1, 2, 3]);
24323 * // => true
24324 *
24325 * _.isArray(function() { return arguments; }());
24326 * // => false
24327 */
24328 var isArray = nativeIsArray || function(value) {
24329 return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
24330 };
24331
24332 /**
24333 * Checks if `value` is classified as a `Function` object.
24334 *
24335 * @static
24336 * @memberOf _
24337 * @category Lang
24338 * @param {*} value The value to check.
24339 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
24340 * @example
24341 *
24342 * _.isFunction(_);
24343 * // => true
24344 *
24345 * _.isFunction(/abc/);
24346 * // => false
24347 */
24348 function isFunction(value) {
24349 // The use of `Object#toString` avoids issues with the `typeof` operator
24350 // in older versions of Chrome and Safari which return 'function' for regexes
24351 // and Safari 8 equivalents which return 'object' for typed array constructors.
24352 return isObject(value) && objToString.call(value) == funcTag;
24353 }
24354
24355 /**
24356 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
24357 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
24358 *
24359 * @static
24360 * @memberOf _
24361 * @category Lang
24362 * @param {*} value The value to check.
24363 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
24364 * @example
24365 *
24366 * _.isObject({});
24367 * // => true
24368 *
24369 * _.isObject([1, 2, 3]);
24370 * // => true
24371 *
24372 * _.isObject(1);
24373 * // => false
24374 */
24375 function isObject(value) {
24376 // Avoid a V8 JIT bug in Chrome 19-20.
24377 // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
24378 var type = typeof value;
24379 return !!value && (type == 'object' || type == 'function');
24380 }
24381 23079
24382 /** 23080 return _react2["default"].cloneElement(child, newChildProps);
24383 * Checks if `value` is a native function.
24384 *
24385 * @static
24386 * @memberOf _
24387 * @category Lang
24388 * @param {*} value The value to check.
24389 * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
24390 * @example
24391 *
24392 * _.isNative(Array.prototype.push);
24393 * // => true
24394 *
24395 * _.isNative(_);
24396 * // => false
24397 */
24398 function isNative(value) {
24399 if (value == null) {
24400 return false;
24401 }
24402 if (isFunction(value)) {
24403 return reIsNative.test(fnToString.call(value));
24404 } 23081 }
24405 return isObjectLike(value) && reIsHostCtor.test(value); 23082 });
24406 }
24407 23083
24408 module.exports = isArray; 23084 exports["default"] = Trigger;
24409 23085 module.exports = exports['default'];
24410 23086
24411/***/ }, 23087/***/ },
24412/* 187 */ 23088/* 173 */
24413/***/ function(module, exports) { 23089/***/ function(module, exports) {
24414 23090
24415 /** 23091 /**
@@ -24436,7 +23112,25 @@
24436 module.exports = createChainedFunction; 23112 module.exports = createChainedFunction;
24437 23113
24438/***/ }, 23114/***/ },
24439/* 188 */ 23115/* 174 */
23116/***/ function(module, exports) {
23117
23118 "use strict";
23119
23120 module.exports = function contains(root, n) {
23121 var node = n;
23122 while (node) {
23123 if (node === root) {
23124 return true;
23125 }
23126 node = node.parentNode;
23127 }
23128
23129 return false;
23130 };
23131
23132/***/ },
23133/* 175 */
24440/***/ function(module, exports, __webpack_require__) { 23134/***/ function(module, exports, __webpack_require__) {
24441 23135
24442 'use strict'; 23136 'use strict';
@@ -24448,7 +23142,7 @@
24448 23142
24449 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 23143 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24450 23144
24451 var _addDomEventListener = __webpack_require__(189); 23145 var _addDomEventListener = __webpack_require__(176);
24452 23146
24453 var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener); 23147 var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener);
24454 23148
@@ -24467,7 +23161,7 @@
24467 module.exports = exports['default']; 23161 module.exports = exports['default'];
24468 23162
24469/***/ }, 23163/***/ },
24470/* 189 */ 23164/* 176 */
24471/***/ function(module, exports, __webpack_require__) { 23165/***/ function(module, exports, __webpack_require__) {
24472 23166
24473 'use strict'; 23167 'use strict';
@@ -24479,7 +23173,7 @@
24479 23173
24480 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 23174 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24481 23175
24482 var _EventObject = __webpack_require__(190); 23176 var _EventObject = __webpack_require__(177);
24483 23177
24484 var _EventObject2 = _interopRequireDefault(_EventObject); 23178 var _EventObject2 = _interopRequireDefault(_EventObject);
24485 23179
@@ -24509,7 +23203,7 @@
24509 module.exports = exports['default']; 23203 module.exports = exports['default'];
24510 23204
24511/***/ }, 23205/***/ },
24512/* 190 */ 23206/* 177 */
24513/***/ function(module, exports, __webpack_require__) { 23207/***/ function(module, exports, __webpack_require__) {
24514 23208
24515 /** 23209 /**
@@ -24526,11 +23220,11 @@
24526 23220
24527 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 23221 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24528 23222
24529 var _EventBaseObject = __webpack_require__(191); 23223 var _EventBaseObject = __webpack_require__(178);
24530 23224
24531 var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); 23225 var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject);
24532 23226
24533 var _objectAssign = __webpack_require__(192); 23227 var _objectAssign = __webpack_require__(179);
24534 23228
24535 var _objectAssign2 = _interopRequireDefault(_objectAssign); 23229 var _objectAssign2 = _interopRequireDefault(_objectAssign);
24536 23230
@@ -24792,7 +23486,7 @@
24792 module.exports = exports['default']; 23486 module.exports = exports['default'];
24793 23487
24794/***/ }, 23488/***/ },
24795/* 191 */ 23489/* 178 */
24796/***/ function(module, exports) { 23490/***/ function(module, exports) {
24797 23491
24798 /** 23492 /**
@@ -24860,11 +23554,11 @@
24860 module.exports = exports["default"]; 23554 module.exports = exports["default"];
24861 23555
24862/***/ }, 23556/***/ },
24863/* 192 */ 23557/* 179 */
24864/***/ function(module, exports) { 23558/***/ function(module, exports) {
24865 23559
24866 /* eslint-disable no-unused-vars */
24867 'use strict'; 23560 'use strict';
23561 /* eslint-disable no-unused-vars */
24868 var hasOwnProperty = Object.prototype.hasOwnProperty; 23562 var hasOwnProperty = Object.prototype.hasOwnProperty;
24869 var propIsEnumerable = Object.prototype.propertyIsEnumerable; 23563 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
24870 23564
@@ -24876,7 +23570,51 @@
24876 return Object(val); 23570 return Object(val);
24877 } 23571 }
24878 23572
24879 module.exports = Object.assign || function (target, source) { 23573 function shouldUseNative() {
23574 try {
23575 if (!Object.assign) {
23576 return false;
23577 }
23578
23579 // Detect buggy property enumeration order in older V8 versions.
23580
23581 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
23582 var test1 = new String('abc'); // eslint-disable-line
23583 test1[5] = 'de';
23584 if (Object.getOwnPropertyNames(test1)[0] === '5') {
23585 return false;
23586 }
23587
23588 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
23589 var test2 = {};
23590 for (var i = 0; i < 10; i++) {
23591 test2['_' + String.fromCharCode(i)] = i;
23592 }
23593 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
23594 return test2[n];
23595 });
23596 if (order2.join('') !== '0123456789') {
23597 return false;
23598 }
23599
23600 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
23601 var test3 = {};
23602 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
23603 test3[letter] = letter;
23604 });
23605 if (Object.keys(Object.assign({}, test3)).join('') !==
23606 'abcdefghijklmnopqrst') {
23607 return false;
23608 }
23609
23610 return true;
23611 } catch (e) {
23612 // We don't expect any of the above to throw, but better to be safe.
23613 return false;
23614 }
23615 }
23616
23617 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
24880 var from; 23618 var from;
24881 var to = toObject(target); 23619 var to = toObject(target);
24882 var symbols; 23620 var symbols;
@@ -24905,67 +23643,16 @@
24905 23643
24906 23644
24907/***/ }, 23645/***/ },
24908/* 193 */ 23646/* 180 */
24909/***/ function(module, exports) {
24910
24911 "use strict";
24912
24913 module.exports = function contains(root, n) {
24914 var node = n;
24915 while (node) {
24916 if (node === root) {
24917 return true;
24918 }
24919 node = node.parentNode;
24920 }
24921
24922 return false;
24923 };
24924
24925/***/ },
24926/* 194 */
24927/***/ function(module, exports, __webpack_require__) {
24928
24929 'use strict';
24930
24931 var React = __webpack_require__(3);
24932
24933 module.exports = function toArray(children) {
24934 var ret = [];
24935 React.Children.forEach(children, function each(c) {
24936 ret.push(c);
24937 });
24938 return ret;
24939 };
24940
24941/***/ },
24942/* 195 */
24943/***/ function(module, exports, __webpack_require__) {
24944
24945 'use strict';
24946
24947 var React = __webpack_require__(3);
24948
24949 function mirror(o) {
24950 return o;
24951 }
24952
24953 module.exports = function mapSelf(children) {
24954 // return ReactFragment
24955 return React.Children.map(children, mirror);
24956 };
24957
24958/***/ },
24959/* 196 */
24960/***/ function(module, exports, __webpack_require__) { 23647/***/ function(module, exports, __webpack_require__) {
24961 23648
24962 'use strict'; 23649 'use strict';
24963 23650
24964 Object.defineProperty(exports, '__esModule', { 23651 Object.defineProperty(exports, "__esModule", {
24965 value: true 23652 value: true
24966 }); 23653 });
24967 23654
24968 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 23655 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; };
24969 23656
24970 var _react = __webpack_require__(3); 23657 var _react = __webpack_require__(3);
24971 23658
@@ -24975,35 +23662,44 @@
24975 23662
24976 var _reactDom2 = _interopRequireDefault(_reactDom); 23663 var _reactDom2 = _interopRequireDefault(_reactDom);
24977 23664
24978 var _rcAlign = __webpack_require__(197); 23665 var _rcAlign = __webpack_require__(181);
24979 23666
24980 var _rcAlign2 = _interopRequireDefault(_rcAlign); 23667 var _rcAlign2 = _interopRequireDefault(_rcAlign);
24981 23668
24982 var _rcAnimate = __webpack_require__(208); 23669 var _rcAnimate = __webpack_require__(192);
24983 23670
24984 var _rcAnimate2 = _interopRequireDefault(_rcAnimate); 23671 var _rcAnimate2 = _interopRequireDefault(_rcAnimate);
24985 23672
24986 var _PopupInner = __webpack_require__(216); 23673 var _PopupInner = __webpack_require__(201);
24987 23674
24988 var _PopupInner2 = _interopRequireDefault(_PopupInner); 23675 var _PopupInner2 = _interopRequireDefault(_PopupInner);
24989 23676
24990 var Popup = _react2['default'].createClass({ 23677 var _LazyRenderBox = __webpack_require__(202);
23678
23679 var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
23680
23681 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23682
23683 var Popup = _react2["default"].createClass({
24991 displayName: 'Popup', 23684 displayName: 'Popup',
24992 23685
24993 propTypes: { 23686 propTypes: {
24994 visible: _react.PropTypes.bool, 23687 visible: _react.PropTypes.bool,
24995 wrap: _react.PropTypes.object,
24996 style: _react.PropTypes.object, 23688 style: _react.PropTypes.object,
24997 getClassNameFromAlign: _react.PropTypes.func, 23689 getClassNameFromAlign: _react.PropTypes.func,
23690 onAlign: _react.PropTypes.func,
23691 getRootDomNode: _react.PropTypes.func,
24998 onMouseEnter: _react.PropTypes.func, 23692 onMouseEnter: _react.PropTypes.func,
23693 align: _react.PropTypes.any,
23694 destroyPopupOnHide: _react.PropTypes.bool,
24999 className: _react.PropTypes.string, 23695 className: _react.PropTypes.string,
23696 prefixCls: _react.PropTypes.string,
25000 onMouseLeave: _react.PropTypes.func 23697 onMouseLeave: _react.PropTypes.func
25001 }, 23698 },
25002 23699
25003 componentDidMount: function componentDidMount() { 23700 componentDidMount: function componentDidMount() {
25004 this.rootNode = this.getPopupDomNode(); 23701 this.rootNode = this.getPopupDomNode();
25005 }, 23702 },
25006
25007 onAlign: function onAlign(popupDomNode, align) { 23703 onAlign: function onAlign(popupDomNode, align) {
25008 var props = this.props; 23704 var props = this.props;
25009 var alignClassName = props.getClassNameFromAlign(props.align); 23705 var alignClassName = props.getClassNameFromAlign(props.align);
@@ -25012,16 +23708,23 @@
25012 this.currentAlignClassName = currentAlignClassName; 23708 this.currentAlignClassName = currentAlignClassName;
25013 popupDomNode.className = this.getClassName(currentAlignClassName); 23709 popupDomNode.className = this.getClassName(currentAlignClassName);
25014 } 23710 }
23711 props.onAlign(popupDomNode, align);
25015 }, 23712 },
25016
25017 getPopupDomNode: function getPopupDomNode() { 23713 getPopupDomNode: function getPopupDomNode() {
25018 return _reactDom2['default'].findDOMNode(this); 23714 return _reactDom2["default"].findDOMNode(this.refs.popup);
25019 }, 23715 },
25020
25021 getTarget: function getTarget() { 23716 getTarget: function getTarget() {
25022 return _reactDom2['default'].findDOMNode(this.props.wrap); 23717 return this.props.getRootDomNode();
23718 },
23719 getMaskTransitionName: function getMaskTransitionName() {
23720 var props = this.props;
23721 var transitionName = props.maskTransitionName;
23722 var animation = props.maskAnimation;
23723 if (!transitionName && animation) {
23724 transitionName = props.prefixCls + '-' + animation;
23725 }
23726 return transitionName;
25023 }, 23727 },
25024
25025 getTransitionName: function getTransitionName() { 23728 getTransitionName: function getTransitionName() {
25026 var props = this.props; 23729 var props = this.props;
25027 var transitionName = props.transitionName; 23730 var transitionName = props.transitionName;
@@ -25030,17 +23733,10 @@
25030 } 23733 }
25031 return transitionName; 23734 return transitionName;
25032 }, 23735 },
25033
25034 getClassName: function getClassName(currentAlignClassName) { 23736 getClassName: function getClassName(currentAlignClassName) {
25035 var props = this.props; 23737 return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName;
25036 var prefixCls = props.prefixCls;
25037
25038 var className = prefixCls + ' ' + props.className + ' ';
25039 className += currentAlignClassName;
25040 return className;
25041 }, 23738 },
25042 23739 getPopupElement: function getPopupElement() {
25043 render: function render() {
25044 var props = this.props; 23740 var props = this.props;
25045 var align = props.align; 23741 var align = props.align;
25046 var style = props.style; 23742 var style = props.style;
@@ -25053,100 +23749,158 @@
25053 if (!visible) { 23749 if (!visible) {
25054 this.currentAlignClassName = null; 23750 this.currentAlignClassName = null;
25055 } 23751 }
23752 var newStyle = _extends({}, style, this.getZIndexStyle());
23753 var popupInnerProps = {
23754 className: className,
23755 prefixCls: prefixCls,
23756 ref: 'popup',
23757 onMouseEnter: props.onMouseEnter,
23758 onMouseLeave: props.onMouseLeave,
23759 style: newStyle
23760 };
25056 if (destroyPopupOnHide) { 23761 if (destroyPopupOnHide) {
25057 return _react2['default'].createElement( 23762 return _react2["default"].createElement(
25058 _rcAnimate2['default'], 23763 _rcAnimate2["default"],
25059 { component: '', 23764 {
23765 component: '',
25060 exclusive: true, 23766 exclusive: true,
25061 transitionAppear: true, 23767 transitionAppear: true,
25062 transitionName: this.getTransitionName() }, 23768 transitionName: this.getTransitionName()
25063 visible ? _react2['default'].createElement( 23769 },
25064 _rcAlign2['default'], 23770 visible ? _react2["default"].createElement(
25065 { target: this.getTarget, 23771 _rcAlign2["default"],
23772 {
23773 target: this.getTarget,
25066 key: 'popup', 23774 key: 'popup',
23775 ref: this.saveAlign,
25067 monitorWindowResize: true, 23776 monitorWindowResize: true,
25068 align: align, 23777 align: align,
25069 onAlign: this.onAlign }, 23778 onAlign: this.onAlign
25070 _react2['default'].createElement( 23779 },
25071 _PopupInner2['default'], 23780 _react2["default"].createElement(
25072 { className: className, 23781 _PopupInner2["default"],
25073 visible: true, 23782 _extends({
25074 onMouseEnter: props.onMouseEnter, 23783 visible: true
25075 onMouseLeave: props.onMouseLeave, 23784 }, popupInnerProps),
25076 style: style },
25077 props.children 23785 props.children
25078 ) 23786 )
25079 ) : null 23787 ) : null
25080 ); 23788 );
25081 } 23789 }
25082 return _react2['default'].createElement( 23790 return _react2["default"].createElement(
25083 _rcAnimate2['default'], 23791 _rcAnimate2["default"],
25084 { component: '', 23792 {
23793 component: '',
25085 exclusive: true, 23794 exclusive: true,
25086 transitionAppear: true, 23795 transitionAppear: true,
25087 transitionName: this.getTransitionName(), 23796 transitionName: this.getTransitionName(),
25088 showProp: 'xVisible' }, 23797 showProp: 'xVisible'
25089 _react2['default'].createElement( 23798 },
25090 _rcAlign2['default'], 23799 _react2["default"].createElement(
25091 { target: this.getTarget, 23800 _rcAlign2["default"],
23801 {
23802 target: this.getTarget,
25092 key: 'popup', 23803 key: 'popup',
23804 ref: this.saveAlign,
25093 monitorWindowResize: true, 23805 monitorWindowResize: true,
25094 xVisible: visible, 23806 xVisible: visible,
25095 childrenProps: { 23807 childrenProps: { visible: 'xVisible' },
25096 visible: 'xVisible'
25097 },
25098 disabled: !visible, 23808 disabled: !visible,
25099 align: align, 23809 align: align,
25100 onAlign: this.onAlign }, 23810 onAlign: this.onAlign
25101 _react2['default'].createElement( 23811 },
25102 _PopupInner2['default'], 23812 _react2["default"].createElement(
25103 { className: className, 23813 _PopupInner2["default"],
25104 hiddenClassName: hiddenClassName, 23814 _extends({
25105 onMouseEnter: props.onMouseEnter, 23815 hiddenClassName: hiddenClassName
25106 onMouseLeave: props.onMouseLeave, 23816 }, popupInnerProps),
25107 style: style },
25108 props.children 23817 props.children
25109 ) 23818 )
25110 ) 23819 )
25111 ); 23820 );
23821 },
23822 getZIndexStyle: function getZIndexStyle() {
23823 var style = {};
23824 var props = this.props;
23825 if (props.zIndex !== undefined) {
23826 style.zIndex = props.zIndex;
23827 }
23828 return style;
23829 },
23830 getMaskElement: function getMaskElement() {
23831 var props = this.props;
23832 var maskElement = void 0;
23833 if (props.mask) {
23834 var maskTransition = this.getMaskTransitionName();
23835 maskElement = _react2["default"].createElement(_LazyRenderBox2["default"], {
23836 style: this.getZIndexStyle(),
23837 key: 'mask',
23838 className: props.prefixCls + '-mask',
23839 hiddenClassName: props.prefixCls + '-mask-hidden',
23840 visible: props.visible
23841 });
23842 if (maskTransition) {
23843 maskElement = _react2["default"].createElement(
23844 _rcAnimate2["default"],
23845 {
23846 key: 'mask',
23847 showProp: 'visible',
23848 transitionAppear: true,
23849 component: '',
23850 transitionName: maskTransition
23851 },
23852 maskElement
23853 );
23854 }
23855 }
23856 return maskElement;
23857 },
23858 saveAlign: function saveAlign(align) {
23859 this.alignInstance = align;
23860 },
23861 render: function render() {
23862 return _react2["default"].createElement(
23863 'div',
23864 null,
23865 this.getMaskElement(),
23866 this.getPopupElement()
23867 );
25112 } 23868 }
25113 }); 23869 });
25114 23870
25115 exports['default'] = Popup; 23871 exports["default"] = Popup;
25116 module.exports = exports['default']; 23872 module.exports = exports['default'];
25117 23873
25118/***/ }, 23874/***/ },
25119/* 197 */ 23875/* 181 */
25120/***/ function(module, exports, __webpack_require__) { 23876/***/ function(module, exports, __webpack_require__) {
25121 23877
25122 // export this package's api
25123 'use strict'; 23878 'use strict';
25124 23879
25125 Object.defineProperty(exports, '__esModule', { 23880 Object.defineProperty(exports, "__esModule", {
25126 value: true 23881 value: true
25127 }); 23882 });
25128 23883
25129 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 23884 var _Align = __webpack_require__(182);
25130
25131 var _Align = __webpack_require__(198);
25132 23885
25133 var _Align2 = _interopRequireDefault(_Align); 23886 var _Align2 = _interopRequireDefault(_Align);
25134 23887
25135 exports['default'] = _Align2['default']; 23888 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23889
23890 exports["default"] = _Align2["default"]; // export this package's api
23891
25136 module.exports = exports['default']; 23892 module.exports = exports['default'];
25137 23893
25138/***/ }, 23894/***/ },
25139/* 198 */ 23895/* 182 */
25140/***/ function(module, exports, __webpack_require__) { 23896/***/ function(module, exports, __webpack_require__) {
25141 23897
25142 'use strict'; 23898 'use strict';
25143 23899
25144 Object.defineProperty(exports, '__esModule', { 23900 Object.defineProperty(exports, "__esModule", {
25145 value: true 23901 value: true
25146 }); 23902 });
25147 23903
25148 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25149
25150 var _react = __webpack_require__(3); 23904 var _react = __webpack_require__(3);
25151 23905
25152 var _react2 = _interopRequireDefault(_react); 23906 var _react2 = _interopRequireDefault(_react);
@@ -25155,18 +23909,22 @@
25155 23909
25156 var _reactDom2 = _interopRequireDefault(_reactDom); 23910 var _reactDom2 = _interopRequireDefault(_reactDom);
25157 23911
25158 var _domAlign = __webpack_require__(199); 23912 var _domAlign = __webpack_require__(183);
25159 23913
25160 var _domAlign2 = _interopRequireDefault(_domAlign); 23914 var _domAlign2 = _interopRequireDefault(_domAlign);
25161 23915
25162 var _rcUtil = __webpack_require__(173); 23916 var _addEventListener = __webpack_require__(175);
25163 23917
25164 var _isWindow = __webpack_require__(207); 23918 var _addEventListener2 = _interopRequireDefault(_addEventListener);
23919
23920 var _isWindow = __webpack_require__(191);
25165 23921
25166 var _isWindow2 = _interopRequireDefault(_isWindow); 23922 var _isWindow2 = _interopRequireDefault(_isWindow);
25167 23923
23924 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23925
25168 function buffer(fn, ms) { 23926 function buffer(fn, ms) {
25169 var timer = undefined; 23927 var timer = void 0;
25170 return function bufferFn() { 23928 return function bufferFn() {
25171 if (timer) { 23929 if (timer) {
25172 clearTimeout(timer); 23930 clearTimeout(timer);
@@ -25175,7 +23933,7 @@
25175 }; 23933 };
25176 } 23934 }
25177 23935
25178 var Align = _react2['default'].createClass({ 23936 var Align = _react2["default"].createClass({
25179 displayName: 'Align', 23937 displayName: 'Align',
25180 23938
25181 propTypes: { 23939 propTypes: {
@@ -25195,37 +23953,31 @@
25195 return window; 23953 return window;
25196 }, 23954 },
25197 onAlign: function onAlign() {}, 23955 onAlign: function onAlign() {},
23956
25198 monitorBufferTime: 50, 23957 monitorBufferTime: 50,
25199 monitorWindowResize: false, 23958 monitorWindowResize: false,
25200 disabled: false 23959 disabled: false
25201 }; 23960 };
25202 }, 23961 },
25203
25204 componentDidMount: function componentDidMount() { 23962 componentDidMount: function componentDidMount() {
25205 var props = this.props; 23963 var props = this.props;
25206 // if parent ref not attached .... use document.getElementById 23964 // if parent ref not attached .... use document.getElementById
25207 if (!props.disabled) { 23965 this.forceAlign();
25208 var source = _reactDom2['default'].findDOMNode(this); 23966 if (!props.disabled && props.monitorWindowResize) {
25209 props.onAlign(source, (0, _domAlign2['default'])(source, props.target(), props.align)); 23967 this.startMonitorWindowResize();
25210 if (props.monitorWindowResize) {
25211 this.startMonitorWindowResize();
25212 }
25213 } 23968 }
25214 }, 23969 },
25215
25216 componentDidUpdate: function componentDidUpdate(prevProps) { 23970 componentDidUpdate: function componentDidUpdate(prevProps) {
25217 var reAlign = false; 23971 var reAlign = false;
25218 var props = this.props; 23972 var props = this.props;
25219 var currentTarget = undefined;
25220 23973
25221 if (!props.disabled) { 23974 if (!props.disabled) {
25222 if (prevProps.disabled || prevProps.align !== props.align) { 23975 if (prevProps.disabled || prevProps.align !== props.align) {
25223 reAlign = true; 23976 reAlign = true;
25224 currentTarget = props.target();
25225 } else { 23977 } else {
25226 var lastTarget = prevProps.target(); 23978 var lastTarget = prevProps.target();
25227 currentTarget = props.target(); 23979 var currentTarget = props.target();
25228 if ((0, _isWindow2['default'])(lastTarget) && (0, _isWindow2['default'])(currentTarget)) { 23980 if ((0, _isWindow2["default"])(lastTarget) && (0, _isWindow2["default"])(currentTarget)) {
25229 reAlign = false; 23981 reAlign = false;
25230 } else if (lastTarget !== currentTarget) { 23982 } else if (lastTarget !== currentTarget) {
25231 reAlign = true; 23983 reAlign = true;
@@ -25234,8 +23986,7 @@
25234 } 23986 }
25235 23987
25236 if (reAlign) { 23988 if (reAlign) {
25237 var source = _reactDom2['default'].findDOMNode(this); 23989 this.forceAlign();
25238 props.onAlign(source, (0, _domAlign2['default'])(source, currentTarget, props.align));
25239 } 23990 }
25240 23991
25241 if (props.monitorWindowResize && !props.disabled) { 23992 if (props.monitorWindowResize && !props.disabled) {
@@ -25244,38 +23995,33 @@
25244 this.stopMonitorWindowResize(); 23995 this.stopMonitorWindowResize();
25245 } 23996 }
25246 }, 23997 },
25247
25248 componentWillUnmount: function componentWillUnmount() { 23998 componentWillUnmount: function componentWillUnmount() {
25249 this.stopMonitorWindowResize(); 23999 this.stopMonitorWindowResize();
25250 }, 24000 },
25251
25252 onWindowResize: function onWindowResize() {
25253 var props = this.props;
25254 if (!props.disabled) {
25255 var source = _reactDom2['default'].findDOMNode(this);
25256 props.onAlign(source, (0, _domAlign2['default'])(source, props.target(), props.align));
25257 }
25258 },
25259
25260 startMonitorWindowResize: function startMonitorWindowResize() { 24001 startMonitorWindowResize: function startMonitorWindowResize() {
25261 if (!this.resizeHandler) { 24002 if (!this.resizeHandler) {
25262 this.resizeHandler = _rcUtil.Dom.addEventListener(window, 'resize', buffer(this.onWindowResize, this.props.monitorBufferTime)); 24003 this.resizeHandler = (0, _addEventListener2["default"])(window, 'resize', buffer(this.forceAlign, this.props.monitorBufferTime));
25263 } 24004 }
25264 }, 24005 },
25265
25266 stopMonitorWindowResize: function stopMonitorWindowResize() { 24006 stopMonitorWindowResize: function stopMonitorWindowResize() {
25267 if (this.resizeHandler) { 24007 if (this.resizeHandler) {
25268 this.resizeHandler.remove(); 24008 this.resizeHandler.remove();
25269 this.resizeHandler = null; 24009 this.resizeHandler = null;
25270 } 24010 }
25271 }, 24011 },
25272 24012 forceAlign: function forceAlign() {
24013 var props = this.props;
24014 if (!props.disabled) {
24015 var source = _reactDom2["default"].findDOMNode(this);
24016 props.onAlign(source, (0, _domAlign2["default"])(source, props.target(), props.align));
24017 }
24018 },
25273 render: function render() { 24019 render: function render() {
25274 var _props = this.props; 24020 var _props = this.props;
25275 var childrenProps = _props.childrenProps; 24021 var childrenProps = _props.childrenProps;
25276 var children = _props.children; 24022 var children = _props.children;
25277 24023
25278 var child = _react2['default'].Children.only(children); 24024 var child = _react2["default"].Children.only(children);
25279 if (childrenProps) { 24025 if (childrenProps) {
25280 var newProps = {}; 24026 var newProps = {};
25281 for (var prop in childrenProps) { 24027 for (var prop in childrenProps) {
@@ -25283,17 +24029,17 @@
25283 newProps[prop] = this.props[childrenProps[prop]]; 24029 newProps[prop] = this.props[childrenProps[prop]];
25284 } 24030 }
25285 } 24031 }
25286 return _react2['default'].cloneElement(child, newProps); 24032 return _react2["default"].cloneElement(child, newProps);
25287 } 24033 }
25288 return child; 24034 return child;
25289 } 24035 }
25290 }); 24036 });
25291 24037
25292 exports['default'] = Align; 24038 exports["default"] = Align;
25293 module.exports = exports['default']; 24039 module.exports = exports['default'];
25294 24040
25295/***/ }, 24041/***/ },
25296/* 199 */ 24042/* 183 */
25297/***/ function(module, exports, __webpack_require__) { 24043/***/ function(module, exports, __webpack_require__) {
25298 24044
25299 /** 24045 /**
@@ -25309,27 +24055,27 @@
25309 24055
25310 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 24056 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25311 24057
25312 var _utils = __webpack_require__(200); 24058 var _utils = __webpack_require__(184);
25313 24059
25314 var _utils2 = _interopRequireDefault(_utils); 24060 var _utils2 = _interopRequireDefault(_utils);
25315 24061
25316 var _getOffsetParent = __webpack_require__(201); 24062 var _getOffsetParent = __webpack_require__(185);
25317 24063
25318 var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); 24064 var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent);
25319 24065
25320 var _getVisibleRectForElement = __webpack_require__(202); 24066 var _getVisibleRectForElement = __webpack_require__(186);
25321 24067
25322 var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement); 24068 var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement);
25323 24069
25324 var _adjustForViewport = __webpack_require__(203); 24070 var _adjustForViewport = __webpack_require__(187);
25325 24071
25326 var _adjustForViewport2 = _interopRequireDefault(_adjustForViewport); 24072 var _adjustForViewport2 = _interopRequireDefault(_adjustForViewport);
25327 24073
25328 var _getRegion = __webpack_require__(204); 24074 var _getRegion = __webpack_require__(188);
25329 24075
25330 var _getRegion2 = _interopRequireDefault(_getRegion); 24076 var _getRegion2 = _interopRequireDefault(_getRegion);
25331 24077
25332 var _getElFuturePos = __webpack_require__(205); 24078 var _getElFuturePos = __webpack_require__(189);
25333 24079
25334 var _getElFuturePos2 = _interopRequireDefault(_getElFuturePos); 24080 var _getElFuturePos2 = _interopRequireDefault(_getElFuturePos);
25335 24081
@@ -25343,6 +24089,14 @@
25343 return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom; 24089 return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;
25344 } 24090 }
25345 24091
24092 function isCompleteFailX(elFuturePos, elRegion, visibleRect) {
24093 return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;
24094 }
24095
24096 function isCompleteFailY(elFuturePos, elRegion, visibleRect) {
24097 return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;
24098 }
24099
25346 function flip(points, reg, map) { 24100 function flip(points, reg, map) {
25347 var ret = []; 24101 var ret = [];
25348 _utils2['default'].each(points, function (p) { 24102 _utils2['default'].each(points, function (p) {
@@ -25405,30 +24159,42 @@
25405 if (overflow.adjustX) { 24159 if (overflow.adjustX) {
25406 // 如果横向不能放下 24160 // 如果横向不能放下
25407 if (isFailX(elFuturePos, elRegion, visibleRect)) { 24161 if (isFailX(elFuturePos, elRegion, visibleRect)) {
25408 fail = 1;
25409 // 对齐位置反下 24162 // 对齐位置反下
25410 points = flip(points, /[lr]/ig, { 24163 var newPoints = flip(points, /[lr]/ig, {
25411 l: 'r', 24164 l: 'r',
25412 r: 'l' 24165 r: 'l'
25413 }); 24166 });
25414 // 偏移量也反下 24167 // 偏移量也反下
25415 offset = flipOffset(offset, 0); 24168 var newOffset = flipOffset(offset, 0);
25416 targetOffset = flipOffset(targetOffset, 0); 24169 var newTargetOffset = flipOffset(targetOffset, 0);
24170 var newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, refNodeRegion, newPoints, newOffset, newTargetOffset);
24171 if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {
24172 fail = 1;
24173 points = newPoints;
24174 offset = newOffset;
24175 targetOffset = newTargetOffset;
24176 }
25417 } 24177 }
25418 } 24178 }
25419 24179
25420 if (overflow.adjustY) { 24180 if (overflow.adjustY) {
25421 // 如果纵向不能放下 24181 // 如果纵向不能放下
25422 if (isFailY(elFuturePos, elRegion, visibleRect)) { 24182 if (isFailY(elFuturePos, elRegion, visibleRect)) {
25423 fail = 1;
25424 // 对齐位置反下 24183 // 对齐位置反下
25425 points = flip(points, /[tb]/ig, { 24184 var newPoints = flip(points, /[tb]/ig, {
25426 t: 'b', 24185 t: 'b',
25427 b: 't' 24186 b: 't'
25428 }); 24187 });
25429 // 偏移量也反下 24188 // 偏移量也反下
25430 offset = flipOffset(offset, 1); 24189 var newOffset = flipOffset(offset, 1);
25431 targetOffset = flipOffset(targetOffset, 1); 24190 var newTargetOffset = flipOffset(targetOffset, 1);
24191 var newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, refNodeRegion, newPoints, newOffset, newTargetOffset);
24192 if (!isCompleteFailY(newElFuturePos, elRegion, visibleRect)) {
24193 fail = 1;
24194 points = newPoints;
24195 offset = newOffset;
24196 targetOffset = newTargetOffset;
24197 }
25432 } 24198 }
25433 } 24199 }
25434 24200
@@ -25496,7 +24262,7 @@
25496 module.exports = exports['default']; 24262 module.exports = exports['default'];
25497 24263
25498/***/ }, 24264/***/ },
25499/* 200 */ 24265/* 184 */
25500/***/ function(module, exports) { 24266/***/ function(module, exports) {
25501 24267
25502 'use strict'; 24268 'use strict';
@@ -25994,7 +24760,7 @@
25994 module.exports = exports['default']; 24760 module.exports = exports['default'];
25995 24761
25996/***/ }, 24762/***/ },
25997/* 201 */ 24763/* 185 */
25998/***/ function(module, exports, __webpack_require__) { 24764/***/ function(module, exports, __webpack_require__) {
25999 24765
26000 'use strict'; 24766 'use strict';
@@ -26005,7 +24771,7 @@
26005 24771
26006 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 24772 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26007 24773
26008 var _utils = __webpack_require__(200); 24774 var _utils = __webpack_require__(184);
26009 24775
26010 var _utils2 = _interopRequireDefault(_utils); 24776 var _utils2 = _interopRequireDefault(_utils);
26011 24777
@@ -26052,7 +24818,7 @@
26052 module.exports = exports['default']; 24818 module.exports = exports['default'];
26053 24819
26054/***/ }, 24820/***/ },
26055/* 202 */ 24821/* 186 */
26056/***/ function(module, exports, __webpack_require__) { 24822/***/ function(module, exports, __webpack_require__) {
26057 24823
26058 'use strict'; 24824 'use strict';
@@ -26063,11 +24829,11 @@
26063 24829
26064 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 24830 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26065 24831
26066 var _utils = __webpack_require__(200); 24832 var _utils = __webpack_require__(184);
26067 24833
26068 var _utils2 = _interopRequireDefault(_utils); 24834 var _utils2 = _interopRequireDefault(_utils);
26069 24835
26070 var _getOffsetParent = __webpack_require__(201); 24836 var _getOffsetParent = __webpack_require__(185);
26071 24837
26072 var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); 24838 var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent);
26073 24839
@@ -26133,7 +24899,7 @@
26133 module.exports = exports['default']; 24899 module.exports = exports['default'];
26134 24900
26135/***/ }, 24901/***/ },
26136/* 203 */ 24902/* 187 */
26137/***/ function(module, exports, __webpack_require__) { 24903/***/ function(module, exports, __webpack_require__) {
26138 24904
26139 'use strict'; 24905 'use strict';
@@ -26144,7 +24910,7 @@
26144 24910
26145 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 24911 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26146 24912
26147 var _utils = __webpack_require__(200); 24913 var _utils = __webpack_require__(184);
26148 24914
26149 var _utils2 = _interopRequireDefault(_utils); 24915 var _utils2 = _interopRequireDefault(_utils);
26150 24916
@@ -26193,7 +24959,7 @@
26193 module.exports = exports['default']; 24959 module.exports = exports['default'];
26194 24960
26195/***/ }, 24961/***/ },
26196/* 204 */ 24962/* 188 */
26197/***/ function(module, exports, __webpack_require__) { 24963/***/ function(module, exports, __webpack_require__) {
26198 24964
26199 'use strict'; 24965 'use strict';
@@ -26204,7 +24970,7 @@
26204 24970
26205 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 24971 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26206 24972
26207 var _utils = __webpack_require__(200); 24973 var _utils = __webpack_require__(184);
26208 24974
26209 var _utils2 = _interopRequireDefault(_utils); 24975 var _utils2 = _interopRequireDefault(_utils);
26210 24976
@@ -26234,7 +25000,7 @@
26234 module.exports = exports['default']; 25000 module.exports = exports['default'];
26235 25001
26236/***/ }, 25002/***/ },
26237/* 205 */ 25003/* 189 */
26238/***/ function(module, exports, __webpack_require__) { 25004/***/ function(module, exports, __webpack_require__) {
26239 25005
26240 'use strict'; 25006 'use strict';
@@ -26245,7 +25011,7 @@
26245 25011
26246 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 25012 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26247 25013
26248 var _getAlignOffset = __webpack_require__(206); 25014 var _getAlignOffset = __webpack_require__(190);
26249 25015
26250 var _getAlignOffset2 = _interopRequireDefault(_getAlignOffset); 25016 var _getAlignOffset2 = _interopRequireDefault(_getAlignOffset);
26251 25017
@@ -26275,7 +25041,7 @@
26275 module.exports = exports['default']; 25041 module.exports = exports['default'];
26276 25042
26277/***/ }, 25043/***/ },
26278/* 206 */ 25044/* 190 */
26279/***/ function(module, exports) { 25045/***/ function(module, exports) {
26280 25046
26281 /** 25047 /**
@@ -26320,7 +25086,7 @@
26320 module.exports = exports['default']; 25086 module.exports = exports['default'];
26321 25087
26322/***/ }, 25088/***/ },
26323/* 207 */ 25089/* 191 */
26324/***/ function(module, exports) { 25090/***/ function(module, exports) {
26325 25091
26326 "use strict"; 25092 "use strict";
@@ -26329,59 +25095,58 @@
26329 value: true 25095 value: true
26330 }); 25096 });
26331 exports["default"] = isWindow; 25097 exports["default"] = isWindow;
26332
26333 function isWindow(obj) { 25098 function isWindow(obj) {
26334 /* eslint no-eq-null: 0 */ 25099 /* eslint no-eq-null: 0 */
26335 /* eslint eqeqeq: 0 */ 25100 /* eslint eqeqeq: 0 */
26336 return obj != null && obj == obj.window; 25101 return obj != null && obj == obj.window;
26337 } 25102 }
26338 25103 module.exports = exports['default'];
26339 module.exports = exports["default"];
26340 25104
26341/***/ }, 25105/***/ },
26342/* 208 */ 25106/* 192 */
26343/***/ function(module, exports, __webpack_require__) { 25107/***/ function(module, exports, __webpack_require__) {
26344 25108
26345 // export this package's api
26346 'use strict'; 25109 'use strict';
26347 25110
26348 module.exports = __webpack_require__(209); 25111 // export this package's api
25112 module.exports = __webpack_require__(193);
26349 25113
26350/***/ }, 25114/***/ },
26351/* 209 */ 25115/* 193 */
26352/***/ function(module, exports, __webpack_require__) { 25116/***/ function(module, exports, __webpack_require__) {
26353 25117
26354 'use strict'; 25118 'use strict';
26355 25119
26356 Object.defineProperty(exports, '__esModule', { 25120 Object.defineProperty(exports, "__esModule", {
26357 value: true 25121 value: true
26358 }); 25122 });
26359 25123
26360 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26361
26362 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26363
26364 var _react = __webpack_require__(3); 25124 var _react = __webpack_require__(3);
26365 25125
26366 var _react2 = _interopRequireDefault(_react); 25126 var _react2 = _interopRequireDefault(_react);
26367 25127
26368 var _ChildrenUtils = __webpack_require__(210); 25128 var _ChildrenUtils = __webpack_require__(194);
26369 25129
26370 var _AnimateChild = __webpack_require__(211); 25130 var _AnimateChild = __webpack_require__(195);
26371 25131
26372 var _AnimateChild2 = _interopRequireDefault(_AnimateChild); 25132 var _AnimateChild2 = _interopRequireDefault(_AnimateChild);
26373 25133
26374 var _util = __webpack_require__(215); 25134 var _util = __webpack_require__(200);
26375 25135
26376 var _util2 = _interopRequireDefault(_util); 25136 var _util2 = _interopRequireDefault(_util);
26377 25137
25138 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25139
25140 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
25141
26378 var defaultKey = 'rc_animate_' + Date.now(); 25142 var defaultKey = 'rc_animate_' + Date.now();
26379 25143
25144
26380 function getChildrenFromProps(props) { 25145 function getChildrenFromProps(props) {
26381 var children = props.children; 25146 var children = props.children;
26382 if (_react2['default'].isValidElement(children)) { 25147 if (_react2["default"].isValidElement(children)) {
26383 if (!children.key) { 25148 if (!children.key) {
26384 return _react2['default'].cloneElement(children, { 25149 return _react2["default"].cloneElement(children, {
26385 key: defaultKey 25150 key: defaultKey
26386 }); 25151 });
26387 } 25152 }
@@ -26391,22 +25156,22 @@
26391 25156
26392 function noop() {} 25157 function noop() {}
26393 25158
26394 var Animate = _react2['default'].createClass({ 25159 var Animate = _react2["default"].createClass({
26395 displayName: 'Animate', 25160 displayName: 'Animate',
26396 25161
26397 propTypes: { 25162 propTypes: {
26398 component: _react2['default'].PropTypes.any, 25163 component: _react2["default"].PropTypes.any,
26399 animation: _react2['default'].PropTypes.object, 25164 animation: _react2["default"].PropTypes.object,
26400 transitionName: _react2['default'].PropTypes.string, 25165 transitionName: _react2["default"].PropTypes.string,
26401 transitionEnter: _react2['default'].PropTypes.bool, 25166 transitionEnter: _react2["default"].PropTypes.bool,
26402 transitionAppear: _react2['default'].PropTypes.bool, 25167 transitionAppear: _react2["default"].PropTypes.bool,
26403 exclusive: _react2['default'].PropTypes.bool, 25168 exclusive: _react2["default"].PropTypes.bool,
26404 transitionLeave: _react2['default'].PropTypes.bool, 25169 transitionLeave: _react2["default"].PropTypes.bool,
26405 onEnd: _react2['default'].PropTypes.func, 25170 onEnd: _react2["default"].PropTypes.func,
26406 onEnter: _react2['default'].PropTypes.func, 25171 onEnter: _react2["default"].PropTypes.func,
26407 onLeave: _react2['default'].PropTypes.func, 25172 onLeave: _react2["default"].PropTypes.func,
26408 onAppear: _react2['default'].PropTypes.func, 25173 onAppear: _react2["default"].PropTypes.func,
26409 showProp: _react2['default'].PropTypes.string 25174 showProp: _react2["default"].PropTypes.string
26410 }, 25175 },
26411 25176
26412 getDefaultProps: function getDefaultProps() { 25177 getDefaultProps: function getDefaultProps() {
@@ -26422,7 +25187,6 @@
26422 onAppear: noop 25187 onAppear: noop
26423 }; 25188 };
26424 }, 25189 },
26425
26426 getInitialState: function getInitialState() { 25190 getInitialState: function getInitialState() {
26427 this.currentlyAnimatingKeys = {}; 25191 this.currentlyAnimatingKeys = {};
26428 this.keysToEnter = []; 25192 this.keysToEnter = [];
@@ -26431,7 +25195,6 @@
26431 children: (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(this.props)) 25195 children: (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(this.props))
26432 }; 25196 };
26433 }, 25197 },
26434
26435 componentDidMount: function componentDidMount() { 25198 componentDidMount: function componentDidMount() {
26436 var _this = this; 25199 var _this = this;
26437 25200
@@ -26446,25 +25209,30 @@
26446 _this.performAppear(child.key); 25209 _this.performAppear(child.key);
26447 }); 25210 });
26448 }, 25211 },
26449
26450 componentWillReceiveProps: function componentWillReceiveProps(nextProps) { 25212 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
26451 var _this2 = this; 25213 var _this2 = this;
26452 25214
25215 this.nextProps = nextProps;
26453 var nextChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(nextProps)); 25216 var nextChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(nextProps));
26454 var props = this.props; 25217 var props = this.props;
25218 // exclusive needs immediate response
25219 if (props.exclusive) {
25220 Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {
25221 _this2.stop(key);
25222 });
25223 }
26455 var showProp = props.showProp; 25224 var showProp = props.showProp;
26456 var currentlyAnimatingKeys = this.currentlyAnimatingKeys; 25225 var currentlyAnimatingKeys = this.currentlyAnimatingKeys;
26457 // last props children if exclusive 25226 // last props children if exclusive
26458 // exclusive needs immediate response 25227 var currentChildren = props.exclusive ? (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) : this.state.children;
26459 var currentChildren = this.state.children;
26460 // in case destroy in showProp mode 25228 // in case destroy in showProp mode
26461 var newChildren = []; 25229 var newChildren = [];
26462 if (showProp) { 25230 if (showProp) {
26463 currentChildren.forEach(function (currentChild) { 25231 currentChildren.forEach(function (currentChild) {
26464 var nextChild = (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, currentChild.key); 25232 var nextChild = (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, currentChild.key);
26465 var newChild = undefined; 25233 var newChild = void 0;
26466 if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { 25234 if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {
26467 newChild = _react2['default'].cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true)); 25235 newChild = _react2["default"].cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true));
26468 } else { 25236 } else {
26469 newChild = nextChild; 25237 newChild = nextChild;
26470 } 25238 }
@@ -26528,26 +25296,14 @@
26528 } 25296 }
26529 }); 25297 });
26530 }, 25298 },
26531 25299 componentDidUpdate: function componentDidUpdate() {
26532 componentDidUpdate: function componentDidUpdate(prevProps) { 25300 var keysToEnter = this.keysToEnter;
26533 var _this3 = this; 25301 this.keysToEnter = [];
26534 25302 keysToEnter.forEach(this.performEnter);
26535 // exclusive needs immediate response 25303 var keysToLeave = this.keysToLeave;
26536 if (this.props.exclusive && this.props !== prevProps) { 25304 this.keysToLeave = [];
26537 Object.keys(this.currentlyAnimatingKeys).forEach(function (key) { 25305 keysToLeave.forEach(this.performLeave);
26538 _this3.stop(key);
26539 });
26540 }
26541 if (this.isMounted()) {
26542 var keysToEnter = this.keysToEnter;
26543 this.keysToEnter = [];
26544 keysToEnter.forEach(this.performEnter);
26545 var keysToLeave = this.keysToLeave;
26546 this.keysToLeave = [];
26547 keysToLeave.forEach(this.performLeave);
26548 }
26549 }, 25306 },
26550
26551 performEnter: function performEnter(key) { 25307 performEnter: function performEnter(key) {
26552 // may already remove by exclusive 25308 // may already remove by exclusive
26553 if (this.refs[key]) { 25309 if (this.refs[key]) {
@@ -26555,36 +25311,37 @@
26555 this.refs[key].componentWillEnter(this.handleDoneAdding.bind(this, key, 'enter')); 25311 this.refs[key].componentWillEnter(this.handleDoneAdding.bind(this, key, 'enter'));
26556 } 25312 }
26557 }, 25313 },
26558
26559 performAppear: function performAppear(key) { 25314 performAppear: function performAppear(key) {
26560 if (this.refs[key]) { 25315 if (this.refs[key]) {
26561 this.currentlyAnimatingKeys[key] = true; 25316 this.currentlyAnimatingKeys[key] = true;
26562 this.refs[key].componentWillAppear(this.handleDoneAdding.bind(this, key, 'appear')); 25317 this.refs[key].componentWillAppear(this.handleDoneAdding.bind(this, key, 'appear'));
26563 } 25318 }
26564 }, 25319 },
26565
26566 handleDoneAdding: function handleDoneAdding(key, type) { 25320 handleDoneAdding: function handleDoneAdding(key, type) {
26567 var props = this.props; 25321 var props = this.props;
26568 delete this.currentlyAnimatingKeys[key]; 25322 delete this.currentlyAnimatingKeys[key];
25323 // if update on exclusive mode, skip check
25324 if (props.exclusive && props !== this.nextProps) {
25325 return;
25326 }
26569 var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); 25327 var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props));
26570 if (!this.isValidChildByKey(currentChildren, key)) { 25328 if (!this.isValidChildByKey(currentChildren, key)) {
26571 // exclusive will not need this 25329 // exclusive will not need this
26572 this.performLeave(key); 25330 this.performLeave(key);
26573 } else { 25331 } else {
26574 if (type === 'appear') { 25332 if (type === 'appear') {
26575 if (_util2['default'].allowAppearCallback(props)) { 25333 if (_util2["default"].allowAppearCallback(props)) {
26576 props.onAppear(key); 25334 props.onAppear(key);
26577 props.onEnd(key, true); 25335 props.onEnd(key, true);
26578 } 25336 }
26579 } else { 25337 } else {
26580 if (_util2['default'].allowEnterCallback(props)) { 25338 if (_util2["default"].allowEnterCallback(props)) {
26581 props.onEnter(key); 25339 props.onEnter(key);
26582 props.onEnd(key, true); 25340 props.onEnd(key, true);
26583 } 25341 }
26584 } 25342 }
26585 } 25343 }
26586 }, 25344 },
26587
26588 performLeave: function performLeave(key) { 25345 performLeave: function performLeave(key) {
26589 // may already remove by exclusive 25346 // may already remove by exclusive
26590 if (this.refs[key]) { 25347 if (this.refs[key]) {
@@ -26592,27 +25349,30 @@
26592 this.refs[key].componentWillLeave(this.handleDoneLeaving.bind(this, key)); 25349 this.refs[key].componentWillLeave(this.handleDoneLeaving.bind(this, key));
26593 } 25350 }
26594 }, 25351 },
26595
26596 handleDoneLeaving: function handleDoneLeaving(key) { 25352 handleDoneLeaving: function handleDoneLeaving(key) {
26597 var props = this.props; 25353 var props = this.props;
26598 delete this.currentlyAnimatingKeys[key]; 25354 delete this.currentlyAnimatingKeys[key];
25355 // if update on exclusive mode, skip check
25356 if (props.exclusive && props !== this.nextProps) {
25357 return;
25358 }
26599 var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); 25359 var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props));
26600 // in case state change is too fast 25360 // in case state change is too fast
26601 if (this.isValidChildByKey(currentChildren, key)) { 25361 if (this.isValidChildByKey(currentChildren, key)) {
26602 this.performEnter(key); 25362 this.performEnter(key);
26603 } else { 25363 } else {
26604 if (_util2['default'].allowLeaveCallback(props)) { 25364 /* eslint react/no-is-mounted:0 */
26605 props.onLeave(key);
26606 props.onEnd(key, false);
26607 }
26608 if (this.isMounted() && !(0, _ChildrenUtils.isSameChildren)(this.state.children, currentChildren, props.showProp)) { 25365 if (this.isMounted() && !(0, _ChildrenUtils.isSameChildren)(this.state.children, currentChildren, props.showProp)) {
26609 this.setState({ 25366 this.setState({
26610 children: currentChildren 25367 children: currentChildren
26611 }); 25368 });
26612 } 25369 }
25370 if (_util2["default"].allowLeaveCallback(props)) {
25371 props.onLeave(key);
25372 props.onEnd(key, false);
25373 }
26613 } 25374 }
26614 }, 25375 },
26615
26616 isValidChildByKey: function isValidChildByKey(currentChildren, key) { 25376 isValidChildByKey: function isValidChildByKey(currentChildren, key) {
26617 var showProp = this.props.showProp; 25377 var showProp = this.props.showProp;
26618 if (showProp) { 25378 if (showProp) {
@@ -26620,7 +25380,6 @@
26620 } 25380 }
26621 return (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key); 25381 return (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key);
26622 }, 25382 },
26623
26624 stop: function stop(key) { 25383 stop: function stop(key) {
26625 delete this.currentlyAnimatingKeys[key]; 25384 delete this.currentlyAnimatingKeys[key];
26626 var component = this.refs[key]; 25385 var component = this.refs[key];
@@ -26628,18 +25387,21 @@
26628 component.stop(); 25387 component.stop();
26629 } 25388 }
26630 }, 25389 },
26631
26632 render: function render() { 25390 render: function render() {
26633 var props = this.props; 25391 var props = this.props;
25392 this.nextProps = props;
26634 var stateChildren = this.state.children; 25393 var stateChildren = this.state.children;
26635 var children = null; 25394 var children = null;
26636 if (stateChildren) { 25395 if (stateChildren) {
26637 children = stateChildren.map(function (child) { 25396 children = stateChildren.map(function (child) {
25397 if (child === null) {
25398 return child;
25399 }
26638 if (!child.key) { 25400 if (!child.key) {
26639 throw new Error('must set key for <rc-animate> children'); 25401 throw new Error('must set key for <rc-animate> children');
26640 } 25402 }
26641 return _react2['default'].createElement( 25403 return _react2["default"].createElement(
26642 _AnimateChild2['default'], 25404 _AnimateChild2["default"],
26643 { 25405 {
26644 key: child.key, 25406 key: child.key,
26645 ref: child.key, 25407 ref: child.key,
@@ -26647,14 +25409,15 @@
26647 transitionName: props.transitionName, 25409 transitionName: props.transitionName,
26648 transitionEnter: props.transitionEnter, 25410 transitionEnter: props.transitionEnter,
26649 transitionAppear: props.transitionAppear, 25411 transitionAppear: props.transitionAppear,
26650 transitionLeave: props.transitionLeave }, 25412 transitionLeave: props.transitionLeave
25413 },
26651 child 25414 child
26652 ); 25415 );
26653 }); 25416 });
26654 } 25417 }
26655 var Component = props.component; 25418 var Component = props.component;
26656 if (Component) { 25419 if (Component) {
26657 return _react2['default'].createElement( 25420 return _react2["default"].createElement(
26658 Component, 25421 Component,
26659 this.props, 25422 this.props,
26660 children 25423 children
@@ -26664,16 +25427,16 @@
26664 } 25427 }
26665 }); 25428 });
26666 25429
26667 exports['default'] = Animate; 25430 exports["default"] = Animate;
26668 module.exports = exports['default']; 25431 module.exports = exports['default'];
26669 25432
26670/***/ }, 25433/***/ },
26671/* 210 */ 25434/* 194 */
26672/***/ function(module, exports, __webpack_require__) { 25435/***/ function(module, exports, __webpack_require__) {
26673 25436
26674 'use strict'; 25437 'use strict';
26675 25438
26676 Object.defineProperty(exports, '__esModule', { 25439 Object.defineProperty(exports, "__esModule", {
26677 value: true 25440 value: true
26678 }); 25441 });
26679 exports.toArrayChildren = toArrayChildren; 25442 exports.toArrayChildren = toArrayChildren;
@@ -26683,15 +25446,15 @@
26683 exports.isSameChildren = isSameChildren; 25446 exports.isSameChildren = isSameChildren;
26684 exports.mergeChildren = mergeChildren; 25447 exports.mergeChildren = mergeChildren;
26685 25448
26686 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26687
26688 var _react = __webpack_require__(3); 25449 var _react = __webpack_require__(3);
26689 25450
26690 var _react2 = _interopRequireDefault(_react); 25451 var _react2 = _interopRequireDefault(_react);
26691 25452
25453 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25454
26692 function toArrayChildren(children) { 25455 function toArrayChildren(children) {
26693 var ret = []; 25456 var ret = [];
26694 _react2['default'].Children.forEach(children, function (child) { 25457 _react2["default"].Children.forEach(children, function (child) {
26695 ret.push(child); 25458 ret.push(child);
26696 }); 25459 });
26697 return ret; 25460 return ret;
@@ -26786,17 +25549,15 @@
26786 } 25549 }
26787 25550
26788/***/ }, 25551/***/ },
26789/* 211 */ 25552/* 195 */
26790/***/ function(module, exports, __webpack_require__) { 25553/***/ function(module, exports, __webpack_require__) {
26791 25554
26792 'use strict'; 25555 'use strict';
26793 25556
26794 Object.defineProperty(exports, '__esModule', { 25557 Object.defineProperty(exports, "__esModule", {
26795 value: true 25558 value: true
26796 }); 25559 });
26797 25560
26798 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26799
26800 var _react = __webpack_require__(3); 25561 var _react = __webpack_require__(3);
26801 25562
26802 var _react2 = _interopRequireDefault(_react); 25563 var _react2 = _interopRequireDefault(_react);
@@ -26805,59 +25566,60 @@
26805 25566
26806 var _reactDom2 = _interopRequireDefault(_reactDom); 25567 var _reactDom2 = _interopRequireDefault(_reactDom);
26807 25568
26808 var _cssAnimation = __webpack_require__(212); 25569 var _cssAnimation = __webpack_require__(196);
26809 25570
26810 var _cssAnimation2 = _interopRequireDefault(_cssAnimation); 25571 var _cssAnimation2 = _interopRequireDefault(_cssAnimation);
26811 25572
26812 var _util = __webpack_require__(215); 25573 var _util = __webpack_require__(200);
26813 25574
26814 var _util2 = _interopRequireDefault(_util); 25575 var _util2 = _interopRequireDefault(_util);
26815 25576
25577 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25578
26816 var transitionMap = { 25579 var transitionMap = {
26817 enter: 'transitionEnter', 25580 enter: 'transitionEnter',
26818 appear: 'transitionAppear', 25581 appear: 'transitionAppear',
26819 leave: 'transitionLeave' 25582 leave: 'transitionLeave'
26820 }; 25583 };
26821 25584
26822 var AnimateChild = _react2['default'].createClass({ 25585 var AnimateChild = _react2["default"].createClass({
26823 displayName: 'AnimateChild', 25586 displayName: 'AnimateChild',
26824 25587
26825 propTypes: { 25588 propTypes: {
26826 children: _react2['default'].PropTypes.any 25589 children: _react2["default"].PropTypes.any
26827 }, 25590 },
26828 25591
26829 componentWillUnmount: function componentWillUnmount() { 25592 componentWillUnmount: function componentWillUnmount() {
26830 this.stop(); 25593 this.stop();
26831 }, 25594 },
26832
26833 componentWillEnter: function componentWillEnter(done) { 25595 componentWillEnter: function componentWillEnter(done) {
26834 if (_util2['default'].isEnterSupported(this.props)) { 25596 if (_util2["default"].isEnterSupported(this.props)) {
26835 this.transition('enter', done); 25597 this.transition('enter', done);
26836 } else { 25598 } else {
26837 done(); 25599 setTimeout(done, 0);
26838 } 25600 }
26839 }, 25601 },
26840
26841 componentWillAppear: function componentWillAppear(done) { 25602 componentWillAppear: function componentWillAppear(done) {
26842 if (_util2['default'].isAppearSupported(this.props)) { 25603 if (_util2["default"].isAppearSupported(this.props)) {
26843 this.transition('appear', done); 25604 this.transition('appear', done);
26844 } else { 25605 } else {
26845 done(); 25606 setTimeout(done, 0);
26846 } 25607 }
26847 }, 25608 },
26848
26849 componentWillLeave: function componentWillLeave(done) { 25609 componentWillLeave: function componentWillLeave(done) {
26850 if (_util2['default'].isLeaveSupported(this.props)) { 25610 if (_util2["default"].isLeaveSupported(this.props)) {
26851 this.transition('leave', done); 25611 this.transition('leave', done);
26852 } else { 25612 } else {
26853 done(); 25613 // always sync, do not interupt with react component life cycle
25614 // update hidden -> animate hidden ->
25615 // didUpdate -> animate leave -> unmount (if animate is none)
25616 setTimeout(done, 0);
26854 } 25617 }
26855 }, 25618 },
26856
26857 transition: function transition(animationType, finishCallback) { 25619 transition: function transition(animationType, finishCallback) {
26858 var _this = this; 25620 var _this = this;
26859 25621
26860 var node = _reactDom2['default'].findDOMNode(this); 25622 var node = _reactDom2["default"].findDOMNode(this);
26861 var props = this.props; 25623 var props = this.props;
26862 var transitionName = props.transitionName; 25624 var transitionName = props.transitionName;
26863 this.stop(); 25625 this.stop();
@@ -26866,12 +25628,11 @@
26866 finishCallback(); 25628 finishCallback();
26867 }; 25629 };
26868 if ((_cssAnimation.isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { 25630 if ((_cssAnimation.isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) {
26869 this.stopper = (0, _cssAnimation2['default'])(node, transitionName + '-' + animationType, end); 25631 this.stopper = (0, _cssAnimation2["default"])(node, transitionName + '-' + animationType, end);
26870 } else { 25632 } else {
26871 this.stopper = props.animation[animationType](node, end); 25633 this.stopper = props.animation[animationType](node, end);
26872 } 25634 }
26873 }, 25635 },
26874
26875 stop: function stop() { 25636 stop: function stop() {
26876 var stopper = this.stopper; 25637 var stopper = this.stopper;
26877 if (stopper) { 25638 if (stopper) {
@@ -26879,28 +25640,45 @@
26879 stopper.stop(); 25640 stopper.stop();
26880 } 25641 }
26881 }, 25642 },
26882
26883 render: function render() { 25643 render: function render() {
26884 return this.props.children; 25644 return this.props.children;
26885 } 25645 }
26886 }); 25646 });
26887 25647
26888 exports['default'] = AnimateChild; 25648 exports["default"] = AnimateChild;
26889 module.exports = exports['default']; 25649 module.exports = exports['default'];
26890 25650
26891/***/ }, 25651/***/ },
26892/* 212 */ 25652/* 196 */
26893/***/ function(module, exports, __webpack_require__) { 25653/***/ function(module, exports, __webpack_require__) {
26894 25654
26895 'use strict'; 25655 'use strict';
26896 25656
26897 var Event = __webpack_require__(213); 25657 Object.defineProperty(exports, "__esModule", {
26898 var Css = __webpack_require__(214); 25658 value: true
26899 var isCssAnimationSupported = Event.endEvents.length !== 0; 25659 });
25660
25661 var _Event = __webpack_require__(197);
25662
25663 var _Event2 = _interopRequireDefault(_Event);
25664
25665 var _componentClasses = __webpack_require__(198);
25666
25667 var _componentClasses2 = _interopRequireDefault(_componentClasses);
25668
25669 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25670
25671 var isCssAnimationSupported = _Event2["default"].endEvents.length !== 0;
25672
25673
25674 var capitalPrefixes = ['Webkit', 'Moz', 'O',
25675 // ms is special .... !
25676 'ms'];
25677 var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', ''];
26900 25678
26901 function getDuration(node, name) { 25679 function getDuration(node, name) {
26902 var style = window.getComputedStyle(node); 25680 var style = window.getComputedStyle(node);
26903 var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', '']; 25681
26904 var ret = ''; 25682 var ret = '';
26905 for (var i = 0; i < prefixes.length; i++) { 25683 for (var i = 0; i < prefixes.length; i++) {
26906 ret = style.getPropertyValue(prefixes[i] + name); 25684 ret = style.getPropertyValue(prefixes[i] + name);
@@ -26933,9 +25711,19 @@
26933 } 25711 }
26934 } 25712 }
26935 25713
26936 var cssAnimation = function cssAnimation(node, transitionName, callback) { 25714 var cssAnimation = function cssAnimation(node, transitionName, endCallback) {
26937 var className = transitionName; 25715 var className = transitionName;
26938 var activeClassName = className + '-active'; 25716 var activeClassName = className + '-active';
25717 var end = endCallback;
25718 var start = void 0;
25719 var active = void 0;
25720 var nodeClasses = (0, _componentClasses2["default"])(node);
25721
25722 if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') {
25723 end = endCallback.end;
25724 start = endCallback.start;
25725 active = endCallback.active;
25726 }
26939 25727
26940 if (node.rcEndListener) { 25728 if (node.rcEndListener) {
26941 node.rcEndListener(); 25729 node.rcEndListener();
@@ -26953,28 +25741,35 @@
26953 25741
26954 clearBrowserBugTimeout(node); 25742 clearBrowserBugTimeout(node);
26955 25743
26956 Css.removeClass(node, className); 25744 nodeClasses.remove(className);
26957 Css.removeClass(node, activeClassName); 25745 nodeClasses.remove(activeClassName);
26958 25746
26959 Event.removeEndEventListener(node, node.rcEndListener); 25747 _Event2["default"].removeEndEventListener(node, node.rcEndListener);
26960 node.rcEndListener = null; 25748 node.rcEndListener = null;
26961 25749
26962 // Usually this optional callback is used for informing an owner of 25750 // Usually this optional end is used for informing an owner of
26963 // a leave animation and telling it to remove the child. 25751 // a leave animation and telling it to remove the child.
26964 if (callback) { 25752 if (end) {
26965 callback(); 25753 end();
26966 } 25754 }
26967 }; 25755 };
26968 25756
26969 Event.addEndEventListener(node, node.rcEndListener); 25757 _Event2["default"].addEndEventListener(node, node.rcEndListener);
26970 25758
26971 Css.addClass(node, className); 25759 if (start) {
25760 start();
25761 }
25762 nodeClasses.add(className);
26972 25763
26973 node.rcAnimTimeout = setTimeout(function () { 25764 node.rcAnimTimeout = setTimeout(function () {
26974 node.rcAnimTimeout = null; 25765 node.rcAnimTimeout = null;
26975 Css.addClass(node, activeClassName); 25766 nodeClasses.add(activeClassName);
25767 if (active) {
25768 setTimeout(active, 0);
25769 }
26976 fixBrowserByTimeout(node); 25770 fixBrowserByTimeout(node);
26977 }, 0); 25771 // 30ms for firefox
25772 }, 30);
26978 25773
26979 return { 25774 return {
26980 stop: function stop() { 25775 stop: function stop() {
@@ -27002,7 +25797,7 @@
27002 25797
27003 clearBrowserBugTimeout(node); 25798 clearBrowserBugTimeout(node);
27004 25799
27005 Event.removeEndEventListener(node, node.rcEndListener); 25800 _Event2["default"].removeEndEventListener(node, node.rcEndListener);
27006 node.rcEndListener = null; 25801 node.rcEndListener = null;
27007 25802
27008 // Usually this optional callback is used for informing an owner of 25803 // Usually this optional callback is used for informing an owner of
@@ -27012,7 +25807,7 @@
27012 } 25807 }
27013 }; 25808 };
27014 25809
27015 Event.addEndEventListener(node, node.rcEndListener); 25810 _Event2["default"].addEndEventListener(node, node.rcEndListener);
27016 25811
27017 node.rcAnimTimeout = setTimeout(function () { 25812 node.rcAnimTimeout = setTimeout(function () {
27018 for (var s in style) { 25813 for (var s in style) {
@@ -27033,25 +25828,25 @@
27033 property = ''; 25828 property = '';
27034 } 25829 }
27035 property = property || ''; 25830 property = property || '';
27036 ['Webkit', 'Moz', 'O', 25831 capitalPrefixes.forEach(function (prefix) {
27037 // ms is special .... !
27038 'ms'].forEach(function (prefix) {
27039 node.style[prefix + 'Transition' + property] = v; 25832 node.style[prefix + 'Transition' + property] = v;
27040 }); 25833 });
27041 }; 25834 };
27042 25835
27043 cssAnimation.addClass = Css.addClass;
27044 cssAnimation.removeClass = Css.removeClass;
27045 cssAnimation.isCssAnimationSupported = isCssAnimationSupported; 25836 cssAnimation.isCssAnimationSupported = isCssAnimationSupported;
27046 25837
27047 module.exports = cssAnimation; 25838 exports["default"] = cssAnimation;
25839 module.exports = exports['default'];
27048 25840
27049/***/ }, 25841/***/ },
27050/* 213 */ 25842/* 197 */
27051/***/ function(module, exports) { 25843/***/ function(module, exports) {
27052 25844
27053 'use strict'; 25845 'use strict';
27054 25846
25847 Object.defineProperty(exports, "__esModule", {
25848 value: true
25849 });
27055 var EVENT_NAME_MAP = { 25850 var EVENT_NAME_MAP = {
27056 transitionend: { 25851 transitionend: {
27057 transition: 'transitionend', 25852 transition: 'transitionend',
@@ -27097,7 +25892,7 @@
27097 } 25892 }
27098 } 25893 }
27099 25894
27100 if (typeof window !== 'undefined') { 25895 if (typeof window !== 'undefined' && typeof document !== 'undefined') {
27101 detectEvents(); 25896 detectEvents();
27102 } 25897 }
27103 25898
@@ -27120,6 +25915,7 @@
27120 }); 25915 });
27121 }, 25916 },
27122 25917
25918
27123 endEvents: endEvents, 25919 endEvents: endEvents,
27124 25920
27125 removeEndEventListener: function removeEndEventListener(node, eventListener) { 25921 removeEndEventListener: function removeEndEventListener(node, eventListener) {
@@ -27132,41 +25928,220 @@
27132 } 25928 }
27133 }; 25929 };
27134 25930
27135 module.exports = TransitionEvents; 25931 exports["default"] = TransitionEvents;
25932 module.exports = exports['default'];
27136 25933
27137/***/ }, 25934/***/ },
27138/* 214 */ 25935/* 198 */
27139/***/ function(module, exports) { 25936/***/ function(module, exports, __webpack_require__) {
27140 25937
27141 'use strict'; 25938 /**
25939 * Module dependencies.
25940 */
25941
25942 try {
25943 var index = __webpack_require__(199);
25944 } catch (err) {
25945 var index = __webpack_require__(199);
25946 }
25947
25948 /**
25949 * Whitespace regexp.
25950 */
27142 25951
27143 var SPACE = ' '; 25952 var re = /\s+/;
27144 var RE_CLASS = /[\n\t\r]/g;
27145 25953
27146 function norm(elemClass) { 25954 /**
27147 return (SPACE + elemClass + SPACE).replace(RE_CLASS, SPACE); 25955 * toString reference.
25956 */
25957
25958 var toString = Object.prototype.toString;
25959
25960 /**
25961 * Wrap `el` in a `ClassList`.
25962 *
25963 * @param {Element} el
25964 * @return {ClassList}
25965 * @api public
25966 */
25967
25968 module.exports = function(el){
25969 return new ClassList(el);
25970 };
25971
25972 /**
25973 * Initialize a new ClassList for `el`.
25974 *
25975 * @param {Element} el
25976 * @api private
25977 */
25978
25979 function ClassList(el) {
25980 if (!el || !el.nodeType) {
25981 throw new Error('A DOM element reference is required');
25982 }
25983 this.el = el;
25984 this.list = el.classList;
27148 } 25985 }
27149 25986
27150 module.exports = { 25987 /**
27151 addClass: function addClass(elem, className) { 25988 * Add class `name` if not already present.
27152 elem.className += ' ' + className; 25989 *
27153 }, 25990 * @param {String} name
25991 * @return {ClassList}
25992 * @api public
25993 */
25994
25995 ClassList.prototype.add = function(name){
25996 // classList
25997 if (this.list) {
25998 this.list.add(name);
25999 return this;
26000 }
26001
26002 // fallback
26003 var arr = this.array();
26004 var i = index(arr, name);
26005 if (!~i) arr.push(name);
26006 this.el.className = arr.join(' ');
26007 return this;
26008 };
26009
26010 /**
26011 * Remove class `name` when present, or
26012 * pass a regular expression to remove
26013 * any which match.
26014 *
26015 * @param {String|RegExp} name
26016 * @return {ClassList}
26017 * @api public
26018 */
26019
26020 ClassList.prototype.remove = function(name){
26021 if ('[object RegExp]' == toString.call(name)) {
26022 return this.removeMatching(name);
26023 }
26024
26025 // classList
26026 if (this.list) {
26027 this.list.remove(name);
26028 return this;
26029 }
26030
26031 // fallback
26032 var arr = this.array();
26033 var i = index(arr, name);
26034 if (~i) arr.splice(i, 1);
26035 this.el.className = arr.join(' ');
26036 return this;
26037 };
26038
26039 /**
26040 * Remove all classes matching `re`.
26041 *
26042 * @param {RegExp} re
26043 * @return {ClassList}
26044 * @api private
26045 */
26046
26047 ClassList.prototype.removeMatching = function(re){
26048 var arr = this.array();
26049 for (var i = 0; i < arr.length; i++) {
26050 if (re.test(arr[i])) {
26051 this.remove(arr[i]);
26052 }
26053 }
26054 return this;
26055 };
26056
26057 /**
26058 * Toggle class `name`, can force state via `force`.
26059 *
26060 * For browsers that support classList, but do not support `force` yet,
26061 * the mistake will be detected and corrected.
26062 *
26063 * @param {String} name
26064 * @param {Boolean} force
26065 * @return {ClassList}
26066 * @api public
26067 */
27154 26068
27155 removeClass: function removeClass(elem, n) { 26069 ClassList.prototype.toggle = function(name, force){
27156 var elemClass = elem.className.trim(); 26070 // classList
27157 var className = norm(elemClass); 26071 if (this.list) {
27158 var needle = n.trim(); 26072 if ("undefined" !== typeof force) {
27159 needle = SPACE + needle + SPACE; 26073 if (force !== this.list.toggle(name, force)) {
27160 // 一个 cls 有可能多次出现:'link link2 link link3 link' 26074 this.list.toggle(name); // toggle again to correct
27161 while (className.indexOf(needle) >= 0) { 26075 }
27162 className = className.replace(needle, SPACE); 26076 } else {
26077 this.list.toggle(name);
27163 } 26078 }
27164 elem.className = className.trim(); 26079 return this;
26080 }
26081
26082 // fallback
26083 if ("undefined" !== typeof force) {
26084 if (!force) {
26085 this.remove(name);
26086 } else {
26087 this.add(name);
26088 }
26089 } else {
26090 if (this.has(name)) {
26091 this.remove(name);
26092 } else {
26093 this.add(name);
26094 }
26095 }
26096
26097 return this;
26098 };
26099
26100 /**
26101 * Return an array of classes.
26102 *
26103 * @return {Array}
26104 * @api public
26105 */
26106
26107 ClassList.prototype.array = function(){
26108 var className = this.el.getAttribute('class') || '';
26109 var str = className.replace(/^\s+|\s+$/g, '');
26110 var arr = str.split(re);
26111 if ('' === arr[0]) arr.shift();
26112 return arr;
26113 };
26114
26115 /**
26116 * Check if class `name` is present.
26117 *
26118 * @param {String} name
26119 * @return {ClassList}
26120 * @api public
26121 */
26122
26123 ClassList.prototype.has =
26124 ClassList.prototype.contains = function(name){
26125 return this.list
26126 ? this.list.contains(name)
26127 : !! ~index(this.array(), name);
26128 };
26129
26130
26131/***/ },
26132/* 199 */
26133/***/ function(module, exports) {
26134
26135 module.exports = function(arr, obj){
26136 if (arr.indexOf) return arr.indexOf(obj);
26137 for (var i = 0; i < arr.length; ++i) {
26138 if (arr[i] === obj) return i;
27165 } 26139 }
26140 return -1;
27166 }; 26141 };
27167 26142
27168/***/ }, 26143/***/ },
27169/* 215 */ 26144/* 200 */
27170/***/ function(module, exports) { 26145/***/ function(module, exports) {
27171 26146
27172 "use strict"; 26147 "use strict";
@@ -27184,7 +26159,6 @@
27184 isLeaveSupported: function isLeaveSupported(props) { 26159 isLeaveSupported: function isLeaveSupported(props) {
27185 return props.transitionName && props.transitionLeave || props.animation.leave; 26160 return props.transitionName && props.transitionLeave || props.animation.leave;
27186 }, 26161 },
27187
27188 allowAppearCallback: function allowAppearCallback(props) { 26162 allowAppearCallback: function allowAppearCallback(props) {
27189 return props.transitionAppear || props.animation.appear; 26163 return props.transitionAppear || props.animation.appear;
27190 }, 26164 },
@@ -27196,30 +26170,35 @@
27196 } 26170 }
27197 }; 26171 };
27198 exports["default"] = util; 26172 exports["default"] = util;
27199 module.exports = exports["default"]; 26173 module.exports = exports['default'];
27200 26174
27201/***/ }, 26175/***/ },
27202/* 216 */ 26176/* 201 */
27203/***/ function(module, exports, __webpack_require__) { 26177/***/ function(module, exports, __webpack_require__) {
27204 26178
27205 'use strict'; 26179 'use strict';
27206 26180
27207 Object.defineProperty(exports, '__esModule', { 26181 Object.defineProperty(exports, "__esModule", {
27208 value: true 26182 value: true
27209 }); 26183 });
27210 26184
27211 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
27212
27213 var _react = __webpack_require__(3); 26185 var _react = __webpack_require__(3);
27214 26186
27215 var _react2 = _interopRequireDefault(_react); 26187 var _react2 = _interopRequireDefault(_react);
27216 26188
27217 var PopupInner = _react2['default'].createClass({ 26189 var _LazyRenderBox = __webpack_require__(202);
26190
26191 var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
26192
26193 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
26194
26195 var PopupInner = _react2["default"].createClass({
27218 displayName: 'PopupInner', 26196 displayName: 'PopupInner',
27219 26197
27220 propTypes: { 26198 propTypes: {
27221 hiddenClassName: _react.PropTypes.string, 26199 hiddenClassName: _react.PropTypes.string,
27222 className: _react.PropTypes.string, 26200 className: _react.PropTypes.string,
26201 prefixCls: _react.PropTypes.string,
27223 onMouseEnter: _react.PropTypes.func, 26202 onMouseEnter: _react.PropTypes.func,
27224 onMouseLeave: _react.PropTypes.func, 26203 onMouseLeave: _react.PropTypes.func,
27225 children: _react.PropTypes.any 26204 children: _react.PropTypes.any
@@ -27230,45 +26209,95 @@
27230 if (!props.visible) { 26209 if (!props.visible) {
27231 className += ' ' + props.hiddenClassName; 26210 className += ' ' + props.hiddenClassName;
27232 } 26211 }
27233 return _react2['default'].createElement( 26212 return _react2["default"].createElement(
27234 'div', 26213 'div',
27235 { className: className, 26214 {
26215 className: className,
27236 onMouseEnter: props.onMouseEnter, 26216 onMouseEnter: props.onMouseEnter,
27237 onMouseLeave: props.onMouseLeave, 26217 onMouseLeave: props.onMouseLeave,
27238 style: props.style }, 26218 style: props.style
27239 props.children 26219 },
26220 _react2["default"].createElement(
26221 _LazyRenderBox2["default"],
26222 { className: props.prefixCls + '-content', visible: props.visible },
26223 props.children
26224 )
27240 ); 26225 );
27241 } 26226 }
27242 }); 26227 });
27243 26228
27244 exports['default'] = PopupInner; 26229 exports["default"] = PopupInner;
27245 module.exports = exports['default']; 26230 module.exports = exports['default'];
27246 26231
27247/***/ }, 26232/***/ },
27248/* 217 */ 26233/* 202 */
27249/***/ function(module, exports, __webpack_require__) { 26234/***/ function(module, exports, __webpack_require__) {
27250 26235
27251 'use strict'; 26236 'use strict';
27252 26237
27253 Object.defineProperty(exports, '__esModule', { 26238 Object.defineProperty(exports, "__esModule", {
27254 value: true 26239 value: true
27255 }); 26240 });
27256 exports.getAlignFromPlacement = getAlignFromPlacement;
27257 exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign;
27258 26241
27259 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 26242 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; };
27260 26243
27261 var _objectAssign = __webpack_require__(192); 26244 var _react = __webpack_require__(3);
27262 26245
27263 var _objectAssign2 = _interopRequireDefault(_objectAssign); 26246 var _react2 = _interopRequireDefault(_react);
27264 26247
26248 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
26249
26250 var LazyRenderBox = _react2["default"].createClass({
26251 displayName: 'LazyRenderBox',
26252
26253 propTypes: {
26254 children: _react.PropTypes.any,
26255 className: _react.PropTypes.string,
26256 visible: _react.PropTypes.bool,
26257 hiddenClassName: _react.PropTypes.string
26258 },
26259 shouldComponentUpdate: function shouldComponentUpdate(nextProps) {
26260 return nextProps.hiddenClassName || nextProps.visible;
26261 },
26262 render: function render() {
26263 if (this.props.hiddenClassName) {
26264 var className = this.props.className;
26265 if (!this.props.visible) {
26266 className += ' ' + this.props.hiddenClassName;
26267 }
26268 return _react2["default"].createElement('div', _extends({}, this.props, { className: className }));
26269 }
26270 if (_react2["default"].Children.count(this.props.children) > 1) {
26271 return _react2["default"].createElement('div', this.props);
26272 }
26273 return _react2["default"].Children.only(this.props.children);
26274 }
26275 });
26276
26277 exports["default"] = LazyRenderBox;
26278 module.exports = exports['default'];
26279
26280/***/ },
26281/* 203 */
26282/***/ function(module, exports) {
26283
26284 'use strict';
26285
26286 Object.defineProperty(exports, "__esModule", {
26287 value: true
26288 });
26289
26290 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; };
26291
26292 exports.getAlignFromPlacement = getAlignFromPlacement;
26293 exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign;
27265 function isPointsEq(a1, a2) { 26294 function isPointsEq(a1, a2) {
27266 return a1[0] === a2[0] && a1[1] === a2[1]; 26295 return a1[0] === a2[0] && a1[1] === a2[1];
27267 } 26296 }
27268 26297
27269 function getAlignFromPlacement(builtinPlacements, placementStr, align) { 26298 function getAlignFromPlacement(builtinPlacements, placementStr, align) {
27270 var baseAlign = builtinPlacements[placementStr] || {}; 26299 var baseAlign = builtinPlacements[placementStr] || {};
27271 return (0, _objectAssign2['default'])({}, baseAlign, align); 26300 return _extends({}, baseAlign, align);
27272 } 26301 }
27273 26302
27274 function getPopupClassNameFromAlign(builtinPlacements, prefixCls, align) { 26303 function getPopupClassNameFromAlign(builtinPlacements, prefixCls, align) {
@@ -27284,7 +26313,7 @@
27284 } 26313 }
27285 26314
27286/***/ }, 26315/***/ },
27287/* 218 */ 26316/* 204 */
27288/***/ function(module, exports, __webpack_require__) { 26317/***/ function(module, exports, __webpack_require__) {
27289 26318
27290 'use strict'; 26319 'use strict';
@@ -27299,15 +26328,15 @@
27299 26328
27300 var _react2 = _interopRequireDefault(_react); 26329 var _react2 = _interopRequireDefault(_react);
27301 26330
27302 var _mixinCommonMixin = __webpack_require__(219); 26331 var _mixinCommonMixin = __webpack_require__(205);
27303 26332
27304 var _mixinCommonMixin2 = _interopRequireDefault(_mixinCommonMixin); 26333 var _mixinCommonMixin2 = _interopRequireDefault(_mixinCommonMixin);
27305 26334
27306 var _Header = __webpack_require__(221); 26335 var _Header = __webpack_require__(207);
27307 26336
27308 var _Header2 = _interopRequireDefault(_Header); 26337 var _Header2 = _interopRequireDefault(_Header);
27309 26338
27310 var _Combobox = __webpack_require__(223); 26339 var _Combobox = __webpack_require__(209);
27311 26340
27312 var _Combobox2 = _interopRequireDefault(_Combobox); 26341 var _Combobox2 = _interopRequireDefault(_Combobox);
27313 26342
@@ -27452,7 +26481,7 @@
27452 module.exports = exports['default']; 26481 module.exports = exports['default'];
27453 26482
27454/***/ }, 26483/***/ },
27455/* 219 */ 26484/* 205 */
27456/***/ function(module, exports, __webpack_require__) { 26485/***/ function(module, exports, __webpack_require__) {
27457 26486
27458 'use strict'; 26487 'use strict';
@@ -27465,7 +26494,7 @@
27465 26494
27466 var _react = __webpack_require__(3); 26495 var _react = __webpack_require__(3);
27467 26496
27468 var _localeEn_US = __webpack_require__(220); 26497 var _localeEn_US = __webpack_require__(206);
27469 26498
27470 var _localeEn_US2 = _interopRequireDefault(_localeEn_US); 26499 var _localeEn_US2 = _interopRequireDefault(_localeEn_US);
27471 26500
@@ -27485,7 +26514,7 @@
27485 module.exports = exports['default']; 26514 module.exports = exports['default'];
27486 26515
27487/***/ }, 26516/***/ },
27488/* 220 */ 26517/* 206 */
27489/***/ function(module, exports, __webpack_require__) { 26518/***/ function(module, exports, __webpack_require__) {
27490 26519
27491 'use strict'; 26520 'use strict';
@@ -27512,7 +26541,7 @@
27512 module.exports = exports['default']; 26541 module.exports = exports['default'];
27513 26542
27514/***/ }, 26543/***/ },
27515/* 221 */ 26544/* 207 */
27516/***/ function(module, exports, __webpack_require__) { 26545/***/ function(module, exports, __webpack_require__) {
27517 26546
27518 'use strict'; 26547 'use strict';
@@ -27527,7 +26556,7 @@
27527 26556
27528 var _react2 = _interopRequireDefault(_react); 26557 var _react2 = _interopRequireDefault(_react);
27529 26558
27530 var _utilSelection = __webpack_require__(222); 26559 var _utilSelection = __webpack_require__(208);
27531 26560
27532 var _utilSelection2 = _interopRequireDefault(_utilSelection); 26561 var _utilSelection2 = _interopRequireDefault(_utilSelection);
27533 26562
@@ -27709,7 +26738,7 @@
27709 }, 26738 },
27710 26739
27711 selectRange: function selectRange() { 26740 selectRange: function selectRange() {
27712 this.refs.input.focus(); 26741 this.refs.input.select();
27713 if (this.props.currentSelectPanel && this.refs.input.value) { 26742 if (this.props.currentSelectPanel && this.refs.input.value) {
27714 var selectionRangeStart = 0; 26743 var selectionRangeStart = 0;
27715 var selectionRangeEnd = 0; 26744 var selectionRangeEnd = 0;
@@ -27745,7 +26774,7 @@
27745 module.exports = exports['default']; 26774 module.exports = exports['default'];
27746 26775
27747/***/ }, 26776/***/ },
27748/* 222 */ 26777/* 208 */
27749/***/ function(module, exports) { 26778/***/ function(module, exports) {
27750 26779
27751 'use strict'; 26780 'use strict';
@@ -27776,7 +26805,7 @@
27776 module.exports = exports['default']; 26805 module.exports = exports['default'];
27777 26806
27778/***/ }, 26807/***/ },
27779/* 223 */ 26808/* 209 */
27780/***/ function(module, exports, __webpack_require__) { 26809/***/ function(module, exports, __webpack_require__) {
27781 26810
27782 'use strict'; 26811 'use strict';
@@ -27791,7 +26820,7 @@
27791 26820
27792 var _react2 = _interopRequireDefault(_react); 26821 var _react2 = _interopRequireDefault(_react);
27793 26822
27794 var _Select = __webpack_require__(224); 26823 var _Select = __webpack_require__(210);
27795 26824
27796 var _Select2 = _interopRequireDefault(_Select); 26825 var _Select2 = _interopRequireDefault(_Select);
27797 26826
@@ -27957,7 +26986,7 @@
27957 module.exports = exports['default']; 26986 module.exports = exports['default'];
27958 26987
27959/***/ }, 26988/***/ },
27960/* 224 */ 26989/* 210 */
27961/***/ function(module, exports, __webpack_require__) { 26990/***/ function(module, exports, __webpack_require__) {
27962 26991
27963 'use strict'; 26992 'use strict';
@@ -27978,7 +27007,7 @@
27978 27007
27979 var _reactDom2 = _interopRequireDefault(_reactDom); 27008 var _reactDom2 = _interopRequireDefault(_reactDom);
27980 27009
27981 var _classnames2 = __webpack_require__(177); 27010 var _classnames2 = __webpack_require__(211);
27982 27011
27983 var _classnames3 = _interopRequireDefault(_classnames2); 27012 var _classnames3 = _interopRequireDefault(_classnames2);
27984 27013
@@ -28095,7 +27124,61 @@
28095 module.exports = exports['default']; 27124 module.exports = exports['default'];
28096 27125
28097/***/ }, 27126/***/ },
28098/* 225 */ 27127/* 211 */
27128/***/ function(module, exports, __webpack_require__) {
27129
27130 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
27131 Copyright (c) 2016 Jed Watson.
27132 Licensed under the MIT License (MIT), see
27133 http://jedwatson.github.io/classnames
27134 */
27135 /* global define */
27136
27137 (function () {
27138 'use strict';
27139
27140 var hasOwn = {}.hasOwnProperty;
27141
27142 function classNames () {
27143 var classes = [];
27144
27145 for (var i = 0; i < arguments.length; i++) {
27146 var arg = arguments[i];
27147 if (!arg) continue;
27148
27149 var argType = typeof arg;
27150
27151 if (argType === 'string' || argType === 'number') {
27152 classes.push(arg);
27153 } else if (Array.isArray(arg)) {
27154 classes.push(classNames.apply(null, arg));
27155 } else if (argType === 'object') {
27156 for (var key in arg) {
27157 if (hasOwn.call(arg, key) && arg[key]) {
27158 classes.push(key);
27159 }
27160 }
27161 }
27162 }
27163
27164 return classes.join(' ');
27165 }
27166
27167 if (typeof module !== 'undefined' && module.exports) {
27168 module.exports = classNames;
27169 } else if (true) {
27170 // register as 'classnames', consistent with npm package name
27171 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
27172 return classNames;
27173 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
27174 } else {
27175 window.classNames = classNames;
27176 }
27177 }());
27178
27179
27180/***/ },
27181/* 212 */
28099/***/ function(module, exports) { 27182/***/ function(module, exports) {
28100 27183
28101 'use strict'; 27184 'use strict';
@@ -28141,7 +27224,7 @@
28141 module.exports = exports['default']; 27224 module.exports = exports['default'];
28142 27225
28143/***/ }, 27226/***/ },
28144/* 226 */ 27227/* 213 */
28145/***/ function(module, exports, __webpack_require__) { 27228/***/ function(module, exports, __webpack_require__) {
28146 27229
28147 'use strict'; 27230 'use strict';
@@ -28165,7 +27248,7 @@
28165 } 27248 }
28166 27249
28167/***/ }, 27250/***/ },
28168/* 227 */ 27251/* 214 */
28169/***/ function(module, exports, __webpack_require__) { 27252/***/ function(module, exports, __webpack_require__) {
28170 27253
28171 'use strict'; 27254 'use strict';
@@ -28176,11 +27259,11 @@
28176 27259
28177 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 27260 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
28178 27261
28179 var _gregorianCalendarFormatLibLocaleZh_CN = __webpack_require__(228); 27262 var _gregorianCalendarFormatLibLocaleZh_CN = __webpack_require__(215);
28180 27263
28181 var _gregorianCalendarFormatLibLocaleZh_CN2 = _interopRequireDefault(_gregorianCalendarFormatLibLocaleZh_CN); 27264 var _gregorianCalendarFormatLibLocaleZh_CN2 = _interopRequireDefault(_gregorianCalendarFormatLibLocaleZh_CN);
28182 27265
28183 var _gregorianCalendarLibLocaleZh_CN = __webpack_require__(229); 27266 var _gregorianCalendarLibLocaleZh_CN = __webpack_require__(216);
28184 27267
28185 var _gregorianCalendarLibLocaleZh_CN2 = _interopRequireDefault(_gregorianCalendarLibLocaleZh_CN); 27268 var _gregorianCalendarLibLocaleZh_CN2 = _interopRequireDefault(_gregorianCalendarLibLocaleZh_CN);
28186 27269
@@ -28192,7 +27275,7 @@
28192 module.exports = exports['default']; 27275 module.exports = exports['default'];
28193 27276
28194/***/ }, 27277/***/ },
28195/* 228 */ 27278/* 215 */
28196/***/ function(module, exports) { 27279/***/ function(module, exports) {
28197 27280
28198 'use strict'; 27281 'use strict';
@@ -28211,7 +27294,7 @@
28211 }; 27294 };
28212 27295
28213/***/ }, 27296/***/ },
28214/* 229 */ 27297/* 216 */
28215/***/ function(module, exports) { 27298/***/ function(module, exports) {
28216 27299
28217 /* 27300 /*