react-bootstrap 0.29.4 → 0.29.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/react-bootstrap.js +134 -51
- package/dist/react-bootstrap.min.js +9 -9
- package/dist/react-bootstrap.min.js.map +1 -1
- package/lib/Dropdown.js +35 -9
- package/lib/OverlayTrigger.js +1 -1
- package/lib/TabContainer.js +12 -2
- package/lib/TabContent.js +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [v0.29.5]
|
|
2
|
+
> 2016-06-18
|
|
3
|
+
|
|
4
|
+
- **Feature:** Allow function refs on dropdown components ([#1948])
|
|
5
|
+
- **Bugfix:** Fix bugs with tab selection and state management ([#1956])
|
|
6
|
+
|
|
7
|
+
[v0.29.5]: https://github.com/react-bootstrap/react-bootstrap/compare/v0.29.4...v0.29.5
|
|
8
|
+
[#1948]: https://github.com/react-bootstrap/react-bootstrap/pull/1948
|
|
9
|
+
[#1956]: https://github.com/react-bootstrap/react-bootstrap/pull/1956
|
|
10
|
+
|
|
11
|
+
|
|
1
12
|
## [v0.29.4]
|
|
2
13
|
> 2016-05-10
|
|
3
14
|
|
package/dist/react-bootstrap.js
CHANGED
|
@@ -1652,16 +1652,27 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
1652
1652
|
|
|
1653
1653
|
var _warning2 = _interopRequireDefault(_warning);
|
|
1654
1654
|
|
|
1655
|
+
var warned = {};
|
|
1656
|
+
|
|
1655
1657
|
function deprecated(propType, explanation) {
|
|
1656
1658
|
return function validate(props, propName, componentName) {
|
|
1657
1659
|
if (props[propName] != null) {
|
|
1658
|
-
|
|
1660
|
+
var message = '"' + propName + '" property of "' + componentName + '" has been deprecated.\n' + explanation;
|
|
1661
|
+
if (!warned[message]) {
|
|
1662
|
+
_warning2['default'](false, message);
|
|
1663
|
+
warned[message] = true;
|
|
1664
|
+
}
|
|
1659
1665
|
}
|
|
1660
1666
|
|
|
1661
1667
|
return propType(props, propName, componentName);
|
|
1662
1668
|
};
|
|
1663
1669
|
}
|
|
1664
1670
|
|
|
1671
|
+
function _resetWarned() {
|
|
1672
|
+
warned = {};
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
deprecated._resetWarned = _resetWarned;
|
|
1665
1676
|
module.exports = exports['default'];
|
|
1666
1677
|
|
|
1667
1678
|
/***/ },
|
|
@@ -2513,13 +2524,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
2513
2524
|
|
|
2514
2525
|
/***/ },
|
|
2515
2526
|
/* 53 */
|
|
2516
|
-
/***/ function(module, exports) {
|
|
2527
|
+
/***/ function(module, exports, __webpack_require__) {
|
|
2517
2528
|
|
|
2518
2529
|
'use strict';
|
|
2519
2530
|
|
|
2520
2531
|
exports.__esModule = true;
|
|
2521
2532
|
exports['default'] = all;
|
|
2522
2533
|
|
|
2534
|
+
var _common = __webpack_require__(50);
|
|
2535
|
+
|
|
2523
2536
|
function all() {
|
|
2524
2537
|
for (var _len = arguments.length, propTypes = Array(_len), _key = 0; _key < _len; _key++) {
|
|
2525
2538
|
propTypes[_key] = arguments[_key];
|
|
@@ -2539,7 +2552,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
2539
2552
|
throw new Error('No validations provided');
|
|
2540
2553
|
}
|
|
2541
2554
|
|
|
2542
|
-
|
|
2555
|
+
function validate(props, propName, componentName) {
|
|
2543
2556
|
for (var i = 0; i < propTypes.length; i++) {
|
|
2544
2557
|
var result = propTypes[i](props, propName, componentName);
|
|
2545
2558
|
|
|
@@ -2547,7 +2560,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
2547
2560
|
return result;
|
|
2548
2561
|
}
|
|
2549
2562
|
}
|
|
2550
|
-
}
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
return _common.createChainableTypeChecker(validate);
|
|
2551
2566
|
}
|
|
2552
2567
|
|
|
2553
2568
|
module.exports = exports['default'];
|
|
@@ -3177,7 +3192,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
3177
3192
|
arrOfProps[_key] = arguments[_key];
|
|
3178
3193
|
}
|
|
3179
3194
|
|
|
3180
|
-
function validate(props, propName
|
|
3195
|
+
function validate(props, propName) {
|
|
3181
3196
|
var usedPropCount = arrOfProps.map(function (listedProp) {
|
|
3182
3197
|
return props[listedProp];
|
|
3183
3198
|
}).reduce(function (acc, curr) {
|
|
@@ -5549,6 +5564,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5549
5564
|
|
|
5550
5565
|
var _uncontrollable2 = _interopRequireDefault(_uncontrollable);
|
|
5551
5566
|
|
|
5567
|
+
var _warning = __webpack_require__(36);
|
|
5568
|
+
|
|
5569
|
+
var _warning2 = _interopRequireDefault(_warning);
|
|
5570
|
+
|
|
5552
5571
|
var _utilsBootstrapUtils = __webpack_require__(24);
|
|
5553
5572
|
|
|
5554
5573
|
var _utilsCreateChainedFunction = __webpack_require__(84);
|
|
@@ -5575,7 +5594,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5575
5594
|
|
|
5576
5595
|
var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle);
|
|
5577
5596
|
|
|
5578
|
-
var TOGGLE_REF = 'toggle-btn';
|
|
5579
5597
|
var TOGGLE_ROLE = _DropdownToggle2['default'].defaultProps.bsRole;
|
|
5580
5598
|
var MENU_ROLE = _DropdownMenu2['default'].defaultProps.bsRole;
|
|
5581
5599
|
|
|
@@ -5624,7 +5642,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5624
5642
|
|
|
5625
5643
|
Dropdown.prototype.componentWillUpdate = function componentWillUpdate(nextProps) {
|
|
5626
5644
|
if (!nextProps.open && this.props.open) {
|
|
5627
|
-
this._focusInDropdown = _domHelpersQueryContains2['default'](_reactDom2['default'].findDOMNode(this.
|
|
5645
|
+
this._focusInDropdown = _domHelpersQueryContains2['default'](_reactDom2['default'].findDOMNode(this.menu), _domHelpersActiveElement2['default'](document));
|
|
5628
5646
|
}
|
|
5629
5647
|
};
|
|
5630
5648
|
|
|
@@ -5697,8 +5715,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5697
5715
|
case _keycode2['default'].codes.down:
|
|
5698
5716
|
if (!this.props.open) {
|
|
5699
5717
|
this.toggleOpen('keydown');
|
|
5700
|
-
} else if (this.
|
|
5701
|
-
this.
|
|
5718
|
+
} else if (this.menu.focusNext) {
|
|
5719
|
+
this.menu.focusNext();
|
|
5702
5720
|
}
|
|
5703
5721
|
event.preventDefault();
|
|
5704
5722
|
break;
|
|
@@ -5719,7 +5737,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5719
5737
|
};
|
|
5720
5738
|
|
|
5721
5739
|
Dropdown.prototype.focusNextOnOpen = function focusNextOnOpen() {
|
|
5722
|
-
var menu = this.
|
|
5740
|
+
var menu = this.menu;
|
|
5723
5741
|
|
|
5724
5742
|
if (!menu.focusNext) {
|
|
5725
5743
|
return;
|
|
@@ -5731,7 +5749,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5731
5749
|
};
|
|
5732
5750
|
|
|
5733
5751
|
Dropdown.prototype.focus = function focus() {
|
|
5734
|
-
var toggle = _reactDom2['default'].findDOMNode(this.
|
|
5752
|
+
var toggle = _reactDom2['default'].findDOMNode(this.toggle);
|
|
5735
5753
|
|
|
5736
5754
|
if (toggle && toggle.focus) {
|
|
5737
5755
|
toggle.focus();
|
|
@@ -5763,8 +5781,20 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5763
5781
|
};
|
|
5764
5782
|
|
|
5765
5783
|
Dropdown.prototype.refineMenu = function refineMenu(menu, open) {
|
|
5784
|
+
var _this2 = this;
|
|
5785
|
+
|
|
5786
|
+
var ref = function ref(r) {
|
|
5787
|
+
return _this2.menu = r;
|
|
5788
|
+
};
|
|
5789
|
+
|
|
5790
|
+
if (typeof menu.ref === 'string') {
|
|
5791
|
+
true ? _warning2['default'](false, 'String refs are not supported on `<Dropdown.Menu>` components. ' + 'To apply a ref to the component use the callback signature: \n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : undefined;
|
|
5792
|
+
} else {
|
|
5793
|
+
ref = _utilsCreateChainedFunction2['default'](menu.ref, ref);
|
|
5794
|
+
}
|
|
5795
|
+
|
|
5766
5796
|
var menuProps = {
|
|
5767
|
-
ref:
|
|
5797
|
+
ref: ref,
|
|
5768
5798
|
open: open,
|
|
5769
5799
|
labelledBy: this.props.id,
|
|
5770
5800
|
pullRight: this.props.pullRight,
|
|
@@ -5779,10 +5809,22 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5779
5809
|
};
|
|
5780
5810
|
|
|
5781
5811
|
Dropdown.prototype.refineToggle = function refineToggle(toggle, open) {
|
|
5812
|
+
var _this3 = this;
|
|
5813
|
+
|
|
5814
|
+
var ref = function ref(r) {
|
|
5815
|
+
return _this3.toggle = r;
|
|
5816
|
+
};
|
|
5817
|
+
|
|
5818
|
+
if (typeof toggle.ref === 'string') {
|
|
5819
|
+
true ? _warning2['default'](false, 'String refs are not supported on `<Dropdown.Toggle>` components. ' + 'To apply a ref to the component use the callback signature: \n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : undefined;
|
|
5820
|
+
} else {
|
|
5821
|
+
ref = _utilsCreateChainedFunction2['default'](toggle.ref, ref);
|
|
5822
|
+
}
|
|
5823
|
+
|
|
5782
5824
|
var toggleProps = {
|
|
5825
|
+
ref: ref,
|
|
5783
5826
|
open: open,
|
|
5784
5827
|
id: this.props.id,
|
|
5785
|
-
ref: TOGGLE_REF,
|
|
5786
5828
|
role: this.props.role
|
|
5787
5829
|
};
|
|
5788
5830
|
|
|
@@ -5798,7 +5840,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5798
5840
|
|
|
5799
5841
|
Dropdown.Toggle = _DropdownToggle2['default'];
|
|
5800
5842
|
|
|
5801
|
-
Dropdown.TOGGLE_REF = TOGGLE_REF;
|
|
5802
5843
|
Dropdown.TOGGLE_ROLE = TOGGLE_ROLE;
|
|
5803
5844
|
Dropdown.MENU_ROLE = MENU_ROLE;
|
|
5804
5845
|
|
|
@@ -6027,7 +6068,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
6027
6068
|
'insert': 45,
|
|
6028
6069
|
'delete': 46,
|
|
6029
6070
|
'command': 91,
|
|
6030
|
-
'
|
|
6071
|
+
'left command': 91,
|
|
6072
|
+
'right command': 93,
|
|
6031
6073
|
'numpad *': 106,
|
|
6032
6074
|
'numpad +': 107,
|
|
6033
6075
|
'numpad -': 109,
|
|
@@ -6068,7 +6110,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
6068
6110
|
'escape': 27,
|
|
6069
6111
|
'spc': 32,
|
|
6070
6112
|
'pgup': 33,
|
|
6071
|
-
'pgdn':
|
|
6113
|
+
'pgdn': 34,
|
|
6072
6114
|
'ins': 45,
|
|
6073
6115
|
'del': 46,
|
|
6074
6116
|
'cmd': 91
|
|
@@ -8847,12 +8889,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8847
8889
|
|
|
8848
8890
|
exports.__esModule = true;
|
|
8849
8891
|
|
|
8850
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
8851
|
-
|
|
8852
8892
|
var _createUncontrollable = __webpack_require__(160);
|
|
8853
8893
|
|
|
8854
8894
|
var _createUncontrollable2 = _interopRequireDefault(_createUncontrollable);
|
|
8855
8895
|
|
|
8896
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8897
|
+
|
|
8856
8898
|
var mixin = {
|
|
8857
8899
|
shouldComponentUpdate: function shouldComponentUpdate() {
|
|
8858
8900
|
//let the forceUpdate trigger the update
|
|
@@ -8872,7 +8914,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8872
8914
|
if (component.isMounted()) component.forceUpdate();
|
|
8873
8915
|
}
|
|
8874
8916
|
|
|
8875
|
-
exports
|
|
8917
|
+
exports.default = (0, _createUncontrollable2.default)([mixin], set);
|
|
8876
8918
|
module.exports = exports['default'];
|
|
8877
8919
|
|
|
8878
8920
|
/***/ },
|
|
@@ -8885,22 +8927,26 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8885
8927
|
|
|
8886
8928
|
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; };
|
|
8887
8929
|
|
|
8888
|
-
exports
|
|
8889
|
-
|
|
8890
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
|
8891
|
-
|
|
8892
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
8893
|
-
|
|
8894
|
-
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
8930
|
+
exports.default = createUncontrollable;
|
|
8895
8931
|
|
|
8896
8932
|
var _react = __webpack_require__(20);
|
|
8897
8933
|
|
|
8898
8934
|
var _react2 = _interopRequireDefault(_react);
|
|
8899
8935
|
|
|
8936
|
+
var _invariant = __webpack_require__(32);
|
|
8937
|
+
|
|
8938
|
+
var _invariant2 = _interopRequireDefault(_invariant);
|
|
8939
|
+
|
|
8900
8940
|
var _utils = __webpack_require__(161);
|
|
8901
8941
|
|
|
8902
8942
|
var utils = _interopRequireWildcard(_utils);
|
|
8903
8943
|
|
|
8944
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
8945
|
+
|
|
8946
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8947
|
+
|
|
8948
|
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
8949
|
+
|
|
8904
8950
|
function createUncontrollable(mixins, set) {
|
|
8905
8951
|
|
|
8906
8952
|
return uncontrollable;
|
|
@@ -8910,10 +8956,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8910
8956
|
|
|
8911
8957
|
var displayName = Component.displayName || Component.name || 'Component',
|
|
8912
8958
|
basePropTypes = utils.getType(Component).propTypes,
|
|
8959
|
+
isCompositeComponent = utils.isReactComponent(Component),
|
|
8913
8960
|
propTypes;
|
|
8914
8961
|
|
|
8915
8962
|
propTypes = utils.uncontrolledPropTypes(controlledValues, basePropTypes, displayName);
|
|
8916
8963
|
|
|
8964
|
+
(0, _invariant2.default)(isCompositeComponent || !methods.length, '[uncontrollable] stateless function components cannot pass through methods ' + 'becasue they have no associated instances. Check component: ' + displayName + ', ' + 'attempting to pass through methods: ' + methods.join(', '));
|
|
8917
8965
|
methods = utils.transform(methods, function (obj, method) {
|
|
8918
8966
|
obj[method] = function () {
|
|
8919
8967
|
var _refs$inner;
|
|
@@ -8922,7 +8970,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8922
8970
|
};
|
|
8923
8971
|
}, {});
|
|
8924
8972
|
|
|
8925
|
-
var component = _react2
|
|
8973
|
+
var component = _react2.default.createClass(_extends({
|
|
8926
8974
|
|
|
8927
8975
|
displayName: 'Uncontrolled(' + displayName + ')',
|
|
8928
8976
|
|
|
@@ -8931,7 +8979,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8931
8979
|
propTypes: propTypes
|
|
8932
8980
|
|
|
8933
8981
|
}, methods, {
|
|
8934
|
-
|
|
8935
8982
|
componentWillMount: function componentWillMount() {
|
|
8936
8983
|
var props = this.props,
|
|
8937
8984
|
keys = Object.keys(controlledValues);
|
|
@@ -8941,9 +8988,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8941
8988
|
}, {});
|
|
8942
8989
|
},
|
|
8943
8990
|
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
*
|
|
8991
|
+
|
|
8992
|
+
/**
|
|
8993
|
+
* If a prop switches from controlled to Uncontrolled
|
|
8994
|
+
* reset its value to the defaultValue
|
|
8947
8995
|
*/
|
|
8948
8996
|
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
|
|
8949
8997
|
var _this = this;
|
|
@@ -8957,7 +9005,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8957
9005
|
}
|
|
8958
9006
|
});
|
|
8959
9007
|
},
|
|
8960
|
-
|
|
8961
9008
|
render: function render() {
|
|
8962
9009
|
var _this2 = this;
|
|
8963
9010
|
|
|
@@ -8981,21 +9028,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
8981
9028
|
newProps[handle] = setAndNotify.bind(_this2, propName);
|
|
8982
9029
|
});
|
|
8983
9030
|
|
|
8984
|
-
newProps = _extends({}, props, newProps, {
|
|
9031
|
+
newProps = _extends({}, props, newProps, {
|
|
9032
|
+
ref: isCompositeComponent ? 'inner' : null
|
|
9033
|
+
});
|
|
8985
9034
|
|
|
8986
|
-
return _react2
|
|
9035
|
+
return _react2.default.createElement(Component, newProps);
|
|
8987
9036
|
}
|
|
8988
|
-
|
|
8989
9037
|
}));
|
|
8990
9038
|
|
|
8991
9039
|
component.ControlledComponent = Component;
|
|
8992
9040
|
|
|
8993
|
-
/**
|
|
8994
|
-
* useful when wrapping a Component and you want to control
|
|
8995
|
-
* everything
|
|
9041
|
+
/**
|
|
9042
|
+
* useful when wrapping a Component and you want to control
|
|
9043
|
+
* everything
|
|
8996
9044
|
*/
|
|
8997
|
-
component.deferControlTo = function (newComponent
|
|
8998
|
-
|
|
9045
|
+
component.deferControlTo = function (newComponent) {
|
|
9046
|
+
var additions = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
|
9047
|
+
var nextMethods = arguments[2];
|
|
8999
9048
|
|
|
9000
9049
|
return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods);
|
|
9001
9050
|
};
|
|
@@ -9022,7 +9071,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
9022
9071
|
}
|
|
9023
9072
|
}
|
|
9024
9073
|
}
|
|
9025
|
-
|
|
9026
9074
|
module.exports = exports['default'];
|
|
9027
9075
|
|
|
9028
9076
|
/***/ },
|
|
@@ -9032,6 +9080,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
9032
9080
|
'use strict';
|
|
9033
9081
|
|
|
9034
9082
|
exports.__esModule = true;
|
|
9083
|
+
exports.version = undefined;
|
|
9035
9084
|
exports.customPropType = customPropType;
|
|
9036
9085
|
exports.uncontrolledPropTypes = uncontrolledPropTypes;
|
|
9037
9086
|
exports.getType = getType;
|
|
@@ -9041,10 +9090,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
9041
9090
|
exports.chain = chain;
|
|
9042
9091
|
exports.transform = transform;
|
|
9043
9092
|
exports.each = each;
|
|
9093
|
+
exports.isReactComponent = isReactComponent;
|
|
9044
9094
|
exports.has = has;
|
|
9045
9095
|
|
|
9046
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
9047
|
-
|
|
9048
9096
|
var _react = __webpack_require__(20);
|
|
9049
9097
|
|
|
9050
9098
|
var _react2 = _interopRequireDefault(_react);
|
|
@@ -9053,6 +9101,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
9053
9101
|
|
|
9054
9102
|
var _invariant2 = _interopRequireDefault(_invariant);
|
|
9055
9103
|
|
|
9104
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9105
|
+
|
|
9056
9106
|
function customPropType(handler, propType, name) {
|
|
9057
9107
|
|
|
9058
9108
|
return function (props, propName) {
|
|
@@ -9074,7 +9124,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
9074
9124
|
transform(controlledValues, function (obj, handler, prop) {
|
|
9075
9125
|
var type = basePropTypes[prop];
|
|
9076
9126
|
|
|
9077
|
-
_invariant2
|
|
9127
|
+
(0, _invariant2.default)(typeof handler === 'string' && handler.trim().length, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop);
|
|
9078
9128
|
|
|
9079
9129
|
obj[prop] = customPropType(handler, type, displayName);
|
|
9080
9130
|
|
|
@@ -9085,9 +9135,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
9085
9135
|
return propTypes;
|
|
9086
9136
|
}
|
|
9087
9137
|
|
|
9088
|
-
var version = _react2
|
|
9089
|
-
|
|
9090
|
-
exports.version = version;
|
|
9138
|
+
var version = exports.version = _react2.default.version.split('.').map(parseFloat);
|
|
9091
9139
|
|
|
9092
9140
|
function getType(component) {
|
|
9093
9141
|
if (version[0] >= 15 || version[0] === 0 && version[1] >= 13) return component;
|
|
@@ -9134,7 +9182,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
9134
9182
|
function each(obj, cb, thisArg) {
|
|
9135
9183
|
if (Array.isArray(obj)) return obj.forEach(cb, thisArg);
|
|
9136
9184
|
|
|
9137
|
-
for (var key in obj)
|
|
9185
|
+
for (var key in obj) {
|
|
9186
|
+
if (has(obj, key)) cb.call(thisArg, obj[key], key, obj);
|
|
9187
|
+
}
|
|
9188
|
+
}
|
|
9189
|
+
|
|
9190
|
+
/**
|
|
9191
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
9192
|
+
* All rights reserved.
|
|
9193
|
+
*
|
|
9194
|
+
* This source code is licensed under the BSD-style license found in the
|
|
9195
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
9196
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
9197
|
+
*/
|
|
9198
|
+
function isReactComponent(component) {
|
|
9199
|
+
return !!(component && component.prototype && component.prototype.isReactComponent);
|
|
9138
9200
|
}
|
|
9139
9201
|
|
|
9140
9202
|
function has(o, k) {
|
|
@@ -16002,7 +16064,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
16002
16064
|
delayHide: _react2['default'].PropTypes.number,
|
|
16003
16065
|
|
|
16004
16066
|
/**
|
|
16005
|
-
* The initial visibility state of the Overlay, for more nuanced visibility
|
|
16067
|
+
* The initial visibility state of the Overlay, for more nuanced visibility control consider
|
|
16006
16068
|
* using the Overlay component directly.
|
|
16007
16069
|
*/
|
|
16008
16070
|
defaultOverlayShown: _react2['default'].PropTypes.bool,
|
|
@@ -18362,14 +18424,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
18362
18424
|
getChildContext: function getChildContext() {
|
|
18363
18425
|
var _props = this.props;
|
|
18364
18426
|
var activeKey = _props.activeKey;
|
|
18365
|
-
var onSelect = _props.onSelect;
|
|
18366
18427
|
var generateChildId = _props.generateChildId;
|
|
18367
18428
|
var id = _props.id;
|
|
18368
18429
|
|
|
18369
18430
|
return {
|
|
18370
18431
|
$bs_tabcontainer: {
|
|
18371
18432
|
activeKey: activeKey,
|
|
18372
|
-
onSelect:
|
|
18433
|
+
onSelect: this.handleSelect,
|
|
18373
18434
|
getId: generateChildId || function (key, type) {
|
|
18374
18435
|
return id ? id + '-' + type + '-' + key : null;
|
|
18375
18436
|
}
|
|
@@ -18377,6 +18438,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
18377
18438
|
};
|
|
18378
18439
|
},
|
|
18379
18440
|
|
|
18441
|
+
componentWillUnmount: function componentWillUnmount() {
|
|
18442
|
+
// isMounted() isn't `true` at this point;
|
|
18443
|
+
this.unmounting = true;
|
|
18444
|
+
},
|
|
18445
|
+
|
|
18446
|
+
handleSelect: function handleSelect(key) {
|
|
18447
|
+
if (!this.unmounting) {
|
|
18448
|
+
this.props.onSelect(key);
|
|
18449
|
+
}
|
|
18450
|
+
},
|
|
18451
|
+
|
|
18380
18452
|
render: function render() {
|
|
18381
18453
|
var _props2 = this.props;
|
|
18382
18454
|
var children = _props2.children;
|
|
@@ -18554,6 +18626,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
18554
18626
|
|
|
18555
18627
|
return function () {
|
|
18556
18628
|
panes.splice(panes.indexOf(eventKey), 1);
|
|
18629
|
+
|
|
18630
|
+
// #1892
|
|
18631
|
+
// new active state can propagate down _before_
|
|
18632
|
+
// the tab actually unmounts, so it will map be exiting.
|
|
18633
|
+
// since an exiting tab won't complete, clear the bad state
|
|
18634
|
+
if (eventKey === _this._exitingPane) {
|
|
18635
|
+
_this.handlePaneExited();
|
|
18636
|
+
}
|
|
18637
|
+
|
|
18638
|
+
// If the tab was active, we need to tell the container
|
|
18639
|
+
// that it no longer exists and as such is not active.
|
|
18557
18640
|
if (eventKey === _this.getActiveKey()) {
|
|
18558
18641
|
_this.getContext('$bs_tabcontainer').onSelect();
|
|
18559
18642
|
}
|